rqbit/crates/librqbit/webui/dist/assets/index.js

57 lines
196 KiB
JavaScript
Raw Normal View History

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qs={exports:{}},Nl={},bs={exports:{}},O={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var mr=Symbol.for("react.element"),Md=Symbol.for("react.portal"),Od=Symbol.for("react.fragment"),Fd=Symbol.for("react.strict_mode"),Id=Symbol.for("react.profiler"),Dd=Symbol.for("react.provider"),Rd=Symbol.for("react.context"),$d=Symbol.for("react.forward_ref"),Ad=Symbol.for("react.suspense"),Ud=Symbol.for("react.memo"),Bd=Symbol.for("react.lazy"),Tu=Symbol.iterator;function Vd(e){return e===null||typeof e!="object"?null:(e=Tu&&e[Tu]||e["@@iterator"],typeof e=="function"?e:null)}var ea={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ta=Object.assign,na={};function _n(e,t,n){this.props=e,this.context=t,this.refs=na,this.updater=n||ea}_n.prototype.isReactComponent={};_n.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ra(){}ra.prototype=_n.prototype;function _i(e,t,n){this.props=e,this.context=t,this.refs=na,this.updater=n||ea}var Ni=_i.prototype=new ra;Ni.constructor=_i;ta(Ni,_n.prototype);Ni.isPureReactComponent=!0;var Lu=Array.isArray,la=Object.prototype.hasOwnProperty,Ti={current:null},oa={key:!0,ref:!0,__self:!0,__source:!0};function ia(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)la.call(t,r)&&!oa.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1<u){for(var s=Array(u),a=0;a<u;a++)s[a]=arguments[a+2];l.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)l[r]===void 0&&(l[r]=u[r]);return{$$typeof:mr,type:e,key:o,ref:i,props:l,_owner:Ti.current}}function Hd(e,t){return{$$typeof:mr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Li(e){return typeof e=="object"&&e!==null&&e.$$typeof===mr}function Wd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pu=/\/+/g;function Jl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Wd(""+e.key):t.toString(36)}function Wr(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case mr:case Md:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+Jl(i,0):r,Lu(l)?(n="",e!=null&&(n=e.replace(Pu,"$&/")+"/"),Wr(l,t,n,"",function(a){return a})):l!=null&&(Li(l)&&(l=Hd(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(Pu,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",Lu(e))for(var u=0;u<e.length;u++){o=e[u];var s=r+Jl(o,u);i+=Wr(o,t,n,s,l)}else if(s=Vd(e),typeof s=="function")for(e=s.call(e),u=0;!(o=e.next()).done;)o=o.value,s=r+Jl(o,u++),i+=Wr(o,t,n,s,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function _r(e,t,n){if(e==null)return e;var r=[],l=0;return Wr(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Qd(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ce={current:null},Qr={transition:null},Zd={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:Qr,ReactCurrentOwner:Ti};O.Children={map:_r,forEach:function(e,t,n){_r(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _r(e,function(){t++}),t},toArray:function(e){return _r(e,function(t){return t})||[]},only:function(e){if(!Li(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};O.Component=_n;O.Fragment=Od;O.Profiler=Id;O.Pure
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Kd=x,Gd=Symbol.for("react.element"),Yd=Symbol.for("react.fragment"),Xd=Object.prototype.hasOwnProperty,Jd=Kd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,qd={key:!0,ref:!0,__self:!0,__source:!0};function ua(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Xd.call(t,r)&&!qd.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Gd,type:e,key:o,ref:i,props:l,_owner:Jd.current}}Nl.Fragment=Yd;Nl.jsx=ua;Nl.jsxs=ua;qs.exports=Nl;var c=qs.exports,Po={},sa={exports:{}},ke={},aa={exports:{}},ca={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(j,L){var z=j.length;j.push(L);e:for(;0<z;){var $=z-1>>>1,Z=j[$];if(0<l(Z,L))j[$]=L,j[z]=Z,z=$;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var L=j[0],z=j.pop();if(z!==L){j[0]=z;e:for(var $=0,Z=j.length,Ze=Z>>>1;$<Ze;){var $e=2*($+1)-1,zt=j[$e],Ke=$e+1,Yt=j[Ke];if(0>l(zt,z))Ke<Z&&0>l(Yt,zt)?(j[$]=Yt,j[Ke]=z,$=Ke):(j[$]=zt,j[$e]=z,$=$e);else if(Ke<Z&&0>l(Yt,z))j[$]=Yt,j[Ke]=z,$=Ke;else break e}}return L}function l(j,L){var z=j.sortIndex-L.sortIndex;return z!==0?z:j.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],a=[],v=1,m=null,f=3,g=!1,y=!1,S=!1,P=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(j){for(var L=n(a);L!==null;){if(L.callback===null)r(a);else if(L.startTime<=j)r(a),L.sortIndex=L.expirationTime,t(s,L);else break;L=n(a)}}function w(j){if(S=!1,h(j),!y)if(n(s)!==null)y=!0,Re(C);else{var L=n(a);L!==null&&it(w,L.startTime-j)}}function C(j,L){y=!1,S&&(S=!1,p(T),T=-1),g=!0;var z=f;try{for(h(L),m=n(s);m!==null&&(!(m.expirationTime>L)||j&&!ge());){var $=m.callback;if(typeof $=="function"){m.callback=null,f=m.priorityLevel;var Z=$(m.expirationTime<=L);L=e.unstable_now(),typeof Z=="function"?m.callback=Z:m===n(s)&&r(s),h(L)}else r(s);m=n(s)}if(m!==null)var Ze=!0;else{var $e=n(a);$e!==null&&it(w,$e.startTime-L),Ze=!1}return Ze}finally{m=null,f=z,g=!1}}var E=!1,_=null,T=-1,D=5,M=-1;function ge(){return!(e.unstable_now()-M<D)}function Lt(){if(_!==null){var j=e.unstable_now();M=j;var L=!0;try{L=_(!0,j)}finally{L?Pt():(E=!1,_=null)}}else E=!1}var Pt;if(typeof d=="function")Pt=function(){d(Lt)};else if(typeof MessageChannel<"u"){var Er=new MessageChannel,Zl=Er.port2;Er.port1.onmessage=Lt,Pt=function(){Zl.postMessage(null)}}else Pt=function(){P(Lt,0)};function Re(j){_=j,E||(E=!0,Pt())}function it(j,L){T=P(function(){j(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,Re(C))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(j){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var z=f;f=L;try{return j()}finally{f=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,L){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var z=f;f=j;try{return L()}finally{f=z}},e.unstable_scheduleCallback=function(j,L,z){var $=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?$+z:$):z=$,j){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=z+Z,j={id:v++,callback:L,priorityLevel:j,startTime:z,expirationTime:Z,sortIndex:-1},z>$?(j.sortIndex=z,t(a,j),n(s)===null&&j===n(a)&&(S?(p(T),T=-1):S=!0,it(w,z-$))):(j.sortIndex=Z,t(s,j),y||g||(y=!0,Re(C))),j},e.unstable_shouldYield=ge,e.unstable_wrapCallback=function(j){var L=f;return function(){var z=f;f=L;try{return j.apply(this,arguments)}finally{f=z}}}})(ca);aa.exports=ca;var bd=aa.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var da=x,Se=bd;function k(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var fa=new Set,Xn={};function Kt(e,t){yn(e,t),yn(e+"Capture",t)}function yn(e,t){for(Xn[e]=t,e=0;e<t.length;e++)fa.add(t[e])}var et=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zo=Object.prototype.hasOwnProperty,ef=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zu={},Mu={};function tf(e){return zo.call(Mu,e)?!0:zo.call(zu,e)?!1:ef.test(e)?Mu[e]=!0:(zu[e]=!0,!1)}function nf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rf(e,t,n,r){if(t===null||typeof t>"u"||nf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function de(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){re[e]=new de(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];re[t]=new de(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){re[e]=new de(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){re[e]=new de(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){re[e]=new de(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){re[e]=new de(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){re[e]=new de(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){re[e]=new de(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){re[e]=new de(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pi=/[\-:]([a-z])/g;function zi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-
2023-12-17 19:27:22 +00:00
`+ql+e}var bl=!1;function eo(e,t){if(!e||bl)return"";bl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var l=a.stack.split(`
`),o=r.stack.split(`
2023-11-22 19:30:23 +00:00
`),i=l.length-1,u=o.length-1;1<=i&&0<=u&&l[i]!==o[u];)u--;for(;1<=i&&0<=u;i--,u--)if(l[i]!==o[u]){if(i!==1||u!==1)do if(i--,u--,0>u||l[i]!==o[u]){var s=`
`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{bl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rn(e):""}function lf(e){switch(e.tag){case 5:return Rn(e.type);case 16:return Rn("Lazy");case 13:return Rn("Suspense");case 19:return Rn("SuspenseList");case 0:case 2:case 15:return e=eo(e.type,!1),e;case 11:return e=eo(e.type.render,!1),e;case 1:return e=eo(e.type,!0),e;default:return""}}function Io(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case bt:return"Fragment";case qt:return"Portal";case Mo:return"Profiler";case Oi:return"StrictMode";case Oo:return"Suspense";case Fo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ha:return(e.displayName||"Context")+".Consumer";case pa:return(e._context.displayName||"Context")+".Provider";case Fi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ii:return t=e.displayName||null,t!==null?t:Io(e.type)||"Memo";case st:t=e._payload,e=e._init;try{return Io(e(t))}catch{}}return null}function of(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Io(t);case 8:return t===Oi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Et(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function va(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uf(e){var t=va(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tr(e){e._valueTracker||(e._valueTracker=uf(e))}function ga(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=va(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Do(e,t){var n=t.checked;return W({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Et(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ya(e,t){t=t.checked,t!=null&&Mi(e,"checked",t,!1)}function Ro(e,t){ya(e,t);var n=Et(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$o(e,t.type,n):t.hasOwnProperty("defaultValue")&&$o(e,t.type,Et(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Iu(e,t,n){if(t.hasOwnProperty("valu
`).replace(g0,"")}function Dr(e,t,n){if(t=ls(t),ls(e)!==t&&n)throw Error(k(425))}function cl(){}var qo=null,bo=null;function ei(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ti=typeof setTimeout=="function"?setTimeout:void 0,y0=typeof clearTimeout=="function"?clearTimeout:void 0,os=typeof Promise=="function"?Promise:void 0,x0=typeof queueMicrotask=="function"?queueMicrotask:typeof os<"u"?function(e){return os.resolve(null).then(e).catch(w0)}:ti;function w0(e){setTimeout(function(){throw e})}function ho(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),tr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);tr(t)}function gt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function is(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Tn=Math.random().toString(36).slice(2),Ve="__reactFiber$"+Tn,ir="__reactProps$"+Tn,tt="__reactContainer$"+Tn,ni="__reactEvents$"+Tn,S0="__reactListeners$"+Tn,k0="__reactHandles$"+Tn;function It(e){var t=e[Ve];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[Ve]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=is(e);e!==null;){if(n=e[Ve])return n;e=is(e)}return t}e=n,n=e.parentNode}return null}function yr(e){return e=e[Ve]||e[tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(k(33))}function Ml(e){return e[ir]||null}var ri=[],ln=-1;function Nt(e){return{current:e}}function U(e){0>ln||(e.current=ri[ln],ri[ln]=null,ln--)}function R(e,t){ln++,ri[ln]=e.current,e.current=t}var Ct={},ue=Nt(Ct),he=Nt(!1),Vt=Ct;function xn(e,t){var n=e.type.contextTypes;if(!n)return Ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function me(e){return e=e.childContextTypes,e!=null}function dl(){U(he),U(ue)}function us(e,t,n){if(ue.current!==Ct)throw Error(k(168));R(ue,t),R(he,n)}function ic(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(k(108,of(e)||"Unknown",l));return W({},n,r)}function fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ct,Vt=ue.current,R(ue,e),R(he,he.current),!0}function ss(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=ic(e,t,Vt),r.__reactInternalMemoizedMergedChildContext=e,U(he),U(ue),R(ue,e)):U(he),R(he,n)}var Ye=null,Ol=!1,mo=!1;function uc(e){Ye===null?Ye=[e]:Ye.push(e)}function E0(e){Ol=!0,uc(e)}function Tt(){if(!mo&&Ye!==null){mo=!0;var e=0,t=I;try{var n=Ye;for(I=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ye=null,Ol=!1}catch(l){throw Ye!==null&&(Ye=Ye.slice(e+1)),Ma(Ri,Tt),l}finally{I=t,mo=!1}}return null}var on=[],un=0,pl=null,hl=0,Ce=[],je=0,Ht=null,Xe=1,Je="";function Mt(e,t){on[un++]=hl,on[un++]=pl,pl=e,hl=t}function sc(e,t,n){Ce[je++]=Xe,Ce[je++]=Je,Ce[je++]=Ht,Ht=e;var r=Xe;e=Je;var l=32-Fe(r)-1;r&=~(1<<l),n+=1;var o=32-Fe(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,Xe=1<<32-Fe(t)+l|n<<l|r,Je=o+e}else Xe=1<<o|n<<l|r,Je=e}function Zi(e){e.return!==null&&(Mt(e,1),sc(e,1,0))}function Ki(e){for(;e===pl;)pl=on[--un],on[un]=null,hl=on[--un],on[un]=null;for(;e===Ht;)Ht=Ce[--je],Ce[je]=null,Je=Ce[--je],Ce[je]=null,Xe=Ce[--je],Ce[je]=null}var we=null,xe=null,B=!1,Oe=null;function ac(e,t){var n=_e(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.del
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function wo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ai(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var M0=typeof WeakMap=="function"?WeakMap:Map;function Rc(e,t,n){n=be(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){kl||(kl=!0,xi=r),ai(e,t)},n}function $c(e,t,n){n=be(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ai(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ai(e,t),typeof r!="function"&&(xt===null?xt=new Set([this]):xt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function ys(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new M0;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Z0.bind(null,e,t,n),t.then(e,e))}function xs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ws(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=be(-1,1),t.tag=2,yt(n,t,1))),n.lanes|=1),e)}var O0=lt.ReactCurrentOwner,pe=!1;function se(e,t,n,r){t.child=e===null?vc(t,null,n,r):Sn(t,e.child,n,r)}function Ss(e,t,n,r,l){n=n.render;var o=t.ref;return mn(t,l),r=lu(e,t,n,r,o,l),n=ou(),e!==null&&!pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,rt(e,t,l)):(B&&n&&Zi(t),t.flags|=1,se(e,t,r,l),t.child)}function ks(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!mu(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ac(e,t,o,r,l)):(e=tl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:rr,n(i,r)&&e.ref===t.ref)return rt(e,t,l)}return t.flags|=1,e=St(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(rr(o,r)&&e.ref===t.ref)if(pe=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(pe=!0);else return t.lanes=e.lanes,rt(e,t,l)}return ci(e,t,n,r,l)}function Uc(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},R(cn,ye),ye|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,R(cn,ye),ye|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,R(cn,ye),ye|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,R(cn,ye),ye|=r;return se(e,t,l,n),t.child}function Bc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ci(e,t,n,r,l){var o=me(n)?Vt:ue.current;return o=xn(t,o),mn(t,l),n=lu(e,t,n,r,o,l),r=ou(),e!==null&&!pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,rt(e,t,l)):(B&&r&&Zi(t),t.flags|=1,se(e,t,n,l),t.child)}function Es(e,t,n,r,l){if(me(n)){var o=!0;fl(t)}else o=!1;if(mn(t,l),t.stateNode===null)qr(e,t),hc(t,n,r),si(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,u=t.memoizedProps;i.props=u;var s=i.context,a=n.contextType;typeof a=="object"&&a!==null?a=Te(a):(a=me(n)?Vt:ue.current,a=xn(t,a));var v=n.getDerivedStateFromProps,m=typeof v=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||s!==a)&&hs(t,i,r,a),at=!1;var f=t.memoizedState;i.state=f,gl(t,r,i,l),s=t.memoizedState,u!==r||f!==s||he.current||at?(typeof v=="function"&&(ui(t,n,v,r),s=t.memoizedState),(u=at||ps(t,n,u,r,f,s,a))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.compon
2023-12-17 19:27:22 +00:00
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jn=x;function G1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Y1=typeof Object.is=="function"?Object.is:G1,X1=jn.useState,J1=jn.useEffect,q1=jn.useLayoutEffect,b1=jn.useDebugValue;function ep(e,t){var n=t(),r=X1({inst:{value:n,getSnapshot:t}}),l=r[0].inst,o=r[1];return q1(function(){l.value=n,l.getSnapshot=t,To(l)&&o({inst:l})},[e,n,t]),J1(function(){return To(l)&&o({inst:l}),e(function(){To(l)&&o({inst:l})})},[e]),b1(n),n}function To(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Y1(e,n)}catch{return!0}}function tp(e,t){return t()}var np=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tp:ep;Ed.useSyncExternalStore=jn.useSyncExternalStore!==void 0?jn.useSyncExternalStore:np;kd.exports=Ed;var rp=kd.exports;/**
2023-12-17 19:27:22 +00:00
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wl=x,lp=rp;function op(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ip=typeof Object.is=="function"?Object.is:op,up=lp.useSyncExternalStore,sp=Wl.useRef,ap=Wl.useEffect,cp=Wl.useMemo,dp=Wl.useDebugValue;Sd.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var o=sp(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=cp(function(){function s(g){if(!a){if(a=!0,v=g,g=r(g),l!==void 0&&i.hasValue){var y=i.value;if(l(y,g))return m=y}return m=g}if(y=m,ip(v,g))return y;var S=r(g);return l!==void 0&&l(y,S)?y:(v=g,m=S)}var a=!1,v,m,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,r,l]);var u=up(e,o[0],o[1]);return ap(function(){i.hasValue=!0,i.value=u},[u]),dp(u),u};wd.exports=Sd;var fp=wd.exports;const pp=_l(fp),{useDebugValue:hp}=qe,{useSyncExternalStoreWithSelector:mp}=pp;function vp(e,t=e.getState,n){const r=mp(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return hp(r),r}const Zs=e=>{const t=typeof e=="function"?K1(e):e,n=(r,l)=>vp(t,r,l);return Object.assign(n,t),n},Cd=e=>e?Zs(e):Zs,gp=(e,t)=>e.id==t.id&&e.info_hash==t.info_hash,yp=(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:e.length===t.length&&e.every((n,r)=>gp(n,t[r])),Bt=Cd(e=>({torrents:null,torrentsLoading:!1,torrentsInitiallyLoading:!1,setTorrentsLoading:t=>e(n=>n.torrents==null?{torrentsInitiallyLoading:t,torrentsLoading:t}:{torrentsInitiallyLoading:!1,torrentsLoading:t}),setTorrents:t=>e(n=>yp(n.torrents,t)?{}:{torrents:t}),refreshTorrents:()=>{},setRefreshTorrents:t=>e({refreshTorrents:t})})),xp=({id:e,show:t,onHide:n})=>{if(!t)return null;const[r,l]=x.useState(!1),[o,i]=x.useState(null),[u,s]=x.useState(!1),a=x.useContext(ot),v=Bt(g=>g.refreshTorrents),m=()=>{l(!1),i(null),s(!1),n()},f=()=>{s(!0),(r?a.delete:a.forget)(e).then(()=>{v(),m()}).catch(y=>{i({text:`Error deleting torrent id=${e}`,details:y}),s(!1)})};return c.jsxs(wr,{isOpen:t,onClose:n,title:"Delete torrent",children:[c.jsxs(Sr,{children:[c.jsx("p",{className:"text-gray-700 dark:text-slate-300",children:"Are you sure you want to delete the torrent?"}),c.jsxs("div",{className:"mt-4 flex items-center",children:[c.jsx("input",{type:"checkbox",id:"deleteFiles",className:"form-checkbox h-4 w-4 text-blue-500",onChange:()=>l(!r),checked:r,placeholder:"Also delete files"}),c.jsx("label",{htmlFor:"deleteFiles",className:"ml-2 text-gray-700 dark:text-slate-300",children:"Also delete files"})]}),o&&c.jsx(jt,{error:o})]}),c.jsxs(kr,{children:[u&&c.jsx(pr,{}),c.jsx(Qe,{variant:"cancel",onClick:m,children:"Cancel"}),c.jsx(Qe,{variant:"danger",onClick:f,disabled:u,children:"Delete Torrent"})]})]})},Ks=({checked:e,name:t,disabled:n,onChange:r,label:l,help:o,inputType:i})=>c.jsxs("div",{className:"flex gap-3 items-start",children:[c.jsx("div",{className:"flex",children:c.jsx("input",{type:i||"checkbox",className:"block mt-1",id:t,name:t,disabled:n,checked:e,onChange:r})}),c.jsxs("div",{className:"text-sm flex flex-col gap-1",children:[c.jsx("label",{htmlFor:t,children:l}),o&&c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-300 mb-3",children:o})]})]});function wp(e){return q({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Square_Minus"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M18.438,20.938H5.564a2.5,2.5,0,0,1-2.5-2.5V5.564a2.5,2.5,0,0,1,2.5-2.5H18.438a2.5,2.5,0,0,1,2.5,2.5V18.438A2.5,2.5,0,0,1,18.438,20.938ZM5.564,4.064a1.5,1.5,0,0,0-1.5,1.5V18.438a1.5,1.5,0,0,0,1.5,1.5H18.438a1.5,1.5,0,0,0,1.5-1.5V5.564a1.5,1.5,0,0,0-1.5-1.5Z"}},{tag:"path",attr:{d:"M9,12.5a.5.5,0,0,1,0-1h6a.5.5,0,0,1,0,1Z"}}]}]}]})(e)}function Sp(e){return q({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Square_Plus"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M18.438,20.938H5.563a2.5,2.5,0,0,1-2.5-2.5V5.564a2.5,2.5,0,0,1,2.5-2.5H18.438a2.5,2.5,0,0,1,2.5,2.5V18.438A2.5,2.5,0,0,1,18.438,20.938ZM5.563,4.064a1.5,1.5,0,0,0-1.5,1.5V18.438a1.5,1.5,0,0,0,1.5,1.5H18.438a1.5,1.5,0,0,0,1.5-1.5V5.564a1.5,1.5,0,0,0-1.5-1.5Z"}},{tag:"path",attr:{d:"M15,12.5H12.5V15a.5.5