From 6c661b94d43483cdda883a2d521eac6423bd5ef1 Mon Sep 17 00:00:00 2001 From: acelaya Date: Fri, 24 Dec 2021 14:08:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@e77508edcc3af159bd1dc86ec7fdcf8cffa6eb9b?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feature/ordering-settings/asset-manifest.json | 4 ++-- feature/ordering-settings/index.html | 2 +- feature/ordering-settings/static/js/main.80883cdc.chunk.js | 2 -- .../ordering-settings/static/js/main.80883cdc.chunk.js.map | 1 - feature/ordering-settings/static/js/main.92df7ed9.chunk.js | 2 ++ .../ordering-settings/static/js/main.92df7ed9.chunk.js.map | 1 + 6 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 feature/ordering-settings/static/js/main.80883cdc.chunk.js delete mode 100644 feature/ordering-settings/static/js/main.80883cdc.chunk.js.map create mode 100644 feature/ordering-settings/static/js/main.92df7ed9.chunk.js create mode 100644 feature/ordering-settings/static/js/main.92df7ed9.chunk.js.map diff --git a/feature/ordering-settings/asset-manifest.json b/feature/ordering-settings/asset-manifest.json index bded8a81..3bf6a106 100644 --- a/feature/ordering-settings/asset-manifest.json +++ b/feature/ordering-settings/asset-manifest.json @@ -1,7 +1,7 @@ { "main.css": "/shlink-web-client/feature/ordering-settings/static/css/main.0dc55d47.chunk.css", - "main.js": "/shlink-web-client/feature/ordering-settings/static/js/main.80883cdc.chunk.js", - "main.js.map": "/shlink-web-client/feature/ordering-settings/static/js/main.80883cdc.chunk.js.map", + "main.js": "/shlink-web-client/feature/ordering-settings/static/js/main.92df7ed9.chunk.js", + "main.js.map": "/shlink-web-client/feature/ordering-settings/static/js/main.92df7ed9.chunk.js.map", "runtime~main.js": "/shlink-web-client/feature/ordering-settings/static/js/runtime~main.e5068aaa.js", "runtime~main.js.map": "/shlink-web-client/feature/ordering-settings/static/js/runtime~main.e5068aaa.js.map", "static/css/2.04c5acbe.chunk.css": "/shlink-web-client/feature/ordering-settings/static/css/2.04c5acbe.chunk.css", diff --git a/feature/ordering-settings/index.html b/feature/ordering-settings/index.html index b5019fda..bd2a5737 100644 --- a/feature/ordering-settings/index.html +++ b/feature/ordering-settings/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/feature/ordering-settings/static/js/main.80883cdc.chunk.js b/feature/ordering-settings/static/js/main.80883cdc.chunk.js deleted file mode 100644 index 71e03c36..00000000 --- a/feature/ordering-settings/static/js/main.80883cdc.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{102: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))}}},103: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)}},146:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/feature/ordering-settings"}')},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(557),a=r(558),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,"c",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(8),c=r(1),a=r(280),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)}]},d=function(e,t){var r=Object(c.useRef)(!0);Object(c.useEffect)((function(){!r.current&&e(),r.current=!1}),t)}},277:function(e,t,r){"use strict";(function(e){var n=r(278),c=r.n(n),a=r(279),s=r(310),i=r(311),o=r(312),l=r(313),u=r(281),d=r(308),j=r(102),b=r(283);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))},279: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})}}},281: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(217),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)}},283: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(103),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}()},299:function(e,t,r){"use strict";(function(e){var n=r(25),c=r(300),a=r(301);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.c,"setTimeout","clearTimeout")}}).call(this,r(49))},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(540),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 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))}}},301: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:{}}},308:function(e,t,r){"use strict";var n=r(0),c=r(7),a=r.n(c),s=r(30),i=r(545),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})})}},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(546),c=r(213),a=r(318),s=r(545),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(8),c=r(0),a=r(11),s=r(12),i=r(1),o=r(22),l=r(550),u=r(551),d=r(552),j=r(553),b=r(554),h=r(555),O=r(556),v=r(7),f=r.n(v),m=r(25),g=r(150);t.a=function(e){return function(t){var r=t.location,v=Object(m.e)(),x=Object(n.a)(v,4),p=x[0],y=x[1],S=x[3],C=r.pathname;Object(i.useEffect)(S,[r]);var N="/settings",k=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)(g.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:k})}),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,{})]})})]})}}},311:function(e,t,r){"use strict";var n=r(0),c=r(1),a=r(559),s=r(318),i=r(22),o=r(316),l=r(541),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})]})})})]})})]})]})})})}},312:function(e,t,r){"use strict";var n=r(3),c=r(8),a=r(0),s=r(1),i=r(43),o=r(11),l=r(12),u=r(7),d=r.n(u),j=r(151),b=r(25),h=r(38),O=r(30),v=r(153);t.a=function(e,t,r,u,f,m,g,x,p,y,S){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,k=Object(b.e)(),w=Object(c.a)(k,4),_=w[0],U=w[1],T=w[2],R=w[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.d)(N))return Object(a.jsx)(x,{});var E=Object(h.f)(N),D=Object(h.d)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),V=Object(b.d)(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:g}),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"})}})]})})})]})}))]})}),x)}},313:function(e,t,r){"use strict";var n=r(3),c=r(40),a=r(0),s=r(11),i=r(12),o=r(22),l=r(7),u=r.n(l),d=r(30),j=r(38),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.d)(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})]})})}}},319:function(e,t,r){e.exports=r(536)},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(40),a=r(0),s=r(316),i=r(543),o=r(544),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})]}))}},38:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"j",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"k",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"i",(function(){return b})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return O})),r.d(t,"c",(function(){return v}));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"}),v=a({minVersion:"2.10.0"})},405:function(e,t){},407:function(e,t){},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(212),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},536:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return Ma})),r.d(n,"normalizeVisits",(function(){return Ga}));var c,a=r(0),s=r(48),i=r(163),o=r(22),l=r(146),u=r(10),d=r(3),j=r(276),b=r(43),h=r(607),O=r(612),v=r(30),f=r(6),m=r.n(f),g=r(15),x=r(19),p=r(40),y=r(309),S=r(213),C=r(318),N=r(51),k=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(y.a)(S.a),_=function(e){var t=e.orderBy,r=void 0===t?{}:t,n=Object(p.a)(e,["orderBy"]),c=r.field,a=r.dir;return a?Object(d.a)(Object(d.a)({},n),{},{orderBy:"".concat(c,"-").concat(a)}):n},U=function e(t,r,n){var c=this;Object(x.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(g.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(g.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(y.a)((function(e){return Object(C.a)(e)||Object(S.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(g.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(g.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(k(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:N.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},T={},R=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 T[s]||(T[s]=new U(e,c,a)),T[s]}},E=function(e){e.serviceFactory("buildShlinkApiClient",R,"axios")},D=r(277),L=r(8),V=r(11),I=r(12),F=r(545),A=r(361),M=r(1),G=r(7),P=r.n(G),B=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(M.useState)(u),j=Object(L.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:P()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:P()("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)(I.a,{icon:V.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"})]})},H=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"})]})},W=r(565),q=r(129),z=r(560),Q=r(561),K=r(25),J=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(K.e)(),b=Object(L.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)(q.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(z.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(Q.a,{className:"w-100",right:u,style:f,children:i})]})},Z=r(91),Y=r(365),X=r(200),$=r(307),ee=r(563),te=r(564),re=r(538),ne=r(562),ce=(r(537),r(362)),ae=r(363),se=r(364),ie=function(e){return"string"!==typeof e},oe=function(e,t){return e&&ie(e)?t?Object(re.default)(e,t):Object(ne.a)(e):e},le=function(e){return oe(e,void 0)},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return oe(t,e)}}(),de=function(e){return ie(e)?e:Object(A.default)(e)},je=function(e,t,r){try{return Object(ce.default)(de(e),{start:de(null!==t&&void 0!==t?t:e),end:de(null!==r&&void 0!==r?r:e)})}catch(n){return!1}},be=function(e,t){return Object(ae.default)(e,t)||Object(se.default)(e,t)},he=function(e){return void 0===e||Object(C.a)(Object($.a)(Boolean,e))},Oe=function(e){return"string"===typeof e},ve={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},fe=Object.keys(ve).filter((function(e){return"all"!==e})),me=function(e){if(e&&"all"!==e)return Oe(e)?ve[e]:function(e){if(e&&!he(e))return e.startDate&&!e.endDate?"Since ".concat(ue(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ue(e.endDate)):"".concat(ue(e.startDate)," - ").concat(ue(e.endDate))}(e)},ge=function(e){return Object(Z.default)(Object(Y.default)(new Date,e))},xe=function(e){return{startDate:e,endDate:Object(X.default)(new Date)}},pe=function(e){if(!e||"all"===e)return{};switch(e){case"today":return xe(Object(Z.default)(new Date));case"yesterday":return{startDate:ge(1),endDate:Object(X.default)(Object(Y.default)(new Date,1))};case"last7Days":return xe(ge(7));case"last30Days":return xe(ge(30));case"last90Days":return xe(ge(90));case"last180Days":return xe(ge(180));case"last365Days":return xe(ge(365))}return{}},ye=function(e){var t=de(e);return Object(ee.a)([[function(){return be(Object(Z.default)(new Date),t)},function(){return"today"}],[function(){return be(ge(1),t)},function(){return"yesterday"}],[function(){return be(ge(7),t)},function(){return"last7Days"}],[function(){return be(ge(30),t)},function(){return"last30Days"}],[function(){return be(ge(90),t)},function(){return"last90Days"}],[function(){return be(ge(180),t)},function(){return"last180Days"}],[function(){return be(ge(365),t)},function(){return"last365Days"}],[te.a,function(){return"all"}]])()},Se=r(286),Ce=r.n(Se),Ne=r(78),ke=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(S.a)(n),s=Object(M.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(Ce.a,Object(d.a)(Object(d.a)({},e),{},{dateFormat:"yyyy-MM-dd",className:P()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(I.a,{icon:Ne.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},we=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)(ke,{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)(ke,{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})})]})},_e=function(e){var t=e.active,r=e.allText,n=e.onChange;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{active:"all"===t,onClick:function(){return n("all")},children:r}),Object(a.jsx)(W.a,{divider:!0}),fe.map((function(e){return Object(a.jsx)(W.a,{active:t===e,onClick:function(){return n(e)},children:me(e)},e)}))]})},Ue=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=e.updatable,o=void 0!==i&&i,l=Oe(n),u=Object(M.useState)(l?n:void 0),j=Object(L.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(l?void 0:n),v=Object(L.a)(O,2),f=v[0],m=v[1],g=function(e){h(he(e)?"all":void 0),m(e),r(e)},x=function(e){h(e),m(void 0),r(pe(e))};return o&&Object(K.a)((function(){var e=Oe(n);e&&x(n),n&&!e&&g(n)}),[n]),Object(a.jsxs)(J,{disabled:s,text:null!==(t=me(null!==b&&void 0!==b?b:f))&&void 0!==t?t:c,children:[Object(a.jsx)(_e,{allText:c,active:b,onChange:x}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{header:!0,children:"Custom:"}),Object(a.jsx)(W.a,{text:!0,children:Object(a.jsx)(we,Object(d.a)(Object(d.a)({},f),{},{onStartDateChange:function(e){return g(Object(d.a)(Object(d.a)({},f),{},{startDate:e}))},onEndDateChange:function(e){return g(Object(d.a)(Object(d.a)({},f),{},{endDate:e}))}}))})]})},Te=function(e){var t=e.history,r=e.location,n=e.match,c=Object(M.useMemo)((function(){return Object(N.a)(r.search)}),[r]);return[c,function(e){var r=Object(N.b)(Object(d.a)(Object(d.a)({},c),e)),a=Object(C.a)(r)?"":"?".concat(r);t.push("/server/".concat(null===n||void 0===n?void 0:n.params.serverId,"/list-short-urls/1").concat(a))}]},Re=function(e){return e?Object(A.default)(e):null},Ee=function(e){return function(t){var r,n=Te(t),c=Object(L.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(F.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=le(n))&&void 0!==t?t:void 0,endDate:null!==(r=le(c))&&void 0!==r?r:void 0}}),d),h=Object(F.a)((function(e){return Object(C.a)(e)?void 0:e}),(function(e){return d({search:e})})),O=Object(F.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)(B,{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)(Ue,{defaultText:"All short URLs",initialDateRange:{startDate:Re(l),endDate:Re(u)},onDatesChange:b})})})}),j.length>0&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(I.a,{icon:V.N,className:"search-bar__tags-icon"}),"\xa0",j.map((function(t){return Object(a.jsx)(H,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return O(t)}},t)}))]})]})}},De=r(26),Le=r(316),Ve=r(566),Ie=r(567),Fe=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},Ae=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 Me(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=Fe(e,n.field,n.dir);c(t?e:void 0,t)}};return Object(a.jsxs)(Ve.a,{children:[Object(a.jsxs)(z.a,{caret:!0,color:i?"primary":"link",className:P()({"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:P()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(Ie.a)(r).map((function(e){var t=Object(L.a)(e,2),r=t[0],c=t[1];return Object(a.jsxs)(W.a,{active:n.field===r,onClick:u(r),children:[c,n.field===r&&Object(a.jsx)(I.a,{icon:"ASC"===n.dir?V.K:V.J,className:"sorting-dropdown__sort-icon"})]},r)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!n.field,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Ge=r(287);function Pe(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(M.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 Ge.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(De.a)(r)),r.clear()}),1e3*o*60);return Object(F.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 Be=function e(){Object(x.a)(this,e)};function He(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)(I.a,{icon:"ASC"===t.dir?V.f:V.e,className:c}):null}Be.visits="https://shlink.io/new-visit",Be.orphanVisits="https://shlink.io/new-orphan-visit",Be.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var We,qe,ze,Qe,Ke,Je,Ze,Ye,Xe,$e,et,tt,rt,nt,ct,at,st,it,ot=r(613),lt=r(568),ut=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}},dt=function(e){return function(){return{type:e}}},jt="shlink/realTimeUpdates/SET_SETTINGS",bt={field:"dateCreated",dir:"DESC"},ht={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:bt}},Ot=ut(Object(u.a)({},jt,(function(e,t){return Object(ot.a)(e,Object(lt.a)("type",t))})),ht),vt=function(e){return{type:jt,realTimeUpdates:{enabled:e}}},ft=function(e){return{type:jt,realTimeUpdates:{interval:e}}},mt=function(e){return{type:jt,shortUrlCreation:e}},gt=function(e){return{type:jt,shortUrlsList:e}},xt=function(e){return{type:jt,ui:e}},pt=function(e){return{type:jt,visits:e}},yt=function(e){return{type:jt,tags:e}},St=r(570),Ct=r(571),Nt=r(572),kt=r(546),wt=r(285),_t=r(569),Ut=Math.ceil,Tt=new Intl.NumberFormat("en-US"),Rt=function(e){return Tt.format(Number(e))},Et="...",Dt=function(e,t){var r=Object(kt.a)(Object(wt.a)(2,e-2),Object(_t.a)(t-1,e+2)+1);return e-2>2&&r.unshift(Et),e+2=d,children:Object(a.jsx)(Ct.a,{next:!0,tag:o.b,to:j(l+1)})})]})},At={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Mt=function(e,t){return Pe((function(r){var n,c,s,i=r.listShortUrls,o=r.match,l=r.location,u=r.history,d=r.shortUrlsList,j=r.selectedServer,b=r.settings,h=Object(v.a)(j),O=null!==(n=null===(c=b.shortUrlsList)||void 0===c?void 0:c.defaultOrdering)&&void 0!==n?n:bt,f=Object(M.useState)(O),m=Object(L.a)(f,2),g=m[0],x=m[1],p=Te({history:u,match:o,location:l}),y=Object(L.a)(p,2),S=y[0],C=S.tags,N=S.search,k=S.startDate,w=S.endDate,_=y[1],U=Object(M.useMemo)((function(){var e;return null!==(e=null===C||void 0===C?void 0:C.split(","))&&void 0!==e?e:[]}),[C]),T=(null!==(s=null===d||void 0===d?void 0:d.shortUrls)&&void 0!==s?s:{}).pagination,R=function(e,t){return x({field:e,dir:t})},E=Object(F.a)((function(e){return Object(De.a)(new Set([].concat(Object(De.a)(U),[e]))).join(",")}),(function(e){return _({tags:e})}));return Object(M.useEffect)((function(){i({page:o.params.page,searchTerm:N,tags:U,itemsPerPage:void 0,startDate:k,endDate:w,orderBy:g})}),[o.params.page,N,U,k,w,g]),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)(Me,{items:At,order:g,onChange:R})}),Object(a.jsxs)(Le.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{selectedServer:j,shortUrlsList:d,orderByColumn:function(e){return function(){return R(e,Fe(e,g.field,g.dir))}},renderOrderIcon:function(e){return Object(a.jsx)(He,{currentOrder:g,field:e})},onTagClick:E}),Object(a.jsx)(Ft,{paginator:T,serverId:h,currentQueryString:l.search})]})]})}),(function(){return[Be.visits]}))},Gt=r(52),Pt=r(160),Bt=r.n(Pt),Ht=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(Bt.a,{text:t,onCopy:r,children:Object(a.jsx)(I.a,{icon:Ne.c,className:"ml-2 copy-to-clipboard-icon"})})},Wt=r(573),qt=r(614),zt=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=ie(t)?t:Object(A.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(Wt.a)(i),"000"),children:s?"".concat(Object(qt.a)(new Date,i)," ago"):Object(re.default)(i,n)})},Qt=r(574),Kt=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)},Jt=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(p.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:Kt(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},Zt=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)(Jt,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:P()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:Rt(r)})});if(!o)return l;var u=Rt(o),d=Object(M.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)(I.a,{icon:V.u})})]})]}),Object(a.jsxs)(Qt.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},Yt=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(L.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(L.a)(h,2),v=O[0],f=O[1],m=Object(M.useRef)(!0);return Object(M.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)(zt,{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)(Gt.a,{href:i.shortUrl}),Object(a.jsx)(Ht,{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)(Gt.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)(Gt.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(C.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(H,{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)(Zt,{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})})]})}},Xt=r(575),$t=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(Xt.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(z.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(I.a,{icon:V.n}),"\xa0"]}),Object(a.jsx)(Q.a,{right:s,children:n})]})},er=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(K.e)(),i=Object(L.a)(s,2),o=i[0],l=i[1],u=Object(K.e)(),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(L.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)($t,{toggle:l,isOpen:o,children:[Object(a.jsxs)(W.a,{tag:Jt,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(I.a,{icon:V.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(W.a,{tag:Jt,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(W.a,{onClick:b,children:[Object(a.jsx)(I.a,{icon:V.F,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"dropdown-item--danger",onClick:f,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},tr=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(M.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(g.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}))]})}},rr=r(616),nr=r(576),cr=r(577),ar=r(578),sr=r(547),ir=r(31),or=r(541),lr=r(32),ur=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(or.a,{className:n,children:Object(a.jsx)("div",{className:P()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(lr.a,{className:P()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:P()({"p-2":s}),children:t})})})},dr=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},jr=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},br=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(", "),"]"]}))]})},hr=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(M.useState)(""),l=Object(L.a)(o,2),u=l[0],d=l[1];Object(M.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(F.a)(s,r),O=Object(ir.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(sr.a)}));return Object(a.jsx)(rr.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(nr.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(cr.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)(ur,{type:jr(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(br,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(ar.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"})]})]})})},Or=r(220),vr=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(L.a)(l,2),d=u[0],j=u[1];if(Object(M.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(ur,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.P,className:"float-right pointer",onClick:s}),Object(a.jsx)(br,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(S.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(ur,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.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)(Bt.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)(I.a,{icon:Ne.c})," Copy"]})}),Object(a.jsx)(Or.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},fr=r(579),mr=r(580),gr=r(288),xr=r(581),pr=function(e,t,r){return Object(S.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},yr="shlink/visitCreation/CREATE_VISITS",Sr=function(e){return{type:yr,createdVisits:e}},Cr="shlink/deleteShortUrl/DELETE_SHORT_URL_START",Nr="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",kr="shlink/deleteShortUrl/SHORT_URL_DELETED",wr="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",_r={shortCode:"",loading:!1,error:!1},Ur=ut((We={},Object(u.a)(We,Cr,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(We,Nr,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(We,kr,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(We,wr,(function(){return _r})),We),_r),Tr=function(e){return function(t,r){return function(){var n=Object(g.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:Cr}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:kr,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:Nr,errorData:dr(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},Rr=dt(wr),Er="shlink/createShortUrl/CREATE_SHORT_URL_START",Dr="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",Lr="shlink/createShortUrl/CREATE_SHORT_URL",Vr="shlink/createShortUrl/RESET_CREATE_SHORT_URL",Ir={result:null,saving:!1,error:!1},Fr=ut((qe={},Object(u.a)(qe,Er,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(qe,Dr,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(qe,Lr,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(qe,Vr,(function(){return Ir})),qe),Ir),Ar=function(e){return function(t){return function(){var r=Object(g.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:Er}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Lr,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:Dr,errorData:dr(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Mr=dt(Vr),Gr=r(38),Pr="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Br="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Hr="shlink/shortUrlEdition/SHORT_URL_EDITED",Wr=ut((ze={},Object(u.a)(ze,Pr,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(ze,Br,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(ze,Hr,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),ze),{saving:!1,error:!1}),qr=function(e){return function(t,r,n){return function(){var c=Object(g.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:Pr}),i=s(),o=i.selectedServer,l=!Object(Gr.k)(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(L.a)(b,1),O=h[0],a({shortUrl:O,type:Hr}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Br,errorData:dr(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},zr="shlink/shortUrlsList/LIST_SHORT_URLS_START",Qr="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Kr="shlink/shortUrlsList/LIST_SHORT_URLS",Jr=ut((Qe={},Object(u.a)(Qe,zr,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Qe,Qr,(function(){return{loading:!1,error:!0}})),Object(u.a)(Qe,Kr,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Qe,kr,Object(F.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(fr.a)(["shortUrls","data"],Object(y.a)((function(e){return pr(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(fr.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Qe,yr,(function(e,t){var r,n,c=t.createdVisits;return Object(fr.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(mr.a)(c.filter((function(t){var r=t.shortUrl;return r&&pr(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(gr.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Qe,Lr,Object(F.a)((function(e,t){var r=t.result;return e.shortUrls?Object(fr.a)(["shortUrls","data"],[r].concat(Object(De.a)(Object(xr.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(fr.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Qe,Hr,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(fr.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return pr(e,t,n)?r:e})),e):e})),Qe),{loading:!0,error:!1}),Zr=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(g.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:zr}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Kr,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Qr,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Yr=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=P()({"short-urls-table__header-cell--with-action":!!r}),b=P()("short-urls-table__header-cell",j),h=P()("table table-hover",o),O=Object(Gr.j)(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(C.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)}))})]})}},Xr=r(582),$r=r(217),en=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(J,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(W.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(W.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},tn=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(J,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(W.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(W.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(W.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(W.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},rn=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(M.useState)(300),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(0),O=Object(L.a)(h,2),v=O[0],f=O[1],x=Object(M.useState)("png"),p=Object(L.a)(x,2),y=p[0],S=p[1],k=Object(M.useState)("L"),w=Object(L.a)(k,2),_=w[0],U=w[1],T=Object(M.useMemo)((function(){return{useSizeInPath:!Object(Gr.h)(l),marginIsSupported:Object(Gr.g)(l),errorCorrectionIsSupported:Object(Gr.i)(l)}}),[l]),R=T.marginIsSupported!==T.errorCorrectionIsSupported,E=Object(M.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(N.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(C.a)(d)?"":"?".concat(d))}(c,{size:j,format:y,margin:v,errorCorrection:_},T)}),[c,j,y,v,_,T]),D=Object(M.useMemo)((function(){return j+v}),[j,v]),F=Object(M.useMemo)((function(){if(!(D<500))return D<800?"lg":"xl"}),[D]);return Object(a.jsxs)(rr.a,{isOpen:o,toggle:i,centered:!0,size:F,children:[Object(a.jsxs)(nr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(Gt.a,{href:c,children:c})]}),Object(a.jsxs)(cr.a,{children:[Object(a.jsxs)(or.a,{children:[Object(a.jsxs)(Xr.a,{className:P()({"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)(Xr.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)(Xr.a,{className:R?"col-md-4":"col-md-6",children:Object(a.jsx)(en,{format:y,setFormat:S})}),T.errorCorrectionIsSupported&&Object(a.jsx)(Xr.a,{className:"col-md-6",children:Object(a.jsx)(tn,{errorCorrection:_,setErrorCorrection:U})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(Gt.a,{href:E}),Object(a.jsx)(Ht,{text:E})]}),Object(a.jsx)("img",{src:E,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)($r.a,{block:!0,color:"primary",onClick:Object(g.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(E,"".concat(s,"-qr-code.").concat(y)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(I.a,{icon:V.q,className:"ml-1"})]})})})]})]})]})}},nn=r(585),cn=r(583),an=r(584),sn=r(611),on=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?sr.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(M.useRef)(Object(sn.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:P()("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})]})},ln=function(e){return Object(a.jsx)(on,Object(d.a)({type:"checkbox"},e))},un=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(rr.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(nr.a,{toggle:r,children:"Info"}),Object(a.jsxs)(cr.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"})]})]})]})},dn=function(){var e=Object(K.e)(),t=Object(L.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)(I.a,{icon:V.u,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(un,{isOpen:r,toggle:n})]})},jn=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(M.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(I.a,{icon:V.u})}),Object(a.jsx)(Qt.a,{target:function(){return s.current},placement:n,children:c})]})},bn=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(ln,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(jn,{placement:"right",children:r})]})},hn=Object(F.a)(cn.a,Object(an.a)(/ /g,"-")),On=function(e){return"string"===typeof e?Object(A.default)(e):e},vn=function(e){return{"col-sm-6":e,"col-sm-12":!e}},fn=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(M.useState)(o),b=Object(L.a)(j,2),h=b[0],O=b[1],v="edit"===c,f="create-basic"===c,x=Object(ir.c)(o.title),p=function(){var e=Object(ir.c)(h.title);return Object(ee.a)([[function(){return!e&&!x},function(){}],[function(){return!e&&x},function(){return null}],[te.a,function(){return h.title}]])()},y=Object(ir.b)(Object(g.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=le(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=le(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(ir.c)(h.maxVisits)?Number(h.maxVisits):null,title:p()})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(M.useEffect)((function(){O(o)}),[o]);var S=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]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Object(a.jsx)(Xr.a,Object(d.a)(Object(d.a)({},s),{},{children:Object(a.jsx)(nn.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))}))},N=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)(ke,Object(d.a)({selected:h[e]?On(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))})},k=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Xr.a,{children:Object(a.jsx)(nn.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.jsxs)(or.a,{children:[f&&S("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),Object(a.jsx)(Xr.a,{className:f?"col-lg-6":"col-12 mb-0",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(hn)}))}})})]})]}),w=Object(Gr.j)(l),_=w||!v,U=P()("mb-3",vn(_)),T=Object(Gr.b)(l),R=Object(Gr.e)(l),E=T||R,D=P()("mb-3",vn(E));return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:y,children:[f&&k,!f&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(lr.a,{title:"Basic options",className:"mb-3",children:k}),Object(a.jsxs)(or.a,{children:[_&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(lr.a,{title:"Customize the short URL",children:[w&&S("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(or.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:S("customSlug","Custom slug","text",{disabled:Object(ir.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:S("shortCodeLength","Short code length","number",{min:4,disabled:Object(ir.c)(h.customSlug)})})]}),Object(a.jsx)(Xr.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:U,children:Object(a.jsxs)(lr.a,{title:"Limit access to the short URL",children:[S("maxVisits","Maximum number of visits allowed","number",{min:1}),N("validSince","Enabled since...",{maxDate:h.validUntil?On(h.validUntil):void 0}),N("validUntil","Enabled until...",{minDate:h.validSince?On(h.validSince):void 0})]})})]}),Object(a.jsxs)(or.a,{children:[Object(a.jsx)("div",{className:D,children:Object(a.jsxs)(lr.a,{title:"Extra checks",children:[Object(a.jsx)(bn,{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)(ln,{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)(dn,{})]})]})}),E&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(lr.a,{title:"Configure behavior",children:[T&&Object(a.jsx)(bn,{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"}),R&&Object(a.jsx)(bn,{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)($r.a,{outline:!0,color:"primary",disabled:s||Object(C.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},mn=r(54),gn=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,x=d.error,p=d.errorData,y=Object(N.a)(s).domain,S=Object(M.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]),C=Object(K.e)(),k=Object(L.a)(C,4),w=k[0],_=k[2],U=k[3];return Object(M.useEffect)((function(){u(c.shortCode,y)}),[]),b?Object(a.jsx)(mn.a,{loading:!0}):h?Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{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)(Le.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)($r.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(Gt.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(g.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)}}()}),x&&Object(a.jsx)(ur,{type:"error",className:"mt-3",children:Object(a.jsx)(br,{errorData:p,fallbackMessage:"An error occurred while updating short URL :("})}),w&&Object(a.jsx)(ur,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},xn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",pn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",yn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",Sn={loading:!1,error:!1},Cn=ut((Ke={},Object(u.a)(Ke,xn,(function(){return{loading:!0,error:!1}})),Object(u.a)(Ke,pn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Ke,yn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},Sn)})),Ke),Sn),Nn=function(e){return function(t,r){return function(){var n=Object(g.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:xn}),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 pr(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:yn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:pn,errorData:dr(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},kn=function(e,t,r){e.serviceFactory("ShortUrlsList",Mt,"ShortUrlsTable","SearchBar"),e.decorator("ShortUrlsList",t(["selectedServer","mercureInfo","shortUrlsList","settings"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Yr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",Yt,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",er,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",vr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",fn,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",tr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",gn,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return hr})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",rn,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",Ee,"ColorGenerator"),e.decorator("SearchBar",r),e.serviceFactory("listShortUrls",Zr,"buildShlinkApiClient"),e.serviceFactory("createShortUrl",Ar,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return Mr})),e.serviceFactory("deleteShortUrl",Tr,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return Rr})),e.serviceFactory("getShortUrlDetail",Nn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",qr,"buildShlinkApiClient")},wn=r(289),_n=r.n(wn),Un=r(60),Tn=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(M.useRef)(null!==c&&void 0!==c?c:Object(sn.a)());return Object(a.jsxs)(Xr.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)}})]})},Rn=function(e){return Object(a.jsx)(Tn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},En=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(M.useState)(""),i=Object(L.a)(s,2),o=i[0],l=i[1],u=Object(M.useState)(""),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(""),O=Object(L.a)(h,2),v=O[0],f=O[1],m=Object(ir.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(M.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)(lr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(Rn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(Rn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(Rn,{value:v,onChange:f,children:"API key"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},Dn=function(e){var t=e.type;return Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(ur,{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."]})})},Ln=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(L.a)(u,2),b=j[0],h=j[1],O=t(!1,4e3),v=Object(L.a)(O,2),f=v[0],m=v[1];return Object(a.jsxs)(Un.a,{children:[Object(a.jsxs)(En,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(sn.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)($r.a,{outline:!0,onClick:o,children:"Cancel"}),Object(a.jsx)($r.a,{outline:!0,color:"primary",className:"ml-2",children:"Create server"})]}),b&&Object(a.jsx)(Dn,{type:"success"}),f&&Object(a.jsx)(Dn,{type:"error"})]})}},Vn=r(559),In=function(e){var t=e.servers,r=e.selectedServer,n=Object(Vn.a)(t);return Object(a.jsxs)(Ve.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(z.a,{nav:!0,caret:!0,children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(Q.a,{right:!0,children:Object(C.a)(n)?Object(a.jsxs)(W.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.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)(W.a,{tag:o.b,to:"/server/".concat(n),active:Object(v.a)(r)===n,children:t},n)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{tag:o.b,to:"/manage-servers",children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Manage servers"})]})]})})]})},Fn=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)(rr.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(nr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(cr.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)(ar.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"})]})]})},An=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(K.e)(),o=Object(L.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)(I.a,{fixedWidth:!0,icon:V.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})]})}},Mn=r(151),Gn=function(e){return Object(Mn.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)(Un.a,{children:Object(a.jsxs)(En,{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)($r.a,{outline:!0,className:"mr-2",onClick:n,children:"Cancel"}),Object(a.jsx)($r.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},Pn=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(M.useRef)(),O=function(){var e=Object(g.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(F.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)($r.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)(I.a,{icon:V.r,fixedWidth:!0})," ",null!==c&&void 0!==c?c:"Import from file"]}),Object(a.jsxs)(Qt.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})]})}},Bn=r(542),Hn=r(70),Wn="shlink/selectedServer/SELECT_SERVER",qn="shlink/selectedServer/RESET_SELECTED_SERVER",zn=Object(F.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Hn.c)("1.0.0")),Qn=Object(Bn.a)(sr.a,function(){var e=Object(g.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:zn(t),printableVersion:Object(Hn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Kn=ut((Je={},Object(u.a)(Je,qn,(function(){return null})),Object(u.a)(Je,Wn,(function(e,t){return t.selectedServer})),Je),null),Jn=dt(qn),Zn=function(e,t){return function(r){return function(){var n=Object(g.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(Jn()),s=a(),i=s.servers,o=i[r]){n.next=6;break}return c({type:Wn,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 6:return n.prev=6,l=e(o),u=l.health,n.next=10,Qn(r,u);case 10:j=n.sent,b=j.version,h=j.printableVersion,c({type:Wn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{version:b,printableVersion:h})}),c(t()),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(6),c({type:Wn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{serverNotReachable:!0})});case 20:case"end":return n.stop()}}),n,null,[[6,17]])})));return function(e,t){return n.apply(this,arguments)}}()}},Yn=r(586),Xn=r(152),$n=r(314),ec="shlink/servers/EDIT_SERVER",tc="shlink/servers/DELETE_SERVER",rc="shlink/servers/CREATE_SERVERS",nc="shlink/servers/SET_AUTO_CONNECT",cc=ut((Ze={},Object(u.a)(Ze,rc,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ze,tc,(function(e,t){var r=t.serverId;return Object(lt.a)(r,e)})),Object(u.a)(Ze,ec,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(gr.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Object(u.a)(Ze,nc,(function(e,t){var r=t.serverId,n=t.autoConnect;return e[r]?n?Object(Yn.a)(Object(Ie.a)(e).map((function(e){var t=Object(L.a)(e,2),n=t[0],c=t[1];return[n,Object(d.a)(Object(d.a)({},c),{},{autoConnect:n===r})]}))):Object(gr.a)(r,Object(d.a)(Object(d.a)({},e[r]),{},{autoConnect:n}),e):e})),Ze),{}),ac=Object(Xn.a)((function(e,t){return Object(gr.a)(t.id,t,e)}),{}),sc=Object(F.a)(Object($n.a)((function(e){return e.id?e:Object(gr.a)("id",Object(sn.a)(),e)})),ac,(function(e){return{type:rc,newServers:e}})),ic=function(e){return sc([e])},oc=function(e,t){return{type:ec,serverId:e,serverData:t}},lc=function(e){var t=e.id;return{type:tc,serverId:t}},uc=function(e,t){var r=e.id;return{type:nc,serverId:r,autoConnect:t}},dc=Object(F.a)(Object(O.a)("data"),(function(e){return Array.isArray(e)?e.filter(v.b):[]})),jc=function(e){var t=e.get;return function(){return function(){var e=Object(g.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=dc(n),r(sc(c));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},bc=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(Hn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},hc=r(165),Oc=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(Un.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(mn.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)(hc.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"}),"."]})})]})})}},vc=r(102),fc=r(587),mc=r(588),gc=r(543),xc=r(544),pc=function(e,t,r){return Pe((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,g=h.loading,x=h.visitsCount,p=h.orphanVisitsCount,y=Object(v.a)(d),S=Object(b.g)();return Object(M.useEffect)((function(){i({itemsPerPage:5,orderBy:{field:"dateCreated",dir:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(or.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Le.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(mc.a,{tag:"h2",children:g?"Loading...":Rt(x)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Le.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/orphan-visits"),children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(mc.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:g?"Loading...":Rt(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)(Le.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/list-short-urls/1"),children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(mc.a,{tag:"h2",children:O?"Loading...":Rt(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)(Le.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/manage-tags"),children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(mc.a,{tag:"h2",children:m?"Loading...":Rt(u.tags.length)})]})})]}),Object(a.jsxs)(Le.a,{className:"mb-3",children:[Object(a.jsxs)(gc.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)(xc.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(Le.a,{children:[Object(a.jsxs)(gc.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)(xc.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[Be.visits,Be.orphanVisits]}))},yc=function(e,t,r,n){return function(c){var s=c.servers,i=Object.values(s),l=Object(M.useState)(i),u=Object(L.a)(l,2),d=u[0],j=u[1],b=d.some((function(e){return!!e.autoConnect})),h=r(!1,4e3),O=Object(L.a)(h,2),v=O[0],f=O[1];return Object(M.useEffect)((function(){j(Object.values(s))}),[s]),Object(a.jsxs)(Un.a,{children:[Object(a.jsx)(B,{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)(or.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)($r.a,{outline:!0,className:"ml-2 flex-fill",onClick:Object(g.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)(I.a,{icon:V.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)($r.a,{outline:!0,color:"primary",className:"flex-fill",tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.E,fixedWidth:!0})," Add a server"]})})]}),Object(a.jsx)(lr.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)(ur,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})}},Sc=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)(I.a,{icon:V.h,className:"text-primary",id:"autoConnectIcon"}),Object(a.jsx)(Qt.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})})]})}},Cc=function(e){return function(t){var r=t.server,n=t.setAutoConnect,c=Object(K.e)(),s=Object(L.a)(c,2),i=s[0],l=s[1],u=Object(K.e)(),d=Object(L.a)(u,4),j=d[0],b=d[2],h=d[3],O="/server/".concat(r.id),v=r.autoConnect,f=v?V.b:Ne.b;return Object(a.jsxs)($t,{isOpen:i,toggle:l,children:[Object(a.jsxs)(W.a,{tag:o.b,to:O,children:[Object(a.jsx)(I.a,{icon:V.D,fixedWidth:!0})," Connect"]}),Object(a.jsxs)(W.a,{tag:o.b,to:"".concat(O,"/edit"),children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit server"]}),Object(a.jsxs)(W.a,{onClick:function(){return n(r,!r.autoConnect)},children:[Object(a.jsx)(I.a,{icon:f,fixedWidth:!0})," ",v?"Do not a":"A","uto-connect"]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"dropdown-item--danger",onClick:b,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Remove server"]}),Object(a.jsx)(e,{redirectHome:!1,server:r,isOpen:j,toggle:h})]})}},Nc=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},kc=function(e){return Array.isArray(e)&&e.every(Nc)},wc=function e(t,r){var n=this;Object(x.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(g.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(!kc(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)}}()},_c=r(103),Uc=function e(t,r,n){var c=this;Object(x.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(g.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(Vn.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(v.f);try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(_c.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},Tc=function(e,t,r){e.serviceFactory("ManageServers",yc,"ServersExporter","ImportServersBtn","useStateFlagTimeout","ManageServersRow"),e.decorator("ManageServers",t(["servers"])),e.serviceFactory("ManageServersRow",Sc,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Cc,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Ln,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",vc.a),e.decorator("CreateServer",t(["selectedServer","servers"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",Gn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",(function(){return In})),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return Fn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",An,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Pn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return bc})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",Oc,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",pc,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",_n.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",wc,"csvjson","fileReaderFactory"),e.service("ServersExporter",Uc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Zn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return ic})),e.serviceFactory("createServers",(function(){return sc})),e.serviceFactory("deleteServer",(function(){return lc})),e.serviceFactory("editServer",(function(){return oc})),e.serviceFactory("setAutoConnect",(function(){return uc})),e.serviceFactory("fetchServers",jc,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Jn}))},Rc=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)(Le.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)($r.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(I.a,{icon:V.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)(Zt,{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})]})})},Ec=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)(Gt.a,{href:u})]});return Object(a.jsxs)(Rc,{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)(zt,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(Qt.a,{placement:"bottom",target:"created",children:Object(a.jsx)(zt,{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)(Gt.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},Dc=r(604),Lc=r(556),Vc=r(605),Ic=r(554),Fc=r(112),Ac=r(593),Mc=r(594),Gc=r(596),Pc=r(590),Bc=r(293),Hc=r(591),Wc=r(315),qc=r(92),zc=r(592),Qc=r(595),Kc=r(292),Jc=r.n(Kc),Zc=r(589),Yc="Others",Xc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],$c=function(e){var t,r;return Object(ir.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"},ea=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(Zc.a)(t,t.map((function(){return 0})))),e))},ta=function(e){return Object(a.jsx)(on,Object(d.a)({type:"switch"},e))},ra=function(e,t){var r=e.native,n=Object(L.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},na=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(Rt(r))},ca=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(Rt(r))},aa=r(46),sa={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},ia={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},oa={hourly:Pc.a,daily:Bc.a,weekly:Hc.a,monthly:Wc.a},la={hourly:function(e){return Object(re.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(re.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(re.default)(Object(qc.a)(e),"yyyy-MM-dd"),r=Object(re.default)(Object(zc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(re.default)(e,"yyyy-MM")}},ua=function(e,t){return Object(Mc.a)((function(t){return la[e](Object(A.default)(t.date))}),t)},da=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=oa[e],n=la[e],c=Object(A.default)(t[0].date),a=Object(A.default)(t[t.length-1].date),s=r(c,a),i=ia[e];return[n(a)].concat(Object(De.a)(Object(ir.e)(s,(function(e){return n(Object(Qc.a)(a,i(e)))}))))}(r,e);return[c,ea(t,c)]},ja=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},ba=null,ha=function(e,t,r){return function(n){var c=Object(L.a)(n,1)[0];if(r&&c){var a,s=c.index;if(ba===e[s])r([]),ba=null;else r(e[s]&&t[e[s]]||[]),ba=null!==(a=e[s])&&void 0!==a?a:null}}},Oa=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(M.useState)(r.length>0?function(e){var t,r=new Date,n=Object(A.default)(e);return null!==(t=Object(ee.a)([[function(){return Object(Bc.a)(r,n)<=2},Object(Ac.a)("hourly")],[function(){return Object(Wc.a)(r,n)<=1},Object(Ac.a)("daily")],[function(){return Object(Wc.a)(r,n)<=6},Object(Ac.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(L.a)(o,2),u=l[0],d=l[1],j=Object(K.e)(!0),b=Object(L.a)(j,2),h=b[0],O=b[1],v=Object(M.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=la[e](Object(A.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(M.useMemo)((function(){return ua(u,Object(Gc.a)(r))}),[u,r]),m=Object(M.useMemo)((function(){return da(r,f,u,h)}),[r,u,h]),g=Object(L.a)(m,2),x=g[0],p=g[1],y=Object(M.useMemo)((function(){return ea(ua(u,Object(Gc.a)(n)),x)}),[n,u,x]),S=function(){var e=ja(p,"Visits",aa.c);return 0===n.length?[e]:[e,ja(y,s,aa.a)]},C={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:na}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:Rt}},x:{title:{display:!0,text:sa[u]}}},onHover:ra},N=function(){return Object(a.jsx)(Fc.c,{data:{labels:x,datasets:S()},options:C,getElementAtEvent:ha(x,v,i)})};return Object(a.jsxs)(Le.a,{children:[Object(a.jsxs)(gc.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(Ve.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(Q.a,{right:!0,children:Object.entries(sa).map((function(e){var t=Object(L.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(W.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)(ta,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(xc.a,{className:"line-chart-card__body",children:[n.length>0&&N(),0===n.length&&N()]})]})},va=r(597),fa=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!Lt(e)&&n(e)}};return Object(a.jsxs)(Nt.a,{listClassName:P()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(St.a,{disabled:r<=1,children:Object(a.jsx)(Ct.a,{previous:!0,tag:"span",onClick:i(r-1)})}),Dt(r,t).map((function(e,t){return Object(a.jsx)(St.a,{disabled:Lt(e),active:r===e,children:Object(a.jsx)(Ct.a,{tag:"span",onClick:i(e),children:Vt(e)})},It(e,t))})),Object(a.jsx)(St.a,{disabled:r>=t,children:Object(a.jsx)(Ct.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},ma=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(p.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)}))},ga=function(e,t,r){var n=function(e,t){return Ae(t,e)}(r,t?ma(t,e):Object(De.a)(e)),c=n.length;return{visitsGroups:Object(va.a)(20,n),total:c}},xa=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(M.useState)(h()),v=Object(L.a)(O,2),f=v[0],m=v[1],g=Object(M.useState)(void 0),x=Object(L.a)(g,2),p=x[0],y=x[1],S=Object(M.useState)({}),C=Object(L.a)(S,2),N=C[0],k=C[1],w=Object(M.useMemo)((function(){return ga(n,p,N)}),[p,N]),_=Object(M.useRef)(!0),U=Object(M.useState)(1),T=Object(L.a)(U,2),R=T[0],E=T[1],D=20*R,F=D-20,A=Object(Gr.a)(o),G=7+Number(A)+Number(j),H=function(e){return function(){return k({field:e,dir:Fe(e,N.field,N.dir)})}},W=function(e){return Object(a.jsx)(He,{currentOrder:N,field:e,className:"visits-table__header-icon"})};return Object(M.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(M.useEffect)((function(){E(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})})}),A&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(I.a,{icon:V.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:G,className:"p-0",children:Object(a.jsx)(B,{noBorder:!0,large:!1,onChange:y})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=w.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,className:"text-center",children:"No visits found with current filtering"})}),null===(r=w.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:P()({"table-active":r}),onClick:function(){return i(r?s.filter((function(t){return t!==e})):[].concat(Object(De.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(I.a,{icon:V.h,className:"text-primary"})}),A&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.G,id:"botIcon".concat(t)}),Object(a.jsx)(Qt.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(zt,{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)}))]}),w.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,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)(fa,{pagesCount:Math.ceil(w.total/20),currentPage:R,setCurrentPage:E,centered:f})}),Object(a.jsx)("div",{className:P()("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:Rt(F+1)})," to"," ",Object(a.jsx)("b",{children:Rt(Object(_t.a)(D,w.total))})," of"," ",Object(a.jsx)("b",{children:Rt(w.total)})]})})]})})})})]})},pa=r(617),ya=r(598),Sa=r(599),Ca=r(600),Na=function(){return Object(a.jsx)(pa.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ka=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(L.a)(e,1)[0].latLong}},wa=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(rr.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(cr.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)(ya.a,Object(d.a)(Object(d.a)({},ka(s)),{},{children:[Object(a.jsx)(Na,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Sa.a,{position:n,children:Object(a.jsxs)(Ca.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},_a=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(K.e)(),i=Object(L.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(K.e)(),j=Object(L.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(M.useState)([]),f=Object(L.a)(v,2),m=f[0],g=f[1],x=Object(M.useRef)(),p=function(e){return function(){g(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:x,onClick:function(){if(!r)return g(c),void l();O()},children:Object(a.jsx)(I.a,{icon:V.x})}),Object(a.jsx)(Qt.a,{placement:"left",target:function(){return x.current},children:"Show in map"}),Object(a.jsx)(q.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(Q.a,{right:!0,children:[Object(a.jsx)(W.a,{onClick:p(!1),children:"Show all locations"}),Object(a.jsx)(W.a,{onClick:p(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(wa,{toggle:u,isOpen:o,title:t,locations:m})]})},Ua=r(601),Ta=function(e){return e.hasOwnProperty("visitedUrl")},Ra=Object(F.a)(Object(Ua.a)((function(e){return Ta(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),Ea=function(e,t){return Object(Mc.a)(Object(O.a)(t),e)},Da=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)&&le(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)&&le(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}},La=function(e,t){return!Object(S.a)(e)&&Object(ir.c)(e[t])},Va=function(e){return"number"===typeof e?e:e?parseFloat(e):0},Ia=function(e){return function(t,r){var n=La(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Fa=Ia("country"),Aa=Ia("city"),Ma=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),Fa(e.countries,t),Aa(e.cities,t),function(e,t){if(La(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[Va(n),Va(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:{}})},Ga=Object($n.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(ir.c)(e))return{browser:Yc,os:Yc};var t=Jc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:Yc,browser:r&&Xc.includes(r)?r:Yc}}(t)),{},{referer:$c(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 Ta(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Pa=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)(J,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Bots:"}),Object(a.jsx)(W.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)(W.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!Object(ir.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},Ba=r(61),Ha=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(L.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)}))})},Wa=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(aa.h)()?aa.e:aa.f,borderWidth:2}]},qa=Object(M.memo)((function(e){var t=e.stats,r=Object(M.useState)(),n=Object(L.a)(r,2),c=n[0],s=n[1],i=Object(Ba.a)(t),o=Object(Vn.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:ca}}}},u=function(e,t){return{labels:e,datasets:Wa(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)(Fc.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)(Ha,{chart:c})})]})})),za=r(602),Qa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(Le.a,{children:[Object(a.jsx)(gc.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(xc.a,{children:n}),r&&Object(a.jsx)(za.a,{className:"chart-card__footer--sticky",children:r})]})},Ka=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(Qa,{title:t,children:Object(a.jsx)(qa,{stats:r})})},Ja=r(126),Za=r(610),Ya=r(603),Xa=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(Ve.a,{children:[Object(a.jsx)(z.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)(W.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},$a=function(e){return e.startsWith("hidden")?"":e},es=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:aa.d,borderColor:aa.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:aa.b,borderColor:aa.a,borderWidth:2}]},ts=function(e,t){return function(r){var n=Object(L.a)(r,1)[0];t&&n&&t(e[n.index])}},rs=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ba.a)(t).map($a),o=Object(Vn.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ba.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=ea(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:na}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:Rt}},y:{stacked:!0}},onHover:ra,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:es(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)(Fc.a,{data:j,options:u,height:b,getElementAtEvent:ts(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")]})},ns=function(e){return"String"===Object(Ja.a)(e)?Object(Za.a)(e):e},cs=function(e){return Object(L.a)(e,1)[0]},as=function(e){return Object(L.a)(e,2)[1]},ss=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(p.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(M.useState)({}),j=Object(L.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(1),v=Object(L.a)(O,2),f=v[0],m=v[1],g=Object(M.useState)(50),x=Object(L.a)(g,2),y=x[0],S=x[1],C=function(e){var t=e[f-1];if(f0?r:void 0,c),k=N.currentPageStats,w=N.currentPageHighlightedStats,_=N.pagination,U=N.max,T=Object.keys(k);return Object(a.jsx)(Qa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Me,{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)(Xa,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:y,setValue:function(e){S(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(_?T:void 0)})]})},footer:_,children:Object(a.jsx)(rs,Object(d.a)({stats:k,highlightedStats:w,max:U},l))})},is={byTime:{title:"By time",subPath:"",icon:V.d},byContext:{title:"By context",subPath:"/by-context",icon:V.g},byLocation:{title:"By location",subPath:"/by-location",icon:V.x},list:{title:"List",subPath:"/list",icon:V.w}},os=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(Lc.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)(I.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},ls=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=c.visits,m=c.loading,g=c.loadingLarge,x=c.error,p=c.errorData,y=c.progress,S=c.fallbackInterval,N=Object(M.useState)(null!==(t=null!==S&&void 0!==S?S:null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days"),k=Object(L.a)(N,2),w=k[0],_=k[1],U=Object(M.useState)(pe(w)),T=Object(L.a)(U,2),R=T[0],E=T[1],D=Object(M.useState)([]),F=Object(L.a)(D,2),A=F[0],G=F[1],B=Object(M.useState)(),H=Object(L.a)(B,2),W=H[0],q=H[1],z=Object(M.useState)({}),Q=Object(L.a)(z,2),K=Q[0],J=Q[1],Z=Object(Gr.a)(h),Y=Object(M.useRef)(!0),X=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},$=Object(M.useMemo)((function(){return Ga(f)}),[f]),ee=Object(M.useMemo)((function(){return Ma($)}),[$]),te=ee.os,re=ee.browsers,ne=ee.referrers,ce=ee.countries,ae=ee.cities,se=ee.citiesForMap,ie=ee.visitedUrls,oe=Object(Vn.a)(se),le=function(e){Ye=void 0,G(e)},ue=function(e){return function(t){var r="".concat(e,"_").concat(t);Ye===r?(G([]),q(void 0),Ye=void 0):(G($.filter(Object(Dc.a)(e,t))),q(t),Ye=r)}};Object(M.useEffect)((function(){return i}),[]),Object(M.useEffect)((function(){s({dateRange:R,filter:K},Y.current),Y.current=!1}),[R,K]),Object(M.useEffect)((function(){S&&_(S)}),[S]);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)(Ue,{updatable:!0,disabled:m,initialDateRange:w,defaultText:"All visits",onDatesChange:E})}),Object(a.jsx)(Pa,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:Z,selected:K,onChange:J})]})}),f.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)($r.a,{outline:!0,disabled:0===A.length,className:"btn-md-block mr-2",onClick:function(){return le([])},children:["Clear selection ",A.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",Rt(A.length),")"]})]}),Object(a.jsxs)($r.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j($)},children:[Object(a.jsx)(I.a,{icon:V.q})," Export (",Rt($.length),")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:g?Object(a.jsxs)(mn.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(Vc.a,{value:y,striped:100===y,className:"mt-3"})]}):m?Object(a.jsx)(mn.a,{loading:!0}):x?Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{errorData:p,fallbackMessage:"An error occurred while loading visits :("})}):Object(C.a)(f)?Object(a.jsx)(mn.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Le.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(Ic.a,{pills:!0,fill:!0,children:Object.entries(is).map((function(e){var t=Object(L.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(os,Object(d.a)(Object(d.a)({},n),{},{to:X(n.subPath)}),r)}))})}),Object(a.jsx)(or.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)(Oa,{title:"Visits during time",visits:$,highlightedVisits:A,highlightedLabel:W,setSelectedVisits:le})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(is.byContext.subPath),children:[Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ka,{title:"Operating systems",stats:te})}),Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ka,{title:"Browsers",stats:re})}),Object(a.jsx)("div",{className:P()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(ss,{title:"Referrers",stats:ne,withPagination:!1,highlightedStats:Ea(A,"referer"),highlightedLabel:W,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ue("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(ss,{title:"Visited URLs",stats:ie,highlightedLabel:W,highlightedStats:Ea(A,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ue("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(is.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(ss,{title:"Countries",stats:ce,highlightedStats:Ea(A,"country"),highlightedLabel:W,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ue("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(ss,{title:"Cities",stats:ae,highlightedStats:Ea(A,"city"),highlightedLabel:W,extraHeaderContent:function(e){return oe.length>0&&Object(a.jsx)(_a,{modalTitle:"Cities",locations:oe,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ue("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(is.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(xa,{visits:$,selectedVisits:A,setSelectedVisits:le,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},us=function(e){var t=e.exportVisits;return Pe((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(N.a)(i).domain;return Object(M.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(ls,{getVisits:function(e,t){return u(v,Object(d.a)(Object(d.a)({},Da(e)),{},{domain:f}),t)},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)(Ec,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[Be.shortUrlVisits(t.params.shortCode)]}))},ds=r(615),js=5e3,bs=function(e){return e.currentPage>=e.pagesCount},hs=function(e,t){return 100*t/e},Os=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n,c,a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a({type:c.start}),i=function(){var e=Object(g.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(g.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,js).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(ds.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(g.a)(m.a.mark((function e(t){var r,n,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,!s()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,i(t[r]);case 5:if(n=e.sent,a({type:c.progress,progress:hs(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,js);case 3:if(n=e.sent,s=n.pagination,i=n.data,s&&!bs(s)){e.next=8;break}return e.abrupt("return",i);case 8:return l=Object(kt.a)(2,s.pagesCount+1),u=Object(va.a)(4,l),s.pagesCount-1>4&&a({type:c.large}),e.t0=i,e.next=14,o(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,Promise.all([l(),r()]);case 7:u=e.sent,j=Object(L.a)(u,2),b=j[0],h=j[1],a(!b.length&&h?{type:c.fallbackToInterval,fallbackInterval:ye(h.date)}:Object(d.a)(Object(d.a)({},n),{},{visits:b,type:c.finish})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),a({type:c.error,errorData:dr(e.t0)});case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t,r,n,c,a,s){return e.apply(this,arguments)}}(),vs=function(e,t){return e?Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t({page:1,itemsPerPage:1}).then((function(e){return e.data[0]})));case 1:case"end":return e.stop()}}),e)}))):Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(void 0));case 1:case"end":return e.stop()}}),e)})))},fs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",ms="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",gs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",xs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",ps="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",ys="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",Ss="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL",Cs={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ns=ut((Xe={},Object(u.a)(Xe,fs,(function(){return Object(d.a)(Object(d.a)({},Cs),{},{loading:!0})})),Object(u.a)(Xe,ms,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Cs),{},{error:!0,errorData:r})})),Object(u.a)(Xe,gs,(function(e,t){var r=t.visits,n=t.query,c=t.shortCode,a=t.domain;return Object(d.a)(Object(d.a)({},e),{},{visits:r,shortCode:c,domain:a,query:n,loading:!1,error:!1})})),Object(u.a)(Xe,xs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Xe,ps,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Xe,ys,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Xe,Ss,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(Xe,yr,(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&&pr(t,n,c)&&je(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(De.a)(u),Object(De.a)(a))})})),Xe),Cs),ks=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getShortUrlVisits,l=function(){var e=Object(g.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",o(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)}}(),u=vs(n,function(){var e=Object(g.a)(m.a.mark((function e(n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o(t,Object(d.a)(Object(d.a)({},n),{},{domain:r.domain})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().shortUrlVisits.cancelLoad},b={shortCode:t,query:r,domain:r.domain},h={start:fs,large:xs,finish:gs,error:ms,progress:ys,fallbackToInterval:Ss},c.abrupt("return",Os(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},ws=dt(ps),_s=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)(H,{text:s,colorGenerator:n})]});return Object(a.jsx)(Rc,{title:i,goBack:r,visits:c})},Us=function(e,t){var r=t.exportVisits;return Pe((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)(ls,{getVisits:function(e,t){return o(b,Da(e),t)},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)(_s,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[Be.visits]}))},Ts="shlink/tagVisits/GET_TAG_VISITS_START",Rs="shlink/tagVisits/GET_TAG_VISITS_ERROR",Es="shlink/tagVisits/GET_TAG_VISITS",Ds="shlink/tagVisits/GET_TAG_VISITS_LARGE",Ls="shlink/tagVisits/GET_TAG_VISITS_CANCEL",Vs="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",Is="shlink/tagVisits/GET_TAG_VISITS_FALLBACK_TO_INTERVAL",Fs={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},As=ut(($e={},Object(u.a)($e,Ts,(function(){return Object(d.a)(Object(d.a)({},Fs),{},{loading:!0})})),Object(u.a)($e,Rs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Fs),{},{error:!0,errorData:r})})),Object(u.a)($e,Es,(function(e,t){var r=t.visits,n=t.tag,c=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,tag:n,query:c,loading:!1,error:!1})})),Object(u.a)($e,Ds,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)($e,Ls,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)($e,Vs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)($e,Is,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)($e,yr,(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))&&je(r.date,i,o)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(l),Object(De.a)(c))})})),$e),Fs),Ms=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getTagVisits,l=function(){var e=Object(g.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",o(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)}}(),u=vs(n,function(){var e=Object(g.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",o(t,r));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().tagVisits.cancelLoad},b={tag:t,query:r},h={start:Ts,large:Ds,finish:Es,error:Rs,progress:Vs,fallbackToInterval:Is},c.abrupt("return",Os(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},Gs=dt(Ls),Ps=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(Rc,{title:"Orphan visits",goBack:r,visits:n})},Bs=function(e){var t=e.exportVisits;return Pe((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)(ls,{getVisits:function(e,t){var r;return c(Da(e),null===(r=e.filter)||void 0===r?void 0:r.orphanVisitsType,t)},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)(Ps,{orphanVisits:s,goBack:r})})}),(function(){return[Be.orphanVisits]}))},Hs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",Ws="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",qs="shlink/orphanVisits/GET_ORPHAN_VISITS",zs="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",Qs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",Ks="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",Js="shlink/orphanVisits/GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL",Zs={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ys=ut((et={},Object(u.a)(et,Hs,(function(){return Object(d.a)(Object(d.a)({},Zs),{},{loading:!0})})),Object(u.a)(et,Ws,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Zs),{},{error:!0,errorData:r})})),Object(u.a)(et,qs,(function(e,t){var r=t.visits,n=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,query:n,loading:!1,error:!1})})),Object(u.a)(et,zs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(et,Qs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(et,Ks,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(et,Js,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(et,yr,(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 je(t.date,s,i)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(o),Object(De.a)(n))})})),et),Zs),Xs=function(e,t){return!t||t===e.type},$s=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getOrphanVisits,l=function(){var e=Object(g.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",o(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return Ta(e)&&Xs(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)}}(),u=vs(n,o),j=function(){return s().orphanVisits.cancelLoad},b={query:t},h={start:Hs,large:zs,finish:qs,error:Ws,progress:Ks,fallbackToInterval:Js},c.abrupt("return",Os(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},ei=dt(Qs),ti="shlink/visitsOverview/GET_OVERVIEW_START",ri="shlink/visitsOverview/GET_OVERVIEW_ERROR",ni="shlink/visitsOverview/GET_OVERVIEW",ci={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},ai=ut((tt={},Object(u.a)(tt,ti,(function(){return Object(d.a)(Object(d.a)({},ci),{},{loading:!0})})),Object(u.a)(tt,ri,(function(){return Object(d.a)(Object(d.a)({},ci),{},{error:!0})})),Object(u.a)(tt,ni,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},ci),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(tt,yr,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(p.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=Ra(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),tt),ci),si=function(e){return function(){return function(){var t=Object(g.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:ti}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:ni},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:ri});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},ii=function e(t,r){var n=this;Object(x.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(_c.a)(n.window,r,e)}}},oi=function(e,t){e.serviceFactory("MapModal",(function(){return wa})),e.serviceFactory("ShortUrlVisits",us,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",Us,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Bs,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",ii,"window","csvjson"),e.serviceFactory("getShortUrlVisits",ks,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return ws})),e.serviceFactory("getTagVisits",Ms,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return Gs})),e.serviceFactory("getOrphanVisits",$s,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return ei})),e.serviceFactory("createNewVisits",(function(){return Sr})),e.serviceFactory("loadVisitsOverview",si,"buildShlinkApiClient")},li=r(294),ui=r.n(li),di=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},ji=function(e){return{id:e,name:e}},bi=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(M.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)(ui.a,{tags:c.map(ji),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(H,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map(ji),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(di,{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(De.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(De.a)(new Set([].concat(Object(De.a)(c),Object(De.a)(t.toLowerCase().split(","))))))}})}},hi=r(553),Oi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=n.displayed,l=n.toggle,u=Object(K.e)(),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(L.a)(h,2),f=O[0],m=O[1],g=Object(K.e)(),x=Object(L.a)(g,3),p=x[0],y=x[2],S=Object(M.useRef)(),C=Object(v.a)(s);return Object(M.useEffect)((function(){var e;(e=S.current)&&e.scrollWidth>e.clientWidth&&y()}),[S.current]),Object(a.jsxs)(Le.a,{className:"tag-card",children:[Object(a.jsxs)(gc.a,{className:"tag-card__header",children:[Object(a.jsx)($r.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:b,children:Object(a.jsx)(I.a,{icon:V.Q})}),Object(a.jsx)($r.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:m,children:Object(a.jsx)(I.a,{icon:V.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)(di,{tag:c.tag,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:l,children:c.tag})]})]}),Object(a.jsx)(hi.a,{isOpen:i,children:Object(a.jsxs)(xc.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)(I.a,{icon:V.v,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:Rt(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)(I.a,{icon:V.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:Rt(c.visits)})]})]})}),Object(a.jsx)(e,{tag:c.tag,toggle:b,isOpen:j}),Object(a.jsx)(t,{tag:c.tag,toggle:m,isOpen:f})]})}},vi=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(g.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)(rr.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(nr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(cr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(ur,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(br,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(ar.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"})]})]})},fi=r(606),mi=r(306),gi=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(M.useState)(r),u=Object(L.a)(l,2),d=u[0],j=u[1],b=Object(M.useState)(t(r)),h=Object(L.a)(b,2),O=h[0],v=h[1],f=Object(K.e)(),x=Object(L.a)(f,4),p=x[0],y=x[1],S=x[3],C=o.editing,N=o.error,k=o.errorData,w=Object(ir.b)(Object(g.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)(rr.a,{isOpen:i,toggle:c,centered:!0,onClosed:S,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsx)(nr.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(cr.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)(I.a,{icon:V.A,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(fi.a,{isOpen:p,toggle:y,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(mi.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(nn.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),N&&Object(a.jsx)(ur,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(br,{errorData:k,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(ar.a,{children:[Object(a.jsx)($r.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)($r.a,{color:"primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},xi={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},pi=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(J,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(W.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(I.a,{icon:V.O,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(W.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(I.a,{icon:V.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},yi=function(e,t){return Pe((function(r){var n,c,s,i,o=r.filterTags,l=r.forceListTags,u=r.tagsList,d=r.selectedServer,j=r.settings,b=Object(M.useState)(null!==(n=null===(c=j.tags)||void 0===c?void 0:c.defaultMode)&&void 0!==n?n:"cards"),h=Object(L.a)(b,2),O=h[0],v=h[1],f=Object(M.useState)(null!==(s=null===(i=j.tags)||void 0===i?void 0:i.defaultOrdering)&&void 0!==s?s:{}),m=Object(L.a)(f,2),g=m[0],x=m[1],p=Object(F.a)((function(){return u.filteredTags.map((function(e){var t,r,n,c;return{tag:e,shortUrls:null!==(t=null===(r=u.stats[e])||void 0===r?void 0:r.shortUrlsCount)&&void 0!==t?t:0,visits:null!==(n=null===(c=u.stats[e])||void 0===c?void 0:c.visitsCount)&&void 0!==n?n:0}}))}),(function(e){return Ae(e,g)}));if(Object(M.useEffect)((function(){l()}),[]),u.loading)return Object(a.jsx)(mn.a,{loading:!0});if(u.error)return Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{errorData:u.errorData,fallbackMessage:"Error loading tags :("})});var y=function(e){return function(){var t=Fe(e,g.field,g.dir);x({field:t?e:void 0,dir:t})}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:o}),Object(a.jsxs)(or.a,{className:"mb-3",children:[Object(a.jsx)("div",{className:"col-lg-6",children:Object(a.jsx)(pi,{mode:O,onChange:v})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3 mt-lg-0",children:Object(a.jsx)(Me,{items:xi,order:g,onChange:function(e,t){return x({field:e,dir:t})}})})]}),function(){if(u.filteredTags.length<1)return Object(a.jsx)(mn.a,{children:"No tags found"});var r=p();return"cards"===O?Object(a.jsx)(e,{sortedTags:r,selectedServer:d}):Object(a.jsx)(t,{sortedTags:r,selectedServer:d,currentOrder:g,orderByColumn:y})}()]})}),(function(){return[Be.visits]}))},Si="shlink/deleteTag/DELETE_TAG_START",Ci="shlink/deleteTag/DELETE_TAG_ERROR",Ni="shlink/deleteTag/DELETE_TAG",ki="shlink/deleteTag/TAG_DELETED",wi=ut((rt={},Object(u.a)(rt,Si,(function(){return{deleting:!0,error:!1}})),Object(u.a)(rt,Ci,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(rt,Ni,(function(){return{deleting:!1,error:!1}})),rt),{deleting:!1,error:!1}),_i=function(e){return function(t){return function(){var r=Object(g.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:Si}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:Ni}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:Ci,errorData:dr(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},Ui=function(e){return{type:ki,tag:e}},Ti="shlink/editTag/EDIT_TAG_START",Ri="shlink/editTag/EDIT_TAG_ERROR",Ei="shlink/editTag/EDIT_TAG",Di="shlink/editTag/TAG_EDITED",Li=ut((nt={},Object(u.a)(nt,Ti,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(nt,Ri,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(nt,Ei,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),nt),{oldName:"",newName:"",editing:!1,error:!1}),Vi=function(e,t){return function(r,n,c){return function(){var a=Object(g.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:Ti}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:Ei,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:Ri,errorData:dr(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},Ii=function(e,t,r){return{type:Di,oldName:e,newName:t,color:r}},Fi="shlink/tagsList/LIST_TAGS_START",Ai="shlink/tagsList/LIST_TAGS_ERROR",Mi="shlink/tagsList/LIST_TAGS",Gi="shlink/tagsList/FILTER_TAGS",Pi={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Bi=function(e,t){return function(r){return r===e?t:r}},Hi=function(e,t){return Object(y.a)((function(e){return e===t}),e)},Wi=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}),{}))},qi=ut((ct={},Object(u.a)(ct,Fi,(function(){return Object(d.a)(Object(d.a)({},Pi),{},{loading:!0})})),Object(u.a)(ct,Ai,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Pi),{},{error:!0,errorData:r})})),Object(u.a)(ct,Mi,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},Pi),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(ct,ki,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:Hi(e.tags,r),filteredTags:Hi(e.filteredTags,r)})})),Object(u.a)(ct,Di,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(Bi(r,n)).sort(),filteredTags:e.filteredTags.map(Bi(r,n)).sort()})})),Object(u.a)(ct,Gi,(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)(ct,yr,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=Wi(c),n=e.stats,r.reduce((function(e,t){var r=Object(L.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)))})})),ct),Pi),zi=function(e){return{type:Gi,searchTerm:e}},Qi=Math.ceil,Ki=function(e){return function(t){var r=t.sortedTags,n=t.selectedServer,c=Object(M.useState)(),s=Object(L.a)(c,2),i=s[0],o=s[1],l=r.length,u=Object(va.a)(Qi(l/4),r);return Object(a.jsx)(or.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)}))})}},Ji=function(e){return function(t){var r,n=t.sortedTags,c=t.selectedServer,s=t.location,i=t.orderByColumn,o=t.currentOrder,l=Object(M.useRef)(!0),u=Object(N.a)(s.search).page,d=void 0===u?1:u,j=Object(K.b)("page",Number(d)),b=Object(L.a)(j,2),h=b[0],O=b[1],v=Object(va.a)(20,n),f=v.length>1,m=null!==(r=v[h-1])&&void 0!==r?r:[];return Object(M.useEffect)((function(){!l.current&&O(1),l.current=!1}),[n]),Object(M.useEffect)((function(){scrollTo(0,0)}),[h]),Object(a.jsxs)(lr.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)(He,{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)(He,{currentOrder:o,field:"shortUrls"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("visits"),children:["Visits ",Object(a.jsx)(He,{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)(fa,{pagesCount:v.length,currentPage:h,setCurrentPage:O})})]},h)}},Zi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=Object(K.e)(),l=Object(L.a)(i,2),u=l[0],d=l[1],j=Object(K.e)(),b=Object(L.a)(j,2),h=b[0],O=b[1],f=Object(K.e)(),m=Object(L.a)(f,2),g=m[0],x=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)(di,{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:Rt(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:Rt(c.visits)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)($t,{toggle:x,isOpen:g,children:[Object(a.jsxs)(W.a,{onClick:O,children:[Object(a.jsx)(I.a,{icon:V.C,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(W.a,{onClick:d,children:[Object(a.jsx)(I.a,{icon:V.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})]})}},Yi=function(e,t){e.serviceFactory("TagsSelector",bi,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",Oi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return vi})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",gi,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",Ki,"TagCard"),e.serviceFactory("TagsTableRow",Zi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Ji,"TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",yi,"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(g.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(C.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:Fi}),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:Mi}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:Ai,errorData:dr(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 zi})),e.serviceFactory("tagDeleted",(function(){return Ui})),e.serviceFactory("tagEdited",(function(){return Ii})),e.serviceFactory("deleteTag",_i,"buildShlinkApiClient"),e.serviceFactory("editTag",Vi,"buildShlinkApiClient","ColorGenerator")},Xi=r(299),$i="shlink/mercure/GET_MERCURE_INFO_START",eo="shlink/mercure/GET_MERCURE_INFO_ERROR",to="shlink/mercure/GET_MERCURE_INFO",ro=ut((at={},Object(u.a)(at,$i,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(at,eo,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(at,to,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),at),{loading:!0,error:!1}),no=function(e){return function(){return function(){var t=Object(g.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:$i}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:eo}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:to,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:eo});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},co=function(e){e.serviceFactory("loadMercureInfo",no,"buildShlinkApiClient")},ao=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(lr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Xr.a,{children:Object(a.jsxs)(ta,{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)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{className:P()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(nn.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."]})]})]})},so=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(or.a,{children:e.map((function(t,r){return Object(a.jsx)("div",{className:"col-lg-".concat(12/e.length," mb-3"),children:t},r)}))},t)}))})},io=function(e,t,r,n,c,s){return function(){return Object(a.jsx)(Un.a,{children:Object(a.jsx)(so,{items:[[Object(a.jsx)(n,{}),Object(a.jsx)(c,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(r,{})],[Object(a.jsx)(s,{}),Object(a.jsx)(e,{})]]})})}},oo=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},lo=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)(lr.a,{title:"Short URLs form",className:"h-100",children:[Object(a.jsx)(Xr.a,{children:Object(a.jsxs)(ta,{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)(Xr.a,{children:Object(a.jsxs)(ta,{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)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(J,{text:oo(l.tagFilteringMode),children:[Object(a.jsx)(W.a,{active:!l.tagFilteringMode||"startsWith"===l.tagFilteringMode,onClick:u("startsWith"),children:oo("startsWith")}),Object(a.jsx)(W.a,{active:"includes"===l.tagFilteringMode,onClick:u("includes"),children:oo("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."]}))})]})]})},uo=function(e){var t=e.settings.ui,r=e.setUiSettings;return Object(a.jsx)(lr.a,{title:"User interface",className:"h-100",children:Object(a.jsxs)(Xr.a,{children:[Object(a.jsx)(I.a,{icon:"dark"===(null===t||void 0===t?void 0:t.theme)?V.z:V.L,className:"user-interface__theme-icon"}),Object(a.jsx)(ta,{checked:"dark"===(null===t||void 0===t?void 0:t.theme),onChange:function(e){var n=e?"dark":"light";r(Object(d.a)(Object(d.a)({},t),{},{theme:n})),Object(aa.g)(n)},children:"Use dark theme."})]})})},jo=function(e){var t,r=e.onChange,n=e.active,c=e.allText;return Object(a.jsx)(J,{text:null!==(t=me(n))&&void 0!==t?t:c,children:Object(a.jsx)(_e,{allText:c,active:n,onChange:r})})},bo=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(lr.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(jo,{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})}})]})})},ho=function(e){var t,r,n,c=e.settings.tags,s=e.setTagsSettings;return Object(a.jsxs)(lr.a,{title:"Tags",className:"h-100",children:[Object(a.jsxs)(Xr.a,{children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(pi,{mode:null!==(t=null===c||void 0===c?void 0:c.defaultMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(ir.a)(e)},onChange:function(e){return s(Object(d.a)(Object(d.a)({},c),{},{defaultMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===c||void 0===c?void 0:c.defaultMode)&&void 0!==r?r:"cards"}),"."]})]}),Object(a.jsxs)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default ordering for tags list:"}),Object(a.jsx)(Me,{items:xi,order:null!==(n=null===c||void 0===c?void 0:c.defaultOrdering)&&void 0!==n?n:{},onChange:function(e,t){return s(Object(d.a)(Object(d.a)({},c),{},{defaultOrdering:{field:e,dir:t}}))}})]})]})},Oo=function(e){var t,r=e.settings.shortUrlsList,n=e.setShortUrlsListSettings;return Object(a.jsx)(lr.a,{title:"Short URLs list",className:"h-100",children:Object(a.jsxs)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default ordering for short URLs list:"}),Object(a.jsx)(Me,{items:At,order:null!==(t=null===r||void 0===r?void 0:r.defaultOrdering)&&void 0!==t?t:bt,onChange:function(e,t){return n({defaultOrdering:{field:e,dir:t}})}})]})})},vo=function(e,t){e.serviceFactory("Settings",io,"RealTimeUpdates","ShortUrlCreation","ShortUrlsListSettings","UserInterface","Visits","Tags"),e.decorator("Settings",vc.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return ao})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return lo})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return uo})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return bo})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("Tags",(function(){return ho})),e.decorator("Tags",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",(function(){return Oo})),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return vt})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return ft})),e.serviceFactory("setShortUrlCreationSettings",(function(){return mt})),e.serviceFactory("setShortUrlsListSettings",(function(){return gt})),e.serviceFactory("setUiSettings",(function(){return xt})),e.serviceFactory("setVisitsSettings",(function(){return pt})),e.serviceFactory("setTagsSettings",(function(){return yt}))},fo="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",mo=function(e){return function(t,r){return function(){var n=Object(g.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:fo,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:dr(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},go="shlink/domainsList/LIST_DOMAINS_START",xo="shlink/domainsList/LIST_DOMAINS_ERROR",po="shlink/domainsList/LIST_DOMAINS",yo="shlink/domainsList/FILTER_DOMAINS",So={domains:[],filteredDomains:[],loading:!1,error:!1},Co=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},No=ut((st={},Object(u.a)(st,go,(function(){return Object(d.a)(Object(d.a)({},So),{},{loading:!0})})),Object(u.a)(st,xo,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},So),{},{error:!0,errorData:t})})),Object(u.a)(st,po,(function(e,t){var r=t.domains,n=t.defaultRedirects;return Object(d.a)(Object(d.a)({},So),{},{domains:r,filteredDomains:r,defaultRedirects:n})})),Object(u.a)(st,yo,(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)(st,fo,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(Co(r,n)),filteredDomains:e.filteredDomains.map(Co(r,n))})})),st),So),ko=function(e){return function(){return function(){var t=Object(g.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:return r({type:go}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,i=s.data,o=s.defaultRedirects,r({type:po,domains:i,defaultRedirects:o}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(2),r({type:xo,errorData:dr(t.t0)});case 14:case"end":return t.stop()}}),t,null,[[2,11]])})));return function(e,r){return t.apply(this,arguments)}}()}},wo=function(e){return{type:yo,searchTerm:e}},_o=r(608),Uo=r(618),To=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(K.e)(),i=Object(L.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(C.a)(r),b=function(){return c("")};return Object(M.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(_o.a,{children:[Object(a.jsx)(nn.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(Uo.a,{addonType:"append",children:[Object(a.jsx)($r.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(F.a)(b,u),children:Object(a.jsx)(I.a,{icon:V.R})}),Object(a.jsx)(Qt.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(J,{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)(W.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)(W.a,{divider:!0}),Object(a.jsx)(W.a,{onClick:Object(F.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},Ro=function(e){var t=e.isLast,r=Object(p.a)(e,["isLast"]);return Object(a.jsx)(Tn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},Eo=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(M.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(L.a)(j,2),h=b[0],O=b[1],v=Object(M.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(L.a)(v,2),x=f[0],p=f[1],y=Object(M.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),S=Object(L.a)(y,2),C=S[0],N=S[1],k=Object(ir.b)(Object(g.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(ir.d)(h),regular404Redirect:Object(ir.d)(x),invalidShortUrlRedirect:Object(ir.d)(C)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(rr.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:k,children:[Object(a.jsxs)(nr.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(cr.a,{children:[Object(a.jsxs)(Ro,{value:h,onChange:O,children:[Object(a.jsxs)(jn,{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)(Ro,{value:x,onChange:p,children:[Object(a.jsxs)(jn,{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)(Ro,{value:C,isLast:!0,onChange:N,children:[Object(a.jsx)(jn,{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)(ar.a,{children:[Object(a.jsx)($r.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)($r.a,{color:"primary",children:"Save"})]})]})})},Do=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)"})]})]})},Lo=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(Qt.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},Vo=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=e.selectedServer,l=Object(K.e)(),u=Object(L.a)(l,2),d=u[0],j=u[1],b=c.domain,h=c.isDefault,O=c.redirects,v=!h||Object(Gr.c)(o);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:h?Object(a.jsx)(Lo,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:b}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===O||void 0===O?void 0:O.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(Do,{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:v?void 0:"defaultDomainBtn",children:Object(a.jsx)($r.a,{outline:!0,size:"sm",disabled:!v,onClick:v?j:void 0,children:Object(a.jsx)(I.a,{fixedWidth:!0,icon:v?V.m:V.b})})}),!v&&Object(a.jsxs)(Qt.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)(Eo,{domain:c,isOpen:d,toggle:j,editDomainRedirects:s})]})},Io=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],Fo=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=e.selectedServer,o=n.filteredDomains,l=n.defaultRedirects,u=n.loading,d=n.error,j=n.errorData,b=null!==l&&void 0!==l?l:null===(t=o.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(M.useEffect)((function(){r()}),[]),u)return Object(a.jsx)(mn.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:c}),d?Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{errorData:j,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(lr.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:Io.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[o.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:Io.length,className:"text-center",children:"No results found"})}),o.map((function(e){return Object(a.jsx)(Vo,{domain:e,editDomainRedirects:s,defaultRedirects:b,selectedServer:i},e.domain)}))]})]})})]})},Ao=function(e,t){e.serviceFactory("DomainSelector",(function(){return To})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return Fo})),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",ko,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return wo})),e.serviceFactory("editDomainRedirects",mo,"buildShlinkApiClient")},Mo="shlink/appUpdates/APP_UPDATE_AVAILABLE",Go="shlink/appUpdates/RESET_APP_UPDATE",Po=ut((it={},Object(u.a)(it,Mo,(function(){return!0})),Object(u.a)(it,Go,(function(){return!1})),it),!1),Bo=dt(Mo),Ho=dt(Go),Wo=r(153),qo=r(609),zo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(K.e)(),s=Object(L.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(qo.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:lr.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)($r.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)(I.a,{icon:V.M,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},Qo=r(33),Ko=function(){var e=Object(g.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(Qo.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)}}(),Jo=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(M.useEffect)((function(){var e,t;0===Object.keys(d).length&&u(),Object(aa.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:P()("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:Wo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(o,{})})]}),Object(a.jsx)(zo,{isOpen:h,toggle:O,forceUpdate:Ko})]})}},Zo=function(e,t,r){e.serviceFactory("App",Jo,"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 Bo})),e.serviceFactory("resetAppUpdate",(function(){return Ho}))},Yo=new j.a,Xo=Yo.container,$o=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)}}(Xo,t)))},el=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($o,{}))};Zo(Yo,el,b.h),Object(D.a)(Yo,el,b.h),E(Yo),kn(Yo,el,b.h),Tc(Yo,el,b.h),Yi(Yo,el),oi(Yo,el),Object(Xi.a)(Yo),co(Yo),vo(Yo,el),Ao(Yo,el);var tl=r(302),rl=r(80),nl=r(223),cl=Object(rl.c)({servers:cc,selectedServer:Kn,shortUrlsList:Jr,shortUrlCreationResult:Fr,shortUrlDeletion:Ur,shortUrlEdition:Wr,shortUrlVisits:Ns,tagVisits:As,orphanVisits:Ys,shortUrlDetail:Cn,tagsList:qi,tagDelete:wi,tagEdit:Li,mercureInfo:ro,settings:Ot,domainsList:No,visitsOverview:ai,appUpdated:Po}),al=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||rl.d,sl={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},il=function(e){var t,r,n,c;return"last180days"===(null===(t=e.settings.visits)||void 0===t?void 0:t.defaultInterval)&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e.settings.tags=Object(d.a)(Object(d.a)({},e.settings.tags),{},{defaultMode:null!==(r=null===(n=e.settings.tags)||void 0===n?void 0:n.defaultMode)&&void 0!==r?r:null===(c=e.settings.ui)||void 0===c?void 0:c.tagsMode}),e.settings.ui&&delete e.settings.ui.tagsMode,e}(Object(nl.load)(sl)),ol=Object(rl.e)(cl,il,al(Object(rl.a)(Object(nl.save)(sl),tl.a))),ll=r(64),ul=r.n(ll),dl=r(303),jl=r(304),bl=r(305),hl=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(534),r(535);delete ul.a.Icon.Default.prototype._getIconUrl,ul.a.Icon.Default.mergeOptions({iconRetinaUrl:dl.a,iconUrl:jl.a,shadowUrl:bl.a});var vl=Xo.App,fl=Xo.ScrollToTop,ml=Xo.ErrorHandler,gl=Xo.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:ol,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(ml,{children:Object(a.jsx)(fl,{children:Object(a.jsx)(vl,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/feature/ordering-settings")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/feature/ordering-settings","/service-worker.js");hl?(!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(){ol.dispatch(gl())}})},54:function(e,t,r){"use strict";var n=r(0),c=r(541),a=r(316),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(542),a=r(547),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}}}},[[319,1,2]]]); -//# sourceMappingURL=main.80883cdc.chunk.js.map \ No newline at end of file diff --git a/feature/ordering-settings/static/js/main.80883cdc.chunk.js.map b/feature/ordering-settings/static/js/main.80883cdc.chunk.js.map deleted file mode 100644 index 7a00d10e..00000000 --- a/feature/ordering-settings/static/js/main.80883cdc.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","servers/data/index.ts","utils/services/LocalStorage.ts","utils/services/ColorGenerator.ts","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","utils/utils.ts","common/MainHeader.tsx","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","visits/VisitsStats.tsx","utils/helpers/redux.ts","settings/reducers/settings.ts","utils/helpers/numbers.ts","utils/helpers/pagination.ts","short-urls/Paginator.tsx","short-urls/data/index.ts","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/utils/index.ts","api/ShlinkApiError.tsx","short-urls/helpers/DeleteShortUrlModal.tsx","short-urls/helpers/CreateShortUrlResult.tsx","short-urls/helpers/index.ts","visits/reducers/visitCreation.ts","short-urls/reducers/shortUrlDeletion.ts","short-urls/reducers/shortUrlCreation.ts","short-urls/reducers/shortUrlEdition.ts","short-urls/reducers/shortUrlsList.ts","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/ShortUrlCreation.tsx","settings/UserInterface.tsx","utils/dates/DateIntervalSelector.tsx","settings/Visits.tsx","settings/Tags.tsx","settings/ShortUrlsList.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","settings/helpers/index.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","useEffectExceptFirstTime","deps","isFirstLoad","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","hasServerData","server","apiKey","isServerWithId","hasOwnProperty","isReachableServer","getServerId","serverWithIdToServerData","omit","buildPath","path","key","item","getItem","JSON","parse","set","setItem","stringify","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","size","mappingFn","startAt","range","hasValue","isNil","isEmpty","handleEventPreventingDefault","handler","preventDefault","nonEmptyValueOrNull","capitalize","charAt","toUpperCase","slice","ServersDropdown","isOpen","toggleOpen","close","settingsPath","toggleClass","Navbar","dark","fixed","expand","NavbarBrand","NavbarToggler","arrowIcon","Collapse","navbar","Nav","NavItem","NavLink","active","cogsIcon","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","supportsDefaultDomainRedirectsEdition","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","normalizeOrderByInParams","orderBy","field","dir","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","isWithinInterval","isBeforeOrEqual","dateToCompare","isEqual","isBefore","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","dateToMatchingInterval","theDate","cond","T","DateInput","isClearable","selected","showCalendarIcon","ref","dateFormat","calendarIcon","input","focus","DateRangeRow","onStartDateChange","onEndDateChange","placeholderText","maxDate","minDate","DateIntervalDropdownItems","allText","DropdownItem","divider","interval","DateRangeSelector","onDatesChange","initialDateRange","defaultText","updatable","initialIntervalIsRange","activeInterval","setActiveInterval","activeDateRange","setActiveDateRange","updateDateRange","updateInterval","isDateInterval","header","useShortUrlsQuery","useMemo","extra","evolvedQuery","queryString","dateOrNull","SearchBar","toFirstPage","selectedTags","split","setDates","setSearch","removeTag","selectedTag","tagsList","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","sortList","list","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","SET_SETTINGS","DEFAULT_SHORT_URLS_ORDERING","realTimeUpdates","enabled","shortUrlCreation","validateUrls","ui","defaultInterval","shortUrlsList","defaultOrdering","mergeDeepRight","dissoc","toggleRealTimeUpdates","setRealTimeUpdatesInterval","setShortUrlCreationSettings","settings","setShortUrlsListSettings","setUiSettings","setVisitsSettings","setTagsSettings","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","SORTABLE_FIELDS","dateCreated","longUrl","ShortUrlsTable","initialOrderBy","setOrder","pagination","handleOrderBy","addTag","newTag","page","itemsPerPage","orderByColumn","renderOrderIcon","onTagClick","CopyToClipboardIcon","onCopy","copyIcon","Time","relative","dateObject","dateTime","getUnixTime","formatDistance","buildUrl","ShortUrlDetailLink","shortUrl","ShortUrlVisitsCount","visitsCount","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","resetCreateShortUrl","basicMode","shortUrlCreationSettings","customSlug","shortCodeLength","validSince","validUntil","findIfExists","validateUrl","forwardQuery","getInitialState","saving","mode","onSave","canBeClosed","Result","small","parseApiError","isInvalidDeletionError","ShlinkApiError","errorData","fallbackMessage","detail","invalidElements","shortUrlDeletion","resetDeleteShortUrl","inputValue","setInputValue","handleDeleteUrl","catch","identity","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","result","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","shortUrlMatches","CREATE_VISITS","createdVisits","DELETE_SHORT_URL_START","DELETE_SHORT_URL_ERROR","SHORT_URL_DELETED","RESET_DELETE_SHORT_URL","dispatch","CREATE_SHORT_URL_START","CREATE_SHORT_URL_ERROR","CREATE_SHORT_URL","RESET_CREATE_SHORT_URL","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","totalItems","currentShortUrl","lastVisit","last","assoc","init","editedShortUrl","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","isBasicMode","hadTitleOriginally","resolveNewTitle","hasNewTitle","matcher","submit","renderOptionalInput","fromGroupProps","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","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","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","loadingLarge","progress","fallbackInterval","initialInterval","setInitialInterval","setDateRange","setHighlightedVisits","setHighlightedLabel","visitsFilter","setVisitsFilter","buildSectionUrl","normalizedVisits","mapLocations","highlightVisitsForProp","newSelectedBar","propEq","faFileDownload","Progress","striped","pills","section","amount","exportVisits","cancelGetShortUrlVisits","doIntervalFallback","ITEMS_PER_PAGE","isLastPage","calcProgress","getVisitsWithLoader","visitsLoader","lastVisitLoader","extraFinishActionData","actionMap","shouldCancel","loadVisitsInParallel","flatten","loadPagesBlocks","pagesBlocks","concat","loadVisits","pagesRange","fallbackToInterval","finish","lastVisitLoaderForLoader","loader","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","GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL","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","GET_TAG_VISITS_FALLBACK_TO_INTERVAL","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","GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL","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","defaultMode","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","info","RealTimeUpdates","SettingsSections","child","subChild","subIndex","Settings","ShortUrlCreation","UserInterface","Visits","Tags","tagFilteringModeText","changeTagsFilteringMode","faMoon","faSun","useDarkTheme","DateIntervalSelector","tagsMode","EDIT_DOMAIN_REDIRECTS","redirects","LIST_DOMAINS_START","LIST_DOMAINS_ERROR","LIST_DOMAINS","FILTER_DOMAINS","filteredDomains","replaceRedirectsOnDomain","defaultRedirects","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","authority","canEditDomain","forbiddenIcon","resolvedDefaultRedirects","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","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","preloadedState","migrateDeprecatedSettings","load","store","createStore","reducers","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,oLCRVmB,EAAa,SAAC,GAAD,QAAGC,aAAH,M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C,EAApCA,WACzE,IAAK5F,YAASs3C,GACZ,OAAO,EAGT,IAAMC,GAAqB3xC,GAAc4xC,kBAAQF,EAAgB1xC,EAAY,MAG7E,QAF2B0mB,GAAckrB,kBAAQF,EAAgBhrB,EAAY,QAEjDirB,GAGxBE,EAAuBxsB,YAAY9K,KAAU,SAACnqB,GAClD,IACE,OAAOwhD,kBAAQxhD,EAASA,EAAS,KACjC,MAAOiD,GACP,OAAO,MAIEkG,EAAqB,SAACnJ,GAAD,OAAsByhD,EAAqBzhD,GAAtB,WAA+CA,GAAdA,GAE3EkJ,EAAkB,eAACw4C,EAAD,uDAAwB,SAAxB,OAC7B,SAAC1hD,GAAD,OAA6ByhD,EAAqBzhD,GAAWA,EAAU0hD,M","file":"static/js/main.80883cdc.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, EffectCallback, DependencyList, useEffect } 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\nexport const useEffectExceptFirstTime = (callback: EffectCallback, deps: DependencyList): void => {\n const isFirstLoad = useRef(true);\n\n useEffect(() => {\n !isFirstLoad.current && callback();\n isFirstLoad.current = false;\n }, deps);\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","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","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 { 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 { 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 { 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 { 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\nexport const supportsDefaultDomainRedirectsEdition = serverMatchesVersions({ minVersion: '2.10.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 ShlinkDomainsResponse,\n ShlinkVisitsOverview,\n ShlinkEditDomainRedirects,\n ShlinkDomainRedirects,\n ShlinkShortUrlsListParams,\n ShlinkShortUrlsListNormalizedParams,\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);\nconst normalizeOrderByInParams = (params: ShlinkShortUrlsListParams): ShlinkShortUrlsListNormalizedParams => {\n const { orderBy = {}, ...rest } = params;\n const { field, dir } = orderBy;\n\n return !dir ? rest : {\n ...rest,\n orderBy: `${field}-${dir}`,\n };\n};\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', normalizeOrderByInParams(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);\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, isBefore, isEqual, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';\nimport { OptionalString } from '../utils';\n\nexport type DateOrString = Date | string;\n\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\nexport const parseISO = (date: DateOrString): Date => isDateObject(date) ? date : stdParseISO(date);\n\nexport const isBetween = (date: DateOrString, start?: DateOrString, end?: DateOrString): boolean => {\n try {\n return isWithinInterval(parseISO(date), { start: parseISO(start ?? date), end: parseISO(end ?? date) });\n } catch (e) {\n return false;\n }\n};\n\nexport const isBeforeOrEqual = (date: Date | number, dateToCompare: Date | number) =>\n isEqual(date, dateToCompare) || isBefore(date, dateToCompare);\n","import { subDays, startOfDay, endOfDay } from 'date-fns';\nimport { cond, filter, isEmpty, T } from 'ramda';\nimport { DateOrString, formatInternational, isBeforeOrEqual, parseISO } 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\nexport const dateToMatchingInterval = (date: DateOrString): DateInterval => {\n const theDate: Date = parseISO(date);\n\n return cond([\n [ () => isBeforeOrEqual(startOfDay(new Date()), theDate), () => 'today' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(1), theDate), () => 'yesterday' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(7), theDate), () => 'last7Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(30), theDate), () => 'last30Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(90), theDate), () => 'last90Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(180), theDate), () => 'last180Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(365), theDate), () => 'last365Days' ],\n [ T, () => 'all' ],\n ])();\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 { useEffectExceptFirstTime } from '../helpers/hooks';\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 updatable?: boolean;\n}\n\nexport const DateRangeSelector = (\n { onDatesChange, initialDateRange, defaultText, disabled, updatable = false }: 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 updatable && useEffectExceptFirstTime(() => {\n const isDateInterval = rangeIsInterval(initialDateRange);\n\n isDateInterval && updateInterval(initialDateRange);\n initialDateRange && !isDateInterval && updateDateRange(initialDateRange);\n }, [ initialDateRange ]);\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 { isEmpty, propEq, values } from 'ramda';\nimport { useState, useEffect, useMemo, FC, useRef } 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, doIntervalFallback?: boolean) => 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 { visits, loading, loadingLarge, error, errorData, progress, fallbackInterval } = visitsInfo;\n const [ initialInterval, setInitialInterval ] = useState(\n fallbackInterval ?? settings.visits?.defaultInterval ?? 'last30Days',\n );\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 const isFirstLoad = useRef(true);\n\n const buildSectionUrl = (subPath?: string) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return !subPath ? `${baseUrl}${query}` : `${baseUrl}${subPath}${query}`;\n };\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 }, isFirstLoad.current);\n isFirstLoad.current = false;\n }, [ dateRange, visitsFilter ]);\n useEffect(() => {\n fallbackInterval && setInitialInterval(fallbackInterval);\n }, [ fallbackInterval ]);\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 { 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 { Action } from 'redux';\nimport { dissoc, mergeDeepRight } from 'ramda';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { RecursivePartial } from '../../utils/utils';\nimport { Theme } from '../../utils/theme';\nimport { DateInterval } from '../../utils/dates/types';\nimport { TagsOrder } from '../../tags/data/TagsListChildrenProps';\nimport { ShortUrlsOrder } from '../../short-urls/data';\n\nexport const SET_SETTINGS = 'shlink/realTimeUpdates/SET_SETTINGS';\n\nexport const DEFAULT_SHORT_URLS_ORDERING: ShortUrlsOrder = {\n field: 'dateCreated',\n dir: 'DESC',\n};\n\n/**\n * Important! When adding new props in the main Settings interface or any of the nested props, they have to be set as\n * optional, as old instances of the app will load partial objects from local storage until it is saved again.\n */\n\nexport interface RealTimeUpdatesSettings {\n enabled: boolean;\n interval?: number;\n}\n\nexport type TagFilteringMode = 'startsWith' | 'includes';\n\nexport interface ShortUrlCreationSettings {\n validateUrls: boolean;\n tagFilteringMode?: TagFilteringMode;\n forwardQuery?: boolean;\n}\n\nexport type TagsMode = 'cards' | 'list';\n\nexport interface UiSettings {\n theme: Theme;\n}\n\nexport interface VisitsSettings {\n defaultInterval: DateInterval;\n}\n\nexport interface TagsSettings {\n defaultOrdering?: TagsOrder;\n defaultMode?: TagsMode;\n}\n\nexport interface ShortUrlsListSettings {\n defaultOrdering?: ShortUrlsOrder;\n}\n\nexport interface Settings {\n realTimeUpdates: RealTimeUpdatesSettings;\n shortUrlCreation?: ShortUrlCreationSettings;\n shortUrlsList?: ShortUrlsListSettings;\n ui?: UiSettings;\n visits?: VisitsSettings;\n tags?: TagsSettings;\n}\n\nconst initialState: Settings = {\n realTimeUpdates: {\n enabled: true,\n },\n shortUrlCreation: {\n validateUrls: false,\n },\n ui: {\n theme: 'light',\n },\n visits: {\n defaultInterval: 'last30Days',\n },\n shortUrlsList: {\n defaultOrdering: DEFAULT_SHORT_URLS_ORDERING,\n },\n};\n\ntype SettingsAction = Action & Settings;\n\ntype PartialSettingsAction = Action & RecursivePartial;\n\nexport default buildReducer({\n [SET_SETTINGS]: (state, action) => mergeDeepRight(state, dissoc('type', action)),\n}, initialState);\n\nexport const toggleRealTimeUpdates = (enabled: boolean): PartialSettingsAction => ({\n type: SET_SETTINGS,\n realTimeUpdates: { enabled },\n});\n\nexport const setRealTimeUpdatesInterval = (interval: number): PartialSettingsAction => ({\n type: SET_SETTINGS,\n realTimeUpdates: { interval },\n});\n\nexport const setShortUrlCreationSettings = (settings: ShortUrlCreationSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n shortUrlCreation: settings,\n});\n\nexport const setShortUrlsListSettings = (settings: ShortUrlsListSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n shortUrlsList: settings,\n});\n\nexport const setUiSettings = (settings: UiSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n ui: settings,\n});\n\nexport const setVisitsSettings = (settings: VisitsSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n visits: settings,\n});\n\nexport const setTagsSettings = (settings: TagsSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n tags: settings,\n});\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 { Nullable, OptionalString } from '../../utils/utils';\nimport { Order } from '../../utils/helpers/ordering';\n\nexport interface EditShortUrlData {\n longUrl?: string;\n tags?: string[];\n title?: string | null;\n validSince?: Date | string | null;\n validUntil?: Date | string | null;\n maxVisits?: number | null;\n validateUrl?: boolean;\n crawlable?: boolean;\n forwardQuery?: boolean;\n}\n\nexport interface ShortUrlData extends EditShortUrlData {\n longUrl: string;\n customSlug?: string;\n shortCodeLength?: number;\n domain?: string;\n findIfExists?: boolean;\n}\n\nexport interface ShortUrl {\n shortCode: string;\n shortUrl: string;\n longUrl: string;\n dateCreated: string;\n visitsCount: number;\n meta: Required>;\n tags: string[];\n domain: string | null;\n title?: string | null;\n crawlable?: boolean;\n forwardQuery?: boolean;\n}\n\nexport interface ShortUrlMeta {\n validSince?: string;\n validUntil?: string;\n maxVisits?: number;\n}\n\nexport interface ShortUrlModalProps {\n shortUrl: ShortUrl;\n isOpen: boolean;\n toggle: () => void;\n}\n\nexport interface ShortUrlIdentifier {\n shortCode: string;\n domain: OptionalString;\n}\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 ShortUrlsOrder = Order;\n","import { pipe } 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, 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 { DEFAULT_SHORT_URLS_ORDERING, Settings } from '../settings/reducers/settings';\nimport { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';\nimport { ShortUrlsTableProps } from './ShortUrlsTable';\nimport Paginator from './Paginator';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\nimport { OrderableFields, ShortUrlsOrder, SORTABLE_FIELDS } from './data';\n\ninterface ShortUrlsListProps extends RouteComponentProps {\n selectedServer: SelectedServer;\n shortUrlsList: ShortUrlsListState;\n listShortUrls: (params: ShlinkShortUrlsListParams) => void;\n settings: Settings;\n}\n\nconst ShortUrlsList = (ShortUrlsTable: FC, SearchBar: FC) => boundToMercureHub(({\n listShortUrls,\n match,\n location,\n history,\n shortUrlsList,\n selectedServer,\n settings,\n}: ShortUrlsListProps) => {\n const serverId = getServerId(selectedServer);\n const initialOrderBy = settings.shortUrlsList?.defaultOrdering ?? DEFAULT_SHORT_URLS_ORDERING;\n const [ order, setOrder ] = useState(initialOrderBy);\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 handleOrderBy = (field?: OrderableFields, dir?: OrderDir) => setOrder({ field, dir });\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(() => {\n listShortUrls({\n page: match.params.page,\n searchTerm: search,\n tags: selectedTags,\n itemsPerPage: undefined,\n startDate,\n endDate,\n orderBy: order,\n });\n }, [ match.params.page, search, selectedTags, startDate, endDate, order ]);\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 { 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","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 { FC } from 'react';\nimport { FormGroup } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { TagsModeDropdown } from '../tags/TagsModeDropdown';\nimport { capitalize } from '../utils/utils';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { SORTABLE_FIELDS } from '../tags/data/TagsListChildrenProps';\nimport { Settings, TagsSettings } from './reducers/settings';\n\ninterface TagsProps {\n settings: Settings;\n setTagsSettings: (settings: TagsSettings) => void;\n}\n\nexport const Tags: FC = ({ settings: { tags }, setTagsSettings }) => (\n \n \n \n capitalize(tagsMode)}\n onChange={(defaultMode) => setTagsSettings({ ...tags, defaultMode })}\n />\n Tags will be displayed as {tags?.defaultMode ?? 'cards'}.\n \n \n \n setTagsSettings({ ...tags, defaultOrdering: { field, dir } })}\n />\n \n \n);\n","import { FC } from 'react';\nimport { FormGroup } from 'reactstrap';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { SORTABLE_FIELDS } from '../short-urls/data';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { DEFAULT_SHORT_URLS_ORDERING, Settings, ShortUrlsListSettings } from './reducers/settings';\n\ninterface ShortUrlsListProps {\n settings: Settings;\n setShortUrlsListSettings: (settings: ShortUrlsListSettings) => void;\n}\n\nexport const ShortUrlsList: FC = ({ settings: { shortUrlsList }, setShortUrlsListSettings }) => (\n \n \n \n setShortUrlsListSettings({ defaultOrdering: { field, dir } })}\n />\n \n \n);\n","import Bottle from 'bottlejs';\nimport RealTimeUpdates from '../RealTimeUpdates';\nimport Settings from '../Settings';\nimport {\n setRealTimeUpdatesInterval,\n setShortUrlCreationSettings,\n setShortUrlsListSettings,\n setTagsSettings,\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';\nimport { Tags } from '../Tags';\nimport { ShortUrlsList } from '../ShortUrlsList';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory(\n 'Settings',\n Settings,\n 'RealTimeUpdates',\n 'ShortUrlCreation',\n 'ShortUrlsListSettings',\n 'UserInterface',\n 'Visits',\n 'Tags',\n );\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 bottle.serviceFactory('Tags', () => Tags);\n bottle.decorator('Tags', connect([ 'settings' ], [ 'setTagsSettings' ]));\n\n bottle.serviceFactory('ShortUrlsListSettings', () => ShortUrlsList);\n bottle.decorator('ShortUrlsListSettings', connect([ 'settings' ], [ 'setShortUrlsListSettings' ]));\n\n // Actions\n bottle.serviceFactory('toggleRealTimeUpdates', () => toggleRealTimeUpdates);\n bottle.serviceFactory('setRealTimeUpdatesInterval', () => setRealTimeUpdatesInterval);\n bottle.serviceFactory('setShortUrlCreationSettings', () => setShortUrlCreationSettings);\n bottle.serviceFactory('setShortUrlsListSettings', () => setShortUrlsListSettings);\n bottle.serviceFactory('setUiSettings', () => setUiSettings);\n bottle.serviceFactory('setVisitsSettings', () => setVisitsSettings);\n bottle.serviceFactory('setTagsSettings', () => setTagsSettings);\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 defaultRedirects?: ShlinkDomainRedirects;\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ListDomainsAction extends Action {\n domains: ShlinkDomain[];\n defaultRedirects?: ShlinkDomainRedirects;\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, defaultRedirects }) =>\n ({ ...initialState, domains, filteredDomains: domains, defaultRedirects }),\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 { data: domains, defaultRedirects } = await listDomains();\n\n dispatch({ type: LIST_DOMAINS, domains, defaultRedirects });\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 { SelectedServer } from '../servers/data';\nimport { supportsDefaultDomainRedirectsEdition } from '../utils/helpers/features';\nimport { EditDomainRedirectsModal } from './helpers/EditDomainRedirectsModal';\n\ninterface DomainRowProps {\n domain: ShlinkDomain;\n defaultRedirects?: ShlinkDomainRedirects;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n selectedServer: SelectedServer;\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, selectedServer }) => {\n const [ isOpen, toggle ] = useToggle();\n const { domain: authority, isDefault, redirects } = domain;\n const canEditDomain = !isDefault || supportsDefaultDomainRedirectsEdition(selectedServer);\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 {!canEditDomain && (\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 { SelectedServer } from '../servers/data';\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 selectedServer: SelectedServer;\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, selectedServer },\n) => {\n const { filteredDomains: domains, defaultRedirects, loading, error, errorData } = domainsList;\n const resolvedDefaultRedirects = 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', 'selectedServer' ],\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();\n\nexport const { 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","import { combineReducers } from 'redux';\nimport serversReducer from '../servers/reducers/servers';\nimport selectedServerReducer from '../servers/reducers/selectedServer';\nimport shortUrlsListReducer from '../short-urls/reducers/shortUrlsList';\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 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';\nimport { migrateDeprecatedSettings } from '../settings/helpers';\nimport { ShlinkState } from './types';\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};\nconst preloadedState = migrateDeprecatedSettings(load(localStorageConfig) as ShlinkState);\n\nexport const store = createStore(reducers, preloadedState, composeEnhancers(\n applyMiddleware(save(localStorageConfig), ReduxThunk),\n));\n","import { ShlinkState } from '../../container/types';\n\nexport const migrateDeprecatedSettings = (state: ShlinkState): ShlinkState => {\n // The \"last180Days\" interval had a typo, with a lowercase d\n if ((state.settings.visits?.defaultInterval as any) === 'last180days') {\n state.settings.visits && (state.settings.visits.defaultInterval = 'last180Days');\n }\n\n // The \"tags display mode\" option has been moved from \"ui\" to \"tags\"\n state.settings.tags = {\n ...state.settings.tags,\n defaultMode: state.settings.tags?.defaultMode ?? (state.settings.ui as any)?.tagsMode,\n };\n state.settings.ui && delete (state.settings.ui as any).tagsMode;\n\n return state;\n};\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/feature/ordering-settings/static/js/main.92df7ed9.chunk.js b/feature/ordering-settings/static/js/main.92df7ed9.chunk.js new file mode 100644 index 00000000..3194efde --- /dev/null +++ b/feature/ordering-settings/static/js/main.92df7ed9.chunk.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{102: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))}}},103: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)}},146:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/feature/ordering-settings"}')},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(557),a=r(558),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,"c",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(8),c=r(1),a=r(280),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)}]},d=function(e,t){var r=Object(c.useRef)(!0);Object(c.useEffect)((function(){!r.current&&e(),r.current=!1}),t)}},277:function(e,t,r){"use strict";(function(e){var n=r(278),c=r.n(n),a=r(279),s=r(310),i=r(311),o=r(312),l=r(313),u=r(281),d=r(308),j=r(102),b=r(283);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))},279: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})}}},281: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(217),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)}},283: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(103),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}()},299:function(e,t,r){"use strict";(function(e){var n=r(25),c=r(300),a=r(301);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.c,"setTimeout","clearTimeout")}}).call(this,r(49))},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(540),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 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))}}},301: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:{}}},308:function(e,t,r){"use strict";var n=r(0),c=r(7),a=r.n(c),s=r(30),i=r(545),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})})}},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(546),c=r(213),a=r(318),s=r(545),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(8),c=r(0),a=r(11),s=r(12),i=r(1),o=r(22),l=r(550),u=r(551),d=r(552),j=r(553),b=r(554),h=r(555),O=r(556),v=r(7),f=r.n(v),m=r(25),g=r(150);t.a=function(e){return function(t){var r=t.location,v=Object(m.e)(),x=Object(n.a)(v,4),p=x[0],y=x[1],S=x[3],C=r.pathname;Object(i.useEffect)(S,[r]);var N="/settings",k=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)(g.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:k})}),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,{})]})})]})}}},311:function(e,t,r){"use strict";var n=r(0),c=r(1),a=r(559),s=r(318),i=r(22),o=r(316),l=r(541),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})]})})})]})})]})]})})})}},312:function(e,t,r){"use strict";var n=r(3),c=r(8),a=r(0),s=r(1),i=r(43),o=r(11),l=r(12),u=r(7),d=r.n(u),j=r(151),b=r(25),h=r(38),O=r(30),v=r(153);t.a=function(e,t,r,u,f,m,g,x,p,y,S){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,k=Object(b.e)(),w=Object(c.a)(k,4),_=w[0],U=w[1],T=w[2],R=w[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.d)(N))return Object(a.jsx)(x,{});var E=Object(h.f)(N),D=Object(h.d)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),V=Object(b.d)(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:g}),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"})}})]})})})]})}))]})}),x)}},313:function(e,t,r){"use strict";var n=r(3),c=r(40),a=r(0),s=r(11),i=r(12),o=r(22),l=r(7),u=r.n(l),d=r(30),j=r(38),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.d)(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})]})})}}},319:function(e,t,r){e.exports=r(536)},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(40),a=r(0),s=r(316),i=r(543),o=r(544),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})]}))}},38:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"j",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"k",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"i",(function(){return b})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return O})),r.d(t,"c",(function(){return v}));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"}),v=a({minVersion:"2.10.0"})},405:function(e,t){},407:function(e,t){},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(212),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},536:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return Ma})),r.d(n,"normalizeVisits",(function(){return Ga}));var c,a=r(0),s=r(48),i=r(163),o=r(22),l=r(146),u=r(10),d=r(3),j=r(276),b=r(43),h=r(607),O=r(612),v=r(30),f=r(6),m=r.n(f),g=r(15),x=r(19),p=r(40),y=r(309),S=r(213),C=r(318),N=r(51),k=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(y.a)(S.a),_=function(e){var t=e.orderBy,r=void 0===t?{}:t,n=Object(p.a)(e,["orderBy"]),c=r.field,a=r.dir;return a?Object(d.a)(Object(d.a)({},n),{},{orderBy:"".concat(c,"-").concat(a)}):n},U=function e(t,r,n){var c=this;Object(x.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(g.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(g.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(y.a)((function(e){return Object(C.a)(e)||Object(S.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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(g.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})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(g.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(g.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(k(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:N.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},T={},R=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 T[s]||(T[s]=new U(e,c,a)),T[s]}},E=function(e){e.serviceFactory("buildShlinkApiClient",R,"axios")},D=r(277),L=r(8),V=r(11),I=r(12),F=r(545),A=r(361),M=r(1),G=r(7),P=r.n(G),B=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(M.useState)(u),j=Object(L.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:P()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:P()("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)(I.a,{icon:V.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"})]})},H=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"})]})},W=r(565),q=r(129),z=r(560),Q=r(561),K=r(25),J=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(K.e)(),b=Object(L.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)(q.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(z.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(Q.a,{className:"w-100",right:u,style:f,children:i})]})},Z=r(91),Y=r(365),X=r(200),$=r(307),ee=r(563),te=r(564),re=r(538),ne=r(562),ce=(r(537),r(362)),ae=r(363),se=r(364),ie=function(e){return"string"!==typeof e},oe=function(e,t){return e&&ie(e)?t?Object(re.default)(e,t):Object(ne.a)(e):e},le=function(e){return oe(e,void 0)},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return oe(t,e)}}(),de=function(e){return ie(e)?e:Object(A.default)(e)},je=function(e,t,r){try{return Object(ce.default)(de(e),{start:de(null!==t&&void 0!==t?t:e),end:de(null!==r&&void 0!==r?r:e)})}catch(n){return!1}},be=function(e,t){return Object(ae.default)(e,t)||Object(se.default)(e,t)},he=function(e){return void 0===e||Object(C.a)(Object($.a)(Boolean,e))},Oe=function(e){return"string"===typeof e},ve={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},fe=Object.keys(ve).filter((function(e){return"all"!==e})),me=function(e){if(e&&"all"!==e)return Oe(e)?ve[e]:function(e){if(e&&!he(e))return e.startDate&&!e.endDate?"Since ".concat(ue(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ue(e.endDate)):"".concat(ue(e.startDate)," - ").concat(ue(e.endDate))}(e)},ge=function(e){return Object(Z.default)(Object(Y.default)(new Date,e))},xe=function(e){return{startDate:e,endDate:Object(X.default)(new Date)}},pe=function(e){if(!e||"all"===e)return{};switch(e){case"today":return xe(Object(Z.default)(new Date));case"yesterday":return{startDate:ge(1),endDate:Object(X.default)(Object(Y.default)(new Date,1))};case"last7Days":return xe(ge(7));case"last30Days":return xe(ge(30));case"last90Days":return xe(ge(90));case"last180Days":return xe(ge(180));case"last365Days":return xe(ge(365))}return{}},ye=function(e){var t=de(e);return Object(ee.a)([[function(){return be(Object(Z.default)(new Date),t)},function(){return"today"}],[function(){return be(ge(1),t)},function(){return"yesterday"}],[function(){return be(ge(7),t)},function(){return"last7Days"}],[function(){return be(ge(30),t)},function(){return"last30Days"}],[function(){return be(ge(90),t)},function(){return"last90Days"}],[function(){return be(ge(180),t)},function(){return"last180Days"}],[function(){return be(ge(365),t)},function(){return"last365Days"}],[te.a,function(){return"all"}]])()},Se=r(286),Ce=r.n(Se),Ne=r(78),ke=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(S.a)(n),s=Object(M.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(Ce.a,Object(d.a)(Object(d.a)({},e),{},{dateFormat:"yyyy-MM-dd",className:P()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(I.a,{icon:Ne.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},we=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)(ke,{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)(ke,{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})})]})},_e=function(e){var t=e.active,r=e.allText,n=e.onChange;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{active:"all"===t,onClick:function(){return n("all")},children:r}),Object(a.jsx)(W.a,{divider:!0}),fe.map((function(e){return Object(a.jsx)(W.a,{active:t===e,onClick:function(){return n(e)},children:me(e)},e)}))]})},Ue=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=e.updatable,o=void 0!==i&&i,l=Oe(n),u=Object(M.useState)(l?n:void 0),j=Object(L.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(l?void 0:n),v=Object(L.a)(O,2),f=v[0],m=v[1],g=function(e){h(he(e)?"all":void 0),m(e),r(e)},x=function(e){h(e),m(void 0),r(pe(e))};return o&&Object(K.a)((function(){var e=Oe(n);e&&x(n),n&&!e&&g(n)}),[n]),Object(a.jsxs)(J,{disabled:s,text:null!==(t=me(null!==b&&void 0!==b?b:f))&&void 0!==t?t:c,children:[Object(a.jsx)(_e,{allText:c,active:b,onChange:x}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{header:!0,children:"Custom:"}),Object(a.jsx)(W.a,{text:!0,children:Object(a.jsx)(we,Object(d.a)(Object(d.a)({},f),{},{onStartDateChange:function(e){return g(Object(d.a)(Object(d.a)({},f),{},{startDate:e}))},onEndDateChange:function(e){return g(Object(d.a)(Object(d.a)({},f),{},{endDate:e}))}}))})]})},Te=function(e){var t=e.history,r=e.location,n=e.match,c=Object(M.useMemo)((function(){return Object(N.a)(r.search)}),[r]);return[c,function(e){var r=Object(N.b)(Object(d.a)(Object(d.a)({},c),e)),a=Object(C.a)(r)?"":"?".concat(r);t.push("/server/".concat(null===n||void 0===n?void 0:n.params.serverId,"/list-short-urls/1").concat(a))}]},Re=function(e){return e?Object(A.default)(e):null},Ee=function(e){return function(t){var r,n=Te(t),c=Object(L.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(F.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=le(n))&&void 0!==t?t:void 0,endDate:null!==(r=le(c))&&void 0!==r?r:void 0}}),d),h=Object(F.a)((function(e){return Object(C.a)(e)?void 0:e}),(function(e){return d({search:e})})),O=Object(F.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)(B,{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)(Ue,{defaultText:"All short URLs",initialDateRange:{startDate:Re(l),endDate:Re(u)},onDatesChange:b})})})}),j.length>0&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(I.a,{icon:V.N,className:"search-bar__tags-icon"}),"\xa0",j.map((function(t){return Object(a.jsx)(H,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return O(t)}},t)}))]})]})}},De=r(26),Le=r(316),Ve=r(566),Ie=r(567),Fe=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},Ae=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 Me(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=Fe(e,n.field,n.dir);c(t?e:void 0,t)}};return Object(a.jsxs)(Ve.a,{children:[Object(a.jsxs)(z.a,{caret:!0,color:i?"primary":"link",className:P()({"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:P()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(Ie.a)(r).map((function(e){var t=Object(L.a)(e,2),r=t[0],c=t[1];return Object(a.jsxs)(W.a,{active:n.field===r,onClick:u(r),children:[c,n.field===r&&Object(a.jsx)(I.a,{icon:"ASC"===n.dir?V.K:V.J,className:"sorting-dropdown__sort-icon"})]},r)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!n.field,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Ge=r(287);function Pe(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(M.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 Ge.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(De.a)(r)),r.clear()}),1e3*o*60);return Object(F.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 Be=function e(){Object(x.a)(this,e)};function He(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)(I.a,{icon:"ASC"===t.dir?V.f:V.e,className:c}):null}Be.visits="https://shlink.io/new-visit",Be.orphanVisits="https://shlink.io/new-orphan-visit",Be.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var We,qe,ze,Qe,Ke,Je,Ze,Ye,Xe,$e,et,tt,rt,nt,ct,at,st,it,ot=r(613),lt=r(568),ut=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}},dt=function(e){return function(){return{type:e}}},jt="shlink/realTimeUpdates/SET_SETTINGS",bt={field:"dateCreated",dir:"DESC"},ht={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:bt}},Ot=ut(Object(u.a)({},jt,(function(e,t){return Object(ot.a)(e,Object(lt.a)("type",t))})),ht),vt=function(e){return{type:jt,realTimeUpdates:{enabled:e}}},ft=function(e){return{type:jt,realTimeUpdates:{interval:e}}},mt=function(e){return{type:jt,shortUrlCreation:e}},gt=function(e){return{type:jt,shortUrlsList:e}},xt=function(e){return{type:jt,ui:e}},pt=function(e){return{type:jt,visits:e}},yt=function(e){return{type:jt,tags:e}},St=r(570),Ct=r(571),Nt=r(572),kt=r(546),wt=r(285),_t=r(569),Ut=Math.ceil,Tt=new Intl.NumberFormat("en-US"),Rt=function(e){return Tt.format(Number(e))},Et="...",Dt=function(e,t){var r=Object(kt.a)(Object(wt.a)(2,e-2),Object(_t.a)(t-1,e+2)+1);return e-2>2&&r.unshift(Et),e+2=d,children:Object(a.jsx)(Ct.a,{next:!0,tag:o.b,to:j(l+1)})})]})},At={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Mt=function(e,t){return Pe((function(r){var n,c,s,i=r.listShortUrls,o=r.match,l=r.location,u=r.history,d=r.shortUrlsList,j=r.selectedServer,b=r.settings,h=Object(v.a)(j),O=null!==(n=null===(c=b.shortUrlsList)||void 0===c?void 0:c.defaultOrdering)&&void 0!==n?n:bt,f=Object(M.useState)(O),m=Object(L.a)(f,2),g=m[0],x=m[1],p=Te({history:u,match:o,location:l}),y=Object(L.a)(p,2),S=y[0],C=S.tags,N=S.search,k=S.startDate,w=S.endDate,_=y[1],U=Object(M.useMemo)((function(){var e;return null!==(e=null===C||void 0===C?void 0:C.split(","))&&void 0!==e?e:[]}),[C]),T=(null!==(s=null===d||void 0===d?void 0:d.shortUrls)&&void 0!==s?s:{}).pagination,R=function(e,t){return x({field:e,dir:t})},E=Object(F.a)((function(e){return Object(De.a)(new Set([].concat(Object(De.a)(U),[e]))).join(",")}),(function(e){return _({tags:e})}));return Object(M.useEffect)((function(){i({page:o.params.page,searchTerm:N,tags:U,itemsPerPage:void 0,startDate:k,endDate:w,orderBy:g})}),[o.params.page,N,U,k,w,g]),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)(Me,{items:At,order:g,onChange:R})}),Object(a.jsxs)(Le.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{selectedServer:j,shortUrlsList:d,orderByColumn:function(e){return function(){return R(e,Fe(e,g.field,g.dir))}},renderOrderIcon:function(e){return Object(a.jsx)(He,{currentOrder:g,field:e})},onTagClick:E}),Object(a.jsx)(Ft,{paginator:T,serverId:h,currentQueryString:l.search})]})]})}),(function(){return[Be.visits]}))},Gt=r(52),Pt=r(160),Bt=r.n(Pt),Ht=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(Bt.a,{text:t,onCopy:r,children:Object(a.jsx)(I.a,{icon:Ne.c,className:"ml-2 copy-to-clipboard-icon"})})},Wt=r(573),qt=r(614),zt=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=ie(t)?t:Object(A.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(Wt.a)(i),"000"),children:s?"".concat(Object(qt.a)(new Date,i)," ago"):Object(re.default)(i,n)})},Qt=r(574),Kt=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)},Jt=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(p.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:Kt(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},Zt=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)(Jt,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:P()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:Rt(r)})});if(!o)return l;var u=Rt(o),d=Object(M.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)(I.a,{icon:V.u})})]})]}),Object(a.jsxs)(Qt.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},Yt=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(L.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(L.a)(h,2),v=O[0],f=O[1],m=Object(M.useRef)(!0);return Object(M.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)(zt,{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)(Gt.a,{href:i.shortUrl}),Object(a.jsx)(Ht,{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)(Gt.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)(Gt.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(C.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(H,{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)(Zt,{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})})]})}},Xt=r(575),$t=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(Xt.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(z.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(I.a,{icon:V.n}),"\xa0"]}),Object(a.jsx)(Q.a,{right:s,children:n})]})},er=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(K.e)(),i=Object(L.a)(s,2),o=i[0],l=i[1],u=Object(K.e)(),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(L.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)($t,{toggle:l,isOpen:o,children:[Object(a.jsxs)(W.a,{tag:Jt,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(I.a,{icon:V.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(W.a,{tag:Jt,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(W.a,{onClick:b,children:[Object(a.jsx)(I.a,{icon:V.F,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"dropdown-item--danger",onClick:f,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},tr=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(M.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(g.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}))]})}},rr=r(616),nr=r(576),cr=r(577),ar=r(578),sr=r(547),ir=r(31),or=r(541),lr=r(32),ur=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(or.a,{className:n,children:Object(a.jsx)("div",{className:P()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(lr.a,{className:P()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:P()({"p-2":s}),children:t})})})},dr=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},jr=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},br=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(", "),"]"]}))]})},hr=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(M.useState)(""),l=Object(L.a)(o,2),u=l[0],d=l[1];Object(M.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(F.a)(s,r),O=Object(ir.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(sr.a)}));return Object(a.jsx)(rr.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(nr.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(cr.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)(ur,{type:jr(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(br,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(ar.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"})]})]})})},Or=r(220),vr=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(L.a)(l,2),d=u[0],j=u[1];if(Object(M.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(ur,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.P,className:"float-right pointer",onClick:s}),Object(a.jsx)(br,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(S.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(ur,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.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)(Bt.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)(I.a,{icon:Ne.c})," Copy"]})}),Object(a.jsx)(Or.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},fr=r(579),mr=r(580),gr=r(288),xr=r(581),pr=function(e,t,r){return Object(S.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},yr="shlink/visitCreation/CREATE_VISITS",Sr=function(e){return{type:yr,createdVisits:e}},Cr="shlink/deleteShortUrl/DELETE_SHORT_URL_START",Nr="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",kr="shlink/deleteShortUrl/SHORT_URL_DELETED",wr="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",_r={shortCode:"",loading:!1,error:!1},Ur=ut((We={},Object(u.a)(We,Cr,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(We,Nr,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(We,kr,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(We,wr,(function(){return _r})),We),_r),Tr=function(e){return function(t,r){return function(){var n=Object(g.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:Cr}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:kr,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:Nr,errorData:dr(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},Rr=dt(wr),Er="shlink/createShortUrl/CREATE_SHORT_URL_START",Dr="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",Lr="shlink/createShortUrl/CREATE_SHORT_URL",Vr="shlink/createShortUrl/RESET_CREATE_SHORT_URL",Ir={result:null,saving:!1,error:!1},Fr=ut((qe={},Object(u.a)(qe,Er,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(qe,Dr,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(qe,Lr,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(qe,Vr,(function(){return Ir})),qe),Ir),Ar=function(e){return function(t){return function(){var r=Object(g.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:Er}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Lr,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:Dr,errorData:dr(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Mr=dt(Vr),Gr=r(38),Pr="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Br="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Hr="shlink/shortUrlEdition/SHORT_URL_EDITED",Wr=ut((ze={},Object(u.a)(ze,Pr,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(ze,Br,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(ze,Hr,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),ze),{saving:!1,error:!1}),qr=function(e){return function(t,r,n){return function(){var c=Object(g.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:Pr}),i=s(),o=i.selectedServer,l=!Object(Gr.k)(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(L.a)(b,1),O=h[0],a({shortUrl:O,type:Hr}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Br,errorData:dr(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},zr="shlink/shortUrlsList/LIST_SHORT_URLS_START",Qr="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Kr="shlink/shortUrlsList/LIST_SHORT_URLS",Jr=ut((Qe={},Object(u.a)(Qe,zr,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Qe,Qr,(function(){return{loading:!1,error:!0}})),Object(u.a)(Qe,Kr,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Qe,kr,Object(F.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(fr.a)(["shortUrls","data"],Object(y.a)((function(e){return pr(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(fr.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Qe,yr,(function(e,t){var r,n,c=t.createdVisits;return Object(fr.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(mr.a)(c.filter((function(t){var r=t.shortUrl;return r&&pr(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(gr.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Qe,Lr,Object(F.a)((function(e,t){var r=t.result;return e.shortUrls?Object(fr.a)(["shortUrls","data"],[r].concat(Object(De.a)(Object(xr.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(fr.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Qe,Hr,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(fr.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return pr(e,t,n)?r:e})),e):e})),Qe),{loading:!0,error:!1}),Zr=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(g.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:zr}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Kr,shortUrls:i}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Qr});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Yr=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=P()({"short-urls-table__header-cell--with-action":!!r}),b=P()("short-urls-table__header-cell",j),h=P()("table table-hover",o),O=Object(Gr.j)(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(C.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)}))})]})}},Xr=r(582),$r=r(217),en=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(J,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(W.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(W.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},tn=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(J,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(W.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(W.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(W.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(W.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},rn=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(M.useState)(300),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(0),O=Object(L.a)(h,2),v=O[0],f=O[1],x=Object(M.useState)("png"),p=Object(L.a)(x,2),y=p[0],S=p[1],k=Object(M.useState)("L"),w=Object(L.a)(k,2),_=w[0],U=w[1],T=Object(M.useMemo)((function(){return{useSizeInPath:!Object(Gr.h)(l),marginIsSupported:Object(Gr.g)(l),errorCorrectionIsSupported:Object(Gr.i)(l)}}),[l]),R=T.marginIsSupported!==T.errorCorrectionIsSupported,E=Object(M.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(N.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(C.a)(d)?"":"?".concat(d))}(c,{size:j,format:y,margin:v,errorCorrection:_},T)}),[c,j,y,v,_,T]),D=Object(M.useMemo)((function(){return j+v}),[j,v]),F=Object(M.useMemo)((function(){if(!(D<500))return D<800?"lg":"xl"}),[D]);return Object(a.jsxs)(rr.a,{isOpen:o,toggle:i,centered:!0,size:F,children:[Object(a.jsxs)(nr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(Gt.a,{href:c,children:c})]}),Object(a.jsxs)(cr.a,{children:[Object(a.jsxs)(or.a,{children:[Object(a.jsxs)(Xr.a,{className:P()({"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)(Xr.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)(Xr.a,{className:R?"col-md-4":"col-md-6",children:Object(a.jsx)(en,{format:y,setFormat:S})}),T.errorCorrectionIsSupported&&Object(a.jsx)(Xr.a,{className:"col-md-6",children:Object(a.jsx)(tn,{errorCorrection:_,setErrorCorrection:U})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(Gt.a,{href:E}),Object(a.jsx)(Ht,{text:E})]}),Object(a.jsx)("img",{src:E,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)($r.a,{block:!0,color:"primary",onClick:Object(g.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(E,"".concat(s,"-qr-code.").concat(y)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(I.a,{icon:V.q,className:"ml-1"})]})})})]})]})]})}},nn=r(585),cn=r(583),an=r(584),sn=r(611),on=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?sr.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(M.useRef)(Object(sn.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:P()("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})]})},ln=function(e){return Object(a.jsx)(on,Object(d.a)({type:"checkbox"},e))},un=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(rr.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(nr.a,{toggle:r,children:"Info"}),Object(a.jsxs)(cr.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"})]})]})]})},dn=function(){var e=Object(K.e)(),t=Object(L.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)(I.a,{icon:V.u,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(un,{isOpen:r,toggle:n})]})},jn=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(M.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(I.a,{icon:V.u})}),Object(a.jsx)(Qt.a,{target:function(){return s.current},placement:n,children:c})]})},bn=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(ln,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(jn,{placement:"right",children:r})]})},hn=Object(F.a)(cn.a,Object(an.a)(/ /g,"-")),On=function(e){return"string"===typeof e?Object(A.default)(e):e},vn=function(e){return{"col-sm-6":e,"col-sm-12":!e}},fn=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(M.useState)(o),b=Object(L.a)(j,2),h=b[0],O=b[1],v="edit"===c,f="create-basic"===c,x=Object(ir.c)(o.title),p=function(){var e=Object(ir.c)(h.title);return Object(ee.a)([[function(){return!e&&!x},function(){}],[function(){return!e&&x},function(){return null}],[te.a,function(){return h.title}]])()},y=Object(ir.b)(Object(g.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=le(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=le(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(ir.c)(h.maxVisits)?Number(h.maxVisits):null,title:p()})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(M.useEffect)((function(){O(o)}),[o]);var S=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]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Object(a.jsx)(Xr.a,Object(d.a)(Object(d.a)({},s),{},{children:Object(a.jsx)(nn.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))}))},N=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)(ke,Object(d.a)({selected:h[e]?On(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))})},k=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Xr.a,{children:Object(a.jsx)(nn.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.jsxs)(or.a,{children:[f&&S("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),Object(a.jsx)(Xr.a,{className:f?"col-lg-6":"col-12 mb-0",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(hn)}))}})})]})]}),w=Object(Gr.j)(l),_=w||!v,U=P()("mb-3",vn(_)),T=Object(Gr.b)(l),R=Object(Gr.e)(l),E=T||R,D=P()("mb-3",vn(E));return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:y,children:[f&&k,!f&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(lr.a,{title:"Basic options",className:"mb-3",children:k}),Object(a.jsxs)(or.a,{children:[_&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(lr.a,{title:"Customize the short URL",children:[w&&S("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(or.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:S("customSlug","Custom slug","text",{disabled:Object(ir.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:S("shortCodeLength","Short code length","number",{min:4,disabled:Object(ir.c)(h.customSlug)})})]}),Object(a.jsx)(Xr.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:U,children:Object(a.jsxs)(lr.a,{title:"Limit access to the short URL",children:[S("maxVisits","Maximum number of visits allowed","number",{min:1}),N("validSince","Enabled since...",{maxDate:h.validUntil?On(h.validUntil):void 0}),N("validUntil","Enabled until...",{minDate:h.validSince?On(h.validSince):void 0})]})})]}),Object(a.jsxs)(or.a,{children:[Object(a.jsx)("div",{className:D,children:Object(a.jsxs)(lr.a,{title:"Extra checks",children:[Object(a.jsx)(bn,{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)(ln,{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)(dn,{})]})]})}),E&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(lr.a,{title:"Configure behavior",children:[T&&Object(a.jsx)(bn,{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"}),R&&Object(a.jsx)(bn,{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)($r.a,{outline:!0,color:"primary",disabled:s||Object(C.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},mn=r(54),gn=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,x=d.error,p=d.errorData,y=Object(N.a)(s).domain,S=Object(M.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]),C=Object(K.e)(),k=Object(L.a)(C,4),w=k[0],_=k[2],U=k[3];return Object(M.useEffect)((function(){u(c.shortCode,y)}),[]),b?Object(a.jsx)(mn.a,{loading:!0}):h?Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{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)(Le.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)($r.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(Gt.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(g.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)}}()}),x&&Object(a.jsx)(ur,{type:"error",className:"mt-3",children:Object(a.jsx)(br,{errorData:p,fallbackMessage:"An error occurred while updating short URL :("})}),w&&Object(a.jsx)(ur,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},xn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",pn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",yn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",Sn={loading:!1,error:!1},Cn=ut((Ke={},Object(u.a)(Ke,xn,(function(){return{loading:!0,error:!1}})),Object(u.a)(Ke,pn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Ke,yn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},Sn)})),Ke),Sn),Nn=function(e){return function(t,r){return function(){var n=Object(g.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:xn}),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 pr(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:yn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:pn,errorData:dr(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},kn=function(e,t,r){e.serviceFactory("ShortUrlsList",Mt,"ShortUrlsTable","SearchBar"),e.decorator("ShortUrlsList",t(["selectedServer","mercureInfo","shortUrlsList","settings"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Yr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",Yt,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",er,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",vr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",fn,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",tr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",gn,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return hr})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",rn,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",Ee,"ColorGenerator"),e.decorator("SearchBar",r),e.serviceFactory("listShortUrls",Zr,"buildShlinkApiClient"),e.serviceFactory("createShortUrl",Ar,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return Mr})),e.serviceFactory("deleteShortUrl",Tr,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return Rr})),e.serviceFactory("getShortUrlDetail",Nn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",qr,"buildShlinkApiClient")},wn=r(289),_n=r.n(wn),Un=r(60),Tn=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(M.useRef)(null!==c&&void 0!==c?c:Object(sn.a)());return Object(a.jsxs)(Xr.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)}})]})},Rn=function(e){return Object(a.jsx)(Tn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},En=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(M.useState)(""),i=Object(L.a)(s,2),o=i[0],l=i[1],u=Object(M.useState)(""),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(""),O=Object(L.a)(h,2),v=O[0],f=O[1],m=Object(ir.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(M.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)(lr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(Rn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(Rn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(Rn,{value:v,onChange:f,children:"API key"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},Dn=function(e){var t=e.type;return Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(ur,{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."]})})},Ln=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(L.a)(u,2),b=j[0],h=j[1],O=t(!1,4e3),v=Object(L.a)(O,2),f=v[0],m=v[1];return Object(a.jsxs)(Un.a,{children:[Object(a.jsxs)(En,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(sn.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)($r.a,{outline:!0,onClick:o,children:"Cancel"}),Object(a.jsx)($r.a,{outline:!0,color:"primary",className:"ml-2",children:"Create server"})]}),b&&Object(a.jsx)(Dn,{type:"success"}),f&&Object(a.jsx)(Dn,{type:"error"})]})}},Vn=r(559),In=function(e){var t=e.servers,r=e.selectedServer,n=Object(Vn.a)(t);return Object(a.jsxs)(Ve.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(z.a,{nav:!0,caret:!0,children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(Q.a,{right:!0,children:Object(C.a)(n)?Object(a.jsxs)(W.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.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)(W.a,{tag:o.b,to:"/server/".concat(n),active:Object(v.a)(r)===n,children:t},n)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{tag:o.b,to:"/manage-servers",children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Manage servers"})]})]})})]})},Fn=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)(rr.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(nr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(cr.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)(ar.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"})]})]})},An=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(K.e)(),o=Object(L.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)(I.a,{fixedWidth:!0,icon:V.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})]})}},Mn=r(151),Gn=function(e){return Object(Mn.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)(Un.a,{children:Object(a.jsxs)(En,{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)($r.a,{outline:!0,className:"mr-2",onClick:n,children:"Cancel"}),Object(a.jsx)($r.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},Pn=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(M.useRef)(),O=function(){var e=Object(g.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(F.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)($r.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)(I.a,{icon:V.r,fixedWidth:!0})," ",null!==c&&void 0!==c?c:"Import from file"]}),Object(a.jsxs)(Qt.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})]})}},Bn=r(542),Hn=r(70),Wn="shlink/selectedServer/SELECT_SERVER",qn="shlink/selectedServer/RESET_SELECTED_SERVER",zn=Object(F.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Hn.c)("1.0.0")),Qn=Object(Bn.a)(sr.a,function(){var e=Object(g.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:zn(t),printableVersion:Object(Hn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Kn=ut((Je={},Object(u.a)(Je,qn,(function(){return null})),Object(u.a)(Je,Wn,(function(e,t){return t.selectedServer})),Je),null),Jn=dt(qn),Zn=function(e,t){return function(r){return function(){var n=Object(g.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(Jn()),s=a(),i=s.servers,o=i[r]){n.next=6;break}return c({type:Wn,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 6:return n.prev=6,l=e(o),u=l.health,n.next=10,Qn(r,u);case 10:j=n.sent,b=j.version,h=j.printableVersion,c({type:Wn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{version:b,printableVersion:h})}),c(t()),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(6),c({type:Wn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{serverNotReachable:!0})});case 20:case"end":return n.stop()}}),n,null,[[6,17]])})));return function(e,t){return n.apply(this,arguments)}}()}},Yn=r(586),Xn=r(152),$n=r(314),ec="shlink/servers/EDIT_SERVER",tc="shlink/servers/DELETE_SERVER",rc="shlink/servers/CREATE_SERVERS",nc="shlink/servers/SET_AUTO_CONNECT",cc=ut((Ze={},Object(u.a)(Ze,rc,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ze,tc,(function(e,t){var r=t.serverId;return Object(lt.a)(r,e)})),Object(u.a)(Ze,ec,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(gr.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Object(u.a)(Ze,nc,(function(e,t){var r=t.serverId,n=t.autoConnect;return e[r]?n?Object(Yn.a)(Object(Ie.a)(e).map((function(e){var t=Object(L.a)(e,2),n=t[0],c=t[1];return[n,Object(d.a)(Object(d.a)({},c),{},{autoConnect:n===r})]}))):Object(gr.a)(r,Object(d.a)(Object(d.a)({},e[r]),{},{autoConnect:n}),e):e})),Ze),{}),ac=Object(Xn.a)((function(e,t){return Object(gr.a)(t.id,t,e)}),{}),sc=Object(F.a)(Object($n.a)((function(e){return e.id?e:Object(gr.a)("id",Object(sn.a)(),e)})),ac,(function(e){return{type:rc,newServers:e}})),ic=function(e){return sc([e])},oc=function(e,t){return{type:ec,serverId:e,serverData:t}},lc=function(e){var t=e.id;return{type:tc,serverId:t}},uc=function(e,t){var r=e.id;return{type:nc,serverId:r,autoConnect:t}},dc=Object(F.a)(Object(O.a)("data"),(function(e){return Array.isArray(e)?e.filter(v.b):[]})),jc=function(e){var t=e.get;return function(){return function(){var e=Object(g.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=dc(n),r(sc(c));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},bc=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(Hn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},hc=r(165),Oc=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(Un.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(mn.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)(hc.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"}),"."]})})]})})}},vc=r(102),fc=r(587),mc=r(588),gc=r(543),xc=r(544),pc=function(e,t,r){return Pe((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,g=h.loading,x=h.visitsCount,p=h.orphanVisitsCount,y=Object(v.a)(d),S=Object(b.g)();return Object(M.useEffect)((function(){i({itemsPerPage:5,orderBy:{field:"dateCreated",dir:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(or.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Le.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(mc.a,{tag:"h2",children:g?"Loading...":Rt(x)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Le.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/orphan-visits"),children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(mc.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:g?"Loading...":Rt(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)(Le.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/list-short-urls/1"),children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(mc.a,{tag:"h2",children:O?"Loading...":Rt(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)(Le.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/manage-tags"),children:[Object(a.jsx)(fc.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(mc.a,{tag:"h2",children:m?"Loading...":Rt(u.tags.length)})]})})]}),Object(a.jsxs)(Le.a,{className:"mb-3",children:[Object(a.jsxs)(gc.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)(xc.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(Le.a,{children:[Object(a.jsxs)(gc.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)(xc.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[Be.visits,Be.orphanVisits]}))},yc=function(e,t,r,n){return function(c){var s=c.servers,i=Object.values(s),l=Object(M.useState)(i),u=Object(L.a)(l,2),d=u[0],j=u[1],b=d.some((function(e){return!!e.autoConnect})),h=r(!1,4e3),O=Object(L.a)(h,2),v=O[0],f=O[1];return Object(M.useEffect)((function(){j(Object.values(s))}),[s]),Object(a.jsxs)(Un.a,{children:[Object(a.jsx)(B,{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)(or.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)($r.a,{outline:!0,className:"ml-2 flex-fill",onClick:Object(g.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)(I.a,{icon:V.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)($r.a,{outline:!0,color:"primary",className:"flex-fill",tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.E,fixedWidth:!0})," Add a server"]})})]}),Object(a.jsx)(lr.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)(ur,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})}},Sc=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)(I.a,{icon:V.h,className:"text-primary",id:"autoConnectIcon"}),Object(a.jsx)(Qt.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})})]})}},Cc=function(e){return function(t){var r=t.server,n=t.setAutoConnect,c=Object(K.e)(),s=Object(L.a)(c,2),i=s[0],l=s[1],u=Object(K.e)(),d=Object(L.a)(u,4),j=d[0],b=d[2],h=d[3],O="/server/".concat(r.id),v=r.autoConnect,f=v?V.b:Ne.b;return Object(a.jsxs)($t,{isOpen:i,toggle:l,children:[Object(a.jsxs)(W.a,{tag:o.b,to:O,children:[Object(a.jsx)(I.a,{icon:V.D,fixedWidth:!0})," Connect"]}),Object(a.jsxs)(W.a,{tag:o.b,to:"".concat(O,"/edit"),children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit server"]}),Object(a.jsxs)(W.a,{onClick:function(){return n(r,!r.autoConnect)},children:[Object(a.jsx)(I.a,{icon:f,fixedWidth:!0})," ",v?"Do not a":"A","uto-connect"]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"dropdown-item--danger",onClick:b,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Remove server"]}),Object(a.jsx)(e,{redirectHome:!1,server:r,isOpen:j,toggle:h})]})}},Nc=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},kc=function(e){return Array.isArray(e)&&e.every(Nc)},wc=function e(t,r){var n=this;Object(x.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(g.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(!kc(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)}}()},_c=r(103),Uc=function e(t,r,n){var c=this;Object(x.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(g.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(Vn.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(v.f);try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(_c.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},Tc=function(e,t,r){e.serviceFactory("ManageServers",yc,"ServersExporter","ImportServersBtn","useStateFlagTimeout","ManageServersRow"),e.decorator("ManageServers",t(["servers"])),e.serviceFactory("ManageServersRow",Sc,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Cc,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Ln,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",vc.a),e.decorator("CreateServer",t(["selectedServer","servers"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",Gn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",(function(){return In})),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return Fn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",An,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Pn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return bc})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",Oc,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",pc,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",_n.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",wc,"csvjson","fileReaderFactory"),e.service("ServersExporter",Uc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Zn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return ic})),e.serviceFactory("createServers",(function(){return sc})),e.serviceFactory("deleteServer",(function(){return lc})),e.serviceFactory("editServer",(function(){return oc})),e.serviceFactory("setAutoConnect",(function(){return uc})),e.serviceFactory("fetchServers",jc,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Jn}))},Rc=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)(Le.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)($r.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(I.a,{icon:V.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)(Zt,{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})]})})},Ec=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)(Gt.a,{href:u})]});return Object(a.jsxs)(Rc,{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)(zt,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(Qt.a,{placement:"bottom",target:"created",children:Object(a.jsx)(zt,{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)(Gt.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},Dc=r(604),Lc=r(556),Vc=r(605),Ic=r(554),Fc=r(112),Ac=r(593),Mc=r(594),Gc=r(596),Pc=r(590),Bc=r(293),Hc=r(591),Wc=r(315),qc=r(92),zc=r(592),Qc=r(595),Kc=r(292),Jc=r.n(Kc),Zc=r(589),Yc="Others",Xc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],$c=function(e){var t,r;return Object(ir.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"},ea=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(Zc.a)(t,t.map((function(){return 0})))),e))},ta=function(e){return Object(a.jsx)(on,Object(d.a)({type:"switch"},e))},ra=function(e,t){var r=e.native,n=Object(L.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},na=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(Rt(r))},ca=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(Rt(r))},aa=r(46),sa={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},ia={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},oa={hourly:Pc.a,daily:Bc.a,weekly:Hc.a,monthly:Wc.a},la={hourly:function(e){return Object(re.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(re.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(re.default)(Object(qc.a)(e),"yyyy-MM-dd"),r=Object(re.default)(Object(zc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(re.default)(e,"yyyy-MM")}},ua=function(e,t){return Object(Mc.a)((function(t){return la[e](Object(A.default)(t.date))}),t)},da=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=oa[e],n=la[e],c=Object(A.default)(t[0].date),a=Object(A.default)(t[t.length-1].date),s=r(c,a),i=ia[e];return[n(a)].concat(Object(De.a)(Object(ir.e)(s,(function(e){return n(Object(Qc.a)(a,i(e)))}))))}(r,e);return[c,ea(t,c)]},ja=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},ba=null,ha=function(e,t,r){return function(n){var c=Object(L.a)(n,1)[0];if(r&&c){var a,s=c.index;if(ba===e[s])r([]),ba=null;else r(e[s]&&t[e[s]]||[]),ba=null!==(a=e[s])&&void 0!==a?a:null}}},Oa=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(M.useState)(r.length>0?function(e){var t,r=new Date,n=Object(A.default)(e);return null!==(t=Object(ee.a)([[function(){return Object(Bc.a)(r,n)<=2},Object(Ac.a)("hourly")],[function(){return Object(Wc.a)(r,n)<=1},Object(Ac.a)("daily")],[function(){return Object(Wc.a)(r,n)<=6},Object(Ac.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(L.a)(o,2),u=l[0],d=l[1],j=Object(K.e)(!0),b=Object(L.a)(j,2),h=b[0],O=b[1],v=Object(M.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=la[e](Object(A.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(M.useMemo)((function(){return ua(u,Object(Gc.a)(r))}),[u,r]),m=Object(M.useMemo)((function(){return da(r,f,u,h)}),[r,u,h]),g=Object(L.a)(m,2),x=g[0],p=g[1],y=Object(M.useMemo)((function(){return ea(ua(u,Object(Gc.a)(n)),x)}),[n,u,x]),S=function(){var e=ja(p,"Visits",aa.c);return 0===n.length?[e]:[e,ja(y,s,aa.a)]},C={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:na}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:Rt}},x:{title:{display:!0,text:sa[u]}}},onHover:ra},N=function(){return Object(a.jsx)(Fc.c,{data:{labels:x,datasets:S()},options:C,getElementAtEvent:ha(x,v,i)})};return Object(a.jsxs)(Le.a,{children:[Object(a.jsxs)(gc.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(Ve.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(Q.a,{right:!0,children:Object.entries(sa).map((function(e){var t=Object(L.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(W.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)(ta,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(xc.a,{className:"line-chart-card__body",children:[n.length>0&&N(),0===n.length&&N()]})]})},va=r(597),fa=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!Lt(e)&&n(e)}};return Object(a.jsxs)(Nt.a,{listClassName:P()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(St.a,{disabled:r<=1,children:Object(a.jsx)(Ct.a,{previous:!0,tag:"span",onClick:i(r-1)})}),Dt(r,t).map((function(e,t){return Object(a.jsx)(St.a,{disabled:Lt(e),active:r===e,children:Object(a.jsx)(Ct.a,{tag:"span",onClick:i(e),children:Vt(e)})},It(e,t))})),Object(a.jsx)(St.a,{disabled:r>=t,children:Object(a.jsx)(Ct.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},ma=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(p.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)}))},ga=function(e,t,r){var n=function(e,t){return Ae(t,e)}(r,t?ma(t,e):Object(De.a)(e)),c=n.length;return{visitsGroups:Object(va.a)(20,n),total:c}},xa=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(M.useState)(h()),v=Object(L.a)(O,2),f=v[0],m=v[1],g=Object(M.useState)(void 0),x=Object(L.a)(g,2),p=x[0],y=x[1],S=Object(M.useState)({}),C=Object(L.a)(S,2),N=C[0],k=C[1],w=Object(M.useMemo)((function(){return ga(n,p,N)}),[p,N]),_=Object(M.useRef)(!0),U=Object(M.useState)(1),T=Object(L.a)(U,2),R=T[0],E=T[1],D=20*R,F=D-20,A=Object(Gr.a)(o),G=7+Number(A)+Number(j),H=function(e){return function(){return k({field:e,dir:Fe(e,N.field,N.dir)})}},W=function(e){return Object(a.jsx)(He,{currentOrder:N,field:e,className:"visits-table__header-icon"})};return Object(M.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(M.useEffect)((function(){E(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})})}),A&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(I.a,{icon:V.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:G,className:"p-0",children:Object(a.jsx)(B,{noBorder:!0,large:!1,onChange:y})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=w.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,className:"text-center",children:"No visits found with current filtering"})}),null===(r=w.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:P()({"table-active":r}),onClick:function(){return i(r?s.filter((function(t){return t!==e})):[].concat(Object(De.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(I.a,{icon:V.h,className:"text-primary"})}),A&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.G,id:"botIcon".concat(t)}),Object(a.jsx)(Qt.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(zt,{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)}))]}),w.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,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)(fa,{pagesCount:Math.ceil(w.total/20),currentPage:R,setCurrentPage:E,centered:f})}),Object(a.jsx)("div",{className:P()("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:Rt(F+1)})," to"," ",Object(a.jsx)("b",{children:Rt(Object(_t.a)(D,w.total))})," of"," ",Object(a.jsx)("b",{children:Rt(w.total)})]})})]})})})})]})},pa=r(617),ya=r(598),Sa=r(599),Ca=r(600),Na=function(){return Object(a.jsx)(pa.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ka=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(L.a)(e,1)[0].latLong}},wa=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(rr.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(cr.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)(ya.a,Object(d.a)(Object(d.a)({},ka(s)),{},{children:[Object(a.jsx)(Na,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Sa.a,{position:n,children:Object(a.jsxs)(Ca.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},_a=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(K.e)(),i=Object(L.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(K.e)(),j=Object(L.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(M.useState)([]),f=Object(L.a)(v,2),m=f[0],g=f[1],x=Object(M.useRef)(),p=function(e){return function(){g(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:x,onClick:function(){if(!r)return g(c),void l();O()},children:Object(a.jsx)(I.a,{icon:V.x})}),Object(a.jsx)(Qt.a,{placement:"left",target:function(){return x.current},children:"Show in map"}),Object(a.jsx)(q.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(Q.a,{right:!0,children:[Object(a.jsx)(W.a,{onClick:p(!1),children:"Show all locations"}),Object(a.jsx)(W.a,{onClick:p(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(wa,{toggle:u,isOpen:o,title:t,locations:m})]})},Ua=r(601),Ta=function(e){return e.hasOwnProperty("visitedUrl")},Ra=Object(F.a)(Object(Ua.a)((function(e){return Ta(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),Ea=function(e,t){return Object(Mc.a)(Object(O.a)(t),e)},Da=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)&&le(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)&&le(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}},La=function(e,t){return!Object(S.a)(e)&&Object(ir.c)(e[t])},Va=function(e){return"number"===typeof e?e:e?parseFloat(e):0},Ia=function(e){return function(t,r){var n=La(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Fa=Ia("country"),Aa=Ia("city"),Ma=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),Fa(e.countries,t),Aa(e.cities,t),function(e,t){if(La(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[Va(n),Va(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:{}})},Ga=Object($n.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(ir.c)(e))return{browser:Yc,os:Yc};var t=Jc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:Yc,browser:r&&Xc.includes(r)?r:Yc}}(t)),{},{referer:$c(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 Ta(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Pa=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)(J,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Bots:"}),Object(a.jsx)(W.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)(W.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!Object(ir.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},Ba=r(61),Ha=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(L.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)}))})},Wa=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(aa.h)()?aa.e:aa.f,borderWidth:2}]},qa=Object(M.memo)((function(e){var t=e.stats,r=Object(M.useState)(),n=Object(L.a)(r,2),c=n[0],s=n[1],i=Object(Ba.a)(t),o=Object(Vn.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:ca}}}},u=function(e,t){return{labels:e,datasets:Wa(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)(Fc.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)(Ha,{chart:c})})]})})),za=r(602),Qa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(Le.a,{children:[Object(a.jsx)(gc.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(xc.a,{children:n}),r&&Object(a.jsx)(za.a,{className:"chart-card__footer--sticky",children:r})]})},Ka=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(Qa,{title:t,children:Object(a.jsx)(qa,{stats:r})})},Ja=r(126),Za=r(610),Ya=r(603),Xa=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(Ve.a,{children:[Object(a.jsx)(z.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)(W.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},$a=function(e){return e.startsWith("hidden")?"":e},es=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:aa.d,borderColor:aa.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:aa.b,borderColor:aa.a,borderWidth:2}]},ts=function(e,t){return function(r){var n=Object(L.a)(r,1)[0];t&&n&&t(e[n.index])}},rs=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ba.a)(t).map($a),o=Object(Vn.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ba.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=ea(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:na}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:Rt}},y:{stacked:!0}},onHover:ra,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:es(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)(Fc.a,{data:j,options:u,height:b,getElementAtEvent:ts(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")]})},ns=function(e){return"String"===Object(Ja.a)(e)?Object(Za.a)(e):e},cs=function(e){return Object(L.a)(e,1)[0]},as=function(e){return Object(L.a)(e,2)[1]},ss=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(p.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(M.useState)({}),j=Object(L.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(1),v=Object(L.a)(O,2),f=v[0],m=v[1],g=Object(M.useState)(50),x=Object(L.a)(g,2),y=x[0],S=x[1],C=function(e){var t=e[f-1];if(f0?r:void 0,c),k=N.currentPageStats,w=N.currentPageHighlightedStats,_=N.pagination,U=N.max,T=Object.keys(k);return Object(a.jsx)(Qa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Me,{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)(Xa,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:y,setValue:function(e){S(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(_?T:void 0)})]})},footer:_,children:Object(a.jsx)(rs,Object(d.a)({stats:k,highlightedStats:w,max:U},l))})},is={byTime:{title:"By time",subPath:"",icon:V.d},byContext:{title:"By context",subPath:"/by-context",icon:V.g},byLocation:{title:"By location",subPath:"/by-location",icon:V.x},list:{title:"List",subPath:"/list",icon:V.w}},os=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(Lc.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)(I.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},ls=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=c.visits,m=c.loading,g=c.loadingLarge,x=c.error,p=c.errorData,y=c.progress,S=c.fallbackInterval,N=Object(M.useState)(null!==(t=null!==S&&void 0!==S?S:null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days"),k=Object(L.a)(N,2),w=k[0],_=k[1],U=Object(M.useState)(pe(w)),T=Object(L.a)(U,2),R=T[0],E=T[1],D=Object(M.useState)([]),F=Object(L.a)(D,2),A=F[0],G=F[1],B=Object(M.useState)(),H=Object(L.a)(B,2),W=H[0],q=H[1],z=Object(M.useState)({}),Q=Object(L.a)(z,2),K=Q[0],J=Q[1],Z=Object(Gr.a)(h),Y=Object(M.useRef)(!0),X=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},$=Object(M.useMemo)((function(){return Ga(f)}),[f]),ee=Object(M.useMemo)((function(){return Ma($)}),[$]),te=ee.os,re=ee.browsers,ne=ee.referrers,ce=ee.countries,ae=ee.cities,se=ee.citiesForMap,ie=ee.visitedUrls,oe=Object(Vn.a)(se),le=function(e){Ye=void 0,G(e)},ue=function(e){return function(t){var r="".concat(e,"_").concat(t);Ye===r?(G([]),q(void 0),Ye=void 0):(G($.filter(Object(Dc.a)(e,t))),q(t),Ye=r)}};Object(M.useEffect)((function(){return i}),[]),Object(M.useEffect)((function(){s({dateRange:R,filter:K},Y.current),Y.current=!1}),[R,K]),Object(M.useEffect)((function(){S&&_(S)}),[S]);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)(Ue,{updatable:!0,disabled:m,initialDateRange:w,defaultText:"All visits",onDatesChange:E})}),Object(a.jsx)(Pa,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:Z,selected:K,onChange:J})]})}),f.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)($r.a,{outline:!0,disabled:0===A.length,className:"btn-md-block mr-2",onClick:function(){return le([])},children:["Clear selection ",A.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",Rt(A.length),")"]})]}),Object(a.jsxs)($r.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j($)},children:[Object(a.jsx)(I.a,{icon:V.q})," Export (",Rt($.length),")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:g?Object(a.jsxs)(mn.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(Vc.a,{value:y,striped:100===y,className:"mt-3"})]}):m?Object(a.jsx)(mn.a,{loading:!0}):x?Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{errorData:p,fallbackMessage:"An error occurred while loading visits :("})}):Object(C.a)(f)?Object(a.jsx)(mn.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Le.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(Ic.a,{pills:!0,fill:!0,children:Object.entries(is).map((function(e){var t=Object(L.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(os,Object(d.a)(Object(d.a)({},n),{},{to:X(n.subPath)}),r)}))})}),Object(a.jsx)(or.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)(Oa,{title:"Visits during time",visits:$,highlightedVisits:A,highlightedLabel:W,setSelectedVisits:le})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(is.byContext.subPath),children:[Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ka,{title:"Operating systems",stats:te})}),Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ka,{title:"Browsers",stats:re})}),Object(a.jsx)("div",{className:P()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(ss,{title:"Referrers",stats:ne,withPagination:!1,highlightedStats:Ea(A,"referer"),highlightedLabel:W,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ue("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(ss,{title:"Visited URLs",stats:ie,highlightedLabel:W,highlightedStats:Ea(A,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ue("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(is.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(ss,{title:"Countries",stats:ce,highlightedStats:Ea(A,"country"),highlightedLabel:W,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ue("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(ss,{title:"Cities",stats:ae,highlightedStats:Ea(A,"city"),highlightedLabel:W,extraHeaderContent:function(e){return oe.length>0&&Object(a.jsx)(_a,{modalTitle:"Cities",locations:oe,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ue("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(is.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(xa,{visits:$,selectedVisits:A,setSelectedVisits:le,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},us=function(e){var t=e.exportVisits;return Pe((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(N.a)(i).domain;return Object(M.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(ls,{getVisits:function(e,t){return u(v,Object(d.a)(Object(d.a)({},Da(e)),{},{domain:f}),t)},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)(Ec,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[Be.shortUrlVisits(t.params.shortCode)]}))},ds=r(615),js=5e3,bs=function(e){return e.currentPage>=e.pagesCount},hs=function(e,t){return 100*t/e},Os=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n,c,a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a({type:c.start}),i=function(){var e=Object(g.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(g.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,js).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(ds.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(g.a)(m.a.mark((function e(t){var r,n,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,!s()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,i(t[r]);case 5:if(n=e.sent,a({type:c.progress,progress:hs(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,js);case 3:if(n=e.sent,s=n.pagination,i=n.data,s&&!bs(s)){e.next=8;break}return e.abrupt("return",i);case 8:return l=Object(kt.a)(2,s.pagesCount+1),u=Object(va.a)(4,l),s.pagesCount-1>4&&a({type:c.large}),e.t0=i,e.next=14,o(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,Promise.all([l(),r()]);case 7:u=e.sent,j=Object(L.a)(u,2),b=j[0],h=j[1],a(!b.length&&h?{type:c.fallbackToInterval,fallbackInterval:ye(h.date)}:Object(d.a)(Object(d.a)({},n),{},{visits:b,type:c.finish})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),a({type:c.error,errorData:dr(e.t0)});case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t,r,n,c,a,s){return e.apply(this,arguments)}}(),vs=function(e,t){return e?Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t({page:1,itemsPerPage:1}).then((function(e){return e.data[0]})));case 1:case"end":return e.stop()}}),e)}))):Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(void 0));case 1:case"end":return e.stop()}}),e)})))},fs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",ms="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",gs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",xs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",ps="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",ys="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",Ss="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL",Cs={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ns=ut((Xe={},Object(u.a)(Xe,fs,(function(){return Object(d.a)(Object(d.a)({},Cs),{},{loading:!0})})),Object(u.a)(Xe,ms,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Cs),{},{error:!0,errorData:r})})),Object(u.a)(Xe,gs,(function(e,t){var r=t.visits,n=t.query,c=t.shortCode,a=t.domain;return Object(d.a)(Object(d.a)({},e),{},{visits:r,shortCode:c,domain:a,query:n,loading:!1,error:!1})})),Object(u.a)(Xe,xs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(Xe,ps,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(Xe,ys,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(Xe,Ss,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(Xe,yr,(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&&pr(t,n,c)&&je(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(De.a)(u),Object(De.a)(a))})})),Xe),Cs),ks=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getShortUrlVisits,l=function(){var e=Object(g.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",o(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)}}(),u=vs(n,function(){var e=Object(g.a)(m.a.mark((function e(n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o(t,Object(d.a)(Object(d.a)({},n),{},{domain:r.domain})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().shortUrlVisits.cancelLoad},b={shortCode:t,query:r,domain:r.domain},h={start:fs,large:xs,finish:gs,error:ms,progress:ys,fallbackToInterval:Ss},c.abrupt("return",Os(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},ws=dt(ps),_s=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)(H,{text:s,colorGenerator:n})]});return Object(a.jsx)(Rc,{title:i,goBack:r,visits:c})},Us=function(e,t){var r=t.exportVisits;return Pe((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)(ls,{getVisits:function(e,t){return o(b,Da(e),t)},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)(_s,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[Be.visits]}))},Ts="shlink/tagVisits/GET_TAG_VISITS_START",Rs="shlink/tagVisits/GET_TAG_VISITS_ERROR",Es="shlink/tagVisits/GET_TAG_VISITS",Ds="shlink/tagVisits/GET_TAG_VISITS_LARGE",Ls="shlink/tagVisits/GET_TAG_VISITS_CANCEL",Vs="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",Is="shlink/tagVisits/GET_TAG_VISITS_FALLBACK_TO_INTERVAL",Fs={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},As=ut(($e={},Object(u.a)($e,Ts,(function(){return Object(d.a)(Object(d.a)({},Fs),{},{loading:!0})})),Object(u.a)($e,Rs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Fs),{},{error:!0,errorData:r})})),Object(u.a)($e,Es,(function(e,t){var r=t.visits,n=t.tag,c=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,tag:n,query:c,loading:!1,error:!1})})),Object(u.a)($e,Ds,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)($e,Ls,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)($e,Vs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)($e,Is,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)($e,yr,(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))&&je(r.date,i,o)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(l),Object(De.a)(c))})})),$e),Fs),Ms=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getTagVisits,l=function(){var e=Object(g.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",o(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)}}(),u=vs(n,function(){var e=Object(g.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",o(t,r));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().tagVisits.cancelLoad},b={tag:t,query:r},h={start:Ts,large:Ds,finish:Es,error:Rs,progress:Vs,fallbackToInterval:Is},c.abrupt("return",Os(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},Gs=dt(Ls),Ps=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(Rc,{title:"Orphan visits",goBack:r,visits:n})},Bs=function(e){var t=e.exportVisits;return Pe((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)(ls,{getVisits:function(e,t){var r;return c(Da(e),null===(r=e.filter)||void 0===r?void 0:r.orphanVisitsType,t)},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)(Ps,{orphanVisits:s,goBack:r})})}),(function(){return[Be.orphanVisits]}))},Hs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",Ws="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",qs="shlink/orphanVisits/GET_ORPHAN_VISITS",zs="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",Qs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",Ks="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",Js="shlink/orphanVisits/GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL",Zs={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ys=ut((et={},Object(u.a)(et,Hs,(function(){return Object(d.a)(Object(d.a)({},Zs),{},{loading:!0})})),Object(u.a)(et,Ws,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Zs),{},{error:!0,errorData:r})})),Object(u.a)(et,qs,(function(e,t){var r=t.visits,n=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,query:n,loading:!1,error:!1})})),Object(u.a)(et,zs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(et,Qs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(et,Ks,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(et,Js,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(et,yr,(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 je(t.date,s,i)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(o),Object(De.a)(n))})})),et),Zs),Xs=function(e,t){return!t||t===e.type},$s=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getOrphanVisits,l=function(){var e=Object(g.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",o(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return Ta(e)&&Xs(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)}}(),u=vs(n,o),j=function(){return s().orphanVisits.cancelLoad},b={query:t},h={start:Hs,large:zs,finish:qs,error:Ws,progress:Ks,fallbackToInterval:Js},c.abrupt("return",Os(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},ei=dt(Qs),ti="shlink/visitsOverview/GET_OVERVIEW_START",ri="shlink/visitsOverview/GET_OVERVIEW_ERROR",ni="shlink/visitsOverview/GET_OVERVIEW",ci={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},ai=ut((tt={},Object(u.a)(tt,ti,(function(){return Object(d.a)(Object(d.a)({},ci),{},{loading:!0})})),Object(u.a)(tt,ri,(function(){return Object(d.a)(Object(d.a)({},ci),{},{error:!0})})),Object(u.a)(tt,ni,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},ci),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(tt,yr,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(p.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=Ra(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),tt),ci),si=function(e){return function(){return function(){var t=Object(g.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:ti}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:ni},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:ri});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},ii=function e(t,r){var n=this;Object(x.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(_c.a)(n.window,r,e)}}},oi=function(e,t){e.serviceFactory("MapModal",(function(){return wa})),e.serviceFactory("ShortUrlVisits",us,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",Us,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Bs,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",ii,"window","csvjson"),e.serviceFactory("getShortUrlVisits",ks,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return ws})),e.serviceFactory("getTagVisits",Ms,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return Gs})),e.serviceFactory("getOrphanVisits",$s,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return ei})),e.serviceFactory("createNewVisits",(function(){return Sr})),e.serviceFactory("loadVisitsOverview",si,"buildShlinkApiClient")},li=r(294),ui=r.n(li),di=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},ji=function(e){return{id:e,name:e}},bi=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(M.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)(ui.a,{tags:c.map(ji),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(H,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map(ji),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(di,{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(De.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(De.a)(new Set([].concat(Object(De.a)(c),Object(De.a)(t.toLowerCase().split(","))))))}})}},hi=r(553),Oi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=n.displayed,l=n.toggle,u=Object(K.e)(),d=Object(L.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(L.a)(h,2),f=O[0],m=O[1],g=Object(K.e)(),x=Object(L.a)(g,3),p=x[0],y=x[2],S=Object(M.useRef)(),C=Object(v.a)(s);return Object(M.useEffect)((function(){var e;(e=S.current)&&e.scrollWidth>e.clientWidth&&y()}),[S.current]),Object(a.jsxs)(Le.a,{className:"tag-card",children:[Object(a.jsxs)(gc.a,{className:"tag-card__header",children:[Object(a.jsx)($r.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:b,children:Object(a.jsx)(I.a,{icon:V.Q})}),Object(a.jsx)($r.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:m,children:Object(a.jsx)(I.a,{icon:V.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)(di,{tag:c.tag,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:l,children:c.tag})]})]}),Object(a.jsx)(hi.a,{isOpen:i,children:Object(a.jsxs)(xc.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)(I.a,{icon:V.v,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:Rt(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)(I.a,{icon:V.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:Rt(c.visits)})]})]})}),Object(a.jsx)(e,{tag:c.tag,toggle:b,isOpen:j}),Object(a.jsx)(t,{tag:c.tag,toggle:m,isOpen:f})]})}},vi=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(g.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)(rr.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(nr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(cr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(ur,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(br,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(ar.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"})]})]})},fi=r(606),mi=r(306),gi=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(M.useState)(r),u=Object(L.a)(l,2),d=u[0],j=u[1],b=Object(M.useState)(t(r)),h=Object(L.a)(b,2),O=h[0],v=h[1],f=Object(K.e)(),x=Object(L.a)(f,4),p=x[0],y=x[1],S=x[3],C=o.editing,N=o.error,k=o.errorData,w=Object(ir.b)(Object(g.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)(rr.a,{isOpen:i,toggle:c,centered:!0,onClosed:S,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsx)(nr.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(cr.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)(I.a,{icon:V.A,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(fi.a,{isOpen:p,toggle:y,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(mi.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(nn.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),N&&Object(a.jsx)(ur,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(br,{errorData:k,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(ar.a,{children:[Object(a.jsx)($r.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)($r.a,{color:"primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},xi={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},pi=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(J,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(W.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(I.a,{icon:V.O,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(W.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(I.a,{icon:V.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},yi=function(e,t){return Pe((function(r){var n,c,s,i,o=r.filterTags,l=r.forceListTags,u=r.tagsList,d=r.selectedServer,j=r.settings,b=Object(M.useState)(null!==(n=null===(c=j.tags)||void 0===c?void 0:c.defaultMode)&&void 0!==n?n:"cards"),h=Object(L.a)(b,2),O=h[0],v=h[1],f=Object(M.useState)(null!==(s=null===(i=j.tags)||void 0===i?void 0:i.defaultOrdering)&&void 0!==s?s:{}),m=Object(L.a)(f,2),g=m[0],x=m[1],p=Object(F.a)((function(){return u.filteredTags.map((function(e){var t,r,n,c;return{tag:e,shortUrls:null!==(t=null===(r=u.stats[e])||void 0===r?void 0:r.shortUrlsCount)&&void 0!==t?t:0,visits:null!==(n=null===(c=u.stats[e])||void 0===c?void 0:c.visitsCount)&&void 0!==n?n:0}}))}),(function(e){return Ae(e,g)}));if(Object(M.useEffect)((function(){l()}),[]),u.loading)return Object(a.jsx)(mn.a,{loading:!0});if(u.error)return Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{errorData:u.errorData,fallbackMessage:"Error loading tags :("})});var y=function(e){return function(){var t=Fe(e,g.field,g.dir);x({field:t?e:void 0,dir:t})}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:o}),Object(a.jsxs)(or.a,{className:"mb-3",children:[Object(a.jsx)("div",{className:"col-lg-6",children:Object(a.jsx)(pi,{mode:O,onChange:v})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3 mt-lg-0",children:Object(a.jsx)(Me,{items:xi,order:g,onChange:function(e,t){return x({field:e,dir:t})}})})]}),function(){if(u.filteredTags.length<1)return Object(a.jsx)(mn.a,{children:"No tags found"});var r=p();return"cards"===O?Object(a.jsx)(e,{sortedTags:r,selectedServer:d}):Object(a.jsx)(t,{sortedTags:r,selectedServer:d,currentOrder:g,orderByColumn:y})}()]})}),(function(){return[Be.visits]}))},Si="shlink/deleteTag/DELETE_TAG_START",Ci="shlink/deleteTag/DELETE_TAG_ERROR",Ni="shlink/deleteTag/DELETE_TAG",ki="shlink/deleteTag/TAG_DELETED",wi=ut((rt={},Object(u.a)(rt,Si,(function(){return{deleting:!0,error:!1}})),Object(u.a)(rt,Ci,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(rt,Ni,(function(){return{deleting:!1,error:!1}})),rt),{deleting:!1,error:!1}),_i=function(e){return function(t){return function(){var r=Object(g.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:Si}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:Ni}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:Ci,errorData:dr(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},Ui=function(e){return{type:ki,tag:e}},Ti="shlink/editTag/EDIT_TAG_START",Ri="shlink/editTag/EDIT_TAG_ERROR",Ei="shlink/editTag/EDIT_TAG",Di="shlink/editTag/TAG_EDITED",Li=ut((nt={},Object(u.a)(nt,Ti,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(nt,Ri,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(nt,Ei,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),nt),{oldName:"",newName:"",editing:!1,error:!1}),Vi=function(e,t){return function(r,n,c){return function(){var a=Object(g.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:Ti}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:Ei,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:Ri,errorData:dr(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},Ii=function(e,t,r){return{type:Di,oldName:e,newName:t,color:r}},Fi="shlink/tagsList/LIST_TAGS_START",Ai="shlink/tagsList/LIST_TAGS_ERROR",Mi="shlink/tagsList/LIST_TAGS",Gi="shlink/tagsList/FILTER_TAGS",Pi={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Bi=function(e,t){return function(r){return r===e?t:r}},Hi=function(e,t){return Object(y.a)((function(e){return e===t}),e)},Wi=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}),{}))},qi=ut((ct={},Object(u.a)(ct,Fi,(function(){return Object(d.a)(Object(d.a)({},Pi),{},{loading:!0})})),Object(u.a)(ct,Ai,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Pi),{},{error:!0,errorData:r})})),Object(u.a)(ct,Mi,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},Pi),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(ct,ki,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:Hi(e.tags,r),filteredTags:Hi(e.filteredTags,r)})})),Object(u.a)(ct,Di,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(Bi(r,n)).sort(),filteredTags:e.filteredTags.map(Bi(r,n)).sort()})})),Object(u.a)(ct,Gi,(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)(ct,yr,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=Wi(c),n=e.stats,r.reduce((function(e,t){var r=Object(L.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)))})})),ct),Pi),zi=function(e){return{type:Gi,searchTerm:e}},Qi=Math.ceil,Ki=function(e){return function(t){var r=t.sortedTags,n=t.selectedServer,c=Object(M.useState)(),s=Object(L.a)(c,2),i=s[0],o=s[1],l=r.length,u=Object(va.a)(Qi(l/4),r);return Object(a.jsx)(or.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)}))})}},Ji=function(e){return function(t){var r,n=t.sortedTags,c=t.selectedServer,s=t.location,i=t.orderByColumn,o=t.currentOrder,l=Object(M.useRef)(!0),u=Object(N.a)(s.search).page,d=void 0===u?1:u,j=Object(K.b)("page",Number(d)),b=Object(L.a)(j,2),h=b[0],O=b[1],v=Object(va.a)(20,n),f=v.length>1,m=null!==(r=v[h-1])&&void 0!==r?r:[];return Object(M.useEffect)((function(){!l.current&&O(1),l.current=!1}),[n]),Object(M.useEffect)((function(){scrollTo(0,0)}),[h]),Object(a.jsxs)(lr.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)(He,{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)(He,{currentOrder:o,field:"shortUrls"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("visits"),children:["Visits ",Object(a.jsx)(He,{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)(fa,{pagesCount:v.length,currentPage:h,setCurrentPage:O})})]},h)}},Zi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=Object(K.e)(),l=Object(L.a)(i,2),u=l[0],d=l[1],j=Object(K.e)(),b=Object(L.a)(j,2),h=b[0],O=b[1],f=Object(K.e)(),m=Object(L.a)(f,2),g=m[0],x=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)(di,{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:Rt(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:Rt(c.visits)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)($t,{toggle:x,isOpen:g,children:[Object(a.jsxs)(W.a,{onClick:O,children:[Object(a.jsx)(I.a,{icon:V.C,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(W.a,{onClick:d,children:[Object(a.jsx)(I.a,{icon:V.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})]})}},Yi=function(e,t){e.serviceFactory("TagsSelector",bi,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",Oi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return vi})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",gi,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",Ki,"TagCard"),e.serviceFactory("TagsTableRow",Zi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Ji,"TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",yi,"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(g.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(C.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:Fi}),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:Mi}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:Ai,errorData:dr(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 zi})),e.serviceFactory("tagDeleted",(function(){return Ui})),e.serviceFactory("tagEdited",(function(){return Ii})),e.serviceFactory("deleteTag",_i,"buildShlinkApiClient"),e.serviceFactory("editTag",Vi,"buildShlinkApiClient","ColorGenerator")},Xi=r(299),$i="shlink/mercure/GET_MERCURE_INFO_START",eo="shlink/mercure/GET_MERCURE_INFO_ERROR",to="shlink/mercure/GET_MERCURE_INFO",ro=ut((at={},Object(u.a)(at,$i,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(at,eo,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(at,to,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),at),{loading:!0,error:!1}),no=function(e){return function(){return function(){var t=Object(g.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:$i}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:eo}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:to,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:eo});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},co=function(e){e.serviceFactory("loadMercureInfo",no,"buildShlinkApiClient")},ao=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(lr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Xr.a,{children:Object(a.jsxs)(ta,{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)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{className:P()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(nn.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."]})]})]})},so=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(or.a,{children:e.map((function(t,r){return Object(a.jsx)("div",{className:"col-lg-".concat(12/e.length," mb-3"),children:t},r)}))},t)}))})},io=function(e,t,r,n,c,s){return function(){return Object(a.jsx)(Un.a,{children:Object(a.jsx)(so,{items:[[Object(a.jsx)(n,{}),Object(a.jsx)(c,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(r,{})],[Object(a.jsx)(s,{}),Object(a.jsx)(e,{})]]})})}},oo=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},lo=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)(lr.a,{title:"Short URLs form",className:"h-100",children:[Object(a.jsx)(Xr.a,{children:Object(a.jsxs)(ta,{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)(Xr.a,{children:Object(a.jsxs)(ta,{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)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(J,{text:oo(l.tagFilteringMode),children:[Object(a.jsx)(W.a,{active:!l.tagFilteringMode||"startsWith"===l.tagFilteringMode,onClick:u("startsWith"),children:oo("startsWith")}),Object(a.jsx)(W.a,{active:"includes"===l.tagFilteringMode,onClick:u("includes"),children:oo("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."]}))})]})]})},uo=function(e){var t=e.settings.ui,r=e.setUiSettings;return Object(a.jsx)(lr.a,{title:"User interface",className:"h-100",children:Object(a.jsxs)(Xr.a,{children:[Object(a.jsx)(I.a,{icon:"dark"===(null===t||void 0===t?void 0:t.theme)?V.z:V.L,className:"user-interface__theme-icon"}),Object(a.jsx)(ta,{checked:"dark"===(null===t||void 0===t?void 0:t.theme),onChange:function(e){var n=e?"dark":"light";r(Object(d.a)(Object(d.a)({},t),{},{theme:n})),Object(aa.g)(n)},children:"Use dark theme."})]})})},jo=function(e){var t,r=e.onChange,n=e.active,c=e.allText;return Object(a.jsx)(J,{text:null!==(t=me(n))&&void 0!==t?t:c,children:Object(a.jsx)(_e,{allText:c,active:n,onChange:r})})},bo=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(lr.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(jo,{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})}})]})})},ho=function(e){var t,r,n,c=e.settings.tags,s=e.setTagsSettings;return Object(a.jsxs)(lr.a,{title:"Tags",className:"h-100",children:[Object(a.jsxs)(Xr.a,{children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(pi,{mode:null!==(t=null===c||void 0===c?void 0:c.defaultMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(ir.a)(e)},onChange:function(e){return s(Object(d.a)(Object(d.a)({},c),{},{defaultMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===c||void 0===c?void 0:c.defaultMode)&&void 0!==r?r:"cards"}),"."]})]}),Object(a.jsxs)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default ordering for tags list:"}),Object(a.jsx)(Me,{items:xi,order:null!==(n=null===c||void 0===c?void 0:c.defaultOrdering)&&void 0!==n?n:{},onChange:function(e,t){return s(Object(d.a)(Object(d.a)({},c),{},{defaultOrdering:{field:e,dir:t}}))}})]})]})},Oo=function(e){var t,r=e.settings.shortUrlsList,n=e.setShortUrlsListSettings;return Object(a.jsx)(lr.a,{title:"Short URLs list",className:"h-100",children:Object(a.jsxs)(Xr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default ordering for short URLs list:"}),Object(a.jsx)(Me,{items:At,order:null!==(t=null===r||void 0===r?void 0:r.defaultOrdering)&&void 0!==t?t:bt,onChange:function(e,t){return n({defaultOrdering:{field:e,dir:t}})}})]})})},vo=function(e,t){e.serviceFactory("Settings",io,"RealTimeUpdates","ShortUrlCreation","ShortUrlsListSettings","UserInterface","Visits","Tags"),e.decorator("Settings",vc.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return ao})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return lo})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return uo})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return bo})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("Tags",(function(){return ho})),e.decorator("Tags",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",(function(){return Oo})),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return vt})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return ft})),e.serviceFactory("setShortUrlCreationSettings",(function(){return mt})),e.serviceFactory("setShortUrlsListSettings",(function(){return gt})),e.serviceFactory("setUiSettings",(function(){return xt})),e.serviceFactory("setVisitsSettings",(function(){return pt})),e.serviceFactory("setTagsSettings",(function(){return yt}))},fo="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",mo=function(e){return function(t,r){return function(){var n=Object(g.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:fo,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:dr(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},go="shlink/domainsList/LIST_DOMAINS_START",xo="shlink/domainsList/LIST_DOMAINS_ERROR",po="shlink/domainsList/LIST_DOMAINS",yo="shlink/domainsList/FILTER_DOMAINS",So={domains:[],filteredDomains:[],loading:!1,error:!1},Co=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},No=ut((st={},Object(u.a)(st,go,(function(){return Object(d.a)(Object(d.a)({},So),{},{loading:!0})})),Object(u.a)(st,xo,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},So),{},{error:!0,errorData:t})})),Object(u.a)(st,po,(function(e,t){var r=t.domains,n=t.defaultRedirects;return Object(d.a)(Object(d.a)({},So),{},{domains:r,filteredDomains:r,defaultRedirects:n})})),Object(u.a)(st,yo,(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)(st,fo,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(Co(r,n)),filteredDomains:e.filteredDomains.map(Co(r,n))})})),st),So),ko=function(e){return function(){return function(){var t=Object(g.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:return r({type:go}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,i=s.data,o=s.defaultRedirects,r({type:po,domains:i,defaultRedirects:o}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(2),r({type:xo,errorData:dr(t.t0)});case 14:case"end":return t.stop()}}),t,null,[[2,11]])})));return function(e,r){return t.apply(this,arguments)}}()}},wo=function(e){return{type:yo,searchTerm:e}},_o=r(608),Uo=r(618),To=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(K.e)(),i=Object(L.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(C.a)(r),b=function(){return c("")};return Object(M.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(_o.a,{children:[Object(a.jsx)(nn.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(Uo.a,{addonType:"append",children:[Object(a.jsx)($r.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(F.a)(b,u),children:Object(a.jsx)(I.a,{icon:V.R})}),Object(a.jsx)(Qt.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(J,{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)(W.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)(W.a,{divider:!0}),Object(a.jsx)(W.a,{onClick:Object(F.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},Ro=function(e){var t=e.isLast,r=Object(p.a)(e,["isLast"]);return Object(a.jsx)(Tn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},Eo=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(M.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(L.a)(j,2),h=b[0],O=b[1],v=Object(M.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(L.a)(v,2),x=f[0],p=f[1],y=Object(M.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),S=Object(L.a)(y,2),C=S[0],N=S[1],k=Object(ir.b)(Object(g.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(ir.d)(h),regular404Redirect:Object(ir.d)(x),invalidShortUrlRedirect:Object(ir.d)(C)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(rr.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:k,children:[Object(a.jsxs)(nr.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(cr.a,{children:[Object(a.jsxs)(Ro,{value:h,onChange:O,children:[Object(a.jsxs)(jn,{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)(Ro,{value:x,onChange:p,children:[Object(a.jsxs)(jn,{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)(Ro,{value:C,isLast:!0,onChange:N,children:[Object(a.jsx)(jn,{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)(ar.a,{children:[Object(a.jsx)($r.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)($r.a,{color:"primary",children:"Save"})]})]})})},Do=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)"})]})]})},Lo=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(Qt.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},Vo=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=e.selectedServer,l=Object(K.e)(),u=Object(L.a)(l,2),d=u[0],j=u[1],b=c.domain,h=c.isDefault,O=c.redirects,v=!h||Object(Gr.c)(o);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:h?Object(a.jsx)(Lo,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:b}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===O||void 0===O?void 0:O.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(Do,{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:v?void 0:"defaultDomainBtn",children:Object(a.jsx)($r.a,{outline:!0,size:"sm",disabled:!v,onClick:v?j:void 0,children:Object(a.jsx)(I.a,{fixedWidth:!0,icon:v?V.m:V.b})})}),!v&&Object(a.jsxs)(Qt.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)(Eo,{domain:c,isOpen:d,toggle:j,editDomainRedirects:s})]})},Io=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],Fo=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=e.selectedServer,o=n.filteredDomains,l=n.defaultRedirects,u=n.loading,d=n.error,j=n.errorData,b=null!==l&&void 0!==l?l:null===(t=o.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(M.useEffect)((function(){r()}),[]),u)return Object(a.jsx)(mn.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:c}),d?Object(a.jsx)(ur,{type:"error",children:Object(a.jsx)(br,{errorData:j,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(lr.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:Io.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[o.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:Io.length,className:"text-center",children:"No results found"})}),o.map((function(e){return Object(a.jsx)(Vo,{domain:e,editDomainRedirects:s,defaultRedirects:b,selectedServer:i},e.domain)}))]})]})})]})},Ao=function(e,t){e.serviceFactory("DomainSelector",(function(){return To})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return Fo})),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",ko,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return wo})),e.serviceFactory("editDomainRedirects",mo,"buildShlinkApiClient")},Mo="shlink/appUpdates/APP_UPDATE_AVAILABLE",Go="shlink/appUpdates/RESET_APP_UPDATE",Po=ut((it={},Object(u.a)(it,Mo,(function(){return!0})),Object(u.a)(it,Go,(function(){return!1})),it),!1),Bo=dt(Mo),Ho=dt(Go),Wo=r(153),qo=r(609),zo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(K.e)(),s=Object(L.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(qo.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:lr.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)($r.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)(I.a,{icon:V.M,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},Qo=r(33),Ko=function(){var e=Object(g.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(Qo.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)}}(),Jo=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(M.useEffect)((function(){var e,t;0===Object.keys(d).length&&u(),Object(aa.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:P()("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:Wo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(o,{})})]}),Object(a.jsx)(zo,{isOpen:h,toggle:O,forceUpdate:Ko})]})}},Zo=function(e,t,r){e.serviceFactory("App",Jo,"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 Bo})),e.serviceFactory("resetAppUpdate",(function(){return Ho}))},Yo=new j.a,Xo=Yo.container,$o=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)}}(Xo,t)))},el=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($o,{}))};Zo(Yo,el,b.h),Object(D.a)(Yo,el,b.h),E(Yo),kn(Yo,el,b.h),Tc(Yo,el,b.h),Yi(Yo,el),oi(Yo,el),Object(Xi.a)(Yo),co(Yo),vo(Yo,el),Ao(Yo,el);var tl=r(302),rl=r(80),nl=r(223),cl=Object(rl.c)({servers:cc,selectedServer:Kn,shortUrlsList:Jr,shortUrlCreationResult:Fr,shortUrlDeletion:Ur,shortUrlEdition:Wr,shortUrlVisits:Ns,tagVisits:As,orphanVisits:Ys,shortUrlDetail:Cn,tagsList:qi,tagDelete:wi,tagEdit:Li,mercureInfo:ro,settings:Ot,domainsList:No,visitsOverview:ai,appUpdated:Po}),al=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||rl.d,sl={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},il=function(e){var t,r,n,c;return"last180days"===(null===(t=e.settings.visits)||void 0===t?void 0:t.defaultInterval)&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e.settings.tags=Object(d.a)(Object(d.a)({},e.settings.tags),{},{defaultMode:null!==(r=null===(n=e.settings.tags)||void 0===n?void 0:n.defaultMode)&&void 0!==r?r:null===(c=e.settings.ui)||void 0===c?void 0:c.tagsMode}),e.settings.ui&&delete e.settings.ui.tagsMode,e}(Object(nl.load)(sl)),ol=Object(rl.e)(cl,il,al(Object(rl.a)(Object(nl.save)(sl),tl.a))),ll=r(64),ul=r.n(ll),dl=r(303),jl=r(304),bl=r(305),hl=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(534),r(535);delete ul.a.Icon.Default.prototype._getIconUrl,ul.a.Icon.Default.mergeOptions({iconRetinaUrl:dl.a,iconUrl:jl.a,shadowUrl:bl.a});var vl=Xo.App,fl=Xo.ScrollToTop,ml=Xo.ErrorHandler,gl=Xo.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:ol,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(ml,{children:Object(a.jsx)(fl,{children:Object(a.jsx)(vl,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/feature/ordering-settings")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/feature/ordering-settings","/service-worker.js");hl?(!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(){ol.dispatch(gl())}})},54:function(e,t,r){"use strict";var n=r(0),c=r(541),a=r(316),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(542),a=r(547),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}}}},[[319,1,2]]]); +//# sourceMappingURL=main.92df7ed9.chunk.js.map \ No newline at end of file diff --git a/feature/ordering-settings/static/js/main.92df7ed9.chunk.js.map b/feature/ordering-settings/static/js/main.92df7ed9.chunk.js.map new file mode 100644 index 00000000..8244000e --- /dev/null +++ b/feature/ordering-settings/static/js/main.92df7ed9.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","servers/data/index.ts","utils/services/LocalStorage.ts","utils/services/ColorGenerator.ts","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","utils/utils.ts","common/MainHeader.tsx","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","visits/VisitsStats.tsx","utils/helpers/redux.ts","settings/reducers/settings.ts","utils/helpers/numbers.ts","utils/helpers/pagination.ts","short-urls/Paginator.tsx","short-urls/data/index.ts","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/utils/index.ts","api/ShlinkApiError.tsx","short-urls/helpers/DeleteShortUrlModal.tsx","short-urls/helpers/CreateShortUrlResult.tsx","short-urls/helpers/index.ts","visits/reducers/visitCreation.ts","short-urls/reducers/shortUrlDeletion.ts","short-urls/reducers/shortUrlCreation.ts","short-urls/reducers/shortUrlEdition.ts","short-urls/reducers/shortUrlsList.ts","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/ShortUrlCreation.tsx","settings/UserInterface.tsx","utils/dates/DateIntervalSelector.tsx","settings/Visits.tsx","settings/Tags.tsx","settings/ShortUrlsList.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","settings/helpers/index.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","useEffectExceptFirstTime","deps","isFirstLoad","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","hasServerData","server","apiKey","isServerWithId","hasOwnProperty","isReachableServer","getServerId","serverWithIdToServerData","omit","buildPath","path","key","item","getItem","JSON","parse","set","setItem","stringify","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","size","mappingFn","startAt","range","hasValue","isNil","isEmpty","handleEventPreventingDefault","handler","preventDefault","nonEmptyValueOrNull","capitalize","charAt","toUpperCase","slice","ServersDropdown","isOpen","toggleOpen","close","settingsPath","toggleClass","Navbar","dark","fixed","expand","NavbarBrand","NavbarToggler","arrowIcon","Collapse","navbar","Nav","NavItem","NavLink","active","cogsIcon","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","supportsDefaultDomainRedirectsEdition","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","normalizeOrderByInParams","orderBy","field","dir","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","isWithinInterval","isBeforeOrEqual","dateToCompare","isEqual","isBefore","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","dateToMatchingInterval","theDate","cond","T","DateInput","isClearable","selected","showCalendarIcon","ref","dateFormat","calendarIcon","input","focus","DateRangeRow","onStartDateChange","onEndDateChange","placeholderText","maxDate","minDate","DateIntervalDropdownItems","allText","DropdownItem","divider","interval","DateRangeSelector","onDatesChange","initialDateRange","defaultText","updatable","initialIntervalIsRange","activeInterval","setActiveInterval","activeDateRange","setActiveDateRange","updateDateRange","updateInterval","isDateInterval","header","useShortUrlsQuery","useMemo","extra","evolvedQuery","queryString","dateOrNull","SearchBar","toFirstPage","selectedTags","split","setDates","setSearch","removeTag","selectedTag","tagsList","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","sortList","list","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","SET_SETTINGS","DEFAULT_SHORT_URLS_ORDERING","realTimeUpdates","enabled","shortUrlCreation","validateUrls","ui","defaultInterval","shortUrlsList","defaultOrdering","mergeDeepRight","dissoc","toggleRealTimeUpdates","setRealTimeUpdatesInterval","setShortUrlCreationSettings","settings","setShortUrlsListSettings","setUiSettings","setVisitsSettings","setTagsSettings","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","SORTABLE_FIELDS","dateCreated","longUrl","ShortUrlsTable","initialOrderBy","setOrder","pagination","handleOrderBy","addTag","newTag","page","itemsPerPage","orderByColumn","renderOrderIcon","onTagClick","CopyToClipboardIcon","onCopy","copyIcon","Time","relative","dateObject","dateTime","getUnixTime","formatDistance","buildUrl","ShortUrlDetailLink","shortUrl","ShortUrlVisitsCount","visitsCount","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","resetCreateShortUrl","basicMode","shortUrlCreationSettings","customSlug","shortCodeLength","validSince","validUntil","findIfExists","validateUrl","forwardQuery","getInitialState","saving","mode","onSave","canBeClosed","Result","small","parseApiError","isInvalidDeletionError","ShlinkApiError","errorData","fallbackMessage","detail","invalidElements","shortUrlDeletion","resetDeleteShortUrl","inputValue","setInputValue","handleDeleteUrl","catch","identity","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","result","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","shortUrlMatches","CREATE_VISITS","createdVisits","DELETE_SHORT_URL_START","DELETE_SHORT_URL_ERROR","SHORT_URL_DELETED","RESET_DELETE_SHORT_URL","dispatch","CREATE_SHORT_URL_START","CREATE_SHORT_URL_ERROR","CREATE_SHORT_URL","RESET_CREATE_SHORT_URL","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","totalItems","currentShortUrl","lastVisit","last","assoc","init","editedShortUrl","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","isBasicMode","hadTitleOriginally","resolveNewTitle","hasNewTitle","matcher","submit","renderOptionalInput","fromGroupProps","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","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","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","loadingLarge","progress","fallbackInterval","initialInterval","setInitialInterval","setDateRange","setHighlightedVisits","setHighlightedLabel","visitsFilter","setVisitsFilter","buildSectionUrl","normalizedVisits","mapLocations","highlightVisitsForProp","newSelectedBar","propEq","faFileDownload","Progress","striped","pills","section","amount","exportVisits","cancelGetShortUrlVisits","doIntervalFallback","ITEMS_PER_PAGE","isLastPage","calcProgress","getVisitsWithLoader","visitsLoader","lastVisitLoader","extraFinishActionData","actionMap","shouldCancel","loadVisitsInParallel","flatten","loadPagesBlocks","pagesBlocks","concat","loadVisits","pagesRange","fallbackToInterval","finish","lastVisitLoaderForLoader","loader","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","GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL","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","GET_TAG_VISITS_FALLBACK_TO_INTERVAL","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","GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL","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","defaultMode","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","info","RealTimeUpdates","SettingsSections","child","subChild","subIndex","Settings","ShortUrlCreation","UserInterface","Visits","Tags","tagFilteringModeText","changeTagsFilteringMode","faMoon","faSun","useDarkTheme","DateIntervalSelector","tagsMode","EDIT_DOMAIN_REDIRECTS","redirects","LIST_DOMAINS_START","LIST_DOMAINS_ERROR","LIST_DOMAINS","FILTER_DOMAINS","filteredDomains","replaceRedirectsOnDomain","defaultRedirects","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","authority","canEditDomain","forbiddenIcon","resolvedDefaultRedirects","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","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","preloadedState","migrateDeprecatedSettings","load","store","createStore","reducers","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,oLCRVmB,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,WAEbH,EAQDI,YAAiB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ourcesContent":["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, EffectCallback, DependencyList, useEffect } 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\nexport const useEffectExceptFirstTime = (callback: EffectCallback, deps: DependencyList): void => {\n const isFirstLoad = useRef(true);\n\n useEffect(() => {\n !isFirstLoad.current && callback();\n isFirstLoad.current = false;\n }, deps);\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","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","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 { 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 { 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 { 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 { 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\nexport const supportsDefaultDomainRedirectsEdition = serverMatchesVersions({ minVersion: '2.10.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 ShlinkDomainsResponse,\n ShlinkVisitsOverview,\n ShlinkEditDomainRedirects,\n ShlinkDomainRedirects,\n ShlinkShortUrlsListParams,\n ShlinkShortUrlsListNormalizedParams,\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);\nconst normalizeOrderByInParams = (params: ShlinkShortUrlsListParams): ShlinkShortUrlsListNormalizedParams => {\n const { orderBy = {}, ...rest } = params;\n const { field, dir } = orderBy;\n\n return !dir ? rest : {\n ...rest,\n orderBy: `${field}-${dir}`,\n };\n};\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', normalizeOrderByInParams(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);\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, isBefore, isEqual, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';\nimport { OptionalString } from '../utils';\n\nexport type DateOrString = Date | string;\n\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\nexport const parseISO = (date: DateOrString): Date => isDateObject(date) ? date : stdParseISO(date);\n\nexport const isBetween = (date: DateOrString, start?: DateOrString, end?: DateOrString): boolean => {\n try {\n return isWithinInterval(parseISO(date), { start: parseISO(start ?? date), end: parseISO(end ?? date) });\n } catch (e) {\n return false;\n }\n};\n\nexport const isBeforeOrEqual = (date: Date | number, dateToCompare: Date | number) =>\n isEqual(date, dateToCompare) || isBefore(date, dateToCompare);\n","import { subDays, startOfDay, endOfDay } from 'date-fns';\nimport { cond, filter, isEmpty, T } from 'ramda';\nimport { DateOrString, formatInternational, isBeforeOrEqual, parseISO } 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\nexport const dateToMatchingInterval = (date: DateOrString): DateInterval => {\n const theDate: Date = parseISO(date);\n\n return cond([\n [ () => isBeforeOrEqual(startOfDay(new Date()), theDate), () => 'today' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(1), theDate), () => 'yesterday' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(7), theDate), () => 'last7Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(30), theDate), () => 'last30Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(90), theDate), () => 'last90Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(180), theDate), () => 'last180Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(365), theDate), () => 'last365Days' ],\n [ T, () => 'all' ],\n ])();\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 { useEffectExceptFirstTime } from '../helpers/hooks';\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 updatable?: boolean;\n}\n\nexport const DateRangeSelector = (\n { onDatesChange, initialDateRange, defaultText, disabled, updatable = false }: 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 updatable && useEffectExceptFirstTime(() => {\n const isDateInterval = rangeIsInterval(initialDateRange);\n\n isDateInterval && updateInterval(initialDateRange);\n initialDateRange && !isDateInterval && updateDateRange(initialDateRange);\n }, [ initialDateRange ]);\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 { isEmpty, propEq, values } from 'ramda';\nimport { useState, useEffect, useMemo, FC, useRef } 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, doIntervalFallback?: boolean) => 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 { visits, loading, loadingLarge, error, errorData, progress, fallbackInterval } = visitsInfo;\n const [ initialInterval, setInitialInterval ] = useState(\n fallbackInterval ?? settings.visits?.defaultInterval ?? 'last30Days',\n );\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 const isFirstLoad = useRef(true);\n\n const buildSectionUrl = (subPath?: string) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return !subPath ? `${baseUrl}${query}` : `${baseUrl}${subPath}${query}`;\n };\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 }, isFirstLoad.current);\n isFirstLoad.current = false;\n }, [ dateRange, visitsFilter ]);\n useEffect(() => {\n fallbackInterval && setInitialInterval(fallbackInterval);\n }, [ fallbackInterval ]);\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 { 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 { Action } from 'redux';\nimport { dissoc, mergeDeepRight } from 'ramda';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { RecursivePartial } from '../../utils/utils';\nimport { Theme } from '../../utils/theme';\nimport { DateInterval } from '../../utils/dates/types';\nimport { TagsOrder } from '../../tags/data/TagsListChildrenProps';\nimport { ShortUrlsOrder } from '../../short-urls/data';\n\nexport const SET_SETTINGS = 'shlink/realTimeUpdates/SET_SETTINGS';\n\nexport const DEFAULT_SHORT_URLS_ORDERING: ShortUrlsOrder = {\n field: 'dateCreated',\n dir: 'DESC',\n};\n\n/**\n * Important! When adding new props in the main Settings interface or any of the nested props, they have to be set as\n * optional, as old instances of the app will load partial objects from local storage until it is saved again.\n */\n\nexport interface RealTimeUpdatesSettings {\n enabled: boolean;\n interval?: number;\n}\n\nexport type TagFilteringMode = 'startsWith' | 'includes';\n\nexport interface ShortUrlCreationSettings {\n validateUrls: boolean;\n tagFilteringMode?: TagFilteringMode;\n forwardQuery?: boolean;\n}\n\nexport type TagsMode = 'cards' | 'list';\n\nexport interface UiSettings {\n theme: Theme;\n}\n\nexport interface VisitsSettings {\n defaultInterval: DateInterval;\n}\n\nexport interface TagsSettings {\n defaultOrdering?: TagsOrder;\n defaultMode?: TagsMode;\n}\n\nexport interface ShortUrlsListSettings {\n defaultOrdering?: ShortUrlsOrder;\n}\n\nexport interface Settings {\n realTimeUpdates: RealTimeUpdatesSettings;\n shortUrlCreation?: ShortUrlCreationSettings;\n shortUrlsList?: ShortUrlsListSettings;\n ui?: UiSettings;\n visits?: VisitsSettings;\n tags?: TagsSettings;\n}\n\nconst initialState: Settings = {\n realTimeUpdates: {\n enabled: true,\n },\n shortUrlCreation: {\n validateUrls: false,\n },\n ui: {\n theme: 'light',\n },\n visits: {\n defaultInterval: 'last30Days',\n },\n shortUrlsList: {\n defaultOrdering: DEFAULT_SHORT_URLS_ORDERING,\n },\n};\n\ntype SettingsAction = Action & Settings;\n\ntype PartialSettingsAction = Action & RecursivePartial;\n\nexport default buildReducer({\n [SET_SETTINGS]: (state, action) => mergeDeepRight(state, dissoc('type', action)),\n}, initialState);\n\nexport const toggleRealTimeUpdates = (enabled: boolean): PartialSettingsAction => ({\n type: SET_SETTINGS,\n realTimeUpdates: { enabled },\n});\n\nexport const setRealTimeUpdatesInterval = (interval: number): PartialSettingsAction => ({\n type: SET_SETTINGS,\n realTimeUpdates: { interval },\n});\n\nexport const setShortUrlCreationSettings = (settings: ShortUrlCreationSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n shortUrlCreation: settings,\n});\n\nexport const setShortUrlsListSettings = (settings: ShortUrlsListSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n shortUrlsList: settings,\n});\n\nexport const setUiSettings = (settings: UiSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n ui: settings,\n});\n\nexport const setVisitsSettings = (settings: VisitsSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n visits: settings,\n});\n\nexport const setTagsSettings = (settings: TagsSettings): PartialSettingsAction => ({\n type: SET_SETTINGS,\n tags: settings,\n});\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 { Nullable, OptionalString } from '../../utils/utils';\nimport { Order } from '../../utils/helpers/ordering';\n\nexport interface EditShortUrlData {\n longUrl?: string;\n tags?: string[];\n title?: string | null;\n validSince?: Date | string | null;\n validUntil?: Date | string | null;\n maxVisits?: number | null;\n validateUrl?: boolean;\n crawlable?: boolean;\n forwardQuery?: boolean;\n}\n\nexport interface ShortUrlData extends EditShortUrlData {\n longUrl: string;\n customSlug?: string;\n shortCodeLength?: number;\n domain?: string;\n findIfExists?: boolean;\n}\n\nexport interface ShortUrl {\n shortCode: string;\n shortUrl: string;\n longUrl: string;\n dateCreated: string;\n visitsCount: number;\n meta: Required>;\n tags: string[];\n domain: string | null;\n title?: string | null;\n crawlable?: boolean;\n forwardQuery?: boolean;\n}\n\nexport interface ShortUrlMeta {\n validSince?: string;\n validUntil?: string;\n maxVisits?: number;\n}\n\nexport interface ShortUrlModalProps {\n shortUrl: ShortUrl;\n isOpen: boolean;\n toggle: () => void;\n}\n\nexport interface ShortUrlIdentifier {\n shortCode: string;\n domain: OptionalString;\n}\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 ShortUrlsOrder = Order;\n","import { pipe } 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, 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 { DEFAULT_SHORT_URLS_ORDERING, Settings } from '../settings/reducers/settings';\nimport { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';\nimport { ShortUrlsTableProps } from './ShortUrlsTable';\nimport Paginator from './Paginator';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\nimport { OrderableFields, ShortUrlsOrder, SORTABLE_FIELDS } from './data';\n\ninterface ShortUrlsListProps extends RouteComponentProps {\n selectedServer: SelectedServer;\n shortUrlsList: ShortUrlsListState;\n listShortUrls: (params: ShlinkShortUrlsListParams) => void;\n settings: Settings;\n}\n\nconst ShortUrlsList = (ShortUrlsTable: FC, SearchBar: FC) => boundToMercureHub(({\n listShortUrls,\n match,\n location,\n history,\n shortUrlsList,\n selectedServer,\n settings,\n}: ShortUrlsListProps) => {\n const serverId = getServerId(selectedServer);\n const initialOrderBy = settings.shortUrlsList?.defaultOrdering ?? DEFAULT_SHORT_URLS_ORDERING;\n const [ order, setOrder ] = useState(initialOrderBy);\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 handleOrderBy = (field?: OrderableFields, dir?: OrderDir) => setOrder({ field, dir });\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(() => {\n listShortUrls({\n page: match.params.page,\n searchTerm: search,\n tags: selectedTags,\n itemsPerPage: undefined,\n startDate,\n endDate,\n orderBy: order,\n });\n }, [ match.params.page, search, selectedTags, startDate, endDate, order ]);\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 { 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","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 { FC } from 'react';\nimport { FormGroup } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { TagsModeDropdown } from '../tags/TagsModeDropdown';\nimport { capitalize } from '../utils/utils';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { SORTABLE_FIELDS } from '../tags/data/TagsListChildrenProps';\nimport { Settings, TagsSettings } from './reducers/settings';\n\ninterface TagsProps {\n settings: Settings;\n setTagsSettings: (settings: TagsSettings) => void;\n}\n\nexport const Tags: FC = ({ settings: { tags }, setTagsSettings }) => (\n \n \n \n capitalize(tagsMode)}\n onChange={(defaultMode) => setTagsSettings({ ...tags, defaultMode })}\n />\n Tags will be displayed as {tags?.defaultMode ?? 'cards'}.\n \n \n \n setTagsSettings({ ...tags, defaultOrdering: { field, dir } })}\n />\n \n \n);\n","import { FC } from 'react';\nimport { FormGroup } from 'reactstrap';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { SORTABLE_FIELDS } from '../short-urls/data';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { DEFAULT_SHORT_URLS_ORDERING, Settings, ShortUrlsListSettings } from './reducers/settings';\n\ninterface ShortUrlsListProps {\n settings: Settings;\n setShortUrlsListSettings: (settings: ShortUrlsListSettings) => void;\n}\n\nexport const ShortUrlsList: FC = ({ settings: { shortUrlsList }, setShortUrlsListSettings }) => (\n \n \n \n setShortUrlsListSettings({ defaultOrdering: { field, dir } })}\n />\n \n \n);\n","import Bottle from 'bottlejs';\nimport RealTimeUpdates from '../RealTimeUpdates';\nimport Settings from '../Settings';\nimport {\n setRealTimeUpdatesInterval,\n setShortUrlCreationSettings,\n setShortUrlsListSettings,\n setTagsSettings,\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';\nimport { Tags } from '../Tags';\nimport { ShortUrlsList } from '../ShortUrlsList';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory(\n 'Settings',\n Settings,\n 'RealTimeUpdates',\n 'ShortUrlCreation',\n 'ShortUrlsListSettings',\n 'UserInterface',\n 'Visits',\n 'Tags',\n );\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 bottle.serviceFactory('Tags', () => Tags);\n bottle.decorator('Tags', connect([ 'settings' ], [ 'setTagsSettings' ]));\n\n bottle.serviceFactory('ShortUrlsListSettings', () => ShortUrlsList);\n bottle.decorator('ShortUrlsListSettings', connect([ 'settings' ], [ 'setShortUrlsListSettings' ]));\n\n // Actions\n bottle.serviceFactory('toggleRealTimeUpdates', () => toggleRealTimeUpdates);\n bottle.serviceFactory('setRealTimeUpdatesInterval', () => setRealTimeUpdatesInterval);\n bottle.serviceFactory('setShortUrlCreationSettings', () => setShortUrlCreationSettings);\n bottle.serviceFactory('setShortUrlsListSettings', () => setShortUrlsListSettings);\n bottle.serviceFactory('setUiSettings', () => setUiSettings);\n bottle.serviceFactory('setVisitsSettings', () => setVisitsSettings);\n bottle.serviceFactory('setTagsSettings', () => setTagsSettings);\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 defaultRedirects?: ShlinkDomainRedirects;\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ListDomainsAction extends Action {\n domains: ShlinkDomain[];\n defaultRedirects?: ShlinkDomainRedirects;\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, defaultRedirects }) =>\n ({ ...initialState, domains, filteredDomains: domains, defaultRedirects }),\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 { data: domains, defaultRedirects } = await listDomains();\n\n dispatch({ type: LIST_DOMAINS, domains, defaultRedirects });\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 { SelectedServer } from '../servers/data';\nimport { supportsDefaultDomainRedirectsEdition } from '../utils/helpers/features';\nimport { EditDomainRedirectsModal } from './helpers/EditDomainRedirectsModal';\n\ninterface DomainRowProps {\n domain: ShlinkDomain;\n defaultRedirects?: ShlinkDomainRedirects;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n selectedServer: SelectedServer;\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, selectedServer }) => {\n const [ isOpen, toggle ] = useToggle();\n const { domain: authority, isDefault, redirects } = domain;\n const canEditDomain = !isDefault || supportsDefaultDomainRedirectsEdition(selectedServer);\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 {!canEditDomain && (\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 { SelectedServer } from '../servers/data';\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 selectedServer: SelectedServer;\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, selectedServer },\n) => {\n const { filteredDomains: domains, defaultRedirects, loading, error, errorData } = domainsList;\n const resolvedDefaultRedirects = 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', 'selectedServer' ],\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();\n\nexport const { 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","import { combineReducers } from 'redux';\nimport serversReducer from '../servers/reducers/servers';\nimport selectedServerReducer from '../servers/reducers/selectedServer';\nimport shortUrlsListReducer from '../short-urls/reducers/shortUrlsList';\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 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';\nimport { migrateDeprecatedSettings } from '../settings/helpers';\nimport { ShlinkState } from './types';\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};\nconst preloadedState = migrateDeprecatedSettings(load(localStorageConfig) as ShlinkState);\n\nexport const store = createStore(reducers, preloadedState, composeEnhancers(\n applyMiddleware(save(localStorageConfig), ReduxThunk),\n));\n","import { ShlinkState } from '../../container/types';\n\nexport const migrateDeprecatedSettings = (state: ShlinkState): ShlinkState => {\n // The \"last180Days\" interval had a typo, with a lowercase d\n if ((state.settings.visits?.defaultInterval as any) === 'last180days') {\n state.settings.visits && (state.settings.visits.defaultInterval = 'last180Days');\n }\n\n // The \"tags display mode\" option has been moved from \"ui\" to \"tags\"\n state.settings.tags = {\n ...state.settings.tags,\n defaultMode: state.settings.tags?.defaultMode ?? (state.settings.ui as any)?.tagsMode,\n };\n state.settings.ui && delete (state.settings.ui as any).tagsMode;\n\n return state;\n};\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