@jesec/flood 0.0.0-master.aa2bb26 → 0.0.0-master.aa962eb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/assets/index.html +1 -1
- package/dist/assets/static/css/26.db36dbf740cf15b386e3.css +1 -0
- package/dist/assets/static/js/128.583fd0b6.chunk.js +1 -0
- package/dist/assets/static/js/{151.5d81cd4a.chunk.js → 151.9c33b18b.chunk.js} +1 -1
- package/dist/assets/static/js/26.d461badf.chunk.js +1 -0
- package/dist/assets/static/js/300.3bde1981.chunk.js +1 -0
- package/dist/assets/static/js/{about.cea581b4.chunk.js → about.43497af5.chunk.js} +0 -0
- package/dist/assets/static/js/{flag0.cd678e2c.chunk.js → flag0.0be952e5.chunk.js} +1 -1
- package/dist/assets/static/js/{flag1.626307b1.chunk.js → flag1.cf236356.chunk.js} +0 -0
- package/dist/assets/static/js/{flag4.92482093.chunk.js → flag4.0d8156d2.chunk.js} +1 -1
- package/dist/assets/static/js/{flag8.072e4f61.chunk.js → flag8.809b10b4.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n1.9e9b4002.chunk.js → i18n1.56cd2418.chunk.js} +1 -1
- package/dist/assets/static/js/{i18n10.19c9ad2a.chunk.js → i18n10.aeff1de7.chunk.js} +1 -1
- package/dist/assets/static/js/{i18n12.32051d61.chunk.js → i18n12.6f65b324.chunk.js} +1 -1
- package/dist/assets/static/js/{i18n13.0d137aa8.chunk.js → i18n13.6f327876.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n14.0de895d0.chunk.js → i18n14.6ec5cd9e.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n15.06fb4c76.chunk.js → i18n15.b1514484.chunk.js} +1 -1
- package/dist/assets/static/js/{i18n16.33ad0a12.chunk.js → i18n16.869dc2d4.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n17.b5cd6b39.chunk.js → i18n17.aeb268fa.chunk.js} +0 -0
- package/dist/assets/static/js/i18n18.5d3047d8.chunk.js +1 -0
- package/dist/assets/static/js/{i18n19.bd1784e7.chunk.js → i18n19.3d6ca361.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n20.73d145c0.chunk.js → i18n20.6b2791ec.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n21.b2ba23b6.chunk.js → i18n21.56deb919.chunk.js} +1 -1
- package/dist/assets/static/js/{i18n23.93053e59.chunk.js → i18n23.fdbc70e2.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n25.d39db15e.chunk.js → i18n25.9d4596e5.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n27.caaa2308.chunk.js → i18n27.63e10816.chunk.js} +1 -1
- package/dist/assets/static/js/{i18n28.c2c1e56b.chunk.js → i18n28.c413c38d.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n3.8541a48e.chunk.js → i18n3.2b2b98df.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n4.e56bedf9.chunk.js → i18n4.4eadf1d2.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n5.d89a661a.chunk.js → i18n5.e952c5c2.chunk.js} +1 -1
- package/dist/assets/static/js/{i18n8.e9d08dcc.chunk.js → i18n8.1e9b463e.chunk.js} +0 -0
- package/dist/assets/static/js/{i18n9.8fe13ccd.chunk.js → i18n9.2e5fac1c.chunk.js} +0 -0
- package/dist/assets/static/js/main.b434100c.js +1 -0
- package/dist/index.js +1 -1
- package/node_modules/geoip-country/data/geoip-country.dat +0 -0
- package/node_modules/geoip-country/data/geoip-country6.dat +0 -0
- package/node_modules/geoip-country/package.json +1 -1
- package/package.json +68 -68
- package/dist/assets/static/css/26.c6c20e54c62c568da946.css +0 -1
- package/dist/assets/static/js/128.5786a3d2.chunk.js +0 -1
- package/dist/assets/static/js/26.e1ed6b78.chunk.js +0 -1
- package/dist/assets/static/js/300.07129f58.chunk.js +0 -1
- package/dist/assets/static/js/i18n18.85c4a84b.chunk.js +0 -1
- package/dist/assets/static/js/main.a3f3f0d1.js +0 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Install [Node.js runtime](https://nodejs.org/). Flood tracks `Current` and provi
|
|
|
46
46
|
- macOS users can use [brew](https://brew.sh/) or installer.
|
|
47
47
|
- Check [Node.js website](https://nodejs.org/en/download/package-manager) for more.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Alternatively, download a single-executable build from [Releases](https://github.com/jesec/flood/releases) (or rolling build from [Actions](https://nightly.link/jesec/flood/workflows/publish-rolling/master)). It bundles `Node.js` and supports `Linux`, `macOS` and `Windows`.
|
|
50
50
|
|
|
51
51
|
### Installation
|
|
52
52
|
|
package/dist/assets/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/><meta http-equiv="Pragma" content="no-cache"/><meta http-equiv="Expires" content="0"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="apple-mobile-web-app-title" content="Flood"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="manifest" href="manifest.json"/><link rel="shortcut icon" href="favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="icon_maskable_180x180.png"/><title>Flood</title><script defer="defer" src="static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/><meta http-equiv="Pragma" content="no-cache"/><meta http-equiv="Expires" content="0"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="apple-mobile-web-app-title" content="Flood"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="manifest" href="manifest.json"/><link rel="shortcut icon" href="favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="icon_maskable_180x180.png"/><title>Flood</title><script defer="defer" src="static/js/main.b434100c.js"></script><link href="static/css/main.2972bcb1ba7f012153ce.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="app"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html.os-html,html.os-html>.os-host{box-sizing:border-box;display:block;height:100%!important;margin:0!important;min-height:100%!important;min-width:100%!important;overflow:hidden;position:absolute!important;width:100%!important}html.os-html>.os-host>.os-padding{position:absolute}body.os-dragging,body.os-dragging *{cursor:default}.os-host,.os-host-textarea{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:start;-ms-flex-pack:start;-ms-flex-line-pack:start;-webkit-box-align:start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-content:flex-start;align-items:flex-start;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;justify-content:flex-start;overflow:visible!important;position:relative}.os-host-flexbox{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden!important}.os-host-flexbox>.os-size-auto-observer{height:inherit!important}.os-host-flexbox>.os-content-glue{-webkit-box-flex:1;-ms-flex-positive:1;-ms-flex-negative:0;flex-grow:1;flex-shrink:0}.os-host-flexbox>.os-content-glue,.os-host-flexbox>.os-size-auto-observer{-webkit-box-flex:0;-ms-flex-positive:0;-ms-flex-negative:1;-ms-flex-preferred-size:auto;flex-basis:auto;flex-grow:0;flex-shrink:1;min-height:0;min-width:0}#os-dummy-scrollbar-size{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";height:500px;opacity:0;overflow:scroll;position:fixed;visibility:hidden;width:500px}#os-dummy-scrollbar-size>div{height:200%;margin:10px 0;width:200%}#os-dummy-scrollbar-size:after,#os-dummy-scrollbar-size:before,.os-content:after,.os-content:before{content:"";display:table;flex-grow:0;flex-shrink:0;font-size:0;height:.01px;line-height:0;visibility:hidden;width:.01px}#os-dummy-scrollbar-size,.os-viewport{-ms-overflow-style:scrollbar!important}.os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size,.os-viewport-native-scrollbars-invisible.os-viewport{scrollbar-width:none!important}.os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size::-webkit-scrollbar-corner,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar-corner{background:#0000!important;display:none!important;height:0!important;visibility:hidden!important;width:0!important}.os-content-glue{box-sizing:inherit;max-height:100%;max-width:100%;pointer-events:none;width:100%}.os-padding{bottom:0;box-sizing:inherit;direction:inherit;height:auto!important;left:0;margin:0;overflow:visible;padding:0;position:absolute;right:0;top:0;width:auto!important;z-index:0}.os-host-overflow>.os-padding,.os-viewport{overflow:hidden}.os-viewport{-webkit-overflow-scrolling:touch;bottom:0;box-sizing:inherit!important;direction:inherit!important;left:0;margin:0;outline:none!important;padding:0;position:absolute;resize:none!important;right:0;top:0}.os-content-arrange{min-height:1px;min-width:1px;pointer-events:none;position:absolute;z-index:-1}.os-content{box-sizing:border-box!important;direction:inherit;display:block;height:100%;position:relative;visibility:visible;width:100%}.os-content>.os-textarea{clip:auto!important;background:#0000!important;border:none!important;border-radius:0!important;box-shadow:none!important;box-sizing:border-box!important;direction:inherit!important;display:block!important;-webkit-filter:none!important;filter:none!important;float:none!important;left:0!important;margin:0!important;max-height:none!important;max-width:none!important;opacity:1!important;outline:0 none #0000!important;overflow:hidden!important;padding:0;-webkit-perspective:none!important;perspective:none!important;position:absolute!important;resize:none!important;top:0!important;-webkit-transform:none!important;transform:none!important;vertical-align:initial!important;z-index:1!important}.os-host-rtl>.os-padding>.os-viewport>.os-content>.os-textarea{right:0!important}.os-content>.os-textarea-cover{pointer-events:none;z-index:-1}.os-content>.os-textarea[wrap=off]{margin:0!important;white-space:pre!important}.os-text-inherit{color:inherit;cursor:text;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-align:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-shadow:inherit;text-transform:inherit;unicode-bidi:inherit;word-spacing:inherit}.os-resize-observer,.os-resize-observer-host{box-sizing:inherit;display:block;height:100%;left:0;overflow:hidden;pointer-events:none;position:absolute;top:0;visibility:hidden;width:100%;z-index:-1}.os-resize-observer-host{border:inherit;border-color:#0000;border-style:solid;box-sizing:border-box;padding:inherit}.os-resize-observer-host.observed{align-items:flex-start;display:flex;flex-direction:column;justify-content:flex-start}.os-resize-observer-host.observed>.os-resize-observer,.os-resize-observer-host>.os-resize-observer{border:inherit;box-sizing:initial;display:block;height:200%;margin:0;padding:inherit;width:200%}.os-resize-observer-host.observed>.os-resize-observer,.os-resize-observer-host.observed>.os-resize-observer:before{box-sizing:border-box;display:flex;flex-basis:auto;flex-grow:1;flex-shrink:0;position:relative}.os-resize-observer-host.observed>.os-resize-observer:before{border:inherit;box-sizing:initial;content:"";margin:0;padding:inherit}.os-size-auto-observer{-webkit-box-flex:inherit;-ms-flex-positive:inherit;-ms-flex-negative:0;-ms-flex-preferred-size:0;box-sizing:inherit!important;flex-basis:0;flex-grow:inherit;flex-shrink:0;float:left;height:100%;margin:0;max-height:1px;max-width:1px;overflow:hidden;padding:0;pointer-events:none;position:relative;width:inherit;z-index:-1}.os-size-auto-observer>.os-resize-observer{height:1000%;min-height:1px;min-width:1px;width:1000%}.os-resize-observer-item{bottom:0;direction:ltr!important;opacity:0;overflow:hidden;right:0;z-index:-1}.os-resize-observer-item,.os-resize-observer-item-final{-webkit-box-flex:0!important;-ms-flex:none!important;flex:none!important;left:0;position:absolute;top:0}.os-resize-observer-item-final{-webkit-transition:none!important;transition:none!important}.os-resize-observer{-webkit-animation-duration:1ms;animation-duration:1ms;-webkit-animation-name:os-resize-observer-dummy-animation;animation-name:os-resize-observer-dummy-animation}object.os-resize-observer{box-sizing:border-box!important}@-webkit-keyframes os-resize-observer-dummy-animation{0%{cursor:auto}to{cursor:none}}@keyframes os-resize-observer-dummy-animation{0%{cursor:auto}to{cursor:none}}.os-host-transition>.os-scrollbar,.os-host-transition>.os-scrollbar-corner{-webkit-transition:opacity .3s,visibility .3s,top .3s,right .3s,bottom .3s,left .3s;transition:opacity .3s,visibility .3s,top .3s,right .3s,bottom .3s,left .3s}html.os-html>.os-host>.os-scrollbar{position:absolute;z-index:999999}.os-scrollbar,.os-scrollbar-corner{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1;position:absolute;z-index:1}.os-scrollbar-corner{bottom:0;right:0}.os-scrollbar{pointer-events:none}.os-scrollbar-track{border:none!important;padding:0!important;position:relative}.os-scrollbar-handle,.os-scrollbar-track{height:100%;pointer-events:auto;width:100%}.os-scrollbar-handle{position:absolute}.os-scrollbar-handle-off,.os-scrollbar-track-off{pointer-events:none}.os-scrollbar.os-scrollbar-unusable,.os-scrollbar.os-scrollbar-unusable *{pointer-events:none!important}.os-scrollbar.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{right:0;top:0}.os-host-rtl>.os-scrollbar-horizontal{right:0}.os-host-rtl>.os-scrollbar-corner,.os-host-rtl>.os-scrollbar-vertical{left:0;right:auto}.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-corner,.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-corner,.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal,.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical,.os-padding+.os-scrollbar-corner,.os-scrollbar-auto-hidden,.os-scrollbar-horizontal+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner,.os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical+.os-scrollbar-corner,.os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner{opacity:0;pointer-events:none;visibility:hidden}.os-scrollbar-corner-resize-both{cursor:nwse-resize}.os-host-rtl>.os-scrollbar-corner-resize-both{cursor:nesw-resize}.os-scrollbar-corner-resize-horizontal{cursor:ew-resize}.os-scrollbar-corner-resize-vertical{cursor:ns-resize}.os-dragging .os-scrollbar-corner.os-scrollbar-corner-resize{cursor:default}.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-vertical{bottom:0;top:0}.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal,.os-host-rtl.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal{left:0;right:0}.os-scrollbar-corner.os-scrollbar-corner-resize,.os-scrollbar:hover{opacity:1!important;visibility:visible!important}.os-scrollbar-corner.os-scrollbar-corner-resize{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PGcgc3R5bGU9ImRpc3BsYXk6aW5saW5lIj48cGF0aCBzdHlsZT0iZmlsbDojMDAwO2ZpbGwtb3BhY2l0eTouNDk0MTE3NjU7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOm5vbmUiIGQ9Ik03LjQyNCAxMDQyLjM2MmExLjMxIDEuMzEgMCAwIDAtMS4zMSAxLjMxYzAgLjMuMTA0LjU3MS4yNzMuNzkyLjIxLjE0MS40NjYuMjE4LjczNy4yMThhMS4zMSAxLjMxIDAgMCAwIDEuMzEtMS4zMWMwLS4yNzEtLjA3Ny0uNTI4LS4yMTgtLjczN2ExLjI5OCAxLjI5OCAwIDAgMC0uNzkyLS4yNzN6bTAgMy4wODRhMS4zMSAxLjMxIDAgMCAwLTEuMzEgMS4zMWMwIC4zLjEwNC41NzIuMjczLjc5Mi4yMS4xNDEuNDY2LjIxOS43MzcuMjE5YTEuMzEgMS4zMSAwIDAgMCAxLjMxLTEuMzFjMC0uMjcyLS4wNzctLjUyOC0uMjE4LS43MzhhMS4yOTggMS4yOTggMCAwIDAtLjc5Mi0uMjczem0tMy4wODQgMGExLjMxIDEuMzEgMCAwIDAtMS4zMSAxLjMxYzAgLjMuMTA0LjU3Mi4yNzMuNzkyLjIwOS4xNDEuNDY1LjIxOS43MzcuMjE5YTEuMzEgMS4zMSAwIDAgMCAxLjMxLTEuMzFjMC0uMjcyLS4wNzctLjUyOC0uMjE5LS43MzhhMS4yOTggMS4yOTggMCAwIDAtLjc5MS0uMjczem0tMy4wMyAzLjAzYTEuMzEgMS4zMSAwIDAgMC0xLjMxIDEuMzFjMCAuMy4xMDQuNTcxLjI3My43OTIuMjEuMTQxLjQ2Ni4yMTguNzM3LjIxOGExLjMxIDEuMzEgMCAwIDAgMS4zMS0xLjMxYzAtLjI3MS0uMDc3LS41MjgtLjIxOC0uNzM3YTEuMjk4IDEuMjk4IDAgMCAwLS43OTItLjI3M3ptMy4wMyAwYTEuMzEgMS4zMSAwIDAgMC0xLjMxIDEuMzFjMCAuMy4xMDQuNTcxLjI3My43OTIuMjA5LjE0MS40NjUuMjE4LjczNy4yMThhMS4zMSAxLjMxIDAgMCAwIDEuMzEtMS4zMWMwLS4yNzEtLjA3Ny0uNTI4LS4yMTktLjczN2ExLjI5OCAxLjI5OCAwIDAgMC0uNzkxLS4yNzN6bTMuMDg0IDBhMS4zMSAxLjMxIDAgMCAwLTEuMzEgMS4zMWMwIC4zLjEwNC41NzEuMjczLjc5Mi4yMS4xNDEuNDY2LjIxOC43MzcuMjE4YTEuMzEgMS4zMSAwIDAgMCAxLjMxLTEuMzFjMC0uMjcxLS4wNzctLjUyOC0uMjE4LS43MzdhMS4yOTggMS4yOTggMCAwIDAtLjc5Mi0uMjczeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMTA0Mi4zNjIpIi8+PC9nPjxnIHN0eWxlPSJkaXNwbGF5OmlubGluZSI+PHBhdGggc3R5bGU9ImZpbGw6I2ZmZjtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2U6bm9uZSIgZD0iTTguMjE2LjI3M2MuMTQxLjIxLjIxOC40NjYuMjE4LjczN2ExLjMxIDEuMzEgMCAwIDEtMS4zMSAxLjMxYy0uMjcxIDAtLjUyOC0uMDc3LS43MzctLjIxOC4yNC4zMTMuNjEzLjUxOCAxLjAzNy41MThhMS4zMSAxLjMxIDAgMCAwIDEuMzEtMS4zMWMwLS40MjQtLjIwNS0uNzk4LS41MTgtMS4wMzd6bTAgMy4wODRjLjE0MS4yMS4yMTguNDY2LjIxOC43MzdhMS4zMSAxLjMxIDAgMCAxLTEuMzEgMS4zMWMtLjI3MSAwLS41MjgtLjA3Ny0uNzM3LS4yMTguMjQuMzEzLjYxMy41MTkgMS4wMzcuNTE5YTEuMzEgMS4zMSAwIDAgMCAxLjMxLTEuMzFjMC0uNDI1LS4yMDUtLjc5OC0uNTE4LTEuMDM4em0tMy4wODUgMGMuMTQyLjIxLjIxOS40NjYuMjE5LjczN2ExLjMxIDEuMzEgMCAwIDEtMS4zMSAxLjMxYy0uMjcyIDAtLjUyOC0uMDc3LS43MzctLjIxOC4yNC4zMTMuNjEyLjUxOSAxLjAzNy41MTlhMS4zMSAxLjMxIDAgMCAwIDEuMzEtMS4zMWMwLS40MjUtLjIwNS0uNzk4LS41MTktMS4wMzh6bS0zLjAzIDMuMDNjLjE0Mi4yMS4yMi40NjYuMjIuNzM3YTEuMzEgMS4zMSAwIDAgMS0xLjMxMSAxLjMxYy0uMjcxIDAtLjUyOC0uMDc3LS43MzctLjIxOC4yNC4zMTMuNjEzLjUxOCAxLjAzNy41MThhMS4zMSAxLjMxIDAgMCAwIDEuMzEtMS4zMWMwLS40MjQtLjIwNS0uNzk4LS41MTgtMS4wMzd6bTMuMDMgMGMuMTQyLjIxLjIxOS40NjYuMjE5LjczN2ExLjMxIDEuMzEgMCAwIDEtMS4zMSAxLjMxYy0uMjcyIDAtLjUyOC0uMDc3LS43MzctLjIxOC4yNC4zMTMuNjEyLjUxOCAxLjAzNy41MThhMS4zMSAxLjMxIDAgMCAwIDEuMzEtMS4zMWMwLS40MjQtLjIwNS0uNzk4LS41MTktMS4wMzd6bTMuMDg1IDBjLjE0MS4yMS4yMTguNDY2LjIxOC43MzdhMS4zMSAxLjMxIDAgMCAxLTEuMzEgMS4zMWMtLjI3MSAwLS41MjgtLjA3Ny0uNzM3LS4yMTguMjQuMzEzLjYxMy41MTggMS4wMzcuNTE4YTEuMzEgMS4zMSAwIDAgMCAxLjMxLTEuMzFjMC0uNDI0LS4yMDUtLjc5OC0uNTE4LTEuMDM3eiIvPjwvZz48L3N2Zz4=);background-position:100% 100%;background-repeat:no-repeat;pointer-events:auto!important}.os-host-rtl>.os-scrollbar-corner.os-scrollbar-corner-resize{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.os-host-overflow{overflow:hidden!important}.os-theme-none>.os-scrollbar-corner,.os-theme-none>.os-scrollbar-horizontal,.os-theme-none>.os-scrollbar-vertical{display:none!important}.os-theme-none>.os-scrollbar-corner-resize{display:block!important;min-height:10px;min-width:10px}.os-theme-dark>.os-scrollbar-horizontal,.os-theme-light>.os-scrollbar-horizontal{height:10px;right:10px}.os-theme-dark>.os-scrollbar-vertical,.os-theme-light>.os-scrollbar-vertical{bottom:10px;width:10px}.os-theme-dark.os-host-rtl>.os-scrollbar-horizontal,.os-theme-light.os-host-rtl>.os-scrollbar-horizontal{left:10px;right:0}.os-theme-dark>.os-scrollbar-corner,.os-theme-light>.os-scrollbar-corner{background-color:#0000;height:10px;width:10px}.os-theme-dark>.os-scrollbar,.os-theme-light>.os-scrollbar{background:#0000;box-sizing:border-box;padding:2px}.os-theme-dark>.os-scrollbar.os-scrollbar-unusable,.os-theme-dark>.os-scrollbar>.os-scrollbar-track,.os-theme-light>.os-scrollbar.os-scrollbar-unusable,.os-theme-light>.os-scrollbar>.os-scrollbar-track{background:#0000}.os-theme-dark>.os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle{min-width:30px}.os-theme-dark>.os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle{min-height:30px}.os-theme-dark.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{-webkit-transition:background-color .3s;transition:background-color .3s}.os-theme-dark>.os-scrollbar>.os-scrollbar-track,.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar>.os-scrollbar-track,.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{border-radius:10px}.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:#0006}.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:#fff6}.os-theme-dark>.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:#0000008c}.os-theme-light>.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:#ffffff8c}.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle.active{background:#000000b3}.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle.active{background:#ffffffb3}.os-theme-dark>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.os-theme-dark.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical .os-scrollbar-handle:before{display:none}.os-theme-dark>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-horizontal .os-scrollbar-handle:before{bottom:-2px;top:-6px}.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-host-rtl.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-host-rtl.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{left:-2px;right:-6px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_jesec_flood=globalThis.webpackChunk_jesec_flood||[]).push([[128],{9335:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(9669),a=n.n(r),s=n(5823),i=n.n(s),o=n(3768),l=n(4355),c=n(3529);const{baseURI:d}=l.Z,u=e=>{o.Z.add({id:"alert.torrent.add.sent",count:e})},p=e=>{o.Z.add({id:"alert.torrent.add",type:"success",count:e})},h=e=>{o.Z.add({id:"alert.torrent.add.failed",type:"error",count:e})},m={addTorrentsByUrls:e=>a().post(`${d}api/torrents/add-urls`,e).then((t=>{let{data:n}=t;n.length?p(n.length):u(e.urls.length)}),(()=>{h(e.urls.length)})),addTorrentsByFiles:e=>a().post(`${d}api/torrents/add-files`,e).then((t=>{let{data:n}=t;n.length?p(n.length):u(e.files.length)}),(()=>{h(e.files.length)})),createTorrent:e=>a().post(`${d}api/torrents/create`,e,{responseType:"blob"}).then((t=>{let{data:n}=t;i()(n,(e.name||`${Date.now()}`).concat(".torrent")),p(1)}),(()=>{h(1)})),deleteTorrents:e=>a().post(`${d}api/torrents/delete`,e).then((()=>o.Z.add({id:"alert.torrent.remove",type:"success",count:e.hashes.length})),(()=>o.Z.add({id:"alert.torrent.remove.failed",type:"error",count:e.hashes.length}))),checkHash:e=>a().post(`${d}api/torrents/check-hash`,e).then((()=>{}),(()=>{})),fetchMediainfo:(e,t)=>a().get(`${d}api/torrents/${e}/mediainfo`,{cancelToken:t}).then((e=>e.data)),fetchTorrentContents:e=>a().get(`${d}api/torrents/${e}/contents`).then((e=>e.data),(()=>null)),fetchTorrentPeers:e=>a().get(`${d}api/torrents/${e}/peers`).then((e=>e.data),(()=>null)),fetchTorrentTrackers:e=>a().get(`${d}api/torrents/${e}/trackers`).then((e=>e.data),(()=>null)),getTorrentContentsDataPermalink:(e,t)=>a().get(`${l.Z.baseURI}api/torrents/${e}/contents/${t.join(",")}/token`).then((n=>`${window.location.protocol}//${window.location.host}${l.Z.baseURI}api/torrents/${e}/contents/${t.join(",")}/data?token=${n.data}`)),moveTorrents:e=>a().post(`${d}api/torrents/move`,e).then((()=>o.Z.add({id:"alert.torrent.move",type:"success",count:e.hashes.length})),(()=>o.Z.add({id:"alert.torrent.move.failed",type:"error",count:e.hashes.length}))),reannounce:e=>a().post(`${d}api/torrents/reannounce`,e).then((()=>{}),(()=>{})),startTorrents:async e=>{if(e.hashes.length>0)return a().post(`${d}api/torrents/start`,e).then((()=>{}),(()=>{}))},stopTorrents:async e=>{if(e.hashes.length>0)return a().post(`${d}api/torrents/stop`,e).then((()=>{}),(()=>{}))},setInitialSeeding:e=>a().patch(`${d}api/torrents/initial-seeding`,e).then((()=>{}),(()=>{})),setPriority:e=>a().patch(`${d}api/torrents/priority`,e).then((()=>{}),(()=>{})),setSequential:e=>a().patch(`${d}api/torrents/sequential`,e).then((()=>{}),(()=>{})),setFilePriority:(e,t)=>a().patch(`${d}api/torrents/${e}/contents`,t).then((()=>{}),(()=>{})),setTags:e=>a().patch(`${d}api/torrents/tags`,e).then((()=>c.Z.handleSetTaxonomySuccess()),(()=>{})),setTrackers:e=>a().patch(`${d}api/torrents/trackers`,e).then((()=>{}),(()=>{}))}},2159:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(7294),a=n(2747),s=n(6974),i=n(8441),o=n(8111),l=n(2809),c=n(4982),d=n(2579);const u=e=>{let{mode:t}=e;const{i18n:n}=(0,a.mV)(),u=(0,r.useRef)(null),p=(0,r.useRef)(null),[h,m]=(0,r.useState)(void 0),[Z,_]=(0,r.useState)(!1),b=(0,s.s0)(),g="login"===t;return(0,d.tZ)("div",{className:"application__entry-barrier",children:(0,d.tZ)(i.s_,{spacing:"large",children:(0,d.BX)(i.l0,{onSubmit:e=>{e.event.preventDefault(),_(!0);const t=e.formData;if(null==t.username||""===t.username)return _(!1),void m({id:"auth.error.username.empty"});if(null==t.password||""===t.password)return _(!1),void m({id:"auth.error.password.empty"});if(g){const e=t;o.Z.authenticate({username:e.username,password:e.password}).then((()=>{_(!1),b("/overview",{replace:!0})})).catch((e=>{_(!1),m(e.message),b("/login",{replace:!0})}))}else{const e=t;if(null==p.current)return _(!1),void m({id:"connection.settings.error.empty"});const n=p.current;if(null==n)return _(!1),void m({id:"connection.settings.error.empty"});o.Z.register({username:e.username,password:e.password,client:n,level:l.u.ADMINISTRATOR}).then((()=>{_(!1),b("/overview",{replace:!0})}),(e=>{_(!1),m(e.message)}))}},ref:u,children:[(0,d.tZ)(i.V9,{children:(0,d.tZ)("h1",{children:g?n._("auth.login"):n._("auth.create.an.account")})}),(0,d.BX)(i.KG,{children:[(0,d.tZ)("p",{className:"copy--lead",children:g?n._("auth.login.intro"):n._("auth.create.an.account.intro")}),null!=h?(0,d.tZ)(i.p7,{children:(0,d.tZ)(i.Xq,{isLoading:Z,children:"string"==typeof h?h:n._(h)})}):null,(0,d.tZ)(i.p7,{children:(0,d.tZ)(i.fE,{placeholder:n._("auth.username"),id:"username",autoComplete:"username"})}),(0,d.tZ)(i.p7,{children:(0,d.tZ)(i.fE,{placeholder:n._("auth.password"),id:"password",type:"password",autoComplete:g?"current-password":"new-password"})})]}),g?null:(0,d.tZ)(i.KG,{hasBorder:!0,children:(0,d.tZ)(c.Z,{onSettingsChange:e=>{p.current=e}})}),(0,d.tZ)(i.jH,{hasBorder:!0,children:(0,d.BX)(i.p7,{justify:"end",children:[(0,d.tZ)(i.zx,{priority:"tertiary",onClick:()=>{null!=u.current&&u.current.resetForm()},children:n._("auth.input.clear")}),(0,d.tZ)(i.zx,{isLoading:Z,type:"submit",children:g?n._("auth.log.in"):n._("auth.create.account")})]})})]})})})}},8447:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2579);const a=e=>{let{children:t}=e;return(0,r.tZ)("div",{className:"badge",children:t})}},228:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(2747),a=n(2579);const s=e=>{const{suffix:t,value:n}=e;if(null==n)return null;let s=null,i=null;t&&(i=(0,a.tZ)("span",{className:"duration--segment",children:t}));const o=-1===n?-1:(e=>{const t=Math.floor(e/31536e3),n=Math.floor(e%31536e3/604800),r=Math.floor(e%31536e3%604800/86400),a=Math.floor(e%31536e3%604800%86400/3600),s=Math.floor(e%31536e3%604800%86400%3600/60),i=Math.floor(e-60*s);let o=null;return o=t>0?{years:t,weeks:n,cumSeconds:e}:n>0?{weeks:n,days:r,cumSeconds:e}:r>0?{days:r,hours:a,cumSeconds:e}:a>0?{hours:a,minutes:s,cumSeconds:e}:s>0?{minutes:s,seconds:i,cumSeconds:e}:{seconds:i,cumSeconds:e},o})(n);return s=-1===o?(0,a.tZ)(r.cC,{id:"unit.time.infinity"}):null!=o.years&&o.years>0?[(0,a.BX)("span",{className:"duration--segment",children:[o.years,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.year"})})]},"years"),(0,a.BX)("span",{className:"duration--segment",children:[o.weeks,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.week"})})]},"weeks")]:null!=o.weeks&&o.weeks>0?[(0,a.BX)("span",{className:"duration--segment",children:[o.weeks,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.week"})})]},"weeks"),(0,a.BX)("span",{className:"duration--segment",children:[o.days,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.day"})})]},"days")]:null!=o.days&&o.days>0?[(0,a.BX)("span",{className:"duration--segment",children:[o.days,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.day"})})]},"days"),(0,a.BX)("span",{className:"duration--segment",children:[o.hours,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.hour"})})]},"hours")]:null!=o.hours&&o.hours>0?[(0,a.BX)("span",{className:"duration--segment",children:[o.hours,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.hour"})})]},"hours"),(0,a.BX)("span",{className:"duration--segment",children:[o.minutes,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.minute"})})]},"minutes")]:null!=o.minutes&&o.minutes>0?[(0,a.BX)("span",{className:"duration--segment",children:[o.minutes,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.minute"})})]},"minutes"),(0,a.BX)("span",{className:"duration--segment",children:[o.seconds,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.second"})})]},"seconds")]:(0,a.BX)("span",{className:"duration--segment",children:[o.seconds,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.second"})})]}),(0,a.BX)("span",{className:"duration",children:[s,i]})};s.defaultProps={suffix:void 0};const i=s},2036:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(7294),a=n(2747);const s={file:{0:"DONT_DOWNLOAD",1:"NORMAL",2:"HIGH"},torrent:{0:"DONT_DOWNLOAD",1:"LOW",2:"NORMAL",3:"HIGH"}};var i=n(2579);var o={name:"1gxvag8",styles:":focus{outline:none;-webkit-tap-highlight-color:transparent;}:focus-visible{outline:dashed;}"};const l=e=>{let{id:t,level:n,maxLevel:l,priorityType:c,showLabel:d,clickHandled:u,changePriorityFuncRef:p,onChange:h}=e;const{i18n:m}=(0,a.mV)(),[Z,_]=(0,r.useState)(n),b=()=>{let e=Z;return e>=l?e=0:e+=1,_(e),h(t,e),e};let g;if(null!=p&&(p.current=b),d){let e;switch(s[c][Z]){case"DONT_DOWNLOAD":e=m._("priority.dont.download");break;case"HIGH":e=m._("priority.high");break;case"LOW":e=m._("priority.low");break;default:e=m._("priority.normal")}g=(0,i.tZ)("span",{className:"priority-meter__label",children:e})}const v=(0,i.tZ)("div",{className:`priority-meter priority-meter--max-${l} priority-meter--level-${Z}`}),f=o;return u?(0,i.BX)("div",{className:"priority-meter__wrapper",css:f,children:[v,g]}):(0,i.BX)("button",{className:"priority-meter__wrapper",css:f,type:"button",onClick:()=>{b()},children:[v,g]})};l.defaultProps={showLabel:!1,clickHandled:!1,changePriorityFuncRef:void 0};const c=l},6882:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(1647),a=n(7294),s=n(5495),i=n(2579);const o=(0,a.memo)((e=>{let{status:t}=e;switch(t){case"error":return(0,i.tZ)(s.jj,{});case"checking":return(0,i.tZ)(s.$j,{});case"downloading":case"seeding":return(0,i.tZ)(s.zf,{});default:return(0,i.tZ)(s.dV,{})}})),l=(0,r.Pi)((e=>{let{percent:t,status:n}=e;return(0,i.BX)("div",{className:"progress-bar",children:[(0,i.tZ)("div",{className:"progress-bar__icon",children:n&&(0,i.tZ)(o,{status:n})}),(0,i.tZ)("div",{className:"progress-bar__fill__wrapper",children:(0,i.tZ)("div",{className:"progress-bar__fill",style:{width:`${t}%`}})})]})}));l.defaultProps={status:void 0};const c=l},2104:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(2747),a=n(485),s=n(2579);const i=e=>{let{value:t,isSpeed:n,className:i,precision:o}=e;const l=(0,a.Q)(t,o),{i18n:c}=(0,r.mV)();let d=c._((0,a.A)(l.unit));return n&&(d=c._("unit.speed",{baseUnit:d})),(0,s.BX)("span",{className:i,children:[Number.isNaN(l.value)?"—":c.number(l.value),(0,s.tZ)("em",{className:"unit",children:d})]})};i.defaultProps={isSpeed:!1,precision:2,className:void 0};const o=i},2656:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4184),a=n.n(r),s=n(2579);const i=e=>{const{children:t,modifier:n}=e,r=a()("application__view",{[`application__view--${n}`]:null!=n});return(0,s.tZ)("div",{className:r,children:t})};i.defaultProps={modifier:void 0};const o=i},8737:(e,t,n)=>{n.d(t,{Z:()=>r});const r={start:"torrents.list.context.start",stop:"torrents.list.context.stop",remove:"torrents.list.context.remove",checkHash:"torrents.list.context.check.hash",reannounce:"torrents.list.context.reannounce",setTaxonomy:"torrents.list.context.set.tags",move:"torrents.list.context.move",setTrackers:"torrents.list.context.set.trackers",torrentDetails:"torrents.list.context.details",downloadContents:"torrents.list.context.download.contents",downloadMetainfo:"torrents.list.context.download.metainfo",generateMagnet:"torrents.list.context.generate.magnet",setInitialSeeding:"torrents.list.context.initial.seeding",setSequential:"torrents.list.context.sequential",setPriority:"torrents.list.context.priority"}},882:(e,t,n)=>{n.d(t,{Z:()=>r});const r={dateAdded:"torrents.properties.date.added",dateFinished:"torrents.properties.date.finished",downRate:"torrents.properties.download.speed",downTotal:"torrents.properties.download.total",eta:"torrents.properties.eta",name:"torrents.properties.name",peers:"torrents.properties.peers",percentComplete:"torrents.properties.percentage",ratio:"torrents.properties.ratio",seeds:"torrents.properties.seeds",sizeBytes:"torrents.properties.size",tags:"torrents.properties.tags",upRate:"torrents.properties.upload.speed",upTotal:"torrents.properties.upload.total",dateCreated:"torrents.properties.date.created",directory:"torrents.properties.directory",hash:"torrents.properties.hash",isPrivate:"torrents.properties.is.private",message:"torrents.properties.tracker.message",trackerURIs:"torrents.properties.trackers"}},9343:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(2656),a=n(2159),s=n(2579);const i=()=>(0,s.tZ)(r.Z,{modifier:"auth-form",children:(0,s.tZ)(a.Z,{mode:"login"})})},1345:(e,t,n)=>{n.r(t),n.d(t,{default:()=>tn});var r=n(7294),a=n(4184),s=n.n(a),i=n(1647),o=n(2747),l=n(5495),c=n(1540),d=n(879),u=n(9335),p=n(4936),h=n(3529),m=n(9097),Z=n(2579);const _=e=>{const{clickHandler:t,icon:n,label:r,slug:a,noTip:i}=e,o=s()("action tooltip__wrapper",{[`action--${a}`]:null!=a});return(0,Z.BX)(m.Z,{content:r,onClick:t,position:"bottom",wrapperClassName:o,suppress:i,children:[n,(0,Z.tZ)("span",{className:"action__label",children:r})]})};_.defaultProps={noTip:!1};const b=_,g={dateAdded:"desc",dateFinished:"desc",downRate:"desc",downTotal:"desc",upRate:"desc",upTotal:"desc"};var v=n(9670),f=n(4537),y=n(3955),w=n.n(y),N=n(7264);var k={name:"140xmhl",styles:"width:100%;height:100%;text-align:left;:focus-visible{outline:dashed;}"};const C=e=>{let{className:t,label:n,isFocusHandled:r,onClick:a}=e;return r?(0,Z.tZ)("div",{role:"none",className:t,onClick:a,children:n}):(0,Z.tZ)("button",{type:"button",className:t,css:k,onClick:a,children:n})};C.defaultProps={className:void 0};const S=(0,i.Pi)((e=>{let{baseClassName:t,dropdownWrapperClass:n,dropdownButtonClass:a,dropdownClickRef:i,direction:o,header:l,matchButtonWidth:c,menuItems:d,noWrap:u,trigger:p,width:m,isFocusHandled:_,handleItemSelect:b,onOpen:g}=e;const y=(0,r.useRef)(w()("dropdown_")),k=h.Z.activeDropdownMenu===y.current,S=s()(n,`${t}--direction-${o}`,{[`${t}--match-button-width`]:c,[`${t}--width-${m}`]:null!=m,[`${t}--no-wrap`]:u,"is-expanded":k}),P=(0,r.useCallback)((()=>{window.removeEventListener("click",P),h.Z.setActiveDropdownMenu(null)}),[]);(0,N.Z)("Escape",(()=>P()));const O=(0,r.useCallback)((()=>{window.addEventListener("click",P),g&&g(),h.Z.setActiveDropdownMenu(y.current)}),[P,g]),T=e=>{null==e||e.stopPropagation(),k?P():O()};let x;if(i&&(i.current=T),k){const e=(0,Z.tZ)("div",{className:"dropdown__header",children:(0,Z.tZ)(C,{className:a,label:l,isFocusHandled:_??!1,onClick:T})},"dropdown-header"),t=(0,Z.tZ)("ul",{className:"dropdown__items",children:d.map(((e,t)=>(0,Z.tZ)("div",{className:"dropdown__list",children:e.map(((e,t)=>{const n=s()("dropdown__item menu__item",e.className,{"is-selectable":!1!==e.selectable,"is-selected":e.selected});return(0,Z.tZ)("li",{className:n,children:(0,Z.tZ)("button",{type:"button",disabled:!1===e.selectable,onClick:!1===e.selectable?void 0:()=>{P(),b(e)},children:e.displayName})},t)}))},t)))},"dropdown-items");x=(0,Z.tZ)(v.Z,{classNames:"menu",timeout:{enter:250,exit:250},children:(0,Z.tZ)("div",{className:"dropdown__content menu",children:"up"===o?[t,e]:[e,t]})})}return(0,Z.BX)("div",{className:S,children:[(0,Z.tZ)(C,{className:a,label:p??l,isFocusHandled:_??!1,onClick:T}),(0,Z.tZ)(f.Z,{children:x})]})}));S.defaultProps={baseClassName:"dropdown",direction:"down",dropdownWrapperClass:"dropdown",dropdownButtonClass:"dropdown__trigger",matchButtonWidth:!1,noWrap:!1,isFocusHandled:!1};const P=S;var O=n(882);const T=["name","eta","downRate","upRate","ratio","percentComplete","downTotal","upTotal","sizeBytes","dateAdded","dateFinished"],x=e=>{const{direction:t,selectedProperty:n,onSortChange:r}=e,{i18n:a}=(0,o.mV)();if(null==n)return null;const s=(0,Z.BX)("div",{className:"dropdown__button",children:[(0,Z.tZ)("span",{className:"dropdown__label",children:(0,Z.tZ)(o.cC,{id:"torrents.sort.title"})}),(0,Z.tZ)("span",{className:"dropdown__value",children:(0,Z.tZ)(o.cC,{id:O.Z[n]})})]}),i=[T.map((e=>{const r=e===n,s=r?(0,Z.tZ)("span",{className:`sort-dropdown__indicator sort-dropdown__indicator--${t}`}):null;return{displayName:(0,Z.BX)("div",{className:"sort-dropdown__item",children:[a._(O.Z[e]),s]}),selected:r,property:e}}))];return(0,Z.tZ)(P,{handleItemSelect:e=>{const{property:a}=e;if(null==a)return;let s=g[a]??"asc";n===a&&(s="asc"===t?"desc":"asc"),r({direction:s,property:a})},header:s,menuItems:i})},R=(0,i.Pi)((()=>{const{i18n:e}=(0,o.mV)(),{sortTorrents:t,torrentListViewSize:n}=d.Z.floodSettings,r=s()("action-bar",{"action-bar--is-condensed":"condensed"===n});return(0,Z.BX)("nav",{className:r,children:[(0,Z.tZ)("div",{className:"actions action-bar__item action-bar__item--sidebar-expand-collapse",children:(0,Z.tZ)(b,{label:"actionbar.button.sidebar.expand.collapse",slug:"sidebar-expand-collapse",icon:(0,Z.tZ)(l.v2,{}),clickHandler:()=>{const e=document.getElementsByClassName("application__view")[0];null!=e&&e.classList.toggle("application__view--sidebar-alternative-state")},noTip:!0})}),(0,Z.tZ)("div",{className:"actions action-bar__item action-bar__item--sort-torrents",children:(0,Z.tZ)(x,{direction:null!=t?t.direction:"desc",onSortChange:e=>{c.Z.saveSetting("sortTorrents",e)},selectedProperty:null!=t?t.property:"dateAdded"})}),(0,Z.BX)("div",{className:"actions action-bar__item action-bar__item--torrent-operations",children:[(0,Z.BX)("div",{className:"action-bar__group",children:[(0,Z.tZ)(b,{label:e._("actionbar.button.start.torrent"),slug:"start-torrent",icon:(0,Z.tZ)(l.zf,{}),clickHandler:()=>u.Z.startTorrents({hashes:p.Z.selectedTorrents})}),(0,Z.tZ)(b,{label:e._("actionbar.button.stop.torrent"),slug:"stop-torrent",icon:(0,Z.tZ)(l.dV,{}),clickHandler:()=>u.Z.stopTorrents({hashes:p.Z.selectedTorrents})})]}),(0,Z.BX)("div",{className:"action-bar__group action-bar__group--has-divider",children:[(0,Z.tZ)(b,{label:e._("actionbar.button.add.torrent"),slug:"add-torrent",icon:(0,Z.tZ)(l.mm,{}),clickHandler:()=>h.Z.setActiveModal({id:"add-torrents"})}),(0,Z.tZ)(b,{label:e._("actionbar.button.remove.torrent"),slug:"remove-torrent",icon:(0,Z.tZ)(l.JW,{}),clickHandler:()=>h.Z.setActiveModal({id:"remove-torrents"})})]})]})]})})),B=e=>{let{children:t}=e;return(0,Z.tZ)("div",{className:"application__content",children:t})},$=e=>{const{children:t,baseClassName:n,className:r,modifier:a}=e,i=s()(n,{[`${n}--${a}`]:n,[r]:r});return(0,Z.tZ)("div",{className:i,children:t})};$.defaultProps={baseClassName:"application__panel"};const X=$;var M=n(2656),j=n(5051),D=n(1861),H=n(8826),E=n(2104),A=n(6882);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){L(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const z=e=>{let{label:t,value:n}=e;return(0,Z.BX)("li",{"aria-label":"label",className:"diskusage__details-list__item",role:"cell",children:[(0,Z.tZ)("span",{className:"diskusage__details-list__label",children:t}),(0,Z.tZ)(E.Z,{className:"diskuage__size-used",value:n})]})};var V={name:"1ll9bqd",styles:"cursor:default"};const U=(0,i.Pi)((()=>{const{i18n:e}=(0,o.mV)(),{disks:t}=H.Z,{mountPoints:n}=d.Z.floodSettings;if(null==t||null==n)return null;const r=t.reduce(((e,t)=>I(I({},e),{},{[t.target]:t})),{}),a=n.filter((e=>e in r)).map((e=>r[e])).map((t=>(0,Z.tZ)("li",{className:"sidebar-filter__item sidebar__diskusage",role:"row",children:(0,Z.BX)(m.Z,{content:(0,Z.BX)("ul",{className:"diskusage__details-list",role:"tooltip",children:[(0,Z.tZ)(z,{value:t.used,label:e._("status.diskusage.used")}),(0,Z.tZ)(z,{value:t.avail,label:e._("status.diskusage.free")}),(0,Z.tZ)(z,{value:t.size,label:e._("status.diskusage.total")})]}),position:"top",styles:V,wrapperClassName:"diskusage__item",children:[(0,Z.BX)("div",{className:"diskusage__text-row",children:[t.target,(0,Z.BX)("span",{children:[Math.round(100*t.used/t.size),"%"]})]}),(0,Z.tZ)(A.Z,{percent:Math.round(100*t.used/t.size)})]})},t.target)));if(null==a||0===a.length)return null;const s=e._("status.diskusage.title");return(0,Z.BX)("ul",{"aria-label":s,className:"sidebar-filter sidebar__item",role:"table",children:[(0,Z.tZ)("li",{className:"sidebar-filter__item sidebar-filter__item--heading",children:s}),a]})})),G=()=>{const{i18n:e}=(0,o.mV)(),t=(0,r.useRef)(null);return(0,Z.tZ)(m.Z,{content:e._("sidebar.button.feeds"),onClick:()=>{null!=t.current&&t.current.dismissTooltip(),h.Z.setActiveModal({id:"feeds"})},ref:t,position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button sidebar__icon-button--interactive tooltip__wrapper",children:(0,Z.tZ)(l.fR,{})})};var W=n(5727),q=n(95);const K=10,Y=e=>j.Z.fetchNotifications({id:"notification-tooltip",limit:K,start:e}),Q=e=>{let{paginationStart:t,notificationTotal:n}=e;const{i18n:r}=(0,o.mV)();if(n>K){let e=t+1,a=t+K;return e>n&&(e=n),a>n&&(a=n),(0,Z.tZ)("div",{className:"toolbar toolbar--dark toolbar--top tooltip__toolbar tooltip__content--padding-surrogate",children:(0,Z.BX)("span",{className:"toolbar__item toolbar__item--label",children:[`${r._("notification.showing")} `,(0,Z.BX)("strong",{children:[e,` ${r._("general.to")} `,a]}),` ${r._("general.of")} `,(0,Z.tZ)("strong",{children:n})]})})}return null},J=e=>{let{index:t,notification:n}=e;const{i18n:r}=(0,o.mV)();return(0,Z.BX)("li",{className:"notifications__list__item",children:[(0,Z.BX)("div",{className:"notification__heading",children:[(0,Z.tZ)("span",{className:"notification__category",children:r._(`${n.id}.heading`)})," — ",(0,Z.tZ)("span",{className:"notification__timestamp",children:r.date(new Date(n.ts),{year:"numeric",month:"long",day:"2-digit",hour:"numeric",minute:"numeric"})})]}),(0,Z.tZ)("div",{className:"notification__message",children:r._(`${n.id}.body`,n.data)})]},t)},ee=e=>{let{paginationStart:t,notificationTotal:n,onPrevClick:r,onClearClick:a,onNextClick:i}=e;const{i18n:c}=(0,o.mV)();if(n>0){let e=t+20,o=t-K;return e>n&&(e=n),o<0&&(o=0),(0,Z.BX)("ul",{className:"notifications__toolbar toolbar toolbar--dark toolbar--bottom",children:[(0,Z.tZ)("li",{className:s()("toolbar__item toolbar__item--button",{"is-disabled":0===t}),children:(0,Z.BX)("button",{className:"tooltip__content--padding-surrogate",type:"button",onClick:r,children:[(0,Z.tZ)(l.s$,{}),`${o+1} - ${t}`]})}),(0,Z.tZ)("li",{className:"toolbar__item toolbar__item--button",children:(0,Z.tZ)("button",{className:"tooltip__content--padding-surrogate",type:"button",onClick:a,children:c._("notification.clear.all")})}),(0,Z.tZ)("li",{className:s()("toolbar__item toolbar__item--button",{"is-disabled":t+K>=n}),children:(0,Z.BX)("button",{className:"tooltip__content--padding-surrogate",type:"button",onClick:i,children:[`${t+K+1} - ${e}`,(0,Z.tZ)(l._Q,{})]})})]})}return null},te=(0,i.Pi)((()=>{const{i18n:e}=(0,o.mV)(),t=(0,r.useRef)(null),n=(0,r.useRef)(null),[a,i]=(0,r.useState)(!1),[c,d]=(0,r.useState)(0),[u,p]=(0,r.useState)(0),{hasNotification:h,notifications:_,notificationCount:b}=q.Z;return(0,r.useEffect)((()=>{var e;b.total>0&&null!==(e=t.current)&&void 0!==e&&e.isOpen()&&(i(!0),Y(c).finally((()=>i(!1))))}),[b,c]),(0,Z.BX)(m.Z,{contentClassName:"tooltip__content tooltip__content--no-padding",content:h?(0,Z.BX)("div",{className:s()("notifications",{"notifications--is-loading":a}),children:[(0,Z.tZ)(Q,{paginationStart:c,notificationTotal:b.total}),(0,Z.tZ)("div",{className:"notifications__loading-indicator",children:(0,Z.tZ)(l.Hj,{})}),(0,Z.tZ)("ul",{className:"notifications__list tooltip__content--padding-surrogate",ref:n,style:{minHeight:u},children:_.map(((e,t)=>(0,Z.tZ)(J,{index:t,notification:e})))}),(0,Z.tZ)(ee,{paginationStart:c,notificationTotal:b.total,onPrevClick:()=>{const e=c-K;var t;e>=0&&(p((null===(t=n.current)||void 0===t?void 0:t.clientHeight)||0),d(e))},onClearClick:()=>{null!=t.current&&t.current.dismissTooltip(),j.Z.clearNotifications(),p(0),d(0)},onNextClick:()=>{const e=c+K;var t;b.total>e&&(p((null===(t=n.current)||void 0===t?void 0:t.clientHeight)||0),d(e))}})]}):(0,Z.tZ)("div",{className:"notifications tooltip__content--padding-surrogate",style:{textAlign:"center"},children:e._("notification.no.notification")}),interactive:!0,onOpen:()=>Y(c),ref:t,width:340,position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button tooltip__wrapper",children:[(0,Z.tZ)(l.P_,{}),h?(0,Z.tZ)("span",{className:"notifications__badge",children:b.total}):null]})}));var ne=n(8232);const re=(0,i.Pi)((()=>{const{i18n:e}=(0,o.mV)(),t=(0,r.useRef)(null),{searchFilter:n}=ne.Z;(0,r.useEffect)((()=>{null!=t.current&&n!==t.current.value&&(t.current.value=n)}),[t,n]);const a=""!==n;return(0,Z.BX)("div",{className:s()({sidebar__item:!0,search:!0,"is-in-use":a}),children:[a&&(0,Z.tZ)("button",{className:"button search__reset-button",onClick:()=>{ne.Z.setSearchFilter(""),null!=t.current&&t.current.blur()},type:"button",children:(0,Z.tZ)(l.x8,{})}),(0,Z.tZ)(l.ol,{}),(0,Z.tZ)("input",{className:"textbox",ref:t,type:"text",placeholder:e._("sidebar.search.placeholder"),onChange:e=>{ne.Z.setSearchFilter(e.target.value)}})]})})),ae=()=>{const{i18n:e}=(0,o.mV)(),t=(0,r.useRef)(null);return(0,Z.tZ)(m.Z,{content:e._("sidebar.button.settings"),onClick:()=>{null!=t.current&&t.current.dismissTooltip(),h.Z.setActiveModal({id:"settings"})},ref:t,position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button sidebar__icon-button--interactive tooltip__wrapper",children:(0,Z.tZ)(l.Zr,{})})},se=e=>{let{children:t}=e;return(0,Z.tZ)("div",{className:"sidebar__actions",children:t})};var ie=n(1159),oe=n.n(ie),le=n(5181);function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pe=e=>{let{bytes:t}=e;return 0===t?(0,Z.tZ)(o.cC,{id:"speed.unlimited"}):(0,Z.tZ)(E.Z,{value:t,isSpeed:!0,precision:1})},he=e=>{let{i18n:t,direction:n,speedLimits:r,throttleGlobalDownSpeed:a,throttleGlobalUpSpeed:s}=e;const i=de(de({className:`dropdown__label dropdown__label--${n}`},"download"===n?{displayName:t._("sidebar.speedlimits.download")}:{displayName:t._("sidebar.speedlimits.upload")}),{},{selectable:!1,value:null}),o={download:a,upload:s},l=r[n];let c=!0;const d=l.map((e=>{let t=!1;return o&&o[n]===e&&(t=!0,c=!1),{displayName:(0,Z.tZ)(pe,{bytes:e}),property:n,selected:t,selectable:!0,value:e}}));if(c&&o){const e=oe()(l,o[n]);d.splice(e,0,{displayName:(0,Z.tZ)(pe,{bytes:o[n]}),property:n,selected:!0,selectable:!0,value:o[n]})}return d.unshift(i),d},me=(0,i.Pi)((()=>{var e,t;const{i18n:n}=(0,o.mV)(),a=(0,r.useRef)(null),s=(0,r.useRef)((()=>{})),i=n._("sidebar.button.speedlimits"),c={i18n:n,speedLimits:d.Z.floodSettings.speedLimits,throttleGlobalDownSpeed:(null===(e=d.Z.clientSettings)||void 0===e?void 0:e.throttleGlobalDownSpeed)??0,throttleGlobalUpSpeed:(null===(t=d.Z.clientSettings)||void 0===t?void 0:t.throttleGlobalUpSpeed)??0};return(0,Z.tZ)(P,{dropdownClickRef:s,dropdownWrapperClass:"dropdown dropdown--speed-limits sidebar__action",handleItemSelect:e=>{null!=e.value&&("download"===e.property?le.Z.saveSetting("throttleGlobalDownSpeed",e.value):"upload"===e.property&&le.Z.saveSetting("throttleGlobalUpSpeed",e.value))},header:(0,Z.BX)("div",{className:"sidebar__icon-button sidebar__icon-button--interactive sidebar__icon-button--limits",title:i,children:[(0,Z.tZ)(l.f9,{}),i]}),menuItems:[he(de({direction:"download"},c)),he(de({direction:"upload"},c))],onOpen:()=>{null!=a.current&&a.current.dismissTooltip()},trigger:(0,Z.tZ)(m.Z,{content:i,position:"bottom",ref:a,wrapperClassName:"sidebar__icon-button tooltip__wrapper",onClick:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.call(s)},children:(0,Z.tZ)(l.f9,{})}),isFocusHandled:!0})}));var Ze=n(8447);var _e={name:"1wfsguk",styles:":focus{outline:none;-webkit-tap-highlight-color:transparent;}"};const be=e=>{let{name:t,icon:n,isActive:r,slug:a,count:i,size:l,handleClick:c}=e;const{i18n:d}=(0,o.mV)(),u=s()("sidebar-filter__item",{"is-active":r});let p=t;if(""===p)p=d._("filter.all");else if("untagged"===p){if(0===i)return null;p=d._("filter.untagged")}return"checking"!==a&&"error"!==a||0!==i?(0,Z.tZ)("li",{children:(0,Z.BX)("button",{className:u,css:_e,type:"button",onClick:e=>c(a,e),role:"menuitem",children:[n,(0,Z.tZ)("span",{className:"name",children:p}),(0,Z.tZ)(Ze.Z,{children:i}),l&&(0,Z.tZ)(E.Z,{value:l,className:"size"})]})}):null};be.defaultProps={icon:void 0,size:void 0};const ge=be;var ve={name:"zlw20a",styles:"transform:scaleY(-1)"};const fe=e=>{let{children:t,className:n,expanded:r,handleClick:a}=e;return(0,Z.BX)("button",{className:n,onClick:e=>a(e),children:[t,r?(0,Z.tZ)(l.Tt,{css:ve}):(0,Z.tZ)(l.Tt,{})]})};fe.defaultProps={className:void 0};const ye=fe,we=(0,i.Pi)((()=>{const{i18n:e}=(0,o.mV)(),t=[{label:e._("filter.all"),slug:"",icon:(0,Z.tZ)(l.oT,{})},{label:e._("filter.status.downloading"),slug:"downloading",icon:(0,Z.tZ)(l.Cz,{})},{label:e._("filter.status.seeding"),slug:"seeding",icon:(0,Z.tZ)(l.TV,{})},{label:e._("filter.status.checking"),slug:"checking",icon:(0,Z.tZ)(l.$j,{})},{label:e._("filter.status.completed"),slug:"complete",icon:(0,Z.tZ)(l.FG,{})},{label:e._("filter.status.stopped"),slug:"stopped",icon:(0,Z.tZ)(l.dV,{})},{label:e._("filter.status.active"),slug:"active",icon:(0,Z.tZ)(l.ZS,{})},{label:e._("filter.status.inactive"),slug:"inactive",icon:(0,Z.tZ)(l.Rz,{})},{label:e._("filter.status.error"),slug:"error",icon:(0,Z.tZ)(l.jj,{})}].map((e=>(0,Z.tZ)(ge,{handleClick:(e,t)=>ne.Z.setStatusFilters(e,t),count:ne.Z.taxonomy.statusCounts[e.slug]||0,icon:e.icon,isActive:""===e.slug&&!ne.Z.statusFilter.length||ne.Z.statusFilter.includes(e.slug),name:e.label,slug:e.slug},e.slug))),n=e._("filter.status.title"),[a,s]=(0,r.useState)(!0);return(0,Z.BX)("ul",{"aria-label":n,className:"sidebar-filter sidebar__item",role:"menu",children:[(0,Z.tZ)("li",{className:"sidebar-filter__item",role:"none",children:(0,Z.tZ)(ye,{className:"sidebar-filter__item--heading",expanded:a,handleClick:()=>{s(!a)},children:n})}),a&&t]})})),Ne=(0,i.Pi)((()=>{const{i18n:e}=(0,o.mV)(),[t,n]=(0,r.useState)(!0),a=Object.keys(ne.Z.taxonomy.tagCounts);if(1===a.length&&""===a[0]||2===a.length&&"untagged"===a[1])return null;const s=a.slice().sort(((e,t)=>""===e||"untagged"===e?-1:""===t||"untagged"===t?1:e.localeCompare(t))).map((e=>(0,Z.tZ)(ge,{handleClick:(e,t)=>ne.Z.setTagFilters(e,t),count:ne.Z.taxonomy.tagCounts[e]||0,isActive:""===e&&!ne.Z.tagFilter.length||ne.Z.tagFilter.includes(e),name:e,slug:e,size:ne.Z.taxonomy.tagSizes[e]},e))),i=e._("filter.tag.title");return(0,Z.BX)("ul",{"aria-label":i,className:"sidebar-filter sidebar__item",role:"menu",children:[(0,Z.tZ)("li",{className:"sidebar-filter__item",role:"none",children:(0,Z.tZ)(ye,{className:"sidebar-filter__item--heading",expanded:t,handleClick:()=>{n(!t)},children:i})}),t&&s]})}));var ke=n(4355);const Ce=()=>{const{i18n:e}=(0,o.mV)();return(0,Z.tZ)(m.Z,{content:e._(ke.Z.isPreferDark?"sidebar.button.theme.light":"sidebar.button.theme.dark"),onClick:()=>ke.Z.setUserPreferDark(!ke.Z.isPreferDark),position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button sidebar__icon-button--interactive tooltip__wrapper",children:(0,Z.tZ)(l.R5,{})})},Se=(0,i.Pi)((()=>{const{i18n:e}=(0,o.mV)(),[t,n]=(0,r.useState)(!0),a=Object.keys(ne.Z.taxonomy.trackerCounts);if(1===a.length&&""===a[0])return null;const s=a.slice().sort(((e,t)=>""===e?-1:""===t?1:e.localeCompare(t))).map((e=>(0,Z.tZ)(ge,{handleClick:(e,t)=>ne.Z.setTrackerFilters(e,t),count:ne.Z.taxonomy.trackerCounts[e]||0,isActive:""===e&&!ne.Z.trackerFilter.length||ne.Z.trackerFilter.includes(e),name:e,slug:e,size:ne.Z.taxonomy.trackerSizes[e]},e))),i=e._("filter.tracker.title");return(0,Z.BX)("ul",{"aria-label":i,className:"sidebar-filter sidebar__item",role:"menu",children:[(0,Z.tZ)("li",{className:"sidebar-filter__item",role:"none",children:(0,Z.tZ)(ye,{className:"sidebar-filter__item--heading",expanded:t,handleClick:()=>{n(!t)},children:i})}),t&&s]})}));var Pe=n(8699),Oe=n(1909),Te=n(9509),xe=n(228);const Re={download:(0,Z.tZ)(l.UW,{}),infinity:(0,Z.tZ)(l.ZG,{}),upload:(0,Z.tZ)(l.gq,{})},Be=(0,i.Pi)((e=>{let{inspectorPoint:t}=e;const{i18n:n}=(0,o.mV)(),r=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{throttleGlobalDownSpeed:a=0,throttleGlobalUpSpeed:i=0}=d.Z.clientSettings||{},{transferSummary:o}=Te.Z,l={download:a,upload:i},c={download:o.downTotal,upload:o.upTotal};let u={download:o.downRate,upload:o.upRate};null!=t&&(u={upload:t.upload,download:t.download});const p=s()("client-stats__rate__data--secondary",{"is-visible":null==t&&Oe.Z.isConnected}),h=s()("client-stats__rate__data--timestamp",{"is-visible":null!=t&&r.showHoverDuration});let m=null;null!=(null==t?void 0:t.timestamp)&&(m=(0,Z.tZ)("div",{className:h,children:(0,Z.tZ)(xe.Z,{suffix:n._("general.ago"),value:Math.trunc((Date.now()-t.timestamp)/1e3)})}));let _=null;return _=0===l[e]?Re.infinity:(0,Z.tZ)(E.Z,{value:l[e],isSpeed:!0}),(0,Z.BX)("div",{className:`client-stats__rate client-stats__rate--${e}`,children:[(0,Z.tZ)("div",{className:"client-stats__rate__icon",children:Re[e]}),(0,Z.BX)("div",{className:"client-stats__rate__data",children:[(0,Z.tZ)("div",{className:"client-stats__rate__data--primary",children:(0,Z.tZ)(E.Z,{value:u[e],isSpeed:!0})}),m,(0,Z.BX)("div",{className:p,children:[(0,Z.tZ)("div",{className:"client-stats__rate__data--total",children:(0,Z.tZ)(E.Z,{value:c[e]})}),(0,Z.tZ)("div",{className:"client-stats__rate__data--limit",children:_})]})]})]})};return(0,Z.BX)("div",{className:"client-stats__rates",children:[r("download",{showHoverDuration:!0}),r("upload")]})})),$e=Be;var Xe=n(9786),Me=n(3419),je=n(7281),De=n(8776),He=n(7360);const Ee=e=>{let{direction:t}=e;return(0,Z.BX)("linearGradient",{id:`graph__gradient--${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,Z.tZ)("stop",{className:`graph__gradient--top graph__gradient--top--${t}`,offset:"0%"}),(0,Z.tZ)("stop",{className:`graph__gradient--bottom graph__gradient--bottom--${t}`,offset:"100%"})]})},Ae=(e,t,n)=>{const r=e[t][Math.ceil(n)],a=e[t][Math.floor(n)];return a+n%1*(r-a)},Fe=(0,i.Pi)((e=>{let{id:t,height:n,width:a,handlerRefs:s,onHover:i,onMouseOut:o}=e;const[l,c]=(0,r.useState)(!1),d=(0,r.useRef)(0),u=(0,r.useRef)({download:0,upload:0,timestamp:0}),p=Te.Z.transferRates,h=(0,He.Z)().domain([0,p.download.length-1]).range([0,a]),m=(0,He.Z)().domain([0,(0,De.Z)(p.download,((e,t)=>Math.max(e,p.upload[t])))]).range([n-10,10]);s.current={handleMouseMove:e=>{d.current=h.invert(e),i(u.current)},handleMouseOut:()=>{c(!1),o()},handleMouseOver:()=>{c(!0)}},l&&(u.current={download:Ae(p,"download",d.current),upload:Ae(p,"upload",d.current),timestamp:p.timestamps[Math.round(d.current)]});const _=Xe.Z;return(0,Z.BX)("svg",{className:"graph",id:t,children:[(0,Z.BX)("defs",{children:[(0,Z.tZ)(Ee,{direction:"upload"}),(0,Z.tZ)(Ee,{direction:"download"})]}),Te.e.map((e=>[(0,Z.tZ)("path",{className:"graph__area",fill:`url('#graph__gradient--${e}')`,d:(0,Me.Z)().x(((e,t)=>h(t)||0)).y0(n).y1((e=>m(e)||0)).curve(_)(p[e])},`area-${e}`),(0,Z.tZ)("path",{className:`graph__line graph__line--${e}`,d:(0,je.Z)().x(((e,t)=>h(t)||0)).y((e=>m(e)||0)).curve(_)(p[e])},`line-${e}`),(0,Z.tZ)("circle",{className:`graph__circle graph__circle--${e}`,r:2.5,style:{opacity:l?1:0},transform:`translate(${h(d.current)},${m(u.current[e])})`},`point-${e}`)]))]})})),Ie=Fe,Le=(0,i.Pi)((()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)(250),s=(0,r.useRef)(null);return(0,Z.tZ)(Pe.Z,{offset:!0,onResize:e=>{var t;null!==(t=e.offset)&&void 0!==t&&t.width&&a(e.offset.width)},children:r=>{let{measureRef:a}=r;return(0,Z.tZ)("div",{ref:a,className:"client-stats__wrapper sidebar__item",children:(0,Z.BX)("div",{className:"client-stats",onMouseMove:e=>{var t,n;null!=(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.clientX)&&(null===(n=s.current)||void 0===n||n.handleMouseMove(e.nativeEvent.clientX))},onMouseOver:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.handleMouseOver()},onMouseOut:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.handleMouseOut()},onFocus:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.handleMouseOver()},onBlur:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.handleMouseOut()},children:[(0,Z.tZ)($e,{inspectorPoint:e}),Oe.Z.isConnected&&(0,Z.tZ)(Ie,{height:150,id:"transfer-rate-graph",onMouseOut:()=>{t(null)},onHover:e=>{t(e)},handlerRefs:s,width:n})]})})}})})),ze=Le,Ve=()=>(0,Z.BX)(D.E,{options:{scrollbars:{autoHide:"scroll",clickScrolling:!1,dragScrolling:!1},className:"application__sidebar os-theme-thin"},children:[(0,Z.BX)(se,{children:[(0,Z.tZ)(me,{}),(0,Z.tZ)(ae,{}),(0,Z.tZ)(G,{}),(0,Z.tZ)(te,{}),(0,Z.tZ)(W.Z,{})]}),(0,Z.tZ)(ze,{}),(0,Z.tZ)(re,{}),(0,Z.tZ)(we,{}),(0,Z.tZ)(Ne,{}),(0,Z.tZ)(Se,{}),(0,Z.tZ)(U,{}),(0,Z.tZ)("div",{style:{flexGrow:1}}),(0,Z.tZ)(se,{children:(0,Z.tZ)(Ce,{})})]});var Ue=n(8949),Ge=n(9929),We=n(8441),qe=n(2433);const Ke=(0,i.Pi)((e=>{var t,n,r;let{id:a}=e;const i=(null===(t=h.Z.activeContextMenu)||void 0===t?void 0:t.id)===a,l=(null===(n=h.Z.activeContextMenu)||void 0===n?void 0:n.items)??[],c=(null===(r=h.Z.activeContextMenu)||void 0===r?void 0:r.clickPosition)??{x:0,y:0},{i18n:d}=(0,o.mV)();return(0,N.Z)("Escape",(()=>h.Z.dismissContextMenu(a))),(0,Z.tZ)(We.xV,{triggerCoordinates:c,onOverlayClick:()=>{h.Z.dismissContextMenu(a)},onOverlayRightClick:e=>{e.preventDefault()},isIn:i,children:l.map(((e,t)=>{let n,r;if("action"===e.type)r=s()("menu__item",{"is-selectable":e.clickHandler}),n=(0,Z.BX)("span",{children:[(0,Z.BX)("span",{className:s()("menu__item__label--primary",{"has-action":e.labelAction}),children:[(0,Z.tZ)("span",{className:"menu__item__label",children:d._(e.label)}),e.labelAction?(0,Z.tZ)("span",{className:"menu__item__label__action",children:(0,Z.tZ)(e.labelAction,{})}):void 0]}),e.labelSecondary?(0,Z.tZ)("span",{className:"menu__item__label--secondary",children:(0,Z.tZ)(e.labelSecondary,{})}):void 0]});else r=s()("menu__item",{"menu__item--separator":"separator"===e.type});return(0,Z.tZ)("li",{className:r,children:(0,Z.tZ)("button",{type:"button",disabled:"action"!==e.type||!e.clickHandler,onClick:t=>("separator"!==e.type&&(!1===e.dismissMenu&&t.nativeEvent.stopImmediatePropagation(),e.clickHandler&&e.clickHandler(t),!1!==e.dismissMenu&&h.Z.dismissContextMenu(a)),!1),onContextMenu:e=>{e.preventDefault()},children:n})},"action"===e.type?e.action:`sep-${t}`)}))})})),Ye=Ke;var Qe=n(4356),Je=n(5603);function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){nt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rt=(0,r.forwardRef)(((e,t)=>{const{children:n,className:a,onScroll:s}=e,i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{var e;const n=i.current;if(null==n)return()=>{};const r=null===(e=n.osInstance())||void 0===e?void 0:e.getElements().viewport;return t(r),s&&r.addEventListener("scroll",(e=>s(e)),{passive:!0}),()=>{s&&r.removeEventListener("scroll",(e=>s(e)))}}),[s,t]),(0,Z.tZ)(D.E,tt(tt({},e),{},{options:{scrollbars:{autoHide:"leave",clickScrolling:!0},className:a},ref:i,children:n}))})),at=(0,r.forwardRef)(((e,t)=>{const{className:n,itemCount:r,itemKey:a,itemRenderer:s,itemSize:i,outerRef:o}=e,{height:l}=(0,Je.Z)();return(0,Z.tZ)(Qe.t7,{className:`${n} ${ke.Z.isPreferDark?"os-theme-light":"os-theme-dark"}`,height:Math.max(30*i,l),itemCount:r,itemKey:a,itemSize:i,width:"100%",outerElementType:ke.Z.isSmallScreen?void 0:rt,ref:t,overscanCount:30,outerRef:o,children:s})})),st=(0,i.Pi)(at);var it=n(4656);const ot="\n body { user-select: none !important; }\n * { cursor: col-resize !important; }\n";var lt={name:"3v16dc",styles:"text-align:left;:focus{outline:none;-webkit-tap-highlight-color:transparent;}"};const ct=(0,i.Pi)((0,r.forwardRef)(((e,t)=>{let{onCellClick:n,onCellFocus:a,onWidthsChange:i}=e;const[l,c]=(0,r.useState)(!1),u=(0,r.useRef)(),p=(0,r.useRef)(),m=(0,r.useRef)(),_=(0,it.Z)(t),b=(0,r.useRef)(null),{i18n:g}=(0,o.mV)(),v=e=>{let t=0;null!=m.current&&(t=e.clientX-m.current);let n=20;null!=p.current&&(n=p.current+t),n>20&&(p.current=n,m.current=e.clientX,null!=b.current&&null!=_.current&&(b.current.style.transform=`translate(${Math.max(0,e.clientX)}px, ${_.current.getBoundingClientRect().top}px)`))},f=()=>{h.Z.removeGlobalStyle(ot),window.removeEventListener("pointerup",f),window.removeEventListener("pointermove",v),c(!1),m.current=void 0,null!=b.current&&(b.current.style.opacity="0"),null!=u.current&&null!=p.current&&i(u.current,p.current),u.current=void 0,p.current=void 0};return(0,Z.BX)("div",{className:"table__row table__row--heading",role:"row",ref:_,children:[d.Z.floodSettings.torrentListColumns.reduce(((e,t)=>{let{id:r,visible:i}=t;if(!i)return e;const y=O.Z[r];if(null==y)return e;let w=null;const N=d.Z.floodSettings.torrentListColumnWidths[r]||100;l||(w=(0,Z.tZ)("span",{className:"table__heading__handle",onPointerDown:e=>{l||null==b.current||null==_.current||(c(!0),u.current=r,p.current=N,m.current=e.clientX,window.addEventListener("pointerup",f),window.addEventListener("pointermove",v),h.Z.addGlobalStyle(ot),b.current.style.transform=`translate(${Math.max(0,e.clientX)}px, ${_.current.getBoundingClientRect().top}px)`,b.current.style.opacity="1")}}));const k=r===d.Z.floodSettings.sortTorrents.property,C=s()("table__cell table__heading",{"table__heading--is-sorted":k,[`table__heading--direction--${d.Z.floodSettings.sortTorrents.direction}`]:k});return e.push((0,Z.BX)("button",{className:C,css:lt,role:"columnheader","aria-sort":k?"asc"===d.Z.floodSettings.sortTorrents.direction?"ascending":"descending":"none",type:"button",onClick:()=>n(r),onFocus:()=>a(),style:{width:`${N}px`},children:[(0,Z.tZ)("span",{className:"table__heading__label",title:g._(y),children:(0,Z.tZ)(o.cC,{id:y})}),w]},r)),e}),[]),(0,Z.tZ)("div",{className:"table__cell table__heading table__heading--fill"}),(0,Z.tZ)("div",{className:"table__heading__resize-line",ref:b})]})}))),dt=ct;var ut=n(463);function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){mt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Zt=e=>{const t=[];e.forEach((n=>{const r=new FileReader;r.onload=r=>{var a;null!=(null===(a=r.target)||void 0===a?void 0:a.result)&&"string"==typeof r.target.result&&t.push({name:n.name,data:r.target.result.split("base64,")[1]}),t.length===e.length&&null!=t[0]&&h.Z.setActiveModal({id:"add-torrents",tab:"by-file",files:t})},r.readAsDataURL(n)}))},_t=e=>{let{children:t}=e;const{getRootProps:n,isDragActive:r}=(0,ut.uI)({onDrop:Zt,noClick:!0,noKeyboard:!0});return(0,Z.tZ)("div",ht(ht({},n({onClick:e=>e.preventDefault()})),{},{className:"dropzone dropzone--with-overlay torrents "+(r?"dropzone--is-dragging":""),children:t}))};var bt=n(1773),gt=n(1109),vt=n(8737),ft=n(2036);const yt=()=>p.Z.selectedTorrents[p.Z.selectedTorrents.length-1],wt=(0,i.Pi)((e=>{let{property:t}=e;return(0,Z.tZ)("span",{className:"toggle-input checkbox",style:{display:"inline"},children:(0,Z.tZ)("div",{className:"toggle-input__indicator",children:(0,Z.tZ)("div",{className:"toggle-input__indicator__icon",style:{opacity:p.Z.torrents[yt()][t]?"1":void 0},children:(0,Z.tZ)(l.MC,{})})})})})),Nt=e=>{const t=(0,r.createRef)();return[{type:"action",action:"start",label:vt.Z.start,clickHandler:()=>{u.Z.startTorrents({hashes:p.Z.selectedTorrents})}},{type:"action",action:"stop",label:vt.Z.stop,clickHandler:()=>{u.Z.stopTorrents({hashes:p.Z.selectedTorrents})}},{type:"action",action:"remove",label:vt.Z.remove,clickHandler:()=>{h.Z.setActiveModal({id:"remove-torrents"})}},{type:"action",action:"checkHash",label:vt.Z.checkHash,clickHandler:()=>{u.Z.checkHash({hashes:p.Z.selectedTorrents})}},{type:"action",action:"reannounce",label:vt.Z.reannounce,clickHandler:()=>{u.Z.reannounce({hashes:p.Z.selectedTorrents})}},{type:"separator"},{type:"action",action:"setTaxonomy",label:vt.Z.setTaxonomy,clickHandler:()=>{h.Z.setActiveModal({id:"set-taxonomy"})}},{type:"action",action:"move",label:vt.Z.move,clickHandler:()=>{h.Z.setActiveModal({id:"move-torrents"})}},{type:"action",action:"setTrackers",label:vt.Z.setTrackers,clickHandler:()=>{h.Z.setActiveModal({id:"set-trackers"})}},{type:"separator"},{type:"action",action:"torrentDetails",label:vt.Z.torrentDetails,clickHandler:()=>{h.Z.setActiveModal({id:"torrent-details",hash:yt()})}},{type:"action",action:"downloadContents",label:vt.Z.downloadContents,clickHandler:e=>{e.preventDefault(),p.Z.selectedTorrents.forEach((e=>{const t=document.createElement("a");t.download="",t.href=`${ke.Z.baseURI}api/torrents/${e}/contents/all/data`,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)}))}},{type:"action",action:"downloadMetainfo",label:vt.Z.downloadMetainfo,clickHandler:e=>{e.preventDefault();const t=document.createElement("a");t.download="",t.href=`${ke.Z.baseURI}api/torrents/${p.Z.selectedTorrents.join(",")}/metainfo`,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)}},{type:"action",action:"generateMagnet",label:vt.Z.generateMagnet,clickHandler:()=>{h.Z.setActiveModal({id:"generate-magnet"})}},{type:"action",action:"setInitialSeeding",label:vt.Z.setInitialSeeding,clickHandler:()=>{const{selectedTorrents:e}=p.Z;u.Z.setInitialSeeding({hashes:e,isInitialSeeding:!p.Z.torrents[yt()].isInitialSeeding})},dismissMenu:!1,labelAction:()=>(0,Z.tZ)(wt,{property:"isInitialSeeding"})},{type:"action",action:"setSequential",label:vt.Z.setSequential,clickHandler:()=>{const{selectedTorrents:e}=p.Z;u.Z.setSequential({hashes:e,isSequential:!p.Z.torrents[yt()].isSequential})},dismissMenu:!1,labelAction:()=>(0,Z.tZ)(wt,{property:"isSequential"})},{type:"action",action:"setPriority",label:vt.Z.setPriority,clickHandler:()=>{null!=t.current&&u.Z.setPriority({hashes:p.Z.selectedTorrents,priority:t.current()})},dismissMenu:!1,labelAction:()=>(0,Z.tZ)(ft.Z,{id:e.hash,level:e.priority,maxLevel:3,onChange:()=>{},priorityType:"torrent",showLabel:!1,changePriorityFuncRef:t,clickHandled:!0},e.hash)}]};const kt={eta:(0,Z.tZ)(l.SU,{}),sizeBytes:(0,Z.tZ)(l.Zd,{}),downRate:(0,Z.tZ)(l.ki,{}),directory:(0,Z.tZ)(l.Bm,{}),hash:(0,Z.tZ)(l.kb,{}),dateAdded:(0,Z.tZ)(l.f,{}),dateCreated:(0,Z.tZ)(l.Oo,{}),dateFinished:(0,Z.tZ)(l.nK,{}),isPrivate:(0,Z.tZ)(l.HE,{}),message:(0,Z.tZ)(l.Ey,{}),percentComplete:(0,Z.tZ)(l.ki,{}),peers:(0,Z.tZ)(l.Ib,{}),ratio:(0,Z.tZ)(l.T_,{}),seeds:(0,Z.tZ)(l.O5,{}),trackerURIs:(0,Z.tZ)(l.Fk,{}),upRate:(0,Z.tZ)(l.u3,{}),upTotal:(0,Z.tZ)(l.u3,{})},Ct=(0,i.Pi)((e=>{let{value:t}=e;return t?(0,Z.tZ)(l.FV,{className:"torrent__detail__icon torrent__detail__icon--checkmark"}):null})),St=(0,i.Pi)((e=>{let{date:t}=e;const{i18n:n}=(0,o.mV)();return(0,Z.tZ)("span",{children:n.date(new Date(1e3*t))})})),Pt=(0,i.Pi)((e=>{let{eta:t}=e;return t?(0,Z.tZ)(xe.Z,{value:t}):null})),Ot=(0,i.Pi)((e=>{let{peersConnected:t,totalPeers:n}=e;const{i18n:r}=(0,o.mV)();return(0,Z.tZ)(o.cC,{id:"torrent.list.peers",values:{connected:r.number(t),of:(0,Z.tZ)("em",{className:"unit",children:(0,Z.tZ)(o.cC,{id:"torrent.list.peers.of"})}),total:r.number(n)}})})),Tt=(0,i.Pi)((e=>{let{ratio:t}=e;const{i18n:n}=(0,o.mV)();return(0,Z.tZ)("span",{children:n.number(t,{maximumFractionDigits:2})})})),xt=(0,i.Pi)((e=>{let{tags:t}=e;return(0,Z.tZ)("ul",{className:"torrent__tags tag",children:t.map((e=>(0,Z.tZ)("li",{className:"torrent__tag",children:e},e)))})})),Rt=(0,i.Pi)((e=>{let{trackers:t}=e;return(0,Z.tZ)("span",{children:t.join(", ")})})),Bt=(0,i.Pi)((e=>{let{torrent:t,column:n}=e;switch(n){case"dateAdded":case"dateCreated":case"dateFinished":return(0,Z.tZ)(St,{date:t[n]});case"downRate":case"upRate":return(0,Z.tZ)(E.Z,{value:t[n],isSpeed:!0});case"downTotal":case"upTotal":case"sizeBytes":return(0,Z.tZ)(E.Z,{value:t[n]});case"ratio":return(0,Z.tZ)(Tt,{ratio:t[n]});case"isPrivate":return(0,Z.tZ)(Ct,{value:t[n]});case"tags":return(0,Z.tZ)(xt,{tags:t[n]});case"trackerURIs":return(0,Z.tZ)(Rt,{trackers:t[n]});case"eta":return(0,Z.tZ)(Pt,{eta:t[n]});case"seeds":return(0,Z.tZ)(Ot,{peersConnected:t.seedsConnected,totalPeers:t.seedsTotal});case"peers":return(0,Z.tZ)(Ot,{peersConnected:t.peersConnected,totalPeers:t.peersTotal});case"percentComplete":return(0,Z.tZ)(A.Z,{percent:(0,Ue.Fl)((()=>Math.ceil(t.percentComplete))).get(),status:(0,Ue.Fl)((()=>(0,gt.o)(t.status))).get()});default:return(0,Z.tZ)("span",{children:t[n]})}}));var $t={name:"1te7sjq",styles:"pointer-events:none;user-select:none"};const Xt=(0,i.Pi)((e=>{let{hash:t,content:n,column:r,className:a,classNameOverride:i,width:o,showIcon:c}=e;const d=c?kt[r]:null;return(0,Z.BX)("div",{className:i?a:s()("torrent__detail",`torrent__detail--${r}`,a),css:$t,role:"cell",style:{width:`${o}px`},children:[d,n?(0,Z.tZ)(n,{torrent:p.Z.torrents[t],column:r}):(0,Z.tZ)(l._P,{})]})}));Xt.defaultProps={className:void 0,classNameOverride:!1,content:Bt,width:void 0,showIcon:!1};const Mt=Xt,jt=(0,i.Pi)((0,r.forwardRef)(((e,t)=>{let{className:n,style:r,hash:a,handleClick:s,handleDoubleClick:i,handleRightClick:o,handleTouchStart:l,handleTouchEnd:c,handleKeyPress:u}=e;const p=d.Z.floodSettings.torrentListColumns.reduce(((e,t)=>{let{id:n,visible:r}=t;return null==O.Z[n]?e:r?(e.push((0,Z.tZ)(Mt,{className:"table__cell",hash:a,column:n,width:d.Z.floodSettings.torrentListColumnWidths[n]},n)),e):e}),[]);return(0,Z.tZ)("div",{className:n,role:"row",style:r,tabIndex:0,onClick:e=>s(a,e),onContextMenu:e=>o(a,e),onDoubleClick:()=>i(a),onTouchStart:l,onTouchEnd:c,onKeyPress:u,ref:t,children:p})}))),Dt=jt;const Ht=(0,i.Pi)((e=>{let{torrent:t}=e;const{i18n:n}=(0,o.mV)();return(0,Z.BX)("span",{children:[n.number(t.percentComplete,{maximumFractionDigits:1}),(0,Z.tZ)("em",{className:"unit",children:"%"})," — ",(0,Z.tZ)(E.Z,{value:t.downTotal})]})}));var Et={name:"1vr7vmn",styles:"align-items:center;display:flex"};const At=(0,i.Pi)((0,r.forwardRef)(((e,t)=>{let{className:n,style:r,hash:a,handleClick:s,handleDoubleClick:i,handleRightClick:o,handleTouchStart:l,handleTouchEnd:c,handleKeyPress:u}=e;const p=d.Z.floodSettings.torrentListColumns,h=[(0,Z.tZ)(Mt,{hash:a,column:"name",className:"torrent__details__section torrent__details__section--primary"},"name")],m=[(0,Z.tZ)(Mt,{hash:a,column:"eta",showIcon:!0},"eta"),(0,Z.tZ)(Mt,{hash:a,column:"downRate",showIcon:!0},"downRate"),(0,Z.tZ)(Mt,{hash:a,column:"upRate",showIcon:!0},"upRate")],_=[(0,Z.tZ)(Mt,{hash:a,column:"percentComplete",content:Ht,showIcon:!0},"percentComplete")],b=[(0,Z.tZ)(Mt,{hash:a,column:"percentComplete",className:"torrent__details__section torrent__details__section--quaternary",classNameOverride:!0},"percentBar")];for(let e=0;e<p.length;e+=1){const{id:t,visible:n}=p[e];if(null!=O.Z[t]&&n)switch(t){case"name":case"downRate":case"upRate":case"eta":case"downTotal":case"percentComplete":break;default:_.push((0,Z.tZ)(Mt,{hash:a,column:t,showIcon:!0},t))}}return(0,Z.BX)("div",{className:n,role:"row",style:r,tabIndex:0,onClick:e=>s(a,e),onContextMenu:e=>o(a,e),onDoubleClick:()=>i(a),onTouchStart:l,onTouchEnd:c,onKeyPress:u,ref:t,children:[(0,Z.BX)("div",{css:Et,children:[h,(0,Z.tZ)("div",{className:"torrent__details__section torrent__details__section--secondary",children:m})]}),(0,Z.tZ)("div",{className:"torrent__details__section torrent__details__section--tertiary",children:_}),b]})}))),Ft=At,It=(e,t)=>{var n,r;!0===t.cancelable&&t.preventDefault();const a=t.clientX,s=t.clientY,i=null===(n=t.touches)||void 0===n?void 0:n[0].clientX,o=null===(r=t.touches)||void 0===r?void 0:r[0].clientY;p.Z.selectedTorrents.includes(e)||p.Z.setSelectedTorrents({hash:e,event:t});const{torrentContextMenuActions:l=qe.Z.torrentContextMenuActions}=d.Z.floodSettings,c=p.Z.torrents[e];h.Z.setActiveContextMenu({id:"torrent-list-item",clickPosition:{x:a||i||0,y:s||o||0},items:Nt(c).filter((e=>"separator"===e.type||l.some((t=>t.id===e.action&&!0===t.visible))))})},Lt=e=>h.Z.setActiveModal({id:"torrent-details",hash:e}),zt=(e,t)=>p.Z.setSelectedTorrents({hash:e,event:t}),Vt=(e,t)=>{" "!==t.key&&"Enter"!==t.key&&"ContextMenu"!==t.key||(t.preventDefault(),p.Z.selectedTorrents.includes(e)?"Enter"===t.key?Lt(e):"ContextMenu"===t.key&&It(e,t):zt(e,t))},Ut=(0,i.Pi)((e=>{var t;let{hash:n,style:a}=e;const[i,o]=(0,r.useState)(0),l=(0,r.useRef)(!1),c=(0,r.useRef)(null),u="condensed"===d.Z.floodSettings.torrentListViewSize,h=(0,Ue.Fl)((()=>p.Z.selectedTorrents.includes(n))).get(),{status:m,upRate:_,downRate:b}=(null===(t=p.Z.torrents)||void 0===t?void 0:t[n])||{},g=(0,gt.T)({status:m,upRate:_,downRate:b},s()({"torrent--is-selected":h,"torrent--is-condensed":u,"torrent--is-expanded":!u}),"torrent"),{onTouchStart:v,onTouchEnd:f}=(0,bt.Z)((e=>{var t;const r=null===(t=c.current)||void 0===t?void 0:t.getBoundingClientRect().top;null!=e&&null!=r&&Math.abs(r-i)<25&&It(n,e)})),y=e=>{var t;p.Z.selectedTorrents.includes(n)||zt(n,e),l.current?Lt(n):(l.current=!0,setTimeout((()=>{l.current=!1}),200)),o((null===(t=c.current)||void 0===t?void 0:t.getBoundingClientRect().top)||0),v(e)};return u?(0,Z.tZ)(Dt,{className:g,ref:c,style:a,hash:n,handleClick:zt,handleDoubleClick:Lt,handleRightClick:It,handleTouchStart:y,handleTouchEnd:f,handleKeyPress:e=>Vt(n,e)}):(0,Z.tZ)(Ft,{className:g,ref:c,style:a,hash:n,handleClick:zt,handleDoubleClick:Lt,handleRightClick:It,handleTouchStart:y,handleTouchEnd:f,handleKeyPress:e=>Vt(n,e)})})),Gt=Ut;function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){Kt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Yt=(0,i.Pi)((e=>{let{index:t,style:n}=e;return(0,Z.tZ)(Gt,{hash:p.Z.filteredTorrents[t].hash,style:n})})),Qt=(0,i.Pi)((()=>{const e=(0,r.useRef)(null),t=(0,r.useRef)(null),n=(0,r.useRef)(null);(0,r.useEffect)((()=>(0,Ue.U5)((()=>ne.Z.filterTrigger),(()=>{null!=t.current&&t.current.scrollTo(0)}))),[]),(0,Ge.Z)("keydown",(e=>{const{ctrlKey:t,key:n,metaKey:r,repeat:a,target:s}=e,i=null==s?void 0:s.tagName.toUpperCase();"INPUT"!==i&&"TEXTAREA"!==i&&(a||(r||t)&&"a"===n&&(e.preventDefault(),p.Z.selectAllTorrents()))}));const a=p.Z.filteredTorrents,{torrentListViewSize:s="condensed"}=d.Z.floodSettings,i="condensed"===s,u=null==a||0===a.length;let h=null,m=null;return Oe.Z.isConnected?u||null==a?h=(0,Z.BX)("div",{className:"torrents__alert__wrapper",children:[(0,Z.tZ)("div",{className:"torrents__alert",children:(0,Z.tZ)(o.cC,{id:"torrents.list.no.torrents"})}),ne.Z.isFilterActive?(0,Z.tZ)("div",{className:"torrents__alert__action",children:(0,Z.tZ)(We.zx,{onClick:()=>{ne.Z.clearAllFilters()},priority:"tertiary",children:(0,Z.tZ)(o.cC,{id:"torrents.list.clear.filters"})})}):null]}):(i&&(m=(0,Z.tZ)(dt,{onCellFocus:()=>{null!=n.current&&null!=e.current&&(n.current.scrollLeft=e.current.scrollLeft)},onCellClick:e=>{const t=d.Z.floodSettings.sortTorrents;let n=g[e]??"asc";t.property===e&&(n="asc"===t.direction?"desc":"asc");const r={property:e,direction:n};c.Z.saveSetting("sortTorrents",r)},onWidthsChange:(e,t)=>{const{torrentListColumnWidths:n=qe.Z.torrentListColumnWidths}=d.Z.floodSettings;c.Z.saveSetting("torrentListColumnWidths",qt(qt({},n),{},{[e]:t}))},ref:e})),h=(0,Z.tZ)(st,{className:"torrent__list__viewport",itemCount:a.length,itemKey:e=>p.Z.filteredTorrents[e].hash,itemRenderer:Yt,itemSize:i?30:70,ref:t,outerRef:t=>{const r=t;null!=r&&null==r.onscroll&&(r.onscroll=()=>{null!=e.current&&(e.current.scrollLeft=r.scrollLeft)}),n.current=r}})):h=(0,Z.tZ)("div",{className:"torrents__alert__wrapper",children:(0,Z.tZ)("div",{className:"torrents__alert",children:(0,Z.tZ)(o.cC,{id:"torrents.list.cannot.connect"})})}),(0,Z.BX)(_t,{children:[(0,Z.BX)("div",{className:"torrent__list__wrapper",role:"table",children:[(0,Z.tZ)(Ye,{id:"torrent-list-item"}),m,h]}),(0,Z.tZ)("div",{className:"dropzone__overlay",children:(0,Z.BX)("div",{className:"dropzone__copy",children:[(0,Z.tZ)("div",{className:"dropzone__icon",children:(0,Z.tZ)(l.hv,{})}),(0,Z.tZ)(o.cC,{id:"torrents.list.drop"})]})})]})}));n(3649);const Jt=(0,r.lazy)((()=>n.e(33).then(n.bind(n,3975)))),en=(0,r.lazy)((()=>Promise.all([n.e(300),n.e(151)]).then(n.bind(n,1434)))),tn=()=>((0,r.useEffect)((()=>{j.Z.startActivityStream()}),[]),(0,Z.BX)(M.Z,{children:[(0,Z.tZ)(Ve,{}),(0,Z.BX)(B,{children:[(0,Z.BX)(X,{modifier:"torrent-list",className:"view--torrent-list",children:[(0,Z.tZ)(R,{}),(0,Z.tZ)(Qt,{})]}),(0,Z.tZ)(en,{}),(0,Z.tZ)(Jt,{})]})]}))},2258:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(2159),a=n(2656),s=n(2579);const i=()=>(0,s.tZ)(a.Z,{modifier:"auth-form",children:(0,s.tZ)(r.Z,{mode:"register"})})},1109:(e,t,n)=>{n.d(t,{T:()=>s,o:()=>i});var r=n(4184),a=n.n(r);const s=function(e){let{status:t,downRate:n,upRate:r}=e;for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];return a()(i,{"torrent--has-error":t.includes("error"),"torrent--is-stopped":t.includes("stopped"),"torrent--is-downloading":t.includes("downloading"),"torrent--is-downloading--actively":n>0,"torrent--is-uploading--actively":r>0,"torrent--is-seeding":t.includes("seeding"),"torrent--is-completed":t.includes("complete"),"torrent--is-checking":t.includes("checking"),"torrent--is-inactive":t.includes("inactive")})},i=e=>{let t="stopped";return["error","checking","stopped","downloading","seeding"].some((n=>!!e.includes(n)&&(t=n,!0))),t}}}]);
|