From b3155475519bc65c369aa3ac9fc0c7f51241aa31 Mon Sep 17 00:00:00 2001 From: acelaya Date: Tue, 7 Dec 2021 19:51:09 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@47f5f478670a2ec17b9b5b46a0a6dd2342dabce3?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- develop/asset-manifest.json | 4 ++-- develop/index.html | 2 +- .../js/{main.6c98e3d6.chunk.js => main.3a706a99.chunk.js} | 4 ++-- develop/static/js/main.3a706a99.chunk.js.map | 1 + develop/static/js/main.6c98e3d6.chunk.js.map | 1 - 5 files changed, 6 insertions(+), 6 deletions(-) rename develop/static/js/{main.6c98e3d6.chunk.js => main.3a706a99.chunk.js} (93%) create mode 100644 develop/static/js/main.3a706a99.chunk.js.map delete mode 100644 develop/static/js/main.6c98e3d6.chunk.js.map diff --git a/develop/asset-manifest.json b/develop/asset-manifest.json index b535f523..1e9ac2f6 100644 --- a/develop/asset-manifest.json +++ b/develop/asset-manifest.json @@ -1,7 +1,7 @@ { "main.css": "/shlink-web-client/develop/static/css/main.0dc55d47.chunk.css", - "main.js": "/shlink-web-client/develop/static/js/main.6c98e3d6.chunk.js", - "main.js.map": "/shlink-web-client/develop/static/js/main.6c98e3d6.chunk.js.map", + "main.js": "/shlink-web-client/develop/static/js/main.3a706a99.chunk.js", + "main.js.map": "/shlink-web-client/develop/static/js/main.3a706a99.chunk.js.map", "runtime~main.js": "/shlink-web-client/develop/static/js/runtime~main.fadb821e.js", "runtime~main.js.map": "/shlink-web-client/develop/static/js/runtime~main.fadb821e.js.map", "static/css/2.04c5acbe.chunk.css": "/shlink-web-client/develop/static/css/2.04c5acbe.chunk.css", diff --git a/develop/index.html b/develop/index.html index 48f282f8..3aa52398 100644 --- a/develop/index.html +++ b/develop/index.html @@ -1 +1 @@ -Shlink — The URL shortener
\ No newline at end of file +Shlink — The URL shortener
\ No newline at end of file diff --git a/develop/static/js/main.6c98e3d6.chunk.js b/develop/static/js/main.3a706a99.chunk.js similarity index 93% rename from develop/static/js/main.6c98e3d6.chunk.js rename to develop/static/js/main.3a706a99.chunk.js index 943bde44..f9cd4c40 100644 --- a/develop/static/js/main.6c98e3d6.chunk.js +++ b/develop/static/js/main.3a706a99.chunk.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{103:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(3),c=r(0),a=r(1);function s(e){return function(t){return Object(a.useEffect)((function(){t.resetSelectedServer()}),[]),Object(c.jsx)(e,Object(n.a)({},t))}}},104:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return c}));var n=function(e,t,r){var n=e.document,c=n.createElement("a");c.setAttribute("href",t),c.setAttribute("download",r),c.style.visibility="hidden",n.body.appendChild(c),c.click(),n.body.removeChild(c)},c=function(e,t,r){var c=new Blob([t],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(c);n(e,a,r)}},147:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/develop"}')},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),a=function(e){var t=e.color,r=void 0===t?c.c:t,a=e.className;return Object(n.jsx)("svg",{className:a,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsxs)("g",{fill:r,children:[Object(n.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"}),Object(n.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"}),Object(n.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"}),Object(n.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"})]})})}},151:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(0),a=r(1),s=r(54),i=r(30),o=r(60);function l(e,t){return function(r){var l=r.selectServer,u=r.selectedServer,d=r.match;return Object(a.useEffect)((function(){l(d.params.serverId)}),[d.params.serverId]),u?Object(i.c)(u)?Object(c.jsx)(t,{}):Object(c.jsx)(e,Object(n.a)({},r)):Object(c.jsx)(o.a,{children:Object(c.jsx)(s.a,{loading:!0})})}}},153:function(e,t,r){"use strict";var n=r(0),c=r(22),a=r(32);t.a=function(e){var t=e.to,r=void 0===t?"/":t,s=e.children,i=void 0===s?"Home":s;return Object(n.jsx)("div",{className:"home",children:Object(n.jsxs)(a.a,{className:"p-4",children:[Object(n.jsx)("h2",{children:"Oops! We could not find requested route."}),Object(n.jsx)("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),Object(n.jsx)("br",{}),Object(n.jsx)(c.b,{to:r,className:"btn btn-outline-primary btn-lg",children:i})]})})}},165:function(e,t,r){"use strict";var n=r(0),c=r(555),a=r(556),s=r(22),i=r(7),o=r.n(i),l=r(12),u=r(11),d=function(e){var t=e.id,r=e.name;return Object(n.jsxs)(c.a,{tag:s.b,to:"/server/".concat(t),className:"servers-list__server-item",children:[r,Object(n.jsx)(l.a,{icon:u.j,className:"servers-list__server-item-icon"})]})};t.a=function(e){var t=e.servers,r=e.children,c=e.embedded,s=void 0!==c&&c;return Object(n.jsxs)(n.Fragment,{children:[r&&Object(n.jsx)("h5",{className:"mb-md-3",children:r}),t.length>0&&Object(n.jsx)(a.a,{className:o()("servers-list__list-group",{"servers-list__list-group--embedded":s}),children:t.map((function(e){var t=e.id,r=e.name;return Object(n.jsx)(d,{id:t,name:r},t)}))})]})}},25:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(9),c=r(1),a=r(279),s=r(51),i=function(e,t){return function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,s=Object(c.useState)(r),i=Object(n.a)(s,2),o=i[0],l=i[1],u=Object(c.useRef)(void 0),d=function(){l(!r),u.current&&t(u.current),u.current=e((function(){return l(r)}),a)};return[o,d]}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(c.useState)(e),r=Object(n.a)(t,2),a=r[0],s=r[1];return[a,function(){return s(!a)},function(){return s(!0)},function(){return s(!1)}]},l=function(e,t){var r=function(e){return function(t){t.event.composedPath().some((function(e){var t=e.classList;return null===t||void 0===t?void 0:t.contains("visits-table")}))||document.querySelector(".modal")||e()}};return Object(a.useSwipeable)({delta:40,onSwipedLeft:r(t),onSwipedRight:r(e)})},u=function(e,t){var r=Object(c.useState)(t),a=Object(n.a)(r,2),i=a[0],o=a[1];return[i,function(t){var r=window,n=r.location,c=r.history,a=Object(s.a)(n.search);a[e]=t,c.pushState(null,"","".concat(n.pathname,"?").concat(Object(s.b)(a))),o(t)}]}},276:function(e,t,r){"use strict";(function(e){var n=r(277),c=r.n(n),a=r(278),s=r(309),i=r(310),o=r(311),l=r(312),u=r(280),d=r(307),j=r(103),b=r(282);t.a=function(t,r,n){t.constant("window",e.window),t.constant("console",e.console),t.constant("axios",c.a),t.service("ImageDownloader",b.a,"axios","window"),t.serviceFactory("ScrollToTop",a.a),t.decorator("ScrollToTop",n),t.serviceFactory("MainHeader",s.a,"ServersDropdown"),t.decorator("MainHeader",n),t.serviceFactory("Home",(function(){return i.a})),t.decorator("Home",j.a),t.decorator("Home",n),t.decorator("Home",r(["servers"],["resetSelectedServer"])),t.serviceFactory("MenuLayout",o.a,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),t.decorator("MenuLayout",r(["selectedServer"],["selectServer"])),t.decorator("MenuLayout",n),t.serviceFactory("AsideMenu",l.a,"DeleteServerButton"),t.serviceFactory("ShlinkVersionsContainer",(function(){return d.a})),t.decorator("ShlinkVersionsContainer",r(["selectedServer"])),t.serviceFactory("ErrorHandler",u.a,"window","console")}}).call(this,r(49))},278:function(e,t,r){"use strict";var n=r(0),c=r(1);t.a=function(){return function(e){var t=e.location,r=e.children;return Object(c.useEffect)((function(){scrollTo(0,0)}),[t]),Object(n.jsx)(n.Fragment,{children:r})}}},280:function(e,t,r){"use strict";var n=r(19),c=r(27),a=r(37),s=r(36),i=r(0),o=r(1),l=r(216),u=r(32);t.a=function(e,t){var r=e.location,d=t.error;return function(e){Object(a.a)(o,e);var t=Object(s.a)(o);function o(e){var r;return Object(n.a)(this,o),(r=t.call(this,e)).state={hasError:!1},r}return Object(c.a)(o,[{key:"componentDidCatch",value:function(e){d(e)}},{key:"render",value:function(){return this.state.hasError?Object(i.jsx)("div",{className:"home",children:Object(i.jsxs)(u.a,{className:"p-4",children:[Object(i.jsx)("h1",{children:"Oops! This is awkward :S"}),Object(i.jsx)("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),Object(i.jsx)("br",{}),Object(i.jsx)(l.a,{outline:!0,color:"primary",onClick:function(){return r.reload()},children:"Take me back"})]})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),o}(o.Component)}},282:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(15),s=r(19),i=r(27),o=r(104),l=function(){function e(t,r){Object(s.a)(this,e),this.axios=t,this.window=r}return Object(i.a)(e,[{key:"saveImage",value:function(){var e=Object(a.a)(c.a.mark((function e(t,r){var n,a,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get(t,{responseType:"blob"});case 2:n=e.sent,a=n.data,s=URL.createObjectURL(a),Object(o.b)(this.window,s,r);case 6:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}()},298:function(e,t,r){"use strict";(function(e){var n=r(25),c=r(299),a=r(300);t.a=function(t){t.constant("localStorage",e.localStorage),t.service("Storage",c.a,"localStorage"),t.service("ColorGenerator",a.a,"Storage"),t.constant("setTimeout",e.setTimeout),t.constant("clearTimeout",e.clearTimeout),t.serviceFactory("useStateFlagTimeout",n.b,"setTimeout","clearTimeout")}}).call(this,r(49))},299:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(19),c=function(e){return"".concat("shlink",".").concat(e)},a=function e(t){var r=this;Object(n.a)(this,e),this.localStorage=t,this.get=function(e){var t=r.localStorage.getItem(c(e));return t?JSON.parse(t):void 0},this.set=function(e,t){return r.localStorage.setItem(c(e),JSON.stringify(t))}}},30:function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"e",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"f",(function(){return l}));var n=r(538),c=function(e){return!(null===e||void 0===e||!e.url)&&!(null===e||void 0===e||!e.apiKey)},a=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("id"))},s=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("version"))},i=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("serverNotFound"))},o=function(e){return a(e)?e.id:""},l=function(e){return Object(n.a)(["id","autoConnect"],e)}},300:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(19),c=r(31),a=Math.floor,s=Math.random,i="0123456789ABCDEF",o=function(e){return e.toLowerCase().trim()},l=function e(t){var r,l=this;Object(n.a)(this,e),this.storage=t,this.colors=void 0,this.getColorForKey=function(e){var t=o(e),r=l.colors[t];return r||l.setColorForKey(t,"#".concat(Object(c.e)(6,(function(){return i[a(s()*i.length)]})).join("")))},this.setColorForKey=function(e,t){var r=o(e);return l.colors[r]=t,l.storage.set("colors",l.colors),t},this.colors=null!==(r=this.storage.get("colors"))&&void 0!==r?r:{}}},307:function(e,t,r){"use strict";var n=r(0),c=r(7),a=r.n(c),s=r(30),i=r(543),o=r(52),l=r(70),u=Object(i.a)(Object(l.c)(),l.b),d=function(e){var t=e.project,r=e.version;return Object(n.jsx)(o.a,{href:"https://github.com/shlinkio/".concat(t,"/releases/").concat(r),className:"text-muted",children:Object(n.jsx)("b",{children:r})})},j=function(e){var t=e.selectedServer,r=e.clientVersion,c=u(void 0===r?"%_VERSION_%":r);return Object(n.jsxs)("small",{className:"text-muted",children:[Object(s.d)(t)&&Object(n.jsxs)(n.Fragment,{children:["Server: ",Object(n.jsx)(d,{project:"shlink",version:t.printableVersion})," - "]}),"Client: ",Object(n.jsx)(d,{project:"shlink-web-client",version:c})]})};t.a=function(e){var t=e.selectedServer,r=a()("text-center",{"shlink-versions-container--with-server":Object(s.d)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},309:function(e,t,r){"use strict";var n=r(9),c=r(0),a=r(11),s=r(12),i=r(1),o=r(22),l=r(548),u=r(549),d=r(550),j=r(551),b=r(552),h=r(553),O=r(554),v=r(7),f=r.n(v),m=r(25),x=r(150);t.a=function(e){return function(t){var r=t.location,v=Object(m.d)(),g=Object(n.a)(v,4),p=g[0],y=g[1],S=g[3],C=r.pathname;Object(i.useEffect)(S,[r]);var N="/settings",w=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":p});return Object(c.jsxs)(l.a,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[Object(c.jsxs)(u.a,{tag:o.b,to:"/",children:[Object(c.jsx)(x.a,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),Object(c.jsx)(d.a,{onClick:y,children:Object(c.jsx)(s.a,{icon:a.i,className:w})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:p,children:Object(c.jsxs)(b.a,{navbar:!0,className:"ml-auto",children:[Object(c.jsx)(h.a,{children:Object(c.jsxs)(O.a,{tag:o.b,to:N,active:C===N,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},31:function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(544),c=r(212),a=r(317),s=r(543),i=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Object(n.a)(r,e+1).map(t)},o=function(e){return!Object(c.a)(e)&&!Object(a.a)(e)},l=function(e){return Object(s.a)((function(e){return e.preventDefault()}),e)},u=function(e){return Object(a.a)(e)?null:e},d=function(e){return"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}},310:function(e,t,r){"use strict";var n=r(0),c=r(1),a=r(557),s=r(317),i=r(22),o=r(315),l=r(539),u=r(52),d=r(12),j=r(11),b=r(165),h=r(150);t.a=function(e){var t=e.servers,r=e.history,O=Object(a.a)(t),v=!Object(s.a)(O);return Object(c.useEffect)((function(){var e=O.find((function(e){return e.autoConnect}));e&&r.push("/server/".concat(e.id))}),[]),Object(n.jsx)("div",{className:"home",children:Object(n.jsx)(o.a,{className:"home__main-card",children:Object(n.jsxs)(l.a,{noGutters:!0,children:[Object(n.jsx)("div",{className:"col-md-5 d-none d-md-block",children:Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)(h.a,{})})}),Object(n.jsxs)("div",{className:"col-md-7 home__servers-container",children:[Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)("h1",{className:"home__title",children:"Welcome!"})}),Object(n.jsx)(b.a,{embedded:!0,servers:O,children:!v&&Object(n.jsxs)("div",{className:"p-4 text-center",children:[Object(n.jsx)("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),Object(n.jsx)("p",{children:Object(n.jsxs)(i.b,{to:"/server/create",className:"btn btn-outline-primary btn-lg mr-2",children:[Object(n.jsx)(d.a,{icon:j.E})," ",Object(n.jsx)("span",{className:"ml-1",children:"Add a server"})]})}),Object(n.jsx)("p",{className:"mb-0 mt-5",children:Object(n.jsx)(u.a,{href:"https://shlink.io/documentation",children:Object(n.jsxs)("small",{children:[Object(n.jsx)("span",{className:"mr-1",children:"Learn more about Shlink"})," ",Object(n.jsx)(d.a,{icon:j.o})]})})})]})})]})]})})})}},311:function(e,t,r){"use strict";var n=r(3),c=r(9),a=r(0),s=r(1),i=r(41),o=r(11),l=r(12),u=r(7),d=r.n(u),j=r(151),b=r(25),h=r(42),O=r(30),v=r(153);t.a=function(e,t,r,u,f,m,x,g,p,y,S){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,w=Object(b.d)(),k=Object(c.a)(w,4),_=k[0],U=k[1],T=k[2],R=k[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.d)(N))return Object(a.jsx)(g,{});var E=Object(h.e)(N),D=Object(h.c)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),V=Object(b.c)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:L,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},V),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:_}),Object(a.jsx)("div",{className:"menu-layout__container",onClick:function(){return R()},children:Object(a.jsx)("div",{className:"container-xl",children:Object(a.jsxs)(i.d,{children:[Object(a.jsx)(i.a,{exact:!0,from:"/server/:serverId",to:"/server/:serverId/overview"}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/overview",component:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/list-short-urls/:page",component:t}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/create-short-url",component:u}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/visits",component:f}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/edit",component:y}),Object(a.jsx)(i.b,{path:"/server/:serverId/tag/:tag/visits",component:m}),E&&Object(a.jsx)(i.b,{path:"/server/:serverId/orphan-visits",component:x}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),D&&Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-domains",component:S}),Object(a.jsx)(i.b,{render:function(){return Object(a.jsx)(v.a,{to:"/server/".concat(N.id,"/list-short-urls/1"),children:"List short URLs"})}})]})})})]})}))]})}),g)}},312:function(e,t,r){"use strict";var n=r(3),c=r(43),a=r(0),s=r(11),i=r(12),o=r(22),l=r(7),u=r.n(l),d=r(30),j=r(42),b=function(e){var t=e.children,r=e.to,s=e.className,i=Object(c.a)(e,["children","to","className"]);return Object(a.jsx)(o.c,Object(n.a)(Object(n.a)({className:u()("aside-menu__item",s),activeClassName:"aside-menu__item--selected",to:r},i),{},{children:t}))};t.a=function(e){return function(t){var r=t.selectedServer,n=t.showOnMobile,c=void 0!==n&&n,o=Object(d.e)(r),l=o?r.id:"",h=Object(j.c)(r),O=u()("aside-menu",{"aside-menu--hidden":!c}),v=function(e){return"/server/".concat(l).concat(e)};return Object(a.jsx)("aside",{className:O,children:Object(a.jsxs)("nav",{className:"nav flex-column aside-menu__nav",children:[Object(a.jsxs)(b,{to:v("/overview"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.t}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Overview"})]}),Object(a.jsxs)(b,{to:v("/list-short-urls/1"),isActive:function(e,t){return null!==t.pathname.match("/list-short-urls")},children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.w}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),Object(a.jsxs)(b,{to:v("/create-short-url"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.v,flip:"horizontal"}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),Object(a.jsxs)(b,{to:v("/manage-tags"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.N}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),h&&Object(a.jsxs)(b,{to:v("/manage-domains"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.s}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),Object(a.jsxs)(b,{to:v("/edit"),className:"aside-menu__item--push",children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.B}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),o&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},318:function(e,t,r){e.exports=r(534)},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(43),a=r(0),s=r(315),i=r(541),o=r(542),l=function(e){var t=e.title,r=e.children,l=e.bodyClassName,u=Object(c.a)(e,["title","children","bodyClassName"]);return Object(a.jsxs)(s.a,Object(n.a)(Object(n.a)({},u),{},{children:[t&&Object(a.jsx)(i.a,{children:t}),Object(a.jsx)(o.a,{className:l,children:r})]}))}},403:function(e,t){},405:function(e,t){},42:function(e,t,r){"use strict";r.d(t,"g",(function(){return s})),r.d(t,"i",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return l})),r.d(t,"j",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"h",(function(){return b})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return O}));var n=r(30),c=r(70),a=function(e){return function(t){return Object(n.d)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.5.0"}),i=a({minVersion:"2.6.0"}),o=i,l=i,u=i,d=a({minVersion:"2.7.0"}),j=d,b=a({minVersion:"2.8.0"}),h=b,O=a({minVersion:"2.9.0"})},46:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return u}));var n="#4696e5",c="rgba(70, 150, 229, 0.4)",a="#f77f28",s="rgba(247, 127, 40, 0.4)",i="white",o="#161b22",l=function(e){var t,r=document.getElementsByTagName("html");null===r||void 0===r||null===(t=r[0])||void 0===t||t.setAttribute("data-theme",e)},u=function(){var e,t=document.getElementsByTagName("html");return"dark"===(null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.getAttribute("data-theme"))}},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(211),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},534:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return Ra})),r.d(n,"normalizeVisits",(function(){return Ea}));var c,a=r(0),s=r(48),i=r(163),o=r(22),l=r(147),u=r(10),d=r(3),j=r(275),b=r(41),h=r(606),O=r(611),v=r(30),f=r(6),m=r.n(f),x=r(15),g=r(19),p=r(308),y=r(212),S=r(317),C=r(51),N=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(p.a)(y.a),k=function e(t,r,n){var c=this;Object(g.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(x.a)(m.a.mark((function e(){var t,r=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.abrupt("return",c.performRequest("/short-urls","GET",t).then((function(e){return e.data.shortUrls})));case 2:case"end":return e.stop()}}),e)}))),this.createShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(p.a)((function(e){return Object(S.a)(e)||Object(y.a)(e)}),t),e.abrupt("return",c.performRequest("/short-urls","POST",{},r).then((function(e){return e.data})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getShortUrlVisits=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getTagVisits=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getOrphanVisits=function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits/orphan","GET",t).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getVisitsOverview=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits","GET").then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)}))),this.getShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"GET",{domain:r}).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.deleteShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"DELETE",{domain:r}).then((function(){})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.updateShortUrlTags=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/tags"),"PUT",{domain:r},{tags:n}).then((function(e){return e.data.tags})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.updateShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"PATCH",{domain:r},n).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.listTags=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","GET",{withStats:"true"}).then((function(e){return e.data.tags})).then((function(e){return{tags:e.data,stats:e.stats}})));case 1:case"end":return e.stop()}}),e)}))),this.deleteTags=function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","DELETE",{tags:t}).then((function(){return{tags:t}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.editTag=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","PUT",{},{oldName:t,newName:r}).then((function(){return{oldName:t,newName:r}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.health=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/health","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.mercureInfo=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/mercure-info","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.listDomains=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains","GET").then((function(e){return e.data.domains.data})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains/redirects","PATCH",{},t).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.performRequest=function(){var e=Object(x.a)(m.a.mark((function e(t){var r,n,a,s,i=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:"GET",n=i.length>2&&void 0!==i[2]?i[2]:{},a=i.length>3&&void 0!==i[3]?i[3]:{},e.prev=3,e.next=6,c.axios({method:r,url:"".concat(N(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:C.b});case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),s=e.t0.response,!s&&2!==c.apiVersion){e.next=15;break}throw e.t0;case 15:return c.apiVersion=c.apiVersion-1,e.next=18,c.performRequest(t,r,n,a);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),this.apiVersion=2},_={},U=function(e){return function(t){var r,n=function(e){return"function"===typeof e}(t)?(r=t,Object(O.a)("selectedServer",r())):t;if(!Object(v.b)(n))throw new Error("There's no selected server or it is not found");var c=n.url,a=n.apiKey,s="".concat(c,"_").concat(a);return _[s]||(_[s]=new k(e,c,a)),_[s]}},T=function(e){e.serviceFactory("buildShlinkApiClient",U,"axios")},R=r(276),E=r(9),D=r(11),L=r(12),V=r(543),I=r(359),F=r(1),A=r(7),M=r.n(A),G=function(e){var t=e.onChange,r=e.className,n=e.large,s=void 0===n||n,i=e.noBorder,o=void 0!==i&&i,l=e.initialValue,u=void 0===l?"":l,d=Object(F.useState)(u),j=Object(E.a)(d,2),b=j[0],h=j[1],O=function(){c&&clearTimeout(c),c=null},v=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;h(e),O(),c=setTimeout((function(){t(e),O()}),r)};return Object(a.jsxs)("div",{className:M()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:M()("form-control search-field__input",{"form-control-lg":s,"search-field__input--no-border":o}),placeholder:"Search...",value:b,onChange:function(e){return v(e.target.value)}}),Object(a.jsx)(L.a,{icon:D.H,className:"search-field__icon"}),Object(a.jsx)("div",{className:"close search-field__close",hidden:""===b,id:"search-field__close",onClick:function(){return v("",0)},children:"\xd7"})]})},P=function(e){var t=e.text,r=e.children,n=e.clearable,c=e.className,s=void 0===c?"":c,i=e.colorGenerator,o=e.onClick,l=e.onClose;return Object(a.jsxs)("span",{className:"badge tag ".concat(s),style:{backgroundColor:i.getColorForKey(t),cursor:n||!o?"auto":"pointer"},onClick:o,children:[null!==r&&void 0!==r?r:t,n&&Object(a.jsx)("span",{className:"close tag__close-selected-tag",onClick:l,children:"\xd7"})]})},B=r(561),H=r(130),W=r(558),q=r(559),z=r(25),Q=function(e){var t=e.text,r=e.disabled,n=void 0!==r&&r,c=e.className,s=void 0===c?"":c,i=e.children,o=e.dropdownClassName,l=e.right,u=void 0!==l&&l,d=e.minWidth,j=Object(z.d)(),b=Object(E.a)(j,2),h=b[0],O=b[1],v="dropdown-btn__toggle btn-block ".concat(s),f={minWidth:d&&"".concat(d,"px")};return Object(a.jsxs)(H.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(W.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(q.a,{className:"w-100",right:u,style:f,children:i})]})},K=r(91),J=r(363),Z=r(199),Y=r(306),X=r(536),$=r(560),ee=(r(535),r(360)),te=r(361),re=r(362),ne=function(e){return"string"!==typeof e},ce=function(e,t){return e&&ne(e)?t?Object(X.default)(e,t):Object($.a)(e):e},ae=function(e){return ce(e,void 0)},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return ce(t,e)}}(),ie=function(e){return ne(e)?e:Object(I.default)(e)},oe=function(e,t,r){return!t&&r?Object(ee.default)(ie(e),ie(r)):t&&!r?Object(te.default)(ie(e),ie(t)):!t||!r||Object(re.default)(ie(e),{start:ie(t),end:ie(r)})},le=function(e){return void 0===e||Object(S.a)(Object(Y.a)(Boolean,e))},ue=function(e){return"string"===typeof e},de={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180days:"Last 180 days",last365Days:"Last 365 days",all:void 0},je=Object.keys(de).filter((function(e){return"all"!==e})),be=function(e){if(e&&"all"!==e)return ue(e)?de[e]:function(e){if(e&&!le(e))return e.startDate&&!e.endDate?"Since ".concat(se(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(se(e.endDate)):"".concat(se(e.startDate)," - ").concat(se(e.endDate))}(e)},he=function(e){return Object(K.default)(Object(J.default)(new Date,e))},Oe=function(e){return{startDate:e,endDate:Object(Z.default)(new Date)}},ve=function(e){if(!e||"all"===e)return{};switch(e){case"today":return Oe(Object(K.default)(new Date));case"yesterday":return{startDate:he(1),endDate:Object(Z.default)(Object(J.default)(new Date,1))};case"last7Days":return Oe(he(7));case"last30Days":return Oe(he(30));case"last90Days":return Oe(he(90));case"last180days":return Oe(he(180));case"last365Days":return Oe(he(365))}return{}},fe=r(284),me=r.n(fe),xe=r(78),ge=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(y.a)(n),s=Object(F.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(me.a,Object(d.a)(Object(d.a)({},e),{},{dateFormat:"yyyy-MM-dd",className:M()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(L.a,{icon:xe.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},pe=function(e){var t=e.startDate,r=void 0===t?null:t,n=e.endDate,c=void 0===n?null:n,s=e.disabled,i=void 0!==s&&s,o=e.onStartDateChange,l=e.onEndDateChange;return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ge,{selected:r,placeholderText:"Since...",isClearable:!0,maxDate:null!==c&&void 0!==c?c:void 0,disabled:i,onChange:o})}),Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ge,{className:"mt-2 mt-md-0",selected:c,placeholderText:"Until...",isClearable:!0,minDate:null!==r&&void 0!==r?r:void 0,disabled:i,onChange:l})})]})},ye=function(e){var t=e.active,r=e.allText,n=e.onChange;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B.a,{active:"all"===t,onClick:function(){return n("all")},children:r}),Object(a.jsx)(B.a,{divider:!0}),je.map((function(e){return Object(a.jsx)(B.a,{active:t===e,onClick:function(){return n(e)},children:be(e)},e)}))]})},Se=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=ue(n),o=Object(F.useState)(i?n:void 0),l=Object(E.a)(o,2),u=l[0],j=l[1],b=Object(F.useState)(i?void 0:n),h=Object(E.a)(b,2),O=h[0],v=h[1],f=function(e){j(le(e)?"all":void 0),v(e),r(e)};return Object(a.jsxs)(Q,{disabled:s,text:null!==(t=be(null!==u&&void 0!==u?u:O))&&void 0!==t?t:c,children:[Object(a.jsx)(ye,{allText:c,active:u,onChange:function(e){j(e),v(void 0),r(ve(e))}}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{header:!0,children:"Custom:"}),Object(a.jsx)(B.a,{text:!0,children:Object(a.jsx)(pe,Object(d.a)(Object(d.a)({},O),{},{onStartDateChange:function(e){return f(Object(d.a)(Object(d.a)({},O),{},{startDate:e}))},onEndDateChange:function(e){return f(Object(d.a)(Object(d.a)({},O),{},{endDate:e}))}}))})]})},Ce=function(e){var t=e.history,r=e.location,n=e.match,c=Object(F.useMemo)((function(){return Object(C.a)(r.search)}),[r]);return[c,function(e){var r=Object(C.b)(Object(d.a)(Object(d.a)({},c),e)),a=Object(S.a)(r)?"":"?".concat(r);t.push("/server/".concat(null===n||void 0===n?void 0:n.params.serverId,"/list-short-urls/1").concat(a))}]},Ne=function(e){return e?Object(I.default)(e):null},we=function(e){return function(t){var r,n=Ce(t),c=Object(E.a)(n,2),s=c[0],i=s.search,o=s.tags,l=s.startDate,u=s.endDate,d=c[1],j=null!==(r=null===o||void 0===o?void 0:o.split(","))&&void 0!==r?r:[],b=Object(V.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=ae(n))&&void 0!==t?t:void 0,endDate:null!==(r=ae(c))&&void 0!==r?r:void 0}}),d),h=Object(V.a)((function(e){return Object(S.a)(e)?void 0:e}),(function(e){return d({search:e})})),O=Object(V.a)((function(e){return j.filter((function(t){return t!==e}))}),(function(e){return 0===e.length?void 0:e.join(",")}),(function(e){return d({tags:e})}));return Object(a.jsxs)("div",{className:"search-bar-container",children:[Object(a.jsx)(G,{initialValue:i,onChange:h}),Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)("div",{className:"row",children:Object(a.jsx)("div",{className:"col-lg-8 offset-lg-4 col-xl-6 offset-xl-6",children:Object(a.jsx)(Se,{defaultText:"All short URLs",initialDateRange:{startDate:Ne(l),endDate:Ne(u)},onDatesChange:b})})})}),j.length>0&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(L.a,{icon:D.N,className:"search-bar__tags-icon"}),"\xa0",j.map((function(t){return Object(a.jsx)(P,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return O(t)}},t)}))]})]})}},ke=r(26),_e=r(571),Ue=r(61),Te=r(557),Re=r(315),Ee=r(562),De=r(563),Le=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},Ve=function(e,t){var r=t.field,n=t.dir;return r&&n?e.sort((function(e,t){var c="ASC"===n?1:-1,a="ASC"===n?-1:1;return e[r]>t[r]?c:a})):e};function Ie(e){var t,r=e.items,n=e.order,c=e.onChange,s=e.isButton,i=void 0===s||s,o=e.right,l=void 0!==o&&o,u=function(e){return function(){var t=Le(e,n.field,n.dir);c(t?e:void 0,t)}};return Object(a.jsxs)(Ee.a,{children:[Object(a.jsxs)(W.a,{caret:!0,color:i?"primary":"link",className:M()({"dropdown-btn__toggle btn-block":i,"btn-sm p-0":!i}),children:[!i&&Object(a.jsx)(a.Fragment,{children:"Order by"}),i&&!n.field&&Object(a.jsx)(a.Fragment,{children:"Order by..."}),i&&n.field&&'Order by: "'.concat(r[n.field],'" - "').concat(null!==(t=n.dir)&&void 0!==t?t:"DESC",'"')]}),Object(a.jsxs)(q.a,{right:l,className:M()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(De.a)(r).map((function(e){var t=Object(E.a)(e,2),r=t[0],c=t[1];return Object(a.jsxs)(B.a,{active:n.field===r,onClick:u(r),children:[c,n.field===r&&Object(a.jsx)(L.a,{icon:"ASC"===n.dir?D.K:D.J,className:"sorting-dropdown__sort-icon"})]},r)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{disabled:!n.field,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Fe=r(285);function Ae(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(F.useEffect)((function(){var e=function(e,t,r,n){var c=e.mercureHubUrl,a=e.token,s=e.loading,i=e.error;if(!s&&!i&&c){var o=function(e){var t=e.data;return r(JSON.parse(t))},l=function(e){return 401===e.status&&n()},u=t.map((function(e){var t=new URL(c);t.searchParams.append("topic",e);var r=new Fe.EventSourcePolyfill(t,{headers:{Authorization:"Bearer ".concat(a)}});return r.onmessage=o,r.onerror=l,r}));return function(){return u.forEach((function(e){return e.close()}))}}}(i,t(n),(function(e){return o?r.add(e):c([e])}),s);if(!o)return e;var a=setInterval((function(){c(Object(ke.a)(r)),r.clear()}),1e3*o*60);return Object(V.a)((function(){return clearInterval(a)}),(function(){return null===e||void 0===e?void 0:e()}))}),[i]),Object(a.jsx)(e,Object(d.a)({},n))}}var Me=function e(){Object(g.a)(this,e)};function Ge(e){var t=e.currentOrder,r=e.field,n=e.className,c=void 0===n?"ml-1":n;return t.dir&&t.field===r?Object(a.jsx)(L.a,{icon:"ASC"===t.dir?D.f:D.e,className:c}):null}Me.visits="https://shlink.io/new-visit",Me.orphanVisits="https://shlink.io/new-orphan-visit",Me.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Pe,Be,He,We,qe,ze,Qe,Ke,Je,Ze,Ye,Xe,$e,et,tt,rt,nt,ct,at,st=function(e,t){return function(r,n){var c=n.type,a=e[c],s=null!==r&&void 0!==r?r:t;return a?a(s,n):s}},it=function(e){return function(){return{type:e}}},ot=r(564),lt=r(565),ut=r(286),dt=r(566),jt=function(e,t,r){return Object(y.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},bt="shlink/visitCreation/CREATE_VISITS",ht=function(e){return{type:bt,createdVisits:e}},Ot=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},vt=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},ft="shlink/deleteShortUrl/DELETE_SHORT_URL_START",mt="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",xt="shlink/deleteShortUrl/SHORT_URL_DELETED",gt="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",pt={shortCode:"",loading:!1,error:!1},yt=st((Pe={},Object(u.a)(Pe,ft,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Pe,mt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Pe,xt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Pe,gt,(function(){return pt})),Pe),pt),St=function(e){return function(t,r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:ft}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:xt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:mt,errorData:Ot(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},Ct=it(gt),Nt="shlink/createShortUrl/CREATE_SHORT_URL_START",wt="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",kt="shlink/createShortUrl/CREATE_SHORT_URL",_t="shlink/createShortUrl/RESET_CREATE_SHORT_URL",Ut={result:null,saving:!1,error:!1},Tt=st((Be={},Object(u.a)(Be,Nt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Be,wt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Be,kt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Be,_t,(function(){return Ut})),Be),Ut),Rt=function(e){return function(t){return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Nt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:kt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:wt,errorData:Ot(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Et=it(_t),Dt=r(42),Lt="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Vt="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",It="shlink/shortUrlEdition/SHORT_URL_EDITED",Ft=st((He={},Object(u.a)(He,Lt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(He,Vt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(He,It,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),He),{saving:!1,error:!1}),At=function(e){return function(t,r,n){return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,d,j,b,h,O;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return a({type:Lt}),i=s(),o=i.selectedServer,l=!Object(Dt.j)(o),u=e(s),d=u.updateShortUrl,j=u.updateShortUrlTags,c.prev=4,c.next=7,Promise.all([d(t,r,n),l&&n.tags?j(t,r,n.tags):void 0]);case 7:b=c.sent,h=Object(E.a)(b,1),O=h[0],a({shortUrl:O,type:It}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Vt,errorData:Ot(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},Mt="shlink/shortUrlsList/LIST_SHORT_URLS_START",Gt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Pt="shlink/shortUrlsList/LIST_SHORT_URLS",Bt=st((We={},Object(u.a)(We,Mt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(We,Gt,(function(){return{loading:!1,error:!0}})),Object(u.a)(We,Pt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(We,xt,Object(V.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(ot.a)(["shortUrls","data"],Object(p.a)((function(e){return jt(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(ot.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(We,bt,(function(e,t){var r,n,c=t.createdVisits;return Object(ot.a)(["shortUrls","data"],null===(r=e.shortUrls)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.map((function(e){var t=Object(lt.a)(c.filter((function(t){var r=t.shortUrl;return r&&jt(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(ut.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(We,kt,Object(V.a)((function(e,t){var r=t.result;return e.shortUrls?Object(ot.a)(["shortUrls","data"],[r].concat(Object(ke.a)(Object(dt.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(ot.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(We,It,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(ot.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return jt(e,t,n)?r:e})),e):e})),We),{loading:!0,error:!1}),Ht=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Mt}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Pt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Gt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Wt="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",qt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},zt={page:"1",orderBy:{dateCreated:"DESC"}},Qt=st((qe={},Object(u.a)(qe,Pt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(qe,Wt,(function(){return zt})),qe),zt),Kt=it(Wt),Jt=r(568),Zt=r(569),Yt=r(570),Xt=r(544),$t=r(287),er=r(567),tr=Math.ceil,rr=new Intl.NumberFormat("en-US"),nr=function(e){return rr.format(Number(e))},cr="...",ar=function(e,t){var r=Object(Xt.a)(Object($t.a)(2,e-2),Object(er.a)(t-1,e+2)+1);return e-2>2&&r.unshift(cr),e+2=d,children:Object(a.jsx)(Zt.a,{next:!0,tag:o.b,to:j(l+1)})})]})},ur=function(e,t){return Ae((function(r){var n,c=r.listShortUrls,s=r.resetShortUrlParams,i=r.shortUrlsListParams,o=r.match,l=r.location,j=r.history,b=r.shortUrlsList,h=r.selectedServer,O=Object(v.a)(h),f=i.orderBy,m=Object(F.useState)({field:f&&Object(_e.a)(Object(Ue.a)(f)),dir:f&&Object(_e.a)(Object(Te.a)(f))}),x=Object(E.a)(m,2),g=x[0],p=x[1],y=Ce({history:j,match:o,location:l}),S=Object(E.a)(y,2),C=S[0],N=C.tags,w=C.search,k=C.startDate,_=C.endDate,U=S[1],T=Object(F.useMemo)((function(){var e;return null!==(e=null===N||void 0===N?void 0:N.split(","))&&void 0!==e?e:[]}),[N]),R=(null!==(n=null===b||void 0===b?void 0:b.shortUrls)&&void 0!==n?n:{}).pagination,D=function(e){return c(Object(d.a)(Object(d.a)({},i),e))},L=function(e,t){p({field:e,dir:t}),D({orderBy:e?Object(u.a)({},e,t):void 0})},I=Object(V.a)((function(e){return Object(ke.a)(new Set([].concat(Object(ke.a)(T),[e]))).join(",")}),(function(e){return U({tags:e})}));return Object(F.useEffect)((function(){return s}),[]),Object(F.useEffect)((function(){D({page:o.params.page,searchTerm:w,tags:T,itemsPerPage:void 0,startDate:k,endDate:_})}),[o.params.page,w,T,k,_]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"mb-3",children:Object(a.jsx)(t,{})}),Object(a.jsx)("div",{className:"d-block d-lg-none mb-3",children:Object(a.jsx)(Ie,{items:qt,order:g,onChange:L})}),Object(a.jsxs)(Re.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{selectedServer:h,shortUrlsList:b,orderByColumn:function(e){return function(){return L(e,Le(e,g.field,g.dir))}},renderOrderIcon:function(e){return Object(a.jsx)(Ge,{currentOrder:g,field:e})},onTagClick:I}),Object(a.jsx)(lr,{paginator:R,serverId:O,currentQueryString:l.search})]})]})}),(function(){return[Me.visits]}))},dr=r(52),jr=r(159),br=r.n(jr),hr=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(br.a,{text:t,onCopy:r,children:Object(a.jsx)(L.a,{icon:xe.c,className:"ml-2 copy-to-clipboard-icon"})})},Or=r(572),vr=r(613),fr=function(e){var t=e.date,r=e.format,n=void 0===r?"yyyy-MM-dd HH:mm":r,c=e.relative,s=void 0!==c&&c,i=ne(t)?t:Object(I.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(Or.a)(i),"000"),children:s?"".concat(Object(vr.a)(new Date,i)," ago"):Object(X.default)(i,n)})},mr=r(573),xr=r(43),gr=function(e,t,r){var n=e.id,c=t.shortCode,a=t.domain,s=a?"?domain=".concat(a):"";return"/server/".concat(n,"/short-code/").concat(c,"/").concat(r).concat(s)},pr=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(xr.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.e)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:gr(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},yr=function(e){var t,r=e.visitsCount,n=e.shortUrl,c=e.selectedServer,s=e.active,i=void 0!==s&&s,o=null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.maxVisits,l=Object(a.jsx)(pr,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:M()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:nr(r)})});if(!o)return l;var u=nr(o),d=Object(F.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:"indivisible",children:[l,Object(a.jsxs)("small",{className:"short-urls-visits-count__max-visits-control",ref:function(e){d.current=e},children:[" ","/ ",u," ",Object(a.jsx)("sup",{children:Object(a.jsx)(L.a,{icon:D.u})})]})]}),Object(a.jsxs)(mr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},Sr=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(F.useRef)(!0);return Object(F.useEffect)((function(){m.current?m.current=!1:f()}),[i.visitsCount]),Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:Object(a.jsx)(fr,{date:i.dateCreated})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:Object(a.jsxs)("span",{className:"indivisible short-urls-row__cell--relative",children:[Object(a.jsx)(dr.a,{href:i.shortUrl}),Object(a.jsx)(hr,{text:i.shortUrl,onCopy:b}),Object(a.jsx)("span",{className:"badge badge-warning short-urls-row__copy-hint",hidden:!j,children:"Copied short URL!"})]})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":"".concat(i.title?"Title":"Long URL"),children:Object(a.jsx)(dr.a,{href:i.longUrl,children:null!==(c=i.title)&&void 0!==c?c:i.longUrl})}),i.title&&Object(a.jsx)("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:Object(a.jsx)(dr.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(S.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(P,{colorGenerator:t,text:e,onClick:function(){return null===l||void 0===l?void 0:l(e)}},e)})))}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(yr,{visitsCount:i.visitsCount,shortUrl:i,selectedServer:o,active:v})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell",children:Object(a.jsx)(e,{selectedServer:o,shortUrl:i})})]})}},Cr=r(574),Nr=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(Cr.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(W.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(L.a,{icon:D.n}),"\xa0"]}),Object(a.jsx)(q.a,{right:s,children:n})]})},wr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(z.d)(),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(z.d)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(z.d)(),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(Nr,{toggle:l,isOpen:o,children:[Object(a.jsxs)(B.a,{tag:pr,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(L.a,{icon:D.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(B.a,{tag:pr,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(L.a,{icon:D.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(B.a,{onClick:b,children:[Object(a.jsx)(L.a,{icon:D.F,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsxs)(B.a,{className:"dropdown-item--danger",onClick:f,children:[Object(a.jsx)(L.a,{icon:D.y,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},kr=function(e,t){return function(r){var n=r.createShortUrl,c=r.shortUrlCreationResult,s=r.resetCreateShortUrl,i=r.selectedServer,o=r.basicMode,l=void 0!==o&&o,u=r.settings.shortUrlCreation,j=Object(F.useMemo)((function(){return function(e){var t,r;return{longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:null!==(t=null===e||void 0===e?void 0:e.validateUrls)&&void 0!==t&&t,forwardQuery:null===(r=null===e||void 0===e?void 0:e.forwardQuery)||void 0===r||r}}(u)}),[u]);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(e,{initialState:j,saving:c.saving,selectedServer:i,mode:l?"create-basic":"create",onSave:function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(),e.abrupt("return",n(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),Object(a.jsx)(t,Object(d.a)(Object(d.a)({},c),{},{resetCreateShortUrl:s,canBeClosed:l}))]})}},_r=r(615),Ur=r(575),Tr=r(576),Rr=r(577),Er=r(545),Dr=r(31),Lr=r(539),Vr=r(32),Ir=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(Lr.a,{className:n,children:Object(a.jsx)("div",{className:M()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(Vr.a,{className:M()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:M()({"p-2":s}),children:t})})})},Fr=function(e){var t,r,n=e.errorData,c=e.fallbackMessage;return Object(a.jsxs)(a.Fragment,{children:[null!==(t=null===n||void 0===n?void 0:n.detail)&&void 0!==t?t:c,(r=n,"INVALID_ARGUMENT"===(null===r||void 0===r?void 0:r.type)&&Object(a.jsxs)("p",{className:"mb-0",children:["Invalid elements: [",n.invalidElements.join(", "),"]"]}))]})},Ar=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(F.useState)(""),l=Object(E.a)(o,2),u=l[0],d=l[1];Object(F.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(V.a)(s,r),O=Object(Dr.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Er.a)}));return Object(a.jsx)(_r.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(Ur.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("p",{children:[Object(a.jsx)("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),Object(a.jsx)("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),Object(a.jsxs)("p",{children:["Write ",Object(a.jsx)("b",{children:t.shortCode})," to confirm deletion."]}),Object(a.jsx)("input",{type:"text",className:"form-control",placeholder:"Insert the short code (".concat(t.shortCode,")"),value:u,onChange:function(e){return d(e.target.value)}}),j&&Object(a.jsx)(Ir,{type:vt(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(Fr,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-link",onClick:h,children:"Cancel"}),Object(a.jsx)("button",{type:"submit",className:"btn btn-danger",disabled:u!==t.shortCode||c.loading,children:c.loading?"Deleting...":"Delete"})]})]})})},Mr=r(219),Gr=function(e){return function(t){var r=t.error,n=t.errorData,c=t.result,s=t.resetCreateShortUrl,i=t.canBeClosed,o=void 0!==i&&i,l=e(),u=Object(E.a)(l,2),d=u[0],j=u[1];if(Object(F.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(Ir,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(L.a,{icon:D.P,className:"float-right pointer",onClick:s}),Object(a.jsx)(Fr,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(y.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(Ir,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(L.a,{icon:D.P,className:"float-right pointer",onClick:s}),Object(a.jsx)("b",{children:"Great!"})," The short URL is ",Object(a.jsx)("b",{children:b}),Object(a.jsx)(br.a,{text:b,onCopy:j,children:Object(a.jsxs)("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[Object(a.jsx)(L.a,{icon:xe.c})," Copy"]})}),Object(a.jsx)(Mr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},Pr=function(e){return function(t){var r=t.orderByColumn,n=t.renderOrderIcon,c=t.shortUrlsList,s=t.onTagClick,i=t.selectedServer,o=t.className,l=c.error,u=c.loading,d=c.shortUrls,j=M()({"short-urls-table__header-cell--with-action":!!r}),b=M()("short-urls-table__header-cell",j),h=M()("table table-hover",o),O=Object(Dt.i)(i);return Object(a.jsxs)("table",{className:h,children:[Object(a.jsx)("thead",{className:"responsive-table__header short-urls-table__header",children:Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("dateCreated"),children:["Created at ",null===n||void 0===n?void 0:n("dateCreated")]}),Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("shortCode"),children:["Short URL ",null===n||void 0===n?void 0:n("shortCode")]}),!O&&Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("longUrl"),children:["Long URL ",null===n||void 0===n?void 0:n("longUrl")]})||Object(a.jsxs)("th",{className:"short-urls-table__header-cell",children:[Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("title"),children:["Title ",null===n||void 0===n?void 0:n("title")]}),"\xa0\xa0/\xa0\xa0",Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("longUrl"),children:[Object(a.jsx)("span",{className:"indivisible",children:"Long URL"})," ",null===n||void 0===n?void 0:n("longUrl")]})]}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"Tags"}),Object(a.jsx)("th",{className:b,onClick:null===r||void 0===r?void 0:r("visits"),children:Object(a.jsxs)("span",{className:"indivisible",children:["Visits ",null===n||void 0===n?void 0:n("visits")]})}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"\xa0"})]})}),Object(a.jsx)("tbody",{children:l?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):u?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!u&&Object(S.a)(null===d||void 0===d?void 0:d.data)?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"No results found"})}):null===d||void 0===d?void 0:d.data.map((function(t){return Object(a.jsx)(e,{shortUrl:t,selectedServer:i,onTagClick:s},t.shortUrl)}))})]})}},Br=r(578),Hr=r(216),Wr=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(Q,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(B.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(B.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},qr=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(Q,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(B.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(B.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(B.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(B.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},zr=function(e,t){return function(r){var n=r.shortUrl,c=n.shortUrl,s=n.shortCode,i=r.toggle,o=r.isOpen,l=r.selectedServer,u=Object(F.useState)(300),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(F.useState)(0),O=Object(E.a)(h,2),v=O[0],f=O[1],g=Object(F.useState)("png"),p=Object(E.a)(g,2),y=p[0],N=p[1],w=Object(F.useState)("L"),k=Object(E.a)(w,2),_=k[0],U=k[1],T=Object(F.useMemo)((function(){return{useSizeInPath:!Object(Dt.g)(l),marginIsSupported:Object(Dt.f)(l),errorCorrectionIsSupported:Object(Dt.h)(l)}}),[l]),R=T.marginIsSupported!==T.errorCorrectionIsSupported,V=Object(F.useMemo)((function(){return function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.marginIsSupported,l=r.errorCorrectionIsSupported,u="".concat(e,"/qr-code").concat(i?"/".concat(n):""),d=Object(C.b)({size:i?void 0:n,format:c,margin:o&&a>0?a:void 0,errorCorrection:l?s:void 0});return"".concat(u).concat(Object(S.a)(d)?"":"?".concat(d))}(c,{size:j,format:y,margin:v,errorCorrection:_},T)}),[c,j,y,v,_,T]),I=Object(F.useMemo)((function(){return j+v}),[j,v]),A=Object(F.useMemo)((function(){if(!(I<500))return I<800?"lg":"xl"}),[I]);return Object(a.jsxs)(_r.a,{isOpen:o,toggle:i,centered:!0,size:A,children:[Object(a.jsxs)(Ur.a,{toggle:i,children:["QR code for ",Object(a.jsx)(dr.a,{href:c,children:c})]}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsxs)(Br.a,{className:M()({"col-md-4":R,"col-md-6":!R}),children:[Object(a.jsxs)("label",{className:"mb-0",children:["Size: ",j,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:j,step:10,min:50,max:1e3,onChange:function(e){return b(Number(e.target.value))}})]}),T.marginIsSupported&&Object(a.jsxs)(Br.a,{className:R?"col-md-4":"col-md-6",children:[Object(a.jsxs)("label",{className:"mb-0",children:["Margin: ",v,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:v,step:1,min:0,max:100,onChange:function(e){return f(Number(e.target.value))}})]}),Object(a.jsx)(Br.a,{className:R?"col-md-4":"col-md-6",children:Object(a.jsx)(Wr,{format:y,setFormat:N})}),T.errorCorrectionIsSupported&&Object(a.jsx)(Br.a,{className:"col-md-6",children:Object(a.jsx)(qr,{errorCorrection:_,setErrorCorrection:U})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(dr.a,{href:V}),Object(a.jsx)(hr,{text:V})]}),Object(a.jsx)("img",{src:V,className:"qr-code-modal__img",alt:"QR code"}),Object(a.jsx)(t,{minVersion:"2.9.0",children:Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Hr.a,{block:!0,color:"primary",onClick:Object(x.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.saveImage(V,"".concat(s,"-qr-code.").concat(y)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(L.a,{icon:D.q,className:"ml-1"})]})})})]})]})]})}},Qr=r(583),Kr=r(579),Jr=r(580),Zr=r(581),Yr=r(582),Xr=r(610),$r=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?Er.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(F.useRef)(Object(Xr.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:M()("custom-control",j,s),style:b,children:[Object(a.jsx)("input",{type:"checkbox",className:"custom-control-input",id:d,checked:r,onChange:function(e){return c(e.target.checked,e)}}),Object(a.jsx)("label",{className:"custom-control-label",htmlFor:d,children:i})]})},en=function(e){return Object(a.jsx)($r,Object(d.a)({type:"checkbox"},e))},tn=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(_r.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(Ur.a,{toggle:r,children:"Info"}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("p",{children:["When the\xa0",Object(a.jsx)("b",{children:Object(a.jsx)("i",{children:'"Use existing URL if found"'})}),"\xa0checkbox is checked, the server will return an existing short URL if it matches provided params."]}),Object(a.jsx)("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),Object(a.jsxs)("ul",{children:[Object(a.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."}),Object(a.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.",Object(a.jsx)("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),Object(a.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"})]})]})]})},rn=function(){var e=Object(z.d)(),t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{title:"What does this mean?",children:Object(a.jsx)(L.a,{icon:D.u,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(tn,{isOpen:r,toggle:n})]})},nn=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(F.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(L.a,{icon:D.u})}),Object(a.jsx)(mr.a,{target:function(){return s.current},placement:n,children:c})]})},cn=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(en,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(nn,{placement:"right",children:r})]})},an=Object(V.a)(Kr.a,Object(Jr.a)(/ /g,"-")),sn=function(e){return"string"===typeof e?Object(I.default)(e):e},on=function(e){return{"col-sm-6":e,"col-sm-12":!e}},ln=function(e,t){return function(r){var n,c=r.mode,s=r.saving,i=r.onSave,o=r.initialState,l=r.selectedServer,j=Object(F.useState)(o),b=Object(E.a)(j,2),h=b[0],O=b[1],v="edit"===c,f=Object(Dr.c)(o.title),g=function(){var e=Object(Dr.c)(h.title);return Object(Zr.a)([[function(){return!e&&!f},function(){}],[function(){return!e&&f},function(){return null}],[Yr.a,function(){return h.title}]])()},p=Object(Dr.b)(Object(x.a)(m.a.mark((function e(){var t,r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},h),{},{validSince:null!==(t=ae(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=ae(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Dr.c)(h.maxVisits)?Number(h.maxVisits):null,title:g()})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(F.useEffect)((function(){O(o)}),[o]);var y=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.jsx)(Br.a,{children:Object(a.jsx)(Qr.a,Object(d.a)({id:e,type:n,placeholder:t,value:null!==(r=h[e])&&void 0!==r?r:"",onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t.target.value)))}},c))})},C=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(a.jsx)("div",{className:"form-group",children:Object(a.jsx)(ge,Object(d.a)({selected:h[e]?sn(h[e]):null,placeholderText:t,isClearable:!0,onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t)))}},r))})},N=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Br.a,{children:Object(a.jsx)(Qr.a,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:h.longUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{longUrl:e.target.value}))}})}),Object(a.jsx)(Br.a,{children:Object(a.jsx)(e,{selectedTags:null!==(n=h.tags)&&void 0!==n?n:[],onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{tags:e.map(an)}))}})})]}),w=Object(Dt.i)(l),k=w||!v,_=M()("mb-3",on(k)),U=Object(Dt.b)(l),T=Object(Dt.d)(l),R=U||T,D=M()("mb-3",on(R));return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:p,children:["create-basic"===c&&N,"create-basic"!==c&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Vr.a,{title:"Basic options",className:"mb-3",children:N}),Object(a.jsxs)(Lr.a,{children:[k&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Vr.a,{title:"Customize the short URL",children:[w&&y("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:y("customSlug","Custom slug","text",{disabled:Object(Dr.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:y("shortCodeLength","Short code length","number",{min:4,disabled:Object(Dr.c)(h.customSlug)})})]}),Object(a.jsx)(Br.a,{children:Object(a.jsx)(t,{value:h.domain,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{domain:e}))}})})]})]})}),Object(a.jsx)("div",{className:_,children:Object(a.jsxs)(Vr.a,{title:"Limit access to the short URL",children:[y("maxVisits","Maximum number of visits allowed","number",{min:1}),C("validSince","Enabled since...",{maxDate:h.validUntil?sn(h.validUntil):void 0}),C("validUntil","Enabled until...",{minDate:h.validSince?sn(h.validSince):void 0})]})})]}),Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)("div",{className:D,children:Object(a.jsxs)(Vr.a,{title:"Extra checks",children:[Object(a.jsx)(cn,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:h.validateUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{validateUrl:e}))},children:"Validate URL"}),!v&&Object(a.jsxs)("p",{children:[Object(a.jsx)(en,{inline:!0,className:"mr-2",checked:h.findIfExists,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{findIfExists:e}))},children:"Use existing URL if found"}),Object(a.jsx)(rn,{})]})]})}),R&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Vr.a,{title:"Configure behavior",children:[U&&Object(a.jsx)(cn,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:h.crawlable,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{crawlable:e}))},children:"Make it crawlable"}),T&&Object(a.jsx)(cn,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:h.forwardQuery,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{forwardQuery:e}))},children:"Forward query params on redirect"})]})})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Hr.a,{outline:!0,color:"primary",disabled:s||Object(S.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},un=r(54),dn=function(e){return function(t){var r,n=t.history.goBack,c=t.match.params,s=t.location.search,i=t.settings.shortUrlCreation,o=t.selectedServer,l=t.shortUrlDetail,u=t.getShortUrlDetail,d=t.shortUrlEdition,j=t.editShortUrl,b=l.loading,h=l.error,O=l.errorData,v=l.shortUrl,f=d.saving,g=d.error,p=d.errorData,y=Object(C.a)(s).domain,S=Object(F.useMemo)((function(){return function(e,t){var r,n,c,a,s,i,o=null!==(r=null===t||void 0===t?void 0:t.validateUrls)&&void 0!==r&&r;return e?{longUrl:e.longUrl,tags:e.tags,title:null!==(n=e.title)&&void 0!==n?n:void 0,domain:null!==(c=e.domain)&&void 0!==c?c:void 0,validSince:null!==(a=e.meta.validSince)&&void 0!==a?a:void 0,validUntil:null!==(s=e.meta.validUntil)&&void 0!==s?s:void 0,maxVisits:null!==(i=e.meta.maxVisits)&&void 0!==i?i:void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,validateUrl:o}:{longUrl:"",validateUrl:o}}(v,i)}),[v,i]),N=Object(z.d)(),w=Object(E.a)(N,4),k=w[0],_=w[2],U=w[3];return Object(F.useEffect)((function(){u(c.shortCode,y)}),[]),b?Object(a.jsx)(un.a,{loading:!0}):h?Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:O,fallbackMessage:"An error occurred while loading short URL detail :("})}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("header",{className:"mb-3",children:Object(a.jsx)(Re.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Hr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(L.a,{icon:D.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(dr.a,{href:null!==(r=null===v||void 0===v?void 0:v.shortUrl)&&void 0!==r?r:""})]})}),Object(a.jsx)("span",{})]})})}),Object(a.jsx)(e,{initialState:S,saving:f,selectedServer:o,mode:"edit",onSave:function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=2;break}return e.abrupt("return");case 2:U(),j(v.shortCode,v.domain,t).then(_).catch(U);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),g&&Object(a.jsx)(Ir,{type:"error",className:"mt-3",children:Object(a.jsx)(Fr,{errorData:p,fallbackMessage:"An error occurred while updating short URL :("})}),k&&Object(a.jsx)(Ir,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},jn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",bn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",hn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",On={loading:!1,error:!1},vn=st((ze={},Object(u.a)(ze,jn,(function(){return{loading:!0,error:!1}})),Object(u.a)(ze,bn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(ze,hn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},On)})),ze),On),fn=function(e){return function(t,r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c({type:jn}),n.prev=1,o=a(),l=o.shortUrlsList,null===(s=null===l||void 0===l||null===(i=l.shortUrls)||void 0===i?void 0:i.data.find((function(e){return jt(e,t,r)})))||void 0===s){n.next=7;break}n.t0=s,n.next=10;break;case 7:return n.next=9,e(a).getShortUrl(t,r);case 9:n.t0=n.sent;case 10:u=n.t0,c({shortUrl:u,type:hn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:bn,errorData:Ot(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},mn=function(e,t,r){e.serviceFactory("ShortUrlsList",ur,"ShortUrlsTable","SearchBar"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo","shortUrlsList"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Pr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",Sr,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",wr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Gr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",ln,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",kr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",dn,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return Ar})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",zr,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",we,"ColorGenerator"),e.decorator("SearchBar",r),e.serviceFactory("listShortUrls",Ht,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return Kt})),e.serviceFactory("createShortUrl",Rt,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return Et})),e.serviceFactory("deleteShortUrl",St,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return Ct})),e.serviceFactory("getShortUrlDetail",fn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",At,"buildShlinkApiClient")},xn=r(288),gn=r.n(xn),pn=r(60),yn=function(e){var t=e.children,r=e.value,n=e.onChange,c=e.id,s=e.type,i=e.required,o=e.placeholder,l=e.className,u=e.labelClassName,d=Object(F.useRef)(null!==c&&void 0!==c?c:Object(Xr.a)());return Object(a.jsxs)(Br.a,{className:null!==l&&void 0!==l?l:"",children:[Object(a.jsxs)("label",{htmlFor:d.current,className:null!==u&&void 0!==u?u:"",children:[t,":"]}),Object(a.jsx)("input",{className:"form-control",type:null!==s&&void 0!==s?s:"text",id:d.current,value:r,required:null===i||void 0===i||i,placeholder:o,onChange:function(e){return n(e.target.value)}})]})},Sn=function(e){return Object(a.jsx)(yn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},Cn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(F.useState)(""),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(F.useState)(""),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(F.useState)(""),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(Dr.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(F.useEffect)((function(){r&&l(r.name),r&&b(r.url),r&&f(r.apiKey)}),[r]),Object(a.jsxs)("form",{className:"server-form",onSubmit:m,children:[Object(a.jsxs)(Vr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(Sn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(Sn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(Sn,{value:v,onChange:f,children:"API key"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},Nn=function(e){var t=e.type;return Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Ir,{type:t,children:["success"===t&&"Servers properly imported. You can now select one from the list :)","error"===t&&"The servers could not be imported. Make sure the format is correct."]})})},wn=function(e,t){return function(r){var n=r.servers,c=r.createServer,s=r.history,i=s.push,o=s.goBack,l=!!Object.keys(n).length,u=t(!1,4e3),j=Object(E.a)(u,2),b=j[0],h=j[1],O=t(!1,4e3),v=Object(E.a)(O,2),f=v[0],m=v[1];return Object(a.jsxs)(pn.a,{children:[Object(a.jsxs)(Cn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(Xr.a)();c(Object(d.a)(Object(d.a)({},e),{},{id:t})),i("/server/".concat(t))},children:[!l&&Object(a.jsx)(e,{tooltipPlacement:"top",onImport:h,onImportError:m}),l&&Object(a.jsx)(Hr.a,{outline:!0,onClick:o,children:"Cancel"}),Object(a.jsx)(Hr.a,{outline:!0,color:"primary",className:"ml-2",children:"Create server"})]}),b&&Object(a.jsx)(Nn,{type:"success"}),f&&Object(a.jsx)(Nn,{type:"error"})]})}},kn=function(e){var t=e.servers,r=e.selectedServer,n=Object(Te.a)(t);return Object(a.jsxs)(Ee.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(W.a,{nav:!0,caret:!0,children:[Object(a.jsx)(L.a,{icon:D.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(q.a,{right:!0,children:Object(S.a)(n)?Object(a.jsxs)(B.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(L.a,{icon:D.E})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]}):Object(a.jsxs)(a.Fragment,{children:[n.map((function(e){var t=e.name,n=e.id;return Object(a.jsx)(B.a,{tag:o.b,to:"/server/".concat(n),active:Object(v.a)(r)===n,children:t},n)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsxs)(B.a,{tag:o.b,to:"/manage-servers",children:[Object(a.jsx)(L.a,{icon:D.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Manage servers"})]})]})})]})},_n=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history,i=e.redirectHome,o=void 0===i||i;return Object(a.jsxs)(_r.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(Ur.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("p",{children:["Are you sure you want to remove ",Object(a.jsx)("b",{children:t?t.name:""}),"?"]}),Object(a.jsx)("p",{children:Object(a.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."})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",onClick:function(){return c(t),r(),void(o&&s.push("/"))},children:"Delete"})]})]})},Un=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(z.d)(),o=Object(E.a)(i,4),l=o[0],u=o[2],d=o[3];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:n,onClick:u,children:[!c&&Object(a.jsx)(L.a,{fixedWidth:!0,icon:D.y}),Object(a.jsx)("span",{className:s,children:null!==c&&void 0!==c?c:"Remove this server"})]}),Object(a.jsx)(e,{server:r,isOpen:l,toggle:d})]})}},Tn=r(151),Rn=function(e){return Object(Tn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history.goBack;if(!Object(v.e)(r))return null;return Object(a.jsx)(pn.a,{children:Object(a.jsxs)(Cn,{title:Object(a.jsxs)("h5",{className:"mb-0",children:['Edit "',r.name,'"']}),initialValues:r,onSubmit:function(e){t(r.id,e),n()},children:[Object(a.jsx)(Hr.a,{outline:!0,className:"mr-2",onClick:n,children:"Cancel"}),Object(a.jsx)(Hr.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},En=function(e){var t=e.importServersFromFile;return function(e){var r=e.createServers,n=e.fileRef,c=e.children,s=e.onImport,i=void 0===s?function(){}:s,o=e.onImportError,l=void 0===o?function(){}:o,u=e.tooltipPlacement,d=void 0===u?"bottom":u,j=e.className,b=void 0===j?"":j,h=null!==n&&void 0!==n?n:Object(F.useRef)(),O=function(){var e=Object(x.a)(m.a.mark((function e(n){var c,a;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.target,e.abrupt("return",t(null===(c=a.files)||void 0===c?void 0:c[0]).then(Object(V.a)(r,i)).then((function(){a.value=null})).catch(l));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Hr.a,{outline:!0,id:"importBtn",className:b,onClick:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.click()},children:[Object(a.jsx)(L.a,{icon:D.r,fixedWidth:!0})," ",null!==c&&void 0!==c?c:"Import from file"]}),Object(a.jsxs)(mr.a,{placement:d,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",Object(a.jsx)("b",{children:"name"}),", ",Object(a.jsx)("b",{children:"apiKey"})," and ",Object(a.jsx)("b",{children:"url"}),"."]}),Object(a.jsx)("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:h,onChange:O})]})}},Dn=r(540),Ln=r(70),Vn="shlink/selectedServer/SELECT_SERVER",In="shlink/selectedServer/RESET_SELECTED_SERVER",Fn=Object(V.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Ln.c)("1.0.0")),An=Object(Dn.a)(Er.a,function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r().then((function(e){var t=e.version;return{version:Fn(t),printableVersion:Object(Ln.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Mn=st((Qe={},Object(u.a)(Qe,In,(function(){return null})),Object(u.a)(Qe,Vn,(function(e,t){return t.selectedServer})),Qe),null),Gn=it(In),Pn=function(e,t){return function(r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j,b,h;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c(Gn()),c(Kt()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:Vn,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 7:return n.prev=7,l=e(o),u=l.health,n.next=11,An(r,u);case 11:j=n.sent,b=j.version,h=j.printableVersion,c({type:Vn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{version:b,printableVersion:h})}),c(t()),n.next=21;break;case 18:n.prev=18,n.t0=n.catch(7),c({type:Vn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{serverNotReachable:!0})});case 21:case"end":return n.stop()}}),n,null,[[7,18]])})));return function(e,t){return n.apply(this,arguments)}}()}},Bn=r(584),Hn=r(585),Wn=r(152),qn=r(313),zn="shlink/servers/EDIT_SERVER",Qn="shlink/servers/DELETE_SERVER",Kn="shlink/servers/CREATE_SERVERS",Jn="shlink/servers/SET_AUTO_CONNECT",Zn=st((Ke={},Object(u.a)(Ke,Kn,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ke,Qn,(function(e,t){var r=t.serverId;return Object(Bn.a)(r,e)})),Object(u.a)(Ke,zn,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(ut.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Object(u.a)(Ke,Jn,(function(e,t){var r=t.serverId,n=t.autoConnect;return e[r]?n?Object(Hn.a)(Object(De.a)(e).map((function(e){var t=Object(E.a)(e,2),n=t[0],c=t[1];return[n,Object(d.a)(Object(d.a)({},c),{},{autoConnect:n===r})]}))):Object(ut.a)(r,Object(d.a)(Object(d.a)({},e[r]),{},{autoConnect:n}),e):e})),Ke),{}),Yn=Object(Wn.a)((function(e,t){return Object(ut.a)(t.id,t,e)}),{}),Xn=Object(V.a)(Object(qn.a)((function(e){return e.id?e:Object(ut.a)("id",Object(Xr.a)(),e)})),Yn,(function(e){return{type:Kn,newServers:e}})),$n=function(e){return Xn([e])},ec=function(e,t){return{type:zn,serverId:e,serverData:t}},tc=function(e){var t=e.id;return{type:Qn,serverId:t}},rc=function(e,t){var r=e.id;return{type:Jn,serverId:r,autoConnect:t}},nc=Object(V.a)(Object(O.a)("data"),(function(e){return Array.isArray(e)?e.filter(v.b):[]})),cc=function(e){var t=e.get;return function(){return function(){var e=Object(x.a)(m.a.mark((function e(r){var n,c;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("".concat(l.a,"/servers.json"));case 2:n=e.sent,c=nc(n),r(Xn(c));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},ac=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.d)(n))return null;var s=n.version;return Object(Ln.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},sc=r(165),ic=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(pn.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(un.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.e)(n)&&"Could not find this Shlink server.",Object(v.e)(n)&&Object(a.jsxs)(a.Fragment,{children:[Object(a.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."]})]}),Object(a.jsxs)(sc.a,{servers:Object.values(r),children:["These are the Shlink servers currently configured. Choose one of them or ",Object(a.jsx)(o.b,{to:"/server/create",children:"add a new one"}),"."]}),Object(v.e)(n)&&Object(a.jsx)("div",{className:"container mt-3 mt-md-5",children:Object(a.jsxs)("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",Object(a.jsx)(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or\xa0",Object(a.jsx)(o.b,{to:"/server/".concat(n.id,"/edit"),children:"edit it"}),"."]})})]})})}},oc=r(103),lc=r(586),uc=r(587),dc=r(541),jc=r(542),bc=function(e,t,r){return Ae((function(n){var c,s=n.shortUrlsList,i=n.listShortUrls,l=n.listTags,u=n.tagsList,d=n.selectedServer,j=n.loadVisitsOverview,h=n.visitsOverview,O=s.loading,f=s.shortUrls,m=u.loading,x=h.loading,g=h.visitsCount,p=h.orphanVisitsCount,y=Object(v.a)(d),S=Object(b.g)();return Object(F.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(uc.a,{tag:"h2",children:x?"Loading...":nr(g)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/orphan-visits"),children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(uc.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:x?"Loading...":nr(null!==p&&void 0!==p?p:0)}),Object(a.jsx)(r,{maxVersion:"2.5.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.6 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/list-short-urls/1"),children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(uc.a,{tag:"h2",children:O?"Loading...":nr(null!==(c=null===f||void 0===f?void 0:f.pagination.totalItems)&&void 0!==c?c:0)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/manage-tags"),children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(uc.a,{tag:"h2",children:m?"Loading...":nr(u.tags.length)})]})})]}),Object(a.jsxs)(Re.a,{className:"mb-3",children:[Object(a.jsxs)(dc.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Create a short URL"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(y,"/create-short-url"),children:"Advanced options \xbb"})]}),Object(a.jsx)(jc.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(Re.a,{children:[Object(a.jsxs)(dc.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Recently created URLs"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(y,"/list-short-urls/1"),children:"See all \xbb"})]}),Object(a.jsx)(jc.a,{children:Object(a.jsx)(e,{shortUrlsList:s,selectedServer:d,className:"mb-0",onTagClick:function(e){return S.push("/server/".concat(y,"/list-short-urls/1?tags=").concat(encodeURIComponent(e)))}})})]})]})}),(function(){return[Me.visits,Me.orphanVisits]}))},hc=function(e,t,r,n){return function(c){var s=c.servers,i=Object.values(s),l=Object(F.useState)(i),u=Object(E.a)(l,2),d=u[0],j=u[1],b=d.some((function(e){return!!e.autoConnect})),h=r(!1,4e3),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(F.useEffect)((function(){j(Object.values(s))}),[s]),Object(a.jsxs)(pn.a,{children:[Object(a.jsx)(G,{className:"mb-3",onChange:function(e){return j(i.filter((function(t){var r=t.name,n=t.url;return"".concat(r," ").concat(n).match(e)})))}}),Object(a.jsxs)(Lr.a,{className:"mb-3",children:[Object(a.jsxs)("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[Object(a.jsx)(t,{className:"flex-fill",onImportError:f,children:"Import servers"}),i.length>0&&Object(a.jsxs)(Hr.a,{outline:!0,className:"ml-2 flex-fill",onClick:Object(x.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.exportServers());case 1:case"end":return t.stop()}}),t)}))),children:[Object(a.jsx)(L.a,{icon:D.q,fixedWidth:!0})," Export servers"]})]}),Object(a.jsx)("div",{className:"col-md-6 text-md-right d-flex d-md-block",children:Object(a.jsxs)(Hr.a,{outline:!0,color:"primary",className:"flex-fill",tag:o.b,to:"/server/create",children:[Object(a.jsx)(L.a,{icon:D.E,fixedWidth:!0})," Add a server"]})})]}),Object(a.jsx)(Vr.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsxs)("tr",{children:[b&&Object(a.jsx)("th",{style:{width:"50px"}}),Object(a.jsx)("th",{children:"Name"}),Object(a.jsx)("th",{children:"Base URL"}),Object(a.jsx)("th",{})]})}),Object(a.jsxs)("tbody",{children:[!d.length&&Object(a.jsx)("tr",{className:"text-center",children:Object(a.jsx)("td",{colSpan:4,children:"No servers found."})}),d.map((function(e){return Object(a.jsx)(n,{server:e,hasAutoConnect:b},e.id)}))]})]})}),v&&Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)(Ir,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})}},Oc=function(e){return function(t){var r=t.server,n=t.hasAutoConnect;return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[n&&Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:r.autoConnect&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(L.a,{icon:D.h,className:"text-primary",id:"autoConnectIcon"}),Object(a.jsx)(mr.a,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Name",children:Object(a.jsx)(o.b,{to:"/server/".concat(r.id),children:r.name})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base URL",children:r.url}),Object(a.jsx)("td",{className:"responsive-table__cell text-right",children:Object(a.jsx)(e,{server:r})})]})}},vc=function(e){return function(t){var r=t.server,n=t.setAutoConnect,c=Object(z.d)(),s=Object(E.a)(c,2),i=s[0],l=s[1],u=Object(z.d)(),d=Object(E.a)(u,4),j=d[0],b=d[2],h=d[3],O="/server/".concat(r.id),v=r.autoConnect,f=v?D.b:xe.b;return Object(a.jsxs)(Nr,{isOpen:i,toggle:l,children:[Object(a.jsxs)(B.a,{tag:o.b,to:O,children:[Object(a.jsx)(L.a,{icon:D.D,fixedWidth:!0})," Connect"]}),Object(a.jsxs)(B.a,{tag:o.b,to:"".concat(O,"/edit"),children:[Object(a.jsx)(L.a,{icon:D.m,fixedWidth:!0})," Edit server"]}),Object(a.jsxs)(B.a,{onClick:function(){return n(r,!r.autoConnect)},children:[Object(a.jsx)(L.a,{icon:f,fixedWidth:!0})," ",v?"Do not a":"A","uto-connect"]}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsxs)(B.a,{className:"dropdown-item--danger",onClick:b,children:[Object(a.jsx)(L.a,{icon:D.y,fixedWidth:!0})," Remove server"]}),Object(a.jsx)(e,{redirectHome:!1,server:r,isOpen:j,toggle:h})]})}},fc=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},mc=function(e){return Array.isArray(e)&&e.every(fc)},xc=function e(t,r){var n=this;Object(g.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(x.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("No file provided");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e,c){r.addEventListener("loadend",(function(t){try{var r,a,s,i=null!==(r=null===(a=t.target)||void 0===a||null===(s=a.result)||void 0===s?void 0:s.toString())&&void 0!==r?r:"",o=n.csvJson.toObject(i);if(!mc(o))throw new Error("Provided file does not have the right format.");e(o)}catch(t){c(t)}})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},gc=r(104),pc=function e(t,r,n){var c=this;Object(g.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(x.a)(m.a.mark((function e(){var t,r,n;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Te.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(v.f);try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(gc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},yc=function(e,t,r){e.serviceFactory("ManageServers",hc,"ServersExporter","ImportServersBtn","useStateFlagTimeout","ManageServersRow"),e.decorator("ManageServers",t(["servers"])),e.serviceFactory("ManageServersRow",Oc,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",vc,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",wn,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",oc.a),e.decorator("CreateServer",t(["selectedServer","servers"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",Rn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",(function(){return kn})),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return _n})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",Un,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",En,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return ac})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",ic,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",bc,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",gn.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",xc,"csvjson","fileReaderFactory"),e.service("ServersExporter",pc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Pn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return $n})),e.serviceFactory("createServers",(function(){return Xn})),e.serviceFactory("deleteServer",(function(){return tc})),e.serviceFactory("editServer",(function(){return ec})),e.serviceFactory("setAutoConnect",(function(){return rc})),e.serviceFactory("fetchServers",cc,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Gn}))},Sc=function(e){var t=e.visits,r=e.goBack,n=e.shortUrl,c=e.children,s=e.title;return Object(a.jsx)("header",{children:Object(a.jsxs)(Re.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Hr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(L.a,{icon:D.a})}),Object(a.jsx)("span",{className:"text-center d-none d-sm-block",children:Object(a.jsx)("small",{children:s})}),Object(a.jsxs)("span",{className:"badge badge-main ml-3",children:["Visits:"," ",Object(a.jsx)(yr,{visitsCount:t.length,shortUrl:n})]})]}),Object(a.jsx)("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:Object(a.jsx)("small",{children:s})}),c&&Object(a.jsx)("div",{className:"mt-md-2",children:c})]})})},Cc=function(e){var t,r,n=e.shortUrlDetail,c=e.shortUrlVisits,s=e.goBack,i=n.shortUrl,o=n.loading,l=c.visits,u=null!==(t=null===i||void 0===i?void 0:i.shortUrl)&&void 0!==t?t:"",d=null!==(r=null===i||void 0===i?void 0:i.longUrl)&&void 0!==r?r:"",j=null===i||void 0===i?void 0:i.title,b=Object(a.jsxs)(a.Fragment,{children:["Visits for ",Object(a.jsx)(dr.a,{href:u})]});return Object(a.jsxs)(Sc,{title:b,goBack:s,visits:l,shortUrl:i,children:[Object(a.jsx)("hr",{}),Object(a.jsxs)("div",{children:["Created: ",i?Object(a.jsxs)("span",{children:[Object(a.jsx)("b",{id:"created",className:"short-url-visits-header__created-at",children:Object(a.jsx)(fr,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(mr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(fr,{date:i.dateCreated})})]}):Object(a.jsx)("small",{children:"Loading..."})]}),Object(a.jsxs)("div",{children:["".concat(j?"Title":"Long URL",": "),o&&Object(a.jsx)("small",{children:"Loading..."}),!o&&Object(a.jsx)(dr.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},Nc=r(603),wc=r(554),kc=r(604),_c=r(552),Uc=r(113),Tc=r(592),Rc=r(593),Ec=r(595),Dc=r(589),Lc=r(292),Vc=r(590),Ic=r(314),Fc=r(92),Ac=r(591),Mc=r(594),Gc=r(291),Pc=r.n(Gc),Bc=r(588),Hc="Others",Wc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],qc=function(e){var t,r;return Object(Dr.c)(e)?null!==(t=null===(r=e.split("/")[e.includes("://")?2:0])||void 0===r?void 0:r.split(":")[0])&&void 0!==t?t:"":"Direct"},zc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(Bc.a)(t,t.map((function(){return 0})))),e))},Qc=function(e){return Object(a.jsx)($r,Object(d.a)({type:"switch"},e))},Kc=function(e,t){var r=e.native,n=Object(E.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},Jc=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(nr(r))},Zc=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(nr(r))},Yc=r(46),Xc={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},$c={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},ea={hourly:Dc.a,daily:Lc.a,weekly:Vc.a,monthly:Ic.a},ta={hourly:function(e){return Object(X.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(X.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(X.default)(Object(Fc.a)(e),"yyyy-MM-dd"),r=Object(X.default)(Object(Ac.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(X.default)(e,"yyyy-MM")}},ra=function(e,t){return Object(Rc.a)((function(t){return ta[e](Object(I.default)(t.date))}),t)},na=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=ea[e],n=ta[e],c=Object(I.default)(t[0].date),a=Object(I.default)(t[t.length-1].date),s=r(c,a),i=$c[e];return[n(a)].concat(Object(ke.a)(Object(Dr.e)(s,(function(e){return n(Object(Mc.a)(a,i(e)))}))))}(r,e);return[c,zc(t,c)]},ca=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},aa=null,sa=function(e,t,r){return function(n){var c=Object(E.a)(n,1)[0];if(r&&c){var a,s=c.index;if(aa===e[s])r([]),aa=null;else r(e[s]&&t[e[s]]||[]),aa=null!==(a=e[s])&&void 0!==a?a:null}}},ia=function(e){var t=e.title,r=e.visits,n=e.highlightedVisits,c=e.highlightedLabel,s=void 0===c?"Selected":c,i=e.setSelectedVisits,o=Object(F.useState)(r.length>0?function(e){var t,r=new Date,n=Object(I.default)(e);return null!==(t=Object(Zr.a)([[function(){return Object(Lc.a)(r,n)<=2},Object(Tc.a)("hourly")],[function(){return Object(Ic.a)(r,n)<=1},Object(Tc.a)("daily")],[function(){return Object(Ic.a)(r,n)<=6},Object(Tc.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(E.a)(o,2),u=l[0],d=l[1],j=Object(z.d)(!0),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(F.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=ta[e](Object(I.default)(r.date));return t[c]=null!==(n=t[c])&&void 0!==n?n:[],t[c].push(r),t}),{})}(u,r)}),[u,r]),f=Object(F.useMemo)((function(){return ra(u,Object(Ec.a)(r))}),[u,r]),m=Object(F.useMemo)((function(){return na(r,f,u,h)}),[r,u,h]),x=Object(E.a)(m,2),g=x[0],p=x[1],y=Object(F.useMemo)((function(){return zc(ra(u,Object(Ec.a)(n)),g)}),[n,u,g]),S=function(){var e=ca(p,"Visits",Yc.c);return 0===n.length?[e]:[e,ca(y,s,Yc.a)]},C={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:Jc}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:nr}},x:{title:{display:!0,text:Xc[u]}}},onHover:Kc},N=function(){return Object(a.jsx)(Uc.c,{data:{labels:g,datasets:S()},options:C,getElementAtEvent:sa(g,v,i)})};return Object(a.jsxs)(Re.a,{children:[Object(a.jsxs)(dc.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(Ee.a,{children:[Object(a.jsx)(W.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(q.a,{right:!0,children:Object.entries(Xc).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(B.a,{active:u===r,onClick:function(){return d(r)},children:n},r)}))})]})}),Object(a.jsx)("div",{className:"float-right mr-2",children:Object(a.jsx)(Qc,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(jc.a,{className:"line-chart-card__body",children:[n.length>0&&N(),0===n.length&&N()]})]})},oa=r(596),la=function(e){var t=e.pagesCount,r=e.currentPage,n=e.setCurrentPage,c=e.centered,s=void 0===c||c;if(t<2)return null;var i=function(e){return function(){return!sr(e)&&n(e)}};return Object(a.jsxs)(Yt.a,{listClassName:M()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(Jt.a,{disabled:r<=1,children:Object(a.jsx)(Zt.a,{previous:!0,tag:"span",onClick:i(r-1)})}),ar(r,t).map((function(e,t){return Object(a.jsx)(Jt.a,{disabled:sr(e),active:r===e,children:Object(a.jsx)(Zt.a,{tag:"span",onClick:i(e),children:ir(e)})},or(e,t))})),Object(a.jsx)(Jt.a,{disabled:r>=t,children:Object(a.jsx)(Zt.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},ua=function(e,t){return t.filter((function(t){return function(e,t){var r=e.browser,n=e.os,c=e.referer,a=e.country,s=e.city,i=Object(xr.a)(e,["browser","os","referer","country","city"]);return"".concat(r," ").concat(n," ").concat(c," ").concat(a," ").concat(s," ").concat(i.visitedUrl).toLowerCase().includes(t.toLowerCase())}(t,e)}))},da=function(e,t,r){var n=function(e,t){return Ve(t,e)}(r,t?ua(t,e):Object(ke.a)(e)),c=n.length;return{visitsGroups:Object(oa.a)(20,n),total:c}},ja=function(e){var t,r,n=e.visits,c=e.selectedVisits,s=void 0===c?[]:c,i=e.setSelectedVisits,o=e.selectedServer,l=e.matchMedia,u=void 0===l?window.matchMedia:l,d=e.isOrphanVisits,j=void 0!==d&&d,b="visits-table__header-cell visits-table__sticky",h=function(){return u("(max-width: 767px)").matches},O=Object(F.useState)(h()),v=Object(E.a)(O,2),f=v[0],m=v[1],x=Object(F.useState)(void 0),g=Object(E.a)(x,2),p=g[0],y=g[1],S=Object(F.useState)({}),C=Object(E.a)(S,2),N=C[0],w=C[1],k=Object(F.useMemo)((function(){return da(n,p,N)}),[p,N]),_=Object(F.useRef)(!0),U=Object(F.useState)(1),T=Object(E.a)(U,2),R=T[0],V=T[1],I=20*R,A=I-20,P=Object(Dt.a)(o),B=7+Number(P)+Number(j),H=function(e){return function(){return w({field:e,dir:Le(e,N.field,N.dir)})}},W=function(e){return Object(a.jsx)(Ge,{currentOrder:N,field:e,className:"visits-table__header-icon"})};return Object(F.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(F.useEffect)((function(){V(1),!_.current&&i([]),_.current=!1}),[p]),Object(a.jsxs)("table",{className:"table table-bordered table-hover table-sm table-responsive-sm visits-table",children:[Object(a.jsxs)("thead",{className:"visits-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{className:"".concat(b," text-center"),onClick:function(){return i(s.length0})})}),P&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(L.a,{icon:D.G}),W("potentialBot")]}),Object(a.jsxs)("th",{className:b,onClick:H("date"),children:["Date",W("date")]}),Object(a.jsxs)("th",{className:b,onClick:H("country"),children:["Country",W("country")]}),Object(a.jsxs)("th",{className:b,onClick:H("city"),children:["City",W("city")]}),Object(a.jsxs)("th",{className:b,onClick:H("browser"),children:["Browser",W("browser")]}),Object(a.jsxs)("th",{className:b,onClick:H("os"),children:["OS",W("os")]}),Object(a.jsxs)("th",{className:b,onClick:H("referer"),children:["Referrer",W("referer")]}),j&&Object(a.jsxs)("th",{className:b,onClick:H("visitedUrl"),children:["Visited URL",W("visitedUrl")]})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"p-0",children:Object(a.jsx)(G,{noBorder:!0,large:!1,onChange:y})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=k.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"text-center",children:"No visits found with current filtering"})}),null===(r=k.visitsGroups[R-1])||void 0===r?void 0:r.map((function(e,t){var r=s.includes(e);return Object(a.jsxs)("tr",{style:{cursor:"pointer"},className:M()({"table-active":r}),onClick:function(){return i(r?s.filter((function(t){return t!==e})):[].concat(Object(ke.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(L.a,{icon:D.h,className:"text-primary"})}),P&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(L.a,{icon:D.G,id:"botIcon".concat(t)}),Object(a.jsx)(mr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(fr,{date:e.date})}),Object(a.jsx)("td",{children:e.country}),Object(a.jsx)("td",{children:e.city}),Object(a.jsx)("td",{children:e.browser}),Object(a.jsx)("td",{children:e.os}),Object(a.jsx)("td",{children:e.referer}),j&&Object(a.jsx)("td",{children:e.visitedUrl})]},t)}))]}),k.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"visits-table__footer-cell visits-table__sticky",children:Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(la,{pagesCount:Math.ceil(k.total/20),currentPage:R,setCurrentPage:V,centered:f})}),Object(a.jsx)("div",{className:M()("col-md-6",{"d-flex align-items-center flex-row-reverse":!f,"text-center mt-3":f}),children:Object(a.jsxs)("div",{children:["Visits ",Object(a.jsx)("b",{children:nr(A+1)})," to"," ",Object(a.jsx)("b",{children:nr(Object(er.a)(I,k.total))})," of"," ",Object(a.jsx)("b",{children:nr(k.total)})]})})]})})})})]})},ba=r(616),ha=r(597),Oa=r(598),va=r(599),fa=function(){return Object(a.jsx)(ba.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ma=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(E.a)(e,1)[0].latLong}},xa=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(_r.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(Tr.a,{className:"map-modal__modal-body",children:[Object(a.jsxs)("h3",{className:"map-modal__modal-title",children:[n,Object(a.jsx)("button",{type:"button",className:"close",onClick:t,children:"\xd7"})]}),Object(a.jsxs)(ha.a,Object(d.a)(Object(d.a)({},ma(s)),{},{children:[Object(a.jsx)(fa,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Oa.a,{position:n,children:Object(a.jsxs)(va.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},ga=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(z.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(z.d)(),j=Object(E.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(F.useState)([]),f=Object(E.a)(v,2),m=f[0],x=f[1],g=Object(F.useRef)(),p=function(e){return function(){x(e?c.filter((function(e){var t=e.cityName;return r.includes(t)})):c),l()}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("button",{className:"btn btn-link open-map-modal-btn__btn",ref:g,onClick:function(){if(!r)return x(c),void l();O()},children:Object(a.jsx)(L.a,{icon:D.x})}),Object(a.jsx)(mr.a,{placement:"left",target:function(){return g.current},children:"Show in map"}),Object(a.jsx)(H.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(q.a,{right:!0,children:[Object(a.jsx)(B.a,{onClick:p(!1),children:"Show all locations"}),Object(a.jsx)(B.a,{onClick:p(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(xa,{toggle:u,isOpen:o,title:t,locations:m})]})},pa=r(600),ya=function(e){return e.hasOwnProperty("visitedUrl")},Sa=Object(V.a)(Object(pa.a)((function(e){return ya(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),Ca=function(e,t){return Object(Rc.a)(Object(O.a)(t),e)},Na=function(e){var t,r,n=e.page,c=e.itemsPerPage,a=e.filter,s=e.dateRange;return{page:n,itemsPerPage:c,startDate:null!==(t=(null===s||void 0===s?void 0:s.startDate)&&ae(null===s||void 0===s?void 0:s.startDate))&&void 0!==t?t:void 0,endDate:null!==(r=(null===s||void 0===s?void 0:s.endDate)&&ae(null===s||void 0===s?void 0:s.endDate))&&void 0!==r?r:void 0,excludeBots:(null===a||void 0===a?void 0:a.excludeBots)||void 0}},wa=function(e,t){return!Object(y.a)(e)&&Object(Dr.c)(e[t])},ka=function(e){return"number"===typeof e?e:e?parseFloat(e):0},_a=function(e){return function(t,r){var n=wa(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Ua=_a("country"),Ta=_a("city"),Ra=function(e){return e.reduce((function(e,t){return function(e,t){var r=t.os;e[r]=(e[r]||0)+1}(e.os,t),function(e,t){var r=t.browser;e[r]=(e[r]||0)+1}(e.browsers,t),function(e,t){var r=t.referer;e[r]=(e[r]||0)+1}(e.referrers,t),Ua(e.countries,t),Ta(e.cities,t),function(e,t){if(wa(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[ka(n),ka(c)]};a.count++,e[r]=a}}(e.citiesForMap,t),function(e,t){if(function(e){return e.hasOwnProperty("visitedUrl")}(t)){var r=t.visitedUrl;e[r]=(e[r]||0)+1}}(e.visitedUrls,t),e}),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}})},Ea=Object(qn.a)((function(e){var t=e.userAgent,r=e.date,n=e.referer,c=e.visitLocation,a=e.potentialBot,s=void 0!==a&&a,i=Object(d.a)(Object(d.a)({date:r,potentialBot:s},function(e){if(!Object(Dr.c)(e))return{browser:Hc,os:Hc};var t=Pc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:Hc,browser:r&&Wc.includes(r)?r:Hc}}(t)),{},{referer:qc(n),country:(null===c||void 0===c?void 0:c.countryName)||"Unknown",city:(null===c||void 0===c?void 0:c.cityName)||"Unknown",latitude:null===c||void 0===c?void 0:c.latitude,longitude:null===c||void 0===c?void 0:c.longitude});return ya(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Da=function(e){var t=e.onChange,r=e.selected,n=void 0===r?{}:r,c=e.className,s=e.isOrphanVisits,i=e.botsSupported;if(!i&&!s)return null;var o=n.orphanVisitsType,l=n.excludeBots,u=void 0!==l&&l,j=function(e){return{active:o===e,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{orphanVisitsType:e===(null===n||void 0===n?void 0:n.orphanVisitsType)?void 0:e}))}}};return Object(a.jsxs)(Q,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B.a,{header:!0,children:"Bots:"}),Object(a.jsx)(B.a,{active:u,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{excludeBots:!(null!==n&&void 0!==n&&n.excludeBots)}))},children:"Exclude potential bots"})]}),i&&s&&Object(a.jsx)(B.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(B.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(B.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(B.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{disabled:!Object(Dr.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},La=function(e){var t,r,n=e.chart.config,c=null!==(t=n.data)&&void 0!==t?t:{},s=c.labels,i=void 0===s?[]:s,o=c.datasets,l=void 0===o?[]:o,u=Object(E.a)(l,1)[0].backgroundColor,d=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor;return Object(a.jsx)("ul",{className:"doughnut-chart-legend",children:i.map((function(e,t){var r;return Object(a.jsxs)("li",{className:"doughnut-chart-legend__item d-flex",children:[Object(a.jsx)("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:null!==(r=u[t])&&void 0!==r?r:d}}),Object(a.jsx)("small",{className:"doughnut-chart-legend__item-text flex-fill",children:e})]},e)}))})},Va=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(Yc.h)()?Yc.e:Yc.f,borderWidth:2}]},Ia=Object(F.memo)((function(e){var t=e.stats,r=Object(F.useState)(),n=Object(E.a)(r,2),c=n[0],s=n[1],i=Object(Ue.a)(t),o=Object(Te.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:Zc}}}},u=function(e,t){return{labels:e,datasets:Va(t)}}(i,o);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-sm-12 col-md-7",children:Object(a.jsx)(Uc.b,{height:300,data:u,options:l,ref:function(e){s(null!==e&&void 0!==e?e:void 0)}})}),Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:c&&Object(a.jsx)(La,{chart:c})})]})})),Fa=r(601),Aa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(Re.a,{children:[Object(a.jsx)(dc.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(jc.a,{children:n}),r&&Object(a.jsx)(Fa.a,{className:"chart-card__footer--sticky",children:r})]})},Ma=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(Aa,{title:t,children:Object(a.jsx)(Ia,{stats:r})})},Ga=r(127),Pa=r(609),Ba=r(602),Ha=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(Ee.a,{children:[Object(a.jsx)(W.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(q.a,{right:!0,children:[r.map((function(e){return Object(a.jsxs)(B.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},Wa=function(e){return e.startsWith("hidden")?"":e},qa=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:Yc.d,borderColor:Yc.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:Yc.b,borderColor:Yc.a,borderWidth:2}]},za=function(e,t){return function(r){var n=Object(E.a)(r,1)[0];t&&n&&t(e[n.index])}},Qa=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ue.a)(t).map(Wa),o=Object(Te.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ue.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=zc(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:Jc}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:nr}},y:{stacked:!0}},onHover:Kc,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:qa(t,r,n)}}(i,o,l,n),b=function(e){return e.length>20?10*e.length:void 0}(i),h=function(e){return Object(a.jsx)(Uc.a,{data:j,options:u,height:b,getElementAtEvent:za(i,c)},"".concat(b,"_").concat(e))};return Object(a.jsxs)(a.Fragment,{children:[void 0!==r&&h("with_stats"),void 0===r&&h("without_stats")]})},Ka=function(e){return"String"===Object(Ga.a)(e)?Object(Pa.a)(e):e},Ja=function(e){return Object(E.a)(e,1)[0]},Za=function(e){return Object(E.a)(e,2)[1]},Ya=function(e){var t=e.stats,r=e.highlightedStats,n=e.title,c=e.sortingItems,s=e.extraHeaderContent,i=e.withPagination,o=void 0===i||i,l=Object(xr.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(F.useState)({}),j=Object(E.a)(u,2),b=j[0],h=j[1],O=Object(F.useState)(1),v=Object(E.a)(O,2),f=v[0],m=v[1],x=Object(F.useState)(50),g=Object(E.a)(x,2),p=g[0],y=g[1],S=function(e){var t=e[f-1];if(f0?r:void 0,c),N=C.currentPageStats,w=C.currentPageHighlightedStats,k=C.pagination,_=C.max,U=Object.keys(N);return Object(a.jsx)(Aa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Ie,{isButton:!1,right:!0,items:c,order:b,onChange:function(e,t){h({field:e,dir:t}),m(1)}})}),o&&Object.keys(t).length>50&&Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Ha,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:p,setValue:function(e){y(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(k?U:void 0)})]})},footer:k,children:Object(a.jsx)(Qa,Object(d.a)({stats:N,highlightedStats:w,max:_},l))})},Xa={byTime:{title:"By time",subPath:"",icon:D.d},byContext:{title:"By context",subPath:"/by-context",icon:D.g},byLocation:{title:"By location",subPath:"/by-location",icon:D.x},list:{title:"List",subPath:"/list",icon:D.w}},$a=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(wc.a,{tag:o.c,className:"visits-stats__nav-link",to:c,isActive:function(e,r){return r.pathname.endsWith("visits".concat(t))},replace:!0,children:[Object(a.jsx)(L.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},es=function(e){var t,r,n=e.children,c=e.visitsInfo,s=e.getVisits,i=e.cancelGetVisits,o=e.baseUrl,l=e.domain,u=e.settings,j=e.exportCsv,h=e.selectedServer,O=e.isOrphanVisits,v=void 0!==O&&O,f=null!==(t=null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",m=Object(F.useState)(ve(f)),x=Object(E.a)(m,2),g=x[0],p=x[1],y=Object(F.useState)([]),C=Object(E.a)(y,2),N=C[0],w=C[1],k=Object(F.useState)(),_=Object(E.a)(k,2),U=_[0],T=_[1],R=Object(F.useState)({}),V=Object(E.a)(R,2),I=V[0],A=V[1],G=Object(Dt.a)(h),P=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},B=c.visits,H=c.loading,W=c.loadingLarge,q=c.error,z=c.errorData,Q=c.progress,K=Object(F.useMemo)((function(){return Ea(B)}),[B]),J=Object(F.useMemo)((function(){return Ra(K)}),[K]),Z=J.os,Y=J.browsers,X=J.referrers,$=J.countries,ee=J.cities,te=J.citiesForMap,re=J.visitedUrls,ne=Object(Te.a)(te),ce=function(e){Je=void 0,w(e)},ae=function(e){return function(t){var r="".concat(e,"_").concat(t);Je===r?(w([]),T(void 0),Je=void 0):(w(K.filter(Object(Nc.a)(e,t))),T(t),Je=r)}};Object(F.useEffect)((function(){return i}),[]),Object(F.useEffect)((function(){s({dateRange:g,filter:I})}),[g,I]);return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("section",{className:"mt-3",children:Object(a.jsxs)("div",{className:"row flex-md-row-reverse",children:[Object(a.jsx)("div",{className:"col-lg-7 col-xl-6",children:Object(a.jsxs)("div",{className:"d-md-flex",children:[Object(a.jsx)("div",{className:"flex-fill",children:Object(a.jsx)(Se,{disabled:H,initialDateRange:f,defaultText:"All visits",onDatesChange:p})}),Object(a.jsx)(Da,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:G,selected:I,onChange:A})]})}),B.length>0&&Object(a.jsx)("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:Object(a.jsxs)("div",{className:"d-flex",children:[Object(a.jsxs)(Hr.a,{outline:!0,disabled:0===N.length,className:"btn-md-block mr-2",onClick:function(){return ce([])},children:["Clear selection ",N.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",nr(N.length),")"]})]}),Object(a.jsxs)(Hr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j(K)},children:[Object(a.jsx)(L.a,{icon:D.q})," Export (",nr(K.length),")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:W?Object(a.jsxs)(un.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(kc.a,{value:Q,striped:100===Q,className:"mt-3"})]}):H?Object(a.jsx)(un.a,{loading:!0}):q?Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:z,fallbackMessage:"An error occurred while loading visits :("})}):Object(S.a)(B)?Object(a.jsx)(un.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Re.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(_c.a,{pills:!0,fill:!0,children:Object.entries(Xa).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)($a,Object(d.a)(Object(d.a)({},n),{},{to:P(n.subPath)}),r)}))})}),Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:o,children:Object(a.jsx)("div",{className:"col-12 mt-3",children:Object(a.jsx)(ia,{title:"Visits during time",visits:K,highlightedVisits:N,highlightedLabel:U,setSelectedVisits:ce})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Xa.byContext.subPath),children:[Object(a.jsx)("div",{className:M()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ma,{title:"Operating systems",stats:Z})}),Object(a.jsx)("div",{className:M()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ma,{title:"Browsers",stats:Y})}),Object(a.jsx)("div",{className:M()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(Ya,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:Ca(N,"referer"),highlightedLabel:U,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ae("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(Ya,{title:"Visited URLs",stats:re,highlightedLabel:U,highlightedStats:Ca(N,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ae("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Xa.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Ya,{title:"Countries",stats:$,highlightedStats:Ca(N,"country"),highlightedLabel:U,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ae("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Ya,{title:"Cities",stats:ee,highlightedStats:Ca(N,"city"),highlightedLabel:U,extraHeaderContent:function(e){return ne.length>0&&Object(a.jsx)(ga,{modalTitle:"Cities",locations:ne,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ae("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(Xa.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(ja,{visits:K,selectedVisits:N,setSelectedVisits:ce,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},ts=function(e){var t=e.exportVisits;return Ae((function(e){var r=e.history.goBack,n=e.match,c=n.params,s=n.url,i=e.location.search,o=e.shortUrlVisits,l=e.shortUrlDetail,u=e.getShortUrlVisits,j=e.getShortUrlDetail,b=e.cancelGetShortUrlVisits,h=e.settings,O=e.selectedServer,v=c.shortCode,f=Object(C.a)(i).domain;return Object(F.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(es,{getVisits:function(e){return u(v,Object(d.a)(Object(d.a)({},Na(e)),{},{domain:f}))},cancelGetVisits:b,visitsInfo:o,baseUrl:s,domain:f,settings:h,exportCsv:function(e){var r;return t("short-url_".concat(null===(r=l.shortUrl)||void 0===r?void 0:r.shortUrl.replace(/https?:\/\//g,""),"_visits.csv"),e)},selectedServer:O,children:Object(a.jsx)(Cc,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[Me.shortUrlVisits(t.params.shortCode)]}))},rs=r(614),ns=5e3,cs=function(e){return e.currentPage>=e.pagesCount},as=function(e,t){return 100*t/e},ss=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n,c,a){var s,i,o,l;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c({type:n.start}),s=function(){var e=Object(x.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(r.map(function(){var e=Object(x.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(r,ns).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(rs.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i=function(){var e=Object(x.a)(m.a.mark((function e(t){var r,o,l=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>1&&void 0!==l[1]?l[1]:0,!a()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,s(t[r]);case 5:if(o=e.sent,c({type:n.progress,progress:as(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,ns);case 3:if(a=e.sent,s=a.pagination,o=a.data,s&&!cs(s)){e.next=8;break}return e.abrupt("return",o);case 8:return l=Object(Xt.a)(2,s.pagesCount+1),u=Object(oa.a)(4,l),s.pagesCount-1>4&&c({type:n.large}),e.t0=o,e.next=14,i(u);case 14:return e.t1=e.sent,e.abrupt("return",e.t0.concat.call(e.t0,e.t1));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.prev=4,e.next=7,o();case 7:l=e.sent,c(Object(d.a)(Object(d.a)({},r),{},{visits:l,type:n.finish})),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),c({type:n.error,errorData:Ot(e.t0)});case 14:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),is="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",os="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",ls="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",us="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",ds="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",js="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",bs={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},hs=st((Ze={},Object(u.a)(Ze,is,(function(){return Object(d.a)(Object(d.a)({},bs),{},{loading:!0})})),Object(u.a)(Ze,os,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},bs),{},{error:!0,errorData:r})})),Object(u.a)(Ze,ls,(function(e,t){var r=t.visits,n=t.query,c=t.shortCode,a=t.domain;return Object(d.a)(Object(d.a)({},bs),{},{visits:r,shortCode:c,domain:a,query:n})})),Object(u.a)(Ze,us,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Ze,ds,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Ze,js,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Ze,bt,(function(e,t){var r=t.createdVisits,n=e.shortCode,c=e.domain,a=e.visits,s=e.query,i=void 0===s?{}:s,o=i.startDate,l=i.endDate,u=r.filter((function(e){var t=e.shortUrl,r=e.visit;return t&&jt(t,n,c)&&oe(r.date,o,l)})).map((function(e){return e.visit}));return 0===u.length?e:Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(ke.a)(u),Object(ke.a)(a))})})),Ze),bs),Os=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getShortUrlVisits,o=function(){var e=Object(x.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().shortUrlVisits.cancelLoad},u={shortCode:t,query:r,domain:r.domain},j={start:is,large:us,finish:ls,error:os,progress:js},n.abrupt("return",ss(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},vs=it(ds),fs=function(e){var t=e.tagVisits,r=e.goBack,n=e.colorGenerator,c=t.visits,s=t.tag,i=Object(a.jsxs)("span",{className:"d-flex align-items-center justify-content-center",children:[Object(a.jsx)("span",{className:"mr-2",children:"Visits for"}),Object(a.jsx)(P,{text:s,colorGenerator:n})]});return Object(a.jsx)(Sc,{title:i,goBack:r,visits:c})},ms=function(e,t){var r=t.exportVisits;return Ae((function(t){var n=t.history.goBack,c=t.match,s=c.params,i=c.url,o=t.getTagVisits,l=t.tagVisits,u=t.cancelGetTagVisits,d=t.settings,j=t.selectedServer,b=s.tag;return Object(a.jsx)(es,{getVisits:function(e){return o(b,Na(e))},cancelGetVisits:u,visitsInfo:l,baseUrl:i,settings:d,exportCsv:function(e){return r("tag_".concat(b,"_visits.csv"),e)},selectedServer:j,children:Object(a.jsx)(fs,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[Me.visits]}))},xs="shlink/tagVisits/GET_TAG_VISITS_START",gs="shlink/tagVisits/GET_TAG_VISITS_ERROR",ps="shlink/tagVisits/GET_TAG_VISITS",ys="shlink/tagVisits/GET_TAG_VISITS_LARGE",Ss="shlink/tagVisits/GET_TAG_VISITS_CANCEL",Cs="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",Ns={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},ws=st((Ye={},Object(u.a)(Ye,xs,(function(){return Object(d.a)(Object(d.a)({},Ns),{},{loading:!0})})),Object(u.a)(Ye,gs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ns),{},{error:!0,errorData:r})})),Object(u.a)(Ye,ps,(function(e,t){var r=t.visits,n=t.tag,c=t.query;return Object(d.a)(Object(d.a)({},Ns),{},{visits:r,tag:n,query:c})})),Object(u.a)(Ye,ys,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Ye,Ss,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Ye,Cs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Ye,bt,(function(e,t){var r=t.createdVisits,n=e.tag,c=e.visits,a=e.query,s=void 0===a?{}:a,i=s.startDate,o=s.endDate,l=r.filter((function(e){var t=e.shortUrl,r=e.visit;return(null===t||void 0===t?void 0:t.tags.includes(n))&&oe(r.date,i,o)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(ke.a)(l),Object(ke.a)(c))})})),Ye),Ns),ks=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getTagVisits,o=function(){var e=Object(x.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().tagVisits.cancelLoad},u={tag:t,query:r},j={start:xs,large:ys,finish:ps,error:gs,progress:Cs},n.abrupt("return",ss(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},_s=it(Ss),Us=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(Sc,{title:"Orphan visits",goBack:r,visits:n})},Ts=function(e){var t=e.exportVisits;return Ae((function(e){var r=e.history.goBack,n=e.match.url,c=e.getOrphanVisits,s=e.orphanVisits,i=e.cancelGetOrphanVisits,o=e.settings,l=e.selectedServer;return Object(a.jsx)(es,{getVisits:function(e){var t;return c(Na(e),null===(t=e.filter)||void 0===t?void 0:t.orphanVisitsType)},cancelGetVisits:i,visitsInfo:s,baseUrl:n,settings:o,exportCsv:function(e){return t("orphan_visits.csv",e)},selectedServer:l,isOrphanVisits:!0,children:Object(a.jsx)(Us,{orphanVisits:s,goBack:r})})}),(function(){return[Me.orphanVisits]}))},Rs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",Es="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",Ds="shlink/orphanVisits/GET_ORPHAN_VISITS",Ls="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",Vs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",Is="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",Fs={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},As=st((Xe={},Object(u.a)(Xe,Rs,(function(){return Object(d.a)(Object(d.a)({},Fs),{},{loading:!0})})),Object(u.a)(Xe,Es,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Fs),{},{error:!0,errorData:r})})),Object(u.a)(Xe,Ds,(function(e,t){var r=t.visits,n=t.query;return Object(d.a)(Object(d.a)({},Fs),{},{visits:r,query:n})})),Object(u.a)(Xe,Ls,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Xe,Vs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Xe,Is,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Xe,bt,(function(e,t){var r=t.createdVisits,n=e.visits,c=e.query,a=void 0===c?{}:c,s=a.startDate,i=a.endDate,o=r.filter((function(e){var t=e.visit;return oe(t.date,s,i)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(ke.a)(o),Object(ke.a)(n))})})),Xe),Fs),Ms=function(e,t){return!t||t===e.type},Gs=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getOrphanVisits,o=function(){var e=Object(x.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return ya(e)&&Ms(e,r)}));return Object(d.a)(Object(d.a)({},e),{},{data:t})})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().orphanVisits.cancelLoad},u={query:t},j={start:Rs,large:Ls,finish:Ds,error:Es,progress:Is},n.abrupt("return",ss(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},Ps=it(Vs),Bs="shlink/visitsOverview/GET_OVERVIEW_START",Hs="shlink/visitsOverview/GET_OVERVIEW_ERROR",Ws="shlink/visitsOverview/GET_OVERVIEW",qs={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},zs=st(($e={},Object(u.a)($e,Bs,(function(){return Object(d.a)(Object(d.a)({},qs),{},{loading:!0})})),Object(u.a)($e,Hs,(function(){return Object(d.a)(Object(d.a)({},qs),{},{error:!0})})),Object(u.a)($e,Ws,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},qs),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)($e,bt,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(xr.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=Sa(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),$e),qs),Qs=function(e){return function(){return function(){var t=Object(x.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:Bs}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:Ws},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:Hs});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Ks=function e(t,r){var n=this;Object(g.a)(this,e),this.window=t,this.csvjson=r,this.exportVisits=function(e,t){if(t.length){var r=n.csvjson.toCSV(t,{headers:"key"});Object(gc.a)(n.window,r,e)}}},Js=function(e,t){e.serviceFactory("MapModal",(function(){return xa})),e.serviceFactory("ShortUrlVisits",ts,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",ms,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Ts,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",Ks,"window","csvjson"),e.serviceFactory("getShortUrlVisits",Os,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return vs})),e.serviceFactory("getTagVisits",ks,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return _s})),e.serviceFactory("getOrphanVisits",Gs,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return Ps})),e.serviceFactory("createNewVisits",(function(){return ht})),e.serviceFactory("loadVisitsOverview",Qs,"buildShlinkApiClient")},Zs=r(293),Ys=r.n(Zs),Xs=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},$s=function(e){return{id:e,name:e}},ei=function(e){return function(t){var r,n,c=t.selectedTags,s=t.onChange,i=t.placeholder,o=t.listTags,l=t.tagsList,u=t.settings;Object(F.useEffect)((function(){o()}),[]);var d=null!==(r=null===(n=u.shortUrlCreation)||void 0===n?void 0:n.tagFilteringMode)&&void 0!==r?r:"startsWith";return Object(a.jsx)(Ys.a,{tags:c.map($s),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(P,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map($s),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Xs,{tag:"".concat(r.name),colorGenerator:e}),r.name]})},allowNew:!0,addOnBlur:!0,placeholderText:null!==i&&void 0!==i?i:"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:"includes"===d?function(e,t){return t.filter((function(t){return t.name.includes(e)}))}:void 0,onDelete:function(e){var t=Object(ke.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(ke.a)(new Set([].concat(Object(ke.a)(c),Object(ke.a)(t.toLowerCase().split(","))))))}})}},ti=r(551),ri=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=n.displayed,l=n.toggle,u=Object(z.d)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(z.d)(),O=Object(E.a)(h,2),f=O[0],m=O[1],x=Object(z.d)(),g=Object(E.a)(x,3),p=g[0],y=g[2],S=Object(F.useRef)(),C=Object(v.a)(s);return Object(F.useEffect)((function(){var e;(e=S.current)&&e.scrollWidth>e.clientWidth&&y()}),[S.current]),Object(a.jsxs)(Re.a,{className:"tag-card",children:[Object(a.jsxs)(dc.a,{className:"tag-card__header",children:[Object(a.jsx)(Hr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:b,children:Object(a.jsx)(L.a,{icon:D.Q})}),Object(a.jsx)(Hr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:m,children:Object(a.jsx)(L.a,{icon:D.C})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:p?c.tag:void 0,ref:function(e){S.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(Xs,{tag:c.tag,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:l,children:c.tag})]})]}),Object(a.jsx)(ti.a,{isOpen:i,children:Object(a.jsxs)(jc.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:"/server/".concat(C,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center mb-1",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(L.a,{icon:D.v,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:nr(c.shortUrls)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(C,"/tag/").concat(c.tag,"/visits"),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(L.a,{icon:D.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:nr(c.visits)})]})]})}),Object(a.jsx)(e,{tag:c.tag,toggle:b,isOpen:j}),Object(a.jsx)(t,{tag:c.tag,toggle:m,isOpen:f})]})}},ni=function(e){var t=e.tag,r=e.toggle,n=e.isOpen,c=e.deleteTag,s=e.tagDelete,i=e.tagDeleted,o=s.deleting,l=s.error,u=s.errorData,d=function(){var e=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t);case 2:i(t),r();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(a.jsxs)(_r.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(Ur.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(Tr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(Ir,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Fr,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",disabled:o,onClick:d,children:o?"Deleting tag...":"Delete tag"})]})]})},ci=r(605),ai=r(305),si=function(e){var t=e.getColorForKey;return function(e){var r=e.tag,n=e.editTag,c=e.toggle,s=e.tagEdited,i=e.isOpen,o=e.tagEdit,l=Object(F.useState)(r),u=Object(E.a)(l,2),d=u[0],j=u[1],b=Object(F.useState)(t(r)),h=Object(E.a)(b,2),O=h[0],v=h[1],f=Object(z.d)(),g=Object(E.a)(f,4),p=g[0],y=g[1],S=g[3],C=o.editing,N=o.error,w=o.errorData,k=Object(Dr.b)(Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n(r,d,O).then((function(){return s(r,d,O)})).then(c).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(_r.a,{isOpen:i,toggle:c,centered:!0,onClosed:S,children:Object(a.jsxs)("form",{onSubmit:k,children:[Object(a.jsx)(Ur.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("div",{className:"input-group",children:[Object(a.jsx)("div",{className:"input-group-prepend",id:"colorPickerBtn",onClick:y,children:Object(a.jsx)("div",{className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:O,borderColor:O},children:Object(a.jsx)(L.a,{icon:D.A,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(ci.a,{isOpen:p,toggle:y,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(ai.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(Qr.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),N&&Object(a.jsx)(Ir,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Fr,{errorData:w,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)(Hr.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)(Hr.a,{color:"primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},ii={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},oi=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(Q,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(B.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(L.a,{icon:D.O,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(B.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(L.a,{icon:D.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},li=function(e,t){return Ae((function(r){var n,c,s=r.filterTags,i=r.forceListTags,o=r.tagsList,l=r.selectedServer,u=r.settings,d=Object(F.useState)(null!==(n=null===(c=u.ui)||void 0===c?void 0:c.tagsMode)&&void 0!==n?n:"cards"),j=Object(E.a)(d,2),b=j[0],h=j[1],O=Object(F.useState)({}),v=Object(E.a)(O,2),f=v[0],m=v[1],x=Object(V.a)((function(){return o.filteredTags.map((function(e){var t,r,n,c;return{tag:e,shortUrls:null!==(t=null===(r=o.stats[e])||void 0===r?void 0:r.shortUrlsCount)&&void 0!==t?t:0,visits:null!==(n=null===(c=o.stats[e])||void 0===c?void 0:c.visitsCount)&&void 0!==n?n:0}}))}),(function(e){return Ve(e,f)}));if(Object(F.useEffect)((function(){i()}),[]),o.loading)return Object(a.jsx)(un.a,{loading:!0});if(o.error)return Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:o.errorData,fallbackMessage:"Error loading tags :("})});var g=function(e){return function(){var t=Le(e,f.field,f.dir);m({field:t?e:void 0,dir:t})}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(G,{className:"mb-3",onChange:s}),Object(a.jsxs)(Lr.a,{className:"mb-3",children:[Object(a.jsx)("div",{className:"col-lg-6",children:Object(a.jsx)(oi,{mode:b,onChange:h})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3 mt-lg-0",children:Object(a.jsx)(Ie,{items:ii,order:f,onChange:function(e,t){return m({field:e,dir:t})}})})]}),function(){if(o.filteredTags.length<1)return Object(a.jsx)(un.a,{children:"No tags found"});var r=x();return"cards"===b?Object(a.jsx)(e,{sortedTags:r,selectedServer:l}):Object(a.jsx)(t,{sortedTags:r,selectedServer:l,currentOrder:f,orderByColumn:g})}()]})}),(function(){return[Me.visits]}))},ui="shlink/deleteTag/DELETE_TAG_START",di="shlink/deleteTag/DELETE_TAG_ERROR",ji="shlink/deleteTag/DELETE_TAG",bi="shlink/deleteTag/TAG_DELETED",hi=st((et={},Object(u.a)(et,ui,(function(){return{deleting:!0,error:!1}})),Object(u.a)(et,di,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(et,ji,(function(){return{deleting:!1,error:!1}})),et),{deleting:!1,error:!1}),Oi=function(e){return function(t){return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:ui}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:ji}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:di,errorData:Ot(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},vi=function(e){return{type:bi,tag:e}},fi="shlink/editTag/EDIT_TAG_START",mi="shlink/editTag/EDIT_TAG_ERROR",xi="shlink/editTag/EDIT_TAG",gi="shlink/editTag/TAG_EDITED",pi=st((tt={},Object(u.a)(tt,fi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(tt,mi,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(tt,xi,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),tt),{oldName:"",newName:"",editing:!1,error:!1}),yi=function(e,t){return function(r,n,c){return function(){var a=Object(x.a)(m.a.mark((function a(s,i){var o,l;return m.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s({type:fi}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:xi,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:mi,errorData:Ot(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},Si=function(e,t,r){return{type:gi,oldName:e,newName:t,color:r}},Ci="shlink/tagsList/LIST_TAGS_START",Ni="shlink/tagsList/LIST_TAGS_ERROR",wi="shlink/tagsList/LIST_TAGS",ki="shlink/tagsList/FILTER_TAGS",_i={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Ui=function(e,t){return function(r){return r===e?t:r}},Ti=function(e,t){return Object(p.a)((function(e){return e===t}),e)},Ri=function(e){return Object.entries(e.reduce((function(e,t){var r=t.shortUrl;return null===r||void 0===r||r.tags.forEach((function(t){e[t]=(e[t]||0)+1})),e}),{}))},Ei=st((rt={},Object(u.a)(rt,Ci,(function(){return Object(d.a)(Object(d.a)({},_i),{},{loading:!0})})),Object(u.a)(rt,Ni,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},_i),{},{error:!0,errorData:r})})),Object(u.a)(rt,wi,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},_i),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(rt,bi,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:Ti(e.tags,r),filteredTags:Ti(e.filteredTags,r)})})),Object(u.a)(rt,gi,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(Ui(r,n)).sort(),filteredTags:e.filteredTags.map(Ui(r,n)).sort()})})),Object(u.a)(rt,ki,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredTags:e.tags.filter((function(e){return e.toLowerCase().match(r)}))})})),Object(u.a)(rt,bt,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=Ri(c),n=e.stats,r.reduce((function(e,t){var r=Object(E.a)(t,2),n=r[0],c=r[1];if(!e[n])return e;var a=e[n];return a.visitsCount=a.visitsCount+c,e[n]=a,e}),Object(d.a)({},n)))})})),rt),_i),Di=function(e){return{type:ki,searchTerm:e}},Li=Math.ceil,Vi=function(e){return function(t){var r=t.sortedTags,n=t.selectedServer,c=Object(F.useState)(),s=Object(E.a)(c,2),i=s[0],o=s[1],l=r.length,u=Object(oa.a)(Li(l/4),r);return Object(a.jsx)(Lr.a,{children:u.map((function(t,r){return Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:t.map((function(t){return Object(a.jsx)(e,{tag:t,selectedServer:n,displayed:i===t.tag,toggle:function(){return o(i!==t.tag?t.tag:void 0)}},t.tag)}))},r)}))})}},Ii=function(e){return function(t){var r,n=t.sortedTags,c=t.selectedServer,s=t.location,i=t.orderByColumn,o=t.currentOrder,l=Object(F.useRef)(!0),u=Object(C.a)(s.search).page,d=void 0===u?1:u,j=Object(z.a)("page",Number(d)),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(oa.a)(20,n),f=v.length>1,m=null!==(r=v[h-1])&&void 0!==r?r:[];return Object(F.useEffect)((function(){!l.current&&O(1),l.current=!1}),[n]),Object(F.useEffect)((function(){scrollTo(0,0)}),[h]),Object(a.jsxs)(Vr.a,{bodyClassName:f?"pb-1":"",children:[Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsxs)("thead",{className:"responsive-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:"tags-table__header-cell",onClick:i("tag"),children:["Tag ",Object(a.jsx)(Ge,{currentOrder:o,field:"tag"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("shortUrls"),children:["Short URLs ",Object(a.jsx)(Ge,{currentOrder:o,field:"shortUrls"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("visits"),children:["Visits ",Object(a.jsx)(Ge,{currentOrder:o,field:"visits"})]}),Object(a.jsx)("th",{className:"tags-table__header-cell"})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("th",{colSpan:4,className:"p-0 border-top-0"})})]}),Object(a.jsxs)("tbody",{children:[0===m.length&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:4,className:"text-center",children:"No results found"})}),m.map((function(t){return Object(a.jsx)(e,{tag:t,selectedServer:c},t.tag)}))]})]}),f&&Object(a.jsx)("div",{className:"sticky-card-paginator",children:Object(a.jsx)(la,{pagesCount:v.length,currentPage:h,setCurrentPage:O})})]},h)}},Fi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=Object(z.d)(),l=Object(E.a)(i,2),u=l[0],d=l[1],j=Object(z.d)(),b=Object(E.a)(j,2),h=b[0],O=b[1],f=Object(z.d)(),m=Object(E.a)(f,2),x=m[0],g=m[1],p=Object(v.a)(s);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsxs)("th",{className:"responsive-table__cell","data-th":"Tag",children:[Object(a.jsx)(Xs,{tag:c.tag,colorGenerator:r})," ",c.tag]}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Short URLs",children:Object(a.jsx)(o.b,{to:"/server/".concat(p,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),children:nr(c.shortUrls)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(o.b,{to:"/server/".concat(p,"/tag/").concat(c.tag,"/visits"),children:nr(c.visits)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)(Nr,{toggle:g,isOpen:x,children:[Object(a.jsxs)(B.a,{onClick:O,children:[Object(a.jsx)(L.a,{icon:D.C,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(B.a,{onClick:d,children:[Object(a.jsx)(L.a,{icon:D.Q,fixedWidth:!0,className:"mr-1"})," Delete"]})]})}),Object(a.jsx)(t,{tag:c.tag,toggle:O,isOpen:h}),Object(a.jsx)(e,{tag:c.tag,toggle:d,isOpen:u})]})}},Ai=function(e,t){e.serviceFactory("TagsSelector",ei,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",ri,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return ni})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",si,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",Vi,"TagCard"),e.serviceFactory("TagsTableRow",Fi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Ii,"TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",li,"TagsCards","TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"]));var r=function(e){return function(t){return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(){return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s,i,o,l,u,d,j;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c(),s=a.tagsList,t||!s.loading&&Object(S.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:Ci}),r.prev=4,i=e(c),o=i.listTags,r.next=8,o();case 8:l=r.sent,u=l.tags,d=l.stats,j=(void 0===d?[]:d).reduce((function(e,t){var r=t.tag,n=t.shortUrlsCount,c=t.visitsCount;return e[r]={shortUrlsCount:n,visitsCount:c},e}),{}),n({tags:u,stats:j,type:wi}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:Ni,errorData:Ot(r.t0)});case 19:case"end":return r.stop()}}),r,null,[[4,16]])})));return function(e,t){return r.apply(this,arguments)}}()}}(t.buildShlinkApiClient,e)}};e.factory("listTags",r(!1)),e.factory("forceListTags",r(!0)),e.serviceFactory("filterTags",(function(){return Di})),e.serviceFactory("tagDeleted",(function(){return vi})),e.serviceFactory("tagEdited",(function(){return Si})),e.serviceFactory("deleteTag",Oi,"buildShlinkApiClient"),e.serviceFactory("editTag",yi,"buildShlinkApiClient","ColorGenerator")},Mi=r(298),Gi="shlink/mercure/GET_MERCURE_INFO_START",Pi="shlink/mercure/GET_MERCURE_INFO_ERROR",Bi="shlink/mercure/GET_MERCURE_INFO",Hi=st((nt={},Object(u.a)(nt,Gi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(nt,Pi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(nt,Bi,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),nt),{loading:!0,error:!1}),Wi=function(e){return function(){return function(){var t=Object(x.a)(m.a.mark((function t(r,n){var c,a,s,i,o;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r({type:Gi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:Pi}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:Bi,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:Pi});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},qi=function(e){e.serviceFactory("loadMercureInfo",Wi,"buildShlinkApiClient")},zi=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(Vr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Br.a,{children:Object(a.jsxs)(Qc,{checked:r.enabled,onChange:n,children:["Enable or disable real-time updates.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["Real-time updates are currently being ",Object(a.jsx)("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{className:M()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(Qr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){var t=e.target;return c(Number(t.value))}}),r.enabled&&Object(a.jsxs)("small",{className:"form-text text-muted",children:[void 0!==r.interval&&r.interval>0&&Object(a.jsxs)("span",{children:["Updates will be reflected in the UI every ",Object(a.jsx)("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},Qi=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(Lr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},Ki=function(e,t,r,n){return function(){return Object(a.jsx)(pn.a,{children:Object(a.jsx)(Qi,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},Ji=r(612),Zi="shlink/realTimeUpdates/SET_SETTINGS",Yi=st(Object(u.a)({},Zi,(function(e,t){return Object(Ji.a)(e,Object(Bn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),Xi=function(e){return{type:Zi,realTimeUpdates:{enabled:e}}},$i=function(e){return{type:Zi,realTimeUpdates:{interval:e}}},eo=function(e){return{type:Zi,shortUrlCreation:e}},to=function(e){return{type:Zi,ui:e}},ro=function(e){return{type:Zi,visits:e}},no=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},co=function(e){var t,r,n,c,s,i=e.settings,o=e.setShortUrlCreationSettings,l=null!==(t=i.shortUrlCreation)&&void 0!==t?t:{validateUrls:!1},u=function(e){return function(){return o(Object(d.a)(Object(d.a)({},null!==l&&void 0!==l?l:{validateUrls:!1}),{},{tagFilteringMode:e}))}};return Object(a.jsxs)(Vr.a,{title:"Short URLs form",className:"h-100",children:[Object(a.jsx)(Br.a,{children:Object(a.jsxs)(Qc,{checked:null!==(r=l.validateUrls)&&void 0!==r&&r,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{validateUrls:e}))},children:["Request validation on long URLs when creating new short URLs.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Validate URL"})," checkbox will be ",Object(a.jsx)("b",{children:l.validateUrls?"checked":"unchecked"}),"."]})]})}),Object(a.jsx)(Br.a,{children:Object(a.jsxs)(Qc,{checked:null===(n=l.forwardQuery)||void 0===n||n,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{forwardQuery:e}))},children:["Make all new short URLs forward their query params to the long URL.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Forward query params on redirect"})," checkbox will be ",Object(a.jsx)("b",{children:null===(c=l.forwardQuery)||void 0===c||c?"checked":"unchecked"}),"."]})]})}),Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(Q,{text:no(l.tagFilteringMode),children:[Object(a.jsx)(B.a,{active:!l.tagFilteringMode||"startsWith"===l.tagFilteringMode,onClick:u("startsWith"),children:no("startsWith")}),Object(a.jsx)(B.a,{active:"includes"===l.tagFilteringMode,onClick:u("includes"),children:no("includes")})]}),Object(a.jsx)("small",{className:"form-text text-muted",children:(s=l.tagFilteringMode,"includes"===s?Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"including"})," provided input."]}):Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"starting with"})," provided input."]}))})]})]})},ao=function(e){var t,r,n=e.settings.ui,c=e.setUiSettings;return Object(a.jsxs)(Vr.a,{title:"User interface",className:"h-100",children:[Object(a.jsxs)(Br.a,{children:[Object(a.jsx)(L.a,{icon:"dark"===(null===n||void 0===n?void 0:n.theme)?D.z:D.L,className:"user-interface__theme-icon"}),Object(a.jsx)(Qc,{checked:"dark"===(null===n||void 0===n?void 0:n.theme),onChange:function(e){var t=e?"dark":"light";c(Object(d.a)(Object(d.a)({},n),{},{theme:t})),Object(Yc.g)(t)},children:"Use dark theme."})]}),Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(oi,{mode:null!==(t=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(Dr.a)(e)},onChange:function(e){return c(Object(d.a)(Object(d.a)({},null!==n&&void 0!==n?n:{theme:"light"}),{},{tagsMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==r?r:"cards"}),"."]})]})]})},so=function(e){var t,r=e.onChange,n=e.active,c=e.allText;return Object(a.jsx)(Q,{text:null!==(t=be(n))&&void 0!==t?t:c,children:Object(a.jsx)(ye,{allText:c,active:n,onChange:r})})},io=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(Vr.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(so,{allText:"All visits",active:null!==(t=null===(r=n.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",onChange:function(e){return c({defaultInterval:e})}})]})})},oo=function(e,t){e.serviceFactory("Settings",Ki,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",oc.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return zi})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return co})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return ao})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return io})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return Xi})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return $i})),e.serviceFactory("setShortUrlCreationSettings",(function(){return eo})),e.serviceFactory("setUiSettings",(function(){return to})),e.serviceFactory("setVisitsSettings",(function(){return ro}))},lo="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",uo=function(e){return function(t,r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START"}),s=e(a),i=s.editDomainRedirects,n.prev=2,n.next=5,i(Object(d.a)({domain:t},r));case 5:o=n.sent,c({type:lo,domain:t,redirects:o}),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR",errorData:Ot(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},jo="shlink/domainsList/LIST_DOMAINS_START",bo="shlink/domainsList/LIST_DOMAINS_ERROR",ho="shlink/domainsList/LIST_DOMAINS",Oo="shlink/domainsList/FILTER_DOMAINS",vo={domains:[],filteredDomains:[],loading:!1,error:!1},fo=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},mo=st((ct={},Object(u.a)(ct,jo,(function(){return Object(d.a)(Object(d.a)({},vo),{},{loading:!0})})),Object(u.a)(ct,bo,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},vo),{},{error:!0,errorData:t})})),Object(u.a)(ct,ho,(function(e,t){var r=t.domains;return Object(d.a)(Object(d.a)({},vo),{},{domains:r,filteredDomains:r})})),Object(u.a)(ct,Oo,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredDomains:e.domains.filter((function(e){return e.domain.toLowerCase().match(r)}))})})),Object(u.a)(ct,lo,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(fo(r,n)),filteredDomains:e.filteredDomains.map(fo(r,n))})})),ct),vo),xo=function(e){return function(){return function(){var t=Object(x.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:jo}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,r({type:ho,domains:s}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),r({type:bo,errorData:Ot(t.t0)});case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},go=function(e){return{type:Oo,searchTerm:e}},po=r(607),yo=r(617),So=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(z.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(S.a)(r),b=function(){return c("")};return Object(F.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(po.a,{children:[Object(a.jsx)(Qr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(yo.a,{addonType:"append",children:[Object(a.jsx)(Hr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(V.a)(b,u),children:Object(a.jsx)(L.a,{icon:D.R})}),Object(a.jsx)(mr.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(Q,{text:j?"Domain":"Domain: ".concat(r),className:j?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[d.map((function(e){var t=e.domain,n=e.isDefault;return Object(a.jsxs)(B.a,{active:r===t||n&&j,onClick:function(){return c(t)},children:[t,n&&Object(a.jsx)("span",{className:"float-right text-muted",children:"default"})]},t)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{onClick:Object(V.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},Co=function(e){var t=e.isLast,r=Object(xr.a)(e,["isLast"]);return Object(a.jsx)(yn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},No=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(F.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(F.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(E.a)(v,2),g=f[0],p=f[1],y=Object(F.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),S=Object(E.a)(y,2),C=S[0],N=S[1],w=Object(Dr.b)(Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(u.domain,{baseUrlRedirect:Object(Dr.d)(h),regular404Redirect:Object(Dr.d)(g),invalidShortUrlRedirect:Object(Dr.d)(C)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(_r.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsxs)(Ur.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)(Co,{value:h,onChange:O,children:[Object(a.jsxs)(nn,{className:"mr-2",placement:"bottom",children:["Visitors accessing the base url, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),Object(a.jsxs)(Co,{value:g,onChange:p,children:[Object(a.jsxs)(nn,{className:"mr-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),Object(a.jsxs)(Co,{value:C,isLast:!0,onChange:N,children:[Object(a.jsx)(nn,{className:"mr-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"]})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)(Hr.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)(Hr.a,{color:"primary",children:"Save"})]})]})})},wo=function(e){var t=e.fallback;return Object(a.jsxs)("span",{className:"text-muted",children:[!t&&Object(a.jsx)("small",{children:"No redirect"}),t&&Object(a.jsxs)(a.Fragment,{children:[t," ",Object(a.jsx)("small",{children:"(as fallback)"})]})]})},ko=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(L.a,{icon:D.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(mr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},_o=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=Object(z.d)(),l=Object(E.a)(o,2),u=l[0],d=l[1],j=c.domain,b=c.isDefault,h=c.redirects,O="domainEdit".concat(j.replace(/\./g,""));return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:b?Object(a.jsx)(ko,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:j}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===h||void 0===h?void 0:h.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(wo,{fallback:null===i||void 0===i?void 0:i.baseUrlRedirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:null!==(r=null===h||void 0===h?void 0:h.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(wo,{fallback:null===i||void 0===i?void 0:i.regular404Redirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:null!==(n=null===h||void 0===h?void 0:h.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(wo,{fallback:null===i||void 0===i?void 0:i.invalidShortUrlRedirect})}),Object(a.jsxs)("td",{className:"responsive-table__cell text-right",children:[Object(a.jsx)("span",{id:O,children:Object(a.jsx)(Hr.a,{outline:!0,size:"sm",disabled:b,onClick:b?void 0:d,children:Object(a.jsx)(L.a,{icon:b?D.b:D.m})})}),b&&Object(a.jsxs)(mr.a,{target:O,placement:"left",children:["Redirects for default domain cannot be edited here.",Object(a.jsx)("br",{}),"Use config options or env vars directly on the server."]})]}),Object(a.jsx)(No,{domain:c,isOpen:u,toggle:d,editDomainRedirects:s})]})},Uo=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],To=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=n.filteredDomains,o=n.loading,l=n.error,u=n.errorData,d=null===(t=i.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(F.useEffect)((function(){r()}),[]),o)return Object(a.jsx)(un.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(G,{className:"mb-3",onChange:c}),l?Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:u,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(Vr.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsx)("tr",{children:Uo.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[i.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:Uo.length,className:"text-center",children:"No results found"})}),i.map((function(e){return Object(a.jsx)(_o,{domain:e,editDomainRedirects:s,defaultRedirects:d},e.domain)}))]})]})})]})},Ro=function(e,t){e.serviceFactory("DomainSelector",(function(){return So})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return To})),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",xo,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return go})),e.serviceFactory("editDomainRedirects",uo,"buildShlinkApiClient")},Eo="shlink/appUpdates/APP_UPDATE_AVAILABLE",Do="shlink/appUpdates/RESET_APP_UPDATE",Lo=st((at={},Object(u.a)(at,Eo,(function(){return!0})),Object(u.a)(at,Do,(function(){return!1})),at),!1),Vo=it(Eo),Io=it(Do),Fo=r(153),Ao=r(608),Mo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(z.d)(),s=Object(E.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(Ao.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:Vr.a,color:"secondary",children:[Object(a.jsx)("h4",{className:"mb-4",children:"This app has just been updated!"}),Object(a.jsxs)("p",{className:"mb-0",children:["Restart it to enjoy the new features.",Object(a.jsxs)(Hr.a,{disabled:i,className:"ml-2",color:"secondary",size:"sm",onClick:function(){o(),n()},children:[!i&&Object(a.jsxs)(a.Fragment,{children:["Restart now ",Object(a.jsx)(L.a,{icon:D.M,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},Go=r(33),Po=function(){var e=Object(x.a)(m.a.mark((function e(){var t,r,n,c,a,s,i;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=navigator.serviceWorker)||void 0===r?void 0:r.getRegistrations();case 2:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=6;break}e.t0=void 0!==t;case 6:if(!e.t0){e.next=10;break}e.t2=t,e.next=11;break;case 10:e.t2=[];case 11:n=e.t2,c=Object(Go.a)(n);try{for(c.s();!(a=c.n()).done;)s=a.value,null===(i=s.waiting)||void 0===i||i.addEventListener("statechange",(function(e){var t;"activated"===(null===(t=e.target)||void 0===t?void 0:t.state)&&window.location.reload()})),null===i||void 0===i||i.postMessage({type:"SKIP_WAITING"})}catch(o){c.e(o)}finally{c.f()}case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Bo=function(e,t,r,n,c,s,i,o){return function(l){var u=l.fetchServers,d=l.servers,j=l.settings,h=l.appUpdated,O=l.resetAppUpdate,v="/"===l.location.pathname;return Object(F.useEffect)((function(){var e,t;0===Object.keys(d).length&&u(),Object(Yc.g)(null!==(e=null===(t=j.ui)||void 0===t?void 0:t.theme)&&void 0!==e?e:"light")}),[]),Object(a.jsxs)("div",{className:"container-fluid app-container",children:[Object(a.jsx)(e,{}),Object(a.jsxs)("div",{className:"app",children:[Object(a.jsx)("div",{className:M()("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:"/",component:t}),Object(a.jsx)(b.b,{exact:!0,path:"/settings",component:s}),Object(a.jsx)(b.b,{exact:!0,path:"/manage-servers",component:i}),Object(a.jsx)(b.b,{exact:!0,path:"/server/create",component:n}),Object(a.jsx)(b.b,{exact:!0,path:"/server/:serverId/edit",component:c}),Object(a.jsx)(b.b,{path:"/server/:serverId",component:r}),Object(a.jsx)(b.b,{component:Fo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(o,{})})]}),Object(a.jsx)(Mo,{isOpen:h,toggle:O,forceUpdate:Po})]})}},Ho=function(e,t,r){e.serviceFactory("App",Bo,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.decorator("App",r),e.serviceFactory("appUpdateAvailable",(function(){return Vo})),e.serviceFactory("resetAppUpdate",(function(){return Io}))},Wo=new j.a,qo=Wo.container,zo=function(e,t){return Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},t,function(e,t){return function(){return e[t].apply(e,arguments)}}(qo,t)))},Qo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(i.b)(e?Object(h.a)(e):null,t.reduce(zo,{}))};Ho(Wo,Qo,b.h),Object(R.a)(Wo,Qo,b.h),T(Wo),mn(Wo,Qo,b.h),yc(Wo,Qo,b.h),Ai(Wo,Qo),Js(Wo,Qo),Object(Mi.a)(Wo),qi(Wo),oo(Wo,Qo),Ro(Wo,Qo);var Ko=qo,Jo=r(301),Zo=r(80),Yo=r(222),Xo=Object(Zo.c)({servers:Zn,selectedServer:Mn,shortUrlsList:Bt,shortUrlsListParams:Qt,shortUrlCreationResult:Tt,shortUrlDeletion:yt,shortUrlEdition:Ft,shortUrlVisits:hs,tagVisits:ws,orphanVisits:As,shortUrlDetail:vn,tagsList:Ei,tagDelete:hi,tagEdit:pi,mercureInfo:Hi,settings:Yi,domainsList:mo,visitsOverview:zs,appUpdated:Lo}),$o=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Zo.d,el={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},tl=Object(Zo.e)(Xo,Object(Yo.load)(el),$o(Object(Zo.a)(Object(Yo.save)(el),Jo.a))),rl=r(64),nl=r.n(rl),cl=r(302),al=r(303),sl=r(304),il=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function ol(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var r=e.installing;null!=r&&(r.onstatechange=function(){"installed"===r.state&&(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(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}r(532),r(533);delete nl.a.Icon.Default.prototype._getIconUrl,nl.a.Icon.Default.mergeOptions({iconRetinaUrl:cl.a,iconUrl:al.a,shadowUrl:sl.a});var ll=Ko.App,ul=Ko.ScrollToTop,dl=Ko.ErrorHandler,jl=Ko.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:tl,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(dl,{children:Object(a.jsx)(ul,{children:Object(a.jsx)(ll,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/develop")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/develop","/service-worker.js");il?(!function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then((function(r){var n=r.headers.get("content-type");404===r.status||null!=n&&-1===n.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):ol(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")}))):ol(t,e)}))}}({onUpdate:function(){tl.dispatch(jl())}})},54:function(e,t,r){"use strict";var n=r(0),c=r(539),a=r(315),s=r(7),i=r.n(s),o=r(11),l=r(12),u=function(e){return{error:"border-danger",default:""}[e]},d=function(e){return{error:"text-danger",default:"text-muted"}[e]};t.a=function(e){var t=e.className,r=e.children,s=e.loading,j=void 0!==s&&s,b=e.type,h=void 0===b?"default":b,O=e.fullWidth,v=void 0!==O&&O,f=i()({"col-md-12":v,"col-md-10 offset-md-1":!v});return Object(n.jsx)(c.a,{noGutters:!0,className:t,children:Object(n.jsx)("div",{className:f,children:Object(n.jsx)(a.a,{className:u(h),body:!0,children:Object(n.jsxs)("h3",{className:i()("text-center mb-0",d(h)),children:[j&&Object(n.jsx)(l.a,{icon:o.k,spin:!0}),j&&Object(n.jsx)("span",{className:"ml-2",children:null!==r&&void 0!==r?r:"Loading..."}),!j&&r]})})})})}},60:function(e,t,r){"use strict";var n=r(0);t.a=function(e){var t=e.children;return Object(n.jsx)("div",{className:"no-menu-wrapper container-xl",children:t})}},70:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u}));var n=r(168),c=r(540),a=r(545),s=r(31),i=function(e,t){var r=t.maxVersion,c=t.minVersion;if(!Object(s.c)(e))return!1;var a=!c||Object(n.compare)(e,c,">=");return(!r||Object(n.compare)(e,r,"<="))&&a},o=Object(c.a)(a.a,(function(e){try{return Object(n.compare)(e,e,"=")}catch(t){return!1}})),l=function(e){return o(e)?"v".concat(e):e},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"latest";return function(t){return o(t)?t:e}}}},[[318,1,2]]]); -//# sourceMappingURL=main.6c98e3d6.chunk.js.map \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{103:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(3),c=r(0),a=r(1);function s(e){return function(t){return Object(a.useEffect)((function(){t.resetSelectedServer()}),[]),Object(c.jsx)(e,Object(n.a)({},t))}}},104:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return c}));var n=function(e,t,r){var n=e.document,c=n.createElement("a");c.setAttribute("href",t),c.setAttribute("download",r),c.style.visibility="hidden",n.body.appendChild(c),c.click(),n.body.removeChild(c)},c=function(e,t,r){var c=new Blob([t],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(c);n(e,a,r)}},147:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/develop"}')},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),a=function(e){var t=e.color,r=void 0===t?c.c:t,a=e.className;return Object(n.jsx)("svg",{className:a,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsxs)("g",{fill:r,children:[Object(n.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"}),Object(n.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"}),Object(n.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"}),Object(n.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"})]})})}},151:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(0),a=r(1),s=r(54),i=r(30),o=r(60);function l(e,t){return function(r){var l=r.selectServer,u=r.selectedServer,d=r.match;return Object(a.useEffect)((function(){l(d.params.serverId)}),[d.params.serverId]),u?Object(i.c)(u)?Object(c.jsx)(t,{}):Object(c.jsx)(e,Object(n.a)({},r)):Object(c.jsx)(o.a,{children:Object(c.jsx)(s.a,{loading:!0})})}}},153:function(e,t,r){"use strict";var n=r(0),c=r(22),a=r(32);t.a=function(e){var t=e.to,r=void 0===t?"/":t,s=e.children,i=void 0===s?"Home":s;return Object(n.jsx)("div",{className:"home",children:Object(n.jsxs)(a.a,{className:"p-4",children:[Object(n.jsx)("h2",{children:"Oops! We could not find requested route."}),Object(n.jsx)("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),Object(n.jsx)("br",{}),Object(n.jsx)(c.b,{to:r,className:"btn btn-outline-primary btn-lg",children:i})]})})}},165:function(e,t,r){"use strict";var n=r(0),c=r(555),a=r(556),s=r(22),i=r(7),o=r.n(i),l=r(12),u=r(11),d=function(e){var t=e.id,r=e.name;return Object(n.jsxs)(c.a,{tag:s.b,to:"/server/".concat(t),className:"servers-list__server-item",children:[r,Object(n.jsx)(l.a,{icon:u.j,className:"servers-list__server-item-icon"})]})};t.a=function(e){var t=e.servers,r=e.children,c=e.embedded,s=void 0!==c&&c;return Object(n.jsxs)(n.Fragment,{children:[r&&Object(n.jsx)("h5",{className:"mb-md-3",children:r}),t.length>0&&Object(n.jsx)(a.a,{className:o()("servers-list__list-group",{"servers-list__list-group--embedded":s}),children:t.map((function(e){var t=e.id,r=e.name;return Object(n.jsx)(d,{id:t,name:r},t)}))})]})}},25:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(9),c=r(1),a=r(279),s=r(51),i=function(e,t){return function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,s=Object(c.useState)(r),i=Object(n.a)(s,2),o=i[0],l=i[1],u=Object(c.useRef)(void 0),d=function(){l(!r),u.current&&t(u.current),u.current=e((function(){return l(r)}),a)};return[o,d]}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(c.useState)(e),r=Object(n.a)(t,2),a=r[0],s=r[1];return[a,function(){return s(!a)},function(){return s(!0)},function(){return s(!1)}]},l=function(e,t){var r=function(e){return function(t){t.event.composedPath().some((function(e){var t=e.classList;return null===t||void 0===t?void 0:t.contains("visits-table")}))||document.querySelector(".modal")||e()}};return Object(a.useSwipeable)({delta:40,onSwipedLeft:r(t),onSwipedRight:r(e)})},u=function(e,t){var r=Object(c.useState)(t),a=Object(n.a)(r,2),i=a[0],o=a[1];return[i,function(t){var r=window,n=r.location,c=r.history,a=Object(s.a)(n.search);a[e]=t,c.pushState(null,"","".concat(n.pathname,"?").concat(Object(s.b)(a))),o(t)}]}},276:function(e,t,r){"use strict";(function(e){var n=r(277),c=r.n(n),a=r(278),s=r(309),i=r(310),o=r(311),l=r(312),u=r(280),d=r(307),j=r(103),b=r(282);t.a=function(t,r,n){t.constant("window",e.window),t.constant("console",e.console),t.constant("axios",c.a),t.service("ImageDownloader",b.a,"axios","window"),t.serviceFactory("ScrollToTop",a.a),t.decorator("ScrollToTop",n),t.serviceFactory("MainHeader",s.a,"ServersDropdown"),t.decorator("MainHeader",n),t.serviceFactory("Home",(function(){return i.a})),t.decorator("Home",j.a),t.decorator("Home",n),t.decorator("Home",r(["servers"],["resetSelectedServer"])),t.serviceFactory("MenuLayout",o.a,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),t.decorator("MenuLayout",r(["selectedServer"],["selectServer"])),t.decorator("MenuLayout",n),t.serviceFactory("AsideMenu",l.a,"DeleteServerButton"),t.serviceFactory("ShlinkVersionsContainer",(function(){return d.a})),t.decorator("ShlinkVersionsContainer",r(["selectedServer"])),t.serviceFactory("ErrorHandler",u.a,"window","console")}}).call(this,r(49))},278:function(e,t,r){"use strict";var n=r(0),c=r(1);t.a=function(){return function(e){var t=e.location,r=e.children;return Object(c.useEffect)((function(){scrollTo(0,0)}),[t]),Object(n.jsx)(n.Fragment,{children:r})}}},280:function(e,t,r){"use strict";var n=r(19),c=r(27),a=r(37),s=r(36),i=r(0),o=r(1),l=r(216),u=r(32);t.a=function(e,t){var r=e.location,d=t.error;return function(e){Object(a.a)(o,e);var t=Object(s.a)(o);function o(e){var r;return Object(n.a)(this,o),(r=t.call(this,e)).state={hasError:!1},r}return Object(c.a)(o,[{key:"componentDidCatch",value:function(e){d(e)}},{key:"render",value:function(){return this.state.hasError?Object(i.jsx)("div",{className:"home",children:Object(i.jsxs)(u.a,{className:"p-4",children:[Object(i.jsx)("h1",{children:"Oops! This is awkward :S"}),Object(i.jsx)("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),Object(i.jsx)("br",{}),Object(i.jsx)(l.a,{outline:!0,color:"primary",onClick:function(){return r.reload()},children:"Take me back"})]})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),o}(o.Component)}},282:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(15),s=r(19),i=r(27),o=r(104),l=function(){function e(t,r){Object(s.a)(this,e),this.axios=t,this.window=r}return Object(i.a)(e,[{key:"saveImage",value:function(){var e=Object(a.a)(c.a.mark((function e(t,r){var n,a,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get(t,{responseType:"blob"});case 2:n=e.sent,a=n.data,s=URL.createObjectURL(a),Object(o.b)(this.window,s,r);case 6:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}()},298:function(e,t,r){"use strict";(function(e){var n=r(25),c=r(299),a=r(300);t.a=function(t){t.constant("localStorage",e.localStorage),t.service("Storage",c.a,"localStorage"),t.service("ColorGenerator",a.a,"Storage"),t.constant("setTimeout",e.setTimeout),t.constant("clearTimeout",e.clearTimeout),t.serviceFactory("useStateFlagTimeout",n.b,"setTimeout","clearTimeout")}}).call(this,r(49))},299:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(19),c=function(e){return"".concat("shlink",".").concat(e)},a=function e(t){var r=this;Object(n.a)(this,e),this.localStorage=t,this.get=function(e){var t=r.localStorage.getItem(c(e));return t?JSON.parse(t):void 0},this.set=function(e,t){return r.localStorage.setItem(c(e),JSON.stringify(t))}}},30:function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"e",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"f",(function(){return l}));var n=r(538),c=function(e){return!(null===e||void 0===e||!e.url)&&!(null===e||void 0===e||!e.apiKey)},a=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("id"))},s=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("version"))},i=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("serverNotFound"))},o=function(e){return a(e)?e.id:""},l=function(e){return Object(n.a)(["id","autoConnect"],e)}},300:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(19),c=r(31),a=Math.floor,s=Math.random,i="0123456789ABCDEF",o=function(e){return e.toLowerCase().trim()},l=function e(t){var r,l=this;Object(n.a)(this,e),this.storage=t,this.colors=void 0,this.getColorForKey=function(e){var t=o(e),r=l.colors[t];return r||l.setColorForKey(t,"#".concat(Object(c.e)(6,(function(){return i[a(s()*i.length)]})).join("")))},this.setColorForKey=function(e,t){var r=o(e);return l.colors[r]=t,l.storage.set("colors",l.colors),t},this.colors=null!==(r=this.storage.get("colors"))&&void 0!==r?r:{}}},307:function(e,t,r){"use strict";var n=r(0),c=r(7),a=r.n(c),s=r(30),i=r(543),o=r(52),l=r(70),u=Object(i.a)(Object(l.c)(),l.b),d=function(e){var t=e.project,r=e.version;return Object(n.jsx)(o.a,{href:"https://github.com/shlinkio/".concat(t,"/releases/").concat(r),className:"text-muted",children:Object(n.jsx)("b",{children:r})})},j=function(e){var t=e.selectedServer,r=e.clientVersion,c=u(void 0===r?"%_VERSION_%":r);return Object(n.jsxs)("small",{className:"text-muted",children:[Object(s.d)(t)&&Object(n.jsxs)(n.Fragment,{children:["Server: ",Object(n.jsx)(d,{project:"shlink",version:t.printableVersion})," - "]}),"Client: ",Object(n.jsx)(d,{project:"shlink-web-client",version:c})]})};t.a=function(e){var t=e.selectedServer,r=a()("text-center",{"shlink-versions-container--with-server":Object(s.d)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},309:function(e,t,r){"use strict";var n=r(9),c=r(0),a=r(11),s=r(12),i=r(1),o=r(22),l=r(548),u=r(549),d=r(550),j=r(551),b=r(552),h=r(553),O=r(554),v=r(7),f=r.n(v),m=r(25),x=r(150);t.a=function(e){return function(t){var r=t.location,v=Object(m.d)(),g=Object(n.a)(v,4),p=g[0],y=g[1],S=g[3],C=r.pathname;Object(i.useEffect)(S,[r]);var N="/settings",w=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":p});return Object(c.jsxs)(l.a,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[Object(c.jsxs)(u.a,{tag:o.b,to:"/",children:[Object(c.jsx)(x.a,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),Object(c.jsx)(d.a,{onClick:y,children:Object(c.jsx)(s.a,{icon:a.i,className:w})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:p,children:Object(c.jsxs)(b.a,{navbar:!0,className:"ml-auto",children:[Object(c.jsx)(h.a,{children:Object(c.jsxs)(O.a,{tag:o.b,to:N,active:C===N,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},31:function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(544),c=r(212),a=r(317),s=r(543),i=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Object(n.a)(r,e+1).map(t)},o=function(e){return!Object(c.a)(e)&&!Object(a.a)(e)},l=function(e){return Object(s.a)((function(e){return e.preventDefault()}),e)},u=function(e){return Object(a.a)(e)?null:e},d=function(e){return"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}},310:function(e,t,r){"use strict";var n=r(0),c=r(1),a=r(557),s=r(317),i=r(22),o=r(315),l=r(539),u=r(52),d=r(12),j=r(11),b=r(165),h=r(150);t.a=function(e){var t=e.servers,r=e.history,O=Object(a.a)(t),v=!Object(s.a)(O);return Object(c.useEffect)((function(){var e=O.find((function(e){return e.autoConnect}));e&&r.push("/server/".concat(e.id))}),[]),Object(n.jsx)("div",{className:"home",children:Object(n.jsx)(o.a,{className:"home__main-card",children:Object(n.jsxs)(l.a,{noGutters:!0,children:[Object(n.jsx)("div",{className:"col-md-5 d-none d-md-block",children:Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)(h.a,{})})}),Object(n.jsxs)("div",{className:"col-md-7 home__servers-container",children:[Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)("h1",{className:"home__title",children:"Welcome!"})}),Object(n.jsx)(b.a,{embedded:!0,servers:O,children:!v&&Object(n.jsxs)("div",{className:"p-4 text-center",children:[Object(n.jsx)("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),Object(n.jsx)("p",{children:Object(n.jsxs)(i.b,{to:"/server/create",className:"btn btn-outline-primary btn-lg mr-2",children:[Object(n.jsx)(d.a,{icon:j.E})," ",Object(n.jsx)("span",{className:"ml-1",children:"Add a server"})]})}),Object(n.jsx)("p",{className:"mb-0 mt-5",children:Object(n.jsx)(u.a,{href:"https://shlink.io/documentation",children:Object(n.jsxs)("small",{children:[Object(n.jsx)("span",{className:"mr-1",children:"Learn more about Shlink"})," ",Object(n.jsx)(d.a,{icon:j.o})]})})})]})})]})]})})})}},311:function(e,t,r){"use strict";var n=r(3),c=r(9),a=r(0),s=r(1),i=r(41),o=r(11),l=r(12),u=r(7),d=r.n(u),j=r(151),b=r(25),h=r(42),O=r(30),v=r(153);t.a=function(e,t,r,u,f,m,x,g,p,y,S){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,w=Object(b.d)(),k=Object(c.a)(w,4),_=k[0],U=k[1],T=k[2],R=k[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.d)(N))return Object(a.jsx)(g,{});var E=Object(h.e)(N),D=Object(h.c)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),V=Object(b.c)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:L,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},V),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:_}),Object(a.jsx)("div",{className:"menu-layout__container",onClick:function(){return R()},children:Object(a.jsx)("div",{className:"container-xl",children:Object(a.jsxs)(i.d,{children:[Object(a.jsx)(i.a,{exact:!0,from:"/server/:serverId",to:"/server/:serverId/overview"}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/overview",component:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/list-short-urls/:page",component:t}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/create-short-url",component:u}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/visits",component:f}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/edit",component:y}),Object(a.jsx)(i.b,{path:"/server/:serverId/tag/:tag/visits",component:m}),E&&Object(a.jsx)(i.b,{path:"/server/:serverId/orphan-visits",component:x}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),D&&Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-domains",component:S}),Object(a.jsx)(i.b,{render:function(){return Object(a.jsx)(v.a,{to:"/server/".concat(N.id,"/list-short-urls/1"),children:"List short URLs"})}})]})})})]})}))]})}),g)}},312:function(e,t,r){"use strict";var n=r(3),c=r(43),a=r(0),s=r(11),i=r(12),o=r(22),l=r(7),u=r.n(l),d=r(30),j=r(42),b=function(e){var t=e.children,r=e.to,s=e.className,i=Object(c.a)(e,["children","to","className"]);return Object(a.jsx)(o.c,Object(n.a)(Object(n.a)({className:u()("aside-menu__item",s),activeClassName:"aside-menu__item--selected",to:r},i),{},{children:t}))};t.a=function(e){return function(t){var r=t.selectedServer,n=t.showOnMobile,c=void 0!==n&&n,o=Object(d.e)(r),l=o?r.id:"",h=Object(j.c)(r),O=u()("aside-menu",{"aside-menu--hidden":!c}),v=function(e){return"/server/".concat(l).concat(e)};return Object(a.jsx)("aside",{className:O,children:Object(a.jsxs)("nav",{className:"nav flex-column aside-menu__nav",children:[Object(a.jsxs)(b,{to:v("/overview"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.t}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Overview"})]}),Object(a.jsxs)(b,{to:v("/list-short-urls/1"),isActive:function(e,t){return null!==t.pathname.match("/list-short-urls")},children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.w}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),Object(a.jsxs)(b,{to:v("/create-short-url"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.v,flip:"horizontal"}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),Object(a.jsxs)(b,{to:v("/manage-tags"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.N}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),h&&Object(a.jsxs)(b,{to:v("/manage-domains"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.s}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),Object(a.jsxs)(b,{to:v("/edit"),className:"aside-menu__item--push",children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.B}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),o&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},318:function(e,t,r){e.exports=r(534)},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(43),a=r(0),s=r(315),i=r(541),o=r(542),l=function(e){var t=e.title,r=e.children,l=e.bodyClassName,u=Object(c.a)(e,["title","children","bodyClassName"]);return Object(a.jsxs)(s.a,Object(n.a)(Object(n.a)({},u),{},{children:[t&&Object(a.jsx)(i.a,{children:t}),Object(a.jsx)(o.a,{className:l,children:r})]}))}},403:function(e,t){},405:function(e,t){},42:function(e,t,r){"use strict";r.d(t,"g",(function(){return s})),r.d(t,"i",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return l})),r.d(t,"j",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"h",(function(){return b})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return O}));var n=r(30),c=r(70),a=function(e){return function(t){return Object(n.d)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.5.0"}),i=a({minVersion:"2.6.0"}),o=i,l=i,u=i,d=a({minVersion:"2.7.0"}),j=d,b=a({minVersion:"2.8.0"}),h=b,O=a({minVersion:"2.9.0"})},46:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return u}));var n="#4696e5",c="rgba(70, 150, 229, 0.4)",a="#f77f28",s="rgba(247, 127, 40, 0.4)",i="white",o="#161b22",l=function(e){var t,r=document.getElementsByTagName("html");null===r||void 0===r||null===(t=r[0])||void 0===t||t.setAttribute("data-theme",e)},u=function(){var e,t=document.getElementsByTagName("html");return"dark"===(null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.getAttribute("data-theme"))}},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(211),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},534:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return Ra})),r.d(n,"normalizeVisits",(function(){return Ea}));var c,a=r(0),s=r(48),i=r(163),o=r(22),l=r(147),u=r(10),d=r(3),j=r(275),b=r(41),h=r(606),O=r(611),v=r(30),f=r(6),m=r.n(f),x=r(15),g=r(19),p=r(308),y=r(212),S=r(317),C=r(51),N=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(p.a)(y.a),k=function e(t,r,n){var c=this;Object(g.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(x.a)(m.a.mark((function e(){var t,r=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.abrupt("return",c.performRequest("/short-urls","GET",t).then((function(e){return e.data.shortUrls})));case 2:case"end":return e.stop()}}),e)}))),this.createShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(p.a)((function(e){return Object(S.a)(e)||Object(y.a)(e)}),t),e.abrupt("return",c.performRequest("/short-urls","POST",{},r).then((function(e){return e.data})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getShortUrlVisits=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getTagVisits=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getOrphanVisits=function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits/orphan","GET",t).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getVisitsOverview=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits","GET").then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)}))),this.getShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"GET",{domain:r}).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.deleteShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"DELETE",{domain:r}).then((function(){})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.updateShortUrlTags=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/tags"),"PUT",{domain:r},{tags:n}).then((function(e){return e.data.tags})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.updateShortUrl=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"PATCH",{domain:r},n).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.listTags=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","GET",{withStats:"true"}).then((function(e){return e.data.tags})).then((function(e){return{tags:e.data,stats:e.stats}})));case 1:case"end":return e.stop()}}),e)}))),this.deleteTags=function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","DELETE",{tags:t}).then((function(){return{tags:t}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.editTag=function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","PUT",{},{oldName:t,newName:r}).then((function(){return{oldName:t,newName:r}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.health=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/health","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.mercureInfo=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/mercure-info","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.listDomains=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains","GET").then((function(e){return e.data.domains.data})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains/redirects","PATCH",{},t).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.performRequest=function(){var e=Object(x.a)(m.a.mark((function e(t){var r,n,a,s,i=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:"GET",n=i.length>2&&void 0!==i[2]?i[2]:{},a=i.length>3&&void 0!==i[3]?i[3]:{},e.prev=3,e.next=6,c.axios({method:r,url:"".concat(N(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:C.b});case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),s=e.t0.response,!s&&2!==c.apiVersion){e.next=15;break}throw e.t0;case 15:return c.apiVersion=c.apiVersion-1,e.next=18,c.performRequest(t,r,n,a);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),this.apiVersion=2},_={},U=function(e){return function(t){var r,n=function(e){return"function"===typeof e}(t)?(r=t,Object(O.a)("selectedServer",r())):t;if(!Object(v.b)(n))throw new Error("There's no selected server or it is not found");var c=n.url,a=n.apiKey,s="".concat(c,"_").concat(a);return _[s]||(_[s]=new k(e,c,a)),_[s]}},T=function(e){e.serviceFactory("buildShlinkApiClient",U,"axios")},R=r(276),E=r(9),D=r(11),L=r(12),V=r(543),I=r(359),F=r(1),A=r(7),M=r.n(A),G=function(e){var t=e.onChange,r=e.className,n=e.large,s=void 0===n||n,i=e.noBorder,o=void 0!==i&&i,l=e.initialValue,u=void 0===l?"":l,d=Object(F.useState)(u),j=Object(E.a)(d,2),b=j[0],h=j[1],O=function(){c&&clearTimeout(c),c=null},v=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;h(e),O(),c=setTimeout((function(){t(e),O()}),r)};return Object(a.jsxs)("div",{className:M()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:M()("form-control search-field__input",{"form-control-lg":s,"search-field__input--no-border":o}),placeholder:"Search...",value:b,onChange:function(e){return v(e.target.value)}}),Object(a.jsx)(L.a,{icon:D.H,className:"search-field__icon"}),Object(a.jsx)("div",{className:"close search-field__close",hidden:""===b,id:"search-field__close",onClick:function(){return v("",0)},children:"\xd7"})]})},P=function(e){var t=e.text,r=e.children,n=e.clearable,c=e.className,s=void 0===c?"":c,i=e.colorGenerator,o=e.onClick,l=e.onClose;return Object(a.jsxs)("span",{className:"badge tag ".concat(s),style:{backgroundColor:i.getColorForKey(t),cursor:n||!o?"auto":"pointer"},onClick:o,children:[null!==r&&void 0!==r?r:t,n&&Object(a.jsx)("span",{className:"close tag__close-selected-tag",onClick:l,children:"\xd7"})]})},B=r(561),H=r(130),W=r(558),q=r(559),z=r(25),Q=function(e){var t=e.text,r=e.disabled,n=void 0!==r&&r,c=e.className,s=void 0===c?"":c,i=e.children,o=e.dropdownClassName,l=e.right,u=void 0!==l&&l,d=e.minWidth,j=Object(z.d)(),b=Object(E.a)(j,2),h=b[0],O=b[1],v="dropdown-btn__toggle btn-block ".concat(s),f={minWidth:d&&"".concat(d,"px")};return Object(a.jsxs)(H.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(W.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(q.a,{className:"w-100",right:u,style:f,children:i})]})},K=r(91),J=r(363),Z=r(199),Y=r(306),X=r(536),$=r(560),ee=(r(535),r(360)),te=r(361),re=r(362),ne=function(e){return"string"!==typeof e},ce=function(e,t){return e&&ne(e)?t?Object(X.default)(e,t):Object($.a)(e):e},ae=function(e){return ce(e,void 0)},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return ce(t,e)}}(),ie=function(e){return ne(e)?e:Object(I.default)(e)},oe=function(e,t,r){return!t&&r?Object(ee.default)(ie(e),ie(r)):t&&!r?Object(te.default)(ie(e),ie(t)):!t||!r||Object(re.default)(ie(e),{start:ie(t),end:ie(r)})},le=function(e){return void 0===e||Object(S.a)(Object(Y.a)(Boolean,e))},ue=function(e){return"string"===typeof e},de={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180days:"Last 180 days",last365Days:"Last 365 days",all:void 0},je=Object.keys(de).filter((function(e){return"all"!==e})),be=function(e){if(e&&"all"!==e)return ue(e)?de[e]:function(e){if(e&&!le(e))return e.startDate&&!e.endDate?"Since ".concat(se(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(se(e.endDate)):"".concat(se(e.startDate)," - ").concat(se(e.endDate))}(e)},he=function(e){return Object(K.default)(Object(J.default)(new Date,e))},Oe=function(e){return{startDate:e,endDate:Object(Z.default)(new Date)}},ve=function(e){if(!e||"all"===e)return{};switch(e){case"today":return Oe(Object(K.default)(new Date));case"yesterday":return{startDate:he(1),endDate:Object(Z.default)(Object(J.default)(new Date,1))};case"last7Days":return Oe(he(7));case"last30Days":return Oe(he(30));case"last90Days":return Oe(he(90));case"last180days":return Oe(he(180));case"last365Days":return Oe(he(365))}return{}},fe=r(284),me=r.n(fe),xe=r(78),ge=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(y.a)(n),s=Object(F.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(me.a,Object(d.a)(Object(d.a)({},e),{},{dateFormat:"yyyy-MM-dd",className:M()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(L.a,{icon:xe.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},pe=function(e){var t=e.startDate,r=void 0===t?null:t,n=e.endDate,c=void 0===n?null:n,s=e.disabled,i=void 0!==s&&s,o=e.onStartDateChange,l=e.onEndDateChange;return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ge,{selected:r,placeholderText:"Since...",isClearable:!0,maxDate:null!==c&&void 0!==c?c:void 0,disabled:i,onChange:o})}),Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ge,{className:"mt-2 mt-md-0",selected:c,placeholderText:"Until...",isClearable:!0,minDate:null!==r&&void 0!==r?r:void 0,disabled:i,onChange:l})})]})},ye=function(e){var t=e.active,r=e.allText,n=e.onChange;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B.a,{active:"all"===t,onClick:function(){return n("all")},children:r}),Object(a.jsx)(B.a,{divider:!0}),je.map((function(e){return Object(a.jsx)(B.a,{active:t===e,onClick:function(){return n(e)},children:be(e)},e)}))]})},Se=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=ue(n),o=Object(F.useState)(i?n:void 0),l=Object(E.a)(o,2),u=l[0],j=l[1],b=Object(F.useState)(i?void 0:n),h=Object(E.a)(b,2),O=h[0],v=h[1],f=function(e){j(le(e)?"all":void 0),v(e),r(e)};return Object(a.jsxs)(Q,{disabled:s,text:null!==(t=be(null!==u&&void 0!==u?u:O))&&void 0!==t?t:c,children:[Object(a.jsx)(ye,{allText:c,active:u,onChange:function(e){j(e),v(void 0),r(ve(e))}}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{header:!0,children:"Custom:"}),Object(a.jsx)(B.a,{text:!0,children:Object(a.jsx)(pe,Object(d.a)(Object(d.a)({},O),{},{onStartDateChange:function(e){return f(Object(d.a)(Object(d.a)({},O),{},{startDate:e}))},onEndDateChange:function(e){return f(Object(d.a)(Object(d.a)({},O),{},{endDate:e}))}}))})]})},Ce=function(e){var t=e.history,r=e.location,n=e.match,c=Object(F.useMemo)((function(){return Object(C.a)(r.search)}),[r]);return[c,function(e){var r=Object(C.b)(Object(d.a)(Object(d.a)({},c),e)),a=Object(S.a)(r)?"":"?".concat(r);t.push("/server/".concat(null===n||void 0===n?void 0:n.params.serverId,"/list-short-urls/1").concat(a))}]},Ne=function(e){return e?Object(I.default)(e):null},we=function(e){return function(t){var r,n=Ce(t),c=Object(E.a)(n,2),s=c[0],i=s.search,o=s.tags,l=s.startDate,u=s.endDate,d=c[1],j=null!==(r=null===o||void 0===o?void 0:o.split(","))&&void 0!==r?r:[],b=Object(V.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=ae(n))&&void 0!==t?t:void 0,endDate:null!==(r=ae(c))&&void 0!==r?r:void 0}}),d),h=Object(V.a)((function(e){return Object(S.a)(e)?void 0:e}),(function(e){return d({search:e})})),O=Object(V.a)((function(e){return j.filter((function(t){return t!==e}))}),(function(e){return 0===e.length?void 0:e.join(",")}),(function(e){return d({tags:e})}));return Object(a.jsxs)("div",{className:"search-bar-container",children:[Object(a.jsx)(G,{initialValue:i,onChange:h}),Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)("div",{className:"row",children:Object(a.jsx)("div",{className:"col-lg-8 offset-lg-4 col-xl-6 offset-xl-6",children:Object(a.jsx)(Se,{defaultText:"All short URLs",initialDateRange:{startDate:Ne(l),endDate:Ne(u)},onDatesChange:b})})})}),j.length>0&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(L.a,{icon:D.N,className:"search-bar__tags-icon"}),"\xa0",j.map((function(t){return Object(a.jsx)(P,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return O(t)}},t)}))]})]})}},ke=r(26),_e=r(571),Ue=r(61),Te=r(557),Re=r(315),Ee=r(562),De=r(563),Le=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},Ve=function(e,t){var r=t.field,n=t.dir;return r&&n?e.sort((function(e,t){var c="ASC"===n?1:-1,a="ASC"===n?-1:1;return e[r]>t[r]?c:a})):e};function Ie(e){var t,r=e.items,n=e.order,c=e.onChange,s=e.isButton,i=void 0===s||s,o=e.right,l=void 0!==o&&o,u=function(e){return function(){var t=Le(e,n.field,n.dir);c(t?e:void 0,t)}};return Object(a.jsxs)(Ee.a,{children:[Object(a.jsxs)(W.a,{caret:!0,color:i?"primary":"link",className:M()({"dropdown-btn__toggle btn-block":i,"btn-sm p-0":!i}),children:[!i&&Object(a.jsx)(a.Fragment,{children:"Order by"}),i&&!n.field&&Object(a.jsx)(a.Fragment,{children:"Order by..."}),i&&n.field&&'Order by: "'.concat(r[n.field],'" - "').concat(null!==(t=n.dir)&&void 0!==t?t:"DESC",'"')]}),Object(a.jsxs)(q.a,{right:l,className:M()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(De.a)(r).map((function(e){var t=Object(E.a)(e,2),r=t[0],c=t[1];return Object(a.jsxs)(B.a,{active:n.field===r,onClick:u(r),children:[c,n.field===r&&Object(a.jsx)(L.a,{icon:"ASC"===n.dir?D.K:D.J,className:"sorting-dropdown__sort-icon"})]},r)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{disabled:!n.field,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Fe=r(285);function Ae(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(F.useEffect)((function(){var e=function(e,t,r,n){var c=e.mercureHubUrl,a=e.token,s=e.loading,i=e.error;if(!s&&!i&&c){var o=function(e){var t=e.data;return r(JSON.parse(t))},l=function(e){return 401===e.status&&n()},u=t.map((function(e){var t=new URL(c);t.searchParams.append("topic",e);var r=new Fe.EventSourcePolyfill(t,{headers:{Authorization:"Bearer ".concat(a)}});return r.onmessage=o,r.onerror=l,r}));return function(){return u.forEach((function(e){return e.close()}))}}}(i,t(n),(function(e){return o?r.add(e):c([e])}),s);if(!o)return e;var a=setInterval((function(){c(Object(ke.a)(r)),r.clear()}),1e3*o*60);return Object(V.a)((function(){return clearInterval(a)}),(function(){return null===e||void 0===e?void 0:e()}))}),[i]),Object(a.jsx)(e,Object(d.a)({},n))}}var Me=function e(){Object(g.a)(this,e)};function Ge(e){var t=e.currentOrder,r=e.field,n=e.className,c=void 0===n?"ml-1":n;return t.dir&&t.field===r?Object(a.jsx)(L.a,{icon:"ASC"===t.dir?D.f:D.e,className:c}):null}Me.visits="https://shlink.io/new-visit",Me.orphanVisits="https://shlink.io/new-orphan-visit",Me.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Pe,Be,He,We,qe,ze,Qe,Ke,Je,Ze,Ye,Xe,$e,et,tt,rt,nt,ct,at,st=function(e,t){return function(r,n){var c=n.type,a=e[c],s=null!==r&&void 0!==r?r:t;return a?a(s,n):s}},it=function(e){return function(){return{type:e}}},ot=r(564),lt=r(565),ut=r(286),dt=r(566),jt=function(e,t,r){return Object(y.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},bt="shlink/visitCreation/CREATE_VISITS",ht=function(e){return{type:bt,createdVisits:e}},Ot=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},vt=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},ft="shlink/deleteShortUrl/DELETE_SHORT_URL_START",mt="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",xt="shlink/deleteShortUrl/SHORT_URL_DELETED",gt="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",pt={shortCode:"",loading:!1,error:!1},yt=st((Pe={},Object(u.a)(Pe,ft,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Pe,mt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Pe,xt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Pe,gt,(function(){return pt})),Pe),pt),St=function(e){return function(t,r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:ft}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:xt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:mt,errorData:Ot(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},Ct=it(gt),Nt="shlink/createShortUrl/CREATE_SHORT_URL_START",wt="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",kt="shlink/createShortUrl/CREATE_SHORT_URL",_t="shlink/createShortUrl/RESET_CREATE_SHORT_URL",Ut={result:null,saving:!1,error:!1},Tt=st((Be={},Object(u.a)(Be,Nt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Be,wt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Be,kt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Be,_t,(function(){return Ut})),Be),Ut),Rt=function(e){return function(t){return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Nt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:kt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:wt,errorData:Ot(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Et=it(_t),Dt=r(42),Lt="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Vt="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",It="shlink/shortUrlEdition/SHORT_URL_EDITED",Ft=st((He={},Object(u.a)(He,Lt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(He,Vt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(He,It,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),He),{saving:!1,error:!1}),At=function(e){return function(t,r,n){return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,d,j,b,h,O;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return a({type:Lt}),i=s(),o=i.selectedServer,l=!Object(Dt.j)(o),u=e(s),d=u.updateShortUrl,j=u.updateShortUrlTags,c.prev=4,c.next=7,Promise.all([d(t,r,n),l&&n.tags?j(t,r,n.tags):void 0]);case 7:b=c.sent,h=Object(E.a)(b,1),O=h[0],a({shortUrl:O,type:It}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Vt,errorData:Ot(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},Mt="shlink/shortUrlsList/LIST_SHORT_URLS_START",Gt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Pt="shlink/shortUrlsList/LIST_SHORT_URLS",Bt=st((We={},Object(u.a)(We,Mt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(We,Gt,(function(){return{loading:!1,error:!0}})),Object(u.a)(We,Pt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(We,xt,Object(V.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(ot.a)(["shortUrls","data"],Object(p.a)((function(e){return jt(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(ot.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(We,bt,(function(e,t){var r,n,c=t.createdVisits;return Object(ot.a)(["shortUrls","data"],null===(r=e.shortUrls)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.map((function(e){var t=Object(lt.a)(c.filter((function(t){var r=t.shortUrl;return r&&jt(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(ut.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(We,kt,Object(V.a)((function(e,t){var r=t.result;return e.shortUrls?Object(ot.a)(["shortUrls","data"],[r].concat(Object(ke.a)(Object(dt.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(ot.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(We,It,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(ot.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return jt(e,t,n)?r:e})),e):e})),We),{loading:!0,error:!1}),Ht=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Mt}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Pt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Gt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Wt="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",qt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},zt={page:"1",orderBy:{dateCreated:"DESC"}},Qt=st((qe={},Object(u.a)(qe,Pt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(qe,Wt,(function(){return zt})),qe),zt),Kt=it(Wt),Jt=r(568),Zt=r(569),Yt=r(570),Xt=r(544),$t=r(287),er=r(567),tr=Math.ceil,rr=new Intl.NumberFormat("en-US"),nr=function(e){return rr.format(Number(e))},cr="...",ar=function(e,t){var r=Object(Xt.a)(Object($t.a)(2,e-2),Object(er.a)(t-1,e+2)+1);return e-2>2&&r.unshift(cr),e+2=d,children:Object(a.jsx)(Zt.a,{next:!0,tag:o.b,to:j(l+1)})})]})},ur=function(e,t){return Ae((function(r){var n,c=r.listShortUrls,s=r.resetShortUrlParams,i=r.shortUrlsListParams,o=r.match,l=r.location,j=r.history,b=r.shortUrlsList,h=r.selectedServer,O=Object(v.a)(h),f=i.orderBy,m=Object(F.useState)({field:f&&Object(_e.a)(Object(Ue.a)(f)),dir:f&&Object(_e.a)(Object(Te.a)(f))}),x=Object(E.a)(m,2),g=x[0],p=x[1],y=Ce({history:j,match:o,location:l}),S=Object(E.a)(y,2),C=S[0],N=C.tags,w=C.search,k=C.startDate,_=C.endDate,U=S[1],T=Object(F.useMemo)((function(){var e;return null!==(e=null===N||void 0===N?void 0:N.split(","))&&void 0!==e?e:[]}),[N]),R=(null!==(n=null===b||void 0===b?void 0:b.shortUrls)&&void 0!==n?n:{}).pagination,D=function(e){return c(Object(d.a)(Object(d.a)({},i),e))},L=function(e,t){p({field:e,dir:t}),D({orderBy:e?Object(u.a)({},e,t):void 0})},I=Object(V.a)((function(e){return Object(ke.a)(new Set([].concat(Object(ke.a)(T),[e]))).join(",")}),(function(e){return U({tags:e})}));return Object(F.useEffect)((function(){return s}),[]),Object(F.useEffect)((function(){D({page:o.params.page,searchTerm:w,tags:T,itemsPerPage:void 0,startDate:k,endDate:_})}),[o.params.page,w,T,k,_]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"mb-3",children:Object(a.jsx)(t,{})}),Object(a.jsx)("div",{className:"d-block d-lg-none mb-3",children:Object(a.jsx)(Ie,{items:qt,order:g,onChange:L})}),Object(a.jsxs)(Re.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{selectedServer:h,shortUrlsList:b,orderByColumn:function(e){return function(){return L(e,Le(e,g.field,g.dir))}},renderOrderIcon:function(e){return Object(a.jsx)(Ge,{currentOrder:g,field:e})},onTagClick:I}),Object(a.jsx)(lr,{paginator:R,serverId:O,currentQueryString:l.search})]})]})}),(function(){return[Me.visits]}))},dr=r(52),jr=r(159),br=r.n(jr),hr=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(br.a,{text:t,onCopy:r,children:Object(a.jsx)(L.a,{icon:xe.c,className:"ml-2 copy-to-clipboard-icon"})})},Or=r(572),vr=r(613),fr=function(e){var t=e.date,r=e.format,n=void 0===r?"yyyy-MM-dd HH:mm":r,c=e.relative,s=void 0!==c&&c,i=ne(t)?t:Object(I.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(Or.a)(i),"000"),children:s?"".concat(Object(vr.a)(new Date,i)," ago"):Object(X.default)(i,n)})},mr=r(573),xr=r(43),gr=function(e,t,r){var n=e.id,c=t.shortCode,a=t.domain,s=a?"?domain=".concat(a):"";return"/server/".concat(n,"/short-code/").concat(c,"/").concat(r).concat(s)},pr=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(xr.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.e)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:gr(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},yr=function(e){var t,r=e.visitsCount,n=e.shortUrl,c=e.selectedServer,s=e.active,i=void 0!==s&&s,o=null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.maxVisits,l=Object(a.jsx)(pr,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:M()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:nr(r)})});if(!o)return l;var u=nr(o),d=Object(F.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:"indivisible",children:[l,Object(a.jsxs)("small",{className:"short-urls-visits-count__max-visits-control",ref:function(e){d.current=e},children:[" ","/ ",u," ",Object(a.jsx)("sup",{children:Object(a.jsx)(L.a,{icon:D.u})})]})]}),Object(a.jsxs)(mr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},Sr=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(F.useRef)(!0);return Object(F.useEffect)((function(){m.current?m.current=!1:f()}),[i.visitsCount]),Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:Object(a.jsx)(fr,{date:i.dateCreated})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:Object(a.jsxs)("span",{className:"indivisible short-urls-row__cell--relative",children:[Object(a.jsx)(dr.a,{href:i.shortUrl}),Object(a.jsx)(hr,{text:i.shortUrl,onCopy:b}),Object(a.jsx)("span",{className:"badge badge-warning short-urls-row__copy-hint",hidden:!j,children:"Copied short URL!"})]})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":"".concat(i.title?"Title":"Long URL"),children:Object(a.jsx)(dr.a,{href:i.longUrl,children:null!==(c=i.title)&&void 0!==c?c:i.longUrl})}),i.title&&Object(a.jsx)("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:Object(a.jsx)(dr.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(S.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(P,{colorGenerator:t,text:e,onClick:function(){return null===l||void 0===l?void 0:l(e)}},e)})))}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(yr,{visitsCount:i.visitsCount,shortUrl:i,selectedServer:o,active:v})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell",children:Object(a.jsx)(e,{selectedServer:o,shortUrl:i})})]})}},Cr=r(574),Nr=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(Cr.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(W.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(L.a,{icon:D.n}),"\xa0"]}),Object(a.jsx)(q.a,{right:s,children:n})]})},wr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(z.d)(),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(z.d)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(z.d)(),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(Nr,{toggle:l,isOpen:o,children:[Object(a.jsxs)(B.a,{tag:pr,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(L.a,{icon:D.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(B.a,{tag:pr,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(L.a,{icon:D.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(B.a,{onClick:b,children:[Object(a.jsx)(L.a,{icon:D.F,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsxs)(B.a,{className:"dropdown-item--danger",onClick:f,children:[Object(a.jsx)(L.a,{icon:D.y,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},kr=function(e,t){return function(r){var n=r.createShortUrl,c=r.shortUrlCreationResult,s=r.resetCreateShortUrl,i=r.selectedServer,o=r.basicMode,l=void 0!==o&&o,u=r.settings.shortUrlCreation,j=Object(F.useMemo)((function(){return function(e){var t,r;return{longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:null!==(t=null===e||void 0===e?void 0:e.validateUrls)&&void 0!==t&&t,forwardQuery:null===(r=null===e||void 0===e?void 0:e.forwardQuery)||void 0===r||r}}(u)}),[u]);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(e,{initialState:j,saving:c.saving,selectedServer:i,mode:l?"create-basic":"create",onSave:function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(),e.abrupt("return",n(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),Object(a.jsx)(t,Object(d.a)(Object(d.a)({},c),{},{resetCreateShortUrl:s,canBeClosed:l}))]})}},_r=r(615),Ur=r(575),Tr=r(576),Rr=r(577),Er=r(545),Dr=r(31),Lr=r(539),Vr=r(32),Ir=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(Lr.a,{className:n,children:Object(a.jsx)("div",{className:M()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(Vr.a,{className:M()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:M()({"p-2":s}),children:t})})})},Fr=function(e){var t,r,n=e.errorData,c=e.fallbackMessage;return Object(a.jsxs)(a.Fragment,{children:[null!==(t=null===n||void 0===n?void 0:n.detail)&&void 0!==t?t:c,(r=n,"INVALID_ARGUMENT"===(null===r||void 0===r?void 0:r.type)&&Object(a.jsxs)("p",{className:"mb-0",children:["Invalid elements: [",n.invalidElements.join(", "),"]"]}))]})},Ar=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(F.useState)(""),l=Object(E.a)(o,2),u=l[0],d=l[1];Object(F.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(V.a)(s,r),O=Object(Dr.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Er.a)}));return Object(a.jsx)(_r.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(Ur.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("p",{children:[Object(a.jsx)("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),Object(a.jsx)("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),Object(a.jsxs)("p",{children:["Write ",Object(a.jsx)("b",{children:t.shortCode})," to confirm deletion."]}),Object(a.jsx)("input",{type:"text",className:"form-control",placeholder:"Insert the short code (".concat(t.shortCode,")"),value:u,onChange:function(e){return d(e.target.value)}}),j&&Object(a.jsx)(Ir,{type:vt(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(Fr,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-link",onClick:h,children:"Cancel"}),Object(a.jsx)("button",{type:"submit",className:"btn btn-danger",disabled:u!==t.shortCode||c.loading,children:c.loading?"Deleting...":"Delete"})]})]})})},Mr=r(219),Gr=function(e){return function(t){var r=t.error,n=t.errorData,c=t.result,s=t.resetCreateShortUrl,i=t.canBeClosed,o=void 0!==i&&i,l=e(),u=Object(E.a)(l,2),d=u[0],j=u[1];if(Object(F.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(Ir,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(L.a,{icon:D.P,className:"float-right pointer",onClick:s}),Object(a.jsx)(Fr,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(y.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(Ir,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(L.a,{icon:D.P,className:"float-right pointer",onClick:s}),Object(a.jsx)("b",{children:"Great!"})," The short URL is ",Object(a.jsx)("b",{children:b}),Object(a.jsx)(br.a,{text:b,onCopy:j,children:Object(a.jsxs)("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[Object(a.jsx)(L.a,{icon:xe.c})," Copy"]})}),Object(a.jsx)(Mr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},Pr=function(e){return function(t){var r=t.orderByColumn,n=t.renderOrderIcon,c=t.shortUrlsList,s=t.onTagClick,i=t.selectedServer,o=t.className,l=c.error,u=c.loading,d=c.shortUrls,j=M()({"short-urls-table__header-cell--with-action":!!r}),b=M()("short-urls-table__header-cell",j),h=M()("table table-hover",o),O=Object(Dt.i)(i);return Object(a.jsxs)("table",{className:h,children:[Object(a.jsx)("thead",{className:"responsive-table__header short-urls-table__header",children:Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("dateCreated"),children:["Created at ",null===n||void 0===n?void 0:n("dateCreated")]}),Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("shortCode"),children:["Short URL ",null===n||void 0===n?void 0:n("shortCode")]}),!O&&Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("longUrl"),children:["Long URL ",null===n||void 0===n?void 0:n("longUrl")]})||Object(a.jsxs)("th",{className:"short-urls-table__header-cell",children:[Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("title"),children:["Title ",null===n||void 0===n?void 0:n("title")]}),"\xa0\xa0/\xa0\xa0",Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("longUrl"),children:[Object(a.jsx)("span",{className:"indivisible",children:"Long URL"})," ",null===n||void 0===n?void 0:n("longUrl")]})]}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"Tags"}),Object(a.jsx)("th",{className:b,onClick:null===r||void 0===r?void 0:r("visits"),children:Object(a.jsxs)("span",{className:"indivisible",children:["Visits ",null===n||void 0===n?void 0:n("visits")]})}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"\xa0"})]})}),Object(a.jsx)("tbody",{children:l?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):u?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!u&&Object(S.a)(null===d||void 0===d?void 0:d.data)?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"No results found"})}):null===d||void 0===d?void 0:d.data.map((function(t){return Object(a.jsx)(e,{shortUrl:t,selectedServer:i,onTagClick:s},t.shortUrl)}))})]})}},Br=r(578),Hr=r(216),Wr=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(Q,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(B.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(B.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},qr=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(Q,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(B.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(B.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(B.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(B.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},zr=function(e,t){return function(r){var n=r.shortUrl,c=n.shortUrl,s=n.shortCode,i=r.toggle,o=r.isOpen,l=r.selectedServer,u=Object(F.useState)(300),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(F.useState)(0),O=Object(E.a)(h,2),v=O[0],f=O[1],g=Object(F.useState)("png"),p=Object(E.a)(g,2),y=p[0],N=p[1],w=Object(F.useState)("L"),k=Object(E.a)(w,2),_=k[0],U=k[1],T=Object(F.useMemo)((function(){return{useSizeInPath:!Object(Dt.g)(l),marginIsSupported:Object(Dt.f)(l),errorCorrectionIsSupported:Object(Dt.h)(l)}}),[l]),R=T.marginIsSupported!==T.errorCorrectionIsSupported,V=Object(F.useMemo)((function(){return function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.marginIsSupported,l=r.errorCorrectionIsSupported,u="".concat(e,"/qr-code").concat(i?"/".concat(n):""),d=Object(C.b)({size:i?void 0:n,format:c,margin:o&&a>0?a:void 0,errorCorrection:l?s:void 0});return"".concat(u).concat(Object(S.a)(d)?"":"?".concat(d))}(c,{size:j,format:y,margin:v,errorCorrection:_},T)}),[c,j,y,v,_,T]),I=Object(F.useMemo)((function(){return j+v}),[j,v]),A=Object(F.useMemo)((function(){if(!(I<500))return I<800?"lg":"xl"}),[I]);return Object(a.jsxs)(_r.a,{isOpen:o,toggle:i,centered:!0,size:A,children:[Object(a.jsxs)(Ur.a,{toggle:i,children:["QR code for ",Object(a.jsx)(dr.a,{href:c,children:c})]}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsxs)(Br.a,{className:M()({"col-md-4":R,"col-md-6":!R}),children:[Object(a.jsxs)("label",{className:"mb-0",children:["Size: ",j,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:j,step:10,min:50,max:1e3,onChange:function(e){return b(Number(e.target.value))}})]}),T.marginIsSupported&&Object(a.jsxs)(Br.a,{className:R?"col-md-4":"col-md-6",children:[Object(a.jsxs)("label",{className:"mb-0",children:["Margin: ",v,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:v,step:1,min:0,max:100,onChange:function(e){return f(Number(e.target.value))}})]}),Object(a.jsx)(Br.a,{className:R?"col-md-4":"col-md-6",children:Object(a.jsx)(Wr,{format:y,setFormat:N})}),T.errorCorrectionIsSupported&&Object(a.jsx)(Br.a,{className:"col-md-6",children:Object(a.jsx)(qr,{errorCorrection:_,setErrorCorrection:U})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(dr.a,{href:V}),Object(a.jsx)(hr,{text:V})]}),Object(a.jsx)("img",{src:V,className:"qr-code-modal__img",alt:"QR code"}),Object(a.jsx)(t,{minVersion:"2.9.0",children:Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Hr.a,{block:!0,color:"primary",onClick:Object(x.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.saveImage(V,"".concat(s,"-qr-code.").concat(y)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(L.a,{icon:D.q,className:"ml-1"})]})})})]})]})]})}},Qr=r(583),Kr=r(579),Jr=r(580),Zr=r(581),Yr=r(582),Xr=r(610),$r=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?Er.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(F.useRef)(Object(Xr.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:M()("custom-control",j,s),style:b,children:[Object(a.jsx)("input",{type:"checkbox",className:"custom-control-input",id:d,checked:r,onChange:function(e){return c(e.target.checked,e)}}),Object(a.jsx)("label",{className:"custom-control-label",htmlFor:d,children:i})]})},en=function(e){return Object(a.jsx)($r,Object(d.a)({type:"checkbox"},e))},tn=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(_r.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(Ur.a,{toggle:r,children:"Info"}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("p",{children:["When the\xa0",Object(a.jsx)("b",{children:Object(a.jsx)("i",{children:'"Use existing URL if found"'})}),"\xa0checkbox is checked, the server will return an existing short URL if it matches provided params."]}),Object(a.jsx)("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),Object(a.jsxs)("ul",{children:[Object(a.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."}),Object(a.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.",Object(a.jsx)("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),Object(a.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"})]})]})]})},rn=function(){var e=Object(z.d)(),t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{title:"What does this mean?",children:Object(a.jsx)(L.a,{icon:D.u,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(tn,{isOpen:r,toggle:n})]})},nn=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(F.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(L.a,{icon:D.u})}),Object(a.jsx)(mr.a,{target:function(){return s.current},placement:n,children:c})]})},cn=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(en,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(nn,{placement:"right",children:r})]})},an=Object(V.a)(Kr.a,Object(Jr.a)(/ /g,"-")),sn=function(e){return"string"===typeof e?Object(I.default)(e):e},on=function(e){return{"col-sm-6":e,"col-sm-12":!e}},ln=function(e,t){return function(r){var n,c=r.mode,s=r.saving,i=r.onSave,o=r.initialState,l=r.selectedServer,j=Object(F.useState)(o),b=Object(E.a)(j,2),h=b[0],O=b[1],v="edit"===c,f=Object(Dr.c)(o.title),g=function(){var e=Object(Dr.c)(h.title);return Object(Zr.a)([[function(){return!e&&!f},function(){}],[function(){return!e&&f},function(){return null}],[Yr.a,function(){return h.title}]])()},p=Object(Dr.b)(Object(x.a)(m.a.mark((function e(){var t,r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},h),{},{validSince:null!==(t=ae(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=ae(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Dr.c)(h.maxVisits)?Number(h.maxVisits):null,title:g()})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(F.useEffect)((function(){O(o)}),[o]);var y=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.jsx)(Br.a,{children:Object(a.jsx)(Qr.a,Object(d.a)({id:e,type:n,placeholder:t,value:null!==(r=h[e])&&void 0!==r?r:"",onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t.target.value)))}},c))})},C=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(a.jsx)("div",{className:"form-group",children:Object(a.jsx)(ge,Object(d.a)({selected:h[e]?sn(h[e]):null,placeholderText:t,isClearable:!0,onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t)))}},r))})},N=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Br.a,{children:Object(a.jsx)(Qr.a,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:h.longUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{longUrl:e.target.value}))}})}),Object(a.jsx)(Br.a,{children:Object(a.jsx)(e,{selectedTags:null!==(n=h.tags)&&void 0!==n?n:[],onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{tags:e.map(an)}))}})})]}),w=Object(Dt.i)(l),k=w||!v,_=M()("mb-3",on(k)),U=Object(Dt.b)(l),T=Object(Dt.d)(l),R=U||T,D=M()("mb-3",on(R));return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:p,children:["create-basic"===c&&N,"create-basic"!==c&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Vr.a,{title:"Basic options",className:"mb-3",children:N}),Object(a.jsxs)(Lr.a,{children:[k&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Vr.a,{title:"Customize the short URL",children:[w&&y("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:y("customSlug","Custom slug","text",{disabled:Object(Dr.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:y("shortCodeLength","Short code length","number",{min:4,disabled:Object(Dr.c)(h.customSlug)})})]}),Object(a.jsx)(Br.a,{children:Object(a.jsx)(t,{value:h.domain,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{domain:e}))}})})]})]})}),Object(a.jsx)("div",{className:_,children:Object(a.jsxs)(Vr.a,{title:"Limit access to the short URL",children:[y("maxVisits","Maximum number of visits allowed","number",{min:1}),C("validSince","Enabled since...",{maxDate:h.validUntil?sn(h.validUntil):void 0}),C("validUntil","Enabled until...",{minDate:h.validSince?sn(h.validSince):void 0})]})})]}),Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)("div",{className:D,children:Object(a.jsxs)(Vr.a,{title:"Extra checks",children:[Object(a.jsx)(cn,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:h.validateUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{validateUrl:e}))},children:"Validate URL"}),!v&&Object(a.jsxs)("p",{children:[Object(a.jsx)(en,{inline:!0,className:"mr-2",checked:h.findIfExists,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{findIfExists:e}))},children:"Use existing URL if found"}),Object(a.jsx)(rn,{})]})]})}),R&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Vr.a,{title:"Configure behavior",children:[U&&Object(a.jsx)(cn,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:h.crawlable,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{crawlable:e}))},children:"Make it crawlable"}),T&&Object(a.jsx)(cn,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:h.forwardQuery,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{forwardQuery:e}))},children:"Forward query params on redirect"})]})})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Hr.a,{outline:!0,color:"primary",disabled:s||Object(S.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},un=r(54),dn=function(e){return function(t){var r,n=t.history.goBack,c=t.match.params,s=t.location.search,i=t.settings.shortUrlCreation,o=t.selectedServer,l=t.shortUrlDetail,u=t.getShortUrlDetail,d=t.shortUrlEdition,j=t.editShortUrl,b=l.loading,h=l.error,O=l.errorData,v=l.shortUrl,f=d.saving,g=d.error,p=d.errorData,y=Object(C.a)(s).domain,S=Object(F.useMemo)((function(){return function(e,t){var r,n,c,a,s,i,o=null!==(r=null===t||void 0===t?void 0:t.validateUrls)&&void 0!==r&&r;return e?{longUrl:e.longUrl,tags:e.tags,title:null!==(n=e.title)&&void 0!==n?n:void 0,domain:null!==(c=e.domain)&&void 0!==c?c:void 0,validSince:null!==(a=e.meta.validSince)&&void 0!==a?a:void 0,validUntil:null!==(s=e.meta.validUntil)&&void 0!==s?s:void 0,maxVisits:null!==(i=e.meta.maxVisits)&&void 0!==i?i:void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,validateUrl:o}:{longUrl:"",validateUrl:o}}(v,i)}),[v,i]),N=Object(z.d)(),w=Object(E.a)(N,4),k=w[0],_=w[2],U=w[3];return Object(F.useEffect)((function(){u(c.shortCode,y)}),[]),b?Object(a.jsx)(un.a,{loading:!0}):h?Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:O,fallbackMessage:"An error occurred while loading short URL detail :("})}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("header",{className:"mb-3",children:Object(a.jsx)(Re.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Hr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(L.a,{icon:D.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(dr.a,{href:null!==(r=null===v||void 0===v?void 0:v.shortUrl)&&void 0!==r?r:""})]})}),Object(a.jsx)("span",{})]})})}),Object(a.jsx)(e,{initialState:S,saving:f,selectedServer:o,mode:"edit",onSave:function(){var e=Object(x.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=2;break}return e.abrupt("return");case 2:U(),j(v.shortCode,v.domain,t).then(_).catch(U);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),g&&Object(a.jsx)(Ir,{type:"error",className:"mt-3",children:Object(a.jsx)(Fr,{errorData:p,fallbackMessage:"An error occurred while updating short URL :("})}),k&&Object(a.jsx)(Ir,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},jn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",bn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",hn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",On={loading:!1,error:!1},vn=st((ze={},Object(u.a)(ze,jn,(function(){return{loading:!0,error:!1}})),Object(u.a)(ze,bn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(ze,hn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},On)})),ze),On),fn=function(e){return function(t,r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c({type:jn}),n.prev=1,o=a(),l=o.shortUrlsList,null===(s=null===l||void 0===l||null===(i=l.shortUrls)||void 0===i?void 0:i.data.find((function(e){return jt(e,t,r)})))||void 0===s){n.next=7;break}n.t0=s,n.next=10;break;case 7:return n.next=9,e(a).getShortUrl(t,r);case 9:n.t0=n.sent;case 10:u=n.t0,c({shortUrl:u,type:hn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:bn,errorData:Ot(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},mn=function(e,t,r){e.serviceFactory("ShortUrlsList",ur,"ShortUrlsTable","SearchBar"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo","shortUrlsList"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Pr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",Sr,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",wr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Gr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",ln,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",kr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",dn,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return Ar})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",zr,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",we,"ColorGenerator"),e.decorator("SearchBar",r),e.serviceFactory("listShortUrls",Ht,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return Kt})),e.serviceFactory("createShortUrl",Rt,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return Et})),e.serviceFactory("deleteShortUrl",St,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return Ct})),e.serviceFactory("getShortUrlDetail",fn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",At,"buildShlinkApiClient")},xn=r(288),gn=r.n(xn),pn=r(60),yn=function(e){var t=e.children,r=e.value,n=e.onChange,c=e.id,s=e.type,i=e.required,o=e.placeholder,l=e.className,u=e.labelClassName,d=Object(F.useRef)(null!==c&&void 0!==c?c:Object(Xr.a)());return Object(a.jsxs)(Br.a,{className:null!==l&&void 0!==l?l:"",children:[Object(a.jsxs)("label",{htmlFor:d.current,className:null!==u&&void 0!==u?u:"",children:[t,":"]}),Object(a.jsx)("input",{className:"form-control",type:null!==s&&void 0!==s?s:"text",id:d.current,value:r,required:null===i||void 0===i||i,placeholder:o,onChange:function(e){return n(e.target.value)}})]})},Sn=function(e){return Object(a.jsx)(yn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},Cn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(F.useState)(""),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(F.useState)(""),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(F.useState)(""),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(Dr.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(F.useEffect)((function(){r&&l(r.name),r&&b(r.url),r&&f(r.apiKey)}),[r]),Object(a.jsxs)("form",{className:"server-form",onSubmit:m,children:[Object(a.jsxs)(Vr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(Sn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(Sn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(Sn,{value:v,onChange:f,children:"API key"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},Nn=function(e){var t=e.type;return Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Ir,{type:t,children:["success"===t&&"Servers properly imported. You can now select one from the list :)","error"===t&&"The servers could not be imported. Make sure the format is correct."]})})},wn=function(e,t){return function(r){var n=r.servers,c=r.createServer,s=r.history,i=s.push,o=s.goBack,l=!!Object.keys(n).length,u=t(!1,4e3),j=Object(E.a)(u,2),b=j[0],h=j[1],O=t(!1,4e3),v=Object(E.a)(O,2),f=v[0],m=v[1];return Object(a.jsxs)(pn.a,{children:[Object(a.jsxs)(Cn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(Xr.a)();c(Object(d.a)(Object(d.a)({},e),{},{id:t})),i("/server/".concat(t))},children:[!l&&Object(a.jsx)(e,{tooltipPlacement:"top",onImport:h,onImportError:m}),l&&Object(a.jsx)(Hr.a,{outline:!0,onClick:o,children:"Cancel"}),Object(a.jsx)(Hr.a,{outline:!0,color:"primary",className:"ml-2",children:"Create server"})]}),b&&Object(a.jsx)(Nn,{type:"success"}),f&&Object(a.jsx)(Nn,{type:"error"})]})}},kn=function(e){var t=e.servers,r=e.selectedServer,n=Object(Te.a)(t);return Object(a.jsxs)(Ee.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(W.a,{nav:!0,caret:!0,children:[Object(a.jsx)(L.a,{icon:D.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(q.a,{right:!0,children:Object(S.a)(n)?Object(a.jsxs)(B.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(L.a,{icon:D.E})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]}):Object(a.jsxs)(a.Fragment,{children:[n.map((function(e){var t=e.name,n=e.id;return Object(a.jsx)(B.a,{tag:o.b,to:"/server/".concat(n),active:Object(v.a)(r)===n,children:t},n)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsxs)(B.a,{tag:o.b,to:"/manage-servers",children:[Object(a.jsx)(L.a,{icon:D.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Manage servers"})]})]})})]})},_n=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history,i=e.redirectHome,o=void 0===i||i;return Object(a.jsxs)(_r.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(Ur.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("p",{children:["Are you sure you want to remove ",Object(a.jsx)("b",{children:t?t.name:""}),"?"]}),Object(a.jsx)("p",{children:Object(a.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."})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",onClick:function(){return c(t),r(),void(o&&s.push("/"))},children:"Delete"})]})]})},Un=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(z.d)(),o=Object(E.a)(i,4),l=o[0],u=o[2],d=o[3];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:n,onClick:u,children:[!c&&Object(a.jsx)(L.a,{fixedWidth:!0,icon:D.y}),Object(a.jsx)("span",{className:s,children:null!==c&&void 0!==c?c:"Remove this server"})]}),Object(a.jsx)(e,{server:r,isOpen:l,toggle:d})]})}},Tn=r(151),Rn=function(e){return Object(Tn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history.goBack;if(!Object(v.e)(r))return null;return Object(a.jsx)(pn.a,{children:Object(a.jsxs)(Cn,{title:Object(a.jsxs)("h5",{className:"mb-0",children:['Edit "',r.name,'"']}),initialValues:r,onSubmit:function(e){t(r.id,e),n()},children:[Object(a.jsx)(Hr.a,{outline:!0,className:"mr-2",onClick:n,children:"Cancel"}),Object(a.jsx)(Hr.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},En=function(e){var t=e.importServersFromFile;return function(e){var r=e.createServers,n=e.fileRef,c=e.children,s=e.onImport,i=void 0===s?function(){}:s,o=e.onImportError,l=void 0===o?function(){}:o,u=e.tooltipPlacement,d=void 0===u?"bottom":u,j=e.className,b=void 0===j?"":j,h=null!==n&&void 0!==n?n:Object(F.useRef)(),O=function(){var e=Object(x.a)(m.a.mark((function e(n){var c,a;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.target,e.abrupt("return",t(null===(c=a.files)||void 0===c?void 0:c[0]).then(Object(V.a)(r,i)).then((function(){a.value=null})).catch(l));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Hr.a,{outline:!0,id:"importBtn",className:b,onClick:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.click()},children:[Object(a.jsx)(L.a,{icon:D.r,fixedWidth:!0})," ",null!==c&&void 0!==c?c:"Import from file"]}),Object(a.jsxs)(mr.a,{placement:d,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",Object(a.jsx)("b",{children:"name"}),", ",Object(a.jsx)("b",{children:"apiKey"})," and ",Object(a.jsx)("b",{children:"url"}),"."]}),Object(a.jsx)("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:h,onChange:O})]})}},Dn=r(540),Ln=r(70),Vn="shlink/selectedServer/SELECT_SERVER",In="shlink/selectedServer/RESET_SELECTED_SERVER",Fn=Object(V.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Ln.c)("1.0.0")),An=Object(Dn.a)(Er.a,function(){var e=Object(x.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r().then((function(e){var t=e.version;return{version:Fn(t),printableVersion:Object(Ln.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Mn=st((Qe={},Object(u.a)(Qe,In,(function(){return null})),Object(u.a)(Qe,Vn,(function(e,t){return t.selectedServer})),Qe),null),Gn=it(In),Pn=function(e,t){return function(r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j,b,h;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c(Gn()),c(Kt()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:Vn,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 7:return n.prev=7,l=e(o),u=l.health,n.next=11,An(r,u);case 11:j=n.sent,b=j.version,h=j.printableVersion,c({type:Vn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{version:b,printableVersion:h})}),c(t()),n.next=21;break;case 18:n.prev=18,n.t0=n.catch(7),c({type:Vn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{serverNotReachable:!0})});case 21:case"end":return n.stop()}}),n,null,[[7,18]])})));return function(e,t){return n.apply(this,arguments)}}()}},Bn=r(584),Hn=r(585),Wn=r(152),qn=r(313),zn="shlink/servers/EDIT_SERVER",Qn="shlink/servers/DELETE_SERVER",Kn="shlink/servers/CREATE_SERVERS",Jn="shlink/servers/SET_AUTO_CONNECT",Zn=st((Ke={},Object(u.a)(Ke,Kn,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ke,Qn,(function(e,t){var r=t.serverId;return Object(Bn.a)(r,e)})),Object(u.a)(Ke,zn,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(ut.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Object(u.a)(Ke,Jn,(function(e,t){var r=t.serverId,n=t.autoConnect;return e[r]?n?Object(Hn.a)(Object(De.a)(e).map((function(e){var t=Object(E.a)(e,2),n=t[0],c=t[1];return[n,Object(d.a)(Object(d.a)({},c),{},{autoConnect:n===r})]}))):Object(ut.a)(r,Object(d.a)(Object(d.a)({},e[r]),{},{autoConnect:n}),e):e})),Ke),{}),Yn=Object(Wn.a)((function(e,t){return Object(ut.a)(t.id,t,e)}),{}),Xn=Object(V.a)(Object(qn.a)((function(e){return e.id?e:Object(ut.a)("id",Object(Xr.a)(),e)})),Yn,(function(e){return{type:Kn,newServers:e}})),$n=function(e){return Xn([e])},ec=function(e,t){return{type:zn,serverId:e,serverData:t}},tc=function(e){var t=e.id;return{type:Qn,serverId:t}},rc=function(e,t){var r=e.id;return{type:Jn,serverId:r,autoConnect:t}},nc=Object(V.a)(Object(O.a)("data"),(function(e){return Array.isArray(e)?e.filter(v.b):[]})),cc=function(e){var t=e.get;return function(){return function(){var e=Object(x.a)(m.a.mark((function e(r){var n,c;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("".concat(l.a,"/servers.json"));case 2:n=e.sent,c=nc(n),r(Xn(c));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},ac=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.d)(n))return null;var s=n.version;return Object(Ln.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},sc=r(165),ic=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(pn.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(un.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.e)(n)&&"Could not find this Shlink server.",Object(v.e)(n)&&Object(a.jsxs)(a.Fragment,{children:[Object(a.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."]})]}),Object(a.jsxs)(sc.a,{servers:Object.values(r),children:["These are the Shlink servers currently configured. Choose one of them or ",Object(a.jsx)(o.b,{to:"/server/create",children:"add a new one"}),"."]}),Object(v.e)(n)&&Object(a.jsx)("div",{className:"container mt-3 mt-md-5",children:Object(a.jsxs)("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",Object(a.jsx)(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or\xa0",Object(a.jsx)(o.b,{to:"/server/".concat(n.id,"/edit"),children:"edit it"}),"."]})})]})})}},oc=r(103),lc=r(586),uc=r(587),dc=r(541),jc=r(542),bc=function(e,t,r){return Ae((function(n){var c,s=n.shortUrlsList,i=n.listShortUrls,l=n.listTags,u=n.tagsList,d=n.selectedServer,j=n.loadVisitsOverview,h=n.visitsOverview,O=s.loading,f=s.shortUrls,m=u.loading,x=h.loading,g=h.visitsCount,p=h.orphanVisitsCount,y=Object(v.a)(d),S=Object(b.g)();return Object(F.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(uc.a,{tag:"h2",children:x?"Loading...":nr(g)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/orphan-visits"),children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(uc.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:x?"Loading...":nr(null!==p&&void 0!==p?p:0)}),Object(a.jsx)(r,{maxVersion:"2.5.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.6 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/list-short-urls/1"),children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(uc.a,{tag:"h2",children:O?"Loading...":nr(null!==(c=null===f||void 0===f?void 0:f.pagination.totalItems)&&void 0!==c?c:0)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Re.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/manage-tags"),children:[Object(a.jsx)(lc.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(uc.a,{tag:"h2",children:m?"Loading...":nr(u.tags.length)})]})})]}),Object(a.jsxs)(Re.a,{className:"mb-3",children:[Object(a.jsxs)(dc.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Create a short URL"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(y,"/create-short-url"),children:"Advanced options \xbb"})]}),Object(a.jsx)(jc.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(Re.a,{children:[Object(a.jsxs)(dc.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Recently created URLs"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(y,"/list-short-urls/1"),children:"See all \xbb"})]}),Object(a.jsx)(jc.a,{children:Object(a.jsx)(e,{shortUrlsList:s,selectedServer:d,className:"mb-0",onTagClick:function(e){return S.push("/server/".concat(y,"/list-short-urls/1?tags=").concat(encodeURIComponent(e)))}})})]})]})}),(function(){return[Me.visits,Me.orphanVisits]}))},hc=function(e,t,r,n){return function(c){var s=c.servers,i=Object.values(s),l=Object(F.useState)(i),u=Object(E.a)(l,2),d=u[0],j=u[1],b=d.some((function(e){return!!e.autoConnect})),h=r(!1,4e3),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(F.useEffect)((function(){j(Object.values(s))}),[s]),Object(a.jsxs)(pn.a,{children:[Object(a.jsx)(G,{className:"mb-3",onChange:function(e){return j(i.filter((function(t){var r=t.name,n=t.url;return"".concat(r," ").concat(n).match(e)})))}}),Object(a.jsxs)(Lr.a,{className:"mb-3",children:[Object(a.jsxs)("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[Object(a.jsx)(t,{className:"flex-fill",onImportError:f,children:"Import servers"}),i.length>0&&Object(a.jsxs)(Hr.a,{outline:!0,className:"ml-2 flex-fill",onClick:Object(x.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.exportServers());case 1:case"end":return t.stop()}}),t)}))),children:[Object(a.jsx)(L.a,{icon:D.q,fixedWidth:!0})," Export servers"]})]}),Object(a.jsx)("div",{className:"col-md-6 text-md-right d-flex d-md-block",children:Object(a.jsxs)(Hr.a,{outline:!0,color:"primary",className:"flex-fill",tag:o.b,to:"/server/create",children:[Object(a.jsx)(L.a,{icon:D.E,fixedWidth:!0})," Add a server"]})})]}),Object(a.jsx)(Vr.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsxs)("tr",{children:[b&&Object(a.jsx)("th",{style:{width:"50px"}}),Object(a.jsx)("th",{children:"Name"}),Object(a.jsx)("th",{children:"Base URL"}),Object(a.jsx)("th",{})]})}),Object(a.jsxs)("tbody",{children:[!d.length&&Object(a.jsx)("tr",{className:"text-center",children:Object(a.jsx)("td",{colSpan:4,children:"No servers found."})}),d.map((function(e){return Object(a.jsx)(n,{server:e,hasAutoConnect:b},e.id)}))]})]})}),v&&Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)(Ir,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})}},Oc=function(e){return function(t){var r=t.server,n=t.hasAutoConnect;return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[n&&Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:r.autoConnect&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(L.a,{icon:D.h,className:"text-primary",id:"autoConnectIcon"}),Object(a.jsx)(mr.a,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Name",children:Object(a.jsx)(o.b,{to:"/server/".concat(r.id),children:r.name})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base URL",children:r.url}),Object(a.jsx)("td",{className:"responsive-table__cell text-right",children:Object(a.jsx)(e,{server:r})})]})}},vc=function(e){return function(t){var r=t.server,n=t.setAutoConnect,c=Object(z.d)(),s=Object(E.a)(c,2),i=s[0],l=s[1],u=Object(z.d)(),d=Object(E.a)(u,4),j=d[0],b=d[2],h=d[3],O="/server/".concat(r.id),v=r.autoConnect,f=v?D.b:xe.b;return Object(a.jsxs)(Nr,{isOpen:i,toggle:l,children:[Object(a.jsxs)(B.a,{tag:o.b,to:O,children:[Object(a.jsx)(L.a,{icon:D.D,fixedWidth:!0})," Connect"]}),Object(a.jsxs)(B.a,{tag:o.b,to:"".concat(O,"/edit"),children:[Object(a.jsx)(L.a,{icon:D.m,fixedWidth:!0})," Edit server"]}),Object(a.jsxs)(B.a,{onClick:function(){return n(r,!r.autoConnect)},children:[Object(a.jsx)(L.a,{icon:f,fixedWidth:!0})," ",v?"Do not a":"A","uto-connect"]}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsxs)(B.a,{className:"dropdown-item--danger",onClick:b,children:[Object(a.jsx)(L.a,{icon:D.y,fixedWidth:!0})," Remove server"]}),Object(a.jsx)(e,{redirectHome:!1,server:r,isOpen:j,toggle:h})]})}},fc=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},mc=function(e){return Array.isArray(e)&&e.every(fc)},xc=function e(t,r){var n=this;Object(g.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(x.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("No file provided");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e,c){r.addEventListener("loadend",(function(t){try{var r,a,s,i=null!==(r=null===(a=t.target)||void 0===a||null===(s=a.result)||void 0===s?void 0:s.toString())&&void 0!==r?r:"",o=n.csvJson.toObject(i);if(!mc(o))throw new Error("Provided file does not have the right format.");e(o)}catch(t){c(t)}})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},gc=r(104),pc=function e(t,r,n){var c=this;Object(g.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(x.a)(m.a.mark((function e(){var t,r,n;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Te.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(v.f);try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(gc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},yc=function(e,t,r){e.serviceFactory("ManageServers",hc,"ServersExporter","ImportServersBtn","useStateFlagTimeout","ManageServersRow"),e.decorator("ManageServers",t(["servers"])),e.serviceFactory("ManageServersRow",Oc,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",vc,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",wn,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",oc.a),e.decorator("CreateServer",t(["selectedServer","servers"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",Rn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",(function(){return kn})),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return _n})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",Un,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",En,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return ac})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",ic,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",bc,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",gn.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",xc,"csvjson","fileReaderFactory"),e.service("ServersExporter",pc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Pn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return $n})),e.serviceFactory("createServers",(function(){return Xn})),e.serviceFactory("deleteServer",(function(){return tc})),e.serviceFactory("editServer",(function(){return ec})),e.serviceFactory("setAutoConnect",(function(){return rc})),e.serviceFactory("fetchServers",cc,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Gn}))},Sc=function(e){var t=e.visits,r=e.goBack,n=e.shortUrl,c=e.children,s=e.title;return Object(a.jsx)("header",{children:Object(a.jsxs)(Re.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Hr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(L.a,{icon:D.a})}),Object(a.jsx)("span",{className:"text-center d-none d-sm-block",children:Object(a.jsx)("small",{children:s})}),Object(a.jsxs)("span",{className:"badge badge-main ml-3",children:["Visits:"," ",Object(a.jsx)(yr,{visitsCount:t.length,shortUrl:n})]})]}),Object(a.jsx)("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:Object(a.jsx)("small",{children:s})}),c&&Object(a.jsx)("div",{className:"mt-md-2",children:c})]})})},Cc=function(e){var t,r,n=e.shortUrlDetail,c=e.shortUrlVisits,s=e.goBack,i=n.shortUrl,o=n.loading,l=c.visits,u=null!==(t=null===i||void 0===i?void 0:i.shortUrl)&&void 0!==t?t:"",d=null!==(r=null===i||void 0===i?void 0:i.longUrl)&&void 0!==r?r:"",j=null===i||void 0===i?void 0:i.title,b=Object(a.jsxs)(a.Fragment,{children:["Visits for ",Object(a.jsx)(dr.a,{href:u})]});return Object(a.jsxs)(Sc,{title:b,goBack:s,visits:l,shortUrl:i,children:[Object(a.jsx)("hr",{}),Object(a.jsxs)("div",{children:["Created: ",i?Object(a.jsxs)("span",{children:[Object(a.jsx)("b",{id:"created",className:"short-url-visits-header__created-at",children:Object(a.jsx)(fr,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(mr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(fr,{date:i.dateCreated})})]}):Object(a.jsx)("small",{children:"Loading..."})]}),Object(a.jsxs)("div",{children:["".concat(j?"Title":"Long URL",": "),o&&Object(a.jsx)("small",{children:"Loading..."}),!o&&Object(a.jsx)(dr.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},Nc=r(603),wc=r(554),kc=r(604),_c=r(552),Uc=r(113),Tc=r(592),Rc=r(593),Ec=r(595),Dc=r(589),Lc=r(292),Vc=r(590),Ic=r(314),Fc=r(92),Ac=r(591),Mc=r(594),Gc=r(291),Pc=r.n(Gc),Bc=r(588),Hc="Others",Wc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],qc=function(e){var t,r;return Object(Dr.c)(e)?null!==(t=null===(r=e.split("/")[e.includes("://")?2:0])||void 0===r?void 0:r.split(":")[0])&&void 0!==t?t:"":"Direct"},zc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(Bc.a)(t,t.map((function(){return 0})))),e))},Qc=function(e){return Object(a.jsx)($r,Object(d.a)({type:"switch"},e))},Kc=function(e,t){var r=e.native,n=Object(E.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},Jc=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(nr(r))},Zc=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(nr(r))},Yc=r(46),Xc={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},$c={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},ea={hourly:Dc.a,daily:Lc.a,weekly:Vc.a,monthly:Ic.a},ta={hourly:function(e){return Object(X.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(X.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(X.default)(Object(Fc.a)(e),"yyyy-MM-dd"),r=Object(X.default)(Object(Ac.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(X.default)(e,"yyyy-MM")}},ra=function(e,t){return Object(Rc.a)((function(t){return ta[e](Object(I.default)(t.date))}),t)},na=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=ea[e],n=ta[e],c=Object(I.default)(t[0].date),a=Object(I.default)(t[t.length-1].date),s=r(c,a),i=$c[e];return[n(a)].concat(Object(ke.a)(Object(Dr.e)(s,(function(e){return n(Object(Mc.a)(a,i(e)))}))))}(r,e);return[c,zc(t,c)]},ca=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},aa=null,sa=function(e,t,r){return function(n){var c=Object(E.a)(n,1)[0];if(r&&c){var a,s=c.index;if(aa===e[s])r([]),aa=null;else r(e[s]&&t[e[s]]||[]),aa=null!==(a=e[s])&&void 0!==a?a:null}}},ia=function(e){var t=e.title,r=e.visits,n=e.highlightedVisits,c=e.highlightedLabel,s=void 0===c?"Selected":c,i=e.setSelectedVisits,o=Object(F.useState)(r.length>0?function(e){var t,r=new Date,n=Object(I.default)(e);return null!==(t=Object(Zr.a)([[function(){return Object(Lc.a)(r,n)<=2},Object(Tc.a)("hourly")],[function(){return Object(Ic.a)(r,n)<=1},Object(Tc.a)("daily")],[function(){return Object(Ic.a)(r,n)<=6},Object(Tc.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(E.a)(o,2),u=l[0],d=l[1],j=Object(z.d)(!0),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(F.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=ta[e](Object(I.default)(r.date));return t[c]=null!==(n=t[c])&&void 0!==n?n:[],t[c].push(r),t}),{})}(u,r)}),[u,r]),f=Object(F.useMemo)((function(){return ra(u,Object(Ec.a)(r))}),[u,r]),m=Object(F.useMemo)((function(){return na(r,f,u,h)}),[r,u,h]),x=Object(E.a)(m,2),g=x[0],p=x[1],y=Object(F.useMemo)((function(){return zc(ra(u,Object(Ec.a)(n)),g)}),[n,u,g]),S=function(){var e=ca(p,"Visits",Yc.c);return 0===n.length?[e]:[e,ca(y,s,Yc.a)]},C={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:Jc}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:nr}},x:{title:{display:!0,text:Xc[u]}}},onHover:Kc},N=function(){return Object(a.jsx)(Uc.c,{data:{labels:g,datasets:S()},options:C,getElementAtEvent:sa(g,v,i)})};return Object(a.jsxs)(Re.a,{children:[Object(a.jsxs)(dc.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(Ee.a,{children:[Object(a.jsx)(W.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(q.a,{right:!0,children:Object.entries(Xc).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(B.a,{active:u===r,onClick:function(){return d(r)},children:n},r)}))})]})}),Object(a.jsx)("div",{className:"float-right mr-2",children:Object(a.jsx)(Qc,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(jc.a,{className:"line-chart-card__body",children:[n.length>0&&N(),0===n.length&&N()]})]})},oa=r(596),la=function(e){var t=e.pagesCount,r=e.currentPage,n=e.setCurrentPage,c=e.centered,s=void 0===c||c;if(t<2)return null;var i=function(e){return function(){return!sr(e)&&n(e)}};return Object(a.jsxs)(Yt.a,{listClassName:M()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(Jt.a,{disabled:r<=1,children:Object(a.jsx)(Zt.a,{previous:!0,tag:"span",onClick:i(r-1)})}),ar(r,t).map((function(e,t){return Object(a.jsx)(Jt.a,{disabled:sr(e),active:r===e,children:Object(a.jsx)(Zt.a,{tag:"span",onClick:i(e),children:ir(e)})},or(e,t))})),Object(a.jsx)(Jt.a,{disabled:r>=t,children:Object(a.jsx)(Zt.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},ua=function(e,t){return t.filter((function(t){return function(e,t){var r=e.browser,n=e.os,c=e.referer,a=e.country,s=e.city,i=Object(xr.a)(e,["browser","os","referer","country","city"]);return"".concat(r," ").concat(n," ").concat(c," ").concat(a," ").concat(s," ").concat(i.visitedUrl).toLowerCase().includes(t.toLowerCase())}(t,e)}))},da=function(e,t,r){var n=function(e,t){return Ve(t,e)}(r,t?ua(t,e):Object(ke.a)(e)),c=n.length;return{visitsGroups:Object(oa.a)(20,n),total:c}},ja=function(e){var t,r,n=e.visits,c=e.selectedVisits,s=void 0===c?[]:c,i=e.setSelectedVisits,o=e.selectedServer,l=e.matchMedia,u=void 0===l?window.matchMedia:l,d=e.isOrphanVisits,j=void 0!==d&&d,b="visits-table__header-cell visits-table__sticky",h=function(){return u("(max-width: 767px)").matches},O=Object(F.useState)(h()),v=Object(E.a)(O,2),f=v[0],m=v[1],x=Object(F.useState)(void 0),g=Object(E.a)(x,2),p=g[0],y=g[1],S=Object(F.useState)({}),C=Object(E.a)(S,2),N=C[0],w=C[1],k=Object(F.useMemo)((function(){return da(n,p,N)}),[p,N]),_=Object(F.useRef)(!0),U=Object(F.useState)(1),T=Object(E.a)(U,2),R=T[0],V=T[1],I=20*R,A=I-20,P=Object(Dt.a)(o),B=7+Number(P)+Number(j),H=function(e){return function(){return w({field:e,dir:Le(e,N.field,N.dir)})}},W=function(e){return Object(a.jsx)(Ge,{currentOrder:N,field:e,className:"visits-table__header-icon"})};return Object(F.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(F.useEffect)((function(){V(1),!_.current&&i([]),_.current=!1}),[p]),Object(a.jsxs)("table",{className:"table table-bordered table-hover table-sm table-responsive-sm visits-table",children:[Object(a.jsxs)("thead",{className:"visits-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{className:"".concat(b," text-center"),onClick:function(){return i(s.length0})})}),P&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(L.a,{icon:D.G}),W("potentialBot")]}),Object(a.jsxs)("th",{className:b,onClick:H("date"),children:["Date",W("date")]}),Object(a.jsxs)("th",{className:b,onClick:H("country"),children:["Country",W("country")]}),Object(a.jsxs)("th",{className:b,onClick:H("city"),children:["City",W("city")]}),Object(a.jsxs)("th",{className:b,onClick:H("browser"),children:["Browser",W("browser")]}),Object(a.jsxs)("th",{className:b,onClick:H("os"),children:["OS",W("os")]}),Object(a.jsxs)("th",{className:b,onClick:H("referer"),children:["Referrer",W("referer")]}),j&&Object(a.jsxs)("th",{className:b,onClick:H("visitedUrl"),children:["Visited URL",W("visitedUrl")]})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"p-0",children:Object(a.jsx)(G,{noBorder:!0,large:!1,onChange:y})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=k.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"text-center",children:"No visits found with current filtering"})}),null===(r=k.visitsGroups[R-1])||void 0===r?void 0:r.map((function(e,t){var r=s.includes(e);return Object(a.jsxs)("tr",{style:{cursor:"pointer"},className:M()({"table-active":r}),onClick:function(){return i(r?s.filter((function(t){return t!==e})):[].concat(Object(ke.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(L.a,{icon:D.h,className:"text-primary"})}),P&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(L.a,{icon:D.G,id:"botIcon".concat(t)}),Object(a.jsx)(mr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(fr,{date:e.date})}),Object(a.jsx)("td",{children:e.country}),Object(a.jsx)("td",{children:e.city}),Object(a.jsx)("td",{children:e.browser}),Object(a.jsx)("td",{children:e.os}),Object(a.jsx)("td",{children:e.referer}),j&&Object(a.jsx)("td",{children:e.visitedUrl})]},t)}))]}),k.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"visits-table__footer-cell visits-table__sticky",children:Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(la,{pagesCount:Math.ceil(k.total/20),currentPage:R,setCurrentPage:V,centered:f})}),Object(a.jsx)("div",{className:M()("col-md-6",{"d-flex align-items-center flex-row-reverse":!f,"text-center mt-3":f}),children:Object(a.jsxs)("div",{children:["Visits ",Object(a.jsx)("b",{children:nr(A+1)})," to"," ",Object(a.jsx)("b",{children:nr(Object(er.a)(I,k.total))})," of"," ",Object(a.jsx)("b",{children:nr(k.total)})]})})]})})})})]})},ba=r(616),ha=r(597),Oa=r(598),va=r(599),fa=function(){return Object(a.jsx)(ba.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ma=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(E.a)(e,1)[0].latLong}},xa=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(_r.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(Tr.a,{className:"map-modal__modal-body",children:[Object(a.jsxs)("h3",{className:"map-modal__modal-title",children:[n,Object(a.jsx)("button",{type:"button",className:"close",onClick:t,children:"\xd7"})]}),Object(a.jsxs)(ha.a,Object(d.a)(Object(d.a)({},ma(s)),{},{children:[Object(a.jsx)(fa,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Oa.a,{position:n,children:Object(a.jsxs)(va.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},ga=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(z.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(z.d)(),j=Object(E.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(F.useState)([]),f=Object(E.a)(v,2),m=f[0],x=f[1],g=Object(F.useRef)(),p=function(e){return function(){x(e?c.filter((function(e){var t=e.cityName;return r.includes(t)})):c),l()}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("button",{className:"btn btn-link open-map-modal-btn__btn",ref:g,onClick:function(){if(!r)return x(c),void l();O()},children:Object(a.jsx)(L.a,{icon:D.x})}),Object(a.jsx)(mr.a,{placement:"left",target:function(){return g.current},children:"Show in map"}),Object(a.jsx)(H.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(q.a,{right:!0,children:[Object(a.jsx)(B.a,{onClick:p(!1),children:"Show all locations"}),Object(a.jsx)(B.a,{onClick:p(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(xa,{toggle:u,isOpen:o,title:t,locations:m})]})},pa=r(600),ya=function(e){return e.hasOwnProperty("visitedUrl")},Sa=Object(V.a)(Object(pa.a)((function(e){return ya(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),Ca=function(e,t){return Object(Rc.a)(Object(O.a)(t),e)},Na=function(e){var t,r,n=e.page,c=e.itemsPerPage,a=e.filter,s=e.dateRange;return{page:n,itemsPerPage:c,startDate:null!==(t=(null===s||void 0===s?void 0:s.startDate)&&ae(null===s||void 0===s?void 0:s.startDate))&&void 0!==t?t:void 0,endDate:null!==(r=(null===s||void 0===s?void 0:s.endDate)&&ae(null===s||void 0===s?void 0:s.endDate))&&void 0!==r?r:void 0,excludeBots:(null===a||void 0===a?void 0:a.excludeBots)||void 0}},wa=function(e,t){return!Object(y.a)(e)&&Object(Dr.c)(e[t])},ka=function(e){return"number"===typeof e?e:e?parseFloat(e):0},_a=function(e){return function(t,r){var n=wa(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Ua=_a("country"),Ta=_a("city"),Ra=function(e){return e.reduce((function(e,t){return function(e,t){var r=t.os;e[r]=(e[r]||0)+1}(e.os,t),function(e,t){var r=t.browser;e[r]=(e[r]||0)+1}(e.browsers,t),function(e,t){var r=t.referer;e[r]=(e[r]||0)+1}(e.referrers,t),Ua(e.countries,t),Ta(e.cities,t),function(e,t){if(wa(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[ka(n),ka(c)]};a.count++,e[r]=a}}(e.citiesForMap,t),function(e,t){if(function(e){return e.hasOwnProperty("visitedUrl")}(t)){var r=t.visitedUrl;e[r]=(e[r]||0)+1}}(e.visitedUrls,t),e}),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}})},Ea=Object(qn.a)((function(e){var t=e.userAgent,r=e.date,n=e.referer,c=e.visitLocation,a=e.potentialBot,s=void 0!==a&&a,i=Object(d.a)(Object(d.a)({date:r,potentialBot:s},function(e){if(!Object(Dr.c)(e))return{browser:Hc,os:Hc};var t=Pc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:Hc,browser:r&&Wc.includes(r)?r:Hc}}(t)),{},{referer:qc(n),country:(null===c||void 0===c?void 0:c.countryName)||"Unknown",city:(null===c||void 0===c?void 0:c.cityName)||"Unknown",latitude:null===c||void 0===c?void 0:c.latitude,longitude:null===c||void 0===c?void 0:c.longitude});return ya(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Da=function(e){var t=e.onChange,r=e.selected,n=void 0===r?{}:r,c=e.className,s=e.isOrphanVisits,i=e.botsSupported;if(!i&&!s)return null;var o=n.orphanVisitsType,l=n.excludeBots,u=void 0!==l&&l,j=function(e){return{active:o===e,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{orphanVisitsType:e===(null===n||void 0===n?void 0:n.orphanVisitsType)?void 0:e}))}}};return Object(a.jsxs)(Q,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B.a,{header:!0,children:"Bots:"}),Object(a.jsx)(B.a,{active:u,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{excludeBots:!(null!==n&&void 0!==n&&n.excludeBots)}))},children:"Exclude potential bots"})]}),i&&s&&Object(a.jsx)(B.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(B.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(B.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(B.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{disabled:!Object(Dr.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},La=function(e){var t,r,n=e.chart.config,c=null!==(t=n.data)&&void 0!==t?t:{},s=c.labels,i=void 0===s?[]:s,o=c.datasets,l=void 0===o?[]:o,u=Object(E.a)(l,1)[0].backgroundColor,d=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor;return Object(a.jsx)("ul",{className:"doughnut-chart-legend",children:i.map((function(e,t){var r;return Object(a.jsxs)("li",{className:"doughnut-chart-legend__item d-flex",children:[Object(a.jsx)("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:null!==(r=u[t])&&void 0!==r?r:d}}),Object(a.jsx)("small",{className:"doughnut-chart-legend__item-text flex-fill",children:e})]},e)}))})},Va=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(Yc.h)()?Yc.e:Yc.f,borderWidth:2}]},Ia=Object(F.memo)((function(e){var t=e.stats,r=Object(F.useState)(),n=Object(E.a)(r,2),c=n[0],s=n[1],i=Object(Ue.a)(t),o=Object(Te.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:Zc}}}},u=function(e,t){return{labels:e,datasets:Va(t)}}(i,o);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-sm-12 col-md-7",children:Object(a.jsx)(Uc.b,{height:300,data:u,options:l,ref:function(e){s(null!==e&&void 0!==e?e:void 0)}})}),Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:c&&Object(a.jsx)(La,{chart:c})})]})})),Fa=r(601),Aa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(Re.a,{children:[Object(a.jsx)(dc.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(jc.a,{children:n}),r&&Object(a.jsx)(Fa.a,{className:"chart-card__footer--sticky",children:r})]})},Ma=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(Aa,{title:t,children:Object(a.jsx)(Ia,{stats:r})})},Ga=r(127),Pa=r(609),Ba=r(602),Ha=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(Ee.a,{children:[Object(a.jsx)(W.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(q.a,{right:!0,children:[r.map((function(e){return Object(a.jsxs)(B.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},Wa=function(e){return e.startsWith("hidden")?"":e},qa=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:Yc.d,borderColor:Yc.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:Yc.b,borderColor:Yc.a,borderWidth:2}]},za=function(e,t){return function(r){var n=Object(E.a)(r,1)[0];t&&n&&t(e[n.index])}},Qa=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ue.a)(t).map(Wa),o=Object(Te.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ue.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=zc(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:Jc}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:nr}},y:{stacked:!0}},onHover:Kc,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:qa(t,r,n)}}(i,o,l,n),b=function(e){return e.length>20?10*e.length:void 0}(i),h=function(e){return Object(a.jsx)(Uc.a,{data:j,options:u,height:b,getElementAtEvent:za(i,c)},"".concat(b,"_").concat(e))};return Object(a.jsxs)(a.Fragment,{children:[void 0!==r&&h("with_stats"),void 0===r&&h("without_stats")]})},Ka=function(e){return"String"===Object(Ga.a)(e)?Object(Pa.a)(e):e},Ja=function(e){return Object(E.a)(e,1)[0]},Za=function(e){return Object(E.a)(e,2)[1]},Ya=function(e){var t=e.stats,r=e.highlightedStats,n=e.title,c=e.sortingItems,s=e.extraHeaderContent,i=e.withPagination,o=void 0===i||i,l=Object(xr.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(F.useState)({}),j=Object(E.a)(u,2),b=j[0],h=j[1],O=Object(F.useState)(1),v=Object(E.a)(O,2),f=v[0],m=v[1],x=Object(F.useState)(50),g=Object(E.a)(x,2),p=g[0],y=g[1],S=function(e){var t=e[f-1];if(f0?r:void 0,c),N=C.currentPageStats,w=C.currentPageHighlightedStats,k=C.pagination,_=C.max,U=Object.keys(N);return Object(a.jsx)(Aa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Ie,{isButton:!1,right:!0,items:c,order:b,onChange:function(e,t){h({field:e,dir:t}),m(1)}})}),o&&Object.keys(t).length>50&&Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Ha,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:p,setValue:function(e){y(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(k?U:void 0)})]})},footer:k,children:Object(a.jsx)(Qa,Object(d.a)({stats:N,highlightedStats:w,max:_},l))})},Xa={byTime:{title:"By time",subPath:"",icon:D.d},byContext:{title:"By context",subPath:"/by-context",icon:D.g},byLocation:{title:"By location",subPath:"/by-location",icon:D.x},list:{title:"List",subPath:"/list",icon:D.w}},$a=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(wc.a,{tag:o.c,className:"visits-stats__nav-link",to:c,isActive:function(e,r){return r.pathname.endsWith("visits".concat(t))},replace:!0,children:[Object(a.jsx)(L.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},es=function(e){var t,r,n=e.children,c=e.visitsInfo,s=e.getVisits,i=e.cancelGetVisits,o=e.baseUrl,l=e.domain,u=e.settings,j=e.exportCsv,h=e.selectedServer,O=e.isOrphanVisits,v=void 0!==O&&O,f=null!==(t=null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",m=Object(F.useState)(ve(f)),x=Object(E.a)(m,2),g=x[0],p=x[1],y=Object(F.useState)([]),C=Object(E.a)(y,2),N=C[0],w=C[1],k=Object(F.useState)(),_=Object(E.a)(k,2),U=_[0],T=_[1],R=Object(F.useState)({}),V=Object(E.a)(R,2),I=V[0],A=V[1],G=Object(Dt.a)(h),P=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},B=c.visits,H=c.loading,W=c.loadingLarge,q=c.error,z=c.errorData,Q=c.progress,K=Object(F.useMemo)((function(){return Ea(B)}),[B]),J=Object(F.useMemo)((function(){return Ra(K)}),[K]),Z=J.os,Y=J.browsers,X=J.referrers,$=J.countries,ee=J.cities,te=J.citiesForMap,re=J.visitedUrls,ne=Object(Te.a)(te),ce=function(e){Je=void 0,w(e)},ae=function(e){return function(t){var r="".concat(e,"_").concat(t);Je===r?(w([]),T(void 0),Je=void 0):(w(K.filter(Object(Nc.a)(e,t))),T(t),Je=r)}};Object(F.useEffect)((function(){return i}),[]),Object(F.useEffect)((function(){s({dateRange:g,filter:I})}),[g,I]);return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("section",{className:"mt-3",children:Object(a.jsxs)("div",{className:"row flex-md-row-reverse",children:[Object(a.jsx)("div",{className:"col-lg-7 col-xl-6",children:Object(a.jsxs)("div",{className:"d-md-flex",children:[Object(a.jsx)("div",{className:"flex-fill",children:Object(a.jsx)(Se,{disabled:H,initialDateRange:f,defaultText:"All visits",onDatesChange:p})}),Object(a.jsx)(Da,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:G,selected:I,onChange:A})]})}),B.length>0&&Object(a.jsx)("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:Object(a.jsxs)("div",{className:"d-flex",children:[Object(a.jsxs)(Hr.a,{outline:!0,disabled:0===N.length,className:"btn-md-block mr-2",onClick:function(){return ce([])},children:["Clear selection ",N.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",nr(N.length),")"]})]}),Object(a.jsxs)(Hr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j(K)},children:[Object(a.jsx)(L.a,{icon:D.q})," Export (",nr(K.length),")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:W?Object(a.jsxs)(un.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(kc.a,{value:Q,striped:100===Q,className:"mt-3"})]}):H?Object(a.jsx)(un.a,{loading:!0}):q?Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:z,fallbackMessage:"An error occurred while loading visits :("})}):Object(S.a)(B)?Object(a.jsx)(un.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Re.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(_c.a,{pills:!0,fill:!0,children:Object.entries(Xa).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)($a,Object(d.a)(Object(d.a)({},n),{},{to:P(n.subPath)}),r)}))})}),Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:o,children:Object(a.jsx)("div",{className:"col-12 mt-3",children:Object(a.jsx)(ia,{title:"Visits during time",visits:K,highlightedVisits:N,highlightedLabel:U,setSelectedVisits:ce})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Xa.byContext.subPath),children:[Object(a.jsx)("div",{className:M()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ma,{title:"Operating systems",stats:Z})}),Object(a.jsx)("div",{className:M()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ma,{title:"Browsers",stats:Y})}),Object(a.jsx)("div",{className:M()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(Ya,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:Ca(N,"referer"),highlightedLabel:U,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ae("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(Ya,{title:"Visited URLs",stats:re,highlightedLabel:U,highlightedStats:Ca(N,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ae("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Xa.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Ya,{title:"Countries",stats:$,highlightedStats:Ca(N,"country"),highlightedLabel:U,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ae("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Ya,{title:"Cities",stats:ee,highlightedStats:Ca(N,"city"),highlightedLabel:U,extraHeaderContent:function(e){return ne.length>0&&Object(a.jsx)(ga,{modalTitle:"Cities",locations:ne,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ae("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(Xa.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(ja,{visits:K,selectedVisits:N,setSelectedVisits:ce,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},ts=function(e){var t=e.exportVisits;return Ae((function(e){var r=e.history.goBack,n=e.match,c=n.params,s=n.url,i=e.location.search,o=e.shortUrlVisits,l=e.shortUrlDetail,u=e.getShortUrlVisits,j=e.getShortUrlDetail,b=e.cancelGetShortUrlVisits,h=e.settings,O=e.selectedServer,v=c.shortCode,f=Object(C.a)(i).domain;return Object(F.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(es,{getVisits:function(e){return u(v,Object(d.a)(Object(d.a)({},Na(e)),{},{domain:f}))},cancelGetVisits:b,visitsInfo:o,baseUrl:s,domain:f,settings:h,exportCsv:function(e){var r;return t("short-url_".concat(null===(r=l.shortUrl)||void 0===r?void 0:r.shortUrl.replace(/https?:\/\//g,""),"_visits.csv"),e)},selectedServer:O,children:Object(a.jsx)(Cc,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[Me.shortUrlVisits(t.params.shortCode)]}))},rs=r(614),ns=5e3,cs=function(e){return e.currentPage>=e.pagesCount},as=function(e,t){return 100*t/e},ss=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n,c,a){var s,i,o,l;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c({type:n.start}),s=function(){var e=Object(x.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(r.map(function(){var e=Object(x.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(r,ns).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(rs.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i=function(){var e=Object(x.a)(m.a.mark((function e(t){var r,o,l=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>1&&void 0!==l[1]?l[1]:0,!a()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,s(t[r]);case 5:if(o=e.sent,c({type:n.progress,progress:as(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,ns);case 3:if(a=e.sent,s=a.pagination,o=a.data,s&&!cs(s)){e.next=8;break}return e.abrupt("return",o);case 8:return l=Object(Xt.a)(2,s.pagesCount+1),u=Object(oa.a)(4,l),s.pagesCount-1>4&&c({type:n.large}),e.t0=o,e.next=14,i(u);case 14:return e.t1=e.sent,e.abrupt("return",e.t0.concat.call(e.t0,e.t1));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.prev=4,e.next=7,o();case 7:l=e.sent,c(Object(d.a)(Object(d.a)({},r),{},{visits:l,type:n.finish})),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),c({type:n.error,errorData:Ot(e.t0)});case 14:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),is="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",os="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",ls="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",us="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",ds="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",js="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",bs={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},hs=st((Ze={},Object(u.a)(Ze,is,(function(){return Object(d.a)(Object(d.a)({},bs),{},{loading:!0})})),Object(u.a)(Ze,os,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},bs),{},{error:!0,errorData:r})})),Object(u.a)(Ze,ls,(function(e,t){var r=t.visits,n=t.query,c=t.shortCode,a=t.domain;return Object(d.a)(Object(d.a)({},bs),{},{visits:r,shortCode:c,domain:a,query:n})})),Object(u.a)(Ze,us,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Ze,ds,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Ze,js,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Ze,bt,(function(e,t){var r=t.createdVisits,n=e.shortCode,c=e.domain,a=e.visits,s=e.query,i=void 0===s?{}:s,o=i.startDate,l=i.endDate,u=r.filter((function(e){var t=e.shortUrl,r=e.visit;return t&&jt(t,n,c)&&oe(r.date,o,l)})).map((function(e){return e.visit}));return 0===u.length?e:Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(ke.a)(u),Object(ke.a)(a))})})),Ze),bs),Os=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getShortUrlVisits,o=function(){var e=Object(x.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().shortUrlVisits.cancelLoad},u={shortCode:t,query:r,domain:r.domain},j={start:is,large:us,finish:ls,error:os,progress:js},n.abrupt("return",ss(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},vs=it(ds),fs=function(e){var t=e.tagVisits,r=e.goBack,n=e.colorGenerator,c=t.visits,s=t.tag,i=Object(a.jsxs)("span",{className:"d-flex align-items-center justify-content-center",children:[Object(a.jsx)("span",{className:"mr-2",children:"Visits for"}),Object(a.jsx)(P,{text:s,colorGenerator:n})]});return Object(a.jsx)(Sc,{title:i,goBack:r,visits:c})},ms=function(e,t){var r=t.exportVisits;return Ae((function(t){var n=t.history.goBack,c=t.match,s=c.params,i=c.url,o=t.getTagVisits,l=t.tagVisits,u=t.cancelGetTagVisits,d=t.settings,j=t.selectedServer,b=s.tag;return Object(a.jsx)(es,{getVisits:function(e){return o(b,Na(e))},cancelGetVisits:u,visitsInfo:l,baseUrl:i,settings:d,exportCsv:function(e){return r("tag_".concat(b,"_visits.csv"),e)},selectedServer:j,children:Object(a.jsx)(fs,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[Me.visits]}))},xs="shlink/tagVisits/GET_TAG_VISITS_START",gs="shlink/tagVisits/GET_TAG_VISITS_ERROR",ps="shlink/tagVisits/GET_TAG_VISITS",ys="shlink/tagVisits/GET_TAG_VISITS_LARGE",Ss="shlink/tagVisits/GET_TAG_VISITS_CANCEL",Cs="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",Ns={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},ws=st((Ye={},Object(u.a)(Ye,xs,(function(){return Object(d.a)(Object(d.a)({},Ns),{},{loading:!0})})),Object(u.a)(Ye,gs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ns),{},{error:!0,errorData:r})})),Object(u.a)(Ye,ps,(function(e,t){var r=t.visits,n=t.tag,c=t.query;return Object(d.a)(Object(d.a)({},Ns),{},{visits:r,tag:n,query:c})})),Object(u.a)(Ye,ys,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Ye,Ss,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Ye,Cs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Ye,bt,(function(e,t){var r=t.createdVisits,n=e.tag,c=e.visits,a=e.query,s=void 0===a?{}:a,i=s.startDate,o=s.endDate,l=r.filter((function(e){var t=e.shortUrl,r=e.visit;return(null===t||void 0===t?void 0:t.tags.includes(n))&&oe(r.date,i,o)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(ke.a)(l),Object(ke.a)(c))})})),Ye),Ns),ks=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getTagVisits,o=function(){var e=Object(x.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().tagVisits.cancelLoad},u={tag:t,query:r},j={start:xs,large:ys,finish:ps,error:gs,progress:Cs},n.abrupt("return",ss(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},_s=it(Ss),Us=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(Sc,{title:"Orphan visits",goBack:r,visits:n})},Ts=function(e){var t=e.exportVisits;return Ae((function(e){var r=e.history.goBack,n=e.match.url,c=e.getOrphanVisits,s=e.orphanVisits,i=e.cancelGetOrphanVisits,o=e.settings,l=e.selectedServer;return Object(a.jsx)(es,{getVisits:function(e){var t;return c(Na(e),null===(t=e.filter)||void 0===t?void 0:t.orphanVisitsType)},cancelGetVisits:i,visitsInfo:s,baseUrl:n,settings:o,exportCsv:function(e){return t("orphan_visits.csv",e)},selectedServer:l,isOrphanVisits:!0,children:Object(a.jsx)(Us,{orphanVisits:s,goBack:r})})}),(function(){return[Me.orphanVisits]}))},Rs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",Es="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",Ds="shlink/orphanVisits/GET_ORPHAN_VISITS",Ls="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",Vs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",Is="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",Fs={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},As=st((Xe={},Object(u.a)(Xe,Rs,(function(){return Object(d.a)(Object(d.a)({},Fs),{},{loading:!0})})),Object(u.a)(Xe,Es,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Fs),{},{error:!0,errorData:r})})),Object(u.a)(Xe,Ds,(function(e,t){var r=t.visits,n=t.query;return Object(d.a)(Object(d.a)({},Fs),{},{visits:r,query:n})})),Object(u.a)(Xe,Ls,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Xe,Vs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Xe,Is,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Xe,bt,(function(e,t){var r=t.createdVisits,n=e.visits,c=e.query,a=void 0===c?{}:c,s=a.startDate,i=a.endDate,o=r.filter((function(e){var t=e.visit;return oe(t.date,s,i)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(ke.a)(o),Object(ke.a)(n))})})),Xe),Fs),Ms=function(e,t){return!t||t===e.type},Gs=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getOrphanVisits,o=function(){var e=Object(x.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return ya(e)&&Ms(e,r)}));return Object(d.a)(Object(d.a)({},e),{},{data:t})})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().orphanVisits.cancelLoad},u={query:t},j={start:Rs,large:Ls,finish:Ds,error:Es,progress:Is},n.abrupt("return",ss(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},Ps=it(Vs),Bs="shlink/visitsOverview/GET_OVERVIEW_START",Hs="shlink/visitsOverview/GET_OVERVIEW_ERROR",Ws="shlink/visitsOverview/GET_OVERVIEW",qs={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},zs=st(($e={},Object(u.a)($e,Bs,(function(){return Object(d.a)(Object(d.a)({},qs),{},{loading:!0})})),Object(u.a)($e,Hs,(function(){return Object(d.a)(Object(d.a)({},qs),{},{error:!0})})),Object(u.a)($e,Ws,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},qs),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)($e,bt,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(xr.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=Sa(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),$e),qs),Qs=function(e){return function(){return function(){var t=Object(x.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:Bs}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:Ws},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:Hs});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Ks=function e(t,r){var n=this;Object(g.a)(this,e),this.window=t,this.csvjson=r,this.exportVisits=function(e,t){if(t.length){var r=n.csvjson.toCSV(t,{headers:"key"});Object(gc.a)(n.window,r,e)}}},Js=function(e,t){e.serviceFactory("MapModal",(function(){return xa})),e.serviceFactory("ShortUrlVisits",ts,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",ms,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Ts,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",Ks,"window","csvjson"),e.serviceFactory("getShortUrlVisits",Os,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return vs})),e.serviceFactory("getTagVisits",ks,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return _s})),e.serviceFactory("getOrphanVisits",Gs,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return Ps})),e.serviceFactory("createNewVisits",(function(){return ht})),e.serviceFactory("loadVisitsOverview",Qs,"buildShlinkApiClient")},Zs=r(293),Ys=r.n(Zs),Xs=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},$s=function(e){return{id:e,name:e}},ei=function(e){return function(t){var r,n,c=t.selectedTags,s=t.onChange,i=t.placeholder,o=t.listTags,l=t.tagsList,u=t.settings;Object(F.useEffect)((function(){o()}),[]);var d=null!==(r=null===(n=u.shortUrlCreation)||void 0===n?void 0:n.tagFilteringMode)&&void 0!==r?r:"startsWith";return Object(a.jsx)(Ys.a,{tags:c.map($s),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(P,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map($s),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Xs,{tag:"".concat(r.name),colorGenerator:e}),r.name]})},allowNew:!0,addOnBlur:!0,placeholderText:null!==i&&void 0!==i?i:"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:"includes"===d?function(e,t){return t.filter((function(t){return t.name.includes(e)}))}:void 0,onDelete:function(e){var t=Object(ke.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(ke.a)(new Set([].concat(Object(ke.a)(c),Object(ke.a)(t.toLowerCase().split(","))))))}})}},ti=r(551),ri=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=n.displayed,l=n.toggle,u=Object(z.d)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(z.d)(),O=Object(E.a)(h,2),f=O[0],m=O[1],x=Object(z.d)(),g=Object(E.a)(x,3),p=g[0],y=g[2],S=Object(F.useRef)(),C=Object(v.a)(s);return Object(F.useEffect)((function(){var e;(e=S.current)&&e.scrollWidth>e.clientWidth&&y()}),[S.current]),Object(a.jsxs)(Re.a,{className:"tag-card",children:[Object(a.jsxs)(dc.a,{className:"tag-card__header",children:[Object(a.jsx)(Hr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:b,children:Object(a.jsx)(L.a,{icon:D.Q})}),Object(a.jsx)(Hr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:m,children:Object(a.jsx)(L.a,{icon:D.C})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:p?c.tag:void 0,ref:function(e){S.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(Xs,{tag:c.tag,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:l,children:c.tag})]})]}),Object(a.jsx)(ti.a,{isOpen:i,children:Object(a.jsxs)(jc.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:"/server/".concat(C,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center mb-1",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(L.a,{icon:D.v,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:nr(c.shortUrls)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(C,"/tag/").concat(c.tag,"/visits"),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(L.a,{icon:D.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:nr(c.visits)})]})]})}),Object(a.jsx)(e,{tag:c.tag,toggle:b,isOpen:j}),Object(a.jsx)(t,{tag:c.tag,toggle:m,isOpen:f})]})}},ni=function(e){var t=e.tag,r=e.toggle,n=e.isOpen,c=e.deleteTag,s=e.tagDelete,i=e.tagDeleted,o=s.deleting,l=s.error,u=s.errorData,d=function(){var e=Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t);case 2:i(t),r();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(a.jsxs)(_r.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(Ur.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(Tr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(Ir,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Fr,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",disabled:o,onClick:d,children:o?"Deleting tag...":"Delete tag"})]})]})},ci=r(605),ai=r(305),si=function(e){var t=e.getColorForKey;return function(e){var r=e.tag,n=e.editTag,c=e.toggle,s=e.tagEdited,i=e.isOpen,o=e.tagEdit,l=Object(F.useState)(r),u=Object(E.a)(l,2),d=u[0],j=u[1],b=Object(F.useState)(t(r)),h=Object(E.a)(b,2),O=h[0],v=h[1],f=Object(z.d)(),g=Object(E.a)(f,4),p=g[0],y=g[1],S=g[3],C=o.editing,N=o.error,w=o.errorData,k=Object(Dr.b)(Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n(r,d,O).then((function(){return s(r,d,O)})).then(c).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(_r.a,{isOpen:i,toggle:c,centered:!0,onClosed:S,children:Object(a.jsxs)("form",{onSubmit:k,children:[Object(a.jsx)(Ur.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)("div",{className:"input-group",children:[Object(a.jsx)("div",{className:"input-group-prepend",id:"colorPickerBtn",onClick:y,children:Object(a.jsx)("div",{className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:O,borderColor:O},children:Object(a.jsx)(L.a,{icon:D.A,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(ci.a,{isOpen:p,toggle:y,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(ai.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(Qr.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),N&&Object(a.jsx)(Ir,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Fr,{errorData:w,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)(Hr.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)(Hr.a,{color:"primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},ii={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},oi=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(Q,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(B.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(L.a,{icon:D.O,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(B.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(L.a,{icon:D.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},li=function(e,t){return Ae((function(r){var n,c,s=r.filterTags,i=r.forceListTags,o=r.tagsList,l=r.selectedServer,u=r.settings,d=Object(F.useState)(null!==(n=null===(c=u.ui)||void 0===c?void 0:c.tagsMode)&&void 0!==n?n:"cards"),j=Object(E.a)(d,2),b=j[0],h=j[1],O=Object(F.useState)({}),v=Object(E.a)(O,2),f=v[0],m=v[1],x=Object(V.a)((function(){return o.filteredTags.map((function(e){var t,r,n,c;return{tag:e,shortUrls:null!==(t=null===(r=o.stats[e])||void 0===r?void 0:r.shortUrlsCount)&&void 0!==t?t:0,visits:null!==(n=null===(c=o.stats[e])||void 0===c?void 0:c.visitsCount)&&void 0!==n?n:0}}))}),(function(e){return Ve(e,f)}));if(Object(F.useEffect)((function(){i()}),[]),o.loading)return Object(a.jsx)(un.a,{loading:!0});if(o.error)return Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:o.errorData,fallbackMessage:"Error loading tags :("})});var g=function(e){return function(){var t=Le(e,f.field,f.dir);m({field:t?e:void 0,dir:t})}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(G,{className:"mb-3",onChange:s}),Object(a.jsxs)(Lr.a,{className:"mb-3",children:[Object(a.jsx)("div",{className:"col-lg-6",children:Object(a.jsx)(oi,{mode:b,onChange:h})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3 mt-lg-0",children:Object(a.jsx)(Ie,{items:ii,order:f,onChange:function(e,t){return m({field:e,dir:t})}})})]}),function(){if(o.filteredTags.length<1)return Object(a.jsx)(un.a,{children:"No tags found"});var r=x();return"cards"===b?Object(a.jsx)(e,{sortedTags:r,selectedServer:l}):Object(a.jsx)(t,{sortedTags:r,selectedServer:l,currentOrder:f,orderByColumn:g})}()]})}),(function(){return[Me.visits]}))},ui="shlink/deleteTag/DELETE_TAG_START",di="shlink/deleteTag/DELETE_TAG_ERROR",ji="shlink/deleteTag/DELETE_TAG",bi="shlink/deleteTag/TAG_DELETED",hi=st((et={},Object(u.a)(et,ui,(function(){return{deleting:!0,error:!1}})),Object(u.a)(et,di,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(et,ji,(function(){return{deleting:!1,error:!1}})),et),{deleting:!1,error:!1}),Oi=function(e){return function(t){return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:ui}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:ji}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:di,errorData:Ot(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},vi=function(e){return{type:bi,tag:e}},fi="shlink/editTag/EDIT_TAG_START",mi="shlink/editTag/EDIT_TAG_ERROR",xi="shlink/editTag/EDIT_TAG",gi="shlink/editTag/TAG_EDITED",pi=st((tt={},Object(u.a)(tt,fi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(tt,mi,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(tt,xi,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),tt),{oldName:"",newName:"",editing:!1,error:!1}),yi=function(e,t){return function(r,n,c){return function(){var a=Object(x.a)(m.a.mark((function a(s,i){var o,l;return m.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s({type:fi}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:xi,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:mi,errorData:Ot(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},Si=function(e,t,r){return{type:gi,oldName:e,newName:t,color:r}},Ci="shlink/tagsList/LIST_TAGS_START",Ni="shlink/tagsList/LIST_TAGS_ERROR",wi="shlink/tagsList/LIST_TAGS",ki="shlink/tagsList/FILTER_TAGS",_i={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Ui=function(e,t){return function(r){return r===e?t:r}},Ti=function(e,t){return Object(p.a)((function(e){return e===t}),e)},Ri=function(e){return Object.entries(e.reduce((function(e,t){var r=t.shortUrl;return null===r||void 0===r||r.tags.forEach((function(t){e[t]=(e[t]||0)+1})),e}),{}))},Ei=st((rt={},Object(u.a)(rt,Ci,(function(){return Object(d.a)(Object(d.a)({},_i),{},{loading:!0})})),Object(u.a)(rt,Ni,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},_i),{},{error:!0,errorData:r})})),Object(u.a)(rt,wi,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},_i),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(rt,bi,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:Ti(e.tags,r),filteredTags:Ti(e.filteredTags,r)})})),Object(u.a)(rt,gi,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(Ui(r,n)).sort(),filteredTags:e.filteredTags.map(Ui(r,n)).sort()})})),Object(u.a)(rt,ki,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredTags:e.tags.filter((function(e){return e.toLowerCase().match(r)}))})})),Object(u.a)(rt,bt,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=Ri(c),n=e.stats,r.reduce((function(e,t){var r=Object(E.a)(t,2),n=r[0],c=r[1];if(!e[n])return e;var a=e[n];return a.visitsCount=a.visitsCount+c,e[n]=a,e}),Object(d.a)({},n)))})})),rt),_i),Di=function(e){return{type:ki,searchTerm:e}},Li=Math.ceil,Vi=function(e){return function(t){var r=t.sortedTags,n=t.selectedServer,c=Object(F.useState)(),s=Object(E.a)(c,2),i=s[0],o=s[1],l=r.length,u=Object(oa.a)(Li(l/4),r);return Object(a.jsx)(Lr.a,{children:u.map((function(t,r){return Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:t.map((function(t){return Object(a.jsx)(e,{tag:t,selectedServer:n,displayed:i===t.tag,toggle:function(){return o(i!==t.tag?t.tag:void 0)}},t.tag)}))},r)}))})}},Ii=function(e){return function(t){var r,n=t.sortedTags,c=t.selectedServer,s=t.location,i=t.orderByColumn,o=t.currentOrder,l=Object(F.useRef)(!0),u=Object(C.a)(s.search).page,d=void 0===u?1:u,j=Object(z.a)("page",Number(d)),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(oa.a)(20,n),f=v.length>1,m=null!==(r=v[h-1])&&void 0!==r?r:[];return Object(F.useEffect)((function(){!l.current&&O(1),l.current=!1}),[n]),Object(F.useEffect)((function(){scrollTo(0,0)}),[h]),Object(a.jsxs)(Vr.a,{bodyClassName:f?"pb-1":"",children:[Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsxs)("thead",{className:"responsive-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:"tags-table__header-cell",onClick:i("tag"),children:["Tag ",Object(a.jsx)(Ge,{currentOrder:o,field:"tag"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("shortUrls"),children:["Short URLs ",Object(a.jsx)(Ge,{currentOrder:o,field:"shortUrls"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("visits"),children:["Visits ",Object(a.jsx)(Ge,{currentOrder:o,field:"visits"})]}),Object(a.jsx)("th",{className:"tags-table__header-cell"})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("th",{colSpan:4,className:"p-0 border-top-0"})})]}),Object(a.jsxs)("tbody",{children:[0===m.length&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:4,className:"text-center",children:"No results found"})}),m.map((function(t){return Object(a.jsx)(e,{tag:t,selectedServer:c},t.tag)}))]})]}),f&&Object(a.jsx)("div",{className:"sticky-card-paginator",children:Object(a.jsx)(la,{pagesCount:v.length,currentPage:h,setCurrentPage:O})})]},h)}},Fi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=Object(z.d)(),l=Object(E.a)(i,2),u=l[0],d=l[1],j=Object(z.d)(),b=Object(E.a)(j,2),h=b[0],O=b[1],f=Object(z.d)(),m=Object(E.a)(f,2),x=m[0],g=m[1],p=Object(v.a)(s);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsxs)("th",{className:"responsive-table__cell","data-th":"Tag",children:[Object(a.jsx)(Xs,{tag:c.tag,colorGenerator:r})," ",c.tag]}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Short URLs",children:Object(a.jsx)(o.b,{to:"/server/".concat(p,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),children:nr(c.shortUrls)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(o.b,{to:"/server/".concat(p,"/tag/").concat(c.tag,"/visits"),children:nr(c.visits)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)(Nr,{toggle:g,isOpen:x,children:[Object(a.jsxs)(B.a,{onClick:O,children:[Object(a.jsx)(L.a,{icon:D.C,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(B.a,{onClick:d,children:[Object(a.jsx)(L.a,{icon:D.Q,fixedWidth:!0,className:"mr-1"})," Delete"]})]})}),Object(a.jsx)(t,{tag:c.tag,toggle:O,isOpen:h}),Object(a.jsx)(e,{tag:c.tag,toggle:d,isOpen:u})]})}},Ai=function(e,t){e.serviceFactory("TagsSelector",ei,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",ri,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return ni})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",si,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",Vi,"TagCard"),e.serviceFactory("TagsTableRow",Fi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Ii,"TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",li,"TagsCards","TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"]));var r=function(e){return function(t){return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(){return function(){var r=Object(x.a)(m.a.mark((function r(n,c){var a,s,i,o,l,u,d,j;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c(),s=a.tagsList,t||!s.loading&&Object(S.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:Ci}),r.prev=4,i=e(c),o=i.listTags,r.next=8,o();case 8:l=r.sent,u=l.tags,d=l.stats,j=(void 0===d?[]:d).reduce((function(e,t){var r=t.tag,n=t.shortUrlsCount,c=t.visitsCount;return e[r]={shortUrlsCount:n,visitsCount:c},e}),{}),n({tags:u,stats:j,type:wi}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:Ni,errorData:Ot(r.t0)});case 19:case"end":return r.stop()}}),r,null,[[4,16]])})));return function(e,t){return r.apply(this,arguments)}}()}}(t.buildShlinkApiClient,e)}};e.factory("listTags",r(!1)),e.factory("forceListTags",r(!0)),e.serviceFactory("filterTags",(function(){return Di})),e.serviceFactory("tagDeleted",(function(){return vi})),e.serviceFactory("tagEdited",(function(){return Si})),e.serviceFactory("deleteTag",Oi,"buildShlinkApiClient"),e.serviceFactory("editTag",yi,"buildShlinkApiClient","ColorGenerator")},Mi=r(298),Gi="shlink/mercure/GET_MERCURE_INFO_START",Pi="shlink/mercure/GET_MERCURE_INFO_ERROR",Bi="shlink/mercure/GET_MERCURE_INFO",Hi=st((nt={},Object(u.a)(nt,Gi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(nt,Pi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(nt,Bi,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),nt),{loading:!0,error:!1}),Wi=function(e){return function(){return function(){var t=Object(x.a)(m.a.mark((function t(r,n){var c,a,s,i,o;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r({type:Gi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:Pi}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:Bi,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:Pi});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},qi=function(e){e.serviceFactory("loadMercureInfo",Wi,"buildShlinkApiClient")},zi=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(Vr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Br.a,{children:Object(a.jsxs)(Qc,{checked:r.enabled,onChange:n,children:["Enable or disable real-time updates.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["Real-time updates are currently being ",Object(a.jsx)("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{className:M()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(Qr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){var t=e.target;return c(Number(t.value))}}),r.enabled&&Object(a.jsxs)("small",{className:"form-text text-muted",children:[void 0!==r.interval&&r.interval>0&&Object(a.jsxs)("span",{children:["Updates will be reflected in the UI every ",Object(a.jsx)("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},Qi=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(Lr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},Ki=function(e,t,r,n){return function(){return Object(a.jsx)(pn.a,{children:Object(a.jsx)(Qi,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},Ji=r(612),Zi="shlink/realTimeUpdates/SET_SETTINGS",Yi=st(Object(u.a)({},Zi,(function(e,t){return Object(Ji.a)(e,Object(Bn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),Xi=function(e){return{type:Zi,realTimeUpdates:{enabled:e}}},$i=function(e){return{type:Zi,realTimeUpdates:{interval:e}}},eo=function(e){return{type:Zi,shortUrlCreation:e}},to=function(e){return{type:Zi,ui:e}},ro=function(e){return{type:Zi,visits:e}},no=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},co=function(e){var t,r,n,c,s,i=e.settings,o=e.setShortUrlCreationSettings,l=null!==(t=i.shortUrlCreation)&&void 0!==t?t:{validateUrls:!1},u=function(e){return function(){return o(Object(d.a)(Object(d.a)({},null!==l&&void 0!==l?l:{validateUrls:!1}),{},{tagFilteringMode:e}))}};return Object(a.jsxs)(Vr.a,{title:"Short URLs form",className:"h-100",children:[Object(a.jsx)(Br.a,{children:Object(a.jsxs)(Qc,{checked:null!==(r=l.validateUrls)&&void 0!==r&&r,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{validateUrls:e}))},children:["Request validation on long URLs when creating new short URLs.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Validate URL"})," checkbox will be ",Object(a.jsx)("b",{children:l.validateUrls?"checked":"unchecked"}),"."]})]})}),Object(a.jsx)(Br.a,{children:Object(a.jsxs)(Qc,{checked:null===(n=l.forwardQuery)||void 0===n||n,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{forwardQuery:e}))},children:["Make all new short URLs forward their query params to the long URL.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Forward query params on redirect"})," checkbox will be ",Object(a.jsx)("b",{children:null===(c=l.forwardQuery)||void 0===c||c?"checked":"unchecked"}),"."]})]})}),Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(Q,{text:no(l.tagFilteringMode),children:[Object(a.jsx)(B.a,{active:!l.tagFilteringMode||"startsWith"===l.tagFilteringMode,onClick:u("startsWith"),children:no("startsWith")}),Object(a.jsx)(B.a,{active:"includes"===l.tagFilteringMode,onClick:u("includes"),children:no("includes")})]}),Object(a.jsx)("small",{className:"form-text text-muted",children:(s=l.tagFilteringMode,"includes"===s?Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"including"})," provided input."]}):Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"starting with"})," provided input."]}))})]})]})},ao=function(e){var t,r,n=e.settings.ui,c=e.setUiSettings;return Object(a.jsxs)(Vr.a,{title:"User interface",className:"h-100",children:[Object(a.jsxs)(Br.a,{children:[Object(a.jsx)(L.a,{icon:"dark"===(null===n||void 0===n?void 0:n.theme)?D.z:D.L,className:"user-interface__theme-icon"}),Object(a.jsx)(Qc,{checked:"dark"===(null===n||void 0===n?void 0:n.theme),onChange:function(e){var t=e?"dark":"light";c(Object(d.a)(Object(d.a)({},n),{},{theme:t})),Object(Yc.g)(t)},children:"Use dark theme."})]}),Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(oi,{mode:null!==(t=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(Dr.a)(e)},onChange:function(e){return c(Object(d.a)(Object(d.a)({},null!==n&&void 0!==n?n:{theme:"light"}),{},{tagsMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==r?r:"cards"}),"."]})]})]})},so=function(e){var t,r=e.onChange,n=e.active,c=e.allText;return Object(a.jsx)(Q,{text:null!==(t=be(n))&&void 0!==t?t:c,children:Object(a.jsx)(ye,{allText:c,active:n,onChange:r})})},io=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(Vr.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Br.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(so,{allText:"All visits",active:null!==(t=null===(r=n.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",onChange:function(e){return c({defaultInterval:e})}})]})})},oo=function(e,t){e.serviceFactory("Settings",Ki,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",oc.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return zi})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return co})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return ao})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return io})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return Xi})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return $i})),e.serviceFactory("setShortUrlCreationSettings",(function(){return eo})),e.serviceFactory("setUiSettings",(function(){return to})),e.serviceFactory("setVisitsSettings",(function(){return ro}))},lo="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",uo=function(e){return function(t,r){return function(){var n=Object(x.a)(m.a.mark((function n(c,a){var s,i,o;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START"}),s=e(a),i=s.editDomainRedirects,n.prev=2,n.next=5,i(Object(d.a)({domain:t},r));case 5:o=n.sent,c({type:lo,domain:t,redirects:o}),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR",errorData:Ot(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},jo="shlink/domainsList/LIST_DOMAINS_START",bo="shlink/domainsList/LIST_DOMAINS_ERROR",ho="shlink/domainsList/LIST_DOMAINS",Oo="shlink/domainsList/FILTER_DOMAINS",vo={domains:[],filteredDomains:[],loading:!1,error:!1},fo=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},mo=st((ct={},Object(u.a)(ct,jo,(function(){return Object(d.a)(Object(d.a)({},vo),{},{loading:!0})})),Object(u.a)(ct,bo,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},vo),{},{error:!0,errorData:t})})),Object(u.a)(ct,ho,(function(e,t){var r=t.domains;return Object(d.a)(Object(d.a)({},vo),{},{domains:r,filteredDomains:r})})),Object(u.a)(ct,Oo,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredDomains:e.domains.filter((function(e){return e.domain.toLowerCase().match(r)}))})})),Object(u.a)(ct,lo,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(fo(r,n)),filteredDomains:e.filteredDomains.map(fo(r,n))})})),ct),vo),xo=function(e){return function(){return function(){var t=Object(x.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:jo}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,r({type:ho,domains:s}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),r({type:bo,errorData:Ot(t.t0)});case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},go=function(e){return{type:Oo,searchTerm:e}},po=r(607),yo=r(617),So=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(z.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(S.a)(r),b=function(){return c("")};return Object(F.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(po.a,{children:[Object(a.jsx)(Qr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(yo.a,{addonType:"append",children:[Object(a.jsx)(Hr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(V.a)(b,u),children:Object(a.jsx)(L.a,{icon:D.R})}),Object(a.jsx)(mr.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(Q,{text:j?"Domain":"Domain: ".concat(r),className:j?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[d.map((function(e){var t=e.domain,n=e.isDefault;return Object(a.jsxs)(B.a,{active:r===t||n&&j,onClick:function(){return c(t)},children:[t,n&&Object(a.jsx)("span",{className:"float-right text-muted",children:"default"})]},t)})),Object(a.jsx)(B.a,{divider:!0}),Object(a.jsx)(B.a,{onClick:Object(V.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},Co=function(e){var t=e.isLast,r=Object(xr.a)(e,["isLast"]);return Object(a.jsx)(yn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},No=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(F.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(F.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(E.a)(v,2),g=f[0],p=f[1],y=Object(F.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),S=Object(E.a)(y,2),C=S[0],N=S[1],w=Object(Dr.b)(Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(u.domain,{baseUrlRedirect:Object(Dr.d)(h),regular404Redirect:Object(Dr.d)(g),invalidShortUrlRedirect:Object(Dr.d)(C)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(_r.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsxs)(Ur.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(Tr.a,{children:[Object(a.jsxs)(Co,{value:h,onChange:O,children:[Object(a.jsxs)(nn,{className:"mr-2",placement:"bottom",children:["Visitors accessing the base url, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),Object(a.jsxs)(Co,{value:g,onChange:p,children:[Object(a.jsxs)(nn,{className:"mr-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),Object(a.jsxs)(Co,{value:C,isLast:!0,onChange:N,children:[Object(a.jsx)(nn,{className:"mr-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"]})]}),Object(a.jsxs)(Rr.a,{children:[Object(a.jsx)(Hr.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)(Hr.a,{color:"primary",children:"Save"})]})]})})},wo=function(e){var t=e.fallback;return Object(a.jsxs)("span",{className:"text-muted",children:[!t&&Object(a.jsx)("small",{children:"No redirect"}),t&&Object(a.jsxs)(a.Fragment,{children:[t," ",Object(a.jsx)("small",{children:"(as fallback)"})]})]})},ko=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(L.a,{fixedWidth:!0,icon:D.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(mr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},_o=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=Object(z.d)(),l=Object(E.a)(o,2),u=l[0],d=l[1],j=c.domain,b=c.isDefault,h=c.redirects;return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:b?Object(a.jsx)(ko,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:j}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===h||void 0===h?void 0:h.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(wo,{fallback:null===i||void 0===i?void 0:i.baseUrlRedirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:null!==(r=null===h||void 0===h?void 0:h.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(wo,{fallback:null===i||void 0===i?void 0:i.regular404Redirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:null!==(n=null===h||void 0===h?void 0:h.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(wo,{fallback:null===i||void 0===i?void 0:i.invalidShortUrlRedirect})}),Object(a.jsxs)("td",{className:"responsive-table__cell text-right",children:[Object(a.jsx)("span",{id:b?"defaultDomainBtn":void 0,children:Object(a.jsx)(Hr.a,{outline:!0,size:"sm",disabled:b,onClick:b?void 0:d,children:Object(a.jsx)(L.a,{fixedWidth:!0,icon:b?D.b:D.m})})}),b&&Object(a.jsxs)(mr.a,{target:"defaultDomainBtn",placement:"left",children:["Redirects for default domain cannot be edited here.",Object(a.jsx)("br",{}),"Use config options or env vars directly on the server."]})]}),Object(a.jsx)(No,{domain:c,isOpen:u,toggle:d,editDomainRedirects:s})]})},Uo=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],To=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=n.filteredDomains,o=n.loading,l=n.error,u=n.errorData,d=null===(t=i.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(F.useEffect)((function(){r()}),[]),o)return Object(a.jsx)(un.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(G,{className:"mb-3",onChange:c}),l?Object(a.jsx)(Ir,{type:"error",children:Object(a.jsx)(Fr,{errorData:u,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(Vr.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsx)("tr",{children:Uo.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[i.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:Uo.length,className:"text-center",children:"No results found"})}),i.map((function(e){return Object(a.jsx)(_o,{domain:e,editDomainRedirects:s,defaultRedirects:d},e.domain)}))]})]})})]})},Ro=function(e,t){e.serviceFactory("DomainSelector",(function(){return So})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return To})),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",xo,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return go})),e.serviceFactory("editDomainRedirects",uo,"buildShlinkApiClient")},Eo="shlink/appUpdates/APP_UPDATE_AVAILABLE",Do="shlink/appUpdates/RESET_APP_UPDATE",Lo=st((at={},Object(u.a)(at,Eo,(function(){return!0})),Object(u.a)(at,Do,(function(){return!1})),at),!1),Vo=it(Eo),Io=it(Do),Fo=r(153),Ao=r(608),Mo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(z.d)(),s=Object(E.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(Ao.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:Vr.a,color:"secondary",children:[Object(a.jsx)("h4",{className:"mb-4",children:"This app has just been updated!"}),Object(a.jsxs)("p",{className:"mb-0",children:["Restart it to enjoy the new features.",Object(a.jsxs)(Hr.a,{disabled:i,className:"ml-2",color:"secondary",size:"sm",onClick:function(){o(),n()},children:[!i&&Object(a.jsxs)(a.Fragment,{children:["Restart now ",Object(a.jsx)(L.a,{icon:D.M,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},Go=r(33),Po=function(){var e=Object(x.a)(m.a.mark((function e(){var t,r,n,c,a,s,i;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=navigator.serviceWorker)||void 0===r?void 0:r.getRegistrations();case 2:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=6;break}e.t0=void 0!==t;case 6:if(!e.t0){e.next=10;break}e.t2=t,e.next=11;break;case 10:e.t2=[];case 11:n=e.t2,c=Object(Go.a)(n);try{for(c.s();!(a=c.n()).done;)s=a.value,null===(i=s.waiting)||void 0===i||i.addEventListener("statechange",(function(e){var t;"activated"===(null===(t=e.target)||void 0===t?void 0:t.state)&&window.location.reload()})),null===i||void 0===i||i.postMessage({type:"SKIP_WAITING"})}catch(o){c.e(o)}finally{c.f()}case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Bo=function(e,t,r,n,c,s,i,o){return function(l){var u=l.fetchServers,d=l.servers,j=l.settings,h=l.appUpdated,O=l.resetAppUpdate,v="/"===l.location.pathname;return Object(F.useEffect)((function(){var e,t;0===Object.keys(d).length&&u(),Object(Yc.g)(null!==(e=null===(t=j.ui)||void 0===t?void 0:t.theme)&&void 0!==e?e:"light")}),[]),Object(a.jsxs)("div",{className:"container-fluid app-container",children:[Object(a.jsx)(e,{}),Object(a.jsxs)("div",{className:"app",children:[Object(a.jsx)("div",{className:M()("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:"/",component:t}),Object(a.jsx)(b.b,{exact:!0,path:"/settings",component:s}),Object(a.jsx)(b.b,{exact:!0,path:"/manage-servers",component:i}),Object(a.jsx)(b.b,{exact:!0,path:"/server/create",component:n}),Object(a.jsx)(b.b,{exact:!0,path:"/server/:serverId/edit",component:c}),Object(a.jsx)(b.b,{path:"/server/:serverId",component:r}),Object(a.jsx)(b.b,{component:Fo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(o,{})})]}),Object(a.jsx)(Mo,{isOpen:h,toggle:O,forceUpdate:Po})]})}},Ho=function(e,t,r){e.serviceFactory("App",Bo,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.decorator("App",r),e.serviceFactory("appUpdateAvailable",(function(){return Vo})),e.serviceFactory("resetAppUpdate",(function(){return Io}))},Wo=new j.a,qo=Wo.container,zo=function(e,t){return Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},t,function(e,t){return function(){return e[t].apply(e,arguments)}}(qo,t)))},Qo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(i.b)(e?Object(h.a)(e):null,t.reduce(zo,{}))};Ho(Wo,Qo,b.h),Object(R.a)(Wo,Qo,b.h),T(Wo),mn(Wo,Qo,b.h),yc(Wo,Qo,b.h),Ai(Wo,Qo),Js(Wo,Qo),Object(Mi.a)(Wo),qi(Wo),oo(Wo,Qo),Ro(Wo,Qo);var Ko=qo,Jo=r(301),Zo=r(80),Yo=r(222),Xo=Object(Zo.c)({servers:Zn,selectedServer:Mn,shortUrlsList:Bt,shortUrlsListParams:Qt,shortUrlCreationResult:Tt,shortUrlDeletion:yt,shortUrlEdition:Ft,shortUrlVisits:hs,tagVisits:ws,orphanVisits:As,shortUrlDetail:vn,tagsList:Ei,tagDelete:hi,tagEdit:pi,mercureInfo:Hi,settings:Yi,domainsList:mo,visitsOverview:zs,appUpdated:Lo}),$o=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Zo.d,el={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},tl=Object(Zo.e)(Xo,Object(Yo.load)(el),$o(Object(Zo.a)(Object(Yo.save)(el),Jo.a))),rl=r(64),nl=r.n(rl),cl=r(302),al=r(303),sl=r(304),il=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function ol(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var r=e.installing;null!=r&&(r.onstatechange=function(){"installed"===r.state&&(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(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}r(532),r(533);delete nl.a.Icon.Default.prototype._getIconUrl,nl.a.Icon.Default.mergeOptions({iconRetinaUrl:cl.a,iconUrl:al.a,shadowUrl:sl.a});var ll=Ko.App,ul=Ko.ScrollToTop,dl=Ko.ErrorHandler,jl=Ko.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:tl,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(dl,{children:Object(a.jsx)(ul,{children:Object(a.jsx)(ll,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/develop")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/develop","/service-worker.js");il?(!function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then((function(r){var n=r.headers.get("content-type");404===r.status||null!=n&&-1===n.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):ol(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")}))):ol(t,e)}))}}({onUpdate:function(){tl.dispatch(jl())}})},54:function(e,t,r){"use strict";var n=r(0),c=r(539),a=r(315),s=r(7),i=r.n(s),o=r(11),l=r(12),u=function(e){return{error:"border-danger",default:""}[e]},d=function(e){return{error:"text-danger",default:"text-muted"}[e]};t.a=function(e){var t=e.className,r=e.children,s=e.loading,j=void 0!==s&&s,b=e.type,h=void 0===b?"default":b,O=e.fullWidth,v=void 0!==O&&O,f=i()({"col-md-12":v,"col-md-10 offset-md-1":!v});return Object(n.jsx)(c.a,{noGutters:!0,className:t,children:Object(n.jsx)("div",{className:f,children:Object(n.jsx)(a.a,{className:u(h),body:!0,children:Object(n.jsxs)("h3",{className:i()("text-center mb-0",d(h)),children:[j&&Object(n.jsx)(l.a,{icon:o.k,spin:!0}),j&&Object(n.jsx)("span",{className:"ml-2",children:null!==r&&void 0!==r?r:"Loading..."}),!j&&r]})})})})}},60:function(e,t,r){"use strict";var n=r(0);t.a=function(e){var t=e.children;return Object(n.jsx)("div",{className:"no-menu-wrapper container-xl",children:t})}},70:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u}));var n=r(168),c=r(540),a=r(545),s=r(31),i=function(e,t){var r=t.maxVersion,c=t.minVersion;if(!Object(s.c)(e))return!1;var a=!c||Object(n.compare)(e,c,">=");return(!r||Object(n.compare)(e,r,"<="))&&a},o=Object(c.a)(a.a,(function(e){try{return Object(n.compare)(e,e,"=")}catch(t){return!1}})),l=function(e){return o(e)?"v".concat(e):e},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"latest";return function(t){return o(t)?t:e}}}},[[318,1,2]]]); +//# sourceMappingURL=main.3a706a99.chunk.js.map \ No newline at end of file diff --git a/develop/static/js/main.3a706a99.chunk.js.map b/develop/static/js/main.3a706a99.chunk.js.map new file mode 100644 index 00000000..586fcf63 --- /dev/null +++ b/develop/static/js/main.3a706a99.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["servers/helpers/withoutSelectedServer.tsx","utils/helpers/files.ts","common/img/ShlinkLogo.tsx","servers/helpers/withSelectedServer.tsx","common/NotFound.tsx","servers/ServersListGroup.tsx","utils/helpers/hooks.ts","common/services/provideServices.ts","common/ScrollToTop.tsx","common/ErrorHandler.tsx","common/services/ImageDownloader.ts","utils/services/provideServices.ts","utils/services/LocalStorage.ts","servers/data/index.ts","utils/services/ColorGenerator.ts","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","common/MainHeader.tsx","utils/utils.ts","common/Home.tsx","common/MenuLayout.tsx","common/AsideMenu.tsx","utils/SimpleCard.tsx","utils/helpers/features.ts","utils/theme/index.ts","utils/helpers/query.ts","utils/SearchField.tsx","api/services/ShlinkApiClient.ts","api/services/ShlinkApiClientBuilder.ts","api/services/provideServices.ts","tags/helpers/Tag.tsx","utils/DropdownBtn.tsx","utils/helpers/date.ts","utils/dates/types/index.ts","utils/DateInput.tsx","utils/dates/DateRangeRow.tsx","utils/dates/DateIntervalDropdownItems.tsx","utils/dates/DateRangeSelector.tsx","short-urls/helpers/hooks.ts","short-urls/SearchBar.tsx","utils/helpers/ordering.ts","utils/SortingDropdown.tsx","mercure/helpers/boundToMercureHub.tsx","mercure/helpers/index.ts","mercure/helpers/Topics.ts","utils/table/TableOrderIcon.tsx","utils/helpers/redux.ts","visits/VisitsStats.tsx","short-urls/helpers/index.ts","visits/reducers/visitCreation.ts","api/utils/index.ts","short-urls/reducers/shortUrlDeletion.ts","short-urls/reducers/shortUrlCreation.ts","short-urls/reducers/shortUrlEdition.ts","short-urls/reducers/shortUrlsList.ts","short-urls/reducers/shortUrlsListParams.ts","utils/helpers/numbers.ts","utils/helpers/pagination.ts","short-urls/Paginator.tsx","short-urls/ShortUrlsList.tsx","utils/CopyToClipboardIcon.tsx","utils/Time.tsx","short-urls/helpers/ShortUrlDetailLink.tsx","short-urls/helpers/ShortUrlVisitsCount.tsx","short-urls/helpers/ShortUrlsRow.tsx","utils/DropdownBtnMenu.tsx","short-urls/helpers/ShortUrlsRowMenu.tsx","short-urls/CreateShortUrl.tsx","utils/Result.tsx","api/ShlinkApiError.tsx","short-urls/helpers/DeleteShortUrlModal.tsx","short-urls/helpers/CreateShortUrlResult.tsx","short-urls/ShortUrlsTable.tsx","short-urls/helpers/qr-codes/QrFormatDropdown.tsx","short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.tsx","short-urls/helpers/QrCodeModal.tsx","utils/helpers/qrCodes.ts","utils/BooleanControl.tsx","utils/Checkbox.tsx","short-urls/UseExistingIfFoundInfoIcon.tsx","utils/InfoTooltip.tsx","short-urls/helpers/ShortUrlFormCheckboxGroup.tsx","short-urls/ShortUrlForm.tsx","short-urls/EditShortUrl.tsx","short-urls/reducers/shortUrlDetail.ts","short-urls/services/provideServices.ts","utils/FormGroupContainer.tsx","servers/helpers/ServerForm.tsx","servers/CreateServer.tsx","servers/ServersDropdown.tsx","servers/DeleteServerModal.tsx","servers/DeleteServerButton.tsx","servers/EditServer.tsx","servers/helpers/ImportServersBtn.tsx","servers/reducers/selectedServer.ts","servers/reducers/servers.ts","servers/reducers/remoteServers.ts","servers/helpers/ForServerVersion.tsx","servers/helpers/ServerError.tsx","servers/Overview.tsx","servers/ManageServers.tsx","servers/ManageServersRow.tsx","servers/ManageServersRowDropdown.tsx","servers/services/ServersImporter.ts","servers/services/ServersExporter.ts","servers/services/provideServices.ts","visits/VisitsHeader.tsx","visits/ShortUrlVisitsHeader.tsx","utils/helpers/visits.ts","utils/ToggleSwitch.tsx","utils/helpers/charts.ts","visits/charts/LineChartCard.tsx","common/SimplePaginator.tsx","visits/VisitsTable.tsx","visits/helpers/MapModal.tsx","visits/helpers/OpenMapModalBtn.tsx","visits/types/helpers.ts","visits/services/VisitsParser.ts","visits/helpers/VisitsFilterDropdown.tsx","visits/charts/DoughnutChartLegend.tsx","visits/charts/DoughnutChart.tsx","visits/charts/ChartCard.tsx","visits/charts/DoughnutChartCard.tsx","utils/PaginationDropdown.tsx","visits/charts/HorizontalBarChart.tsx","visits/charts/SortableBarChartCard.tsx","visits/ShortUrlVisits.tsx","visits/reducers/common.ts","visits/reducers/shortUrlVisits.ts","visits/TagVisitsHeader.tsx","visits/TagVisits.tsx","visits/reducers/tagVisits.ts","visits/OrphanVisitsHeader.tsx","visits/OrphanVisits.tsx","visits/reducers/orphanVisits.ts","visits/reducers/visitsOverview.ts","visits/services/VisitsExporter.ts","visits/services/provideServices.ts","tags/helpers/TagBullet.tsx","tags/helpers/TagsSelector.tsx","tags/TagCard.tsx","tags/helpers/DeleteTagConfirmModal.tsx","tags/helpers/EditTagModal.tsx","tags/data/TagsListChildrenProps.ts","tags/TagsModeDropdown.tsx","tags/TagsList.tsx","tags/reducers/tagDelete.ts","tags/reducers/tagEdit.ts","tags/reducers/tagsList.ts","tags/TagsCards.tsx","tags/TagsTable.tsx","tags/TagsTableRow.tsx","tags/services/provideServices.ts","mercure/reducers/mercureInfo.ts","mercure/services/provideServices.ts","settings/RealTimeUpdates.tsx","settings/Settings.tsx","settings/reducers/settings.ts","settings/ShortUrlCreation.tsx","settings/UserInterface.tsx","utils/dates/DateIntervalSelector.tsx","settings/Visits.tsx","settings/services/provideServices.ts","domains/reducers/domainRedirects.ts","domains/reducers/domainsList.ts","domains/DomainSelector.tsx","domains/helpers/EditDomainRedirectsModal.tsx","domains/DomainRow.tsx","domains/ManageDomains.tsx","domains/services/provideServices.ts","app/reducers/appUpdates.ts","common/AppUpdateBanner.tsx","utils/helpers/sw.ts","app/App.tsx","app/services/provideServices.ts","container/index.ts","reducers/index.ts","container/store.ts","serviceWorkerRegistration.ts","utils/helpers/leaflet.ts","index.tsx","utils/Message.tsx","common/NoMenuLayout.tsx","utils/helpers/version.ts"],"names":["withoutSelectedServer","WrappedComponent","props","useEffect","resetSelectedServer","saveUrl","url","filename","document","link","createElement","setAttribute","style","visibility","body","appendChild","click","removeChild","saveCsv","window","csv","blob","Blob","type","URL","createObjectURL","ShlinkLogo","color","MAIN_COLOR","className","viewBox","version","xmlns","fill","d","withSelectedServer","ServerError","selectServer","selectedServer","match","params","serverId","isNotFoundServer","loading","NotFound","to","children","ServerListItem","id","name","ListGroupItem","tag","Link","icon","chevronIcon","ServersListGroup","servers","embedded","length","ListGroup","classNames","map","useStateFlagTimeout","setTimeout","clearTimeout","initialValue","delay","useState","flag","setFlag","timeout","useRef","undefined","callback","current","useToggle","useSwipeable","showSidebar","hideSidebar","swipeMenuIfNoModalExists","e","event","composedPath","some","classList","contains","querySelector","useReactSwipeable","delta","onSwipedLeft","onSwipedRight","useQueryState","paramName","initialState","value","setValue","location","history","query","parseQuery","search","pushState","pathname","stringifyQuery","provideServices","bottle","connect","withRouter","constant","global","console","axios","service","ImageDownloader","serviceFactory","ScrollToTop","decorator","MainHeader","Home","MenuLayout","AsideMenu","ShlinkVersionsContainer","ErrorHandler","scrollTo","error","state","hasError","this","outline","onClick","reload","Component","imgUrl","get","responseType","data","localStorage","LocalStorage","ColorGenerator","buildPath","path","key","item","getItem","JSON","parse","set","setItem","stringify","hasServerData","server","apiKey","isServerWithId","hasOwnProperty","isReachableServer","getServerId","serverWithIdToServerData","omit","floor","Math","random","letters","normalizeKey","toLowerCase","trim","storage","colors","getColorForKey","normalizedKey","setColorForKey","rangeOf","join","normalizeVersion","pipe","versionToSemVer","versionToPrintable","VersionLink","project","href","ShlinkVersions","clientVersion","normalizedClientVersion","printableVersion","classes","ServersDropdown","isOpen","toggleOpen","close","settingsPath","toggleClass","Navbar","dark","fixed","expand","NavbarBrand","NavbarToggler","arrowIcon","Collapse","navbar","Nav","NavItem","NavLink","active","cogsIcon","size","mappingFn","startAt","range","hasValue","isNil","isEmpty","handleEventPreventingDefault","handler","preventDefault","nonEmptyValueOrNull","capitalize","charAt","toUpperCase","slice","serversList","values","hasServers","autoConnectServer","find","autoConnect","push","Card","Row","noGutters","faPlus","faExternalLinkAlt","TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","Overview","EditShortUrl","ManageDomains","sidebarVisible","toggleSidebar","addOrphanVisitsRoute","supportsOrphanVisits","addManageDomainsRoute","supportsDomainRedirects","burgerClasses","swipeableProps","burgerIcon","showOnMobile","exact","from","component","render","AsideMenuItem","rest","activeClassName","DeleteServerButton","hasId","addManageDomainsLink","asideClass","suffix","fixedWidth","overviewIcon","isActive","_","listIcon","createIcon","flip","tagsIcon","domainsIcon","editIcon","textClassName","SimpleCard","title","bodyClassName","serverMatchesVersions","versions","versionMatch","supportsQrCodeSizeInQuery","minVersion","supportsShortUrlTitle","supportsQrCodeMargin","supportsTagsInPatch","supportsBotVisits","supportsCrawlableVisits","supportsQrErrorCorrection","supportsForwardQuery","MAIN_COLOR_ALPHA","HIGHLIGHTED_COLOR","HIGHLIGHTED_COLOR_ALPHA","PRIMARY_LIGHT_COLOR","PRIMARY_DARK_COLOR","changeThemeInMarkup","theme","html","getElementsByTagName","isDarkThemeEnabled","getAttribute","qs","ignoreQueryPrefix","arrayFormat","timer","buildShlinkBaseUrl","apiVersion","rejectNilProps","reject","ShlinkApiClient","baseUrl","listShortUrls","a","performRequest","then","shortUrls","createShortUrl","options","filteredOptions","resp","getShortUrlVisits","shortCode","visits","getTagVisits","getOrphanVisits","getVisitsOverview","getShortUrl","domain","deleteShortUrl","updateShortUrlTags","tags","updateShortUrl","listTags","withStats","stats","deleteTags","editTag","oldName","newName","health","mercureInfo","listDomains","domains","editDomainRedirects","domainRedirects","method","headers","paramsSerializer","response","apiClients","buildShlinkApiClient","getStateOrSelectedServer","getState","isGetState","prop","Error","clientKey","SearchField","onChange","large","noBorder","searchTerm","setSearchTerm","resetTimer","searchTermChanged","newSearchTerm","placeholder","target","searchIcon","hidden","Tag","text","clearable","colorGenerator","onClose","backgroundColor","cursor","DropdownBtn","disabled","dropdownClassName","right","minWidth","toggle","toggleClasses","Dropdown","DropdownToggle","caret","DropdownMenu","isDateObject","date","formatDateFromFormat","theFormat","format","formatISO","formatIsoDate","formatInternational","formatDate","parseISO","stdParseISO","isBetween","start","end","isBefore","isAfter","isWithinInterval","dateRangeIsEmpty","dateRange","filter","Boolean","rangeIsInterval","INTERVAL_TO_STRING_MAP","today","yesterday","last7Days","last30Days","last90Days","last180days","last365Days","all","DATE_INTERVALS","Object","keys","rangeOrIntervalToString","startDate","endDate","dateRangeToString","startOfDaysAgo","daysAgo","startOfDay","subDays","Date","endingToday","endOfDay","intervalToDateRange","dateInterval","DateInput","isClearable","selected","showCalendarIcon","ref","dateFormat","calendarIcon","input","focus","DateRangeRow","onStartDateChange","onEndDateChange","placeholderText","maxDate","minDate","DateIntervalDropdownItems","allText","DropdownItem","divider","interval","DateRangeSelector","onDatesChange","initialDateRange","defaultText","initialIntervalIsRange","activeInterval","setActiveInterval","activeDateRange","setActiveDateRange","updateDateRange","header","useShortUrlsQuery","useMemo","extra","evolvedQuery","queryString","dateOrNull","SearchBar","toFirstPage","selectedTags","split","setDates","setSearch","removeTag","selectedTag","tagsList","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","sortList","list","field","dir","sort","b","greaterThan","smallerThan","SortingDropdown","items","order","isButton","handleItemClick","fieldKey","newOrderDir","UncontrolledDropdown","toPairs","fieldValue","sortAscIcon","sortDescIcon","boundToMercureHub","getTopicsForProps","pendingUpdates","Set","createNewVisits","loadMercureInfo","closeEventSource","topics","onMessage","onTokenExpired","mercureHubUrl","token","onEventSourceMessage","onEventSourceError","status","subscriptions","topic","hubUrl","searchParams","append","es","EventSource","Authorization","onmessage","onerror","forEach","bindToMercureTopic","visit","add","setInterval","clear","clearInterval","Topics","TableOrderIcon","currentOrder","caretUpIcon","caretDownIcon","orphanVisits","shortUrlVisits","selectedBar","buildReducer","action","actionHandler","currentState","buildActionCreator","shortUrlMatches","shortUrl","CREATE_VISITS","createdVisits","parseApiError","isInvalidDeletionError","DELETE_SHORT_URL_START","DELETE_SHORT_URL_ERROR","SHORT_URL_DELETED","RESET_DELETE_SHORT_URL","errorData","dispatch","resetDeleteShortUrl","CREATE_SHORT_URL_START","CREATE_SHORT_URL_ERROR","CREATE_SHORT_URL","RESET_CREATE_SHORT_URL","result","saving","resetCreateShortUrl","EDIT_SHORT_URL_START","EDIT_SHORT_URL_ERROR","SHORT_URL_EDITED","editShortUrl","sendTagsSeparately","Promise","LIST_SHORT_URLS_START","LIST_SHORT_URLS_ERROR","LIST_SHORT_URLS","assocPath","pagination","totalItems","currentShortUrl","lastVisit","last","assoc","visitsCount","init","editedShortUrl","RESET_SHORT_URL_PARAMS","SORTABLE_FIELDS","dateCreated","longUrl","page","orderBy","resetShortUrlParams","ceil","formatter","Intl","NumberFormat","prettify","number","Number","ELLIPSIS","progressivePagination","currentPage","pageCount","pages","max","min","unshift","pageIsEllipsis","pageNumber","prettifyPageNumber","keyForPage","index","Paginator","paginator","currentQueryString","pagesCount","urlForPage","Pagination","listClassName","PaginationItem","PaginationLink","previous","next","ShortUrlsTable","shortUrlsListParams","shortUrlsList","head","setOrder","refreshList","extraParams","handleOrderBy","addTag","newTag","itemsPerPage","orderByColumn","renderOrderIcon","onTagClick","CopyToClipboardIcon","onCopy","copyIcon","Time","relative","dateObject","dateTime","getUnixTime","formatDistance","buildUrl","ShortUrlDetailLink","ShortUrlVisitsCount","maxVisits","meta","visitsLink","prettifiedMaxVisits","tooltipRef","el","infoIcon","UncontrolledTooltip","placement","ShortUrlsRow","ShortUrlsRowMenu","copiedToClipboard","setCopiedToClipboard","setActive","isFirstRun","data-th","DropdownBtnMenu","ButtonDropdown","menuIcon","DeleteShortUrlModal","QrCodeModal","isQrModalOpen","toggleQrCode","isDeleteModalOpen","toggleDelete","pieChartIcon","qrIcon","deleteIcon","ShortUrlForm","CreateShortUrlResult","shortUrlCreationResult","basicMode","shortUrlCreationSettings","settings","shortUrlCreation","customSlug","shortCodeLength","validSince","validUntil","findIfExists","validateUrl","validateUrls","forwardQuery","getInitialState","mode","onSave","canBeClosed","Result","small","ShlinkApiError","fallbackMessage","detail","invalidElements","shortUrlDeletion","inputValue","setInputValue","handleDeleteUrl","catch","identity","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","actionableFieldClasses","orderableColumnsClasses","tableClasses","supportsTitle","colSpan","QrFormatDropdown","setFormat","QrErrorCorrectionDropdown","errorCorrection","setErrorCorrection","imageDownloader","ForServerVersion","setSize","margin","setMargin","capabilities","useSizeInPath","marginIsSupported","errorCorrectionIsSupported","willRenderThreeControls","qrCodeUrl","buildQrCodeUrl","totalSize","modalSize","step","src","alt","Button","block","saveImage","downloadIcon","BooleanControl","checked","inline","uuid","typeClasses","display","htmlFor","Checkbox","InfoModal","UseExistingIfFoundInfoIcon","isModalOpen","toggleModal","InfoTooltip","ShortUrlFormCheckboxGroup","infoTooltip","normalizeTag","replace","toDate","dynamicColClasses","TagsSelector","DomainSelector","shortUrlData","setShortUrlData","isEdit","hadTitleOriginally","resolveNewTitle","hasNewTitle","cond","T","matcher","submit","renderOptionalInput","Input","renderDateInput","basicComponents","bsSize","required","showCustomizeCard","limitAccessCardClasses","showCrawlableControl","showForwardQueryControl","showBehaviorCard","extraChecksCardClasses","crawlable","goBack","shortUrlDetail","getShortUrlDetail","shortUrlEdition","savingError","savingErrorData","savingSucceeded","isSuccessful","isNotSuccessful","Message","faArrowLeft","GET_SHORT_URL_DETAIL_START","GET_SHORT_URL_DETAIL_ERROR","GET_SHORT_URL_DETAIL","FormGroupContainer","labelClassName","forId","FormGroup","ServerForm","initialValues","setName","setUrl","setApiKey","handleSubmit","ImportResult","CreateServer","ImportServersBtn","createServer","serversImported","setServersImported","errorImporting","setErrorImporting","NoMenuLayout","serverData","tooltipPlacement","onImport","onImportError","nav","inNavbar","serverIcon","plusIcon","DeleteServerModal","deleteServer","redirectHome","showModal","hideModal","EditServer","editServer","importServersFromFile","createServers","fileRef","files","importIcon","accept","SELECT_SERVER","RESET_SELECTED_SERVER","toSemVer","getServerVersion","memoizeWith","_serverId","serverNotFound","serverNotReachable","EDIT_SERVER","DELETE_SERVER","CREATE_SERVERS","SET_AUTO_CONNECT","newServers","dissoc","fromPairs","evaluatedServerId","serversListToMap","reduce","acc","setAutoConnect","responseToServersList","Array","isArray","fetchServers","homepage","remoteList","maxVersion","fullWidth","loadVisitsOverview","visitsOverview","loadingTags","loadingVisits","orphanVisitsCount","useHistory","CardTitle","CardText","CardHeader","CardBody","encodeURIComponent","ManageServers","serversExporter","ManageServersRow","allServers","setServersList","hasAutoConnect","exportServers","exportIcon","width","ManageServersRowDropdown","checkIcon","isMenuOpen","toggleMenu","serverUrl","isAutoConnect","autoConnectIcon","toggleOffIcon","toggleOnIcon","connectIcon","validateServer","validateServers","every","ServersImporter","csvJson","fileReaderFactory","file","reader","resolve","addEventListener","content","toString","toObject","readAsText","ServersExporter","csvjson","toCSV","FileReader","VisitsHeader","ShortUrlVisitsHeader","shortLink","longLink","visitsStatsTitle","DEFAULT","BROWSERS_WHITELIST","extractDomain","includes","fillTheGaps","labels","zipObj","ToggleSwitch","pointerOnHover","native","firstElement","renderChartLabel","dataset","formattedValue","label","renderPieChartLabel","STEPS_MAP","monthly","weekly","daily","hourly","STEP_TO_DURATION_MAP","hours","days","weeks","months","STEP_TO_DIFF_FUNC_MAP","differenceInHours","differenceInDays","differenceInWeeks","differenceInMonths","STEP_TO_DATE_FORMAT","firstWeekDay","startOfISOWeek","lastWeekDay","endOfISOWeek","groupVisitsByStep","countBy","generateLabelsAndGroupedVisits","groupedVisitsWithGaps","skipNoElements","diffFunc","newerDate","oldestDate","duration","num","generateLabels","generateDataset","tension","borderColor","selectedLabel","chartElementAtEvent","datasetsByPoint","setSelectedVisits","chart","LineChartCard","highlightedVisits","highlightedLabel","oldestVisitDate","now","always","determineInitialStep","setStep","skipNoVisits","toggleSkipNoVisits","visitsToDatasetGroups","reverse","groupedVisits","groupedHighlighted","generateChartDatasets","mainDataset","maintainAspectRatio","plugins","legend","tooltip","intersect","axis","callbacks","scales","y","beginAtZero","ticks","precision","x","onHover","renderLineChart","datasets","getElementAtEvent","entries","menuText","SimplePaginator","setCurrentPage","searchVisits","browser","os","referer","country","city","visitedUrl","visitMatchesSearch","calculateVisits","allVisits","sortedVisits","sortVisits","total","visitsGroups","splitEvery","VisitsTable","selectedVisits","matchMedia","isOrphanVisits","headerCellsClass","matchMobile","matches","isMobileDevice","setIsMobileDevice","resultSet","isFirstLoad","setPage","supportsBots","fullSizeColSpan","listener","removeEventListener","flat","botIcon","isSelected","v","potentialBot","OpenStreetMapTile","TileLayer","attribution","calculateMapProps","locations","bounds","zoom","center","latLong","MapModal","contentClassName","MapContainer","cityName","count","Marker","position","Popup","OpenMapModalBtn","modalTitle","activeCities","mapIsOpened","openMap","closeMap","dropdownIsOpened","toggleDropdown","openDropdown","locationsToShow","setLocationsToShow","buttonRef","openMapWithLocations","filtered","mapIcon","isOrphanVisit","groupNewVisitsByType","groupBy","newVisit","regularVisits","highlightedVisitsToStats","property","toApiParams","excludeBots","visitHasProperty","propertyName","optionalNumericToNumber","numeric","parseFloat","updateLocationsStatsForVisit","updateCountriesStatsForVisit","updateCitiesStatsForVisit","processStatsFromVisits","osStats","updateOsStatsForVisit","browsersStats","updateBrowsersStatsForVisit","browsers","referrersStats","updateReferrersStatsForVisit","referrers","countries","cities","citiesForMapStats","latitude","longitude","currentCity","updateCitiesForMapForVisit","citiesForMap","visitedUrlsStats","isNormalizedOrphanVisit","updateVisitedUrlsForVisit","visitedUrls","normalizeVisits","userAgent","visitLocation","common","bowser","parseUserAgent","countryName","VisitsFilterDropdown","botsSupported","orphanVisitsType","propsForOrphanVisitsTypeItem","DoughnutChartLegend","config","defaultColor","borderWidth","DoughnutChart","memo","chartRef","setChartRef","chartData","generateChartData","height","element","ChartCard","footer","CardFooter","DoughnutChartCard","PaginationDropdown","toggleClassName","ranges","Infinity","dropLabelIfHidden","startsWith","highlightedData","HorizontalBarChart","highlightedStats","statsAreDefined","highlightedKey","stacked","indexAxis","determineHeight","renderChartComponent","customKey","toLowerIfString","toLower","pickKeyFromPair","pickValueFromPair","SortableBarChartCard","sortingItems","extraHeaderContent","withPagination","setItemsPerPage","determineCurrentPagePairs","firstPageLength","i","sortedPairs","pairs","sortBy","getSortedPairsForStats","sortedKeys","sortedHighlightedPairs","currentPageStats","currentPageHighlightedStats","highlightedPages","determineStats","sections","byTime","subPath","faCalendarAlt","byContext","faChartPie","byLocation","faMapMarkedAlt","faList","VisitsNavLink","RouterNavLink","endsWith","VisitsStats","visitsInfo","getVisits","cancelGetVisits","exportCsv","initialInterval","defaultInterval","setDateRange","setHighlightedVisits","setHighlightedLabel","visitsFilter","setVisitsFilter","buildSectionUrl","loadingLarge","progress","normalizedVisits","mapLocations","highlightVisitsForProp","newSelectedBar","propEq","faFileDownload","Progress","striped","pills","section","amount","exportVisits","cancelGetShortUrlVisits","ITEMS_PER_PAGE","isLastPage","calcProgress","getVisitsWithLoader","visitsLoader","extraFinishActionData","actionMap","shouldCancel","loadVisitsInParallel","flatten","loadPagesBlocks","pagesBlocks","concat","loadVisits","pagesRange","finish","GET_SHORT_URL_VISITS_START","GET_SHORT_URL_VISITS_ERROR","GET_SHORT_URL_VISITS","GET_SHORT_URL_VISITS_LARGE","GET_SHORT_URL_VISITS_CANCEL","GET_SHORT_URL_VISITS_PROGRESS_CHANGED","cancelLoad","newVisits","TagVisitsHeader","tagVisits","cancelGetTagVisits","GET_TAG_VISITS_START","GET_TAG_VISITS_ERROR","GET_TAG_VISITS","GET_TAG_VISITS_LARGE","GET_TAG_VISITS_CANCEL","GET_TAG_VISITS_PROGRESS_CHANGED","OrphanVisitsHeader","cancelGetOrphanVisits","GET_ORPHAN_VISITS_START","GET_ORPHAN_VISITS_ERROR","GET_ORPHAN_VISITS","GET_ORPHAN_VISITS_LARGE","GET_ORPHAN_VISITS_CANCEL","GET_ORPHAN_VISITS_PROGRESS_CHANGED","matchesType","GET_OVERVIEW_START","GET_OVERVIEW_ERROR","GET_OVERVIEW","VisitsExporter","visitsParser","TagBullet","toComponentTag","searchMode","tagFilteringMode","tagComponent","onDelete","suggestions","suggestionComponent","allowNew","addOnBlur","minQueryLength","delimiters","suggestionsTransform","removedTagIndex","tagsCopy","splice","onAddition","TagCard","DeleteTagConfirmModal","EditTagModal","displayed","isEditModalOpen","toggleEdit","hasTitle","displayTitle","titleRef","scrollWidth","clientWidth","faLink","faEye","deleteTag","tagDelete","tagDeleted","deleting","doDelete","tagEdited","tagEdit","newTagName","setNewTagName","setColor","showColorPicker","toggleColorPicker","hideColorPicker","editing","saveTag","onClosed","colorIcon","Popover","disableAlpha","hex","TagsModeDropdown","renderTitle","cardsIcon","TagsCards","TagsTable","filterTags","forceListTags","ui","tagsMode","setMode","resolveSortedTags","filteredTags","shortUrlsCount","normalizedTags","sortedTags","renderContent","DELETE_TAG_START","DELETE_TAG_ERROR","DELETE_TAG","TAG_DELETED","EDIT_TAG_START","EDIT_TAG_ERROR","EDIT_TAG","TAG_EDITED","pick","LIST_TAGS_START","LIST_TAGS_ERROR","LIST_TAGS","FILTER_TAGS","renameTag","rejectTag","tagToReject","calculateVisitsPerTag","increase","tagStats","displayedTag","setDisplayedTag","tagsCount","tagsGroups","group","TagsTableRow","pageFromQuery","showPaginator","isDropdownOpen","listTagsActionFactory","force","processedStats","factory","GET_MERCURE_INFO_START","GET_MERCURE_INFO_ERROR","GET_MERCURE_INFO","realTimeUpdates","enabled","info","RealTimeUpdates","toggleRealTimeUpdates","setRealTimeUpdatesInterval","SettingsSections","child","subChild","subIndex","Settings","ShortUrlCreation","UserInterface","Visits","SET_SETTINGS","mergeDeepRight","setShortUrlCreationSettings","setUiSettings","setVisitsSettings","tagFilteringModeText","changeTagsFilteringMode","faMoon","faSun","useDarkTheme","DateIntervalSelector","EDIT_DOMAIN_REDIRECTS","redirects","LIST_DOMAINS_START","LIST_DOMAINS_ERROR","LIST_DOMAINS","FILTER_DOMAINS","filteredDomains","replaceRedirectsOnDomain","filterDomains","domainsList","inputDisplayed","showInput","hideInput","valueIsEmpty","unselectDomain","InputGroup","InputGroupAddon","addonType","faUndo","trigger","isDefault","isLast","EditDomainRedirectsModal","baseUrlRedirect","setBaseUrlRedirect","regular404Redirect","setRegular404Redirect","invalidShortUrlRedirect","setInvalidShortUrlRedirect","Nr","fallback","DefaultDomain","defaultDomainIcon","DomainRow","defaultRedirects","authority","forbiddenIcon","column","APP_UPDATE_AVAILABLE","RESET_APP_UPDATE","appUpdateAvailable","resetAppUpdate","AppUpdateBanner","forceUpdate","isUpdating","setUpdating","Alert","reloadIcon","navigator","serviceWorker","getRegistrations","registrations","registration","waiting","postMessage","App","appUpdated","isHome","Bottle","container","mapActionService","actionName","serviceName","lazyService","propsFromState","actionServiceNames","reduxConnect","provideAppServices","provideCommonServices","provideApiServices","provideShortUrlsServices","provideServersServices","provideTagsServices","provideVisitsServices","provideUtilsServices","provideMercureServices","provideSettingsServices","provideDomainsServices","combineReducers","serversReducer","selectedServerReducer","shortUrlsListReducer","shortUrlsListParamsReducer","shortUrlCreationReducer","shortUrlDeletionReducer","shortUrlEditionReducer","shortUrlVisitsReducer","tagVisitsReducer","orphanVisitsReducer","shortUrlDetailReducer","tagsListReducer","tagDeleteReducer","tagEditReducer","mercureInfoReducer","settingsReducer","domainsListReducer","visitsOverviewReducer","appUpdatesReducer","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","localStorageConfig","states","namespace","namespaceSeparator","debounce","store","createStore","reducers","load","applyMiddleware","save","ReduxThunk","isLocalhost","hostname","registerValidSW","swUrl","register","onupdatefound","installingWorker","installing","onstatechange","controller","log","onUpdate","onSuccess","L","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","marker2x","iconUrl","marker","shadowUrl","markerShadow","basename","getElementById","process","origin","fetch","contentType","indexOf","ready","unregister","checkValidServiceWorker","registerServiceWorker","getClassForType","default","getTextClassForType","preloader","spin","versionToMatch","matchesMinVersion","compare","versionIsValidSemVer","defaultValue"],"mappings":"qJAMO,SAASA,EAA8BC,GAC5C,OAAO,SAACC,GAKN,OAJAC,qBAAU,WACRD,EAAME,wBACL,IAEI,cAACH,EAAD,eAAsBC,O,iCCZjC,oEAAO,IAAMG,EAAU,SAAC,EAAsBC,EAAaC,GAAsB,IAAvDC,EAAsD,EAAtDA,SAClBC,EAAOD,EAASE,cAAc,KAEpCD,EAAKE,aAAa,OAAQL,GAC1BG,EAAKE,aAAa,WAAYJ,GAC9BE,EAAKG,MAAMC,WAAa,SACxBL,EAASM,KAAKC,YAAYN,GAC1BA,EAAKO,QACLR,EAASM,KAAKG,YAAYR,IAGfS,EAAU,SAACC,EAAgBC,EAAab,GACnD,IAAMc,EAAO,IAAIC,KAAK,CAAEF,GAAO,CAAEG,KAAM,4BACjCjB,EAAMkB,IAAIC,gBAAgBJ,GAEhChB,EAAQc,EAAQb,EAAKC,K,kKCRVmB,EAAa,SAAC,GAAD,QAAGC,aAAH,MAAWC,IAAX,EAAuBC,E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UAAWw/C,EAAgB9/C,GAAOT,MAAI,EAA5C,SACE,qBAAIe,UAAW+B,IAAW,mBAAoB29C,EAAoBhgD,IAAlE,UACGoB,GAAW,cAAC,IAAD,CAAiBU,KAAMm+C,IAAWC,MAAI,IACjD9+C,GAAW,sBAAMd,UAAU,OAAhB,gBAAwBiB,QAAxB,IAAwBA,IAAY,gBAC9CH,GAAWG,a,2CCxCV+wB,IAFU,SAAC,GAAD,IAAG/wB,EAAH,EAAGA,SAAH,OAAkB,qBAAKjB,UAAU,+BAAf,SAA+CiB,M,gCCH1F,6IAiBawO,EAAe,SAACowC,EAAD,GAAoF,IAAjD7qB,EAAgD,EAAhDA,WAAYrlB,EAAoC,EAApCA,WACzE,IAAKxE,YAAS00C,GACZ,OAAO,EAGT,IAAMC,GAAqBnwC,GAAcowC,kBAAQF,EAAgBlwC,EAAY,MAG7E,QAF2BqlB,GAAc+qB,kBAAQF,EAAgB7qB,EAAY,QAEjD8qB,GAGxBE,EAAuBtsB,YAAYhJ,KAAU,SAACxqB,GAClD,IACE,OAAO6/C,kBAAQ7/C,EAASA,EAAS,KACjC,MAAOiD,GACP,OAAO,MAIE+F,EAAqB,SAAChJ,GAAD,OAAsB8/C,EAAqB9/C,GAAtB,WAA+CA,GAAdA,GAE3E+I,EAAkB,eAACg3C,EAAD,uDAAwB,SAAxB,OAC7B,SAAC//C,GAAD,OAA6B8/C,EAAqB9/C,GAAWA,EAAU+/C,M","file":"static/js/main.3a706a99.chunk.js","sourcesContent":["import { FC, useEffect } from 'react';\n\ninterface WithoutSelectedServerProps {\n resetSelectedServer: Function;\n}\n\nexport function withoutSelectedServer(WrappedComponent: FC) {\n return (props: WithoutSelectedServerProps & T) => {\n useEffect(() => {\n props.resetSelectedServer();\n }, []);\n\n return ;\n };\n}\n","export const saveUrl = ({ document }: Window, url: string, filename: string) => {\n const link = document.createElement('a');\n\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n};\n\nexport const saveCsv = (window: Window, csv: string, filename: string) => {\n const blob = new Blob([ csv ], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n\n saveUrl(window, url, filename);\n};\n","import { MAIN_COLOR } from '../../utils/theme';\n\nexport interface ShlinkLogoProps {\n color?: string;\n className?: string;\n}\n\nexport const ShlinkLogo = ({ color = MAIN_COLOR, className }: ShlinkLogoProps) => (\n \n \n \n \n \n \n \n \n);\n","import { FC, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport Message from '../../utils/Message';\nimport { isNotFoundServer, SelectedServer } from '../data';\nimport NoMenuLayout from '../../common/NoMenuLayout';\n\ninterface WithSelectedServerProps extends RouteComponentProps<{ serverId: string }> {\n selectServer: (serverId: string) => void;\n selectedServer: SelectedServer;\n}\n\nexport function withSelectedServer(WrappedComponent: FC, ServerError: FC) {\n return (props: WithSelectedServerProps & T) => {\n const { selectServer, selectedServer, match } = props;\n\n useEffect(() => {\n selectServer(match.params.serverId);\n }, [ match.params.serverId ]);\n\n if (!selectedServer) {\n return (\n \n \n \n );\n }\n\n if (isNotFoundServer(selectedServer)) {\n return ;\n }\n\n return ;\n };\n}\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface NotFoundProps {\n to?: string;\n}\n\nconst NotFound: FC = ({ to = '/', children = 'Home' }) => (\n
\n \n

Oops! We could not find requested route.

\n

\n Use your browser's back button to navigate to the page you have previously come from, or just press this\n button.\n

\n
\n {children}\n
\n
\n);\n\nexport default NotFound;\n","import { FC } from 'react';\nimport { ListGroup, ListGroupItem } from 'reactstrap';\nimport { Link } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronRight as chevronIcon } from '@fortawesome/free-solid-svg-icons';\nimport { ServerWithId } from './data';\nimport './ServersListGroup.scss';\n\ninterface ServersListGroupProps {\n servers: ServerWithId[];\n embedded?: boolean;\n}\n\nconst ServerListItem = ({ id, name }: { id: string; name: string }) => (\n \n {name}\n \n \n);\n\nconst ServersListGroup: FC = ({ servers, children, embedded = false }) => (\n <>\n {children &&
{children}
}\n {servers.length > 0 && (\n \n {servers.map(({ id, name }) => )}\n \n )}\n \n);\n\nexport default ServersListGroup;\n","import { useState, useRef } from 'react';\nimport { useSwipeable as useReactSwipeable } from 'react-swipeable';\nimport { parseQuery, stringifyQuery } from './query';\n\nconst DEFAULT_DELAY = 2000;\n\nexport type StateFlagTimeout = (initialValue?: boolean, delay?: number) => [ boolean, () => void ];\n\nexport const useStateFlagTimeout = (\n setTimeout: (callback: Function, timeout: number) => number,\n clearTimeout: (timer: number) => void,\n): StateFlagTimeout => (initialValue = false, delay = DEFAULT_DELAY) => {\n const [ flag, setFlag ] = useState(initialValue);\n const timeout = useRef(undefined);\n const callback = () => {\n setFlag(!initialValue);\n\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => setFlag(initialValue), delay);\n };\n\n return [ flag, callback ];\n};\n\ntype ToggleResult = [ boolean, () => void, () => void, () => void ];\n\nexport const useToggle = (initialValue = false): ToggleResult => {\n const [ flag, setFlag ] = useState(initialValue);\n\n return [ flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false) ];\n};\n\nexport const useSwipeable = (showSidebar: () => void, hideSidebar: () => void) => {\n const swipeMenuIfNoModalExists = (callback: () => void) => (e: any) => {\n const swippedOnVisitsTable = (e.event.composedPath() as HTMLElement[]).some( // eslint-disable-line @typescript-eslint/no-unsafe-call\n ({ classList }) => classList?.contains('visits-table'),\n );\n\n if (swippedOnVisitsTable || document.querySelector('.modal')) {\n return;\n }\n\n callback();\n };\n\n return useReactSwipeable({\n delta: 40,\n onSwipedLeft: swipeMenuIfNoModalExists(hideSidebar),\n onSwipedRight: swipeMenuIfNoModalExists(showSidebar),\n });\n};\n\nexport const useQueryState = (paramName: string, initialState: T): [ T, (newValue: T) => void ] => {\n const [ value, setValue ] = useState(initialState);\n const setValueWithLocation = (value: T) => {\n const { location, history } = window;\n const query = parseQuery(location.search);\n\n query[paramName] = value;\n history.pushState(null, '', `${location.pathname}?${stringifyQuery(query)}`);\n setValue(value);\n };\n\n return [ value, setValueWithLocation ];\n};\n","import axios from 'axios';\nimport Bottle, { Decorator } from 'bottlejs';\nimport ScrollToTop from '../ScrollToTop';\nimport MainHeader from '../MainHeader';\nimport Home from '../Home';\nimport MenuLayout from '../MenuLayout';\nimport AsideMenu from '../AsideMenu';\nimport ErrorHandler from '../ErrorHandler';\nimport ShlinkVersionsContainer from '../ShlinkVersionsContainer';\nimport { ConnectDecorator } from '../../container/types';\nimport { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServer';\nimport { ImageDownloader } from './ImageDownloader';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {\n // Services\n bottle.constant('window', (global as any).window);\n bottle.constant('console', global.console);\n bottle.constant('axios', axios);\n\n bottle.service('ImageDownloader', ImageDownloader, 'axios', 'window');\n\n // Components\n bottle.serviceFactory('ScrollToTop', ScrollToTop);\n bottle.decorator('ScrollToTop', withRouter);\n\n bottle.serviceFactory('MainHeader', MainHeader, 'ServersDropdown');\n bottle.decorator('MainHeader', withRouter);\n\n bottle.serviceFactory('Home', () => Home);\n bottle.decorator('Home', withoutSelectedServer);\n bottle.decorator('Home', withRouter);\n bottle.decorator('Home', connect([ 'servers' ], [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory(\n 'MenuLayout',\n MenuLayout,\n 'TagsList',\n 'ShortUrlsList',\n 'AsideMenu',\n 'CreateShortUrl',\n 'ShortUrlVisits',\n 'TagVisits',\n 'OrphanVisits',\n 'ServerError',\n 'Overview',\n 'EditShortUrl',\n 'ManageDomains',\n );\n bottle.decorator('MenuLayout', connect([ 'selectedServer' ], [ 'selectServer' ]));\n bottle.decorator('MenuLayout', withRouter);\n\n bottle.serviceFactory('AsideMenu', AsideMenu, 'DeleteServerButton');\n\n bottle.serviceFactory('ShlinkVersionsContainer', () => ShlinkVersionsContainer);\n bottle.decorator('ShlinkVersionsContainer', connect([ 'selectedServer' ]));\n\n bottle.serviceFactory('ErrorHandler', ErrorHandler, 'window', 'console');\n};\n\nexport default provideServices;\n","import { PropsWithChildren, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\n\nconst ScrollToTop = () => ({ location, children }: PropsWithChildren) => {\n useEffect(() => {\n scrollTo(0, 0);\n }, [ location ]);\n\n return <>{children};\n};\n\nexport default ScrollToTop;\n","import { Component, ReactNode } from 'react';\nimport { Button } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface ErrorHandlerState {\n hasError: boolean;\n}\n\nconst ErrorHandler = (\n { location }: Window,\n { error }: Console,\n) => class ErrorHandler extends Component {\n public constructor(props: object) {\n super(props);\n this.state = { hasError: false };\n }\n\n public static getDerivedStateFromError(): ErrorHandlerState {\n return { hasError: true };\n }\n\n public componentDidCatch(e: Error): void {\n if (process.env.NODE_ENV !== 'development') {\n error(e);\n }\n }\n\n public render(): ReactNode {\n if (this.state.hasError) {\n return (\n
\n \n

Oops! This is awkward :S

\n

It seems that something went wrong. Try refreshing the page or just click this button.

\n
\n \n
\n
\n );\n }\n\n return this.props.children;\n }\n};\n\nexport default ErrorHandler;\n","import { AxiosInstance } from 'axios';\nimport { saveUrl } from '../../utils/helpers/files';\n\nexport class ImageDownloader {\n public constructor(private readonly axios: AxiosInstance, private readonly window: Window) {}\n\n public async saveImage(imgUrl: string, filename: string): Promise {\n const { data } = await this.axios.get(imgUrl, { responseType: 'blob' });\n const url = URL.createObjectURL(data);\n\n saveUrl(this.window, url, filename);\n }\n}\n","import Bottle from 'bottlejs';\nimport { useStateFlagTimeout } from '../helpers/hooks';\nimport LocalStorage from './LocalStorage';\nimport ColorGenerator from './ColorGenerator';\n\nconst provideServices = (bottle: Bottle) => {\n bottle.constant('localStorage', (global as any).localStorage);\n bottle.service('Storage', LocalStorage, 'localStorage');\n bottle.service('ColorGenerator', ColorGenerator, 'Storage');\n\n bottle.constant('setTimeout', global.setTimeout);\n bottle.constant('clearTimeout', global.clearTimeout);\n bottle.serviceFactory('useStateFlagTimeout', useStateFlagTimeout, 'setTimeout', 'clearTimeout');\n};\n\nexport default provideServices;\n","const PREFIX = 'shlink';\nconst buildPath = (path: string) => `${PREFIX}.${path}`;\n\nexport default class LocalStorage {\n public constructor(private readonly localStorage: Storage) {}\n\n public readonly get = (key: string): T | undefined => {\n const item = this.localStorage.getItem(buildPath(key));\n\n return item ? JSON.parse(item) as T : undefined;\n };\n\n public readonly set = (key: string, value: any) => this.localStorage.setItem(buildPath(key), JSON.stringify(value));\n}\n","import { omit } from 'ramda';\nimport { SemVer } from '../../utils/helpers/version';\n\nexport interface ServerData {\n name: string;\n url: string;\n apiKey: string;\n}\n\nexport interface ServerWithId extends ServerData {\n id: string;\n autoConnect?: boolean;\n}\n\nexport interface ReachableServer extends ServerWithId {\n version: SemVer;\n printableVersion: string;\n}\n\nexport interface NonReachableServer extends ServerWithId {\n serverNotReachable: true;\n}\n\nexport interface NotFoundServer {\n serverNotFound: true;\n}\n\nexport type RegularServer = ReachableServer | NonReachableServer;\n\nexport type SelectedServer = RegularServer | NotFoundServer | null;\n\nexport type ServersMap = Record;\n\nexport const hasServerData = (server: SelectedServer | ServerData): server is ServerData =>\n !!(server as ServerData)?.url && !!(server as ServerData)?.apiKey;\n\nexport const isServerWithId = (server: SelectedServer | ServerWithId): server is ServerWithId =>\n !!server?.hasOwnProperty('id');\n\nexport const isReachableServer = (server: SelectedServer): server is ReachableServer =>\n !!server?.hasOwnProperty('version');\n\nexport const isNotFoundServer = (server: SelectedServer): server is NotFoundServer =>\n !!server?.hasOwnProperty('serverNotFound');\n\nexport const getServerId = (server: SelectedServer) => isServerWithId(server) ? server.id : '';\n\nexport const serverWithIdToServerData = (server: ServerWithId): ServerData =>\n omit([ 'id', 'autoConnect' ], server);\n","import { rangeOf } from '../utils';\nimport LocalStorage from './LocalStorage';\n\nconst HEX_COLOR_LENGTH = 6;\nconst { floor, random } = Math;\nconst letters = '0123456789ABCDEF';\nconst buildRandomColor = () => `#${rangeOf(HEX_COLOR_LENGTH, () => letters[floor(random() * letters.length)]).join('')}`;\nconst normalizeKey = (key: string) => key.toLowerCase().trim();\n\nexport default class ColorGenerator {\n private readonly colors: Record;\n\n public constructor(private readonly storage: LocalStorage) {\n this.colors = this.storage.get>('colors') ?? {};\n }\n\n public readonly getColorForKey = (key: string) => {\n const normalizedKey = normalizeKey(key);\n const color = this.colors[normalizedKey];\n\n // If a color has not been set yet, generate a random one and save it\n if (!color) {\n return this.setColorForKey(normalizedKey, buildRandomColor());\n }\n\n return color;\n };\n\n public readonly setColorForKey = (key: string, color: string) => {\n const normalizedKey = normalizeKey(key);\n\n this.colors[normalizedKey] = color;\n this.storage.set('colors', this.colors);\n\n return color;\n };\n}\n","import { pipe } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport { versionToPrintable, versionToSemVer } from '../utils/helpers/version';\nimport { isReachableServer } from '../servers/data';\nimport { ShlinkVersionsContainerProps } from './ShlinkVersionsContainer';\n\nconst SHLINK_WEB_CLIENT_VERSION = '%_VERSION_%';\nconst normalizeVersion = pipe(versionToSemVer(), versionToPrintable);\n\nexport interface ShlinkVersionsProps extends ShlinkVersionsContainerProps {\n clientVersion?: string;\n}\n\nconst VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => (\n \n {version}\n \n);\n\nconst ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIENT_VERSION }: ShlinkVersionsProps) => {\n const normalizedClientVersion = normalizeVersion(clientVersion);\n\n return (\n \n {isReachableServer(selectedServer) &&\n <>Server: - \n }\n Client: \n \n );\n};\n\nexport default ShlinkVersions;\n","import classNames from 'classnames';\nimport { isReachableServer, SelectedServer } from '../servers/data';\nimport ShlinkVersions from './ShlinkVersions';\nimport './ShlinkVersionsContainer.scss';\n\nexport interface ShlinkVersionsContainerProps {\n selectedServer: SelectedServer;\n}\n\nconst ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => {\n const classes = classNames('text-center', {\n 'shlink-versions-container--with-server': isReachableServer(selectedServer),\n });\n\n return (\n
\n \n
\n );\n};\n\nexport default ShlinkVersionsContainer;\n","import { faChevronDown as arrowIcon, faCogs as cogsIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC, useEffect } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';\nimport classNames from 'classnames';\nimport { RouteComponentProps } from 'react-router';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { ShlinkLogo } from './img/ShlinkLogo';\nimport './MainHeader.scss';\n\nconst MainHeader = (ServersDropdown: FC) => ({ location }: RouteComponentProps) => {\n const [ isOpen, toggleOpen, , close ] = useToggle();\n const { pathname } = location;\n\n useEffect(close, [ location ]);\n\n const settingsPath = '/settings';\n const toggleClass = classNames('main-header__toggle-icon', { 'main-header__toggle-icon--opened': isOpen });\n\n return (\n \n \n Shlink\n \n\n \n \n \n\n \n \n \n \n );\n};\n\nexport default MainHeader;\n","import { isEmpty, isNil, pipe, range } from 'ramda';\nimport { SyntheticEvent } from 'react';\n\nexport const rangeOf = (size: number, mappingFn: (value: number) => T, startAt = 1): T[] =>\n range(startAt, size + 1).map(mappingFn);\n\nexport type Empty = null | undefined | '' | never[];\n\nexport const hasValue = (value: T | Empty): value is T => !isNil(value) && !isEmpty(value);\n\nexport const handleEventPreventingDefault = (handler: () => T) => pipe(\n (e: SyntheticEvent) => e.preventDefault(),\n handler,\n);\n\nexport type Nullable = {\n [P in keyof T]: T[P] | null\n};\n\ntype Optional = T | null | undefined;\n\nexport type OptionalString = Optional;\n\nexport type RecursivePartial = {\n [P in keyof T]?: RecursivePartial;\n};\n\nexport const nonEmptyValueOrNull = (value: T): T | null => isEmpty(value) ? null : value;\n\nexport const capitalize = (value: T): string => `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n","import { useEffect } from 'react';\nimport { isEmpty, values } from 'ramda';\nimport { Link, RouteChildrenProps } from 'react-router-dom';\nimport { Card, Row } from 'reactstrap';\nimport { ExternalLink } from 'react-external-link';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faExternalLinkAlt, faPlus } from '@fortawesome/free-solid-svg-icons';\nimport ServersListGroup from '../servers/ServersListGroup';\nimport { ServersMap } from '../servers/data';\nimport { ShlinkLogo } from './img/ShlinkLogo';\nimport './Home.scss';\n\nexport interface HomeProps extends RouteChildrenProps {\n servers: ServersMap;\n}\n\nconst Home = ({ servers, history }: HomeProps) => {\n const serversList = values(servers);\n const hasServers = !isEmpty(serversList);\n\n useEffect(() => {\n // Try to redirect to the first server marked as auto-connect\n const autoConnectServer = serversList.find(({ autoConnect }) => autoConnect);\n\n autoConnectServer && history.push(`/server/${autoConnectServer.id}`);\n }, []);\n\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n
\n

Welcome!

\n
\n \n {!hasServers && (\n
\n

This application will help you manage your Shlink servers.

\n

\n \n Add a server\n \n

\n

\n \n \n Learn more about Shlink \n \n \n

\n
\n )}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Home;\n","import { FC, useEffect } from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport { faBars as burgerIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport classNames from 'classnames';\nimport { withSelectedServer } from '../servers/helpers/withSelectedServer';\nimport { useSwipeable, useToggle } from '../utils/helpers/hooks';\nimport { supportsDomainRedirects, supportsOrphanVisits } from '../utils/helpers/features';\nimport { isReachableServer } from '../servers/data';\nimport NotFound from './NotFound';\nimport { AsideMenuProps } from './AsideMenu';\nimport './MenuLayout.scss';\n\nconst MenuLayout = (\n TagsList: FC,\n ShortUrlsList: FC,\n AsideMenu: FC,\n CreateShortUrl: FC,\n ShortUrlVisits: FC,\n TagVisits: FC,\n OrphanVisits: FC,\n ServerError: FC,\n Overview: FC,\n EditShortUrl: FC,\n ManageDomains: FC,\n) => withSelectedServer(({ location, selectedServer }) => {\n const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle();\n\n useEffect(() => hideSidebar(), [ location ]);\n\n if (!isReachableServer(selectedServer)) {\n return ;\n }\n\n const addOrphanVisitsRoute = supportsOrphanVisits(selectedServer);\n const addManageDomainsRoute = supportsDomainRedirects(selectedServer);\n const burgerClasses = classNames('menu-layout__burger-icon', { 'menu-layout__burger-icon--active': sidebarVisible });\n const swipeableProps = useSwipeable(showSidebar, hideSidebar);\n\n return (\n <>\n \n\n
\n
\n \n
hideSidebar()}>\n
\n \n \n \n \n \n \n \n \n {addOrphanVisitsRoute && }\n \n {addManageDomainsRoute && }\n List short URLs}\n />\n \n
\n
\n
\n
\n \n );\n}, ServerError);\n\nexport default MenuLayout;\n","import {\n faList as listIcon,\n faLink as createIcon,\n faTags as tagsIcon,\n faPen as editIcon,\n faHome as overviewIcon,\n faGlobe as domainsIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC } from 'react';\nimport { NavLink, NavLinkProps } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { Location } from 'history';\nimport { DeleteServerButtonProps } from '../servers/DeleteServerButton';\nimport { isServerWithId, SelectedServer } from '../servers/data';\nimport { supportsDomainRedirects } from '../utils/helpers/features';\nimport './AsideMenu.scss';\n\nexport interface AsideMenuProps {\n selectedServer: SelectedServer;\n className?: string;\n showOnMobile?: boolean;\n}\n\ninterface AsideMenuItemProps extends NavLinkProps {\n to: string;\n}\n\nconst AsideMenuItem: FC = ({ children, to, className, ...rest }) => (\n \n {children}\n \n);\n\nconst AsideMenu = (DeleteServerButton: FC) => (\n { selectedServer, showOnMobile = false }: AsideMenuProps,\n) => {\n const hasId = isServerWithId(selectedServer);\n const serverId = hasId ? selectedServer.id : '';\n const addManageDomainsLink = supportsDomainRedirects(selectedServer);\n const asideClass = classNames('aside-menu', {\n 'aside-menu--hidden': !showOnMobile,\n });\n const shortUrlsIsActive = (_: null, location: Location) => location.pathname.match('/list-short-urls') !== null;\n const buildPath = (suffix: string) => `/server/${serverId}${suffix}`;\n\n return (\n \n );\n};\n\nexport default AsideMenu;\n","import { CardProps } from 'reactstrap/lib/Card';\nimport { Card, CardBody, CardHeader } from 'reactstrap';\nimport { ReactNode } from 'react';\n\ninterface SimpleCardProps extends Omit {\n title?: ReactNode;\n bodyClassName?: string;\n}\n\nexport const SimpleCard = ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => (\n \n {title && {title}}\n {children}\n \n);\n","import { isReachableServer, SelectedServer } from '../../servers/data';\nimport { versionMatch, Versions } from './version';\n\nconst serverMatchesVersions = (versions: Versions) => (selectedServer: SelectedServer): boolean =>\n isReachableServer(selectedServer) && versionMatch(selectedServer.version, versions);\n\nexport const supportsQrCodeSizeInQuery = serverMatchesVersions({ minVersion: '2.5.0' });\n\nexport const supportsShortUrlTitle = serverMatchesVersions({ minVersion: '2.6.0' });\n\nexport const supportsOrphanVisits = supportsShortUrlTitle;\n\nexport const supportsQrCodeMargin = supportsShortUrlTitle;\n\nexport const supportsTagsInPatch = supportsShortUrlTitle;\n\nexport const supportsBotVisits = serverMatchesVersions({ minVersion: '2.7.0' });\n\nexport const supportsCrawlableVisits = supportsBotVisits;\n\nexport const supportsQrErrorCorrection = serverMatchesVersions({ minVersion: '2.8.0' });\n\nexport const supportsDomainRedirects = supportsQrErrorCorrection;\n\nexport const supportsForwardQuery = serverMatchesVersions({ minVersion: '2.9.0' });\n","export const MAIN_COLOR = '#4696e5';\n\nexport const MAIN_COLOR_ALPHA = 'rgba(70, 150, 229, 0.4)';\n\nexport const HIGHLIGHTED_COLOR = '#f77f28';\n\nexport const HIGHLIGHTED_COLOR_ALPHA = 'rgba(247, 127, 40, 0.4)';\n\nexport const PRIMARY_LIGHT_COLOR = 'white';\n\nexport const PRIMARY_DARK_COLOR = '#161b22';\n\nexport type Theme = 'dark' | 'light';\n\nexport const changeThemeInMarkup = (theme: Theme) => {\n const html = document.getElementsByTagName('html');\n\n html?.[0]?.setAttribute('data-theme', theme);\n};\n\nexport const isDarkThemeEnabled = (): boolean => {\n const html = document.getElementsByTagName('html');\n\n return html?.[0]?.getAttribute('data-theme') === 'dark';\n};\n","import qs from 'qs';\n\nexport const parseQuery = (search: string) => qs.parse(search, { ignoreQueryPrefix: true }) as unknown as T;\n\nexport const stringifyQuery = (query: any): string => qs.stringify(query, { arrayFormat: 'brackets' });\n","import { useState } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSearch as searchIcon } from '@fortawesome/free-solid-svg-icons';\nimport classNames from 'classnames';\nimport './SearchField.scss';\n\nconst DEFAULT_SEARCH_INTERVAL = 500;\nlet timer: NodeJS.Timeout | null;\n\ninterface SearchFieldProps {\n onChange: (value: string) => void;\n className?: string;\n large?: boolean;\n noBorder?: boolean;\n initialValue?: string;\n}\n\nconst SearchField = ({ onChange, className, large = true, noBorder = false, initialValue = '' }: SearchFieldProps) => {\n const [ searchTerm, setSearchTerm ] = useState(initialValue);\n\n const resetTimer = () => {\n timer && clearTimeout(timer);\n timer = null;\n };\n const searchTermChanged = (newSearchTerm: string, timeout = DEFAULT_SEARCH_INTERVAL) => {\n setSearchTerm(newSearchTerm);\n\n resetTimer();\n\n timer = setTimeout(() => {\n onChange(newSearchTerm);\n resetTimer();\n }, timeout);\n };\n\n return (\n
\n searchTermChanged(e.target.value)}\n />\n \n
\n \n );\n};\n\nexport default SearchField;\n","import { isEmpty, isNil, reject } from 'ramda';\nimport { AxiosInstance, AxiosResponse, Method } from 'axios';\nimport { ShortUrl, ShortUrlData } from '../../short-urls/data';\nimport { OptionalString } from '../../utils/utils';\nimport {\n ShlinkHealth,\n ShlinkMercureInfo,\n ShlinkShortUrlsResponse,\n ShlinkTags,\n ShlinkTagsResponse,\n ShlinkVisits,\n ShlinkVisitsParams,\n ShlinkShortUrlData,\n ShlinkDomain,\n ShlinkDomainsResponse,\n ShlinkVisitsOverview,\n ShlinkEditDomainRedirects,\n ShlinkDomainRedirects,\n ShlinkShortUrlsListParams,\n} from '../types';\nimport { stringifyQuery } from '../../utils/helpers/query';\n\nconst buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';\nconst rejectNilProps = reject(isNil);\n\nexport default class ShlinkApiClient {\n private apiVersion: number;\n\n public constructor(\n private readonly axios: AxiosInstance,\n private readonly baseUrl: string,\n private readonly apiKey: string,\n ) {\n this.apiVersion = 2;\n }\n\n public readonly listShortUrls = async (params: ShlinkShortUrlsListParams = {}): Promise =>\n this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', params)\n .then(({ data }) => data.shortUrls);\n\n public readonly createShortUrl = async (options: ShortUrlData): Promise => {\n const filteredOptions = reject((value) => isEmpty(value) || isNil(value), options as any);\n\n return this.performRequest('/short-urls', 'POST', {}, filteredOptions)\n .then((resp) => resp.data);\n };\n\n public readonly getShortUrlVisits = async (shortCode: string, query?: ShlinkVisitsParams): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>(`/short-urls/${shortCode}/visits`, 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getTagVisits = async (tag: string, query?: Omit): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>(`/tags/${tag}/visits`, 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getOrphanVisits = async (query?: Omit): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>('/visits/orphan', 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getVisitsOverview = async (): Promise =>\n this.performRequest<{ visits: ShlinkVisitsOverview }>('/visits', 'GET')\n .then(({ data }) => data.visits);\n\n public readonly getShortUrl = async (shortCode: string, domain?: OptionalString): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'GET', { domain })\n .then(({ data }) => data);\n\n public readonly deleteShortUrl = async (shortCode: string, domain?: OptionalString): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'DELETE', { domain })\n .then(() => {});\n\n /* @deprecated. If using Shlink 2.6.0 or greater, use updateShortUrl instead */\n public readonly updateShortUrlTags = async (\n shortCode: string,\n domain: OptionalString,\n tags: string[],\n ): Promise =>\n this.performRequest<{ tags: string[] }>(`/short-urls/${shortCode}/tags`, 'PUT', { domain }, { tags })\n .then(({ data }) => data.tags);\n\n public readonly updateShortUrl = async (\n shortCode: string,\n domain: OptionalString,\n data: ShlinkShortUrlData,\n ): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'PATCH', { domain }, data)\n .then(({ data }) => data);\n\n public readonly listTags = async (): Promise =>\n this.performRequest<{ tags: ShlinkTagsResponse }>('/tags', 'GET', { withStats: 'true' })\n .then((resp) => resp.data.tags)\n .then(({ data, stats }) => ({ tags: data, stats }));\n\n public readonly deleteTags = async (tags: string[]): Promise<{ tags: string[] }> =>\n this.performRequest('/tags', 'DELETE', { tags })\n .then(() => ({ tags }));\n\n public readonly editTag = async (oldName: string, newName: string): Promise<{ oldName: string; newName: string }> =>\n this.performRequest('/tags', 'PUT', {}, { oldName, newName })\n .then(() => ({ oldName, newName }));\n\n public readonly health = async (): Promise =>\n this.performRequest('/health', 'GET')\n .then((resp) => resp.data);\n\n public readonly mercureInfo = async (): Promise =>\n this.performRequest('/mercure-info', 'GET')\n .then((resp) => resp.data);\n\n public readonly listDomains = async (): Promise =>\n this.performRequest<{ domains: ShlinkDomainsResponse }>('/domains', 'GET').then(({ data }) => data.domains.data);\n\n public readonly editDomainRedirects = async (\n domainRedirects: ShlinkEditDomainRedirects,\n ): Promise =>\n this.performRequest('/domains/redirects', 'PATCH', {}, domainRedirects).then(({ data }) => data);\n\n private readonly performRequest = async (url: string, method: Method = 'GET', query = {}, body = {}): Promise> => {\n try {\n return await this.axios({\n method,\n url: `${buildShlinkBaseUrl(this.baseUrl, this.apiVersion)}${url}`,\n headers: { 'X-Api-Key': this.apiKey },\n params: rejectNilProps(query),\n data: body,\n paramsSerializer: stringifyQuery,\n });\n } catch (e: any) {\n const { response } = e;\n\n // Due to a bug on all previous Shlink versions, requests to non-matching URLs will always result on a CORS error\n // when performed from the browser (due to the preflight request not returning a 2xx status.\n // See https://github.com/shlinkio/shlink/issues/614), which will make the \"response\" prop not to be set here.\n // The bug will be fixed on upcoming Shlink patches, but for other versions, we can consider this situation as\n // if a request has been performed to a not supported API version.\n const apiVersionIsNotSupported = !response;\n\n // When the request is not invalid or we have already tried both API versions, throw the error and let the\n // caller handle it\n if (!apiVersionIsNotSupported || this.apiVersion === 2) {\n throw e;\n }\n\n this.apiVersion = this.apiVersion - 1;\n\n return await this.performRequest(url, method, query, body);\n }\n };\n}\n","import { AxiosInstance } from 'axios';\nimport { prop } from 'ramda';\nimport { hasServerData, SelectedServer, ServerWithId } from '../../servers/data';\nimport { GetState } from '../../container/types';\nimport ShlinkApiClient from './ShlinkApiClient';\n\nconst apiClients: Record = {};\n\nconst isGetState = (getStateOrSelectedServer: GetState | ServerWithId): getStateOrSelectedServer is GetState =>\n typeof getStateOrSelectedServer === 'function';\nconst getSelectedServerFromState = (getState: GetState): SelectedServer => prop('selectedServer', getState());\n\nexport type ShlinkApiClientBuilder = (getStateOrSelectedServer: GetState | ServerWithId) => ShlinkApiClient;\n\nconst buildShlinkApiClient = (axios: AxiosInstance): ShlinkApiClientBuilder => (\n getStateOrSelectedServer: GetState | ServerWithId,\n) => {\n const server = isGetState(getStateOrSelectedServer)\n ? getSelectedServerFromState(getStateOrSelectedServer)\n : getStateOrSelectedServer;\n\n if (!hasServerData(server)) {\n throw new Error('There\\'s no selected server or it is not found');\n }\n\n const { url, apiKey } = server;\n const clientKey = `${url}_${apiKey}`;\n\n if (!apiClients[clientKey]) {\n apiClients[clientKey] = new ShlinkApiClient(axios, url, apiKey);\n }\n\n return apiClients[clientKey];\n};\n\nexport default buildShlinkApiClient;\n","import Bottle from 'bottlejs';\nimport buildShlinkApiClient from './ShlinkApiClientBuilder';\n\nconst provideServices = (bottle: Bottle) => {\n bottle.serviceFactory('buildShlinkApiClient', buildShlinkApiClient, 'axios');\n};\n\nexport default provideServices;\n","import { FC, MouseEventHandler } from 'react';\nimport ColorGenerator from '../../utils/services/ColorGenerator';\nimport './Tag.scss';\n\ninterface TagProps {\n colorGenerator: ColorGenerator;\n text: string;\n className?: string;\n clearable?: boolean;\n onClick?: MouseEventHandler;\n onClose?: MouseEventHandler;\n}\n\nconst Tag: FC = ({ text, children, clearable, className = '', colorGenerator, onClick, onClose }) => (\n \n {children ?? text}\n {clearable && ×}\n \n);\n\nexport default Tag;\n","import { FC } from 'react';\nimport { Dropdown, DropdownMenu, DropdownToggle } from 'reactstrap';\nimport { useToggle } from './helpers/hooks';\nimport './DropdownBtn.scss';\n\nexport interface DropdownBtnProps {\n text: string;\n disabled?: boolean;\n className?: string;\n dropdownClassName?: string;\n right?: boolean;\n minWidth?: number;\n}\n\nexport const DropdownBtn: FC = (\n { text, disabled = false, className = '', children, dropdownClassName, right = false, minWidth },\n) => {\n const [ isOpen, toggle ] = useToggle();\n const toggleClasses = `dropdown-btn__toggle btn-block ${className}`;\n const style = { minWidth: minWidth && `${minWidth}px` };\n\n return (\n \n {text}\n {children}\n \n );\n};\n","import { format, formatISO, isAfter, isBefore, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';\nimport { OptionalString } from '../utils';\n\ntype DateOrString = Date | string;\ntype NullableDate = DateOrString | null;\n\nexport const isDateObject = (date: DateOrString): date is Date => typeof date !== 'string';\n\nconst formatDateFromFormat = (date?: NullableDate, theFormat?: string): OptionalString => {\n if (!date || !isDateObject(date)) {\n return date;\n }\n\n return theFormat ? format(date, theFormat) : formatISO(date);\n};\n\nexport const formatDate = (format = 'yyyy-MM-dd') => (date?: NullableDate) => formatDateFromFormat(date, format);\n\nexport const formatIsoDate = (date?: NullableDate) => formatDateFromFormat(date, undefined);\n\nexport const formatInternational = formatDate();\n\nexport const parseDate = (date: string, format: string) => parse(date, format, new Date());\n\nconst parseISO = (date: DateOrString): Date => isDateObject(date) ? date : stdParseISO(date);\n\nexport const isBetween = (date: DateOrString, start?: DateOrString, end?: DateOrString): boolean => {\n if (!start && end) {\n return isBefore(parseISO(date), parseISO(end));\n }\n\n if (start && !end) {\n return isAfter(parseISO(date), parseISO(start));\n }\n\n if (start && end) {\n return isWithinInterval(parseISO(date), { start: parseISO(start), end: parseISO(end) });\n }\n\n return true;\n};\n","import { subDays, startOfDay, endOfDay } from 'date-fns';\nimport { filter, isEmpty } from 'ramda';\nimport { formatInternational } from '../../helpers/date';\n\nexport interface DateRange {\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport type DateInterval = 'all' | 'today' | 'yesterday' | 'last7Days' | 'last30Days' | 'last90Days' | 'last180days' | 'last365Days';\n\nexport const dateRangeIsEmpty = (dateRange?: DateRange): boolean => dateRange === undefined\n || isEmpty(filter(Boolean, dateRange as any));\n\nexport const rangeIsInterval = (range?: DateRange | DateInterval): range is DateInterval =>\n typeof range === 'string';\n\nconst INTERVAL_TO_STRING_MAP: Record = {\n today: 'Today',\n yesterday: 'Yesterday',\n last7Days: 'Last 7 days',\n last30Days: 'Last 30 days',\n last90Days: 'Last 90 days',\n last180days: 'Last 180 days',\n last365Days: 'Last 365 days',\n all: undefined,\n};\n\nexport const DATE_INTERVALS = Object.keys(INTERVAL_TO_STRING_MAP).filter((value) => value !== 'all') as DateInterval[];\n\nconst dateRangeToString = (range?: DateRange): string | undefined => {\n if (!range || dateRangeIsEmpty(range)) {\n return undefined;\n }\n\n if (range.startDate && !range.endDate) {\n return `Since ${formatInternational(range.startDate)}`;\n }\n\n if (!range.startDate && range.endDate) {\n return `Until ${formatInternational(range.endDate)}`;\n }\n\n return `${formatInternational(range.startDate)} - ${formatInternational(range.endDate)}`;\n};\n\nexport const rangeOrIntervalToString = (range?: DateRange | DateInterval): string | undefined => {\n if (!range || range === 'all') {\n return undefined;\n }\n\n if (!rangeIsInterval(range)) {\n return dateRangeToString(range);\n }\n\n return INTERVAL_TO_STRING_MAP[range];\n};\n\nconst startOfDaysAgo = (daysAgo: number) => startOfDay(subDays(new Date(), daysAgo));\nconst endingToday = (startDate: Date): DateRange => ({ startDate, endDate: endOfDay(new Date()) });\n\nexport const intervalToDateRange = (dateInterval?: DateInterval): DateRange => {\n if (!dateInterval || dateInterval === 'all') {\n return {};\n }\n\n switch (dateInterval) {\n case 'today':\n return endingToday(startOfDay(new Date()));\n case 'yesterday':\n return { startDate: startOfDaysAgo(1), endDate: endOfDay(subDays(new Date(), 1)) };\n case 'last7Days':\n return endingToday(startOfDaysAgo(7));\n case 'last30Days':\n return endingToday(startOfDaysAgo(30));\n case 'last90Days':\n return endingToday(startOfDaysAgo(90));\n case 'last180days':\n return endingToday(startOfDaysAgo(180));\n case 'last365Days':\n return endingToday(startOfDaysAgo(365));\n }\n\n return {};\n};\n","import { useRef } from 'react';\nimport { isNil } from 'ramda';\nimport DatePicker, { ReactDatePickerProps } from 'react-datepicker';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCalendarAlt as calendarIcon } from '@fortawesome/free-regular-svg-icons';\nimport classNames from 'classnames';\nimport './DateInput.scss';\n\nexport type DateInputProps = ReactDatePickerProps;\n\nconst DateInput = (props: DateInputProps) => {\n const { className, isClearable, selected } = props;\n const showCalendarIcon = !isClearable || isNil(selected);\n const ref = useRef<{ input: HTMLInputElement }>();\n\n return (\n
\n \n {showCalendarIcon && (\n ref.current?.input.focus()}\n />\n )}\n
\n );\n};\n\nexport default DateInput;\n","import DateInput from '../DateInput';\nimport { DateRange } from './types';\n\ninterface DateRangeRowProps extends DateRange {\n onStartDateChange: (date: Date | null) => void;\n onEndDateChange: (date: Date | null) => void;\n disabled?: boolean;\n}\n\nconst DateRangeRow = (\n { startDate = null, endDate = null, disabled = false, onStartDateChange, onEndDateChange }: DateRangeRowProps,\n) => (\n
\n
\n \n
\n
\n \n
\n
\n);\n\nexport default DateRangeRow;\n","import { DropdownItem } from 'reactstrap';\nimport { FC } from 'react';\nimport { DATE_INTERVALS, DateInterval, rangeOrIntervalToString } from './types';\n\nexport interface DateIntervalDropdownProps {\n active?: DateInterval;\n allText: string;\n onChange: (interval: DateInterval) => void;\n}\n\nexport const DateIntervalDropdownItems: FC = ({ active, allText, onChange }) => (\n <>\n onChange('all')}>\n {allText}\n \n \n {DATE_INTERVALS.map(\n (interval) => (\n onChange(interval)}>\n {rangeOrIntervalToString(interval)}\n \n ),\n )}\n \n);\n","import { useState } from 'react';\nimport { DropdownItem } from 'reactstrap';\nimport { DropdownBtn } from '../DropdownBtn';\nimport {\n DateInterval,\n DateRange,\n rangeOrIntervalToString,\n intervalToDateRange,\n rangeIsInterval,\n dateRangeIsEmpty,\n} from './types';\nimport DateRangeRow from './DateRangeRow';\nimport { DateIntervalDropdownItems } from './DateIntervalDropdownItems';\n\nexport interface DateRangeSelectorProps {\n initialDateRange?: DateInterval | DateRange;\n disabled?: boolean;\n onDatesChange: (dateRange: DateRange) => void;\n defaultText: string;\n}\n\nexport const DateRangeSelector = (\n { onDatesChange, initialDateRange, defaultText, disabled }: DateRangeSelectorProps,\n) => {\n const initialIntervalIsRange = rangeIsInterval(initialDateRange);\n const [ activeInterval, setActiveInterval ] = useState(initialIntervalIsRange ? initialDateRange : undefined);\n const [ activeDateRange, setActiveDateRange ] = useState(initialIntervalIsRange ? undefined : initialDateRange);\n\n const updateDateRange = (dateRange: DateRange) => {\n setActiveInterval(dateRangeIsEmpty(dateRange) ? 'all' : undefined);\n setActiveDateRange(dateRange);\n onDatesChange(dateRange);\n };\n const updateInterval = (dateInterval: DateInterval) => {\n setActiveInterval(dateInterval);\n setActiveDateRange(undefined);\n onDatesChange(intervalToDateRange(dateInterval));\n };\n\n return (\n \n \n \n Custom:\n \n updateDateRange({ ...activeDateRange, startDate })}\n onEndDateChange={(endDate) => updateDateRange({ ...activeDateRange, endDate })}\n />\n \n \n );\n};\n","import { RouteChildrenProps } from 'react-router-dom';\nimport { useMemo } from 'react';\nimport { isEmpty } from 'ramda';\nimport { parseQuery, stringifyQuery } from '../../utils/helpers/query';\n\ntype ServerIdRouteProps = RouteChildrenProps<{ serverId: string }>;\ntype ToFirstPage = (extra: Partial) => void;\n\nexport interface ShortUrlListRouteParams {\n page: string;\n serverId: string;\n}\n\ninterface ShortUrlsQuery {\n tags?: string;\n search?: string;\n startDate?: string;\n endDate?: string;\n}\n\nexport const useShortUrlsQuery = ({ history, location, match }: ServerIdRouteProps): [ShortUrlsQuery, ToFirstPage] => {\n const query = useMemo(() => parseQuery(location.search), [ location ]);\n const toFirstPageWithExtra = (extra: Partial) => {\n const evolvedQuery = stringifyQuery({ ...query, ...extra });\n const queryString = isEmpty(evolvedQuery) ? '' : `?${evolvedQuery}`;\n\n history.push(`/server/${match?.params.serverId}/list-short-urls/1${queryString}`);\n };\n\n return [ query, toFirstPageWithExtra ];\n};\n","import { faTags as tagsIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { isEmpty, pipe } from 'ramda';\nimport { parseISO } from 'date-fns';\nimport { RouteChildrenProps } from 'react-router-dom';\nimport SearchField from '../utils/SearchField';\nimport Tag from '../tags/helpers/Tag';\nimport { DateRangeSelector } from '../utils/dates/DateRangeSelector';\nimport { formatIsoDate } from '../utils/helpers/date';\nimport ColorGenerator from '../utils/services/ColorGenerator';\nimport { DateRange } from '../utils/dates/types';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\nimport './SearchBar.scss';\n\nexport type SearchBarProps = RouteChildrenProps;\n\nconst dateOrNull = (date?: string) => date ? parseISO(date) : null;\n\nconst SearchBar = (colorGenerator: ColorGenerator) => (props: SearchBarProps) => {\n const [{ search, tags, startDate, endDate }, toFirstPage ] = useShortUrlsQuery(props);\n const selectedTags = tags?.split(',') ?? [];\n const setDates = pipe(\n ({ startDate, endDate }: DateRange) => ({\n startDate: formatIsoDate(startDate) ?? undefined,\n endDate: formatIsoDate(endDate) ?? undefined,\n }),\n toFirstPage,\n );\n const setSearch = pipe(\n (searchTerm: string) => isEmpty(searchTerm) ? undefined : searchTerm,\n (search) => toFirstPage({ search }),\n );\n const removeTag = pipe(\n (tag: string) => selectedTags.filter((selectedTag) => selectedTag !== tag),\n (tagsList) => tagsList.length === 0 ? undefined : tagsList.join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n return (\n
\n \n\n
\n
\n
\n \n
\n
\n
\n\n {selectedTags.length > 0 && (\n

\n \n  \n {selectedTags.map((tag) =>\n removeTag(tag)} />)}\n

\n )}\n
\n );\n};\n\nexport default SearchBar;\n","export type OrderDir = 'ASC' | 'DESC' | undefined;\n\nexport interface Order {\n field?: Fields;\n dir?: OrderDir;\n}\n\nexport const determineOrderDir = (\n currentField: T,\n newField?: T,\n currentOrderDir?: OrderDir,\n): OrderDir => {\n if (currentField !== newField) {\n return 'ASC';\n }\n\n const newOrderMap: Record<'ASC' | 'DESC', OrderDir> = {\n ASC: 'DESC',\n DESC: undefined,\n };\n\n return currentOrderDir ? newOrderMap[currentOrderDir] : 'ASC';\n};\n\nexport const sortList = (list: List[], { field, dir }: Order>) => !field || !dir\n ? list\n : list.sort((a, b) => {\n const greaterThan = dir === 'ASC' ? 1 : -1;\n const smallerThan = dir === 'ASC' ? -1 : 1;\n\n return a[field] > b[field] ? greaterThan : smallerThan;\n });\n","import { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';\nimport { toPairs } from 'ramda';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSortAmountUp as sortAscIcon, faSortAmountDown as sortDescIcon } from '@fortawesome/free-solid-svg-icons';\nimport classNames from 'classnames';\nimport { determineOrderDir, Order, OrderDir } from './helpers/ordering';\nimport './SortingDropdown.scss';\n\nexport interface SortingDropdownProps {\n items: Record;\n order: Order;\n onChange: (orderField?: T, orderDir?: OrderDir) => void;\n isButton?: boolean;\n right?: boolean;\n}\n\nexport default function SortingDropdown(\n { items, order, onChange, isButton = true, right = false }: SortingDropdownProps,\n) {\n const handleItemClick = (fieldKey: T) => () => {\n const newOrderDir = determineOrderDir(fieldKey, order.field, order.dir);\n\n onChange(newOrderDir ? fieldKey : undefined, newOrderDir);\n };\n\n return (\n \n \n {!isButton && <>Order by}\n {isButton && !order.field && <>Order by...}\n {isButton && order.field && `Order by: \"${items[order.field]}\" - \"${order.dir ?? 'DESC'}\"`}\n \n \n {toPairs(items).map(([ fieldKey, fieldValue ]) => (\n \n {fieldValue}\n {order.field === fieldKey && (\n \n )}\n \n ))}\n \n onChange()}>\n Clear selection\n \n \n \n );\n}\n","import { FC, useEffect } from 'react';\nimport { pipe } from 'ramda';\nimport { CreateVisit } from '../../visits/types';\nimport { MercureInfo } from '../reducers/mercureInfo';\nimport { bindToMercureTopic } from './index';\n\nexport interface MercureBoundProps {\n createNewVisits: (createdVisits: CreateVisit[]) => void;\n loadMercureInfo: () => void;\n mercureInfo: MercureInfo;\n}\n\nexport function boundToMercureHub(\n WrappedComponent: FC,\n getTopicsForProps: (props: T) => string[],\n) {\n const pendingUpdates = new Set();\n\n return (props: MercureBoundProps & T) => {\n const { createNewVisits, loadMercureInfo, mercureInfo } = props;\n const { interval } = mercureInfo;\n\n useEffect(() => {\n const onMessage = (visit: CreateVisit) => interval ? pendingUpdates.add(visit) : createNewVisits([ visit ]);\n const closeEventSource = bindToMercureTopic(mercureInfo, getTopicsForProps(props), onMessage, loadMercureInfo);\n\n if (!interval) {\n return closeEventSource;\n }\n\n const timer = setInterval(() => {\n createNewVisits([ ...pendingUpdates ]);\n pendingUpdates.clear();\n }, interval * 1000 * 60);\n\n return pipe(() => clearInterval(timer), () => closeEventSource?.());\n }, [ mercureInfo ]);\n\n return ;\n };\n}\n","import { EventSourcePolyfill as EventSource } from 'event-source-polyfill';\nimport { MercureInfo } from '../reducers/mercureInfo';\n\nexport const bindToMercureTopic = (mercureInfo: MercureInfo, topics: string[], onMessage: (message: T) => void, onTokenExpired: () => void) => { // eslint-disable-line max-len\n const { mercureHubUrl, token, loading, error } = mercureInfo;\n\n if (loading || error || !mercureHubUrl) {\n return undefined;\n }\n\n const onEventSourceMessage = ({ data }: { data: string }) => onMessage(JSON.parse(data) as T);\n const onEventSourceError = ({ status }: { status: number }) => status === 401 && onTokenExpired();\n\n const subscriptions = topics.map((topic) => {\n const hubUrl = new URL(mercureHubUrl);\n\n hubUrl.searchParams.append('topic', topic);\n const es = new EventSource(hubUrl, {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n });\n\n es.onmessage = onEventSourceMessage;\n es.onerror = onEventSourceError;\n\n return es;\n });\n\n return () => subscriptions.forEach((es) => es.close());\n};\n","export class Topics {\n public static readonly visits = 'https://shlink.io/new-visit';\n\n public static readonly orphanVisits = 'https://shlink.io/new-orphan-visit';\n\n public static readonly shortUrlVisits = (shortCode: string) => `https://shlink.io/new-visit/${shortCode}`;\n}\n","import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCaretDown as caretDownIcon, faCaretUp as caretUpIcon } from '@fortawesome/free-solid-svg-icons';\nimport { Order } from '../helpers/ordering';\n\ninterface TableOrderIconProps {\n currentOrder: Order;\n field: T;\n className?: string;\n}\n\nexport function TableOrderIcon(\n { currentOrder, field, className = 'ml-1' }: TableOrderIconProps,\n) {\n if (!currentOrder.dir || currentOrder.field !== field) {\n return null;\n }\n\n return ;\n}\n","import { Action } from 'redux';\n\ntype ActionHandler = (currentState: State, action: AT) => State;\ntype ActionHandlerMap = Record>;\n\nexport const buildReducer = (map: ActionHandlerMap, initialState: State) => (\n state: State | undefined,\n action: AT,\n): State => {\n const { type } = action;\n const actionHandler = map[type];\n const currentState = state ?? initialState;\n\n return actionHandler ? actionHandler(currentState, action) : currentState;\n};\n\nexport const buildActionCreator = (type: T) => (): Action => ({ type });\n","import { isEmpty, propEq, values } from 'ramda';\nimport { useState, useEffect, useMemo, FC } from 'react';\nimport { Button, Card, Nav, NavLink, Progress, Row } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCalendarAlt, faMapMarkedAlt, faList, faChartPie, faFileDownload } from '@fortawesome/free-solid-svg-icons';\nimport { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport { Route, Switch, NavLink as RouterNavLink, Redirect } from 'react-router-dom';\nimport { Location } from 'history';\nimport classNames from 'classnames';\nimport { DateRangeSelector } from '../utils/dates/DateRangeSelector';\nimport Message from '../utils/Message';\nimport { DateInterval, DateRange, intervalToDateRange } from '../utils/dates/types';\nimport { Result } from '../utils/Result';\nimport { ShlinkApiError } from '../api/ShlinkApiError';\nimport { Settings } from '../settings/reducers/settings';\nimport { SelectedServer } from '../servers/data';\nimport { supportsBotVisits } from '../utils/helpers/features';\nimport { prettify } from '../utils/helpers/numbers';\nimport LineChartCard from './charts/LineChartCard';\nimport VisitsTable from './VisitsTable';\nimport { NormalizedOrphanVisit, NormalizedVisit, VisitsFilter, VisitsInfo, VisitsParams } from './types';\nimport OpenMapModalBtn from './helpers/OpenMapModalBtn';\nimport { normalizeVisits, processStatsFromVisits } from './services/VisitsParser';\nimport { VisitsFilterDropdown } from './helpers/VisitsFilterDropdown';\nimport { HighlightableProps, highlightedVisitsToStats } from './types/helpers';\nimport { DoughnutChartCard } from './charts/DoughnutChartCard';\nimport { SortableBarChartCard } from './charts/SortableBarChartCard';\nimport './VisitsStats.scss';\n\nexport interface VisitsStatsProps {\n getVisits: (params: VisitsParams) => void;\n visitsInfo: VisitsInfo;\n settings: Settings;\n selectedServer: SelectedServer;\n cancelGetVisits: () => void;\n baseUrl: string;\n domain?: string;\n exportCsv: (visits: NormalizedVisit[]) => void;\n isOrphanVisits?: boolean;\n}\n\ninterface VisitsNavLinkProps {\n title: string;\n subPath: string;\n icon: IconDefinition;\n}\n\ntype Section = 'byTime' | 'byContext' | 'byLocation' | 'list';\n\nconst sections: Record = {\n byTime: { title: 'By time', subPath: '', icon: faCalendarAlt },\n byContext: { title: 'By context', subPath: '/by-context', icon: faChartPie },\n byLocation: { title: 'By location', subPath: '/by-location', icon: faMapMarkedAlt },\n list: { title: 'List', subPath: '/list', icon: faList },\n};\n\nlet selectedBar: string | undefined;\n\nconst VisitsNavLink: FC = ({ subPath, title, icon, to }) => (\n pathname.endsWith(`visits${subPath}`)}\n replace\n >\n \n {title}\n \n);\n\nconst VisitsStats: FC = ({\n children,\n visitsInfo,\n getVisits,\n cancelGetVisits,\n baseUrl,\n domain,\n settings,\n exportCsv,\n selectedServer,\n isOrphanVisits = false,\n}) => {\n const initialInterval: DateInterval = settings.visits?.defaultInterval ?? 'last30Days';\n const [ dateRange, setDateRange ] = useState(intervalToDateRange(initialInterval));\n const [ highlightedVisits, setHighlightedVisits ] = useState([]);\n const [ highlightedLabel, setHighlightedLabel ] = useState();\n const [ visitsFilter, setVisitsFilter ] = useState({});\n const botsSupported = supportsBotVisits(selectedServer);\n\n const buildSectionUrl = (subPath?: string) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return !subPath ? `${baseUrl}${query}` : `${baseUrl}${subPath}${query}`;\n };\n const { visits, loading, loadingLarge, error, errorData, progress } = visitsInfo;\n const normalizedVisits = useMemo(() => normalizeVisits(visits), [ visits ]);\n const { os, browsers, referrers, countries, cities, citiesForMap, visitedUrls } = useMemo(\n () => processStatsFromVisits(normalizedVisits),\n [ normalizedVisits ],\n );\n const mapLocations = values(citiesForMap);\n\n const setSelectedVisits = (selectedVisits: NormalizedVisit[]) => {\n selectedBar = undefined;\n setHighlightedVisits(selectedVisits);\n };\n const highlightVisitsForProp = (prop: HighlightableProps) => (value: string) => {\n const newSelectedBar = `${prop}_${value}`;\n\n if (selectedBar === newSelectedBar) {\n setHighlightedVisits([]);\n setHighlightedLabel(undefined);\n selectedBar = undefined;\n } else {\n setHighlightedVisits((normalizedVisits as NormalizedOrphanVisit[]).filter(propEq(prop, value)));\n setHighlightedLabel(value);\n selectedBar = newSelectedBar;\n }\n };\n\n useEffect(() => cancelGetVisits, []);\n useEffect(() => {\n getVisits({ dateRange, filter: visitsFilter });\n }, [ dateRange, visitsFilter ]);\n\n const renderVisitsContent = () => {\n if (loadingLarge) {\n return (\n \n This is going to take a while... :S\n \n \n );\n }\n\n if (loading) {\n return ;\n }\n\n if (error) {\n return (\n \n \n \n );\n }\n\n if (isEmpty(visits)) {\n return There are no visits matching current filter :(;\n }\n\n return (\n <>\n \n \n \n \n \n \n
\n \n
\n
\n\n \n
\n \n
\n
\n \n
\n
\n \n
\n {isOrphanVisits && (\n
\n \n
\n )}\n
\n\n \n
\n \n
\n
\n \n mapLocations.length > 0 &&\n \n }\n sortingItems={{\n name: 'City name',\n amount: 'Visits amount',\n }}\n onClick={highlightVisitsForProp('city')}\n />\n
\n
\n\n \n
\n \n
\n
\n\n \n
\n
\n \n );\n };\n\n return (\n <>\n {children}\n\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n {visits.length > 0 && (\n
\n
\n setSelectedVisits([])}\n >\n Clear selection {highlightedVisits.length > 0 && <>({prettify(highlightedVisits.length)})}\n \n exportCsv(normalizedVisits)}\n >\n Export ({prettify(normalizedVisits.length)})\n \n
\n
\n )}\n
\n
\n\n
\n {renderVisitsContent()}\n
\n \n );\n};\n\nexport default VisitsStats;\n","import { isNil } from 'ramda';\nimport { ShortUrl } from '../data';\nimport { OptionalString } from '../../utils/utils';\n\nexport const shortUrlMatches = (shortUrl: ShortUrl, shortCode: string, domain: OptionalString): boolean => {\n if (isNil(domain)) {\n return shortUrl.shortCode === shortCode && !shortUrl.domain;\n }\n\n return shortUrl.shortCode === shortCode && shortUrl.domain === domain;\n};\n","import { Action } from 'redux';\nimport { CreateVisit } from '../types';\n\nexport const CREATE_VISITS = 'shlink/visitCreation/CREATE_VISITS';\n\nexport interface CreateVisitsAction extends Action {\n createdVisits: CreateVisit[];\n}\n\nexport const createNewVisits = (createdVisits: CreateVisit[]): CreateVisitsAction => ({\n type: CREATE_VISITS,\n createdVisits,\n});\n","import { AxiosError } from 'axios';\nimport { InvalidArgumentError, InvalidShortUrlDeletion, ProblemDetailsError } from '../types';\n\nexport const parseApiError = (e: AxiosError) => e.response?.data;\n\nexport const isInvalidArgumentError = (error?: ProblemDetailsError): error is InvalidArgumentError =>\n error?.type === 'INVALID_ARGUMENT';\n\nexport const isInvalidDeletionError = (error?: ProblemDetailsError): error is InvalidShortUrlDeletion =>\n error?.type === 'INVALID_SHORTCODE_DELETION';\n","import { Action, Dispatch } from 'redux';\nimport { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\nimport { ProblemDetailsError } from '../../api/types';\nimport { GetState } from '../../container/types';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const DELETE_SHORT_URL_START = 'shlink/deleteShortUrl/DELETE_SHORT_URL_START';\nexport const DELETE_SHORT_URL_ERROR = 'shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR';\nexport const SHORT_URL_DELETED = 'shlink/deleteShortUrl/SHORT_URL_DELETED';\nexport const RESET_DELETE_SHORT_URL = 'shlink/deleteShortUrl/RESET_DELETE_SHORT_URL';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlDeletion {\n shortCode: string;\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface DeleteShortUrlAction extends Action {\n shortCode: string;\n domain?: string | null;\n}\n\nconst initialState: ShortUrlDeletion = {\n shortCode: '',\n loading: false,\n error: false,\n};\n\nexport default buildReducer({\n [DELETE_SHORT_URL_START]: (state) => ({ ...state, loading: true, error: false }),\n [DELETE_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, errorData, loading: false, error: true }),\n [SHORT_URL_DELETED]: (state, { shortCode }) => ({ ...state, shortCode, loading: false, error: false }),\n [RESET_DELETE_SHORT_URL]: () => initialState,\n}, initialState);\n\nexport const deleteShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n shortCode: string,\n domain?: string | null,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: DELETE_SHORT_URL_START });\n const { deleteShortUrl } = buildShlinkApiClient(getState);\n\n try {\n await deleteShortUrl(shortCode, domain);\n dispatch({ type: SHORT_URL_DELETED, shortCode, domain });\n } catch (e: any) {\n dispatch({ type: DELETE_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n\nexport const resetDeleteShortUrl = buildActionCreator(RESET_DELETE_SHORT_URL);\n","import { Action, Dispatch } from 'redux';\nimport { GetState } from '../../container/types';\nimport { ShortUrl, ShortUrlData } from '../data';\nimport { buildReducer, buildActionCreator } from '../../utils/helpers/redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ProblemDetailsError } from '../../api/types';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const CREATE_SHORT_URL_START = 'shlink/createShortUrl/CREATE_SHORT_URL_START';\nexport const CREATE_SHORT_URL_ERROR = 'shlink/createShortUrl/CREATE_SHORT_URL_ERROR';\nexport const CREATE_SHORT_URL = 'shlink/createShortUrl/CREATE_SHORT_URL';\nexport const RESET_CREATE_SHORT_URL = 'shlink/createShortUrl/RESET_CREATE_SHORT_URL';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlCreation {\n result: ShortUrl | null;\n saving: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface CreateShortUrlAction extends Action {\n result: ShortUrl;\n}\n\nconst initialState: ShortUrlCreation = {\n result: null,\n saving: false,\n error: false,\n};\n\nexport default buildReducer({\n [CREATE_SHORT_URL_START]: (state) => ({ ...state, saving: true, error: false }),\n [CREATE_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, saving: false, error: true, errorData }),\n [CREATE_SHORT_URL]: (_, { result }) => ({ result, saving: false, error: false }),\n [RESET_CREATE_SHORT_URL]: () => initialState,\n}, initialState);\n\nexport const createShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (data: ShortUrlData) => async (\n dispatch: Dispatch,\n getState: GetState,\n) => {\n dispatch({ type: CREATE_SHORT_URL_START });\n const { createShortUrl } = buildShlinkApiClient(getState);\n\n try {\n const result = await createShortUrl(data);\n\n dispatch({ type: CREATE_SHORT_URL, result });\n } catch (e: any) {\n dispatch({ type: CREATE_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n\nexport const resetCreateShortUrl = buildActionCreator(RESET_CREATE_SHORT_URL);\n","import { Action, Dispatch } from 'redux';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { GetState } from '../../container/types';\nimport { OptionalString } from '../../utils/utils';\nimport { EditShortUrlData, ShortUrl } from '../data';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ProblemDetailsError } from '../../api/types';\nimport { parseApiError } from '../../api/utils';\nimport { supportsTagsInPatch } from '../../utils/helpers/features';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const EDIT_SHORT_URL_START = 'shlink/shortUrlEdition/EDIT_SHORT_URL_START';\nexport const EDIT_SHORT_URL_ERROR = 'shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR';\nexport const SHORT_URL_EDITED = 'shlink/shortUrlEdition/SHORT_URL_EDITED';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlEdition {\n shortUrl?: ShortUrl;\n saving: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ShortUrlEditedAction extends Action {\n shortUrl: ShortUrl;\n}\n\nconst initialState: ShortUrlEdition = {\n saving: false,\n error: false,\n};\n\nexport default buildReducer({\n [EDIT_SHORT_URL_START]: (state) => ({ ...state, saving: true, error: false }),\n [EDIT_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, saving: false, error: true, errorData }),\n [SHORT_URL_EDITED]: (_, { shortUrl }) => ({ shortUrl, saving: false, error: false }),\n}, initialState);\n\nexport const editShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n shortCode: string,\n domain: OptionalString,\n data: EditShortUrlData,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: EDIT_SHORT_URL_START });\n\n const { selectedServer } = getState();\n const sendTagsSeparately = !supportsTagsInPatch(selectedServer);\n const { updateShortUrl, updateShortUrlTags } = buildShlinkApiClient(getState);\n\n try {\n const [ shortUrl ] = await Promise.all([\n updateShortUrl(shortCode, domain, data as any), // FIXME Parse dates\n sendTagsSeparately && data.tags ? updateShortUrlTags(shortCode, domain, data.tags) : undefined,\n ]);\n\n dispatch({ shortUrl, type: SHORT_URL_EDITED });\n } catch (e: any) {\n dispatch({ type: EDIT_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n","import { assoc, assocPath, init, last, pipe, reject } from 'ramda';\nimport { Action, Dispatch } from 'redux';\nimport { shortUrlMatches } from '../helpers';\nimport { CREATE_VISITS, CreateVisitsAction } from '../../visits/reducers/visitCreation';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { GetState } from '../../container/types';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ShlinkShortUrlsListParams, ShlinkShortUrlsResponse } from '../../api/types';\nimport { DeleteShortUrlAction, SHORT_URL_DELETED } from './shortUrlDeletion';\nimport { ShortUrlsListParams } from './shortUrlsListParams';\nimport { CREATE_SHORT_URL, CreateShortUrlAction } from './shortUrlCreation';\nimport { SHORT_URL_EDITED, ShortUrlEditedAction } from './shortUrlEdition';\n\n/* eslint-disable padding-line-between-statements */\nexport const LIST_SHORT_URLS_START = 'shlink/shortUrlsList/LIST_SHORT_URLS_START';\nexport const LIST_SHORT_URLS_ERROR = 'shlink/shortUrlsList/LIST_SHORT_URLS_ERROR';\nexport const LIST_SHORT_URLS = 'shlink/shortUrlsList/LIST_SHORT_URLS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlsList {\n shortUrls?: ShlinkShortUrlsResponse;\n loading: boolean;\n error: boolean;\n}\n\nexport interface ListShortUrlsAction extends Action {\n shortUrls: ShlinkShortUrlsResponse;\n params: ShortUrlsListParams;\n}\n\nexport type ListShortUrlsCombinedAction = (\n ListShortUrlsAction\n & CreateVisitsAction\n & CreateShortUrlAction\n & DeleteShortUrlAction\n & ShortUrlEditedAction\n);\n\nconst initialState: ShortUrlsList = {\n loading: true,\n error: false,\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS_START]: (state) => ({ ...state, loading: true, error: false }),\n [LIST_SHORT_URLS_ERROR]: () => ({ loading: false, error: true }),\n [LIST_SHORT_URLS]: (_, { shortUrls }) => ({ loading: false, error: false, shortUrls }),\n [SHORT_URL_DELETED]: pipe(\n (state: ShortUrlsList, { shortCode, domain }: DeleteShortUrlAction) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n reject((shortUrl) => shortUrlMatches(shortUrl, shortCode, domain), state.shortUrls.data),\n state,\n ),\n (state) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'pagination', 'totalItems' ],\n state.shortUrls.pagination.totalItems - 1,\n state,\n ),\n ),\n [CREATE_VISITS]: (state, { createdVisits }) => assocPath(\n [ 'shortUrls', 'data' ],\n state.shortUrls?.data?.map(\n (currentShortUrl) => {\n // Find the last of the new visit for this short URL, and pick the amount of visits from it\n const lastVisit = last(\n createdVisits.filter(\n ({ shortUrl }) => shortUrl && shortUrlMatches(currentShortUrl, shortUrl.shortCode, shortUrl.domain),\n ),\n );\n\n return lastVisit?.shortUrl\n ? assoc('visitsCount', lastVisit.shortUrl.visitsCount, currentShortUrl)\n : currentShortUrl;\n },\n ),\n state,\n ),\n [CREATE_SHORT_URL]: pipe(\n // The only place where the list and the creation form coexist is the overview page.\n // There we can assume we are displaying page 1, and therefore, we can safely prepend the new short URL and remove the last one.\n (state: ShortUrlsList, { result }: CreateShortUrlAction) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n [ result, ...init(state.shortUrls.data) ],\n state,\n ),\n (state: ShortUrlsList) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'pagination', 'totalItems' ],\n state.shortUrls.pagination.totalItems + 1,\n state,\n ),\n ),\n [SHORT_URL_EDITED]: (state, { shortUrl: editedShortUrl }) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n state.shortUrls.data.map((shortUrl) => {\n const { shortCode, domain } = editedShortUrl;\n\n return shortUrlMatches(shortUrl, shortCode, domain) ? editedShortUrl : shortUrl;\n }),\n state,\n ),\n}, initialState);\n\nexport const listShortUrls = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n params: ShlinkShortUrlsListParams = {},\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: LIST_SHORT_URLS_START });\n const { listShortUrls } = buildShlinkApiClient(getState);\n\n try {\n const shortUrls = await listShortUrls(params);\n\n dispatch({ type: LIST_SHORT_URLS, shortUrls, params });\n } catch (e) {\n dispatch({ type: LIST_SHORT_URLS_ERROR, params });\n }\n};\n","import { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\nimport { OrderDir } from '../../utils/helpers/ordering';\nimport { LIST_SHORT_URLS, ListShortUrlsAction } from './shortUrlsList';\n\nexport const RESET_SHORT_URL_PARAMS = 'shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS';\n\nexport const SORTABLE_FIELDS = {\n dateCreated: 'Created at',\n shortCode: 'Short URL',\n longUrl: 'Long URL',\n title: 'Title',\n visits: 'Visits',\n};\n\nexport type OrderableFields = keyof typeof SORTABLE_FIELDS;\n\nexport type OrderBy = Partial>;\n\nexport interface ShortUrlsListParams {\n page?: string;\n itemsPerPage?: number;\n orderBy?: OrderBy;\n}\n\nconst initialState: ShortUrlsListParams = {\n page: '1',\n orderBy: { dateCreated: 'DESC' },\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS]: (state, { params }) => ({ ...state, ...params }),\n [RESET_SHORT_URL_PARAMS]: () => initialState,\n}, initialState);\n\nexport const resetShortUrlParams = buildActionCreator(RESET_SHORT_URL_PARAMS);\n","const TEN_ROUNDING_NUMBER = 10;\nconst { ceil } = Math;\nconst formatter = new Intl.NumberFormat('en-US');\n\nexport const prettify = (number: number | string) => formatter.format(Number(number));\n\nexport const roundTen = (number: number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;\n","import { max, min, range } from 'ramda';\nimport { prettify } from './numbers';\n\nconst DELTA = 2;\n\nexport const ELLIPSIS = '...';\n\ntype Ellipsis = typeof ELLIPSIS;\n\nexport type NumberOrEllipsis = number | Ellipsis;\n\nexport const progressivePagination = (currentPage: number, pageCount: number): NumberOrEllipsis[] => {\n const pages: NumberOrEllipsis[] = range(\n max(DELTA, currentPage - DELTA),\n min(pageCount - 1, currentPage + DELTA) + 1,\n );\n\n if (currentPage - DELTA > DELTA) {\n pages.unshift(ELLIPSIS);\n }\n if (currentPage + DELTA < pageCount - 1) {\n pages.push(ELLIPSIS);\n }\n\n pages.unshift(1);\n pages.push(pageCount);\n\n return pages;\n};\n\nexport const pageIsEllipsis = (pageNumber: NumberOrEllipsis): pageNumber is Ellipsis => pageNumber === ELLIPSIS;\n\nexport const prettifyPageNumber = (pageNumber: NumberOrEllipsis): string =>\n pageIsEllipsis(pageNumber) ? pageNumber : prettify(pageNumber);\n\nexport const keyForPage = (pageNumber: NumberOrEllipsis, index: number) => !pageIsEllipsis(pageNumber) ? `${pageNumber}` : `${pageNumber}_${index}`;\n","import { Link } from 'react-router-dom';\nimport { Pagination, PaginationItem, PaginationLink } from 'reactstrap';\nimport {\n pageIsEllipsis,\n keyForPage,\n progressivePagination,\n prettifyPageNumber,\n NumberOrEllipsis,\n} from '../utils/helpers/pagination';\nimport { ShlinkPaginator } from '../api/types';\n\ninterface PaginatorProps {\n paginator?: ShlinkPaginator;\n serverId: string;\n currentQueryString?: string;\n}\n\nconst Paginator = ({ paginator, serverId, currentQueryString = '' }: PaginatorProps) => {\n const { currentPage = 0, pagesCount = 0 } = paginator ?? {};\n const urlForPage = (pageNumber: NumberOrEllipsis) =>\n `/server/${serverId}/list-short-urls/${pageNumber}${currentQueryString}`;\n\n if (pagesCount <= 1) {\n return null;\n }\n\n const renderPages = () =>\n progressivePagination(currentPage, pagesCount).map((pageNumber, index) => (\n \n \n {prettifyPageNumber(pageNumber)}\n \n \n ));\n\n return (\n \n \n \n \n {renderPages()}\n = pagesCount}>\n \n \n \n );\n};\n\nexport default Paginator;\n","import { head, keys, pipe, values } from 'ramda';\nimport { FC, useEffect, useMemo, useState } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport { Card } from 'reactstrap';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { determineOrderDir, Order, OrderDir } from '../utils/helpers/ordering';\nimport { getServerId, SelectedServer } from '../servers/data';\nimport { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';\nimport { Topics } from '../mercure/helpers/Topics';\nimport { TableOrderIcon } from '../utils/table/TableOrderIcon';\nimport { ShlinkShortUrlsListParams } from '../api/types';\nimport { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';\nimport { OrderableFields, ShortUrlsListParams, SORTABLE_FIELDS } from './reducers/shortUrlsListParams';\nimport { ShortUrlsTableProps } from './ShortUrlsTable';\nimport Paginator from './Paginator';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\n\ninterface ShortUrlsListProps extends RouteComponentProps {\n selectedServer: SelectedServer;\n shortUrlsList: ShortUrlsListState;\n listShortUrls: (params: ShortUrlsListParams) => void;\n shortUrlsListParams: ShortUrlsListParams;\n resetShortUrlParams: () => void;\n}\n\ntype ShortUrlsOrder = Order;\n\nconst ShortUrlsList = (ShortUrlsTable: FC, SearchBar: FC) => boundToMercureHub(({\n listShortUrls,\n resetShortUrlParams,\n shortUrlsListParams,\n match,\n location,\n history,\n shortUrlsList,\n selectedServer,\n}: ShortUrlsListProps) => {\n const serverId = getServerId(selectedServer);\n const { orderBy } = shortUrlsListParams;\n const [ order, setOrder ] = useState({\n field: orderBy && (head(keys(orderBy)) as OrderableFields),\n dir: orderBy && head(values(orderBy)),\n });\n const [{ tags, search, startDate, endDate }, toFirstPage ] = useShortUrlsQuery({ history, match, location });\n const selectedTags = useMemo(() => tags?.split(',') ?? [], [ tags ]);\n const { pagination } = shortUrlsList?.shortUrls ?? {};\n\n const refreshList = (extraParams: ShlinkShortUrlsListParams) => listShortUrls(\n { ...shortUrlsListParams, ...extraParams },\n );\n const handleOrderBy = (field?: OrderableFields, dir?: OrderDir) => {\n setOrder({ field, dir });\n refreshList({ orderBy: field ? { [field]: dir } : undefined });\n };\n const orderByColumn = (field: OrderableFields) => () =>\n handleOrderBy(field, determineOrderDir(field, order.field, order.dir));\n const renderOrderIcon = (field: OrderableFields) => ;\n const addTag = pipe(\n (newTag: string) => [ ...new Set([ ...selectedTags, newTag ]) ].join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n useEffect(() => resetShortUrlParams, []);\n useEffect(() => {\n refreshList(\n { page: match.params.page, searchTerm: search, tags: selectedTags, itemsPerPage: undefined, startDate, endDate },\n );\n }, [ match.params.page, search, selectedTags, startDate, endDate ]);\n\n return (\n <>\n
\n
\n \n
\n \n \n \n \n \n );\n}, () => [ Topics.visits ]);\n\nexport default ShortUrlsList;\n","import { FC } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCopy as copyIcon } from '@fortawesome/free-regular-svg-icons';\nimport CopyToClipboard from 'react-copy-to-clipboard';\nimport './CopyToClipboardIcon.scss';\n\ninterface CopyToClipboardIconProps {\n text: string;\n onCopy?: (text: string, result: boolean) => void;\n}\n\nexport const CopyToClipboardIcon: FC = ({ text, onCopy }) => (\n \n \n \n);\n","import { parseISO, format as formatDate, getUnixTime, formatDistance } from 'date-fns';\nimport { isDateObject } from './helpers/date';\n\nexport interface DateProps {\n date: Date | string;\n format?: string;\n relative?: boolean;\n}\n\nexport const Time = ({ date, format = 'yyyy-MM-dd HH:mm', relative = false }: DateProps) => {\n const dateObject = isDateObject(date) ? date : parseISO(date);\n\n return (\n \n );\n};\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { isServerWithId, SelectedServer, ServerWithId } from '../../servers/data';\nimport { ShortUrl } from '../data';\n\nexport type LinkSuffix = 'visits' | 'edit';\n\nexport interface ShortUrlDetailLinkProps {\n shortUrl?: ShortUrl | null;\n selectedServer?: SelectedServer;\n suffix: LinkSuffix;\n}\n\nconst buildUrl = ({ id }: ServerWithId, { shortCode, domain }: ShortUrl, suffix: LinkSuffix) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return `/server/${id}/short-code/${shortCode}/${suffix}${query}`;\n};\n\nconst ShortUrlDetailLink: FC> = (\n { selectedServer, shortUrl, suffix, children, ...rest },\n) => {\n if (!selectedServer || !isServerWithId(selectedServer) || !shortUrl) {\n return {children};\n }\n\n return {children};\n};\n\nexport default ShortUrlDetailLink;\n","import { useRef } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';\nimport { UncontrolledTooltip } from 'reactstrap';\nimport classNames from 'classnames';\nimport { prettify } from '../../utils/helpers/numbers';\nimport { ShortUrl } from '../data';\nimport { SelectedServer } from '../../servers/data';\nimport ShortUrlDetailLink from './ShortUrlDetailLink';\nimport './ShortUrlVisitsCount.scss';\n\ninterface ShortUrlVisitsCountProps {\n shortUrl?: ShortUrl | null;\n selectedServer?: SelectedServer;\n visitsCount: number;\n active?: boolean;\n}\n\nconst ShortUrlVisitsCount = ({ visitsCount, shortUrl, selectedServer, active = false }: ShortUrlVisitsCountProps) => {\n const maxVisits = shortUrl?.meta?.maxVisits;\n const visitsLink = (\n \n \n {prettify(visitsCount)}\n \n \n );\n\n if (!maxVisits) {\n return visitsLink;\n }\n\n const prettifiedMaxVisits = prettify(maxVisits);\n const tooltipRef = useRef();\n\n return (\n <>\n \n {visitsLink}\n {\n tooltipRef.current = el;\n }}\n >\n {' '}/ {prettifiedMaxVisits}{' '}\n \n \n \n \n \n tooltipRef.current) as any} placement=\"bottom\">\n This short URL will not accept more than {prettifiedMaxVisits} visits.\n \n \n );\n};\n\nexport default ShortUrlVisitsCount;\n","import { FC, useEffect, useRef } from 'react';\nimport { isEmpty } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport ColorGenerator from '../../utils/services/ColorGenerator';\nimport { StateFlagTimeout } from '../../utils/helpers/hooks';\nimport Tag from '../../tags/helpers/Tag';\nimport { SelectedServer } from '../../servers/data';\nimport { CopyToClipboardIcon } from '../../utils/CopyToClipboardIcon';\nimport { ShortUrl } from '../data';\nimport { Time } from '../../utils/Time';\nimport ShortUrlVisitsCount from './ShortUrlVisitsCount';\nimport { ShortUrlsRowMenuProps } from './ShortUrlsRowMenu';\nimport './ShortUrlsRow.scss';\n\nexport interface ShortUrlsRowProps {\n onTagClick?: (tag: string) => void;\n selectedServer: SelectedServer;\n shortUrl: ShortUrl;\n}\n\nconst ShortUrlsRow = (\n ShortUrlsRowMenu: FC,\n colorGenerator: ColorGenerator,\n useStateFlagTimeout: StateFlagTimeout,\n) => ({ shortUrl, selectedServer, onTagClick }: ShortUrlsRowProps) => {\n const [ copiedToClipboard, setCopiedToClipboard ] = useStateFlagTimeout();\n const [ active, setActive ] = useStateFlagTimeout(false, 500);\n const isFirstRun = useRef(true);\n\n const renderTags = (tags: string[]) => {\n if (isEmpty(tags)) {\n return No tags;\n }\n\n return tags.map((tag) => (\n onTagClick?.(tag)}\n />\n ));\n };\n\n useEffect(() => {\n if (isFirstRun.current) {\n isFirstRun.current = false;\n } else {\n setActive();\n }\n }, [ shortUrl.visitsCount ]);\n\n return (\n \n \n
\n \n \n {tagFilteringModeHint(shortUrlCreation.tagFilteringMode)}\n \n \n \n );\n};\n","import { FC } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSun, faMoon } from '@fortawesome/free-solid-svg-icons';\nimport { FormGroup } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport ToggleSwitch from '../utils/ToggleSwitch';\nimport { changeThemeInMarkup, Theme } from '../utils/theme';\nimport { TagsModeDropdown } from '../tags/TagsModeDropdown';\nimport { capitalize } from '../utils/utils';\nimport { Settings, UiSettings } from './reducers/settings';\nimport './UserInterface.scss';\n\ninterface UserInterfaceProps {\n settings: Settings;\n setUiSettings: (settings: UiSettings) => void;\n}\n\nexport const UserInterface: FC = ({ settings: { ui }, setUiSettings }) => (\n \n \n \n {\n const theme: Theme = useDarkTheme ? 'dark' : 'light';\n\n setUiSettings({ ...ui, theme });\n changeThemeInMarkup(theme);\n }}\n >\n Use dark theme.\n \n \n \n \n capitalize(tagsMode)}\n onChange={(tagsMode) => setUiSettings({ ...ui ?? { theme: 'light' }, tagsMode })}\n />\n Tags will be displayed as {ui?.tagsMode ?? 'cards'}.\n \n \n);\n","import { FC } from 'react';\nimport { DropdownBtn } from '../DropdownBtn';\nimport { rangeOrIntervalToString } from './types';\nimport { DateIntervalDropdownItems, DateIntervalDropdownProps } from './DateIntervalDropdownItems';\n\nexport const DateIntervalSelector: FC = ({ onChange, active, allText }) => (\n \n \n \n);\n","import { FormGroup } from 'reactstrap';\nimport { FC } from 'react';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { DateIntervalSelector } from '../utils/dates/DateIntervalSelector';\nimport { Settings, VisitsSettings } from './reducers/settings';\n\ninterface VisitsProps {\n settings: Settings;\n setVisitsSettings: (settings: VisitsSettings) => void;\n}\n\nexport const Visits: FC = ({ settings, setVisitsSettings }) => (\n \n \n \n setVisitsSettings({ defaultInterval })}\n />\n \n \n);\n","import Bottle from 'bottlejs';\nimport RealTimeUpdates from '../RealTimeUpdates';\nimport Settings from '../Settings';\nimport {\n setRealTimeUpdatesInterval,\n setShortUrlCreationSettings,\n setUiSettings,\n setVisitsSettings,\n toggleRealTimeUpdates,\n} from '../reducers/settings';\nimport { ConnectDecorator } from '../../container/types';\nimport { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServer';\nimport { ShortUrlCreation } from '../ShortUrlCreation';\nimport { UserInterface } from '../UserInterface';\nimport { Visits } from '../Visits';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('Settings', Settings, 'RealTimeUpdates', 'ShortUrlCreation', 'UserInterface', 'Visits');\n bottle.decorator('Settings', withoutSelectedServer);\n bottle.decorator('Settings', connect(null, [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory('RealTimeUpdates', () => RealTimeUpdates);\n bottle.decorator(\n 'RealTimeUpdates',\n connect([ 'settings' ], [ 'toggleRealTimeUpdates', 'setRealTimeUpdatesInterval' ]),\n );\n\n bottle.serviceFactory('ShortUrlCreation', () => ShortUrlCreation);\n bottle.decorator('ShortUrlCreation', connect([ 'settings' ], [ 'setShortUrlCreationSettings' ]));\n\n bottle.serviceFactory('UserInterface', () => UserInterface);\n bottle.decorator('UserInterface', connect([ 'settings' ], [ 'setUiSettings' ]));\n\n bottle.serviceFactory('Visits', () => Visits);\n bottle.decorator('Visits', connect([ 'settings' ], [ 'setVisitsSettings' ]));\n\n // Actions\n bottle.serviceFactory('toggleRealTimeUpdates', () => toggleRealTimeUpdates);\n bottle.serviceFactory('setRealTimeUpdatesInterval', () => setRealTimeUpdatesInterval);\n bottle.serviceFactory('setShortUrlCreationSettings', () => setShortUrlCreationSettings);\n bottle.serviceFactory('setUiSettings', () => setUiSettings);\n bottle.serviceFactory('setVisitsSettings', () => setVisitsSettings);\n};\n\nexport default provideServices;\n","import { Action, Dispatch } from 'redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ShlinkDomainRedirects } from '../../api/types';\nimport { GetState } from '../../container/types';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { parseApiError } from '../../api/utils';\n\n/* eslint-disable padding-line-between-statements */\nexport const EDIT_DOMAIN_REDIRECTS_START = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START';\nexport const EDIT_DOMAIN_REDIRECTS_ERROR = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR';\nexport const EDIT_DOMAIN_REDIRECTS = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface EditDomainRedirectsAction extends Action {\n domain: string;\n redirects: ShlinkDomainRedirects;\n}\n\nexport const editDomainRedirects = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n domain: string,\n domainRedirects: Partial,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_START });\n const { editDomainRedirects } = buildShlinkApiClient(getState);\n\n try {\n const redirects = await editDomainRedirects({ domain, ...domainRedirects });\n\n dispatch({ type: EDIT_DOMAIN_REDIRECTS, domain, redirects });\n } catch (e: any) {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_ERROR, errorData: parseApiError(e) });\n }\n};\n","import { Action, Dispatch } from 'redux';\nimport { ProblemDetailsError, ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { GetState } from '../../container/types';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { EDIT_DOMAIN_REDIRECTS, EditDomainRedirectsAction } from './domainRedirects';\n\n/* eslint-disable padding-line-between-statements */\nexport const LIST_DOMAINS_START = 'shlink/domainsList/LIST_DOMAINS_START';\nexport const LIST_DOMAINS_ERROR = 'shlink/domainsList/LIST_DOMAINS_ERROR';\nexport const LIST_DOMAINS = 'shlink/domainsList/LIST_DOMAINS';\nexport const FILTER_DOMAINS = 'shlink/domainsList/FILTER_DOMAINS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface DomainsList {\n domains: ShlinkDomain[];\n filteredDomains: ShlinkDomain[];\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ListDomainsAction extends Action {\n domains: ShlinkDomain[];\n}\n\ninterface FilterDomainsAction extends Action {\n searchTerm: string;\n}\n\nconst initialState: DomainsList = {\n domains: [],\n filteredDomains: [],\n loading: false,\n error: false,\n};\n\nexport type DomainsCombinedAction = ListDomainsAction\n& ApiErrorAction\n& FilterDomainsAction\n& EditDomainRedirectsAction;\n\nexport const replaceRedirectsOnDomain = (domain: string, redirects: ShlinkDomainRedirects) =>\n (d: ShlinkDomain): ShlinkDomain => d.domain !== domain ? d : { ...d, redirects };\n\nexport default buildReducer({\n [LIST_DOMAINS_START]: () => ({ ...initialState, loading: true }),\n [LIST_DOMAINS_ERROR]: ({ errorData }) => ({ ...initialState, error: true, errorData }),\n [LIST_DOMAINS]: (_, { domains }) => ({ ...initialState, domains, filteredDomains: domains }),\n [FILTER_DOMAINS]: (state, { searchTerm }) => ({\n ...state,\n filteredDomains: state.domains.filter(({ domain }) => domain.toLowerCase().match(searchTerm)),\n }),\n [EDIT_DOMAIN_REDIRECTS]: (state, { domain, redirects }) => ({\n ...state,\n domains: state.domains.map(replaceRedirectsOnDomain(domain, redirects)),\n filteredDomains: state.filteredDomains.map(replaceRedirectsOnDomain(domain, redirects)),\n }),\n}, initialState);\n\nexport const listDomains = (buildShlinkApiClient: ShlinkApiClientBuilder) => () => async (\n dispatch: Dispatch,\n getState: GetState,\n) => {\n dispatch({ type: LIST_DOMAINS_START });\n const { listDomains } = buildShlinkApiClient(getState);\n\n try {\n const domains = await listDomains();\n\n dispatch({ type: LIST_DOMAINS, domains });\n } catch (e: any) {\n dispatch({ type: LIST_DOMAINS_ERROR, errorData: parseApiError(e) });\n }\n};\n\nexport const filterDomains = (searchTerm: string): FilterDomainsAction => ({ type: FILTER_DOMAINS, searchTerm });\n","import { useEffect } from 'react';\nimport { Button, DropdownItem, Input, InputGroup, InputGroupAddon, UncontrolledTooltip } from 'reactstrap';\nimport { InputProps } from 'reactstrap/lib/Input';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faUndo } from '@fortawesome/free-solid-svg-icons';\nimport { isEmpty, pipe } from 'ramda';\nimport { DropdownBtn } from '../utils/DropdownBtn';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { DomainsList } from './reducers/domainsList';\nimport './DomainSelector.scss';\n\nexport interface DomainSelectorProps extends Omit {\n value?: string;\n onChange: (domain: string) => void;\n}\n\ninterface DomainSelectorConnectProps extends DomainSelectorProps {\n listDomains: Function;\n domainsList: DomainsList;\n}\n\nexport const DomainSelector = ({ listDomains, value, domainsList, onChange }: DomainSelectorConnectProps) => {\n const [ inputDisplayed,, showInput, hideInput ] = useToggle();\n const { domains } = domainsList;\n const valueIsEmpty = isEmpty(value);\n const unselectDomain = () => onChange('');\n\n useEffect(() => {\n listDomains();\n }, []);\n\n return inputDisplayed ? (\n \n onChange(e.target.value)}\n />\n \n \n \n \n \n Existing domains\n \n \n \n ) : (\n \n {domains.map(({ domain, isDefault }) => (\n onChange(domain)}\n >\n {domain}\n {isDefault && default}\n \n ))}\n \n \n New domain\n \n \n );\n};\n","import { FC, useState } from 'react';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { FormGroupContainer, FormGroupContainerProps } from '../../utils/FormGroupContainer';\nimport { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../utils/utils';\nimport { InfoTooltip } from '../../utils/InfoTooltip';\n\ninterface EditDomainRedirectsModalProps {\n domain: ShlinkDomain;\n isOpen: boolean;\n toggle: () => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n}\n\nconst FormGroup: FC = ({ isLast, ...rest }) => (\n \n);\n\nexport const EditDomainRedirectsModal: FC = (\n { isOpen, toggle, domain, editDomainRedirects },\n) => {\n const [ baseUrlRedirect, setBaseUrlRedirect ] = useState(domain.redirects?.baseUrlRedirect ?? '');\n const [ regular404Redirect, setRegular404Redirect ] = useState(domain.redirects?.regular404Redirect ?? '');\n const [ invalidShortUrlRedirect, setInvalidShortUrlRedirect ] = useState(\n domain.redirects?.invalidShortUrlRedirect ?? '',\n );\n const handleSubmit = handleEventPreventingDefault(async () => editDomainRedirects(domain.domain, {\n baseUrlRedirect: nonEmptyValueOrNull(baseUrlRedirect),\n regular404Redirect: nonEmptyValueOrNull(regular404Redirect),\n invalidShortUrlRedirect: nonEmptyValueOrNull(invalidShortUrlRedirect),\n }).then(toggle));\n\n return (\n \n
\n Edit redirects for {domain.domain}\n \n \n \n Visitors accessing the base url, as in https://{domain.domain}/, will be redirected to this URL.\n \n Base URL\n \n \n \n Visitors accessing a url not matching a short URL pattern, as in https://{domain.domain}/???/[...],\n will be redirected to this URL.\n \n Regular 404\n \n \n \n Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be\n redirected to this URL.\n \n Invalid short URL\n \n \n \n \n \n \n
\n
\n );\n};\n","import { FC } from 'react';\nimport { Button, UncontrolledTooltip } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n faBan as forbiddenIcon,\n faCheck as defaultDomainIcon,\n faEdit as editIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../api/types';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { OptionalString } from '../utils/utils';\nimport { EditDomainRedirectsModal } from './helpers/EditDomainRedirectsModal';\n\ninterface DomainRowProps {\n domain: ShlinkDomain;\n defaultRedirects?: ShlinkDomainRedirects;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n}\n\nconst Nr: FC<{ fallback: OptionalString }> = ({ fallback }) => (\n \n {!fallback && No redirect}\n {fallback && <>{fallback} (as fallback)}\n \n);\nconst DefaultDomain: FC = () => (\n <>\n \n Default domain\n \n);\n\nexport const DomainRow: FC = ({ domain, editDomainRedirects, defaultRedirects }) => {\n const [ isOpen, toggle ] = useToggle();\n const { domain: authority, isDefault, redirects } = domain;\n\n return (\n \n {isDefault ? : ''}\n {authority}\n \n {redirects?.baseUrlRedirect ?? }\n \n \n {redirects?.regular404Redirect ?? }\n \n \n {redirects?.invalidShortUrlRedirect ?? }\n \n \n \n \n \n {isDefault && (\n \n Redirects for default domain cannot be edited here.\n
\n Use config options or env vars directly on the server.\n
\n )}\n \n \n \n );\n};\n","import { FC, useEffect } from 'react';\nimport Message from '../utils/Message';\nimport { Result } from '../utils/Result';\nimport { ShlinkApiError } from '../api/ShlinkApiError';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport SearchField from '../utils/SearchField';\nimport { ShlinkDomainRedirects } from '../api/types';\nimport { DomainsList } from './reducers/domainsList';\nimport { DomainRow } from './DomainRow';\n\ninterface ManageDomainsProps {\n listDomains: Function;\n filterDomains: (searchTerm: string) => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n domainsList: DomainsList;\n}\n\nconst headers = [ '', 'Domain', 'Base path redirect', 'Regular 404 redirect', 'Invalid short URL redirect', '' ];\n\nexport const ManageDomains: FC = (\n { listDomains, domainsList, filterDomains, editDomainRedirects },\n) => {\n const { filteredDomains: domains, loading, error, errorData } = domainsList;\n const defaultRedirects = domains.find(({ isDefault }) => isDefault)?.redirects;\n\n useEffect(() => {\n listDomains();\n }, []);\n\n if (loading) {\n return ;\n }\n\n const renderContent = () => {\n if (error) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n {headers.map((column, index) => )}\n \n \n {domains.length < 1 && }\n {domains.map((domain) => (\n \n ))}\n \n
{column}
No results found
\n
\n );\n };\n\n return (\n <>\n \n {renderContent()}\n \n );\n};\n","import Bottle from 'bottlejs';\nimport { ConnectDecorator } from '../../container/types';\nimport { filterDomains, listDomains } from '../reducers/domainsList';\nimport { DomainSelector } from '../DomainSelector';\nimport { ManageDomains } from '../ManageDomains';\nimport { editDomainRedirects } from '../reducers/domainRedirects';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('DomainSelector', () => DomainSelector);\n bottle.decorator('DomainSelector', connect([ 'domainsList' ], [ 'listDomains' ]));\n\n bottle.serviceFactory('ManageDomains', () => ManageDomains);\n bottle.decorator('ManageDomains', connect(\n [ 'domainsList' ],\n [ 'listDomains', 'filterDomains', 'editDomainRedirects' ],\n ));\n\n // Actions\n bottle.serviceFactory('listDomains', listDomains, 'buildShlinkApiClient');\n bottle.serviceFactory('filterDomains', () => filterDomains);\n bottle.serviceFactory('editDomainRedirects', editDomainRedirects, 'buildShlinkApiClient');\n};\n\nexport default provideServices;\n","import { Action } from 'redux';\nimport { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\n\n/* eslint-disable padding-line-between-statements */\nexport const APP_UPDATE_AVAILABLE = 'shlink/appUpdates/APP_UPDATE_AVAILABLE';\nexport const RESET_APP_UPDATE = 'shlink/appUpdates/RESET_APP_UPDATE';\n/* eslint-enable padding-line-between-statements */\n\nconst initialState = false;\n\nexport default buildReducer>({\n [APP_UPDATE_AVAILABLE]: () => true,\n [RESET_APP_UPDATE]: () => false,\n}, initialState);\n\nexport const appUpdateAvailable = buildActionCreator(APP_UPDATE_AVAILABLE);\n\nexport const resetAppUpdate = buildActionCreator(RESET_APP_UPDATE);\n","import { FC, MouseEventHandler } from 'react';\nimport { Alert, Button } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSyncAlt as reloadIcon } from '@fortawesome/free-solid-svg-icons';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { useToggle } from '../utils/helpers/hooks';\nimport './AppUpdateBanner.scss';\n\ninterface AppUpdateBannerProps {\n isOpen: boolean;\n toggle: MouseEventHandler;\n forceUpdate: Function;\n}\n\nexport const AppUpdateBanner: FC = ({ isOpen, toggle, forceUpdate }) => {\n const [ isUpdating,, setUpdating ] = useToggle();\n const update = () => {\n setUpdating();\n forceUpdate();\n };\n\n return (\n \n

This app has just been updated!

\n

\n Restart it to enjoy the new features.\n \n

\n
\n );\n};\n","export const forceUpdate = async () => {\n const registrations = await navigator.serviceWorker?.getRegistrations() ?? [];\n\n for (const registration of registrations) {\n const { waiting } = registration;\n\n waiting?.addEventListener('statechange', (event) => {\n if ((event.target as any)?.state === 'activated') {\n window.location.reload();\n }\n });\n\n // The logic that makes skipWaiting to be called when this message is posted is in service-worker.ts\n waiting?.postMessage({ type: 'SKIP_WAITING' });\n }\n};\n","import { useEffect, FC } from 'react';\nimport { Route, RouteChildrenProps, Switch } from 'react-router-dom';\nimport classNames from 'classnames';\nimport NotFound from '../common/NotFound';\nimport { ServersMap } from '../servers/data';\nimport { Settings } from '../settings/reducers/settings';\nimport { changeThemeInMarkup } from '../utils/theme';\nimport { AppUpdateBanner } from '../common/AppUpdateBanner';\nimport { forceUpdate } from '../utils/helpers/sw';\nimport './App.scss';\n\ninterface AppProps extends RouteChildrenProps {\n fetchServers: () => void;\n servers: ServersMap;\n settings: Settings;\n resetAppUpdate: () => void;\n appUpdated: boolean;\n}\n\nconst App = (\n MainHeader: FC,\n Home: FC,\n MenuLayout: FC,\n CreateServer: FC,\n EditServer: FC,\n Settings: FC,\n ManageServers: FC,\n ShlinkVersionsContainer: FC,\n) => ({ fetchServers, servers, settings, appUpdated, resetAppUpdate, location }: AppProps) => {\n const isHome = location.pathname === '/';\n\n useEffect(() => {\n // On first load, try to fetch the remote servers if the list is empty\n if (Object.keys(servers).length === 0) {\n fetchServers();\n }\n\n changeThemeInMarkup(settings.ui?.theme ?? 'light');\n }, []);\n\n return (\n
\n \n\n
\n
\n \n \n \n \n \n \n \n \n \n
\n\n
\n \n
\n
\n\n \n
\n );\n};\n\nexport default App;\n","import Bottle, { Decorator } from 'bottlejs';\nimport { appUpdateAvailable, resetAppUpdate } from '../reducers/appUpdates';\nimport App from '../App';\nimport { ConnectDecorator } from '../../container/types';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {\n // Components\n bottle.serviceFactory(\n 'App',\n App,\n 'MainHeader',\n 'Home',\n 'MenuLayout',\n 'CreateServer',\n 'EditServer',\n 'Settings',\n 'ManageServers',\n 'ShlinkVersionsContainer',\n );\n bottle.decorator('App', connect([ 'servers', 'settings', 'appUpdated' ], [ 'fetchServers', 'resetAppUpdate' ]));\n bottle.decorator('App', withRouter);\n\n // Actions\n bottle.serviceFactory('appUpdateAvailable', () => appUpdateAvailable);\n bottle.serviceFactory('resetAppUpdate', () => resetAppUpdate);\n};\n\nexport default provideServices;\n","import Bottle, { IContainer } from 'bottlejs';\nimport { withRouter } from 'react-router-dom';\nimport { connect as reduxConnect } from 'react-redux';\nimport { pick } from 'ramda';\nimport provideApiServices from '../api/services/provideServices';\nimport provideCommonServices from '../common/services/provideServices';\nimport provideShortUrlsServices from '../short-urls/services/provideServices';\nimport provideServersServices from '../servers/services/provideServices';\nimport provideVisitsServices from '../visits/services/provideServices';\nimport provideTagsServices from '../tags/services/provideServices';\nimport provideUtilsServices from '../utils/services/provideServices';\nimport provideMercureServices from '../mercure/services/provideServices';\nimport provideSettingsServices from '../settings/services/provideServices';\nimport provideDomainsServices from '../domains/services/provideServices';\nimport provideAppServices from '../app/services/provideServices';\nimport { ConnectDecorator } from './types';\n\ntype LazyActionMap = Record;\n\nconst bottle = new Bottle();\nconst { container } = bottle;\n\nconst lazyService = (container: IContainer, serviceName: string) =>\n (...args: any[]) => (container[serviceName] as T)(...args) as K;\nconst mapActionService = (map: LazyActionMap, actionName: string): LazyActionMap => ({\n ...map,\n // Wrap actual action service in a function so that it is lazily created the first time it is called\n [actionName]: lazyService(container, actionName),\n});\nconst connect: ConnectDecorator = (propsFromState: string[] | null, actionServiceNames: string[] = []) =>\n reduxConnect(\n propsFromState ? pick(propsFromState) : null,\n actionServiceNames.reduce(mapActionService, {}),\n );\n\nprovideAppServices(bottle, connect, withRouter);\nprovideCommonServices(bottle, connect, withRouter);\nprovideApiServices(bottle);\nprovideShortUrlsServices(bottle, connect, withRouter);\nprovideServersServices(bottle, connect, withRouter);\nprovideTagsServices(bottle, connect);\nprovideVisitsServices(bottle, connect);\nprovideUtilsServices(bottle);\nprovideMercureServices(bottle);\nprovideSettingsServices(bottle, connect);\nprovideDomainsServices(bottle, connect);\n\nexport default container;\n","import { combineReducers } from 'redux';\nimport serversReducer from '../servers/reducers/servers';\nimport selectedServerReducer from '../servers/reducers/selectedServer';\nimport shortUrlsListReducer from '../short-urls/reducers/shortUrlsList';\nimport shortUrlsListParamsReducer from '../short-urls/reducers/shortUrlsListParams';\nimport shortUrlCreationReducer from '../short-urls/reducers/shortUrlCreation';\nimport shortUrlDeletionReducer from '../short-urls/reducers/shortUrlDeletion';\nimport shortUrlEditionReducer from '../short-urls/reducers/shortUrlEdition';\nimport shortUrlVisitsReducer from '../visits/reducers/shortUrlVisits';\nimport tagVisitsReducer from '../visits/reducers/tagVisits';\nimport orphanVisitsReducer from '../visits/reducers/orphanVisits';\nimport shortUrlDetailReducer from '../short-urls/reducers/shortUrlDetail';\nimport tagsListReducer from '../tags/reducers/tagsList';\nimport tagDeleteReducer from '../tags/reducers/tagDelete';\nimport tagEditReducer from '../tags/reducers/tagEdit';\nimport mercureInfoReducer from '../mercure/reducers/mercureInfo';\nimport settingsReducer from '../settings/reducers/settings';\nimport domainsListReducer from '../domains/reducers/domainsList';\nimport visitsOverviewReducer from '../visits/reducers/visitsOverview';\nimport appUpdatesReducer from '../app/reducers/appUpdates';\nimport { ShlinkState } from '../container/types';\n\nexport default combineReducers({\n servers: serversReducer,\n selectedServer: selectedServerReducer,\n shortUrlsList: shortUrlsListReducer,\n shortUrlsListParams: shortUrlsListParamsReducer,\n shortUrlCreationResult: shortUrlCreationReducer,\n shortUrlDeletion: shortUrlDeletionReducer,\n shortUrlEdition: shortUrlEditionReducer,\n shortUrlVisits: shortUrlVisitsReducer,\n tagVisits: tagVisitsReducer,\n orphanVisits: orphanVisitsReducer,\n shortUrlDetail: shortUrlDetailReducer,\n tagsList: tagsListReducer,\n tagDelete: tagDeleteReducer,\n tagEdit: tagEditReducer,\n mercureInfo: mercureInfoReducer,\n settings: settingsReducer,\n domainsList: domainsListReducer,\n visitsOverview: visitsOverviewReducer,\n appUpdated: appUpdatesReducer,\n});\n","import ReduxThunk from 'redux-thunk';\nimport { applyMiddleware, compose, createStore } from 'redux';\nimport { save, load, RLSOptions } from 'redux-localstorage-simple';\nimport reducers from '../reducers';\n\nconst isProduction = process.env.NODE_ENV !== 'production';\nconst composeEnhancers: Function = !isProduction && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst localStorageConfig: RLSOptions = {\n states: [ 'settings', 'servers' ],\n namespace: 'shlink',\n namespaceSeparator: '.',\n debounce: 300,\n};\n\nconst store = createStore(reducers, load(localStorageConfig), composeEnhancers(\n applyMiddleware(save(localStorageConfig), ReduxThunk),\n));\n\nexport default store;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL ?? '', window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://cra.link/PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://cra.link/PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import L from 'leaflet';\nimport marker2x from 'leaflet/dist/images/marker-icon-2x.png';\nimport marker from 'leaflet/dist/images/marker-icon.png';\nimport markerShadow from 'leaflet/dist/images/marker-shadow.png';\n\nexport const fixLeafletIcons = () => {\n delete (L.Icon.Default.prototype as any)._getIconUrl;\n\n L.Icon.Default.mergeOptions({\n iconRetinaUrl: marker2x,\n iconUrl: marker,\n shadowUrl: markerShadow,\n });\n};\n","import { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrowserRouter } from 'react-router-dom';\nimport { homepage } from '../package.json';\nimport container from './container';\nimport store from './container/store';\nimport { fixLeafletIcons } from './utils/helpers/leaflet';\nimport { register as registerServiceWorker } from './serviceWorkerRegistration';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport 'leaflet/dist/leaflet.css';\nimport './index.scss';\n\n// This overwrites icons used for leaflet maps, fixing some issues caused by webpack while processing the CSS\nfixLeafletIcons();\n\nconst { App, ScrollToTop, ErrorHandler, appUpdateAvailable } = container;\n\nrender(\n \n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nregisterServiceWorker({\n onUpdate() {\n store.dispatch(appUpdateAvailable()); // eslint-disable-line @typescript-eslint/no-unsafe-call\n },\n});\n","import { FC } from 'react';\nimport { Card, Row } from 'reactstrap';\nimport classNames from 'classnames';\nimport { faCircleNotch as preloader } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\n\ntype MessageType = 'default' | 'error';\n\nconst getClassForType = (type: MessageType) => {\n const map: Record = {\n error: 'border-danger',\n default: '',\n };\n\n return map[type];\n};\nconst getTextClassForType = (type: MessageType) => {\n const map: Record = {\n error: 'text-danger',\n default: 'text-muted',\n };\n\n return map[type];\n};\n\nexport interface MessageProps {\n className?: string;\n loading?: boolean;\n fullWidth?: boolean;\n type?: MessageType;\n}\n\nconst Message: FC = ({ className, children, loading = false, type = 'default', fullWidth = false }) => {\n const classes = classNames({\n 'col-md-12': fullWidth,\n 'col-md-10 offset-md-1': !fullWidth,\n });\n\n return (\n \n
\n \n

\n {loading && }\n {loading && {children ?? 'Loading...'}}\n {!loading && children}\n

\n
\n
\n
\n );\n};\n\nexport default Message;\n","import { FC } from 'react';\nimport './NoMenuLayout.scss';\n\nconst NoMenuLayout: FC = ({ children }) =>
{children}
;\n\nexport default NoMenuLayout;\n","import { compare } from 'compare-versions';\nimport { identity, memoizeWith } from 'ramda';\nimport { Empty, hasValue } from '../utils';\n\ntype SemVerPatternFragment = `${bigint | '*'}`;\n\nexport type SemVerPattern = SemVerPatternFragment\n| `${SemVerPatternFragment}.${SemVerPatternFragment}`\n| `${SemVerPatternFragment}.${SemVerPatternFragment}.${SemVerPatternFragment}`;\n\nexport interface Versions {\n maxVersion?: SemVerPattern;\n minVersion?: SemVerPattern;\n}\n\nexport type SemVer = `${bigint}.${bigint}.${bigint}` | 'latest';\n\nexport const versionMatch = (versionToMatch: SemVer | Empty, { maxVersion, minVersion }: Versions): boolean => {\n if (!hasValue(versionToMatch)) {\n return false;\n }\n\n const matchesMinVersion = !minVersion || compare(versionToMatch, minVersion, '>=');\n const matchesMaxVersion = !maxVersion || compare(versionToMatch, maxVersion, '<=');\n\n return matchesMaxVersion && matchesMinVersion;\n};\n\nconst versionIsValidSemVer = memoizeWith(identity, (version: string): version is SemVer => {\n try {\n return compare(version, version, '=');\n } catch (e) {\n return false;\n }\n});\n\nexport const versionToPrintable = (version: string) => !versionIsValidSemVer(version) ? version : `v${version}`;\n\nexport const versionToSemVer = (defaultValue: SemVer = 'latest') =>\n (version: string): SemVer => versionIsValidSemVer(version) ? version : defaultValue;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/develop/static/js/main.6c98e3d6.chunk.js.map b/develop/static/js/main.6c98e3d6.chunk.js.map deleted file mode 100644 index 3025b749..00000000 --- a/develop/static/js/main.6c98e3d6.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["servers/helpers/withoutSelectedServer.tsx","utils/helpers/files.ts","common/img/ShlinkLogo.tsx","servers/helpers/withSelectedServer.tsx","common/NotFound.tsx","servers/ServersListGroup.tsx","utils/helpers/hooks.ts","common/services/provideServices.ts","common/ScrollToTop.tsx","common/ErrorHandler.tsx","common/services/ImageDownloader.ts","utils/services/provideServices.ts","utils/services/LocalStorage.ts","servers/data/index.ts","utils/services/ColorGenerator.ts","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","common/MainHeader.tsx","utils/utils.ts","common/Home.tsx","common/MenuLayout.tsx","common/AsideMenu.tsx","utils/SimpleCard.tsx","utils/helpers/features.ts","utils/theme/index.ts","utils/helpers/query.ts","utils/SearchField.tsx","api/services/ShlinkApiClient.ts","api/services/ShlinkApiClientBuilder.ts","api/services/provideServices.ts","tags/helpers/Tag.tsx","utils/DropdownBtn.tsx","utils/helpers/date.ts","utils/dates/types/index.ts","utils/DateInput.tsx","utils/dates/DateRangeRow.tsx","utils/dates/DateIntervalDropdownItems.tsx","utils/dates/DateRangeSelector.tsx","short-urls/helpers/hooks.ts","short-urls/SearchBar.tsx","utils/helpers/ordering.ts","utils/SortingDropdown.tsx","mercure/helpers/boundToMercureHub.tsx","mercure/helpers/index.ts","mercure/helpers/Topics.ts","utils/table/TableOrderIcon.tsx","utils/helpers/redux.ts","visits/VisitsStats.tsx","short-urls/helpers/index.ts","visits/reducers/visitCreation.ts","api/utils/index.ts","short-urls/reducers/shortUrlDeletion.ts","short-urls/reducers/shortUrlCreation.ts","short-urls/reducers/shortUrlEdition.ts","short-urls/reducers/shortUrlsList.ts","short-urls/reducers/shortUrlsListParams.ts","utils/helpers/numbers.ts","utils/helpers/pagination.ts","short-urls/Paginator.tsx","short-urls/ShortUrlsList.tsx","utils/CopyToClipboardIcon.tsx","utils/Time.tsx","short-urls/helpers/ShortUrlDetailLink.tsx","short-urls/helpers/ShortUrlVisitsCount.tsx","short-urls/helpers/ShortUrlsRow.tsx","utils/DropdownBtnMenu.tsx","short-urls/helpers/ShortUrlsRowMenu.tsx","short-urls/CreateShortUrl.tsx","utils/Result.tsx","api/ShlinkApiError.tsx","short-urls/helpers/DeleteShortUrlModal.tsx","short-urls/helpers/CreateShortUrlResult.tsx","short-urls/ShortUrlsTable.tsx","short-urls/helpers/qr-codes/QrFormatDropdown.tsx","short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.tsx","short-urls/helpers/QrCodeModal.tsx","utils/helpers/qrCodes.ts","utils/BooleanControl.tsx","utils/Checkbox.tsx","short-urls/UseExistingIfFoundInfoIcon.tsx","utils/InfoTooltip.tsx","short-urls/helpers/ShortUrlFormCheckboxGroup.tsx","short-urls/ShortUrlForm.tsx","short-urls/EditShortUrl.tsx","short-urls/reducers/shortUrlDetail.ts","short-urls/services/provideServices.ts","utils/FormGroupContainer.tsx","servers/helpers/ServerForm.tsx","servers/CreateServer.tsx","servers/ServersDropdown.tsx","servers/DeleteServerModal.tsx","servers/DeleteServerButton.tsx","servers/EditServer.tsx","servers/helpers/ImportServersBtn.tsx","servers/reducers/selectedServer.ts","servers/reducers/servers.ts","servers/reducers/remoteServers.ts","servers/helpers/ForServerVersion.tsx","servers/helpers/ServerError.tsx","servers/Overview.tsx","servers/ManageServers.tsx","servers/ManageServersRow.tsx","servers/ManageServersRowDropdown.tsx","servers/services/ServersImporter.ts","servers/services/ServersExporter.ts","servers/services/provideServices.ts","visits/VisitsHeader.tsx","visits/ShortUrlVisitsHeader.tsx","utils/helpers/visits.ts","utils/ToggleSwitch.tsx","utils/helpers/charts.ts","visits/charts/LineChartCard.tsx","common/SimplePaginator.tsx","visits/VisitsTable.tsx","visits/helpers/MapModal.tsx","visits/helpers/OpenMapModalBtn.tsx","visits/types/helpers.ts","visits/services/VisitsParser.ts","visits/helpers/VisitsFilterDropdown.tsx","visits/charts/DoughnutChartLegend.tsx","visits/charts/DoughnutChart.tsx","visits/charts/ChartCard.tsx","visits/charts/DoughnutChartCard.tsx","utils/PaginationDropdown.tsx","visits/charts/HorizontalBarChart.tsx","visits/charts/SortableBarChartCard.tsx","visits/ShortUrlVisits.tsx","visits/reducers/common.ts","visits/reducers/shortUrlVisits.ts","visits/TagVisitsHeader.tsx","visits/TagVisits.tsx","visits/reducers/tagVisits.ts","visits/OrphanVisitsHeader.tsx","visits/OrphanVisits.tsx","visits/reducers/orphanVisits.ts","visits/reducers/visitsOverview.ts","visits/services/VisitsExporter.ts","visits/services/provideServices.ts","tags/helpers/TagBullet.tsx","tags/helpers/TagsSelector.tsx","tags/TagCard.tsx","tags/helpers/DeleteTagConfirmModal.tsx","tags/helpers/EditTagModal.tsx","tags/data/TagsListChildrenProps.ts","tags/TagsModeDropdown.tsx","tags/TagsList.tsx","tags/reducers/tagDelete.ts","tags/reducers/tagEdit.ts","tags/reducers/tagsList.ts","tags/TagsCards.tsx","tags/TagsTable.tsx","tags/TagsTableRow.tsx","tags/services/provideServices.ts","mercure/reducers/mercureInfo.ts","mercure/services/provideServices.ts","settings/RealTimeUpdates.tsx","settings/Settings.tsx","settings/reducers/settings.ts","settings/ShortUrlCreation.tsx","settings/UserInterface.tsx","utils/dates/DateIntervalSelector.tsx","settings/Visits.tsx","settings/services/provideServices.ts","domains/reducers/domainRedirects.ts","domains/reducers/domainsList.ts","domains/DomainSelector.tsx","domains/helpers/EditDomainRedirectsModal.tsx","domains/DomainRow.tsx","domains/ManageDomains.tsx","domains/services/provideServices.ts","app/reducers/appUpdates.ts","common/AppUpdateBanner.tsx","utils/helpers/sw.ts","app/App.tsx","app/services/provideServices.ts","container/index.ts","reducers/index.ts","container/store.ts","serviceWorkerRegistration.ts","utils/helpers/leaflet.ts","index.tsx","utils/Message.tsx","common/NoMenuLayout.tsx","utils/helpers/version.ts"],"names":["withoutSelectedServer","WrappedComponent","props","useEffect","resetSelectedServer","saveUrl","url","filename","document","link","createElement","setAttribute","style","visibility","body","appendChild","click","removeChild","saveCsv","window","csv","blob","Blob","type","URL","createObjectURL","ShlinkLogo","color","MAIN_COLOR","className","viewBox","version","xmlns","fill","d","withSelectedServer","ServerError","selectServer","selectedServer","match","params","serverId","isNotFoundServer","loading","NotFound","to","children","ServerListItem","id","name","ListGroupItem","tag","Link","icon","chevronIcon","ServersListGroup","servers","embedded","length","ListGroup","classNames","map","useStateFlagTimeout","setTimeout","clearTimeout","initialValue","delay","useState","flag","setFlag","timeout","useRef","undefined","callback","current","useToggle","useSwipeable","showSidebar","hideSidebar","swipeMenuIfNoModalExists","e","event","composedPath","some","classList","contains","querySelector","useReactSwipeable","delta","onSwipedLeft","onSwipedRight","useQueryState","paramName","initialState","value","setValue","location","history","query","parseQuery","search","pushState","pathname","stringifyQuery","provideServices","bottle","connect","withRouter","constant","global","console","axios","service","ImageDownloader","serviceFactory","ScrollToTop","decorator","MainHeader","Home","MenuLayout","AsideMenu","ShlinkVersionsContainer","ErrorHandler","scrollTo","error","state","hasError","this","outline","onClick","reload","Component","imgUrl","get","responseType","data","localStorage","LocalStorage","ColorGenerator","buildPath","path","key","item","getItem","JSON","parse","set","setItem","stringify","hasServerData","server","apiKey","isServerWithId","hasOwnProperty","isReachableServer","getServerId","serverWithIdToServerData","omit","floor","Math","random","letters","normalizeKey","toLowerCase","trim","storage","colors","getColorForKey","normalizedKey","setColorForKey","rangeOf","join","normalizeVersion","pipe","versionToSemVer","versionToPrintable","VersionLink","project","href","ShlinkVersions","clientVersion","normalizedClientVersion","printableVersion","classes","ServersDropdown","isOpen","toggleOpen","close","settingsPath","toggleClass","Navbar","dark","fixed","expand","NavbarBrand","NavbarToggler","arrowIcon","Collapse","navbar","Nav","NavItem","NavLink","active","cogsIcon","size","mappingFn","startAt","range","hasValue","isNil","isEmpty","handleEventPreventingDefault","handler","preventDefault","nonEmptyValueOrNull","capitalize","charAt","toUpperCase","slice","serversList","values","hasServers","autoConnectServer","find","autoConnect","push","Card","Row","noGutters","faPlus","faExternalLinkAlt","TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","Overview","EditShortUrl","ManageDomains","sidebarVisible","toggleSidebar","addOrphanVisitsRoute","supportsOrphanVisits","addManageDomainsRoute","supportsDomainRedirects","burgerClasses","swipeableProps","burgerIcon","showOnMobile","exact","from","component","render","AsideMenuItem","rest","activeClassName","DeleteServerButton","hasId","addManageDomainsLink","asideClass","suffix","fixedWidth","overviewIcon","isActive","_","listIcon","createIcon","flip","tagsIcon","domainsIcon","editIcon","textClassName","SimpleCard","title","bodyClassName","serverMatchesVersions","versions","versionMatch","supportsQrCodeSizeInQuery","minVersion","supportsShortUrlTitle","supportsQrCodeMargin","supportsTagsInPatch","supportsBotVisits","supportsCrawlableVisits","supportsQrErrorCorrection","supportsForwardQuery","MAIN_COLOR_ALPHA","HIGHLIGHTED_COLOR","HIGHLIGHTED_COLOR_ALPHA","PRIMARY_LIGHT_COLOR","PRIMARY_DARK_COLOR","changeThemeInMarkup","theme","html","getElementsByTagName","isDarkThemeEnabled","getAttribute","qs","ignoreQueryPrefix","arrayFormat","timer","buildShlinkBaseUrl","apiVersion","rejectNilProps","reject","ShlinkApiClient","baseUrl","listShortUrls","a","performRequest","then","shortUrls","createShortUrl","options","filteredOptions","resp","getShortUrlVisits","shortCode","visits","getTagVisits","getOrphanVisits","getVisitsOverview","getShortUrl","domain","deleteShortUrl","updateShortUrlTags","tags","updateShortUrl","listTags","withStats","stats","deleteTags","editTag","oldName","newName","health","mercureInfo","listDomains","domains","editDomainRedirects","domainRedirects","method","headers","paramsSerializer","response","apiClients","buildShlinkApiClient","getStateOrSelectedServer","getState","isGetState","prop","Error","clientKey","SearchField","onChange","large","noBorder","searchTerm","setSearchTerm","resetTimer","searchTermChanged","newSearchTerm","placeholder","target","searchIcon","hidden","Tag","text","clearable","colorGenerator","onClose","backgroundColor","cursor","DropdownBtn","disabled","dropdownClassName","right","minWidth","toggle","toggleClasses","Dropdown","DropdownToggle","caret","DropdownMenu","isDateObject","date","formatDateFromFormat","theFormat","format","formatISO","formatIsoDate","formatInternational","formatDate","parseISO","stdParseISO","isBetween","start","end","isBefore","isAfter","isWithinInterval","dateRangeIsEmpty","dateRange","filter","Boolean","rangeIsInterval","INTERVAL_TO_STRING_MAP","today","yesterday","last7Days","last30Days","last90Days","last180days","last365Days","all","DATE_INTERVALS","Object","keys","rangeOrIntervalToString","startDate","endDate","dateRangeToString","startOfDaysAgo","daysAgo","startOfDay","subDays","Date","endingToday","endOfDay","intervalToDateRange","dateInterval","DateInput","isClearable","selected","showCalendarIcon","ref","dateFormat","calendarIcon","input","focus","DateRangeRow","onStartDateChange","onEndDateChange","placeholderText","maxDate","minDate","DateIntervalDropdownItems","allText","DropdownItem","divider","interval","DateRangeSelector","onDatesChange","initialDateRange","defaultText","initialIntervalIsRange","activeInterval","setActiveInterval","activeDateRange","setActiveDateRange","updateDateRange","header","useShortUrlsQuery","useMemo","extra","evolvedQuery","queryString","dateOrNull","SearchBar","toFirstPage","selectedTags","split","setDates","setSearch","removeTag","selectedTag","tagsList","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","sortList","list","field","dir","sort","b","greaterThan","smallerThan","SortingDropdown","items","order","isButton","handleItemClick","fieldKey","newOrderDir","UncontrolledDropdown","toPairs","fieldValue","sortAscIcon","sortDescIcon","boundToMercureHub","getTopicsForProps","pendingUpdates","Set","createNewVisits","loadMercureInfo","closeEventSource","topics","onMessage","onTokenExpired","mercureHubUrl","token","onEventSourceMessage","onEventSourceError","status","subscriptions","topic","hubUrl","searchParams","append","es","EventSource","Authorization","onmessage","onerror","forEach","bindToMercureTopic","visit","add","setInterval","clear","clearInterval","Topics","TableOrderIcon","currentOrder","caretUpIcon","caretDownIcon","orphanVisits","shortUrlVisits","selectedBar","buildReducer","action","actionHandler","currentState","buildActionCreator","shortUrlMatches","shortUrl","CREATE_VISITS","createdVisits","parseApiError","isInvalidDeletionError","DELETE_SHORT_URL_START","DELETE_SHORT_URL_ERROR","SHORT_URL_DELETED","RESET_DELETE_SHORT_URL","errorData","dispatch","resetDeleteShortUrl","CREATE_SHORT_URL_START","CREATE_SHORT_URL_ERROR","CREATE_SHORT_URL","RESET_CREATE_SHORT_URL","result","saving","resetCreateShortUrl","EDIT_SHORT_URL_START","EDIT_SHORT_URL_ERROR","SHORT_URL_EDITED","editShortUrl","sendTagsSeparately","Promise","LIST_SHORT_URLS_START","LIST_SHORT_URLS_ERROR","LIST_SHORT_URLS","assocPath","pagination","totalItems","currentShortUrl","lastVisit","last","assoc","visitsCount","init","editedShortUrl","RESET_SHORT_URL_PARAMS","SORTABLE_FIELDS","dateCreated","longUrl","page","orderBy","resetShortUrlParams","ceil","formatter","Intl","NumberFormat","prettify","number","Number","ELLIPSIS","progressivePagination","currentPage","pageCount","pages","max","min","unshift","pageIsEllipsis","pageNumber","prettifyPageNumber","keyForPage","index","Paginator","paginator","currentQueryString","pagesCount","urlForPage","Pagination","listClassName","PaginationItem","PaginationLink","previous","next","ShortUrlsTable","shortUrlsListParams","shortUrlsList","head","setOrder","refreshList","extraParams","handleOrderBy","addTag","newTag","itemsPerPage","orderByColumn","renderOrderIcon","onTagClick","CopyToClipboardIcon","onCopy","copyIcon","Time","relative","dateObject","dateTime","getUnixTime","formatDistance","buildUrl","ShortUrlDetailLink","ShortUrlVisitsCount","maxVisits","meta","visitsLink","prettifiedMaxVisits","tooltipRef","el","infoIcon","UncontrolledTooltip","placement","ShortUrlsRow","ShortUrlsRowMenu","copiedToClipboard","setCopiedToClipboard","setActive","isFirstRun","data-th","DropdownBtnMenu","ButtonDropdown","menuIcon","DeleteShortUrlModal","QrCodeModal","isQrModalOpen","toggleQrCode","isDeleteModalOpen","toggleDelete","pieChartIcon","qrIcon","deleteIcon","ShortUrlForm","CreateShortUrlResult","shortUrlCreationResult","basicMode","shortUrlCreationSettings","settings","shortUrlCreation","customSlug","shortCodeLength","validSince","validUntil","findIfExists","validateUrl","validateUrls","forwardQuery","getInitialState","mode","onSave","canBeClosed","Result","small","ShlinkApiError","fallbackMessage","detail","invalidElements","shortUrlDeletion","inputValue","setInputValue","handleDeleteUrl","catch","identity","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","actionableFieldClasses","orderableColumnsClasses","tableClasses","supportsTitle","colSpan","QrFormatDropdown","setFormat","QrErrorCorrectionDropdown","errorCorrection","setErrorCorrection","imageDownloader","ForServerVersion","setSize","margin","setMargin","capabilities","useSizeInPath","marginIsSupported","errorCorrectionIsSupported","willRenderThreeControls","qrCodeUrl","buildQrCodeUrl","totalSize","modalSize","step","src","alt","Button","block","saveImage","downloadIcon","BooleanControl","checked","inline","uuid","typeClasses","display","htmlFor","Checkbox","InfoModal","UseExistingIfFoundInfoIcon","isModalOpen","toggleModal","InfoTooltip","ShortUrlFormCheckboxGroup","infoTooltip","normalizeTag","replace","toDate","dynamicColClasses","TagsSelector","DomainSelector","shortUrlData","setShortUrlData","isEdit","hadTitleOriginally","resolveNewTitle","hasNewTitle","cond","T","matcher","submit","renderOptionalInput","Input","renderDateInput","basicComponents","bsSize","required","showCustomizeCard","limitAccessCardClasses","showCrawlableControl","showForwardQueryControl","showBehaviorCard","extraChecksCardClasses","crawlable","goBack","shortUrlDetail","getShortUrlDetail","shortUrlEdition","savingError","savingErrorData","savingSucceeded","isSuccessful","isNotSuccessful","Message","faArrowLeft","GET_SHORT_URL_DETAIL_START","GET_SHORT_URL_DETAIL_ERROR","GET_SHORT_URL_DETAIL","FormGroupContainer","labelClassName","forId","FormGroup","ServerForm","initialValues","setName","setUrl","setApiKey","handleSubmit","ImportResult","CreateServer","ImportServersBtn","createServer","serversImported","setServersImported","errorImporting","setErrorImporting","NoMenuLayout","serverData","tooltipPlacement","onImport","onImportError","nav","inNavbar","serverIcon","plusIcon","DeleteServerModal","deleteServer","redirectHome","showModal","hideModal","EditServer","editServer","importServersFromFile","createServers","fileRef","files","importIcon","accept","SELECT_SERVER","RESET_SELECTED_SERVER","toSemVer","getServerVersion","memoizeWith","_serverId","serverNotFound","serverNotReachable","EDIT_SERVER","DELETE_SERVER","CREATE_SERVERS","SET_AUTO_CONNECT","newServers","dissoc","fromPairs","evaluatedServerId","serversListToMap","reduce","acc","setAutoConnect","responseToServersList","Array","isArray","fetchServers","homepage","remoteList","maxVersion","fullWidth","loadVisitsOverview","visitsOverview","loadingTags","loadingVisits","orphanVisitsCount","useHistory","CardTitle","CardText","CardHeader","CardBody","encodeURIComponent","ManageServers","serversExporter","ManageServersRow","allServers","setServersList","hasAutoConnect","exportServers","exportIcon","width","ManageServersRowDropdown","checkIcon","isMenuOpen","toggleMenu","serverUrl","isAutoConnect","autoConnectIcon","toggleOffIcon","toggleOnIcon","connectIcon","validateServer","validateServers","every","ServersImporter","csvJson","fileReaderFactory","file","reader","resolve","addEventListener","content","toString","toObject","readAsText","ServersExporter","csvjson","toCSV","FileReader","VisitsHeader","ShortUrlVisitsHeader","shortLink","longLink","visitsStatsTitle","DEFAULT","BROWSERS_WHITELIST","extractDomain","includes","fillTheGaps","labels","zipObj","ToggleSwitch","pointerOnHover","native","firstElement","renderChartLabel","dataset","formattedValue","label","renderPieChartLabel","STEPS_MAP","monthly","weekly","daily","hourly","STEP_TO_DURATION_MAP","hours","days","weeks","months","STEP_TO_DIFF_FUNC_MAP","differenceInHours","differenceInDays","differenceInWeeks","differenceInMonths","STEP_TO_DATE_FORMAT","firstWeekDay","startOfISOWeek","lastWeekDay","endOfISOWeek","groupVisitsByStep","countBy","generateLabelsAndGroupedVisits","groupedVisitsWithGaps","skipNoElements","diffFunc","newerDate","oldestDate","duration","num","generateLabels","generateDataset","tension","borderColor","selectedLabel","chartElementAtEvent","datasetsByPoint","setSelectedVisits","chart","LineChartCard","highlightedVisits","highlightedLabel","oldestVisitDate","now","always","determineInitialStep","setStep","skipNoVisits","toggleSkipNoVisits","visitsToDatasetGroups","reverse","groupedVisits","groupedHighlighted","generateChartDatasets","mainDataset","maintainAspectRatio","plugins","legend","tooltip","intersect","axis","callbacks","scales","y","beginAtZero","ticks","precision","x","onHover","renderLineChart","datasets","getElementAtEvent","entries","menuText","SimplePaginator","setCurrentPage","searchVisits","browser","os","referer","country","city","visitedUrl","visitMatchesSearch","calculateVisits","allVisits","sortedVisits","sortVisits","total","visitsGroups","splitEvery","VisitsTable","selectedVisits","matchMedia","isOrphanVisits","headerCellsClass","matchMobile","matches","isMobileDevice","setIsMobileDevice","resultSet","isFirstLoad","setPage","supportsBots","fullSizeColSpan","listener","removeEventListener","flat","botIcon","isSelected","v","potentialBot","OpenStreetMapTile","TileLayer","attribution","calculateMapProps","locations","bounds","zoom","center","latLong","MapModal","contentClassName","MapContainer","cityName","count","Marker","position","Popup","OpenMapModalBtn","modalTitle","activeCities","mapIsOpened","openMap","closeMap","dropdownIsOpened","toggleDropdown","openDropdown","locationsToShow","setLocationsToShow","buttonRef","openMapWithLocations","filtered","mapIcon","isOrphanVisit","groupNewVisitsByType","groupBy","newVisit","regularVisits","highlightedVisitsToStats","property","toApiParams","excludeBots","visitHasProperty","propertyName","optionalNumericToNumber","numeric","parseFloat","updateLocationsStatsForVisit","updateCountriesStatsForVisit","updateCitiesStatsForVisit","processStatsFromVisits","osStats","updateOsStatsForVisit","browsersStats","updateBrowsersStatsForVisit","browsers","referrersStats","updateReferrersStatsForVisit","referrers","countries","cities","citiesForMapStats","latitude","longitude","currentCity","updateCitiesForMapForVisit","citiesForMap","visitedUrlsStats","isNormalizedOrphanVisit","updateVisitedUrlsForVisit","visitedUrls","normalizeVisits","userAgent","visitLocation","common","bowser","parseUserAgent","countryName","VisitsFilterDropdown","botsSupported","orphanVisitsType","propsForOrphanVisitsTypeItem","DoughnutChartLegend","config","defaultColor","borderWidth","DoughnutChart","memo","chartRef","setChartRef","chartData","generateChartData","height","element","ChartCard","footer","CardFooter","DoughnutChartCard","PaginationDropdown","toggleClassName","ranges","Infinity","dropLabelIfHidden","startsWith","highlightedData","HorizontalBarChart","highlightedStats","statsAreDefined","highlightedKey","stacked","indexAxis","determineHeight","renderChartComponent","customKey","toLowerIfString","toLower","pickKeyFromPair","pickValueFromPair","SortableBarChartCard","sortingItems","extraHeaderContent","withPagination","setItemsPerPage","determineCurrentPagePairs","firstPageLength","i","sortedPairs","pairs","sortBy","getSortedPairsForStats","sortedKeys","sortedHighlightedPairs","currentPageStats","currentPageHighlightedStats","highlightedPages","determineStats","sections","byTime","subPath","faCalendarAlt","byContext","faChartPie","byLocation","faMapMarkedAlt","faList","VisitsNavLink","RouterNavLink","endsWith","VisitsStats","visitsInfo","getVisits","cancelGetVisits","exportCsv","initialInterval","defaultInterval","setDateRange","setHighlightedVisits","setHighlightedLabel","visitsFilter","setVisitsFilter","buildSectionUrl","loadingLarge","progress","normalizedVisits","mapLocations","highlightVisitsForProp","newSelectedBar","propEq","faFileDownload","Progress","striped","pills","section","amount","exportVisits","cancelGetShortUrlVisits","ITEMS_PER_PAGE","isLastPage","calcProgress","getVisitsWithLoader","visitsLoader","extraFinishActionData","actionMap","shouldCancel","loadVisitsInParallel","flatten","loadPagesBlocks","pagesBlocks","concat","loadVisits","pagesRange","finish","GET_SHORT_URL_VISITS_START","GET_SHORT_URL_VISITS_ERROR","GET_SHORT_URL_VISITS","GET_SHORT_URL_VISITS_LARGE","GET_SHORT_URL_VISITS_CANCEL","GET_SHORT_URL_VISITS_PROGRESS_CHANGED","cancelLoad","newVisits","TagVisitsHeader","tagVisits","cancelGetTagVisits","GET_TAG_VISITS_START","GET_TAG_VISITS_ERROR","GET_TAG_VISITS","GET_TAG_VISITS_LARGE","GET_TAG_VISITS_CANCEL","GET_TAG_VISITS_PROGRESS_CHANGED","OrphanVisitsHeader","cancelGetOrphanVisits","GET_ORPHAN_VISITS_START","GET_ORPHAN_VISITS_ERROR","GET_ORPHAN_VISITS","GET_ORPHAN_VISITS_LARGE","GET_ORPHAN_VISITS_CANCEL","GET_ORPHAN_VISITS_PROGRESS_CHANGED","matchesType","GET_OVERVIEW_START","GET_OVERVIEW_ERROR","GET_OVERVIEW","VisitsExporter","visitsParser","TagBullet","toComponentTag","searchMode","tagFilteringMode","tagComponent","onDelete","suggestions","suggestionComponent","allowNew","addOnBlur","minQueryLength","delimiters","suggestionsTransform","removedTagIndex","tagsCopy","splice","onAddition","TagCard","DeleteTagConfirmModal","EditTagModal","displayed","isEditModalOpen","toggleEdit","hasTitle","displayTitle","titleRef","scrollWidth","clientWidth","faLink","faEye","deleteTag","tagDelete","tagDeleted","deleting","doDelete","tagEdited","tagEdit","newTagName","setNewTagName","setColor","showColorPicker","toggleColorPicker","hideColorPicker","editing","saveTag","onClosed","colorIcon","Popover","disableAlpha","hex","TagsModeDropdown","renderTitle","cardsIcon","TagsCards","TagsTable","filterTags","forceListTags","ui","tagsMode","setMode","resolveSortedTags","filteredTags","shortUrlsCount","normalizedTags","sortedTags","renderContent","DELETE_TAG_START","DELETE_TAG_ERROR","DELETE_TAG","TAG_DELETED","EDIT_TAG_START","EDIT_TAG_ERROR","EDIT_TAG","TAG_EDITED","pick","LIST_TAGS_START","LIST_TAGS_ERROR","LIST_TAGS","FILTER_TAGS","renameTag","rejectTag","tagToReject","calculateVisitsPerTag","increase","tagStats","displayedTag","setDisplayedTag","tagsCount","tagsGroups","group","TagsTableRow","pageFromQuery","showPaginator","isDropdownOpen","listTagsActionFactory","force","processedStats","factory","GET_MERCURE_INFO_START","GET_MERCURE_INFO_ERROR","GET_MERCURE_INFO","realTimeUpdates","enabled","info","RealTimeUpdates","toggleRealTimeUpdates","setRealTimeUpdatesInterval","SettingsSections","child","subChild","subIndex","Settings","ShortUrlCreation","UserInterface","Visits","SET_SETTINGS","mergeDeepRight","setShortUrlCreationSettings","setUiSettings","setVisitsSettings","tagFilteringModeText","changeTagsFilteringMode","faMoon","faSun","useDarkTheme","DateIntervalSelector","EDIT_DOMAIN_REDIRECTS","redirects","LIST_DOMAINS_START","LIST_DOMAINS_ERROR","LIST_DOMAINS","FILTER_DOMAINS","filteredDomains","replaceRedirectsOnDomain","filterDomains","domainsList","inputDisplayed","showInput","hideInput","valueIsEmpty","unselectDomain","InputGroup","InputGroupAddon","addonType","faUndo","trigger","isDefault","isLast","EditDomainRedirectsModal","baseUrlRedirect","setBaseUrlRedirect","regular404Redirect","setRegular404Redirect","invalidShortUrlRedirect","setInvalidShortUrlRedirect","Nr","fallback","DefaultDomain","defaultDomainIcon","DomainRow","defaultRedirects","authority","domainId","forbiddenIcon","column","APP_UPDATE_AVAILABLE","RESET_APP_UPDATE","appUpdateAvailable","resetAppUpdate","AppUpdateBanner","forceUpdate","isUpdating","setUpdating","Alert","reloadIcon","navigator","serviceWorker","getRegistrations","registrations","registration","waiting","postMessage","App","appUpdated","isHome","Bottle","container","mapActionService","actionName","serviceName","lazyService","propsFromState","actionServiceNames","reduxConnect","provideAppServices","provideCommonServices","provideApiServices","provideShortUrlsServices","provideServersServices","provideTagsServices","provideVisitsServices","provideUtilsServices","provideMercureServices","provideSettingsServices","provideDomainsServices","combineReducers","serversReducer","selectedServerReducer","shortUrlsListReducer","shortUrlsListParamsReducer","shortUrlCreationReducer","shortUrlDeletionReducer","shortUrlEditionReducer","shortUrlVisitsReducer","tagVisitsReducer","orphanVisitsReducer","shortUrlDetailReducer","tagsListReducer","tagDeleteReducer","tagEditReducer","mercureInfoReducer","settingsReducer","domainsListReducer","visitsOverviewReducer","appUpdatesReducer","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","localStorageConfig","states","namespace","namespaceSeparator","debounce","store","createStore","reducers","load","applyMiddleware","save","ReduxThunk","isLocalhost","hostname","registerValidSW","swUrl","register","onupdatefound","installingWorker","installing","onstatechange","controller","log","onUpdate","onSuccess","L","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","marker2x","iconUrl","marker","shadowUrl","markerShadow","basename","getElementById","process","origin","fetch","contentType","indexOf","ready","unregister","checkValidServiceWorker","registerServiceWorker","getClassForType","default","getTextClassForType","preloader","spin","versionToMatch","matchesMinVersion","compare","versionIsValidSemVer","defaultValue"],"mappings":"qJAMO,SAASA,EAA8BC,GAC5C,OAAO,SAACC,GAKN,OAJAC,qBAAU,WACRD,EAAME,wBACL,IAEI,cAACH,EAAD,eAAsBC,O,iCCZjC,oEAAO,IAAMG,EAAU,SAAC,EAAsBC,EAAaC,GAAsB,IAAvDC,EAAsD,EAAtDA,SAClBC,EAAOD,EAASE,cAAc,KAEpCD,EAAKE,aAAa,OAAQL,GAC1BG,EAAKE,aAAa,WAAYJ,GAC9BE,EAAKG,MAAMC,WAAa,SACxBL,EAASM,KAAKC,YAAYN,GAC1BA,EAAKO,QACLR,EAASM,KAAKG,YAAYR,IAGfS,EAAU,SAACC,EAAgBC,EAAab,GACnD,IAAMc,EAAO,IAAIC,KAAK,CAAEF,GAAO,CAAEG,KAAM,4BACjCjB,EAAMkB,IAAIC,gBAAgBJ,GAEhChB,EAAQc,EAAQb,EAAKC,K,kKCRVmB,EAAa,SAAC,GAAD,QAAGC,aAAH,MAAWC,IAAX,EAAuBC,EAAvB,EAAuBA,UAAvB,OACxB,qBAAKA,UAAWA,EAAWC,QAAQ,cAAcC,QAAQ,MAAMC,MAAM,6BAArE,SACE,oBAAGC,KAAMN,EAAT,UACE,sBACEO,EAAE,6lBAEJ,sBACEA,EAAE,uiBAEJ,sBACEA,EAAE,uiBAEJ,sBACEA,EAAE,8X,oHCTH,SAASC,EAA2BlC,EAAmDmC,GAC5F,OAAO,SAAClC,GAAwC,IACtCmC,EAAwCnC,EAAxCmC,aAAcC,EAA0BpC,EAA1BoC,eAAgBC,EAAUrC,EAAVqC,MAMtC,OAJApC,qBAAU,WACRkC,EAAaE,EAAMC,OAAOC,YACzB,CAAEF,EAAMC,OAAOC,WAEb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ApCA,WACzE,IAAKxE,YAAS20C,GACZ,OAAO,EAGT,IAAMC,GAAqBpwC,GAAcqwC,kBAAQF,EAAgBnwC,EAAY,MAG7E,QAF2BqlB,GAAcgrB,kBAAQF,EAAgB9qB,EAAY,QAEjD+qB,GAGxBE,EAAuBvsB,YAAYhJ,KAAU,SAACxqB,GAClD,IACE,OAAO8/C,kBAAQ9/C,EAASA,EAAS,KACjC,MAAOiD,GACP,OAAO,MAIE+F,EAAqB,SAAChJ,GAAD,OAAsB+/C,EAAqB//C,GAAtB,WAA+CA,GAAdA,GAE3E+I,EAAkB,eAACi3C,EAAD,uDAAwB,SAAxB,OAC7B,SAAChgD,GAAD,OAA6B+/C,EAAqB//C,GAAWA,EAAUggD,M","file":"static/js/main.6c98e3d6.chunk.js","sourcesContent":["import { FC, useEffect } from 'react';\n\ninterface WithoutSelectedServerProps {\n resetSelectedServer: Function;\n}\n\nexport function withoutSelectedServer(WrappedComponent: FC) {\n return (props: WithoutSelectedServerProps & T) => {\n useEffect(() => {\n props.resetSelectedServer();\n }, []);\n\n return ;\n };\n}\n","export const saveUrl = ({ document }: Window, url: string, filename: string) => {\n const link = document.createElement('a');\n\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n};\n\nexport const saveCsv = (window: Window, csv: string, filename: string) => {\n const blob = new Blob([ csv ], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n\n saveUrl(window, url, filename);\n};\n","import { MAIN_COLOR } from '../../utils/theme';\n\nexport interface ShlinkLogoProps {\n color?: string;\n className?: string;\n}\n\nexport const ShlinkLogo = ({ color = MAIN_COLOR, className }: ShlinkLogoProps) => (\n \n \n \n \n \n \n \n \n);\n","import { FC, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport Message from '../../utils/Message';\nimport { isNotFoundServer, SelectedServer } from '../data';\nimport NoMenuLayout from '../../common/NoMenuLayout';\n\ninterface WithSelectedServerProps extends RouteComponentProps<{ serverId: string }> {\n selectServer: (serverId: string) => void;\n selectedServer: SelectedServer;\n}\n\nexport function withSelectedServer(WrappedComponent: FC, ServerError: FC) {\n return (props: WithSelectedServerProps & T) => {\n const { selectServer, selectedServer, match } = props;\n\n useEffect(() => {\n selectServer(match.params.serverId);\n }, [ match.params.serverId ]);\n\n if (!selectedServer) {\n return (\n \n \n \n );\n }\n\n if (isNotFoundServer(selectedServer)) {\n return ;\n }\n\n return ;\n };\n}\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface NotFoundProps {\n to?: string;\n}\n\nconst NotFound: FC = ({ to = '/', children = 'Home' }) => (\n
\n \n

Oops! We could not find requested route.

\n

\n Use your browser's back button to navigate to the page you have previously come from, or just press this\n button.\n

\n
\n {children}\n
\n
\n);\n\nexport default NotFound;\n","import { FC } from 'react';\nimport { ListGroup, ListGroupItem } from 'reactstrap';\nimport { Link } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronRight as chevronIcon } from '@fortawesome/free-solid-svg-icons';\nimport { ServerWithId } from './data';\nimport './ServersListGroup.scss';\n\ninterface ServersListGroupProps {\n servers: ServerWithId[];\n embedded?: boolean;\n}\n\nconst ServerListItem = ({ id, name }: { id: string; name: string }) => (\n \n {name}\n \n \n);\n\nconst ServersListGroup: FC = ({ servers, children, embedded = false }) => (\n <>\n {children &&
{children}
}\n {servers.length > 0 && (\n \n {servers.map(({ id, name }) => )}\n \n )}\n \n);\n\nexport default ServersListGroup;\n","import { useState, useRef } from 'react';\nimport { useSwipeable as useReactSwipeable } from 'react-swipeable';\nimport { parseQuery, stringifyQuery } from './query';\n\nconst DEFAULT_DELAY = 2000;\n\nexport type StateFlagTimeout = (initialValue?: boolean, delay?: number) => [ boolean, () => void ];\n\nexport const useStateFlagTimeout = (\n setTimeout: (callback: Function, timeout: number) => number,\n clearTimeout: (timer: number) => void,\n): StateFlagTimeout => (initialValue = false, delay = DEFAULT_DELAY) => {\n const [ flag, setFlag ] = useState(initialValue);\n const timeout = useRef(undefined);\n const callback = () => {\n setFlag(!initialValue);\n\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => setFlag(initialValue), delay);\n };\n\n return [ flag, callback ];\n};\n\ntype ToggleResult = [ boolean, () => void, () => void, () => void ];\n\nexport const useToggle = (initialValue = false): ToggleResult => {\n const [ flag, setFlag ] = useState(initialValue);\n\n return [ flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false) ];\n};\n\nexport const useSwipeable = (showSidebar: () => void, hideSidebar: () => void) => {\n const swipeMenuIfNoModalExists = (callback: () => void) => (e: any) => {\n const swippedOnVisitsTable = (e.event.composedPath() as HTMLElement[]).some( // eslint-disable-line @typescript-eslint/no-unsafe-call\n ({ classList }) => classList?.contains('visits-table'),\n );\n\n if (swippedOnVisitsTable || document.querySelector('.modal')) {\n return;\n }\n\n callback();\n };\n\n return useReactSwipeable({\n delta: 40,\n onSwipedLeft: swipeMenuIfNoModalExists(hideSidebar),\n onSwipedRight: swipeMenuIfNoModalExists(showSidebar),\n });\n};\n\nexport const useQueryState = (paramName: string, initialState: T): [ T, (newValue: T) => void ] => {\n const [ value, setValue ] = useState(initialState);\n const setValueWithLocation = (value: T) => {\n const { location, history } = window;\n const query = parseQuery(location.search);\n\n query[paramName] = value;\n history.pushState(null, '', `${location.pathname}?${stringifyQuery(query)}`);\n setValue(value);\n };\n\n return [ value, setValueWithLocation ];\n};\n","import axios from 'axios';\nimport Bottle, { Decorator } from 'bottlejs';\nimport ScrollToTop from '../ScrollToTop';\nimport MainHeader from '../MainHeader';\nimport Home from '../Home';\nimport MenuLayout from '../MenuLayout';\nimport AsideMenu from '../AsideMenu';\nimport ErrorHandler from '../ErrorHandler';\nimport ShlinkVersionsContainer from '../ShlinkVersionsContainer';\nimport { ConnectDecorator } from '../../container/types';\nimport { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServer';\nimport { ImageDownloader } from './ImageDownloader';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {\n // Services\n bottle.constant('window', (global as any).window);\n bottle.constant('console', global.console);\n bottle.constant('axios', axios);\n\n bottle.service('ImageDownloader', ImageDownloader, 'axios', 'window');\n\n // Components\n bottle.serviceFactory('ScrollToTop', ScrollToTop);\n bottle.decorator('ScrollToTop', withRouter);\n\n bottle.serviceFactory('MainHeader', MainHeader, 'ServersDropdown');\n bottle.decorator('MainHeader', withRouter);\n\n bottle.serviceFactory('Home', () => Home);\n bottle.decorator('Home', withoutSelectedServer);\n bottle.decorator('Home', withRouter);\n bottle.decorator('Home', connect([ 'servers' ], [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory(\n 'MenuLayout',\n MenuLayout,\n 'TagsList',\n 'ShortUrlsList',\n 'AsideMenu',\n 'CreateShortUrl',\n 'ShortUrlVisits',\n 'TagVisits',\n 'OrphanVisits',\n 'ServerError',\n 'Overview',\n 'EditShortUrl',\n 'ManageDomains',\n );\n bottle.decorator('MenuLayout', connect([ 'selectedServer' ], [ 'selectServer' ]));\n bottle.decorator('MenuLayout', withRouter);\n\n bottle.serviceFactory('AsideMenu', AsideMenu, 'DeleteServerButton');\n\n bottle.serviceFactory('ShlinkVersionsContainer', () => ShlinkVersionsContainer);\n bottle.decorator('ShlinkVersionsContainer', connect([ 'selectedServer' ]));\n\n bottle.serviceFactory('ErrorHandler', ErrorHandler, 'window', 'console');\n};\n\nexport default provideServices;\n","import { PropsWithChildren, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\n\nconst ScrollToTop = () => ({ location, children }: PropsWithChildren) => {\n useEffect(() => {\n scrollTo(0, 0);\n }, [ location ]);\n\n return <>{children};\n};\n\nexport default ScrollToTop;\n","import { Component, ReactNode } from 'react';\nimport { Button } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface ErrorHandlerState {\n hasError: boolean;\n}\n\nconst ErrorHandler = (\n { location }: Window,\n { error }: Console,\n) => class ErrorHandler extends Component {\n public constructor(props: object) {\n super(props);\n this.state = { hasError: false };\n }\n\n public static getDerivedStateFromError(): ErrorHandlerState {\n return { hasError: true };\n }\n\n public componentDidCatch(e: Error): void {\n if (process.env.NODE_ENV !== 'development') {\n error(e);\n }\n }\n\n public render(): ReactNode {\n if (this.state.hasError) {\n return (\n
\n \n

Oops! This is awkward :S

\n

It seems that something went wrong. Try refreshing the page or just click this button.

\n
\n \n
\n
\n );\n }\n\n return this.props.children;\n }\n};\n\nexport default ErrorHandler;\n","import { AxiosInstance } from 'axios';\nimport { saveUrl } from '../../utils/helpers/files';\n\nexport class ImageDownloader {\n public constructor(private readonly axios: AxiosInstance, private readonly window: Window) {}\n\n public async saveImage(imgUrl: string, filename: string): Promise {\n const { data } = await this.axios.get(imgUrl, { responseType: 'blob' });\n const url = URL.createObjectURL(data);\n\n saveUrl(this.window, url, filename);\n }\n}\n","import Bottle from 'bottlejs';\nimport { useStateFlagTimeout } from '../helpers/hooks';\nimport LocalStorage from './LocalStorage';\nimport ColorGenerator from './ColorGenerator';\n\nconst provideServices = (bottle: Bottle) => {\n bottle.constant('localStorage', (global as any).localStorage);\n bottle.service('Storage', LocalStorage, 'localStorage');\n bottle.service('ColorGenerator', ColorGenerator, 'Storage');\n\n bottle.constant('setTimeout', global.setTimeout);\n bottle.constant('clearTimeout', global.clearTimeout);\n bottle.serviceFactory('useStateFlagTimeout', useStateFlagTimeout, 'setTimeout', 'clearTimeout');\n};\n\nexport default provideServices;\n","const PREFIX = 'shlink';\nconst buildPath = (path: string) => `${PREFIX}.${path}`;\n\nexport default class LocalStorage {\n public constructor(private readonly localStorage: Storage) {}\n\n public readonly get = (key: string): T | undefined => {\n const item = this.localStorage.getItem(buildPath(key));\n\n return item ? JSON.parse(item) as T : undefined;\n };\n\n public readonly set = (key: string, value: any) => this.localStorage.setItem(buildPath(key), JSON.stringify(value));\n}\n","import { omit } from 'ramda';\nimport { SemVer } from '../../utils/helpers/version';\n\nexport interface ServerData {\n name: string;\n url: string;\n apiKey: string;\n}\n\nexport interface ServerWithId extends ServerData {\n id: string;\n autoConnect?: boolean;\n}\n\nexport interface ReachableServer extends ServerWithId {\n version: SemVer;\n printableVersion: string;\n}\n\nexport interface NonReachableServer extends ServerWithId {\n serverNotReachable: true;\n}\n\nexport interface NotFoundServer {\n serverNotFound: true;\n}\n\nexport type RegularServer = ReachableServer | NonReachableServer;\n\nexport type SelectedServer = RegularServer | NotFoundServer | null;\n\nexport type ServersMap = Record;\n\nexport const hasServerData = (server: SelectedServer | ServerData): server is ServerData =>\n !!(server as ServerData)?.url && !!(server as ServerData)?.apiKey;\n\nexport const isServerWithId = (server: SelectedServer | ServerWithId): server is ServerWithId =>\n !!server?.hasOwnProperty('id');\n\nexport const isReachableServer = (server: SelectedServer): server is ReachableServer =>\n !!server?.hasOwnProperty('version');\n\nexport const isNotFoundServer = (server: SelectedServer): server is NotFoundServer =>\n !!server?.hasOwnProperty('serverNotFound');\n\nexport const getServerId = (server: SelectedServer) => isServerWithId(server) ? server.id : '';\n\nexport const serverWithIdToServerData = (server: ServerWithId): ServerData =>\n omit([ 'id', 'autoConnect' ], server);\n","import { rangeOf } from '../utils';\nimport LocalStorage from './LocalStorage';\n\nconst HEX_COLOR_LENGTH = 6;\nconst { floor, random } = Math;\nconst letters = '0123456789ABCDEF';\nconst buildRandomColor = () => `#${rangeOf(HEX_COLOR_LENGTH, () => letters[floor(random() * letters.length)]).join('')}`;\nconst normalizeKey = (key: string) => key.toLowerCase().trim();\n\nexport default class ColorGenerator {\n private readonly colors: Record;\n\n public constructor(private readonly storage: LocalStorage) {\n this.colors = this.storage.get>('colors') ?? {};\n }\n\n public readonly getColorForKey = (key: string) => {\n const normalizedKey = normalizeKey(key);\n const color = this.colors[normalizedKey];\n\n // If a color has not been set yet, generate a random one and save it\n if (!color) {\n return this.setColorForKey(normalizedKey, buildRandomColor());\n }\n\n return color;\n };\n\n public readonly setColorForKey = (key: string, color: string) => {\n const normalizedKey = normalizeKey(key);\n\n this.colors[normalizedKey] = color;\n this.storage.set('colors', this.colors);\n\n return color;\n };\n}\n","import { pipe } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport { versionToPrintable, versionToSemVer } from '../utils/helpers/version';\nimport { isReachableServer } from '../servers/data';\nimport { ShlinkVersionsContainerProps } from './ShlinkVersionsContainer';\n\nconst SHLINK_WEB_CLIENT_VERSION = '%_VERSION_%';\nconst normalizeVersion = pipe(versionToSemVer(), versionToPrintable);\n\nexport interface ShlinkVersionsProps extends ShlinkVersionsContainerProps {\n clientVersion?: string;\n}\n\nconst VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => (\n \n {version}\n \n);\n\nconst ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIENT_VERSION }: ShlinkVersionsProps) => {\n const normalizedClientVersion = normalizeVersion(clientVersion);\n\n return (\n \n {isReachableServer(selectedServer) &&\n <>Server: - \n }\n Client: \n \n );\n};\n\nexport default ShlinkVersions;\n","import classNames from 'classnames';\nimport { isReachableServer, SelectedServer } from '../servers/data';\nimport ShlinkVersions from './ShlinkVersions';\nimport './ShlinkVersionsContainer.scss';\n\nexport interface ShlinkVersionsContainerProps {\n selectedServer: SelectedServer;\n}\n\nconst ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => {\n const classes = classNames('text-center', {\n 'shlink-versions-container--with-server': isReachableServer(selectedServer),\n });\n\n return (\n
\n \n
\n );\n};\n\nexport default ShlinkVersionsContainer;\n","import { faChevronDown as arrowIcon, faCogs as cogsIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC, useEffect } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';\nimport classNames from 'classnames';\nimport { RouteComponentProps } from 'react-router';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { ShlinkLogo } from './img/ShlinkLogo';\nimport './MainHeader.scss';\n\nconst MainHeader = (ServersDropdown: FC) => ({ location }: RouteComponentProps) => {\n const [ isOpen, toggleOpen, , close ] = useToggle();\n const { pathname } = location;\n\n useEffect(close, [ location ]);\n\n const settingsPath = '/settings';\n const toggleClass = classNames('main-header__toggle-icon', { 'main-header__toggle-icon--opened': isOpen });\n\n return (\n \n \n Shlink\n \n\n \n \n \n\n \n \n \n \n );\n};\n\nexport default MainHeader;\n","import { isEmpty, isNil, pipe, range } from 'ramda';\nimport { SyntheticEvent } from 'react';\n\nexport const rangeOf = (size: number, mappingFn: (value: number) => T, startAt = 1): T[] =>\n range(startAt, size + 1).map(mappingFn);\n\nexport type Empty = null | undefined | '' | never[];\n\nexport const hasValue = (value: T | Empty): value is T => !isNil(value) && !isEmpty(value);\n\nexport const handleEventPreventingDefault = (handler: () => T) => pipe(\n (e: SyntheticEvent) => e.preventDefault(),\n handler,\n);\n\nexport type Nullable = {\n [P in keyof T]: T[P] | null\n};\n\ntype Optional = T | null | undefined;\n\nexport type OptionalString = Optional;\n\nexport type RecursivePartial = {\n [P in keyof T]?: RecursivePartial;\n};\n\nexport const nonEmptyValueOrNull = (value: T): T | null => isEmpty(value) ? null : value;\n\nexport const capitalize = (value: T): string => `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n","import { useEffect } from 'react';\nimport { isEmpty, values } from 'ramda';\nimport { Link, RouteChildrenProps } from 'react-router-dom';\nimport { Card, Row } from 'reactstrap';\nimport { ExternalLink } from 'react-external-link';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faExternalLinkAlt, faPlus } from '@fortawesome/free-solid-svg-icons';\nimport ServersListGroup from '../servers/ServersListGroup';\nimport { ServersMap } from '../servers/data';\nimport { ShlinkLogo } from './img/ShlinkLogo';\nimport './Home.scss';\n\nexport interface HomeProps extends RouteChildrenProps {\n servers: ServersMap;\n}\n\nconst Home = ({ servers, history }: HomeProps) => {\n const serversList = values(servers);\n const hasServers = !isEmpty(serversList);\n\n useEffect(() => {\n // Try to redirect to the first server marked as auto-connect\n const autoConnectServer = serversList.find(({ autoConnect }) => autoConnect);\n\n autoConnectServer && history.push(`/server/${autoConnectServer.id}`);\n }, []);\n\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n
\n

Welcome!

\n
\n \n {!hasServers && (\n
\n

This application will help you manage your Shlink servers.

\n

\n \n Add a server\n \n

\n

\n \n \n Learn more about Shlink \n \n \n

\n
\n )}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Home;\n","import { FC, useEffect } from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport { faBars as burgerIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport classNames from 'classnames';\nimport { withSelectedServer } from '../servers/helpers/withSelectedServer';\nimport { useSwipeable, useToggle } from '../utils/helpers/hooks';\nimport { supportsDomainRedirects, supportsOrphanVisits } from '../utils/helpers/features';\nimport { isReachableServer } from '../servers/data';\nimport NotFound from './NotFound';\nimport { AsideMenuProps } from './AsideMenu';\nimport './MenuLayout.scss';\n\nconst MenuLayout = (\n TagsList: FC,\n ShortUrlsList: FC,\n AsideMenu: FC,\n CreateShortUrl: FC,\n ShortUrlVisits: FC,\n TagVisits: FC,\n OrphanVisits: FC,\n ServerError: FC,\n Overview: FC,\n EditShortUrl: FC,\n ManageDomains: FC,\n) => withSelectedServer(({ location, selectedServer }) => {\n const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle();\n\n useEffect(() => hideSidebar(), [ location ]);\n\n if (!isReachableServer(selectedServer)) {\n return ;\n }\n\n const addOrphanVisitsRoute = supportsOrphanVisits(selectedServer);\n const addManageDomainsRoute = supportsDomainRedirects(selectedServer);\n const burgerClasses = classNames('menu-layout__burger-icon', { 'menu-layout__burger-icon--active': sidebarVisible });\n const swipeableProps = useSwipeable(showSidebar, hideSidebar);\n\n return (\n <>\n \n\n
\n
\n \n
hideSidebar()}>\n
\n \n \n \n \n \n \n \n \n {addOrphanVisitsRoute && }\n \n {addManageDomainsRoute && }\n List short URLs}\n />\n \n
\n
\n
\n
\n \n );\n}, ServerError);\n\nexport default MenuLayout;\n","import {\n faList as listIcon,\n faLink as createIcon,\n faTags as tagsIcon,\n faPen as editIcon,\n faHome as overviewIcon,\n faGlobe as domainsIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC } from 'react';\nimport { NavLink, NavLinkProps } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { Location } from 'history';\nimport { DeleteServerButtonProps } from '../servers/DeleteServerButton';\nimport { isServerWithId, SelectedServer } from '../servers/data';\nimport { supportsDomainRedirects } from '../utils/helpers/features';\nimport './AsideMenu.scss';\n\nexport interface AsideMenuProps {\n selectedServer: SelectedServer;\n className?: string;\n showOnMobile?: boolean;\n}\n\ninterface AsideMenuItemProps extends NavLinkProps {\n to: string;\n}\n\nconst AsideMenuItem: FC = ({ children, to, className, ...rest }) => (\n \n {children}\n \n);\n\nconst AsideMenu = (DeleteServerButton: FC) => (\n { selectedServer, showOnMobile = false }: AsideMenuProps,\n) => {\n const hasId = isServerWithId(selectedServer);\n const serverId = hasId ? selectedServer.id : '';\n const addManageDomainsLink = supportsDomainRedirects(selectedServer);\n const asideClass = classNames('aside-menu', {\n 'aside-menu--hidden': !showOnMobile,\n });\n const shortUrlsIsActive = (_: null, location: Location) => location.pathname.match('/list-short-urls') !== null;\n const buildPath = (suffix: string) => `/server/${serverId}${suffix}`;\n\n return (\n \n );\n};\n\nexport default AsideMenu;\n","import { CardProps } from 'reactstrap/lib/Card';\nimport { Card, CardBody, CardHeader } from 'reactstrap';\nimport { ReactNode } from 'react';\n\ninterface SimpleCardProps extends Omit {\n title?: ReactNode;\n bodyClassName?: string;\n}\n\nexport const SimpleCard = ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => (\n \n {title && {title}}\n {children}\n \n);\n","import { isReachableServer, SelectedServer } from '../../servers/data';\nimport { versionMatch, Versions } from './version';\n\nconst serverMatchesVersions = (versions: Versions) => (selectedServer: SelectedServer): boolean =>\n isReachableServer(selectedServer) && versionMatch(selectedServer.version, versions);\n\nexport const supportsQrCodeSizeInQuery = serverMatchesVersions({ minVersion: '2.5.0' });\n\nexport const supportsShortUrlTitle = serverMatchesVersions({ minVersion: '2.6.0' });\n\nexport const supportsOrphanVisits = supportsShortUrlTitle;\n\nexport const supportsQrCodeMargin = supportsShortUrlTitle;\n\nexport const supportsTagsInPatch = supportsShortUrlTitle;\n\nexport const supportsBotVisits = serverMatchesVersions({ minVersion: '2.7.0' });\n\nexport const supportsCrawlableVisits = supportsBotVisits;\n\nexport const supportsQrErrorCorrection = serverMatchesVersions({ minVersion: '2.8.0' });\n\nexport const supportsDomainRedirects = supportsQrErrorCorrection;\n\nexport const supportsForwardQuery = serverMatchesVersions({ minVersion: '2.9.0' });\n","export const MAIN_COLOR = '#4696e5';\n\nexport const MAIN_COLOR_ALPHA = 'rgba(70, 150, 229, 0.4)';\n\nexport const HIGHLIGHTED_COLOR = '#f77f28';\n\nexport const HIGHLIGHTED_COLOR_ALPHA = 'rgba(247, 127, 40, 0.4)';\n\nexport const PRIMARY_LIGHT_COLOR = 'white';\n\nexport const PRIMARY_DARK_COLOR = '#161b22';\n\nexport type Theme = 'dark' | 'light';\n\nexport const changeThemeInMarkup = (theme: Theme) => {\n const html = document.getElementsByTagName('html');\n\n html?.[0]?.setAttribute('data-theme', theme);\n};\n\nexport const isDarkThemeEnabled = (): boolean => {\n const html = document.getElementsByTagName('html');\n\n return html?.[0]?.getAttribute('data-theme') === 'dark';\n};\n","import qs from 'qs';\n\nexport const parseQuery = (search: string) => qs.parse(search, { ignoreQueryPrefix: true }) as unknown as T;\n\nexport const stringifyQuery = (query: any): string => qs.stringify(query, { arrayFormat: 'brackets' });\n","import { useState } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSearch as searchIcon } from '@fortawesome/free-solid-svg-icons';\nimport classNames from 'classnames';\nimport './SearchField.scss';\n\nconst DEFAULT_SEARCH_INTERVAL = 500;\nlet timer: NodeJS.Timeout | null;\n\ninterface SearchFieldProps {\n onChange: (value: string) => void;\n className?: string;\n large?: boolean;\n noBorder?: boolean;\n initialValue?: string;\n}\n\nconst SearchField = ({ onChange, className, large = true, noBorder = false, initialValue = '' }: SearchFieldProps) => {\n const [ searchTerm, setSearchTerm ] = useState(initialValue);\n\n const resetTimer = () => {\n timer && clearTimeout(timer);\n timer = null;\n };\n const searchTermChanged = (newSearchTerm: string, timeout = DEFAULT_SEARCH_INTERVAL) => {\n setSearchTerm(newSearchTerm);\n\n resetTimer();\n\n timer = setTimeout(() => {\n onChange(newSearchTerm);\n resetTimer();\n }, timeout);\n };\n\n return (\n
\n searchTermChanged(e.target.value)}\n />\n \n
\n \n );\n};\n\nexport default SearchField;\n","import { isEmpty, isNil, reject } from 'ramda';\nimport { AxiosInstance, AxiosResponse, Method } from 'axios';\nimport { ShortUrl, ShortUrlData } from '../../short-urls/data';\nimport { OptionalString } from '../../utils/utils';\nimport {\n ShlinkHealth,\n ShlinkMercureInfo,\n ShlinkShortUrlsResponse,\n ShlinkTags,\n ShlinkTagsResponse,\n ShlinkVisits,\n ShlinkVisitsParams,\n ShlinkShortUrlData,\n ShlinkDomain,\n ShlinkDomainsResponse,\n ShlinkVisitsOverview,\n ShlinkEditDomainRedirects,\n ShlinkDomainRedirects,\n ShlinkShortUrlsListParams,\n} from '../types';\nimport { stringifyQuery } from '../../utils/helpers/query';\n\nconst buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';\nconst rejectNilProps = reject(isNil);\n\nexport default class ShlinkApiClient {\n private apiVersion: number;\n\n public constructor(\n private readonly axios: AxiosInstance,\n private readonly baseUrl: string,\n private readonly apiKey: string,\n ) {\n this.apiVersion = 2;\n }\n\n public readonly listShortUrls = async (params: ShlinkShortUrlsListParams = {}): Promise =>\n this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', params)\n .then(({ data }) => data.shortUrls);\n\n public readonly createShortUrl = async (options: ShortUrlData): Promise => {\n const filteredOptions = reject((value) => isEmpty(value) || isNil(value), options as any);\n\n return this.performRequest('/short-urls', 'POST', {}, filteredOptions)\n .then((resp) => resp.data);\n };\n\n public readonly getShortUrlVisits = async (shortCode: string, query?: ShlinkVisitsParams): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>(`/short-urls/${shortCode}/visits`, 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getTagVisits = async (tag: string, query?: Omit): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>(`/tags/${tag}/visits`, 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getOrphanVisits = async (query?: Omit): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>('/visits/orphan', 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getVisitsOverview = async (): Promise =>\n this.performRequest<{ visits: ShlinkVisitsOverview }>('/visits', 'GET')\n .then(({ data }) => data.visits);\n\n public readonly getShortUrl = async (shortCode: string, domain?: OptionalString): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'GET', { domain })\n .then(({ data }) => data);\n\n public readonly deleteShortUrl = async (shortCode: string, domain?: OptionalString): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'DELETE', { domain })\n .then(() => {});\n\n /* @deprecated. If using Shlink 2.6.0 or greater, use updateShortUrl instead */\n public readonly updateShortUrlTags = async (\n shortCode: string,\n domain: OptionalString,\n tags: string[],\n ): Promise =>\n this.performRequest<{ tags: string[] }>(`/short-urls/${shortCode}/tags`, 'PUT', { domain }, { tags })\n .then(({ data }) => data.tags);\n\n public readonly updateShortUrl = async (\n shortCode: string,\n domain: OptionalString,\n data: ShlinkShortUrlData,\n ): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'PATCH', { domain }, data)\n .then(({ data }) => data);\n\n public readonly listTags = async (): Promise =>\n this.performRequest<{ tags: ShlinkTagsResponse }>('/tags', 'GET', { withStats: 'true' })\n .then((resp) => resp.data.tags)\n .then(({ data, stats }) => ({ tags: data, stats }));\n\n public readonly deleteTags = async (tags: string[]): Promise<{ tags: string[] }> =>\n this.performRequest('/tags', 'DELETE', { tags })\n .then(() => ({ tags }));\n\n public readonly editTag = async (oldName: string, newName: string): Promise<{ oldName: string; newName: string }> =>\n this.performRequest('/tags', 'PUT', {}, { oldName, newName })\n .then(() => ({ oldName, newName }));\n\n public readonly health = async (): Promise =>\n this.performRequest('/health', 'GET')\n .then((resp) => resp.data);\n\n public readonly mercureInfo = async (): Promise =>\n this.performRequest('/mercure-info', 'GET')\n .then((resp) => resp.data);\n\n public readonly listDomains = async (): Promise =>\n this.performRequest<{ domains: ShlinkDomainsResponse }>('/domains', 'GET').then(({ data }) => data.domains.data);\n\n public readonly editDomainRedirects = async (\n domainRedirects: ShlinkEditDomainRedirects,\n ): Promise =>\n this.performRequest('/domains/redirects', 'PATCH', {}, domainRedirects).then(({ data }) => data);\n\n private readonly performRequest = async (url: string, method: Method = 'GET', query = {}, body = {}): Promise> => {\n try {\n return await this.axios({\n method,\n url: `${buildShlinkBaseUrl(this.baseUrl, this.apiVersion)}${url}`,\n headers: { 'X-Api-Key': this.apiKey },\n params: rejectNilProps(query),\n data: body,\n paramsSerializer: stringifyQuery,\n });\n } catch (e: any) {\n const { response } = e;\n\n // Due to a bug on all previous Shlink versions, requests to non-matching URLs will always result on a CORS error\n // when performed from the browser (due to the preflight request not returning a 2xx status.\n // See https://github.com/shlinkio/shlink/issues/614), which will make the \"response\" prop not to be set here.\n // The bug will be fixed on upcoming Shlink patches, but for other versions, we can consider this situation as\n // if a request has been performed to a not supported API version.\n const apiVersionIsNotSupported = !response;\n\n // When the request is not invalid or we have already tried both API versions, throw the error and let the\n // caller handle it\n if (!apiVersionIsNotSupported || this.apiVersion === 2) {\n throw e;\n }\n\n this.apiVersion = this.apiVersion - 1;\n\n return await this.performRequest(url, method, query, body);\n }\n };\n}\n","import { AxiosInstance } from 'axios';\nimport { prop } from 'ramda';\nimport { hasServerData, SelectedServer, ServerWithId } from '../../servers/data';\nimport { GetState } from '../../container/types';\nimport ShlinkApiClient from './ShlinkApiClient';\n\nconst apiClients: Record = {};\n\nconst isGetState = (getStateOrSelectedServer: GetState | ServerWithId): getStateOrSelectedServer is GetState =>\n typeof getStateOrSelectedServer === 'function';\nconst getSelectedServerFromState = (getState: GetState): SelectedServer => prop('selectedServer', getState());\n\nexport type ShlinkApiClientBuilder = (getStateOrSelectedServer: GetState | ServerWithId) => ShlinkApiClient;\n\nconst buildShlinkApiClient = (axios: AxiosInstance): ShlinkApiClientBuilder => (\n getStateOrSelectedServer: GetState | ServerWithId,\n) => {\n const server = isGetState(getStateOrSelectedServer)\n ? getSelectedServerFromState(getStateOrSelectedServer)\n : getStateOrSelectedServer;\n\n if (!hasServerData(server)) {\n throw new Error('There\\'s no selected server or it is not found');\n }\n\n const { url, apiKey } = server;\n const clientKey = `${url}_${apiKey}`;\n\n if (!apiClients[clientKey]) {\n apiClients[clientKey] = new ShlinkApiClient(axios, url, apiKey);\n }\n\n return apiClients[clientKey];\n};\n\nexport default buildShlinkApiClient;\n","import Bottle from 'bottlejs';\nimport buildShlinkApiClient from './ShlinkApiClientBuilder';\n\nconst provideServices = (bottle: Bottle) => {\n bottle.serviceFactory('buildShlinkApiClient', buildShlinkApiClient, 'axios');\n};\n\nexport default provideServices;\n","import { FC, MouseEventHandler } from 'react';\nimport ColorGenerator from '../../utils/services/ColorGenerator';\nimport './Tag.scss';\n\ninterface TagProps {\n colorGenerator: ColorGenerator;\n text: string;\n className?: string;\n clearable?: boolean;\n onClick?: MouseEventHandler;\n onClose?: MouseEventHandler;\n}\n\nconst Tag: FC = ({ text, children, clearable, className = '', colorGenerator, onClick, onClose }) => (\n \n {children ?? text}\n {clearable && ×}\n \n);\n\nexport default Tag;\n","import { FC } from 'react';\nimport { Dropdown, DropdownMenu, DropdownToggle } from 'reactstrap';\nimport { useToggle } from './helpers/hooks';\nimport './DropdownBtn.scss';\n\nexport interface DropdownBtnProps {\n text: string;\n disabled?: boolean;\n className?: string;\n dropdownClassName?: string;\n right?: boolean;\n minWidth?: number;\n}\n\nexport const DropdownBtn: FC = (\n { text, disabled = false, className = '', children, dropdownClassName, right = false, minWidth },\n) => {\n const [ isOpen, toggle ] = useToggle();\n const toggleClasses = `dropdown-btn__toggle btn-block ${className}`;\n const style = { minWidth: minWidth && `${minWidth}px` };\n\n return (\n \n {text}\n {children}\n \n );\n};\n","import { format, formatISO, isAfter, isBefore, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';\nimport { OptionalString } from '../utils';\n\ntype DateOrString = Date | string;\ntype NullableDate = DateOrString | null;\n\nexport const isDateObject = (date: DateOrString): date is Date => typeof date !== 'string';\n\nconst formatDateFromFormat = (date?: NullableDate, theFormat?: string): OptionalString => {\n if (!date || !isDateObject(date)) {\n return date;\n }\n\n return theFormat ? format(date, theFormat) : formatISO(date);\n};\n\nexport const formatDate = (format = 'yyyy-MM-dd') => (date?: NullableDate) => formatDateFromFormat(date, format);\n\nexport const formatIsoDate = (date?: NullableDate) => formatDateFromFormat(date, undefined);\n\nexport const formatInternational = formatDate();\n\nexport const parseDate = (date: string, format: string) => parse(date, format, new Date());\n\nconst parseISO = (date: DateOrString): Date => isDateObject(date) ? date : stdParseISO(date);\n\nexport const isBetween = (date: DateOrString, start?: DateOrString, end?: DateOrString): boolean => {\n if (!start && end) {\n return isBefore(parseISO(date), parseISO(end));\n }\n\n if (start && !end) {\n return isAfter(parseISO(date), parseISO(start));\n }\n\n if (start && end) {\n return isWithinInterval(parseISO(date), { start: parseISO(start), end: parseISO(end) });\n }\n\n return true;\n};\n","import { subDays, startOfDay, endOfDay } from 'date-fns';\nimport { filter, isEmpty } from 'ramda';\nimport { formatInternational } from '../../helpers/date';\n\nexport interface DateRange {\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport type DateInterval = 'all' | 'today' | 'yesterday' | 'last7Days' | 'last30Days' | 'last90Days' | 'last180days' | 'last365Days';\n\nexport const dateRangeIsEmpty = (dateRange?: DateRange): boolean => dateRange === undefined\n || isEmpty(filter(Boolean, dateRange as any));\n\nexport const rangeIsInterval = (range?: DateRange | DateInterval): range is DateInterval =>\n typeof range === 'string';\n\nconst INTERVAL_TO_STRING_MAP: Record = {\n today: 'Today',\n yesterday: 'Yesterday',\n last7Days: 'Last 7 days',\n last30Days: 'Last 30 days',\n last90Days: 'Last 90 days',\n last180days: 'Last 180 days',\n last365Days: 'Last 365 days',\n all: undefined,\n};\n\nexport const DATE_INTERVALS = Object.keys(INTERVAL_TO_STRING_MAP).filter((value) => value !== 'all') as DateInterval[];\n\nconst dateRangeToString = (range?: DateRange): string | undefined => {\n if (!range || dateRangeIsEmpty(range)) {\n return undefined;\n }\n\n if (range.startDate && !range.endDate) {\n return `Since ${formatInternational(range.startDate)}`;\n }\n\n if (!range.startDate && range.endDate) {\n return `Until ${formatInternational(range.endDate)}`;\n }\n\n return `${formatInternational(range.startDate)} - ${formatInternational(range.endDate)}`;\n};\n\nexport const rangeOrIntervalToString = (range?: DateRange | DateInterval): string | undefined => {\n if (!range || range === 'all') {\n return undefined;\n }\n\n if (!rangeIsInterval(range)) {\n return dateRangeToString(range);\n }\n\n return INTERVAL_TO_STRING_MAP[range];\n};\n\nconst startOfDaysAgo = (daysAgo: number) => startOfDay(subDays(new Date(), daysAgo));\nconst endingToday = (startDate: Date): DateRange => ({ startDate, endDate: endOfDay(new Date()) });\n\nexport const intervalToDateRange = (dateInterval?: DateInterval): DateRange => {\n if (!dateInterval || dateInterval === 'all') {\n return {};\n }\n\n switch (dateInterval) {\n case 'today':\n return endingToday(startOfDay(new Date()));\n case 'yesterday':\n return { startDate: startOfDaysAgo(1), endDate: endOfDay(subDays(new Date(), 1)) };\n case 'last7Days':\n return endingToday(startOfDaysAgo(7));\n case 'last30Days':\n return endingToday(startOfDaysAgo(30));\n case 'last90Days':\n return endingToday(startOfDaysAgo(90));\n case 'last180days':\n return endingToday(startOfDaysAgo(180));\n case 'last365Days':\n return endingToday(startOfDaysAgo(365));\n }\n\n return {};\n};\n","import { useRef } from 'react';\nimport { isNil } from 'ramda';\nimport DatePicker, { ReactDatePickerProps } from 'react-datepicker';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCalendarAlt as calendarIcon } from '@fortawesome/free-regular-svg-icons';\nimport classNames from 'classnames';\nimport './DateInput.scss';\n\nexport type DateInputProps = ReactDatePickerProps;\n\nconst DateInput = (props: DateInputProps) => {\n const { className, isClearable, selected } = props;\n const showCalendarIcon = !isClearable || isNil(selected);\n const ref = useRef<{ input: HTMLInputElement }>();\n\n return (\n
\n \n {showCalendarIcon && (\n ref.current?.input.focus()}\n />\n )}\n
\n );\n};\n\nexport default DateInput;\n","import DateInput from '../DateInput';\nimport { DateRange } from './types';\n\ninterface DateRangeRowProps extends DateRange {\n onStartDateChange: (date: Date | null) => void;\n onEndDateChange: (date: Date | null) => void;\n disabled?: boolean;\n}\n\nconst DateRangeRow = (\n { startDate = null, endDate = null, disabled = false, onStartDateChange, onEndDateChange }: DateRangeRowProps,\n) => (\n
\n
\n \n
\n
\n \n
\n
\n);\n\nexport default DateRangeRow;\n","import { DropdownItem } from 'reactstrap';\nimport { FC } from 'react';\nimport { DATE_INTERVALS, DateInterval, rangeOrIntervalToString } from './types';\n\nexport interface DateIntervalDropdownProps {\n active?: DateInterval;\n allText: string;\n onChange: (interval: DateInterval) => void;\n}\n\nexport const DateIntervalDropdownItems: FC = ({ active, allText, onChange }) => (\n <>\n onChange('all')}>\n {allText}\n \n \n {DATE_INTERVALS.map(\n (interval) => (\n onChange(interval)}>\n {rangeOrIntervalToString(interval)}\n \n ),\n )}\n \n);\n","import { useState } from 'react';\nimport { DropdownItem } from 'reactstrap';\nimport { DropdownBtn } from '../DropdownBtn';\nimport {\n DateInterval,\n DateRange,\n rangeOrIntervalToString,\n intervalToDateRange,\n rangeIsInterval,\n dateRangeIsEmpty,\n} from './types';\nimport DateRangeRow from './DateRangeRow';\nimport { DateIntervalDropdownItems } from './DateIntervalDropdownItems';\n\nexport interface DateRangeSelectorProps {\n initialDateRange?: DateInterval | DateRange;\n disabled?: boolean;\n onDatesChange: (dateRange: DateRange) => void;\n defaultText: string;\n}\n\nexport const DateRangeSelector = (\n { onDatesChange, initialDateRange, defaultText, disabled }: DateRangeSelectorProps,\n) => {\n const initialIntervalIsRange = rangeIsInterval(initialDateRange);\n const [ activeInterval, setActiveInterval ] = useState(initialIntervalIsRange ? initialDateRange : undefined);\n const [ activeDateRange, setActiveDateRange ] = useState(initialIntervalIsRange ? undefined : initialDateRange);\n\n const updateDateRange = (dateRange: DateRange) => {\n setActiveInterval(dateRangeIsEmpty(dateRange) ? 'all' : undefined);\n setActiveDateRange(dateRange);\n onDatesChange(dateRange);\n };\n const updateInterval = (dateInterval: DateInterval) => {\n setActiveInterval(dateInterval);\n setActiveDateRange(undefined);\n onDatesChange(intervalToDateRange(dateInterval));\n };\n\n return (\n \n \n \n Custom:\n \n updateDateRange({ ...activeDateRange, startDate })}\n onEndDateChange={(endDate) => updateDateRange({ ...activeDateRange, endDate })}\n />\n \n \n );\n};\n","import { RouteChildrenProps } from 'react-router-dom';\nimport { useMemo } from 'react';\nimport { isEmpty } from 'ramda';\nimport { parseQuery, stringifyQuery } from '../../utils/helpers/query';\n\ntype ServerIdRouteProps = RouteChildrenProps<{ serverId: string }>;\ntype ToFirstPage = (extra: Partial) => void;\n\nexport interface ShortUrlListRouteParams {\n page: string;\n serverId: string;\n}\n\ninterface ShortUrlsQuery {\n tags?: string;\n search?: string;\n startDate?: string;\n endDate?: string;\n}\n\nexport const useShortUrlsQuery = ({ history, location, match }: ServerIdRouteProps): [ShortUrlsQuery, ToFirstPage] => {\n const query = useMemo(() => parseQuery(location.search), [ location ]);\n const toFirstPageWithExtra = (extra: Partial) => {\n const evolvedQuery = stringifyQuery({ ...query, ...extra });\n const queryString = isEmpty(evolvedQuery) ? '' : `?${evolvedQuery}`;\n\n history.push(`/server/${match?.params.serverId}/list-short-urls/1${queryString}`);\n };\n\n return [ query, toFirstPageWithExtra ];\n};\n","import { faTags as tagsIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { isEmpty, pipe } from 'ramda';\nimport { parseISO } from 'date-fns';\nimport { RouteChildrenProps } from 'react-router-dom';\nimport SearchField from '../utils/SearchField';\nimport Tag from '../tags/helpers/Tag';\nimport { DateRangeSelector } from '../utils/dates/DateRangeSelector';\nimport { formatIsoDate } from '../utils/helpers/date';\nimport ColorGenerator from '../utils/services/ColorGenerator';\nimport { DateRange } from '../utils/dates/types';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\nimport './SearchBar.scss';\n\nexport type SearchBarProps = RouteChildrenProps;\n\nconst dateOrNull = (date?: string) => date ? parseISO(date) : null;\n\nconst SearchBar = (colorGenerator: ColorGenerator) => (props: SearchBarProps) => {\n const [{ search, tags, startDate, endDate }, toFirstPage ] = useShortUrlsQuery(props);\n const selectedTags = tags?.split(',') ?? [];\n const setDates = pipe(\n ({ startDate, endDate }: DateRange) => ({\n startDate: formatIsoDate(startDate) ?? undefined,\n endDate: formatIsoDate(endDate) ?? undefined,\n }),\n toFirstPage,\n );\n const setSearch = pipe(\n (searchTerm: string) => isEmpty(searchTerm) ? undefined : searchTerm,\n (search) => toFirstPage({ search }),\n );\n const removeTag = pipe(\n (tag: string) => selectedTags.filter((selectedTag) => selectedTag !== tag),\n (tagsList) => tagsList.length === 0 ? undefined : tagsList.join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n return (\n
\n \n\n
\n
\n
\n \n
\n
\n
\n\n {selectedTags.length > 0 && (\n

\n \n  \n {selectedTags.map((tag) =>\n removeTag(tag)} />)}\n

\n )}\n
\n );\n};\n\nexport default SearchBar;\n","export type OrderDir = 'ASC' | 'DESC' | undefined;\n\nexport interface Order {\n field?: Fields;\n dir?: OrderDir;\n}\n\nexport const determineOrderDir = (\n currentField: T,\n newField?: T,\n currentOrderDir?: OrderDir,\n): OrderDir => {\n if (currentField !== newField) {\n return 'ASC';\n }\n\n const newOrderMap: Record<'ASC' | 'DESC', OrderDir> = {\n ASC: 'DESC',\n DESC: undefined,\n };\n\n return currentOrderDir ? newOrderMap[currentOrderDir] : 'ASC';\n};\n\nexport const sortList = (list: List[], { field, dir }: Order>) => !field || !dir\n ? list\n : list.sort((a, b) => {\n const greaterThan = dir === 'ASC' ? 1 : -1;\n const smallerThan = dir === 'ASC' ? -1 : 1;\n\n return a[field] > b[field] ? greaterThan : smallerThan;\n });\n","import { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';\nimport { toPairs } from 'ramda';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSortAmountUp as sortAscIcon, faSortAmountDown as sortDescIcon } from '@fortawesome/free-solid-svg-icons';\nimport classNames from 'classnames';\nimport { determineOrderDir, Order, OrderDir } from './helpers/ordering';\nimport './SortingDropdown.scss';\n\nexport interface SortingDropdownProps {\n items: Record;\n order: Order;\n onChange: (orderField?: T, orderDir?: OrderDir) => void;\n isButton?: boolean;\n right?: boolean;\n}\n\nexport default function SortingDropdown(\n { items, order, onChange, isButton = true, right = false }: SortingDropdownProps,\n) {\n const handleItemClick = (fieldKey: T) => () => {\n const newOrderDir = determineOrderDir(fieldKey, order.field, order.dir);\n\n onChange(newOrderDir ? fieldKey : undefined, newOrderDir);\n };\n\n return (\n \n \n {!isButton && <>Order by}\n {isButton && !order.field && <>Order by...}\n {isButton && order.field && `Order by: \"${items[order.field]}\" - \"${order.dir ?? 'DESC'}\"`}\n \n \n {toPairs(items).map(([ fieldKey, fieldValue ]) => (\n \n {fieldValue}\n {order.field === fieldKey && (\n \n )}\n \n ))}\n \n onChange()}>\n Clear selection\n \n \n \n );\n}\n","import { FC, useEffect } from 'react';\nimport { pipe } from 'ramda';\nimport { CreateVisit } from '../../visits/types';\nimport { MercureInfo } from '../reducers/mercureInfo';\nimport { bindToMercureTopic } from './index';\n\nexport interface MercureBoundProps {\n createNewVisits: (createdVisits: CreateVisit[]) => void;\n loadMercureInfo: () => void;\n mercureInfo: MercureInfo;\n}\n\nexport function boundToMercureHub(\n WrappedComponent: FC,\n getTopicsForProps: (props: T) => string[],\n) {\n const pendingUpdates = new Set();\n\n return (props: MercureBoundProps & T) => {\n const { createNewVisits, loadMercureInfo, mercureInfo } = props;\n const { interval } = mercureInfo;\n\n useEffect(() => {\n const onMessage = (visit: CreateVisit) => interval ? pendingUpdates.add(visit) : createNewVisits([ visit ]);\n const closeEventSource = bindToMercureTopic(mercureInfo, getTopicsForProps(props), onMessage, loadMercureInfo);\n\n if (!interval) {\n return closeEventSource;\n }\n\n const timer = setInterval(() => {\n createNewVisits([ ...pendingUpdates ]);\n pendingUpdates.clear();\n }, interval * 1000 * 60);\n\n return pipe(() => clearInterval(timer), () => closeEventSource?.());\n }, [ mercureInfo ]);\n\n return ;\n };\n}\n","import { EventSourcePolyfill as EventSource } from 'event-source-polyfill';\nimport { MercureInfo } from '../reducers/mercureInfo';\n\nexport const bindToMercureTopic = (mercureInfo: MercureInfo, topics: string[], onMessage: (message: T) => void, onTokenExpired: () => void) => { // eslint-disable-line max-len\n const { mercureHubUrl, token, loading, error } = mercureInfo;\n\n if (loading || error || !mercureHubUrl) {\n return undefined;\n }\n\n const onEventSourceMessage = ({ data }: { data: string }) => onMessage(JSON.parse(data) as T);\n const onEventSourceError = ({ status }: { status: number }) => status === 401 && onTokenExpired();\n\n const subscriptions = topics.map((topic) => {\n const hubUrl = new URL(mercureHubUrl);\n\n hubUrl.searchParams.append('topic', topic);\n const es = new EventSource(hubUrl, {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n });\n\n es.onmessage = onEventSourceMessage;\n es.onerror = onEventSourceError;\n\n return es;\n });\n\n return () => subscriptions.forEach((es) => es.close());\n};\n","export class Topics {\n public static readonly visits = 'https://shlink.io/new-visit';\n\n public static readonly orphanVisits = 'https://shlink.io/new-orphan-visit';\n\n public static readonly shortUrlVisits = (shortCode: string) => `https://shlink.io/new-visit/${shortCode}`;\n}\n","import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCaretDown as caretDownIcon, faCaretUp as caretUpIcon } from '@fortawesome/free-solid-svg-icons';\nimport { Order } from '../helpers/ordering';\n\ninterface TableOrderIconProps {\n currentOrder: Order;\n field: T;\n className?: string;\n}\n\nexport function TableOrderIcon(\n { currentOrder, field, className = 'ml-1' }: TableOrderIconProps,\n) {\n if (!currentOrder.dir || currentOrder.field !== field) {\n return null;\n }\n\n return ;\n}\n","import { Action } from 'redux';\n\ntype ActionHandler = (currentState: State, action: AT) => State;\ntype ActionHandlerMap = Record>;\n\nexport const buildReducer = (map: ActionHandlerMap, initialState: State) => (\n state: State | undefined,\n action: AT,\n): State => {\n const { type } = action;\n const actionHandler = map[type];\n const currentState = state ?? initialState;\n\n return actionHandler ? actionHandler(currentState, action) : currentState;\n};\n\nexport const buildActionCreator = (type: T) => (): Action => ({ type });\n","import { isEmpty, propEq, values } from 'ramda';\nimport { useState, useEffect, useMemo, FC } from 'react';\nimport { Button, Card, Nav, NavLink, Progress, Row } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCalendarAlt, faMapMarkedAlt, faList, faChartPie, faFileDownload } from '@fortawesome/free-solid-svg-icons';\nimport { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport { Route, Switch, NavLink as RouterNavLink, Redirect } from 'react-router-dom';\nimport { Location } from 'history';\nimport classNames from 'classnames';\nimport { DateRangeSelector } from '../utils/dates/DateRangeSelector';\nimport Message from '../utils/Message';\nimport { DateInterval, DateRange, intervalToDateRange } from '../utils/dates/types';\nimport { Result } from '../utils/Result';\nimport { ShlinkApiError } from '../api/ShlinkApiError';\nimport { Settings } from '../settings/reducers/settings';\nimport { SelectedServer } from '../servers/data';\nimport { supportsBotVisits } from '../utils/helpers/features';\nimport { prettify } from '../utils/helpers/numbers';\nimport LineChartCard from './charts/LineChartCard';\nimport VisitsTable from './VisitsTable';\nimport { NormalizedOrphanVisit, NormalizedVisit, VisitsFilter, VisitsInfo, VisitsParams } from './types';\nimport OpenMapModalBtn from './helpers/OpenMapModalBtn';\nimport { normalizeVisits, processStatsFromVisits } from './services/VisitsParser';\nimport { VisitsFilterDropdown } from './helpers/VisitsFilterDropdown';\nimport { HighlightableProps, highlightedVisitsToStats } from './types/helpers';\nimport { DoughnutChartCard } from './charts/DoughnutChartCard';\nimport { SortableBarChartCard } from './charts/SortableBarChartCard';\nimport './VisitsStats.scss';\n\nexport interface VisitsStatsProps {\n getVisits: (params: VisitsParams) => void;\n visitsInfo: VisitsInfo;\n settings: Settings;\n selectedServer: SelectedServer;\n cancelGetVisits: () => void;\n baseUrl: string;\n domain?: string;\n exportCsv: (visits: NormalizedVisit[]) => void;\n isOrphanVisits?: boolean;\n}\n\ninterface VisitsNavLinkProps {\n title: string;\n subPath: string;\n icon: IconDefinition;\n}\n\ntype Section = 'byTime' | 'byContext' | 'byLocation' | 'list';\n\nconst sections: Record = {\n byTime: { title: 'By time', subPath: '', icon: faCalendarAlt },\n byContext: { title: 'By context', subPath: '/by-context', icon: faChartPie },\n byLocation: { title: 'By location', subPath: '/by-location', icon: faMapMarkedAlt },\n list: { title: 'List', subPath: '/list', icon: faList },\n};\n\nlet selectedBar: string | undefined;\n\nconst VisitsNavLink: FC = ({ subPath, title, icon, to }) => (\n pathname.endsWith(`visits${subPath}`)}\n replace\n >\n \n {title}\n \n);\n\nconst VisitsStats: FC = ({\n children,\n visitsInfo,\n getVisits,\n cancelGetVisits,\n baseUrl,\n domain,\n settings,\n exportCsv,\n selectedServer,\n isOrphanVisits = false,\n}) => {\n const initialInterval: DateInterval = settings.visits?.defaultInterval ?? 'last30Days';\n const [ dateRange, setDateRange ] = useState(intervalToDateRange(initialInterval));\n const [ highlightedVisits, setHighlightedVisits ] = useState([]);\n const [ highlightedLabel, setHighlightedLabel ] = useState();\n const [ visitsFilter, setVisitsFilter ] = useState({});\n const botsSupported = supportsBotVisits(selectedServer);\n\n const buildSectionUrl = (subPath?: string) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return !subPath ? `${baseUrl}${query}` : `${baseUrl}${subPath}${query}`;\n };\n const { visits, loading, loadingLarge, error, errorData, progress } = visitsInfo;\n const normalizedVisits = useMemo(() => normalizeVisits(visits), [ visits ]);\n const { os, browsers, referrers, countries, cities, citiesForMap, visitedUrls } = useMemo(\n () => processStatsFromVisits(normalizedVisits),\n [ normalizedVisits ],\n );\n const mapLocations = values(citiesForMap);\n\n const setSelectedVisits = (selectedVisits: NormalizedVisit[]) => {\n selectedBar = undefined;\n setHighlightedVisits(selectedVisits);\n };\n const highlightVisitsForProp = (prop: HighlightableProps) => (value: string) => {\n const newSelectedBar = `${prop}_${value}`;\n\n if (selectedBar === newSelectedBar) {\n setHighlightedVisits([]);\n setHighlightedLabel(undefined);\n selectedBar = undefined;\n } else {\n setHighlightedVisits((normalizedVisits as NormalizedOrphanVisit[]).filter(propEq(prop, value)));\n setHighlightedLabel(value);\n selectedBar = newSelectedBar;\n }\n };\n\n useEffect(() => cancelGetVisits, []);\n useEffect(() => {\n getVisits({ dateRange, filter: visitsFilter });\n }, [ dateRange, visitsFilter ]);\n\n const renderVisitsContent = () => {\n if (loadingLarge) {\n return (\n \n This is going to take a while... :S\n \n \n );\n }\n\n if (loading) {\n return ;\n }\n\n if (error) {\n return (\n \n \n \n );\n }\n\n if (isEmpty(visits)) {\n return There are no visits matching current filter :(;\n }\n\n return (\n <>\n \n \n \n \n \n \n
\n \n
\n
\n\n \n
\n \n
\n
\n \n
\n
\n \n
\n {isOrphanVisits && (\n
\n \n
\n )}\n
\n\n \n
\n \n
\n
\n \n mapLocations.length > 0 &&\n \n }\n sortingItems={{\n name: 'City name',\n amount: 'Visits amount',\n }}\n onClick={highlightVisitsForProp('city')}\n />\n
\n
\n\n \n
\n \n
\n
\n\n \n
\n
\n \n );\n };\n\n return (\n <>\n {children}\n\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n {visits.length > 0 && (\n
\n
\n setSelectedVisits([])}\n >\n Clear selection {highlightedVisits.length > 0 && <>({prettify(highlightedVisits.length)})}\n \n exportCsv(normalizedVisits)}\n >\n Export ({prettify(normalizedVisits.length)})\n \n
\n
\n )}\n
\n
\n\n
\n {renderVisitsContent()}\n
\n \n );\n};\n\nexport default VisitsStats;\n","import { isNil } from 'ramda';\nimport { ShortUrl } from '../data';\nimport { OptionalString } from '../../utils/utils';\n\nexport const shortUrlMatches = (shortUrl: ShortUrl, shortCode: string, domain: OptionalString): boolean => {\n if (isNil(domain)) {\n return shortUrl.shortCode === shortCode && !shortUrl.domain;\n }\n\n return shortUrl.shortCode === shortCode && shortUrl.domain === domain;\n};\n","import { Action } from 'redux';\nimport { CreateVisit } from '../types';\n\nexport const CREATE_VISITS = 'shlink/visitCreation/CREATE_VISITS';\n\nexport interface CreateVisitsAction extends Action {\n createdVisits: CreateVisit[];\n}\n\nexport const createNewVisits = (createdVisits: CreateVisit[]): CreateVisitsAction => ({\n type: CREATE_VISITS,\n createdVisits,\n});\n","import { AxiosError } from 'axios';\nimport { InvalidArgumentError, InvalidShortUrlDeletion, ProblemDetailsError } from '../types';\n\nexport const parseApiError = (e: AxiosError) => e.response?.data;\n\nexport const isInvalidArgumentError = (error?: ProblemDetailsError): error is InvalidArgumentError =>\n error?.type === 'INVALID_ARGUMENT';\n\nexport const isInvalidDeletionError = (error?: ProblemDetailsError): error is InvalidShortUrlDeletion =>\n error?.type === 'INVALID_SHORTCODE_DELETION';\n","import { Action, Dispatch } from 'redux';\nimport { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\nimport { ProblemDetailsError } from '../../api/types';\nimport { GetState } from '../../container/types';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const DELETE_SHORT_URL_START = 'shlink/deleteShortUrl/DELETE_SHORT_URL_START';\nexport const DELETE_SHORT_URL_ERROR = 'shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR';\nexport const SHORT_URL_DELETED = 'shlink/deleteShortUrl/SHORT_URL_DELETED';\nexport const RESET_DELETE_SHORT_URL = 'shlink/deleteShortUrl/RESET_DELETE_SHORT_URL';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlDeletion {\n shortCode: string;\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface DeleteShortUrlAction extends Action {\n shortCode: string;\n domain?: string | null;\n}\n\nconst initialState: ShortUrlDeletion = {\n shortCode: '',\n loading: false,\n error: false,\n};\n\nexport default buildReducer({\n [DELETE_SHORT_URL_START]: (state) => ({ ...state, loading: true, error: false }),\n [DELETE_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, errorData, loading: false, error: true }),\n [SHORT_URL_DELETED]: (state, { shortCode }) => ({ ...state, shortCode, loading: false, error: false }),\n [RESET_DELETE_SHORT_URL]: () => initialState,\n}, initialState);\n\nexport const deleteShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n shortCode: string,\n domain?: string | null,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: DELETE_SHORT_URL_START });\n const { deleteShortUrl } = buildShlinkApiClient(getState);\n\n try {\n await deleteShortUrl(shortCode, domain);\n dispatch({ type: SHORT_URL_DELETED, shortCode, domain });\n } catch (e: any) {\n dispatch({ type: DELETE_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n\nexport const resetDeleteShortUrl = buildActionCreator(RESET_DELETE_SHORT_URL);\n","import { Action, Dispatch } from 'redux';\nimport { GetState } from '../../container/types';\nimport { ShortUrl, ShortUrlData } from '../data';\nimport { buildReducer, buildActionCreator } from '../../utils/helpers/redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ProblemDetailsError } from '../../api/types';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const CREATE_SHORT_URL_START = 'shlink/createShortUrl/CREATE_SHORT_URL_START';\nexport const CREATE_SHORT_URL_ERROR = 'shlink/createShortUrl/CREATE_SHORT_URL_ERROR';\nexport const CREATE_SHORT_URL = 'shlink/createShortUrl/CREATE_SHORT_URL';\nexport const RESET_CREATE_SHORT_URL = 'shlink/createShortUrl/RESET_CREATE_SHORT_URL';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlCreation {\n result: ShortUrl | null;\n saving: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface CreateShortUrlAction extends Action {\n result: ShortUrl;\n}\n\nconst initialState: ShortUrlCreation = {\n result: null,\n saving: false,\n error: false,\n};\n\nexport default buildReducer({\n [CREATE_SHORT_URL_START]: (state) => ({ ...state, saving: true, error: false }),\n [CREATE_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, saving: false, error: true, errorData }),\n [CREATE_SHORT_URL]: (_, { result }) => ({ result, saving: false, error: false }),\n [RESET_CREATE_SHORT_URL]: () => initialState,\n}, initialState);\n\nexport const createShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (data: ShortUrlData) => async (\n dispatch: Dispatch,\n getState: GetState,\n) => {\n dispatch({ type: CREATE_SHORT_URL_START });\n const { createShortUrl } = buildShlinkApiClient(getState);\n\n try {\n const result = await createShortUrl(data);\n\n dispatch({ type: CREATE_SHORT_URL, result });\n } catch (e: any) {\n dispatch({ type: CREATE_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n\nexport const resetCreateShortUrl = buildActionCreator(RESET_CREATE_SHORT_URL);\n","import { Action, Dispatch } from 'redux';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { GetState } from '../../container/types';\nimport { OptionalString } from '../../utils/utils';\nimport { EditShortUrlData, ShortUrl } from '../data';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ProblemDetailsError } from '../../api/types';\nimport { parseApiError } from '../../api/utils';\nimport { supportsTagsInPatch } from '../../utils/helpers/features';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const EDIT_SHORT_URL_START = 'shlink/shortUrlEdition/EDIT_SHORT_URL_START';\nexport const EDIT_SHORT_URL_ERROR = 'shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR';\nexport const SHORT_URL_EDITED = 'shlink/shortUrlEdition/SHORT_URL_EDITED';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlEdition {\n shortUrl?: ShortUrl;\n saving: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ShortUrlEditedAction extends Action {\n shortUrl: ShortUrl;\n}\n\nconst initialState: ShortUrlEdition = {\n saving: false,\n error: false,\n};\n\nexport default buildReducer({\n [EDIT_SHORT_URL_START]: (state) => ({ ...state, saving: true, error: false }),\n [EDIT_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, saving: false, error: true, errorData }),\n [SHORT_URL_EDITED]: (_, { shortUrl }) => ({ shortUrl, saving: false, error: false }),\n}, initialState);\n\nexport const editShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n shortCode: string,\n domain: OptionalString,\n data: EditShortUrlData,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: EDIT_SHORT_URL_START });\n\n const { selectedServer } = getState();\n const sendTagsSeparately = !supportsTagsInPatch(selectedServer);\n const { updateShortUrl, updateShortUrlTags } = buildShlinkApiClient(getState);\n\n try {\n const [ shortUrl ] = await Promise.all([\n updateShortUrl(shortCode, domain, data as any), // FIXME Parse dates\n sendTagsSeparately && data.tags ? updateShortUrlTags(shortCode, domain, data.tags) : undefined,\n ]);\n\n dispatch({ shortUrl, type: SHORT_URL_EDITED });\n } catch (e: any) {\n dispatch({ type: EDIT_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n","import { assoc, assocPath, init, last, pipe, reject } from 'ramda';\nimport { Action, Dispatch } from 'redux';\nimport { shortUrlMatches } from '../helpers';\nimport { CREATE_VISITS, CreateVisitsAction } from '../../visits/reducers/visitCreation';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { GetState } from '../../container/types';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ShlinkShortUrlsListParams, ShlinkShortUrlsResponse } from '../../api/types';\nimport { DeleteShortUrlAction, SHORT_URL_DELETED } from './shortUrlDeletion';\nimport { ShortUrlsListParams } from './shortUrlsListParams';\nimport { CREATE_SHORT_URL, CreateShortUrlAction } from './shortUrlCreation';\nimport { SHORT_URL_EDITED, ShortUrlEditedAction } from './shortUrlEdition';\n\n/* eslint-disable padding-line-between-statements */\nexport const LIST_SHORT_URLS_START = 'shlink/shortUrlsList/LIST_SHORT_URLS_START';\nexport const LIST_SHORT_URLS_ERROR = 'shlink/shortUrlsList/LIST_SHORT_URLS_ERROR';\nexport const LIST_SHORT_URLS = 'shlink/shortUrlsList/LIST_SHORT_URLS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlsList {\n shortUrls?: ShlinkShortUrlsResponse;\n loading: boolean;\n error: boolean;\n}\n\nexport interface ListShortUrlsAction extends Action {\n shortUrls: ShlinkShortUrlsResponse;\n params: ShortUrlsListParams;\n}\n\nexport type ListShortUrlsCombinedAction = (\n ListShortUrlsAction\n & CreateVisitsAction\n & CreateShortUrlAction\n & DeleteShortUrlAction\n & ShortUrlEditedAction\n);\n\nconst initialState: ShortUrlsList = {\n loading: true,\n error: false,\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS_START]: (state) => ({ ...state, loading: true, error: false }),\n [LIST_SHORT_URLS_ERROR]: () => ({ loading: false, error: true }),\n [LIST_SHORT_URLS]: (_, { shortUrls }) => ({ loading: false, error: false, shortUrls }),\n [SHORT_URL_DELETED]: pipe(\n (state: ShortUrlsList, { shortCode, domain }: DeleteShortUrlAction) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n reject((shortUrl) => shortUrlMatches(shortUrl, shortCode, domain), state.shortUrls.data),\n state,\n ),\n (state) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'pagination', 'totalItems' ],\n state.shortUrls.pagination.totalItems - 1,\n state,\n ),\n ),\n [CREATE_VISITS]: (state, { createdVisits }) => assocPath(\n [ 'shortUrls', 'data' ],\n state.shortUrls?.data?.map(\n (currentShortUrl) => {\n // Find the last of the new visit for this short URL, and pick the amount of visits from it\n const lastVisit = last(\n createdVisits.filter(\n ({ shortUrl }) => shortUrl && shortUrlMatches(currentShortUrl, shortUrl.shortCode, shortUrl.domain),\n ),\n );\n\n return lastVisit?.shortUrl\n ? assoc('visitsCount', lastVisit.shortUrl.visitsCount, currentShortUrl)\n : currentShortUrl;\n },\n ),\n state,\n ),\n [CREATE_SHORT_URL]: pipe(\n // The only place where the list and the creation form coexist is the overview page.\n // There we can assume we are displaying page 1, and therefore, we can safely prepend the new short URL and remove the last one.\n (state: ShortUrlsList, { result }: CreateShortUrlAction) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n [ result, ...init(state.shortUrls.data) ],\n state,\n ),\n (state: ShortUrlsList) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'pagination', 'totalItems' ],\n state.shortUrls.pagination.totalItems + 1,\n state,\n ),\n ),\n [SHORT_URL_EDITED]: (state, { shortUrl: editedShortUrl }) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n state.shortUrls.data.map((shortUrl) => {\n const { shortCode, domain } = editedShortUrl;\n\n return shortUrlMatches(shortUrl, shortCode, domain) ? editedShortUrl : shortUrl;\n }),\n state,\n ),\n}, initialState);\n\nexport const listShortUrls = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n params: ShlinkShortUrlsListParams = {},\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: LIST_SHORT_URLS_START });\n const { listShortUrls } = buildShlinkApiClient(getState);\n\n try {\n const shortUrls = await listShortUrls(params);\n\n dispatch({ type: LIST_SHORT_URLS, shortUrls, params });\n } catch (e) {\n dispatch({ type: LIST_SHORT_URLS_ERROR, params });\n }\n};\n","import { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\nimport { OrderDir } from '../../utils/helpers/ordering';\nimport { LIST_SHORT_URLS, ListShortUrlsAction } from './shortUrlsList';\n\nexport const RESET_SHORT_URL_PARAMS = 'shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS';\n\nexport const SORTABLE_FIELDS = {\n dateCreated: 'Created at',\n shortCode: 'Short URL',\n longUrl: 'Long URL',\n title: 'Title',\n visits: 'Visits',\n};\n\nexport type OrderableFields = keyof typeof SORTABLE_FIELDS;\n\nexport type OrderBy = Partial>;\n\nexport interface ShortUrlsListParams {\n page?: string;\n itemsPerPage?: number;\n orderBy?: OrderBy;\n}\n\nconst initialState: ShortUrlsListParams = {\n page: '1',\n orderBy: { dateCreated: 'DESC' },\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS]: (state, { params }) => ({ ...state, ...params }),\n [RESET_SHORT_URL_PARAMS]: () => initialState,\n}, initialState);\n\nexport const resetShortUrlParams = buildActionCreator(RESET_SHORT_URL_PARAMS);\n","const TEN_ROUNDING_NUMBER = 10;\nconst { ceil } = Math;\nconst formatter = new Intl.NumberFormat('en-US');\n\nexport const prettify = (number: number | string) => formatter.format(Number(number));\n\nexport const roundTen = (number: number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;\n","import { max, min, range } from 'ramda';\nimport { prettify } from './numbers';\n\nconst DELTA = 2;\n\nexport const ELLIPSIS = '...';\n\ntype Ellipsis = typeof ELLIPSIS;\n\nexport type NumberOrEllipsis = number | Ellipsis;\n\nexport const progressivePagination = (currentPage: number, pageCount: number): NumberOrEllipsis[] => {\n const pages: NumberOrEllipsis[] = range(\n max(DELTA, currentPage - DELTA),\n min(pageCount - 1, currentPage + DELTA) + 1,\n );\n\n if (currentPage - DELTA > DELTA) {\n pages.unshift(ELLIPSIS);\n }\n if (currentPage + DELTA < pageCount - 1) {\n pages.push(ELLIPSIS);\n }\n\n pages.unshift(1);\n pages.push(pageCount);\n\n return pages;\n};\n\nexport const pageIsEllipsis = (pageNumber: NumberOrEllipsis): pageNumber is Ellipsis => pageNumber === ELLIPSIS;\n\nexport const prettifyPageNumber = (pageNumber: NumberOrEllipsis): string =>\n pageIsEllipsis(pageNumber) ? pageNumber : prettify(pageNumber);\n\nexport const keyForPage = (pageNumber: NumberOrEllipsis, index: number) => !pageIsEllipsis(pageNumber) ? `${pageNumber}` : `${pageNumber}_${index}`;\n","import { Link } from 'react-router-dom';\nimport { Pagination, PaginationItem, PaginationLink } from 'reactstrap';\nimport {\n pageIsEllipsis,\n keyForPage,\n progressivePagination,\n prettifyPageNumber,\n NumberOrEllipsis,\n} from '../utils/helpers/pagination';\nimport { ShlinkPaginator } from '../api/types';\n\ninterface PaginatorProps {\n paginator?: ShlinkPaginator;\n serverId: string;\n currentQueryString?: string;\n}\n\nconst Paginator = ({ paginator, serverId, currentQueryString = '' }: PaginatorProps) => {\n const { currentPage = 0, pagesCount = 0 } = paginator ?? {};\n const urlForPage = (pageNumber: NumberOrEllipsis) =>\n `/server/${serverId}/list-short-urls/${pageNumber}${currentQueryString}`;\n\n if (pagesCount <= 1) {\n return null;\n }\n\n const renderPages = () =>\n progressivePagination(currentPage, pagesCount).map((pageNumber, index) => (\n \n \n {prettifyPageNumber(pageNumber)}\n \n \n ));\n\n return (\n \n \n \n \n {renderPages()}\n = pagesCount}>\n \n \n \n );\n};\n\nexport default Paginator;\n","import { head, keys, pipe, values } from 'ramda';\nimport { FC, useEffect, useMemo, useState } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport { Card } from 'reactstrap';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { determineOrderDir, Order, OrderDir } from '../utils/helpers/ordering';\nimport { getServerId, SelectedServer } from '../servers/data';\nimport { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';\nimport { Topics } from '../mercure/helpers/Topics';\nimport { TableOrderIcon } from '../utils/table/TableOrderIcon';\nimport { ShlinkShortUrlsListParams } from '../api/types';\nimport { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';\nimport { OrderableFields, ShortUrlsListParams, SORTABLE_FIELDS } from './reducers/shortUrlsListParams';\nimport { ShortUrlsTableProps } from './ShortUrlsTable';\nimport Paginator from './Paginator';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\n\ninterface ShortUrlsListProps extends RouteComponentProps {\n selectedServer: SelectedServer;\n shortUrlsList: ShortUrlsListState;\n listShortUrls: (params: ShortUrlsListParams) => void;\n shortUrlsListParams: ShortUrlsListParams;\n resetShortUrlParams: () => void;\n}\n\ntype ShortUrlsOrder = Order;\n\nconst ShortUrlsList = (ShortUrlsTable: FC, SearchBar: FC) => boundToMercureHub(({\n listShortUrls,\n resetShortUrlParams,\n shortUrlsListParams,\n match,\n location,\n history,\n shortUrlsList,\n selectedServer,\n}: ShortUrlsListProps) => {\n const serverId = getServerId(selectedServer);\n const { orderBy } = shortUrlsListParams;\n const [ order, setOrder ] = useState({\n field: orderBy && (head(keys(orderBy)) as OrderableFields),\n dir: orderBy && head(values(orderBy)),\n });\n const [{ tags, search, startDate, endDate }, toFirstPage ] = useShortUrlsQuery({ history, match, location });\n const selectedTags = useMemo(() => tags?.split(',') ?? [], [ tags ]);\n const { pagination } = shortUrlsList?.shortUrls ?? {};\n\n const refreshList = (extraParams: ShlinkShortUrlsListParams) => listShortUrls(\n { ...shortUrlsListParams, ...extraParams },\n );\n const handleOrderBy = (field?: OrderableFields, dir?: OrderDir) => {\n setOrder({ field, dir });\n refreshList({ orderBy: field ? { [field]: dir } : undefined });\n };\n const orderByColumn = (field: OrderableFields) => () =>\n handleOrderBy(field, determineOrderDir(field, order.field, order.dir));\n const renderOrderIcon = (field: OrderableFields) => ;\n const addTag = pipe(\n (newTag: string) => [ ...new Set([ ...selectedTags, newTag ]) ].join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n useEffect(() => resetShortUrlParams, []);\n useEffect(() => {\n refreshList(\n { page: match.params.page, searchTerm: search, tags: selectedTags, itemsPerPage: undefined, startDate, endDate },\n );\n }, [ match.params.page, search, selectedTags, startDate, endDate ]);\n\n return (\n <>\n
\n
\n \n
\n \n \n \n \n \n );\n}, () => [ Topics.visits ]);\n\nexport default ShortUrlsList;\n","import { FC } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCopy as copyIcon } from '@fortawesome/free-regular-svg-icons';\nimport CopyToClipboard from 'react-copy-to-clipboard';\nimport './CopyToClipboardIcon.scss';\n\ninterface CopyToClipboardIconProps {\n text: string;\n onCopy?: (text: string, result: boolean) => void;\n}\n\nexport const CopyToClipboardIcon: FC = ({ text, onCopy }) => (\n \n \n \n);\n","import { parseISO, format as formatDate, getUnixTime, formatDistance } from 'date-fns';\nimport { isDateObject } from './helpers/date';\n\nexport interface DateProps {\n date: Date | string;\n format?: string;\n relative?: boolean;\n}\n\nexport const Time = ({ date, format = 'yyyy-MM-dd HH:mm', relative = false }: DateProps) => {\n const dateObject = isDateObject(date) ? date : parseISO(date);\n\n return (\n \n );\n};\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { isServerWithId, SelectedServer, ServerWithId } from '../../servers/data';\nimport { ShortUrl } from '../data';\n\nexport type LinkSuffix = 'visits' | 'edit';\n\nexport interface ShortUrlDetailLinkProps {\n shortUrl?: ShortUrl | null;\n selectedServer?: SelectedServer;\n suffix: LinkSuffix;\n}\n\nconst buildUrl = ({ id }: ServerWithId, { shortCode, domain }: ShortUrl, suffix: LinkSuffix) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return `/server/${id}/short-code/${shortCode}/${suffix}${query}`;\n};\n\nconst ShortUrlDetailLink: FC> = (\n { selectedServer, shortUrl, suffix, children, ...rest },\n) => {\n if (!selectedServer || !isServerWithId(selectedServer) || !shortUrl) {\n return {children};\n }\n\n return {children};\n};\n\nexport default ShortUrlDetailLink;\n","import { useRef } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';\nimport { UncontrolledTooltip } from 'reactstrap';\nimport classNames from 'classnames';\nimport { prettify } from '../../utils/helpers/numbers';\nimport { ShortUrl } from '../data';\nimport { SelectedServer } from '../../servers/data';\nimport ShortUrlDetailLink from './ShortUrlDetailLink';\nimport './ShortUrlVisitsCount.scss';\n\ninterface ShortUrlVisitsCountProps {\n shortUrl?: ShortUrl | null;\n selectedServer?: SelectedServer;\n visitsCount: number;\n active?: boolean;\n}\n\nconst ShortUrlVisitsCount = ({ visitsCount, shortUrl, selectedServer, active = false }: ShortUrlVisitsCountProps) => {\n const maxVisits = shortUrl?.meta?.maxVisits;\n const visitsLink = (\n \n \n {prettify(visitsCount)}\n \n \n );\n\n if (!maxVisits) {\n return visitsLink;\n }\n\n const prettifiedMaxVisits = prettify(maxVisits);\n const tooltipRef = useRef();\n\n return (\n <>\n \n {visitsLink}\n {\n tooltipRef.current = el;\n }}\n >\n {' '}/ {prettifiedMaxVisits}{' '}\n \n \n \n \n \n tooltipRef.current) as any} placement=\"bottom\">\n This short URL will not accept more than {prettifiedMaxVisits} visits.\n \n \n );\n};\n\nexport default ShortUrlVisitsCount;\n","import { FC, useEffect, useRef } from 'react';\nimport { isEmpty } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport ColorGenerator from '../../utils/services/ColorGenerator';\nimport { StateFlagTimeout } from '../../utils/helpers/hooks';\nimport Tag from '../../tags/helpers/Tag';\nimport { SelectedServer } from '../../servers/data';\nimport { CopyToClipboardIcon } from '../../utils/CopyToClipboardIcon';\nimport { ShortUrl } from '../data';\nimport { Time } from '../../utils/Time';\nimport ShortUrlVisitsCount from './ShortUrlVisitsCount';\nimport { ShortUrlsRowMenuProps } from './ShortUrlsRowMenu';\nimport './ShortUrlsRow.scss';\n\nexport interface ShortUrlsRowProps {\n onTagClick?: (tag: string) => void;\n selectedServer: SelectedServer;\n shortUrl: ShortUrl;\n}\n\nconst ShortUrlsRow = (\n ShortUrlsRowMenu: FC,\n colorGenerator: ColorGenerator,\n useStateFlagTimeout: StateFlagTimeout,\n) => ({ shortUrl, selectedServer, onTagClick }: ShortUrlsRowProps) => {\n const [ copiedToClipboard, setCopiedToClipboard ] = useStateFlagTimeout();\n const [ active, setActive ] = useStateFlagTimeout(false, 500);\n const isFirstRun = useRef(true);\n\n const renderTags = (tags: string[]) => {\n if (isEmpty(tags)) {\n return No tags;\n }\n\n return tags.map((tag) => (\n onTagClick?.(tag)}\n />\n ));\n };\n\n useEffect(() => {\n if (isFirstRun.current) {\n isFirstRun.current = false;\n } else {\n setActive();\n }\n }, [ shortUrl.visitsCount ]);\n\n return (\n \n \n
\n \n \n {tagFilteringModeHint(shortUrlCreation.tagFilteringMode)}\n \n \n \n );\n};\n","import { FC } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSun, faMoon } from '@fortawesome/free-solid-svg-icons';\nimport { FormGroup } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport ToggleSwitch from '../utils/ToggleSwitch';\nimport { changeThemeInMarkup, Theme } from '../utils/theme';\nimport { TagsModeDropdown } from '../tags/TagsModeDropdown';\nimport { capitalize } from '../utils/utils';\nimport { Settings, UiSettings } from './reducers/settings';\nimport './UserInterface.scss';\n\ninterface UserInterfaceProps {\n settings: Settings;\n setUiSettings: (settings: UiSettings) => void;\n}\n\nexport const UserInterface: FC = ({ settings: { ui }, setUiSettings }) => (\n \n \n \n {\n const theme: Theme = useDarkTheme ? 'dark' : 'light';\n\n setUiSettings({ ...ui, theme });\n changeThemeInMarkup(theme);\n }}\n >\n Use dark theme.\n \n \n \n \n capitalize(tagsMode)}\n onChange={(tagsMode) => setUiSettings({ ...ui ?? { theme: 'light' }, tagsMode })}\n />\n Tags will be displayed as {ui?.tagsMode ?? 'cards'}.\n \n \n);\n","import { FC } from 'react';\nimport { DropdownBtn } from '../DropdownBtn';\nimport { rangeOrIntervalToString } from './types';\nimport { DateIntervalDropdownItems, DateIntervalDropdownProps } from './DateIntervalDropdownItems';\n\nexport const DateIntervalSelector: FC = ({ onChange, active, allText }) => (\n \n \n \n);\n","import { FormGroup } from 'reactstrap';\nimport { FC } from 'react';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { DateIntervalSelector } from '../utils/dates/DateIntervalSelector';\nimport { Settings, VisitsSettings } from './reducers/settings';\n\ninterface VisitsProps {\n settings: Settings;\n setVisitsSettings: (settings: VisitsSettings) => void;\n}\n\nexport const Visits: FC = ({ settings, setVisitsSettings }) => (\n \n \n \n setVisitsSettings({ defaultInterval })}\n />\n \n \n);\n","import Bottle from 'bottlejs';\nimport RealTimeUpdates from '../RealTimeUpdates';\nimport Settings from '../Settings';\nimport {\n setRealTimeUpdatesInterval,\n setShortUrlCreationSettings,\n setUiSettings,\n setVisitsSettings,\n toggleRealTimeUpdates,\n} from '../reducers/settings';\nimport { ConnectDecorator } from '../../container/types';\nimport { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServer';\nimport { ShortUrlCreation } from '../ShortUrlCreation';\nimport { UserInterface } from '../UserInterface';\nimport { Visits } from '../Visits';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('Settings', Settings, 'RealTimeUpdates', 'ShortUrlCreation', 'UserInterface', 'Visits');\n bottle.decorator('Settings', withoutSelectedServer);\n bottle.decorator('Settings', connect(null, [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory('RealTimeUpdates', () => RealTimeUpdates);\n bottle.decorator(\n 'RealTimeUpdates',\n connect([ 'settings' ], [ 'toggleRealTimeUpdates', 'setRealTimeUpdatesInterval' ]),\n );\n\n bottle.serviceFactory('ShortUrlCreation', () => ShortUrlCreation);\n bottle.decorator('ShortUrlCreation', connect([ 'settings' ], [ 'setShortUrlCreationSettings' ]));\n\n bottle.serviceFactory('UserInterface', () => UserInterface);\n bottle.decorator('UserInterface', connect([ 'settings' ], [ 'setUiSettings' ]));\n\n bottle.serviceFactory('Visits', () => Visits);\n bottle.decorator('Visits', connect([ 'settings' ], [ 'setVisitsSettings' ]));\n\n // Actions\n bottle.serviceFactory('toggleRealTimeUpdates', () => toggleRealTimeUpdates);\n bottle.serviceFactory('setRealTimeUpdatesInterval', () => setRealTimeUpdatesInterval);\n bottle.serviceFactory('setShortUrlCreationSettings', () => setShortUrlCreationSettings);\n bottle.serviceFactory('setUiSettings', () => setUiSettings);\n bottle.serviceFactory('setVisitsSettings', () => setVisitsSettings);\n};\n\nexport default provideServices;\n","import { Action, Dispatch } from 'redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ShlinkDomainRedirects } from '../../api/types';\nimport { GetState } from '../../container/types';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { parseApiError } from '../../api/utils';\n\n/* eslint-disable padding-line-between-statements */\nexport const EDIT_DOMAIN_REDIRECTS_START = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START';\nexport const EDIT_DOMAIN_REDIRECTS_ERROR = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR';\nexport const EDIT_DOMAIN_REDIRECTS = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface EditDomainRedirectsAction extends Action {\n domain: string;\n redirects: ShlinkDomainRedirects;\n}\n\nexport const editDomainRedirects = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n domain: string,\n domainRedirects: Partial,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_START });\n const { editDomainRedirects } = buildShlinkApiClient(getState);\n\n try {\n const redirects = await editDomainRedirects({ domain, ...domainRedirects });\n\n dispatch({ type: EDIT_DOMAIN_REDIRECTS, domain, redirects });\n } catch (e: any) {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_ERROR, errorData: parseApiError(e) });\n }\n};\n","import { Action, Dispatch } from 'redux';\nimport { ProblemDetailsError, ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { GetState } from '../../container/types';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { EDIT_DOMAIN_REDIRECTS, EditDomainRedirectsAction } from './domainRedirects';\n\n/* eslint-disable padding-line-between-statements */\nexport const LIST_DOMAINS_START = 'shlink/domainsList/LIST_DOMAINS_START';\nexport const LIST_DOMAINS_ERROR = 'shlink/domainsList/LIST_DOMAINS_ERROR';\nexport const LIST_DOMAINS = 'shlink/domainsList/LIST_DOMAINS';\nexport const FILTER_DOMAINS = 'shlink/domainsList/FILTER_DOMAINS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface DomainsList {\n domains: ShlinkDomain[];\n filteredDomains: ShlinkDomain[];\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ListDomainsAction extends Action {\n domains: ShlinkDomain[];\n}\n\ninterface FilterDomainsAction extends Action {\n searchTerm: string;\n}\n\nconst initialState: DomainsList = {\n domains: [],\n filteredDomains: [],\n loading: false,\n error: false,\n};\n\nexport type DomainsCombinedAction = ListDomainsAction\n& ApiErrorAction\n& FilterDomainsAction\n& EditDomainRedirectsAction;\n\nexport const replaceRedirectsOnDomain = (domain: string, redirects: ShlinkDomainRedirects) =>\n (d: ShlinkDomain): ShlinkDomain => d.domain !== domain ? d : { ...d, redirects };\n\nexport default buildReducer({\n [LIST_DOMAINS_START]: () => ({ ...initialState, loading: true }),\n [LIST_DOMAINS_ERROR]: ({ errorData }) => ({ ...initialState, error: true, errorData }),\n [LIST_DOMAINS]: (_, { domains }) => ({ ...initialState, domains, filteredDomains: domains }),\n [FILTER_DOMAINS]: (state, { searchTerm }) => ({\n ...state,\n filteredDomains: state.domains.filter(({ domain }) => domain.toLowerCase().match(searchTerm)),\n }),\n [EDIT_DOMAIN_REDIRECTS]: (state, { domain, redirects }) => ({\n ...state,\n domains: state.domains.map(replaceRedirectsOnDomain(domain, redirects)),\n filteredDomains: state.filteredDomains.map(replaceRedirectsOnDomain(domain, redirects)),\n }),\n}, initialState);\n\nexport const listDomains = (buildShlinkApiClient: ShlinkApiClientBuilder) => () => async (\n dispatch: Dispatch,\n getState: GetState,\n) => {\n dispatch({ type: LIST_DOMAINS_START });\n const { listDomains } = buildShlinkApiClient(getState);\n\n try {\n const domains = await listDomains();\n\n dispatch({ type: LIST_DOMAINS, domains });\n } catch (e: any) {\n dispatch({ type: LIST_DOMAINS_ERROR, errorData: parseApiError(e) });\n }\n};\n\nexport const filterDomains = (searchTerm: string): FilterDomainsAction => ({ type: FILTER_DOMAINS, searchTerm });\n","import { useEffect } from 'react';\nimport { Button, DropdownItem, Input, InputGroup, InputGroupAddon, UncontrolledTooltip } from 'reactstrap';\nimport { InputProps } from 'reactstrap/lib/Input';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faUndo } from '@fortawesome/free-solid-svg-icons';\nimport { isEmpty, pipe } from 'ramda';\nimport { DropdownBtn } from '../utils/DropdownBtn';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { DomainsList } from './reducers/domainsList';\nimport './DomainSelector.scss';\n\nexport interface DomainSelectorProps extends Omit {\n value?: string;\n onChange: (domain: string) => void;\n}\n\ninterface DomainSelectorConnectProps extends DomainSelectorProps {\n listDomains: Function;\n domainsList: DomainsList;\n}\n\nexport const DomainSelector = ({ listDomains, value, domainsList, onChange }: DomainSelectorConnectProps) => {\n const [ inputDisplayed,, showInput, hideInput ] = useToggle();\n const { domains } = domainsList;\n const valueIsEmpty = isEmpty(value);\n const unselectDomain = () => onChange('');\n\n useEffect(() => {\n listDomains();\n }, []);\n\n return inputDisplayed ? (\n \n onChange(e.target.value)}\n />\n \n \n \n \n \n Existing domains\n \n \n \n ) : (\n \n {domains.map(({ domain, isDefault }) => (\n onChange(domain)}\n >\n {domain}\n {isDefault && default}\n
\n ))}\n \n \n New domain\n \n \n );\n};\n","import { FC, useState } from 'react';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { FormGroupContainer, FormGroupContainerProps } from '../../utils/FormGroupContainer';\nimport { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../utils/utils';\nimport { InfoTooltip } from '../../utils/InfoTooltip';\n\ninterface EditDomainRedirectsModalProps {\n domain: ShlinkDomain;\n isOpen: boolean;\n toggle: () => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n}\n\nconst FormGroup: FC = ({ isLast, ...rest }) => (\n \n);\n\nexport const EditDomainRedirectsModal: FC = (\n { isOpen, toggle, domain, editDomainRedirects },\n) => {\n const [ baseUrlRedirect, setBaseUrlRedirect ] = useState(domain.redirects?.baseUrlRedirect ?? '');\n const [ regular404Redirect, setRegular404Redirect ] = useState(domain.redirects?.regular404Redirect ?? '');\n const [ invalidShortUrlRedirect, setInvalidShortUrlRedirect ] = useState(\n domain.redirects?.invalidShortUrlRedirect ?? '',\n );\n const handleSubmit = handleEventPreventingDefault(async () => editDomainRedirects(domain.domain, {\n baseUrlRedirect: nonEmptyValueOrNull(baseUrlRedirect),\n regular404Redirect: nonEmptyValueOrNull(regular404Redirect),\n invalidShortUrlRedirect: nonEmptyValueOrNull(invalidShortUrlRedirect),\n }).then(toggle));\n\n return (\n \n
\n Edit redirects for {domain.domain}\n \n \n \n Visitors accessing the base url, as in https://{domain.domain}/, will be redirected to this URL.\n \n Base URL\n \n \n \n Visitors accessing a url not matching a short URL pattern, as in https://{domain.domain}/???/[...],\n will be redirected to this URL.\n \n Regular 404\n \n \n \n Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be\n redirected to this URL.\n \n Invalid short URL\n \n \n \n \n \n \n
\n
\n );\n};\n","import { FC } from 'react';\nimport { Button, UncontrolledTooltip } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n faBan as forbiddenIcon,\n faCheck as defaultDomainIcon,\n faEdit as editIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../api/types';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { OptionalString } from '../utils/utils';\nimport { EditDomainRedirectsModal } from './helpers/EditDomainRedirectsModal';\n\ninterface DomainRowProps {\n domain: ShlinkDomain;\n defaultRedirects?: ShlinkDomainRedirects;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n}\n\nconst Nr: FC<{ fallback: OptionalString }> = ({ fallback }) => (\n \n {!fallback && No redirect}\n {fallback && <>{fallback} (as fallback)}\n \n);\nconst DefaultDomain: FC = () => (\n <>\n \n Default domain\n \n);\n\nexport const DomainRow: FC = ({ domain, editDomainRedirects, defaultRedirects }) => {\n const [ isOpen, toggle ] = useToggle();\n const { domain: authority, isDefault, redirects } = domain;\n const domainId = `domainEdit${authority.replace(/\\./g, '')}`;\n\n return (\n \n {isDefault ? : ''}\n {authority}\n \n {redirects?.baseUrlRedirect ?? }\n \n \n {redirects?.regular404Redirect ?? }\n \n \n {redirects?.invalidShortUrlRedirect ?? }\n \n \n \n \n \n {isDefault && (\n \n Redirects for default domain cannot be edited here.\n
\n Use config options or env vars directly on the server.\n
\n )}\n \n \n \n );\n};\n","import { FC, useEffect } from 'react';\nimport Message from '../utils/Message';\nimport { Result } from '../utils/Result';\nimport { ShlinkApiError } from '../api/ShlinkApiError';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport SearchField from '../utils/SearchField';\nimport { ShlinkDomainRedirects } from '../api/types';\nimport { DomainsList } from './reducers/domainsList';\nimport { DomainRow } from './DomainRow';\n\ninterface ManageDomainsProps {\n listDomains: Function;\n filterDomains: (searchTerm: string) => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n domainsList: DomainsList;\n}\n\nconst headers = [ '', 'Domain', 'Base path redirect', 'Regular 404 redirect', 'Invalid short URL redirect', '' ];\n\nexport const ManageDomains: FC = (\n { listDomains, domainsList, filterDomains, editDomainRedirects },\n) => {\n const { filteredDomains: domains, loading, error, errorData } = domainsList;\n const defaultRedirects = domains.find(({ isDefault }) => isDefault)?.redirects;\n\n useEffect(() => {\n listDomains();\n }, []);\n\n if (loading) {\n return ;\n }\n\n const renderContent = () => {\n if (error) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n {headers.map((column, index) => )}\n \n \n {domains.length < 1 && }\n {domains.map((domain) => (\n \n ))}\n \n
{column}
No results found
\n
\n );\n };\n\n return (\n <>\n \n {renderContent()}\n \n );\n};\n","import Bottle from 'bottlejs';\nimport { ConnectDecorator } from '../../container/types';\nimport { filterDomains, listDomains } from '../reducers/domainsList';\nimport { DomainSelector } from '../DomainSelector';\nimport { ManageDomains } from '../ManageDomains';\nimport { editDomainRedirects } from '../reducers/domainRedirects';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('DomainSelector', () => DomainSelector);\n bottle.decorator('DomainSelector', connect([ 'domainsList' ], [ 'listDomains' ]));\n\n bottle.serviceFactory('ManageDomains', () => ManageDomains);\n bottle.decorator('ManageDomains', connect(\n [ 'domainsList' ],\n [ 'listDomains', 'filterDomains', 'editDomainRedirects' ],\n ));\n\n // Actions\n bottle.serviceFactory('listDomains', listDomains, 'buildShlinkApiClient');\n bottle.serviceFactory('filterDomains', () => filterDomains);\n bottle.serviceFactory('editDomainRedirects', editDomainRedirects, 'buildShlinkApiClient');\n};\n\nexport default provideServices;\n","import { Action } from 'redux';\nimport { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\n\n/* eslint-disable padding-line-between-statements */\nexport const APP_UPDATE_AVAILABLE = 'shlink/appUpdates/APP_UPDATE_AVAILABLE';\nexport const RESET_APP_UPDATE = 'shlink/appUpdates/RESET_APP_UPDATE';\n/* eslint-enable padding-line-between-statements */\n\nconst initialState = false;\n\nexport default buildReducer>({\n [APP_UPDATE_AVAILABLE]: () => true,\n [RESET_APP_UPDATE]: () => false,\n}, initialState);\n\nexport const appUpdateAvailable = buildActionCreator(APP_UPDATE_AVAILABLE);\n\nexport const resetAppUpdate = buildActionCreator(RESET_APP_UPDATE);\n","import { FC, MouseEventHandler } from 'react';\nimport { Alert, Button } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSyncAlt as reloadIcon } from '@fortawesome/free-solid-svg-icons';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { useToggle } from '../utils/helpers/hooks';\nimport './AppUpdateBanner.scss';\n\ninterface AppUpdateBannerProps {\n isOpen: boolean;\n toggle: MouseEventHandler;\n forceUpdate: Function;\n}\n\nexport const AppUpdateBanner: FC = ({ isOpen, toggle, forceUpdate }) => {\n const [ isUpdating,, setUpdating ] = useToggle();\n const update = () => {\n setUpdating();\n forceUpdate();\n };\n\n return (\n \n

This app has just been updated!

\n

\n Restart it to enjoy the new features.\n \n

\n
\n );\n};\n","export const forceUpdate = async () => {\n const registrations = await navigator.serviceWorker?.getRegistrations() ?? [];\n\n for (const registration of registrations) {\n const { waiting } = registration;\n\n waiting?.addEventListener('statechange', (event) => {\n if ((event.target as any)?.state === 'activated') {\n window.location.reload();\n }\n });\n\n // The logic that makes skipWaiting to be called when this message is posted is in service-worker.ts\n waiting?.postMessage({ type: 'SKIP_WAITING' });\n }\n};\n","import { useEffect, FC } from 'react';\nimport { Route, RouteChildrenProps, Switch } from 'react-router-dom';\nimport classNames from 'classnames';\nimport NotFound from '../common/NotFound';\nimport { ServersMap } from '../servers/data';\nimport { Settings } from '../settings/reducers/settings';\nimport { changeThemeInMarkup } from '../utils/theme';\nimport { AppUpdateBanner } from '../common/AppUpdateBanner';\nimport { forceUpdate } from '../utils/helpers/sw';\nimport './App.scss';\n\ninterface AppProps extends RouteChildrenProps {\n fetchServers: () => void;\n servers: ServersMap;\n settings: Settings;\n resetAppUpdate: () => void;\n appUpdated: boolean;\n}\n\nconst App = (\n MainHeader: FC,\n Home: FC,\n MenuLayout: FC,\n CreateServer: FC,\n EditServer: FC,\n Settings: FC,\n ManageServers: FC,\n ShlinkVersionsContainer: FC,\n) => ({ fetchServers, servers, settings, appUpdated, resetAppUpdate, location }: AppProps) => {\n const isHome = location.pathname === '/';\n\n useEffect(() => {\n // On first load, try to fetch the remote servers if the list is empty\n if (Object.keys(servers).length === 0) {\n fetchServers();\n }\n\n changeThemeInMarkup(settings.ui?.theme ?? 'light');\n }, []);\n\n return (\n
\n \n\n
\n
\n \n \n \n \n \n \n \n \n \n
\n\n
\n \n
\n
\n\n \n
\n );\n};\n\nexport default App;\n","import Bottle, { Decorator } from 'bottlejs';\nimport { appUpdateAvailable, resetAppUpdate } from '../reducers/appUpdates';\nimport App from '../App';\nimport { ConnectDecorator } from '../../container/types';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {\n // Components\n bottle.serviceFactory(\n 'App',\n App,\n 'MainHeader',\n 'Home',\n 'MenuLayout',\n 'CreateServer',\n 'EditServer',\n 'Settings',\n 'ManageServers',\n 'ShlinkVersionsContainer',\n );\n bottle.decorator('App', connect([ 'servers', 'settings', 'appUpdated' ], [ 'fetchServers', 'resetAppUpdate' ]));\n bottle.decorator('App', withRouter);\n\n // Actions\n bottle.serviceFactory('appUpdateAvailable', () => appUpdateAvailable);\n bottle.serviceFactory('resetAppUpdate', () => resetAppUpdate);\n};\n\nexport default provideServices;\n","import Bottle, { IContainer } from 'bottlejs';\nimport { withRouter } from 'react-router-dom';\nimport { connect as reduxConnect } from 'react-redux';\nimport { pick } from 'ramda';\nimport provideApiServices from '../api/services/provideServices';\nimport provideCommonServices from '../common/services/provideServices';\nimport provideShortUrlsServices from '../short-urls/services/provideServices';\nimport provideServersServices from '../servers/services/provideServices';\nimport provideVisitsServices from '../visits/services/provideServices';\nimport provideTagsServices from '../tags/services/provideServices';\nimport provideUtilsServices from '../utils/services/provideServices';\nimport provideMercureServices from '../mercure/services/provideServices';\nimport provideSettingsServices from '../settings/services/provideServices';\nimport provideDomainsServices from '../domains/services/provideServices';\nimport provideAppServices from '../app/services/provideServices';\nimport { ConnectDecorator } from './types';\n\ntype LazyActionMap = Record;\n\nconst bottle = new Bottle();\nconst { container } = bottle;\n\nconst lazyService = (container: IContainer, serviceName: string) =>\n (...args: any[]) => (container[serviceName] as T)(...args) as K;\nconst mapActionService = (map: LazyActionMap, actionName: string): LazyActionMap => ({\n ...map,\n // Wrap actual action service in a function so that it is lazily created the first time it is called\n [actionName]: lazyService(container, actionName),\n});\nconst connect: ConnectDecorator = (propsFromState: string[] | null, actionServiceNames: string[] = []) =>\n reduxConnect(\n propsFromState ? pick(propsFromState) : null,\n actionServiceNames.reduce(mapActionService, {}),\n );\n\nprovideAppServices(bottle, connect, withRouter);\nprovideCommonServices(bottle, connect, withRouter);\nprovideApiServices(bottle);\nprovideShortUrlsServices(bottle, connect, withRouter);\nprovideServersServices(bottle, connect, withRouter);\nprovideTagsServices(bottle, connect);\nprovideVisitsServices(bottle, connect);\nprovideUtilsServices(bottle);\nprovideMercureServices(bottle);\nprovideSettingsServices(bottle, connect);\nprovideDomainsServices(bottle, connect);\n\nexport default container;\n","import { combineReducers } from 'redux';\nimport serversReducer from '../servers/reducers/servers';\nimport selectedServerReducer from '../servers/reducers/selectedServer';\nimport shortUrlsListReducer from '../short-urls/reducers/shortUrlsList';\nimport shortUrlsListParamsReducer from '../short-urls/reducers/shortUrlsListParams';\nimport shortUrlCreationReducer from '../short-urls/reducers/shortUrlCreation';\nimport shortUrlDeletionReducer from '../short-urls/reducers/shortUrlDeletion';\nimport shortUrlEditionReducer from '../short-urls/reducers/shortUrlEdition';\nimport shortUrlVisitsReducer from '../visits/reducers/shortUrlVisits';\nimport tagVisitsReducer from '../visits/reducers/tagVisits';\nimport orphanVisitsReducer from '../visits/reducers/orphanVisits';\nimport shortUrlDetailReducer from '../short-urls/reducers/shortUrlDetail';\nimport tagsListReducer from '../tags/reducers/tagsList';\nimport tagDeleteReducer from '../tags/reducers/tagDelete';\nimport tagEditReducer from '../tags/reducers/tagEdit';\nimport mercureInfoReducer from '../mercure/reducers/mercureInfo';\nimport settingsReducer from '../settings/reducers/settings';\nimport domainsListReducer from '../domains/reducers/domainsList';\nimport visitsOverviewReducer from '../visits/reducers/visitsOverview';\nimport appUpdatesReducer from '../app/reducers/appUpdates';\nimport { ShlinkState } from '../container/types';\n\nexport default combineReducers({\n servers: serversReducer,\n selectedServer: selectedServerReducer,\n shortUrlsList: shortUrlsListReducer,\n shortUrlsListParams: shortUrlsListParamsReducer,\n shortUrlCreationResult: shortUrlCreationReducer,\n shortUrlDeletion: shortUrlDeletionReducer,\n shortUrlEdition: shortUrlEditionReducer,\n shortUrlVisits: shortUrlVisitsReducer,\n tagVisits: tagVisitsReducer,\n orphanVisits: orphanVisitsReducer,\n shortUrlDetail: shortUrlDetailReducer,\n tagsList: tagsListReducer,\n tagDelete: tagDeleteReducer,\n tagEdit: tagEditReducer,\n mercureInfo: mercureInfoReducer,\n settings: settingsReducer,\n domainsList: domainsListReducer,\n visitsOverview: visitsOverviewReducer,\n appUpdated: appUpdatesReducer,\n});\n","import ReduxThunk from 'redux-thunk';\nimport { applyMiddleware, compose, createStore } from 'redux';\nimport { save, load, RLSOptions } from 'redux-localstorage-simple';\nimport reducers from '../reducers';\n\nconst isProduction = process.env.NODE_ENV !== 'production';\nconst composeEnhancers: Function = !isProduction && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst localStorageConfig: RLSOptions = {\n states: [ 'settings', 'servers' ],\n namespace: 'shlink',\n namespaceSeparator: '.',\n debounce: 300,\n};\n\nconst store = createStore(reducers, load(localStorageConfig), composeEnhancers(\n applyMiddleware(save(localStorageConfig), ReduxThunk),\n));\n\nexport default store;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL ?? '', window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://cra.link/PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://cra.link/PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import L from 'leaflet';\nimport marker2x from 'leaflet/dist/images/marker-icon-2x.png';\nimport marker from 'leaflet/dist/images/marker-icon.png';\nimport markerShadow from 'leaflet/dist/images/marker-shadow.png';\n\nexport const fixLeafletIcons = () => {\n delete (L.Icon.Default.prototype as any)._getIconUrl;\n\n L.Icon.Default.mergeOptions({\n iconRetinaUrl: marker2x,\n iconUrl: marker,\n shadowUrl: markerShadow,\n });\n};\n","import { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrowserRouter } from 'react-router-dom';\nimport { homepage } from '../package.json';\nimport container from './container';\nimport store from './container/store';\nimport { fixLeafletIcons } from './utils/helpers/leaflet';\nimport { register as registerServiceWorker } from './serviceWorkerRegistration';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport 'leaflet/dist/leaflet.css';\nimport './index.scss';\n\n// This overwrites icons used for leaflet maps, fixing some issues caused by webpack while processing the CSS\nfixLeafletIcons();\n\nconst { App, ScrollToTop, ErrorHandler, appUpdateAvailable } = container;\n\nrender(\n \n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nregisterServiceWorker({\n onUpdate() {\n store.dispatch(appUpdateAvailable()); // eslint-disable-line @typescript-eslint/no-unsafe-call\n },\n});\n","import { FC } from 'react';\nimport { Card, Row } from 'reactstrap';\nimport classNames from 'classnames';\nimport { faCircleNotch as preloader } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\n\ntype MessageType = 'default' | 'error';\n\nconst getClassForType = (type: MessageType) => {\n const map: Record = {\n error: 'border-danger',\n default: '',\n };\n\n return map[type];\n};\nconst getTextClassForType = (type: MessageType) => {\n const map: Record = {\n error: 'text-danger',\n default: 'text-muted',\n };\n\n return map[type];\n};\n\nexport interface MessageProps {\n className?: string;\n loading?: boolean;\n fullWidth?: boolean;\n type?: MessageType;\n}\n\nconst Message: FC = ({ className, children, loading = false, type = 'default', fullWidth = false }) => {\n const classes = classNames({\n 'col-md-12': fullWidth,\n 'col-md-10 offset-md-1': !fullWidth,\n });\n\n return (\n \n
\n \n

\n {loading && }\n {loading && {children ?? 'Loading...'}}\n {!loading && children}\n

\n
\n
\n
\n );\n};\n\nexport default Message;\n","import { FC } from 'react';\nimport './NoMenuLayout.scss';\n\nconst NoMenuLayout: FC = ({ children }) =>
{children}
;\n\nexport default NoMenuLayout;\n","import { compare } from 'compare-versions';\nimport { identity, memoizeWith } from 'ramda';\nimport { Empty, hasValue } from '../utils';\n\ntype SemVerPatternFragment = `${bigint | '*'}`;\n\nexport type SemVerPattern = SemVerPatternFragment\n| `${SemVerPatternFragment}.${SemVerPatternFragment}`\n| `${SemVerPatternFragment}.${SemVerPatternFragment}.${SemVerPatternFragment}`;\n\nexport interface Versions {\n maxVersion?: SemVerPattern;\n minVersion?: SemVerPattern;\n}\n\nexport type SemVer = `${bigint}.${bigint}.${bigint}` | 'latest';\n\nexport const versionMatch = (versionToMatch: SemVer | Empty, { maxVersion, minVersion }: Versions): boolean => {\n if (!hasValue(versionToMatch)) {\n return false;\n }\n\n const matchesMinVersion = !minVersion || compare(versionToMatch, minVersion, '>=');\n const matchesMaxVersion = !maxVersion || compare(versionToMatch, maxVersion, '<=');\n\n return matchesMaxVersion && matchesMinVersion;\n};\n\nconst versionIsValidSemVer = memoizeWith(identity, (version: string): version is SemVer => {\n try {\n return compare(version, version, '=');\n } catch (e) {\n return false;\n }\n});\n\nexport const versionToPrintable = (version: string) => !versionIsValidSemVer(version) ? version : `v${version}`;\n\nexport const versionToSemVer = (defaultValue: SemVer = 'latest') =>\n (version: string): SemVer => versionIsValidSemVer(version) ? version : defaultValue;\n"],"sourceRoot":""} \ No newline at end of file