var nF=Object.defineProperty;var rF=(e,t,n)=>t in e?nF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var me=(e,t,n)=>(rF(e,typeof t!="symbol"?t+"":t,n),n);function iF(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 s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).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)}})();var Gl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iD={exports:{}},Cv={},oD={exports:{}},it={};/** * @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 Jd=Symbol.for("react.element"),oF=Symbol.for("react.portal"),sF=Symbol.for("react.fragment"),aF=Symbol.for("react.strict_mode"),lF=Symbol.for("react.profiler"),cF=Symbol.for("react.provider"),uF=Symbol.for("react.context"),fF=Symbol.for("react.forward_ref"),dF=Symbol.for("react.suspense"),hF=Symbol.for("react.memo"),pF=Symbol.for("react.lazy"),iE=Symbol.iterator;function mF(e){return e===null||typeof e!="object"?null:(e=iE&&e[iE]||e["@@iterator"],typeof e=="function"?e:null)}var sD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aD=Object.assign,lD={};function su(e,t,n){this.props=e,this.context=t,this.refs=lD,this.updater=n||sD}su.prototype.isReactComponent={};su.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")};su.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cD(){}cD.prototype=su.prototype;function Rx(e,t,n){this.props=e,this.context=t,this.refs=lD,this.updater=n||sD}var Nx=Rx.prototype=new cD;Nx.constructor=Rx;aD(Nx,su.prototype);Nx.isPureReactComponent=!0;var oE=Array.isArray,uD=Object.prototype.hasOwnProperty,Ax={current:null},fD={key:!0,ref:!0,__self:!0,__source:!0};function dD(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)uD.call(t,r)&&!fD.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1Math.max(Math.min(e,n),t);function sf(e){return gs(eh(e*2.55),0,255)}function ks(e){return gs(eh(e*255),0,255)}function wo(e){return gs(eh(e/2.55)/100,0,1)}function aE(e){return gs(eh(e*100),0,100)}const ti={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},o1=[..."0123456789ABCDEF"],TF=e=>o1[e&15],kF=e=>o1[(e&240)>>4]+o1[e&15],ip=e=>(e&240)>>4===(e&15),PF=e=>ip(e.r)&&ip(e.g)&&ip(e.b)&&ip(e.a);function MF(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ti[e[1]]*17,g:255&ti[e[2]]*17,b:255&ti[e[3]]*17,a:t===5?ti[e[4]]*17:255}:(t===7||t===9)&&(n={r:ti[e[1]]<<4|ti[e[2]],g:ti[e[3]]<<4|ti[e[4]],b:ti[e[5]]<<4|ti[e[6]],a:t===9?ti[e[7]]<<4|ti[e[8]]:255})),n}const jF=(e,t)=>e<255?t(e):"";function DF(e){var t=PF(e)?TF:kF;return e?"#"+t(e.r)+t(e.g)+t(e.b)+jF(e.a,t):void 0}const LF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pD(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function RF(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function NF(e,t,n){const r=pD(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function AF(e,t,n,r,i){return e===i?(t-n)/r+(t.5?f/(2-o-s):f/(o+s),l=AF(n,r,i,f,o),l=l*60+.5),[l|0,c||0,a]}function $x(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ks)}function Bx(e,t,n){return $x(pD,e,t,n)}function IF(e,t,n){return $x(NF,e,t,n)}function FF(e,t,n){return $x(RF,e,t,n)}function mD(e){return(e%360+360)%360}function $F(e){const t=LF.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?sf(+t[5]):ks(+t[5]));const i=mD(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=IF(i,o,s):t[1]==="hsv"?r=FF(i,o,s):r=Bx(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function BF(e,t){var n=Fx(e);n[0]=mD(n[0]+t),n=Bx(n),e.r=n[0],e.g=n[1],e.b=n[2]}function UF(e){if(!e)return;const t=Fx(e),n=t[0],r=aE(t[1]),i=aE(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${wo(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const lE={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},cE={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function zF(){const e={},t=Object.keys(cE),n=Object.keys(lE);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let op;function VF(e){op||(op=zF(),op.transparent=[0,0,0,0]);const t=op[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const HF=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function WF(e){const t=HF.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?sf(s):gs(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?sf(r):gs(r,0,255)),i=255&(t[4]?sf(i):gs(i,0,255)),o=255&(t[6]?sf(o):gs(o,0,255)),{r,g:i,b:o,a:n}}}function YF(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${wo(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const v0=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,jl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function qF(e,t,n){const r=jl(wo(e.r)),i=jl(wo(e.g)),o=jl(wo(e.b));return{r:ks(v0(r+n*(jl(wo(t.r))-r))),g:ks(v0(i+n*(jl(wo(t.g))-i))),b:ks(v0(o+n*(jl(wo(t.b))-o))),a:e.a+n*(t.a-e.a)}}function sp(e,t,n){if(e){let r=Fx(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Bx(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function gD(e,t){return e&&Object.assign(t||{},e)}function uE(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ks(e[3]))):(t=gD(e,{r:0,g:0,b:0,a:1}),t.a=ks(t.a)),t}function GF(e){return e.charAt(0)==="r"?WF(e):$F(e)}class td{constructor(t){if(t instanceof td)return t;const n=typeof t;let r;n==="object"?r=uE(t):n==="string"&&(r=MF(t)||VF(t)||GF(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=gD(this._rgb);return t&&(t.a=wo(t.a)),t}set rgb(t){this._rgb=uE(t)}rgbString(){return this._valid?YF(this._rgb):void 0}hexString(){return this._valid?DF(this._rgb):void 0}hslString(){return this._valid?UF(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=qF(this._rgb,t._rgb,n)),this}clone(){return new td(this.rgb)}alpha(t){return this._rgb.a=ks(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=eh(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return sp(this._rgb,2,t),this}darken(t){return sp(this._rgb,2,-t),this}saturate(t){return sp(this._rgb,1,t),this}desaturate(t){return sp(this._rgb,1,-t),this}rotate(t){return BF(this._rgb,t),this}}/*! * Chart.js v4.3.3 * https://www.chartjs.org * (c) 2023 Chart.js Contributors * Released under the MIT License */function vo(){}const KF=(()=>{let e=0;return()=>e++})();function ft(e){return e===null||typeof e>"u"}function Rt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Qt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Dr(e,t){return Qt(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const ZF=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,vD=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function kt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function bt(e,t,n,r){let i,o,s;if(Rt(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function JF(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function e$(e){const t=JF(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Us(e,t){return(fE[t]||(fE[t]=e$(t)))(e)}function Ux(e){return e.charAt(0).toUpperCase()+e.slice(1)}const rd=e=>typeof e<"u",zs=e=>typeof e=="function",dE=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function t$(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ut=Math.PI,Nt=2*Ut,n$=Nt+Ut,Vm=Number.POSITIVE_INFINITY,r$=Ut/180,Xt=Ut/2,ha=Ut/4,hE=Ut*2/3,vs=Math.log10,to=Math.sign;function Of(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Tc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function o$(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function _D(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Vx(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Eo=(e,t,n,r)=>Vx(e,n,r?i=>{const o=e[i][t];return oe[i][t]Vx(e,n,r=>e[r][t]>=n);function c$(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+Ux(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function gE(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(wD.forEach(o=>{delete e[o]}),delete e._chartjs)}function xD(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const SD=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function OD(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,SD.call(window,()=>{r=!1,e.apply(t,n)}))}}function f$(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Hx=e=>e==="start"?"left":e==="end"?"right":"center",Jn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,d$=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function CD(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:f,minDefined:d,maxDefined:p}=s.getUserBounds();d&&(i=Pn(Math.min(Eo(a,l,c).lo,n?r:Eo(t,l,s.getPixelForValue(c)).lo),0,r-1)),p?o=Pn(Math.max(Eo(a,s.axis,f,!0).hi+1,n?0:Eo(t,l,s.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function ED(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const ap=e=>e===0||e===1,vE=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Nt/n)),yE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Nt/n)+1,Cf={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Xt)+1,easeOutSine:e=>Math.sin(e*Xt),easeInOutSine:e=>-.5*(Math.cos(Ut*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ap(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ap(e)?e:vE(e,.075,.3),easeOutElastic:e=>ap(e)?e:yE(e,.075,.3),easeInOutElastic(e){return ap(e)?e:e<.5?.5*vE(e*2,.1125,.45):.5+.5*yE(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Cf.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Cf.easeInBounce(e*2)*.5:Cf.easeOutBounce(e*2-1)*.5+.5};function Wx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function _E(e){return Wx(e)?e:new td(e)}function y0(e){return Wx(e)?e:new td(e).saturate(.5).darken(.1).hexString()}const h$=["x","y","borderWidth","radius","tension"],p$=["color","borderColor","backgroundColor"];function m$(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:p$},numbers:{type:"number",properties:h$}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function g$(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const bE=new Map;function v$(e,t){t=t||{};const n=e+JSON.stringify(t);let r=bE.get(n);return r||(r=new Intl.NumberFormat(e,t),bE.set(n,r)),r}function th(e,t,n){return v$(t,n).format(e)}const TD={values(e){return Rt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=y$(e,n)}const s=vs(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),th(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(vs(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?TD.numeric.call(this,e,t,n):""}};function y$(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Ev={formatters:TD};function _$(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ev.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ga=Object.create(null),a1=Object.create(null);function Ef(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>y0(i.backgroundColor),this.hoverBorderColor=(r,i)=>y0(i.borderColor),this.hoverColor=(r,i)=>y0(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return _0(this,t,n)}get(t){return Ef(this,t)}describe(t,n){return _0(a1,t,n)}override(t,n){return _0(Ga,t,n)}route(t,n,r,i){const o=Ef(this,t),s=Ef(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return nt(l)?Object.assign({},c,l):Ke(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Jt=new b$({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[m$,g$,_$]);function w$(e){return!e||ft(e.size)||ft(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Hm(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function x$(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,f,d,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function To(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,C$(e,o),l=0;l+e||0;function Yx(e,t){const n={},r=nt(t),i=r?Object.keys(t):t,o=nt(e)?r?s=>Ke(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=j$(o(s));return n}function PD(e){return Yx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ia(e){return Yx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function rr(e){const t=PD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function _n(e,t){e=e||{},t=t||Jt.font;let n=Ke(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ke(e.style,t.style);r&&!(""+r).match(P$)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:M$(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=w$(i),i}function af(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;on&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Xs(e,t){return Object.assign(Object.create(e),t)}function qx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=LD("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:a=>qx([a,...e],t,o,r)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return jD(a,l,()=>B$(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return SE(a).includes(l)},ownKeys(a){return SE(a)},set(a,l,c){const f=a._storage||(a._storage=i());return a[l]=f[l]=c,delete a._keys,!0}})}function kc(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:MD(e,r),setContext:o=>kc(e,o,n,r),override:o=>kc(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return jD(o,s,()=>R$(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function MD(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:zs(n)?n:()=>n,isIndexable:zs(r)?r:()=>r}}const L$=(e,t)=>e?e+Ux(t):t,Gx=(e,t)=>nt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function jD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function R$(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return zs(a)&&s.isScriptable(t)&&(a=N$(t,a,e,n)),Rt(a)&&a.length&&(a=A$(t,a,e,s.isIndexable)),Gx(t,a)&&(a=kc(a,i,o&&o[t],s)),a}function N$(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,s||r);return a.delete(e),Gx(e,l)&&(l=Kx(i._scopes,i,e,l)),l}function A$(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(nt(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const d=Kx(c,i,e,f);t.push(kc(d,o,s&&s[e],a))}}return t}function DD(e,t,n){return zs(e)?e(t,n):e}const I$=(e,t)=>e===!0?t:typeof e=="string"?Us(t,e):void 0;function F$(e,t,n,r,i){for(const o of t){const s=I$(n,o);if(s){e.add(s);const a=DD(s._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function Kx(e,t,n,r){const i=t._rootScopes,o=DD(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=xE(a,s,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=xE(a,s,o,l,r),l===null)?!1:qx(Array.from(a),[""],i,o,()=>$$(t,n,r))}function xE(e,t,n,r,i){for(;n;)n=F$(e,t,n,r,i);return n}function $$(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Rt(i)&&nt(n)?n:i||{}}function B$(e,t,n,r){let i;for(const o of t)if(i=LD(L$(o,e),n),typeof i<"u")return Gx(e,i)?Kx(n,r,e,i):i}function LD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function SE(e){let t=e._keys;return t||(t=e._keys=U$(e._scopes)),t}function U$(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function RD(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,s=new Array(r);let a,l,c,f;for(a=0,l=r;ate==="x"?"y":"x";function V$(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=s1(o,i),l=s1(s,o);let c=a/(a+l),f=l/(a+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const d=r*c,p=r*f;return{previous:{x:o.x-d*(s.x-i.x),y:o.y-d*(s.y-i.y)},next:{x:o.x+p*(s.x-i.x),y:o.y+p*(s.y-i.y)}}}function H$(e,t,n){const r=e.length;let i,o,s,a,l,c=Pc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")Y$(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function K$(e,t){return Pv(e).getPropertyValue(t)}const Z$=["top","right","bottom","left"];function Fa(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=Z$[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Q$=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function X$(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(Q$(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function wa(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Pv(n),o=i.boxSizing==="border-box",s=Fa(i,"padding"),a=Fa(i,"border","width"),{x:l,y:c,box:f}=X$(e,n),d=s.left+(f&&a.left),p=s.top+(f&&a.top);let{width:g,height:v}=t;return o&&(g-=s.width+a.width,v-=s.height+a.height),{x:Math.round((l-d)/g*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function J$(e,t,n){let r,i;if(t===void 0||n===void 0){const o=Zx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=Pv(o),l=Fa(a,"border","width"),c=Fa(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=Wm(a.maxWidth,o,"clientWidth"),i=Wm(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Vm,maxHeight:i||Vm}}const cp=e=>Math.round(e*10)/10;function e7(e,t,n,r){const i=Pv(e),o=Fa(i,"margin"),s=Wm(i.maxWidth,e,"clientWidth")||Vm,a=Wm(i.maxHeight,e,"clientHeight")||Vm,l=J$(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=Fa(i,"border","width"),g=Fa(i,"padding");c-=g.width+p.width,f-=g.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=cp(Math.min(c,s,l.maxWidth)),f=cp(Math.min(f,a,l.maxHeight)),c&&!f&&(f=cp(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=cp(Math.floor(f*r))),{width:c,height:f}}function OE(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const t7=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function CE(e,t){const n=K$(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function xa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function n7(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function r7(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=xa(e,i,n),a=xa(i,o,n),l=xa(o,t,n),c=xa(s,a,n),f=xa(a,l,n);return xa(c,f,n)}const i7=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},o7=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function pc(e,t,n){return e?i7(t,n):o7()}function ID(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function FD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function $D(e){return e==="angle"?{between:id,compare:s$,normalize:Rr}:{between:Co,compare:(t,n)=>t-n,normalize:t=>t}}function EE({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function s7(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=$D(r),l=t.length;let{start:c,end:f,loop:d}=e,p,g;if(d){for(c+=l,f+=l,p=0,g=l;pl(i,S,b)&&a(i,S)!==0,T=()=>a(o,b)===0||l(o,S,b),k=()=>y||C(),D=()=>!y||T();for(let R=f,z=f;R<=d;++R)w=t[R%s],!w.skip&&(b=c(w[r]),b!==S&&(y=l(b,i,o),x===null&&k()&&(x=a(b,i)===0?R:z),x!==null&&D()&&(v.push(EE({start:x,end:R,loop:p,count:s,style:g})),x=null),z=R,S=b));return x!==null&&v.push(EE({start:x,end:d,loop:p,count:s,style:g})),v}function UD(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function l7(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function c7(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=a7(n,i,o,r);if(r===!0)return TE(e,[{start:s,end:a,loop:o}],n,t);const l=aa({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=SD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var yo=new d7;const PE="transparent",h7={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=_E(e||PE),i=r.valid&&_E(t||PE);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class p7{constructor(t,n,r,i){const o=n[r];i=af([t.to,i,o,t.from]);const s=af([t.from,o,i]);this._active=!0,this._fn=t.fn||h7[t.type||typeof s],this._easing=Cf[t.easing]||Cf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=af([t.to,n,i,t.from]),this._from=af([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!nt(o))return;const s={};for(const a of n)s[a]=o[a];(Rt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=g7(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&m7(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let d=o[c];const p=r.get(c);if(d)if(p&&d.active()){d.update(p,f,a);continue}else d.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=d=new p7(p,t,c,f),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return yo.add(this._chart,r),!0}}function m7(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function RE(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,f=b7(o,s,r),d=t.length;let p;for(let g=0;gn[r].axis===t).shift()}function S7(e,t){return Xs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function O7(e,t,n){return Xs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Iu(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const w0=e=>e==="reset"||e==="none",NE=(e,t)=>t?e:Object.assign({},e),C7=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:VD(n,!0),values:null};class ji{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=DE(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Iu(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,p,g,v)=>d==="x"?p:d==="r"?v:g,o=n.xAxisID=Ke(r.xAxisID,b0(t,"x")),s=n.yAxisID=Ke(r.yAxisID,b0(t,"y")),a=n.rAxisID=Ke(r.rAxisID,b0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),f=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&gE(this._data,this),t._stacked&&Iu(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(nt(n))this._data=_7(n);else if(r!==n){if(r){gE(r,this);const i=this._cachedMeta;Iu(i),i._parsed=[]}n&&Object.isExtensible(n)&&u$(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=DE(n.vScale,n),n.stack!==r.stack&&(i=!0,Iu(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&RE(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,d,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Rt(i[t])?p=this.parseArrayData(r,i,t,n):nt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const g=()=>d[a]===null||c&&d[a]y||d=0;--p)if(!v()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,g,v,d);return y.$shared&&(y.$shared=l,o[s]=Object.freeze(NE(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const f=this.chart.config,d=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),d);l=f.createResolver(p,this.getContext(t,r,n))}const c=new zD(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||w0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){w0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!w0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;ai-o))}return e._cache.$bar}function T7(e){const t=e.iScale,n=E7(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(rd(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i0?i[e-1]:null,a=eMath.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function HD(e,t,n,r){return Rt(e)?M7(e,t,n,r):t[n.axis]=n.parse(e,r),t}function AE(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,f,d,p;for(c=n,f=n+r;c=n?1:-1)}function D7(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ft(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=s.axis,d=a.axis;for(let p=n;pid(S,a,l,!0)?1:Math.max(C,C*n,T,T*n),v=(S,C,T)=>id(S,a,l,!0)?-1:Math.min(C,C*n,T,T*n),y=g(0,c,d),x=g(Xt,f,p),b=v(Ut,c,d),w=v(Ut+Xt,f,p);r=(y-b)/2,i=(x-w)/2,o=-(y+b)/2,s=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class ys extends ji{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(nt(r[t])){const{key:l="value"}=this._parsing;o=c=>+Us(r[c],l)}let s,a;for(s=t,a=t+n;s0&&!isNaN(t)?Nt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=th(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),me(ys,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class kf extends ji{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=CD(n,i,s);this._drawStart=a,this._drawCount=l,ED(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(n,i),p=s.axis,g=a.axis,{spanGaps:v,segment:y}=this.options,x=Tc(v)?v:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let C=n>0&&this.getParsed(n-1);for(let T=0;T=w){D.skip=!0;continue}const R=this.getParsed(T),z=ft(R[g]),N=D[p]=s.getPixelForValue(R[p],T),H=D[g]=o||z?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,R,l):R[g],T);D.skip=isNaN(N)||isNaN(H)||z,D.stop=T>0&&Math.abs(R[p]-C[p])>x,y&&(D.parsed=R,D.raw=c.data[T]),d&&(D.options=f||this.resolveDataElementOptions(T,k.active?"active":i)),b||this.updateElement(k,T,D,i),C=R}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}me(kf,"id","line"),me(kf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),me(kf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Pf extends ji{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=th(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return RD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,d=c.yCenter,p=c.getIndexAngle(0)-.5*Ut;let g=p,v;const y=360/this.countVisibleElements();for(v=0;v{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?ki(this.resolveDataElementOptions(t,n).angle||r):0}}me(Pf,"id","polarArea"),me(Pf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),me(Pf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class c1 extends ys{}me(c1,"id","pie"),me(c1,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class hm extends ji{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return RD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let C=n;C0&&Math.abs(k[g]-S[g])>b,x&&(D.parsed=k,D.raw=c.data[C]),p&&(D.options=d||this.resolveDataElementOptions(C,T.active?"active":i)),w||this.updateElement(T,C,D,i),S=k}this.updateSharedOptions(d,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}me(pm,"id","scatter"),me(pm,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),me(pm,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var I7=Object.freeze({__proto__:null,BarController:Tf,BubbleController:dm,DoughnutController:ys,LineController:kf,PieController:c1,PolarAreaController:Pf,RadarController:hm,ScatterController:pm});function ma(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qx{constructor(t){me(this,"options");this.options=t||{}}static override(t){Object.assign(Qx.prototype,t)}init(){}formats(){return ma()}parse(){return ma()}format(){return ma()}add(){return ma()}diff(){return ma()}startOf(){return ma()}endOf(){return ma()}}var F7={_date:Qx};function $7(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?l$:Eo;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const d=l(o,t,n-f),p=l(o,t,n+f);return{lo:d.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function nh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var V7={evaluateInteractionItems:nh,modes:{index(e,t,n,r){const i=wa(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?S0(e,i,o,r,s):O0(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=a[0].index,d=c.data[f];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=wa(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?S0(e,i,o,r,s):O0(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let f=0;fn.pos===t)}function BE(e,t){return e.filter(n=>WD.indexOf(n.pos)===-1&&n.box.axis===t)}function $u(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function H7(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=$u(Fu(t,"left"),!0),i=$u(Fu(t,"right")),o=$u(Fu(t,"top"),!0),s=$u(Fu(t,"bottom")),a=BE(t,"x"),l=BE(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:Fu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function UE(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function YD(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function G7(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!nt(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&YD(s,o.getPadding());const a=Math.max(0,t.outerWidth-UE(s,e,"left","right")),l=Math.max(0,t.outerHeight-UE(s,e,"top","bottom")),c=a!==e.w,f=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function K7(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Z7(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function lf(e,t,n,r){const i=[];let o,s,a,l,c,f;for(o=0,s=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/f,hBoxMaxHeight:s/2}),p=Object.assign({},i);YD(p,rr(r));const g=Object.assign({maxPadding:p,w:o,h:s,x:i.left,y:i.top},i),v=Y7(l.concat(c),d);lf(a.fullSize,g,d,v),lf(l,g,d,v),lf(c,g,d,v)&&lf(l,g,d,v),K7(g),zE(a.leftAndTop,g,d,v),g.x+=g.w,g.y+=g.h,zE(a.rightAndBottom,g,d,v),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},bt(a.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class qD{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Q7 extends qD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const mm="$chartjs",X7={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},VE=e=>e===null||e==="";function J7(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[mm]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",VE(i)){const o=CE(e,"width");o!==void 0&&(e.width=o)}if(VE(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=CE(e,"height");o!==void 0&&(e.height=o)}return e}const GD=t7?{passive:!0}:!1;function eB(e,t,n){e.addEventListener(t,n,GD)}function tB(e,t,n){e.canvas.removeEventListener(t,n,GD)}function nB(e,t){const n=X7[e.type]||e.type,{x:r,y:i}=wa(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Ym(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function rB(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ym(a.addedNodes,r),s=s&&!Ym(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function iB(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ym(a.removedNodes,r),s=s&&!Ym(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const sd=new Map;let HE=0;function KD(){const e=window.devicePixelRatio;e!==HE&&(HE=e,sd.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function oB(e,t){sd.size||window.addEventListener("resize",KD),sd.set(e,t)}function sB(e){sd.delete(e),sd.size||window.removeEventListener("resize",KD)}function aB(e,t,n){const r=e.canvas,i=r&&Zx(r);if(!i)return;const o=OD((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return s.observe(i),oB(e,o),s}function C0(e,t,n){n&&n.disconnect(),t==="resize"&&sB(e)}function lB(e,t,n){const r=e.canvas,i=OD(o=>{e.ctx!==null&&n(nB(o,e))},e);return eB(r,t,i),i}class cB extends qD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(J7(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[mm])return!1;const r=n[mm].initial;["height","width"].forEach(o=>{const s=r[o];ft(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[mm],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:rB,detach:iB,resize:aB}[n]||lB;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:C0,detach:C0,resize:C0}[n]||tB)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return e7(t,n,r,i)}isAttached(t){const n=Zx(t);return!!(n&&n.isConnected)}}function uB(e){return!AD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Q7:cB}var cm;let Vo=(cm=class{constructor(){me(this,"x");me(this,"y");me(this,"active",!1);me(this,"options");me(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Tc(this.x)&&Tc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},me(cm,"defaults",{}),me(cm,"defaultRoutes"),cm);function fB(e,t){const n=e.options.ticks,r=dB(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?pB(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return mB(t,c,o,s/i),c;const f=hB(o,t,i);if(s>0){let d,p;const g=s>1?Math.round((l-a)/(s-1)):null;for(fp(t,c,f,ft(g)?0:a-g,a),d=0,p=s-1;di)return l}return Math.max(i,1)}function pB(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,WE=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,YE=(e,t)=>Math.min(t||e,e);function qE(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function _B(e,t){bt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Dr(n,Dr(r,n)),max:Dr(r,Dr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){kt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=D$(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),d=f.widest.width,p=f.highest.height,g=Pn(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:g/(r-1),d+6>a&&(a=g/(r-(t.offset?.5:1)),l=this.maxHeight-Bu(t.grid)-n.padding-GE(t.title,this.chart.options.font),c=Math.sqrt(d*d+p*p),s=zx(Math.min(Math.asin(Pn((f.highest.height+6)/a,-1,1)),Math.asin(Pn(l/c,-1,1))-Math.asin(Pn(p/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){kt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){kt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=GE(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Bu(o)+l):(t.height=this.maxHeight,t.width=Bu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:d,highest:p}=this._getLabelSizes(),g=r.padding*2,v=ki(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(a){const b=r.mirror?0:x*d.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+b+g)}else{const b=r.mirror?0:y*d.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+b+g)}this._calculatePadding(c,f,x,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,g=0;l?c?(p=i*t.width,g=r*n.height):(p=r*t.height,g=i*n.width):o==="start"?g=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,g=n.width/2),this.paddingLeft=Math.max((p-f+s)*this.width/(this.width-f),0),this.paddingRight=Math.max((g-d+s)*this.width/(this.width-d),0)}else{let f=n.height/2,d=t.height/2;o==="start"?(f=0,d=t.height):o==="end"&&(f=n.height,d=0),this.paddingTop=f+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){kt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:s[z]||0,height:a[z]||0});return{first:R(0),last:R(n-1),widest:R(k),highest:R(D),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return a$(this._alignToPixels?pa(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),p=Bu(o),g=[],v=a.setContext(this.getContext()),y=v.display?v.width:0,x=y/2,b=function(oe){return pa(r,oe,y)};let w,S,C,T,k,D,R,z,N,H,W,ne;if(s==="top")w=b(this.bottom),D=this.bottom-p,z=w-x,H=b(t.top)+x,ne=t.bottom;else if(s==="bottom")w=b(this.top),H=t.top,ne=b(t.bottom)-x,D=w+x,z=this.top+p;else if(s==="left")w=b(this.right),k=this.right-p,R=w-x,N=b(t.left)+x,W=t.right;else if(s==="right")w=b(this.left),N=t.left,W=b(t.right)-x,k=w+x,R=this.left+p;else if(n==="x"){if(s==="center")w=b((t.top+t.bottom)/2+.5);else if(nt(s)){const oe=Object.keys(s)[0],le=s[oe];w=b(this.chart.scales[oe].getPixelForValue(le))}H=t.top,ne=t.bottom,D=w+x,z=D+p}else if(n==="y"){if(s==="center")w=b((t.left+t.right)/2);else if(nt(s)){const oe=Object.keys(s)[0],le=s[oe];w=b(this.chart.scales[oe].getPixelForValue(le))}k=w-x,R=k-p,N=t.left,W=t.right}const q=Ke(i.ticks.maxTicksLimit,d),J=Math.max(1,Math.ceil(d/q));for(S=0;So.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");Jt.route(o,i,l,a)})}function EB(e){return"id"in e&&"defaults"in e}class TB{constructor(){this.controllers=new dp(ji,"datasets",!0),this.elements=new dp(Vo,"elements"),this.plugins=new dp(Object,"plugins"),this.scales=new dp(ll,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):bt(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=Ux(t);kt(r["before"+i],[],r),n[t](r),kt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function PB(e){const t={},n=[],r=Object.keys(qi.plugins.items);for(let o=0;o1&&KE(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ZE(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function AB(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return ZE(e,"x",n[0])||ZE(e,"y",n[0])}return{}}function IB(e,t){const n=Ga[e.type]||{scales:{}},r=t.scales||{},i=u1(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!nt(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=f1(s,a,AB(s,e),Jt.scales[a.type]),c=RB(l,i),f=n.scales||{};o[s]=Sf(Object.create(null),[{axis:l},a,f[l],f[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||u1(a,t),f=(Ga[a]||{}).scales||{};Object.keys(f).forEach(d=>{const p=LB(d,l),g=s[p+"AxisID"]||p;o[g]=o[g]||Object.create(null),Sf(o[g],[{axis:p},r[g],f[d]])})}),Object.keys(o).forEach(s=>{const a=o[s];Sf(a,[Jt.scales[a.type],Jt.scale])}),o}function ZD(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=IB(e,t)}function QD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function FB(e){return e=e||{},e.data=QD(e.data),ZD(e),e}const QE=new Map,XD=new Set;function hp(e,t){let n=QE.get(e);return n||(n=t(),QE.set(e,n),XD.add(n)),n}const Uu=(e,t,n)=>{const r=Us(t,n);r!==void 0&&e.add(r)};class $B{constructor(t){this._config=FB(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=QD(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ZD(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return hp(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return hp(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return hp(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return hp(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(d=>Uu(l,t,d))),f.forEach(d=>Uu(l,i,d)),f.forEach(d=>Uu(l,Ga[o]||{},d)),f.forEach(d=>Uu(l,Jt,d)),f.forEach(d=>Uu(l,a1,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),XD.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ga[n]||{},Jt.datasets[n]||{},{type:n},Jt,a1]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=XE(this._resolverCache,t,i);let l=s;if(UB(s,n)){o.$shared=!1,r=zs(r)?r():r;const c=this.createResolver(t,r,a);l=kc(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=XE(this._resolverCache,t,r);return nt(n)?kc(o,n,void 0,i):o}}function XE(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:qx(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const BB=e=>nt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||zs(e[n]),!1);function UB(e,t){const{isScriptable:n,isIndexable:r}=MD(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(zs(a)||BB(a))||s&&Rt(a))return!0}return!1}var zB="4.3.3";const VB=["top","bottom","left","right","chartArea"];function JE(e,t){return e==="top"||e==="bottom"||VB.indexOf(e)===-1&&t==="x"}function eT(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function tT(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),kt(n&&n.onComplete,[e],t)}function HB(e){const t=e.chart,n=t.options.animation;kt(n&&n.onProgress,[e],t)}function JD(e){return AD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const gm={},nT=e=>{const t=JD(e);return Object.values(gm).filter(n=>n.canvas===t).pop()};function WB(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function YB(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function qB(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var ss;let Mv=(ss=class{static register(...t){qi.add(...t),rT()}static unregister(...t){qi.remove(...t),rT()}constructor(t,n){const r=this.config=new $B(n),i=JD(t),o=nT(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||uB(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,f=l&&l.width;if(this.id=KF(),this.ctx=a,this.canvas=l,this.width=f,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new kB,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=f$(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],gm[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}yo.listen(this,"complete",tT),yo.listen(this,"progress",HB),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ft(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return qi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():OE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return wE(this.canvas,this.ctx),this}stop(){return yo.stop(this),this}resize(t,n){yo.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,OE(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),kt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};bt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=f1(s,a),c=l==="r",f=l==="x";return{options:a,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),bt(o,s=>{const a=s.options,l=a.id,c=f1(l,a),f=Ke(a.type,s.dtype);(a.position===void 0||JE(a.position,c)!==JE(s.dposition))&&(a.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===f)d=r[l];else{const p=qi.getScale(f);d=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),bt(i,(s,a)=>{s||delete r[a]}),bt(r,s=>{nr.configure(this,s,s.options),nr.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(eT("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){bt(this.scales,t=>{nr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!dE(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;WB(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;nr.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],bt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=qB(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Tv(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&kv(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return To(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=V7.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Xs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);rd(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),yo.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};bt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){bt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},bt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!Um(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(d=>f.datasetIndex===d.datasetIndex&&f.index===d.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=t$(t),c=YB(t,this._lastEvent,r,l);r&&(this._lastEvent=null,kt(o.onHover,[t,a,this],this),l&&kt(o.onClick,[t,a,this],this));const f=!Um(a,i);return(f||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},me(ss,"defaults",Jt),me(ss,"instances",gm),me(ss,"overrides",Ga),me(ss,"registry",qi),me(ss,"version",zB),me(ss,"getChart",nT),ss);function rT(){return bt(Mv.instances,e=>e._plugins.invalidate())}function GB(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Xt,r-Xt),e.closePath(),e.clip()}function KB(e){return Yx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function ZB(e,t,n,r){const i=KB(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return Pn(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Pn(i.innerStart,0,s),innerEnd:Pn(i.innerEnd,0,s)}}function Dl(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function qm(e,t,n,r,i,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:f}=t,d=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let g=0;const v=i-l;if(r){const J=f>0?f-r:0,oe=d>0?d-r:0,le=(J+oe)/2,G=le!==0?v*le/(le+r):v;g=(v-G)/2}const y=Math.max(.001,v*d-n/Ut)/d,x=(v-y)/2,b=l+x+g,w=i-x-g,{outerStart:S,outerEnd:C,innerStart:T,innerEnd:k}=ZB(t,p,d,w-b),D=d-S,R=d-C,z=b+S/D,N=w-C/R,H=p+T,W=p+k,ne=b+T/H,q=w-k/W;if(e.beginPath(),o){const J=(z+N)/2;if(e.arc(s,a,d,z,J),e.arc(s,a,d,J,N),C>0){const F=Dl(R,N,s,a);e.arc(F.x,F.y,C,N,w+Xt)}const oe=Dl(W,w,s,a);if(e.lineTo(oe.x,oe.y),k>0){const F=Dl(W,q,s,a);e.arc(F.x,F.y,k,w+Xt,q+Math.PI)}const le=(w-k/p+(b+T/p))/2;if(e.arc(s,a,p,w-k/p,le,!0),e.arc(s,a,p,le,b+T/p,!0),T>0){const F=Dl(H,ne,s,a);e.arc(F.x,F.y,T,ne+Math.PI,b-Xt)}const G=Dl(D,b,s,a);if(e.lineTo(G.x,G.y),S>0){const F=Dl(D,z,s,a);e.arc(F.x,F.y,S,b-Xt,z)}}else{e.moveTo(s,a);const J=Math.cos(z)*d+s,oe=Math.sin(z)*d+a;e.lineTo(J,oe);const le=Math.cos(N)*d+s,G=Math.sin(N)*d+a;e.lineTo(le,G)}e.closePath()}function QB(e,t,n,r,i){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){qm(e,t,n,r,l,i);for(let c=0;c=Nt||id(s,l,c),x=Co(a,f+g,d+g);return y&&x}getCenterPoint(n){const{x:r,y:i,startAngle:o,endAngle:s,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:f}=this.options,d=(o+s)/2,p=(a+l+f+c)/2;return{x:r+Math.cos(d)*p,y:i+Math.sin(d)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,o=(r.offset||0)/4,s=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Nt?Math.floor(i/Nt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(Ut,i||0)),f=o*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,QB(n,this,f,s,a),XB(n,this,f,s,a),n.restore()}}me(cf,"id","arc"),me(cf,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),me(cf,"defaultRoutes",{backgroundColor:"backgroundColor"}),me(cf,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function eL(e,t,n=t){e.lineCap=Ke(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ke(n.borderDash,t.borderDash)),e.lineDashOffset=Ke(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ke(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ke(n.borderWidth,t.borderWidth),e.strokeStyle=Ke(n.borderColor,t.borderColor)}function JB(e,t,n){e.lineTo(n.x,n.y)}function e9(e){return e.stepped?S$:e.tension||e.cubicInterpolationMode==="monotone"?O$:JB}function tL(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),f=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-C:C))%o,S=()=>{y!==x&&(e.lineTo(f,x),e.lineTo(f,y),e.lineTo(f,b))};for(l&&(g=i[w(0)],e.moveTo(g.x,g.y)),p=0;p<=a;++p){if(g=i[w(p)],g.skip)continue;const C=g.x,T=g.y,k=C|0;k===v?(Tx&&(x=T),f=(d*f+C)/++d):(S(),e.lineTo(C,T),v=k,d=0,y=x=T),b=T}S()}function d1(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?n9:t9}function r9(e){return e.stepped?n7:e.tension||e.cubicInterpolationMode==="monotone"?r7:xa}function i9(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),eL(e,t.options),e.stroke(i)}function o9(e,t,n,r){const{segments:i,options:o}=t,s=d1(t);for(const a of i)eL(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const s9=typeof Path2D=="function";function a9(e,t,n,r){s9&&!t.options.segment?i9(e,t,n,r):o9(e,t,n,r)}class _s extends Vo{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;G$(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=c7(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=UD(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=r9(r);let c,f;for(c=0,f=s.length;ct!=="borderDash"&&t!=="fill"});function iT(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function rL(e){return h1[e%h1.length]}function iL(e){return oT[e%oT.length]}function p9(e,t){return e.borderColor=rL(t),e.backgroundColor=iL(t),++t}function m9(e,t){return e.backgroundColor=e.data.map(()=>rL(t++)),t}function g9(e,t){return e.backgroundColor=e.data.map(()=>iL(t++)),t}function v9(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof ys?t=m9(n,t):i instanceof Pf?t=g9(n,t):i&&(t=p9(n,t))}}function sT(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function y9(e){return e&&(e.borderColor||e.backgroundColor)}var _9={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:o}=i;if(!n.forceOverride&&(sT(r)||y9(i)||o&&sT(o)))return;const s=v9(e);r.forEach(s)}};function b9(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,d,p,g,v,y;for(s[l++]=e[f],d=0;dg&&(g=v,p=e[w],y=w);s[l++]=p,f=y}return s[l++]=e[c],s}function w9(e,t,n,r){let i=0,o=0,s,a,l,c,f,d,p,g,v,y;const x=[],b=t+n-1,w=e[t].x,C=e[b].x-w;for(s=t;sy&&(y=c,p=s),i=(o*i+a.x)/++o;else{const k=s-1;if(!ft(d)&&!ft(p)){const D=Math.min(d,p),R=Math.max(d,p);D!==g&&D!==k&&x.push({...e[D],x:i}),R!==g&&R!==k&&x.push({...e[R],x:i})}s>0&&k!==g&&x.push(e[k]),x.push(a),f=T,o=0,v=y=c,d=p=g=s}}return x}function oL(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function aT(e){e.data.datasets.forEach(t=>{oL(t)})}function x9(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Pn(Eo(t,o.axis,s).lo,0,n-1)),c?i=Pn(Eo(t,o.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var S9={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){aT(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:a}=i,l=e.getDatasetMeta(o),c=s||i.data;if(af([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:d,count:p}=x9(l,c);const g=n.threshold||4*r;if(p<=g){oL(i);return}ft(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=b9(c,d,p,r,n);break;case"min-max":v=w9(c,d,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){aT(e)}};function O9(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:l,end:c}=a;c=Xx(l,c,i);const f=p1(n,i[l],i[c],a.loop);if(!t.segments){s.push({source:a,target:f,start:i[l],end:i[c]});continue}const d=UD(t,f);for(const p of d){const g=p1(n,o[p.start],o[p.end],p.loop),v=BD(a,i,g);for(const y of v)s.push({source:y,target:p,start:{[n]:lT(f,g,"start",Math.max)},end:{[n]:lT(f,g,"end",Math.min)}})}}return s}function p1(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Rr(i),o=Rr(o)),{property:e,start:i,end:o}}function C9(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=Xx(s,a,i);const l=i[s],c=i[a];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function Xx(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function lT(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function sL(e,t){let n=[],r=!1;return Rt(e)?(r=!0,n=e):n=C9(e,t),n.length?new _s({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function cT(e){return e&&e.fill!==!1}function E9(e,t,n){let i=e[t].fill;const o=[t];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Qt(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function T9(e,t,n){const r=j9(e);if(nt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Qt(i)&&Math.floor(i)===i?k9(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function k9(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function P9(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:nt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function M9(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:nt(e)?r=e.value:r=t.getBaseValue(),r}function j9(e){const t=e.options,n=t.fill;let r=Ke(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function D9(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=L9(t,n);a.push(sL({x:null,y:t.bottom},r));for(let l=0;l=0;--s){const a=i[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),r&&a.fill&&k0(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;cT(o)&&k0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!cT(r)||n.drawTime!=="beforeDatasetDraw"||k0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const hT=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},H9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class pT extends Vo{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=kt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=_n(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=hT(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(s,o,a,l)+10):(f=this.maxHeight,c=this._fitCols(s,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+a;let d=t;o.textAlign="left",o.textBaseline="middle";let p=-1,g=-f;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*a>s)&&(d+=f,c[c.length-(y>0?0:1)]=0,g+=f,p++),l[y]={left:0,top:g,row:p,width:x,height:i},c[c.length-1]+=x+a}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=s-t;let d=a,p=0,g=0,v=0,y=0;return this.legendItems.forEach((x,b)=>{const{itemWidth:w,itemHeight:S}=W9(r,n,o,x,i);b>0&&g+S+2*a>f&&(d+=p+a,c.push({width:p,height:g}),v+=p+a,y++,p=g=0),l[b]={left:v,top:g,col:y,width:w,height:S},p=Math.max(p,w),g+=S+a}),d+=p,c.push({width:p,height:g}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=pc(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Jn(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Jn(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=Jn(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Jn(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Tv(t,this),this._draw(),kv(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=Jt.color,l=pc(t.rtl,this.left,this.width),c=_n(s.font),{padding:f}=s,d=c.size,p=d/2;let g;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=hT(s,d),b=function(k,D,R){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const z=Ke(R.lineWidth,1);if(i.fillStyle=Ke(R.fillStyle,a),i.lineCap=Ke(R.lineCap,"butt"),i.lineDashOffset=Ke(R.lineDashOffset,0),i.lineJoin=Ke(R.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Ke(R.strokeStyle,a),i.setLineDash(Ke(R.lineDash,[])),s.usePointStyle){const N={radius:y*Math.SQRT2/2,pointStyle:R.pointStyle,rotation:R.rotation,borderWidth:z},H=l.xPlus(k,v/2),W=D+p;kD(i,N,H,W,s.pointStyleWidth&&v)}else{const N=D+Math.max((d-y)/2,0),H=l.leftForLtr(k,v),W=Ia(R.borderRadius);i.beginPath(),Object.values(W).some(ne=>ne!==0)?od(i,{x:H,y:N,w:v,h:y,radius:W}):i.rect(H,N,v,y),i.fill(),z!==0&&i.stroke()}i.restore()},w=function(k,D,R){Ka(i,R.text,k,D+x/2,c,{strikethrough:R.hidden,textAlign:l.textAlign(R.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?g={x:Jn(o,this.left+f,this.right-r[0]),y:this.top+f+C,line:0}:g={x:this.left+f,y:Jn(o,this.top+C+f,this.bottom-n[0].height),line:0},ID(this.ctx,t.textDirection);const T=x+f;this.legendItems.forEach((k,D)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const R=i.measureText(k.text).width,z=l.textAlign(k.textAlign||(k.textAlign=s.textAlign)),N=v+p+R;let H=g.x,W=g.y;l.setWidth(this.width),S?D>0&&H+N+f>this.right&&(W=g.y+=T,g.line++,H=g.x=Jn(o,this.left+f,this.right-r[g.line])):D>0&&W+T>this.bottom&&(H=g.x=H+n[g.line].width+f,g.line++,W=g.y=Jn(o,this.top+C+f,this.bottom-n[g.line].height));const ne=l.x(H);if(b(ne,W,k),H=d$(z,H+v+p,S?H+N:this.right,t.rtl),w(l.x(H),W,k),S)g.x+=N+f;else if(typeof k.text!="string"){const q=c.lineHeight;g.y+=lL(k,q)+f}else g.y+=T}),FD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=_n(n.font),i=rr(n.padding);if(!n.display)return;const o=pc(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let f,d=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,d=Jn(t.align,d,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);f=c+Jn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const g=Jn(a,d,d+p);s.textAlign=o.textAlign(Hx(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Ka(s,n.text,g,f,r)}_computeTitleHeight(){const t=this.options.title,n=_n(t.font),r=rr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Co(t,this.left,this.right)&&Co(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function q9(e,t,n){let r=e;return typeof t.text!="string"&&(r=lL(t,n)),r}function lL(e,t){const n=e.text?e.text.length:0;return t*n}function G9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var K9={id:"legend",_element:pT,start(e,t,n){const r=e.legend=new pT({ctx:e.ctx,options:n,chart:e});nr.configure(e,r,n),nr.addBox(e,r)},stop(e){nr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;nr.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=rr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Jx extends Vo{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Rt(r.text)?r.text.length:1;this._padding=rr(r.padding);const o=i*_n(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,f,d;return this.isHorizontal()?(f=Jn(a,r,o),d=n+t,c=o-r):(s.position==="left"?(f=r+t,d=Jn(a,i,n),l=Ut*-.5):(f=o-t,d=Jn(a,n,i),l=Ut*.5),c=i-n),{titleX:f,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=_n(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ka(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Hx(n.align),textBaseline:"middle",translation:[s,a]})}}function Z9(e,t){const n=new Jx({ctx:e.ctx,options:t,chart:e});nr.configure(e,n,t),nr.addBox(e,n),e.titleBlock=n}var Q9={id:"title",_element:Jx,start(e,t,n){Z9(e,n)},stop(e){const t=e.titleBlock;nr.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;nr.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const pp=new WeakMap;var X9={id:"subtitle",start(e,t,n){const r=new Jx({ctx:e.ctx,options:n,chart:e});nr.configure(e,r,n),nr.addBox(e,r),pp.set(e,r)},stop(e){nr.removeBox(e,pp.get(e)),pp.delete(e)},beforeUpdate(e,t,n){const r=pp.get(e);nr.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const uf={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t-1?e.split(` `):e}function J9(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function mT(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=_n(t.bodyFont),c=_n(t.titleFont),f=_n(t.footerFont),d=o.length,p=i.length,g=r.length,v=rr(t.padding);let y=v.height,x=0,b=r.reduce((C,T)=>C+T.before.length+T.lines.length+T.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(y+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=g*C+(b-g)*l.lineHeight+(b-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(C){x=Math.max(x,n.measureText(C).width+w)};return n.save(),n.font=c.string,bt(e.title,S),n.font=l.string,bt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?s+2+t.boxPadding:0,bt(r,C=>{bt(C.before,S),bt(C.lines,S),bt(C.after,S)}),w=0,n.font=f.string,bt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function eU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function tU(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function nU(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),tU(c,e,t,n)&&(c="center"),c}function gT(e,t,n){const r=n.yAlign||t.yAlign||eU(e,n);return{xAlign:n.xAlign||t.xAlign||nU(e,t,n,r),yAlign:r}}function rU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function iU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function vT(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:f,topRight:d,bottomLeft:p,bottomRight:g}=Ia(s);let v=rU(t,a);const y=iU(t,l,c);return l==="center"?a==="left"?v+=c:a==="right"&&(v-=c):a==="left"?v-=Math.max(f,p)+i:a==="right"&&(v+=Math.max(d,g)+i),{x:Pn(v,0,r.width-t.width),y:Pn(y,0,r.height-t.height)}}function mp(e,t,n){const r=rr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function yT(e){return Yi([],_o(e))}function oU(e,t,n){return Xs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function _T(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const cL={beforeTitle:vo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?cL[t].call(n,r):i}var i1;let bT=(i1=class extends Vo{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new zD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=oU(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=br(r,"beforeTitle",this,t),o=br(r,"title",this,t),s=br(r,"afterTitle",this,t);let a=[];return a=Yi(a,_o(i)),a=Yi(a,_o(o)),a=Yi(a,_o(s)),a}getBeforeBody(t,n){return yT(br(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return bt(t,o=>{const s={before:[],lines:[],after:[]},a=_T(r,o);Yi(s.before,_o(br(a,"beforeLabel",this,o))),Yi(s.lines,br(a,"label",this,o)),Yi(s.after,_o(br(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return yT(br(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=br(r,"beforeFooter",this,t),o=br(r,"footer",this,t),s=br(r,"afterFooter",this,t);let a=[];return a=Yi(a,_o(i)),a=Yi(a,_o(o)),a=Yi(a,_o(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;lt.filter(f,d,p,r))),t.itemSort&&(a=a.sort((f,d)=>t.itemSort(f,d,r))),bt(a,f=>{const d=_T(t.callbacks,f);i.push(br(d,"labelColor",this,f)),o.push(br(d,"labelPointStyle",this,f)),s.push(br(d,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=uf[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=mT(this,r),c=Object.assign({},a,l),f=gT(this.chart,r,c),d=vT(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:d}=Ia(a),{x:p,y:g}=t,{width:v,height:y}=n;let x,b,w,S,C,T;return o==="center"?(C=g+y/2,i==="left"?(x=p,b=x-s,S=C+s,T=C-s):(x=p+v,b=x+s,S=C-s,T=C+s),w=x):(i==="left"?b=p+Math.max(l,f)+s:i==="right"?b=p+v-Math.max(c,d)-s:b=this.caretX,o==="top"?(S=g,C=S-s,x=b-s,w=b+s):(S=g+y,C=S+s,x=b+s,w=b-s),T=S),{x1:x,x2:b,x3:w,y1:S,y2:C,y3:T}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=pc(r.rtl,this.x,this.width);for(t.x=mp(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=_n(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;lw!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,od(t,{x:y,y:v,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),od(t,{x,y:v+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,v,c,l),t.strokeRect(y,v,c,l),t.fillStyle=s.backgroundColor,t.fillRect(x,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:f}=r,d=_n(r.bodyFont);let p=d.lineHeight,g=0;const v=pc(r.rtl,this.x,this.width),y=function(R){n.fillText(R,v.x(t.x+g),t.y+p/2),t.y+=p+o},x=v.textAlign(s);let b,w,S,C,T,k,D;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=mp(this,x,r),n.fillStyle=r.bodyColor,bt(this.beforeBody,y),g=a&&x!=="right"?s==="center"?c/2+f:c+2+f:0,C=0,k=i.length;C0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=uf[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=mT(this,t),l=Object.assign({},s,this._size),c=gT(n,t,l),f=vT(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=rr(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),ID(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),FD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Um(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!Um(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=uf[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}},me(i1,"positioners",uf),i1);var sU={id:"tooltip",_element:bT,positioners:uf,afterInit(e,t,n){n&&(e.tooltip=new bT({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:cL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},aU=Object.freeze({__proto__:null,Colors:_9,Decimation:S9,Filler:V9,Legend:K9,SubTitle:X9,Title:Q9,Tooltip:sU});const lU=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function cU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return lU(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const uU=(e,t)=>e===null?null:Pn(Math.round(e),0,t);function wT(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}me(m1,"id","category"),me(m1,"defaults",{ticks:{callback:wT}});function fU(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:f,maxDigits:d,includeBounds:p}=e,g=o||1,v=f-1,{min:y,max:x}=t,b=!ft(s),w=!ft(a),S=!ft(c),C=(x-y)/(d+1);let T=pE((x-y)/v/g)*g,k,D,R,z;if(T<1e-14&&!b&&!w)return[{value:y},{value:x}];z=Math.ceil(x/T)-Math.floor(y/T),z>v&&(T=pE(z*T/v/g)*g),ft(l)||(k=Math.pow(10,l),T=Math.ceil(T*k)/k),i==="ticks"?(D=Math.floor(y/T)*T,R=Math.ceil(x/T)*T):(D=y,R=x),b&&w&&o&&o$((a-s)/o,T/1e3)?(z=Math.round(Math.min((a-s)/T,f)),T=(a-s)/z,D=s,R=a):S?(D=b?s:D,R=w?a:R,z=c-1,T=(R-D)/z):(z=(R-D)/T,Of(z,Math.round(z),T/1e3)?z=Math.round(z):z=Math.ceil(z));const N=Math.max(mE(T),mE(D));k=Math.pow(10,ft(l)?N:l),D=Math.round(D*k)/k,R=Math.round(R*k)/k;let H=0;for(b&&(p&&D!==s?(n.push({value:s}),Da)break;n.push({value:W})}return w&&p&&R!==a?n.length&&Of(n[n.length-1].value,a,xT(a,C,e))?n[n.length-1].value=a:n.push({value:a}):(!w||R===a)&&n.push({value:R}),n}function xT(e,t,{horizontal:n,minRotation:r}){const i=ki(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Gm extends ll{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ft(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=l=>i=n?i:l,a=l=>o=r?o:l;if(t){const l=to(i),c=to(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=fU(i,o);return t.bounds==="ticks"&&_D(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return th(t,this.chart.options.locale,this.options.ticks.format)}}class g1 extends Gm{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qt(t)?t:0,this.max=Qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=ki(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}me(g1,"id","linear"),me(g1,"defaults",{ticks:{callback:Ev.formatters.numeric}});const ad=e=>Math.floor(vs(e)),ga=(e,t)=>Math.pow(10,ad(e)+t);function ST(e){return e/Math.pow(10,ad(e))===1}function OT(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function dU(e,t){const n=t-e;let r=ad(n);for(;OT(e,t,r)>10;)r++;for(;OT(e,t,r)<10;)r--;return Math.min(r,ad(e))}function hU(e,{min:t,max:n}){t=Dr(e.min,t);const r=[],i=ad(t);let o=dU(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,f=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-f)/Math.pow(10,o)),p=Dr(e.min,Math.round((l+f+d*Math.pow(10,o))*s)/s);for(;p=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,s=o>=0?1:s),p=Math.round((l+f+d*Math.pow(10,o))*s)/s;const g=Dr(e.max,p);return r.push({value:g,major:ST(g),significand:d}),r}class v1 extends ll{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Gm.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Qt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qt(t)?Math.max(0,t):null,this.max=Qt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Qt(this._userMin)&&(this.min=t===ga(this.min,0)?ga(this.min,-1):ga(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(ga(r,-1)),s(ga(i,1)))),r<=0&&o(ga(i,-1)),i<=0&&s(ga(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=hU(n,this);return t.bounds==="ticks"&&_D(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":th(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=vs(t),this._valueRange=vs(this.max)-vs(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(vs(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}me(v1,"id","logarithmic"),me(v1,"defaults",{ticks:{callback:Ev.formatters.logarithmic,major:{enabled:!0}}});function y1(e){const t=e.ticks;if(t.display&&e.display){const n=rr(t.backdropPadding);return Ke(t.font&&t.font.size,Jt.font.size)+n.height}return 0}function pU(e,t,n){return n=Rt(n)?n:[n],{w:x$(e,t.string,n),h:n.length*t.lineHeight}}function CT(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function mU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Ut/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function vU(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,l=e.getPointPosition(t,r+i+s,o),c=Math.round(zx(Rr(l.angle+Xt))),f=xU(l.y,a.h,c),d=bU(c),p=wU(l.x,a.w,d);return{visible:!0,x:l.x,y:f,textAlign:d,left:p,top:f,right:p+a.w,bottom:f+a.h}}function yU(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(To({x:n,y:r},t)||To({x:n,y:o},t)||To({x:i,y:r},t)||To({x:i,y:o},t))}function _U(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,l={extra:y1(o)/2,additionalAngle:s?Ut/i:0};let c;for(let f=0;f270||n<90)&&(e-=t),e}function SU(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!ft(a)){const l=Ia(t.borderRadius),c=rr(t.backdropPadding);e.fillStyle=a;const f=r-c.left,d=i-c.top,p=o-r+c.width,g=s-i+c.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),od(e,{x:f,y:d,w:p,h:g,radius:l}),e.fill()):e.fillRect(f,d,p,g)}}function OU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));SU(n,s,o);const a=_n(s.font),{x:l,y:c,textAlign:f}=o;Ka(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:s.color,textAlign:f,textBaseline:"middle"})}}function uL(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Nt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=kt(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?mU(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Nt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Rr(t*n+ki(r))}getDistanceFromCenterForValue(t){if(ft(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ft(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(d!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(d),g=i.setContext(p),v=o.setContext(p);CU(this,g,l,s,v)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const f=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:p}=f;!p||!d||(t.lineWidth=p,t.strokeStyle=d,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=_n(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=rr(c.backdropPadding);t.fillRect(-s/2-d.left,-o-f.size/2-d.top,s+d.width,f.size+d.height)}Ka(t,a.label,0,-o,f,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}me(ff,"id","radialLinear"),me(ff,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ev.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),me(ff,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),me(ff,"descriptors",{angleLines:{_fallback:"grid"}});const jv={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},xr=Object.keys(jv);function ET(e,t){return e-t}function TT(e,t){if(ft(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Qt(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Tc(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function kT(e,t,n,r){const i=xr.length;for(let o=xr.indexOf(e);o=xr.indexOf(n);o--){const s=xr[o];if(jv[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return xr[n?xr.indexOf(n):0]}function kU(e){for(let t=xr.indexOf(e)+1,n=xr.length;t=t?n[r]:n[i];e[o]=!0}}function PU(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function MT(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Pn(n,0,s),r=Pn(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||kT(o.minUnit,n,r,this._getLabelCapacity(n)),a=Ke(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=Tc(l)||l===!0,f={};let d=n,p,g;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=d,g=0;p+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return kt(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&a[l],d=c&&a[c],p=r[n],g=c&&d&&p&&p.major;return this._adapter.format(t,i||(g?d:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Eo(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Eo(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class _1 extends ld{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=gp(n,this.min),this._tableRange=gp(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,f;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;si-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(gp(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return gp(this._table,r*this._tableRange+this._minPos,!0)}}me(_1,"id","timeseries"),me(_1,"defaults",ld.defaults);var MU=Object.freeze({__proto__:null,CategoryScale:m1,LinearScale:g1,LogarithmicScale:v1,RadialLinearScale:ff,TimeScale:ld,TimeSeriesScale:_1});const jU=[I7,h9,aU,MU];Mv.register(...jU);var fL={exports:{}},Gr={},dL={exports:{}},hL={};/** * @license React * scheduler.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. */(function(e){function t(G,F){var A=G.length;G.push(F);e:for(;0>>1,re=G[B];if(0>>1;Bi(ie,A))sei(pe,ie)?(G[B]=pe,G[se]=A,B=se):(G[B]=ie,G[Z]=A,B=Z);else if(sei(pe,A))G[B]=pe,G[se]=A,B=se;else break e}}return F}function i(G,F){var A=G.sortIndex-F.sortIndex;return A!==0?A:G.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],f=1,d=null,p=3,g=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(G){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=G)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function C(G){if(y=!1,S(G),!v)if(n(l)!==null)v=!0,oe(T);else{var F=n(c);F!==null&&le(C,F.startTime-G)}}function T(G,F){v=!1,y&&(y=!1,b(R),R=-1),g=!0;var A=p;try{for(S(F),d=n(l);d!==null&&(!(d.expirationTime>F)||G&&!H());){var B=d.callback;if(typeof B=="function"){d.callback=null,p=d.priorityLevel;var re=B(d.expirationTime<=F);F=e.unstable_now(),typeof re=="function"?d.callback=re:d===n(l)&&r(l),S(F)}else r(l);d=n(l)}if(d!==null)var U=!0;else{var Z=n(c);Z!==null&&le(C,Z.startTime-F),U=!1}return U}finally{d=null,p=A,g=!1}}var k=!1,D=null,R=-1,z=5,N=-1;function H(){return!(e.unstable_now()-NG||125B?(G.sortIndex=A,t(c,G),n(l)===null&&G===n(c)&&(y?(b(R),R=-1):y=!0,le(C,A-B))):(G.sortIndex=re,t(l,G),v||g||(v=!0,oe(T))),G},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(G){var F=p;return function(){var A=p;p=F;try{return G.apply(this,arguments)}finally{p=A}}}})(hL);dL.exports=hL;var DU=dL.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 pL=V,Vr=DU;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"),b1=Object.prototype.hasOwnProperty,LU=/^[: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]*$/,jT={},DT={};function RU(e){return b1.call(DT,e)?!0:b1.call(jT,e)?!1:LU.test(e)?DT[e]=!0:(jT[e]=!0,!1)}function NU(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 AU(e,t,n,r){if(t===null||typeof t>"u"||NU(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 yr(e,t,n,r,i,o,s){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=s}var qn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qn[e]=new yr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];qn[t]=new yr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qn[e]=new yr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qn[e]=new yr(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){qn[e]=new yr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qn[e]=new yr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qn[e]=new yr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qn[e]=new yr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qn[e]=new yr(e,5,!1,e.toLowerCase(),null,!1,!1)});var e2=/[\-:]([a-z])/g;function t2(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(e2,t2);qn[t]=new yr(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(e2,t2);qn[t]=new yr(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(e2,t2);qn[t]=new yr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qn[e]=new yr(e,1,!1,e.toLowerCase(),null,!1,!1)});qn.xlinkHref=new yr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qn[e]=new yr(e,1,!1,e.toLowerCase(),null,!0,!0)});function n2(e,t,n,r){var i=qn.hasOwnProperty(t)?qn[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{M0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?df(e):""}function IU(e){switch(e.tag){case 5:return df(e.type);case 16:return df("Lazy");case 13:return df("Suspense");case 19:return df("SuspenseList");case 0:case 2:case 15:return e=j0(e.type,!1),e;case 11:return e=j0(e.type.render,!1),e;case 1:return e=j0(e.type,!0),e;default:return""}}function O1(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 Zl:return"Fragment";case Kl:return"Portal";case w1:return"Profiler";case r2:return"StrictMode";case x1:return"Suspense";case S1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vL:return(e.displayName||"Context")+".Consumer";case gL:return(e._context.displayName||"Context")+".Provider";case i2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case o2:return t=e.displayName||null,t!==null?t:O1(e.type)||"Memo";case cs:t=e._payload,e=e._init;try{return O1(e(t))}catch{}}return null}function FU(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 O1(t);case 8:return t===r2?"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 Vs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _L(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $U(e){var t=_L(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(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yp(e){e._valueTracker||(e._valueTracker=$U(e))}function bL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_L(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Km(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 C1(e,t){var n=t.checked;return qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function RT(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vs(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 wL(e,t){t=t.checked,t!=null&&n2(e,"checked",t,!1)}function E1(e,t){wL(e,t);var n=Vs(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")?T1(e,t.type,n):t.hasOwnProperty("defaultValue")&&T1(e,t.type,Vs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function NT(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 T1(e,t,n){(t!=="number"||Km(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hf=Array.isArray;function mc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=_p.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ud(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mf={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},BU=["Webkit","ms","Moz","O"];Object.keys(Mf).forEach(function(e){BU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mf[t]=Mf[e]})});function CL(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mf.hasOwnProperty(e)&&Mf[e]?(""+t).trim():t+"px"}function EL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=CL(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var UU=qt({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 M1(e,t){if(t){if(UU[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 j1(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 D1=null;function s2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var L1=null,gc=null,vc=null;function FT(e){if(e=oh(e)){if(typeof L1!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=Av(t),L1(e.stateNode,e.type,t))}}function TL(e){gc?vc?vc.push(e):vc=[e]:gc=e}function kL(){if(gc){var e=gc,t=vc;if(vc=gc=null,FT(e),t)for(e=0;e>>=0,e===0?32:31-(XU(e)/JU|0)|0}var bp=64,wp=4194304;function pf(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 Jm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=pf(a):(o&=s,o!==0&&(r=pf(o)))}else s=n&~i,s!==0?r=pf(s):o!==0&&(r=pf(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 rh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Di(t),e[t]=n}function rz(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=Df),qT=String.fromCharCode(32),GT=!1;function GL(e,t){switch(e){case"keyup":return jz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ql=!1;function Lz(e,t){switch(e){case"compositionend":return KL(t);case"keypress":return t.which!==32?null:(GT=!0,qT);case"textInput":return e=t.data,e===qT&>?null:e;default:return null}}function Rz(e,t){if(Ql)return e==="compositionend"||!p2&&GL(e,t)?(e=YL(),bm=f2=ws=null,Ql=!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=XT(n)}}function JL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eR(){for(var e=window,t=Km();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Km(e.document)}return t}function m2(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 Vz(e){var t=eR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&JL(n.ownerDocument.documentElement,n)){if(r!==null&&m2(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=JT(n,o);var s=JT(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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,Xl=null,$1=null,Rf=null,B1=!1;function ek(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;B1||Xl==null||Xl!==Km(r)||(r=Xl,"selectionStart"in r&&m2(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}),Rf&&gd(Rf,r)||(Rf=r,r=ng($1,"onSelect"),0tc||(e.current=Y1[tc],Y1[tc]=null,tc--)}function Pt(e,t){tc++,Y1[tc]=e.current,e.current=t}var Hs={},ir=ea(Hs),Or=ea(!1),Za=Hs;function jc(e,t){var n=e.type.contextTypes;if(!n)return Hs;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 Cr(e){return e=e.childContextTypes,e!=null}function ig(){At(Or),At(ir)}function ak(e,t,n){if(ir.current!==Hs)throw Error(Oe(168));Pt(ir,t),Pt(Or,n)}function cR(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,FU(e)||"Unknown",i));return qt({},n,r)}function og(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hs,Za=ir.current,Pt(ir,e),Pt(Or,Or.current),!0}function lk(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=cR(e,t,Za),r.__reactInternalMemoizedMergedChildContext=e,At(Or),At(ir),Pt(ir,e)):At(Or),Pt(Or,n)}var xo=null,Iv=!1,W0=!1;function uR(e){xo===null?xo=[e]:xo.push(e)}function tV(e){Iv=!0,uR(e)}function ta(){if(!W0&&xo!==null){W0=!0;var e=0,t=xt;try{var n=xo;for(xt=1;e>=s,i-=s,ko=1<<32-Di(t)+i|n<R?(z=D,D=null):z=D.sibling;var N=p(b,D,S[R],C);if(N===null){D===null&&(D=z);break}e&&D&&N.alternate===null&&t(b,D),w=o(N,w,R),k===null?T=N:k.sibling=N,k=N,D=z}if(R===S.length)return n(b,D),Bt&&Sa(b,R),T;if(D===null){for(;RR?(z=D,D=null):z=D.sibling;var H=p(b,D,N.value,C);if(H===null){D===null&&(D=z);break}e&&D&&H.alternate===null&&t(b,D),w=o(H,w,R),k===null?T=H:k.sibling=H,k=H,D=z}if(N.done)return n(b,D),Bt&&Sa(b,R),T;if(D===null){for(;!N.done;R++,N=S.next())N=d(b,N.value,C),N!==null&&(w=o(N,w,R),k===null?T=N:k.sibling=N,k=N);return Bt&&Sa(b,R),T}for(D=r(b,D);!N.done;R++,N=S.next())N=g(D,b,R,N.value,C),N!==null&&(e&&N.alternate!==null&&D.delete(N.key===null?R:N.key),w=o(N,w,R),k===null?T=N:k.sibling=N,k=N);return e&&D.forEach(function(W){return t(b,W)}),Bt&&Sa(b,R),T}function x(b,w,S,C){if(typeof S=="object"&&S!==null&&S.type===Zl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case vp:e:{for(var T=S.key,k=w;k!==null;){if(k.key===T){if(T=S.type,T===Zl){if(k.tag===7){n(b,k.sibling),w=i(k,S.props.children),w.return=b,b=w;break e}}else if(k.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===cs&&mk(T)===k.type){n(b,k.sibling),w=i(k,S.props),w.ref=qu(b,k,S),w.return=b,b=w;break e}n(b,k);break}else t(b,k);k=k.sibling}S.type===Zl?(w=Ba(S.props.children,b.mode,C,S.key),w.return=b,b=w):(C=km(S.type,S.key,S.props,null,b.mode,C),C.ref=qu(b,w,S),C.return=b,b=C)}return s(b);case Kl:e:{for(k=S.key;w!==null;){if(w.key===k)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(b,w.sibling),w=i(w,S.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=J0(S,b.mode,C),w.return=b,b=w}return s(b);case cs:return k=S._init,x(b,w,k(S._payload),C)}if(hf(S))return v(b,w,S,C);if(zu(S))return y(b,w,S,C);kp(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,S),w.return=b,b=w):(n(b,w),w=X0(S,b.mode,C),w.return=b,b=w),s(b)):n(b,w)}return x}var Lc=yR(!0),_R=yR(!1),sh={},ro=ea(sh),bd=ea(sh),wd=ea(sh);function La(e){if(e===sh)throw Error(Oe(174));return e}function O2(e,t){switch(Pt(wd,t),Pt(bd,e),Pt(ro,sh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:P1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=P1(t,e)}At(ro),Pt(ro,t)}function Rc(){At(ro),At(bd),At(wd)}function bR(e){La(wd.current);var t=La(ro.current),n=P1(t,e.type);t!==n&&(Pt(bd,e),Pt(ro,n))}function C2(e){bd.current===e&&(At(ro),At(bd))}var Ht=ea(0);function fg(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 Y0=[];function E2(){for(var e=0;en?n:4,e(!0);var r=q0.transition;q0.transition={};try{e(!1),t()}finally{xt=n,q0.transition=r}}function AR(){return hi().memoizedState}function oV(e,t,n){var r=Ns(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},IR(e))FR(t,n);else if(n=pR(e,t,n,r),n!==null){var i=gr();Li(n,e,r,i),$R(n,t,r)}}function sV(e,t,n){var r=Ns(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(IR(e))FR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Ni(a,s)){var l=t.interleaved;l===null?(i.next=i,x2(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=pR(e,t,i,r),n!==null&&(i=gr(),Li(n,e,r,i),$R(n,t,r))}}function IR(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function FR(e,t){Nf=dg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $R(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,l2(e,n)}}var hg={readContext:di,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},aV={readContext:di,useCallback:function(e,t){return Gi().memoizedState=[e,t===void 0?null:t],e},useContext:di,useEffect:vk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Om(4194308,4,jR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Om(4194308,4,e,t)},useInsertionEffect:function(e,t){return Om(4,2,e,t)},useMemo:function(e,t){var n=Gi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gi();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=oV.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=Gi();return e={current:e},t.memoizedState=e},useState:gk,useDebugValue:j2,useDeferredValue:function(e){return Gi().memoizedState=e},useTransition:function(){var e=gk(!1),t=e[0];return e=iV.bind(null,e[1]),Gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Yt,i=Gi();if(Bt){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),Mn===null)throw Error(Oe(349));Xa&30||SR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,vk(CR.bind(null,r,o,e),[e]),r.flags|=2048,Od(9,OR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Gi(),t=Mn.identifierPrefix;if(Bt){var n=Po,r=ko;n=(r&~(1<<32-Di(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Zi]=t,e[_d]=r,GR(e,t,!1,!1),t.stateNode=e;e:{switch(s=j1(n,r),n){case"dialog":jt("cancel",e),jt("close",e),i=r;break;case"iframe":case"object":case"embed":jt("load",e),i=r;break;case"video":case"audio":for(i=0;iAc&&(t.flags|=128,r=!0,Gu(o,!1),t.lanes=4194304)}else{if(!r)if(e=fg(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Bt)return Zn(t),null}else 2*on()-o.renderingStartTime>Ac&&n!==1073741824&&(t.flags|=128,r=!0,Gu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=on(),t.sibling=null,n=Ht.current,Pt(Ht,r?n&1|2:n&1),t):(Zn(t),null);case 22:case 23:return I2(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Lr&1073741824&&(Zn(t),t.subtreeFlags&6&&(t.flags|=8192)):Zn(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function mV(e,t){switch(v2(t),t.tag){case 1:return Cr(t.type)&&ig(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rc(),At(Or),At(ir),E2(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return C2(t),null;case 13:if(At(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));Dc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(Ht),null;case 4:return Rc(),null;case 10:return w2(t.type._context),null;case 22:case 23:return I2(),null;case 24:return null;default:return null}}var Mp=!1,er=!1,gV=typeof WeakSet=="function"?WeakSet:Set,Be=null;function oc(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 ib(e,t,n){try{n()}catch(r){Kt(e,t,r)}}var Ek=!1;function vV(e,t){if(U1=eg,e=eR(),m2(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 s=0,a=-1,l=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var g;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)p=d,d=g;for(;;){if(d===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++f===r&&(l=s),(g=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(z1={focusedElem:e,selectionRange:n},eg=!1,Be=t;Be!==null;)if(t=Be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Be=e;else for(;Be!==null;){t=Be;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:Si(t.type,y),x);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(C){Kt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,Be=e;break}Be=t.return}return v=Ek,Ek=!1,v}function Af(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&&ib(t,n,o)}i=i.next}while(i!==r)}}function Bv(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 ob(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 QR(e){var t=e.alternate;t!==null&&(e.alternate=null,QR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zi],delete t[_d],delete t[W1],delete t[Jz],delete t[eV])),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 XR(e){return e.tag===5||e.tag===3||e.tag===4}function Tk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XR(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 sb(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=rg));else if(r!==4&&(e=e.child,e!==null))for(sb(e,t,n),e=e.sibling;e!==null;)sb(e,t,n),e=e.sibling}function ab(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(ab(e,t,n),e=e.sibling;e!==null;)ab(e,t,n),e=e.sibling}var Hn=null,Oi=!1;function ns(e,t,n){for(n=n.child;n!==null;)JR(e,t,n),n=n.sibling}function JR(e,t,n){if(no&&typeof no.onCommitFiberUnmount=="function")try{no.onCommitFiberUnmount(Dv,n)}catch{}switch(n.tag){case 5:er||oc(n,t);case 6:var r=Hn,i=Oi;Hn=null,ns(e,t,n),Hn=r,Oi=i,Hn!==null&&(Oi?(e=Hn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Hn.removeChild(n.stateNode));break;case 18:Hn!==null&&(Oi?(e=Hn,n=n.stateNode,e.nodeType===8?H0(e.parentNode,n):e.nodeType===1&&H0(e,n),pd(e)):H0(Hn,n.stateNode));break;case 4:r=Hn,i=Oi,Hn=n.stateNode.containerInfo,Oi=!0,ns(e,t,n),Hn=r,Oi=i;break;case 0:case 11:case 14:case 15:if(!er&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&ib(n,t,s),i=i.next}while(i!==r)}ns(e,t,n);break;case 1:if(!er&&(oc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Kt(n,t,a)}ns(e,t,n);break;case 21:ns(e,t,n);break;case 22:n.mode&1?(er=(r=er)||n.memoizedState!==null,ns(e,t,n),er=r):ns(e,t,n);break;default:ns(e,t,n)}}function kk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gV),t.forEach(function(r){var i=EV.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function xi(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=on()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_V(r/1960))-r,10e?16:e,xs===null)var r=!1;else{if(e=xs,xs=null,gg=0,dt&6)throw Error(Oe(331));var i=dt;for(dt|=4,Be=e.current;Be!==null;){var o=Be,s=o.child;if(Be.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lon()-N2?$a(e,0):R2|=n),Er(e,t)}function aN(e,t){t===0&&(e.mode&1?(t=wp,wp<<=1,!(wp&130023424)&&(wp=4194304)):t=1);var n=gr();e=Ro(e,t),e!==null&&(rh(e,t,n),Er(e,n))}function CV(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aN(e,n)}function EV(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),aN(e,n)}var lN;lN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Or.current)Sr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Sr=!1,hV(e,t,n);Sr=!!(e.flags&131072)}else Sr=!1,Bt&&t.flags&1048576&&fR(t,ag,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cm(e,t),e=t.pendingProps;var i=jc(t,ir.current);_c(t,n),i=k2(null,t,r,e,i,n);var o=P2();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,Cr(r)?(o=!0,og(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,S2(t),i.updater=Fv,t.stateNode=i,i._reactInternals=t,Q1(t,r,e,n),t=eb(null,t,r,!0,o,n)):(t.tag=0,Bt&&o&&g2(t),fr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=kV(r),e=Si(r,e),i){case 0:t=J1(null,t,r,e,n);break e;case 1:t=Sk(null,t,r,e,n);break e;case 11:t=wk(null,t,r,e,n);break e;case 14:t=xk(null,t,r,Si(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:Si(r,i),J1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Si(r,i),Sk(e,t,r,i,n);case 3:e:{if(WR(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,mR(e,t),ug(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Nc(Error(Oe(423)),t),t=Ok(e,t,r,n,i);break e}else if(r!==i){i=Nc(Error(Oe(424)),t),t=Ok(e,t,r,n,i);break e}else for(Nr=Ds(t.stateNode.containerInfo.firstChild),Br=t,Bt=!0,Ci=null,n=_R(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Dc(),r===i){t=No(e,t,n);break e}fr(e,t,r,n)}t=t.child}return t;case 5:return bR(t),e===null&&G1(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,V1(r,i)?s=null:o!==null&&V1(r,o)&&(t.flags|=32),HR(e,t),fr(e,t,s,n),t.child;case 6:return e===null&&G1(t),null;case 13:return YR(e,t,n);case 4:return O2(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Lc(t,null,r,n):fr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Si(r,i),wk(e,t,r,i,n);case 7:return fr(e,t,t.pendingProps,n),t.child;case 8:return fr(e,t,t.pendingProps.children,n),t.child;case 12:return fr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Pt(lg,r._currentValue),r._currentValue=s,o!==null)if(Ni(o.value,s)){if(o.children===i.children&&!Or.current){t=No(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Mo(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),K1(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Oe(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),K1(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}fr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,_c(t,n),i=di(i),r=r(i),t.flags|=1,fr(e,t,r,n),t.child;case 14:return r=t.type,i=Si(r,t.pendingProps),i=Si(r.type,i),xk(e,t,r,i,n);case 15:return zR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Si(r,i),Cm(e,t),t.tag=1,Cr(r)?(e=!0,og(t)):e=!1,_c(t,n),vR(t,r,i),Q1(t,r,i,n),eb(null,t,r,!0,e,n);case 19:return qR(e,t,n);case 22:return VR(e,t,n)}throw Error(Oe(156,t.tag))};function cN(e,t){return NL(e,t)}function TV(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 si(e,t,n,r){return new TV(e,t,n,r)}function $2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kV(e){if(typeof e=="function")return $2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i2)return 11;if(e===o2)return 14}return 2}function As(e,t){var n=e.alternate;return n===null?(n=si(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 km(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")$2(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Zl:return Ba(n.children,i,o,t);case r2:s=8,i|=8;break;case w1:return e=si(12,n,t,i|2),e.elementType=w1,e.lanes=o,e;case x1:return e=si(13,n,t,i),e.elementType=x1,e.lanes=o,e;case S1:return e=si(19,n,t,i),e.elementType=S1,e.lanes=o,e;case yL:return zv(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gL:s=10;break e;case vL:s=9;break e;case i2:s=11;break e;case o2:s=14;break e;case cs:s=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=si(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ba(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function zv(e,t,n,r){return e=si(22,e,r,t),e.elementType=yL,e.lanes=n,e.stateNode={isHidden:!1},e}function X0(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function J0(e,t,n){return t=si(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PV(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=L0(0),this.expirationTimes=L0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=L0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function B2(e,t,n,r,i,o,s,a,l){return e=new PV(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=si(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},S2(o),e}function MV(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hN)}catch(e){console.error(e)}}hN(),fL.exports=Gr;var cu=fL.exports;const Ua=Ii(cu);var pN,Ak=cu;pN=Ak.createRoot,Ak.hydrateRoot;var mN={exports:{}},gN={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ic=V;function NV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var AV=typeof Object.is=="function"?Object.is:NV,IV=Ic.useState,FV=Ic.useEffect,$V=Ic.useLayoutEffect,BV=Ic.useDebugValue;function UV(e,t){var n=t(),r=IV({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return $V(function(){i.value=n,i.getSnapshot=t,e_(i)&&o({inst:i})},[e,n,t]),FV(function(){return e_(i)&&o({inst:i}),e(function(){e_(i)&&o({inst:i})})},[e]),BV(n),n}function e_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!AV(e,n)}catch{return!0}}function zV(e,t){return t()}var VV=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zV:UV;gN.useSyncExternalStore=Ic.useSyncExternalStore!==void 0?Ic.useSyncExternalStore:VV;mN.exports=gN;var vN=mN.exports,HV={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var qv=V,WV=vN;function YV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qV=typeof Object.is=="function"?Object.is:YV,GV=WV.useSyncExternalStore,KV=qv.useRef,ZV=qv.useEffect,QV=qv.useMemo,XV=qv.useDebugValue;HV.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=KV(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=QV(function(){function l(g){if(!c){if(c=!0,f=g,g=r(g),i!==void 0&&s.hasValue){var v=s.value;if(i(v,g))return d=v}return d=g}if(v=d,qV(f,g))return v;var y=r(g);return i!==void 0&&i(v,y)?v:(f=g,d=y)}var c=!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 a=GV(e,o[0],o[1]);return ZV(function(){s.hasValue=!0,s.value=a},[a]),XV(a),a};function JV(e){e()}let yN=JV;const eH=e=>yN=e,tH=()=>yN,Ik=Symbol.for("react-redux-context"),Fk=typeof globalThis<"u"?globalThis:{};function nH(){var e;if(!V.createContext)return{};const t=(e=Fk[Ik])!=null?e:Fk[Ik]=new Map;let n=t.get(V.createContext);return n||(n=V.createContext(null),t.set(V.createContext,n)),n}const _N=nH(),rH=()=>{throw new Error("uSES not initialized!")};function wc(){return wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var bN={exports:{}},St={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Dn=typeof Symbol=="function"&&Symbol.for,W2=Dn?Symbol.for("react.element"):60103,Y2=Dn?Symbol.for("react.portal"):60106,Gv=Dn?Symbol.for("react.fragment"):60107,Kv=Dn?Symbol.for("react.strict_mode"):60108,Zv=Dn?Symbol.for("react.profiler"):60114,Qv=Dn?Symbol.for("react.provider"):60109,Xv=Dn?Symbol.for("react.context"):60110,q2=Dn?Symbol.for("react.async_mode"):60111,Jv=Dn?Symbol.for("react.concurrent_mode"):60111,ey=Dn?Symbol.for("react.forward_ref"):60112,ty=Dn?Symbol.for("react.suspense"):60113,iH=Dn?Symbol.for("react.suspense_list"):60120,ny=Dn?Symbol.for("react.memo"):60115,ry=Dn?Symbol.for("react.lazy"):60116,oH=Dn?Symbol.for("react.block"):60121,sH=Dn?Symbol.for("react.fundamental"):60117,aH=Dn?Symbol.for("react.responder"):60118,lH=Dn?Symbol.for("react.scope"):60119;function Zr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case W2:switch(e=e.type,e){case q2:case Jv:case Gv:case Zv:case Kv:case ty:return e;default:switch(e=e&&e.$$typeof,e){case Xv:case ey:case ry:case ny:case Qv:return e;default:return t}}case Y2:return t}}}function wN(e){return Zr(e)===Jv}St.AsyncMode=q2;St.ConcurrentMode=Jv;St.ContextConsumer=Xv;St.ContextProvider=Qv;St.Element=W2;St.ForwardRef=ey;St.Fragment=Gv;St.Lazy=ry;St.Memo=ny;St.Portal=Y2;St.Profiler=Zv;St.StrictMode=Kv;St.Suspense=ty;St.isAsyncMode=function(e){return wN(e)||Zr(e)===q2};St.isConcurrentMode=wN;St.isContextConsumer=function(e){return Zr(e)===Xv};St.isContextProvider=function(e){return Zr(e)===Qv};St.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===W2};St.isForwardRef=function(e){return Zr(e)===ey};St.isFragment=function(e){return Zr(e)===Gv};St.isLazy=function(e){return Zr(e)===ry};St.isMemo=function(e){return Zr(e)===ny};St.isPortal=function(e){return Zr(e)===Y2};St.isProfiler=function(e){return Zr(e)===Zv};St.isStrictMode=function(e){return Zr(e)===Kv};St.isSuspense=function(e){return Zr(e)===ty};St.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Gv||e===Jv||e===Zv||e===Kv||e===ty||e===iH||typeof e=="object"&&e!==null&&(e.$$typeof===ry||e.$$typeof===ny||e.$$typeof===Qv||e.$$typeof===Xv||e.$$typeof===ey||e.$$typeof===sH||e.$$typeof===aH||e.$$typeof===lH||e.$$typeof===oH)};St.typeOf=Zr;bN.exports=St;var cH=bN.exports,G2=cH,uH={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},fH={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dH={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xN={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},K2={};K2[G2.ForwardRef]=dH;K2[G2.Memo]=xN;function $k(e){return G2.isMemo(e)?xN:K2[e.$$typeof]||uH}var hH=Object.defineProperty,pH=Object.getOwnPropertyNames,Bk=Object.getOwnPropertySymbols,mH=Object.getOwnPropertyDescriptor,gH=Object.getPrototypeOf,Uk=Object.prototype;function SN(e,t,n){if(typeof t!="string"){if(Uk){var r=gH(t);r&&r!==Uk&&SN(e,r,n)}var i=pH(t);Bk&&(i=i.concat(Bk(t)));for(var o=$k(e),s=$k(t),a=0;at(i(...o)))}return n}function db(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function Vk(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function CN(e,t){return function(r,{displayName:i}){const o=function(a,l){return o.dependsOnOwnProps?o.mapToProps(a,l):o.mapToProps(a,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,l){o.mapToProps=e,o.dependsOnOwnProps=Vk(e);let c=o(a,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=Vk(c),c=o(a,l)),c},o}}function X2(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function EH(e){return e&&typeof e=="object"?db(t=>CH(e,t)):e?typeof e=="function"?CN(e):X2(e,"mapDispatchToProps"):db(t=>({dispatch:t}))}function TH(e){return e?typeof e=="function"?CN(e):X2(e,"mapStateToProps"):db(()=>({}))}function kH(e,t,n){return wc({},n,e,t)}function PH(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,s;return function(l,c,f){const d=e(l,c,f);return o?i(d,s)||(s=d):(o=!0,s=d),s}}}function MH(e){return e?typeof e=="function"?PH(e):X2(e,"mergeProps"):()=>kH}function jH(){const e=tH();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const Hk={notify(){},get:()=>[]};function EN(e,t){let n,r=Hk;function i(d){return l(),r.subscribe(d)}function o(){r.notify()}function s(){f.onStateChange&&f.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=jH())}function c(){n&&(n(),n=void 0,r.clear(),r=Hk)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const DH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_g=DH?V.useLayoutEffect:V.useEffect;function Wk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function t_(e,t){if(Wk(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{TN=e},NH=[null,null];function AH(e,t,n){_g(()=>e(...t),n)}function IH(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function FH(e,t,n,r,i,o,s,a,l,c,f){if(!e)return()=>{};let d=!1,p=null;const g=()=>{if(d||!a.current)return;const y=t.getState();let x,b;try{x=r(y,i.current)}catch(w){b=w,p=w}b||(p=null),x===o.current?s.current||c():(o.current=x,l.current=x,s.current=!0,f())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function $H(e,t){return e===t}function kN(e,t,n,{pure:r,areStatesEqual:i=$H,areOwnPropsEqual:o=t_,areStatePropsEqual:s=t_,areMergedPropsEqual:a=t_,forwardRef:l=!1,context:c=_N}={}){const f=c,d=TH(e),p=EH(t),g=MH(n),v=!!e;return x=>{const b=x.displayName||x.name||"Component",w=`Connect(${b})`,S={shouldHandleStateChanges:v,displayName:w,wrappedComponentName:b,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:a};function C(D){const[R,z,N]=V.useMemo(()=>{const{reactReduxForwardedRef:Q}=D,ae=H2(D,LH);return[D.context,Q,ae]},[D]),H=V.useMemo(()=>R&&R.Consumer&&wH.isContextConsumer(V.createElement(R.Consumer,null))?R:f,[R,f]),W=V.useContext(H),ne=!!D.store&&!!D.store.getState&&!!D.store.dispatch,q=!!W&&!!W.store,J=ne?D.store:W.store,oe=q?W.getServerState:J.getState,le=V.useMemo(()=>OH(J.dispatch,S),[J]),[G,F]=V.useMemo(()=>{if(!v)return NH;const Q=EN(J,ne?void 0:W.subscription),ae=Q.notifyNestedSubs.bind(Q);return[Q,ae]},[J,ne,W]),A=V.useMemo(()=>ne?W:wc({},W,{subscription:G}),[ne,W,G]),B=V.useRef(),re=V.useRef(N),U=V.useRef(),Z=V.useRef(!1);V.useRef(!1);const ie=V.useRef(!1),se=V.useRef();_g(()=>(ie.current=!0,()=>{ie.current=!1}),[]);const pe=V.useMemo(()=>()=>U.current&&N===re.current?U.current:le(J.getState(),N),[J,N]),E=V.useMemo(()=>ae=>G?FH(v,J,G,le,re,B,Z,ie,U,F,ae):()=>{},[G]);AH(IH,[re,B,Z,N,U,F]);let M;try{M=TN(E,pe,oe?()=>le(oe(),N):pe)}catch(Q){throw se.current&&(Q.message+=` The error may be correlated with this previous error: ${se.current.stack} `),Q}_g(()=>{se.current=void 0,U.current=void 0,B.current=M});const I=V.useMemo(()=>V.createElement(x,wc({},M,{ref:z})),[z,x,M]);return V.useMemo(()=>v?V.createElement(H.Provider,{value:A},I):I,[H,I,A])}const k=V.memo(C);if(k.WrappedComponent=x,k.displayName=C.displayName=w,l){const R=V.forwardRef(function(N,H){return V.createElement(k,wc({},N,{reactReduxForwardedRef:H}))});return R.displayName=w,R.WrappedComponent=x,zk(R,x)}return zk(k,x)}}function PN({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const s=V.useMemo(()=>{const c=EN(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),a=V.useMemo(()=>e.getState(),[e]);_g(()=>{const{subscription:c}=s;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),a!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[s,a]);const l=t||_N;return V.createElement(l.Provider,{value:s},n)}RH(vN.useSyncExternalStore);eH(cu.unstable_batchedUpdates);/** * @remix-run/router v1.7.2 * * 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 Ed(){return Ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function J2(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function UH(){return Math.random().toString(36).substr(2,8)}function qk(e,t){return{usr:e.state,key:e.key,idx:t}}function hb(e,t,n,r){return n===void 0&&(n=null),Ed({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?uu(t):t,{state:n,key:t&&t.key||r||UH()})}function bg(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 uu(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 zH(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Ss.Pop,l=null,c=f();c==null&&(c=0,s.replaceState(Ed({},s.state,{idx:c}),""));function f(){return(s.state||{idx:null}).idx}function d(){a=Ss.Pop;let x=f(),b=x==null?null:x-c;c=x,l&&l({action:a,location:y.location,delta:b})}function p(x,b){a=Ss.Push;let w=hb(y.location,x,b);n&&n(w,x),c=f()+1;let S=qk(w,c),C=y.createHref(w);try{s.pushState(S,"",C)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(C)}o&&l&&l({action:a,location:y.location,delta:1})}function g(x,b){a=Ss.Replace;let w=hb(y.location,x,b);n&&n(w,x),c=f();let S=qk(w,c),C=y.createHref(w);s.replaceState(S,"",C),o&&l&&l({action:a,location:y.location,delta:0})}function v(x){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:bg(x);return cn(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let y={get action(){return a},get location(){return e(i,s)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Yk,d),l=x,()=>{i.removeEventListener(Yk,d),l=null}},createHref(x){return t(i,x)},createURL:v,encodeLocation(x){let b=v(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:g,go(x){return s.go(x)}};return y}var Gk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gk||(Gk={}));function VH(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?uu(t):t,i=eS(r.pathname||"/",n);if(i==null)return null;let o=MN(e);HH(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(cn(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 c=Is([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(cn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),MN(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:QH(c,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of jN(o.path))i(o,s,l)}),t}function jN(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 s=jN(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function HH(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:XH(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const WH=/^:\w+$/,YH=3,qH=2,GH=1,KH=10,ZH=-2,Kk=e=>e==="*";function QH(e,t){let n=e.split("/"),r=n.length;return n.some(Kk)&&(r+=ZH),t&&(r+=qH),n.filter(i=>!Kk(i)).reduce((i,o)=>i+(WH.test(o)?YH:o===""?GH:KH),r)}function XH(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 JH(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let p=a[d]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=rW(a[d]||"",f),c},{}),pathname:o,pathnameBase:s,pattern:e}}function tW(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),J2(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,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function nW(e){try{return decodeURI(e)}catch(t){return J2(!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 rW(e,t){try{return decodeURIComponent(e)}catch(n){return J2(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function eS(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 iW(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?uu(e):e;return{pathname:n?n.startsWith("/")?n:oW(n,t):t,search:aW(r),hash:lW(i)}}function oW(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 n_(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 tS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=uu(e):(i=Ed({},e),cn(!i.pathname||!i.pathname.includes("?"),n_("?","pathname","search",i)),cn(!i.pathname||!i.pathname.includes("#"),n_("#","pathname","hash",i)),cn(!i.search||!i.search.includes("#"),n_("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let d=t.length-1;if(s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}a=d>=0?t[d]:"/"}let l=iW(i,a),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Is=e=>e.join("/").replace(/\/\/+/g,"/"),sW=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),aW=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lW=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function cW(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const DN=["post","put","patch","delete"];new Set(DN);const uW=["get",...DN];new Set(uW);/** * React Router v6.14.2 * * 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 wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),s=V.useRef(!1);return NN(()=>{s.current=!0}),V.useCallback(function(l,c){if(c===void 0&&(c={}),!s.current)return;if(typeof l=="number"){n.go(l);return}let f=nS(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Is([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,i,e])}function hl(){let{matches:e}=V.useContext(Wo),t=e[e.length-1];return t?t.params:{}}function iS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=V.useContext(Wo),{pathname:i}=gn(),o=JSON.stringify(tS(r).map(s=>s.pathnameBase));return V.useMemo(()=>nS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function hW(e,t){return pW(e,t)}function pW(e,t,n){dl()||cn(!1);let{navigator:r}=V.useContext(fl),{matches:i}=V.useContext(Wo),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=gn(),c;if(t){var f;let y=typeof t=="string"?uu(t):t;a==="/"||(f=y.pathname)!=null&&f.startsWith(a)||cn(!1),c=y}else c=l;let d=c.pathname||"/",p=a==="/"?d:d.slice(a.length)||"/",g=VH(e,{pathname:p}),v=_W(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Is([a,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:Is([a,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&v?V.createElement(py.Provider,{value:{location:wg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ss.Pop}},v):v}function mW(){let e=SW(),t=cW(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)"},o=null;return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},t),n?V.createElement("pre",{style:i},n):null,o)}const gW=V.createElement(mW,null);class vW extends V.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?V.createElement(Wo.Provider,{value:this.props.routeContext},V.createElement(RN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function yW(e){let{routeContext:t,match:n,children:r}=e,i=V.useContext(rS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),V.createElement(Wo.Provider,{value:t},r)}function _W(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=o.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||cn(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,l,c)=>{let f=l.route.id?s==null?void 0:s[l.route.id]:null,d=null;n&&(d=l.route.errorElement||gW);let p=t.concat(o.slice(0,c+1)),g=()=>{let v;return f?v=d:l.route.Component?v=V.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=a,V.createElement(yW,{match:l,routeContext:{outlet:a,matches:p,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?V.createElement(vW,{location:n.location,revalidation:n.revalidation,component:d,error:f,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var pb;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(pb||(pb={}));var Td;(function(e){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"})(Td||(Td={}));function bW(e){let t=V.useContext(rS);return t||cn(!1),t}function wW(e){let t=V.useContext(LN);return t||cn(!1),t}function xW(e){let t=V.useContext(Wo);return t||cn(!1),t}function AN(e){let t=xW(),n=t.matches[t.matches.length-1];return n.route.id||cn(!1),n.route.id}function SW(){var e;let t=V.useContext(RN),n=wW(Td.UseRouteError),r=AN(Td.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function OW(){let{router:e}=bW(pb.UseNavigateStable),t=AN(Td.UseNavigateStable),n=V.useRef(!1);return NN(()=>{n.current=!0}),V.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,wg({fromRouteId:t},o)))},[e,t])}function oS(e){let{to:t,replace:n,state:r,relative:i}=e;dl()||cn(!1);let{matches:o}=V.useContext(Wo),{pathname:s}=gn(),a=co(),l=nS(t,tS(o).map(f=>f.pathnameBase),s,i==="path"),c=JSON.stringify(l);return V.useEffect(()=>a(JSON.parse(c),{replace:n,state:r,relative:i}),[a,c,i,n,r]),null}function vt(e){cn(!1)}function CW(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ss.Pop,navigator:o,static:s=!1}=e;dl()&&cn(!1);let a=t.replace(/^\/*/,"/"),l=V.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=uu(r));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:g="default"}=r,v=V.useMemo(()=>{let y=eS(c,a);return y==null?null:{location:{pathname:y,search:f,hash:d,state:p,key:g},navigationType:i}},[a,c,f,d,p,g,i]);return v==null?null:V.createElement(fl.Provider,{value:l},V.createElement(py.Provider,{children:n,value:v}))}function my(e){let{children:t,location:n}=e;return hW(mb(t),n)}var Zk;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Zk||(Zk={}));new Promise(()=>{});function mb(e,t){t===void 0&&(t=[]);let n=[];return V.Children.forEach(e,(r,i)=>{if(!V.isValidElement(r))return;let o=[...t,i];if(r.type===V.Fragment){n.push.apply(n,mb(r.props.children,o));return}r.type!==vt&&cn(!1),!r.props.index||!r.props.children||cn(!1);let s={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&&(s.children=mb(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.14.2 * * 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 xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function EW(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function TW(e,t){return e.button===0&&(!t||t==="_self")&&!EW(e)}const kW=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],PW=["aria-current","caseSensitive","className","end","style","to","children"],MW="startTransition",Qk=bF[MW];function FN(e){let{basename:t,children:n,future:r,window:i}=e,o=V.useRef();o.current==null&&(o.current=BH({window:i,v5Compat:!0}));let s=o.current,[a,l]=V.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},f=V.useCallback(d=>{c&&Qk?Qk(()=>l(d)):l(d)},[l,c]);return V.useLayoutEffect(()=>s.listen(f),[s,f]),V.createElement(CW,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const jW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ft=V.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,d=IN(t,kW),{basename:p}=V.useContext(fl),g,v=!1;if(typeof c=="string"&&DW.test(c)&&(g=c,jW))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),C=eS(S.pathname,p);S.origin===w.origin&&C!=null?c=C+S.search+S.hash:v=!0}catch{}let y=fW(c,{relative:i}),x=LW(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function b(w){r&&r(w),w.defaultPrevented||x(w)}return V.createElement("a",xg({},d,{href:g||y,onClick:v||o?r:b,ref:n,target:l}))}),$N=V.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=IN(t,PW),d=iS(l,{relative:f.relative}),p=gn(),g=V.useContext(LN),{navigator:v}=V.useContext(fl),y=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,x=p.pathname,b=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(x=x.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase());let w=x===y||!s&&x.startsWith(y)&&x.charAt(y.length)==="/",S=b!=null&&(b===y||!s&&b.startsWith(y)&&b.charAt(y.length)==="/"),C=w?r:void 0,T;typeof o=="function"?T=o({isActive:w,isPending:S}):T=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:w,isPending:S}):a;return V.createElement(Ft,xg({},f,{"aria-current":C,className:T,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var Xk;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Xk||(Xk={}));var Jk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Jk||(Jk={}));function LW(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=co(),l=gn(),c=iS(e,{relative:s});return V.useCallback(f=>{if(TW(f,n)){f.preventDefault();let d=r!==void 0?r:bg(l)===bg(c);a(e,{replace:d,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const RW="shlink-web-client",NW="A React-based progressive web application for shlink",AW="/shlink-web-client/feature/frontend-kit-dep",IW="https://github.com/shlinkio/shlink-web-client",FW="MIT",$W={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss shlink-web-component/*.scss shlink-web-component/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src shlink-web-component 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"},BW={"@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.1","@reduxjs/toolkit":"^1.9.5","@shlinkio/shlink-frontend-kit":"^0.1.2",bootstrap:"5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.3.3",classnames:"^2.3.2","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^2.30.0","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.4",qs:"^6.11.2",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.2.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.16.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.1","react-redux":"^8.1.2","react-router-dom":"^6.14.2","react-swipeable":"^7.0.1","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.2.0","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.0","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},UW={"@shlinkio/eslint-config-js-coding-standard":"~2.2.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^5.17.0","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.1","@types/leaflet":"^1.9.3","@types/qs":"^6.9.7","@types/ramda":"^0.27.66","@types/react":"^18.2.19","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.15.0","@types/react-dom":"^18.2.7","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^9.0.2","@vitejs/plugin-react":"^4.0.4","@vitest/coverage-v8":"^0.34.1","adm-zip":"^0.5.10",chalk:"^5.3.0",eslint:"^8.46.0",jsdom:"^22.1.0","resize-observer-polyfill":"^1.5.1",sass:"^1.64.2",stylelint:"^15.10.2",typescript:"^5.1.6",vite:"^4.4.9","vite-plugin-pwa":"^0.16.4",vitest:"^0.34.1","vitest-canvas-mock":"^0.3.2"},zW=[">0.2%","not dead","not ie <= 11","not op_mini all"],Sg={name:RW,description:NW,private:!1,homepage:AW,repository:IW,license:FW,scripts:$W,dependencies:BW,devDependencies:UW,browserslist:zW};var Ai,so=".",BN="function",UN="string",zN="__global__",sS="Provider",VW=0,aS=Array.prototype.slice,HW=function(t,n){var r=t[n];if(r===void 0&&Ai.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},gy=function(t){var n;return this.nested[t]||(n=Ai.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},VN=function(t){return t.split(so).reduce(HW,this)},WW=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},YW=function(t,n){var r,i;return typeof t===BN&&(n=t,t=zN),r=t.split(so),i=r.shift(),r.length?gy.call(this,i).middleware(r.join(so),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},qW=function(t,n){return n(t)},eP=function(t,n){return(t[n]||[]).concat(t.__global__||[])},GW=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=this.middlewares,r=t+sS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=eP(s,t).reduce(qW,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:WW(eP(a,t),t,f,o)}},Object.defineProperties(o,i),this},HN=function(t,n){var r,i;return r=t.split(so),this.providerMap[t]&&r.length===1&&!this.container[t+sS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(gy.call(this,i).provider(r.join(so),n),this):GW.call(this,i,n))},lS=function(t,n){return HN.call(this,t,function(){this.$get=n})},WN=function(t,n,r){var i=arguments.length>3?aS.call(arguments,3):[],o=this;return lS.call(this,t,function(){var a=n,l=i.map(VN,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},KW=function(t,n){return WN.apply(this,[t,n,!0].concat(aS.call(arguments,2)))},ZW=function(t,n){return WN.apply(this,[t,n,!1].concat(aS.call(arguments,2)))},YN=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},qN=function(t,n){var r=t[n];return r||(r={},YN.call(t,n,r)),r},QW=function(t,n){var r;return r=t.split(so),t=r.pop(),YN.call(r.reduce(qN,this.container),t,n),this},XW=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},JW=function(t,n){var r=t.split(so);return t=r.pop(),XW.call(r.reduce(qN,this.container),t,n),this},GN=function(t,n){var r,i;return typeof t===BN&&(n=t,t=zN),r=t.split(so),i=r.shift(),r.length?gy.call(this,i).decorator(r.join(so),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},eY=function(t){return this.deferred.push(t),this},tY=function(t){return(t||[]).map(VN,this.container)},nY=function(t,n){return lS.call(this,t,function(i){return{instance:n.bind(n,i)}})},rY=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},cS=function(t){return Object.keys(t||this.container||{}).filter(rY)},Og={},iY=function(t){var n;return typeof t===UN?(n=Og[t],n||(Og[t]=n=new Ai,n.constant("BOTTLE_NAME",t)),n):new Ai},oY=function(t){typeof t===UN?delete Og[t]:Og={}},KN=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},tP=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+sS]},sY=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(so);s.length>1&&s.forEach(tP,gy.call(this,s[0])),tP.call(this,o),this.provider(o,n[o])}},this)},aY=function(t){return this.deferred.forEach(function(r){r(t)}),this};Ai=function e(t){if(!(this instanceof e))return e.pop(t);this.id=VW++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:GN.bind(this),$register:KN.bind(this),$list:cS.bind(this)}};Ai.prototype={constant:JW,decorator:GN,defer:eY,digest:tY,factory:lS,instanceFactory:nY,list:cS,middleware:YW,provider:HN,resetProviders:sY,register:KN,resolve:aY,service:KW,serviceFactory:ZW,value:QW};Ai.pop=iY;Ai.clear=oY;Ai.list=cS;Ai.config={strict:!1};const ZN=Ai;var lY=function(){return!0};const QN=lY;function Dt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function wt(e){return function t(n){return arguments.length===0||Dt(n)?t:e.apply(this,arguments)}}function ut(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Dt(n)?t:wt(function(i){return e(n,i)});default:return Dt(n)&&Dt(r)?t:Dt(n)?wt(function(i){return e(i,r)}):Dt(r)?wt(function(i){return e(n,i)}):e(n,r)}}}function cY(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,Dt(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):fu(o,vy(e,r,n))}}var uY=ut(function(t,n){return t===1?wt(n):fu(t,vy(t,[],n))});const Cg=uY;function na(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Dt(n)?t:ut(function(o,s){return e(n,o,s)});case 2:return Dt(n)&&Dt(r)?t:Dt(n)?ut(function(o,s){return e(o,r,s)}):Dt(r)?ut(function(o,s){return e(n,o,s)}):wt(function(o){return e(n,r,o)});default:return Dt(n)&&Dt(r)&&Dt(i)?t:Dt(n)&&Dt(r)?ut(function(o,s){return e(o,s,i)}):Dt(n)&&Dt(i)?ut(function(o,s){return e(o,r,s)}):Dt(r)&&Dt(i)?ut(function(o,s){return e(n,o,s)}):Dt(n)?wt(function(o){return e(o,r,i)}):Dt(r)?wt(function(o){return e(n,o,i)}):Dt(i)?wt(function(o){return e(n,r,o)}):e(n,r,i)}}}const ah=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function fY(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function uS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!ah(i)){for(var o=0;ot?n:t});const XN=dY;function Pm(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const JN=hY;var pY=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function mY(e){return new pY(e)}var gY=ut(function(t,n){return fu(t.length,function(){return t.apply(n,arguments)})});const vY=gY;function yY(e,t,n){for(var r=0,i=n.length;r=0;)n=sP[r],Ar(n,t)&&!OY(i,n)&&(i[i.length]=n),r-=1;return i});const ao=CY;var EY=ut(uS(["fantasy-land/map","map"],wY,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Cg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return du(function(r,i){return r[i]=t(n[i]),r},{},ao(n));default:return Pm(t,n)}}));const lh=EY,gb=Number.isInteger||function(t){return t<<0===t};var TY=ut(function(t,n){var r=t<0?n.length+t:t;return yy(n)?n.charAt(r):n[r]});const tA=TY;var kY=ut(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!Yo(r)&&Ar(i,r)?r[i]:gb(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(gb(i)&&ah(r)){var s=[].concat(r);return s[i]=n,s}else return Pd(i,n,r)});const Rl=BY;function UY(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var zY=ut(function(t,n){var r=Cg(t,n);return Cg(t,function(){return du(AY,lh(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const VY=zY;var HY=wt(function(t){return VY(t.length,t)});const WY=HY;function YY(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:uP(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:uP(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=ao(e);if(s.length!==ao(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Ar(c,t)&&pS(t[c],e[c],a,l)))return!1;o-=1}return!0}var lq=ut(function(t,n){return pS(t,n,[],[])});const mS=lq;function cq(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function o_(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Zu=function(t){return(t<10?"0":"")+t},fq=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Zu(t.getUTCMonth()+1)+"-"+Zu(t.getUTCDate())+"T"+Zu(t.getUTCHours())+":"+Zu(t.getUTCMinutes())+":"+Zu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const dq=fq;function hq(e){return function(){return!e.apply(this,arguments)}}function pq(e,t){for(var n=0,r=t.length,i=[];n":oA(s,a)},r=function(o,s){return Pm(function(a){return o_(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Pm(n,e).join(", ")+"))";case"[object Array]":return"["+Pm(n,e).concat(r(e,ch(function(o){return/^\d+$/.test(o)},ao(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):o_(dq(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":o_(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,ao(e)).join(", ")+"}"}}var bq=wt(function(t){return oA(t,[])});const wq=bq;var xq=wt(function(t){var n=fS(XN,0,lh(function(r){return r[0].length},t));return fu(n,function(){for(var r=0;rs?1:0})});const iG=rG;var oG=ut(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),$f=e=>!!(e!=null&&e.id),hA=e=>!!(e!=null&&e.version),pG=e=>!!(e!=null&&e.serverNotFound),mG=e=>$f(e)?e.id:"",gG=e=>Zq(["id","autoConnect"],e);var vG={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"]},yG=vG,_G={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"]},_S=_G,bG={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"]},wG={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"]},xG=wG,pA={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"]},SG={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"]},mA={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"]},OG={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"]},CG=OG,EG={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"]},bS=EG,TG={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"]},kG={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"]},PG={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"]},dP={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"]},MG={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"]},jG=MG,DG={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"]},gA=DG,LG={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"]},RG={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"]},NG={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"]},AG=NG,wS={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"]},vA={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"]},hP={prefix:"fas",iconName:"calendar-xmark",icon:[512,512,["calendar-times"],"f273","M160 0c17.7 0 32 14.3 32 32V64H320V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H32V112c0-26.5 21.5-48 48-48h48V32c0-17.7 14.3-32 32-32zM32 192H480V464c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V192zM337 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"]},IG={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"]},yA={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"]},FG={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"]},$G=FG,BG={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"]},UG={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"]},xS=UG,zG={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"]},VG=zG,HG={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"]},WG={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"]},YG=WG,qG={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"]},GG=qG,KG={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"]},ZG=KG,QG={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"]},_A=QG,XG={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"]},JG={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"]},eK={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"]},tK=eK,nK={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"]},SS={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"]},rK={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"]},_b=rK,iK={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"]},oK={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"]},sK=oK,pP={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"]},aK={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"]},lK=aK,cK={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"]},uK={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"]},fK={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 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.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.9z"]},dK={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"]},jd={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"]};function mP(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 Fe(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],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return It.head.insertBefore(t,r),e}}var IK="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Ad(){for(var e=12,t="";e-- >0;)t+=IK[Math.random()*62|0];return t}function pu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function PS(e){return e.classList?pu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function jA(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function FK(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(jA(e[n]),'" ')},"").trim()}function _y(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function MS(e){return e.size!==eo.size||e.x!==eo.x||e.y!==eo.y||e.rotate!==eo.rotate||e.flipX||e.flipY}function $K(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,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function BK(e){var t=e.transform,n=e.width,r=n===void 0?wb:n,i=e.height,o=i===void 0?wb:i,s=e.startCentered,a=s===void 0?!1:s,l="";return a&&OA?l+="translate(".concat(t.x/rs-r/2,"em, ").concat(t.y/rs-o/2,"em) "):a?l+="translate(calc(-50% + ".concat(t.x/rs,"em), calc(-50% + ").concat(t.y/rs,"em)) "):l+="translate(".concat(t.x/rs,"em, ").concat(t.y/rs,"em) "),l+="scale(".concat(t.size/rs*(t.flipX?-1:1),", ").concat(t.size/rs*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var UK=`: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-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, none)); transform: rotate(var(--fa-rotate-angle, none)); } .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 DA(){var e=CA,t=EA,n=ze.cssPrefix,r=ze.replacementClass,i=UK;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var xP=!1;function s_(){ze.autoAddCss&&!xP&&(AK(DA()),xP=!0)}var zK={mixout:function(){return{dom:{css:DA,insertCss:s_}}},hooks:function(){return{beforeDOMElementCreation:function(){s_()},beforeI2svg:function(){s_()}}}},Io=Ws||{};Io[Ao]||(Io[Ao]={});Io[Ao].styles||(Io[Ao].styles={});Io[Ao].hooks||(Io[Ao].hooks={});Io[Ao].shims||(Io[Ao].shims=[]);var Pi=Io[Ao],LA=[],VK=function e(){It.removeEventListener("DOMContentLoaded",e),Pg=1,LA.map(function(t){return t()})},Pg=!1;qo&&(Pg=(It.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(It.readyState),Pg||It.addEventListener("DOMContentLoaded",VK));function HK(e){qo&&(Pg?setTimeout(e,0):LA.push(e))}function dh(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"?jA(e):"<".concat(t," ").concat(FK(r),">").concat(o.map(dh).join(""),"")}function SP(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var WK=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},a_=function(t,n,r,i){var o=Object.keys(t),s=o.length,a=i!==void 0?WK(n,i):n,l,c,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 OP(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 Ob(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=OP(t);typeof Pi.hooks.addPack=="function"&&!i?Pi.hooks.addPack(e,OP(t)):Pi.styles[e]=Fe(Fe({},Pi.styles[e]||{}),o),e==="fas"&&Ob("fa",t)}var $p,Bp,Up,ac=Pi.styles,GK=Pi.shims,KK=($p={},xn($p,Lt,Object.values(Rd[Lt])),xn($p,Zt,Object.values(Rd[Zt])),$p),jS=null,RA={},NA={},AA={},IA={},FA={},ZK=(Bp={},xn(Bp,Lt,Object.keys(Dd[Lt])),xn(Bp,Zt,Object.keys(Dd[Zt])),Bp);function QK(e){return~jK.indexOf(e)}function XK(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!QK(i)?i:null}var $A=function(){var t=function(o){return a_(ac,function(s,a,l){return s[l]=a_(a,o,{}),s},{})};RA=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){i[l.toString(16)]=s})}return i}),NA=t(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){i[l]=s})}return i}),FA=t(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(l){i[l]=s}),i});var n="far"in ac||ze.autoFetchSvg,r=a_(GK,function(i,o){var s=o[0],a=o[1],l=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:l}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:l}),i},{names:{},unicodes:{}});AA=r.names,IA=r.unicodes,jS=by(ze.styleDefault,{family:ze.familyDefault})};NK(function(e){jS=by(e.styleDefault,{family:ze.familyDefault})});$A();function DS(e,t){return(RA[e]||{})[t]}function JK(e,t){return(NA[e]||{})[t]}function Na(e,t){return(FA[e]||{})[t]}function BA(e){return AA[e]||{prefix:null,iconName:null}}function eZ(e){var t=IA[e],n=DS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ys(){return jS}var LS=function(){return{prefix:null,iconName:null,rest:[]}};function by(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Lt:n,i=Dd[r][e],o=Ld[r][e]||Ld[r][i],s=e in Pi.styles?e:null;return o||s||null}var CP=(Up={},xn(Up,Lt,Object.keys(Rd[Lt])),xn(Up,Zt,Object.keys(Rd[Zt])),Up);function wy(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},xn(t,Lt,"".concat(ze.cssPrefix,"-").concat(Lt)),xn(t,Zt,"".concat(ze.cssPrefix,"-").concat(Zt)),t),s=null,a=Lt;(e.includes(o[Lt])||e.some(function(c){return CP[Lt].includes(c)}))&&(a=Lt),(e.includes(o[Zt])||e.some(function(c){return CP[Zt].includes(c)}))&&(a=Zt);var l=e.reduce(function(c,f){var d=XK(ze.cssPrefix,f);if(ac[f]?(f=KK[a].includes(f)?CK[a][f]:f,s=f,c.prefix=f):ZK[a].indexOf(f)>-1?(s=f,c.prefix=by(f,{family:a})):d?c.iconName=d:f!==ze.replacementClass&&f!==o[Lt]&&f!==o[Zt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=s==="fa"?BA(c.iconName):{},g=Na(c.prefix,c.iconName);p.prefix&&(s=null),c.iconName=p.iconName||g||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!ac.far&&ac.fas&&!ze.autoFetchSvg&&(c.prefix="fas")}return c},LS());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===Zt&&(ac.fass||ze.autoFetchSvg)&&(l.prefix="fass",l.iconName=Na(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||s==="fa")&&(l.prefix=Ys()||"fas"),l}var tZ=function(){function e(){hK(this,e),this.definitions={}}return pK(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[a][d]=c)}),n[a][l]=c}),n}}]),e}(),EP=[],lc={},xc={},nZ=Object.keys(xc);function rZ(e,t){var n=t.mixoutsTo;return EP=e,lc={},Object.keys(xc).forEach(function(r){nZ.indexOf(r)===-1&&delete xc[r]}),EP.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),kg(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){lc[s]||(lc[s]=[]),lc[s].push(o[s])})}r.provides&&r.provides(xc)}),n}function Cb(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 qo?(nl("beforeI2svg",t),Fo("pseudoElements2svg",t),Fo("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;ze.autoReplaceSvg===!1&&(ze.autoReplaceSvg=!0),ze.observeMutations=!0,HK(function(){aZ({autoReplaceSvgRoot:n}),nl("watch",t)})}},sZ={icon:function(t){if(t===null)return null;if(kg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Na(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=by(t[0]);return{prefix:r,iconName:Na(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ze.cssPrefix,"-"))>-1||t.match(EK))){var i=wy(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Ys(),iconName:Na(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=Ys();return{prefix:o,iconName:Na(o,t)||t}}}},Qr={noAuto:iZ,config:ze,dom:oZ,parse:sZ,library:UA,findIconDefinition:Eb,toHtml:dh},aZ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?It:n;(Object.keys(Pi.styles).length>0||ze.autoFetchSvg)&&qo&&ze.autoReplaceSvg&&Qr.dom.i2svg({node:r})};function xy(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return dh(r)})}}),Object.defineProperty(e,"node",{get:function(){if(qo){var r=It.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function lZ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(MS(s)&&n.found&&!r.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};i.style=_y(Fe(Fe({},o),{},{"transform-origin":"".concat(c.x+s.x/16,"em ").concat(c.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function cZ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(ze.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Fe(Fe({},i),{},{id:s}),children:r}]}]}function RS(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,a=e.symbol,l=e.title,c=e.maskId,f=e.titleId,d=e.extra,p=e.watchable,g=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,b=i==="fak",w=[ze.replacementClass,o?"".concat(ze.cssPrefix,"-").concat(o):""].filter(function(z){return d.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(d.classes).join(" "),S={children:[],attributes:Fe(Fe({},d.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},C=b&&!~d.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};g&&(S.attributes[tl]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(f||Ad())},children:[l]}),delete S.attributes.title);var T=Fe(Fe({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:s,symbol:a,styles:Fe(Fe({},C),d.styles)}),k=r.found&&n.found?Fo("generateAbstractMask",T)||{children:[],attributes:{}}:Fo("generateAbstractIcon",T)||{children:[],attributes:{}},D=k.children,R=k.attributes;return T.children=D,T.attributes=R,a?cZ(T):lZ(T)}function TP(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,a=e.watchable,l=a===void 0?!1:a,c=Fe(Fe(Fe({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(c[tl]="");var f=Fe({},s.styles);MS(i)&&(f.transform=BK({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var d=_y(f);d.length>0&&(c.style=d);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function uZ(e){var t=e.content,n=e.title,r=e.extra,i=Fe(Fe(Fe({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=_y(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var l_=Pi.styles;function Tb(e){var t=e[0],n=e[1],r=e.slice(4),i=OS(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ra.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ra.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ra.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var fZ={found:!1,width:512,height:512};function dZ(e,t){!TA&&!ze.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function kb(e,t){var n=t;return t==="fa"&&ze.styleDefault!==null&&(t=Ys()),new Promise(function(r,i){if(Fo("missingIconAbstract"),n==="fa"){var o=BA(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&l_[t]&&l_[t][e]){var s=l_[t][e];return r(Tb(s))}dZ(e,t),r(Fe(Fe({},fZ),{},{icon:ze.showMissingIcons&&e?Fo("missingIconAbstract")||{}:{}}))})}var kP=function(){},Pb=ze.measurePerformance&&Lp&&Lp.mark&&Lp.measure?Lp:{mark:kP,measure:kP},vf='FA "6.4.2"',hZ=function(t){return Pb.mark("".concat(vf," ").concat(t," begins")),function(){return zA(t)}},zA=function(t){Pb.mark("".concat(vf," ").concat(t," ends")),Pb.measure("".concat(vf," ").concat(t),"".concat(vf," ").concat(t," begins"),"".concat(vf," ").concat(t," ends"))},NS={begin:hZ,end:zA},Mm=function(){};function PP(e){var t=e.getAttribute?e.getAttribute(tl):null;return typeof t=="string"}function pZ(e){var t=e.getAttribute?e.getAttribute(ES):null,n=e.getAttribute?e.getAttribute(TS):null;return t&&n}function mZ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ze.replacementClass)}function gZ(){if(ze.autoReplaceSvg===!0)return jm.replace;var e=jm[ze.autoReplaceSvg];return e||jm.replace}function vZ(e){return It.createElementNS("http://www.w3.org/2000/svg",e)}function yZ(e){return It.createElement(e)}function VA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?vZ:yZ:n;if(typeof e=="string")return It.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(VA(s,{ceFn:r}))}),i}function _Z(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var jm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(VA(i),n)}),n.getAttribute(tl)===null&&ze.keepOriginalSource){var r=It.createComment(_Z(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~PS(n).indexOf(ze.replacementClass))return jm.replace(t);var i=new RegExp("".concat(ze.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,l){return l===ze.replacementClass||l.match(i)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return dh(a)}).join(` `);n.setAttribute(tl,""),n.innerHTML=s}};function MP(e){e()}function HA(e,t){var n=typeof t=="function"?t:Mm;if(e.length===0)n();else{var r=MP;ze.mutateApproach===SK&&(r=Ws.requestAnimationFrame||MP),r(function(){var i=gZ(),o=NS.begin("mutate");e.map(i),o(),n()})}}var AS=!1;function WA(){AS=!0}function Mb(){AS=!1}var Mg=null;function jP(e){if(bP&&ze.observeMutations){var t=e.treeCallback,n=t===void 0?Mm:t,r=e.nodeCallback,i=r===void 0?Mm:r,o=e.pseudoElementsCallback,s=o===void 0?Mm:o,a=e.observeMutationsRoot,l=a===void 0?It:a;Mg=new bP(function(c){if(!AS){var f=Ys();pu(c).forEach(function(d){if(d.type==="childList"&&d.addedNodes.length>0&&!PP(d.addedNodes[0])&&(ze.searchPseudoElements&&s(d.target),n(d.target)),d.type==="attributes"&&d.target.parentNode&&ze.searchPseudoElements&&s(d.target.parentNode),d.type==="attributes"&&PP(d.target)&&~MK.indexOf(d.attributeName))if(d.attributeName==="class"&&pZ(d.target)){var p=wy(PS(d.target)),g=p.prefix,v=p.iconName;d.target.setAttribute(ES,g||f),v&&d.target.setAttribute(TS,v)}else mZ(d.target)&&i(d.target)})}}),qo&&Mg.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function bZ(){Mg&&Mg.disconnect()}function wZ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function xZ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=wy(PS(e));return i.prefix||(i.prefix=Ys()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=JK(i.prefix,e.innerText)||DS(i.prefix,Sb(e.innerText))),!i.iconName&&ze.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function SZ(e){var t=pu(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 ze.autoA11y&&(n?t["aria-labelledby"]="".concat(ze.replacementClass,"-title-").concat(r||Ad()):(t["aria-hidden"]="true",t.focusable="false")),t}function OZ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:eo,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function DP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=xZ(e),r=n.iconName,i=n.prefix,o=n.rest,s=SZ(e),a=Cb("parseNodeAttributes",{},e),l=t.styleParser?wZ(e):[];return Fe({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:eo,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},a)}var CZ=Pi.styles;function YA(e){var t=ze.autoReplaceSvg==="nest"?DP(e,{styleParser:!1}):DP(e);return~t.extra.classes.indexOf(kA)?Fo("generateLayersText",e,t):Fo("generateSvgReplacementMutation",e,t)}var qs=new Set;kS.map(function(e){qs.add("fa-".concat(e))});Object.keys(Dd[Lt]).map(qs.add.bind(qs));Object.keys(Dd[Zt]).map(qs.add.bind(qs));qs=uh(qs);function LP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!qo)return Promise.resolve();var n=It.documentElement.classList,r=function(d){return n.add("".concat(wP,"-").concat(d))},i=function(d){return n.remove("".concat(wP,"-").concat(d))},o=ze.autoFetchSvg?qs:kS.map(function(f){return"fa-".concat(f)}).concat(Object.keys(CZ));o.includes("fa")||o.push("fa");var s=[".".concat(kA,":not([").concat(tl,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(tl,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=pu(e.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var l=NS.begin("onTree"),c=a.reduce(function(f,d){try{var p=YA(d);p&&f.push(p)}catch(g){TA||g.name==="MissingIcon"&&console.error(g)}return f},[]);return new Promise(function(f,d){Promise.all(c).then(function(p){HA(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),d(p)})})}function EZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;YA(e).then(function(n){n&&HA([n],t)})}function TZ(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Eb(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Eb(i||{})),e(r,Fe(Fe({},n),{},{mask:i}))}}var kZ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?eo:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,l=a===void 0?null:a,c=n.maskId,f=c===void 0?null:c,d=n.title,p=d===void 0?null:d,g=n.titleId,v=g===void 0?null:g,y=n.classes,x=y===void 0?[]:y,b=n.attributes,w=b===void 0?{}:b,S=n.styles,C=S===void 0?{}:S;if(t){var T=t.prefix,k=t.iconName,D=t.icon;return xy(Fe({type:"icon"},t),function(){return nl("beforeDOMElementCreation",{iconDefinition:t,params:n}),ze.autoA11y&&(p?w["aria-labelledby"]="".concat(ze.replacementClass,"-title-").concat(v||Ad()):(w["aria-hidden"]="true",w.focusable="false")),RS({icons:{main:Tb(D),mask:l?Tb(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:T,iconName:k,transform:Fe(Fe({},eo),i),symbol:s,title:p,maskId:f,titleId:v,extra:{attributes:w,styles:C,classes:x}})})}},PZ={mixout:function(){return{icon:TZ(kZ)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=LP,n.nodeCallback=EZ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?It:r,o=n.callback,s=o===void 0?function(){}:o;return LP(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,l=r.transform,c=r.symbol,f=r.mask,d=r.maskId,p=r.extra;return new Promise(function(g,v){Promise.all([kb(i,a),f.iconName?kb(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=OS(y,2),b=x[0],w=x[1];g([n,RS({icons:{main:b,mask:w},prefix:a,iconName:i,transform:l,symbol:c,maskId:d,title:o,titleId:s,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,l=_y(a);l.length>0&&(i.style=l);var c;return MS(s)&&(c=Fo("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},MZ={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 xy({type:"layer"},function(){nl("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(l){s=s.concat(l.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(ze.cssPrefix,"-layers")].concat(uh(o)).join(" ")},children:s}]})}}}},jZ={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,s=r.classes,a=s===void 0?[]:s,l=r.attributes,c=l===void 0?{}:l,f=r.styles,d=f===void 0?{}:f;return xy({type:"counter",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),uZ({content:n.toString(),title:o,extra:{attributes:c,styles:d,classes:["".concat(ze.cssPrefix,"-layers-counter")].concat(uh(a))}})})}}}},DZ={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?eo:i,s=r.title,a=s===void 0?null:s,l=r.classes,c=l===void 0?[]:l,f=r.attributes,d=f===void 0?{}:f,p=r.styles,g=p===void 0?{}:p;return xy({type:"text",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),TP({content:n,transform:Fe(Fe({},eo),o),title:a,extra:{attributes:d,styles:g,classes:["".concat(ze.cssPrefix,"-layers-text")].concat(uh(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,l=null;if(OA){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();a=f.width/c,l=f.height/c}return ze.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,TP({content:n.innerHTML,width:a,height:l,transform:o,title:i,extra:s,watchable:!0})])}}},LZ=new RegExp('"',"ug"),RP=[1105920,1112319];function RZ(e){var t=e.replace(LZ,""),n=qK(t,0),r=n>=RP[0]&&n<=RP[1],i=t.length===2?t[0]===t[1]:!1;return{value:Sb(i?t[0]:t),isSecondary:r||i}}function NP(e,t){var n="".concat(xK).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=pu(e.children),s=o.filter(function(D){return D.getAttribute(xb)===t})[0],a=Ws.getComputedStyle(e,t),l=a.getPropertyValue("font-family").match(TK),c=a.getPropertyValue("font-weight"),f=a.getPropertyValue("content");if(s&&!l)return e.removeChild(s),r();if(l&&f!=="none"&&f!==""){var d=a.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Zt:Lt,g=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Ld[p][l[2].toLowerCase()]:kK[p][c],v=RZ(d),y=v.value,x=v.isSecondary,b=l[0].startsWith("FontAwesome"),w=DS(g,y),S=w;if(b){var C=eZ(y);C.iconName&&C.prefix&&(w=C.iconName,g=C.prefix)}if(w&&!x&&(!s||s.getAttribute(ES)!==g||s.getAttribute(TS)!==S)){e.setAttribute(n,S),s&&e.removeChild(s);var T=OZ(),k=T.extra;k.attributes[xb]=t,kb(w,g).then(function(D){var R=RS(Fe(Fe({},T),{},{icons:{main:D,mask:LS()},prefix:g,iconName:S,extra:k,watchable:!0})),z=It.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=R.map(function(N){return dh(N)}).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function NZ(e){return Promise.all([NP(e,"::before"),NP(e,"::after")])}function AZ(e){return e.parentNode!==document.head&&!~OK.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(xb)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function AP(e){if(qo)return new Promise(function(t,n){var r=pu(e.querySelectorAll("*")).filter(AZ).map(NZ),i=NS.begin("searchPseudoElements");WA(),Promise.all(r).then(function(){i(),Mb(),t()}).catch(function(){i(),Mb(),n()})})}var IZ={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=AP,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?It:r;ze.searchPseudoElements&&AP(i)}}},IP=!1,FZ={mixout:function(){return{dom:{unwatch:function(){WA(),IP=!0}}}},hooks:function(){return{bootstrap:function(){jP(Cb("mutationObserverCallbacks",{}))},noAuto:function(){bZ()},watch:function(n){var r=n.observeMutationsRoot;IP?Mb():jP(Cb("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},FP=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("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},$Z={mixout:function(){return{parse:{transform:function(n){return FP(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=FP(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="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(c," ").concat(f)},p={transform:"translate(".concat(s/2*-1," -256)")},g={outer:a,inner:d,path:p};return{tag:"g",attributes:Fe({},g.outer),children:[{tag:"g",attributes:Fe({},g.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Fe(Fe({},r.icon.attributes),g.path)}]}]}}}},c_={x:0,y:0,width:"100%",height:"100%"};function $P(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 BZ(e){return e.tag==="g"?e.children:[e]}var UZ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?wy(i.split(" ").map(function(s){return s.trim()})):LS();return o.prefix||(o.prefix=Ys()),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,s=n.mask,a=n.maskId,l=n.transform,c=o.width,f=o.icon,d=s.width,p=s.icon,g=$K({transform:l,containerWidth:d,iconWidth:c}),v={tag:"rect",attributes:Fe(Fe({},c_),{},{fill:"white"})},y=f.children?{children:f.children.map($P)}:{},x={tag:"g",attributes:Fe({},g.inner),children:[$P(Fe({tag:f.tag,attributes:Fe(Fe({},f.attributes),g.path)},y))]},b={tag:"g",attributes:Fe({},g.outer),children:[x]},w="mask-".concat(a||Ad()),S="clip-".concat(a||Ad()),C={tag:"mask",attributes:Fe(Fe({},c_),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,b]},T={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:BZ(p)},C]};return r.push(T,{tag:"rect",attributes:Fe({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},c_)}),{children:r,attributes:i}}}},zZ={provides:function(t){var n=!1;Ws.matchMedia&&(n=Ws.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:Fe(Fe({},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 s=Fe(Fe({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:Fe(Fe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:Fe(Fe({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Fe(Fe({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:Fe(Fe({},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:Fe(Fe({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Fe(Fe({},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:Fe(Fe({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},VZ={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}}}},HZ=[zK,PZ,MZ,jZ,DZ,IZ,FZ,$Z,UZ,zZ,VZ];rZ(HZ,{mixoutsTo:Qr});Qr.noAuto;Qr.config;Qr.library;Qr.dom;var jb=Qr.parse;Qr.findIconDefinition;Qr.toHtml;var WZ=Qr.icon;Qr.layer;Qr.text;Qr.counter;var qA={exports:{}},YZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",qZ=YZ,GZ=qZ;function GA(){}function KA(){}KA.resetWarningCache=GA;var KZ=function(){function e(r,i,o,s,a,l){if(l!==GZ){var c=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 c.name="Invariant Violation",c}}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:KA,resetWarningCache:GA};return n.PropTypes=n,n};qA.exports=KZ();var ZZ=qA.exports;const j=Ii(ZZ);function BP(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 Os(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function XZ(e,t){if(e==null)return{};var n=QZ(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 Db(e){return JZ(e)||eQ(e)||tQ(e)||nQ()}function JZ(e){if(Array.isArray(e))return Lb(e)}function eQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tQ(e,t){if(e){if(typeof e=="string")return Lb(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 Lb(e,t)}}function Lb(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 QA(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=aQ(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[ZA(c)]=f}return l},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=XZ(n,oQ);return i.attrs.style=Os(Os({},i.attrs.style),s),e.apply(void 0,[t.tag,Os(Os({},i.attrs),a)].concat(Db(r)))}var XA=!1;try{XA=!0}catch{}function lQ(){if(!XA&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function UP(e){if(e&&jg(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(jb.icon)return jb.icon(e);if(e===null)return null;if(e&&jg(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 u_(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?cc({},e,t):{}}var Ie=Y.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,a=e.titleId,l=e.maskId,c=UP(n),f=u_("classes",[].concat(Db(rQ(e)),Db(o.split(" ")))),d=u_("transform",typeof e.transform=="string"?jb.transform(e.transform):e.transform),p=u_("mask",UP(r)),g=WZ(c,Os(Os(Os(Os({},f),d),p),{},{symbol:i,title:s,titleId:a,maskId:l}));if(!g)return lQ("Could not find icon",c),null;var v=g.abstract,y={ref:t};return Object.keys(e).forEach(function(x){Ie.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),cQ(v[0],y)});Ie.displayName="FontAwesomeIcon";Ie.propTypes={beat:j.bool,border:j.bool,beatFade:j.bool,bounce:j.bool,className:j.string,fade:j.bool,flash:j.bool,mask:j.oneOfType([j.object,j.array,j.string]),maskId:j.string,fixedWidth:j.bool,inverse:j.bool,flip:j.oneOf([!0,!1,"horizontal","vertical","both"]),icon:j.oneOfType([j.object,j.array,j.string]),listItem:j.bool,pull:j.oneOf(["right","left"]),pulse:j.bool,rotation:j.oneOf([0,90,180,270]),shake:j.bool,size:j.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:j.bool,spinPulse:j.bool,spinReverse:j.bool,symbol:j.oneOfType([j.bool,j.string]),title:j.string,titleId:j.string,transform:j.oneOfType([j.string,j.object]),swapOpacity:j.bool};Ie.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 cQ=QA.bind(null,Y.createElement),JA={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 dQ(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mQ;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function ra(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function t4(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 zP={};function Rb(e){zP[e]||(typeof console<"u"&&console.error(e),zP[e]=!0)}function n4(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&Rb('"'.concat(i,'" property of "').concat(o,`" has been deprecated. `).concat(t));for(var s=arguments.length,a=new Array(s>3?s-3:0),l=3;l"u"?"undefined":$c(window))==="object"&&window.Element||function(){};function IS(e,t,n){if(!(e[t]instanceof gQ))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var Bc=j.oneOfType([j.string,j.func,IS,j.shape({current:j.any})]),rt=j.oneOfType([j.func,j.string,j.shape({$$typeof:j.symbol,render:j.func}),j.arrayOf(j.oneOfType([j.func,j.string,j.shape({$$typeof:j.symbol,render:j.func})]))]),Dg={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Lg=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],zp={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},_t={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},vQ=["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"],FS=!!(typeof window<"u"&&window.document&&window.document.createElement);function yQ(e){return e&&$c(e)==="object"?"current"in e:!1}function r4(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Nb(e){var t=$c(e);return e!=null&&(t==="object"||t==="function")}function VP(e){var t=$c(e),n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&r4(e)==="[object Symbol]")return n;if(Nb(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=Nb(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 _Q(e){if(!Nb(e))return!1;var t=r4(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function bQ(e){if(yQ(e))return e.current;if(_Q(e))return e();if(typeof e=="string"&&FS){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 HP(e){return e===null?!1:Array.isArray(e)||FS&&typeof e.length=="number"}function Id(e,t){var n=bQ(e);return t?HP(n)?n:n===null?[]:[n]:HP(n)?n[0]:n}var wQ=["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"])'],xQ=["className","cssModule","noGutters","tag","widths"];function Ab(){return Ab=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 OQ(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 CQ=["xs","sm","md","lg","xl","xxl"],Nl=j.oneOfType([j.number,j.string]),EQ={tag:rt,noGutters:n4(j.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:j.string,cssModule:j.object,xs:Nl,sm:Nl,md:Nl,lg:Nl,xl:Nl,xxl:Nl,widths:j.array};function pr(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,s=e.widths,a=s===void 0?CQ:s,l=SQ(e,xQ),c=[];a.forEach(function(d,p){var g=e[d];if(delete l[d],!!g){var v=!p;c.push(v?"row-cols-".concat(g):"row-cols-".concat(d,"-").concat(g))}});var f=He(Ee(t,r?"gx-0":null,"row",c),n);return Y.createElement(o,Ab({},l,{className:f}))}pr.propTypes=EQ;var TQ=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function Ib(){return Ib=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 PQ(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 MQ={children:j.node,className:j.string,color:j.string,container:j.oneOfType([j.bool,j.string]),cssModule:j.object,dark:j.bool,expand:j.oneOfType([j.bool,j.string]),fixed:j.string,light:j.bool,role:j.string,sticky:j.string,tag:rt},jQ=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function i4(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,s=e.light,a=e.dark,l=e.fixed,c=e.sticky,f=e.color,d=e.container,p=d===void 0?"fluid":d,g=e.tag,v=g===void 0?"nav":g,y=e.children,x=kQ(e,TQ),b=He(Ee(i,"navbar",jQ(r),(t={"navbar-light":s,"navbar-dark":a},f_(t,"bg-".concat(f),f),f_(t,"fixed-".concat(l),l),f_(t,"sticky-".concat(c),c),t)),o),w=p&&p===!0?"container":"container-".concat(p);return Y.createElement(v,Ib({},x,{className:b}),p?Y.createElement("div",{className:w},y):y)}i4.propTypes=MQ;var DQ=["className","cssModule","tag"];function Fb(){return Fb=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 RQ(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 NQ={className:j.string,cssModule:j.object,tag:rt};function o4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=LQ(e,DQ),s=He(Ee(t,"navbar-brand"),n);return Y.createElement(i,Fb({},o,{className:s}))}o4.propTypes=NQ;var AQ=["className","cssModule","children","tag"];function $b(){return $b=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 BQ(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 UQ={className:j.string,cssModule:j.object,tag:rt,type:j.string,children:j.node};function s4(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,s=$Q(e,AQ),a=He(Ee(t,"navbar-toggler"),n);return Y.createElement(o,$b({"aria-label":"Toggle navigation"},IQ({type:"button"},s),{className:a}),r||Y.createElement("span",{className:He("navbar-toggler-icon",n)}))}s4.propTypes=UQ;var zQ=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function Bb(){return Bb=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 HQ(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 WQ={card:j.bool,className:j.string,cssModule:j.object,fill:j.bool,horizontal:j.oneOf(["center","end"]),justified:j.bool,navbar:j.bool,pills:j.bool,tabs:j.bool,tag:rt,vertical:j.oneOfType([j.bool,j.string])},YQ=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function $S(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,s=o===void 0?!1:o,a=e.horizontal,l=e.justified,c=e.fill,f=e.navbar,d=e.card,p=e.tag,g=p===void 0?"ul":p,v=VQ(e,zQ),y=He(Ee(t,f?"navbar-nav":"nav",a?"justify-content-".concat(a):!1,YQ(s),{"nav-tabs":r,"card-header-tabs":d&&r,"nav-pills":i,"card-header-pills":d&&i,"nav-justified":l,"nav-fill":c}),n);return Y.createElement(g,Bb({},v,{className:y}))}$S.propTypes=WQ;var qQ=["className","cssModule","active","tag"];function Ub(){return Ub=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 KQ(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 ZQ={active:j.bool,className:j.string,cssModule:j.object,tag:rt};function a4(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,s=GQ(e,qQ),a=He(Ee(t,"nav-item",r?"active":!1),n);return Y.createElement(o,Ub({},s,{className:a}))}a4.propTypes=ZQ;function zb(e){"@babel/helpers - typeof";return zb=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},zb(e)}var QQ=["className","cssModule","active","tag","innerRef"];function Vb(){return Vb=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 JQ(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 eX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YP(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 Rg(e){return Rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rg(e)}var sX={active:j.bool,className:j.string,cssModule:j.object,disabled:j.bool,href:j.any,innerRef:j.oneOfType([j.object,j.func,j.string]),onClick:j.func,tag:rt},c4=function(e){nX(n,e);var t=rX(n);function n(r){var i;return eX(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(l4(i)),i}return tX(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,s=i.cssModule,a=i.active,l=i.tag,c=l===void 0?"a":l,f=i.innerRef,d=XQ(i,QQ),p=He(Ee(o,"nav-link",{disabled:d.disabled,active:a}),s);return Y.createElement(c,Vb({},d,{ref:f,onClick:this.onClick,className:p}))}}]),n}(Y.Component);c4.propTypes=sX;const u4=c4;var aX=["className","cssModule","variant","innerRef"];function Wb(){return Wb=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 fX(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 dX={active:j.bool,"aria-label":j.string,onClick:j.func,variant:j.oneOf(["white"]),className:j.string,cssModule:j.object,innerRef:j.oneOfType([j.object,j.string,j.func])};function f4(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=uX(e,aX),o=He(Ee(t,"btn-close",n&&"btn-close-".concat(n)));return Y.createElement("button",Wb({ref:r,type:"button",className:o},lX({"aria-label":"close"},i)))}f4.propTypes=dX;var hX=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Yb(){return Yb=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 mX(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 gX={active:j.bool,"aria-label":j.string,block:j.bool,children:j.node,className:j.string,cssModule:j.object,close:j.bool,color:j.string,disabled:j.bool,innerRef:j.oneOfType([j.object,j.func,j.string]),onClick:j.func,outline:j.bool,size:j.string,tag:rt};function yt(e){var t=V.useCallback(function(w){if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,s=e.close,a=e.cssModule,l=e.color,c=l===void 0?"secondary":l,f=e.outline,d=e.size,p=e.tag,g=p===void 0?"button":p,v=e.innerRef,y=pX(e,hX);if(s)return Y.createElement(f4,y);var x="btn".concat(f?"-outline":"","-").concat(c),b=He(Ee(o,"btn",x,d?"btn-".concat(d):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return y.href&&g==="button"&&(g="a"),Y.createElement(g,Yb({type:g==="button"&&y.onClick?"button":void 0},y,{className:b,ref:v,onClick:t,"aria-label":r}))}yt.propTypes=gX;var d4=V.createContext(),h4=V.createContext();function qb(e){var t=e.children,n=V.useState(null),r=n[0],i=n[1],o=V.useRef(!1);V.useEffect(function(){return function(){o.current=!0}},[]);var s=V.useCallback(function(a){o.current||i(a)},[]);return V.createElement(d4.Provider,{value:r},V.createElement(h4.Provider,{value:s},t))}var p4=function(t){return Array.isArray(t)?t[0]:t},m4=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=Hr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function PX(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];!ci(o)||!lo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function MX(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]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!ci(i)||!lo(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const jX={name:"applyStyles",enabled:!0,phase:"write",fn:PX,effect:MX,requires:["computeStyles"]};function io(e){return e.split("-")[0]}var za=Math.max,Ng=Math.min,zc=Math.round;function Kb(){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 y4(){return!/^((?!chrome|android).)*safari/i.test(Kb())}function Vc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ci(e)&&(i=e.offsetWidth>0&&zc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&zc(r.height)/e.offsetHeight||1);var s=rl(e)?Hr(e):window,a=s.visualViewport,l=!y4()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,f=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:f,right:c+d,bottom:f+p,left:c,x:c,y:f}}function zS(e){var t=Vc(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 _4(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&US(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $o(e){return Hr(e).getComputedStyle(e)}function DX(e){return["table","td","th"].indexOf(lo(e))>=0}function ia(e){return((rl(e)?e.ownerDocument:e.document)||window.document).documentElement}function Sy(e){return lo(e)==="html"?e:e.assignedSlot||e.parentNode||(US(e)?e.host:null)||ia(e)}function QP(e){return!ci(e)||$o(e).position==="fixed"?null:e.offsetParent}function LX(e){var t=/firefox/i.test(Kb()),n=/Trident/i.test(Kb());if(n&&ci(e)){var r=$o(e);if(r.position==="fixed")return null}var i=Sy(e);for(US(i)&&(i=i.host);ci(i)&&["html","body"].indexOf(lo(i))<0;){var o=$o(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 ph(e){for(var t=Hr(e),n=QP(e);n&&DX(n)&&$o(n).position==="static";)n=QP(n);return n&&(lo(n)==="html"||lo(n)==="body"&&$o(n).position==="static")?t:n||LX(e)||t}function VS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zf(e,t,n){return za(e,Ng(t,n))}function RX(e,t,n){var r=zf(e,t,n);return r>n?n:r}function b4(){return{top:0,right:0,bottom:0,left:0}}function w4(e){return Object.assign({},b4(),e)}function x4(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var NX=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,w4(typeof t!="number"?t:x4(t,hh))};function AX(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=io(n.placement),l=VS(a),c=[kr,mi].indexOf(a)>=0,f=c?"height":"width";if(!(!o||!s)){var d=NX(i.padding,n),p=zS(o),g=l==="y"?Tr:kr,v=l==="y"?pi:mi,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],x=s[l]-n.rects.reference[l],b=ph(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=y/2-x/2,C=d[g],T=w-p[f]-d[v],k=w/2-p[f]/2+S,D=zf(C,k,T),R=l;n.modifiersData[r]=(t={},t[R]=D,t.centerOffset=D-k,t)}}function IX(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)||_4(t.elements.popper,i)&&(t.elements.arrow=i))}const FX={name:"arrow",enabled:!0,phase:"main",fn:AX,effect:IX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Hc(e){return e.split("-")[1]}var $X={top:"auto",right:"auto",bottom:"auto",left:"auto"};function BX(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:zc(n*i)/i||0,y:zc(r*i)/i||0}}function XP(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,y=v===void 0?0:v,x=typeof f=="function"?f({x:g,y}):{x:g,y};g=x.x,y=x.y;var b=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),S=kr,C=Tr,T=window;if(c){var k=ph(n),D="clientHeight",R="clientWidth";if(k===Hr(n)&&(k=ia(n),$o(k).position!=="static"&&a==="absolute"&&(D="scrollHeight",R="scrollWidth")),k=k,i===Tr||(i===kr||i===mi)&&o===Fd){C=pi;var z=d&&k===T&&T.visualViewport?T.visualViewport.height:k[D];y-=z-r.height,y*=l?1:-1}if(i===kr||(i===Tr||i===pi)&&o===Fd){S=mi;var N=d&&k===T&&T.visualViewport?T.visualViewport.width:k[R];g-=N-r.width,g*=l?1:-1}}var H=Object.assign({position:a},c&&$X),W=f===!0?BX({x:g,y},Hr(n)):{x:g,y};if(g=W.x,y=W.y,l){var ne;return Object.assign({},H,(ne={},ne[C]=w?"0":"",ne[S]=b?"0":"",ne.transform=(T.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",ne))}return Object.assign({},H,(t={},t[C]=w?y+"px":"",t[S]=b?g+"px":"",t.transform="",t))}function UX(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:io(t.placement),variation:Hc(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,XP(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,XP(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const zX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:UX,data:{}};var Vp={passive:!0};function VX(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Hr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Vp)}),a&&l.addEventListener("resize",n.update,Vp),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Vp)}),a&&l.removeEventListener("resize",n.update,Vp)}}const HX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:VX,data:{}};var WX={left:"right",right:"left",bottom:"top",top:"bottom"};function Dm(e){return e.replace(/left|right|bottom|top/g,function(t){return WX[t]})}var YX={start:"end",end:"start"};function JP(e){return e.replace(/start|end/g,function(t){return YX[t]})}function HS(e){var t=Hr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function WS(e){return Vc(ia(e)).left+HS(e).scrollLeft}function qX(e,t){var n=Hr(e),r=ia(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=y4();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+WS(e),y:l}}function GX(e){var t,n=ia(e),r=HS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=za(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=za(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+WS(e),l=-r.scrollTop;return $o(i||n).direction==="rtl"&&(a+=za(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function YS(e){var t=$o(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function S4(e){return["html","body","#document"].indexOf(lo(e))>=0?e.ownerDocument.body:ci(e)&&YS(e)?e:S4(Sy(e))}function Vf(e,t){var n;t===void 0&&(t=[]);var r=S4(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Hr(r),s=i?[o].concat(o.visualViewport||[],YS(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Vf(Sy(s)))}function Zb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function KX(e,t){var n=Vc(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 eM(e,t,n){return t===g4?Zb(qX(e,n)):rl(t)?KX(t,n):Zb(GX(ia(e)))}function ZX(e){var t=Vf(Sy(e)),n=["absolute","fixed"].indexOf($o(e).position)>=0,r=n&&ci(e)?ph(e):e;return rl(r)?t.filter(function(i){return rl(i)&&_4(i,r)&&lo(i)!=="body"}):[]}function QX(e,t,n,r){var i=t==="clippingParents"?ZX(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var f=eM(e,c,r);return l.top=za(f.top,l.top),l.right=Ng(f.right,l.right),l.bottom=Ng(f.bottom,l.bottom),l.left=za(f.left,l.left),l},eM(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function O4(e){var t=e.reference,n=e.element,r=e.placement,i=r?io(r):null,o=r?Hc(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case Tr:l={x:s,y:t.y-n.height};break;case pi:l={x:s,y:t.y+t.height};break;case mi:l={x:t.x+t.width,y:a};break;case kr:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?VS(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Uc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case Fd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function $d(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?vX:a,c=n.rootBoundary,f=c===void 0?g4:c,d=n.elementContext,p=d===void 0?Xu:d,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,x=y===void 0?0:y,b=w4(typeof x!="number"?x:x4(x,hh)),w=p===Xu?yX:Xu,S=e.rects.popper,C=e.elements[v?w:p],T=QX(rl(C)?C:C.contextElement||ia(e.elements.popper),l,f,s),k=Vc(e.elements.reference),D=O4({reference:k,element:S,strategy:"absolute",placement:i}),R=Zb(Object.assign({},S,D)),z=p===Xu?R:k,N={top:T.top-z.top+b.top,bottom:z.bottom-T.bottom+b.bottom,left:T.left-z.left+b.left,right:z.right-T.right+b.right},H=e.modifiersData.offset;if(p===Xu&&H){var W=H[i];Object.keys(N).forEach(function(ne){var q=[mi,pi].indexOf(ne)>=0?1:-1,J=[Tr,pi].indexOf(ne)>=0?"y":"x";N[ne]+=W[J]*q})}return N}function XX(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?v4:l,f=Hc(r),d=f?a?ZP:ZP.filter(function(v){return Hc(v)===f}):hh,p=d.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=d);var g=p.reduce(function(v,y){return v[y]=$d(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[io(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function JX(e){if(io(e)===BS)return[];var t=Dm(e);return[JP(e),t,JP(t)]}function eJ(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,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,x=t.options.placement,b=io(x),w=b===x,S=l||(w||!v?[Dm(x)]:JX(x)),C=[x].concat(S).reduce(function(Z,ie){return Z.concat(io(ie)===BS?XX(t,{placement:ie,boundary:f,rootBoundary:d,padding:c,flipVariations:v,allowedAutoPlacements:y}):ie)},[]),T=t.rects.reference,k=t.rects.popper,D=new Map,R=!0,z=C[0],N=0;N=0,J=q?"width":"height",oe=$d(t,{placement:H,boundary:f,rootBoundary:d,altBoundary:p,padding:c}),le=q?ne?mi:kr:ne?pi:Tr;T[J]>k[J]&&(le=Dm(le));var G=Dm(le),F=[];if(o&&F.push(oe[W]<=0),a&&F.push(oe[le]<=0,oe[G]<=0),F.every(function(Z){return Z})){z=H,R=!1;break}D.set(H,F)}if(R)for(var A=v?3:1,B=function(ie){var se=C.find(function(pe){var E=D.get(pe);if(E)return E.slice(0,ie).every(function(M){return M})});if(se)return z=se,"break"},re=A;re>0;re--){var U=B(re);if(U==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const tJ={name:"flip",enabled:!0,phase:"main",fn:eJ,requiresIfExists:["offset"],data:{_skip:!1}};function tM(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 nM(e){return[Tr,mi,pi,kr].some(function(t){return e[t]>=0})}function nJ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=$d(t,{elementContext:"reference"}),a=$d(t,{altBoundary:!0}),l=tM(s,r),c=tM(a,i,o),f=nM(l),d=nM(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const rJ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:nJ};function iJ(e,t,n){var r=io(e),i=[kr,Tr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[kr,mi].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function oJ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=v4.reduce(function(f,d){return f[d]=iJ(d,t.rects,o),f},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const sJ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:oJ};function aJ(e){var t=e.state,n=e.name;t.modifiersData[n]=O4({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const lJ={name:"popperOffsets",enabled:!0,phase:"read",fn:aJ,data:{}};function cJ(e){return e==="x"?"y":"x"}function uJ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=$d(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:f}),b=io(t.placement),w=Hc(t.placement),S=!w,C=VS(b),T=cJ(C),k=t.modifiersData.popperOffsets,D=t.rects.reference,R=t.rects.popper,z=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(k){if(o){var ne,q=C==="y"?Tr:kr,J=C==="y"?pi:mi,oe=C==="y"?"height":"width",le=k[C],G=le+x[q],F=le-x[J],A=g?-R[oe]/2:0,B=w===Uc?D[oe]:R[oe],re=w===Uc?-R[oe]:-D[oe],U=t.elements.arrow,Z=g&&U?zS(U):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:b4(),se=ie[q],pe=ie[J],E=zf(0,D[oe],Z[oe]),M=S?D[oe]/2-A-E-se-N.mainAxis:B-E-se-N.mainAxis,I=S?-D[oe]/2+A+E+pe+N.mainAxis:re+E+pe+N.mainAxis,X=t.elements.arrow&&ph(t.elements.arrow),Q=X?C==="y"?X.clientTop||0:X.clientLeft||0:0,ae=(ne=H==null?void 0:H[C])!=null?ne:0,ge=le+M-ae-Q,De=le+I-ae,ue=zf(g?Ng(G,ge):G,le,g?za(F,De):F);k[C]=ue,W[C]=ue-le}if(a){var ve,_e=C==="x"?Tr:kr,Ce=C==="x"?pi:mi,Le=k[T],Me=T==="y"?"height":"width",je=Le+x[_e],ce=Le-x[Ce],de=[Tr,kr].indexOf(b)!==-1,be=(ve=H==null?void 0:H[T])!=null?ve:0,ye=de?je:Le-D[Me]-R[Me]-be+N.altAxis,Se=de?Le+D[Me]+R[Me]-be-N.altAxis:ce,Pe=g&&de?RX(ye,Le,Se):zf(g?ye:je,Le,g?Se:ce);k[T]=Pe,W[T]=Pe-Le}t.modifiersData[r]=W}}const fJ={name:"preventOverflow",enabled:!0,phase:"main",fn:uJ,requiresIfExists:["offset"]};function dJ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function hJ(e){return e===Hr(e)||!ci(e)?HS(e):dJ(e)}function pJ(e){var t=e.getBoundingClientRect(),n=zc(t.width)/e.offsetWidth||1,r=zc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function mJ(e,t,n){n===void 0&&(n=!1);var r=ci(t),i=ci(t)&&pJ(t),o=ia(t),s=Vc(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((lo(t)!=="body"||YS(o))&&(a=hJ(t)),ci(t)?(l=Vc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=WS(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function gJ(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 s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function vJ(e){var t=gJ(e);return kX.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function yJ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function _J(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 rM={placement:"bottom",modifiers:[],strategy:"absolute"};function iM(){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 $J(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 BJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oM(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 Ag(e){return Ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ag(e)}var YJ={a11y:j.bool,disabled:j.bool,direction:j.oneOf(["up","down","start","end","left","right"]),group:j.bool,isOpen:j.bool,nav:j.bool,active:j.bool,size:j.string,tag:rt,toggle:j.func,children:j.node,className:j.string,cssModule:j.object,dropup:j.bool,inNavbar:j.bool,setActiveFromChild:j.bool,menuRole:j.oneOf(["listbox","menu"])},qJ={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},GJ=[_t.space,_t.enter,_t.up,_t.down,_t.end,_t.home],Oy=function(e){zJ(n,e);var t=VJ(n);function n(r){var i;return BJ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(as(i)),i.handleDocumentClick=i.handleDocumentClick.bind(as(i)),i.handleKeyDown=i.handleKeyDown.bind(as(i)),i.removeEvents=i.removeEvents.bind(as(i)),i.toggle=i.toggle.bind(as(i)),i.handleMenuRef=i.handleMenuRef.bind(as(i)),i.handleToggleRef=i.handleToggleRef.bind(as(i)),i.containerRef=Y.createRef(),i.menuRef=Y.createRef(),i.toggleRef=Y.createRef(),i}return UJ(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!==_t.tab))){var o=this.getContainer(),s=this.getMenu(),a=this.getToggle(),l=a.contains(i.target),c=s&&s.contains(i.target)&&s!==i.target,f=!1;o&&(f=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!f||c)&&(i.type!=="keyup"||i.which===_t.tab))&&this.toggle(i)}}},{key:"handleKeyDown",value:function(i){var o=this,s=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",a=this.getMenuCtrl()===i.target,l=_t.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(s||a))&&((GJ.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(a)if([_t.space,_t.enter,_t.up,_t.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var w;return(w=o.getMenuItems()[0])===null||w===void 0?void 0:w.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===_t.esc&&this.toggle(i);if(this.props.isOpen&&s){if([_t.tab,_t.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([_t.space,_t.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([_t.down,_t.up].indexOf(i.which)>-1||[_t.n,_t.p].indexOf(i.which)>-1&&i.ctrlKey){var f=this.getMenuItems(),d=f.indexOf(i.target);_t.up===i.which||_t.p===i.which&&i.ctrlKey?d=d!==0?d-1:f.length-1:(_t.down===i.which||_t.n===i.which&&i.ctrlKey)&&(d=d===f.length-1?0:d+1),f[d].focus()}else if(_t.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(_t.home===i.which){var g=this.getMenuItems();g[0].focus()}else if(i.which>=48&&i.which<=90)for(var v=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QJ(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 XJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sM(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 Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ig(e)}var iee={children:j.node,active:j.bool,disabled:j.bool,divider:j.bool,tag:rt,header:j.bool,onClick:j.func,className:j.string,cssModule:j.object,toggle:j.bool,text:j.bool},GS=function(e){eee(n,e);var t=tee(n);function n(r){var i;return XJ(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(rw(i)),i.getTabIndex=i.getTabIndex.bind(rw(i)),i}return JJ(n,[{key:"onClick",value:function(i){var o,s=this.props,a=s.disabled,l=s.header,c=s.divider,f=s.text;if(a||l||c||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,s=i.header,a=i.divider,l=i.text;return o||s||a||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,s=ra(this.props,["toggle"]),a=s.className,l=s.cssModule,c=s.divider,f=s.tag,d=f===void 0?"button":f,p=s.header,g=s.active,v=s.text,y=ZJ(s,KJ),x=He(Ee(a,{disabled:y.disabled,"dropdown-item":!c&&!p&&!v,active:g,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":v}),l);return d==="button"&&(p?d="h6":c?d="div":y.href?d="a":v&&(d="span")),Y.createElement(d,tw({type:d==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(Y.Component);GS.propTypes=iee;GS.contextType=Bd;const Ue=GS;function iw(e){"@babel/helpers - typeof";return iw=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},iw(e)}var oee=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function Fg(){return Fg=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 hee(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 pee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cM(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 $g(e){return $g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$g(e)}var wee={tag:rt,children:j.node.isRequired,dark:j.bool,end:j.bool,flip:j.bool,modifiers:j.array,className:j.string,cssModule:j.object,style:j.object,persist:j.bool,strategy:j.string,container:Bc,updateOnSelect:j.bool,right:n4(j.bool,'Please use "end" instead.')},xee={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},KS=function(e){gee(n,e);var t=vee(n);function n(){return pee(this,n),t.apply(this,arguments)}return mee(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,s=o.className,a=o.cssModule,l=o.dark,c=o.end,f=o.right,d=o.tag,p=d===void 0?"div":d,g=o.flip,v=g===void 0?!0:g,y=o.modifiers,x=y===void 0?[]:y,b=o.persist,w=o.strategy,S=o.container,C=o.updateOnSelect,T=dee(o,oee),k=He(Ee(s,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||f,show:this.context.isOpen}),a),D=p;if(b||this.context.isOpen&&!this.context.inNavbar){var R=xee[this.context.direction]||"bottom",z=c||f?"end":"start",N="".concat(R,"-").concat(z),H=[].concat(aee(x),[{name:"flip",enabled:!!v}]),W=Y.createElement(qS,{placement:N,modifiers:H,strategy:w},function(q){var J=q.ref,oe=q.style,le=q.placement,G=q.update,F=lM(lM({},i.props.style),oe),A=function(re){J(re);var U=i.context.onMenuRef;U&&U(re)};return Y.createElement(D,Fg({tabIndex:"-1",role:i.getRole(),ref:A},T,{style:F,"aria-hidden":!i.context.isOpen,className:k,"data-popper-placement":le,onClick:function(){return C&&G()}}))});return S?Ua.createPortal(W,Id(S)):W}var ne=this.context.onMenuRef;return Y.createElement(D,Fg({tabIndex:"-1",role:this.getRole()},T,{ref:ne,"aria-hidden":!this.context.isOpen,className:k,"data-popper-placement":T.placement}))}}]),n}(Y.Component);KS.propTypes=wee;KS.contextType=Bd;const mu=KS;function aw(e){"@babel/helpers - typeof";return aw=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},aw(e)}var See=["className","color","cssModule","caret","split","nav","tag","innerRef"];function Oee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bg(){return Bg=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 Eee(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 Tee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uM(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 Ug(e){return Ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ug(e)}var Lee={caret:j.bool,color:j.string,children:j.node,className:j.string,cssModule:j.object,disabled:j.bool,onClick:j.func,"aria-haspopup":j.bool,split:j.bool,tag:rt,nav:j.bool,innerRef:j.oneOfType([j.object,j.string,j.func])},Ree={color:"secondary","aria-haspopup":!0},Cy=function(e){Pee(n,e);var t=Mee(n);function n(r){var i;return Tee(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(T4(i)),i}return kee(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,s=o.className,a=o.color,l=o.cssModule,c=o.caret,f=o.split,d=o.nav,p=o.tag,g=o.innerRef,v=Cee(o,See),y=v["aria-label"]||"Toggle Dropdown",x=He(Ee(s,{"dropdown-toggle":c||f,"dropdown-toggle-split":f,"nav-link":d}),l),b=typeof v.children<"u"?v.children:Y.createElement("span",{className:"visually-hidden"},y),w;return d&&!p?(w="a",v.href="#"):p?w=p:(w=yt,v.color=a,v.cssModule=l),this.context.inNavbar?Y.createElement(w,Bg({},v,{className:x,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:b})):Y.createElement(C4,{innerRef:g},function(S){var C=S.ref,T=function(D){C(D);var R=i.context.onToggleRef;R&&R(D)};return Y.createElement(w,Bg({},v,Oee({},typeof w=="string"?"ref":"innerRef",T),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:b}))})}}]),n}(Y.Component);Cy.propTypes=Lee;Cy.defaultProps=Ree;Cy.contextType=Bd;const gh=Cy;function zg(e,t){return zg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zg(e,t)}function Nee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zg(e,t)}const fM={disabled:!1},k4=Y.createContext(null);var yf="unmounted",Ca="exited",Ea="entering",Wl="entered",cw="exiting",Go=function(e){Nee(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=Ca,o.appearStatus=Ea):l=Wl:r.unmountOnExit||r.mountOnEnter?l=yf:l=Ca,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===yf?{status:Ca}: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 s=this.state.status;this.props.in?s!==Ea&&s!==Wl&&(o=Ea):(s===Ea||s===Wl)&&(o=cw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===Ea?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===Ca&&this.setState({status:yf})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Ua.findDOMNode(this),a],c=l[0],f=l[1],d=this.getTimeouts(),p=a?d.appear:d.enter;if(!i&&!s||fM.disabled){this.safeSetState({status:Wl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:Ea},function(){o.props.onEntering(c,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Wl},function(){o.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Ua.findDOMNode(this);if(!o||fM.disabled){this.safeSetState({status:Ca},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:cw},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ca},function(){i.props.onExited(a)})})})},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,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Ua.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===yf)return null;var o=this.props,s=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 a=H2(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(k4.Provider,{value:null},typeof s=="function"?s(i,a):Y.cloneElement(Y.Children.only(s),a))},t}(Y.Component);Go.contextType=k4;Go.propTypes={};function Al(){}Go.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Al,onEntering:Al,onEntered:Al,onExit:Al,onExiting:Al,onExited:Al};Go.UNMOUNTED=yf;Go.EXITED=Ca;Go.ENTERING=Ea;Go.ENTERED=Wl;Go.EXITING=cw;const gu=Go;function $e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Aee=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function Vg(){return Vg=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}function dM(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 Ud(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}function Hee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hM(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 Wg(e){return Wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wg(e)}function pM(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 Wc(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rte(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 ite={body:j.bool,className:j.string,color:j.string,cssModule:j.object,innerRef:j.oneOfType([j.object,j.string,j.func]),inverse:j.bool,outline:j.bool,tag:rt};function Wr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,s=e.outline,a=e.tag,l=a===void 0?"div":a,c=e.innerRef,f=nte(e,tte),d=He(Ee(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(s?"border":"bg","-").concat(r):!1),n);return Y.createElement(l,dw({},f,{className:d,ref:c}))}Wr.propTypes=ite;var ote=["className","cssModule","innerRef","tag"];function hw(){return hw=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 ate(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 lte={className:j.string,cssModule:j.object,innerRef:j.oneOfType([j.object,j.string,j.func]),tag:rt};function Yc(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,s=ste(e,ote),a=He(Ee(t,"card-body"),n);return Y.createElement(o,hw({},s,{className:a,ref:r}))}Yc.propTypes=lte;var cte=["className","cssModule","tag"];function pw(){return pw=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 fte(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 dte={className:j.string,cssModule:j.object,tag:rt};function j4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=ute(e,cte),s=He(Ee(t,"card-footer"),n);return Y.createElement(i,pw({},o,{className:s}))}j4.propTypes=dte;var hte=["className","cssModule","tag"];function mw(){return mw=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 mte(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 gte={className:j.string,cssModule:j.object,tag:rt};function qc(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=pte(e,hte),s=He(Ee(t,"card-header"),n);return Y.createElement(i,mw({},o,{className:s}))}qc.propTypes=gte;var vte=["className","cssModule","tag"];function gw(){return gw=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 _te(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 bte={className:j.string,cssModule:j.object,tag:rt};function D4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=yte(e,vte),s=He(Ee(t,"card-text"),n);return Y.createElement(i,gw({},o,{className:s}))}D4.propTypes=bte;var wte=["className","cssModule","tag"];function vw(){return vw=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 Ste(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 Ote={className:j.string,cssModule:j.object,tag:rt};function L4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=xte(e,wte),s=He(Ee(t,"card-title"),n);return Y.createElement(i,vw({},o,{className:s}))}L4.propTypes=Ote;function yw(e){"@babel/helpers - typeof";return yw=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},yw(e)}var Cte=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function _w(){return _w=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 jte(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 Dte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gM(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 Yg(e){return Yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yg(e)}function vM(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 Rm(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 qg(e){return qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qg(e)}var Ey={children:j.oneOfType([j.node,j.func]),placement:j.oneOf(vQ),target:Bc.isRequired,container:Bc,isOpen:j.bool,disabled:j.bool,hideArrow:j.bool,boundariesElement:j.oneOfType([j.string,IS]),className:j.string,innerClassName:j.string,arrowClassName:j.string,popperClassName:j.string,cssModule:j.object,toggle:j.func,autohide:j.bool,placementPrefix:j.string,delay:j.oneOfType([j.shape({show:j.number,hide:j.number}),j.number]),modifiers:j.array,strategy:j.string,offset:j.arrayOf(j.number),innerRef:j.oneOfType([j.func,j.string,j.object]),trigger:j.string,fade:j.bool,flip:j.bool},R4={show:0,hide:50},Kte={isOpen:!1,hideArrow:!1,autohide:!1,delay:R4,toggle:function(){},trigger:"click",fade:!0};function N4(e,t){return t&&(e===t||t.contains(e))}function _M(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return N4(e,n)})[0]}var XS=function(e){Wte(n,e);var t=Yte(n);function n(r){var i;return Vte(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(jr(i)),i.handleDocumentClick=i.handleDocumentClick.bind(jr(i)),i.removeTargetEvents=i.removeTargetEvents.bind(jr(i)),i.toggle=i.toggle.bind(jr(i)),i.showWithDelay=i.showWithDelay.bind(jr(i)),i.hideWithDelay=i.hideWithDelay.bind(jr(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(jr(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(jr(i)),i.show=i.show.bind(jr(i)),i.hide=i.hide.bind(jr(i)),i.onEscKeyDown=i.onEscKeyDown.bind(jr(i)),i.getRef=i.getRef.bind(jr(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return Hte(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||_M(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!N4(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&_M(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):zd(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return zd(o)==="object"?isNaN(o[i])?R4[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,s){this._targets.forEach(function(a){a.addEventListener(i,o,s)})}},{key:"removeEventOnTargets",value:function(i,o,s){this._targets.forEach(function(a){a.removeEventListener(i,o,s)})}},{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=Id(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 s=this.props,a=s.className,l=s.cssModule,c=s.innerClassName,f=s.isOpen,d=s.hideArrow,p=s.boundariesElement,g=s.placement,v=s.placementPrefix,y=s.arrowClassName,x=s.popperClassName,b=s.container,w=s.modifiers,S=s.strategy,C=s.offset,T=s.fade,k=s.flip,D=s.children,R=ra(this.props,Object.keys(Ey)),z=He(x,l),N=He(c,l);return Y.createElement(zte,{className:a,target:o,isOpen:f,hideArrow:d,boundariesElement:p,placement:g,placementPrefix:v,arrowClassName:y,popperClassName:z,container:b,modifiers:w,strategy:S,offset:C,cssModule:l,fade:T,flip:k},function(H){var W=H.update;return Y.createElement("div",xw({},R,{ref:i.getRef,className:N,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof D=="function"?D({update:W}):D)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(Y.Component);XS.propTypes=Ey;XS.defaultProps=Kte;const A4=XS;function Ow(){return Ow=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 ene(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 tne={animated:j.bool,bar:j.bool,barAriaLabelledBy:j.string,barAriaValueText:j.string,barClassName:j.string,barStyle:j.object,children:j.node,className:j.string,cssModule:j.object,color:j.string,max:j.oneOfType([j.string,j.number]),min:j.oneOfType([j.string,j.number]),multi:j.bool,striped:j.bool,style:j.object,tag:rt,value:j.oneOfType([j.string,j.number])};function I4(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,s=o===void 0?0:o,a=e.min,l=a===void 0?0:a,c=e.max,f=c===void 0?100:c,d=e.animated,p=e.striped,g=e.color,v=e.bar,y=e.multi,x=e.tag,b=x===void 0?"div":x,w=e.style,S=w===void 0?{}:w,C=e.barStyle,T=C===void 0?{}:C,k=e.barAriaValueText,D=e.barAriaLabelledBy,R=Jte(e,Qte),z=VP(s)/VP(f)*100,N=He(Ee(n,"progress"),i),H=He(Ee("progress-bar",v&&n||r,d?"progress-bar-animated":null,g?"bg-".concat(g):null,p||d?"progress-bar-striped":null),i),W={className:H,style:d_(d_(d_({},v?S:{}),T),{},{width:"".concat(z,"%")}),role:"progressbar","aria-valuenow":s,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":k,"aria-labelledby":D,children:t};return v?Y.createElement(b,Gg({},R,W)):Y.createElement(b,Gg({},R,{style:S,className:N}),y?t:Y.createElement("div",W))}I4.propTypes=tne;function Cw(e){"@babel/helpers - typeof";return Cw=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},Cw(e)}function nne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wM(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 Kg(e){return Kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kg(e)}var cne={children:j.node.isRequired,node:j.any},F4=function(e){ine(n,e);var t=one(n);function n(){return nne(this,n),t.apply(this,arguments)}return rne(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return FS?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Ua.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(Y.Component);F4.propTypes=cne;const une=F4;function Tw(e){"@babel/helpers - typeof";return Tw=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},Tw(e)}function xM(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 Fl(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 Zg(e){return Zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zg(e)}function Qg(){}var OM=j.shape(mr.propTypes),$4={autoFocus:j.bool,backdrop:j.oneOfType([j.bool,j.oneOf(["static"])]),backdropClassName:j.string,backdropTransition:OM,centered:j.bool,children:j.node,contentClassName:j.string,className:j.string,container:Bc,cssModule:j.object,external:j.node,fade:j.bool,fullscreen:j.oneOfType([j.bool,j.oneOf(["sm","md","lg","xl"])]),innerRef:j.oneOfType([j.object,j.string,j.func]),isOpen:j.bool,keyboard:j.bool,labelledBy:j.string,modalClassName:j.string,modalTransition:OM,onClosed:j.func,onEnter:j.func,onExit:j.func,onOpened:j.func,returnFocusAfterClose:j.bool,role:j.string,scrollable:j.bool,size:j.string,toggle:j.func,trapFocus:j.bool,unmountOnClose:j.bool,wrapClassName:j.string,zIndex:j.oneOfType([j.number,j.string])},vne=Object.keys($4),yne={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Qg,onClosed:Qg,modalTransition:{timeout:Dg.Modal},backdropTransition:{mountOnEnter:!0,timeout:Dg.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},vh=function(e){hne(n,e);var t=pne(n);function n(r){var i;return fne(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(ni(i)),i.handleBackdropClick=i.handleBackdropClick.bind(ni(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(ni(i)),i.handleEscape=i.handleEscape.bind(ni(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(ni(i)),i.handleTab=i.handleTab.bind(ni(i)),i.onOpened=i.onOpened.bind(ni(i)),i.onClosed=i.onClosed.bind(ni(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(ni(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(ni(i)),i.trapFocus=i.trapFocus.bind(ni(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return dne(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,s=i.autoFocus,a=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),s&&this.setFocus()),a&&a(),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=Id(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=hQ(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),pQ(),n.openCount===0&&(document.body.className=Ee(document.body.className,He("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=He("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),e4(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,s=ra(this.props,vne),a="modal-dialog";return Y.createElement("div",Hf({},s,{className:He(Ee(a,this.props.className,(i={},Yl(i,"modal-".concat(this.props.size),this.props.size),Yl(i,"".concat(a,"-centered"),this.props.centered),Yl(i,"".concat(a,"-scrollable"),this.props.scrollable),Yl(i,"modal-fullscreen",this.props.fullscreen===!0),Yl(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),Y.createElement("div",{className:He(Ee("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 s=this.props,a=s.wrapClassName,l=s.modalClassName,c=s.backdropClassName,f=s.cssModule,d=s.isOpen,p=s.backdrop,g=s.role,v=s.labelledBy,y=s.external,x=s.innerRef,b={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":v,"aria-modal":!0,role:g,tabIndex:"-1"},w=this.props.fade,S=Fl(Fl(Fl({},mr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),C=Fl(Fl(Fl({},mr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),T=p&&(w?Y.createElement(mr,Hf({},C,{in:d&&!!p,cssModule:f,className:He(Ee("modal-backdrop",c),f)})):Y.createElement("div",{className:He(Ee("modal-backdrop","show",c),f)}));return Y.createElement(une,{node:this._element},Y.createElement("div",{className:He(a)},Y.createElement(mr,Hf({},b,S,{in:d,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:He(Ee("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:x}),y,this.renderModalDialog()),T))}return null}}]),n}(Y.Component);vh.propTypes=$4;vh.defaultProps=yne;vh.openCount=0;vh.originalBodyOverflow=null;const Ko=vh;var _ne=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function Pw(){return Pw=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 wne(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 xne={children:j.node,className:j.string,close:j.object,closeAriaLabel:j.string,cssModule:j.object,tag:rt,toggle:j.func,wrapTag:rt};function Zo(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,s=e.tag,a=s===void 0?"h5":s,l=e.wrapTag,c=l===void 0?"div":l,f=e.closeAriaLabel,d=f===void 0?"Close":f,p=e.close,g=bne(e,_ne),v=He(Ee(n,"modal-header"),r);return!p&&o&&(t=Y.createElement("button",{type:"button",onClick:o,className:He("btn-close",r),"aria-label":d})),Y.createElement(c,Pw({},g,{className:v}),Y.createElement(a,{className:He("modal-title",r)},i),p||t)}Zo.propTypes=xne;var Sne=["className","cssModule","tag"];function Mw(){return Mw=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 Cne(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 Ene={className:j.string,cssModule:j.object,tag:rt};function uo(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=One(e,Sne),s=He(Ee(t,"modal-body"),n);return Y.createElement(i,Mw({},o,{className:s}))}uo.propTypes=Ene;var Tne=["className","cssModule","tag"];function jw(){return jw=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 Pne(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 Mne={className:j.string,cssModule:j.object,tag:rt};function pl(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=kne(e,Tne),s=He(Ee(t,"modal-footer"),n);return Y.createElement(i,jw({},o,{className:s}))}pl.propTypes=Mne;function Dw(){return Dw=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 Rne(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 Nne={className:j.string,cssModule:j.object,flush:j.bool,horizontal:j.oneOfType([j.bool,j.string]),numbered:j.bool,tag:rt},Ane=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function B4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,s=e.horizontal,a=s===void 0?!1:s,l=e.numbered,c=l===void 0?!1:l,f=Lne(e,Dne),d=He(Ee(t,"list-group",o?"list-group-flush":Ane(a),{"list-group-numbered":c}),n);return Y.createElement(i,Lw({},f,{className:d}))}B4.propTypes=Nne;var Ine=["className","cssModule","row","disabled","check","inline","floating","tag","switch"];function Rw(){return Rw=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 $ne(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 Bne={children:j.node,row:j.bool,check:j.bool,switch:j.bool,inline:j.bool,floating:j.bool,disabled:j.bool,tag:rt,className:j.string,cssModule:j.object};function Ir(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,s=e.inline,a=e.floating,l=e.tag,c=l===void 0?"div":l,f=e.switch,d=Fne(e,Ine),p=o||f,g=He(Ee(t,r?"row":!1,p?"form-check":"mb-3",f?"form-switch":!1,p&&s?"form-check-inline":!1,p&&i?"disabled":!1,a&&"form-floating"),n);return c==="fieldset"&&(d.disabled=i),Y.createElement(c,Rw({},d,{className:g}))}Ir.propTypes=Bne;function Nw(e){"@babel/helpers - typeof";return Nw=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},Nw(e)}var Une=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Aw(){return Aw=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 Vne(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 Hne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CM(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 Zne={children:j.node,type:j.string,size:j.oneOfType([j.number,j.string]),bsSize:j.string,valid:j.bool,invalid:j.bool,tag:rt,innerRef:j.oneOfType([j.object,j.func,j.string]),plaintext:j.bool,addon:j.bool,className:j.string,cssModule:j.object},U4=function(e){Yne(n,e);var t=qne(n);function n(r){var i;return Hne(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(Fw(i)),i.focus=i.focus.bind(Fw(i)),i}return Wne(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,s=i.cssModule,a=i.type,l=a===void 0?"text":a,c=i.bsSize,f=i.valid,d=i.invalid,p=i.tag,g=i.addon,v=i.plaintext,y=i.innerRef,x=zne(i,Une),b=["switch","radio","checkbox"].indexOf(l)>-1,w=/\D/g,S=l==="textarea",C=l==="select",T=l==="range",k=p||(C||S?l:"input"),D="form-control";v?(D="".concat(D,"-plaintext"),k=p||"input"):T?D="form-range":C?D="form-select":b&&(g?D=null:D="form-check-input"),x.size&&w.test(x.size)&&(Rb(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var R=He(Ee(o,d&&"is-invalid",f&&"is-valid",c?C?"form-select-".concat(c):"form-control-".concat(c):!1,D),s);return(k==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(v||l==="select"||typeof k!="string"||k==="select")&&(Rb('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),Y.createElement(k,Aw({},x,{ref:y,className:R,"aria-invalid":d}))}}]),n}(Y.Component);U4.propTypes=Zne;const Gc=U4;var Qne=["className","cssModule","tag","type","size"];function Jg(){return Jg=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 Jne(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 ere={className:j.string,cssModule:j.object,size:j.string,tag:rt,type:j.string};function Ty(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,s=Xne(e,Qne),a=He(Ee(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?Y.createElement(mh,Jg({},s,{className:a})):Y.createElement(E4.Provider,{value:{insideInputGroup:!0}},Y.createElement(i,Jg({},s,{className:a})))}Ty.propTypes=ere;var tre=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function $w(){return $w=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 ire(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 ore={children:j.node,className:j.string,listClassName:j.string,cssModule:j.object,size:j.string,tag:rt,listTag:rt,"aria-label":j.string};function eO(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,s=o===void 0?"nav":o,a=e.listTag,l=a===void 0?"ul":a,c=e["aria-label"],f=c===void 0?"pagination":c,d=rre(e,tre),p=He(Ee(t),r),g=He(Ee(n,"pagination",nre({},"pagination-".concat(i),!!i)),r);return Y.createElement(s,{className:p,"aria-label":f},Y.createElement(l,$w({},d,{className:g})))}eO.propTypes=ore;var sre=["active","className","cssModule","disabled","tag"];function Bw(){return Bw=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}var cre={active:j.bool,children:j.node,className:j.string,cssModule:j.object,disabled:j.bool,tag:rt};function Va(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,s=o===void 0?"li":o,a=are(e,sre),l=He(Ee(n,"page-item",{active:t,disabled:i}),r);return Y.createElement(s,Bw({},a,{className:l}))}Va.propTypes=cre;var ure=["className","cssModule","next","previous","first","last","tag"];function Uw(){return Uw=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 dre(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={"aria-label":j.string,children:j.node,className:j.string,cssModule:j.object,next:j.bool,previous:j.bool,first:j.bool,last:j.bool,tag:rt};function Ha(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,s=e.last,a=e.tag,l=a===void 0?"a":a,c=fre(e,ure),f=He(Ee(t,"page-link"),n),d;i?d="Previous":r?d="Next":o?d="First":s&&(d="Last");var p=e["aria-label"]||d,g;i?g="‹":r?g="›":o?g="«":s&&(g="»");var v=e.children;return v&&Array.isArray(v)&&v.length===0&&(v=null),!c.href&&l==="a"&&(l="button"),(i||r||o||s)&&(v=[Y.createElement("span",{"aria-hidden":"true",key:"caret"},v||g),Y.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),Y.createElement(l,Uw({},c,{className:f,"aria-label":p}),v)}Ha.propTypes=hre;var pre=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function zw(){return zw=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 yre={children:j.node,className:j.string,closeClassName:j.string,closeAriaLabel:j.string,color:j.string,cssModule:j.object,fade:j.bool,innerRef:j.oneOfType([j.object,j.string,j.func]),isOpen:j.bool,tag:rt,toggle:j.func,transition:j.shape(mr.propTypes)};function z4(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,s=e.tag,a=s===void 0?"div":s,l=e.color,c=l===void 0?"success":l,f=e.isOpen,d=f===void 0?!0:f,p=e.toggle,g=e.children,v=e.transition,y=v===void 0?Ju(Ju({},mr.defaultProps),{},{unmountOnExit:!0}):v,x=e.fade,b=x===void 0?!0:x,w=e.innerRef,S=gre(e,pre),C=He(Ee(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),T=He(Ee("btn-close",n),o),k=Ju(Ju(Ju({},mr.defaultProps),y),{},{baseClass:b?y.baseClass:"",timeout:b?y.timeout:0});return Y.createElement(mr,zw({},S,k,{tag:a,className:C,in:d,role:"alert",innerRef:w}),p?Y.createElement("button",{type:"button",className:T,"aria-label":i,onClick:p}):null,g)}z4.propTypes=yre;var _re=["className","cssModule","tag","active","disabled","action","color"];function Vw(){return Vw=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 wre(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 xre={action:j.bool,active:j.bool,className:j.string,cssModule:j.object,color:j.string,disabled:j.bool,tag:rt},Sre=function(t){t.preventDefault()};function V4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,s=e.disabled,a=e.action,l=e.color,c=bre(e,_re),f=He(Ee(t,o?"active":!1,s?"disabled":!1,a?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return s&&(c.onClick=Sre),Y.createElement(i,Vw({},c,{className:f}))}V4.propTypes=xre;function Hw(e){"@babel/helpers - typeof";return Hw=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},Hw(e)}function TM(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 Ore(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 ev(e){return ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ev(e)}var Dre=["defaultOpen"],_h=function(e){kre(n,e);var t=Pre(n);function n(r){var i;return Ere(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(H4(i)),i}return Tre(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(s){return{isOpen:!s.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return Y.createElement(mh,Ww({isOpen:this.state.isOpen,toggle:this.toggle},ra(this.props,Dre)))}}]),n}(V.Component);_h.propTypes=Ore({defaultOpen:j.bool,onToggle:j.func},mh.propTypes);function qw(e){"@babel/helpers - typeof";return qw=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},qw(e)}function PM(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 Lre(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 tv(e){return tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tv(e)}var Ure=["defaultOpen"],Mr=function(e){Ire(n,e);var t=Fre(n);function n(r){var i;return Nre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(W4(i)),i}return Are(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return Y.createElement(yh,Gw({isOpen:this.state.isOpen,toggle:this.toggle},ra(this.props,Ure)))}}]),n}(V.Component);Mr.propTypes=Lre({defaultOpen:j.bool},yh.propTypes);function Y4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zre(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 q4={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;i({error:"border-danger",default:""})[e],Wre=e=>({error:"text-danger",default:"text-muted"})[e],jo=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=ui({"col-md-12":i,"col-md-10 offset-md-1":!i});return m.jsx(pr,{className:ui("g-0",e),children:m.jsx("div",{className:o,children:m.jsx(Wr,{className:Hre(r),body:!0,children:m.jsxs("h3",{className:ui("text-center mb-0",Wre(r)),children:[n&&m.jsx(Ie,{icon:pA,spin:!0}),n&&m.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},hn=({title:e,children:t,bodyClassName:n,...r})=>m.jsxs(Wr,{...r,children:[e&&m.jsx(qc,{role:"heading",children:e}),m.jsx(Yc,{className:n,children:t})]}),Ur=({children:e,type:t,className:n,small:r=!1})=>m.jsx(pr,{className:n,children:m.jsx("div",{className:ui({"col-md-10 offset-md-1":!r,"col-12":r}),children:m.jsx(hn,{role:"document",className:ui("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:ui({"p-2":r}),children:e})})});let Hp;const Yre=new Uint8Array(16);function qre(){if(!Hp&&(Hp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Hp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Hp(Yre)}const zn=[];for(let e=0;e<256;++e)zn.push((e+256).toString(16).slice(1));function Gre(e,t=0){return(zn[e[t+0]]+zn[e[t+1]]+zn[e[t+2]]+zn[e[t+3]]+"-"+zn[e[t+4]]+zn[e[t+5]]+"-"+zn[e[t+6]]+zn[e[t+7]]+"-"+zn[e[t+8]]+zn[e[t+9]]+"-"+zn[e[t+10]]+zn[e[t+11]]+zn[e[t+12]]+zn[e[t+13]]+zn[e[t+14]]+zn[e[t+15]]).toLowerCase()}const Kre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jM={randomUUID:Kre};function Zre(e,t,n){if(jM.randomUUID&&!t&&!e)return jM.randomUUID();e=e||{};const r=e.random||(e.rng||qre)();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 Gre(r)}const mn=(e=!1)=>{const[t,n]=V.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},ky=()=>{const{current:e}=V.useRef(`dom-${Zre()}`);return e},ml=()=>V.useRef(null),G4=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const s=ky(),a=f=>t==null?void 0:t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return m.jsxs("span",{className:ui("form-check",l,n),style:c,children:[m.jsx("input",{type:"checkbox",className:"form-check-input",id:s,checked:e,onChange:a}),m.jsx("label",{className:"form-check-label",htmlFor:s,children:r})]})},K4=e=>m.jsx(G4,{type:"checkbox",...e}),Kc=e=>m.jsx(G4,{type:"switch",...e}),vu=({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]}),Nm=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:a})=>{const l=ky();return m.jsx(vu,{label:m.jsxs(m.Fragment,{children:[e,":"]}),className:s??"",labelClassName:a,id:l,children:m.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},Qre=500;let Wp;const bh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=V.useState(i),a=()=>{Wp&&clearTimeout(Wp),Wp=null},l=(c,f=Qre)=>{s(c),a(),Wp=setTimeout(()=>{e(c),a()},f)};return m.jsxs("div",{className:ui("search-field",t),children:[m.jsx("input",{type:"text",className:ui("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),m.jsx(Ie,{icon:tK,className:"search-field__icon"}),m.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})},Qo=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:s=!1,minWidth:a,inline:l,size:c})=>{const[f,d]=mn(),p=ui("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),g={minWidth:a&&`${a}px`};return m.jsxs(mh,{isOpen:f,toggle:d,disabled:t,className:i,children:[m.jsx(gh,{size:c,caret:!o,className:p,color:"primary",children:e}),m.jsx(mu,{className:"w-100",end:s,style:g,children:r})]})},Py=({children:e,minWidth:t})=>m.jsx(Qo,{text:m.jsx(Ie,{className:"px-1",icon:YG}),size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),Wf=({children:e,...t})=>m.jsx(u4,{className:"nav-pills__nav-link",tag:$N,...t,children:e}),Z4=({children:e,fill:t=!1,className:n=""})=>m.jsx(Wr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:m.jsx($S,{pills:!0,fill:t,children:V.Children.map(e,r=>{if(!V.isValidElement(r)||r.type!==Wf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),My=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",Q4=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?o:s}),X4=e=>e.dir?`${e.field}-${e.dir}`:void 0,Xre=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function wh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const s=a=>()=>{const l=My(a,t.field,t.dir);n(l?a:void 0,l)};return m.jsxs(_h,{children:[m.jsxs(gh,{caret:!0,color:r?"primary":"link",className:ui({"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(mu,{end:i,className:ui("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([a,l])=>m.jsxs(Ue,{active:t.field===a,onClick:s(a),children:[l,t.field===a&&m.jsx(Ie,{icon:t.dir==="ASC"?ZG:AG,className:"ordering-dropdown__sort-icon"})]},a)),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:m.jsx("i",{children:"Clear selection"})})]})]})}const tO="#4696e5",Jre="rgba(70, 150, 229, 0.4)",J4="#f77f28",eie="rgba(247, 127, 40, 0.4)",tie="white",nie="#161b22",e6=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},rie=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"};var iie=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},DM=typeof Symbol<"u"&&Symbol,oie=iie,sie=function(){return typeof DM!="function"||typeof Symbol!="function"||typeof DM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oie()},LM={foo:{}},aie=Object,lie=function(){return{__proto__:LM}.foo===LM.foo&&!({__proto__:null}instanceof aie)},cie="Function.prototype.bind called on incompatible ",h_=Array.prototype.slice,uie=Object.prototype.toString,fie="[object Function]",die=function(e){var t=this;if(typeof t!="function"||uie.call(t)!==fie)throw new TypeError(cie+t);for(var n=h_.call(arguments,1),r,i=function(){if(this instanceof r){var c=t.apply(this,n.concat(h_.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(h_.call(arguments)))},o=Math.max(0,t.length-n.length),s=[],a=0;a"u"||!Tn?ot:Tn(Uint8Array),Ya={"%AggregateError%":typeof AggregateError>"u"?ot:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ot:ArrayBuffer,"%ArrayIteratorPrototype%":$l&&Tn?Tn([][Symbol.iterator]()):ot,"%AsyncFromSyncIteratorPrototype%":ot,"%AsyncFunction%":ql,"%AsyncGenerator%":ql,"%AsyncGeneratorFunction%":ql,"%AsyncIteratorPrototype%":ql,"%Atomics%":typeof Atomics>"u"?ot:Atomics,"%BigInt%":typeof BigInt>"u"?ot:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ot:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ot:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ot:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ot:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ot:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ot:FinalizationRegistry,"%Function%":t6,"%GeneratorFunction%":ql,"%Int8Array%":typeof Int8Array>"u"?ot:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ot:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ot:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$l&&Tn?Tn(Tn([][Symbol.iterator]())):ot,"%JSON%":typeof JSON=="object"?JSON:ot,"%Map%":typeof Map>"u"?ot:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$l||!Tn?ot:Tn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ot:Promise,"%Proxy%":typeof Proxy>"u"?ot:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ot:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ot:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$l||!Tn?ot:Tn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ot:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$l&&Tn?Tn(""[Symbol.iterator]()):ot,"%Symbol%":$l?Symbol:ot,"%SyntaxError%":Zc,"%ThrowTypeError%":gie,"%TypedArray%":yie,"%TypeError%":Sc,"%Uint8Array%":typeof Uint8Array>"u"?ot:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ot:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ot:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ot:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ot:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ot:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ot:WeakSet};if(Tn)try{null.error}catch(e){var _ie=Tn(Tn(e));Ya["%Error.prototype%"]=_ie}var bie=function e(t){var n;if(t==="%AsyncFunction%")n=p_("async function () {}");else if(t==="%GeneratorFunction%")n=p_("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=p_("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Tn&&(n=Tn(i.prototype))}return Ya[t]=n,n},RM={"%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"]},xh=nO,nv=mie,wie=xh.call(Function.call,Array.prototype.concat),xie=xh.call(Function.apply,Array.prototype.splice),NM=xh.call(Function.call,String.prototype.replace),rv=xh.call(Function.call,String.prototype.slice),Sie=xh.call(Function.call,RegExp.prototype.exec),Oie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cie=/\\(\\)?/g,Eie=function(e){var t=rv(e,0,1),n=rv(e,-1);if(t==="%"&&n!=="%")throw new Zc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Zc("invalid intrinsic syntax, expected opening `%`");var r=[];return NM(e,Oie,function(i,o,s,a){r[r.length]=s?NM(a,Cie,"$1"):o||i}),r},Tie=function(e,t){var n=e,r;if(nv(RM,n)&&(r=RM[n],n="%"+r[0]+"%"),nv(Ya,n)){var i=Ya[n];if(i===ql&&(i=bie(n)),typeof i>"u"&&!t)throw new Sc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new Zc("intrinsic "+e+" does not exist!")},rO=function(e,t){if(typeof e!="string"||e.length===0)throw new Sc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Sc('"allowMissing" argument must be a boolean');if(Sie(/^%?[^%]*%?$/,e)===null)throw new Zc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Eie(e),r=n.length>0?n[0]:"",i=Tie("%"+r+"%",t),o=i.name,s=i.value,a=!1,l=i.alias;l&&(r=l[0],xie(n,wie([0,1],l)));for(var c=1,f=!0;c=n.length){var v=Wa(s,d);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[d]}else f=nv(s,d),s=s[d];f&&!a&&(Ya[o]=s)}}return s},n6={exports:{}};(function(e){var t=nO,n=rO,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(f){var d=o(t,i,arguments);if(s&&a){var p=s(d,"length");p.configurable&&a(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(n6);var kie=n6.exports,r6=rO,i6=kie,Pie=i6(r6("String.prototype.indexOf")),Mie=function(e,t){var n=r6(e,!!t);return typeof n=="function"&&Pie(e,".prototype.")>-1?i6(n):n};const jie={},Die=Object.freeze(Object.defineProperty({__proto__:null,default:jie},Symbol.toStringTag,{value:"Module"})),Lie=zre(Die);var iO=typeof Map=="function"&&Map.prototype,g_=Object.getOwnPropertyDescriptor&&iO?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,iv=iO&&g_&&typeof g_.get=="function"?g_.get:null,AM=iO&&Map.prototype.forEach,oO=typeof Set=="function"&&Set.prototype,v_=Object.getOwnPropertyDescriptor&&oO?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ov=oO&&v_&&typeof v_.get=="function"?v_.get:null,IM=oO&&Set.prototype.forEach,Rie=typeof WeakMap=="function"&&WeakMap.prototype,Yf=Rie?WeakMap.prototype.has:null,Nie=typeof WeakSet=="function"&&WeakSet.prototype,qf=Nie?WeakSet.prototype.has:null,Aie=typeof WeakRef=="function"&&WeakRef.prototype,FM=Aie?WeakRef.prototype.deref:null,Iie=Boolean.prototype.valueOf,Fie=Object.prototype.toString,$ie=Function.prototype.toString,Bie=String.prototype.match,sO=String.prototype.slice,Cs=String.prototype.replace,Uie=String.prototype.toUpperCase,$M=String.prototype.toLowerCase,o6=RegExp.prototype.test,BM=Array.prototype.concat,Ki=Array.prototype.join,zie=Array.prototype.slice,UM=Math.floor,Zw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,y_=Object.getOwnPropertySymbols,Qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",or=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Qc||"symbol")?Symbol.toStringTag:null,s6=Object.prototype.propertyIsEnumerable,zM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function VM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||o6.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-UM(-e):UM(e);if(r!==e){var i=String(r),o=sO.call(t,i.length+1);return Cs.call(i,n,"$&_")+"."+Cs.call(Cs.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Cs.call(t,n,"$&_")}var Xw=Lie,HM=Xw.custom,WM=l6(HM)?HM:null,Vie=function e(t,n,r,i){var o=n||{};if(fs(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fs(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 s=fs(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fs(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(fs(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=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 u6(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?VM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?VM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return Jw(t)?"[Array]":"[Object]";var d=aoe(o,r);if(typeof i>"u")i=[];else if(c6(i,t)>=0)return"[Circular]";function p(ne,q,J){if(q&&(i=zie.call(i),i.push(q)),J){var oe={depth:o.depth};return fs(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),e(ne,oe,r+1,i)}return e(ne,o,r+1,i)}if(typeof t=="function"&&!YM(t)){var g=Xie(t),v=Yp(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Ki.call(v,", ")+" }":"")}if(l6(t)){var y=Qc?Cs.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Qw.call(t);return typeof t=="object"&&!Qc?ef(y):y}if(ioe(t)){for(var x="<"+$M.call(String(t.nodeName)),b=t.attributes||[],w=0;w",x}if(Jw(t)){if(t.length===0)return"[]";var S=Yp(t,p);return d&&!soe(S)?"["+ex(S,d)+"]":"[ "+Ki.call(S,", ")+" ]"}if(Yie(t)){var C=Yp(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!s6.call(t,"cause")?"{ ["+String(t)+"] "+Ki.call(BM.call("[cause]: "+p(t.cause),C),", ")+" }":C.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ki.call(C,", ")+" }"}if(typeof t=="object"&&s){if(WM&&typeof t[WM]=="function"&&Xw)return Xw(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Jie(t)){var T=[];return AM&&AM.call(t,function(ne,q){T.push(p(q,t,!0)+" => "+p(ne,t))}),qM("Map",iv.call(t),T,d)}if(noe(t)){var k=[];return IM&&IM.call(t,function(ne){k.push(p(ne,t))}),qM("Set",ov.call(t),k,d)}if(eoe(t))return __("WeakMap");if(roe(t))return __("WeakSet");if(toe(t))return __("WeakRef");if(Gie(t))return ef(p(Number(t)));if(Zie(t))return ef(p(Zw.call(t)));if(Kie(t))return ef(Iie.call(t));if(qie(t))return ef(p(String(t)));if(!Wie(t)&&!YM(t)){var D=Yp(t,p),R=zM?zM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",N=!R&&or&&Object(t)===t&&or in t?sO.call(oa(t),8,-1):z?"Object":"",H=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=H+(N||z?"["+Ki.call(BM.call([],N||[],z||[]),": ")+"] ":"");return D.length===0?W+"{}":d?W+"{"+ex(D,d)+"}":W+"{ "+Ki.call(D,", ")+" }"}return String(t)};function a6(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Hie(e){return Cs.call(String(e),/"/g,""")}function Jw(e){return oa(e)==="[object Array]"&&(!or||!(typeof e=="object"&&or in e))}function Wie(e){return oa(e)==="[object Date]"&&(!or||!(typeof e=="object"&&or in e))}function YM(e){return oa(e)==="[object RegExp]"&&(!or||!(typeof e=="object"&&or in e))}function Yie(e){return oa(e)==="[object Error]"&&(!or||!(typeof e=="object"&&or in e))}function qie(e){return oa(e)==="[object String]"&&(!or||!(typeof e=="object"&&or in e))}function Gie(e){return oa(e)==="[object Number]"&&(!or||!(typeof e=="object"&&or in e))}function Kie(e){return oa(e)==="[object Boolean]"&&(!or||!(typeof e=="object"&&or in e))}function l6(e){if(Qc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Qw)return!1;try{return Qw.call(e),!0}catch{}return!1}function Zie(e){if(!e||typeof e!="object"||!Zw)return!1;try{return Zw.call(e),!0}catch{}return!1}var Qie=Object.prototype.hasOwnProperty||function(e){return e in this};function fs(e,t){return Qie.call(e,t)}function oa(e){return Fie.call(e)}function Xie(e){if(e.name)return e.name;var t=Bie.call($ie.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function c6(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 u6(sO.call(e,0,t.maxStringLength),t)+r}var i=Cs.call(Cs.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ooe);return a6(i,"single",t)}function ooe(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":"")+Uie.call(t.toString(16))}function ef(e){return"Object("+e+")"}function __(e){return e+" { ? }"}function qM(e,t,n,r){var i=r?ex(n,r):Ki.call(n,", ");return e+" ("+t+") {"+i+"}"}function soe(e){for(var t=0;t=0)return!1;return!0}function aoe(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Ki.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Ki.call(Array(t+1),n)}}function ex(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Ki.call(e,","+n)+` `+t.prev}function Yp(e,t){var n=Jw(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var t=e.pop(),n=t.obj[t.prop];if(Pa(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===xoe.RFC1738&&(l===40||l===41)){s+=o.charAt(a);continue}if(l<128){s=s+Hi[l];continue}if(l<2048){s=s+(Hi[192|l>>6]+Hi[128|l&63]);continue}if(l<55296||l>=57344){s=s+(Hi[224|l>>12]+Hi[128|l>>6&63]+Hi[128|l&63]);continue}a+=1,l=65536+((l&1023)<<10|o.charCodeAt(a)&1023),s+=Hi[240|l>>18]+Hi[128|l>>12&63]+Hi[128|l>>6&63]+Hi[128|l&63]}return s},koe=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(S=0)}if(typeof l=="function"?b=l(n,b):b instanceof Date?b=d(b):r==="comma"&&So(b)&&(b=Am.maybeMap(b,function(oe){return oe instanceof Date?d(oe):oe})),b===null){if(o)return a&&!v?a(n,Qn.encoder,y,"key",p):n;b=""}if(Aoe(b)||Am.isBuffer(b)){if(a){var k=v?n:a(n,Qn.encoder,y,"key",p);return[g(k)+"="+g(a(b,Qn.encoder,y,"value",p))]}return[g(n)+"="+g(String(b))]}var D=[];if(typeof b>"u")return D;var R;if(r==="comma"&&So(b))v&&a&&(b=Am.maybeMap(b,a)),R=[{value:b.length>0?b.join(",")||null:void 0}];else if(So(l))R=l;else{var z=Object.keys(b);R=c?z.sort(c):z}for(var N=i&&So(b)&&b.length===1?n+"[]":n,H=0;H"u"?Qn.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Qn.charsetSentinel,delimiter:typeof e.delimiter>"u"?Qn.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Qn.encode,encoder:typeof e.encoder=="function"?e.encoder:Qn.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Qn.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Qn.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Qn.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Qn.strictNullHandling}},$oe=function(e,t){var n=e,r=Foe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):So(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in GM?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=GM[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=h6(),d=0;d0?v+g:""},Xc=d6,tx=Object.prototype.hasOwnProperty,Boe=Array.isArray,En={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Xc.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Uoe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},m6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},zoe="utf8=%26%2310003%3B",Voe="utf8=%E2%9C%93",Hoe=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),s=-1,a,l=t.charset;if(t.charsetSentinel)for(a=0;a-1&&(g=Boe(g)?[g]:g),tx.call(n,p)?n[p]=Xc.combine(n[p],g):n[p]=g}return n},Woe=function(e,t,n,r){for(var i=r?t:m6(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!n.parseArrays&&l===""?s={0:i}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):l!=="__proto__"&&(s[l]=i)}i=s}return i},Yoe=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,a=n.depth>0&&o.exec(i),l=a?i.slice(0,a.index):i,c=[];if(l){if(!n.plainObjects&&tx.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var f=0;n.depth>0&&(a=s.exec(i))!==null&&f"u"?En.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?En.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:En.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:En.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:En.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:En.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:En.comma,decoder:typeof e.decoder=="function"?e.decoder:En.decoder,delimiter:typeof e.delimiter=="string"||Xc.isRegExp(e.delimiter)?e.delimiter:En.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:En.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:En.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:En.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:En.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:En.strictNullHandling}},Goe=function(e,t){var n=qoe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Hoe(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;sg6.parse(e,{ignoreQueryPrefix:!0}),Sh=e=>g6.stringify(e,{arrayFormat:"brackets"});var jy=(e=>(e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.INVALID_SHORT_URL_DELETION="INVALID_SHORT_URL_DELETION",e.DOMAIN_NOT_FOUND="DOMAIN_NOT_FOUND",e.FORBIDDEN_OPERATION="FORBIDDEN_OPERATION",e.INVALID_URL="INVALID_URL",e.INVALID_SLUG="INVALID_SLUG",e.INVALID_SHORTCODE="INVALID_SHORTCODE",e.TAG_CONFLICT="TAG_CONFLICT",e.TAG_NOT_FOUND="TAG_NOT_FOUND",e.MERCURE_NOT_CONFIGURED="MERCURE_NOT_CONFIGURED",e.INVALID_AUTHORIZATION="INVALID_AUTHORIZATION",e.INVALID_API_KEY="INVALID_API_KEY",e.NOT_FOUND="NOT_FOUND",e))(jy||{}),Dy=(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_URL="https://shlink.io/api/error/invalid-url",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))(Dy||{});const Joe=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},ese=(e,t)=>`${e}/rest/v${t}`,tse=ch(Yo),nse=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:X4(e)}),rse=e=>e===null||!(typeof e=="object"&&"type"in e&&"status"in e)?!1:(e.type===jy.NOT_FOUND||e.type===Dy.NOT_FOUND)&&e.status===404;class ise{constructor(t,n,r){me(this,"apiVersion");me(this,"listShortUrls",async(t={})=>this.performRequest({url:"/short-urls",query:nse(t)}).then(({shortUrls:n})=>n));me(this,"createShortUrl",async t=>{const n=ch(r=>Gn(r)||Yo(r),t);return this.performRequest({url:"/short-urls",method:"POST",body:n})});me(this,"getShortUrlVisits",async(t,n)=>this.performRequest({url:`/short-urls/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getTagVisits",async(t,n)=>this.performRequest({url:`/tags/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getDomainVisits",async(t,n)=>this.performRequest({url:`/domains/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getOrphanVisits",async t=>this.performRequest({url:"/visits/orphan",query:t}).then(({visits:n})=>n));me(this,"getNonOrphanVisits",async t=>this.performRequest({url:"/visits/non-orphan",query:t}).then(({visits:n})=>n));me(this,"getVisitsOverview",async()=>this.performRequest({url:"/visits"}).then(({visits:t})=>t));me(this,"getShortUrl",async(t,n)=>this.performRequest({url:`/short-urls/${t}`,query:{domain:n}}));me(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}}));me(this,"updateShortUrl",async(t,n,r)=>this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r}));me(this,"listTags",async()=>this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));me(this,"tagsStats",async()=>this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));me(this,"deleteTags",async t=>this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t})));me(this,"editTag",async(t,n)=>this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n})));me(this,"health",async t=>this.performRequest({url:"/health",domain:t}));me(this,"mercureInfo",async()=>this.performRequest({url:"/mercure-info"}));me(this,"listDomains",async()=>this.performRequest({url:"/domains"}).then(({domains:t})=>t));me(this,"editDomainRedirects",async t=>this.performRequest({url:"/domains/redirects",method:"PATCH",body:t}));me(this,"performRequest",async t=>this.httpClient.fetchJson(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t)))));me(this,"performEmptyRequest",async t=>this.httpClient.fetchEmpty(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t)))));me(this,"toFetchParams",({url:t,method:n="GET",query:r={},body:i,domain:o})=>{const s=Sh(tse(r)),a=Gn(s)?"":`?${s}`,l=o?Joe(this.baseUrl,o):this.baseUrl;return[`${ese(l,this.apiVersion)}${t}${a}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});me(this,"handleFetchError",t=>n=>{if(!rse(n))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const S_={},ose=e=>typeof e=="function",sse=e=>{const{selectedServer:t}=e();if(!dA(t))throw new Error("There's no selected server or it is not found");return t},ase=e=>t=>{const{url:n,apiKey:r}=ose(t)?sse(t):t,i=`${n}_${r}`;return S_[i]||(S_[i]=new ise(e,n,r)),S_[i]},lse=e=>{e.serviceFactory("buildShlinkApiClient",ase,"HttpClient")};const cse=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=mn(),o=()=>{i(),n()};return m.jsxs(z4,{className:"app-update-banner",isOpen:e,toggle:t,tag:hn,color:"secondary",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(yt,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&m.jsxs(m.Fragment,{children:["Restart now ",m.jsx(Ie,{icon:sK,className:"ms-1"})]}),r&&m.jsx(m.Fragment,{children:"Restarting..."})]})]})]})},v6=({to:e="/",children:t="Home"})=>m.jsx("div",{className:"home",children:m.jsxs(hn,{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(Ft,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),use=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"})})};const fse=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:d,resetAppUpdate:p})=>{const v=gn().pathname==="/";return V.useEffect(()=>{var y;Object.keys(c).length===0&&l(),e6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),m.jsxs("div",{className:"container-fluid app-container",children:[m.jsx(e,{}),m.jsxs("div",{className:"app",children:[m.jsx("div",{className:Ee("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:m.jsxs(my,{children:[m.jsx(vt,{index:!0,element:m.jsx(t,{})}),m.jsx(vt,{path:"/settings/*",element:m.jsx(o,{})}),m.jsx(vt,{path:"/manage-servers",element:m.jsx(s,{})}),m.jsx(vt,{path:"/server/create",element:m.jsx(r,{})}),m.jsx(vt,{path:"/server/:serverId/edit",element:m.jsx(i,{})}),m.jsx(vt,{path:"/server/:serverId/*",element:m.jsx(n,{})}),m.jsx(vt,{path:"*",element:m.jsx(v6,{})})]})}),m.jsx("div",{className:"shlink-footer",children:m.jsx(a,{})})]}),m.jsx(cse,{isOpen:d,toggle:p,forceUpdate:use})]})};function Ti(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:uO(e)?2:fO(e)?3:0}function Oc(e,t){return _u(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function dse(e,t){return _u(e)===2?e.get(t):e[t]}function y6(e,t,n){var r=_u(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function _6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function uO(e){return yse&&e instanceof Map}function fO(e){return _se&&e instanceof Set}function Ta(e){return e.o||e.t}function dO(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=w6(e);delete t[$t];for(var n=Cc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=hse),Object.freeze(e),t&&il(e,function(n,r){return hO(r,!0)},!0)),e}function hse(){Ti(2)}function pO(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function oo(e){var t=ox[e];return t||Ti(18,e),t}function pse(e,t){ox[e]||(ox[e]=t)}function nx(){return Vd}function O_(e,t){t&&(oo("Patches"),e.u=[],e.s=[],e.v=t)}function sv(e){rx(e),e.p.forEach(mse),e.p=null}function rx(e){e===Vd&&(Vd=e.l)}function ZM(e){return Vd={p:[],l:Vd,h:e,m:!0,_:0}}function mse(e){var t=e[$t];t.i===0||t.i===1?t.j():t.g=!0}function C_(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||oo("ES5").S(t,e,r),r?(n[$t].P&&(sv(t),Ti(4)),Bo(e)&&(e=av(t,e),t.l||lv(t,e)),t.u&&oo("Patches").M(n[$t].t,e,t.u,t.s)):e=av(t,n,[]),sv(t),t.u&&t.v(t.u,t.s),e!==b6?e:void 0}function av(e,t,n){if(pO(t))return t;var r=t[$t];if(!r)return il(t,function(a,l){return QM(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return lv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=dO(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),il(o,function(a,l){return QM(e,r,i,a,l,n,s)}),lv(e,i,!1),n&&e.u&&oo("Patches").N(r,n,e.u,e.s)}return r.o}function QM(e,t,n,r,i,o,s){if(Gs(i)){var a=av(e,i,o&&t&&t.i!==3&&!Oc(t.R,r)?o.concat(r):void 0);if(y6(n,r,a),!Gs(a))return;e.m=!1}else s&&n.add(i);if(Bo(i)&&!pO(i)){if(!e.h.D&&e._<1)return;av(e,i),t&&t.A.l||lv(e,i)}}function lv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&hO(t,n)}function E_(e,t){var n=e[$t];return(n?Ta(n):e)[t]}function XM(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ms(e){e.P||(e.P=!0,e.l&&ms(e.l))}function T_(e){e.o||(e.o=dO(e.t))}function ix(e,t,n){var r=uO(t)?oo("MapSet").F(t,n):fO(t)?oo("MapSet").T(t,n):e.O?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:nx(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Hd;s&&(l=[a],c=bf);var f=Proxy.revocable(l,c),d=f.revoke,p=f.proxy;return a.k=p,a.j=d,p}(t,n):oo("ES5").J(t,n);return(n?n.A:nx()).p.push(r),r}function gse(e){return Gs(e)||Ti(22,e),function t(n){if(!Bo(n))return n;var r,i=n[$t],o=_u(n);if(i){if(!i.P&&(i.i<4||!oo("ES5").K(i)))return i.t;i.I=!0,r=JM(n,o),i.I=!1}else r=JM(n,o);return il(r,function(s,a){i&&dse(i.t,s)===a||y6(r,s,t(a))}),o===3?new Set(r):r}(e)}function JM(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dO(e)}function vse(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[$t];return Hd.get(l,o)},set:function(l){var c=this[$t];Hd.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][$t];if(!a.P)switch(a.i){case 5:r(a)&&ms(a);break;case 4:n(a)&&ms(a)}}}function n(o){for(var s=o.t,a=o.k,l=Cc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==$t){var d=s[f];if(d===void 0&&!Oc(s,f))return!0;var p=a[f],g=p&&p[$t];if(g?g.t!==d:!_6(p,d))return!0}}var v=!!s[$t];return l.length!==Cc(s).length+(v?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?b-1:0),S=1;S1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=oo("Patches").$;return Gs(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Yr=new wse,x6=Yr.produce;Yr.produceWithPatches.bind(Yr);Yr.setAutoFreeze.bind(Yr);Yr.setUseProxies.bind(Yr);Yr.applyPatches.bind(Yr);Yr.createDraft.bind(Yr);Yr.finishDraft.bind(Yr);function qr(e){"@babel/helpers - typeof";return qr=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},qr(e)}function xse(e,t){if(qr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S6(e){var t=xse(e,"string");return qr(t)==="symbol"?t:String(t)}function Re(e,t,n){return t=S6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r3(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 i3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xn(1));return n(O6)(e,t)}if(typeof e!="function")throw new Error(Xn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Xn(3));return o}function d(y){if(typeof y!="function")throw new Error(Xn(4));if(l)throw new Error(Xn(5));var x=!0;return c(),a.push(y),function(){if(x){if(l)throw new Error(Xn(6));x=!1,c();var w=a.indexOf(y);a.splice(w,1),s=null}}}function p(y){if(!Sse(y))throw new Error(Xn(7));if(typeof y.type>"u")throw new Error(Xn(8));if(l)throw new Error(Xn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=s=a,b=0;b"u")throw new Error(Xn(12));if(typeof n(void 0,{type:cv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Xn(13))})}function gO(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Xn(14));d[g]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?d:l}}function uv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Xse,resetAppUpdate:Jse}=Zse,eae=Qse,tae=(e,t)=>{e.serviceFactory("App",fse,"MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Xse),e.serviceFactory("resetAppUpdate",()=>Jse)};const nae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=mn(),{domains:a}=n,l=Gn(t),c=()=>r("");return V.useEffect(()=>{e()},[]),i?m.jsxs(Ty,{children:[m.jsx(Gc,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),m.jsx(yt,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Mt(c,s),children:m.jsx(Ie,{icon:VG})}),m.jsx(Mr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):m.jsxs(Qo,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:d})=>m.jsxs(Ue,{active:(t===f||d)&&l,onClick:()=>r(f),children:[f,d&&m.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{onClick:Mt(c,o),children:m.jsx("i",{children:"New domain"})})]})},rae=e=>(e==null?void 0:e.type)===jy.INVALID_ARGUMENT||(e==null?void 0:e.type)===Dy.INVALID_ARGUMENT,iae=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===jy.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===Dy.INVALID_SHORT_URL_DELETION,oae=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),Xo=e=>oae(e)?e:void 0,Uo=({errorData:e,fallbackMessage:t})=>m.jsxs(m.Fragment,{children:[(e==null?void 0:e.detail)??t,rae(e)&&m.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),sae=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,f3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(sae);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},d3=e=>e==="*"||e==="x"||e==="X",h3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},aae=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],lae=(e,t)=>{if(d3(e)||d3(t))return 0;const[n,r]=aae(h3(e),h3(t));return n>r?1:n{for(let n=0;n{const n=f3(e),r=f3(t),i=n.pop(),o=r.pop(),s=p3(n,r);return s!==0?s:i&&o?p3(i.split("."),o.split(".")):i||o?i?-1:1:0},ax=(e,t,n)=>{uae(n);const r=cae(e,t);return j6[n].includes(r)},j6={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},m3=Object.keys(j6),uae=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(m3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${m3.join("|")}`)},fae=(e,{maxVersion:t,minVersion:n})=>{const r=!n||ax(e,n,">=");return(!t||ax(e,t,"<="))&&r},D6={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(D6);const Kp=(e,t)=>fae(t,{minVersion:D6[e]}),L6=e=>({domainVisits:Kp("domainVisits",e),excludeBotsOnShortUrls:Kp("excludeBotsOnShortUrls",e),filterDisabledUrls:Kp("filterDisabledUrls",e),deviceLongUrls:Kp("deviceLongUrls",e)}),dae=e=>V.useMemo(()=>L6(e),[e]),R6=V.createContext(L6("0.0.0")),hae=R6.Provider,Oh=e=>V.useContext(R6)[e],N6=V.createContext(""),pae=N6.Provider,vl=()=>V.useContext(N6),Kf=(e,t,n)=>Yo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,mae=(e,t)=>!e.domain&&t===uI?!0:e.domain===t,gae=(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}},A6="__",vae=e=>e.replaceAll("/",A6),Im=e=>e.replaceAll(A6,"/");function Ye(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Te(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function ke(e){Te(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||qr(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function yl(e,t){Te(2,arguments);var n=ke(e),r=Ye(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function gi(e,t){Te(2,arguments);var n=ke(e),r=Ye(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function yae(e,t){if(Te(2,arguments),!t||qr(t)!=="object")return new Date(NaN);var n=t.years?Ye(t.years):0,r=t.months?Ye(t.months):0,i=t.weeks?Ye(t.weeks):0,o=t.days?Ye(t.days):0,s=t.hours?Ye(t.hours):0,a=t.minutes?Ye(t.minutes):0,l=t.seconds?Ye(t.seconds):0,c=ke(e),f=r||n?gi(c,r+n*12):c,d=o||i?yl(f,o+i*7):f,p=a+s*60,g=l+p*60,v=g*1e3,y=new Date(d.getTime()+v);return y}function yO(e,t){Te(2,arguments);var n=ke(e).getTime(),r=Ye(t);return new Date(n+r)}var _ae=36e5;function bae(e,t){Te(2,arguments);var n=Ye(t);return yO(e,n*_ae)}var wae={};function Jo(){return wae}function I6(e,t){var n,r,i,o,s,a,l,c;Te(1,arguments);var f=Jo(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=ke(e),g=p.getDay(),v=(g=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Sae(e){Te(1,arguments);var t=xae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Wd(n);return r}function eu(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function zr(e){Te(1,arguments);var t=ke(e);return t.setHours(0,0,0,0),t}var Oae=864e5;function Yd(e,t){Te(2,arguments);var n=zr(e),r=zr(t),i=n.getTime()-eu(n),o=r.getTime()-eu(r);return Math.round((i-o)/Oae)}var Cae=6e4;function lx(e,t){Te(2,arguments);var n=Ye(t);return yO(e,n*Cae)}function F6(e,t){Te(2,arguments);var n=Ye(t),r=n*3;return gi(e,r)}function _O(e,t){Te(2,arguments);var n=Ye(t),r=n*7;return yl(e,r)}function tu(e,t){Te(2,arguments);var n=Ye(t);return gi(e,n*12)}function g3(e){Te(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(qr(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=ke(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function Fm(e,t){Te(2,arguments);var n=ke(e),r=ke(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var bO=6e4,Ly=36e5,Eae=1e3;function Tae(e,t){Te(2,arguments);var n=zr(e),r=zr(t);return n.getTime()===r.getTime()}function wO(e){return Te(1,arguments),e instanceof Date||qr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fv(e){if(Te(1,arguments),!wO(e)&&typeof e!="number")return!1;var t=ke(e);return!isNaN(Number(t))}function qd(e,t){Te(2,arguments);var n=ke(e),r=ke(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function fc(e){Te(1,arguments);var t=ke(e),n=Math.floor(t.getMonth()/3)+1;return n}function dv(e,t){Te(2,arguments);var n=ke(e),r=ke(t);return n.getFullYear()-r.getFullYear()}function y3(e,t){var 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 xO(e,t){Te(2,arguments);var n=ke(e),r=ke(t),i=y3(n,r),o=Math.abs(Yd(n,r));n.setDate(n.getDate()-i*o);var s=+(y3(n,r)===-i),a=i*(o-s);return a===0?0:a}function $6(e,t){return Te(2,arguments),ke(e).getTime()-ke(t).getTime()}var _3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},kae="trunc";function SO(e){return e?_3[e]:_3[kae]}function Pae(e,t,n){Te(2,arguments);var r=$6(e,t)/Ly;return SO(n==null?void 0:n.roundingMethod)(r)}function ol(e){Te(1,arguments);var t=ke(e);return t.setHours(23,59,59,999),t}function B6(e){Te(1,arguments);var t=ke(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Mae(e){Te(1,arguments);var t=ke(e);return ol(t).getTime()===B6(t).getTime()}function hv(e,t){Te(2,arguments);var n=ke(e),r=ke(t),i=Fm(n,r),o=Math.abs(qd(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=Fm(n,r)===-i;Mae(ke(e))&&o===1&&Fm(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function jae(e,t,n){Te(2,arguments);var r=$6(e,t)/1e3;return SO(n==null?void 0:n.roundingMethod)(r)}function Dae(e,t,n){Te(2,arguments);var r=xO(e,t)/7;return SO(n==null?void 0:n.roundingMethod)(r)}function cx(e){Te(1,arguments);var t=ke(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function U6(e){Te(1,arguments);var t=ke(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Lae(e){Te(1,arguments);var t=ke(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function z6(e){Te(1,arguments);var t=ke(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Rae(e,t){var n,r,i,o,s,a,l,c;Te(1,arguments);var f=Jo(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=ke(e),g=p.getDay(),v=(g=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Fae(e){Te(1,arguments);var t=H6(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=nu(n);return r}var $ae=6048e5;function W6(e){Te(1,arguments);var t=ke(e),n=nu(t).getTime()-Fae(t).getTime();return Math.round(n/$ae)+1}function sl(e,t){var n,r,i,o,s,a,l,c;Te(1,arguments);var f=Jo(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=ke(e),g=p.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(d+1,0,g),v.setUTCHours(0,0,0,0);var y=sl(v,t),x=new Date(0);x.setUTCFullYear(d,0,g),x.setUTCHours(0,0,0,0);var b=sl(x,t);return f.getTime()>=y.getTime()?d+1:f.getTime()>=b.getTime()?d:d-1}function Bae(e,t){var n,r,i,o,s,a,l,c;Te(1,arguments);var f=Jo(),d=Ye((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=OO(e,t),g=new Date(0);g.setUTCFullYear(p,0,d),g.setUTCHours(0,0,0,0);var v=sl(g,t);return v}var Uae=6048e5;function Y6(e,t){Te(1,arguments);var n=ke(e),r=sl(n,t).getTime()-Bae(n,t).getTime();return Math.round(r/Uae)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const os=zae;var Bl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Vae={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return os.y(t,n)},Y:function(t,n,r,i){var o=OO(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return tt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):tt(s,n.length)},R:function(t,n){var r=H6(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return os.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=Y6(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=W6(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):os.d(t,n)},D:function(t,n,r){var i=Iae(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return tt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return tt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Bl.noon:i===0?o=Bl.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Bl.evening:i>=12?o=Bl.afternoon:i>=4?o=Bl.morning:o=Bl.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return os.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):os.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):os.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):os.s(t,n)},S:function(t,n){return os.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return w3(s);case"XXXX":case"XX":return ka(s);case"XXXXX":case"XXX":default:return ka(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return w3(s);case"xxxx":case"xx":return ka(s);case"xxxxx":case"xxx":default:return ka(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+b3(s,":");case"OOOO":default:return"GMT"+ka(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+b3(s,":");case"zzzz":default:return"GMT"+ka(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return tt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return tt(s,n.length)}};function b3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+tt(o,2)}function w3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return ka(e,t)}function ka(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),s=tt(i%60,2);return r+o+n+s}const Hae=Vae;var x3=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},q6=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Wae=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return x3(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",x3(i,n)).replace("{{time}}",q6(o,n))},Yae={p:q6,P:Wae};const ux=Yae;var qae=["D","DD"],Gae=["YY","YYYY"];function G6(e){return qae.indexOf(e)!==-1}function K6(e){return Gae.indexOf(e)!==-1}function pv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Kae={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Zae=function(t,n,r){var i,o=Kae[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const Qae=Zae;function j_(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var Xae={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jae={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ele={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tle={date:j_({formats:Xae,defaultWidth:"full"}),time:j_({formats:Jae,defaultWidth:"full"}),dateTime:j_({formats:ele,defaultWidth:"full"})};const nle=tle;var rle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ile=function(t,n,r,i){return rle[t]};const ole=ile;function tf(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var sle={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ale={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lle={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"]},cle={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"]},ule={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"}},fle={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"}},dle=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},hle={ordinalNumber:dle,era:tf({values:sle,defaultWidth:"wide"}),quarter:tf({values:ale,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:tf({values:lle,defaultWidth:"wide"}),day:tf({values:cle,defaultWidth:"wide"}),dayPeriod:tf({values:ule,defaultWidth:"wide",formattingValues:fle,defaultFormattingWidth:"wide"})};const ple=hle;function nf(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?gle(a,function(d){return d.test(s)}):mle(a,function(d){return d.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function mle(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function gle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var yle=/^(\d+)(th|st|nd|rd)?/i,_le=/\d+/i,ble={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},wle={any:[/^b/i,/^(a|c)/i]},xle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sle={any:[/1/i,/2/i,/3/i,/4/i]},Ole={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},Cle={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]},Ele={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},Tle={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]},kle={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},Ple={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}},Mle={ordinalNumber:vle({matchPattern:yle,parsePattern:_le,valueCallback:function(t){return parseInt(t,10)}}),era:nf({matchPatterns:ble,defaultMatchWidth:"wide",parsePatterns:wle,defaultParseWidth:"any"}),quarter:nf({matchPatterns:xle,defaultMatchWidth:"wide",parsePatterns:Sle,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:nf({matchPatterns:Ole,defaultMatchWidth:"wide",parsePatterns:Cle,defaultParseWidth:"any"}),day:nf({matchPatterns:Ele,defaultMatchWidth:"wide",parsePatterns:Tle,defaultParseWidth:"any"}),dayPeriod:nf({matchPatterns:kle,defaultMatchWidth:"any",parsePatterns:Ple,defaultParseWidth:"any"})};const jle=Mle;var Dle={code:"en-US",formatDistance:Qae,formatLong:nle,formatRelative:ole,localize:ple,match:jle,options:{weekStartsOn:0,firstWeekContainsDate:1}};const CO=Dle;var Lle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rle=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nle=/^'([^]*?)'?$/,Ale=/''/g,Ile=/[a-zA-Z]/;function ru(e,t,n){var r,i,o,s,a,l,c,f,d,p,g,v,y,x,b,w,S,C;Te(2,arguments);var T=String(t),k=Jo(),D=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:CO,R=Ye((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(d=k.locale)===null||d===void 0||(p=d.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=Ye((g=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(b=n.locale)===null||b===void 0||(w=b.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(C=S.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&g!==void 0?g:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!D.localize)throw new RangeError("locale must contain localize property");if(!D.formatLong)throw new RangeError("locale must contain formatLong property");var N=ke(e);if(!fv(N))throw new RangeError("Invalid time value");var H=eu(N),W=V6(N,H),ne={firstWeekContainsDate:R,weekStartsOn:z,locale:D,_originalDate:N},q=T.match(Rle).map(function(J){var oe=J[0];if(oe==="p"||oe==="P"){var le=ux[oe];return le(J,D.formatLong)}return J}).join("").match(Lle).map(function(J){if(J==="''")return"'";var oe=J[0];if(oe==="'")return Fle(J);var le=Hae[oe];if(le)return!(n!=null&&n.useAdditionalWeekYearTokens)&&K6(J)&&pv(J,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&G6(J)&&pv(J,t,String(e)),le(W,J,D.localize,ne);if(oe.match(Ile))throw new RangeError("Format string contains an unescaped latin alphabet character `"+oe+"`");return J}).join("");return q}function Fle(e){var t=e.match(Nle);return t?t[1].replace(Ale,"'"):e}function EO(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function $le(e){return EO({},e)}var S3=1440,Ble=2520,D_=43200,Ule=86400;function zle(e,t,n){var r,i;Te(2,arguments);var o=Jo(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:CO;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=Fm(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=EO($le(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=ke(t),f=ke(e)):(c=ke(e),f=ke(t));var d=jae(f,c),p=(eu(f)-eu(c))/1e3,g=Math.round((d-p)/60),v;if(g<2)return n!=null&&n.includeSeconds?d<5?s.formatDistance("lessThanXSeconds",5,l):d<10?s.formatDistance("lessThanXSeconds",10,l):d<20?s.formatDistance("lessThanXSeconds",20,l):d<40?s.formatDistance("halfAMinute",0,l):d<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):g===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",g,l);if(g<45)return s.formatDistance("xMinutes",g,l);if(g<90)return s.formatDistance("aboutXHours",1,l);if(gr.getTime()}function ai(e,t){Te(2,arguments);var n=ke(e),r=ke(t);return n.getTime()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function ht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zg(e,t)}function gv(e){return gv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gv(e)}function Zle(){if(typeof Reflect>"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 Qle(e,t){if(t&&(qr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $e(e)}function pt(e){var t=Zle();return function(){var r=gv(e),i;if(t){var o=gv(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Qle(this,i)}}function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T3(e,t){for(var n=0;n0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function eI(e){return e%400===0||e%4===0&&e%100!==0}var nce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=J6(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),rce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=OO(i,a);if(s.isTwoDigitYear){var c=J6(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}}]),n}(gt),ice=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),ace=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),lce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),cce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function uce(e,t,n){Te(2,arguments);var r=ke(e),i=Ye(t),o=Y6(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var fce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return sl(uce(i,s,a),a)}}]),n}(gt);function dce(e,t){Te(2,arguments);var n=ke(e),r=Ye(t),i=W6(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var hce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return nu(dce(i,s))}}]),n}(gt),pce=[31,28,31,30,31,30,31,31,30,31,30,31],mce=[31,29,31,30,31,30,31,31,30,31,30,31],gce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=mce[l]:o>=1&&o<=pce[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(gt),vce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function kO(e,t,n){var r,i,o,s,a,l,c,f;Te(2,arguments);var d=Jo(),p=Ye((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(c=d.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=ke(e),v=Ye(t),y=g.getUTCDay(),x=v%7,b=(x+7)%7,w=(b=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=kO(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),_ce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=kO(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),bce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=kO(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function wce(e,t){Te(2,arguments);var n=Ye(t);n%7===0&&(n=n-7);var r=1,i=ke(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a=1&&o<=7}},{key:"set",value:function(i,o,s){return i=wce(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt),Sce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(gt),Tce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(gt),kce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(gt),Pce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(gt),Mce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(gt),jce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(gt),Dce=function(e){ht(n,e);var t=pt(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=Ye((v=(y=(x=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:R.weekStartsOn)!==null&&y!==void 0?y:(C=R.locale)===null||C===void 0||(T=C.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&v!==void 0?v:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(D==="")return k===""?ke(n):new Date(NaN);var W={firstWeekContainsDate:N,weekStartsOn:H,locale:z},ne=[new ece],q=D.match($ce).map(function(E){var M=E[0];if(M in ux){var I=ux[M];return I(E,z.formatLong)}return E}).join("").match(Fce),J=[],oe=E3(q),le;try{var G=function(){var M=le.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&K6(M)&&pv(M,D,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&G6(M)&&pv(M,D,e);var I=M[0],X=Ice[I];if(X){var Q=X.incompatibleTokens;if(Array.isArray(Q)){var ae=J.find(function(De){return Q.includes(De.token)||De.token===I});if(ae)throw new RangeError("The format string mustn't contain `".concat(ae.fullToken,"` and `").concat(M,"` at the same time"))}else if(X.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(M,"` and any other token at the same time"));J.push({token:I,fullToken:M});var ge=X.run(k,M,z.match,W);if(!ge)return{v:new Date(NaN)};ne.push(ge.setter),k=ge.rest}else{if(I.match(Vce))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(M==="''"?M="'":I==="'"&&(M=Hce(M)),k.indexOf(M)===0)k=k.slice(M.length);else return{v:new Date(NaN)}}};for(oe.s();!(le=oe.n()).done;){var F=G();if(qr(F)==="object")return F.v}}catch(E){oe.e(E)}finally{oe.f()}if(k.length>0&&zce.test(k))return new Date(NaN);var A=ne.map(function(E){return E.priority}).sort(function(E,M){return M-E}).filter(function(E,M,I){return I.indexOf(E)===M}).map(function(E){return ne.filter(function(M){return M.priority===E}).sort(function(M,I){return I.subPriority-M.subPriority})}).map(function(E){return E[0]}),B=ke(n);if(isNaN(B.getTime()))return new Date(NaN);var re=V6(B,eu(B)),U={},Z=E3(A),ie;try{for(Z.s();!(ie=Z.n()).done;){var se=ie.value;if(!se.validate(re,W))return new Date(NaN);var pe=se.set(re,U,W);Array.isArray(pe)?(re=pe[0],EO(U,pe[1])):re=pe}}catch(E){Z.e(E)}finally{Z.f()}return re}function Hce(e){return e.match(Bce)[1].replace(Uce,"'")}function Wce(e,t){Te(2,arguments);var n=ke(e),r=ke(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Yce(e,t){Te(2,arguments);var n=cx(e),r=cx(t);return n.getTime()===r.getTime()}function qce(e,t){Te(2,arguments);var n=ke(e),r=ke(t);return n.getFullYear()===r.getFullYear()}function iu(e,t){Te(2,arguments);var n=ke(e).getTime(),r=ke(t.start).getTime(),i=ke(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function PO(e,t){Te(2,arguments);var n=Ye(t);return yl(e,-n)}function zo(e,t){var n;Te(1,arguments);var r=Ye((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=Qce(e),o;if(i.date){var s=Xce(i.date,r);o=Jce(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,c;if(i.time&&(l=eue(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=tue(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(a+l),d=new Date(0);return d.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),d.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),d}return new Date(a+l+c)}var Zp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Gce=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Kce=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Zce=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Qce(e){var t={},n=e.split(Zp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Zp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Zp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Zp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Xce(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var 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 Jce(e,t){if(t===null)return new Date(NaN);var n=e.match(Gce);if(!n)return new Date(NaN);var r=!!n[4],i=rf(n[1]),o=rf(n[2])-1,s=rf(n[3]),a=rf(n[4]),l=rf(n[5])-1;if(r)return sue(t,a,l)?nue(t,a,l):new Date(NaN);var c=new Date(0);return!iue(t,o,s)||!oue(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,s)),c)}function rf(e){return e?parseInt(e):1}function eue(e){var t=e.match(Kce);if(!t)return NaN;var n=N_(t[1]),r=N_(t[2]),i=N_(t[3]);return aue(n,r,i)?n*Ly+r*bO+i*1e3:NaN}function N_(e){return e&&parseFloat(e.replace(",","."))||0}function tue(e){if(e==="Z")return 0;var t=e.match(Zce);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return lue(r,i)?n*(r*Ly+i*bO):NaN}function nue(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var rue=[31,null,31,30,31,30,31,31,30,31,30,31];function tI(e){return e%400===0||e%4===0&&e%100!==0}function iue(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(rue[t]||(tI(e)?29:28))}function oue(e,t){return t>=1&&t<=(tI(e)?366:365)}function sue(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function aue(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function lue(e,t){return t>=0&&t<=59}function dr(e,t){Te(2,arguments);var n=ke(e),r=Ye(t),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=Wle(s);return n.setMonth(r,Math.min(o,a)),n}function cue(e,t){if(Te(2,arguments),qr(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=ke(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=dr(n,t.month)),t.date!=null&&n.setDate(Ye(t.date)),t.hours!=null&&n.setHours(Ye(t.hours)),t.minutes!=null&&n.setMinutes(Ye(t.minutes)),t.seconds!=null&&n.setSeconds(Ye(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(Ye(t.milliseconds)),n)}function Zf(e,t){Te(2,arguments);var n=ke(e),r=Ye(t);return n.setHours(r),n}function Qf(e,t){Te(2,arguments);var n=ke(e),r=Ye(t);return n.setMinutes(r),n}function Ul(e,t){Te(2,arguments);var n=ke(e),r=Ye(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return dr(n,n.getMonth()+o*3)}function uue(e,t){Te(2,arguments);var n=ke(e),r=Ye(t);return n.setSeconds(r),n}function Oo(e,t){Te(2,arguments);var n=ke(e),r=Ye(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function ou(e,t){Te(2,arguments);var n=Ye(t);return gi(e,-n)}function fue(e,t){Te(2,arguments);var n=Ye(t);return F6(e,-n)}function due(e,t){Te(2,arguments);var n=Ye(t);return _O(e,-n)}function Gd(e,t){Te(2,arguments);var n=Ye(t);return tu(e,-n)}const nI="yyyy-MM-dd",MO="yyyy-MM-dd HH:mm",Zs=()=>new Date,jO=e=>typeof e!="string",DO=(e,t)=>!e||!jO(e)?e:t?ru(e,t):Vle(e),Qs=e=>DO(e,void 0),Aa=e=>DO(e,nI),yv=e=>DO(e,MO),Mi=e=>jO(e)?e:zo(e),Ch=(e,t,n)=>{try{return iu(Mi(e),{start:Mi(t??e),end:Mi(n??e)})}catch{return!1}},va=(e,t)=>Z6(e,t)||ai(e,t),Eh="all",rI={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[Eh]:void 0},iI=Object.keys(rI),oI=e=>e===void 0||Gn(iA(Boolean,e)),_v=e=>typeof e=="string"&&iI.includes(e),hue=iI.filter(e=>e!==Eh),k3=e=>e?Mi(e):null,sI=(e,t)=>({startDate:k3(e),endDate:k3(t)}),pue=e=>{if(!(!e||oI(e)))return e.startDate&&!e.endDate?`Since ${Aa(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Aa(e.endDate)}`:`${Aa(e.startDate)} - ${Aa(e.endDate)}`},aI=e=>{if(!(!e||e===Eh))return _v(e)?rI[e]:pue(e)},oi=e=>zr(PO(Zs(),e)),zl=e=>({startDate:e,endDate:ol(Zs())}),ya=e=>t=>e===t,lI=gS([[ya("today"),()=>zl(zr(Zs()))],[ya("yesterday"),()=>({startDate:oi(1),endDate:ol(PO(Zs(),1))})],[ya("last7Days"),()=>zl(oi(7))],[ya("last30Days"),()=>zl(oi(30))],[ya("last90Days"),()=>zl(oi(90))],[ya("last180Days"),()=>zl(oi(180))],[ya("last365Days"),()=>zl(oi(365))],[QN,()=>({})]]),mue=e=>{const t=Mi(e);return gS([[()=>va(zr(Zs()),t),()=>"today"],[()=>va(oi(1),t),()=>"yesterday"],[()=>va(oi(7),t),()=>"last7Days"],[()=>va(oi(30),t),()=>"last30Days"],[()=>va(oi(90),t),()=>"last90Days"],[()=>va(oi(180),t),()=>"last180Days"],[()=>va(oi(365),t),()=>"last365Days"],[QN,()=>Eh]])()},gue=e=>_v(e)?lI(e):e,Pr=(e,t)=>M6(e,t,{serializeError:hS}),Th=jn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),P3=5e3,M3=4,j3=2,vue=({currentPage:e,pagesCount:t})=>e>=t,yue=(e,t)=>t*100/e,kh=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=jn(`${e}/progressChanged`),o=jn(`${e}/large`),s=jn(`${e}/fallbackToInterval`),a=Pr(e,async(l,{getState:c,dispatch:f})=>{var w;const[d,p]=t(l),g=async S=>Promise.all(S.map(async C=>d(C,P3).then(ct("data")))).then(Nq),v=async(S,C=0)=>{if(r(c))return[];const T=await g(S[C]);return f(i(yue(S.length,C+j3))),C{const{pagination:C,data:T}=await d(S,P3);if(!C||vue(C))return T;const k=yS(j3,C.pagesCount+1),D=Md(M3,k);return C.pagesCount-1>M3&&f(o()),T.concat(await v(D))},[x,b]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&b&&f(s(mue(b.date))),{...n(l),visits:x}});return Object.assign(a,{progressChanged:i,large:o,fallbackToInterval:s})},Ph=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),Mh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:a,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:d}=sr({name:e,initialState:n,reducers:{cancelGetVisits:g=>({...g,cancelLoad:!0})},extraReducers:g=>{g.addCase(i,()=>({...n,loading:!0})),g.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:Xo(y)})),g.addCase(s,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),g.addCase(a,v=>({...v,loadingLarge:!0})),g.addCase(l,(v,{payload:y})=>({...v,progress:y})),g.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),g.addCase(Th,(v,{payload:y})=>{const{visits:x}=v,b=r(v,y.createdVisits).map(({visit:w})=>w);return b.length?{...v,visits:[...b,...x]}:v})}}),{cancelGetVisits:p}=d;return{reducer:f,cancelGetVisits:p}},cI="shlink/domainVisits",uI="DEFAULT",_ue={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},bue=e=>kh({typePrefix:`${cI}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1})=>{const{getDomainVisits:i}=e(),o=async(a,l)=>i(t,{...n,page:a,itemsPerPage:l}),s=Ph(r,async a=>i(t,a));return[o,s]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),wue=e=>Mh({name:cI,initialState:_ue,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>s&&mae(s,t)&&Ch(a.date,i,o))}}),$m=({className:e="",placement:t,children:n})=>{const r=ml();return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:e,ref:r,children:m.jsx(Ie,{icon:xS})}),m.jsx(Mr,{target:r,placement:t,children:n})]})},Ry=e=>Mt(t=>t.preventDefault(),e),LO=(e,t,n=1)=>yS(n,e+1).map(t),Ji=e=>!Yo(e)&&!Gn(e),A_=e=>Gn(e)?null:e,fI=e=>e?"true":"false",I_=e=>e===void 0?void 0:fI(e),F_=({isLast:e,...t})=>m.jsx(Nm,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),xue=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var d,p,g;const[i,o]=V.useState(((d=n.redirects)==null?void 0:d.baseUrlRedirect)??""),[s,a]=V.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=V.useState(((g=n.redirects)==null?void 0:g.invalidShortUrlRedirect)??""),f=Ry(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:A_(i),regular404Redirect:A_(s),invalidShortUrlRedirect:A_(l)}}).then(t));return m.jsx(Ko,{isOpen:e,toggle:t,centered:!0,children:m.jsxs("form",{name:"domainRedirectsModal",onSubmit:f,children:[m.jsxs(Zo,{toggle:t,children:["Edit redirects for ",m.jsx("b",{children:n.domain})]}),m.jsxs(uo,{children:[m.jsxs(F_,{value:i,onChange:o,children:[m.jsxs($m,{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(F_,{value:s,onChange:a,children:[m.jsxs($m,{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(F_,{value:l,isLast:!0,onChange:c,children:[m.jsx($m,{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(pl,{children:[m.jsx(yt,{color:"link",type:"button",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"primary",children:"Save"})]})]})})},Sue=({domain:e,editDomainRedirects:t})=>{const[n,r]=mn(),i=Oh("domainVisits"),o=vl();return m.jsxs(Py,{children:[i&&m.jsxs(Ue,{tag:Ft,to:`${o}/domain/${e.domain}${e.isDefault?`_${uI}`:""}/visits`,children:[m.jsx(Ie,{icon:wS,fixedWidth:!0})," Visit stats"]}),m.jsxs(Ue,{onClick:r,children:[m.jsx(Ie,{fixedWidth:!0,icon:bS})," Edit redirects"]}),m.jsx(xue,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},Ri=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Oue=({status:e,matchMedia:t=window.matchMedia})=>{const n=ml(),r=()=>t("(max-width: 991px)").matches,[i,o]=V.useState(r());return V.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e==="validating"?m.jsx(Ie,{fixedWidth:!0,icon:pA,spin:!0}):m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:n,children:e==="valid"?m.jsx(Ie,{fixedWidth:!0,icon:jd,className:"text-muted"}):m.jsx(Ie,{fixedWidth:!0,icon:_b,className:"text-danger"})}),m.jsx(Mr,{target:n,placement:i?"top-start":"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(Ri,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},$_=({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)"})]})]}),Cue=()=>m.jsxs(m.Fragment,{children:[m.jsx(Ie,{fixedWidth:!0,icon:CG,className:"text-primary",id:"defaultDomainIcon"}),m.jsx(Mr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),Eue=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:s,status:a}=e;return V.useEffect(()=>{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(Cue,{})}),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:(s==null?void 0:s.baseUrlRedirect)??m.jsx($_,{fallback:r==null?void 0:r.baseUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(s==null?void 0:s.regular404Redirect)??m.jsx($_,{fallback:r==null?void 0:r.regular404Redirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(s==null?void 0:s.invalidShortUrlRedirect)??m.jsx($_,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:m.jsx(Oue,{status:a})}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(Sue,{domain:e,editDomainRedirects:t})})]})},D3=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],Tue=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var p;const{filteredDomains:o,defaultRedirects:s,loading:a,error:l,errorData:c}=t,f=s??((p=o.find(({isDefault:g})=>g))==null?void 0:p.redirects);if(V.useEffect(()=>{e()},[]),a)return m.jsx(jo,{loading:!0});const d=()=>l?m.jsx(Ur,{type:"error",children:m.jsx(Uo,{errorData:c,fallbackMessage:"Error loading domains :("})}):m.jsx(hn,{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:D3.map((g,v)=>m.jsx("th",{children:g},v))})}),m.jsxs("tbody",{children:[o.length<1&&m.jsx("tr",{children:m.jsx("td",{colSpan:D3.length,className:"text-center",children:"No results found"})}),o.map(g=>m.jsx(Eue,{domain:g,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:f},g.domain))]})]})});return m.jsxs(m.Fragment,{children:[m.jsx(bh,{className:"mb-3",onChange:n}),d()]})},kue="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Pue=e=>Pr(kue,async({domain:t,redirects:n})=>{const i=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:i}}),Qp="shlink/domainsList",Xp={domains:[],filteredDomains:[],loading:!1,error:!1},L3=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},R3=(e,t)=>n=>n.domain!==e?n:{...n,status:t},Mue=(e,t)=>{const n=Pr(`${Qp}/listDomains`,async()=>{const{data:s,defaultRedirects:a}=await e().listDomains();return{domains:s.map(l=>({...l,status:"validating"})),defaultRedirects:a}}),r=Pr(`${Qp}/checkDomainHealth`,async s=>{try{const{status:a}=await e().health(s);return{domain:s,status:a==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=jn(`${Qp}/filterDomains`),{reducer:o}=sr({name:Qp,initialState:Xp,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...Xp,loading:!0})),s.addCase(n.rejected,(a,{error:l})=>({...Xp,error:!0,errorData:Xo(l)})),s.addCase(n.fulfilled,(a,{payload:l})=>({...Xp,...l,filteredDomains:l.domains})),s.addCase(r.fulfilled,({domains:a,filteredDomains:l,...c},{payload:f})=>({...c,domains:a.map(R3(f.domain,f.status)),filteredDomains:l.map(R3(f.domain,f.status))})),s.addCase(i,(a,{payload:l})=>({...a,filteredDomains:a.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),s.addCase(t.fulfilled,(a,{payload:l})=>({...a,domains:a.domains.map(L3(l)),filteredDomains:a.filteredDomains.map(L3(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},jue=(e,t)=>{e.serviceFactory("DomainSelector",()=>nae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>Tue),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",Mue,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",ct("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",ct("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",ct("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",Pue,"apiClientFactory"),e.serviceFactory("checkDomainHealth",ct("checkDomainHealth"),"domainsListReducerCreator")},N3="shlink/mercure",Due={loading:!0,error:!1},Lue=e=>{const t=Pr(`${N3}/loadMercureInfo`,({realTimeUpdates:r})=>{if(r&&!r.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=sr({name:N3,initialState:Due,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}},Rue=e=>{e.serviceFactory("mercureInfoReducerCreator",Lue,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",ct("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",ct("loadMercureInfo"),"mercureInfoReducerCreator")};var fx={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,s=n.XDomainRequest,a=n.ActiveXObject,l=n.EventSource,c=n.document,f=n.Promise,d=n.fetch,p=n.Response,g=n.TextDecoder,v=n.TextEncoder,y=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(ue){c.readyState="complete"},!1)),o==null&&a!=null&&(o=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ue){function ve(){}return ve.prototype=ue,new ve}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var x=d;d=function(ue,ve){var _e=ve.signal;return x(ue,{headers:ve.headers,credentials:ve.credentials,cache:ve.cache}).then(function(Ce){var Le=Ce.body.getReader();return _e._reader=Le,_e._aborted&&_e._reader.cancel(),{status:Ce.status,statusText:Ce.statusText,headers:Ce.headers,body:{getReader:function(){return Le}}}})},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(ue){function ve(be,ye,Se){if(Se===1)return be>=128>>ye&&be<=2048>>ye&&be<=57344>>ye&&be<=65536>>ye&&be<>6>15?3:ye>31?2:1;if(be===6*2)return ye>15?3:2;if(be===6*3)return 3;throw new Error}for(var Ce=65533,Le="",Me=this.bitsNeeded,je=this.codePoint,ce=0;ce191||!ve(je<<6|de&63,Me-6,_e(Me,je)))&&(Me=0,je=Ce,Le+=String.fromCharCode(je)),Me===0?(de>=0&&de<=127?(Me=0,je=de):de>=192&&de<=223?(Me=6*1,je=de&31):de>=224&&de<=239?(Me=6*2,je=de&15):de>=240&&de<=247?(Me=6*3,je=de&7):(Me=0,je=Ce),Me!==0&&!ve(je,Me,_e(Me,je))&&(Me=0,je=Ce)):(Me-=6,je=je<<6|de&63),Me===0&&(je<=65535?Le+=String.fromCharCode(je):(Le+=String.fromCharCode(55296+(je-65535-1>>10)),Le+=String.fromCharCode(56320+(je-65535-1&1023))))}return this.bitsNeeded=Me,this.codePoint=je,Le};var w=function(){try{return new g().decode(new v().encode("test"),{stream:!0})==="test"}catch(ue){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ue)}return!1};(g==null||v==null||!w())&&(g=b);var S=function(){};function C(ue){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=ue,this._sendTimeout=0,this._abort=S}C.prototype.open=function(ue,ve){this._abort(!0);var _e=this,Ce=this._xhr,Le=1,Me=0;this._abort=function(Se){_e._sendTimeout!==0&&(i(_e._sendTimeout),_e._sendTimeout=0),(Le===1||Le===2||Le===3)&&(Le=4,Ce.onload=S,Ce.onerror=S,Ce.onabort=S,Ce.onprogress=S,Ce.onreadystatechange=S,Ce.abort(),Me!==0&&(i(Me),Me=0),Se||(_e.readyState=4,_e.onabort(null),_e.onreadystatechange())),Le=0};var je=function(){if(Le===1){var Se=0,Pe="",Ne=void 0;if("contentType"in Ce)Se=200,Pe="OK",Ne=Ce.contentType;else try{Se=Ce.status,Pe=Ce.statusText,Ne=Ce.getResponseHeader("Content-Type")}catch{Se=0,Pe="",Ne=void 0}Se!==0&&(Le=2,_e.readyState=2,_e.status=Se,_e.statusText=Pe,_e._contentType=Ne,_e.onreadystatechange())}},ce=function(){if(je(),Le===2||Le===3){Le=3;var Se="";try{Se=Ce.responseText}catch{}_e.readyState=3,_e.responseText=Se,_e.onprogress()}},de=function(Se,Pe){if((Pe==null||Pe.preventDefault==null)&&(Pe={preventDefault:S}),ce(),Le===1||Le===2||Le===3){if(Le=4,Me!==0&&(i(Me),Me=0),_e.readyState=4,Se==="load")_e.onload(Pe);else if(Se==="error")_e.onerror(Pe);else if(Se==="abort")_e.onabort(Pe);else throw new TypeError;_e.onreadystatechange()}},be=function(Se){Ce!=null&&(Ce.readyState===4?(!("onload"in Ce)||!("onerror"in Ce)||!("onabort"in Ce))&&de(Ce.responseText===""?"error":"load",Se):Ce.readyState===3?"onprogress"in Ce||ce():Ce.readyState===2&&je())},ye=function(){Me=r(function(){ye()},500),Ce.readyState===3&&ce()};"onload"in Ce&&(Ce.onload=function(Se){de("load",Se)}),"onerror"in Ce&&(Ce.onerror=function(Se){de("error",Se)}),"onabort"in Ce&&(Ce.onabort=function(Se){de("abort",Se)}),"onprogress"in Ce&&(Ce.onprogress=ce),"onreadystatechange"in Ce&&(Ce.onreadystatechange=function(Se){be(Se)}),("contentType"in Ce||!("ontimeout"in o.prototype))&&(ve+=(ve.indexOf("?")===-1?"?":"&")+"padding=true"),Ce.open(ue,ve,!0),"readyState"in Ce&&(Me=r(function(){ye()},0))},C.prototype.abort=function(){this._abort(!1)},C.prototype.getResponseHeader=function(ue){return this._contentType},C.prototype.setRequestHeader=function(ue,ve){var _e=this._xhr;"setRequestHeader"in _e&&_e.setRequestHeader(ue,ve)},C.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},C.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var ue=this;ue._sendTimeout=r(function(){ue._sendTimeout=0,ue.send()},4);return}var ve=this._xhr;"withCredentials"in ve&&(ve.withCredentials=this.withCredentials);try{ve.send(void 0)}catch(_e){throw _e}};function T(ue){return ue.replace(/[A-Z]/g,function(ve){return String.fromCharCode(ve.charCodeAt(0)+32)})}function k(ue){for(var ve=Object.create(null),_e=ue.split(`\r `),Ce=0;Ce<_e.length;Ce+=1){var Le=_e[Ce],Me=Le.split(": "),je=Me.shift(),ce=Me.join(": ");ve[T(je)]=ce}this._map=ve}k.prototype.get=function(ue){return this._map[T(ue)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function D(){}D.prototype.open=function(ue,ve,_e,Ce,Le,Me,je){ue.open("GET",Le);var ce=0;ue.onprogress=function(){var be=ue.responseText,ye=be.slice(ce);ce+=ye.length,_e(ye)},ue.onerror=function(be){be.preventDefault(),Ce(new Error("NetworkError"))},ue.onload=function(){Ce(null)},ue.onabort=function(){Ce(null)},ue.onreadystatechange=function(){if(ue.readyState===o.HEADERS_RECEIVED){var be=ue.status,ye=ue.statusText,Se=ue.getResponseHeader("Content-Type"),Pe=ue.getAllResponseHeaders();ve(be,ye,Se,new k(Pe))}},ue.withCredentials=Me;for(var de in je)Object.prototype.hasOwnProperty.call(je,de)&&ue.setRequestHeader(de,je[de]);return ue.send(),ue};function R(ue){this._headers=ue}R.prototype.get=function(ue){return this._headers.get(ue)};function z(){}z.prototype.open=function(ue,ve,_e,Ce,Le,Me,je){var ce=null,de=new y,be=de.signal,ye=new g;return d(Le,{headers:je,credentials:Me?"include":"same-origin",signal:be,cache:"no-store"}).then(function(Se){return ce=Se.body.getReader(),ve(Se.status,Se.statusText,Se.headers.get("Content-Type"),new R(Se.headers)),new f(function(Pe,Ne){var Qe=function(){ce.read().then(function(et){if(et.done)Pe(void 0);else{var qe=ye.decode(et.value,{stream:!0});_e(qe),Qe()}}).catch(function(et){Ne(et)})};Qe()})}).catch(function(Se){if(Se.name!=="AbortError")return Se}).then(function(Se){Ce(Se)}),{abort:function(){ce!=null&&ce.cancel(),de.abort()}}};function N(){this._listeners=Object.create(null)}function H(ue){r(function(){throw ue},0)}N.prototype.dispatchEvent=function(ue){ue.target=this;var ve=this._listeners[ue.type];if(ve!=null)for(var _e=ve.length,Ce=0;Ce<_e;Ce+=1){var Le=ve[Ce];try{typeof Le.handleEvent=="function"?Le.handleEvent(ue):Le.call(this,ue)}catch(Me){H(Me)}}},N.prototype.addEventListener=function(ue,ve){ue=String(ue);var _e=this._listeners,Ce=_e[ue];Ce==null&&(Ce=[],_e[ue]=Ce);for(var Le=!1,Me=0;Me"u"?typeof window<"u"?window:typeof self<"u"?self:Gl:globalThis)})(fx,fx.exports);var Nue=fx.exports;const Aue=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:s,error:a}=e;if(s||a||!i)return;const l=({data:d})=>n(JSON.parse(d)),c=({status:d})=>d===401&&r(),f=t.map(d=>{const p=new URL(i);p.searchParams.append("topic",d);const g=new Nue.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return g.onmessage=l,g.onerror=c,g});return()=>f.forEach(d=>d.close())};function sa(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:s}=r,{interval:a}=s,l=hl();return V.useEffect(()=>{const c=g=>a?n.add(g):i([g]),f=t(r,l),d=Aue(s,f,c,o);if(!a)return d;const p=setInterval(()=>{i([...n]),n.clear()},a*1e3*60);return Mt(()=>clearInterval(p),()=>d==null?void 0:d())},[s]),m.jsx(e,{...r})}}class fi{}me(fi,"visits","https://shlink.io/new-visit"),me(fi,"orphanVisits","https://shlink.io/new-orphan-visit"),me(fi,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const RO="shlink/shortUrlDeletion",A3={shortCode:"",loading:!1,deleted:!1,error:!1},Iue=e=>Pr(`${RO}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),dI=jn(`${RO}/shortUrlDeleted`),Fue=e=>{const{actions:t,reducer:n}=sr({name:RO,initialState:A3,reducers:{resetDeleteShortUrl:()=>A3},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:s})=>({...o,errorData:Xo(s),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:s})=>({...o,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},hI="shlink/shortUrlsList",pI=5,$ue={loading:!0,error:!1},Bue=e=>Pr(`${hI}/listShortUrls`,t=>e().listShortUrls(t??{})),Uue=(e,t,n)=>sr({name:hI,initialState:$ue,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,Mt((i,{payload:o})=>i.shortUrls?Rl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,pI-1)],i):i,i=>i.shortUrls?Rl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Rl(["shortUrls","data"],i.shortUrls.data.map(s=>{const{shortCode:a,domain:l}=o;return Kf(s,a,l)?o:s}),i):i),r.addCase(dI,Mt((i,{payload:o})=>i.shortUrls?Rl(["shortUrls","data"],ch(s=>Kf(s,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Rl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(Th,(i,{payload:o})=>{var s,a;return Rl(["shortUrls","data"],(a=(s=i.shortUrls)==null?void 0:s.data)==null?void 0:a.map(l=>{var c;return((c=jq(o.createdVisits.filter(({shortUrl:f})=>f&&Kf(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),I3=10,{ceil:zue}=Math,Vue=new Intl.NumberFormat("en-US"),wn=e=>Vue.format(Number(e)),Hue=e=>zue(e/I3)*I3,Wue={field:"dateCreated",dir:"DESC"},mI={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Wue}},gI=V.createContext(mI),Yue=gI.Provider,NO=()=>V.useContext(gI)??mI,_l=e=>NO()[e];var que={prefix:"far",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"]},Gue=que,Kue={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"]},Zue=Kue,Que={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"]},vI={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"]};const Xue=e=>({tag:Ft,to:e}),dx=({children:e,title:t,link:n,tooltip:r})=>{const i=ml();return m.jsxs(m.Fragment,{children:[m.jsxs(Wr,{innerRef:i,className:"highlight-card",body:!0,...Xue(n),children:[m.jsx(Ie,{size:"3x",className:"highlight-card__link-icon",icon:Zue}),m.jsx(L4,{tag:"h5",className:"highlight-card__title",children:t}),m.jsx(D4,{tag:"h2",children:e})]}),r&&m.jsx(Mr,{target:i,placement:"bottom",children:r})]})},F3=({loading:e,excludeBots:t,visitsSummary:n,...r})=>m.jsx(dx,{tooltip:n.bots!==void 0?m.jsxs(m.Fragment,{children:[t?"Plus":"Including"," ",m.jsx("strong",{children:wn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":wn(t&&n.nonBots?n.nonBots:n.total)}),Jue=(e,t)=>sa(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,loadVisitsOverview:s,visitsOverview:a})=>{const{loading:l,shortUrls:c}=n,{loading:f}=o,{loading:d,nonOrphanVisits:p,orphanVisits:g}=a,v=vl(),y=co(),x=_l("visits");return V.useEffect(()=>{r({itemsPerPage:pI,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),s()},[]),m.jsxs(m.Fragment,{children:[m.jsxs(pr,{children:[m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(F3,{title:"Visits",link:`${v}/non-orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:d,visitsSummary:p})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(F3,{title:"Orphan visits",link:`${v}/orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:d,visitsSummary:g})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(dx,{title:"Short URLs",link:`${v}/list-short-urls/1`,children:l?"Loading...":wn((c==null?void 0:c.pagination.totalItems)??0)})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(dx,{title:"Tags",link:`${v}/manage-tags`,children:f?"Loading...":wn(o.tags.length)})})]}),m.jsxs(Wr,{className:"mb-3",children:[m.jsxs(qc,{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(Ft,{className:"float-end",to:`${v}/create-short-url`,children:"Advanced options »"})]}),m.jsx(Yc,{children:m.jsx(t,{basicMode:!0})})]}),m.jsxs(Wr,{children:[m.jsxs(qc,{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(Ft,{className:"float-end",to:`${v}/list-short-urls/1`,children:"See all »"})]}),m.jsx(Yc,{children:m.jsx(e,{shortUrlsList:n,className:"mb-0",onTagClick:b=>y(`${v}/list-short-urls/1?tags=${encodeURIComponent(b)}`)})})]})]})},()=>[fi.visits,fi.orphanVisits]);function efe(e,t){e.serviceFactory("Overview",Jue,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const tfe=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}),nfe=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,basicMode:o=!1})=>{const s=_l("shortUrlCreation"),a=V.useMemo(()=>tfe(s),[s]);return m.jsxs(m.Fragment,{children:[m.jsx(e,{initialState:a,saving:r.saving,mode:o?"create-basic":"create",onSave:async l=>(i(),n(l))}),m.jsx(t,{creation:r,resetCreateShortUrl:i,canBeClosed:o})]})},rfe="Left",ife="Right",ofe="Up",sfe="Down",dc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},hx={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},$3="mousemove",B3="mouseup",afe="touchend",lfe="touchmove",cfe="touchstart";function ufe(e,t,n,r){return e>t?n>0?ife:rfe:r>0?sfe:ofe}function U3(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 ffe(e,t){const n=f=>{const d="touches"in f;d&&f.touches.length>1||e((p,g)=>{g.trackMouse&&!d&&(document.addEventListener($3,r),document.addEventListener(B3,s));const{clientX:v,clientY:y}=d?f.touches[0]:f,x=U3([v,y],g.rotationAngle);return g.onTouchStartOrOnMouseDown&&g.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),hx),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((d,p)=>{const g="touches"in f;if(g&&f.touches.length>1)return d;if(f.timeStamp-d.start>p.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:v,clientY:y}=g?f.touches[0]:f,[x,b]=U3([v,y],p.rotationAngle),w=x-d.xy[0],S=b-d.xy[1],C=Math.abs(w),T=Math.abs(S),k=(f.timeStamp||0)-d.start,D=Math.sqrt(C*C+T*T)/(k||1),R=[w/(k||1),S/(k||1)],z=ufe(C,T,w,S),N=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||dc.delta;if(C{e((d,p)=>{let g;if(d.swiping&&d.eventData){if(f.timeStamp-d.start{document.removeEventListener($3,r),document.removeEventListener(B3,s)},s=f=>{o(),i(f)},a=(f,d)=>{let p=()=>{};if(f&&f.addEventListener){const g=Object.assign(Object.assign({},dc.touchEventOptions),d.touchEventOptions),v=[[cfe,n,g],[lfe,r,Object.assign(Object.assign({},g),d.preventScrollOnSwipe?{passive:!1}:{})],[afe,i,g]];v.forEach(([y,x,b])=>f.addEventListener(y,x,b)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((d,p)=>{if(d.el===f)return d;const g={};return d.el&&d.el!==f&&d.cleanUpTouch&&(d.cleanUpTouch(),g.cleanUpTouch=void 0),p.trackTouch&&f&&(g.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},d),{el:f}),g)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function dfe(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 hfe(e){const{trackMouse:t}=e,n=V.useRef(Object.assign({},hx)),r=V.useRef(Object.assign({},dc)),i=V.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},dc),e);let o;for(o in dc)r.current[o]===void 0&&(r.current[o]=dc[o]);const[s,a]=V.useMemo(()=>ffe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=dfe(n.current,r.current,i.current,a),s}const pfe=2e3,mfe=(e,t)=>(n=!1,r=pfe)=>{const[i,o]=V.useState(n),s=V.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},gfe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return hfe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},vfe=(e,t)=>{const[n,r]=V.useState(t);return[n,o=>{const{location:s,history:a}=window,l=gl(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Sh(l)}`),r(o)}]},yfe=(e,t)=>{const n=V.useRef(!0);V.useEffect(()=>{!n.current&&e(),n.current=!1},t)},bu=()=>{const e=co();return()=>e(-1)},_fe=e=>({shortUrlDetail:t,getShortUrlDetail:n,shortUrlEdition:r,editShortUrl:i})=>{const{search:o}=gn(),s=hl(),a=bu(),{loading:l,error:c,errorData:f,shortUrl:d}=t,{saving:p,saved:g,error:v,errorData:y}=r,{domain:x}=gl(o),b=_l("shortUrlCreation"),w=V.useMemo(()=>gae(d,b),[d,b]);return V.useEffect(()=>{s.shortCode&&n({shortCode:Im(s.shortCode),domain:x})},[]),l?m.jsx(jo,{loading:!0}):c?m.jsx(Ur,{type:"error",children:m.jsx(Uo,{errorData:f,fallbackMessage:"An error occurred while loading short URL detail :("})}):m.jsxs(m.Fragment,{children:[m.jsx("header",{className:"mb-3",children:m.jsx(Wr,{body:!0,children:m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:a,children:m.jsx(Ie,{icon:yA})}),m.jsx("span",{className:"text-center",children:m.jsxs("small",{children:["Edit ",m.jsx(Ri,{href:(d==null?void 0:d.shortUrl)??""})]})}),m.jsx("span",{})]})})}),m.jsx(e,{initialState:w,saving:p,mode:"edit",onSave:async S=>{d&&i({...d,data:S})}}),g&&v&&m.jsx(Ur,{type:"error",className:"mt-3",children:m.jsx(Uo,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),g&&!v&&m.jsx(Ur,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var Ny={},bfe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=z3[t.format]||z3.default;window.clipboardData.setData(d,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=Sfe("message"in t?t.message:xfe),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var Cfe=Ofe;function px(e){"@babel/helpers - typeof";return px=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},px(e)}Object.defineProperty(Ny,"__esModule",{value:!0});Ny.CopyToClipboard=void 0;var Jp=yI(V),Efe=yI(Cfe),Tfe=["text","onCopy","options","children"];function yI(e){return e&&e.__esModule?e:{default:e}}function V3(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 H3(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pfe(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 Mfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W3(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 bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function AO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bI=function(e){Dfe(n,e);var t=Lfe(n);function n(){var r;Mfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:s,saved:a}=t;if(V.useEffect(()=>{n()},[]),s)return m.jsxs(Ur,{type:"error",className:"mt-3",children:[r&&m.jsx(Ie,{icon:_b,className:"float-end pointer",onClick:n}),m.jsx(Uo,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!a)return null;const{shortUrl:l}=t.result;return m.jsxs(Ur,{type:"success",className:"mt-3",children:[r&&m.jsx(Ie,{icon:_b,className:"float-end pointer",onClick:n}),m.jsxs("span",{children:[m.jsx("b",{children:"Great!"})," The short URL is ",m.jsx("b",{children:l})]}),m.jsx(wI,{text:l,onCopy:o,children:m.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[m.jsx(Ie,{icon:vI})," Copy"]})}),m.jsx(yh,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},B_="delete",$fe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:s})=>{const[a,l]=V.useState("");V.useEffect(()=>i,[]);const{loading:c,error:f,deleted:d,errorData:p}=r,g=Mt(i,t),v=Ry(()=>o(e).then(t));return m.jsx(Ko,{isOpen:n,toggle:g,centered:!0,onClosed:()=>d&&s(e),children:m.jsxs("form",{onSubmit:v,children:[m.jsx(Zo,{toggle:g,children:m.jsx("span",{className:"text-danger",children:"Delete short URL"})}),m.jsxs(uo,{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:B_})," to confirm deletion."]}),m.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${B_}`,value:a,onChange:y=>l(y.target.value)}),f&&m.jsx(Ur,{type:iae(p)?"warning":"error",small:!0,className:"mt-2",children:m.jsx(Uo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),m.jsxs(pl,{children:[m.jsx("button",{type:"button",className:"btn btn-link",onClick:g,children:"Cancel"}),m.jsx("button",{type:"submit",className:"btn btn-danger",disabled:a!==B_||c,children:c?"Deleting...":"Delete"})]})]})})},xI=({amount:e=0,loading:t=!1,...n})=>m.jsxs(yt,{...n,outline:!0,color:"primary",disabled:t,children:[m.jsx(Ie,{icon:bG})," ",t?"Exporting...":m.jsxs(m.Fragment,{children:["Export (",wn(e),")"]})]}),Ay=()=>{const e=co(),{search:t}=gn(),n=vl(),r=V.useMemo(Mt(()=>gl(t),({orderBy:o,tags:s,excludeBots:a,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const d=o?Xre(o):void 0,p=(s==null?void 0:s.split(","))??[];return{...f,orderBy:d,tags:p,excludeBots:a!==void 0?a==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]),i=V.useCallback(o=>{const s={...r,...o},{orderBy:a,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:d,...p}=s,g={...p,orderBy:a&&X4(a),tags:l.length>0?l.join(","):void 0,excludeBots:I_(c),excludeMaxVisitsReached:I_(f),excludePastValidUntil:I_(d)},v=Sh(g),y=Gn(v)?"":`?${v}`;e(`${n}/list-short-urls/1${y}`)},[r,e,n]);return[r,i]},Y3=20,Bfe=(e,{exportShortUrls:t})=>({amount:n=0})=>{const[{tags:r,search:i,startDate:o,endDate:s,orderBy:a,tagsMode:l}]=Ay(),[c,,f,d]=mn(),p=V.useCallback(async()=>{const g=n/Y3,v=async(x=1)=>{const{data:b}=await e().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:s,orderBy:a,tagsMode:l,itemsPerPage:Y3});return x>=g?b:b.concat(await v(x+1))};f();const y=await v();t(y.map(x=>{var C;const{hostname:b,pathname:w}=new URL(x.shortUrl),S=w.substring(1);return{createdAt:x.dateCreated,domain:b,shortCode:S,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((C=x==null?void 0:x.visitsSummary)==null?void 0:C.total)??x.visitsCount}})),d()},[]);return m.jsx(xI,{loading:c,className:"btn-md-block",amount:n,onClick:p})};const SI=({text:e,onCopy:t})=>m.jsx(wI,{text:e,onCopy:t,children:m.jsx(Ie,{icon:vI,className:"ms-2 copy-to-clipboard-icon"})}),Ufe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Sh({...n,margin:t>0?t:void 0});return`${r}${Gn(i)?"":`?${i}`}`},zfe=({errorCorrection:e,setErrorCorrection:t})=>m.jsxs(Qo,{text:`Error correction (${e})`,children:[m.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[m.jsx("b",{children:"L"}),"ow"]}),m.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[m.jsx("b",{children:"M"}),"edium"]}),m.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[m.jsx("b",{children:"Q"}),"uartile"]}),m.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[m.jsx("b",{children:"H"}),"igh"]})]}),Vfe=({format:e,setFormat:t})=>m.jsxs(Qo,{text:`Format (${e})`,children:[m.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),m.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const Hfe=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i})=>{const[o,s]=V.useState(300),[a,l]=V.useState(0),[c,f]=V.useState("png"),[d,p]=V.useState("L"),g=V.useMemo(()=>Ufe(t,{size:o,format:c,margin:a,errorCorrection:d}),[t,o,c,a,d]),v=V.useMemo(()=>o+a,[o,a]),y=V.useMemo(()=>{if(!(v<500))return v<800?"lg":"xl"},[v]);return m.jsxs(Ko,{isOpen:i,toggle:r,centered:!0,size:y,children:[m.jsxs(Zo,{toggle:r,children:["QR code for ",m.jsx(Ri,{href:t,children:t})]}),m.jsxs(uo,{children:[m.jsxs(pr,{children:[m.jsxs(Ir,{className:"d-grid col-md-6",children:[m.jsxs("label",{children:["Size: ",o,"px"]}),m.jsx("input",{type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>s(Number(x.target.value))})]}),m.jsxs(Ir,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",a,"px"]}),m.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:a,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),m.jsx(Ir,{className:"d-grid col-md-6",children:m.jsx(Vfe,{format:c,setFormat:f})}),m.jsx(Ir,{className:"col-md-6",children:m.jsx(zfe,{errorCorrection:d,setErrorCorrection:p})})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"mb-3",children:[m.jsx(Ri,{href:g}),m.jsx(SI,{text:g})]}),m.jsx("img",{src:g,className:"qr-code-modal__img",alt:"QR code"}),m.jsx("div",{className:"mt-3",children:m.jsxs(yt,{block:!0,color:"primary",onClick:()=>{e.saveImage(g,`${n}-qr-code.${c}`).catch(()=>{})},children:["Download ",m.jsx(Ie,{icon:_A,className:"ms-1"})]})})]})]})]})},wv=({date:e,format:t=MO,relative:n=!1})=>{const r=jO(e)?e:zo(e);return m.jsx("time",{dateTime:`${Gle(r)}000`,children:n?`${zle(Zs(),r)} ago`:ru(r,t)})},Wfe=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:s}=t,a=(r==null?void 0:r.total)??n;return i&&a>=i?{icon:fK,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":"","."]})}:s&&ai(Mi(s),Zs())?{icon:hP,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be visited since ",m.jsx("b",{className:"indivisible",children:yv(Mi(s))}),"."]})}:o&&ai(Zs(),Mi(o))?{icon:hP,className:"text-warning",description:m.jsxs(m.Fragment,{children:["This short URL will start working on ",m.jsx("b",{className:"indivisible",children:yv(Mi(o))}),"."]})}:{icon:jd,className:"text-primary",description:"This short URL can be visited normally."}},Yfe=({shortUrl:e})=>{const t=ml(),{icon:n,className:r,description:i}=Wfe(e);return m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:m.jsx(Ie,{icon:n,className:r})}),m.jsx(Mr,{target:t,placement:"bottom",children:i})]})},qfe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${vae(t)}/${r}${i}`},vx=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=vl();return!n||!e?m.jsx("span",{...i,children:r}):m.jsx(Ft,{to:qfe(o,e,t),...i,children:r})};const OI=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:s}=(t==null?void 0:t.meta)??{},a=!!i||!!o||!!s,l=m.jsx(vx,{shortUrl:t,suffix:"visits",asLink:r,children:m.jsx("strong",{className:Ee("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:wn(e)})});if(!a)return l;const c=ml();return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"indivisible",children:[l,m.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&m.jsxs(m.Fragment,{children:[" / ",wn(i)]}),m.jsx("sup",{className:"ms-1",children:m.jsx(Ie,{icon:xS})})]})]}),m.jsx(Mr,{target:c,placement:"bottom",children:m.jsxs("ul",{className:"list-unstyled mb-0",children:[i&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",m.jsx("b",{children:wn(i)})," visit",i===1?"":"s","."]}),o&&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:yv(Mi(o))}),"."]}),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:yv(Mi(s))}),"."]})]})})]})};const IO=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:s})=>m.jsxs("span",{className:Ee("badge tag",r,{"tag--light-bg":i.isColorLightForKey(e)}),style:{backgroundColor:i.getColorForKey(e),cursor:n||!o?"auto":"pointer"},onClick:o,children:[t??e,n&&m.jsx("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:s,children:"×"})]}),Gfe=({tags:e,onTagClick:t,colorGenerator:n})=>Gn(e)?m.jsx("i",{className:"indivisible",children:m.jsx("small",{children:"No tags"})}):m.jsx(m.Fragment,{children:e.map(r=>m.jsx(IO,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const Kfe=(e,t,n)=>({shortUrl:r,onTagClick:i})=>{var g,v,y,x;const[o,s]=n(),[a,l]=n(!1,500),c=V.useRef(!0),[{excludeBots:f}]=Ay(),d=_l("visits"),p=f??(d==null?void 0:d.excludeBots);return V.useEffect(()=>{!c.current&&l(),c.current=!1},[(g=r.visitsSummary)==null?void 0:g.total,(v=r.visitsSummary)==null?void 0:v.nonBots,r.visitsCount]),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(wv,{date:r.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(Ri,{href:r.shortUrl})}),m.jsx(SI,{text:r.shortUrl,onCopy:s}),m.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!o,children:"Copied short URL!"})]})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:m.jsx(Ri,{href:r.longUrl,children:r.title??r.longUrl})}),r.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(Ri,{href:r.longUrl})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:m.jsx(Gfe,{tags:r.tags,colorGenerator:t,onTagClick:i})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:m.jsx(OI,{visitsCount:(p?(y=r.visitsSummary)==null?void 0:y.nonBots:(x=r.visitsSummary)==null?void 0:x.total)??r.visitsCount,shortUrl:r,active:a,asLink:!0})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:m.jsx(Yfe,{shortUrl:r})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:m.jsx(e,{shortUrl:r})})]})},Zfe=(e,t)=>({shortUrl:n})=>{const[r,,i,o]=mn(),[s,,a,l]=mn();return m.jsxs(Py,{minWidth:190,children:[m.jsxs(Ue,{tag:vx,shortUrl:n,suffix:"visits",asLink:!0,children:[m.jsx(Ie,{icon:wS,fixedWidth:!0})," Visit stats"]}),m.jsxs(Ue,{tag:vx,shortUrl:n,suffix:"edit",asLink:!0,children:[m.jsx(Ie,{icon:bS,fixedWidth:!0})," Edit short URL"]}),m.jsxs(Ue,{onClick:i,children:[m.jsx(Ie,{icon:cK,fixedWidth:!0})," QR code"]}),m.jsx(t,{shortUrl:n,isOpen:r,toggle:o}),m.jsx(Ue,{divider:!0}),m.jsxs(Ue,{className:"dropdown-item--danger",onClick:a,children:[m.jsx(Ie,{icon:_S,fixedWidth:!0})," Delete short URL"]}),m.jsx(e,{shortUrl:n,isOpen:s,toggle:l})]})},CI="shlink/shortUrlCreation",q3={saving:!1,saved:!1,error:!1},Qfe=e=>Pr(`${CI}/createShortUrl`,t=>e().createShortUrl(t)),Xfe=e=>{const{reducer:t,actions:n}=sr({name:CI,initialState:q3,reducers:{resetCreateShortUrl:()=>q3},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:Xo(s)})),i.addCase(e.fulfilled,(o,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},G3="shlink/shortUrlDetail",K3={loading:!1,error:!1},Jfe=e=>{const t=Pr(`${G3}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:s}=o();return((l=s==null?void 0:s.shortUrls)==null?void 0:l.data.find(c=>Kf(c,r,i)))??await e().getShortUrl(r,i)}),{reducer:n}=sr({name:G3,initialState:K3,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:Xo(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...K3,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},EI="shlink/shortUrlEdition",ede={saving:!1,saved:!1,error:!1},tde=e=>Pr(`${EI}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),nde=e=>sr({name:EI,initialState:ede,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:Xo(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var rde={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"]},ide={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"]};const ode=({icon:e,className:t,...n})=>{const r=ml(),i=Ee("icon-input-container__input",t);return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Gc,{className:i,innerRef:r,...n}),m.jsx(Ie,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})};function sde(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yx(e,t)}function yx(e,t){return yx=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},yx(e,t)}function ade(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 Z3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lde(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function cde(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&lde(e,t,n))return!0;e=e.parentNode||e.host}return e}function ude(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var fde=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function dde(e){return e===void 0&&(e=0),function(){return++e}}var hde=dde(),_x,em={},U_={},pde=["touchstart","touchmove"],mde="ignore-react-onclickoutside";function Q3(e,t){var n={},r=pde.indexOf(t)!==-1;return r&&_x&&(n.passive=!e.props.preventDefault),n}function Iy(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){sde(s,o);function s(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var d=c.getInstance();if(typeof d.props.handleClickOutside=="function"){d.props.handleClickOutside(f);return}if(typeof d.handleClickOutside=="function"){d.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():cu.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||U_[c._uid])){typeof _x>"u"&&(_x=fde()),U_[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),em[c._uid]=function(d){if(c.componentNode!==null&&(c.props.preventDefault&&d.preventDefault(),c.props.stopPropagation&&d.stopPropagation(),!(c.props.excludeScrollbar&&ude(d)))){var p=d.composed&&d.composedPath&&d.composedPath().shift()||d.target;cde(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(d)}},f.forEach(function(d){document.addEventListener(d,em[c._uid],Q3(Z3(c),d))})}},c.disableOnClickOutside=function(){delete U_[c._uid];var f=em[c._uid];if(f&&typeof document<"u"){var d=c.props.eventTypes;d.forEach||(d=[d]),d.forEach(function(p){return document.removeEventListener(p,f,Q3(Z3(c),p))}),delete em[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=hde(),c}var a=s.prototype;return a.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},a.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},a.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},a.componentWillUnmount=function(){this.disableOnClickOutside()},a.render=function(){var c=this.props;c.excludeScrollbar;var f=ade(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,V.createElement(e,f)},s}(V.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:mde,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}function X3(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 J3(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}}();return function(){var n,r=xv(e);if(t){var i=xv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,s){if(s&&(typeof s=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ee(o)}(this,n)}}function xx(e){return function(t){if(Array.isArray(t))return z_(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return z_(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return z_(t,n)}}(e)||function(){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 z_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,s=t.includeDates,a=t.includeDateIntervals,l=t.filterDate;return $y(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return hr(e,c)})||o&&o.some(function(c){var f=c.start,d=c.end;return iu(e,{start:f,end:d})})||s&&!s.some(function(c){return hr(e,c)})||a&&!a.some(function(c){var f=c.start,d=c.end;return iu(e,{start:f,end:d})})||l&&!l(Ct(e))||!1}function BO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,s=i.end;return iu(e,{start:o,end:s})}):n&&n.some(function(i){return hr(e,i)})||!1}function PI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return $y(e,{minDate:U6(n),maxDate:B6(r)})||i&&i.some(function(a){return Ei(e,a)})||o&&!o.some(function(a){return Ei(e,a)})||s&&!s(Ct(e))||!1}function V_(e,t,n,r){var i=Je(e),o=tr(e),s=Je(t),a=tr(t),l=Je(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function yde(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return $y(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return Sv(e,a)})||o&&!o.some(function(a){return Sv(e,a)})||s&&!s(Ct(e))||!1}function H_(e,t,n){if(!fv(t)||!fv(n))return!1;var r=Je(t),i=Je(n);return r<=e&&i>=e}function MI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate,a=new Date(e,0,1);return $y(a,{minDate:z6(n),maxDate:Lae(r)})||i&&i.some(function(l){return Es(a,l)})||o&&!o.some(function(l){return Es(a,l)})||s&&!s(Ct(a))||!1}function W_(e,t,n,r){var i=Je(e),o=fc(e),s=Je(t),a=fc(t),l=Je(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function $y(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Yd(e,n)<0||r&&Yd(e,r)>0}function sj(e,t){return t.some(function(n){return Fr(n)===Fr(e)&&$r(n)===$r(e)})}function aj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&sj(e,n)||r&&!sj(e,r)||i&&!i(e)||!1}function lj(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ct(),s=Zf(Qf(o,$r(e)),Fr(e)),a=Zf(Qf(o,$r(n)),Fr(n)),l=Zf(Qf(o,$r(r)),Fr(r));try{i=!iu(s,{start:a,end:l})}catch{i=!1}return i}function cj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=ou(e,1);return n&&qd(n,i)>0||r&&r.every(function(o){return qd(o,i)>0})||!1}function uj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=gi(e,1);return n&&qd(i,n)>0||r&&r.every(function(o){return qd(i,o)>0})||!1}function fj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Gd(e,1);return n&&dv(n,i)>0||r&&r.every(function(o){return dv(o,i)>0})||!1}function dj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=tu(e,1);return n&&dv(i,n)>0||r&&r.every(function(o){return dv(i,o)>0})||!1}function jI(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Yd(i,t)>=0});return v3(r)}return n?v3(n):t}function DI(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Yd(i,t)<=0});return g3(r)}return n?g3(n):t}function hj(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:Xf,n=Math.ceil(Je(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function bde(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var s=e+t-o,a=!0;n&&(a=Je(n)<=s),r&&a&&(a=Je(r)>=s),a&&i.push(s)}return i}var wde=Iy(function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;Ln(this,n),K(ee(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return Y.createElement("div",{className:l===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:i.onChange.bind(ee(i),p),"aria-selected":l===p?"true":void 0},l===p?Y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?Je(i.props.minDate):null,d=i.props.maxDate?Je(i.props.maxDate):null;return d&&i.state.yearsList.find(function(p){return p===d})||c.unshift(Y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(Y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),K(ee(i),"onChange",function(l){i.props.onChange(l)}),K(ee(i),"handleClickOutside",function(){i.props.onCancel()}),K(ee(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),K(ee(i),"incrementYears",function(){return i.shiftYears(1)}),K(ee(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,a=o||(s?10:5);return i.state={yearsList:bde(i.props.year,a,i.props.minDate,i.props.maxDate)},i.dropdownRef=V.createRef(),i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var i=r.children?Array.from(r.children):null,o=i?i.find(function(s){return s.ariaSelected}):null;r.scrollTop=o?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=Ee({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return Y.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),xde=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!a.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(l=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(l=!1)),l&&r.dayEl.current.focus({preventScroll:!0})}),K(ee(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(O3(r.props.day),r.props.day):O3(r.props.day)}),K(ee(r),"render",function(){return Y.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents())}),r}return Rn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),Pde=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=6,g=!l&&!r.isWeekInMonth(d);if(p||g){if(!r.props.peekNextMonth)break;f=!0}}return a}),K(ee(r),"onMonthClick",function(a,l){r.handleDayClick($s(dr(r.props.day,l)),a)}),K(ee(r),"onMonthMouseEnter",function(a){r.handleDayMouseEnter($s(dr(r.props.day,a)))}),K(ee(r),"handleMonthNavigation",function(a,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[a].current&&r.MONTH_REFS[a].current.focus())}),K(ee(r),"onMonthKeyDown",function(a,l){var c=r.props,f=c.selected,d=c.preSelection,p=c.disabledKeyboardNavigation,g=c.showTwoColumnMonthYearPicker,v=c.showFourColumnMonthYearPicker,y=c.setPreSelection,x=a.key;if(x!=="Tab"&&a.preventDefault(),!p){var b=mj(v,g),w=Y_[b].verticalNavigationOffset,S=Y_[b].grid;switch(x){case"Enter":r.onMonthClick(a,l),y(f);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,gi(d,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,ou(d,1));break;case"ArrowUp":r.handleMonthNavigation(S[0].includes(l)?l+12-w:l-w,ou(d,w));break;case"ArrowDown":r.handleMonthNavigation(S[S.length-1].includes(l)?l-12+w:l+w,gi(d,w))}}}),K(ee(r),"onQuarterClick",function(a,l){r.handleDayClick(ij(Ul(r.props.day,l)),a)}),K(ee(r),"onQuarterMouseEnter",function(a){r.handleDayMouseEnter(ij(Ul(r.props.day,a)))}),K(ee(r),"handleQuarterNavigation",function(a,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.QUARTER_REFS[a-1].current&&r.QUARTER_REFS[a-1].current.focus())}),K(ee(r),"onQuarterKeyDown",function(a,l){var c=a.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onQuarterClick(a,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(l===4?1:l+1,F6(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,fue(r.props.preSelection,1))}}),K(ee(r),"getMonthClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,d=l.endDate,p=l.selected,g=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,b=l.excludeDates,w=l.includeDates,S=x?x(dr(c,a)):void 0,C=dr(c,a);return Ee("react-datepicker__month-text","react-datepicker__month-".concat(a),S,{"react-datepicker__month-text--disabled":(g||v||b||w)&&PI(C,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(c,a,p),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&tr(y)===a,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(a),"react-datepicker__month-text--in-range":V_(f,d,a,c),"react-datepicker__month-text--range-start":r.isRangeStartMonth(a),"react-datepicker__month-text--range-end":r.isRangeEndMonth(a),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(a),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(a),"react-datepicker__month-text--today":r.isCurrentMonth(c,a)})}),K(ee(r),"getTabIndex",function(a){var l=tr(r.props.preSelection);return r.props.disabledKeyboardNavigation||a!==l?"-1":"0"}),K(ee(r),"getQuarterTabIndex",function(a){var l=fc(r.props.preSelection);return r.props.disabledKeyboardNavigation||a!==l?"-1":"0"}),K(ee(r),"getAriaLabel",function(a){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,d=l.disabledDayAriaLabelPrefix,p=d===void 0?"Not available":d,g=l.day,v=dr(g,a),y=r.isDisabled(v)||r.isExcluded(v)?p:f;return"".concat(y," ").concat(ln(v,"MMMM yyyy"))}),K(ee(r),"getQuarterClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,d=l.endDate,p=l.selected,g=l.minDate,v=l.maxDate,y=l.preSelection;return Ee("react-datepicker__quarter-text","react-datepicker__quarter-".concat(a),{"react-datepicker__quarter-text--disabled":(g||v)&&yde(Ul(c,a),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(c,a,p),"react-datepicker__quarter-text--keyboard-selected":fc(y)===a,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(a),"react-datepicker__quarter-text--in-range":W_(f,d,a,c),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(a),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(a)})}),K(ee(r),"getMonthContent",function(a){var l=r.props,c=l.showFullMonthYearPicker,f=l.renderMonthContent,d=l.locale,p=kI(a,d),g=$O(a,d);return f?f(a,p,g):c?g:p}),K(ee(r),"getQuarterContent",function(a){var l=r.props,c=l.renderQuarterContent,f=function(d,p){return ln(Ul(Ct(),d),"QQQ",p)}(a,l.locale);return c?c(a,f):f}),K(ee(r),"renderMonths",function(){var a=r.props,l=a.showTwoColumnMonthYearPicker,c=a.showFourColumnMonthYearPicker,f=a.day,d=a.selected;return Y_[mj(c,l)].grid.map(function(p,g){return Y.createElement("div",{className:"react-datepicker__month-wrapper",key:g},p.map(function(v,y){return Y.createElement("div",{ref:r.MONTH_REFS[v],key:y,onClick:function(x){r.onMonthClick(x,v)},onKeyDown:function(x){r.onMonthKeyDown(x,v)},onMouseEnter:function(){return r.onMonthMouseEnter(v)},tabIndex:r.getTabIndex(v),className:r.getMonthClassNames(v),role:"option","aria-label":r.getAriaLabel(v),"aria-current":r.isCurrentMonth(f,v)?"date":void 0,"aria-selected":r.isSelectedMonth(f,v,d)},r.getMonthContent(v))}))})}),K(ee(r),"renderQuarters",function(){var a=r.props,l=a.day,c=a.selected;return Y.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,d){return Y.createElement("div",{key:d,ref:r.QUARTER_REFS[d],role:"option",onClick:function(p){r.onQuarterClick(p,f)},onKeyDown:function(p){r.onQuarterKeyDown(p,f)},onMouseEnter:function(){return r.onQuarterMouseEnter(f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c),tabIndex:r.getQuarterTabIndex(f),"aria-current":r.isCurrentQuarter(l,f)?"date":void 0},r.getQuarterContent(f))}))}),K(ee(r),"getClassNames",function(){var a=r.props,l=a.selectingDate,c=a.selectsStart,f=a.selectsEnd,d=a.showMonthYearPicker,p=a.showQuarterYearPicker;return Ee("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":p})}),r}return Rn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,a=r.ariaLabelPrefix,l=a===void 0?"month ":a;return Y.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(ln(s,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),AI=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Nde.some(function(a){return s.indexOf(a)>=0})})(o.target)&&i.props.onDropdownFocus()}),K(ee(i),"getDateInView",function(){var o=i.props,s=o.preSelection,a=o.selected,l=o.openToDate,c=jI(i.props),f=DI(i.props),d=Ct(),p=l||a||s;return p||(c&&ai(d,c)?c:f&&Ks(d,f)?f:d)}),K(ee(i),"increaseMonth",function(){i.setState(function(o){var s=o.date;return{date:gi(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),K(ee(i),"decreaseMonth",function(){i.setState(function(o){var s=o.date;return{date:ou(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),K(ee(i),"handleDayClick",function(o,s,a){i.props.onSelect(o,s,a),i.props.setPreSelection&&i.props.setPreSelection(o)}),K(ee(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),K(ee(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),K(ee(i),"handleYearMouseEnter",function(o,s){i.setState({selectingDate:Oo(Ct(),s)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,s)}),K(ee(i),"handleYearMouseLeave",function(o,s){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,s)}),K(ee(i),"handleYearChange",function(o){i.props.onYearChange&&(i.props.onYearChange(o),i.setState({isRenderAriaLiveMessage:!0})),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),K(ee(i),"handleMonthChange",function(o){i.handleCustomMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),K(ee(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),K(ee(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),K(ee(i),"changeYear",function(o){i.setState(function(s){var a=s.date;return{date:Oo(a,o)}},function(){return i.handleYearChange(i.state.date)})}),K(ee(i),"changeMonth",function(o){i.setState(function(s){var a=s.date;return{date:dr(a,o)}},function(){return i.handleMonthChange(i.state.date)})}),K(ee(i),"changeMonthYear",function(o){i.setState(function(s){var a=s.date;return{date:Oo(dr(a,tr(o)),Je(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),K(ee(i),"header",function(){var o=FO(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,i.props.locale,i.props.calendarStartDay),s=[];return i.props.showWeekNumbers&&s.push(Y.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),s.concat([0,1,2,3,4,5,6].map(function(a){var l=yl(o,a),c=i.formatWeekday(l,i.props.locale),f=i.props.weekDayClassName?i.props.weekDayClassName(l):void 0;return Y.createElement("div",{key:a,className:Ee("react-datepicker__day-name",f)},c)}))}),K(ee(i),"formatWeekday",function(o,s){return i.props.formatWeekDay?function(a,l,c){return l(ln(a,"EEEE",c))}(o,i.props.formatWeekDay,s):i.props.useWeekdaysShort?function(a,l){return ln(a,"EEE",l)}(o,s):function(a,l){return ln(a,"EEEEEE",l)}(o,s)}),K(ee(i),"decreaseYear",function(){i.setState(function(o){var s=o.date;return{date:Gd(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),K(ee(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),K(ee(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=fj(i.state.date,i.props);break;case i.props.showYearPicker:o=function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,C=w.yearItemNumber,T=C===void 0?Xf:C,k=hc(wf(Gd(b,T)),T).endPeriod,D=S&&Je(S);return D&&D>k||!1}(i.state.date,i.props);break;default:o=cj(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var s=["react-datepicker__navigation","react-datepicker__navigation--previous"],a=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(a=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),a=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,d=c.previousYearButtonLabel,p=i.props,g=p.previousMonthAriaLabel,v=g===void 0?typeof f=="string"?f:"Previous Month":g,y=p.previousYearAriaLabel,x=y===void 0?typeof d=="string"?d:"Previous Year":y;return Y.createElement("button",{type:"button",className:s.join(" "),onClick:a,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},Y.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),K(ee(i),"increaseYear",function(){i.setState(function(o){var s=o.date;return{date:tu(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),K(ee(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=dj(i.state.date,i.props);break;case i.props.showYearPicker:o=function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,C=w.yearItemNumber,T=C===void 0?Xf:C,k=hc(tu(b,T),T).startPeriod,D=S&&Je(S);return D&&D0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=["react-datepicker__current-month"];return i.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),Y.createElement("div",{className:s.join(" ")},ln(o,i.props.dateFormat,i.props.locale))}),K(ee(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return Y.createElement(xde,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:Je(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),K(ee(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return Y.createElement(Ode,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:tr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),K(ee(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return Y.createElement(Tde,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,dateFormat:i.props.dateFormat,onChange:i.changeMonthYear,minDate:i.props.minDate,maxDate:i.props.maxDate,date:i.state.date,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown})}),K(ee(i),"handleTodayButtonClick",function(o){i.props.onSelect(oj(),o),i.props.setPreSelection&&i.props.setPreSelection(oj())}),K(ee(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return Y.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.handleTodayButtonClick(o)}},i.props.todayButton)}),K(ee(i),"renderDefaultHeader",function(o){var s=o.monthDate,a=o.i;return Y.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(s),Y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(a!==0),i.renderMonthYearDropdown(a!==0),i.renderYearDropdown(a!==0)),Y.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),K(ee(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.monthDate,a=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=cj(i.state.date,i.props),c=uj(i.state.date,i.props),f=fj(i.state.date,i.props),d=dj(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return Y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(J3(J3({},i.state),{},{customHeaderCount:a,monthDate:s,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:d})),p&&Y.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),K(ee(i),"renderYearHeader",function(){var o=i.state.date,s=i.props,a=s.showYearPicker,l=hc(o,s.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return Y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(c," - ").concat(f):Je(o))}),K(ee(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),K(ee(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,a=ou(i.state.date,s),l=0;l0;o.push(Y.createElement("div",{key:d,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),Y.createElement(jde,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:g})))}return o}}),K(ee(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?Y.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),Y.createElement(Dde,Kd({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),K(ee(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return Y.createElement(AI,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),K(ee(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),s=ds(o)&&i.props.selected?"".concat(pj(o.getHours()),":").concat(pj(o.getMinutes())):"";if(i.props.showTimeInput)return Y.createElement(Lde,{date:o,timeString:s,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),K(ee(i),"renderAriaLiveRegion",function(){var o,s=hc(i.state.date,i.props.yearItemNumber),a=s.startPeriod,l=s.endPeriod;return o=i.props.showYearPicker?"".concat(a," - ").concat(l):i.props.showMonthYearPicker||i.props.showQuarterYearPicker?Je(i.state.date):"".concat($O(tr(i.state.date),i.props.locale)," ").concat(Je(i.state.date)),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i.state.isRenderAriaLiveMessage&&o)}),K(ee(i),"renderChildren",function(){if(i.props.children)return Y.createElement("div",{className:"react-datepicker__children-container"},i.props.children)}),i.containerRef=Y.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var i=this;if(!this.props.preSelection||hr(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!hr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!Ei(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&i.handleCustomMonthChange(i.state.date)})}}},{key:"render",value:function(){var r=this.props.container||Rde;return Y.createElement("div",{ref:this.containerRef},Y.createElement(r,{className:Ee("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Xf}}}]),n}(),II=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Rn(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return Ua.createPortal(this.props.children,this.el)}}]),n}(),Ide=function(e){return!e.disabled&&e.tabIndex!==-1},FI=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),K(ee(i=t.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(i.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Ide)}),K(ee(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),K(ee(i),"handleFocusEnd",function(){var o=i.getTabChildren();o&&o.length>1&&o[0].focus()}),i.tabLoopRef=Y.createRef(),i}return Rn(n,[{key:"render",value:function(){return this.props.enableTabLoop?Y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},Y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,Y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),Fde=function(e){Nn(n,Y.Component);var t=An(n);function n(){return Ln(this,n),t.apply(this,arguments)}return Rn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,s=i.wrapperClassName,a=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,d=i.popperProps,p=i.targetComponent,g=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!a){var b=Ee("react-datepicker-popper",o);r=Y.createElement(qS,Kd({modifiers:c,placement:f},d),function(S){var C=S.ref,T=S.style,k=S.placement,D=S.arrowProps;return Y.createElement(FI,{enableTabLoop:g},Y.createElement("div",{ref:C,style:T,className:b,"data-placement":k,onKeyDown:v},Y.cloneElement(l,{arrowProps:D})))})}this.props.popperContainer&&(r=Y.createElement(this.props.popperContainer,{},r)),y&&!a&&(r=Y.createElement(II,{portalId:y,portalHost:x},r));var w=Ee("react-datepicker-wrapper",s);return Y.createElement(qb,{className:"react-datepicker-manager"},Y.createElement(C4,null,function(S){var C=S.ref;return Y.createElement("div",{ref:C,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),gj="react-datepicker-ignore-onclickoutside",$de=Iy(Ade),q_="Date input not valid.",Bde=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),K(ee(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:Ct()}),K(ee(i),"calcInitialState",function(){var o,s=i.getPreSelection(),a=jI(i.props),l=DI(i.props),c=a&&ai(s,zr(a))?a:l&&Ks(s,ol(l))?l:s;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:hj(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),K(ee(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),K(ee(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),K(ee(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),K(ee(i),"setOpen",function(o){var s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:G_},function(){o||i.setState(function(a){return{focused:!!s&&a.focused}},function(){!s&&i.setBlur(),i.setState({inputValue:null})})})}),K(ee(i),"inputOk",function(){return wO(i.state.preSelection)}),K(ee(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),K(ee(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),K(ee(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),K(ee(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),K(ee(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),K(ee(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),K(ee(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),K(ee(i),"handleChange",function(){for(var o=arguments.length,s=new Array(o),a=0;a0&&(v=R_(c,f.slice(0,c.length),new Date)),ds(v)||(v=new Date(c))),ds(v)&&x?v:null));i.props.showTimeSelectOnly&&i.props.selected&&!hr(b,i.props.selected)&&(b=cue(i.props.selected,b==null?{hours:Fr(i.props.selected),minutes:$r(i.props.selected),seconds:L_(i.props.selected)}:{hours:Fr(b),minutes:$r(b),seconds:L_(b)})),!b&&l.target.value||i.setSelected(b,l,!0)}}),K(ee(i),"handleSelect",function(o,s,a){if(i.setState({preventFocus:!0},function(){return i.preventFocusTimeout=setTimeout(function(){return i.setState({preventFocus:!1})},50),i.preventFocusTimeout}),i.props.onChangeRaw&&i.props.onChangeRaw(s),i.setSelected(o,s,!1,a),i.props.showDateSelect&&i.setState({isRenderAriaLiveMessage:!0}),!i.props.shouldCloseOnSelect||i.props.showTimeSelect)i.setPreSelection(o);else if(!i.props.inline){i.props.selectsRange||i.setOpen(!1);var l=i.props,c=l.startDate,f=l.endDate;!c||f||ai(o,c)||i.setOpen(!1)}}),K(ee(i),"setSelected",function(o,s,a,l){var c=o;if(i.props.showYearPicker){if(c!==null&&MI(Je(c),i.props))return}else if(i.props.showMonthYearPicker){if(c!==null&&PI(c,i.props))return}else if(c!==null&&Fy(c,i.props))return;var f=i.props,d=f.onChange,p=f.selectsRange,g=f.startDate,v=f.endDate;if(!Ts(i.props.selected,c)||i.props.allowSameDay||p)if(c!==null&&(!i.props.selected||a&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(c=rj(c,{hour:Fr(i.props.selected),minute:$r(i.props.selected),second:L_(i.props.selected)})),i.props.inline||i.setState({preSelection:c}),i.props.focusSelectedMonth||i.setState({monthSelectedIn:l})),p){var y=g&&!v,x=g&&v;!g&&!v?d([c,null],s):y&&(ai(c,g)?d([c,null],s):d([g,c],s)),x&&d([c,null],s)}else d(c,s);a||(i.props.onSelect(c,s),i.setState({inputValue:null}))}),K(ee(i),"setPreSelection",function(o){var s=i.props.minDate!==void 0,a=i.props.maxDate!==void 0,l=!0;if(o){var c=zr(o);if(s&&a)l=Bm(o,i.props.minDate,i.props.maxDate);else if(s){var f=zr(i.props.minDate);l=Ks(o,f)||Ts(c,f)}else if(a){var d=ol(i.props.maxDate);l=ai(o,d)||Ts(c,d)}}l&&i.setState({preSelection:o})}),K(ee(i),"handleTimeChange",function(o){var s=rj(i.props.selected?i.props.selected:i.getPreSelection(),{hour:Fr(o),minute:$r(o)});i.setState({preSelection:s}),i.props.onChange(s),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),(i.props.showTimeSelectOnly||i.props.showTimeSelect)&&i.setState({isRenderAriaLiveMessage:!0}),i.setState({inputValue:null})}),K(ee(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),K(ee(i),"onInputKeyDown",function(o){i.props.onKeyDown(o);var s=o.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if(s==="ArrowDown"||s==="ArrowUp"){o.preventDefault();var a=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(a&&a.focus({preventScroll:!0}))}var l=Ct(i.state.preSelection);s==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===G_?(i.handleSelect(l,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(l)):i.setOpen(!1)):s==="Escape"?(o.preventDefault(),i.setOpen(!1)):s==="Tab"&&o.shiftKey&&i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:q_})}}else s!=="ArrowDown"&&s!=="ArrowUp"&&s!=="Enter"||i.onInputClick()}),K(ee(i),"onPortalKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),K(ee(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var s=o.key,a=Ct(i.state.preSelection);if(s==="Enter")o.preventDefault(),i.handleSelect(a,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(a);else if(s==="Escape")o.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:q_});else if(!i.props.disabledKeyboardNavigation){var l;switch(s){case"ArrowLeft":l=PO(a,1);break;case"ArrowRight":l=yl(a,1);break;case"ArrowUp":l=due(a,1);break;case"ArrowDown":l=_O(a,1);break;case"PageUp":l=ou(a,1);break;case"PageDown":l=gi(a,1);break;case"Home":l=Gd(a,1);break;case"End":l=tu(a,1)}if(!l)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:q_}));if(o.preventDefault(),i.setState({lastPreSelectChange:G_}),i.props.adjustDateOnChange&&i.setSelected(l),i.setPreSelection(l),i.props.inline){var c=tr(a),f=tr(l),d=Je(a),p=Je(l);c!==f||d!==p?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),K(ee(i),"onPopperKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),K(ee(i),"onClearClick",function(o){o&&o.preventDefault&&o.preventDefault(),i.props.selectsRange?i.props.onChange([null,null],o):i.props.onChange(null,o),i.setState({inputValue:null})}),K(ee(i),"clear",function(){i.onClearClick()}),K(ee(i),"onScroll",function(o){typeof i.props.closeOnScroll=="boolean"&&i.props.closeOnScroll?o.target!==document&&o.target!==document.documentElement&&o.target!==document.body||i.setOpen(!1):typeof i.props.closeOnScroll=="function"&&i.props.closeOnScroll(o)&&i.setOpen(!1)}),K(ee(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?Y.createElement($de,{ref:function(o){i.calendar=o},locale:i.props.locale,calendarStartDay:i.props.calendarStartDay,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,monthAriaLabelPrefix:i.props.monthAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,shouldFocusDayInline:i.state.shouldFocusDayInline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:gj,fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showDateSelect:i.props.showDateSelect,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearItemNumber:i.props.yearItemNumber,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthAriaLabel:i.props.previousMonthAriaLabel,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthAriaLabel:i.props.nextMonthAriaLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearAriaLabel:i.props.previousYearAriaLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearAriaLabel:i.props.nextYearAriaLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,onYearMouseEnter:i.props.onYearMouseEnter,onYearMouseLeave:i.props.onYearMouseLeave,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.props.onKeyDown,handleOnDayKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null}),K(ee(i),"renderAriaLiveRegion",function(){var o,s=i.props,a=s.dateFormat,l=s.locale,c=i.props.showTimeInput||i.props.showTimeSelect?"PPPPp":"PPPP";return o=i.props.selectsRange?"Selected start date: ".concat(Wi(i.props.startDate,{dateFormat:c,locale:l}),". ").concat(i.props.endDate?"End date: "+Wi(i.props.endDate,{dateFormat:c,locale:l}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(Wi(i.props.selected,{dateFormat:a,locale:l})):i.props.showYearPicker?"Selected year: ".concat(Wi(i.props.selected,{dateFormat:"yyyy",locale:l})):i.props.showMonthYearPicker?"Selected month: ".concat(Wi(i.props.selected,{dateFormat:"MMMM yyyy",locale:l})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(Wi(i.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(Wi(i.props.selected,{dateFormat:c,locale:l})),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),K(ee(i),"renderDateInput",function(){var o,s=Ee(i.props.className,K({},gj,i.state.open)),a=i.props.customInput||Y.createElement("input",{type:"text"}),l=i.props.customInputRef||"ref",c=typeof i.props.value=="string"?i.props.value:typeof i.state.inputValue=="string"?i.state.inputValue:i.props.selectsRange?function(f,d,p){if(!f)return"";var g=Wi(f,p),v=d?Wi(d,p):"";return"".concat(g," - ").concat(v)}(i.props.startDate,i.props.endDate,i.props):Wi(i.props.selected,i.props);return Y.cloneElement(a,(K(o={},l,function(f){i.input=f}),K(o,"value",c),K(o,"onBlur",i.handleBlur),K(o,"onChange",i.handleChange),K(o,"onClick",i.onInputClick),K(o,"onFocus",i.handleFocus),K(o,"onKeyDown",i.onInputKeyDown),K(o,"id",i.props.id),K(o,"name",i.props.name),K(o,"form",i.props.form),K(o,"autoFocus",i.props.autoFocus),K(o,"placeholder",i.props.placeholderText),K(o,"disabled",i.props.disabled),K(o,"autoComplete",i.props.autoComplete),K(o,"className",Ee(a.props.className,s)),K(o,"title",i.props.title),K(o,"readOnly",i.props.readOnly),K(o,"required",i.props.required),K(o,"tabIndex",i.props.tabIndex),K(o,"aria-describedby",i.props.ariaDescribedBy),K(o,"aria-invalid",i.props.ariaInvalid),K(o,"aria-labelledby",i.props.ariaLabelledBy),K(o,"aria-required",i.props.ariaRequired),o))}),K(ee(i),"renderClearButton",function(){var o=i.props,s=o.isClearable,a=o.selected,l=o.startDate,c=o.endDate,f=o.clearButtonTitle,d=o.clearButtonClassName,p=d===void 0?"":d,g=o.ariaLabelClose,v=g===void 0?"Close":g;return!s||a==null&&l==null&&c==null?null:Y.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(p).trim(),"aria-label":v,onClick:i.onClearClick,title:f,tabIndex:-1})}),i.state=i.calcInitialState(),i}return Rn(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,i){var o,s;r.inline&&(o=r.selected,s=this.props.selected,o&&s?tr(o)!==tr(s)||Je(o)!==Je(s):o!==s)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:hj(this.props.highlightDates)}),i.focused||Ts(r.selected,this.props.selected)||this.setState({inputValue:null}),i.open!==this.state.open&&(i.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),i.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props.showIcon;return Y.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&Y.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},Y.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var i=this.state.open?Y.createElement(FI,{enableTabLoop:this.props.enableTabLoop},Y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(i=Y.createElement(II,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),Y.createElement("div",null,this.renderInputContainer(),i)}return Y.createElement(Fde,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Xf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),Ude="input",G_="navigate";const Sx=e=>{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||Yo(r),s=V.useRef();return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Bde,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??nI,className:Ee("icon-input-container__input form-control",t),ref:s}),o&&m.jsx(Ie,{icon:Gue,className:"icon-input-container__icon",onClick:()=>{var a;return(a=s.current)==null?void 0:a.input.focus()}})]})},zde=e=>m.jsx(Sx,{...e,dateFormat:MO,showTimeSelect:!0,timeIntervals:10}),K_=({children:e,infoTooltip:t,checked:n,onChange:r})=>m.jsxs("p",{children:[m.jsx(K4,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&m.jsx($m,{placement:"right",children:t})]});const Vde=({isOpen:e,toggle:t})=>m.jsxs(Ko,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[m.jsx(Zo,{toggle:t,children:"Info"}),m.jsxs(uo,{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"})]})]})]}),Hde=()=>{const[e,t]=mn();return m.jsxs(m.Fragment,{children:[m.jsx("span",{title:"What does this mean?",children:m.jsx(Ie,{icon:xS,style:{cursor:"pointer"},onClick:t})}),m.jsx(Vde,{isOpen:e,toggle:t})]})};const Wde=Mt(dG,nG(/ /g,"-")),Z_=e=>typeof e=="string"?zo(e):e,Yde=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,qde=(e,t)=>function({mode:r,saving:i,onSave:o,initialState:s}){const[a,l]=V.useState(s),c=()=>l(s),f=Oh("deviceLongUrls"),d=r==="edit",p=Yde(a),g=r==="create-basic",v=T=>l({...a,tags:T.map(Wde)}),y=(T,k)=>Ji(T)?T:Ji(k)?null:void 0,x=Ry(async()=>o({...a,validSince:Qs(a.validSince)??null,validUntil:Qs(a.validUntil)??null,maxVisits:Ji(a.maxVisits)?Number(a.maxVisits):null}).then(()=>!d&&c()).catch(()=>{}));V.useEffect(()=>{l(s)},[s]);const b=(T,k,D="text",R={},z={})=>m.jsx(Ir,{...z,children:m.jsx(Gc,{id:T,type:D,placeholder:k,value:a[T]??"",onChange:R.onChange??(N=>l({...a,[T]:N.target.value})),...R})}),w=(T,k,D)=>{var R;return m.jsx(ode,{icon:D,id:T,type:"url",placeholder:k,value:((R=a.deviceLongUrls)==null?void 0:R[T])??"",onChange:z=>{var N;return l({...a,deviceLongUrls:{...a.deviceLongUrls??{},[T]:y(z.target.value,(N=s.deviceLongUrls)==null?void 0:N[T])}})}})},S=(T,k,D={})=>m.jsx(zde,{selected:a[T]?Z_(a[T]):null,placeholderText:k,isClearable:!0,onChange:R=>l({...a,[T]:R}),...D}),C=m.jsxs(m.Fragment,{children:[m.jsx(Ir,{children:m.jsx(Gc,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:a.longUrl,onChange:T=>l({...a,longUrl:T.target.value})})}),m.jsxs(pr,{children:[g&&b("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),m.jsx("div",{className:g?"col-lg-6 mb-3":"col-12",children:m.jsx(e,{selectedTags:a.tags??[],onChange:v})})]})]});return m.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:x,children:[g&&C,!g&&m.jsxs(m.Fragment,{children:[m.jsxs(pr,{children:[m.jsx("div",{className:Ee("mb-3",{"col-sm-6":f,"col-12":!f}),children:m.jsx(hn,{title:"Main options",className:"mb-3",children:C})}),f&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Device-specific long URLs",children:[m.jsx(Ir,{children:w("android","Android-specific redirection",ide)}),m.jsx(Ir,{children:w("ios","iOS-specific redirection",rde)}),w("desktop","Desktop-specific redirection",dK)]})})]}),m.jsxs(pr,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Customize the short URL",children:[b("title","Title","text",{onChange:({target:T})=>l({...a,title:y(T.value,s.title)})}),!d&&p&&m.jsxs(m.Fragment,{children:[m.jsxs(pr,{children:[m.jsx("div",{className:"col-lg-6",children:b("customSlug","Custom slug","text",{disabled:Ji(a.shortCodeLength)})}),m.jsx("div",{className:"col-lg-6",children:b("shortCodeLength","Short code length","number",{min:4,disabled:Ji(a.customSlug)})})]}),m.jsx(t,{value:a.domain,onChange:T=>l({...a,domain:T})})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Limit access to the short URL",children:[b("maxVisits","Maximum number of visits allowed","number",{min:1}),m.jsx("div",{className:"mb-3",children:S("validSince","Enabled since...",{maxDate:a.validUntil?Z_(a.validUntil):void 0})}),S("validUntil","Enabled until...",{minDate:a.validSince?Z_(a.validSince):void 0})]})})]}),m.jsxs(pr,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Extra checks",children:[m.jsx(K_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:a.validateUrl,onChange:T=>l({...a,validateUrl:T}),children:"Validate URL"}),!d&&p&&m.jsxs("p",{children:[m.jsx(K4,{inline:!0,className:"me-2",checked:a.findIfExists,onChange:T=>l({...a,findIfExists:T}),children:"Use existing URL if found"}),m.jsx(Hde,{})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Configure behavior",children:[m.jsx(K_,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:a.crawlable,onChange:T=>l({...a,crawlable:T}),children:"Make it crawlable"}),m.jsx(K_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:a.forwardQuery,onChange:T=>l({...a,forwardQuery:T}),children:"Forward query params on redirect"})]})})]})]}),m.jsx("div",{className:"text-center",children:m.jsx(yt,{outline:!0,color:"primary",disabled:i||Gn(a.longUrl),className:"btn-xs-block",children:i?"Saving...":"Save"})})]})},Gde=({active:e,allText:t,onChange:n})=>m.jsxs(m.Fragment,{children:[m.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),m.jsx(Ue,{divider:!0}),hue.map(r=>m.jsx(Ue,{active:e===r,onClick:()=>n(r),children:aI(r)},r))]}),Kde=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(Sx,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),m.jsx("div",{className:"col-md-6",children:m.jsx(Sx,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&ol(o))})})]}),$I=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=_v(t),[s,a]=V.useState(o?t:void 0),[l,c]=V.useState(o?void 0:t),f=p=>{a(oI(p)?Eh:void 0),c(p),e(p)},d=p=>{a(p),c(void 0),e(lI(p))};return i&&yfe(()=>{const p=_v(t);p&&d(t),t&&!p&&f(t)},[t]),m.jsxs(Qo,{disabled:r,text:aI(s??l)??n,children:[m.jsx(Gde,{allText:n,active:s,onChange:d}),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{header:!0,children:"Custom:"}),m.jsx(Ue,{text:!0,children:m.jsx(Kde,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},Zde={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Qde=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:s=!1}=t,a=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return m.jsxs(Qo,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[m.jsx(Ue,{header:!0,children:"Visits:"}),m.jsx(Ue,{active:i,onClick:a("excludeBots"),children:"Ignore visits from bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ue,{divider:!0}),m.jsx(Ue,{header:!0,children:"Short URLs:"}),m.jsx(Ue,{active:o,onClick:a("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),m.jsx(Ue,{active:s,onClick:a("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:!Ji(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:m.jsx("i",{children:"Clear filters"})})]})};const Xde=(e,t)=>({className:n,shortUrlsAmount:r,order:i,handleOrderBy:o})=>{const[s,a]=Ay(),{search:l,tags:c,startDate:f,endDate:d,excludeBots:p,excludeMaxVisitsReached:g,excludePastValidUntil:v,tagsMode:y="any"}=s,x=Oh("filterDisabledUrls"),b=_l("visits"),w=Mt(({startDate:k,endDate:D})=>({startDate:Qs(k)??void 0,endDate:Qs(D)??void 0}),a),S=Mt(k=>Gn(k)?void 0:k,k=>a({search:k})),C=k=>a({tags:k}),T=Mt(()=>y==="any"?"all":"any",k=>a({tagsMode:k}));return m.jsxs("div",{className:Ee("short-urls-filtering-bar-container",n),children:[m.jsx(bh,{initialValue:l,onChange:S}),m.jsxs(Ty,{className:"mt-3",children:[m.jsx(t,{allowNew:!1,placeholder:"With tags...",selectedTags:c,onChange:C}),c.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{outline:!0,color:"secondary",onClick:T,id:"tagsModeBtn","aria-label":"Change tags mode",children:m.jsx(Ie,{className:"short-urls-filtering-bar__tags-icon",icon:y==="all"?vA:BG})}),m.jsx(Mr,{target:"tagsModeBtn",placement:"left",children:y==="all"?"With all the tags.":"With any of the tags."})]})]}),m.jsxs(pr,{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-fill",children:m.jsx($I,{defaultText:"All short URLs",initialDateRange:sI(f,d),onDatesChange:w})}),m.jsx(Qde,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:p??(b==null?void 0:b.excludeBots),excludeMaxVisitsReached:g,excludePastValidUntil:v},onChange:a,supportsDisabledFiltering:x})]})}),m.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:m.jsx(e,{amount:r})}),m.jsx("div",{className:"col-6 d-lg-none mt-3",children:m.jsx(wh,{prefixed:!1,items:Zde,order:i,onChange:o})})]})]})};function Jf({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:m.jsx(Ie,{icon:e.dir==="ASC"?LG:HG,className:n})}const Vl=2,Ox="...",BI=(e,t)=>{const n=yS(XN(Vl,e-Vl),uA(t-1,e+Vl)+1);return e-Vl>Vl&&n.unshift(Ox),e+Vle===Ox,UI=e=>Zd(e)?e:wn(e),zI=(e,t)=>Zd(e)?`${e}_${t}`:`${e}`,Jde=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=vl(),o=a=>`${i}/list-short-urls/${a}${t}`;if(r<=1)return m.jsx("div",{className:"pb-3"});const s=()=>BI(n,r).map((a,l)=>m.jsx(Va,{disabled:Zd(a),active:n===a,children:m.jsx(Ha,{tag:Ft,to:o(a),children:UI(a)})},zI(a,l)));return m.jsxs(eO,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[m.jsx(Va,{disabled:n===1,children:m.jsx(Ha,{previous:!0,tag:Ft,to:o(n-1)})}),s(),m.jsx(Va,{disabled:n>=r,children:m.jsx(Ha,{next:!0,tag:Ft,to:o(n+1)})})]})},ehe={field:"dateCreated",dir:"DESC"},the=(e,t)=>sa(({listShortUrls:n,shortUrlsList:r})=>{var W,ne,q;const{page:i}=hl(),o=gn(),[s,a]=Ay(),l=NO(),{tags:c,search:f,startDate:d,endDate:p,orderBy:g,tagsMode:v,excludeBots:y,excludePastValidUntil:x,excludeMaxVisitsReached:b}=s,[w,S]=V.useState(g??((W=l.shortUrlsList)==null?void 0:W.defaultOrdering)??ehe),{pagination:C}=(r==null?void 0:r.shortUrls)??{},T=y??((ne=l.visits)==null?void 0:ne.excludeBots),k=Oh("excludeBotsOnShortUrls"),D=(J,oe)=>{a({orderBy:{field:J,dir:oe}}),S({field:J,dir:oe})},R=J=>()=>D(J,My(J,w.field,w.dir)),z=J=>m.jsx(Jf,{currentOrder:w,field:J}),N=Mt(J=>[...new Set([...c,J])],J=>a({tags:J})),H=({field:J,dir:oe})=>k&&T&&J==="visits"?{field:"nonBotVisits",dir:oe}:{field:J,dir:oe};return V.useEffect(()=>{n({page:i,searchTerm:f,tags:c,startDate:d,endDate:p,orderBy:H(w),tagsMode:v,excludePastValidUntil:x,excludeMaxVisitsReached:b})},[i,f,c,d,p,w.field,w.dir,v,x,b]),m.jsxs(m.Fragment,{children:[m.jsx(t,{shortUrlsAmount:(q=r.shortUrls)==null?void 0:q.pagination.totalItems,order:w,handleOrderBy:D,className:"mb-3"}),m.jsxs(Wr,{body:!0,className:"pb-0",children:[m.jsx(e,{shortUrlsList:r,orderByColumn:R,renderOrderIcon:z,onTagClick:N}),m.jsx(Jde,{paginator:C,currentQueryString:o.search})]})]})},()=>[fi.visits]);const nhe=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,className:o})=>{const{error:s,loading:a,shortUrls:l}=r,c=Ee({"short-urls-table__header-cell--with-action":!!t}),f=Ee("short-urls-table__header-cell",c),d=Ee("table table-hover responsive-table short-urls-table",o),p=()=>s?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):a?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!a&&Gn(l==null?void 0:l.data)?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(g=>m.jsx(e,{shortUrl:g,onTagClick:i},g.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:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),m.jsxs("th",{className:f,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),m.jsxs("th",{className:"short-urls-table__header-cell",children:[m.jsxs("span",{className:c,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",m.jsxs("span",{className:c,onClick:t==null?void 0:t("longUrl"),children:[m.jsx("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),m.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),m.jsx("th",{className:f,onClick:t==null?void 0:t("visits"),children:m.jsxs("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),m.jsx("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),m.jsx("tbody",{children:p()})]})},rhe=(e,t)=>{e.serviceFactory("ShortUrlsList",the,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",nhe,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",Kfe,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.serviceFactory("ShortUrlsRowMenu",Zfe,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Ffe,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",qde,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",nfe,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",_fe,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>$fe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",Hfe,"ImageDownloader"),e.serviceFactory("ShortUrlsFilteringBar",Xde,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",Bfe,"apiClientFactory","ReportExporter"),e.serviceFactory("shortUrlsListReducerCreator",Uue,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",ct("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",Xfe,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",ct("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",nde,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",ct("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Fue,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",ct("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",Jfe,"apiClientFactory"),e.serviceFactory("shortUrlDetailReducer",ct("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Bue,"apiClientFactory"),e.serviceFactory("createShortUrl",Qfe,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",ct("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Iue,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",ct("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>dI),e.serviceFactory("getShortUrlDetail",ct("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",tde,"apiClientFactory")},ihe=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:s,error:a,deleted:l,errorData:c}=i,f=async()=>{await r(e),t()};return m.jsxs(Ko,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[m.jsx(Zo,{toggle:t,className:"text-danger",children:"Delete tag"}),m.jsxs(uo,{children:["Are you sure you want to delete tag ",m.jsx("b",{children:e}),"?",a&&m.jsx(Ur,{type:"error",small:!0,className:"mt-2",children:m.jsx(Uo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),m.jsxs(pl,{children:[m.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"danger",disabled:s,onClick:f,children:s?"Deleting tag...":"Delete tag"})]})]})};function By(){return(By=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function Cx(e){var t=V.useRef(e),n=V.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Qd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:x.buttons>0)&&i.current?o(vj(i.current,x,a.current)):y(!1)},v=function(){return y(!1)};function y(x){var b=l.current,w=Ex(i.current),S=x?w.addEventListener:w.removeEventListener;S(b?"touchmove":"mousemove",g),S(b?"touchend":"mouseup",v)}return[function(x){var b=x.nativeEvent,w=i.current;if(w&&(yj(b),!function(C,T){return T&&!ed(C)}(b,l.current)&&w)){if(ed(b)){l.current=!0;var S=b.changedTouches||[];S.length&&(a.current=S[0].identifier)}w.focus(),o(vj(w,b,a.current)),y(!0)}},function(x){var b=x.which||x.keyCode;b<37||b>40||(x.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},y]},[s,o]),f=c[0],d=c[1],p=c[2];return V.useEffect(function(){return p},[p]),Y.createElement("div",By({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),UO=function(e){return e.filter(Boolean).join(" ")},WI=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=UO(["react-colorful__pointer",e.className]);return Y.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},Y.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Wn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},ohe=function(e){return uhe(Tx(e))},Tx=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Wn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Wn(parseInt(e.substring(6,8),16)/255,2):1}},she=function(e){return che(lhe(e))},ahe=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Wn(e.h),s:Wn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Wn(i/2),a:Wn(r,2)}},kx=function(e){var t=ahe(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},lhe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Wn(255*[r,a,s,s,l,r][c]),g:Wn(255*[l,r,r,a,s,s][c]),b:Wn(255*[s,s,l,r,r,a][c]),a:Wn(i,2)}},nm=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},che=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?nm(Wn(255*i)):"";return"#"+nm(t)+nm(n)+nm(r)+o},uhe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Wn(60*(a<0?a+6:a)),s:Wn(o?s/o*100:0),v:Wn(o/255*100),a:i}},fhe=Y.memo(function(e){var t=e.hue,n=e.onChange,r=UO(["react-colorful__hue",e.className]);return Y.createElement("div",{className:r},Y.createElement(HI,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Qd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Wn(t),"aria-valuemax":"360","aria-valuemin":"0"},Y.createElement(WI,{className:"react-colorful__hue-pointer",left:t/360,color:kx({h:t,s:100,v:100,a:1})})))}),dhe=Y.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:kx({h:t.h,s:100,v:100,a:1})};return Y.createElement("div",{className:"react-colorful__saturation",style:r},Y.createElement(HI,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Qd(t.s+100*i.left,0,100),v:Qd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Wn(t.s)+"%, Brightness "+Wn(t.v)+"%"},Y.createElement(WI,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:kx(t)})))}),YI=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},hhe=function(e,t){return e.toLowerCase()===t.toLowerCase()||YI(Tx(e),Tx(t))};function phe(e,t,n){var r=Cx(n),i=V.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],a=V.useRef({color:t,hsva:o});V.useEffect(function(){if(!e.equal(t,a.current.color)){var c=e.toHsva(t);a.current={hsva:c,color:t},s(c)}},[t,e]),V.useEffect(function(){var c;YI(o,a.current.hsva)||e.equal(c=e.fromHsva(o),a.current.color)||(a.current={hsva:o,color:c},r(c))},[o,e,r]);var l=V.useCallback(function(c){s(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var mhe=typeof window<"u"?V.useLayoutEffect:V.useEffect,ghe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_j=new Map,vhe=function(e){mhe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_j.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_j.set(t,n);var r=ghe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},yhe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=VI(e,["className","colorModel","color","onChange"]),a=V.useRef(null);vhe(a);var l=phe(n,i,o),c=l[0],f=l[1],d=UO(["react-colorful",t]);return Y.createElement("div",By({},s,{ref:a,className:d}),Y.createElement(dhe,{hsva:c,onChange:f}),Y.createElement(fhe,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},_he={defaultColor:"000",toHsva:ohe,fromHsva:function(e){return she({h:e.h,s:e.s,v:e.v,a:1})},equal:hhe},bhe=function(e){return Y.createElement(yhe,By({},e,{colorModel:_he}))};const whe=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:s})=>{const[a,l]=V.useState(t),[c,f]=V.useState(e(t)),[d,p,,g]=mn(),{editing:v,error:y,edited:x,errorData:b}=s,w=Ry(async()=>{await n({oldName:t,newName:a,color:c}),r()}),S=Mt(g,()=>x&&i({oldName:t,newName:a,color:c}));return m.jsx(Ko,{isOpen:o,toggle:r,centered:!0,onClosed:S,children:m.jsxs("form",{name:"editTag",onSubmit:w,children:[m.jsx(Zo,{toggle:r,children:"Edit tag"}),m.jsxs(uo,{children:[m.jsxs(Ty,{children:[m.jsx("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:m.jsx(Ie,{icon:RG,className:"edit-tag-modal__color-icon"})}),m.jsx(JS,{isOpen:d,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:m.jsx(bhe,{color:c,onChange:f})}),m.jsx(Gc,{value:a,placeholder:"Tag",required:!0,onChange:({target:C})=>l(C.value)})]}),y&&m.jsx(Ur,{type:"error",small:!0,className:"mt-2",children:m.jsx(Uo,{errorData:b,fallbackMessage:"Something went wrong while editing the tag :("})})]}),m.jsxs(pl,{children:[m.jsx(yt,{type:"button",color:"link",onClick:r,children:"Cancel"}),m.jsx(yt,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})};function xhe(e){return Y.createElement("button",{type:"button",className:e.classNames.selectedTag,title:e.removeButtonText,onClick:e.onDelete},Y.createElement("span",{className:e.classNames.selectedTagName},e.tag.name))}const She={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},Ohe=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"];class Che extends Y.Component{constructor(t){super(t),this.state={inputWidth:null},this.input=Y.createRef(),this.sizer=Y.createRef()}componentDidMount(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())}componentDidUpdate({query:t,placeholderText:n}){(t!==this.props.query||n!==this.props.placeholderText)&&this.updateInputWidth()}copyInputStyles(){const t=window.getComputedStyle(this.input.current);Ohe.forEach(n=>{this.sizer.current.style[n]=t[n]})}updateInputWidth(){let t;this.props.autoresize&&(t=Math.ceil(this.sizer.current.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})}render(){const{id:t,query:n,ariaLabelText:r,placeholderText:i,expanded:o,classNames:s,inputAttributes:a,inputEventHandlers:l,index:c}=this.props;return Y.createElement("div",{className:s.searchWrapper},Y.createElement("input",Object.assign({},a,l,{ref:this.input,value:n,placeholder:i,className:s.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":r||i,"aria-owns":t,"aria-activedescendant":c>-1?`${t}-${c}`:null,"aria-expanded":o,style:{width:this.state.inputWidth}})),Y.createElement("div",{ref:this.sizer,style:She},n||i))}}function zO(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function Ehe(e){return new RegExp(zO(e),"gi")}function The(e){return new RegExp(`(?:^|\\s)${zO(e)}`,"i")}function khe(e){return new RegExp(`^${zO(e)}$`,"i")}function Phe(e,t){const n=Ehe(t);return e.replace(n,"$&")}function Mhe({item:e,query:t}){return Y.createElement("span",{dangerouslySetInnerHTML:{__html:Phe(e.name,t)}})}function jhe(e){const t=e.suggestionComponent||Mhe,n=e.options.map((r,i)=>{const o=`${e.id}-${i}`,s=[];return e.index===i&&s.push(e.classNames.suggestionActive),r.disabled&&s.push(e.classNames.suggestionDisabled),Y.createElement("li",{id:o,key:o,role:"option",className:s.join(" "),"aria-disabled":!!r.disabled,onMouseDown:a=>a.preventDefault(),onClick:()=>e.addTag(r)},r.prefix?Y.createElement("span",{className:e.classNames.suggestionPrefix},r.prefix," "):null,r.disableMarkIt?r.name:Y.createElement(t,{item:r,query:e.query}))});return Y.createElement("div",{className:e.classNames.suggestions},Y.createElement("ul",{role:"listbox",id:e.id},n))}function Dhe(e,t){const n=e.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,o=>o===t),i=n[r-1]||n[r+1];i&&i.focus()}const Ma={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down"},qI={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled",suggestionPrefix:"react-tags__suggestion-prefix"};function GI(e,t){return e.findIndex(n=>khe(t).test(n.name))}function Q_(){if(this.state.query.length>=this.props.minQueryLength){const e=GI(this.state.options,this.state.query),t=this.state.index===-1?e:this.state.index,n=t>-1?this.state.options[t]:null;n?this.addTag(n):this.props.allowNew&&this.addTag({name:this.state.query})}}function Lhe(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function Rhe(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function Nhe(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function Ahe(e,t){return The(t).test(e.name)}function Ihe(e,t){let n;return e.suggestionsTransform?n=e.suggestionsTransform(t.query,e.suggestions):n=e.suggestions.filter(r=>e.suggestionsFilter(r,t.query)),n=n.slice(0,e.maxSuggestionsLength),e.allowNew&&e.newTagText&&GI(n,t.query)===-1?n.push({id:0,name:t.query,prefix:e.newTagText,disableMarkIt:!0}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n}class VO extends Y.Component{constructor(t){super(t),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:()=>{},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=Y.createRef(),this.input=Y.createRef()}onInput(t){const n=t.target.value;this.props.onInput&&this.props.onInput(n),n.length===this.state.query.length+1&&this.props.delimiters.indexOf(n.slice(-1))>-1?Q_.call(this):n!==this.state.query&&this.setState({query:n})}onKeyDown(t){this.props.delimiters.indexOf(t.key)>-1&&((this.state.query||this.state.index>-1)&&t.preventDefault(),Q_.call(this)),t.key===Ma.BACKSPACE&&this.props.allowBackspace&&Nhe.call(this,t),(t.key===Ma.UP_ARROW||t.key===Ma.UP_ARROW_COMPAT)&&Lhe.call(this,t),(t.key===Ma.DOWN_ARROW||t.key===Ma.DOWN_ARROW_COMPAT)&&Rhe.call(this,t)}onClick(t){document.activeElement!==t.target&&this.focusInput()}onBlur(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&Q_.call(this)}onFocus(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()}onDeleteTag(t,n){this.container.current&&Dhe(this.container.current,n.currentTarget),this.deleteTag(t)}addTag(t){t.disabled||typeof this.props.onValidate=="function"&&!this.props.onValidate(t)||(this.props.onAddition({id:t.id,name:t.name}),this.clearInput())}deleteTag(t){this.props.onDelete(t)}clearInput(){this.setState({query:"",index:-1})}clearSelectedIndex(){this.setState({index:-1})}focusInput(){this.input.current&&this.input.current.input.current&&this.input.current.input.current.focus()}render(){const t=this.props.tagComponent||xhe,n=this.state.focused&&this.state.query.length>=this.props.minQueryLength,r=Object.assign({},qI,this.props.classNames),i=[r.root];return this.state.focused&&i.push(r.rootFocused),Y.createElement("div",{ref:this.container,className:i.join(" "),onClick:this.onClick.bind(this)},Y.createElement("div",{className:r.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((o,s)=>Y.createElement(t,{key:s,tag:o,removeButtonText:this.props.removeButtonText,classNames:r,onDelete:this.onDeleteTag.bind(this,s)}))),Y.createElement("div",{className:r.search},Y.createElement(Che,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:r,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:n,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),n&&this.state.options.length?Y.createElement(jhe,Object.assign({},this.state,{id:this.props.id,classNames:r,expanded:n,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent})):null))}static getDerivedStateFromProps(t,n){return n.prevQuery!==n.query||n.prevSuggestions!==t.suggestions?{prevQuery:n.query,prevSuggestions:t.suggestions,options:Ihe(t,n)}:null}}VO.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:Ahe,suggestionsTransform:null,autoresize:!0,classNames:qI,delimiters:[Ma.TAB,Ma.ENTER],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}};VO.propTypes={id:j.string,tags:j.arrayOf(j.object),placeholderText:j.string,ariaLabelText:j.string,removeButtonText:j.string,noSuggestionsText:j.string,newTagText:j.string,suggestions:j.arrayOf(j.object),suggestionsFilter:j.func,suggestionsTransform:j.func,autoresize:j.bool,delimiters:j.arrayOf(j.string),onDelete:j.func.isRequired,onAddition:j.func.isRequired,onInput:j.func,onFocus:j.func,onBlur:j.func,onValidate:j.func,minQueryLength:j.number,maxSuggestionsLength:j.number,classNames:j.object,allowNew:j.bool,allowBackspace:j.bool,addOnBlur:j.bool,tagComponent:j.oneOfType([j.func,j.element]),suggestionComponent:j.oneOfType([j.func,j.element]),inputAttributes:j.object};const KI=({tag:e,colorGenerator:t})=>m.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),bj=e=>({id:e,name:e}),Fhe=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,allowNew:s=!0})=>{const a=_l("shortUrlCreation");V.useEffect(()=>{i()},[]);const l=(a==null?void 0:a.tagFilteringMode)??"startsWith",c=({tag:d,onDelete:p})=>m.jsx(IO,{colorGenerator:e,text:d.name,clearable:!0,className:"react-tags__tag",onClose:p}),f=({item:d})=>m.jsxs(m.Fragment,{children:[m.jsx(KI,{tag:`${d.name}`,colorGenerator:e}),d.name]});return m.jsx(VO,{tags:t.map(bj),tagComponent:c,suggestions:o.tags.filter(d=>!t.includes(d)).map(bj),suggestionComponent:f,allowNew:s,addOnBlur:!0,placeholderText:r??"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:l==="includes"?(d,p)=>p.filter(({name:g})=>g.includes(d)):void 0,onDelete:d=>{const p=[...t];p.splice(d,1),n(p)},onAddition:({name:d})=>n([...new Set([...t,...d.toLowerCase().split(",")])])})},Px="shlink/tagDelete",$he={deleting:!1,deleted:!1,error:!1},ZI=jn(`${Px}/tagDeleted`),Bhe=e=>{const t=Pr(`${Px}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=sr({name:Px,initialState:$he,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:Xo(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},HO="shlink/tagEdit",Uhe={editing:!1,edited:!1,error:!1},QI=jn(`${HO}/tagEdited`),zhe=(e,t)=>Pr(`${HO}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Vhe=e=>sr({name:HO,initialState:Uhe,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:Xo(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...vS(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),WO="shlink/tagsList",X_={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},wj=(e,t)=>n=>n===e?t:n,xj=(e,t)=>ch(n=>n===t,e),Hhe=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:s}=i,a=n[r];return{...n,[r]:{...a,visitsSummary:a.visitsSummary&&{total:a.visitsSummary.total+o+s,bots:a.visitsSummary.bots+o,nonBots:a.visitsSummary.nonBots+s},visitsCount:a.visitsCount+o+s}}},{...t}),Whe=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),{})),Yhe=(e,t=!0)=>Pr(`${WO}/listTags`,async(n,{getState:r})=>{const{tagsList:i}=r();if(!t&&!Gn(i.tags))return i;const{tags:o,stats:s}=await e().tagsStats(),a=s.reduce((l,{tag:c,...f})=>(l[c]=f,l),{});return{tags:o,stats:a}}),XI=jn(`${WO}/filterTags`),qhe=(e,t)=>sr({name:WO,initialState:X_,reducers:{},extraReducers:n=>{n.addCase(XI,(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})=>({...X_,error:!0,errorData:Xo(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...X_,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(ZI,({tags:r,filteredTags:i,...o},{payload:s})=>({...o,tags:xj(r,s),filteredTags:xj(i,s)})),n.addCase(QI,({tags:r,filteredTags:i,stats:o,...s},{payload:a})=>({...s,stats:{...o,[a.newName]:o[a.oldName]},tags:r.map(wj(a.oldName,a.newName)).sort(),filteredTags:i.map(wj(a.oldName,a.newName)).sort()})),n.addCase(Th,(r,{payload:i})=>({...r,stats:Hhe(Whe(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(s=>!r.includes(s)))}))}}),Ghe={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Khe=e=>sa(({filterTags:t,forceListTags:n,tagsList:r})=>{var f;const i=NO(),[o,s]=V.useState(((f=i.tags)==null?void 0:f.defaultOrdering)??{}),a=Mt(()=>r.filteredTags.map(d=>{var v,y,x;const p=r.stats[d],g=((v=i.visits)!=null&&v.excludeBots?(y=p==null?void 0:p.visitsSummary)==null?void 0:y.nonBots:(x=p==null?void 0:p.visitsSummary)==null?void 0:x.total)??(p==null?void 0:p.visitsCount)??0;return{tag:d,visits:g,shortUrls:(p==null?void 0:p.shortUrlsCount)??0}}),d=>Q4(d,o));if(V.useEffect(()=>{n()},[]),r.loading)return m.jsx(jo,{loading:!0});if(r.error)return m.jsx(Ur,{type:"error",children:m.jsx(Uo,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const l=d=>()=>{const p=My(d,o.field,o.dir);s({field:p?d:void 0,dir:p})},c=()=>{if(r.filteredTags.length<1)return m.jsx(jo,{children:"No tags found"});const d=a();return m.jsx(e,{sortedTags:d,currentOrder:o,orderByColumn:l})};return m.jsxs(m.Fragment,{children:[m.jsx(bh,{className:"mb-3",onChange:t}),m.jsx(pr,{className:"mb-3",children:m.jsx("div",{className:"col-lg-6 offset-lg-6",children:m.jsx(wh,{items:Ghe,order:o,onChange:(d,p)=>s({field:d,dir:p})})})}),c()]})},()=>[fi.visits]);const YO=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Zd(o)&&n(o);return m.jsxs(eO,{listClassName:Ee("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[m.jsx(Va,{disabled:t<=1,children:m.jsx(Ha,{previous:!0,tag:"span",onClick:i(t-1)})}),BI(t,e).map((o,s)=>m.jsx(Va,{disabled:Zd(o),active:t===o,children:m.jsx(Ha,{role:"link",tag:"span",onClick:i(o),children:UI(o)})},zI(o,s))),m.jsx(Va,{disabled:t>=e,children:m.jsx(Ha,{next:!0,tag:"span",onClick:i(t+1)})})]})};const Zhe=20,Qhe=e=>({sortedTags:t,orderByColumn:n,currentOrder:r})=>{const i=V.useRef(!0),{search:o}=gn(),{page:s=1}=gl(o),[a,l]=vfe("page",Number(s)),c=Md(Zhe,t),f=c.length>1,d=c[a-1]??[];return V.useEffect(()=>{!i.current&&l(1),i.current=!1},[t]),V.useEffect(()=>{scrollTo(0,0)},[a]),m.jsxs(hn,{bodyClassName:f?"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:n("tag"),children:["Tag ",m.jsx(Jf,{currentOrder:r,field:"tag"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("shortUrls"),children:["Short URLs ",m.jsx(Jf,{currentOrder:r,field:"shortUrls"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("visits"),children:["Visits ",m.jsx(Jf,{currentOrder:r,field:"visits"})]}),m.jsx("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),m.jsx("tr",{children:m.jsx("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),m.jsxs("tbody",{children:[d.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),d.map(p=>m.jsx(e,{tag:p},p.tag))]})]}),f&&m.jsx("div",{className:"sticky-card-paginator",children:m.jsx(YO,{pagesCount:c.length,currentPage:a,setCurrentPage:l})})]},a)},Xhe=(e,t,n)=>({tag:r})=>{const[i,o]=mn(),[s,a]=mn(),l=vl();return m.jsxs("tr",{className:"responsive-table__row",children:[m.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[m.jsx(KI,{tag:r.tag,colorGenerator:n})," ",r.tag]}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:m.jsx(Ft,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:wn(r.shortUrls)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:m.jsx(Ft,{to:`${l}/tag/${r.tag}/visits`,children:wn(r.visits)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end",children:m.jsxs(Py,{children:[m.jsxs(Ue,{onClick:a,children:[m.jsx(Ie,{icon:xG,fixedWidth:!0,className:"me-1"})," Edit"]}),m.jsxs(Ue,{onClick:o,children:[m.jsx(Ie,{icon:IG,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),m.jsx(t,{tag:r.tag,toggle:a,isOpen:s}),m.jsx(e,{tag:r.tag,toggle:o,isOpen:i})]})},Jhe=(e,t)=>{e.serviceFactory("TagsSelector",Fhe,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>ihe),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",whe,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",Xhe,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Qhe,"TagsTableRow"),e.serviceFactory("TagsList",Khe,"TagsTable"),e.decorator("TagsList",t(["tagsList","mercureInfo"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",Vhe,"editTag"),e.serviceFactory("tagEditReducer",ct("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Bhe,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",ct("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",qhe,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",ct("reducer"),"tagsListReducerCreator");const n=r=>({apiClientFactory:i})=>Yhe(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>XI),e.serviceFactory("deleteTag",ct("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>ZI),e.serviceFactory("editTag",zhe,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>QI)};var epe="Expected a function",JI="__lodash_hash_undefined__",e5=1/0,tpe="[object Function]",npe="[object GeneratorFunction]",rpe="[object Symbol]",ipe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ope=/^\w*$/,spe=/^\./,ape=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lpe=/[\\^$.*+?()[\]{}|]/g,cpe=/\\(\\)?/g,upe=/^\[object .+?Constructor\]$/,fpe=typeof Gl=="object"&&Gl&&Gl.Object===Object&&Gl,dpe=typeof self=="object"&&self&&self.Object===Object&&self,qO=fpe||dpe||Function("return this")();function hpe(e,t){return e==null?void 0:e[t]}function ppe(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var mpe=Array.prototype,gpe=Function.prototype,t5=Object.prototype,J_=qO["__core-js_shared__"],Sj=function(){var e=/[^.]+$/.exec(J_&&J_.keys&&J_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),n5=gpe.toString,GO=t5.hasOwnProperty,r5=t5.toString,vpe=RegExp("^"+n5.call(GO).replace(lpe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oj=qO.Symbol,ype=mpe.splice,_pe=i5(qO,"Map"),Xd=i5(Object,"create"),Cj=Oj?Oj.prototype:void 0,Ej=Cj?Cj.toString:void 0;function al(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function Ppe(e,t){var n=this.__data__,r=Uy(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}wu.prototype.clear=Cpe;wu.prototype.delete=Epe;wu.prototype.get=Tpe;wu.prototype.has=kpe;wu.prototype.set=Ppe;function bl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function QO(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function Xpe(e={stringFormatter:QO()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function Jpe(e={stringFormatter:QO()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function kj(e,t,n){const r=e[t];return r===void 0?n:r}function a5(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Mx(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var Pj;(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"})(Pj||(Pj={}));class eme{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||QO(),i=Jpe({stringFormatter:r}),o={header:r,undefined:e1,boolean:e1,number:Qpe(),bigint:e1,string:r,symbol:Xpe({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:r.includes(".")||r.includes("[")?i=>Tj(i,r,n):i=>kj(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:r.value.includes(".")||r.value.includes("[")?s=>Tj(s,o,i):s=>kj(s,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i},a=r.value;return{label:o,value(l){const c=a(l,s);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Mx(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(a5,[]),[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 Mx(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 l5 extends eme{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,a)=>(Object.keys(a).forEach(l=>{s.includes(l)||s.push(l)}),s),[]),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(a5,[])}processData(t){return Mx(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Cn;(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"})(Cn||(Cn={}));Cn.QUOTATION_MARK+"",Cn.QUOTATION_MARK,Cn.REVERSE_SOLIDUS+"",Cn.REVERSE_SOLIDUS,Cn.SOLIDUS+"",Cn.SOLIDUS,Cn.LATIN_SMALL_LETTER_B+"",Cn.BACKSPACE,Cn.LATIN_SMALL_LETTER_F+"",Cn.FORM_FEED,Cn.LATIN_SMALL_LETTER_N+"",Cn.NEWLINE,Cn.LATIN_SMALL_LETTER_R+"",Cn.CARRIAGE_RETURN,Cn.LATIN_SMALL_LETTER_T+"",Cn.TAB;var Mj;(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"})(Mj||(Mj={}));var jj;(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"})(jj||(jj={}));var Dj;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(Dj||(Dj={}));var Lj;(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"})(Lj||(Lj={}));const tme=new l5,nme=e=>tme.parse(e),rme=6,Rj="0123456789ABCDEF",ime=128,{floor:ome,random:sme,sqrt:ame,round:lme}=Math,cme=()=>`#${LO(rme,()=>Rj[ome(sme()*Rj.length)]).join("")}`,Nj=e=>e.toLowerCase().trim(),ume=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),fme=(e=0,t=0,n=0)=>lme(ame(.299*e**2+.587*t**2+.114*n**2));class dme{constructor(t){me(this,"colors");me(this,"lights");me(this,"getColorForKey",t=>{const n=Nj(t),r=this.colors[n];return r||this.setColorForKey(n,cme())});me(this,"setColorForKey",(t,n)=>{var i;const r=Nj(t);return this.colors[r]=n,(i=this.storage)==null||i.storeTagColors(this.colors),n});me(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if(Yo(this.lights[n])){const r=ume(n);this.lights[n]=fme(...r)>=ime}return this.lights[n]});var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const c5=({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)},hme=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);c5(e,i,n)};class pme{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);c5(this.window,i,n)}}class mme{constructor(t,n){me(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});me(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});me(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);hme(this.window,r,t)});this.window=t,this.jsonToCsv=n}}function gme(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",pme,"fetch","window"),e.service("ColorGenerator",dme,"TagColorsStorage"),e.constant("jsonToCsv",nme),e.service("ReportExporter",mme,"window","jsonToCsv"),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",mfe,"setTimeout","clearTimeout")}const XO=e=>e.visitedUrl!==void 0,vme=e=>e.visitedUrl!==void 0,yme=Mt(Fq(e=>XO(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),rm=(e,t)=>aA(ct(t),e),jh=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Qs(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Qs(r==null?void 0:r.endDate))??void 0,s=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:s}},Dh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>m.jsx("header",{children:m.jsxs(Wr,{body:!0,children:[m.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[m.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:m.jsx(Ie,{icon:yA})}),m.jsx("span",{className:"text-center d-none d-sm-block",children:m.jsx("small",{children:i})}),m.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",m.jsx(OI,{visitsCount:e.length,shortUrl:n})]})]}),m.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:m.jsx("small",{children:i})}),r&&m.jsx("div",{className:"mt-md-2",children:r})]})});const u5=({title:e,footer:t,children:n})=>m.jsxs(Wr,{role:"document",children:[m.jsx(qc,{className:"chart-card__header",children:typeof e=="function"?e():e}),m.jsx(Yc,{children:n}),t&&m.jsx(j4,{className:"chart-card__footer--sticky",children:t})]}),f5="label";function Aj(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function _me(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function d5(e,t){e.labels=t}function h5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f5;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function bme(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f5;const n={labels:[],datasets:[]};return d5(n,e.labels),h5(n,e.datasets,t),n}function p5(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function wme(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:f,updateMode:d,...p}=e,g=V.useRef(null),v=V.useRef(),y=()=>{g.current&&(v.current=new Mv(g.current,{type:s,data:bme(a,o),options:l&&{...l},plugins:c}),Aj(t,v.current))},x=()=>{Aj(t,null),v.current&&(v.current.destroy(),v.current=null)};return V.useEffect(()=>{!i&&v.current&&l&&_me(v.current,l)},[i,l]),V.useEffect(()=>{!i&&v.current&&d5(v.current.config.data,a.labels)},[i,a.labels]),V.useEffect(()=>{!i&&v.current&&a.datasets&&h5(v.current.config.data,a.datasets,o)},[i,a.datasets]),V.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(d))},[i,l,a.labels,a.datasets,d]),V.useEffect(()=>{v.current&&(x(),setTimeout(y))},[s]),V.useEffect(()=>(y(),()=>x()),[]),Y.createElement("canvas",Object.assign({ref:g,role:"img",height:n,width:r},p),f)}const xme=V.forwardRef(wme);function JO(e,t){return Mv.register(t),V.forwardRef((n,r)=>Y.createElement(xme,Object.assign({},n,{ref:r,type:e})))}const Sme=JO("line",kf),Ome=JO("bar",Tf),Cme=JO("doughnut",ys),m5=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},g5=({dataset:e,raw:t})=>`${e.label}: ${wn(`${t}`)}`,Eme=({label:e,raw:t})=>`${e}: ${wn(`${t}`)}`;const Tme=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return m.jsx("ul",{className:"doughnut-chart-legend",children:n.map((s,a)=>m.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[m.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[a]??o}}),m.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:s})]},s))})},kme=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:rie()?nie:tie,borderWidth:2}],Pme=(e,t)=>({labels:e,datasets:kme(t)}),Mme=V.memo(({stats:e})=>{const[t,n]=V.useState(),r=ao(e),i=hu(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:Eme}}}},s=Pme(r,i);return m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-sm-12 col-md-7",children:m.jsx(Cme,{height:300,data:s,options:o,ref:a=>{a&&n(a)}})}),m.jsx("div",{className:"col-sm-12 col-md-5",children:t&&m.jsx(Tme,{chart:t})})]})}),Ij=({title:e,stats:t})=>m.jsx(u5,{title:e,children:m.jsx(Mme,{stats:t})}),jme={"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"},v5={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"},rn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},ur={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"},ls={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class we{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=we.getVersionPrecision(t),o=we.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=we.map([t,n],c=>{const f=s-we.getVersionPrecision(c),d=c+new Array(f+1).join(".0");return we.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return jme[t]}static getBrowserTypeByAlias(t){return v5[t]||""}}const Et=/version\/(\d+(\.?_?\d+)+)/i,Dme=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=we.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(Et,e)||we.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=we.getFirstMatch(Et,e)||we.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=we.getFirstMatch(Et,e)||we.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=we.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=we.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=we.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=we.getFirstMatch(Et,e)||we.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=we.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=we.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=we.getFirstMatch(Et,e)||we.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=we.getFirstMatch(Et,e)||we.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=we.getFirstMatch(Et,e)||we.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=we.getFirstMatch(Et,e)||we.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=we.getFirstMatch(Et,e)||we.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=we.getFirstMatch(Et,e)||we.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=we.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Et,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=we.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=we.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=we.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=we.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=we.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=we.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=we.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=we.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=we.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=we.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=we.getFirstMatch(Et,e)||we.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=we.getFirstMatch(Et,e)||we.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=we.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=we.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=we.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=we.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=we.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=we.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=we.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=we.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=we.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=we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:we.getFirstMatch(i,e),version:we.getSecondMatch(i,e)}}}],Lme=[{test:[/Roku\/DVP/],describe(e){const t=we.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:ur.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=we.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:ur.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=we.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=we.getWindowsVersionName(t);return{name:ur.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:ur.iOS},n=we.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=we.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=we.getMacOSVersionName(t),r={name:ur.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=we.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:ur.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=we.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=we.getAndroidVersionName(t),r={name:ur.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=we.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:ur.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=we.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||we.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||we.getFirstMatch(/\bbb(\d+)/i,e);return{name:ur.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=we.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:ur.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=we.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:ur.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:ur.Linux}}},{test:[/CrOS/],describe(){return{name:ur.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=we.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:ur.PlayStation4,version:t}}}],Rme=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=we.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:rn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:rn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:rn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:rn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:rn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:rn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:rn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=we.getFirstMatch(/(ipod|iphone)/i,e);return{type:rn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:rn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:rn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:rn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:rn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:rn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:rn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:rn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:rn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:rn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:rn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:rn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:rn.tv}}}],Nme=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:ls.Blink};const n=we.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ls.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:ls.Trident},n=we.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:ls.Presto},n=we.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:ls.Gecko},n=we.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ls.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:ls.WebKit},n=we.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Fj{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=we.find(Dme,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=we.find(Lme,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=we.find(Rme,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=we.find(Nme,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 we.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=we.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=we.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const a=Object.keys(i),l=we.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=we.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(we.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 Ame{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Fj(t,n)}static parse(t){return new Fj(t).getResult()}static get BROWSER_MAP(){return v5}static get ENGINE_MAP(){return ls}static get OS_MAP(){return ur}static get PLATFORMS_MAP(){return rn}}const im="Others",Ime=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Fme=e=>{if(!Ji(e))return{browser:im,os:im};const{browser:{name:t},os:{name:n}}=Ame.parse(e);return{os:n??im,browser:t&&Ime.includes(t)?t:im}},$me=e=>{var t;return Ji(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},eC=(e,t)=>Object.values({...fA(t,t.map(()=>0)),...e});const $j={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Bme={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},Ume={hourly:Pae,daily:xO,weekly:Dae,monthly:hv},tC={hourly:e=>ru(e,"yyyy-MM-dd HH:00"),daily:e=>Aa(e),weekly(e){const t=Aa(Wd(e)),n=Aa(Nae(e));return`${t} - ${n}`},monthly:e=>ru(e,"yyyy-MM")},zme=e=>{const t=new Date,n=zo(e);return gS([[()=>xO(t,n)<=2,r_("hourly")],[()=>hv(t,n)<=1,r_("daily")],[()=>hv(t,n)<=6,r_("weekly")]])()??"monthly"},Bj=(e,t)=>aA(n=>tC[e](zo(n.date)),t),Vme=(e,t)=>t.reduce((n,r)=>{const i=tC[e](zo(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),Hme=(e,t)=>{const n=Ume[e],r=tC[e],i=zo(t[0].date),o=zo(t[t.length-1].date),s=n(i,o),a=Bme[e];return[r(o),...LO(s,l=>r(yae(o,a(l))))]},Wme=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=Hme(n,e);return[i,eC(t,i)]},Uj=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let t1=null;const Yme=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;t1===e[i]?(r([]),t1=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),t1=e[i]??null)},qme=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,s]=V.useState(t.length>0?zme(t[t.length-1].date):"monthly"),[a,l]=mn(!0),c=V.useRef(null),f=V.useRef(null),d=V.useMemo(()=>Vme(o,t),[o,t]),p=V.useMemo(()=>Bj(o,vb(t)),[o,t]),[g,v]=V.useMemo(()=>Wme(t,p,o,a),[t,o,a]),y=V.useMemo(()=>eC(Bj(o,vb(n)),g),[n,o,g]),x=()=>{const C=Uj(v,"Visits",tO);if(n.length===0)return[C];const T=Uj(y,r,J4);return[C,T]},b=()=>({labels:g,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:g5}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:wn}},x:{title:{display:!0,text:$j[o]}}},onHover:m5},S=C=>m.jsx(Sme,{ref:C,data:b(),options:w,onClick:T=>Yme(g,d,p5(C.current,T),i)});return m.jsxs(Wr,{children:[m.jsxs(qc,{role:"heading",children:[e,m.jsx("div",{className:"float-end",children:m.jsxs(_h,{children:[m.jsx(gh,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),m.jsx(mu,{end:!0,children:Object.entries($j).map(([C,T])=>m.jsx(Ue,{active:o===C,onClick:()=>s(C),children:T},C))})]})}),m.jsx("div",{className:"float-end me-2",children:m.jsx(Kc,{checked:a,onChange:l,children:m.jsx("small",{children:"Skip dates with no visits"})})})]}),m.jsxs(Yc,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(f)]})]})},Gme=({toggleClassName:e,ranges:t,value:n,setValue:r})=>m.jsxs(_h,{children:[m.jsx(gh,{caret:!0,color:"link",className:e,children:"Paginate"}),m.jsxs(mu,{end:!0,children:[t.map(i=>m.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[m.jsx("b",{children:i})," items per page"]},i)),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:m.jsx("i",{children:"Clear pagination"})})]})]}),Kme=e=>e.startsWith("hidden")?"":e,Zme=e=>!!e&&Object.keys(e).length>0,Qme=e=>e.length>20?e.length*10:void 0,Xme=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:Jre,borderColor:tO,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:eie,borderColor:J4,borderWidth:2}]},Jme=(e,t,n,r)=>({labels:e,datasets:Xme(t,n,r)}),ege=(e,[t],n)=>{!n||!t||n(e[t.index])},tge=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=ao(e).map(Kme),s=hu(Zme(t)?ao(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),a=eC(t??{},o),l=V.useRef(null),c=V.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:g5}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:wn}},y:{stacked:!0}},onHover:m5,indexAxis:"y"},d=Jme(o,s,a,n),p=Qme(o),g=(v,y)=>m.jsx(Ome,{ref:y,data:d,options:f,height:p,onClick:x=>ege(o,p5(y.current,x),r)},`${p}_${v}`);return m.jsxs(m.Fragment,{children:[t!==void 0&&g("with_stats",l),t===void 0&&g("without_stats",c)]})},nge=e=>Eg(e)==="String"?aG(e):e,zj=([e])=>e,Vj=([,e])=>e,om=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...s})=>{const[a,l]=V.useState({}),[c,f]=V.useState(1),[d,p]=V.useState(50),g=(D,R)=>{const z=yb(D),N=a.field?iG(Mt(a.field===Object.keys(R)[0]?zj:Vj,nge),z):z;return!a.dir||a.dir==="ASC"?N:vb(N)},v=D=>{const R=D[c-1];if(c[`hidden_${N}`,0])]},y=D=>m.jsx(YO,{currentPage:c,pagesCount:D,setCurrentPage:f}),x=(D,R,z)=>{const N=g(D,R),H=N.map(zj),W=z&&yb({...fA(H,H.map(()=>0)),...z});if(N.length<=d)return{currentPageStats:gf(N),currentPageHighlightedStats:W&&gf(W)};const ne=Md(d,N),q=W&&Md(d,W);return{currentPageStats:gf(v(ne)),currentPageHighlightedStats:q&&gf(v(q)),pagination:y(ne.length),max:Hue(Math.max(...N.map(Vj)))}},{currentPageStats:b,currentPageHighlightedStats:w,pagination:S,max:C}=x(e,r,t&&Object.keys(t).length>0?t:void 0),T=Object.keys(b),k=()=>m.jsxs(m.Fragment,{children:[n,m.jsx("div",{className:"float-end",children:m.jsx(wh,{isButton:!1,right:!0,items:r,order:a,onChange:(D,R)=>{l({field:D,dir:R}),f(1)}})}),o&&Object.keys(e).length>50&&m.jsx("div",{className:"float-end",children:m.jsx(Gme,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:d,setValue:D=>{p(D),f(1)}})}),i&&m.jsx("div",{className:"float-end",children:i(S?T:void 0)})]});return m.jsx(u5,{title:k,footer:S,children:m.jsx(tge,{stats:b,highlightedStats:w,max:C,...s})})},rge=()=>{const e=co(),{search:t}=gn(),{filtering:n,domain:r}=V.useMemo(Mt(()=>gl(t),({startDate:o,endDate:s,orphanVisitsType:a,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||s!=null?sI(o,s):void 0,visitsFilter:{orphanVisitsType:a,excludeBots:Yo(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:s,visitsFilter:a}=cA(n,o),{excludeBots:l,orphanVisitsType:c}=a,f={startDate:(s==null?void 0:s.startDate)&&Qs(s.startDate)||"",endDate:(s==null?void 0:s.endDate)&&Qs(s.endDate)||"",excludeBots:l===void 0?void 0:fI(l),orphanVisitsType:c,domain:r},d=Sh(f),p=Gn(d)?"":`?${d}`;e(p,{replace:!0,relative:"route"})}]};function y5(e,t){const n=V.useRef(t);V.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 ige=1;function oge(e){return Object.freeze({__version:ige,map:e})}function sge(e,t){return Object.freeze({...e,...t})}const _5=V.createContext(null),b5=_5.Provider;function w5(){const e=V.useContext(_5);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function age(e){function t(n,r){const{instance:i,context:o}=e(n).current;return V.useImperativeHandle(r,()=>i),n.children==null?null:Y.createElement(b5,{value:o},n.children)}return V.forwardRef(t)}function lge(e){function t(n,r){const[i,o]=V.useState(!1),{instance:s}=e(n,o).current;V.useImperativeHandle(r,()=>s),V.useEffect(function(){i&&s.update()},[s,i,n.children]);const a=s._contentNode;return a?cu.createPortal(n.children,a):null}return V.forwardRef(t)}function cge(e){function t(n,r){const{instance:i}=e(n).current;return V.useImperativeHandle(r,()=>i),null}return V.forwardRef(t)}function x5(e,t){const n=V.useRef();V.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 nC(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function uge(e,t){return function(r,i){const o=w5(),s=e(nC(r,o),o);return y5(o.map,r.attribution),x5(s.current,r.eventHandlers),t(s.current,o,r,i),s}}var jx={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)})(Gl,function(n){var r="1.9.4";function i(u){var h,_,O,P;for(_=1,O=arguments.length;_"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(u){return this.clone()._add(A(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(A(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new G(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new G(this.x/u.x,this.y/u.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=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=A(u);var h=u.x-this.x,_=u.y-this.y;return Math.sqrt(h*h+_*_)},equals:function(u){return u=A(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=A(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function A(u,h,_){return u instanceof G?u:S(u)?new G(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new G(u.x,u.y):new G(u,h,_)}function B(u,h){if(u)for(var _=h?[u,h]:u,O=0,P=_.length;O=this.min.x&&_.x<=this.max.x&&h.y>=this.min.y&&_.y<=this.max.y},intersects:function(u){u=re(u);var h=this.min,_=this.max,O=u.min,P=u.max,$=P.x>=h.x&&O.x<=_.x,te=P.y>=h.y&&O.y<=_.y;return $&&te},overlaps:function(u){u=re(u);var h=this.min,_=this.max,O=u.min,P=u.max,$=P.x>h.x&&O.x<_.x,te=P.y>h.y&&O.y<_.y;return $&&te},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var h=this.min,_=this.max,O=Math.abs(h.x-_.x)*u,P=Math.abs(h.y-_.y)*u;return re(A(h.x-O,h.y-P),A(_.x+O,_.y+P))},equals:function(u){return u?(u=re(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function re(u,h){return!u||u instanceof B?u:new B(u,h)}function U(u,h){if(u)for(var _=h?[u,h]:u,O=0,P=_.length;O=h.lat&&P.lat<=_.lat&&O.lng>=h.lng&&P.lng<=_.lng},intersects:function(u){u=Z(u);var h=this._southWest,_=this._northEast,O=u.getSouthWest(),P=u.getNorthEast(),$=P.lat>=h.lat&&O.lat<=_.lat,te=P.lng>=h.lng&&O.lng<=_.lng;return $&&te},overlaps:function(u){u=Z(u);var h=this._southWest,_=this._northEast,O=u.getSouthWest(),P=u.getNorthEast(),$=P.lat>h.lat&&O.lat<_.lat,te=P.lng>h.lng&&O.lng<_.lng;return $&&te},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,h){return u?(u=Z(u),this._southWest.equals(u.getSouthWest(),h)&&this._northEast.equals(u.getNorthEast(),h)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Z(u,h){return u instanceof U?u:new U(u,h)}function ie(u,h,_){if(isNaN(u)||isNaN(h))throw new Error("Invalid LatLng object: ("+u+", "+h+")");this.lat=+u,this.lng=+h,_!==void 0&&(this.alt=+_)}ie.prototype={equals:function(u,h){if(!u)return!1;u=se(u);var _=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return _<=(h===void 0?1e-9:h)},toString:function(u){return"LatLng("+p(this.lat,u)+", "+p(this.lng,u)+")"},distanceTo:function(u){return E.distance(this,se(u))},wrap:function(){return E.wrapLatLng(this)},toBounds:function(u){var h=180*u/40075017,_=h/Math.cos(Math.PI/180*this.lat);return Z([this.lat-h,this.lng-_],[this.lat+h,this.lng+_])},clone:function(){return new ie(this.lat,this.lng,this.alt)}};function se(u,h,_){return u instanceof ie?u:S(u)&&typeof u[0]!="object"?u.length===3?new ie(u[0],u[1],u[2]):u.length===2?new ie(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new ie(u.lat,"lng"in u?u.lng:u.lon,u.alt):h===void 0?null:new ie(u,h,_)}var pe={latLngToPoint:function(u,h){var _=this.projection.project(u),O=this.scale(h);return this.transformation._transform(_,O)},pointToLatLng:function(u,h){var _=this.scale(h),O=this.transformation.untransform(u,_);return this.projection.unproject(O)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var h=this.projection.bounds,_=this.scale(u),O=this.transformation.transform(h.min,_),P=this.transformation.transform(h.max,_);return new B(O,P)},infinite:!1,wrapLatLng:function(u){var h=this.wrapLng?f(u.lng,this.wrapLng,!0):u.lng,_=this.wrapLat?f(u.lat,this.wrapLat,!0):u.lat,O=u.alt;return new ie(_,h,O)},wrapLatLngBounds:function(u){var h=u.getCenter(),_=this.wrapLatLng(h),O=h.lat-_.lat,P=h.lng-_.lng;if(O===0&&P===0)return u;var $=u.getSouthWest(),te=u.getNorthEast(),fe=new ie($.lat-O,$.lng-P),he=new ie(te.lat-O,te.lng-P);return new U(fe,he)}},E=i({},pe,{wrapLng:[-180,180],R:6371e3,distance:function(u,h){var _=Math.PI/180,O=u.lat*_,P=h.lat*_,$=Math.sin((h.lat-u.lat)*_/2),te=Math.sin((h.lng-u.lng)*_/2),fe=$*$+Math.cos(O)*Math.cos(P)*te*te,he=2*Math.atan2(Math.sqrt(fe),Math.sqrt(1-fe));return this.R*he}}),M=6378137,I={R:M,MAX_LATITUDE:85.0511287798,project:function(u){var h=Math.PI/180,_=this.MAX_LATITUDE,O=Math.max(Math.min(_,u.lat),-_),P=Math.sin(O*h);return new G(this.R*u.lng*h,this.R*Math.log((1+P)/(1-P))/2)},unproject:function(u){var h=180/Math.PI;return new ie((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*h,u.x*h/this.R)},bounds:function(){var u=M*Math.PI;return new B([-u,-u],[u,u])}()};function X(u,h,_,O){if(S(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=h,this._c=_,this._d=O}X.prototype={transform:function(u,h){return this._transform(u.clone(),h)},_transform:function(u,h){return h=h||1,u.x=h*(this._a*u.x+this._b),u.y=h*(this._c*u.y+this._d),u},untransform:function(u,h){return h=h||1,new G((u.x/h-this._b)/this._a,(u.y/h-this._d)/this._c)}};function Q(u,h,_,O){return new X(u,h,_,O)}var ae=i({},E,{code:"EPSG:3857",projection:I,transformation:function(){var u=.5/(Math.PI*I.R);return Q(u,.5,-u,.5)}()}),ge=i({},ae,{code:"EPSG:900913"});function De(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function ue(u,h){var _="",O,P,$,te,fe,he;for(O=0,$=u.length;O<$;O++){for(fe=u[O],P=0,te=fe.length;P1,tn=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",d,h),window.removeEventListener("testPassiveEventSupport",d,h)}catch{}return u}(),lr=function(){return!!document.createElement("canvas").getContext}(),Fn=!!(document.createElementNS&&De("svg").createSVGRect),$n=!!Fn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),vn=!Fn&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),yi=navigator.platform.indexOf("Mac")===0,_i=navigator.platform.indexOf("Linux")===0;function Bn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Ve={ie:_e,ielt9:Ce,edge:Le,webkit:Me,android:je,android23:ce,androidStock:be,opera:ye,chrome:Se,gecko:Pe,safari:Ne,phantom:Qe,opera12:et,win:qe,ie3d:Gt,webkit3d:zt,gecko3d:Sn,any3d:ar,mobile:Fi,mobileWebkit:In,mobileWebkit3d:Su,msPointer:$i,pointer:Ah,touch:Fh,touchNative:Ih,mobileOpera:Ou,mobileGecko:aa,retina:un,passiveEvents:tn,canvas:lr,svg:Fn,vml:vn,inlineSvg:$n,mac:yi,linux:_i},cC=Ve.msPointer?"MSPointerDown":"pointerdown",uC=Ve.msPointer?"MSPointerMove":"pointermove",fC=Ve.msPointer?"MSPointerUp":"pointerup",dC=Ve.msPointer?"MSPointerCancel":"pointercancel",Hy={touchstart:cC,touchmove:uC,touchend:fC,touchcancel:dC},hC={touchstart:n8,touchmove:$h,touchend:$h,touchcancel:$h},xl={},pC=!1;function Q5(u,h,_){return h==="touchstart"&&t8(),hC[h]?(_=hC[h].bind(this,_),u.addEventListener(Hy[h],_,!1),_):(console.warn("wrong event specified:",h),d)}function X5(u,h,_){if(!Hy[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(Hy[h],_,!1)}function J5(u){xl[u.pointerId]=u}function e8(u){xl[u.pointerId]&&(xl[u.pointerId]=u)}function mC(u){delete xl[u.pointerId]}function t8(){pC||(document.addEventListener(cC,J5,!0),document.addEventListener(uC,e8,!0),document.addEventListener(fC,mC,!0),document.addEventListener(dC,mC,!0),pC=!0)}function $h(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var _ in xl)h.touches.push(xl[_]);h.changedTouches=[h],u(h)}}function n8(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&Un(h),$h(u,h)}function r8(u){var h={},_,O;for(O in u)_=u[O],h[O]=_&&_.bind?_.bind(u):_;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var i8=200;function o8(u,h){u.addEventListener("dblclick",h);var _=0,O;function P($){if($.detail!==1){O=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var te=bC($);if(!(te.some(function(he){return he instanceof HTMLLabelElement&&he.attributes.for})&&!te.some(function(he){return he instanceof HTMLInputElement||he instanceof HTMLSelectElement}))){var fe=Date.now();fe-_<=i8?(O++,O===2&&h(r8($))):O=1,_=fe}}}return u.addEventListener("click",P),{dblclick:h,simDblclick:P}}function s8(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var Wy=zh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Cu=zh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),gC=Cu==="webkitTransition"||Cu==="OTransition"?Cu+"End":"transitionend";function vC(u){return typeof u=="string"?document.getElementById(u):u}function Eu(u,h){var _=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!_||_==="auto")&&document.defaultView){var O=document.defaultView.getComputedStyle(u,null);_=O?O[h]:null}return _==="auto"?null:_}function mt(u,h,_){var O=document.createElement(u);return O.className=h||"",_&&_.appendChild(O),O}function Vt(u){var h=u.parentNode;h&&h.removeChild(u)}function Bh(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Sl(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Ol(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function Yy(u,h){if(u.classList!==void 0)return u.classList.contains(h);var _=Uh(u);return _.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(_)}function Ze(u,h){if(u.classList!==void 0)for(var _=v(h),O=0,P=_.length;O0?2*window.devicePixelRatio:1;function xC(u){return Ve.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/c8:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function i0(u,h){var _=h.relatedTarget;if(!_)return!0;try{for(;_&&_!==u;)_=_.parentNode}catch{return!1}return _!==u}var u8={__proto__:null,on:Ge,off:Tt,stopPropagation:ua,disableScrollPropagation:r0,disableClickPropagation:Mu,preventDefault:Un,stop:fa,getPropagationPath:bC,getMousePosition:wC,getWheelDelta:xC,isExternalTarget:i0,addListener:Ge,removeListener:Tt},SC=le.extend({run:function(u,h,_,O){this.stop(),this._el=u,this._inProgress=!0,this._duration=_||.25,this._easeOutPower=1/Math.max(O||.5,.2),this._startPos=ca(u),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=H(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,_=this._duration*1e3;h<_?this._runFrame(this._easeOut(h/_),u):(this._runFrame(1),this._complete())},_runFrame:function(u,h){var _=this._startPos.add(this._offset.multiplyBy(u));h&&_._round(),fn(this._el,_),this.fire("step")},_complete:function(){W(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),lt=le.extend({options:{crs:ae,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,h){h=y(this,h),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),h.maxBounds&&this.setMaxBounds(h.maxBounds),h.zoom!==void 0&&(this._zoom=this._limitZoom(h.zoom)),h.center&&h.zoom!==void 0&&this.setView(se(h.center),h.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Cu&&Ve.any3d&&!Ve.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ge(this._proxy,gC,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,h,_){if(h=h===void 0?this._zoom:this._limitZoom(h),u=this._limitCenter(se(u),h,this.options.maxBounds),_=_||{},this._stop(),this._loaded&&!_.reset&&_!==!0){_.animate!==void 0&&(_.zoom=i({animate:_.animate},_.zoom),_.pan=i({animate:_.animate,duration:_.duration},_.pan));var O=this._zoom!==h?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,h,_.zoom):this._tryAnimatedPan(u,_.pan);if(O)return clearTimeout(this._sizeTimer),this}return this._resetView(u,h,_.pan&&_.pan.noMoveStart),this},setZoom:function(u,h){return this._loaded?this.setView(this.getCenter(),u,{zoom:h}):(this._zoom=u,this)},zoomIn:function(u,h){return u=u||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,h)},zoomOut:function(u,h){return u=u||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,h)},setZoomAround:function(u,h,_){var O=this.getZoomScale(h),P=this.getSize().divideBy(2),$=u instanceof G?u:this.latLngToContainerPoint(u),te=$.subtract(P).multiplyBy(1-1/O),fe=this.containerPointToLatLng(P.add(te));return this.setView(fe,h,{zoom:_})},_getBoundsCenterZoom:function(u,h){h=h||{},u=u.getBounds?u.getBounds():Z(u);var _=A(h.paddingTopLeft||h.padding||[0,0]),O=A(h.paddingBottomRight||h.padding||[0,0]),P=this.getBoundsZoom(u,!1,_.add(O));if(P=typeof h.maxZoom=="number"?Math.min(h.maxZoom,P):P,P===1/0)return{center:u.getCenter(),zoom:P};var $=O.subtract(_).divideBy(2),te=this.project(u.getSouthWest(),P),fe=this.project(u.getNorthEast(),P),he=this.unproject(te.add(fe).divideBy(2).add($),P);return{center:he,zoom:P}},fitBounds:function(u,h){if(u=Z(u),!u.isValid())throw new Error("Bounds are not valid.");var _=this._getBoundsCenterZoom(u,h);return this.setView(_.center,_.zoom,h)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,h){return this.setView(u,this._zoom,{pan:h})},panBy:function(u,h){if(u=A(u).round(),h=h||{},!u.x&&!u.y)return this.fire("moveend");if(h.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new SC,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),h.noMoveStart||this.fire("movestart"),h.animate!==!1){Ze(this._mapPane,"leaflet-pan-anim");var _=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,_,h.duration||.25,h.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,h,_){if(_=_||{},_.animate===!1||!Ve.any3d)return this.setView(u,h,_);this._stop();var O=this.project(this.getCenter()),P=this.project(u),$=this.getSize(),te=this._zoom;u=se(u),h=h===void 0?te:h;var fe=Math.max($.x,$.y),he=fe*this.getZoomScale(te,h),xe=P.distanceTo(O)||1,Ae=1.42,We=Ae*Ae;function Xe(dn){var np=dn?-1:1,X8=dn?he:fe,J8=he*he-fe*fe+np*We*We*xe*xe,eF=2*X8*We*xe,m0=J8/eF,rE=Math.sqrt(m0*m0+1)-m0,tF=rE<1e-9?-18:Math.log(rE);return tF}function cr(dn){return(Math.exp(dn)-Math.exp(-dn))/2}function On(dn){return(Math.exp(dn)+Math.exp(-dn))/2}function ei(dn){return cr(dn)/On(dn)}var _r=Xe(0);function Ml(dn){return fe*(On(_r)/On(_r+Ae*dn))}function G8(dn){return fe*(On(_r)*ei(_r+Ae*dn)-cr(_r))/We}function K8(dn){return 1-Math.pow(1-dn,1.5)}var Z8=Date.now(),tE=(Xe(1)-_r)/Ae,Q8=_.duration?1e3*_.duration:1e3*tE*.8;function nE(){var dn=(Date.now()-Z8)/Q8,np=K8(dn)*tE;dn<=1?(this._flyToFrame=H(nE,this),this._move(this.unproject(O.add(P.subtract(O).multiplyBy(G8(np)/xe)),te),this.getScaleZoom(fe/Ml(np),te),{flyTo:!0})):this._move(u,h)._moveEnd(!0)}return this._moveStart(!0,_.noMoveStart),nE.call(this),this},flyToBounds:function(u,h){var _=this._getBoundsCenterZoom(u,h);return this.flyTo(_.center,_.zoom,h)},setMaxBounds:function(u){return u=Z(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var h=this.options.minZoom;return this.options.minZoom=u,this._loaded&&h!==u&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var _=this.getCenter(),O=this._limitCenter(_,this._zoom,Z(u));return _.equals(O)||this.panTo(O,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var _=A(h.paddingTopLeft||h.padding||[0,0]),O=A(h.paddingBottomRight||h.padding||[0,0]),P=this.project(this.getCenter()),$=this.project(u),te=this.getPixelBounds(),fe=re([te.min.add(_),te.max.subtract(O)]),he=fe.getSize();if(!fe.contains($)){this._enforcingBounds=!0;var xe=$.subtract(fe.getCenter()),Ae=fe.extend($).getSize().subtract(he);P.x+=xe.x<0?-Ae.x:Ae.x,P.y+=xe.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(P),h),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var _=this.getSize(),O=h.divideBy(2).round(),P=_.divideBy(2).round(),$=O.subtract(P);return!$.x&&!$.y?this:(u.animate&&u.pan?this.panBy($):(u.pan&&this._rawPanBy($),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:_}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=s(this._handleGeolocationResponse,this),_=s(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,_,u):navigator.geolocation.getCurrentPosition(h,_,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var h=u.code,_=u.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: "+_+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,_=u.coords.longitude,O=new ie(h,_),P=O.toBounds(u.coords.accuracy*2),$=this._locateOptions;if($.setView){var te=this.getBoundsZoom(P);this.setView(O,$.maxZoom?Math.min(te,$.maxZoom):te)}var fe={latlng:O,bounds:P,timestamp:u.timestamp};for(var he in u.coords)typeof u.coords[he]=="number"&&(fe[he]=u.coords[he]);this.fire("locationfound",fe)}},addHandler:function(u,h){if(!h)return this;var _=this[u]=new h(this);return this._handlers.push(_),this.options[u]&&_.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(),Vt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(W(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)Vt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var _="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),O=mt("div",_,h||this._mapPane);return u&&(this._panes[u]=O),O},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),h=this.unproject(u.getBottomLeft()),_=this.unproject(u.getTopRight());return new U(h,_)},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(u,h,_){u=Z(u),_=A(_||[0,0]);var O=this.getZoom()||0,P=this.getMinZoom(),$=this.getMaxZoom(),te=u.getNorthWest(),fe=u.getSouthEast(),he=this.getSize().subtract(_),xe=re(this.project(fe,O),this.project(te,O)).getSize(),Ae=Ve.any3d?this.options.zoomSnap:1,We=he.x/xe.x,Xe=he.y/xe.y,cr=h?Math.max(We,Xe):Math.min(We,Xe);return O=this.getScaleZoom(cr,O),Ae&&(O=Math.round(O/(Ae/100))*(Ae/100),O=h?Math.ceil(O/Ae)*Ae:Math.floor(O/Ae)*Ae),Math.max(P,Math.min($,O))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,h){var _=this._getTopLeftPoint(u,h);return new B(_,_.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,h){var _=this.options.crs;return h=h===void 0?this._zoom:h,_.scale(u)/_.scale(h)},getScaleZoom:function(u,h){var _=this.options.crs;h=h===void 0?this._zoom:h;var O=_.zoom(u*_.scale(h));return isNaN(O)?1/0:O},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(se(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(A(u),h)},layerPointToLatLng:function(u){var h=A(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(se(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(se(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(Z(u))},distance:function(u,h){return this.options.crs.distance(se(u),se(h))},containerPointToLayerPoint:function(u){return A(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return A(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(A(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(se(u)))},mouseEventToContainerPoint:function(u){return wC(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var h=this._container=vC(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ge(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ve.any3d,Ze(u,"leaflet-container"+(Ve.touch?" leaflet-touch":"")+(Ve.retina?" leaflet-retina":"")+(Ve.ielt9?" leaflet-oldie":"")+(Ve.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=Eu(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),fn(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ze(u.markerPane,"leaflet-zoom-hide"),Ze(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,_){fn(this._mapPane,new G(0,0));var O=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var P=this._zoom!==h;this._moveStart(P,_)._move(u,h)._moveEnd(P),this.fire("viewreset"),O&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,_,O){h===void 0&&(h=this._zoom);var P=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),O?_&&_.pinch&&this.fire("zoom",_):((P||_&&_.pinch)&&this.fire("zoom",_),this.fire("move",_)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return W(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){fn(this._mapPane,this._getMapPanePos().subtract(u))},_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(u){this._targets={},this._targets[l(this._container)]=this;var h=u?Tt:Ge;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),Ve.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){W(this._resizeRequest),this._resizeRequest=H(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,h){for(var _=[],O,P=h==="mouseout"||h==="mouseover",$=u.target||u.srcElement,te=!1;$;){if(O=this._targets[l($)],O&&(h==="click"||h==="preclick")&&this._draggableMoved(O)){te=!0;break}if(O&&O.listens(h,!0)&&(P&&!i0($,u)||(_.push(O),P))||$===this._container)break;$=$.parentNode}return!_.length&&!te&&!P&&this.listens(h,!0)&&(_=[this]),_},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var _=u.type;_==="mousedown"&&Xy(h),this._fireDOMEvent(u,_)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,_){if(u.type==="click"){var O=i({},u);O.type="preclick",this._fireDOMEvent(O,O.type,_)}var P=this._findEventTargets(u,h);if(_){for(var $=[],te=0;te<_.length;te++)_[te].listens(h,!0)&&$.push(_[te]);P=$.concat(P)}if(P.length){h==="contextmenu"&&Un(u);var fe=P[0],he={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var xe=fe.getLatLng&&(!fe._radius||fe._radius<=10);he.containerPoint=xe?this.latLngToContainerPoint(fe.getLatLng()):this.mouseEventToContainerPoint(u),he.layerPoint=this.containerPointToLayerPoint(he.containerPoint),he.latlng=xe?fe.getLatLng():this.layerPointToLatLng(he.layerPoint)}for(te=0;te0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),_=this.getMaxZoom(),O=Ve.any3d?this.options.zoomSnap:1;return O&&(u=Math.round(u/O)*O),Math.max(h,Math.min(_,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){nn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var _=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(_)?!1:(this.panBy(_,h),!0)},_createAnimProxy:function(){var u=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var _=Wy,O=this._proxy.style[_];la(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),O===this._proxy.style[_]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Vt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();la(this._proxy,this.project(u,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,h,_){if(this._animatingZoom)return!0;if(_=_||{},!this._zoomAnimated||_.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var O=this.getZoomScale(h),P=this._getCenterOffset(u)._divideBy(1-1/O);return _.animate!==!0&&!this.getSize().contains(P)?!1:(H(function(){this._moveStart(!0,_.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,_,O){this._mapPane&&(_&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Ze(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:O}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&nn(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 f8(u,h){return new lt(u,h)}var bi=q.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),_=this.getPosition(),O=u._controlCorners[_];return Ze(h,"leaflet-control"),_.indexOf("bottom")!==-1?O.insertBefore(h,O.firstChild):O.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Vt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),ju=function(u){return new bi(u)};lt.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",_=this._controlContainer=mt("div",h+"control-container",this._container);function O(P,$){var te=h+P+" "+h+$;u[P+$]=mt("div",te,_)}O("top","left"),O("top","right"),O("bottom","left"),O("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Vt(this._controlCorners[u]);Vt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var OC=bi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,_,O){return _1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),_=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;_&&this._map.fire(_,h)},_createRadioElement:function(u,h){var _='",O=document.createElement("div");return O.innerHTML=_,O.firstChild},_addItem:function(u){var h=document.createElement("label"),_=this._map.hasLayer(u.layer),O;u.overlay?(O=document.createElement("input"),O.type="checkbox",O.className="leaflet-control-layers-selector",O.defaultChecked=_):O=this._createRadioElement("leaflet-base-layers_"+l(this),_),this._layerControlInputs.push(O),O.layerId=l(u.layer),Ge(O,"click",this._onInputClick,this);var P=document.createElement("span");P.innerHTML=" "+u.name;var $=document.createElement("span");h.appendChild($),$.appendChild(O),$.appendChild(P);var te=u.overlay?this._overlaysList:this._baseLayersList;return te.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,_,O=[],P=[];this._handlingClick=!0;for(var $=u.length-1;$>=0;$--)h=u[$],_=this._getLayer(h.layerId).layer,h.checked?O.push(_):h.checked||P.push(_);for($=0;$=0;P--)h=u[P],_=this._getLayer(h.layerId).layer,h.disabled=_.options.minZoom!==void 0&&O<_.options.minZoom||_.options.maxZoom!==void 0&&O>_.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,Ge(u,"click",Un),this.expand();var h=this;setTimeout(function(){Tt(u,"click",Un),h._preventClick=!1})}}),d8=function(u,h,_){return new OC(u,h,_)},o0=bi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",_=mt("div",h+" leaflet-bar"),O=this.options;return this._zoomInButton=this._createButton(O.zoomInText,O.zoomInTitle,h+"-in",_,this._zoomIn),this._zoomOutButton=this._createButton(O.zoomOutText,O.zoomOutTitle,h+"-out",_,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),_},onRemove:function(u){u.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(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,h,_,O,P){var $=mt("a",_,O);return $.innerHTML=u,$.href="#",$.title=h,$.setAttribute("role","button"),$.setAttribute("aria-label",h),Mu($),Ge($,"click",fa),Ge($,"click",P,this),Ge($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";nn(this._zoomInButton,h),nn(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Ze(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Ze(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});lt.mergeOptions({zoomControl:!0}),lt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o0,this.addControl(this.zoomControl))});var h8=function(u){return new o0(u)},CC=bi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",_=mt("div",h),O=this.options;return this._addScales(O,h+"-line",_),u.on(O.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),_},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,h,_){u.metric&&(this._mScale=mt("div",h,_)),u.imperial&&(this._iScale=mt("div",h,_))},_update:function(){var u=this._map,h=u.getSize().y/2,_=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(_)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),_=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,_,h/u)},_updateImperial:function(u){var h=u*3.2808399,_,O,P;h>5280?(_=h/5280,O=this._getRoundNum(_),this._updateScale(this._iScale,O+" mi",O/_)):(P=this._getRoundNum(h),this._updateScale(this._iScale,P+" ft",P/h))},_updateScale:function(u,h,_){u.style.width=Math.round(this.options.maxWidth*_)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),_=u/h;return _=_>=10?10:_>=5?5:_>=3?3:_>=2?2:1,h*_}}),p8=function(u){return new CC(u)},m8='',s0=bi.extend({options:{position:"bottomright",prefix:''+(Ve.inlineSvg?m8+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Mu(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var h in this._attributions)this._attributions[h]&&u.push(h);var _=[];this.options.prefix&&_.push(this.options.prefix),u.length&&_.push(u.join(", ")),this._container.innerHTML=_.join(' ')}}});lt.mergeOptions({attributionControl:!0}),lt.addInitHook(function(){this.options.attributionControl&&new s0().addTo(this)});var g8=function(u){return new s0(u)};bi.Layers=OC,bi.Zoom=o0,bi.Scale=CC,bi.Attribution=s0,ju.layers=d8,ju.zoom=h8,ju.scale=p8,ju.attribution=g8;var Ui=q.extend({initialize:function(u){this._map=u},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}});Ui.addTo=function(u,h){return u.addHandler(h,this),this};var v8={Events:oe},EC=Ve.touch?"touchstart mousedown":"mousedown",es=le.extend({options:{clickTolerance:3},initialize:function(u,h,_,O){y(this,O),this._element=u,this._dragStartTarget=h||u,this._preventOutline=_},enable:function(){this._enabled||(Ge(this._dragStartTarget,EC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(es._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,EC,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Yy(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){es._dragging===this&&this.finishDrag();return}if(!(es._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(es._dragging=this,this._preventOutline&&Xy(this._element),Ky(),Tu(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,_=yC(this._element);this._startPoint=new G(h.clientX,h.clientY),this._startPos=ca(this._element),this._parentScale=Jy(_);var O=u.type==="mousedown";Ge(document,O?"mousemove":"touchmove",this._onMove,this),Ge(document,O?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,_=new G(h.clientX,h.clientY)._subtract(this._startPoint);!_.x&&!_.y||Math.abs(_.x)+Math.abs(_.y)$&&(te=fe,$=he);$>_&&(h[te]=1,l0(u,h,_,O,te),l0(u,h,_,te,P))}function w8(u,h){for(var _=[u[0]],O=1,P=0,$=u.length;O<$;O++)x8(u[O],u[P])>h&&(_.push(u[O]),P=O);return P<$-1&&_.push(u[$-1]),_}var jC;function DC(u,h,_,O,P){var $=O?jC:da(u,_),te=da(h,_),fe,he,xe;for(jC=te;;){if(!($|te))return[u,h];if($&te)return!1;fe=$||te,he=Wh(u,h,fe,_,P),xe=da(he,_),fe===$?(u=he,$=xe):(h=he,te=xe)}}function Wh(u,h,_,O,P){var $=h.x-u.x,te=h.y-u.y,fe=O.min,he=O.max,xe,Ae;return _&8?(xe=u.x+$*(he.y-u.y)/te,Ae=he.y):_&4?(xe=u.x+$*(fe.y-u.y)/te,Ae=fe.y):_&2?(xe=he.x,Ae=u.y+te*(he.x-u.x)/$):_&1&&(xe=fe.x,Ae=u.y+te*(fe.x-u.x)/$),new G(xe,Ae,P)}function da(u,h){var _=0;return u.xh.max.x&&(_|=2),u.yh.max.y&&(_|=8),_}function x8(u,h){var _=h.x-u.x,O=h.y-u.y;return _*_+O*O}function Du(u,h,_,O){var P=h.x,$=h.y,te=_.x-P,fe=_.y-$,he=te*te+fe*fe,xe;return he>0&&(xe=((u.x-P)*te+(u.y-$)*fe)/he,xe>1?(P=_.x,$=_.y):xe>0&&(P+=te*xe,$+=fe*xe)),te=u.x-P,fe=u.y-$,O?te*te+fe*fe:new G(P,$)}function Jr(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function LC(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Jr(u)}function RC(u,h){var _,O,P,$,te,fe,he,xe;if(!u||u.length===0)throw new Error("latlngs not passed");Jr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ae=se([0,0]),We=Z(u),Xe=We.getNorthWest().distanceTo(We.getSouthWest())*We.getNorthEast().distanceTo(We.getNorthWest());Xe<1700&&(Ae=a0(u));var cr=u.length,On=[];for(_=0;_O){he=($-O)/P,xe=[fe.x-he*(fe.x-te.x),fe.y-he*(fe.y-te.y)];break}var _r=h.unproject(A(xe));return se([_r.lat+Ae.lat,_r.lng+Ae.lng])}var S8={__proto__:null,simplify:PC,pointToSegmentDistance:MC,closestPointOnSegment:_8,clipSegment:DC,_getEdgeIntersection:Wh,_getBitCode:da,_sqClosestPointOnSegment:Du,isFlat:Jr,_flat:LC,polylineCenter:RC},c0={project:function(u){return new G(u.lng,u.lat)},unproject:function(u){return new ie(u.y,u.x)},bounds:new B([-180,-90],[180,90])},u0={R:6378137,R_MINOR:6356752314245179e-9,bounds:new B([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,_=this.R,O=u.lat*h,P=this.R_MINOR/_,$=Math.sqrt(1-P*P),te=$*Math.sin(O),fe=Math.tan(Math.PI/4-O/2)/Math.pow((1-te)/(1+te),$/2);return O=-_*Math.log(Math.max(fe,1e-10)),new G(u.lng*h*_,O)},unproject:function(u){for(var h=180/Math.PI,_=this.R,O=this.R_MINOR/_,P=Math.sqrt(1-O*O),$=Math.exp(-u.y/_),te=Math.PI/2-2*Math.atan($),fe=0,he=.1,xe;fe<15&&Math.abs(he)>1e-7;fe++)xe=P*Math.sin(te),xe=Math.pow((1-xe)/(1+xe),P/2),he=Math.PI/2-2*Math.atan($*xe)-te,te+=he;return new ie(te*h,u.x*h/_)}},O8={__proto__:null,LonLat:c0,Mercator:u0,SphericalMercator:I},C8=i({},E,{code:"EPSG:3395",projection:u0,transformation:function(){var u=.5/(Math.PI*u0.R);return Q(u,.5,-u,.5)}()}),NC=i({},E,{code:"EPSG:4326",projection:c0,transformation:Q(1/180,1,-1/180,.5)}),E8=i({},pe,{projection:c0,transformation:Q(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var _=h.lng-u.lng,O=h.lat-u.lat;return Math.sqrt(_*_+O*O)},infinite:!0});pe.Earth=E,pe.EPSG3395=C8,pe.EPSG3857=ae,pe.EPSG900913=ge,pe.EPSG4326=NC,pe.Simple=E8;var wi=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var _=this.getEvents();h.on(_,this),this.once("remove",function(){h.off(_,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});lt.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,h){for(var _ in this._layers)u.call(h,this._layers[_]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var h=0,_=u.length;h<_;h++)this.addLayer(u[h])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[l(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var h=l(u);this._zoomBoundLayers[h]&&(delete this._zoomBoundLayers[h],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,h=-1/0,_=this._getZoomSpan();for(var O in this._zoomBoundLayers){var P=this._zoomBoundLayers[O].options;u=P.minZoom===void 0?u:Math.min(u,P.minZoom),h=P.maxZoom===void 0?h:Math.max(h,P.maxZoom)}this._layersMaxZoom=h===-1/0?void 0:h,this._layersMinZoom=u===1/0?void 0:u,_!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof ie&&h[0].equals(h[_-1])&&h.pop(),h},_setLatLngs:function(u){po.prototype._setLatLngs.call(this,u),Jr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Jr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,_=new G(h,h);if(u=new B(u.min.subtract(_),u.max.add(_)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var O=0,P=this._rings.length,$;Ou.y!=P.y>u.y&&u.x<(P.x-O.x)*(u.y-O.y)/(P.y-O.y)+O.x&&(h=!h);return h||po.prototype._containsPoint.call(this,u,!0)}});function R8(u,h){return new Tl(u,h)}var mo=ho.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=S(u)?u:u.features,_,O,P;if(h){for(_=0,O=h.length;_0&&P.push(P[0].slice()),P}function kl(u,h){return u.feature?i({},u.feature,{geometry:h}):Qh(h)}function Qh(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var p0={toGeoJSON:function(u){return kl(this,{type:"Point",coordinates:h0(this.getLatLng(),u)})}};Yh.include(p0),f0.include(p0),qh.include(p0),po.include({toGeoJSON:function(u){var h=!Jr(this._latlngs),_=Zh(this._latlngs,h?1:0,!1,u);return kl(this,{type:(h?"Multi":"")+"LineString",coordinates:_})}}),Tl.include({toGeoJSON:function(u){var h=!Jr(this._latlngs),_=h&&!Jr(this._latlngs[0]),O=Zh(this._latlngs,_?2:h?1:0,!0,u);return h||(O=[O]),kl(this,{type:(_?"Multi":"")+"Polygon",coordinates:O})}}),Cl.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(_){h.push(_.toGeoJSON(u).geometry.coordinates)}),kl(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var _=h==="GeometryCollection",O=[];return this.eachLayer(function(P){if(P.toGeoJSON){var $=P.toGeoJSON(u);if(_)O.push($.geometry);else{var te=Qh($);te.type==="FeatureCollection"?O.push.apply(O,te.features):O.push(te)}}}),_?kl(this,{geometries:O,type:"GeometryCollection"}):{type:"FeatureCollection",features:O}}});function FC(u,h){return new mo(u,h)}var N8=FC,Xh=wi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,_){this._url=u,this._bounds=Z(h),y(this,_)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ze(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Vt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Sl(this._image),this},bringToBack:function(){return this._map&&Ol(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=Z(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:mt("img");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onload=s(this.fire,this,"load"),h.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),_=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;la(this._image,_,h)},_reset:function(){var u=this._image,h=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),_=h.getSize();fn(u,h.min),u.style.width=_.x+"px",u.style.height=_.y+"px"},_updateOpacity:function(){Xr(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 u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),A8=function(u,h,_){return new Xh(u,h,_)},$C=Xh.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:mt("video");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onloadeddata=s(this.fire,this,"load"),u){for(var _=h.getElementsByTagName("source"),O=[],P=0;P<_.length;P++)O.push(_[P].src);this._url=_.length>0?O:[h.src];return}S(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 $=0;$P?(h.height=P+"px",Ze(u,$)):nn(u,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),_=this._getAnchor();fn(this._container,h.add(_))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,h=parseInt(Eu(this._container,"marginBottom"),10)||0,_=this._container.offsetHeight+h,O=this._containerWidth,P=new G(this._containerLeft,-_-this._containerBottom);P._add(ca(this._container));var $=u.layerPointToContainerPoint(P),te=A(this.options.autoPanPadding),fe=A(this.options.autoPanPaddingTopLeft||te),he=A(this.options.autoPanPaddingBottomRight||te),xe=u.getSize(),Ae=0,We=0;$.x+O+he.x>xe.x&&(Ae=$.x+O-xe.x+he.x),$.x-Ae-fe.x<0&&(Ae=$.x-fe.x),$.y+_+he.y>xe.y&&(We=$.y+_-xe.y+he.y),$.y-We-fe.y<0&&(We=$.y-fe.y),(Ae||We)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ae,We]))}},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),$8=function(u,h){return new Jh(u,h)};lt.mergeOptions({closePopupOnClick:!0}),lt.include({openPopup:function(u,h,_){return this._initOverlay(Jh,u,h,_).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),wi.include({bindPopup:function(u,h){return this._popup=this._initOverlay(Jh,this._popup,u,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(u){return this._popup&&(this instanceof ho||(this._popup._source=this),this._popup._prepareOpen(u||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(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){fa(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof ts)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var ep=zi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){zi.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){zi.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=zi.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,_,O=this._map,P=this._container,$=O.latLngToContainerPoint(O.getCenter()),te=O.layerPointToContainerPoint(u),fe=this.options.direction,he=P.offsetWidth,xe=P.offsetHeight,Ae=A(this.options.offset),We=this._getAnchor();fe==="top"?(h=he/2,_=xe):fe==="bottom"?(h=he/2,_=0):fe==="center"?(h=he/2,_=xe/2):fe==="right"?(h=0,_=xe/2):fe==="left"?(h=he,_=xe/2):te.x<$.x?(fe="right",h=0,_=xe/2):(fe="left",h=he+(Ae.x+We.x)*2,_=xe/2),u=u.subtract(A(h,_,!0)).add(Ae).add(We),nn(P,"leaflet-tooltip-right"),nn(P,"leaflet-tooltip-left"),nn(P,"leaflet-tooltip-top"),nn(P,"leaflet-tooltip-bottom"),Ze(P,"leaflet-tooltip-"+fe),fn(P,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Xr(this._container,u)},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(h)},_getAnchor:function(){return A(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),B8=function(u,h){return new ep(u,h)};lt.include({openTooltip:function(u,h,_){return this._initOverlay(ep,u,h,_).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),wi.include({bindTooltip:function(u,h){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ep,this._tooltip,u,h),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var h=u?"off":"on",_={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?_.add=this._openTooltip:(_.mouseover=this._openTooltip,_.mouseout=this.closeTooltip,_.click=this._openTooltip,this._map?this._addFocusListeners():_.add=this._addFocusListeners),this._tooltip.options.sticky&&(_.mousemove=this._moveTooltip),this[h](_),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof ho||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var h=typeof u.getElement=="function"&&u.getElement();h&&(Ge(h,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Ge(h,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var h=typeof u.getElement=="function"&&u.getElement();h&&h.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var h=this;this._map.once("moveend",function(){h._openOnceFlag=!1,h._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var h=u.latlng,_,O;this._tooltip.options.sticky&&u.originalEvent&&(_=this._map.mouseEventToContainerPoint(u.originalEvent),O=this._map.containerPointToLayerPoint(_),h=this._map.layerPointToLatLng(O)),this._tooltip.setLatLng(h)}});var UC=El.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var h=u&&u.tagName==="DIV"?u:document.createElement("div"),_=this.options;if(_.html instanceof Element?(Bh(h),h.appendChild(_.html)):h.innerHTML=_.html!==!1?_.html:"",_.bgPos){var O=A(_.bgPos);h.style.backgroundPosition=-O.x+"px "+-O.y+"px"}return this._setIconStyles(h,"icon"),h},createShadow:function(){return null}});function U8(u){return new UC(u)}El.Default=Lu;var Ru=wi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ve.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){y(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),Vt(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Sl(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Ol(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof G?u:new G(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var h=this.getPane().children,_=-u(-1/0,1/0),O=0,P=h.length,$;Othis.options.maxZoom||_O?this._retainParent(P,$,te,O):!1)},_retainChildren:function(u,h,_,O){for(var P=2*u;P<2*u+2;P++)for(var $=2*h;$<2*h+2;$++){var te=new G(P,$);te.z=_+1;var fe=this._tileCoordsToKey(te),he=this._tiles[fe];if(he&&he.active){he.retain=!0;continue}else he&&he.loaded&&(he.retain=!0);_+1this.options.maxZoom||this.options.minZoom!==void 0&&P1){this._setView(u,_);return}for(var We=P.min.y;We<=P.max.y;We++)for(var Xe=P.min.x;Xe<=P.max.x;Xe++){var cr=new G(Xe,We);if(cr.z=this._tileZoom,!!this._isValidTile(cr)){var On=this._tiles[this._tileCoordsToKey(cr)];On?On.current=!0:te.push(cr)}}if(te.sort(function(_r,Ml){return _r.distanceTo($)-Ml.distanceTo($)}),te.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ei=document.createDocumentFragment();for(Xe=0;Xe_.max.x)||!h.wrapLat&&(u.y<_.min.y||u.y>_.max.y))return!1}if(!this.options.bounds)return!0;var O=this._tileCoordsToBounds(u);return Z(this.options.bounds).overlaps(O)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,_=this.getTileSize(),O=u.scaleBy(_),P=O.add(_),$=h.unproject(O,u.z),te=h.unproject(P,u.z);return[$,te]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),_=new U(h[0],h[1]);return this.options.noWrap||(_=this._map.wrapLatLngBounds(_)),_},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var h=u.split(":"),_=new G(+h[0],+h[1]);return _.z=+h[2],_},_removeTile:function(u){var h=this._tiles[u];h&&(Vt(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Ze(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=d,u.onmousemove=d,Ve.ielt9&&this.options.opacity<1&&Xr(u,this.options.opacity)},_addTile:function(u,h){var _=this._getTilePos(u),O=this._tileCoordsToKey(u),P=this.createTile(this._wrapCoords(u),s(this._tileReady,this,u));this._initTile(P),this.createTile.length<2&&H(s(this._tileReady,this,u,null,P)),fn(P,_),this._tiles[O]={el:P,coords:u,current:!0},h.appendChild(P),this.fire("tileloadstart",{tile:P,coords:u})},_tileReady:function(u,h,_){h&&this.fire("tileerror",{error:h,tile:_,coords:u});var O=this._tileCoordsToKey(u);_=this._tiles[O],_&&(_.loaded=+new Date,this._map._fadeAnimated?(Xr(_.el,0),W(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this)):(_.active=!0,this._pruneTiles()),h||(Ze(_.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:_.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ve.ielt9||!this._map._fadeAnimated?H(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new G(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new B(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function z8(u){return new Ru(u)}var Pl=Ru.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&Ve.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(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var _=document.createElement("img");return Ge(_,"load",s(this._tileOnLoad,this,h,_)),Ge(_,"error",s(this._tileOnError,this,h,_)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(_.referrerPolicy=this.options.referrerPolicy),_.alt="",_.src=this.getTileUrl(u),_},getTileUrl:function(u){var h={r:Ve.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var _=this._globalTileRange.max.y-u.y;this.options.tms&&(h.y=_),h["-y"]=_}return w(this._url,i(h,this.options))},_tileOnLoad:function(u,h){Ve.ielt9?setTimeout(s(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,_){var O=this.options.errorTileUrl;O&&h.getAttribute("src")!==O&&(h.src=O),u(_,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,_=this.options.zoomReverse,O=this.options.zoomOffset;return _&&(u=h-u),u+O},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=d,h.onerror=d,!h.complete)){h.src=T;var _=this._tiles[u].coords;Vt(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:_})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",T),Ru.prototype._removeTile.call(this,u)},_tileReady:function(u,h,_){if(!(!this._map||_&&_.getAttribute("src")===T))return Ru.prototype._tileReady.call(this,u,h,_)}});function zC(u,h){return new Pl(u,h)}var VC=Pl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,h){this._url=u;var _=i({},this.defaultWmsParams);for(var O in h)O in this.options||(_[O]=h[O]);h=y(this,h);var P=h.detectRetina&&Ve.retina?2:1,$=this.getTileSize();_.width=$.x*P,_.height=$.y*P,this.wmsParams=_},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Pl.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),_=this._crs,O=re(_.project(h[0]),_.project(h[1])),P=O.min,$=O.max,te=(this._wmsVersion>=1.3&&this._crs===NC?[P.y,P.x,$.y,$.x]:[P.x,P.y,$.x,$.y]).join(","),fe=Pl.prototype.getTileUrl.call(this,u);return fe+x(this.wmsParams,fe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+te},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function V8(u,h){return new VC(u,h)}Pl.WMS=VC,zC.wms=V8;var go=wi.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ze(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 u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,h){var _=this._map.getZoomScale(h,this._zoom),O=this._map.getSize().multiplyBy(.5+this.options.padding),P=this._map.project(this._center,h),$=O.multiplyBy(-_).add(P).subtract(this._map._getNewPixelOrigin(u,h));Ve.any3d?la(this._container,$,_):fn(this._container,$)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,h=this._map.getSize(),_=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new B(_,_.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),HC=go.extend({options:{tolerance:0},getEvents:function(){var u=go.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){go.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ge(u,"mousemove",this._onMouseMove,this),Ge(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ge(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){W(this._redrawRequest),delete this._ctx,Vt(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){go.prototype._update.call(this);var u=this._bounds,h=this._container,_=u.getSize(),O=Ve.retina?2:1;fn(h,u.min),h.width=O*_.x,h.height=O*_.y,h.style.width=_.x+"px",h.style.height=_.y+"px",Ve.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){go.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,_=h.next,O=h.prev;_?_.prev=O:this._drawLast=O,O?O.next=_:this._drawFirst=_,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var h=u.options.dashArray.split(/[, ]+/),_=[],O,P;for(P=0;P')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),H8={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(go.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=Nu("shape");Ze(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=Nu("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Vt(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,_=u._fill,O=u.options,P=u._container;P.stroked=!!O.stroke,P.filled=!!O.fill,O.stroke?(h||(h=u._stroke=Nu("stroke")),P.appendChild(h),h.weight=O.weight+"px",h.color=O.color,h.opacity=O.opacity,O.dashArray?h.dashStyle=S(O.dashArray)?O.dashArray.join(" "):O.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=O.lineCap.replace("butt","flat"),h.joinstyle=O.lineJoin):h&&(P.removeChild(h),u._stroke=null),O.fill?(_||(_=u._fill=Nu("fill")),P.appendChild(_),_.color=O.fillColor||O.color,_.opacity=O.fillOpacity):_&&(P.removeChild(_),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),_=Math.round(u._radius),O=Math.round(u._radiusY||_);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+_+","+O+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){Sl(u._container)},_bringToBack:function(u){Ol(u._container)}},tp=Ve.vml?Nu:De,Au=go.extend({_initContainer:function(){this._container=tp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=tp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Vt(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){go.prototype._update.call(this);var u=this._bounds,h=u.getSize(),_=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,_.setAttribute("width",h.x),_.setAttribute("height",h.y)),fn(_,u.min),_.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=tp("path");u.options.className&&Ze(h,u.options.className),u.options.interactive&&Ze(h,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Vt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,_=u.options;h&&(_.stroke?(h.setAttribute("stroke",_.color),h.setAttribute("stroke-opacity",_.opacity),h.setAttribute("stroke-width",_.weight),h.setAttribute("stroke-linecap",_.lineCap),h.setAttribute("stroke-linejoin",_.lineJoin),_.dashArray?h.setAttribute("stroke-dasharray",_.dashArray):h.removeAttribute("stroke-dasharray"),_.dashOffset?h.setAttribute("stroke-dashoffset",_.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),_.fill?(h.setAttribute("fill",_.fillColor||_.color),h.setAttribute("fill-opacity",_.fillOpacity),h.setAttribute("fill-rule",_.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,ue(u._parts,h))},_updateCircle:function(u){var h=u._point,_=Math.max(Math.round(u._radius),1),O=Math.max(Math.round(u._radiusY),1)||_,P="a"+_+","+O+" 0 1,0 ",$=u._empty()?"M0 0":"M"+(h.x-_)+","+h.y+P+_*2+",0 "+P+-_*2+",0 ";this._setPath(u,$)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){Sl(u._path)},_bringToBack:function(u){Ol(u._path)}});Ve.vml&&Au.include(H8);function YC(u){return Ve.svg||Ve.vml?new Au(u):null}lt.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&WC(u)||YC(u)}});var qC=Tl.extend({initialize:function(u,h){Tl.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=Z(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function W8(u,h){return new qC(u,h)}Au.create=tp,Au.pointsToPath=ue,mo.geometryToLayer=Gh,mo.coordsToLatLng=d0,mo.coordsToLatLngs=Kh,mo.latLngToCoords=h0,mo.latLngsToCoords=Zh,mo.getFeature=kl,mo.asFeature=Qh,lt.mergeOptions({boxZoom:!0});var GC=Ui.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ge(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Vt(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(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Tu(),Ky(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ge(document,{contextmenu:fa,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=mt("div","leaflet-zoom-box",this._container),Ze(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new B(this._point,this._startPoint),_=h.getSize();fn(this._box,h.min),this._box.style.width=_.x+"px",this._box.style.height=_.y+"px"},_finish:function(){this._moved&&(Vt(this._box),nn(this._container,"leaflet-crosshair")),ku(),Zy(),Tt(document,{contextmenu:fa,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var h=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});lt.addInitHook("addHandler","boxZoom",GC),lt.mergeOptions({doubleClickZoom:!0});var KC=Ui.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,_=h.getZoom(),O=h.options.zoomDelta,P=u.originalEvent.shiftKey?_-O:_+O;h.options.doubleClickZoom==="center"?h.setZoom(P):h.setZoomAround(u.containerPoint,P)}});lt.addInitHook("addHandler","doubleClickZoom",KC),lt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ZC=Ui.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new es(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}Ze(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){nn(this._map._container,"leaflet-grab"),nn(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 u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=Z(this._map.options.maxBounds);this._offsetLimit=re(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;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var h=this._lastTime=+new Date,_=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(_),this._times.push(h),this._prunePositions(h)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),_=this._initialWorldOffset,O=this._draggable._newPos.x,P=(O-h+_)%u+h-_,$=(O+h+_)%u-h-_,te=Math.abs(P+_)0?$:-$))-h;this._delta=0,this._startTime=null,te&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+te):u.setZoomAround(this._lastMousePos,h+te))}});lt.addInitHook("addHandler","scrollWheelZoom",XC);var Y8=600;lt.mergeOptions({tapHold:Ve.touchNative&&Ve.safari&&Ve.mobile,tapTolerance:15});var JC=Ui.extend({addHooks:function(){Ge(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var h=u.touches[0];this._startPos=this._newPos=new G(h.clientX,h.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ge(document,"touchend",Un),Ge(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),Y8),Ge(document,"touchend touchcancel contextmenu",this._cancel,this),Ge(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Tt(document,"touchend",Un),Tt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(u){var h=u.touches[0];this._newPos=new G(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var _=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});_._simulated=!0,h.target.dispatchEvent(_)}});lt.addInitHook("addHandler","tapHold",JC),lt.mergeOptions({touchZoom:Ve.touch,bounceAtZoomLimits:!0});var eE=Ui.extend({addHooks:function(){Ze(this._map._container,"leaflet-touch-zoom"),Ge(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){nn(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var _=h.mouseEventToContainerPoint(u.touches[0]),O=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(_.add(O)._divideBy(2))),this._startDist=_.distanceTo(O),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),Ge(document,"touchmove",this._onTouchMove,this),Ge(document,"touchend touchcancel",this._onTouchEnd,this),Un(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,_=h.mouseEventToContainerPoint(u.touches[0]),O=h.mouseEventToContainerPoint(u.touches[1]),P=_.distanceTo(O)/this._startDist;if(this._zoom=h.getScaleZoom(P,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&P>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,P===1)return}else{var $=_._add(O)._divideBy(2)._subtract(this._centerPoint);if(P===1&&$.x===0&&$.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var te=s(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=H(te,this,!0),Un(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(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))}});lt.addInitHook("addHandler","touchZoom",eE),lt.BoxZoom=GC,lt.DoubleClickZoom=KC,lt.Drag=ZC,lt.Keyboard=QC,lt.ScrollWheelZoom=XC,lt.TapHold=JC,lt.TouchZoom=eE,n.Bounds=B,n.Browser=Ve,n.CRS=pe,n.Canvas=HC,n.Circle=f0,n.CircleMarker=qh,n.Class=q,n.Control=bi,n.DivIcon=UC,n.DivOverlay=zi,n.DomEvent=u8,n.DomUtil=l8,n.Draggable=es,n.Evented=le,n.FeatureGroup=ho,n.GeoJSON=mo,n.GridLayer=Ru,n.Handler=Ui,n.Icon=El,n.ImageOverlay=Xh,n.LatLng=ie,n.LatLngBounds=U,n.Layer=wi,n.LayerGroup=Cl,n.LineUtil=S8,n.Map=lt,n.Marker=Yh,n.Mixin=v8,n.Path=ts,n.Point=G,n.PolyUtil=y8,n.Polygon=Tl,n.Polyline=po,n.Popup=Jh,n.PosAnimation=SC,n.Projection=O8,n.Rectangle=qC,n.Renderer=go,n.SVG=Au,n.SVGOverlay=BC,n.TileLayer=Pl,n.Tooltip=ep,n.Transformation=X,n.Util=ne,n.VideoOverlay=$C,n.bind=s,n.bounds=re,n.canvas=WC,n.circle=D8,n.circleMarker=j8,n.control=ju,n.divIcon=U8,n.extend=i,n.featureGroup=k8,n.geoJSON=FC,n.geoJson=N8,n.gridLayer=z8,n.icon=P8,n.imageOverlay=A8,n.latLng=se,n.latLngBounds=Z,n.layerGroup=T8,n.map=f8,n.marker=M8,n.point=A,n.polygon=R8,n.polyline=L8,n.popup=$8,n.rectangle=W8,n.setOptions=y,n.stamp=l,n.svg=YC,n.svgOverlay=F8,n.tileLayer=zC,n.tooltip=B8,n.transformation=Q,n.version=r,n.videoOverlay=I8;var q8=window.L;n.noConflict=function(){return window.L=q8,this},window.L=n})})(jx,jx.exports);var Lh=jx.exports;const Hj=Ii(Lh);function rC(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function iC(e,t){return t==null?function(r,i){const o=V.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=V.useRef();o.current||(o.current=e(r,i));const s=V.useRef(r),{instance:a}=o.current;return V.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,i]),o}}function fge(e,t){V.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function S5(e){return function(n){const r=w5(),i=e(nC(n,r),r);return y5(r.map,n.attribution),x5(i.current,n.eventHandlers),fge(i.current,r),i}}function dge(e,t){const n=iC(e,t),r=S5(n);return age(r)}function hge(e,t){const n=iC(e),r=uge(n,t);return lge(r)}function pge(e,t){const n=iC(e,t),r=S5(n);return cge(r)}function mge(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 Dx(){return Dx=Object.assign||function(e){for(var t=1;t(g==null?void 0:g.map)??null,[g]);const y=V.useCallback(b=>{if(b!==null&&g===null){const w=new Lh.Map(b,f);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(oge(w))}},[]);V.useEffect(()=>()=>{g==null||g.map.remove()},[g]);const x=g?Y.createElement(b5,{value:g},r):s??null;return Y.createElement("div",Dx({},p,{ref:y}),x)}const vge=V.forwardRef(gge),yge=dge(function({position:t,...n},r){const i=new Lh.Marker(t,n);return rC(i,sge(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),_ge=hge(function(t,n){const r=new Lh.Popup(t,n.overlayContainer);return rC(r,n)},function(t,n,{position:r},i){V.useEffect(function(){const{instance:s}=t;function a(c){c.popup===s&&(s.update(),i(!0))}function l(c){c.popup===s&&i(!1)}return n.map.on({popupopen:a,popupclose:l}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){var f;n.map.off({popupopen:a,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),bge=pge(function({url:t,...n},r){const i=new Lh.TileLayer(t,nC(n,r));return rC(i,r)},function(t,n,r){mge(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const wge=()=>m.jsx(bge,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),xge=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(ct("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},O5=({toggle:e,isOpen:t,title:n,locations:r=[]})=>m.jsx(Ko,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:m.jsxs(uo,{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(vge,{...xge(r),children:[m.jsx(wge,{}),r.map(({cityName:i,latLong:o,count:s},a)=>m.jsx(yge,{position:o,children:m.jsxs(_ge,{children:[m.jsx("b",{children:s})," visit",s>1?"s":""," from ",m.jsx("b",{children:i})]})},a))]})]})});const Sge=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=mn(),[s,a,l]=mn(),[c,f]=V.useState([]),d=ky(),p=y=>t?y.filter(({cityName:x})=>t==null?void 0:t.includes(x)):y,g=()=>{if(!t){f(n),i();return}l()},v=y=>()=>{f(y?p(n):n),i()};return m.jsxs(m.Fragment,{children:[m.jsx(yt,{color:"link",className:"open-map-modal-btn__btn",id:d,onClick:g,children:m.jsx(Ie,{icon:gA})}),m.jsx(Mr,{placement:"left",target:d,children:"Show in map"}),m.jsx(mh,{isOpen:s,toggle:a,inNavbar:!0,children:m.jsxs(mu,{end:!0,children:[m.jsx(Ue,{onClick:v(!1),children:"Show all locations"}),m.jsx(Ue,{onClick:v(!0),children:"Show locations in current page"})]})}),m.jsx(O5,{toggle:o,isOpen:r,title:e,locations:c})]})},Oge=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,s=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})}),a=()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)});return m.jsxs(Qo,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[m.jsx(Ue,{header:!0,children:"Bots:"}),m.jsx(Ue,{active:o,onClick:a,children:"Exclude potential bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ue,{divider:!0}),m.jsx(Ue,{header:!0,children:"Orphan visits type:"}),m.jsx(Ue,{...s("base_url"),children:"Base URL"}),m.jsx(Ue,{...s("invalid_short_url"),children:"Invalid short URL"}),m.jsx(Ue,{...s("regular_404"),children:"Regular 404"})]}),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:!Ji(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:m.jsx("i",{children:"Clear filters"})})]})},C5=(e,t)=>!Yo(e)&&Ji(e[t]),Wj=e=>typeof e=="number"?e:e?parseFloat(e):0,Cge=(e,{os:t})=>{e[t]=(e[t]||0)+1},Ege=(e,{browser:t})=>{e[t]=(e[t]||0)+1},Tge=(e,{referer:t})=>{e[t]=(e[t]||0)+1},E5=e=>(t,n)=>{const i=C5(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},kge=E5("country"),Pge=E5("city"),Mge=(e,t)=>{if(!C5(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[Wj(r),Wj(i)]};o.count+=1,e[n]=o},jge=(e,t)=>{if(!vme(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},T5=e=>e.reduce((t,n)=>(Cge(t.os,n),Ege(t.browsers,n),Tge(t.referrers,n),kge(t.countries,n),Pge(t.cities,n),Mge(t.citiesForMap,n),jge(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),k5=lh(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,s={date:n,potentialBot:o,...Fme(t),referer:$me(r),country:(i==null?void 0:i.countryName)||"Unknown",city:(i==null?void 0:i.cityName)||"Unknown",latitude:i==null?void 0:i.latitude,longitude:i==null?void 0:i.longitude};return XO(e)?{...s,type:e.type,visitedUrl:e.visitedUrl}:s}),Dge=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:k5,processStatsFromVisits:T5},Symbol.toStringTag,{value:"Module"}));const xf=20,Lge=({browser:e,os:t,referer:n,country:r,city:i,...o},s)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(s.toLowerCase()),Rge=(e,t)=>t.filter(n=>Lge(n,e)),Nge=(e,t)=>Q4(t,e),Age=(e,t,n)=>{const r=t?Rge(t,e):[...e],i=Nge(n,r),o=i.length;return{visitsGroups:Md(xf,i),total:o}},Ige=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var k,D;const o="visits-table__header-cell visits-table__sticky",s=()=>r("(max-width: 767px)").matches,[a,l]=V.useState(s()),[c,f]=V.useState(void 0),[d,p]=V.useState({}),g=V.useMemo(()=>Age(e,c,d),[c,d]),v=V.useRef(!0),[y,x]=V.useState(1),b=y*xf,w=b-xf,S=8+Number(i),C=R=>()=>p({field:R,dir:My(R,d.field,d.dir)}),T=R=>m.jsx(Jf,{currentOrder:d,field:R,className:"visits-table__header-icon"});return V.useEffect(()=>{const R=()=>l(s());return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]),V.useEffect(()=>{x(1),!v.current&&n([]),v.current=!1},[c]),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.jsx("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),m.jsxs("th",{className:`${o} text-center`,onClick:C("potentialBot"),children:[m.jsx(Ie,{icon:pP}),T("potentialBot")]}),m.jsxs("th",{className:o,onClick:C("date"),children:["Date",T("date")]}),m.jsxs("th",{className:o,onClick:C("country"),children:["Country",T("country")]}),m.jsxs("th",{className:o,onClick:C("city"),children:["City",T("city")]}),m.jsxs("th",{className:o,onClick:C("browser"),children:["Browser",T("browser")]}),m.jsxs("th",{className:o,onClick:C("os"),children:["OS",T("os")]}),m.jsxs("th",{className:o,onClick:C("referer"),children:["Referrer",T("referer")]}),i&&m.jsxs("th",{className:o,onClick:C("visitedUrl"),children:["Visited URL",T("visitedUrl")]})]}),m.jsx("tr",{children:m.jsx("td",{colSpan:S,className:"p-0",children:m.jsx(bh,{noBorder:!0,large:!1,onChange:f})})})]}),m.jsxs("tbody",{children:[!((k=g.visitsGroups[y-1])!=null&&k.length)&&m.jsx("tr",{children:m.jsx("td",{colSpan:S,className:"text-center",children:"No visits found with current filtering"})}),(D=g.visitsGroups[y-1])==null?void 0:D.map((R,z)=>{const N=t.includes(R);return m.jsxs("tr",{style:{cursor:"pointer"},className:Ee({"table-active":N}),onClick:()=>n(N?t.filter(H=>H!==R):[...t,R]),children:[m.jsx("td",{className:"text-center",children:N&&m.jsx(Ie,{icon:jd,className:"text-primary"})}),m.jsx("td",{className:"text-center",children:R.potentialBot&&m.jsxs(m.Fragment,{children:[m.jsx(Ie,{icon:pP,id:`botIcon${z}`}),m.jsx(Mr,{placement:"right",target:`botIcon${z}`,children:"Potentially a visit from a bot or crawler"})]})}),m.jsx("td",{children:m.jsx(wv,{date:R.date})}),m.jsx("td",{children:R.country}),m.jsx("td",{children:R.city}),m.jsx("td",{children:R.browser}),m.jsx("td",{children:R.os}),m.jsx("td",{children:R.referer}),i&&m.jsx("td",{children:R.visitedUrl})]},z)})]}),g.total>xf&&m.jsx("tfoot",{children:m.jsx("tr",{children:m.jsx("td",{colSpan:S,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(YO,{pagesCount:Math.ceil(g.total/xf),currentPage:y,setCurrentPage:x,centered:a})}),m.jsx("div",{className:Ee("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:wn(w+1)})," to"," ",m.jsx("b",{children:wn(uA(b,g.total))})," of"," ",m.jsx("b",{children:wn(g.total)})]})})]})})})})]})})},Hl={byTime:{title:"By time",subPath:"by-time",icon:yG},byContext:{title:"By context",subPath:"by-context",icon:wS},byLocation:{title:"By location",subPath:"by-location",icon:gA},list:{title:"List",subPath:"list",icon:mA}};let sm;const Rh=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,exportCsv:i,isOrphanVisits:o=!1})=>{const{visits:s,loading:a,loadingLarge:l,error:c,errorData:f,progress:d,fallbackInterval:p}=t,[{dateRange:g,visitsFilter:v},y]=rge(),x=_l("visits"),b=Mt(({startDate:U,endDate:Z})=>({dateRange:{startDate:U??void 0,endDate:Z??void 0}}),y),w=V.useRef(g??p??(x==null?void 0:x.defaultInterval)??"last30Days"),[S,C]=V.useState([]),[T,k]=V.useState(),D=V.useRef(!0),{search:R}=gn(),z=U=>U?`${U}${R}`:R,N=V.useMemo(()=>k5(s),[s]),{os:H,browsers:W,referrers:ne,countries:q,cities:J,citiesForMap:oe,visitedUrls:le}=V.useMemo(()=>T5(N),[N]),G=V.useMemo(()=>({...v,excludeBots:v.excludeBots??(x==null?void 0:x.excludeBots)}),[v]),F=hu(oe),A=U=>{sm=void 0,C(U)},B=U=>Z=>{const ie=`${U}_${Z}`;sm===ie?(C([]),k(void 0),sm=void 0):(C(N.filter(Jq(U,Z))),k(Z),sm=ie)};V.useEffect(()=>r,[]),V.useEffect(()=>{const U=D.current?g??gue(w.current):g;n({dateRange:U,filter:G},D.current),D.current=!1},[g,v]),V.useEffect(()=>{p&&w.current===((x==null?void 0:x.defaultInterval)??"last30Days")&&(w.current=p)},[p]);const re=()=>l?m.jsxs(jo,{loading:!0,children:["This is going to take a while... :S",m.jsx(I4,{value:d,striped:d===100,className:"mt-3"})]}):a?m.jsx(jo,{loading:!0}):c?m.jsx(Ur,{type:"error",children:m.jsx(Uo,{errorData:f,fallbackMessage:"An error occurred while loading visits :("})}):Gn(s)?m.jsx(jo,{children:"There are no visits matching current filter"}):m.jsxs(m.Fragment,{children:[m.jsx(Z4,{fill:!0,children:Object.values(Hl).map(({title:U,icon:Z,subPath:ie},se)=>m.jsxs(Wf,{to:z(ie),replace:!0,children:[m.jsx(Ie,{icon:Z}),m.jsx("span",{className:"ms-2 d-none d-sm-inline",children:U})]},se))}),m.jsx(pr,{children:m.jsxs(my,{children:[m.jsx(vt,{path:Hl.byTime.subPath,element:m.jsx("div",{className:"col-12 mt-3",children:m.jsx(qme,{title:"Visits during time",visits:N,highlightedVisits:S,highlightedLabel:T,setSelectedVisits:A})})}),m.jsx(vt,{path:Hl.byContext.subPath,element:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Ee("mt-3 col-lg-6",{"col-xl-4":!o}),children:m.jsx(Ij,{title:"Operating systems",stats:H})}),m.jsx("div",{className:Ee("mt-3 col-lg-6",{"col-xl-4":!o}),children:m.jsx(Ij,{title:"Browsers",stats:W})}),m.jsx("div",{className:Ee("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:m.jsx(om,{title:"Referrers",stats:ne,withPagination:!1,highlightedStats:rm(S,"referer"),highlightedLabel:T,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:B("referer")})}),o&&m.jsx("div",{className:"mt-3 col-lg-6",children:m.jsx(om,{title:"Visited URLs",stats:le,highlightedLabel:T,highlightedStats:rm(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:B("visitedUrl")})})]})}),m.jsx(vt,{path:Hl.byLocation.subPath,element:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(om,{title:"Countries",stats:q,highlightedStats:rm(S,"country"),highlightedLabel:T,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:B("country")})}),m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(om,{title:"Cities",stats:J,highlightedStats:rm(S,"city"),highlightedLabel:T,extraHeaderContent:U=>F.length>0&&m.jsx(Sge,{modalTitle:"Cities",locations:F,activeCities:U}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:B("city")})})]})}),m.jsx(vt,{path:Hl.list.subPath,element:m.jsx("div",{className:"col-12",children:m.jsx(Ige,{visits:N,selectedVisits:S,setSelectedVisits:A,isOrphanVisits:o})})}),m.jsx(vt,{path:"*",element:m.jsx(oS,{replace:!0,to:z(Hl.byTime.subPath)})})]})})]});return m.jsxs(m.Fragment,{children:[e,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-fill",children:m.jsx($I,{updatable:!0,disabled:a,initialDateRange:w.current,defaultText:"All visits",onDatesChange:b})}),m.jsx(Oge,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:o,selected:G,onChange:U=>y({visitsFilter:U})})]})}),s.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(xI,{className:"btn-md-block",amount:N.length,onClick:()=>i(N)}),m.jsxs(yt,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>A([]),children:["Clear selection ",S.length>0&&m.jsxs(m.Fragment,{children:["(",wn(S.length),")"]})]})]})})]})}),m.jsx("section",{className:"mt-3",children:re()})]})},Fge=({exportVisits:e})=>sa(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r})=>{const i=bu(),{domain:o=""}=hl(),[s,a=s]=o.split("_"),l=(f,d)=>t({domain:a,query:jh(f),doIntervalFallback:d}),c=f=>e(`domain_${s}_visits.csv`,f);return m.jsx(Rh,{getVisits:l,cancelGetVisits:r,visitsInfo:n,exportCsv:c,children:m.jsx(Dh,{goBack:i,visits:n.visits,title:`"${s}" visits`})})},()=>[fi.visits]),$ge=({exportVisits:e})=>sa(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r})=>{const i=bu(),o=a=>e("non_orphan_visits.csv",a),s=(a,l)=>t({query:jh(a),doIntervalFallback:l});return m.jsx(Rh,{getVisits:s,cancelGetVisits:r,visitsInfo:n,exportCsv:o,children:m.jsx(Dh,{title:"Non-orphan visits",goBack:i,visits:n.visits})})},()=>[fi.visits]),Bge=({exportVisits:e})=>sa(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r})=>{const i=bu(),o=a=>e("orphan_visits.csv",a),s=(a,l)=>{var c;return t({query:jh(a),orphanVisitsType:(c=a.filter)==null?void 0:c.orphanVisitsType,doIntervalFallback:l})};return m.jsx(Rh,{getVisits:s,cancelGetVisits:r,visitsInfo:n,exportCsv:o,isOrphanVisits:!0,children:m.jsx(Dh,{title:"Orphan visits",goBack:i,visits:n.visits})})},()=>[fi.orphanVisits]),P5="shlink/orphanVisits",Uge={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},zge=e=>kh({typePrefix:`${P5}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1})=>{const{getNonOrphanVisits:r}=e(),i=async(s,a)=>r({...t,page:s,itemsPerPage:a}),o=Ph(n,r);return[i,o]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Vge=e=>Mh({name:P5,initialState:Uge,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>Ch(o.date,r,i))}}),M5="shlink/orphanVisits",Hge={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Wge=(e,t)=>!t||t===e.type,Yge=e=>kh({typePrefix:`${M5}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1})=>{const{getOrphanVisits:i}=e(),o=async(a,l)=>i({...n,page:a,itemsPerPage:l}).then(c=>{const f=c.data.filter(d=>XO(d)&&Wge(d,t));return{...c,data:f}}),s=Ph(r,i);return[o,s]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),qge=e=>Mh({name:M5,initialState:Hge,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:s})=>!s&&Ch(o.date,r,i))}}),j5="shlink/shortUrlVisits",Gge={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Kge=e=>kh({typePrefix:`${j5}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1})=>{const{getShortUrlVisits:i}=e(),o=async(a,l)=>i(t,{...n,page:a,itemsPerPage:l}),s=Ph(r,async a=>i(t,{...a,domain:n.domain}));return[o,s]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),Zge=e=>Mh({name:j5,initialState:Gge,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:s}=r;return i.filter(({shortUrl:a,visit:l})=>a&&Kf(a,t,n)&&Ch(l.date,o,s))}}),D5="shlink/tagVisits",Qge={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Xge=e=>kh({typePrefix:`${D5}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1})=>{const{getTagVisits:i}=e(),o=async(a,l)=>i(t,{...n,page:a,itemsPerPage:l}),s=Ph(r,async a=>i(t,a));return[o,s]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),Jge=e=>Mh({name:D5,initialState:Qge,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>(s==null?void 0:s.tags.includes(t))&&Ch(a.date,i,o))}}),L5="shlink/visitsOverview",am={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},Yj=e=>e.filter(({visit:t})=>t.potentialBot).length,eve=e=>Pr(`${L5}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n,orphanVisits:r,orphanVisitsCount:i})=>({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}}))),tve=e=>sr({name:L5,initialState:am,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...am,loading:!0})),t.addCase(e.rejected,()=>({...am,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...am,...r})),t.addCase(Th,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:s,orphanVisits:a}=yme(o.createdVisits),l=s.length,c=Yj(s),f=l-c,d=a.length,p=Yj(a),g=d-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+d,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+g}}})}});const nve=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,s=(r==null?void 0:r.shortUrl)??"",a=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title,c=()=>r?m.jsxs("span",{children:[m.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:m.jsx(wv,{date:r.dateCreated,relative:!0})}),m.jsx(Mr,{placement:"bottom",target:"created",children:m.jsx(wv,{date:r.dateCreated})})]}):m.jsx("small",{children:"Loading..."}),f=m.jsxs(m.Fragment,{children:["Visits for ",m.jsx(Ri,{href:s})]});return m.jsxs(Dh,{title:f,goBack:n,visits:o,shortUrl:r,children:[m.jsx("hr",{}),m.jsxs("div",{children:["Created: ",c()]}),m.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&m.jsx("small",{children:"Loading..."}),!i&&m.jsx(Ri,{href:a,children:l??a})]})]})},rve=({exportVisits:e})=>sa(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o})=>{const{shortCode:s=""}=hl(),{search:a}=gn(),l=bu(),{domain:c}=gl(a),f=(p,g)=>r({shortCode:Im(s),query:{...jh(p),domain:c},doIntervalFallback:g}),d=p=>{var g;return e(`short-url_${(g=n.shortUrl)==null?void 0:g.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,p)};return V.useEffect(()=>{i({shortCode:Im(s),domain:c})},[]),m.jsx(Rh,{getVisits:f,cancelGetVisits:o,visitsInfo:t,exportCsv:d,children:m.jsx(nve,{shortUrlDetail:n,shortUrlVisits:t,goBack:l})})},(t,n)=>n.shortCode?[fi.shortUrlVisits(Im(n.shortCode))]:[]),ive=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e,o=m.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[m.jsx("span",{className:"me-2",children:"Visits for"}),m.jsx(IO,{text:i,colorGenerator:n})]});return m.jsx(Dh,{title:o,goBack:t,visits:r})},ove=(e,{exportVisits:t})=>sa(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i})=>{const o=bu(),{tag:s=""}=hl(),a=(c,f)=>n({tag:s,query:jh(c),doIntervalFallback:f}),l=c=>t(`tag_${s}_visits.csv`,c);return m.jsx(Rh,{getVisits:a,cancelGetVisits:i,visitsInfo:r,exportCsv:l,children:m.jsx(ive,{tagVisits:r,goBack:o,colorGenerator:e})})},()=>[fi.visits]),sve=(e,t)=>{e.serviceFactory("MapModal",()=>O5),e.serviceFactory("ShortUrlVisits",rve,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",ove,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",Fge,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Bge,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",$ge,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>Dge),e.serviceFactory("getShortUrlVisits",Kge,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",ct("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",Xge,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",ct("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",bue,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",ct("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",Yge,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",ct("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",zge,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",ct("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Th),e.serviceFactory("loadVisitsOverview",eve,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",tve,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",ct("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",wue,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",ct("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",Vge,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",ct("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",qge,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",ct("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",Zge,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",ct("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",Jge,"getTagVisits"),e.serviceFactory("tagVisitsReducer",ct("reducer"),"tagVisitsReducerCreator")};const of=({children:e,to:t,className:n,...r})=>m.jsx($N,{className:({isActive:i})=>Ee("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),ave=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=gn(),r=Ee("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(of,{to:i("/overview"),children:[m.jsx(Ie,{fixedWidth:!0,icon:GG}),m.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),m.jsxs(of,{to:i("/list-short-urls/1"),className:Ee({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[m.jsx(Ie,{fixedWidth:!0,icon:mA}),m.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),m.jsxs(of,{to:i("/create-short-url"),children:[m.jsx(Ie,{fixedWidth:!0,icon:JG,flip:"horizontal"}),m.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),m.jsxs(of,{to:i("/manage-tags"),children:[m.jsx(Ie,{fixedWidth:!0,icon:vA}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),m.jsxs(of,{to:i("/manage-domains"),children:[m.jsx(Ie,{fixedWidth:!0,icon:kG}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})};const lve=(e,t,n,r,i,o,s,a,l,c,f)=>({createNotFound:d})=>{const p=gn(),g=vl(),v=dl(),[y,x]=V.useMemo(()=>v?[V.Fragment,{}]:[FN,{basename:g}],[v]),[b,w,S,C]=mn();V.useEffect(()=>C(),[p]);const T=Oh("domainVisits"),k=Ee("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":b}),D=gfe(S,C);return m.jsxs(y,{...x,children:[m.jsx(Ie,{icon:SG,className:k,onClick:w}),m.jsx("div",{...D,className:"shlink-layout__swipeable",children:m.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[m.jsx(ave,{routePrefix:g,showOnMobile:b}),m.jsx("div",{className:"shlink-layout__container",onClick:()=>C(),children:m.jsx("div",{className:"container-xl",children:m.jsxs(my,{children:[m.jsx(vt,{index:!0,element:m.jsx(oS,{replace:!0,to:"overview"})}),m.jsx(vt,{path:"/overview",element:m.jsx(l,{})}),m.jsx(vt,{path:"/list-short-urls/:page",element:m.jsx(t,{})}),m.jsx(vt,{path:"/create-short-url",element:m.jsx(n,{})}),m.jsx(vt,{path:"/short-code/:shortCode/visits/*",element:m.jsx(r,{})}),m.jsx(vt,{path:"/short-code/:shortCode/edit",element:m.jsx(c,{})}),m.jsx(vt,{path:"/tag/:tag/visits/*",element:m.jsx(i,{})}),T&&m.jsx(vt,{path:"/domain/:domain/visits/*",element:m.jsx(o,{})}),m.jsx(vt,{path:"/orphan-visits/*",element:m.jsx(s,{})}),m.jsx(vt,{path:"/non-orphan-visits/*",element:m.jsx(a,{})}),m.jsx(vt,{path:"/manage-tags",element:m.jsx(e,{})}),m.jsx(vt,{path:"/manage-domains",element:m.jsx(f,{})}),d&&m.jsx(vt,{path:"*",element:d("/list-short-urls/1")})]})})})]})})]})},cve=!0,uve=e=>k6({devTools:!cve,reducer:gO({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),fve=e=>{e.serviceFactory("Main",lve,"TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"),e.factory("store",uve)},fo=new ZN,{container:dve}=fo,hve=(e,t)=>(...n)=>e[t](...n),pve=(e,t)=>({...e,[t]:hve(dve,t)}),Nh=(e,t=[])=>kN(e?vS(e):null,t.reduce(pve,{}));fve(fo);rhe(fo,Nh);Jhe(fo,Nh);sve(fo,Nh);Rue(fo);jue(fo,Nh);efe(fo,Nh);gme(fo);let qj;const mve=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:s})=>{const a=dae(t),l=V.useRef(),[c,f]=V.useState();return V.useEffect(()=>{qj=n,e.value("apiClientFactory",()=>qj),s&&e.value("TagColorsStorage",s);const{container:d}=e,{Main:p,store:g,loadMercureInfo:v}=d;l.current=m.jsx(p,{createNotFound:o}),f(g),g.dispatch(v(r))},[n,s]),c?m.jsx(PN,{store:c,children:m.jsx(Yue,{value:r,children:m.jsx(hae,{value:a,children:m.jsx(pae,{value:i,children:l.current})})})}):m.jsx(m.Fragment,{})},gve=mve(fo);function Ov(e){return t=>{const{resetSelectedServer:n}=t;return V.useEffect(()=>{n()},[]),m.jsx(e,{...t})}}const vve=({location:e},{error:t})=>class extends V.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return m.jsx("div",{className:"home",children:m.jsxs(hn,{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(yt,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const yve=({id:e,name:t})=>m.jsxs(V4,{tag:Ft,to:`/server/${e}`,className:"servers-list__server-item",children:[t,m.jsx(Ie,{icon:iK,className:"servers-list__server-item-icon"})]}),R5=({servers:e,children:t,embedded:n=!1})=>m.jsxs(m.Fragment,{children:[t&&m.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&m.jsx(B4,{className:Ee("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>m.jsx(yve,{id:r,name:i},r))})]}),N5=({color:e=tO,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"})]})});const _ve=({servers:e})=>{const t=co(),n=hu(e),r=!Gn(n);return V.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),m.jsx("div",{className:"home",children:m.jsx(Wr,{className:"home__main-card",children:m.jsxs(pr,{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(N5,{})})})}),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(R5,{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(Ft,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[m.jsx(Ie,{icon:SS})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]})}),m.jsx("p",{className:"mb-0 mt-5",children:m.jsx(Ri,{href:"https://shlink.io/documentation",children:m.jsxs("small",{children:[m.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",m.jsx(Ie,{icon:$G})]})})})]})})]})]})})})};const bve=e=>()=>{const[t,n,,r]=mn(),i=gn(),{pathname:o}=i;V.useEffect(r,[i]);const s="/settings",a=Ee("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return m.jsxs(i4,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[m.jsxs(o4,{tag:Ft,to:"/",children:[m.jsx(N5,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),m.jsx(s4,{onClick:n,children:m.jsx(Ie,{icon:nK,className:a})}),m.jsx(ete,{navbar:!0,isOpen:t,children:m.jsxs($S,{navbar:!0,className:"ms-auto",children:[m.jsx(a4,{children:m.jsxs(u4,{tag:Ft,to:s,active:o.startsWith(s),children:[m.jsx(Ie,{icon:lK}),"  Settings"]})}),m.jsx(e,{})]})})]})},wve=({children:e})=>{const t=gn();return V.useEffect(()=>{scrollTo(0,0)},[t]),m.jsx(m.Fragment,{children:e})},A5=lA(hS,e=>{try{return ax(e,e,"=")}catch{return!1}}),I5=e=>A5(e)?`v${e}`:e,F5=(e="latest")=>t=>A5(t)?t:e,xve="%_VERSION_%",Sve=Mt(F5(),I5),Gj=({project:e,version:t})=>m.jsx(Ri,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:m.jsx("b",{children:t})}),Ove=({selectedServer:e,clientVersion:t=xve})=>{const n=Sve(t);return m.jsxs("small",{className:"text-muted",children:[hA(e)&&m.jsxs(m.Fragment,{children:["Server: ",m.jsx(Gj,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",m.jsx(Gj,{project:"shlink-web-client",version:n})]})};const Cve=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,Eve=({selectedServer:e})=>{const{pathname:t}=gn(),n=V.useMemo(()=>Cve.test(t),[t]),r=Ee("text-center",{"shlink-versions-container--with-sidebar":n});return m.jsx("div",{className:r,children:m.jsx(Ove,{selectedServer:e})})};const xu=({children:e})=>m.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function $5(e,t){return n=>{const r=hl(),{selectServer:i,selectedServer:o}=n;return V.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?pG(o)?m.jsx(t,{}):m.jsx(e,{...n}):m.jsx(xu,{children:m.jsx(jo,{loading:!0})})}}const Tve=(e,t,n,r)=>$5(({selectedServer:i,settings:o})=>{const s=hA(i),a=s?`/server/${i.id}`:"";return s?m.jsx(n,{serverVersion:i.version,apiClient:e(i),settings:o,routesPrefix:a,tagColorsStorage:t,createNotFound:l=>m.jsx(v6,{to:`${a}${l}`,children:"List short URLs"})}):m.jsx(r,{})},r),Kj={"Content-Type":"application/json"},Zj=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...Kj}}:{headers:Kj}:e;class kve{constructor(t){me(this,"fetchJson",(t,n)=>this.fetch(t,Zj(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));me(this,"fetchEmpty",(t,n)=>this.fetch(t,Zj(n)).then(async r=>{if(!r.ok)throw await r.json()}));this.fetch=t}}const Pve=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",kve,"fetch"),e.serviceFactory("ScrollToTop",()=>wve),e.serviceFactory("MainHeader",bve,"ServersDropdown"),e.serviceFactory("Home",()=>_ve),e.decorator("Home",Ov),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>gve),e.serviceFactory("ShlinkWebComponentContainer",Tve,"buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>Eve),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",vve,"window","console")};let lm;const Mve=new Uint8Array(16);function jve(){if(!lm&&(lm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lm(Mve)}const Vn=[];for(let e=0;e<256;++e)Vn.push((e+256).toString(16).slice(1));function Dve(e,t=0){return(Vn[e[t+0]]+Vn[e[t+1]]+Vn[e[t+2]]+Vn[e[t+3]]+"-"+Vn[e[t+4]]+Vn[e[t+5]]+"-"+Vn[e[t+6]]+Vn[e[t+7]]+"-"+Vn[e[t+8]]+Vn[e[t+9]]+"-"+Vn[e[t+10]]+Vn[e[t+11]]+Vn[e[t+12]]+Vn[e[t+13]]+Vn[e[t+14]]+Vn[e[t+15]]).toLowerCase()}const Lve=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Qj={randomUUID:Lve};function B5(e,t,n){if(Qj.randomUUID&&!t&&!e)return Qj.randomUUID();e=e||{};const r=e.random||(e.rng||jve)();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 Dve(r)}const Rve=2e3,Nve=(e,t)=>(n=!1,r=Rve)=>{const[i,o]=V.useState(n),s=V.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},U5=()=>{const e=co();return()=>e(-1)},Ave=()=>{const{search:e}=gn();return gl(e)},z5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return m.jsxs(Ko,{centered:!0,isOpen:e,children:[m.jsxs(Zo,{children:["Duplicated server",i&&"s"]}),m.jsxs(uo,{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:s},a)=>i?m.jsxs("li",{children:[m.jsx("b",{children:o})," - ",m.jsx("b",{children:s})]},a):m.jsxs(V.Fragment,{children:[m.jsxs("li",{children:["URL: ",m.jsx("b",{children:o})]}),m.jsxs("li",{children:["API key: ",m.jsx("b",{children:s})]})]},a))}),m.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),m.jsxs(pl,{children:[m.jsx(yt,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),m.jsx(yt,{color:"primary",onClick:r,children:"Save anyway"})]})]})},Ive=e=>Mt(t=>t.preventDefault(),e),V5=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=V.useState(""),[s,a]=V.useState(""),[l,c]=V.useState(""),f=Ive(()=>e({name:i,url:s,apiKey:l}));return V.useEffect(()=>{t&&o(t.name),t&&a(t.url),t&&c(t.apiKey)},[t]),m.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[m.jsxs(hn,{className:"mb-3",title:r,children:[m.jsx(Nm,{value:i,onChange:o,children:"Name"}),m.jsx(Nm,{type:"url",value:s,onChange:a,children:"URL"}),m.jsx(Nm,{value:l,onChange:c,children:"API key"})]}),m.jsx("div",{className:"text-end",children:n})]})},Xj=4e3,Jj=({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."]})}),Fve=(e,t)=>({servers:n,createServers:r})=>{const i=co(),o=U5(),s=!!Object.keys(n).length,[a,l]=t(!1,Xj),[c,f]=t(!1,Xj),[d,p]=mn(),[g,v]=V.useState(),y=()=>{if(!g)return;const x=B5();r([{...g,id:x}]),i(`/server/${x}`)};return V.useEffect(()=>{Object.values(n).some(({url:b,apiKey:w})=>(g==null?void 0:g.url)===b&&(g==null?void 0:g.apiKey)===w)?p():y()},[g]),m.jsxs(xu,{children:[m.jsxs(V5,{title:m.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!s&&m.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),s&&m.jsx(yt,{outline:!0,onClick:o,children:"Cancel"}),m.jsx(yt,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),a&&m.jsx(Jj,{type:"success"}),c&&m.jsx(Jj,{type:"error"}),m.jsx(z5,{isOpen:d,duplicatedServers:g?[g]:[],onDiscard:o,onSave:y})]})},$ve=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,s,a]=mn();return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:n,onClick:s,children:[!r&&m.jsx(Ie,{fixedWidth:!0,icon:_S}),m.jsx("span",{className:i,children:r??"Remove this server"})]}),m.jsx(e,{server:t,isOpen:o,toggle:a})]})},Bve=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=co(),s=V.useRef(!1),a=()=>{s.current=!0,t()},l=()=>{s.current&&(r(e),i&&o("/"))};return m.jsxs(Ko,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[m.jsx(Zo,{toggle:t,className:"text-danger",children:"Remove server"}),m.jsxs(uo,{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(pl,{children:[m.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"danger",onClick:a,children:"Delete"})]})]})},Uve=e=>$5(({editServer:t,selectedServer:n,selectServer:r})=>{const i=U5(),{reconnect:o}=Ave();if(!$f(n))return null;const s=a=>{t(n.id,a),o==="true"&&r(n.id),i()};return m.jsx(xu,{children:m.jsxs(V5,{title:m.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[m.jsx(yt,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),m.jsx(yt,{outline:!0,color:"primary",children:"Save"})]})})},e);const eD=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),zve=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:a=""})=>{const l=ml(),[c,f]=V.useState(),[d,p]=V.useState([]),[g,,v,y]=mn(),x=Mt(t,i),b=Mt(()=>x(c??[]),y),w=Mt(()=>x((c??[]).filter(XY(eD(d)))),y),S=async({target:C})=>{var T;return e((T=C.files)==null?void 0:T[0]).then(f).then(()=>{C.value=null}).catch(o)};return V.useEffect(()=>{if(!c)return;const C=Object.values(n),T=c.filter(eD(C)),k=!!T.length;k?p(T):x(c),k&&v()},[c]),m.jsxs(m.Fragment,{children:[m.jsxs(yt,{outline:!0,id:"importBtn",className:a,onClick:()=>{var C;return(C=l.current)==null?void 0:C.click()},children:[m.jsx(Ie,{icon:jG,fixedWidth:!0})," ",r??"Import from file"]}),m.jsxs(Mr,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",m.jsx("b",{children:"name"}),", ",m.jsx("b",{children:"apiKey"})," and ",m.jsx("b",{children:"url"}),"."]}),m.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:S}),m.jsx(z5,{isOpen:g,duplicatedServers:d,onDiscard:w,onSave:b})]})};const Vve=e=>({servers:t,selectedServer:n})=>m.jsx(xu,{children:m.jsxs("div",{className:"server-error__container flex-column",children:[m.jsxs(jo,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!$f(n)&&"Could not find this Shlink server.",$f(n)&&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.jsxs(R5,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",m.jsx(Ft,{to:"/server/create",children:"add a new one"}),"."]}),$f(n)&&m.jsx("div",{className:"container mt-3 mt-md-5",children:m.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",m.jsx(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",m.jsx(Ft,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),Hve=4e3,Wve=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[s,a]=V.useState(o),l=p=>a(o.filter(({name:g,url:v})=>`${g} ${v}`.toLowerCase().match(p.toLowerCase()))),c=s.some(({autoConnect:p})=>!!p),[f,d]=n(!1,Hve);return V.useEffect(()=>{a(Object.values(i))},[i]),m.jsxs(xu,{children:[m.jsx(bh,{className:"mb-3",onChange:l}),m.jsxs(pr,{className:"mb-3",children:[m.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[m.jsx(t,{className:"flex-fill",onImportError:d,children:"Import servers"}),o.length>0&&m.jsxs(yt,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[m.jsx(Ie,{icon:_A,fixedWidth:!0})," Export servers"]})]}),m.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:m.jsxs(yt,{outline:!0,color:"primary",className:"flex-fill",tag:Ft,to:"/server/create",children:[m.jsx(Ie,{icon:SS,fixedWidth:!0})," Add a server"]})})]}),m.jsx(hn,{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:[c&&m.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),m.jsx("th",{children:"Name"}),m.jsx("th",{children:"Base URL"}),m.jsx("th",{"aria-label":"Options"})]})}),m.jsxs("tbody",{children:[!s.length&&m.jsx("tr",{className:"text-center",children:m.jsx("td",{colSpan:4,children:"No servers found."})}),s.map(p=>m.jsx(r,{server:p,hasAutoConnect:c},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."})})]})},Yve=e=>({server:t,hasAutoConnect:n})=>m.jsxs("tr",{className:"responsive-table__row",children:[n&&m.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&m.jsxs(m.Fragment,{children:[m.jsx(Ie,{icon:jd,className:"text-primary",id:"autoConnectIcon"}),m.jsx(Mr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:m.jsx(Ft,{to:`/server/${t.id}`,children:t.name})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(e,{server:t})})]}),qve=e=>({server:t,setAutoConnect:n})=>{const[r,,i,o]=mn(),s=`/server/${t.id}`,{autoConnect:a}=t,l=a?PG:Que;return m.jsxs(Py,{minWidth:170,children:[m.jsxs(Ue,{tag:Ft,to:s,children:[m.jsx(Ie,{icon:TG,fixedWidth:!0})," Connect"]}),m.jsxs(Ue,{tag:Ft,to:`${s}/edit`,children:[m.jsx(Ie,{icon:bS,fixedWidth:!0})," Edit server"]}),m.jsxs(Ue,{onClick:()=>n(t,!a),children:[m.jsx(Ie,{icon:l,fixedWidth:!0})," ",a?"Do not a":"A","uto-connect"]}),m.jsx(Ue,{divider:!0}),m.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[m.jsx(Ie,{icon:_S,fixedWidth:!0})," Remove server"]}),m.jsx(e,{redirectHome:!1,server:t,isOpen:r,toggle:o})]})},H5=(e,t)=>M6(e,t,{serializeError:hS}),Gve={},Kve=e=>e.id?e:Pd("id",B5(),e),Zve=fS((e,t)=>Pd(t.id,t,e),{}),{actions:Qve,reducer:Xve}=sr({name:"shlink/servers",initialState:Gve,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?Pd(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>Pq(t.id,e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?gf(yb(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):Pd(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Mt(lh(Kve),Zve,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:Jve,deleteServer:eye,setAutoConnect:tye,createServers:W5}=Qve,nye=Xve,rye=e=>Array.isArray(e)?e.filter(dA):[],iye=e=>H5("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Sg.homepage}/servers.json`),i=rye(r);n(W5(i))}),oC="shlink/selectedServer",oye="1.0.0",sye="999.999.999",aye="latest",lye=Mt(e=>e===aye?sye:e,F5(oye)),cye=lA(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:lye(n),printableVersion:I5(n)}))),tD=null,sC=jn(`${oC}/resetSelectedServer`),uye=e=>H5(`${oC}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(sC());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await cye(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),fye=e=>sr({name:oC,initialState:tD,reducers:{},extraReducers:t=>{t.addCase(sC,()=>tD),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),dye=({servers:e,selectedServer:t})=>{const n=hu(e),r=()=>Gn(n)?m.jsxs(Ue,{tag:Ft,to:"/server/create",children:[m.jsx(Ie,{icon:SS})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]}):m.jsxs(m.Fragment,{children:[n.map(({name:i,id:o})=>m.jsx(Ue,{tag:Ft,to:`/server/${o}`,active:mG(t)===o,children:i},o)),m.jsx(Ue,{divider:!0}),m.jsxs(Ue,{tag:Ft,to:"/manage-servers",children:[m.jsx(Ie,{icon:dP})," ",m.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return m.jsxs(_h,{nav:!0,inNavbar:!0,children:[m.jsxs(gh,{nav:!0,caret:!0,children:[m.jsx(Ie,{icon:dP})," ",m.jsx("span",{className:"ms-1",children:"Servers"})]}),m.jsx(mu,{end:!0,style:{right:0},children:r()})]})},hye=({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)},pye=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);hye(e,i,n)},mye="shlink-servers.csv";class gye{constructor(t,n,r){me(this,"exportServers",async()=>{const t=hu(this.storage.get("servers")??{}).map(gG);try{const n=this.jsonToCsv(t);pye(this.window,n,mye)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const vye=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",yye=e=>Array.isArray(e)&&e.every(vye);class _ye{constructor(t,n){me(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var s,a;try{const l=((a=(s=o.target)==null?void 0:s.result)==null?void 0:a.toString())??"",c=await this.csvToJson(l);if(!yye(c))throw new Error("Provided file does not have the right format.");r(c)}catch(l){i(l)}}),n.readAsText(t)})});this.csvToJson=t,this.fileReaderFactory=n}}const bye=(e,t)=>{e.serviceFactory("ManageServers",Wve,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",Ov),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Yve,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",qve,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Fve,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",Ov),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",Uve,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>dye),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>Bve),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",$ve,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",zve,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",Vve,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",_ye,"csvToJson","fileReaderFactory"),e.service("ServersExporter",gye,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",uye,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>W5),e.serviceFactory("deleteServer",()=>eye),e.serviceFactory("editServer",()=>Jve),e.serviceFactory("setAutoConnect",()=>tye),e.serviceFactory("fetchServers",iye,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>sC),e.serviceFactory("selectedServerReducerCreator",fye,"selectServer"),e.serviceFactory("selectedServerReducer",ct("reducer"),"selectedServerReducerCreator")},Ec=({children:e})=>m.jsx("small",{className:"form-text text-muted d-block",children:e}),wye=e=>e?`${e}`:"",xye=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=ky();return m.jsxs(hn,{title:"Real-time updates",className:"h-100",children:[m.jsx(Ir,{children:m.jsxs(Kc,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",m.jsxs(Ec,{children:["Real-time updates are currently being ",m.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),m.jsxs(vu,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Ee("form-label",{"text-muted":!r.enabled}),id:i,children:[m.jsx(Gc,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:wye(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&m.jsxs(Ec,{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."]})]})]})},Y5={field:"dateCreated",dir:"DESC"},Sye={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Y5}},Oye=(e,{payload:t})=>cA(e,t),_a=e=>({reducer:Oye,prepare:e}),ba=e=>({payload:e}),{reducer:Cye,actions:Eye}=sr({name:"shlink/settings",initialState:Sye,reducers:{toggleRealTimeUpdates:_a(e=>ba({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:_a(e=>ba({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:_a(e=>ba({shortUrlCreation:e})),setShortUrlsListSettings:_a(e=>ba({shortUrlsList:e})),setUiSettings:_a(e=>ba({ui:e})),setVisitsSettings:_a(e=>ba({visits:e})),setTagsSettings:_a(e=>ba({tags:e}))}}),{toggleRealTimeUpdates:Tye,setRealTimeUpdatesInterval:kye,setShortUrlCreationSettings:Pye,setShortUrlsListSettings:Mye,setUiSettings:jye,setVisitsSettings:Dye,setTagsSettings:Lye}=Eye,Rye=Cye,n1=({items:e})=>m.jsx(m.Fragment,{children:e.map((t,n)=>m.jsx("div",{className:"mb-3",children:t},n))}),Nye=(e,t,n,r,i,o)=>()=>m.jsxs(xu,{children:[m.jsxs(Z4,{className:"mb-3",children:[m.jsx(Wf,{to:"general",children:"General"}),m.jsx(Wf,{to:"short-urls",children:"Short URLs"}),m.jsx(Wf,{to:"other-items",children:"Other items"})]}),m.jsxs(my,{children:[m.jsx(vt,{path:"general",element:m.jsx(n1,{items:[m.jsx(r,{}),m.jsx(e,{})]})}),m.jsx(vt,{path:"short-urls",element:m.jsx(n1,{items:[m.jsx(t,{}),m.jsx(n,{})]})}),m.jsx(vt,{path:"other-items",element:m.jsx(n1,{items:[m.jsx(o,{}),m.jsx(i,{})]})}),m.jsx(vt,{path:"*",element:m.jsx(oS,{replace:!0,to:"general"})})]})]}),r1=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",Aye=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."]}),Iye=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return m.jsxs(hn,{title:"Short URLs form",className:"h-100",children:[m.jsx(Ir,{children:m.jsxs(Kc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",m.jsxs(Ec,{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(Ir,{children:m.jsxs(Kc,{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(Ec,{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(vu,{noMargin:!0,label:"Tag suggestions search mode:",children:[m.jsxs(Qo,{text:r1(n.tagFilteringMode),children:[m.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:r1("startsWith")}),m.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:r1("includes")})]}),m.jsx(Ec,{children:Aye(n.tagFilteringMode)})]})]})},Fye={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},$ye=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>m.jsx(hn,{title:"Short URLs list",className:"h-100",children:m.jsx(vu,{noMargin:!0,label:"Default ordering for short URLs list:",children:m.jsx(wh,{items:Fye,order:(e==null?void 0:e.defaultOrdering)??Y5,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),Bye={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Uye=({settings:{tags:e},setTagsSettings:t})=>m.jsx(hn,{title:"Tags",className:"h-100",children:m.jsx(vu,{noMargin:!0,label:"Default ordering for tags list:",children:m.jsx(wh,{items:Bye,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const zye=({settings:{ui:e},setUiSettings:t})=>m.jsxs(hn,{title:"User interface",className:"h-100",children:[m.jsx(Ie,{icon:(e==null?void 0:e.theme)==="dark"?uK:XG,className:"user-interface__theme-icon"}),m.jsx(Kc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),e6(r)},children:"Use dark theme."})]}),q5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},Vye=(e,t)=>!e||e==="all"?t:q5[e],Hye=({onChange:e,active:t,allText:n})=>m.jsxs(Qo,{text:Vye(t,n),children:[m.jsx(Ue,{active:t==="all",onClick:()=>e("all"),children:n}),m.jsx(Ue,{divider:!0}),Object.entries(q5).map(([r,i])=>m.jsx(Ue,{active:t===r,onClick:()=>e(r),children:i},r))]}),nD=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},Wye=({settings:e,setVisitsSettings:t})=>{var n,r;return m.jsxs(hn,{title:"Visits",className:"h-100",children:[m.jsx(Ir,{children:m.jsxs(Kc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:nD(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",m.jsxs(Ec,{children:["The visits coming from potential bots will be ",m.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),m.jsx(vu,{noMargin:!0,label:"Default interval to load on visits sections:",children:m.jsx(Hye,{allText:"All visits",active:nD(e),onChange:i=>t({defaultInterval:i})})})]})},Yye=(e,t)=>{e.serviceFactory("Settings",Nye,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",Ov),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>xye),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>Iye),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>zye),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>Wye),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>Uye),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>$ye),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>Tye),e.serviceFactory("setRealTimeUpdatesInterval",()=>kye),e.serviceFactory("setShortUrlCreationSettings",()=>Pye),e.serviceFactory("setShortUrlsListSettings",()=>Mye),e.serviceFactory("setUiSettings",()=>jye),e.serviceFactory("setVisitsSettings",()=>Dye),e.serviceFactory("setTagsSettings",()=>Lye)};var qye=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 s in r)n.d(o,s,(function(a){return r[a]}).bind(null,s));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(v){var y=[];for(var x in v)y.push(x);return y};e.exports=d;var o=n(5);o.inherits=n(2);var s=n(23),a=n(14);o.inherits(d,s);for(var l=i(a.prototype),c=0;c * @license MIT */var i=n(38),o=n(39),s=n(40);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(E,M){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|E}function y(E,M){if(c.isBuffer(E))return E.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(E)||E instanceof ArrayBuffer))return E.byteLength;typeof E!="string"&&(E=""+E);var I=E.length;if(I===0)return 0;for(var X=!1;;)switch(M){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":case void 0:return ie(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*I;case"hex":return I>>>1;case"base64":return se(E).length;default:if(X)return ie(E).length;M=(""+M).toLowerCase(),X=!0}}function x(E,M,I){var X=E[M];E[M]=E[I],E[I]=X}function b(E,M,I,X,Q){if(E.length===0)return-1;if(typeof I=="string"?(X=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,isNaN(I)&&(I=Q?0:E.length-1),I<0&&(I=E.length+I),I>=E.length){if(Q)return-1;I=E.length-1}else if(I<0){if(!Q)return-1;I=0}if(typeof M=="string"&&(M=c.from(M,X)),c.isBuffer(M))return M.length===0?-1:w(E,M,I,X,Q);if(typeof M=="number")return M&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(E,M,I):Uint8Array.prototype.lastIndexOf.call(E,M,I):w(E,[M],I,X,Q);throw new TypeError("val must be string, number or Buffer")}function w(E,M,I,X,Q){var ae,ge=1,De=E.length,ue=M.length;if(X!==void 0&&((X=String(X).toLowerCase())==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(E.length<2||M.length<2)return-1;ge=2,De/=2,ue/=2,I/=2}function ve(Me,je){return ge===1?Me[je]:Me.readUInt16BE(je*ge)}if(Q){var _e=-1;for(ae=I;aeDe&&(I=De-ue),ae=I;ae>=0;ae--){for(var Ce=!0,Le=0;LeQ&&(X=Q):X=Q;var ae=M.length;if(ae%2!=0)throw new TypeError("Invalid hex string");X>ae/2&&(X=ae/2);for(var ge=0;ge>8,ue=ge%256,ve.push(ue),ve.push(De);return ve}(M,E.length-I),E,I,X)}function z(E,M,I){return M===0&&I===E.length?i.fromByteArray(E):i.fromByteArray(E.slice(M,I))}function N(E,M,I){I=Math.min(E.length,I);for(var X=[],Q=M;Q239?4:ve>223?3:ve>191?2:1;if(Q+Ce<=I)switch(Ce){case 1:ve<128&&(_e=ve);break;case 2:(192&(ae=E[Q+1]))==128&&(ue=(31&ve)<<6|63&ae)>127&&(_e=ue);break;case 3:ae=E[Q+1],ge=E[Q+2],(192&ae)==128&&(192&ge)==128&&(ue=(15&ve)<<12|(63&ae)<<6|63&ge)>2047&&(ue<55296||ue>57343)&&(_e=ue);break;case 4:ae=E[Q+1],ge=E[Q+2],De=E[Q+3],(192&ae)==128&&(192&ge)==128&&(192&De)==128&&(ue=(15&ve)<<18|(63&ae)<<12|(63&ge)<<6|63&De)>65535&&ue<1114112&&(_e=ue)}_e===null?(_e=65533,Ce=1):_e>65535&&(_e-=65536,X.push(_e>>>10&1023|55296),_e=56320|1023&_e),X.push(_e),Q+=Ce}return function(Le){var Me=Le.length;if(Me<=H)return String.fromCharCode.apply(String,Le);for(var je="",ce=0;cethis.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0)<=(I>>>=0))return"";for(M||(M="utf8");;)switch(M){case"hex":return q(this,I,X);case"utf8":case"utf-8":return N(this,I,X);case"ascii":return W(this,I,X);case"latin1":case"binary":return ne(this,I,X);case"base64":return z(this,I,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,I,X);default:if(Q)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),Q=!0}}).apply(this,arguments)},c.prototype.equals=function(E){if(!c.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E||c.compare(this,E)===0},c.prototype.inspect=function(){var E="",M=t.INSPECT_MAX_BYTES;return this.length>0&&(E=this.toString("hex",0,M).match(/.{2}/g).join(" "),this.length>M&&(E+=" ... ")),""},c.prototype.compare=function(E,M,I,X,Q){if(!c.isBuffer(E))throw new TypeError("Argument must be a Buffer");if(M===void 0&&(M=0),I===void 0&&(I=E?E.length:0),X===void 0&&(X=0),Q===void 0&&(Q=this.length),M<0||I>E.length||X<0||Q>this.length)throw new RangeError("out of range index");if(X>=Q&&M>=I)return 0;if(X>=Q)return-1;if(M>=I)return 1;if(M>>>=0,I>>>=0,X>>>=0,Q>>>=0,this===E)return 0;for(var ae=Q-X,ge=I-M,De=Math.min(ae,ge),ue=this.slice(X,Q),ve=E.slice(M,I),_e=0;_eQ)&&(I=Q),E.length>0&&(I<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");for(var ae=!1;;)switch(X){case"hex":return S(this,E,M,I);case"utf8":case"utf-8":return C(this,E,M,I);case"ascii":return T(this,E,M,I);case"latin1":case"binary":return k(this,E,M,I);case"base64":return D(this,E,M,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,E,M,I);default:if(ae)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),ae=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;function W(E,M,I){var X="";I=Math.min(E.length,I);for(var Q=M;QX)&&(I=X);for(var Q="",ae=M;aeI)throw new RangeError("Trying to access beyond buffer length")}function le(E,M,I,X,Q,ae){if(!c.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>Q||ME.length)throw new RangeError("Index out of range")}function G(E,M,I,X){M<0&&(M=65535+M+1);for(var Q=0,ae=Math.min(E.length-I,2);Q>>8*(X?Q:1-Q)}function F(E,M,I,X){M<0&&(M=4294967295+M+1);for(var Q=0,ae=Math.min(E.length-I,4);Q>>8*(X?Q:3-Q)&255}function A(E,M,I,X,Q,ae){if(I+X>E.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function B(E,M,I,X,Q){return Q||A(E,0,I,4),o.write(E,M,I,X,23,4),I+4}function re(E,M,I,X,Q){return Q||A(E,0,I,8),o.write(E,M,I,X,52,8),I+8}c.prototype.slice=function(E,M){var I,X=this.length;if(E=~~E,M=M===void 0?X:~~M,E<0?(E+=X)<0&&(E=0):E>X&&(E=X),M<0?(M+=X)<0&&(M=0):M>X&&(M=X),M0&&(Q*=256);)X+=this[E+--M]*Q;return X},c.prototype.readUInt8=function(E,M){return M||oe(E,1,this.length),this[E]},c.prototype.readUInt16LE=function(E,M){return M||oe(E,2,this.length),this[E]|this[E+1]<<8},c.prototype.readUInt16BE=function(E,M){return M||oe(E,2,this.length),this[E]<<8|this[E+1]},c.prototype.readUInt32LE=function(E,M){return M||oe(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+16777216*this[E+3]},c.prototype.readUInt32BE=function(E,M){return M||oe(E,4,this.length),16777216*this[E]+(this[E+1]<<16|this[E+2]<<8|this[E+3])},c.prototype.readIntLE=function(E,M,I){E|=0,M|=0,I||oe(E,M,this.length);for(var X=this[E],Q=1,ae=0;++ae=(Q*=128)&&(X-=Math.pow(2,8*M)),X},c.prototype.readIntBE=function(E,M,I){E|=0,M|=0,I||oe(E,M,this.length);for(var X=M,Q=1,ae=this[E+--X];X>0&&(Q*=256);)ae+=this[E+--X]*Q;return ae>=(Q*=128)&&(ae-=Math.pow(2,8*M)),ae},c.prototype.readInt8=function(E,M){return M||oe(E,1,this.length),128&this[E]?-1*(255-this[E]+1):this[E]},c.prototype.readInt16LE=function(E,M){M||oe(E,2,this.length);var I=this[E]|this[E+1]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt16BE=function(E,M){M||oe(E,2,this.length);var I=this[E+1]|this[E]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt32LE=function(E,M){return M||oe(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},c.prototype.readInt32BE=function(E,M){return M||oe(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},c.prototype.readFloatLE=function(E,M){return M||oe(E,4,this.length),o.read(this,E,!0,23,4)},c.prototype.readFloatBE=function(E,M){return M||oe(E,4,this.length),o.read(this,E,!1,23,4)},c.prototype.readDoubleLE=function(E,M){return M||oe(E,8,this.length),o.read(this,E,!0,52,8)},c.prototype.readDoubleBE=function(E,M){return M||oe(E,8,this.length),o.read(this,E,!1,52,8)},c.prototype.writeUIntLE=function(E,M,I,X){E=+E,M|=0,I|=0,X||le(this,E,M,I,Math.pow(2,8*I)-1,0);var Q=1,ae=0;for(this[M]=255&E;++ae=0&&(ae*=256);)this[M+Q]=E/ae&255;return M+I},c.prototype.writeUInt8=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,1,255,0),c.TYPED_ARRAY_SUPPORT||(E=Math.floor(E)),this[M]=255&E,M+1},c.prototype.writeUInt16LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8):G(this,E,M,!0),M+2},c.prototype.writeUInt16BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>8,this[M+1]=255&E):G(this,E,M,!1),M+2},c.prototype.writeUInt32LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M+3]=E>>>24,this[M+2]=E>>>16,this[M+1]=E>>>8,this[M]=255&E):F(this,E,M,!0),M+4},c.prototype.writeUInt32BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>24,this[M+1]=E>>>16,this[M+2]=E>>>8,this[M+3]=255&E):F(this,E,M,!1),M+4},c.prototype.writeIntLE=function(E,M,I,X){if(E=+E,M|=0,!X){var Q=Math.pow(2,8*I-1);le(this,E,M,I,Q-1,-Q)}var ae=0,ge=1,De=0;for(this[M]=255&E;++ae>0)-De&255;return M+I},c.prototype.writeIntBE=function(E,M,I,X){if(E=+E,M|=0,!X){var Q=Math.pow(2,8*I-1);le(this,E,M,I,Q-1,-Q)}var ae=I-1,ge=1,De=0;for(this[M+ae]=255&E;--ae>=0&&(ge*=256);)E<0&&De===0&&this[M+ae+1]!==0&&(De=1),this[M+ae]=(E/ge>>0)-De&255;return M+I},c.prototype.writeInt8=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,1,127,-128),c.TYPED_ARRAY_SUPPORT||(E=Math.floor(E)),E<0&&(E=255+E+1),this[M]=255&E,M+1},c.prototype.writeInt16LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8):G(this,E,M,!0),M+2},c.prototype.writeInt16BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>8,this[M+1]=255&E):G(this,E,M,!1),M+2},c.prototype.writeInt32LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8,this[M+2]=E>>>16,this[M+3]=E>>>24):F(this,E,M,!0),M+4},c.prototype.writeInt32BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>24,this[M+1]=E>>>16,this[M+2]=E>>>8,this[M+3]=255&E):F(this,E,M,!1),M+4},c.prototype.writeFloatLE=function(E,M,I){return B(this,E,M,!0,I)},c.prototype.writeFloatBE=function(E,M,I){return B(this,E,M,!1,I)},c.prototype.writeDoubleLE=function(E,M,I){return re(this,E,M,!0,I)},c.prototype.writeDoubleBE=function(E,M,I){return re(this,E,M,!1,I)},c.prototype.copy=function(E,M,I,X){if(I||(I=0),X||X===0||(X=this.length),M>=E.length&&(M=E.length),M||(M=0),X>0&&X=this.length)throw new RangeError("sourceStart out of bounds");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),E.length-M=0;--Q)E[Q+M]=this[Q+I];else if(ae<1e3||!c.TYPED_ARRAY_SUPPORT)for(Q=0;Q>>=0,I=I===void 0?this.length:I>>>0,E||(E=0),typeof E=="number")for(ae=M;ae55295&&I<57344){if(!Q){if(I>56319){(M-=3)>-1&&ae.push(239,191,189);continue}if(ge+1===X){(M-=3)>-1&&ae.push(239,191,189);continue}Q=I;continue}if(I<56320){(M-=3)>-1&&ae.push(239,191,189),Q=I;continue}I=65536+(Q-55296<<10|I-56320)}else Q&&(M-=3)>-1&&ae.push(239,191,189);if(Q=null,I<128){if((M-=1)<0)break;ae.push(I)}else if(I<2048){if((M-=2)<0)break;ae.push(I>>6|192,63&I|128)}else if(I<65536){if((M-=3)<0)break;ae.push(I>>12|224,I>>6&63|128,63&I|128)}else{if(!(I<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;ae.push(I>>18|240,I>>12&63|128,I>>6&63|128,63&I|128)}}return ae}function se(E){return i.toByteArray(function(M){if((M=function(I){return I.trim?I.trim():I.replace(/^\s+|\s+$/g,"")}(M).replace(U,"")).length<2)return"";for(;M.length%4!=0;)M+="=";return M}(E))}function pe(E,M,I,X){for(var Q=0;Q=M.length||Q>=E.length);++Q)M[Q+I]=E[Q];return Q}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(x){if(n===setTimeout)return setTimeout(x,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(x,0);try{return n(x,0)}catch{try{return n.call(null,x,0)}catch{return n.call(this,x,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch{r=s}})();var l,c=[],f=!1,d=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):d=-1,c.length&&g())}function g(){if(!f){var x=a(p);f=!0;for(var b=c.length;b;){for(l=c,c=[];++d1)for(var w=1;w=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._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(s){return typeof s=="function"}function i(s){return typeof s=="object"&&s!==null}function o(s){return s===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(s){if(!function(a){return typeof a=="number"}(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},n.prototype.emit=function(s){var a,l,c,f,d,p;if(this._events||(this._events={}),s==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((a=arguments[1])instanceof Error)throw a;var g=new Error('Uncaught, unspecified "error" event. ('+a+")");throw g.context=a,g}if(o(l=this._events[s]))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),c=(p=l.slice()).length,d=0;d0&&this._events[s].length>l&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(s,a){if(!r(a))throw TypeError("listener must be a function");var l=!1;function c(){this.removeListener(s,c),l||(l=!0,a.apply(this,arguments))}return c.listener=a,this.on(s,c),this},n.prototype.removeListener=function(s,a){var l,c,f,d;if(!r(a))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(f=(l=this._events[s]).length,c=-1,l===a||r(l.listener)&&l.listener===a)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,a);else if(i(l)){for(d=f;d-- >0;)if(l[d]===a||l[d].listener&&l[d].listener===a){c=d;break}if(c<0)return this;l.length===1?(l.length=0,delete this._events[s]):l.splice(c,1),this._events.removeListener&&this.emit("removeListener",s,a)}return this},n.prototype.removeAllListeners=function(s){var a,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(a in this._events)a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events={},this}if(r(l=this._events[s]))this.removeListener(s,l);else if(l)for(;l.length;)this.removeListener(s,l[l.length-1]);return delete this._events[s],this},n.prototype.listeners=function(s){return this._events&&this._events[s]?r(this._events[s])?[this._events[s]]:this._events[s].slice():[]},n.prototype.listenerCount=function(s){if(this._events){var a=this._events[s];if(r(a))return 1;if(a)return a.length}return 0},n.listenerCount=function(s,a){return s.listenerCount(a)}},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 s=n(6);function a(N){var H=this;this.next=null,this.entry=null,this.finish=function(){(function(W,ne,q){var J=W.entry;for(W.entry=null;J;){var oe=J.callback;ne.pendingcb--,oe(void 0),J=J.next}ne.corkedRequestsFree?ne.corkedRequestsFree.next=W:ne.corkedRequestsFree=W})(H,N)}}e.exports=S;var l,c=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:s.nextTick;S.WritableState=w;var f=n(5);f.inherits=n(2);var d,p={deprecate:n(44)},g=n(24),v=n(7).Buffer,y=o.Uint8Array||function(){},x=n(25);function b(){}function w(N,H){l=l||n(1),N=N||{};var W=H instanceof l;this.objectMode=!!N.objectMode,W&&(this.objectMode=this.objectMode||!!N.writableObjectMode);var ne=N.highWaterMark,q=N.writableHighWaterMark,J=this.objectMode?16:16384;this.highWaterMark=ne||ne===0?ne:W&&(q||q===0)?q:J,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 oe=N.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(le){(function(G,F){var A=G._writableState,B=A.sync,re=A.writecb;if(function(Z){Z.writing=!1,Z.writecb=null,Z.length-=Z.writelen,Z.writelen=0}(A),F)(function(Z,ie,se,pe,E){--ie.pendingcb,se?(s.nextTick(E,pe),s.nextTick(z,Z,ie),Z._writableState.errorEmitted=!0,Z.emit("error",pe)):(E(pe),Z._writableState.errorEmitted=!0,Z.emit("error",pe),z(Z,ie))})(G,A,B,F,re);else{var U=D(A);U||A.corked||A.bufferProcessing||!A.bufferedRequest||k(G,A),B?c(T,G,A,U,re):T(G,A,U,re)}})(H,le)},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 a(this)}function S(N){if(l=l||n(1),!(d.call(S,this)||this instanceof l))return new S(N);this._writableState=new w(N,this),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),g.call(this)}function C(N,H,W,ne,q,J,oe){H.writelen=ne,H.writecb=oe,H.writing=!0,H.sync=!0,W?N._writev(q,H.onwrite):N._write(q,J,H.onwrite),H.sync=!1}function T(N,H,W,ne){W||function(q,J){J.length===0&&J.needDrain&&(J.needDrain=!1,q.emit("drain"))}(N,H),H.pendingcb--,ne(),z(N,H)}function k(N,H){H.bufferProcessing=!0;var W=H.bufferedRequest;if(N._writev&&W&&W.next){var ne=H.bufferedRequestCount,q=new Array(ne),J=H.corkedRequestsFree;J.entry=W;for(var oe=0,le=!0;W;)q[oe]=W,W.isBuf||(le=!1),W=W.next,oe+=1;q.allBuffers=le,C(N,H,!0,H.length,q,"",J.finish),H.pendingcb++,H.lastBufferedRequest=null,J.next?(H.corkedRequestsFree=J.next,J.next=null):H.corkedRequestsFree=new a(H),H.bufferedRequestCount=0}else{for(;W;){var G=W.chunk,F=W.encoding,A=W.callback;if(C(N,H,!1,H.objectMode?1:G.length,G,F,A),W=W.next,H.bufferedRequestCount--,H.writing)break}W===null&&(H.lastBufferedRequest=null)}H.bufferedRequest=W,H.bufferProcessing=!1}function D(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function R(N,H){N._final(function(W){H.pendingcb--,W&&N.emit("error",W),H.prefinished=!0,N.emit("prefinish"),z(N,H)})}function z(N,H){var W=D(H);return W&&(function(ne,q){q.prefinished||q.finalCalled||(typeof ne._final=="function"?(q.pendingcb++,q.finalCalled=!0,s.nextTick(R,ne,q)):(q.prefinished=!0,ne.emit("prefinish")))}(N,H),H.pendingcb===0&&(H.finished=!0,N.emit("finish"))),W}f.inherits(S,g),w.prototype.getBuffer=function(){for(var N=this.bufferedRequest,H=[];N;)H.push(N),N=N.next;return H},function(){try{Object.defineProperty(w.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(S,Symbol.hasInstance,{value:function(N){return!!d.call(this,N)||this===S&&N&&N._writableState instanceof w}})):d=function(N){return N instanceof this},S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},S.prototype.write=function(N,H,W){var ne=this._writableState,q=!1,J=!ne.objectMode&&function(oe){return v.isBuffer(oe)||oe instanceof y}(N);return J&&!v.isBuffer(N)&&(N=function(oe){return v.from(oe)}(N)),typeof H=="function"&&(W=H,H=null),J?H="buffer":H||(H=ne.defaultEncoding),typeof W!="function"&&(W=b),ne.ended?function(oe,le){var G=new Error("write after end");oe.emit("error",G),s.nextTick(le,G)}(this,W):(J||function(oe,le,G,F){var A=!0,B=!1;return G===null?B=new TypeError("May not write null values to stream"):typeof G=="string"||G===void 0||le.objectMode||(B=new TypeError("Invalid non-string/buffer chunk")),B&&(oe.emit("error",B),s.nextTick(F,B),A=!1),A}(this,ne,N,W))&&(ne.pendingcb++,q=function(oe,le,G,F,A,B){if(!G){var re=function(se,pe,E){return se.objectMode||se.decodeStrings===!1||typeof pe!="string"||(pe=v.from(pe,E)),pe}(le,F,A);F!==re&&(G=!0,A="buffer",F=re)}var U=le.objectMode?1:F.length;le.length+=U;var Z=le.length-1))throw new TypeError("Unknown encoding: "+N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(N,H,W){W(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(N,H,W){var ne=this._writableState;typeof N=="function"?(W=N,N=null,H=null):typeof H=="function"&&(W=H,H=null),N!=null&&this.write(N,H),ne.corked&&(ne.corked=1,this.uncork()),ne.ending||ne.finished||function(q,J,oe){J.ending=!0,z(q,J),oe&&(J.finished?s.nextTick(oe):q.once("finish",oe)),J.ended=!0,q.writable=!1}(this,ne,W)},Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),S.prototype.destroy=x.destroy,S.prototype._undestroy=x.undestroy,S.prototype._destroy=function(N,H){this.end(),H(N)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,o){e.exports=function s(a,l,c){function f(g,v){if(!l[g]){if(!a[g]){var y=typeof _dereq_=="function"&&_dereq_;if(!v&&y)return y(g,!0);if(d)return d(g,!0);var x=new Error("Cannot find module '"+g+"'");throw x.code="MODULE_NOT_FOUND",x}var b=l[g]={exports:{}};a[g][0].call(b.exports,function(w){return f(a[g][1][w]||w)},b,b.exports,s,a,l,c)}return l[g].exports}for(var d=typeof _dereq_=="function"&&_dereq_,p=0;p0;){var w=b.shift();if(typeof w=="function"){var S=b.shift(),C=b.shift();w.call(S,C)}else w._settlePromises()}},g.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},g.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},g.prototype._reset=function(){this._isTickUsed=!1},a.exports=g,a.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(s,a,l){a.exports=function(c,f,d,p){var g=!1,v=function(w,S){this._reject(S)},y=function(w,S){S.promiseRejectionQueued=!0,S.bindingPromise._then(v,v,null,this,w)},x=function(w,S){!(50397184&this._bitField)&&this._resolveCallback(S.target)},b=function(w,S){S.promiseRejectionQueued||this._reject(w)};c.prototype.bind=function(w){g||(g=!0,c.prototype._propagateFrom=p.propagateFromFunction(),c.prototype._boundValue=p.boundValueFunction());var S=d(w),C=new c(f);C._propagateFrom(this,1);var T=this._target();if(C._setBoundTo(S),S instanceof c){var k={promiseRejectionQueued:!1,promise:C,target:T,bindingPromise:S};T._then(f,y,void 0,C,k),S._then(x,b,void 0,C,k),C._setOnCancel(S)}else C._resolveCallback(T);return C},c.prototype._setBoundTo=function(w){w!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=w):this._bitField=-2097153&this._bitField},c.prototype._isBound=function(){return(2097152&this._bitField)==2097152},c.bind=function(w,S){return c.resolve(S).bind(w)}}},{}],4:[function(s,a,l){var c;typeof Promise<"u"&&(c=Promise);var f=s("./promise")();f.noConflict=function(){try{Promise===f&&(Promise=c)}catch{}return f},a.exports=f},{"./promise":22}],5:[function(s,a,l){var c=Object.create;if(c){var f=c(null),d=c(null);f[" size"]=d[" size"]=0}a.exports=function(p){var g=s("./util"),v=g.canEvaluate;function y(w){return function(S,C){var T;if(S!=null&&(T=S[C]),typeof T!="function"){var k="Object "+g.classString(S)+" has no method '"+g.toString(C)+"'";throw new p.TypeError(k)}return T}(w,this.pop()).apply(w,this)}function x(w){return w[this]}function b(w){var S=+this;return S<0&&(S=Math.max(0,S+w.length)),w[S]}g.isIdentifier,p.prototype.call=function(w){var S=[].slice.call(arguments,1);return S.push(w),this._then(y,void 0,void 0,S,void 0)},p.prototype.get=function(w){var S;if(typeof w=="number")S=b;else if(v){var C=(void 0)(w);S=C!==null?C:x}else S=x;return this._then(S,void 0,void 0,w,void 0)}}},{"./util":36}],6:[function(s,a,l){a.exports=function(c,f,d,p){var g=s("./util"),v=g.tryCatch,y=g.errorObj,x=c._async;c.prototype.break=c.prototype.cancel=function(){if(!p.cancellation())return this._warn("cancellation is disabled");for(var b=this,w=b;b._isCancellable();){if(!b._cancelBy(w)){w._isFollowing()?w._followee().cancel():w._cancelBranched();break}var S=b._cancellationParent;if(S==null||!S._isCancellable()){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}b._isFollowing()&&b._followee().cancel(),b._setWillBeCancelled(),w=b,b=S}},c.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},c.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},c.prototype._cancelBy=function(b){return b===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},c.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},c.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),x.invoke(this._cancelPromises,this,void 0))},c.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},c.prototype._unsetOnCancel=function(){this._onCancelField=void 0},c.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},c.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},c.prototype._doInvokeOnCancel=function(b,w){if(g.isArray(b))for(var S=0;S=0)return d[v]}return c.prototype._promiseCreated=function(){},c.prototype._pushContext=function(){},c.prototype._popContext=function(){return null},c._peekContext=c.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 v=d.pop(),y=v._promiseCreated;return v._promiseCreated=null,y}return null},p.CapturedTrace=null,p.create=function(){if(f)return new p},p.deactivateLongStackTraces=function(){},p.activateLongStackTraces=function(){var v=c.prototype._pushContext,y=c.prototype._popContext,x=c._peekContext,b=c.prototype._peekContext,w=c.prototype._promiseCreated;p.deactivateLongStackTraces=function(){c.prototype._pushContext=v,c.prototype._popContext=y,c._peekContext=x,c.prototype._peekContext=b,c.prototype._promiseCreated=w,f=!1},f=!0,c.prototype._pushContext=p.prototype._pushContext,c.prototype._popContext=p.prototype._popContext,c._peekContext=c.prototype._peekContext=g,c.prototype._promiseCreated=function(){var S=this._peekContext();S&&S._promiseCreated==null&&(S._promiseCreated=this)}},p}},{}],9:[function(s,a,l){a.exports=function(c,f){var d,p,g,v=c._getDomain,y=c._async,x=s("./errors").Warning,b=s("./util"),w=b.canAttachTrace,S=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,C=/\((?:timers\.js):\d+:\d+\)/,T=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,k=null,D=null,R=!1,z=b.env("BLUEBIRD_DEBUG")!=0,N=!(b.env("BLUEBIRD_WARNINGS")==0||!z&&!b.env("BLUEBIRD_WARNINGS")),H=!(b.env("BLUEBIRD_LONG_STACK_TRACES")==0||!z&&!b.env("BLUEBIRD_LONG_STACK_TRACES")),W=b.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(N||!!b.env("BLUEBIRD_W_FORGOTTEN_RETURN"));c.prototype.suppressUnhandledRejections=function(){var ce=this._target();ce._bitField=-1048577&ce._bitField|524288},c.prototype._ensurePossibleRejectionHandled=function(){if(!(524288&this._bitField)){this._setRejectionIsUnhandled();var ce=this;setTimeout(function(){ce._notifyUnhandledRejection()},1)}},c.prototype._notifyUnhandledRejectionIsHandled=function(){ge("rejectionHandled",d,void 0,this)},c.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},c.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},c.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var ce=this._settledValue();this._setUnhandledRejectionIsNotified(),ge("unhandledRejection",p,ce,this)}},c.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},c.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},c.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},c.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},c.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},c.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},c.prototype._warn=function(ce,de,be){return I(ce,de,be||this)},c.onPossiblyUnhandledRejection=function(ce){var de=v();p=typeof ce=="function"?de===null?ce:b.domainBind(de,ce):void 0},c.onUnhandledRejectionHandled=function(ce){var de=v();d=typeof ce=="function"?de===null?ce:b.domainBind(de,ce):void 0};var ne=function(){};c.longStackTraces=function(){if(y.haveItemsQueued()&&!je.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);if(!je.longStackTraces&&ue()){var ce=c.prototype._captureStackTrace,de=c.prototype._attachExtraTrace;je.longStackTraces=!0,ne=function(){if(y.haveItemsQueued()&&!je.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);c.prototype._captureStackTrace=ce,c.prototype._attachExtraTrace=de,f.deactivateLongStackTraces(),y.enableTrampoline(),je.longStackTraces=!1},c.prototype._captureStackTrace=E,c.prototype._attachExtraTrace=M,f.activateLongStackTraces(),y.disableTrampolineIfNecessary()}},c.hasLongStackTraces=function(){return je.longStackTraces&&ue()};var q=function(){try{if(typeof CustomEvent=="function"){var ce=new CustomEvent("CustomEvent");return b.global.dispatchEvent(ce),function(de,be){var ye=new CustomEvent(de.toLowerCase(),{detail:be,cancelable:!0});return!b.global.dispatchEvent(ye)}}return typeof Event=="function"?(ce=new Event("CustomEvent"),b.global.dispatchEvent(ce),function(de,be){var ye=new Event(de.toLowerCase(),{cancelable:!0});return ye.detail=be,!b.global.dispatchEvent(ye)}):((ce=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),b.global.dispatchEvent(ce),function(de,be){var ye=document.createEvent("CustomEvent");return ye.initCustomEvent(de.toLowerCase(),!1,!0,be),!b.global.dispatchEvent(ye)})}catch{}return function(){return!1}}(),J=b.isNode?function(){return r.emit.apply(r,arguments)}:b.global?function(ce){var de="on"+ce.toLowerCase(),be=b.global[de];return!!be&&(be.apply(b.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function oe(ce,de){return{promise:de}}var le={promiseCreated:oe,promiseFulfilled:oe,promiseRejected:oe,promiseResolved:oe,promiseCancelled:oe,promiseChained:function(ce,de,be){return{promise:de,child:be}},warning:function(ce,de){return{warning:de}},unhandledRejection:function(ce,de,be){return{reason:de,promise:be}},rejectionHandled:oe},G=function(ce){var de=!1;try{de=J.apply(null,arguments)}catch(ye){y.throwLater(ye),de=!0}var be=!1;try{be=q(ce,le[ce].apply(null,arguments))}catch(ye){y.throwLater(ye),be=!0}return be||de};function F(){return!1}function A(ce,de,be){var ye=this;try{ce(de,be,function(Se){if(typeof Se!="function")throw new TypeError("onCancel must be a function, got: "+b.toString(Se));ye._attachCancellationCallback(Se)})}catch(Se){return Se}}function B(ce){if(!this._isCancellable())return this;var de=this._onCancel();de!==void 0?b.isArray(de)?de.push(ce):this._setOnCancel([de,ce]):this._setOnCancel(ce)}function re(){return this._onCancelField}function U(ce){this._onCancelField=ce}function Z(){this._cancellationParent=void 0,this._onCancelField=void 0}function ie(ce,de){if(1&de){this._cancellationParent=ce;var be=ce._branchesRemainingToCancel;be===void 0&&(be=0),ce._branchesRemainingToCancel=be+1}2&de&&ce._isBound()&&this._setBoundTo(ce._boundTo)}c.config=function(ce){if("longStackTraces"in(ce=Object(ce))&&(ce.longStackTraces?c.longStackTraces():!ce.longStackTraces&&c.hasLongStackTraces()&&ne()),"warnings"in ce){var de=ce.warnings;je.warnings=!!de,W=je.warnings,b.isObject(de)&&"wForgottenReturn"in de&&(W=!!de.wForgottenReturn)}if("cancellation"in ce&&ce.cancellation&&!je.cancellation){if(y.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");c.prototype._clearCancellationData=Z,c.prototype._propagateFrom=ie,c.prototype._onCancel=re,c.prototype._setOnCancel=U,c.prototype._attachCancellationCallback=B,c.prototype._execute=A,se=ie,je.cancellation=!0}return"monitoring"in ce&&(ce.monitoring&&!je.monitoring?(je.monitoring=!0,c.prototype._fireEvent=G):!ce.monitoring&&je.monitoring&&(je.monitoring=!1,c.prototype._fireEvent=F)),c},c.prototype._fireEvent=F,c.prototype._execute=function(ce,de,be){try{ce(de,be)}catch(ye){return ye}},c.prototype._onCancel=function(){},c.prototype._setOnCancel=function(ce){},c.prototype._attachCancellationCallback=function(ce){},c.prototype._captureStackTrace=function(){},c.prototype._attachExtraTrace=function(){},c.prototype._clearCancellationData=function(){},c.prototype._propagateFrom=function(ce,de){};var se=function(ce,de){2&de&&ce._isBound()&&this._setBoundTo(ce._boundTo)};function pe(){var ce=this._boundTo;return ce!==void 0&&ce instanceof c?ce.isFulfilled()?ce.value():void 0:ce}function E(){this._trace=new Le(this._peekContext())}function M(ce,de){if(w(ce)){var be=this._trace;if(be!==void 0&&de&&(be=be._parent),be!==void 0)be.attachExtraTrace(ce);else if(!ce.__stackCleaned__){var ye=Q(ce);b.notEnumerableProp(ce,"stack",ye.message+` `+ye.stack.join(` `)),b.notEnumerableProp(ce,"__stackCleaned__",!0)}}}function I(ce,de,be){if(je.warnings){var ye,Se=new x(ce);if(de)be._attachExtraTrace(Se);else if(je.longStackTraces&&(ye=c._peekContext()))ye.attachExtraTrace(Se);else{var Pe=Q(Se);Se.stack=Pe.message+` `+Pe.stack.join(` `)}G("warning",Se)||ae(Se,"",!0)}}function X(ce){for(var de=[],be=0;be0?function(ye){for(var Se=ye.stack.replace(/\s+$/g,"").split(` `),Pe=0;Pe0&&ye.name!="SyntaxError"&&(Se=Se.slice(Pe)),Se}(ce):[" (No stack trace)"],{message:be,stack:ce.name=="SyntaxError"?de:X(de)}}function ae(ce,de,be){if(typeof console<"u"){var ye;if(b.isObject(ce)){var Se=ce.stack;ye=de+D(Se,ce)}else ye=de+String(ce);typeof g=="function"?g(ye,be):typeof console.log!="function"&&typeof console.log!="object"||console.log(ye)}}function ge(ce,de,be,ye){var Se=!1;try{typeof de=="function"&&(Se=!0,ce==="rejectionHandled"?de(ye):de(be,ye))}catch(Pe){y.throwLater(Pe)}ce==="unhandledRejection"?G(ce,be,ye)||Se||ae(be,"Unhandled rejection "):G(ce,ye)}function De(ce){var de;if(typeof ce=="function")de="[function "+(ce.name||"anonymous")+"]";else{if(de=ce&&typeof ce.toString=="function"?ce.toString():b.toString(ce),/\[object [a-zA-Z0-9$_]+\]/.test(de))try{de=JSON.stringify(ce)}catch{}de.length===0&&(de="(empty array)")}return"(<"+function(be){return be.length<41?be:be.substr(0,38)+"..."}(de)+">, no stack trace)"}function ue(){return typeof Me=="function"}var ve=function(){return!1},_e=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Ce(ce){var de=ce.match(_e);if(de)return{fileName:de[1],line:parseInt(de[2],10)}}function Le(ce){this._parent=ce,this._promisesCreated=0;var de=this._length=1+(ce===void 0?0:ce._length);Me(this,Le),de>32&&this.uncycle()}b.inherits(Le,Error),f.CapturedTrace=Le,Le.prototype.uncycle=function(){var ce=this._length;if(!(ce<2)){for(var de=[],be={},ye=0,Se=this;Se!==void 0;++ye)de.push(Se),Se=Se._parent;for(ye=(ce=this._length=ye)-1;ye>=0;--ye){var Pe=de[ye].stack;be[Pe]===void 0&&(be[Pe]=ye)}for(ye=0;ye0&&(de[Ne-1]._parent=void 0,de[Ne-1]._length=1),de[ye]._parent=void 0,de[ye]._length=1;var Qe=ye>0?de[ye-1]:this;Ne=0;--qe)de[qe]._length=et,et++;return}}}},Le.prototype.attachExtraTrace=function(ce){if(!ce.__stackCleaned__){this.uncycle();for(var de=Q(ce),be=de.message,ye=[de.stack],Se=this;Se!==void 0;)ye.push(X(Se.stack.split(` `))),Se=Se._parent;(function(Pe){for(var Ne=Pe[0],Qe=1;Qe=0;--Sn)if(et[Sn]===Gt){zt=Sn;break}for(Sn=zt;Sn>=0;--Sn){var ar=et[Sn];if(Ne[qe]!==ar)break;Ne.pop(),qe--}Ne=et}})(ye),function(Pe){for(var Ne=0;Ne=0)return k=/@/,D=de,R=!0,function(Pe){Pe.stack=new Error().stack};try{throw new Error}catch(Pe){ye="stack"in Pe}return"stack"in Se||!ye||typeof Error.stackTraceLimit!="number"?(D=function(Pe,Ne){return typeof Pe=="string"?Pe:typeof Ne!="object"&&typeof Ne!="function"||Ne.name===void 0||Ne.message===void 0?De(Ne):Ne.toString()},null):(k=ce,D=de,function(Pe){Error.stackTraceLimit+=6;try{throw new Error}catch(Ne){Pe.stack=Ne.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(g=function(ce){console.warn(ce)},b.isNode&&r.stderr.isTTY?g=function(ce,de){var be=de?"\x1B[33m":"\x1B[31m";console.warn(be+ce+`\x1B[0m `)}:b.isNode||typeof new Error().stack!="string"||(g=function(ce,de){console.warn("%c"+ce,de?"color: darkorange":"color: red")}));var je={warnings:N,longStackTraces:!1,cancellation:!1,monitoring:!1};return H&&c.longStackTraces(),{longStackTraces:function(){return je.longStackTraces},warnings:function(){return je.warnings},cancellation:function(){return je.cancellation},monitoring:function(){return je.monitoring},propagateFromFunction:function(){return se},boundValueFunction:function(){return pe},checkForgottenReturns:function(ce,de,be,ye,Se){if(ce===void 0&&de!==null&&W){if(Se!==void 0&&Se._returnedNonUndefined()||!(65535&ye._bitField))return;be&&(be+=" ");var Pe="",Ne="";if(de._trace){for(var Qe=de._trace.stack.split(` `),et=X(Qe),qe=et.length-1;qe>=0;--qe){var Gt=et[qe];if(!C.test(Gt)){var zt=Gt.match(T);zt&&(Pe="at "+zt[1]+":"+zt[2]+":"+zt[3]+" ");break}}if(et.length>0){var Sn=et[0];for(qe=0;qe0&&(Ne=` `+Qe[qe-1]);break}}}var ar="a promise was created in a "+be+"handler "+Pe+"but was not returned from it, see http://goo.gl/rRqMUw"+Ne;ye._warn(ar,!0,de)}},setBounds:function(ce,de){if(ue()){for(var be,ye,Se=ce.stack.split(` `),Pe=de.stack.split(` `),Ne=-1,Qe=-1,et=0;et=Qe||(ve=function(Gt){if(S.test(Gt))return!0;var zt=Ce(Gt);return!!(zt&&zt.fileName===be&&Ne<=zt.line&&zt.line<=Qe)})}},warn:I,deprecated:function(ce,de){var be=ce+" is deprecated and will be removed in a future version.";return de&&(be+=" Use "+de+" instead."),I(be)},CapturedTrace:Le,fireDomEvent:q,fireGlobalEvent:J}}},{"./errors":12,"./util":36}],10:[function(s,a,l){a.exports=function(c){function f(){return this.value}function d(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(d,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,d,void 0,{reason:p},void 0);var g=arguments[1];return this.caught(p,function(){throw g})},c.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof c&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var g=arguments[1];return g instanceof c&&g.suppressUnhandledRejections(),this.caught(p,function(){return g})}}},{}],11:[function(s,a,l){a.exports=function(c,f){var d=c.reduce,p=c.all;function g(){return p(this)}c.prototype.each=function(v){return d(this,v,f,0)._then(g,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return d(this,v,f,f)},c.each=function(v,y){return d(v,y,f,0)._then(g,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return d(v,y,f,f)}}},{}],12:[function(s,a,l){var c,f,d=s("./es5"),p=d.freeze,g=s("./util"),v=g.inherits,y=g.notEnumerableProp;function x(N,H){function W(ne){if(!(this instanceof W))return new W(ne);y(this,"message",typeof ne=="string"?ne:H),y(this,"name",N),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return v(W,Error),W}var b=x("Warning","warning"),w=x("CancellationError","cancellation error"),S=x("TimeoutError","timeout error"),C=x("AggregateError","aggregate error");try{c=TypeError,f=RangeError}catch{c=x("TypeError","type error"),f=x("RangeError","range error")}for(var T="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),k=0;k1?k.cancelPromise._reject(D):k.cancelPromise._cancel(),k.cancelPromise=null,!0)}function S(){return T.call(this,this.promise._target()._settledValue())}function C(k){if(!w(this,k))return v.e=k,v}function T(k){var D=this.promise,R=this.handler;if(!this.called){this.called=!0;var z=this.isFinallyHandler()?R.call(D._boundValue()):R.call(D._boundValue(),k);if(z===d)return z;if(z!==void 0){D._setReturnedNonUndefined();var N=f(z,D);if(N instanceof c){if(this.cancelPromise!=null){if(N._isCancelled()){var H=new g("late cancellation observer");return D._attachExtraTrace(H),v.e=H,v}N.isPending()&&N._attachCancellationCallback(new b(this))}return N._then(S,C,void 0,this,void 0)}}}return D.isRejected()?(w(this),v.e=k,v):(w(this),k)}return x.prototype.isFinallyHandler=function(){return this.type===0},b.prototype._resultCancelled=function(){w(this.finallyHandler)},c.prototype._passThrough=function(k,D,R,z){return typeof k!="function"?this.then():this._then(R,z,void 0,new x(this,D,k),void 0)},c.prototype.lastly=c.prototype.finally=function(k){return this._passThrough(k,0,T,T)},c.prototype.tap=function(k){return this._passThrough(k,1,T)},c.prototype.tapCatch=function(k){var D=arguments.length;if(D===1)return this._passThrough(k,1,void 0,T);var R,z=new Array(D-1),N=0;for(R=0;R0&&typeof arguments[b]=="function"&&(x=arguments[b]);var w=[].slice.call(arguments);x&&w.pop();var S=new f(w).promise();return x!==void 0?S.spread(x):S}}},{"./util":36}],18:[function(s,a,l){a.exports=function(c,f,d,p,g,v){var y=c._getDomain,x=s("./util"),b=x.tryCatch,w=x.errorObj,S=c._async;function C(k,D,R,z){this.constructor$(k),this._promise._captureStackTrace();var N=y();this._callback=N===null?D:x.domainBind(N,D),this._preservedValues=z===g?new Array(this.length()):null,this._limit=R,this._inFlight=0,this._queue=[],S.invoke(this._asyncInit,this,void 0)}function T(k,D,R,z){if(typeof D!="function")return d("expecting a function but got "+x.classString(D));var N=0;if(R!==void 0){if(typeof R!="object"||R===null)return c.reject(new TypeError("options argument must be an object but it is "+x.classString(R)));if(typeof R.concurrency!="number")return c.reject(new TypeError("'concurrency' must be a number but it is "+x.classString(R.concurrency)));N=R.concurrency}return new C(k,D,N=typeof N=="number"&&isFinite(N)&&N>=1?N:0,z).promise()}x.inherits(C,f),C.prototype._asyncInit=function(){this._init$(void 0,-2)},C.prototype._init=function(){},C.prototype._promiseFulfilled=function(k,D){var R=this._values,z=this.length(),N=this._preservedValues,H=this._limit;if(D<0){if(R[D=-1*D-1]=k,H>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(H>=1&&this._inFlight>=H)return R[D]=k,this._queue.push(D),!1;N!==null&&(N[D]=k);var W=this._promise,ne=this._callback,q=W._boundValue();W._pushContext();var J=b(ne).call(q,k,D,z),oe=W._popContext();if(v.checkForgottenReturns(J,oe,N!==null?"Promise.filter":"Promise.map",W),J===w)return this._reject(J.e),!0;var le=p(J,this._promise);if(le instanceof c){var G=(le=le._target())._bitField;if(!(50397184&G))return H>=1&&this._inFlight++,R[D]=le,le._proxy(this,-1*(D+1)),!1;if(!(33554432&G))return 16777216&G?(this._reject(le._reason()),!0):(this._cancel(),!0);J=le._value()}R[D]=J}return++this._totalResolved>=z&&(N!==null?this._filter(R,N):this._resolve(R),!0)},C.prototype._drainQueue=function(){for(var k=this._queue,D=this._limit,R=this._values;k.length>0&&this._inFlight1){g.deprecated("calling Promise.try with more than 1 argument");var S=arguments[1],C=arguments[2];b=v.isArray(S)?y(x).apply(C,S):y(x).call(C,S)}else b=y(x)();var T=w._popContext();return g.checkForgottenReturns(b,T,"Promise.try",w),w._resolveFromSyncValue(b),w},c.prototype._resolveFromSyncValue=function(x){x===v.errorObj?this._rejectCallback(x.e,!1):this._resolveCallback(x,!0)}}},{"./util":36}],20:[function(s,a,l){var c=s("./util"),f=c.maybeWrapAsError,d=s("./errors").OperationalError,p=s("./es5"),g=/^(?:name|message|stack|cause)$/;function v(y){var x;if(function(C){return C instanceof Error&&p.getPrototypeOf(C)===Error.prototype}(y)){(x=new d(y)).name=y.name,x.message=y.message,x.stack=y.stack;for(var b=p.keys(y),w=0;w1){var ie,se=new Array(Z-1),pe=0;for(ie=0;ie0&&typeof U!="function"&&typeof Z!="function"){var ie=".then() only accepts functions but was passed: "+y.classString(U);arguments.length>1&&(ie+=", "+y.classString(Z)),this._warn(ie)}return this._then(U,Z,void 0,void 0,void 0)},F.prototype.done=function(U,Z){this._then(U,Z,void 0,void 0,void 0)._setIsFinal()},F.prototype.spread=function(U){return typeof U!="function"?d("expecting a function but got "+y.classString(U)):this.all()._then(U,void 0,void 0,D,void 0)},F.prototype.toJSON=function(){var U={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(U.fulfillmentValue=this.value(),U.isFulfilled=!0):this.isRejected()&&(U.rejectionReason=this.reason(),U.isRejected=!0),U},F.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new N(this).promise()},F.prototype.error=function(U){return this.caught(y.originatesFromRejection,U)},F.getNewLibraryCopy=a.exports,F.is=function(U){return U instanceof F},F.fromNode=F.fromCallback=function(U){var Z=new F(k);Z._captureStackTrace();var ie=arguments.length>1&&!!Object(arguments[1]).multiArgs,se=G(U)(oe(Z,ie));return se===le&&Z._rejectCallback(se.e,!0),Z._isFateSealed()||Z._setAsyncGuaranteed(),Z},F.all=function(U){return new N(U).promise()},F.cast=function(U){var Z=z(U);return Z instanceof F||((Z=new F(k))._captureStackTrace(),Z._setFulfilled(),Z._rejectionHandler0=U),Z},F.resolve=F.fulfilled=F.cast,F.reject=F.rejected=function(U){var Z=new F(k);return Z._captureStackTrace(),Z._rejectCallback(U,!0),Z},F.setScheduler=function(U){if(typeof U!="function")throw new C("expecting a function but got "+y.classString(U));return w.setScheduler(U)},F.prototype._then=function(U,Z,ie,se,pe){var E=pe!==void 0,M=E?pe:new F(k),I=this._target(),X=I._bitField;E||(M._propagateFrom(this,3),M._captureStackTrace(),se===void 0&&2097152&this._bitField&&(se=50397184&X?this._boundValue():I===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,M));var Q=g();if(50397184&X){var ae,ge,De=I._settlePromiseCtx;33554432&X?(ge=I._rejectionHandler0,ae=U):16777216&X?(ge=I._fulfillmentHandler0,ae=Z,I._unsetRejectionIsUnhandled()):(De=I._settlePromiseLateCancellationObserver,ge=new T("late cancellation observer"),I._attachExtraTrace(ge),ae=Z),w.invoke(De,I,{handler:Q===null?ae:typeof ae=="function"&&y.domainBind(Q,ae),promise:M,receiver:se,value:ge})}else I._addCallbacks(U,Z,M,se,Q);return M},F.prototype._length=function(){return 65535&this._bitField},F.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},F.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},F.prototype._setLength=function(U){this._bitField=-65536&this._bitField|65535&U},F.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},F.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},F.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},F.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},F.prototype._isFinal=function(){return(4194304&this._bitField)>0},F.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},F.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},F.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},F.prototype._setAsyncGuaranteed=function(){w.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},F.prototype._receiverAt=function(U){var Z=U===0?this._receiver0:this[4*U-4+3];if(Z!==v)return Z===void 0&&this._isBound()?this._boundValue():Z},F.prototype._promiseAt=function(U){return this[4*U-4+2]},F.prototype._fulfillmentHandlerAt=function(U){return this[4*U-4+0]},F.prototype._rejectionHandlerAt=function(U){return this[4*U-4+1]},F.prototype._boundValue=function(){},F.prototype._migrateCallback0=function(U){U._bitField;var Z=U._fulfillmentHandler0,ie=U._rejectionHandler0,se=U._promise0,pe=U._receiverAt(0);pe===void 0&&(pe=v),this._addCallbacks(Z,ie,se,pe,null)},F.prototype._migrateCallbackAt=function(U,Z){var ie=U._fulfillmentHandlerAt(Z),se=U._rejectionHandlerAt(Z),pe=U._promiseAt(Z),E=U._receiverAt(Z);E===void 0&&(E=v),this._addCallbacks(ie,se,pe,E,null)},F.prototype._addCallbacks=function(U,Z,ie,se,pe){var E=this._length();if(E>=65531&&(E=0,this._setLength(0)),E===0)this._promise0=ie,this._receiver0=se,typeof U=="function"&&(this._fulfillmentHandler0=pe===null?U:y.domainBind(pe,U)),typeof Z=="function"&&(this._rejectionHandler0=pe===null?Z:y.domainBind(pe,Z));else{var M=4*E-4;this[M+2]=ie,this[M+3]=se,typeof U=="function"&&(this[M+0]=pe===null?U:y.domainBind(pe,U)),typeof Z=="function"&&(this[M+1]=pe===null?Z:y.domainBind(pe,Z))}return this._setLength(E+1),E},F.prototype._proxy=function(U,Z){this._addCallbacks(void 0,void 0,Z,U,null)},F.prototype._resolveCallback=function(U,Z){if(!(117506048&this._bitField)){if(U===this)return this._rejectCallback(c(),!1);var ie=z(U,this);if(!(ie instanceof F))return this._fulfill(U);Z&&this._propagateFrom(ie,2);var se=ie._target();if(se!==this){var pe=se._bitField;if(50397184&pe)if(33554432&pe)this._fulfill(se._value());else if(16777216&pe)this._reject(se._reason());else{var I=new T("late cancellation observer");se._attachExtraTrace(I),this._reject(I)}else{var E=this._length();E>0&&se._migrateCallback0(this);for(var M=1;M>>16)){if(U===this){var ie=c();return this._attachExtraTrace(ie),this._reject(ie)}this._setFulfilled(),this._rejectionHandler0=U,(65535&Z)>0&&(134217728&Z?this._settlePromises():w.settlePromises(this))}},F.prototype._reject=function(U){var Z=this._bitField;if(!((117506048&Z)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=U,this._isFinal())return w.fatalError(U,y.isNode);(65535&Z)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled()}},F.prototype._fulfillPromises=function(U,Z){for(var ie=1;ie0){if(16842752&U){var ie=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,ie,U),this._rejectPromises(Z,ie)}else{var se=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,se,U),this._fulfillPromises(Z,se)}this._setLength(0)}this._clearCancellationData()},F.prototype._settledValue=function(){var U=this._bitField;return 33554432&U?this._rejectionHandler0:16777216&U?this._fulfillmentHandler0:void 0},F.defer=F.pending=function(){return ne.deprecated("Promise.defer","new Promise"),{promise:new F(k),resolve:A,reject:B}},y.notEnumerableProp(F,"_makeSelfResolutionError",c),s("./method")(F,k,z,d,ne),s("./bind")(F,k,z,ne),s("./cancel")(F,N,d,ne),s("./direct_resolve")(F),s("./synchronous_inspection")(F),s("./join")(F,N,z,k,w,g),F.Promise=F,F.version="3.5.1",s("./map.js")(F,N,d,z,k,ne),s("./call_get.js")(F),s("./using.js")(F,d,z,W,k,ne),s("./timers.js")(F,k,ne),s("./generators.js")(F,d,k,z,p,ne),s("./nodeify.js")(F),s("./promisify.js")(F,k),s("./props.js")(F,N,z,d),s("./race.js")(F,k,z,d),s("./reduce.js")(F,N,d,z,k,ne),s("./settle.js")(F,N,ne),s("./some.js")(F,N,d),s("./filter.js")(F,k),s("./each.js")(F,k),s("./any.js")(F),y.toFastProperties(F),y.toFastProperties(F.prototype),re({a:1}),re({b:2}),re({c:3}),re(1),re(function(){}),re(void 0),re(!1),re(new F(k)),ne.setBounds(b.firstLineError,y.lastLineError),F}},{"./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(s,a,l){a.exports=function(c,f,d,p,g){var v=s("./util");function y(x){var b=this._promise=new c(f);x instanceof c&&b._propagateFrom(x,3),b._setOnCancel(this),this._values=x,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return v.isArray,v.inherits(y,g),y.prototype.length=function(){return this._length},y.prototype.promise=function(){return this._promise},y.prototype._init=function x(b,w){var S=d(this._values,this._promise);if(S instanceof c){var C=(S=S._target())._bitField;if(this._values=S,(50397184&C)==0)return this._promise._setAsyncGuaranteed(),S._then(x,this._reject,void 0,this,w);if(!(33554432&C))return 16777216&C?this._reject(S._reason()):this._cancel();S=S._value()}if((S=v.asArray(S))!==null)S.length!==0?this._iterate(S):w===-5?this._resolveEmptyArray():this._resolve(function(k){switch(w){case-2:return[];case-3:return{};case-6:return new Map}}());else{var T=p("expecting an array or an iterable object but got "+v.classString(S)).reason();this._promise._rejectCallback(T,!1)}},y.prototype._iterate=function(x){var b=this.getActualLength(x.length);this._length=b,this._values=this.shouldCopyValues()?new Array(b):this._values;for(var w=this._promise,S=!1,C=null,T=0;T=this._length&&(this._resolve(this._values),!0)},y.prototype._promiseCancelled=function(){return this._cancel(),!0},y.prototype._promiseRejected=function(x){return this._totalResolved++,this._reject(x),!0},y.prototype._resultCancelled=function(){if(!this._isResolved()){var x=this._values;if(this._cancel(),x instanceof c)x.cancel();else for(var b=0;b=this._length){var k;if(this._isMap)k=function(N){for(var H=new g,W=N.length/2|0,ne=0;ne>1},c.prototype.props=function(){return S(this)},c.props=function(C){return S(C)}}},{"./es5":13,"./util":36}],26:[function(s,a,l){function c(f){this._capacity=f,this._length=0,this._front=0}c.prototype._willBeOverCapacity=function(f){return this._capacity"u"){var p=i.setImmediate,g=r.nextTick;c=f.isRecentNode?function(y){p.call(i,y)}:function(y){g.call(r,y)}}else if(typeof d=="function"&&typeof d.resolve=="function"){var v=d.resolve();c=function(y){v.then(y)}}else c=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"),x={attributes:!0},b=!1,w=document.createElement("div");return new MutationObserver(function(){y.classList.toggle("foo"),b=!1}).observe(w,x),function(S){var C=new MutationObserver(function(){C.disconnect(),S()});C.observe(y,x),b||(b=!0,w.classList.toggle("foo"))}}();a.exports=c},{"./util":36}],30:[function(s,a,l){a.exports=function(c,f,d){var p=c.PromiseInspection;function g(v){this.constructor$(v)}s("./util").inherits(g,f),g.prototype._promiseResolved=function(v,y){return this._values[v]=y,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},g.prototype._promiseFulfilled=function(v,y){var x=new p;return x._bitField=33554432,x._settledValueField=v,this._promiseResolved(y,x)},g.prototype._promiseRejected=function(v,y){var x=new p;return x._bitField=16777216,x._settledValueField=v,this._promiseResolved(y,x)},c.settle=function(v){return d.deprecated(".settle()",".reflect()"),new g(v).promise()},c.prototype.settle=function(){return c.settle(this)}}},{"./util":36}],31:[function(s,a,l){a.exports=function(c,f,d){var p=s("./util"),g=s("./errors").RangeError,v=s("./errors").AggregateError,y=p.isArray,x={};function b(S){this.constructor$(S),this._howMany=0,this._unwrap=!1,this._initialized=!1}function w(S,C){if((0|C)!==C||C<0)return d(`expecting a positive integer See http://goo.gl/MqrFmX `);var T=new b(S),k=T.promise();return T.setHowMany(C),T.init(),k}p.inherits(b,f),b.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var S=y(this._values);!this._isResolved()&&S&&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(S){this._howMany=S},b.prototype._promiseFulfilled=function(S){return this._addFulfilled(S),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(S){return this._addRejected(S),this._checkOutcome()},b.prototype._promiseCancelled=function(){return this._values instanceof c||this._values==null?this._cancel():(this._addRejected(x),this._checkOutcome())},b.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var S=new v,C=this.length();C0?this._reject(S):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(S){this._values.push(S)},b.prototype._addFulfilled=function(S){this._values[this._totalResolved++]=S},b.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},b.prototype._getRangeError=function(S){var C="Input array must contain at least "+this._howMany+" items but contains only "+S+" items";return new g(C)},b.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},c.some=function(S,C){return w(S,C)},c.prototype.some=function(S){return w(this,S)},c._SomePromiseArray=b}},{"./errors":12,"./util":36}],32:[function(s,a,l){a.exports=function(c){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()},g=f.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},v=f.prototype.isRejected=function(){return(16777216&this._bitField)!=0},y=f.prototype.isPending=function(){return(50397184&this._bitField)==0},x=f.prototype.isResolved=function(){return(50331648&this._bitField)!=0};f.prototype.isCancelled=function(){return(8454144&this._bitField)!=0},c.prototype.__isCancelled=function(){return(65536&this._bitField)==65536},c.prototype._isCancelled=function(){return this._target().__isCancelled()},c.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!=0},c.prototype.isPending=function(){return y.call(this._target())},c.prototype.isRejected=function(){return v.call(this._target())},c.prototype.isFulfilled=function(){return g.call(this._target())},c.prototype.isResolved=function(){return x.call(this._target())},c.prototype.value=function(){return d.call(this._target())},c.prototype.reason=function(){var b=this._target();return b._unsetRejectionIsUnhandled(),p.call(b)},c.prototype._value=function(){return this._settledValue()},c.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},c.PromiseInspection=f}},{}],33:[function(s,a,l){a.exports=function(c,f){var d=s("./util"),p=d.errorObj,g=d.isObject,v={}.hasOwnProperty;return function(y,x){if(g(y)){if(y instanceof c)return y;var b=function(S){try{return function(C){return C.then}(S)}catch(C){return p.e=C,p}}(y);if(b===p){x&&x._pushContext();var w=c.reject(b.e);return x&&x._popContext(),w}if(typeof b=="function")return function(S){try{return v.call(S,"_promise0")}catch{return!1}}(y)?(w=new c(f),y._then(w._fulfill,w._reject,void 0,w,null),w):function(S,C,T){var k=new c(f),D=k;T&&T._pushContext(),k._captureStackTrace(),T&&T._popContext();var R=!0,z=d.tryCatch(C).call(S,function(N){k&&(k._resolveCallback(N),k=null)},function(N){k&&(k._rejectCallback(N,R,!0),k=null)});return R=!1,k&&z===p&&(k._rejectCallback(z.e,!0,!0),k=null),D}(y,b,x)}return y}}},{"./util":36}],34:[function(s,a,l){a.exports=function(c,f,d){var p=s("./util"),g=c.TimeoutError;function v(S){this.handle=S}v.prototype._resultCancelled=function(){clearTimeout(this.handle)};var y=function(S){return x(+this).thenReturn(S)},x=c.delay=function(S,C){var T,k;return C!==void 0?(T=c.resolve(C)._then(y,null,null,S,void 0),d.cancellation()&&C instanceof c&&T._setOnCancel(C)):(T=new c(f),k=setTimeout(function(){T._fulfill()},+S),d.cancellation()&&T._setOnCancel(new v(k)),T._captureStackTrace()),T._setAsyncGuaranteed(),T};function b(S){return clearTimeout(this.handle),S}function w(S){throw clearTimeout(this.handle),S}c.prototype.delay=function(S){return x(S,this)},c.prototype.timeout=function(S,C){var T,k;S=+S;var D=new v(setTimeout(function(){T.isPending()&&function(R,z,N){var H;H=typeof z!="string"?z instanceof Error?z:new g("operation timed out"):new g(z),p.markAsOriginatingFromRejection(H),R._attachExtraTrace(H),R._reject(H),N!=null&&N.cancel()}(T,C,k)},S));return d.cancellation()?(k=this.then(),(T=k._then(b,w,void 0,D,void 0))._setOnCancel(D)):T=this._then(b,w,void 0,D,void 0),T}}},{"./util":36}],35:[function(s,a,l){a.exports=function(c,f,d,p,g,v){var y=s("./util"),x=s("./errors").TypeError,b=s("./util").inherits,w=y.errorObj,S=y.tryCatch,C={};function T(H){setTimeout(function(){throw H},0)}function k(H,W){var ne=0,q=H.length,J=new c(g);return function oe(){if(ne>=q)return J._fulfill();var le=function(G){var F=d(G);return F!==G&&typeof G._isDisposable=="function"&&typeof G._getDisposer=="function"&&G._isDisposable()&&F._setDisposable(G._getDisposer()),F}(H[ne++]);if(le instanceof c&&le._isDisposable()){try{le=d(le._getDisposer().tryDispose(W),H.promise)}catch(G){return T(G)}if(le instanceof c)return le._then(oe,T,null,null,null)}oe()}(),J}function D(H,W,ne){this._data=H,this._promise=W,this._context=ne}function R(H,W,ne){this.constructor$(H,W,ne)}function z(H){return D.isDisposer(H)?(this.resources[this.index]._setDisposable(H),H.promise()):H}function N(H){this.length=H,this.promise=null,this[H-1]=null}D.prototype.data=function(){return this._data},D.prototype.promise=function(){return this._promise},D.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():C},D.prototype.tryDispose=function(H){var W=this.resource(),ne=this._context;ne!==void 0&&ne._pushContext();var q=W!==C?this.doDispose(W,H):null;return ne!==void 0&&ne._popContext(),this._promise._unsetDisposable(),this._data=null,q},D.isDisposer=function(H){return H!=null&&typeof H.resource=="function"&&typeof H.tryDispose=="function"},b(R,D),R.prototype.doDispose=function(H,W){return this.data().call(H,H,W)},N.prototype._resultCancelled=function(){for(var H=this.length,W=0;W0},c.prototype._getDisposer=function(){return this._disposer},c.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},c.prototype.disposer=function(H){if(typeof H=="function")return new R(H,this,p());throw new x}}},{"./errors":12,"./util":36}],36:[function(s,a,l){var c,f=s("./es5"),d=typeof navigator>"u",p={e:{}},g=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function v(){try{var q=c;return c=null,q.apply(this,arguments)}catch(J){return p.e=J,p}}function y(q){return q==null||q===!0||q===!1||typeof q=="string"||typeof q=="number"}function x(q,J,oe){if(y(q))return q;var le={value:oe,configurable:!0,enumerable:!1,writable:!0};return f.defineProperty(q,J,le),q}var b=function(){var q=[Array.prototype,Object.prototype,Function.prototype],J=function(G){for(var F=0;F1,le=J.length>0&&!(J.length===1&&J[0]==="constructor"),G=w.test(q+"")&&f.names(q).length>0;if(oe||le||G)return!0}return!1}catch{return!1}},isIdentifier:function(q){return S.test(q)},inheritedDataKeys:b,getDataPropertyOrDefault:function(q,J,oe){if(!f.isES5)return{}.hasOwnProperty.call(q,J)?q[J]:void 0;var le=Object.getOwnPropertyDescriptor(q,J);return le!=null?le.get==null&&le.set==null?le.value:oe:void 0},thrower:function(q){throw q},isArray:f.isArray,asArray:z,notEnumerableProp:x,isPrimitive:y,isObject:function(q){return typeof q=="function"||typeof q=="object"&&q!==null},isError:T,canEvaluate:d,errorObj:p,tryCatch:function(q){return c=q,v},inherits:function(q,J){var oe={}.hasOwnProperty;function le(){for(var G in this.constructor=q,this.constructor$=J,J.prototype)oe.call(J.prototype,G)&&G.charAt(G.length-1)!=="$"&&(this[G+"$"]=J.prototype[G])}return le.prototype=J.prototype,q.prototype=new le,q.prototype},withAppended:function(q,J){var oe,le=q.length,G=new Array(le+1);for(oe=0;oe10||q[0]>0}(),ne.isNode&&ne.toFastProperties(r);try{throw new Error}catch(q){ne.lastLineError=q}a.exports=ne},{"./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,s=r.length;o0?(typeof B=="string"||se.objectMode||Object.getPrototypeOf(B)===f.prototype||(B=function(pe){return f.from(pe)}(B)),U?se.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):k(A,se,B,!0):se.ended?A.emit("error",new Error("stream.push() after EOF")):(se.reading=!1,se.decoder&&!re?(B=se.decoder.write(B),se.objectMode||B.length!==0?k(A,se,B,!1):H(A,se)):k(A,se,B,!1))):U||(se.reading=!1)),function(pe){return!pe.ended&&(pe.needReadable||pe.lengthB.highWaterMark&&(B.highWaterMark=function(re){return re>=D?re=D:(re--,re|=re>>>1,re|=re>>>2,re|=re>>>4,re|=re>>>8,re|=re>>>16,re++),re}(A)),A<=B.length?A:B.ended?B.length:(B.needReadable=!0,0))}function z(A){var B=A._readableState;B.needReadable=!1,B.emittedReadable||(v("emitReadable",B.flowing),B.emittedReadable=!0,B.sync?o.nextTick(N,A):N(A))}function N(A){v("emit readable"),A.emit("readable"),J(A)}function H(A,B){B.readingMore||(B.readingMore=!0,o.nextTick(W,A,B))}function W(A,B){for(var re=B.length;!B.reading&&!B.flowing&&!B.ended&&B.length=B.length?(re=B.decoder?B.buffer.join(""):B.buffer.length===1?B.buffer.head.data:B.buffer.concat(B.length),B.buffer.clear()):re=function(U,Z,ie){var se;return UQ.length?Q.length:pe;if(ae===Q.length?X+=Q:X+=Q.slice(0,pe),(pe-=ae)==0){ae===Q.length?(++I,M.next?E.head=M.next:E.head=E.tail=null):(E.head=M,M.data=Q.slice(ae));break}++I}return E.length-=I,X}(U,Z):function(pe,E){var M=f.allocUnsafe(pe),I=E.head,X=1;for(I.data.copy(M),pe-=I.data.length;I=I.next;){var Q=I.data,ae=pe>Q.length?Q.length:pe;if(Q.copy(M,M.length-pe,0,ae),(pe-=ae)==0){ae===Q.length?(++X,I.next?E.head=I.next:E.head=E.tail=null):(E.head=I,I.data=Q.slice(ae));break}++X}return E.length-=X,M}(U,Z),se}(A,B.buffer,B.decoder),re);var re}function le(A){var B=A._readableState;if(B.length>0)throw new Error('"endReadable()" called on non-empty stream');B.endEmitted||(B.ended=!0,o.nextTick(G,B,A))}function G(A,B){A.endEmitted||A.length!==0||(A.endEmitted=!0,B.readable=!1,B.emit("end"))}function F(A,B){for(var re=0,U=A.length;re=B.highWaterMark||B.ended))return v("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?le(this):z(this),null;if((A=R(A,B))===0&&B.ended)return B.length===0&&le(this),null;var U,Z=B.needReadable;return v("need readable",Z),(B.length===0||B.length-A0?oe(A,B):null)===null?(B.needReadable=!0,A=0):B.length-=A,B.length===0&&(B.ended||(B.needReadable=!0),re!==A&&B.ended&&le(this)),U!==null&&this.emit("data",U),U},C.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},C.prototype.pipe=function(A,B){var re=this,U=this._readableState;switch(U.pipesCount){case 0:U.pipes=A;break;case 1:U.pipes=[U.pipes,A];break;default:U.pipes.push(A)}U.pipesCount+=1,v("pipe count=%d opts=%j",U.pipesCount,B);var Z=B&&B.end===!1||A===i.stdout||A===i.stderr?ae:ie;function ie(){v("onend"),A.end()}U.endEmitted?o.nextTick(Z):re.once("end",Z),A.on("unpipe",function ge(De,ue){v("onunpipe"),De===re&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),A.removeListener("close",X),A.removeListener("finish",Q),A.removeListener("drain",se),A.removeListener("error",I),A.removeListener("unpipe",ge),re.removeListener("end",ie),re.removeListener("end",ae),re.removeListener("data",M),pe=!0,!U.awaitDrain||A._writableState&&!A._writableState.needDrain||se())});var se=function(ge){return function(){var De=ge._readableState;v("pipeOnDrain",De.awaitDrain),De.awaitDrain&&De.awaitDrain--,De.awaitDrain===0&&l(ge,"data")&&(De.flowing=!0,J(ge))}}(re);A.on("drain",se);var pe=!1,E=!1;function M(ge){v("ondata"),E=!1,A.write(ge)!==!1||E||((U.pipesCount===1&&U.pipes===A||U.pipesCount>1&&F(U.pipes,A)!==-1)&&!pe&&(v("false write response, pause",re._readableState.awaitDrain),re._readableState.awaitDrain++,E=!0),re.pause())}function I(ge){v("onerror",ge),ae(),A.removeListener("error",I),l(A,"error")===0&&A.emit("error",ge)}function X(){A.removeListener("finish",Q),ae()}function Q(){v("onfinish"),A.removeListener("close",X),ae()}function ae(){v("unpipe"),re.unpipe(A)}return re.on("data",M),function(ge,De,ue){if(typeof ge.prependListener=="function")return ge.prependListener(De,ue);ge._events&&ge._events[De]?a(ge._events[De])?ge._events[De].unshift(ue):ge._events[De]=[ue,ge._events[De]]:ge.on(De,ue)}(A,"error",I),A.once("close",X),A.once("finish",Q),A.emit("pipe",re),U.flowing||(v("pipe resume"),re.resume()),A},C.prototype.unpipe=function(A){var B=this._readableState,re={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return A&&A!==B.pipes?this:(A||(A=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,A&&A.emit("unpipe",this,re),this);if(!A){var U=B.pipes,Z=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var ie=0;ie>5==6?2:v>>4==14?3:v>>3==30?4:v>>6==2?-1:-2}function a(v){var y=this.lastTotal-this.lastNeed,x=function(b,w,S){if((192&w[0])!=128)return b.lastNeed=0,"�";if(b.lastNeed>1&&w.length>1){if((192&w[1])!=128)return b.lastNeed=1,"�";if(b.lastNeed>2&&w.length>2&&(192&w[2])!=128)return b.lastNeed=2,"�"}}(this,v);return x!==void 0?x:this.lastNeed<=v.length?(v.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(v.copy(this.lastChar,y,0,v.length),void(this.lastNeed-=v.length))}function l(v,y){if((v.length-y)%2==0){var x=v.toString("utf16le",y);if(x){var b=x.charCodeAt(x.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",y,v.length-1)}function c(v){var y=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,x)}return y}function f(v,y){var x=(v.length-y)%3;return x===0?v.toString("base64",y):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",y,v.length-x))}function d(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(v){return v.toString(this.encoding)}function g(v){return v&&v.length?this.write(v):""}t.StringDecoder=o,o.prototype.write=function(v){if(v.length===0)return"";var y,x;if(this.lastNeed){if((y=this.fillLast(v))===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0?(k>0&&(w.lastNeed=k-1),k):--T=0?(k>0&&(w.lastNeed=k-2),k):--T=0?(k>0&&(k===2?k=0:w.lastNeed=k-3),k):0}(this,v,y);if(!this.lastNeed)return v.toString("utf8",y);this.lastTotal=x;var b=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,b),v.toString("utf8",y,b)},o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.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(c,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(c);var g=this._readableState;g.reading=!1,(g.needReadable||g.length-1&&s.push(i[a]);return s},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(s,a){s.__proto__=a}||function(s,a){for(var l in a)a.hasOwnProperty(l)&&(s[l]=a[l])};return function(s,a){function l(){this.constructor=s}o(s,a),s.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function s(a,l,c){var f=o.call(this,"Error: "+a+". JSON Line number: "+l+(c?" near: "+c:""))||this;return f.err=a,f.line=l,f.extra=c,f.name="CSV Parse Error",f}return r(s,o),s.column_mismatched=function(a,l){return new s("column_mismatched",a,l)},s.unclosed_quote=function(a,l){return new s("unclosed_quote",a,l)},s.fromJSON=function(a){return new s(a.err,a.line,a.extra)},s.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},s}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),s=r?r.toStringTag:void 0;e.exports=function(a){return a==null?a===void 0?"[object Undefined]":"[object Null]":s&&s in Object(a)?i(a):o(a)}},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,s){return new r.Converter(o,s)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)y.hasOwnProperty(x)&&(v[x]=y[x])};return function(v,y){function x(){this.constructor=v}g(v,y),v.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),o=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(36),a=n(50),l=n(51),c=o(n(15)),f=n(52),d=n(105),p=function(g){function v(y,x){x===void 0&&(x={});var b=g.call(this,x)||this;return b.options=x,b.params=a.mergeParams(y),b.runtime=l.initParseRuntime(b),b.result=new d.Result(b),b.processor=new f.ProcessorLocal(b),b.once("error",function(w){r(function(){b.result.processError(w),b.emit("done",w)})}),b.once("done",function(){b.processor.destroy()}),b}return i(v,g),v.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},v.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},v.prototype.subscribe=function(y,x,b){return this.parseRuntime.subscribe={onNext:y,onError:x,onCompleted:b},this},v.prototype.fromFile=function(y,x){var b=this,w=n(!function(){var S=new Error("Cannot find module 'fs'");throw S.code="MODULE_NOT_FOUND",S}());return w.exists(y,function(S){S?w.createReadStream(y,x).pipe(b):b.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},v.prototype.fromStream=function(y){return y.pipe(this),this},v.prototype.fromString=function(y){y.toString();var x=new s.Readable,b=0;return x._read=function(w){if(b>=y.length)this.push(null);else{var S=y.substr(b,w);this.push(S),b+=w}},this.fromStream(x)},v.prototype.then=function(y,x){var b=this;return new c.default(function(w,S){b.parseRuntime.then={onfulfilled:function(C){w(y?y(C):C)},onrejected:function(C){x?w(x(C)):S(C)}}})},Object.defineProperty(v.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),v.prototype._transform=function(y,x,b){var w=this;this.processor.process(y).then(function(S){if(S.length>0)return w.runtime.started=!0,w.result.processResult(S)}).then(function(){w.emit("drained"),b()},function(S){w.runtime.hasError=!0,w.runtime.error=S,w.emit("error",S),b()})},v.prototype._flush=function(y){var x=this;this.processor.flush().then(function(b){if(b.length>0)return x.result.processResult(b)}).then(function(){x.processEnd(y)},function(b){x.emit("error",b),y()})},v.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(v.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),v}(s.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,s){if(!o.setImmediate){var a,l=1,c={},f=!1,d=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?a=function(y){i.nextTick(function(){v(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,x=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=x,y}}()?function(){var y="setImmediate$"+Math.random()+"$",x=function(b){b.source===o&&typeof b.data=="string"&&b.data.indexOf(y)===0&&v(+b.data.slice(y.length))};o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),a=function(b){o.postMessage(y+b,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){v(x.data)},a=function(x){y.port2.postMessage(x)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var y=d.documentElement;a=function(x){var b=d.createElement("script");b.onreadystatechange=function(){v(x),b.onreadystatechange=null,y.removeChild(b),b=null},y.appendChild(b)}}():a=function(y){setTimeout(v,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=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,s){var a=this;function l(y){o.writable&&o.write(y)===!1&&a.pause&&a.pause()}function c(){a.readable&&a.resume&&a.resume()}a.on("data",l),o.on("drain",c),o._isStdio||s&&s.end===!1||(a.on("end",d),a.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 g(y){if(v(),r.listenerCount(this,"error")===0)throw y}function v(){a.removeListener("data",l),o.removeListener("drain",c),a.removeListener("end",d),a.removeListener("close",p),a.removeListener("error",g),o.removeListener("error",g),a.removeListener("end",v),a.removeListener("close",v),o.removeListener("close",v)}return a.on("error",g),o.on("error",g),a.on("end",v),a.on("close",v),o.on("close",v),o.emit("pipe",a),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 g=c(p),v=g[0],y=g[1];return 3*(v+y)/4-y},t.toByteArray=function(p){for(var g,v=c(p),y=v[0],x=v[1],b=new o(3*(y+x)/4-x),w=0,S=x>0?y-4:y,C=0;C>16&255,b[w++]=g>>8&255,b[w++]=255&g;return x===2&&(g=i[p.charCodeAt(C)]<<2|i[p.charCodeAt(C+1)]>>4,b[w++]=255&g),x===1&&(g=i[p.charCodeAt(C)]<<10|i[p.charCodeAt(C+1)]<<4|i[p.charCodeAt(C+2)]>>2,b[w++]=g>>8&255,b[w++]=255&g),b},t.fromByteArray=function(p){for(var g,v=p.length,y=v%3,x=[],b=0,w=v-y;bw?w:b+16383));return y===1?(g=p[v-1],x.push(r[g>>2]+r[g<<4&63]+"==")):y===2&&(g=(p[v-2]<<8)+p[v-1],x.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),x.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=g),[v,v===g?0:4-v%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function d(p,g,v){for(var y,x=[],b=g;b>1,p=-7,g=i?s-1:0,v=i?-1:1,y=n[r+g];for(g+=v,a=y&(1<<-p)-1,y>>=-p,p+=c;p>0;a=256*a+n[r+g],g+=v,p-=8);for(l=a&(1<<-p)-1,a>>=-p,p+=o;p>0;l=256*l+n[r+g],g+=v,p-=8);if(a===0)a=1-d;else{if(a===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),a-=d}return(y?-1:1)*l*Math.pow(2,a-o)},t.write=function(n,r,i,o,s,a){var l,c,f,d=8*a-s-1,p=(1<>1,v=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:a-1,x=o?1:-1,b=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=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+g>=1?v/f:v*Math.pow(2,1-g))*f>=2&&(l++,f/=2),l+g>=p?(c=0,l=p):l+g>=1?(c=(r*f-1)*Math.pow(2,s),l+=g):(c=r*Math.pow(2,g-1)*Math.pow(2,s),l=0));s>=8;n[i+y]=255&c,y+=x,c/=256,s-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,d-=8);n[i+y-x]|=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(s,a,l){s.copy(a,l)}e.exports=function(){function s(){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(a){var l={data:a,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},s.prototype.unshift=function(a){var l={data:a,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},s.prototype.shift=function(){if(this.length!==0){var a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(a){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=a+l.data;return c},s.prototype.concat=function(a){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(a>>>0),c=this.head,f=0;c;)o(c.data,l,f),f+=c.data.length,c=c.next;return l},s}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var s=r.localStorage[o];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(o,s){if(i("noDeprecation"))return o;var a=!1;return function(){if(!a){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),a=!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(s){if(!(this instanceof o))return new o(s);r.call(this,s)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(s,a,l){l(null,s)}},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 x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var S in w)w.hasOwnProperty(S)&&(b[S]=w[S])};return function(b,w){function S(){this.constructor=b}x(b,w),b.prototype=w===null?Object.create(w):(S.prototype=w.prototype,new S)}}(),o=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(53),a=o(n(15)),l=n(54),c=o(n(16)),f=n(57),d=n(28),p=n(58),g=o(n(59)),v=o(n(29)),y=function(x){function b(){var w=x!==null&&x.apply(this,arguments)||this;return w.rowSplit=new p.RowSplit(w.converter),w.eolEmitted=!1,w._needEmitEol=void 0,w.headEmitted=!1,w._needEmitHead=void 0,w}return i(b,x),b.prototype.flush=function(){var w=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var S=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(S,!0).then(function(C){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?a.default.reject(v.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):a.default.resolve(C)})}return a.default.resolve([])},b.prototype.destroy=function(){return a.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(w,S){var C,T=this;return S===void 0&&(S=!1),C=S?w.toString():l.prepareData(w,this.converter.parseRuntime),a.default.resolve().then(function(){return T.runtime.preRawDataHook?T.runtime.preRawDataHook(C):C}).then(function(k){return k&&k.length>0?T.processCSV(k,S):a.default.resolve([])})},b.prototype.processCSV=function(w,S){var C=this,T=this.params,k=this.runtime;k.eol||c.default(w,k),this.needEmitEol&&!this.eolEmitted&&k.eol&&(this.converter.emit("eol",k.eol),this.eolEmitted=!0),T.ignoreEmpty&&!k.started&&(w=d.trimLeft(w));var D=f.stringToLines(w,k);return S?(D.lines.push(D.partial),D.partial=""):this.prependLeftBuf(d.bufFromString(D.partial)),D.lines.length>0?(k.preFileLineHook?this.runPreLineHook(D.lines):a.default.resolve(D.lines)).then(function(R){return k.started||C.runtime.headers?C.processCSVBody(R):C.processDataWithHead(R)}):a.default.resolve([])},b.prototype.processDataWithHead=function(w){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var S="",C=[];w.length;){var T=S+w.shift(),k=this.rowSplit.parse(T);if(k.closed){C=k.cells,S="";break}S=T+c.default(T,this.runtime)}if(this.prependLeftBuf(d.bufFromString(S)),C.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=C}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(w)},b.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var w=this.runtime.headers,S=0;S=D.length)N();else if(R.preFileLineHook){var H=D[z],W=R.preFileLineHook(H,R.parsedLineNumber+z);if(z++,W&&W.then)W.then(function(ne){D[z-1]=ne,k(D,R,z,N)});else{for(D[z-1]=W;z0?r.concat([d.csvLineBuffer,f]):f}(s,a);a.csvLineBuffer=void 0;var c=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,a).toString("utf8");return a.started===!1?o.default(c):c}}).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(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.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(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,g=c.split(p);if(f==="off"){if(d)for(var v=0;vd&&(p=g,d=v)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,d=this.escape;return c[0]===f&&(c[1]!==f||c[1]===d&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,d=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,g=c.length-1;c[g]===f||c[g]===d;)g--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){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 c.replace(d,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],d="";c.length;){var p=d+c.shift(),g=this.parse(p);g.cells.length===0&&this.conv.parseParam.ignoreEmpty||(g.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(g.cells,this.conv.parseRuntime.selectedColumns)):f.push(g.cells),d=""):d=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:f,partial:d}},l}();t.RowSplit=a},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)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function a(b,w,S){if(w.parseParam.checkColumn&&w.parseRuntime.headers&&b.length!==w.parseRuntime.headers.length)throw i.default.column_mismatched(w.parseRuntime.parsedLineNumber+S);return function(C,T,k){for(var D=!1,R={},z=0,N=C.length;z-1){for(var k=w.split("."),D=!0;k.length>0;)if(k.shift().length===0){D=!1;break}!D||C.parseParam.colParser[w]&&C.parseParam.colParser[w].flat?C.parseRuntime.columnValueSetter[T]=d:C.parseRuntime.columnValueSetter[T]=p}else C.parseRuntime.columnValueSetter[T]=d;C.parseParam.nullObject===!0&&S==="null"&&(S=null),C.parseRuntime.columnValueSetter[T](b,w,S)}function d(b,w,S){b[w]=S}function p(b,w,S){o.default(b,w,S)}function g(b,w,S,C){return C.parseRuntime.headerType[S]?C.parseRuntime.headerType[S]:w.indexOf("number#!")>-1?C.parseRuntime.headerType[S]=v:w.indexOf("string#!")>-1?C.parseRuntime.headerType[S]=y:C.parseParam.checkType?C.parseRuntime.headerType[S]=x:C.parseRuntime.headerType[S]=y}function v(b){var w=parseFloat(b);return isNaN(w)?b:w}function y(b){return b.toString()}function x(b){var w=b.trim();return w===""?y(b):s.test(w)?v(b):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(S){var C=S.trim();return C.length!==5||C.toLowerCase()!=="false"}(b):w[0]==="{"&&w[w.length-1]==="}"||w[0]==="["&&w[w.length-1]==="]"?function(S){try{return JSON.parse(S)}catch{return S}}(b):y(b)}},function(e,t,n){var r=n(61);e.exports=function(i,o,s){return i==null?i:r(i,o,s)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),s=n(20),a=n(104);e.exports=function(l,c,f,d){if(!s(l))return l;for(var p=-1,g=(c=i(c,l)).length,v=g-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var s=this.__data__,a=r(s,i);return a<0?(++this.size,s.push([i,o])):s[a][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 s=r(this,i),a=s.size;return s.set(i,o),this.size+=s.size==a?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),s=n(22),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function c(f){if(typeof f=="string")return f;if(o(f))return i(f,c)+"";if(s(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,s=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(c){var f=this,d=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&d===0&&a(this.converter,"["+o.EOL),new i.default(function(p,g){f.needEmitLine?function v(y,x,b,w,S){if(b>=y.length)S();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var C=x.parseRuntime.subscribe.onNext,T=y[b],k=C(T,x.parseRuntime.parsedLineNumber+b);if(b++,k&&k.then)k.then(function(){(function(R,z,N,H,W,ne,q){W&&a(N,q),v(R,N,H,W,ne)})(y,0,x,b,w,S,T)},S);else{for(w&&a(x,T);bnew Promise(t=>{Gye().fromString(e).then(t)}),Zye=new l5,Qye=e=>Zye.parse(e),Xye="shlink",rD=e=>`${Xye}.${e}`;class Jye{constructor(t){me(this,"get",t=>{const n=this.localStorage.getItem(rD(t));return n?JSON.parse(n):void 0});me(this,"set",(t,n)=>this.localStorage.setItem(rD(t),JSON.stringify(n)));this.localStorage=t}}class e0e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const t0e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",Jye,"localStorage"),e.service("TagColorsStorage",e0e,"Storage"),e.constant("csvToJson",Kye),e.constant("jsonToCsv",Qye),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",Nve,"setTimeout","clearTimeout")},wl=new ZN,{container:aC}=wl,n0e=(e,t)=>(...n)=>e[t](...n),r0e=(e,t)=>({...e,[t]:n0e(aC,t)}),Vy=(e,t=[])=>kN(e?vS(e):null,t.reduce(r0e,{}));tae(wl,Vy);Pve(wl,Vy);lse(wl);bye(wl,Vy);t0e(wl);Yye(wl,Vy);var lC={},Lx={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 c=[],f=0;fF.length)&&(A=F.length);for(var B=0,re=Array(A);BgO({appUpdated:eae,servers:nye,selectedServer:e.selectedServerReducer,settings:Rye}),s0e=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},a0e=!0,G5={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},l0e=s0e(lC.load(G5)),c0e=e=>k6({devTools:!a0e,reducer:o0e(e),preloadedState:l0e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(lC.save(G5))}),u0e=!!(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 f0e(e){if("serviceWorker"in navigator){if(new URL(Sg.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Sg.homepage}/service-worker.js`;u0e?(d0e(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")})):K5(n,e)})}}function K5(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 d0e(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()})}):K5(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const h0e="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=",p0e="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==",m0e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",g0e=()=>{delete Hj.Icon.Default.prototype._getIconUrl,Hj.Icon.Default.mergeOptions({iconRetinaUrl:p0e,iconUrl:h0e,shadowUrl:m0e})};g0e();const Z5=c0e(aC),{App:v0e,ScrollToTop:y0e,ErrorHandler:_0e,appUpdateAvailable:b0e}=aC;pN(document.getElementById("root")).render(m.jsx(PN,{store:Z5,children:m.jsx(FN,{basename:Sg.homepage,children:m.jsx(_0e,{children:m.jsx(y0e,{children:m.jsx(v0e,{})})})})}));f0e({onUpdate(){Z5.dispatch(b0e())}});