const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./HistoryStats-BhZJnFtx.js","./ui-CHknQGjr.js","./vendors-Cq3VpzWh.js","./utils-DOXKkIi2.js","./query-T7_5qeE1.js","./charts-CDU_6Aua.js","./HistoryStats-CXazd2B6.css","./index-CWl1y9K6.js"])))=>i.map(i=>d[i]);
var y4=Object.defineProperty;var b4=(a,s,o)=>s in a?y4(a,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[s]=o;var cn=(a,s,o)=>b4(a,typeof s!="symbol"?s+"":s,o);import{u as ao,s as ol,h as x4,c as v4,a as N0,j as i,b as S4,d as D0,B as de,e as ze,A as mo,M as j4,f as w4,g as L0,N as M4,P as pe,i as R0,k as B0,S as mn,F as go,I as K0,T as G,l as Ai,G as re,D as vi,m as $,n as k4,o as _4,p as gt,q as A4,r as $n,t as z4,v as ss,w as Je,x as dt,C as po,y as T4,z as We,E as cl,H as za,J as ds,K as jt,L as C4,O as U0,Q as lt,R as sd,U as fs,V as Ut,W as Pd,X as yo,Y as q0,Z as pt,_ as E4,$ as id,a0 as Tn,a1 as sl,a2 as hn,a3 as O4,a4 as N4,a5 as rd,a6 as od,a7 as D4,a8 as lo,a9 as L4,aa as R4,ab as ns,ac as B4,ad as H0,ae as V0,af as K4,ag as U4,ah as so,ai as q4,aj as G0,ak as H4,al as Si,am as io}from"./ui-CHknQGjr.js";import{d as V4,a as G4,r as v,u as hs,e as Y0,R as Ta,f as F0,m as Y4,N as F4,O as Q4,L as Da,h as Q0,i as X0,j as X4,k as I4,l as Z4}from"./vendors-Cq3VpzWh.js";import{Q as P4,u as ke,a as be,o as ro,b as ye,c as $d,d as $4,R as J4,f as cs,e as I0,g as Z0,h as W4,i as eb,j as tb,k as nb,_ as P0}from"./query-T7_5qeE1.js";import{r as ab,l as lb,a as jm,c as wm}from"./utils-DOXKkIi2.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function o(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(d){if(d.ep)return;d.ep=!0;const f=o(d);fetch(d.href,f)}})();var cd={exports:{}},yi={},ud={exports:{}},dd={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Mm;function sb(){return Mm||(Mm=1,function(a){function s(q,I){var se=q.length;q.push(I);e:for(;0<se;){var Be=se-1>>>1,Ke=q[Be];if(0<d(Ke,I))q[Be]=I,q[se]=Ke,se=Be;else break e}}function o(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var I=q[0],se=q.pop();if(se!==I){q[0]=se;e:for(var Be=0,Ke=q.length,Mt=Ke>>>1;Be<Mt;){var Ge=2*(Be+1)-1,Ce=q[Ge],st=Ge+1,Sn=q[st];if(0>d(Ce,se))st<Ke&&0>d(Sn,Ce)?(q[Be]=Sn,q[st]=se,Be=st):(q[Be]=Ce,q[Ge]=se,Be=Ge);else if(st<Ke&&0>d(Sn,se))q[Be]=Sn,q[st]=se,Be=st;else break e}}return I}function d(q,I){var se=q.sortIndex-I.sortIndex;return se!==0?se:q.id-I.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();a.unstable_now=function(){return h.now()-p}}var b=[],g=[],x=1,S=null,_=3,A=!1,T=!1,D=!1,L=!1,M=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function R(q){for(var I=o(g);I!==null;){if(I.callback===null)r(g);else if(I.startTime<=q)r(g),I.sortIndex=I.expirationTime,s(b,I);else break;I=o(g)}}function F(q){if(D=!1,R(q),!T)if(o(b)!==null)T=!0,oe||(oe=!0,Jt());else{var I=o(g);I!==null&&Ln(F,I.startTime-q)}}var oe=!1,te=-1,Te=5,$t=-1;function Nt(){return L?!0:!(a.unstable_now()-$t<Te)}function hl(){if(L=!1,oe){var q=a.unstable_now();$t=q;var I=!0;try{e:{T=!1,D&&(D=!1,U(te),te=-1),A=!0;var se=_;try{t:{for(R(q),S=o(b);S!==null&&!(S.expirationTime>q&&Nt());){var Be=S.callback;if(typeof Be=="function"){S.callback=null,_=S.priorityLevel;var Ke=Be(S.expirationTime<=q);if(q=a.unstable_now(),typeof Ke=="function"){S.callback=Ke,R(q),I=!0;break t}S===o(b)&&r(b),R(q)}else r(b);S=o(b)}if(S!==null)I=!0;else{var Mt=o(g);Mt!==null&&Ln(F,Mt.startTime-q),I=!1}}break e}finally{S=null,_=se,A=!1}I=void 0}}finally{I?Jt():oe=!1}}}var Jt;if(typeof H=="function")Jt=function(){H(hl)};else if(typeof MessageChannel<"u"){var Ui=new MessageChannel,xs=Ui.port2;Ui.port1.onmessage=hl,Jt=function(){xs.postMessage(null)}}else Jt=function(){M(hl,0)};function Ln(q,I){te=M(function(){q(a.unstable_now())},I)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(q){q.callback=null},a.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<q?Math.floor(1e3/q):5},a.unstable_getCurrentPriorityLevel=function(){return _},a.unstable_next=function(q){switch(_){case 1:case 2:case 3:var I=3;break;default:I=_}var se=_;_=I;try{return q()}finally{_=se}},a.unstable_requestPaint=function(){L=!0},a.unstable_runWithPriority=function(q,I){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var se=_;_=q;try{return I()}finally{_=se}},a.unstable_scheduleCallback=function(q,I,se){var Be=a.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Be+se:Be):se=Be,q){case 1:var Ke=-1;break;case 2:Ke=250;break;case 5:Ke=1073741823;break;case 4:Ke=1e4;break;default:Ke=5e3}return Ke=se+Ke,q={id:x++,callback:I,priorityLevel:q,startTime:se,expirationTime:Ke,sortIndex:-1},se>Be?(q.sortIndex=se,s(g,q),o(b)===null&&q===o(g)&&(D?(U(te),te=-1):D=!0,Ln(F,se-Be))):(q.sortIndex=Ke,s(b,q),T||A||(T=!0,oe||(oe=!0,Jt()))),q},a.unstable_shouldYield=Nt,a.unstable_wrapCallback=function(q){var I=_;return function(){var se=_;_=I;try{return q.apply(this,arguments)}finally{_=se}}}}(dd)),dd}var km;function ib(){return km||(km=1,ud.exports=sb()),ud.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var _m;function rb(){if(_m)return yi;_m=1;var a=ib(),s=V4(),o=G4();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(r(188))}function b(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var c=n.return;if(c===null)break;var u=c.alternate;if(u===null){if(l=c.return,l!==null){n=l;continue}break}if(c.child===u.child){for(u=c.child;u;){if(u===n)return p(c),e;if(u===l)return p(c),t;u=u.sibling}throw Error(r(188))}if(n.return!==l.return)n=c,l=u;else{for(var m=!1,y=c.child;y;){if(y===n){m=!0,n=c,l=u;break}if(y===l){m=!0,l=c,n=u;break}y=y.sibling}if(!m){for(y=u.child;y;){if(y===n){m=!0,n=u,l=c;break}if(y===l){m=!0,l=u,n=c;break}y=y.sibling}if(!m)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),H=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),$t=Symbol.for("react.activity"),Nt=Symbol.for("react.memo_cache_sentinel"),hl=Symbol.iterator;function Jt(e){return e===null||typeof e!="object"?null:(e=hl&&e[hl]||e["@@iterator"],typeof e=="function"?e:null)}var Ui=Symbol.for("react.client.reference");function xs(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ui?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case L:return"Profiler";case D:return"StrictMode";case F:return"Suspense";case oe:return"SuspenseList";case $t:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case H:return(e.displayName||"Context")+".Provider";case U:return(e._context.displayName||"Context")+".Consumer";case R:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:xs(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return xs(e(t))}catch{}}return null}var Ln=Array.isArray,q=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Be=[],Ke=-1;function Mt(e){return{current:e}}function Ge(e){0>Ke||(e.current=Be[Ke],Be[Ke]=null,Ke--)}function Ce(e,t){Ke++,Be[Ke]=e.current,e.current=t}var st=Mt(null),Sn=Mt(null),ta=Mt(null),qi=Mt(null);function Hi(e,t){switch(Ce(ta,t),Ce(Sn,e),Ce(st,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?P2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=P2(t),e=$2(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ge(st),Ce(st,e)}function ml(){Ge(st),Ge(Sn),Ge(ta)}function Yo(e){e.memoizedState!==null&&Ce(qi,e);var t=st.current,n=$2(t,e.type);t!==n&&(Ce(Sn,e),Ce(st,n))}function Vi(e){Sn.current===e&&(Ge(st),Ge(Sn)),qi.current===e&&(Ge(qi),fi._currentValue=se)}var Fo=Object.prototype.hasOwnProperty,Qo=a.unstable_scheduleCallback,Xo=a.unstable_cancelCallback,Zp=a.unstable_shouldYield,Pp=a.unstable_requestPaint,jn=a.unstable_now,$p=a.unstable_getCurrentPriorityLevel,Cf=a.unstable_ImmediatePriority,Ef=a.unstable_UserBlockingPriority,Gi=a.unstable_NormalPriority,Jp=a.unstable_LowPriority,Of=a.unstable_IdlePriority,Wp=a.log,ey=a.unstable_setDisableYieldValue,vs=null,Ht=null;function na(e){if(typeof Wp=="function"&&ey(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(vs,e)}catch{}}var Vt=Math.clz32?Math.clz32:ay,ty=Math.log,ny=Math.LN2;function ay(e){return e>>>=0,e===0?32:31-(ty(e)/ny|0)|0}var Yi=256,Fi=4194304;function Ua(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qi(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var c=0,u=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var y=l&134217727;return y!==0?(l=y&~u,l!==0?c=Ua(l):(m&=y,m!==0?c=Ua(m):n||(n=y&~e,n!==0&&(c=Ua(n))))):(y=l&~u,y!==0?c=Ua(y):m!==0?c=Ua(m):n||(n=l&~e,n!==0&&(c=Ua(n)))),c===0?0:t!==0&&t!==c&&(t&u)===0&&(u=c&-c,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:c}function Ss(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ly(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nf(){var e=Yi;return Yi<<=1,(Yi&4194048)===0&&(Yi=256),e}function Df(){var e=Fi;return Fi<<=1,(Fi&62914560)===0&&(Fi=4194304),e}function Io(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function js(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sy(e,t,n,l,c,u){var m=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var y=e.entanglements,w=e.expirationTimes,E=e.hiddenUpdates;for(n=m&~n;0<n;){var B=31-Vt(n),V=1<<B;y[B]=0,w[B]=-1;var O=E[B];if(O!==null)for(E[B]=null,B=0;B<O.length;B++){var N=O[B];N!==null&&(N.lane&=-536870913)}n&=~V}l!==0&&Lf(e,l,0),u!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=u&~(m&~t))}function Lf(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Vt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&4194090}function Rf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Vt(n),c=1<<l;c&t|e[l]&t&&(e[l]|=t),n&=~c}}function Zo(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Po(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Bf(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:pm(e.type))}function iy(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var aa=Math.random().toString(36).slice(2),bt="__reactFiber$"+aa,Dt="__reactProps$"+aa,gl="__reactContainer$"+aa,$o="__reactEvents$"+aa,ry="__reactListeners$"+aa,oy="__reactHandles$"+aa,Kf="__reactResources$"+aa,ws="__reactMarker$"+aa;function Jo(e){delete e[bt],delete e[Dt],delete e[$o],delete e[ry],delete e[oy]}function pl(e){var t=e[bt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gl]||n[bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=tm(e);e!==null;){if(n=e[bt])return n;e=tm(e)}return t}e=n,n=e.parentNode}return null}function yl(e){if(e=e[bt]||e[gl]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Ms(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function bl(e){var t=e[Kf];return t||(t=e[Kf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[ws]=!0}var Uf=new Set,qf={};function qa(e,t){xl(e,t),xl(e+"Capture",t)}function xl(e,t){for(qf[e]=t,e=0;e<t.length;e++)Uf.add(t[e])}var cy=RegExp("^[: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]*$"),Hf={},Vf={};function uy(e){return Fo.call(Vf,e)?!0:Fo.call(Hf,e)?!1:cy.test(e)?Vf[e]=!0:(Hf[e]=!0,!1)}function Xi(e,t,n){if(uy(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Ii(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Rn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}var Wo,Gf;function vl(e){if(Wo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Wo=t&&t[1]||"",Gf=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Wo+e+Gf}var ec=!1;function tc(e,t){if(!e||ec)return"";ec=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(N){var O=N}Reflect.construct(e,[],V)}else{try{V.call()}catch(N){O=N}e.call(V.prototype)}}else{try{throw Error()}catch(N){O=N}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(N){if(N&&O&&typeof N.stack=="string")return[N.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),m=u[0],y=u[1];if(m&&y){var w=m.split(`
`),E=y.split(`
`);for(c=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;c<E.length&&!E[c].includes("DetermineComponentFrameRoot");)c++;if(l===w.length||c===E.length)for(l=w.length-1,c=E.length-1;1<=l&&0<=c&&w[l]!==E[c];)c--;for(;1<=l&&0<=c;l--,c--)if(w[l]!==E[c]){if(l!==1||c!==1)do if(l--,c--,0>c||w[l]!==E[c]){var B=`
`+w[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=c);break}}}finally{ec=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?vl(n):""}function dy(e){switch(e.tag){case 26:case 27:case 5:return vl(e.type);case 16:return vl("Lazy");case 13:return vl("Suspense");case 19:return vl("SuspenseList");case 0:case 15:return tc(e.type,!1);case 11:return tc(e.type.render,!1);case 1:return tc(e.type,!0);case 31:return vl("Activity");default:return""}}function Yf(e){try{var t="";do t+=dy(e),e=e.return;while(e);return t}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}function Wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ff(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fy(e){var t=Ff(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var c=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(m){l=""+m,u.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zi(e){e._valueTracker||(e._valueTracker=fy(e))}function Qf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Ff(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Pi(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}}var hy=/[\n"\\]/g;function en(e){return e.replace(hy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nc(e,t,n,l,c,u,m,y){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Wt(t)):e.value!==""+Wt(t)&&(e.value=""+Wt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?ac(e,m,Wt(t)):n!=null?ac(e,m,Wt(n)):l!=null&&e.removeAttribute("value"),c==null&&u!=null&&(e.defaultChecked=!!u),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+Wt(y):e.removeAttribute("name")}function Xf(e,t,n,l,c,u,m,y){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null))return;n=n!=null?""+Wt(n):"",t=t!=null?""+Wt(t):n,y||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=y?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m)}function ac(e,t,n){t==="number"&&Pi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Sl(e,t,n,l){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Wt(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function If(e,t,n){if(t!=null&&(t=""+Wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Wt(n):""}function Zf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(Ln(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Wt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l)}function jl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var my=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Pf(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||my.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function $f(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&n[c]!==l&&Pf(e,c,l)}else for(var u in t)t.hasOwnProperty(u)&&Pf(e,u,t[u])}function lc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),py=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $i(e){return py.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var sc=null;function ic(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wl=null,Ml=null;function Jf(e){var t=yl(e);if(t&&(e=t.stateNode)){var n=e[Dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nc(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+en(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var c=l[Dt]||null;if(!c)throw Error(r(90));nc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Qf(l)}break e;case"textarea":If(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Sl(e,!!n.multiple,t,!1)}}}var rc=!1;function Wf(e,t,n){if(rc)return e(t,n);rc=!0;try{var l=e(t);return l}finally{if(rc=!1,(wl!==null||Ml!==null)&&(Rr(),wl&&(t=wl,e=Ml,Ml=wl=null,Jf(t),e)))for(t=0;t<e.length;t++)Jf(e[t])}}function ks(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Dt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oc=!1;if(Bn)try{var _s={};Object.defineProperty(_s,"passive",{get:function(){oc=!0}}),window.addEventListener("test",_s,_s),window.removeEventListener("test",_s,_s)}catch{oc=!1}var la=null,cc=null,Ji=null;function e1(){if(Ji)return Ji;var e,t=cc,n=t.length,l,c="value"in la?la.value:la.textContent,u=c.length;for(e=0;e<n&&t[e]===c[e];e++);var m=n-e;for(l=1;l<=m&&t[n-l]===c[u-l];l++);return Ji=c.slice(e,1<l?1-l:void 0)}function Wi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function er(){return!0}function t1(){return!1}function Lt(e){function t(n,l,c,u,m){this._reactName=n,this._targetInst=c,this.type=l,this.nativeEvent=u,this.target=m,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(n=e[y],this[y]=n?n(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?er:t1,this.isPropagationStopped=t1,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=er)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=er)},persist:function(){},isPersistent:er}),t}var Ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tr=Lt(Ha),As=x({},Ha,{view:0,detail:0}),yy=Lt(As),uc,dc,zs,nr=x({},As,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==zs&&(zs&&e.type==="mousemove"?(uc=e.screenX-zs.screenX,dc=e.screenY-zs.screenY):dc=uc=0,zs=e),uc)},movementY:function(e){return"movementY"in e?e.movementY:dc}}),n1=Lt(nr),by=x({},nr,{dataTransfer:0}),xy=Lt(by),vy=x({},As,{relatedTarget:0}),fc=Lt(vy),Sy=x({},Ha,{animationName:0,elapsedTime:0,pseudoElement:0}),jy=Lt(Sy),wy=x({},Ha,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),My=Lt(wy),ky=x({},Ha,{data:0}),a1=Lt(ky),_y={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ay={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ty(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zy[e])?!!t[e]:!1}function hc(){return Ty}var Cy=x({},As,{key:function(e){if(e.key){var t=_y[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ay[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hc,charCode:function(e){return e.type==="keypress"?Wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ey=Lt(Cy),Oy=x({},nr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),l1=Lt(Oy),Ny=x({},As,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hc}),Dy=Lt(Ny),Ly=x({},Ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ry=Lt(Ly),By=x({},nr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ky=Lt(By),Uy=x({},Ha,{newState:0,oldState:0}),qy=Lt(Uy),Hy=[9,13,27,32],mc=Bn&&"CompositionEvent"in window,Ts=null;Bn&&"documentMode"in document&&(Ts=document.documentMode);var Vy=Bn&&"TextEvent"in window&&!Ts,s1=Bn&&(!mc||Ts&&8<Ts&&11>=Ts),i1=" ",r1=!1;function o1(e,t){switch(e){case"keyup":return Hy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kl=!1;function Gy(e,t){switch(e){case"compositionend":return c1(t);case"keypress":return t.which!==32?null:(r1=!0,i1);case"textInput":return e=t.data,e===i1&&r1?null:e;default:return null}}function Yy(e,t){if(kl)return e==="compositionend"||!mc&&o1(e,t)?(e=e1(),Ji=cc=la=null,kl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return s1&&t.locale!=="ko"?null:t.data;default:return null}}var Fy={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function u1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fy[e.type]:t==="textarea"}function d1(e,t,n,l){wl?Ml?Ml.push(l):Ml=[l]:wl=l,t=Vr(t,"onChange"),0<t.length&&(n=new tr("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Cs=null,Es=null;function Qy(e){F2(e,0)}function ar(e){var t=Ms(e);if(Qf(t))return e}function f1(e,t){if(e==="change")return t}var h1=!1;if(Bn){var gc;if(Bn){var pc="oninput"in document;if(!pc){var m1=document.createElement("div");m1.setAttribute("oninput","return;"),pc=typeof m1.oninput=="function"}gc=pc}else gc=!1;h1=gc&&(!document.documentMode||9<document.documentMode)}function g1(){Cs&&(Cs.detachEvent("onpropertychange",p1),Es=Cs=null)}function p1(e){if(e.propertyName==="value"&&ar(Es)){var t=[];d1(t,Es,e,ic(e)),Wf(Qy,t)}}function Xy(e,t,n){e==="focusin"?(g1(),Cs=t,Es=n,Cs.attachEvent("onpropertychange",p1)):e==="focusout"&&g1()}function Iy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ar(Es)}function Zy(e,t){if(e==="click")return ar(t)}function Py(e,t){if(e==="input"||e==="change")return ar(t)}function $y(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:$y;function Os(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var c=n[l];if(!Fo.call(t,c)||!Gt(e[c],t[c]))return!1}return!0}function y1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function b1(e,t){var n=y1(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=y1(n)}}function x1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?x1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function v1(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pi(e.document)}return t}function yc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Jy=Bn&&"documentMode"in document&&11>=document.documentMode,_l=null,bc=null,Ns=null,xc=!1;function S1(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xc||_l==null||_l!==Pi(l)||(l=_l,"selectionStart"in l&&yc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ns&&Os(Ns,l)||(Ns=l,l=Vr(bc,"onSelect"),0<l.length&&(t=new tr("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=_l)))}function Va(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Al={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},vc={},j1={};Bn&&(j1=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function Ga(e){if(vc[e])return vc[e];if(!Al[e])return e;var t=Al[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in j1)return vc[e]=t[n];return e}var w1=Ga("animationend"),M1=Ga("animationiteration"),k1=Ga("animationstart"),Wy=Ga("transitionrun"),e3=Ga("transitionstart"),t3=Ga("transitioncancel"),_1=Ga("transitionend"),A1=new Map,Sc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sc.push("scrollEnd");function pn(e,t){A1.set(e,t),qa(t,[e])}var z1=new WeakMap;function tn(e,t){if(typeof e=="object"&&e!==null){var n=z1.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Yf(t)},z1.set(e,t),t)}return{value:e,source:t,stack:Yf(t)}}var nn=[],zl=0,jc=0;function lr(){for(var e=zl,t=jc=zl=0;t<e;){var n=nn[t];nn[t++]=null;var l=nn[t];nn[t++]=null;var c=nn[t];nn[t++]=null;var u=nn[t];if(nn[t++]=null,l!==null&&c!==null){var m=l.pending;m===null?c.next=c:(c.next=m.next,m.next=c),l.pending=c}u!==0&&T1(n,c,u)}}function sr(e,t,n,l){nn[zl++]=e,nn[zl++]=t,nn[zl++]=n,nn[zl++]=l,jc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function wc(e,t,n,l){return sr(e,t,n,l),ir(e)}function Tl(e,t){return sr(e,null,null,t),ir(e)}function T1(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var c=!1,u=e.return;u!==null;)u.childLanes|=n,l=u.alternate,l!==null&&(l.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(c=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,c&&t!==null&&(c=31-Vt(n),e=u.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=n|536870912),u):null}function ir(e){if(50<li)throw li=0,Tu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Cl={};function n3(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,n,l){return new n3(e,t,n,l)}function Mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kn(e,t){var n=e.alternate;return n===null?(n=Yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function C1(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function rr(e,t,n,l,c,u){var m=0;if(l=e,typeof e=="function")Mc(e)&&(m=1);else if(typeof e=="string")m=l4(e,n,st.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $t:return e=Yt(31,n,t,c),e.elementType=$t,e.lanes=u,e;case T:return Ya(n.children,c,u,t);case D:m=8,c|=24;break;case L:return e=Yt(12,n,t,c|2),e.elementType=L,e.lanes=u,e;case F:return e=Yt(13,n,t,c),e.elementType=F,e.lanes=u,e;case oe:return e=Yt(19,n,t,c),e.elementType=oe,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:case H:m=10;break e;case U:m=9;break e;case R:m=11;break e;case te:m=14;break e;case Te:m=16,l=null;break e}m=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Yt(m,n,t,c),t.elementType=e,t.type=l,t.lanes=u,t}function Ya(e,t,n,l){return e=Yt(7,e,l,t),e.lanes=n,e}function kc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function _c(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var El=[],Ol=0,or=null,cr=0,an=[],ln=0,Fa=null,Un=1,qn="";function Qa(e,t){El[Ol++]=cr,El[Ol++]=or,or=e,cr=t}function E1(e,t,n){an[ln++]=Un,an[ln++]=qn,an[ln++]=Fa,Fa=e;var l=Un;e=qn;var c=32-Vt(l)-1;l&=~(1<<c),n+=1;var u=32-Vt(t)+c;if(30<u){var m=c-c%5;u=(l&(1<<m)-1).toString(32),l>>=m,c-=m,Un=1<<32-Vt(t)+c|n<<c|l,qn=u+e}else Un=1<<u|n<<c|l,qn=e}function Ac(e){e.return!==null&&(Qa(e,1),E1(e,1,0))}function zc(e){for(;e===or;)or=El[--Ol],El[Ol]=null,cr=El[--Ol],El[Ol]=null;for(;e===Fa;)Fa=an[--ln],an[ln]=null,qn=an[--ln],an[ln]=null,Un=an[--ln],an[ln]=null}var kt=null,Ie=null,Me=!1,Xa=null,wn=!1,Tc=Error(r(519));function Ia(e){var t=Error(r(418,""));throw Rs(tn(t,e)),Tc}function O1(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[bt]=e,t[Dt]=l,n){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(n=0;n<ii.length;n++)ge(ii[n],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),Xf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Zi(t);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),Zf(t,l.value,l.defaultValue,l.children),Zi(t)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Z2(t.textContent,n)?(l.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),l.onScroll!=null&&ge("scroll",t),l.onScrollEnd!=null&&ge("scrollend",t),l.onClick!=null&&(t.onclick=Gr),t=!0):t=!1,t||Ia(e)}function N1(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:kt=kt.return}}function Ds(e){if(e!==kt)return!1;if(!Me)return N1(e),Me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Fu(e.type,e.memoizedProps)),n=!n),n&&Ie&&Ia(e),N1(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Ie=bn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Ie=null}}else t===27?(t=Ie,va(e.type)?(e=Zu,Zu=null,Ie=e):Ie=t):Ie=kt?bn(e.stateNode.nextSibling):null;return!0}function Ls(){Ie=kt=null,Me=!1}function D1(){var e=Xa;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),Xa=null),e}function Rs(e){Xa===null?Xa=[e]:Xa.push(e)}var Cc=Mt(null),Za=null,Hn=null;function sa(e,t,n){Ce(Cc,t._currentValue),t._currentValue=n}function Vn(e){e._currentValue=Cc.current,Ge(Cc)}function Ec(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Oc(e,t,n,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var u=c.dependencies;if(u!==null){var m=c.child;u=u.firstContext;e:for(;u!==null;){var y=u;u=c;for(var w=0;w<t.length;w++)if(y.context===t[w]){u.lanes|=n,y=u.alternate,y!==null&&(y.lanes|=n),Ec(u.return,n,e),l||(m=null);break e}u=y.next}}else if(c.tag===18){if(m=c.return,m===null)throw Error(r(341));m.lanes|=n,u=m.alternate,u!==null&&(u.lanes|=n),Ec(m,n,e),m=null}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===e){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}}function Bs(e,t,n,l){e=null;for(var c=t,u=!1;c!==null;){if(!u){if((c.flags&524288)!==0)u=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var m=c.alternate;if(m===null)throw Error(r(387));if(m=m.memoizedProps,m!==null){var y=c.type;Gt(c.pendingProps.value,m.value)||(e!==null?e.push(y):e=[y])}}else if(c===qi.current){if(m=c.alternate,m===null)throw Error(r(387));m.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(fi):e=[fi])}c=c.return}e!==null&&Oc(t,e,n,l),t.flags|=262144}function ur(e){for(e=e.firstContext;e!==null;){if(!Gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pa(e){Za=e,Hn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return L1(Za,e)}function dr(e,t){return Za===null&&Pa(e),L1(e,t)}function L1(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Hn===null){if(e===null)throw Error(r(308));Hn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Hn=Hn.next=t;return n}var a3=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},l3=a.unstable_scheduleCallback,s3=a.unstable_NormalPriority,nt={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nc(){return{controller:new a3,data:new Map,refCount:0}}function Ks(e){e.refCount--,e.refCount===0&&l3(s3,function(){e.controller.abort()})}var Us=null,Dc=0,Nl=0,Dl=null;function i3(e,t){if(Us===null){var n=Us=[];Dc=0,Nl=Ru(),Dl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Dc++,t.then(R1,R1),t}function R1(){if(--Dc===0&&Us!==null){Dl!==null&&(Dl.status="fulfilled");var e=Us;Us=null,Nl=0,Dl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function r3(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(c){n.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<n.length;c++)(0,n[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<n.length;c++)(0,n[c])(void 0)}),l}var B1=q.S;q.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&i3(e,t),B1!==null&&B1(e,t)};var $a=Mt(null);function Lc(){var e=$a.current;return e!==null?e:Re.pooledCache}function fr(e,t){t===null?Ce($a,$a.current):Ce($a,t.pool)}function K1(){var e=Lc();return e===null?null:{parent:nt._currentValue,pool:e}}var qs=Error(r(460)),U1=Error(r(474)),hr=Error(r(542)),Rc={then:function(){}};function q1(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mr(){}function H1(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(mr,mr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,G1(e),e;default:if(typeof t.status=="string")t.then(mr,mr);else{if(e=Re,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,G1(e),e}throw Hs=t,qs}}var Hs=null;function V1(){if(Hs===null)throw Error(r(459));var e=Hs;return Hs=null,e}function G1(e){if(e===qs||e===hr)throw Error(r(483))}var ia=!1;function Bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function oa(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(_e&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=ir(e),T1(e,null,n),t}return sr(e,l,t,n),ir(e)}function Vs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Rf(e,n)}}function Uc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var c=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?c=u=m:u=u.next=m,n=n.next}while(n!==null);u===null?c=u=t:u=u.next=t}else c=u=t;n={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var qc=!1;function Gs(){if(qc){var e=Dl;if(e!==null)throw e}}function Ys(e,t,n,l){qc=!1;var c=e.updateQueue;ia=!1;var u=c.firstBaseUpdate,m=c.lastBaseUpdate,y=c.shared.pending;if(y!==null){c.shared.pending=null;var w=y,E=w.next;w.next=null,m===null?u=E:m.next=E,m=w;var B=e.alternate;B!==null&&(B=B.updateQueue,y=B.lastBaseUpdate,y!==m&&(y===null?B.firstBaseUpdate=E:y.next=E,B.lastBaseUpdate=w))}if(u!==null){var V=c.baseState;m=0,B=E=w=null,y=u;do{var O=y.lane&-536870913,N=O!==y.lane;if(N?(xe&O)===O:(l&O)===O){O!==0&&O===Nl&&(qc=!0),B!==null&&(B=B.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var le=e,ne=y;O=t;var Ne=n;switch(ne.tag){case 1:if(le=ne.payload,typeof le=="function"){V=le.call(Ne,V,O);break e}V=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ne.payload,O=typeof le=="function"?le.call(Ne,V,O):le,O==null)break e;V=x({},V,O);break e;case 2:ia=!0}}O=y.callback,O!==null&&(e.flags|=64,N&&(e.flags|=8192),N=c.callbacks,N===null?c.callbacks=[O]:N.push(O))}else N={lane:O,tag:y.tag,payload:y.payload,callback:y.callback,next:null},B===null?(E=B=N,w=V):B=B.next=N,m|=O;if(y=y.next,y===null){if(y=c.shared.pending,y===null)break;N=y,y=N.next,N.next=null,c.lastBaseUpdate=N,c.shared.pending=null}}while(!0);B===null&&(w=V),c.baseState=w,c.firstBaseUpdate=E,c.lastBaseUpdate=B,u===null&&(c.shared.lanes=0),pa|=m,e.lanes=m,e.memoizedState=V}}function Y1(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function F1(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Y1(n[e],t)}var Ll=Mt(null),gr=Mt(0);function Q1(e,t){e=Zn,Ce(gr,e),Ce(Ll,t),Zn=e|t.baseLanes}function Hc(){Ce(gr,Zn),Ce(Ll,Ll.current)}function Vc(){Zn=gr.current,Ge(Ll),Ge(gr)}var ca=0,ue=null,Ee=null,et=null,pr=!1,Rl=!1,Ja=!1,yr=0,Fs=0,Bl=null,o3=0;function Pe(){throw Error(r(321))}function Gc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gt(e[n],t[n]))return!1;return!0}function Yc(e,t,n,l,c,u){return ca=u,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Th:Ch,Ja=!1,u=n(l,c),Ja=!1,Rl&&(u=I1(t,n,l,c)),X1(e),u}function X1(e){q.H=wr;var t=Ee!==null&&Ee.next!==null;if(ca=0,et=Ee=ue=null,pr=!1,Fs=0,Bl=null,t)throw Error(r(300));e===null||rt||(e=e.dependencies,e!==null&&ur(e)&&(rt=!0))}function I1(e,t,n,l){ue=e;var c=0;do{if(Rl&&(Bl=null),Fs=0,Rl=!1,25<=c)throw Error(r(301));if(c+=1,et=Ee=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}q.H=g3,u=t(n,l)}while(Rl);return u}function c3(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Qs(t):t,e=e.useState()[0],(Ee!==null?Ee.memoizedState:null)!==e&&(ue.flags|=1024),t}function Fc(){var e=yr!==0;return yr=0,e}function Qc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Xc(e){if(pr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}pr=!1}ca=0,et=Ee=ue=null,Rl=!1,Fs=yr=0,Bl=null}function Rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?ue.memoizedState=et=e:et=et.next=e,et}function tt(){if(Ee===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=et===null?ue.memoizedState:et.next;if(t!==null)et=t,Ee=e;else{if(e===null)throw ue.alternate===null?Error(r(467)):Error(r(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},et===null?ue.memoizedState=et=e:et=et.next=e}return et}function Ic(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qs(e){var t=Fs;return Fs+=1,Bl===null&&(Bl=[]),e=H1(Bl,e,t),t=ue,(et===null?t.memoizedState:et.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Th:Ch),e}function br(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qs(e);if(e.$$typeof===H)return xt(e)}throw Error(r(438,String(e)))}function Zc(e){var t=null,n=ue.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ue.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ic(),ue.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Nt;return t.index++,n}function Gn(e,t){return typeof t=="function"?t(e):t}function xr(e){var t=tt();return Pc(t,Ee,e)}function Pc(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var c=e.baseQueue,u=l.pending;if(u!==null){if(c!==null){var m=c.next;c.next=u.next,u.next=m}t.baseQueue=c=u,l.pending=null}if(u=e.baseState,c===null)e.memoizedState=u;else{t=c.next;var y=m=null,w=null,E=t,B=!1;do{var V=E.lane&-536870913;if(V!==E.lane?(xe&V)===V:(ca&V)===V){var O=E.revertLane;if(O===0)w!==null&&(w=w.next={lane:0,revertLane:0,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),V===Nl&&(B=!0);else if((ca&O)===O){E=E.next,O===Nl&&(B=!0);continue}else V={lane:0,revertLane:E.revertLane,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},w===null?(y=w=V,m=u):w=w.next=V,ue.lanes|=O,pa|=O;V=E.action,Ja&&n(u,V),u=E.hasEagerState?E.eagerState:n(u,V)}else O={lane:V,revertLane:E.revertLane,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},w===null?(y=w=O,m=u):w=w.next=O,ue.lanes|=V,pa|=V;E=E.next}while(E!==null&&E!==t);if(w===null?m=u:w.next=y,!Gt(u,e.memoizedState)&&(rt=!0,B&&(n=Dl,n!==null)))throw n;e.memoizedState=u,e.baseState=m,e.baseQueue=w,l.lastRenderedState=u}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function $c(e){var t=tt(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,c=n.pending,u=t.memoizedState;if(c!==null){n.pending=null;var m=c=c.next;do u=e(u,m.action),m=m.next;while(m!==c);Gt(u,t.memoizedState)||(rt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,l]}function Z1(e,t,n){var l=ue,c=tt(),u=Me;if(u){if(n===void 0)throw Error(r(407));n=n()}else n=t();var m=!Gt((Ee||c).memoizedState,n);m&&(c.memoizedState=n,rt=!0),c=c.queue;var y=J1.bind(null,l,c,e);if(Xs(2048,8,y,[e]),c.getSnapshot!==t||m||et!==null&&et.memoizedState.tag&1){if(l.flags|=2048,Kl(9,vr(),$1.bind(null,l,c,n,t),null),Re===null)throw Error(r(349));u||(ca&124)!==0||P1(l,t,n)}return n}function P1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ue.updateQueue,t===null?(t=Ic(),ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function $1(e,t,n,l){t.value=n,t.getSnapshot=l,W1(t)&&eh(e)}function J1(e,t,n){return n(function(){W1(t)&&eh(e)})}function W1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gt(e,n)}catch{return!0}}function eh(e){var t=Tl(e,2);t!==null&&Zt(t,e,2)}function Jc(e){var t=Rt();if(typeof e=="function"){var n=e;if(e=n(),Ja){na(!0);try{n()}finally{na(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:e},t}function th(e,t,n,l){return e.baseState=n,Pc(e,Ee,typeof l=="function"?l:Gn)}function u3(e,t,n,l,c){if(jr(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){u.listeners.push(m)}};q.T!==null?n(!0):u.isTransition=!1,l(u),n=t.pending,n===null?(u.next=t.pending=u,nh(t,u)):(u.next=n.next,t.pending=n.next=u)}}function nh(e,t){var n=t.action,l=t.payload,c=e.state;if(t.isTransition){var u=q.T,m={};q.T=m;try{var y=n(c,l),w=q.S;w!==null&&w(m,y),ah(e,t,y)}catch(E){Wc(e,t,E)}finally{q.T=u}}else try{u=n(c,l),ah(e,t,u)}catch(E){Wc(e,t,E)}}function ah(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){lh(e,t,l)},function(l){return Wc(e,t,l)}):lh(e,t,n)}function lh(e,t,n){t.status="fulfilled",t.value=n,sh(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,nh(e,n)))}function Wc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,sh(t),t=t.next;while(t!==l)}e.action=null}function sh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ih(e,t){return t}function rh(e,t){if(Me){var n=Re.formState;if(n!==null){e:{var l=ue;if(Me){if(Ie){t:{for(var c=Ie,u=wn;c.nodeType!==8;){if(!u){c=null;break t}if(c=bn(c.nextSibling),c===null){c=null;break t}}u=c.data,c=u==="F!"||u==="F"?c:null}if(c){Ie=bn(c.nextSibling),l=c.data==="F!";break e}}Ia(l)}l=!1}l&&(t=n[0])}}return n=Rt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ih,lastRenderedState:t},n.queue=l,n=_h.bind(null,ue,l),l.dispatch=n,l=Jc(!1),u=lu.bind(null,ue,!1,l.queue),l=Rt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,n=u3.bind(null,ue,c,u,n),c.dispatch=n,l.memoizedState=e,[t,n,!1]}function oh(e){var t=tt();return ch(t,Ee,e)}function ch(e,t,n){if(t=Pc(e,t,ih)[0],e=xr(Gn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Qs(t)}catch(m){throw m===qs?hr:m}else l=t;t=tt();var c=t.queue,u=c.dispatch;return n!==t.memoizedState&&(ue.flags|=2048,Kl(9,vr(),d3.bind(null,c,n),null)),[l,u,e]}function d3(e,t){e.action=t}function uh(e){var t=tt(),n=Ee;if(n!==null)return ch(t,n,e);tt(),t=t.memoizedState,n=tt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Kl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ue.updateQueue,t===null&&(t=Ic(),ue.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function vr(){return{destroy:void 0,resource:void 0}}function dh(){return tt().memoizedState}function Sr(e,t,n,l){var c=Rt();l=l===void 0?null:l,ue.flags|=e,c.memoizedState=Kl(1|t,vr(),n,l)}function Xs(e,t,n,l){var c=tt();l=l===void 0?null:l;var u=c.memoizedState.inst;Ee!==null&&l!==null&&Gc(l,Ee.memoizedState.deps)?c.memoizedState=Kl(t,u,n,l):(ue.flags|=e,c.memoizedState=Kl(1|t,u,n,l))}function fh(e,t){Sr(8390656,8,e,t)}function hh(e,t){Xs(2048,8,e,t)}function mh(e,t){return Xs(4,2,e,t)}function gh(e,t){return Xs(4,4,e,t)}function ph(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yh(e,t,n){n=n!=null?n.concat([e]):null,Xs(4,4,ph.bind(null,t,e),n)}function eu(){}function bh(e,t){var n=tt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Gc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function xh(e,t){var n=tt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Gc(t,l[1]))return l[0];if(l=e(),Ja){na(!0);try{e()}finally{na(!1)}}return n.memoizedState=[l,t],l}function tu(e,t,n){return n===void 0||(ca&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=j2(),ue.lanes|=e,pa|=e,n)}function vh(e,t,n,l){return Gt(n,t)?n:Ll.current!==null?(e=tu(e,n,l),Gt(e,t)||(rt=!0),e):(ca&42)===0?(rt=!0,e.memoizedState=n):(e=j2(),ue.lanes|=e,pa|=e,t)}function Sh(e,t,n,l,c){var u=I.p;I.p=u!==0&&8>u?u:8;var m=q.T,y={};q.T=y,lu(e,!1,t,n);try{var w=c(),E=q.S;if(E!==null&&E(y,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var B=r3(w,l);Is(e,t,B,It(e))}else Is(e,t,l,It(e))}catch(V){Is(e,t,{then:function(){},status:"rejected",reason:V},It())}finally{I.p=u,q.T=m}}function f3(){}function nu(e,t,n,l){if(e.tag!==5)throw Error(r(476));var c=jh(e).queue;Sh(e,c,t,se,n===null?f3:function(){return wh(e),n(l)})}function jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wh(e){var t=jh(e).next.queue;Is(e,t,{},It())}function au(){return xt(fi)}function Mh(){return tt().memoizedState}function kh(){return tt().memoizedState}function h3(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=It();e=ra(n);var l=oa(t,e,n);l!==null&&(Zt(l,t,n),Vs(l,t,n)),t={cache:Nc()},e.payload=t;return}t=t.return}}function m3(e,t,n){var l=It();n={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},jr(e)?Ah(t,n):(n=wc(e,t,n,l),n!==null&&(Zt(n,e,l),zh(n,t,l)))}function _h(e,t,n){var l=It();Is(e,t,n,l)}function Is(e,t,n,l){var c={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(jr(e))Ah(t,c);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var m=t.lastRenderedState,y=u(m,n);if(c.hasEagerState=!0,c.eagerState=y,Gt(y,m))return sr(e,t,c,0),Re===null&&lr(),!1}catch{}finally{}if(n=wc(e,t,c,l),n!==null)return Zt(n,e,l),zh(n,t,l),!0}return!1}function lu(e,t,n,l){if(l={lane:2,revertLane:Ru(),action:l,hasEagerState:!1,eagerState:null,next:null},jr(e)){if(t)throw Error(r(479))}else t=wc(e,n,l,2),t!==null&&Zt(t,e,2)}function jr(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function Ah(e,t){Rl=pr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zh(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Rf(e,n)}}var wr={readContext:xt,use:br,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe},Th={readContext:xt,use:br,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:fh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Sr(4194308,4,ph.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sr(4194308,4,e,t)},useInsertionEffect:function(e,t){Sr(4,2,e,t)},useMemo:function(e,t){var n=Rt();t=t===void 0?null:t;var l=e();if(Ja){na(!0);try{e()}finally{na(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Rt();if(n!==void 0){var c=n(t);if(Ja){na(!0);try{n(t)}finally{na(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=m3.bind(null,ue,e),[l.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:function(e){e=Jc(e);var t=e.queue,n=_h.bind(null,ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:eu,useDeferredValue:function(e,t){var n=Rt();return tu(n,e,t)},useTransition:function(){var e=Jc(!1);return e=Sh.bind(null,ue,e.queue,!0,!1),Rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ue,c=Rt();if(Me){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Re===null)throw Error(r(349));(xe&124)!==0||P1(l,t,n)}c.memoizedState=n;var u={value:n,getSnapshot:t};return c.queue=u,fh(J1.bind(null,l,u,e),[e]),l.flags|=2048,Kl(9,vr(),$1.bind(null,l,u,n,t),null),n},useId:function(){var e=Rt(),t=Re.identifierPrefix;if(Me){var n=qn,l=Un;n=(l&~(1<<32-Vt(l)-1)).toString(32)+n,t="«"+t+"R"+n,n=yr++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=o3++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:au,useFormState:rh,useActionState:rh,useOptimistic:function(e){var t=Rt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=lu.bind(null,ue,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zc,useCacheRefresh:function(){return Rt().memoizedState=h3.bind(null,ue)}},Ch={readContext:xt,use:br,useCallback:bh,useContext:xt,useEffect:hh,useImperativeHandle:yh,useInsertionEffect:mh,useLayoutEffect:gh,useMemo:xh,useReducer:xr,useRef:dh,useState:function(){return xr(Gn)},useDebugValue:eu,useDeferredValue:function(e,t){var n=tt();return vh(n,Ee.memoizedState,e,t)},useTransition:function(){var e=xr(Gn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:Qs(e),t]},useSyncExternalStore:Z1,useId:Mh,useHostTransitionStatus:au,useFormState:oh,useActionState:oh,useOptimistic:function(e,t){var n=tt();return th(n,Ee,e,t)},useMemoCache:Zc,useCacheRefresh:kh},g3={readContext:xt,use:br,useCallback:bh,useContext:xt,useEffect:hh,useImperativeHandle:yh,useInsertionEffect:mh,useLayoutEffect:gh,useMemo:xh,useReducer:$c,useRef:dh,useState:function(){return $c(Gn)},useDebugValue:eu,useDeferredValue:function(e,t){var n=tt();return Ee===null?tu(n,e,t):vh(n,Ee.memoizedState,e,t)},useTransition:function(){var e=$c(Gn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:Qs(e),t]},useSyncExternalStore:Z1,useId:Mh,useHostTransitionStatus:au,useFormState:uh,useActionState:uh,useOptimistic:function(e,t){var n=tt();return Ee!==null?th(n,Ee,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Zc,useCacheRefresh:kh},Ul=null,Zs=0;function Mr(e){var t=Zs;return Zs+=1,Ul===null&&(Ul=[]),H1(Ul,e,t)}function Ps(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function kr(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Eh(e){var t=e._init;return t(e._payload)}function Oh(e){function t(z,k){if(e){var C=z.deletions;C===null?(z.deletions=[k],z.flags|=16):C.push(k)}}function n(z,k){if(!e)return null;for(;k!==null;)t(z,k),k=k.sibling;return null}function l(z){for(var k=new Map;z!==null;)z.key!==null?k.set(z.key,z):k.set(z.index,z),z=z.sibling;return k}function c(z,k){return z=Kn(z,k),z.index=0,z.sibling=null,z}function u(z,k,C){return z.index=C,e?(C=z.alternate,C!==null?(C=C.index,C<k?(z.flags|=67108866,k):C):(z.flags|=67108866,k)):(z.flags|=1048576,k)}function m(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function y(z,k,C,K){return k===null||k.tag!==6?(k=kc(C,z.mode,K),k.return=z,k):(k=c(k,C),k.return=z,k)}function w(z,k,C,K){var P=C.type;return P===T?B(z,k,C.props.children,K,C.key):k!==null&&(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Te&&Eh(P)===k.type)?(k=c(k,C.props),Ps(k,C),k.return=z,k):(k=rr(C.type,C.key,C.props,null,z.mode,K),Ps(k,C),k.return=z,k)}function E(z,k,C,K){return k===null||k.tag!==4||k.stateNode.containerInfo!==C.containerInfo||k.stateNode.implementation!==C.implementation?(k=_c(C,z.mode,K),k.return=z,k):(k=c(k,C.children||[]),k.return=z,k)}function B(z,k,C,K,P){return k===null||k.tag!==7?(k=Ya(C,z.mode,K,P),k.return=z,k):(k=c(k,C),k.return=z,k)}function V(z,k,C){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=kc(""+k,z.mode,C),k.return=z,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case _:return C=rr(k.type,k.key,k.props,null,z.mode,C),Ps(C,k),C.return=z,C;case A:return k=_c(k,z.mode,C),k.return=z,k;case Te:var K=k._init;return k=K(k._payload),V(z,k,C)}if(Ln(k)||Jt(k))return k=Ya(k,z.mode,C,null),k.return=z,k;if(typeof k.then=="function")return V(z,Mr(k),C);if(k.$$typeof===H)return V(z,dr(z,k),C);kr(z,k)}return null}function O(z,k,C,K){var P=k!==null?k.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return P!==null?null:y(z,k,""+C,K);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _:return C.key===P?w(z,k,C,K):null;case A:return C.key===P?E(z,k,C,K):null;case Te:return P=C._init,C=P(C._payload),O(z,k,C,K)}if(Ln(C)||Jt(C))return P!==null?null:B(z,k,C,K,null);if(typeof C.then=="function")return O(z,k,Mr(C),K);if(C.$$typeof===H)return O(z,k,dr(z,C),K);kr(z,C)}return null}function N(z,k,C,K,P){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return z=z.get(C)||null,y(k,z,""+K,P);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case _:return z=z.get(K.key===null?C:K.key)||null,w(k,z,K,P);case A:return z=z.get(K.key===null?C:K.key)||null,E(k,z,K,P);case Te:var fe=K._init;return K=fe(K._payload),N(z,k,C,K,P)}if(Ln(K)||Jt(K))return z=z.get(C)||null,B(k,z,K,P,null);if(typeof K.then=="function")return N(z,k,C,Mr(K),P);if(K.$$typeof===H)return N(z,k,C,dr(k,K),P);kr(k,K)}return null}function le(z,k,C,K){for(var P=null,fe=null,W=k,ae=k=0,ct=null;W!==null&&ae<C.length;ae++){W.index>ae?(ct=W,W=null):ct=W.sibling;var we=O(z,W,C[ae],K);if(we===null){W===null&&(W=ct);break}e&&W&&we.alternate===null&&t(z,W),k=u(we,k,ae),fe===null?P=we:fe.sibling=we,fe=we,W=ct}if(ae===C.length)return n(z,W),Me&&Qa(z,ae),P;if(W===null){for(;ae<C.length;ae++)W=V(z,C[ae],K),W!==null&&(k=u(W,k,ae),fe===null?P=W:fe.sibling=W,fe=W);return Me&&Qa(z,ae),P}for(W=l(W);ae<C.length;ae++)ct=N(W,z,ae,C[ae],K),ct!==null&&(e&&ct.alternate!==null&&W.delete(ct.key===null?ae:ct.key),k=u(ct,k,ae),fe===null?P=ct:fe.sibling=ct,fe=ct);return e&&W.forEach(function(ka){return t(z,ka)}),Me&&Qa(z,ae),P}function ne(z,k,C,K){if(C==null)throw Error(r(151));for(var P=null,fe=null,W=k,ae=k=0,ct=null,we=C.next();W!==null&&!we.done;ae++,we=C.next()){W.index>ae?(ct=W,W=null):ct=W.sibling;var ka=O(z,W,we.value,K);if(ka===null){W===null&&(W=ct);break}e&&W&&ka.alternate===null&&t(z,W),k=u(ka,k,ae),fe===null?P=ka:fe.sibling=ka,fe=ka,W=ct}if(we.done)return n(z,W),Me&&Qa(z,ae),P;if(W===null){for(;!we.done;ae++,we=C.next())we=V(z,we.value,K),we!==null&&(k=u(we,k,ae),fe===null?P=we:fe.sibling=we,fe=we);return Me&&Qa(z,ae),P}for(W=l(W);!we.done;ae++,we=C.next())we=N(W,z,ae,we.value,K),we!==null&&(e&&we.alternate!==null&&W.delete(we.key===null?ae:we.key),k=u(we,k,ae),fe===null?P=we:fe.sibling=we,fe=we);return e&&W.forEach(function(p4){return t(z,p4)}),Me&&Qa(z,ae),P}function Ne(z,k,C,K){if(typeof C=="object"&&C!==null&&C.type===T&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case _:e:{for(var P=C.key;k!==null;){if(k.key===P){if(P=C.type,P===T){if(k.tag===7){n(z,k.sibling),K=c(k,C.props.children),K.return=z,z=K;break e}}else if(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Te&&Eh(P)===k.type){n(z,k.sibling),K=c(k,C.props),Ps(K,C),K.return=z,z=K;break e}n(z,k);break}else t(z,k);k=k.sibling}C.type===T?(K=Ya(C.props.children,z.mode,K,C.key),K.return=z,z=K):(K=rr(C.type,C.key,C.props,null,z.mode,K),Ps(K,C),K.return=z,z=K)}return m(z);case A:e:{for(P=C.key;k!==null;){if(k.key===P)if(k.tag===4&&k.stateNode.containerInfo===C.containerInfo&&k.stateNode.implementation===C.implementation){n(z,k.sibling),K=c(k,C.children||[]),K.return=z,z=K;break e}else{n(z,k);break}else t(z,k);k=k.sibling}K=_c(C,z.mode,K),K.return=z,z=K}return m(z);case Te:return P=C._init,C=P(C._payload),Ne(z,k,C,K)}if(Ln(C))return le(z,k,C,K);if(Jt(C)){if(P=Jt(C),typeof P!="function")throw Error(r(150));return C=P.call(C),ne(z,k,C,K)}if(typeof C.then=="function")return Ne(z,k,Mr(C),K);if(C.$$typeof===H)return Ne(z,k,dr(z,C),K);kr(z,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,k!==null&&k.tag===6?(n(z,k.sibling),K=c(k,C),K.return=z,z=K):(n(z,k),K=kc(C,z.mode,K),K.return=z,z=K),m(z)):n(z,k)}return function(z,k,C,K){try{Zs=0;var P=Ne(z,k,C,K);return Ul=null,P}catch(W){if(W===qs||W===hr)throw W;var fe=Yt(29,W,null,z.mode);return fe.lanes=K,fe.return=z,fe}finally{}}}var ql=Oh(!0),Nh=Oh(!1),sn=Mt(null),Mn=null;function ua(e){var t=e.alternate;Ce(at,at.current&1),Ce(sn,e),Mn===null&&(t===null||Ll.current!==null||t.memoizedState!==null)&&(Mn=e)}function Dh(e){if(e.tag===22){if(Ce(at,at.current),Ce(sn,e),Mn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Mn=e)}}else da()}function da(){Ce(at,at.current),Ce(sn,sn.current)}function Yn(e){Ge(sn),Mn===e&&(Mn=null),Ge(at)}var at=Mt(0);function _r(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||Iu(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function su(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:x({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var iu={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=It(),c=ra(l);c.payload=t,n!=null&&(c.callback=n),t=oa(e,c,l),t!==null&&(Zt(t,e,l),Vs(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=It(),c=ra(l);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=oa(e,c,l),t!==null&&(Zt(t,e,l),Vs(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=It(),l=ra(n);l.tag=2,t!=null&&(l.callback=t),t=oa(e,l,n),t!==null&&(Zt(t,e,n),Vs(t,e,n))}};function Lh(e,t,n,l,c,u,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,m):t.prototype&&t.prototype.isPureReactComponent?!Os(n,l)||!Os(c,u):!0}function Rh(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&iu.enqueueReplaceState(t,t.state,null)}function Wa(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=x({},n));for(var c in e)n[c]===void 0&&(n[c]=e[c])}return n}var Ar=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Bh(e){Ar(e)}function Kh(e){console.error(e)}function Uh(e){Ar(e)}function zr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function qh(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function ru(e,t,n){return n=ra(n),n.tag=3,n.payload={element:null},n.callback=function(){zr(e,t)},n}function Hh(e){return e=ra(e),e.tag=3,e}function Vh(e,t,n,l){var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var u=l.value;e.payload=function(){return c(u)},e.callback=function(){qh(t,n,l)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){qh(t,n,l),typeof c!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var y=l.stack;this.componentDidCatch(l.value,{componentStack:y!==null?y:""})})}function p3(e,t,n,l,c){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Bs(t,n,c,!0),n=sn.current,n!==null){switch(n.tag){case 13:return Mn===null?Eu():n.alternate===null&&Ze===0&&(Ze=3),n.flags&=-257,n.flags|=65536,n.lanes=c,l===Rc?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Nu(e,l,c)),!1;case 22:return n.flags|=65536,l===Rc?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Nu(e,l,c)),!1}throw Error(r(435,n.tag))}return Nu(e,l,c),Eu(),!1}if(Me)return t=sn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Tc&&(e=Error(r(422),{cause:l}),Rs(tn(e,n)))):(l!==Tc&&(t=Error(r(423),{cause:l}),Rs(tn(t,n))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=tn(l,n),c=ru(e.stateNode,l,c),Uc(e,c),Ze!==4&&(Ze=2)),!1;var u=Error(r(520),{cause:l});if(u=tn(u,n),ai===null?ai=[u]:ai.push(u),Ze!==4&&(Ze=2),t===null)return!0;l=tn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=c&-c,n.lanes|=e,e=ru(n.stateNode,l,e),Uc(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ya===null||!ya.has(u))))return n.flags|=65536,c&=-c,n.lanes|=c,c=Hh(c),Vh(c,e,n,l),Uc(n,c),!1}n=n.return}while(n!==null);return!1}var Gh=Error(r(461)),rt=!1;function ft(e,t,n,l){t.child=e===null?Nh(t,null,n,l):ql(t,e.child,n,l)}function Yh(e,t,n,l,c){n=n.render;var u=t.ref;if("ref"in l){var m={};for(var y in l)y!=="ref"&&(m[y]=l[y])}else m=l;return Pa(t),l=Yc(e,t,n,m,u,c),y=Fc(),e!==null&&!rt?(Qc(e,t,c),Fn(e,t,c)):(Me&&y&&Ac(t),t.flags|=1,ft(e,t,l,c),t.child)}function Fh(e,t,n,l,c){if(e===null){var u=n.type;return typeof u=="function"&&!Mc(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,Qh(e,t,u,l,c)):(e=rr(n.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!gu(e,c)){var m=u.memoizedProps;if(n=n.compare,n=n!==null?n:Os,n(m,l)&&e.ref===t.ref)return Fn(e,t,c)}return t.flags|=1,e=Kn(u,l),e.ref=t.ref,e.return=t,t.child=e}function Qh(e,t,n,l,c){if(e!==null){var u=e.memoizedProps;if(Os(u,l)&&e.ref===t.ref)if(rt=!1,t.pendingProps=l=u,gu(e,c))(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,Fn(e,t,c)}return ou(e,t,n,l,c)}function Xh(e,t,n){var l=t.pendingProps,c=l.children,u=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=u!==null?u.baseLanes|n:n,e!==null){for(c=t.child=e.child,u=0;c!==null;)u=u|c.lanes|c.childLanes,c=c.sibling;t.childLanes=u&~l}else t.childLanes=0,t.child=null;return Ih(e,t,l,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fr(t,u!==null?u.cachePool:null),u!==null?Q1(t,u):Hc(),Dh(t);else return t.lanes=t.childLanes=536870912,Ih(e,t,u!==null?u.baseLanes|n:n,n)}else u!==null?(fr(t,u.cachePool),Q1(t,u),da(),t.memoizedState=null):(e!==null&&fr(t,null),Hc(),da());return ft(e,t,c,n),t.child}function Ih(e,t,n,l){var c=Lc();return c=c===null?null:{parent:nt._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&fr(t,null),Hc(),Dh(t),e!==null&&Bs(e,t,l,!0),null}function Tr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ou(e,t,n,l,c){return Pa(t),n=Yc(e,t,n,l,void 0,c),l=Fc(),e!==null&&!rt?(Qc(e,t,c),Fn(e,t,c)):(Me&&l&&Ac(t),t.flags|=1,ft(e,t,n,c),t.child)}function Zh(e,t,n,l,c,u){return Pa(t),t.updateQueue=null,n=I1(t,l,n,c),X1(e),l=Fc(),e!==null&&!rt?(Qc(e,t,u),Fn(e,t,u)):(Me&&l&&Ac(t),t.flags|=1,ft(e,t,n,u),t.child)}function Ph(e,t,n,l,c){if(Pa(t),t.stateNode===null){var u=Cl,m=n.contextType;typeof m=="object"&&m!==null&&(u=xt(m)),u=new n(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=iu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Bc(t),m=n.contextType,u.context=typeof m=="object"&&m!==null?xt(m):Cl,u.state=t.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(su(t,n,m,l),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(m=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),m!==u.state&&iu.enqueueReplaceState(u,u.state,null),Ys(t,l,u,c),Gs(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var y=t.memoizedProps,w=Wa(n,y);u.props=w;var E=u.context,B=n.contextType;m=Cl,typeof B=="object"&&B!==null&&(m=xt(B));var V=n.getDerivedStateFromProps;B=typeof V=="function"||typeof u.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,B||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y||E!==m)&&Rh(t,u,l,m),ia=!1;var O=t.memoizedState;u.state=O,Ys(t,l,u,c),Gs(),E=t.memoizedState,y||O!==E||ia?(typeof V=="function"&&(su(t,n,V,l),E=t.memoizedState),(w=ia||Lh(t,n,w,l,O,E,m))?(B||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=E),u.props=l,u.state=E,u.context=m,l=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,Kc(e,t),m=t.memoizedProps,B=Wa(n,m),u.props=B,V=t.pendingProps,O=u.context,E=n.contextType,w=Cl,typeof E=="object"&&E!==null&&(w=xt(E)),y=n.getDerivedStateFromProps,(E=typeof y=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==V||O!==w)&&Rh(t,u,l,w),ia=!1,O=t.memoizedState,u.state=O,Ys(t,l,u,c),Gs();var N=t.memoizedState;m!==V||O!==N||ia||e!==null&&e.dependencies!==null&&ur(e.dependencies)?(typeof y=="function"&&(su(t,n,y,l),N=t.memoizedState),(B=ia||Lh(t,n,B,l,O,N,w)||e!==null&&e.dependencies!==null&&ur(e.dependencies))?(E||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,N,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,N,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=N),u.props=l,u.state=N,u.context=w,l=B):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,Tr(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=ql(t,e.child,null,c),t.child=ql(t,null,n,c)):ft(e,t,n,c),t.memoizedState=u.state,e=t.child):e=Fn(e,t,c),e}function $h(e,t,n,l){return Ls(),t.flags|=256,ft(e,t,n,l),t.child}var cu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uu(e){return{baseLanes:e,cachePool:K1()}}function du(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=rn),e}function Jh(e,t,n){var l=t.pendingProps,c=!1,u=(t.flags&128)!==0,m;if((m=u)||(m=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),m&&(c=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(c?ua(t):da(),Me){var y=Ie,w;if(w=y){e:{for(w=y,y=wn;w.nodeType!==8;){if(!y){y=null;break e}if(w=bn(w.nextSibling),w===null){y=null;break e}}y=w}y!==null?(t.memoizedState={dehydrated:y,treeContext:Fa!==null?{id:Un,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},w=Yt(18,null,null,0),w.stateNode=y,w.return=t,t.child=w,kt=t,Ie=null,w=!0):w=!1}w||Ia(t)}if(y=t.memoizedState,y!==null&&(y=y.dehydrated,y!==null))return Iu(y)?t.lanes=32:t.lanes=536870912,null;Yn(t)}return y=l.children,l=l.fallback,c?(da(),c=t.mode,y=Cr({mode:"hidden",children:y},c),l=Ya(l,c,n,null),y.return=t,l.return=t,y.sibling=l,t.child=y,c=t.child,c.memoizedState=uu(n),c.childLanes=du(e,m,n),t.memoizedState=cu,l):(ua(t),fu(t,y))}if(w=e.memoizedState,w!==null&&(y=w.dehydrated,y!==null)){if(u)t.flags&256?(ua(t),t.flags&=-257,t=hu(e,t,n)):t.memoizedState!==null?(da(),t.child=e.child,t.flags|=128,t=null):(da(),c=l.fallback,y=t.mode,l=Cr({mode:"visible",children:l.children},y),c=Ya(c,y,n,null),c.flags|=2,l.return=t,c.return=t,l.sibling=c,t.child=l,ql(t,e.child,null,n),l=t.child,l.memoizedState=uu(n),l.childLanes=du(e,m,n),t.memoizedState=cu,t=c);else if(ua(t),Iu(y)){if(m=y.nextSibling&&y.nextSibling.dataset,m)var E=m.dgst;m=E,l=Error(r(419)),l.stack="",l.digest=m,Rs({value:l,source:null,stack:null}),t=hu(e,t,n)}else if(rt||Bs(e,t,n,!1),m=(n&e.childLanes)!==0,rt||m){if(m=Re,m!==null&&(l=n&-n,l=(l&42)!==0?1:Zo(l),l=(l&(m.suspendedLanes|n))!==0?0:l,l!==0&&l!==w.retryLane))throw w.retryLane=l,Tl(e,l),Zt(m,e,l),Gh;y.data==="$?"||Eu(),t=hu(e,t,n)}else y.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Ie=bn(y.nextSibling),kt=t,Me=!0,Xa=null,wn=!1,e!==null&&(an[ln++]=Un,an[ln++]=qn,an[ln++]=Fa,Un=e.id,qn=e.overflow,Fa=t),t=fu(t,l.children),t.flags|=4096);return t}return c?(da(),c=l.fallback,y=t.mode,w=e.child,E=w.sibling,l=Kn(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,E!==null?c=Kn(E,c):(c=Ya(c,y,n,null),c.flags|=2),c.return=t,l.return=t,l.sibling=c,t.child=l,l=c,c=t.child,y=e.child.memoizedState,y===null?y=uu(n):(w=y.cachePool,w!==null?(E=nt._currentValue,w=w.parent!==E?{parent:E,pool:E}:w):w=K1(),y={baseLanes:y.baseLanes|n,cachePool:w}),c.memoizedState=y,c.childLanes=du(e,m,n),t.memoizedState=cu,l):(ua(t),n=e.child,e=n.sibling,n=Kn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=n,t.memoizedState=null,n)}function fu(e,t){return t=Cr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Cr(e,t){return e=Yt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function hu(e,t,n){return ql(t,e.child,null,n),e=fu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wh(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ec(e.return,t,n)}function mu(e,t,n,l,c){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:c}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=l,u.tail=n,u.tailMode=c)}function e2(e,t,n){var l=t.pendingProps,c=l.revealOrder,u=l.tail;if(ft(e,t,l.children,n),l=at.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wh(e,n,t);else if(e.tag===19)Wh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(Ce(at,l),c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&_r(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),mu(t,!1,c,n,u);break;case"backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&_r(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}mu(t,!0,n,null,u);break;case"together":mu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Bs(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ur(e)))}function y3(e,t,n){switch(t.tag){case 3:Hi(t,t.stateNode.containerInfo),sa(t,nt,e.memoizedState.cache),Ls();break;case 27:case 5:Yo(t);break;case 4:Hi(t,t.stateNode.containerInfo);break;case 10:sa(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ua(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Jh(e,t,n):(ua(t),e=Fn(e,t,n),e!==null?e.sibling:null);ua(t);break;case 19:var c=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Bs(e,t,n,!1),l=(n&t.childLanes)!==0),c){if(l)return e2(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Ce(at,at.current),l)break;return null;case 22:case 23:return t.lanes=0,Xh(e,t,n);case 24:sa(t,nt,e.memoizedState.cache)}return Fn(e,t,n)}function t2(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!gu(e,n)&&(t.flags&128)===0)return rt=!1,y3(e,t,n);rt=(e.flags&131072)!==0}else rt=!1,Me&&(t.flags&1048576)!==0&&E1(t,cr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,c=l._init;if(l=c(l._payload),t.type=l,typeof l=="function")Mc(l)?(e=Wa(l,e),t.tag=1,t=Ph(null,t,l,e,n)):(t.tag=0,t=ou(null,t,l,e,n));else{if(l!=null){if(c=l.$$typeof,c===R){t.tag=11,t=Yh(null,t,l,e,n);break e}else if(c===te){t.tag=14,t=Fh(null,t,l,e,n);break e}}throw t=xs(l)||l,Error(r(306,t,""))}}return t;case 0:return ou(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,c=Wa(l,t.pendingProps),Ph(e,t,l,c,n);case 3:e:{if(Hi(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var u=t.memoizedState;c=u.element,Kc(e,t),Ys(t,l,null,n);var m=t.memoizedState;if(l=m.cache,sa(t,nt,l),l!==u.cache&&Oc(t,[nt],n,!0),Gs(),l=m.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=$h(e,t,l,n);break e}else if(l!==c){c=tn(Error(r(424)),t),Rs(c),t=$h(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ie=bn(e.firstChild),kt=t,Me=!0,Xa=null,wn=!0,n=Nh(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ls(),l===c){t=Fn(e,t,n);break e}ft(e,t,l,n)}t=t.child}return t;case 26:return Tr(e,t),e===null?(n=sm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Me||(n=t.type,e=t.pendingProps,l=Yr(ta.current).createElement(n),l[bt]=t,l[Dt]=e,mt(l,n,e),it(l),t.stateNode=l):t.memoizedState=sm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Yo(t),e===null&&Me&&(l=t.stateNode=nm(t.type,t.pendingProps,ta.current),kt=t,wn=!0,c=Ie,va(t.type)?(Zu=c,Ie=bn(l.firstChild)):Ie=c),ft(e,t,t.pendingProps.children,n),Tr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((c=l=Ie)&&(l=F3(l,t.type,t.pendingProps,wn),l!==null?(t.stateNode=l,kt=t,Ie=bn(l.firstChild),wn=!1,c=!0):c=!1),c||Ia(t)),Yo(t),c=t.type,u=t.pendingProps,m=e!==null?e.memoizedProps:null,l=u.children,Fu(c,u)?l=null:m!==null&&Fu(c,m)&&(t.flags|=32),t.memoizedState!==null&&(c=Yc(e,t,c3,null,null,n),fi._currentValue=c),Tr(e,t),ft(e,t,l,n),t.child;case 6:return e===null&&Me&&((e=n=Ie)&&(n=Q3(n,t.pendingProps,wn),n!==null?(t.stateNode=n,kt=t,Ie=null,e=!0):e=!1),e||Ia(t)),null;case 13:return Jh(e,t,n);case 4:return Hi(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ql(t,null,l,n):ft(e,t,l,n),t.child;case 11:return Yh(e,t,t.type,t.pendingProps,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,sa(t,t.type,l.value),ft(e,t,l.children,n),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Pa(t),c=xt(c),l=l(c),t.flags|=1,ft(e,t,l,n),t.child;case 14:return Fh(e,t,t.type,t.pendingProps,n);case 15:return Qh(e,t,t.type,t.pendingProps,n);case 19:return e2(e,t,n);case 31:return l=t.pendingProps,n=t.mode,l={mode:l.mode,children:l.children},e===null?(n=Cr(l,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=Kn(e.child,l),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Xh(e,t,n);case 24:return Pa(t),l=xt(nt),e===null?(c=Lc(),c===null&&(c=Re,u=Nc(),c.pooledCache=u,u.refCount++,u!==null&&(c.pooledCacheLanes|=n),c=u),t.memoizedState={parent:l,cache:c},Bc(t),sa(t,nt,c)):((e.lanes&n)!==0&&(Kc(e,t),Ys(t,null,null,n),Gs()),c=e.memoizedState,u=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),sa(t,nt,l)):(l=u.cache,sa(t,nt,l),l!==c.cache&&Oc(t,[nt],n,!0))),ft(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Qn(e){e.flags|=4}function n2(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!um(t)){if(t=sn.current,t!==null&&((xe&4194048)===xe?Mn!==null:(xe&62914560)!==xe&&(xe&536870912)===0||t!==Mn))throw Hs=Rc,U1;e.flags|=8192}}function Er(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Df():536870912,e.lanes|=t,Yl|=t)}function $s(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var c=e.child;c!==null;)n|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function b3(e,t,n){var l=t.pendingProps;switch(zc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Vn(nt),ml(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ds(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,D1())),Ye(t),null;case 26:return n=t.memoizedState,e===null?(Qn(t),n!==null?(Ye(t),n2(t,n)):(Ye(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Qn(t),Ye(t),n2(t,n)):(Ye(t),t.flags&=-16777217):(e.memoizedProps!==l&&Qn(t),Ye(t),t.flags&=-16777217),null;case 27:Vi(t),n=ta.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}e=st.current,Ds(t)?O1(t):(e=nm(c,l,n),t.stateNode=e,Qn(t))}return Ye(t),null;case 5:if(Vi(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}if(e=st.current,Ds(t))O1(t);else{switch(c=Yr(ta.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?c.createElement(n,{is:l.is}):c.createElement(n)}}e[bt]=t,e[Dt]=l;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(mt(e,n,l),n){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Qn(t)}}return Ye(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=ta.current,Ds(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,c=kt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Z2(e.nodeValue,n)),e||Ia(t)}else e=Yr(e).createTextNode(l),e[bt]=t,t.stateNode=e}return Ye(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ds(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[bt]=t}else Ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),c=!1}else c=D1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Yn(t),t):(Yn(t),null)}if(Yn(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=l!==null,e=e!==null&&e.memoizedState!==null,n){l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool);var u=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==c&&(l.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Er(t,t.updateQueue),Ye(t),null;case 4:return ml(),e===null&&qu(t.stateNode.containerInfo),Ye(t),null;case 10:return Vn(t.type),Ye(t),null;case 19:if(Ge(at),c=t.memoizedState,c===null)return Ye(t),null;if(l=(t.flags&128)!==0,u=c.rendering,u===null)if(l)$s(c,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=_r(e),u!==null){for(t.flags|=128,$s(c,!1),e=u.updateQueue,t.updateQueue=e,Er(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)C1(n,e),n=n.sibling;return Ce(at,at.current&1|2),t.child}e=e.sibling}c.tail!==null&&jn()>Dr&&(t.flags|=128,l=!0,$s(c,!1),t.lanes=4194304)}else{if(!l)if(e=_r(u),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Er(t,e),$s(c,!0),c.tail===null&&c.tailMode==="hidden"&&!u.alternate&&!Me)return Ye(t),null}else 2*jn()-c.renderingStartTime>Dr&&n!==536870912&&(t.flags|=128,l=!0,$s(c,!1),t.lanes=4194304);c.isBackwards?(u.sibling=t.child,t.child=u):(e=c.last,e!==null?e.sibling=u:t.child=u,c.last=u)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=jn(),t.sibling=null,e=at.current,Ce(at,l?e&1|2:e&1),t):(Ye(t),null);case 22:case 23:return Yn(t),Vc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),n=t.updateQueue,n!==null&&Er(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&Ge($a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vn(nt),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function x3(e,t){switch(zc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vn(nt),ml(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Vi(t),null;case 13:if(Yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(at),null;case 4:return ml(),null;case 10:return Vn(t.type),null;case 22:case 23:return Yn(t),Vc(),e!==null&&Ge($a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vn(nt),null;case 25:return null;default:return null}}function a2(e,t){switch(zc(t),t.tag){case 3:Vn(nt),ml();break;case 26:case 27:case 5:Vi(t);break;case 4:ml();break;case 13:Yn(t);break;case 19:Ge(at);break;case 10:Vn(t.type);break;case 22:case 23:Yn(t),Vc(),e!==null&&Ge($a);break;case 24:Vn(nt)}}function Js(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var c=l.next;n=c;do{if((n.tag&e)===e){l=void 0;var u=n.create,m=n.inst;l=u(),m.destroy=l}n=n.next}while(n!==c)}}catch(y){De(t,t.return,y)}}function fa(e,t,n){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var u=c.next;l=u;do{if((l.tag&e)===e){var m=l.inst,y=m.destroy;if(y!==void 0){m.destroy=void 0,c=t;var w=n,E=y;try{E()}catch(B){De(c,w,B)}}}l=l.next}while(l!==u)}}catch(B){De(t,t.return,B)}}function l2(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{F1(t,n)}catch(l){De(e,e.return,l)}}}function s2(e,t,n){n.props=Wa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){De(e,t,l)}}function Ws(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(c){De(e,t,c)}}function kn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(c){De(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){De(e,t,c)}else n.current=null}function i2(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(c){De(e,e.return,c)}}function pu(e,t,n){try{var l=e.stateNode;q3(l,e.type,n,t),l[Dt]=t}catch(c){De(e,e.return,c)}}function r2(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&va(e.type)||e.tag===4}function yu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r2(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&va(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bu(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gr));else if(l!==4&&(l===27&&va(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(bu(e,t,n),e=e.sibling;e!==null;)bu(e,t,n),e=e.sibling}function Or(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&va(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Or(e,t,n),e=e.sibling;e!==null;)Or(e,t,n),e=e.sibling}function o2(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);mt(t,l,n),t[bt]=e,t[Dt]=n}catch(u){De(e,e.return,u)}}var Xn=!1,$e=!1,xu=!1,c2=typeof WeakSet=="function"?WeakSet:Set,ot=null;function v3(e,t){if(e=e.containerInfo,Gu=Pr,e=v1(e),yc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var c=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var m=0,y=-1,w=-1,E=0,B=0,V=e,O=null;t:for(;;){for(var N;V!==n||c!==0&&V.nodeType!==3||(y=m+c),V!==u||l!==0&&V.nodeType!==3||(w=m+l),V.nodeType===3&&(m+=V.nodeValue.length),(N=V.firstChild)!==null;)O=V,V=N;for(;;){if(V===e)break t;if(O===n&&++E===c&&(y=m),O===u&&++B===l&&(w=m),(N=V.nextSibling)!==null)break;V=O,O=V.parentNode}V=N}n=y===-1||w===-1?null:{start:y,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yu={focusedElem:e,selectionRange:n},Pr=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){switch(t=ot,u=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,c=u.memoizedProps,u=u.memoizedState,l=n.stateNode;try{var le=Wa(n.type,c,n.elementType===n.type);e=l.getSnapshotBeforeUpdate(le,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(ne){De(n,n.return,ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Xu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}}function u2(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:ha(e,n),l&4&&Js(5,n);break;case 1:if(ha(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(m){De(n,n.return,m)}else{var c=Wa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){De(n,n.return,m)}}l&64&&l2(n),l&512&&Ws(n,n.return);break;case 3:if(ha(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{F1(e,t)}catch(m){De(n,n.return,m)}}break;case 27:t===null&&l&4&&o2(n);case 26:case 5:ha(e,n),t===null&&l&4&&i2(n),l&512&&Ws(n,n.return);break;case 12:ha(e,n);break;case 13:ha(e,n),l&4&&h2(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=T3.bind(null,n),X3(e,n))));break;case 22:if(l=n.memoizedState!==null||Xn,!l){t=t!==null&&t.memoizedState!==null||$e,c=Xn;var u=$e;Xn=l,($e=t)&&!u?ma(e,n,(n.subtreeFlags&8772)!==0):ha(e,n),Xn=c,$e=u}break;case 30:break;default:ha(e,n)}}function d2(e){var t=e.alternate;t!==null&&(e.alternate=null,d2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Jo(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,Bt=!1;function In(e,t,n){for(n=n.child;n!==null;)f2(e,t,n),n=n.sibling}function f2(e,t,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(vs,n)}catch{}switch(n.tag){case 26:$e||kn(n,t),In(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$e||kn(n,t);var l=He,c=Bt;va(n.type)&&(He=n.stateNode,Bt=!1),In(e,t,n),oi(n.stateNode),He=l,Bt=c;break;case 5:$e||kn(n,t);case 6:if(l=He,c=Bt,He=null,In(e,t,n),He=l,Bt=c,He!==null)if(Bt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(n.stateNode)}catch(u){De(n,t,u)}else try{He.removeChild(n.stateNode)}catch(u){De(n,t,u)}break;case 18:He!==null&&(Bt?(e=He,em(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),pi(e)):em(He,n.stateNode));break;case 4:l=He,c=Bt,He=n.stateNode.containerInfo,Bt=!0,In(e,t,n),He=l,Bt=c;break;case 0:case 11:case 14:case 15:$e||fa(2,n,t),$e||fa(4,n,t),In(e,t,n);break;case 1:$e||(kn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&s2(n,t,l)),In(e,t,n);break;case 21:In(e,t,n);break;case 22:$e=(l=$e)||n.memoizedState!==null,In(e,t,n),$e=l;break;default:In(e,t,n)}}function h2(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{pi(e)}catch(n){De(t,t.return,n)}}function S3(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new c2),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new c2),t;default:throw Error(r(435,e.tag))}}function vu(e,t){var n=S3(e);t.forEach(function(l){var c=C3.bind(null,e,l);n.has(l)||(n.add(l),l.then(c,c))})}function Ft(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var c=n[l],u=e,m=t,y=m;e:for(;y!==null;){switch(y.tag){case 27:if(va(y.type)){He=y.stateNode,Bt=!1;break e}break;case 5:He=y.stateNode,Bt=!1;break e;case 3:case 4:He=y.stateNode.containerInfo,Bt=!0;break e}y=y.return}if(He===null)throw Error(r(160));f2(u,m,c),He=null,Bt=!1,u=c.alternate,u!==null&&(u.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)m2(t,e),t=t.sibling}var yn=null;function m2(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ft(t,e),Qt(e),l&4&&(fa(3,e,e.return),Js(3,e),fa(5,e,e.return));break;case 1:Ft(t,e),Qt(e),l&512&&($e||n===null||kn(n,n.return)),l&64&&Xn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var c=yn;if(Ft(t,e),Qt(e),l&512&&($e||n===null||kn(n,n.return)),l&4){var u=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":u=c.getElementsByTagName("title")[0],(!u||u[ws]||u[bt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=c.createElement(l),c.head.insertBefore(u,c.querySelector("head > title"))),mt(u,l,n),u[bt]=e,it(u),l=u;break e;case"link":var m=om("link","href",c).get(l+(n.href||""));if(m){for(var y=0;y<m.length;y++)if(u=m[y],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(y,1);break t}}u=c.createElement(l),mt(u,l,n),c.head.appendChild(u);break;case"meta":if(m=om("meta","content",c).get(l+(n.content||""))){for(y=0;y<m.length;y++)if(u=m[y],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(y,1);break t}}u=c.createElement(l),mt(u,l,n),c.head.appendChild(u);break;default:throw Error(r(468,l))}u[bt]=e,it(u),l=u}e.stateNode=l}else cm(c,e.type,e.stateNode);else e.stateNode=rm(c,l,e.memoizedProps);else u!==l?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,l===null?cm(c,e.type,e.stateNode):rm(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&pu(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ft(t,e),Qt(e),l&512&&($e||n===null||kn(n,n.return)),n!==null&&l&4&&pu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ft(t,e),Qt(e),l&512&&($e||n===null||kn(n,n.return)),e.flags&32){c=e.stateNode;try{jl(c,"")}catch(N){De(e,e.return,N)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,pu(e,c,n!==null?n.memoizedProps:c)),l&1024&&(xu=!0);break;case 6:if(Ft(t,e),Qt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(N){De(e,e.return,N)}}break;case 3:if(Xr=null,c=yn,yn=Fr(t.containerInfo),Ft(t,e),yn=c,Qt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{pi(t.containerInfo)}catch(N){De(e,e.return,N)}xu&&(xu=!1,g2(e));break;case 4:l=yn,yn=Fr(e.stateNode.containerInfo),Ft(t,e),Qt(e),yn=l;break;case 12:Ft(t,e),Qt(e);break;case 13:Ft(t,e),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(_u=jn()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,vu(e,l)));break;case 22:c=e.memoizedState!==null;var w=n!==null&&n.memoizedState!==null,E=Xn,B=$e;if(Xn=E||c,$e=B||w,Ft(t,e),$e=B,Xn=E,Qt(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(n===null||w||Xn||$e||el(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){w=n=t;try{if(u=w.stateNode,c)m=u.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{y=w.stateNode;var V=w.memoizedProps.style,O=V!=null&&V.hasOwnProperty("display")?V.display:null;y.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(N){De(w,w.return,N)}}}else if(t.tag===6){if(n===null){w=t;try{w.stateNode.nodeValue=c?"":w.memoizedProps}catch(N){De(w,w.return,N)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,vu(e,n))));break;case 19:Ft(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,vu(e,l)));break;case 30:break;case 21:break;default:Ft(t,e),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(r2(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var c=n.stateNode,u=yu(e);Or(e,u,c);break;case 5:var m=n.stateNode;n.flags&32&&(jl(m,""),n.flags&=-33);var y=yu(e);Or(e,y,m);break;case 3:case 4:var w=n.stateNode.containerInfo,E=yu(e);bu(e,E,w);break;default:throw Error(r(161))}}catch(B){De(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function g2(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;g2(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ha(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)u2(e,t.alternate,t),t=t.sibling}function el(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:fa(4,t,t.return),el(t);break;case 1:kn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&s2(t,t.return,n),el(t);break;case 27:oi(t.stateNode);case 26:case 5:kn(t,t.return),el(t);break;case 22:t.memoizedState===null&&el(t);break;case 30:el(t);break;default:el(t)}e=e.sibling}}function ma(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,u=t,m=u.flags;switch(u.tag){case 0:case 11:case 15:ma(c,u,n),Js(4,u);break;case 1:if(ma(c,u,n),l=u,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(E){De(l,l.return,E)}if(l=u,c=l.updateQueue,c!==null){var y=l.stateNode;try{var w=c.shared.hiddenCallbacks;if(w!==null)for(c.shared.hiddenCallbacks=null,c=0;c<w.length;c++)Y1(w[c],y)}catch(E){De(l,l.return,E)}}n&&m&64&&l2(u),Ws(u,u.return);break;case 27:o2(u);case 26:case 5:ma(c,u,n),n&&l===null&&m&4&&i2(u),Ws(u,u.return);break;case 12:ma(c,u,n);break;case 13:ma(c,u,n),n&&m&4&&h2(c,u);break;case 22:u.memoizedState===null&&ma(c,u,n),Ws(u,u.return);break;case 30:break;default:ma(c,u,n)}t=t.sibling}}function Su(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ks(n))}function ju(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e))}function _n(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)p2(e,t,n,l),t=t.sibling}function p2(e,t,n,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:_n(e,t,n,l),c&2048&&Js(9,t);break;case 1:_n(e,t,n,l);break;case 3:_n(e,t,n,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e)));break;case 12:if(c&2048){_n(e,t,n,l),e=t.stateNode;try{var u=t.memoizedProps,m=u.id,y=u.onPostCommit;typeof y=="function"&&y(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){De(t,t.return,w)}}else _n(e,t,n,l);break;case 13:_n(e,t,n,l);break;case 23:break;case 22:u=t.stateNode,m=t.alternate,t.memoizedState!==null?u._visibility&2?_n(e,t,n,l):ei(e,t):u._visibility&2?_n(e,t,n,l):(u._visibility|=2,Hl(e,t,n,l,(t.subtreeFlags&10256)!==0)),c&2048&&Su(m,t);break;case 24:_n(e,t,n,l),c&2048&&ju(t.alternate,t);break;default:_n(e,t,n,l)}}function Hl(e,t,n,l,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,m=t,y=n,w=l,E=m.flags;switch(m.tag){case 0:case 11:case 15:Hl(u,m,y,w,c),Js(8,m);break;case 23:break;case 22:var B=m.stateNode;m.memoizedState!==null?B._visibility&2?Hl(u,m,y,w,c):ei(u,m):(B._visibility|=2,Hl(u,m,y,w,c)),c&&E&2048&&Su(m.alternate,m);break;case 24:Hl(u,m,y,w,c),c&&E&2048&&ju(m.alternate,m);break;default:Hl(u,m,y,w,c)}t=t.sibling}}function ei(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,c=l.flags;switch(l.tag){case 22:ei(n,l),c&2048&&Su(l.alternate,l);break;case 24:ei(n,l),c&2048&&ju(l.alternate,l);break;default:ei(n,l)}t=t.sibling}}var ti=8192;function Vl(e){if(e.subtreeFlags&ti)for(e=e.child;e!==null;)y2(e),e=e.sibling}function y2(e){switch(e.tag){case 26:Vl(e),e.flags&ti&&e.memoizedState!==null&&i4(yn,e.memoizedState,e.memoizedProps);break;case 5:Vl(e);break;case 3:case 4:var t=yn;yn=Fr(e.stateNode.containerInfo),Vl(e),yn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=ti,ti=16777216,Vl(e),ti=t):Vl(e));break;default:Vl(e)}}function b2(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ni(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];ot=l,v2(l,e)}b2(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)x2(e),e=e.sibling}function x2(e){switch(e.tag){case 0:case 11:case 15:ni(e),e.flags&2048&&fa(9,e,e.return);break;case 3:ni(e);break;case 12:ni(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nr(e)):ni(e);break;default:ni(e)}}function Nr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];ot=l,v2(l,e)}b2(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:fa(8,t,t.return),Nr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nr(t));break;default:Nr(t)}e=e.sibling}}function v2(e,t){for(;ot!==null;){var n=ot;switch(n.tag){case 0:case 11:case 15:fa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ks(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,ot=l;else e:for(n=e;ot!==null;){l=ot;var c=l.sibling,u=l.return;if(d2(l),l===n){ot=null;break e}if(c!==null){c.return=u,ot=c;break e}ot=u}}}var j3={getCacheForType:function(e){var t=xt(nt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},w3=typeof WeakMap=="function"?WeakMap:Map,_e=0,Re=null,me=null,xe=0,Ae=0,Xt=null,ga=!1,Gl=!1,wu=!1,Zn=0,Ze=0,pa=0,tl=0,Mu=0,rn=0,Yl=0,ai=null,Kt=null,ku=!1,_u=0,Dr=1/0,Lr=null,ya=null,ht=0,ba=null,Fl=null,Ql=0,Au=0,zu=null,S2=null,li=0,Tu=null;function It(){if((_e&2)!==0&&xe!==0)return xe&-xe;if(q.T!==null){var e=Nl;return e!==0?e:Ru()}return Bf()}function j2(){rn===0&&(rn=(xe&536870912)===0||Me?Nf():536870912);var e=sn.current;return e!==null&&(e.flags|=32),rn}function Zt(e,t,n){(e===Re&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(Xl(e,0),xa(e,xe,rn,!1)),js(e,n),((_e&2)===0||e!==Re)&&(e===Re&&((_e&2)===0&&(tl|=n),Ze===4&&xa(e,xe,rn,!1)),An(e))}function w2(e,t,n){if((_e&6)!==0)throw Error(r(327));var l=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Ss(e,t),c=l?_3(e,t):Ou(e,t,!0),u=l;do{if(c===0){Gl&&!l&&xa(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!M3(n)){c=Ou(e,t,!1),u=!1;continue}if(c===2){if(u=t,e.errorRecoveryDisabledLanes&u)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var y=e;c=ai;var w=y.current.memoizedState.isDehydrated;if(w&&(Xl(y,m).flags|=256),m=Ou(y,m,!1),m!==2){if(wu&&!w){y.errorRecoveryDisabledLanes|=u,tl|=u,c=4;break e}u=Kt,Kt=c,u!==null&&(Kt===null?Kt=u:Kt.push.apply(Kt,u))}c=m}if(u=!1,c!==2)continue}}if(c===1){Xl(e,0),xa(e,t,0,!0);break}e:{switch(l=e,u=c,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:xa(l,t,rn,!ga);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(c=_u+300-jn(),10<c)){if(xa(l,t,rn,!ga),Qi(l,0,!0)!==0)break e;l.timeoutHandle=J2(M2.bind(null,l,n,Kt,Lr,ku,t,rn,tl,Yl,ga,u,2,-0,0),c);break e}M2(l,n,Kt,Lr,ku,t,rn,tl,Yl,ga,u,0,-0,0)}}break}while(!0);An(e)}function M2(e,t,n,l,c,u,m,y,w,E,B,V,O,N){if(e.timeoutHandle=-1,V=t.subtreeFlags,(V&8192||(V&16785408)===16785408)&&(di={stylesheets:null,count:0,unsuspend:s4},y2(t),V=r4(),V!==null)){e.cancelPendingCommit=V(E2.bind(null,e,t,u,n,l,c,m,y,w,B,1,O,N)),xa(e,u,m,!E);return}E2(e,t,u,n,l,c,m,y,w)}function M3(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var c=n[l],u=c.getSnapshot;c=c.value;try{if(!Gt(u(),c))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xa(e,t,n,l){t&=~Mu,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var u=31-Vt(c),m=1<<u;l[u]=-1,c&=~m}n!==0&&Lf(e,n,t)}function Rr(){return(_e&6)===0?(si(0),!1):!0}function Cu(){if(me!==null){if(Ae===0)var e=me.return;else e=me,Hn=Za=null,Xc(e),Ul=null,Zs=0,e=me;for(;e!==null;)a2(e.alternate,e),e=e.return;me=null}}function Xl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,V3(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Cu(),Re=e,me=n=Kn(e.current,null),xe=t,Ae=0,Xt=null,ga=!1,Gl=Ss(e,t),wu=!1,Yl=rn=Mu=tl=pa=Ze=0,Kt=ai=null,ku=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-Vt(l),u=1<<c;t|=e[c],l&=~u}return Zn=t,lr(),n}function k2(e,t){ue=null,q.H=wr,t===qs||t===hr?(t=V1(),Ae=3):t===U1?(t=V1(),Ae=4):Ae=t===Gh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Xt=t,me===null&&(Ze=1,zr(e,tn(t,e.current)))}function _2(){var e=q.H;return q.H=wr,e===null?wr:e}function A2(){var e=q.A;return q.A=j3,e}function Eu(){Ze=4,ga||(xe&4194048)!==xe&&sn.current!==null||(Gl=!0),(pa&134217727)===0&&(tl&134217727)===0||Re===null||xa(Re,xe,rn,!1)}function Ou(e,t,n){var l=_e;_e|=2;var c=_2(),u=A2();(Re!==e||xe!==t)&&(Lr=null,Xl(e,t)),t=!1;var m=Ze;e:do try{if(Ae!==0&&me!==null){var y=me,w=Xt;switch(Ae){case 8:Cu(),m=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(t=!0);var E=Ae;if(Ae=0,Xt=null,Il(e,y,w,E),n&&Gl){m=0;break e}break;default:E=Ae,Ae=0,Xt=null,Il(e,y,w,E)}}k3(),m=Ze;break}catch(B){k2(e,B)}while(!0);return t&&e.shellSuspendCounter++,Hn=Za=null,_e=l,q.H=c,q.A=u,me===null&&(Re=null,xe=0,lr()),m}function k3(){for(;me!==null;)z2(me)}function _3(e,t){var n=_e;_e|=2;var l=_2(),c=A2();Re!==e||xe!==t?(Lr=null,Dr=jn()+500,Xl(e,t)):Gl=Ss(e,t);e:do try{if(Ae!==0&&me!==null){t=me;var u=Xt;t:switch(Ae){case 1:Ae=0,Xt=null,Il(e,t,u,1);break;case 2:case 9:if(q1(u)){Ae=0,Xt=null,T2(t);break}t=function(){Ae!==2&&Ae!==9||Re!==e||(Ae=7),An(e)},u.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:q1(u)?(Ae=0,Xt=null,T2(t)):(Ae=0,Xt=null,Il(e,t,u,7));break;case 5:var m=null;switch(me.tag){case 26:m=me.memoizedState;case 5:case 27:var y=me;if(!m||um(m)){Ae=0,Xt=null;var w=y.sibling;if(w!==null)me=w;else{var E=y.return;E!==null?(me=E,Br(E)):me=null}break t}}Ae=0,Xt=null,Il(e,t,u,5);break;case 6:Ae=0,Xt=null,Il(e,t,u,6);break;case 8:Cu(),Ze=6;break e;default:throw Error(r(462))}}A3();break}catch(B){k2(e,B)}while(!0);return Hn=Za=null,q.H=l,q.A=c,_e=n,me!==null?0:(Re=null,xe=0,lr(),Ze)}function A3(){for(;me!==null&&!Zp();)z2(me)}function z2(e){var t=t2(e.alternate,e,Zn);e.memoizedProps=e.pendingProps,t===null?Br(e):me=t}function T2(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zh(n,t,t.pendingProps,t.type,void 0,xe);break;case 11:t=Zh(n,t,t.pendingProps,t.type.render,t.ref,xe);break;case 5:Xc(t);default:a2(n,t),t=me=C1(t,Zn),t=t2(n,t,Zn)}e.memoizedProps=e.pendingProps,t===null?Br(e):me=t}function Il(e,t,n,l){Hn=Za=null,Xc(t),Ul=null,Zs=0;var c=t.return;try{if(p3(e,c,t,n,xe)){Ze=1,zr(e,tn(n,e.current)),me=null;return}}catch(u){if(c!==null)throw me=c,u;Ze=1,zr(e,tn(n,e.current)),me=null;return}t.flags&32768?(Me||l===1?e=!0:Gl||(xe&536870912)!==0?e=!1:(ga=e=!0,(l===2||l===9||l===3||l===6)&&(l=sn.current,l!==null&&l.tag===13&&(l.flags|=16384))),C2(t,e)):Br(t)}function Br(e){var t=e;do{if((t.flags&32768)!==0){C2(t,ga);return}e=t.return;var n=b3(t.alternate,t,Zn);if(n!==null){me=n;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);Ze===0&&(Ze=5)}function C2(e,t){do{var n=x3(e.alternate,e);if(n!==null){n.flags&=32767,me=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=n}while(e!==null);Ze=6,me=null}function E2(e,t,n,l,c,u,m,y,w){e.cancelPendingCommit=null;do Kr();while(ht!==0);if((_e&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=jc,sy(e,n,u,m,y,w),e===Re&&(me=Re=null,xe=0),Fl=t,ba=e,Ql=n,Au=u,zu=c,S2=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,E3(Gi,function(){return R2(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=q.T,q.T=null,c=I.p,I.p=2,m=_e,_e|=4;try{v3(e,t,n)}finally{_e=m,I.p=c,q.T=l}}ht=1,O2(),N2(),D2()}}function O2(){if(ht===1){ht=0;var e=ba,t=Fl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=q.T,q.T=null;var l=I.p;I.p=2;var c=_e;_e|=4;try{m2(t,e);var u=Yu,m=v1(e.containerInfo),y=u.focusedElem,w=u.selectionRange;if(m!==y&&y&&y.ownerDocument&&x1(y.ownerDocument.documentElement,y)){if(w!==null&&yc(y)){var E=w.start,B=w.end;if(B===void 0&&(B=E),"selectionStart"in y)y.selectionStart=E,y.selectionEnd=Math.min(B,y.value.length);else{var V=y.ownerDocument||document,O=V&&V.defaultView||window;if(O.getSelection){var N=O.getSelection(),le=y.textContent.length,ne=Math.min(w.start,le),Ne=w.end===void 0?ne:Math.min(w.end,le);!N.extend&&ne>Ne&&(m=Ne,Ne=ne,ne=m);var z=b1(y,ne),k=b1(y,Ne);if(z&&k&&(N.rangeCount!==1||N.anchorNode!==z.node||N.anchorOffset!==z.offset||N.focusNode!==k.node||N.focusOffset!==k.offset)){var C=V.createRange();C.setStart(z.node,z.offset),N.removeAllRanges(),ne>Ne?(N.addRange(C),N.extend(k.node,k.offset)):(C.setEnd(k.node,k.offset),N.addRange(C))}}}}for(V=[],N=y;N=N.parentNode;)N.nodeType===1&&V.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<V.length;y++){var K=V[y];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Pr=!!Gu,Yu=Gu=null}finally{_e=c,I.p=l,q.T=n}}e.current=t,ht=2}}function N2(){if(ht===2){ht=0;var e=ba,t=Fl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=q.T,q.T=null;var l=I.p;I.p=2;var c=_e;_e|=4;try{u2(e,t.alternate,t)}finally{_e=c,I.p=l,q.T=n}}ht=3}}function D2(){if(ht===4||ht===3){ht=0,Pp();var e=ba,t=Fl,n=Ql,l=S2;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,Fl=ba=null,L2(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(ya=null),Po(n),t=t.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(vs,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=q.T,c=I.p,I.p=2,q.T=null;try{for(var u=e.onRecoverableError,m=0;m<l.length;m++){var y=l[m];u(y.value,{componentStack:y.stack})}}finally{q.T=t,I.p=c}}(Ql&3)!==0&&Kr(),An(e),c=e.pendingLanes,(n&4194090)!==0&&(c&42)!==0?e===Tu?li++:(li=0,Tu=e):li=0,si(0)}}function L2(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ks(t)))}function Kr(e){return O2(),N2(),D2(),R2()}function R2(){if(ht!==5)return!1;var e=ba,t=Au;Au=0;var n=Po(Ql),l=q.T,c=I.p;try{I.p=32>n?32:n,q.T=null,n=zu,zu=null;var u=ba,m=Ql;if(ht=0,Fl=ba=null,Ql=0,(_e&6)!==0)throw Error(r(331));var y=_e;if(_e|=4,x2(u.current),p2(u,u.current,m,n),_e=y,si(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(vs,u)}catch{}return!0}finally{I.p=c,q.T=l,L2(e,t)}}function B2(e,t,n){t=tn(n,t),t=ru(e.stateNode,t,2),e=oa(e,t,2),e!==null&&(js(e,2),An(e))}function De(e,t,n){if(e.tag===3)B2(e,e,n);else for(;t!==null;){if(t.tag===3){B2(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ya===null||!ya.has(l))){e=tn(n,e),n=Hh(2),l=oa(t,n,2),l!==null&&(Vh(n,l,t,e),js(l,2),An(l));break}}t=t.return}}function Nu(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new w3;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(n)||(wu=!0,c.add(n),e=z3.bind(null,e,t,n),t.then(e,e))}function z3(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Re===e&&(xe&n)===n&&(Ze===4||Ze===3&&(xe&62914560)===xe&&300>jn()-_u?(_e&2)===0&&Xl(e,0):Mu|=n,Yl===xe&&(Yl=0)),An(e)}function K2(e,t){t===0&&(t=Df()),e=Tl(e,t),e!==null&&(js(e,t),An(e))}function T3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),K2(e,n)}function C3(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),K2(e,n)}function E3(e,t){return Qo(e,t)}var Ur=null,Zl=null,Du=!1,qr=!1,Lu=!1,nl=0;function An(e){e!==Zl&&e.next===null&&(Zl===null?Ur=Zl=e:Zl=Zl.next=e),qr=!0,Du||(Du=!0,N3())}function si(e,t){if(!Lu&&qr){Lu=!0;do for(var n=!1,l=Ur;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var u=0;else{var m=l.suspendedLanes,y=l.pingedLanes;u=(1<<31-Vt(42|e)+1)-1,u&=c&~(m&~y),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,V2(l,u))}else u=xe,u=Qi(l,l===Re?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Ss(l,u)||(n=!0,V2(l,u));l=l.next}while(n);Lu=!1}}function O3(){U2()}function U2(){qr=Du=!1;var e=0;nl!==0&&(H3()&&(e=nl),nl=0);for(var t=jn(),n=null,l=Ur;l!==null;){var c=l.next,u=q2(l,t);u===0?(l.next=null,n===null?Ur=c:n.next=c,c===null&&(Zl=n)):(n=l,(e!==0||(u&3)!==0)&&(qr=!0)),l=c}si(e)}function q2(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var m=31-Vt(u),y=1<<m,w=c[m];w===-1?((y&n)===0||(y&l)!==0)&&(c[m]=ly(y,t)):w<=t&&(e.expiredLanes|=y),u&=~y}if(t=Re,n=xe,n=Qi(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Xo(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ss(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Xo(l),Po(n)){case 2:case 8:n=Ef;break;case 32:n=Gi;break;case 268435456:n=Of;break;default:n=Gi}return l=H2.bind(null,e),n=Qo(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Xo(l),e.callbackPriority=2,e.callbackNode=null,2}function H2(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Kr()&&e.callbackNode!==n)return null;var l=xe;return l=Qi(e,e===Re?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(w2(e,l,t),q2(e,jn()),e.callbackNode!=null&&e.callbackNode===n?H2.bind(null,e):null)}function V2(e,t){if(Kr())return null;w2(e,t,!0)}function N3(){G3(function(){(_e&6)!==0?Qo(Cf,O3):U2()})}function Ru(){return nl===0&&(nl=Nf()),nl}function G2(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$i(""+e)}function Y2(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function D3(e,t,n,l,c){if(t==="submit"&&n&&n.stateNode===c){var u=G2((c[Dt]||null).action),m=l.submitter;m&&(t=(t=m[Dt]||null)?G2(t.formAction):m.getAttribute("formAction"),t!==null&&(u=t,m=null));var y=new tr("action","action",null,l,c);e.push({event:y,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(nl!==0){var w=m?Y2(c,m):new FormData(c);nu(n,{pending:!0,data:w,method:c.method,action:u},null,w)}}else typeof u=="function"&&(y.preventDefault(),w=m?Y2(c,m):new FormData(c),nu(n,{pending:!0,data:w,method:c.method,action:u},u,w))},currentTarget:c}]})}}for(var Bu=0;Bu<Sc.length;Bu++){var Ku=Sc[Bu],L3=Ku.toLowerCase(),R3=Ku[0].toUpperCase()+Ku.slice(1);pn(L3,"on"+R3)}pn(w1,"onAnimationEnd"),pn(M1,"onAnimationIteration"),pn(k1,"onAnimationStart"),pn("dblclick","onDoubleClick"),pn("focusin","onFocus"),pn("focusout","onBlur"),pn(Wy,"onTransitionRun"),pn(e3,"onTransitionStart"),pn(t3,"onTransitionCancel"),pn(_1,"onTransitionEnd"),xl("onMouseEnter",["mouseout","mouseover"]),xl("onMouseLeave",["mouseout","mouseover"]),xl("onPointerEnter",["pointerout","pointerover"]),xl("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ii="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),B3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ii));function F2(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],c=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var m=l.length-1;0<=m;m--){var y=l[m],w=y.instance,E=y.currentTarget;if(y=y.listener,w!==u&&c.isPropagationStopped())break e;u=y,c.currentTarget=E;try{u(c)}catch(B){Ar(B)}c.currentTarget=null,u=w}else for(m=0;m<l.length;m++){if(y=l[m],w=y.instance,E=y.currentTarget,y=y.listener,w!==u&&c.isPropagationStopped())break e;u=y,c.currentTarget=E;try{u(c)}catch(B){Ar(B)}c.currentTarget=null,u=w}}}}function ge(e,t){var n=t[$o];n===void 0&&(n=t[$o]=new Set);var l=e+"__bubble";n.has(l)||(Q2(t,e,2,!1),n.add(l))}function Uu(e,t,n){var l=0;t&&(l|=4),Q2(n,e,l,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function qu(e){if(!e[Hr]){e[Hr]=!0,Uf.forEach(function(n){n!=="selectionchange"&&(B3.has(n)||Uu(n,!1,e),Uu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hr]||(t[Hr]=!0,Uu("selectionchange",!1,t))}}function Q2(e,t,n,l){switch(pm(t)){case 2:var c=u4;break;case 8:c=d4;break;default:c=ed}n=c.bind(null,t,n,e),c=void 0,!oc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function Hu(e,t,n,l,c){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var y=l.stateNode.containerInfo;if(y===c)break;if(m===4)for(m=l.return;m!==null;){var w=m.tag;if((w===3||w===4)&&m.stateNode.containerInfo===c)return;m=m.return}for(;y!==null;){if(m=pl(y),m===null)return;if(w=m.tag,w===5||w===6||w===26||w===27){l=u=m;continue e}y=y.parentNode}}l=l.return}Wf(function(){var E=u,B=ic(n),V=[];e:{var O=A1.get(e);if(O!==void 0){var N=tr,le=e;switch(e){case"keypress":if(Wi(n)===0)break e;case"keydown":case"keyup":N=Ey;break;case"focusin":le="focus",N=fc;break;case"focusout":le="blur",N=fc;break;case"beforeblur":case"afterblur":N=fc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":N=n1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":N=xy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":N=Dy;break;case w1:case M1:case k1:N=jy;break;case _1:N=Ry;break;case"scroll":case"scrollend":N=yy;break;case"wheel":N=Ky;break;case"copy":case"cut":case"paste":N=My;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":N=l1;break;case"toggle":case"beforetoggle":N=qy}var ne=(t&4)!==0,Ne=!ne&&(e==="scroll"||e==="scrollend"),z=ne?O!==null?O+"Capture":null:O;ne=[];for(var k=E,C;k!==null;){var K=k;if(C=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||C===null||z===null||(K=ks(k,z),K!=null&&ne.push(ri(k,K,C))),Ne)break;k=k.return}0<ne.length&&(O=new N(O,le,null,n,B),V.push({event:O,listeners:ne}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",N=e==="mouseout"||e==="pointerout",O&&n!==sc&&(le=n.relatedTarget||n.fromElement)&&(pl(le)||le[gl]))break e;if((N||O)&&(O=B.window===B?B:(O=B.ownerDocument)?O.defaultView||O.parentWindow:window,N?(le=n.relatedTarget||n.toElement,N=E,le=le?pl(le):null,le!==null&&(Ne=f(le),ne=le.tag,le!==Ne||ne!==5&&ne!==27&&ne!==6)&&(le=null)):(N=null,le=E),N!==le)){if(ne=n1,K="onMouseLeave",z="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(ne=l1,K="onPointerLeave",z="onPointerEnter",k="pointer"),Ne=N==null?O:Ms(N),C=le==null?O:Ms(le),O=new ne(K,k+"leave",N,n,B),O.target=Ne,O.relatedTarget=C,K=null,pl(B)===E&&(ne=new ne(z,k+"enter",le,n,B),ne.target=C,ne.relatedTarget=Ne,K=ne),Ne=K,N&&le)t:{for(ne=N,z=le,k=0,C=ne;C;C=Pl(C))k++;for(C=0,K=z;K;K=Pl(K))C++;for(;0<k-C;)ne=Pl(ne),k--;for(;0<C-k;)z=Pl(z),C--;for(;k--;){if(ne===z||z!==null&&ne===z.alternate)break t;ne=Pl(ne),z=Pl(z)}ne=null}else ne=null;N!==null&&X2(V,O,N,ne,!1),le!==null&&Ne!==null&&X2(V,Ne,le,ne,!0)}}e:{if(O=E?Ms(E):window,N=O.nodeName&&O.nodeName.toLowerCase(),N==="select"||N==="input"&&O.type==="file")var P=f1;else if(u1(O))if(h1)P=Py;else{P=Iy;var fe=Xy}else N=O.nodeName,!N||N.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?E&&lc(E.elementType)&&(P=f1):P=Zy;if(P&&(P=P(e,E))){d1(V,P,n,B);break e}fe&&fe(e,O,E),e==="focusout"&&E&&O.type==="number"&&E.memoizedProps.value!=null&&ac(O,"number",O.value)}switch(fe=E?Ms(E):window,e){case"focusin":(u1(fe)||fe.contentEditable==="true")&&(_l=fe,bc=E,Ns=null);break;case"focusout":Ns=bc=_l=null;break;case"mousedown":xc=!0;break;case"contextmenu":case"mouseup":case"dragend":xc=!1,S1(V,n,B);break;case"selectionchange":if(Jy)break;case"keydown":case"keyup":S1(V,n,B)}var W;if(mc)e:{switch(e){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else kl?o1(e,n)&&(ae="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ae="onCompositionStart");ae&&(s1&&n.locale!=="ko"&&(kl||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&kl&&(W=e1()):(la=B,cc="value"in la?la.value:la.textContent,kl=!0)),fe=Vr(E,ae),0<fe.length&&(ae=new a1(ae,e,null,n,B),V.push({event:ae,listeners:fe}),W?ae.data=W:(W=c1(n),W!==null&&(ae.data=W)))),(W=Vy?Gy(e,n):Yy(e,n))&&(ae=Vr(E,"onBeforeInput"),0<ae.length&&(fe=new a1("onBeforeInput","beforeinput",null,n,B),V.push({event:fe,listeners:ae}),fe.data=W)),D3(V,e,E,n,B)}F2(V,t)})}function ri(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",l=[];e!==null;){var c=e,u=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||u===null||(c=ks(e,n),c!=null&&l.unshift(ri(e,c,u)),c=ks(e,t),c!=null&&l.push(ri(e,c,u))),e.tag===3)return l;e=e.return}return[]}function Pl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function X2(e,t,n,l,c){for(var u=t._reactName,m=[];n!==null&&n!==l;){var y=n,w=y.alternate,E=y.stateNode;if(y=y.tag,w!==null&&w===l)break;y!==5&&y!==26&&y!==27||E===null||(w=E,c?(E=ks(n,u),E!=null&&m.unshift(ri(n,E,w))):c||(E=ks(n,u),E!=null&&m.push(ri(n,E,w)))),n=n.return}m.length!==0&&e.push({event:t,listeners:m})}var K3=/\r\n?/g,U3=/\u0000|\uFFFD/g;function I2(e){return(typeof e=="string"?e:""+e).replace(K3,`
`).replace(U3,"")}function Z2(e,t){return t=I2(t),I2(e)===t}function Gr(){}function Oe(e,t,n,l,c,u){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||jl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&jl(e,""+l);break;case"className":Ii(e,"class",l);break;case"tabIndex":Ii(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ii(e,n,l);break;case"style":$f(e,l,u);break;case"data":if(t!=="object"){Ii(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=$i(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(t!=="input"&&Oe(e,t,"name",c.name,c,null),Oe(e,t,"formEncType",c.formEncType,c,null),Oe(e,t,"formMethod",c.formMethod,c,null),Oe(e,t,"formTarget",c.formTarget,c,null)):(Oe(e,t,"encType",c.encType,c,null),Oe(e,t,"method",c.method,c,null),Oe(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=$i(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Gr);break;case"onScroll":l!=null&&ge("scroll",e);break;case"onScrollEnd":l!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=$i(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":ge("beforetoggle",e),ge("toggle",e),Xi(e,"popover",l);break;case"xlinkActuate":Rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Rn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Rn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Rn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Rn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Xi(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=gy.get(n)||n,Xi(e,n,l))}}function Vu(e,t,n,l,c,u){switch(n){case"style":$f(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?jl(e,l):(typeof l=="number"||typeof l=="bigint")&&jl(e,""+l);break;case"onScroll":l!=null&&ge("scroll",e);break;case"onScrollEnd":l!=null&&ge("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Gr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qf.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(c=n.endsWith("Capture"),t=n.slice(2,c?n.length-7:void 0),u=e[Dt]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,c),typeof l=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,c);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Xi(e,n,l)}}}function mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",e),ge("load",e);var l=!1,c=!1,u;for(u in n)if(n.hasOwnProperty(u)){var m=n[u];if(m!=null)switch(u){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Oe(e,t,u,m,n,null)}}c&&Oe(e,t,"srcSet",n.srcSet,n,null),l&&Oe(e,t,"src",n.src,n,null);return;case"input":ge("invalid",e);var y=u=m=c=null,w=null,E=null;for(l in n)if(n.hasOwnProperty(l)){var B=n[l];if(B!=null)switch(l){case"name":c=B;break;case"type":m=B;break;case"checked":w=B;break;case"defaultChecked":E=B;break;case"value":u=B;break;case"defaultValue":y=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:Oe(e,t,l,B,n,null)}}Xf(e,u,y,w,E,m,c,!1),Zi(e);return;case"select":ge("invalid",e),l=m=u=null;for(c in n)if(n.hasOwnProperty(c)&&(y=n[c],y!=null))switch(c){case"value":u=y;break;case"defaultValue":m=y;break;case"multiple":l=y;default:Oe(e,t,c,y,n,null)}t=u,n=m,e.multiple=!!l,t!=null?Sl(e,!!l,t,!1):n!=null&&Sl(e,!!l,n,!0);return;case"textarea":ge("invalid",e),u=c=l=null;for(m in n)if(n.hasOwnProperty(m)&&(y=n[m],y!=null))switch(m){case"value":l=y;break;case"defaultValue":c=y;break;case"children":u=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:Oe(e,t,m,y,n,null)}Zf(e,l,c,u),Zi(e);return;case"option":for(w in n)if(n.hasOwnProperty(w)&&(l=n[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Oe(e,t,w,l,n,null)}return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(l=0;l<ii.length;l++)ge(ii[l],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(E in n)if(n.hasOwnProperty(E)&&(l=n[E],l!=null))switch(E){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Oe(e,t,E,l,n,null)}return;default:if(lc(t)){for(B in n)n.hasOwnProperty(B)&&(l=n[B],l!==void 0&&Vu(e,t,B,l,n,void 0));return}}for(y in n)n.hasOwnProperty(y)&&(l=n[y],l!=null&&Oe(e,t,y,l,n,null))}function q3(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,u=null,m=null,y=null,w=null,E=null,B=null;for(N in n){var V=n[N];if(n.hasOwnProperty(N)&&V!=null)switch(N){case"checked":break;case"value":break;case"defaultValue":w=V;default:l.hasOwnProperty(N)||Oe(e,t,N,null,l,V)}}for(var O in l){var N=l[O];if(V=n[O],l.hasOwnProperty(O)&&(N!=null||V!=null))switch(O){case"type":u=N;break;case"name":c=N;break;case"checked":E=N;break;case"defaultChecked":B=N;break;case"value":m=N;break;case"defaultValue":y=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(137,t));break;default:N!==V&&Oe(e,t,O,N,l,V)}}nc(e,m,y,w,E,B,u,c);return;case"select":N=m=y=O=null;for(u in n)if(w=n[u],n.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":N=w;default:l.hasOwnProperty(u)||Oe(e,t,u,null,l,w)}for(c in l)if(u=l[c],w=n[c],l.hasOwnProperty(c)&&(u!=null||w!=null))switch(c){case"value":O=u;break;case"defaultValue":y=u;break;case"multiple":m=u;default:u!==w&&Oe(e,t,c,u,l,w)}t=y,n=m,l=N,O!=null?Sl(e,!!n,O,!1):!!l!=!!n&&(t!=null?Sl(e,!!n,t,!0):Sl(e,!!n,n?[]:"",!1));return;case"textarea":N=O=null;for(y in n)if(c=n[y],n.hasOwnProperty(y)&&c!=null&&!l.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Oe(e,t,y,null,l,c)}for(m in l)if(c=l[m],u=n[m],l.hasOwnProperty(m)&&(c!=null||u!=null))switch(m){case"value":O=c;break;case"defaultValue":N=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==u&&Oe(e,t,m,c,l,u)}If(e,O,N);return;case"option":for(var le in n)if(O=n[le],n.hasOwnProperty(le)&&O!=null&&!l.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:Oe(e,t,le,null,l,O)}for(w in l)if(O=l[w],N=n[w],l.hasOwnProperty(w)&&O!==N&&(O!=null||N!=null))switch(w){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Oe(e,t,w,O,l,N)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ne in n)O=n[ne],n.hasOwnProperty(ne)&&O!=null&&!l.hasOwnProperty(ne)&&Oe(e,t,ne,null,l,O);for(E in l)if(O=l[E],N=n[E],l.hasOwnProperty(E)&&O!==N&&(O!=null||N!=null))switch(E){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:Oe(e,t,E,O,l,N)}return;default:if(lc(t)){for(var Ne in n)O=n[Ne],n.hasOwnProperty(Ne)&&O!==void 0&&!l.hasOwnProperty(Ne)&&Vu(e,t,Ne,void 0,l,O);for(B in l)O=l[B],N=n[B],!l.hasOwnProperty(B)||O===N||O===void 0&&N===void 0||Vu(e,t,B,O,l,N);return}}for(var z in n)O=n[z],n.hasOwnProperty(z)&&O!=null&&!l.hasOwnProperty(z)&&Oe(e,t,z,null,l,O);for(V in l)O=l[V],N=n[V],!l.hasOwnProperty(V)||O===N||O==null&&N==null||Oe(e,t,V,O,l,N)}var Gu=null,Yu=null;function Yr(e){return e.nodeType===9?e:e.ownerDocument}function P2(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $2(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Fu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qu=null;function H3(){var e=window.event;return e&&e.type==="popstate"?e===Qu?!1:(Qu=e,!0):(Qu=null,!1)}var J2=typeof setTimeout=="function"?setTimeout:void 0,V3=typeof clearTimeout=="function"?clearTimeout:void 0,W2=typeof Promise=="function"?Promise:void 0,G3=typeof queueMicrotask=="function"?queueMicrotask:typeof W2<"u"?function(e){return W2.resolve(null).then(e).catch(Y3)}:J2;function Y3(e){setTimeout(function(){throw e})}function va(e){return e==="head"}function em(e,t){var n=t,l=0,c=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"){if(0<l&&8>l){n=l;var m=e.ownerDocument;if(n&1&&oi(m.documentElement),n&2&&oi(m.body),n&4)for(n=m.head,oi(n),m=n.firstChild;m;){var y=m.nextSibling,w=m.nodeName;m[ws]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&m.rel.toLowerCase()==="stylesheet"||n.removeChild(m),m=y}}if(c===0){e.removeChild(u),pi(t);return}c--}else n==="$"||n==="$?"||n==="$!"?c++:l=n.charCodeAt(0)-48;else l=0;n=u}while(n);pi(t)}function Xu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Xu(n),Jo(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function F3(e,t,n,l){for(;e.nodeType===1;){var c=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ws])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=bn(e.nextSibling),e===null)break}return null}function Q3(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=bn(e.nextSibling),e===null))return null;return e}function Iu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function X3(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function bn(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Zu=null;function tm(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}function nm(e,t,n){switch(t=Yr(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function oi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Jo(e)}var on=new Map,am=new Set;function Fr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pn=I.d;I.d={f:I3,r:Z3,D:P3,C:$3,L:J3,m:W3,X:t4,S:e4,M:n4};function I3(){var e=Pn.f(),t=Rr();return e||t}function Z3(e){var t=yl(e);t!==null&&t.tag===5&&t.type==="form"?wh(t):Pn.r(e)}var $l=typeof document>"u"?null:document;function lm(e,t,n){var l=$l;if(l&&typeof t=="string"&&t){var c=en(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),am.has(c)||(am.add(c),e={rel:e,crossOrigin:n,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),mt(t,"link",e),it(t),l.head.appendChild(t)))}}function P3(e){Pn.D(e),lm("dns-prefetch",e,null)}function $3(e,t){Pn.C(e,t),lm("preconnect",e,t)}function J3(e,t,n){Pn.L(e,t,n);var l=$l;if(l&&e&&t){var c='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+en(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+en(n.imageSizes)+'"]')):c+='[href="'+en(e)+'"]';var u=c;switch(t){case"style":u=Jl(e);break;case"script":u=Wl(e)}on.has(u)||(e=x({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),on.set(u,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(ci(u))||t==="script"&&l.querySelector(ui(u))||(t=l.createElement("link"),mt(t,"link",e),it(t),l.head.appendChild(t)))}}function W3(e,t){Pn.m(e,t);var n=$l;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+en(l)+'"][href="'+en(e)+'"]',u=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Wl(e)}if(!on.has(u)&&(e=x({rel:"modulepreload",href:e},t),on.set(u,e),n.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ui(u)))return}l=n.createElement("link"),mt(l,"link",e),it(l),n.head.appendChild(l)}}}function e4(e,t,n){Pn.S(e,t,n);var l=$l;if(l&&e){var c=bl(l).hoistableStyles,u=Jl(e);t=t||"default";var m=c.get(u);if(!m){var y={loading:0,preload:null};if(m=l.querySelector(ci(u)))y.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},n),(n=on.get(u))&&Pu(e,n);var w=m=l.createElement("link");it(w),mt(w,"link",e),w._p=new Promise(function(E,B){w.onload=E,w.onerror=B}),w.addEventListener("load",function(){y.loading|=1}),w.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Qr(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:y},c.set(u,m)}}}function t4(e,t){Pn.X(e,t);var n=$l;if(n&&e){var l=bl(n).hoistableScripts,c=Wl(e),u=l.get(c);u||(u=n.querySelector(ui(c)),u||(e=x({src:e,async:!0},t),(t=on.get(c))&&$u(e,t),u=n.createElement("script"),it(u),mt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(c,u))}}function n4(e,t){Pn.M(e,t);var n=$l;if(n&&e){var l=bl(n).hoistableScripts,c=Wl(e),u=l.get(c);u||(u=n.querySelector(ui(c)),u||(e=x({src:e,async:!0,type:"module"},t),(t=on.get(c))&&$u(e,t),u=n.createElement("script"),it(u),mt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(c,u))}}function sm(e,t,n,l){var c=(c=ta.current)?Fr(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Jl(n.href),n=bl(c).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Jl(n.href);var u=bl(c).hoistableStyles,m=u.get(e);if(m||(c=c.ownerDocument||c,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,m),(u=c.querySelector(ci(e)))&&!u._p&&(m.instance=u,m.state.loading=5),on.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},on.set(e,n),u||a4(c,e,n,m.state))),t&&l===null)throw Error(r(528,""));return m}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wl(n),n=bl(c).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Jl(e){return'href="'+en(e)+'"'}function ci(e){return'link[rel="stylesheet"]['+e+"]"}function im(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function a4(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),mt(t,"link",n),it(t),e.head.appendChild(t))}function Wl(e){return'[src="'+en(e)+'"]'}function ui(e){return"script[async]"+e}function rm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+en(n.href)+'"]');if(l)return t.instance=l,it(l),l;var c=x({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),it(l),mt(l,"style",c),Qr(l,n.precedence,e),t.instance=l;case"stylesheet":c=Jl(n.href);var u=e.querySelector(ci(c));if(u)return t.state.loading|=4,t.instance=u,it(u),u;l=im(n),(c=on.get(c))&&Pu(l,c),u=(e.ownerDocument||e).createElement("link"),it(u);var m=u;return m._p=new Promise(function(y,w){m.onload=y,m.onerror=w}),mt(u,"link",l),t.state.loading|=4,Qr(u,n.precedence,e),t.instance=u;case"script":return u=Wl(n.src),(c=e.querySelector(ui(u)))?(t.instance=c,it(c),c):(l=n,(c=on.get(u))&&(l=x({},n),$u(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),it(c),mt(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Qr(l,n.precedence,e));return t.instance}function Qr(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,u=c,m=0;m<l.length;m++){var y=l[m];if(y.dataset.precedence===t)u=y;else if(u!==c)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Pu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $u(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Xr=null;function om(e,t,n){if(Xr===null){var l=new Map,c=Xr=new Map;c.set(n,l)}else c=Xr,l=c.get(n),l||(l=new Map,c.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),c=0;c<n.length;c++){var u=n[c];if(!(u[ws]||u[bt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var m=u.getAttribute(t)||"";m=e+m;var y=l.get(m);y?y.push(u):l.set(m,[u])}}return l}function cm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function l4(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function um(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var di=null;function s4(){}function i4(e,t,n){if(di===null)throw Error(r(475));var l=di;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Jl(n.href),u=e.querySelector(ci(c));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=Ir.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=u,it(u);return}u=e.ownerDocument||e,n=im(n),(c=on.get(c))&&Pu(n,c),u=u.createElement("link"),it(u);var m=u;m._p=new Promise(function(y,w){m.onload=y,m.onerror=w}),mt(u,"link",n),t.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=Ir.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function r4(){if(di===null)throw Error(r(475));var e=di;return e.stylesheets&&e.count===0&&Ju(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&Ju(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function Ir(){if(this.count--,this.count===0){if(this.stylesheets)Ju(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zr=null;function Ju(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zr=new Map,t.forEach(o4,e),Zr=null,Ir.call(e))}function o4(e,t){if(!(t.state.loading&4)){var n=Zr.get(e);if(n)var l=n.get(null);else{n=new Map,Zr.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<c.length;u++){var m=c[u];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),l=m)}l&&n.set(null,l)}c=t.instance,m=c.getAttribute("data-precedence"),u=n.get(m)||l,u===l&&n.set(null,c),n.set(m,c),this.count++,l=Ir.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),u?u.parentNode.insertBefore(c,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var fi={$$typeof:H,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function c4(e,t,n,l,c,u,m,y){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Io(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Io(0),this.hiddenUpdates=Io(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=u,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function dm(e,t,n,l,c,u,m,y,w,E,B,V){return e=new c4(e,t,n,m,y,w,E,V),t=1,u===!0&&(t|=24),u=Yt(3,null,null,t),e.current=u,u.stateNode=e,t=Nc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:n,cache:t},Bc(u),e}function fm(e){return e?(e=Cl,e):Cl}function hm(e,t,n,l,c,u){c=fm(c),l.context===null?l.context=c:l.pendingContext=c,l=ra(t),l.payload={element:n},u=u===void 0?null:u,u!==null&&(l.callback=u),n=oa(e,l,t),n!==null&&(Zt(n,e,t),Vs(n,e,t))}function mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Wu(e,t){mm(e,t),(e=e.alternate)&&mm(e,t)}function gm(e){if(e.tag===13){var t=Tl(e,67108864);t!==null&&Zt(t,e,67108864),Wu(e,67108864)}}var Pr=!0;function u4(e,t,n,l){var c=q.T;q.T=null;var u=I.p;try{I.p=2,ed(e,t,n,l)}finally{I.p=u,q.T=c}}function d4(e,t,n,l){var c=q.T;q.T=null;var u=I.p;try{I.p=8,ed(e,t,n,l)}finally{I.p=u,q.T=c}}function ed(e,t,n,l){if(Pr){var c=td(l);if(c===null)Hu(e,t,l,$r,n),ym(e,l);else if(h4(c,e,t,n,l))l.stopPropagation();else if(ym(e,l),t&4&&-1<f4.indexOf(e)){for(;c!==null;){var u=yl(c);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var m=Ua(u.pendingLanes);if(m!==0){var y=u;for(y.pendingLanes|=2,y.entangledLanes|=2;m;){var w=1<<31-Vt(m);y.entanglements[1]|=w,m&=~w}An(u),(_e&6)===0&&(Dr=jn()+500,si(0))}}break;case 13:y=Tl(u,2),y!==null&&Zt(y,u,2),Rr(),Wu(u,2)}if(u=td(l),u===null&&Hu(e,t,l,$r,n),u===c)break;c=u}c!==null&&l.stopPropagation()}else Hu(e,t,l,null,n)}}function td(e){return e=ic(e),nd(e)}var $r=null;function nd(e){if($r=null,e=pl(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return $r=e,null}function pm(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($p()){case Cf:return 2;case Ef:return 8;case Gi:case Jp:return 32;case Of:return 268435456;default:return 32}default:return 32}}var ad=!1,Sa=null,ja=null,wa=null,hi=new Map,mi=new Map,Ma=[],f4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ym(e,t){switch(e){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":ja=null;break;case"mouseover":case"mouseout":wa=null;break;case"pointerover":case"pointerout":hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":mi.delete(t.pointerId)}}function gi(e,t,n,l,c,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:u,targetContainers:[c]},t!==null&&(t=yl(t),t!==null&&gm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function h4(e,t,n,l,c){switch(t){case"focusin":return Sa=gi(Sa,e,t,n,l,c),!0;case"dragenter":return ja=gi(ja,e,t,n,l,c),!0;case"mouseover":return wa=gi(wa,e,t,n,l,c),!0;case"pointerover":var u=c.pointerId;return hi.set(u,gi(hi.get(u)||null,e,t,n,l,c)),!0;case"gotpointercapture":return u=c.pointerId,mi.set(u,gi(mi.get(u)||null,e,t,n,l,c)),!0}return!1}function bm(e){var t=pl(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,iy(e.priority,function(){if(n.tag===13){var l=It();l=Zo(l);var c=Tl(n,l);c!==null&&Zt(c,n,l),Wu(n,l)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=td(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);sc=l,n.target.dispatchEvent(l),sc=null}else return t=yl(n),t!==null&&gm(t),e.blockedOn=n,!1;t.shift()}return!0}function xm(e,t,n){Jr(e)&&n.delete(t)}function m4(){ad=!1,Sa!==null&&Jr(Sa)&&(Sa=null),ja!==null&&Jr(ja)&&(ja=null),wa!==null&&Jr(wa)&&(wa=null),hi.forEach(xm),mi.forEach(xm)}function Wr(e,t){e.blockedOn===t&&(e.blockedOn=null,ad||(ad=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,m4)))}var eo=null;function vm(e){eo!==e&&(eo=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){eo===e&&(eo=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(nd(l||n)===null)continue;break}var u=yl(n);u!==null&&(e.splice(t,3),t-=3,nu(u,{pending:!0,data:c,method:n.method,action:l},l,c))}}))}function pi(e){function t(w){return Wr(w,e)}Sa!==null&&Wr(Sa,e),ja!==null&&Wr(ja,e),wa!==null&&Wr(wa,e),hi.forEach(t),mi.forEach(t);for(var n=0;n<Ma.length;n++){var l=Ma[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ma.length&&(n=Ma[0],n.blockedOn===null);)bm(n),n.blockedOn===null&&Ma.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var c=n[l],u=n[l+1],m=c[Dt]||null;if(typeof u=="function")m||vm(n);else if(m){var y=null;if(u&&u.hasAttribute("formAction")){if(c=u,m=u[Dt]||null)y=m.formAction;else if(nd(c)!==null)continue}else y=m.action;typeof y=="function"?n[l+1]=y:(n.splice(l,3),l-=3),vm(n)}}}function ld(e){this._internalRoot=e}to.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=It();hm(n,l,e,t,null,null)},to.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hm(e.current,2,null,e,null,null),Rr(),t[gl]=null}};function to(e){this._internalRoot=e}to.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ma.length&&t!==0&&t<Ma[n].priority;n++);Ma.splice(n,0,e),n===0&&bm(e)}};var Sm=s.version;if(Sm!=="19.1.0")throw Error(r(527,Sm,"19.1.0"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=b(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var g4={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var no=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!no.isDisabled&&no.supportsFiber)try{vs=no.inject(g4),Ht=no}catch{}}return yi.createRoot=function(e,t){if(!d(e))throw Error(r(299));var n=!1,l="",c=Bh,u=Kh,m=Uh,y=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(y=t.unstable_transitionCallbacks)),t=dm(e,1,!1,null,null,n,l,c,u,m,y,null),e[gl]=t.current,qu(e),new ld(t)},yi.hydrateRoot=function(e,t,n){if(!d(e))throw Error(r(299));var l=!1,c="",u=Bh,m=Kh,y=Uh,w=null,E=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(w=n.unstable_transitionCallbacks),n.formState!==void 0&&(E=n.formState)),t=dm(e,1,!0,t,n??null,l,c,u,m,y,w,E),t.context=fm(null),n=t.current,l=It(),l=Zo(l),c=ra(l),c.callback=null,oa(n,c,l),n=l,t.current.lanes=n,js(t,n),An(t),e[gl]=t.current,qu(e),new to(t)},yi.version="19.1.0",yi}var Am;function ob(){if(Am)return cd.exports;Am=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),cd.exports=rb(),cd.exports}var cb=ob();const Fe=new P4({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:1e3*60,networkMode:"offlineFirst",placeholderData:a=>a},mutations:{networkMode:"offlineFirst"}}});var he=ab();function $0(a){return"radarrId"in a}function ub(a){return"sonarrEpisodeId"in a}function db(a){return"episodeFileCount"in a}const gn={get apiKey(){return window.Bazarr.apiKey},get canUpdate(){return window.Bazarr.canUpdate},get hasUpdate(){return window.Bazarr.hasUpdate},get baseUrl(){{let a=window.Bazarr.baseUrl;return a.endsWith("/")&&(a=a.slice(0,-1)),a}},get queryDev(){return!1}};function fb(){const a=hs();return v.useCallback(()=>a("/"),[a])}function At(a,s,o){const r=v.useRef(s);r.current=s;const d=v.useRef(o);d.current=o;const f=v.useMemo(()=>a.map(h=>({value:h,label:r.current(h)})),[a]);return v.useMemo(()=>({options:f,getkey:d.current??r.current}),[f])}function hb(a){return v.useMemo(()=>a.map(s=>({value:s,label:s.toString()})),[a])}function zi(a){const s=v.useRef(a);s.current=a;const o=v.useCallback(h=>{s.current(p=>[...p,h])},[]),r=v.useCallback((h,p)=>{s.current(b=>{if(h!==-1){const g=[...b];return g[h]=p,g}return b})},[]),d=v.useCallback(h=>{s.current(p=>{if(h!==-1){const b=[...p];return b.splice(h,1),b}return p})},[]),f=v.useCallback(h=>{s.current(p=>p.map(h))},[]);return v.useMemo(()=>({add:o,mutate:r,remove:d,update:f}),[o,r,d,f])}function mb(a,s){const o=v.useRef(a);o.current=a;const r=v.useRef(void 0);return v.useCallback((...d)=>{r.current&&(clearTimeout(r.current),r.current=void 0),r.current=window.setTimeout(()=>o.current(...d),s)},[s])}function gb(a,s){const[o,r]=v.useState(a),d=mb(r,s);return v.useEffect(()=>{d(a)},[d,a]),o}function Jd(a,s){const o=v.useRef(null),r=v.useRef(s);r.current=s,v.useEffect(()=>{o.current!==a&&(o.current=a,r.current(a))},[a])}function Vj(a,s){const o=v.useRef(void 0);v.useEffect(()=>(o.current=window.setInterval(a,s),()=>{clearInterval(o.current)}),[a,s])}function pb(a,s,o=!1){a(!o),setTimeout(()=>a(o),s)}function is(a){return $0(a)?a.radarrId:ub(a)?a.sonarrEpisodeId:db(a)?a.sonarrSeriesId:void 0}function Ve(...a){return a.join("-")}function J0(){window.location.reload()}function W0(){window.scrollTo(0,0)}const yb=new RegExp("/{1,}","g");function wd(...a){const s="/";return a.join(s).replace(yb,s)}function eg(a,s){if(s.length===0)return a.filter(o=>o.path!==null);{const o=he.differenceWith(a,s,(r,d)=>r.code2===d.code2||r.path!==null||r.code2===void 0);return he.difference(a,o)}}function bo(a){return a==="True"}function Ca(a){return a?"True":"False"}const bb="settings-general-page_size";function ko(){var s;return((s=Nn().data)==null?void 0:s.general.page_size)??50}var j=(a=>(a.Movies="movies",a.Episodes="episodes",a.Series="series",a.Badges="badges",a.FileSystem="file-system",a.System="system",a.Settings="settings",a.Subtitles="subtitles",a.Providers="providers",a.Languages="languages",a.LanguagesProfiles="languages-profiles",a.Blacklist="blacklist",a.Search="search",a.Actions="actions",a.Announcements="announcements",a.Tasks="tasks",a.Backups="backups",a.Logs="logs",a.Infos="infos",a.History="history",a.Wanted="wanted",a.Range="range",a.All="all",a.Plex="plex",a))(j||{});function ms(a,s,o=!0){const r=ke(),[d]=Y0(),[f,h]=v.useState(d.get("page")?Number(d.get("page"))-1:0),p=ko(),b=f*p,g=be({queryKey:[...a,j.Range,{start:b,size:p}],queryFn:()=>s({start:b,length:p})}),{data:x}=g;v.useEffect(()=>{g.isSuccess&&g.data&&o&&g.data.data.forEach(L=>{const M=is(L);M&&r.setQueryData([...a,M],L)})},[g.isSuccess,g.data,r,o,a,f]);const S=(x==null?void 0:x.total)??0,_=Math.ceil(S/p),A=v.useCallback(L=>{L>=0&&L<_&&h(L)},[_]),[T,D]=v.useState(!1);return Jd(f,()=>{g.isFetching&&D(!0)}),v.useEffect(()=>{g.isFetching||D(!1)},[g.isFetching]),v.useEffect(()=>{_!==0&&(f>=_?h(_-1):f<0&&h(0))},[f,_]),{...g,paginationStatus:{isPageLoading:T,totalCount:S,pageCount:_,pageSize:p,page:f},controls:{gotoPage:A}}}function Se(a,s,...o){}function xb(a,s,...o){a&&Se("error",s,o)}const fn={info:(a,s)=>({title:a,message:s,autoClose:5*1e3}),warn:(a,s)=>({title:a,message:s,color:"yellow",autoClose:6*1e3}),error:(a,s)=>({title:a,message:s,color:"red",autoClose:7*1e3}),PROGRESS_TIMEOUT:10*1e3,progress:{pending:(a,s)=>({id:a,title:s,message:"Starting Tasks...",color:"gray",loading:!0}),update:(a,s,o,r,d)=>({id:a,title:s,message:`[${r}/${d}] ${o}`,loading:!0,autoClose:!1}),end:(a,s)=>({id:a,title:s,message:"All Tasks Completed",color:"green",autoClose:2*1e3})}};var ut=(a=>(a.UploadSubtitle="Uploading subtitles...",a.DownloadSubtitle="Downloading subtitles...",a.DeleteSubtitle="Deleting subtitles...",a.SearchSubtitle="Searching subtitles...",a.ScanDisk="Scanning disk...",a.Sync="Syncing...",a))(ut||{});class vb{constructor(){cn(this,"running");cn(this,"tasks",{});cn(this,"progress",{});this.running=!1,this.tasks={},this.progress={},window.addEventListener("beforeunload",this.onBeforeUnload.bind(this))}onBeforeUnload(s){const o="Background tasks are still running";if(Object.keys(this.tasks).length>0){s.preventDefault(),s.returnValue=o;return}delete s.returnValue}update(){var o;if(this.running)return;Se(),this.running=!0,(((o=window.queueMicrotask)==null?void 0:o.bind(window))??setTimeout)(async()=>{for(;Object.keys(this.tasks).length>0;){const r=Object.keys(this.tasks);for await(const d of r){const f=this.tasks[d],h=d;for(let b=0;b<f.length;b++){const g=f[b],x=fn.progress.update(h,d,g.description,b,f.length);ao(x);try{await g(...g.parameters)}catch{}}const p=fn.progress.end(h,d);ao(p),delete this.tasks[d]}}this.running=!1})}create(s,o,r,...d){const f=r.bind({});if(f.parameters=d,f.description=s,f.id=he.uniqueId("task"),this.tasks[o]===void 0){this.tasks[o]=[];const h=fn.progress.pending(o,o);ol(h)}return this.tasks[o].push(f),this.update(),f.id}updateProgress(s){s.forEach(o=>{if(this.progress[o.id]===void 0){ol(fn.progress.pending(o.id,o.header)),this.progress[o.id]=!0,setTimeout(()=>this.updateProgress([o]),1e3);return}if(o.value>=o.count){ao(fn.progress.end(o.id,o.header)),delete this.progress[o.id];return}o.value+=1,ao(fn.progress.update(o.id,o.header,o.name,o.value,o.count))})}removeProgress(s){setTimeout(()=>s.forEach(o=>x4(o)),fn.PROGRESS_TIMEOUT)}}const Le=new vb;function Wd(a,s){return new CustomEvent(a,{bubbles:!0,detail:s})}function Md(a){const s=Wd("app-auth-changed",{authenticated:a});window.dispatchEvent(s)}function Sb(a){const s=Wd("app-critical-error",{message:a});window.dispatchEvent(s)}function zm(a){const s=Wd("app-online-status",{online:a});window.dispatchEvent(s)}function jb(){return[{key:"connect",any:()=>zm(!0)},{key:"connect_error",any:()=>{Sb("Cannot connect to backend"),v4()}},{key:"disconnect",any:()=>zm(!1)},{key:"message",update:a=>{a.map(s=>fn.info("Notification",s)).forEach(s=>ol(s))}},{key:"progress",update:Le.updateProgress.bind(Le),delete:Le.removeProgress.bind(Le)},{key:"series",update:a=>{Se("info","Invalidating series",a),a.forEach(s=>{Fe.invalidateQueries({queryKey:[j.Series,s]})})},delete:a=>{Se("info","Invalidating series",a),a.forEach(s=>{Fe.invalidateQueries({queryKey:[j.Series,s]})})}},{key:"movie",update:a=>{Se("info","Invalidating movies",a),a.forEach(s=>{Fe.invalidateQueries({queryKey:[j.Movies,s]})})},delete:a=>{Se("info","Invalidating movies",a),a.forEach(s=>{Fe.invalidateQueries({queryKey:[j.Movies,s]})})}},{key:"episode",update:a=>{Se("info","Invalidating episodes",a),a.forEach(s=>{const o=Fe.getQueryData([j.Episodes,s]);o!==void 0&&Fe.invalidateQueries({queryKey:[j.Series,o.sonarrSeriesId]})})},delete:a=>{Se("info","Invalidating episodes",a),a.forEach(s=>{const o=Fe.getQueryData([j.Episodes,s]);o!==void 0&&Fe.invalidateQueries({queryKey:[j.Series,o.sonarrSeriesId]})})}},{key:"episode-wanted",update:()=>{Fe.invalidateQueries({queryKey:[j.Episodes,j.Wanted]})},delete:()=>{Fe.invalidateQueries({queryKey:[j.Episodes,j.Wanted]})}},{key:"movie-wanted",update:()=>{Fe.invalidateQueries({queryKey:[j.Movies,j.Wanted]})},delete:()=>{Fe.invalidateQueries({queryKey:[j.Movies,j.Wanted]})}},{key:"settings",any:()=>{Fe.invalidateQueries({queryKey:[j.System]})}},{key:"languages",any:()=>{Fe.invalidateQueries({queryKey:[j.System,j.Languages]})}},{key:"badges",any:()=>{Fe.invalidateQueries({queryKey:[j.System,j.Badges]})}},{key:"movie-history",any:()=>{Fe.invalidateQueries({queryKey:[j.Movies,j.History]})}},{key:"movie-blacklist",any:()=>{Fe.invalidateQueries({queryKey:[j.Movies,j.Blacklist]})}},{key:"episode-history",any:()=>{Fe.invalidateQueries({queryKey:[j.Episodes,j.History]})}},{key:"episode-blacklist",any:()=>{Fe.invalidateQueries({queryKey:[j.Episodes,j.Blacklist]})}},{key:"reset-episode-wanted",any:()=>{Fe.invalidateQueries({queryKey:[j.Episodes,j.Wanted]})}},{key:"reset-movie-wanted",any:()=>{Fe.invalidateQueries({queryKey:[j.Movies,j.Wanted]})}},{key:"task",any:()=>{Fe.invalidateQueries({queryKey:[j.System,j.Tasks]})}}]}class wb{constructor(){cn(this,"socket");cn(this,"events");cn(this,"debounceReduce");cn(this,"reducers");this.socket=lb({path:`${gn.baseUrl}/api/socket.io`,transports:["polling","websocket"],upgrade:!0,rememberUpgrade:!0,autoConnect:!1}),this.socket.on("connect",this.onConnect.bind(this)),this.socket.on("disconnect",this.onDisconnect.bind(this)),this.socket.on("connect_error",this.onConnectError.bind(this)),this.socket.on("data",this.onEvent.bind(this)),this.events=[],this.debounceReduce=he.debounce(this.reduce,3),this.reducers=[],ro.setOnline(!1)}initialize(){Se(),this.reducers.push(...jb()),window.addEventListener("app-auth-changed",s=>{const o=s.detail.authenticated;Se("info","Authentication status change to",o),o?this.connect():this.disconnect()})}connect(){Se(),this.socket.connect()}disconnect(){Se(),this.socket.disconnect()}addReducer(s){this.reducers.push(s)}removeReducer(s){const o=he.remove(this.reducers,r=>r===s);xb(o.length===0,"Fail to remove reducer",s)}reduce(){const s=[...this.events];this.events=[];const o={};s.forEach(r=>{var f;r.type in o||(o[r.type]={});const d=o[r.type];d!==void 0&&(r.action in d||(d[r.action]=[]),r.payload&&((f=d[r.action])==null||f.push(r.payload)))}),he.forIn(o,(r,d)=>{if(r){const f=this.reducers.filter(h=>h.key===d);if(f.length===0){Se("warning","Unhandled SocketIO event",d);return}f.forEach(h=>{const p=h.any;p&&p(),he.forIn(r,(b,g)=>{b=he.uniq(b);const x=h[g];x?x(b):p===void 0&&Se("warning","Unhandled SocketIO event",g,d)})})}})}onConnect(){Se(),ro.setOnline(!0),this.onEvent({type:"connect",action:"update"})}onConnectError(){Se(),ro.setOnline(!1),this.onEvent({type:"connect_error",action:"update"})}onDisconnect(){Se(),ro.setOnline(!1),this.onEvent({type:"disconnect",action:"update"})}onEvent(s){Se("info","Socket.IO receives",s),this.events.push(s),this.debounceReduce()}}const Mb=new wb;function Tm(a,s="Unknown error"){return typeof a=="string"?a:s}class kb{constructor(){cn(this,"axios");cn(this,"source");cn(this,"bIsAuthenticated");this.bIsAuthenticated=!1;const s=`${gn.baseUrl}/api/`;this.initialize(s,gn.apiKey),Mb.initialize()}initialize(s,o){Se("info","initializing BazarrClient with baseUrl",s),this.axios=jm.create({baseURL:s}),this.axios.defaults.headers.post["Content-Type"]="application/json",this.axios.defaults.headers.common["X-API-KEY"]=o??"AUTH_NEEDED",this.source=jm.CancelToken.source(),this.axios.interceptors.request.use(r=>(r.cancelToken=this.source.token,r)),this.axios.interceptors.response.use(r=>{if(r.status>=200&&r.status<300)return this.bIsAuthenticated||(this.bIsAuthenticated=!0,Md(!0)),Promise.resolve(r);{const d={code:r.status,message:Tm(r.data)};return this.handleError(d),Promise.reject(r)}},r=>{var h,p;const d=Tm((h=r.response)==null?void 0:h.data,"You have disconnected from the server"),f={code:((p=r.response)==null?void 0:p.status)??500,message:d};return r.message=f.message,this.handleError(f),Promise.reject(r)})}handleError(s){const{code:o,message:r}=s;switch(o){case 401:this.bIsAuthenticated=!1,Md(!1);return}Se("error","A error has occurred",o),ol(fn.error(`Error ${o}`,r))}}const il=new kb;class On{constructor(s){cn(this,"prefix");this.prefix=s}createFormdata(s){if(s){const o=new FormData;for(const r in s){const d=s[r];d instanceof Array?d.length>0?d.forEach(f=>o.append(r,f)):o.append(r,""):o.append(r,s[r])}return o}else return}async get(s,o){return(await il.axios.get(this.prefix+s,{params:o})).data}post(s,o,r){const d=this.createFormdata(o);return il.axios.post(this.prefix+s,d,{params:r,headers:{"Content-Type":"application/x-www-form-urlencoded"}})}patch(s,o,r){const d=this.createFormdata(o);return il.axios.patch(this.prefix+s,d,{params:r})}delete(s,o,r){const d=this.createFormdata(o);return il.axios.delete(this.prefix+s,{params:r,data:d})}}class _b extends On{constructor(){super("/badges")}async all(){return await this.get("")}}const Ab=new _b;class zb extends On{constructor(){super("/episodes")}async bySeriesId(s){return(await this.get("",{seriesid:s})).data}async byEpisodeId(s){return(await this.get("",{episodeid:s})).data}async wanted(s){return await this.get("/wanted",s)}async wantedBy(s){return await this.get("/wanted",{episodeid:s})}async history(s){return await this.get("/history",s)}async historyBy(s){return(await this.get("/history",{episodeid:s})).data}async downloadSubtitles(s,o,r){await this.patch("/subtitles",r,{seriesid:s,episodeid:o})}async uploadSubtitles(s,o,r){await this.post("/subtitles",r,{seriesid:s,episodeid:o})}async deleteSubtitles(s,o,r){await this.delete("/subtitles",r,{seriesid:s,episodeid:o})}async blacklist(){return(await this.get("/blacklist")).data}async addBlacklist(s,o,r){await this.post("/blacklist",r,{seriesid:s,episodeid:o})}async deleteBlacklist(s,o){await this.delete("/blacklist",o,{all:s})}}const Tb=new zb;class Cb extends On{constructor(){super("/files")}async browse(s,o){return await this.get(s,{path:o})}async bazarr(s){return this.browse("",s)}async sonarr(s){return this.browse("/sonarr",s)}async radarr(s){return this.browse("/radarr",s)}}const Eb=new Cb;class Ob extends On{constructor(){super("/history")}async stats(s,o,r,d){return await this.get("/stats",{timeFrame:s,action:o,provider:r,language:d})}}const Nb=new Ob;class Db extends On{constructor(){super("/movies")}async blacklist(){return(await this.get("/blacklist")).data}async addBlacklist(s,o){await this.post("/blacklist",o,{radarrid:s})}async deleteBlacklist(s,o){await this.delete("/blacklist",o,{all:s})}async movies(s){return(await this.get("",{radarrid:s})).data}async moviesBy(s){return await this.get("",s)}async modify(s){await this.post("",{radarrid:s.id,profileid:s.profileid})}async wanted(s){return await this.get("/wanted",s)}async wantedBy(s){return await this.get("/wanted",{radarrid:s})}async history(s){return await this.get("/history",s)}async historyBy(s){return(await this.get("/history",{radarrid:s})).data}async action(s){await this.patch("",s)}async downloadSubtitles(s,o){await this.patch("/subtitles",o,{radarrid:s})}async uploadSubtitles(s,o){await this.post("/subtitles",o,{radarrid:s})}async deleteSubtitles(s,o){await this.delete("/subtitles",o,{radarrid:s})}}const Lb=new Db;class Rb extends On{constructor(){super("/plex")}async createPin(){return(await this.post("/oauth/pin")).data}async checkPin(s){return(await this.get(`/oauth/pin/${s}/check`)).data}async logout(){await this.post("/oauth/logout")}async servers(){return(await this.get("/oauth/servers")).data}async selectServer(s){return(await this.post("/select-server",s)).data}async selectedServer(){return(await this.get("/select-server")).data}async validateAuth(){return(await this.get("/oauth/validate")).data}async libraries(){return(await this.get("/oauth/libraries")).data}async createWebhook(){return(await this.post("/webhook/create")).data}async listWebhooks(){return(await this.get("/webhook/list")).data}async deleteWebhook(s){return(await this.post("/webhook/delete",{webhook_url:s})).data}}const Bb=new Rb;class Kb extends On{constructor(){super("/providers")}async providers(s=!1){return(await this.get("",{history:s})).data}async reset(){await this.post("",{action:"reset"})}async movies(s){return(await this.get("/movies",{radarrid:s})).data}async downloadMovieSubtitle(s,o){await this.post("/movies",o,{radarrid:s})}async episodes(s){return(await this.get("/episodes",{episodeid:s})).data}async downloadEpisodeSubtitle(s,o,r){await this.post("/episodes",r,{seriesid:s,episodeid:o})}}const Ub=new Kb;class qb extends On{constructor(){super("/series")}async series(s){return(await this.get("",{seriesid:s})).data}async seriesBy(s){return await this.get("",s)}async modify(s){await this.post("",{seriesid:s.id,profileid:s.profileid})}async action(s){await this.patch("",s)}}const Hb=new qb;class Vb extends On{constructor(){super("/subtitles")}async getRefTracksByEpisodeId(s,o){return(await this.get("",{subtitlesPath:s,sonarrEpisodeId:o})).data}async getRefTracksByMovieId(s,o){return(await this.get("",{subtitlesPath:s,radarrMovieId:o})).data}async info(s){return(await this.get("/info",{filenames:s})).data}async modify(s,o){await this.patch("",o,{action:s})}}const Gb=new Vb;class Yb extends On{constructor(){super("/system")}async performAction(s){await this.post("",void 0,{action:s})}async login(s,o){await this.post("/account",{username:s,password:o},{action:"login"})}async logout(){await this.post("/account",void 0,{action:"logout"})}async shutdown(){return this.performAction("shutdown")}async restart(){return this.performAction("restart")}async settings(){return await this.get("/settings")}async updateSettings(s){await this.post("/settings",s)}async languages(s=!1){return await this.get("/languages",{history:s})}async languagesProfileList(){return await this.get("/languages/profiles")}async status(){return(await this.get("/status")).data}async backups(){return(await this.get("/backups")).data}async createBackups(){await this.post("/backups")}async restoreBackups(s){await this.patch("/backups",{filename:s})}async deleteBackups(s){await this.delete("/backups",{filename:s})}async health(){return(await this.get("/health")).data}async logs(){return(await this.get("/logs")).data}async releases(){return(await this.get("/releases")).data}async deleteLogs(){await this.delete("/logs")}async announcements(){return(await this.get("/announcements")).data}async addAnnouncementsDismiss(s){await this.post("/announcements",{hash:s})}async tasks(){return(await this.get("/tasks")).data}async runTask(s){await this.post("/tasks",{taskid:s})}async testNotification(s){await this.patch("/notifications",{url:s})}async search(s){return await this.get("/searches",{query:s})}}const Fb=new Yb;class Qb{async urlTest(s,o,r){try{const d=await il.axios.get(`../test/${s}/${o}api/system/status`,{params:r}),{data:f}=d;if(f.status&&f.version)return f;throw new Error("Cannot get response, fallback to v3 api")}catch{return(await il.axios.get(`../test/${s}/${o}api/v3/system/status`,{params:r})).data}}async providerUrlTest(s,o,r){const d=await il.axios.get(`../test/${s}/${o}status`,{params:r}),{data:f}=d;return f.status&&f.version?f:d.data}}const Xb=new Qb,X={badges:Ab,episodes:Tb,files:Eb,movies:Lb,series:Hb,providers:Ub,history:Nb,subtitles:Gb,system:Fb,utils:Xb,plex:Bb},Ib=(a,s)=>{s.forEach(o=>{a.setQueryData([j.Episodes,o.sonarrEpisodeId],o),a.setQueryData([j.Series,o.sonarrSeriesId,j.Episodes,o.sonarrEpisodeId],o)})};function tg(a){const s=ke(),o=be({queryKey:[j.Series,a,j.Episodes,j.All],queryFn:()=>X.episodes.bySeriesId([a])});return v.useEffect(()=>{o.isSuccess&&o.data&&Ib(s,o.data)},[o.isSuccess,o.data,s]),o}function Zb(){return ms([j.Series,j.Wanted],a=>X.episodes.wanted(a))}function Pb(){return be({queryKey:[j.Series,j.Episodes,j.Blacklist],queryFn:()=>X.episodes.blacklist()})}function ng(){const a=ke();return ye({mutationKey:[j.Series,j.Episodes,j.Blacklist],mutationFn:s=>{const{seriesId:o,episodeId:r,form:d}=s;return X.episodes.addBlacklist(o,r,d)},onSuccess:(s,{seriesId:o})=>{a.invalidateQueries({queryKey:[j.Series,j.Episodes,j.Blacklist]}),a.invalidateQueries({queryKey:[j.Series,o]})}})}function ag(){const a=ke();return ye({mutationKey:[j.Series,j.Episodes,j.Blacklist],mutationFn:s=>X.episodes.deleteBlacklist(s.all,s.form),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Series,j.Episodes,j.Blacklist]})}})}function $b(){return ms([j.Series,j.Episodes,j.History],a=>X.episodes.history(a),!1)}function Jb(a){return be({queryKey:[j.Series,j.Episodes,j.History,a],queryFn:()=>a?X.episodes.historyBy(a):[]})}function gs(a){return be({queryKey:[j.System,j.Languages,a??!1],queryFn:()=>X.system.languages(a),staleTime:1/0})}function Ti(){return be({queryKey:[j.System,j.LanguagesProfiles],queryFn:()=>X.system.languagesProfileList(),staleTime:1/0})}const Wb=(a,s)=>{s.forEach(o=>{a.setQueryData([j.Movies,o.radarrId],o)})};function e6(a){return be({queryKey:[j.Movies,a],queryFn:async()=>{const s=await X.movies.movies([a]);return s.length>0?s[0]:void 0}})}function t6(){const a=ke(),s=be({queryKey:[j.Movies,j.All],queryFn:()=>X.movies.movies()});return v.useEffect(()=>{s.isSuccess&&s.data&&Wb(a,s.data)},[s.isSuccess,s.data,a]),s}function n6(){return ms([j.Movies],a=>X.movies.moviesBy(a))}function ef(){const a=ke();return ye({mutationKey:[j.Movies],mutationFn:s=>X.movies.modify(s),onSuccess:(s,o)=>{o.id.forEach(r=>{a.invalidateQueries({queryKey:[j.Movies,r]})}),a.invalidateQueries({queryKey:[j.Movies]})}})}function lg(){const a=ke();return ye({mutationKey:[j.Actions,j.Movies],mutationFn:s=>X.movies.action(s),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Movies]})}})}function a6(){return ms([j.Movies,j.Wanted],a=>X.movies.wanted(a))}function l6(){return be({queryKey:[j.Movies,j.Blacklist],queryFn:()=>X.movies.blacklist()})}function sg(){const a=ke();return ye({mutationKey:[j.Movies,j.Blacklist],mutationFn:s=>{const{id:o,form:r}=s;return X.movies.addBlacklist(o,r)},onSuccess:(s,{id:o})=>{a.invalidateQueries({queryKey:[j.Movies,j.Blacklist]}),a.invalidateQueries({queryKey:[j.Movies,o]})}})}function ig(){const a=ke();return ye({mutationKey:[j.Movies,j.Blacklist],mutationFn:s=>X.movies.deleteBlacklist(s.all,s.form),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Movies,j.Blacklist]})}})}function s6(){return ms([j.Movies,j.History],a=>X.movies.history(a),!1)}function i6(a){return be({queryKey:[j.Movies,j.History,a],queryFn:()=>a?X.movies.historyBy(a):[]})}function r6(a){return be({queryKey:[j.System,j.Providers,a??!1],queryFn:()=>X.providers.providers(a)})}function o6(a){return be({queryKey:[j.System,j.Providers,j.Movies,a],queryFn:()=>a?X.providers.movies(a):[],staleTime:0})}function c6(a){return be({queryKey:[j.System,j.Providers,j.Episodes,a],queryFn:()=>a?X.providers.episodes(a):[],staleTime:0})}function u6(){const a=ke();return ye({mutationKey:[j.System,j.Providers],mutationFn:()=>X.providers.reset(),onSuccess:()=>{a.invalidateQueries({queryKey:[j.System,j.Providers]})}})}function d6(){const a=ke();return ye({mutationKey:[j.System,j.Providers,j.Subtitles,j.Episodes],mutationFn:s=>X.providers.downloadEpisodeSubtitle(s.seriesId,s.episodeId,s.form),onSuccess:(s,o)=>{a.invalidateQueries({queryKey:[j.Series,o.seriesId]})}})}function f6(){const a=ke();return ye({mutationKey:[j.System,j.Providers,j.Subtitles,j.Movies],mutationFn:s=>X.providers.downloadMovieSubtitle(s.radarrId,s.form),onSuccess:(s,o)=>{a.invalidateQueries({queryKey:[j.Movies,o.radarrId]})}})}function h6(a,s){s.forEach(o=>{a.setQueryData([j.Series,o.sonarrSeriesId],o)})}function m6(a){return be({queryKey:[j.Series,a],queryFn:async()=>{const s=await X.series.series([a]);return s.length>0?s[0]:void 0}})}function g6(){const a=ke(),s=be({queryKey:[j.Series,j.All],queryFn:()=>X.series.series()});return v.useEffect(()=>{s.isSuccess&&s.data&&h6(a,s.data)},[s.isSuccess,s.data,a]),s}function p6(){return ms([j.Series],a=>X.series.seriesBy(a))}function tf(){const a=ke();return ye({mutationKey:[j.Series],mutationFn:s=>X.series.modify(s),onSuccess:(s,o)=>{o.id.forEach(r=>{a.invalidateQueries({queryKey:[j.Series,r]})}),a.invalidateQueries({queryKey:[j.Series]})}})}function rg(){const a=ke();return ye({mutationKey:[j.Actions,j.Series],mutationFn:s=>X.series.action(s),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Series]})}})}function og(){return $d({mutationKey:[j.Actions]})>0}function y6(){return $d({mutationKey:[j.Actions,j.Movies]})>0}function b6(){return $d()>0}function ps(){const a=ke();return ye({mutationKey:[j.Subtitles],mutationFn:s=>X.subtitles.modify(s.action,s.form),onSuccess:(s,o)=>{a.invalidateQueries({queryKey:[j.History]});const{type:r,id:d}=o.form;r==="episode"?a.invalidateQueries({queryKey:[j.Series,d]}):a.invalidateQueries({queryKey:[j.Movies,d]})}})}function _o(){const a=ke(),s=ye({mutationKey:[j.Subtitles,j.Episodes],mutationFn:d=>X.episodes.downloadSubtitles(d.seriesId,d.episodeId,d.form),onSuccess:(d,f)=>{a.invalidateQueries({queryKey:[j.Series,f.seriesId]})}}),o=ye({mutationKey:[j.Subtitles,j.Episodes],mutationFn:d=>X.episodes.deleteSubtitles(d.seriesId,d.episodeId,d.form),onSuccess:(d,f)=>{a.invalidateQueries({queryKey:[j.Series,f.seriesId]})}}),r=ye({mutationKey:[j.Subtitles,j.Episodes],mutationFn:d=>X.episodes.uploadSubtitles(d.seriesId,d.episodeId,d.form),onSuccess:(d,{seriesId:f})=>{a.invalidateQueries({queryKey:[j.Series,f]})}});return{download:s,remove:o,upload:r}}function Ao(){const a=ke(),s=ye({mutationKey:[j.Subtitles,j.Movies],mutationFn:d=>X.movies.downloadSubtitles(d.radarrId,d.form),onSuccess:(d,f)=>{a.invalidateQueries({queryKey:[j.Movies,f.radarrId]})}}),o=ye({mutationKey:[j.Subtitles,j.Movies],mutationFn:d=>X.movies.deleteSubtitles(d.radarrId,d.form),onSuccess:(d,f)=>{a.invalidateQueries({queryKey:[j.Movies,f.radarrId]})}}),r=ye({mutationKey:[j.Subtitles,j.Movies],mutationFn:d=>X.movies.uploadSubtitles(d.radarrId,d.form),onSuccess:(d,{radarrId:f})=>{a.invalidateQueries({queryKey:[j.Movies,f]})}});return{download:s,remove:o,upload:r}}function x6(a){return be({queryKey:[j.Subtitles,j.Infos,a],queryFn:()=>X.subtitles.info(a)})}function v6(a,s,o){return be({queryKey:[j.Episodes,s,j.Subtitles,a],queryFn:()=>X.subtitles.getRefTracksByEpisodeId(a,s),enabled:o})}function S6(a,s,o){return be({queryKey:[j.Movies,s,j.Subtitles,a],queryFn:()=>X.subtitles.getRefTracksByMovieId(a,s),enabled:o})}function j6(){return be({queryKey:[j.System,j.Badges],queryFn:()=>X.badges.all(),refetchOnWindowFocus:"always",refetchInterval:1e3*60,staleTime:1e3*10})}function w6(a,s,o){return be({queryKey:[j.FileSystem,a,s],queryFn:()=>a==="bazarr"?X.files.bazarr(s):a==="radarr"?X.files.radarr(s):a==="sonarr"?X.files.sonarr(s):[],enabled:o})}function Nn(){return be({queryKey:[j.System,j.Settings],queryFn:()=>X.system.settings(),staleTime:1/0})}function cg(){const a=ke();return ye({mutationKey:[j.System,j.Settings],mutationFn:s=>X.system.updateSettings(s),onSuccess:()=>{a.invalidateQueries({queryKey:[j.System]}),a.invalidateQueries({queryKey:[j.Series]}),a.invalidateQueries({queryKey:[j.Episodes]}),a.invalidateQueries({queryKey:[j.Movies]}),a.invalidateQueries({queryKey:[j.Wanted]}),a.invalidateQueries({queryKey:[j.Badges]}),a.invalidateQueries({queryKey:[j.Plex,"libraries"]})}})}function M6(a,s){return be({queryKey:[j.System,j.Search,a],queryFn:()=>X.system.search(a),enabled:s})}function k6(){return be({queryKey:[j.System,j.Logs],queryFn:()=>X.system.logs(),refetchOnWindowFocus:"always",refetchInterval:1e3*60,staleTime:1e3*10})}function _6(){const a=ke();return ye({mutationKey:[j.System,j.Logs],mutationFn:()=>X.system.deleteLogs(),onSuccess:()=>{a.invalidateQueries({queryKey:[j.System,j.Logs]})}})}function A6(){return be({queryKey:[j.System,j.Announcements],queryFn:()=>X.system.announcements(),refetchOnWindowFocus:"always",refetchInterval:1e3*60,staleTime:1e3*10})}function z6(){const a=ke();return ye({mutationKey:[j.System,j.Announcements],mutationFn:s=>{const{hash:o}=s;return X.system.addAnnouncementsDismiss(o)},onSuccess:()=>{a.invalidateQueries({queryKey:[j.System,j.Announcements]}),a.invalidateQueries({queryKey:[j.System,j.Badges]})}})}function T6(){return be({queryKey:[j.System,j.Tasks],queryFn:()=>X.system.tasks(),refetchOnWindowFocus:"always",refetchInterval:1e3*60,staleTime:1e3*10})}function C6(){const a=ke();return ye({mutationKey:[j.System,j.Tasks],mutationFn:s=>X.system.runTask(s),onSuccess:()=>{a.invalidateQueries({queryKey:[j.System,j.Tasks]}),a.invalidateQueries({queryKey:[j.System,j.Backups]})}})}function E6(){return be({queryKey:[j.System,"backups"],queryFn:()=>X.system.backups()})}function O6(){const a=ke();return ye({mutationKey:[j.System,j.Backups],mutationFn:()=>X.system.createBackups(),onSuccess:()=>{a.invalidateQueries({queryKey:[j.System,j.Backups]})}})}function N6(){const a=ke();return ye({mutationKey:[j.System,j.Backups],mutationFn:s=>X.system.restoreBackups(s),onSuccess:()=>{a.invalidateQueries({queryKey:[j.System,j.Backups]})}})}function D6(){const a=ke();return ye({mutationKey:[j.System,j.Backups],mutationFn:s=>X.system.deleteBackups(s),onSuccess:()=>{a.invalidateQueries({queryKey:[j.System,j.Backups]})}})}function Gj(){return be({queryKey:[j.System,"status"],queryFn:()=>X.system.status()})}function Yj(){return be({queryKey:[j.System,"health"],queryFn:()=>X.system.health()})}function L6(){return be({queryKey:[j.System,"releases"],queryFn:()=>X.system.releases()})}function ug(){const a=ke(),{mutate:s,isPending:o}=ye({mutationKey:[j.System,j.Actions],mutationFn:()=>X.system.logout(),onSuccess:()=>{Md(!1),a.clear()}}),{mutate:r,isPending:d}=ye({mutationKey:[j.System,j.Actions],mutationFn:g=>X.system.login(g.username,g.password),onSuccess:()=>{window.location.replace(gn.baseUrl)}}),{mutate:f,isPending:h}=ye({mutationKey:[j.System,j.Actions],mutationFn:()=>X.system.shutdown(),onSuccess:()=>{a.clear()}}),{mutate:p,isPending:b}=ye({mutationKey:[j.System,j.Actions],mutationFn:()=>X.system.restart(),onSuccess:()=>{a.clear()}});return v.useMemo(()=>({logout:s,shutdown:f,restart:p,login:r,isMutating:o||h||b||d}),[d,o,b,h,r,s,p,f])}const R6=()=>{var h;const[a,s]=v.useState(null),{setColorScheme:o}=N0(),d=(h=Nn().data)==null?void 0:h.general.theme,f=v.useCallback(p=>{o(p)},[o]);return v.useEffect(()=>{d&&a!==d&&(f(d),s(d))},[d,f,a]),i.jsx(i.Fragment,{})},B6="#f8f0fc",K6="#f3d9fa",U6="#eebefa",q6="#e599f7",H6="#da77f2",V6="#cc5de8",G6="#be4bdb",Y6="#ae3ec9",F6="#9c36b5",Q6="#862e9c",X6="64px",I6="200",dn={colorBrand0:B6,colorBrand1:K6,colorBrand2:U6,colorBrand3:q6,colorBrand4:H6,colorBrand5:V6,colorBrand6:G6,colorBrand7:Y6,colorBrand8:F6,colorBrand9:Q6,headerHeight:X6,navBarWidth:I6},Z6="_root_74zuq_33",P6={root:Z6},$6="_root_lgtd4_33",J6="_label_lgtd4_72",W6={root:$6,label:J6},ex="_root_x31lm_33",tx={root:ex},nx="_control_1xc7h_32",ax={control:nx},lx=S4({fontFamily:"Roboto, open sans, Helvetica Neue, Helvetica, Arial, sans-serif",colors:{brand:[dn.colorBrand0,dn.colorBrand1,dn.colorBrand2,dn.colorBrand3,dn.colorBrand4,dn.colorBrand5,dn.colorBrand6,dn.colorBrand7,dn.colorBrand8,dn.colorBrand9]},primaryColor:"brand",components:{ActionIcon:mo.extend({classNames:P6}),Badge:ze.extend({classNames:W6}),Button:de.extend({classNames:tx}),Pagination:D0.extend({classNames:ax})}}),sx=({children:a})=>i.jsxs(j4,{theme:lx,defaultColorScheme:"auto",children:[i.jsx(R6,{}),a]}),dg=[],fg=v.createContext(null);function yt(a,s,o){const r=d=>{const{id:f,innerProps:h}=d;return i.jsx(fg.Provider,{value:f,children:i.jsx(a,{...h})})};return r.modalKey=s,r.settings=o,dg.push(r),r}const ix={centered:!0,styles:{}},rx=({children:a})=>{const s=v.useMemo(()=>dg.reduce((o,r)=>(o[r.modalKey]=r,o),{}),[]);return i.jsx(w4,{modalProps:ix,modals:s,children:a})};function Xe(){const{openContextModal:a,...s}=L0(),o=v.useCallback((h,p,b)=>{a(h.modalKey,{...h.settings,...b,innerProps:p})},[a]),r=v.useCallback(h=>{s.closeModal(h.modalKey)},[s]),d=v.useContext(fg),f=v.useCallback(()=>{d&&s.closeModal(d)},[d,s]);return v.useMemo(()=>({openContextModal:o,closeContext:r,closeSelf:f,...s}),[r,f,o,s])}const ox=({children:a})=>i.jsx($4,{client:Fe,children:i.jsx(sx,{children:i.jsxs(rx,{children:[i.jsx(M4,{position:"bottom-left",limit:5}),gn.queryDev&&i.jsx(J4,{initialIsOpen:!1}),a]})})});/*!
 * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 * Copyright 2024 Fonticons, Inc.
 */const hg={prefix:"fas",iconName:"circle-chevron-right",icon:[512,512,["chevron-circle-right"],"f138","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM241 377c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l87-87-87-87c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L345 239c9.4 9.4 9.4 24.6 0 33.9L241 377z"]},cx=hg,ux={prefix:"fas",iconName:"text-height",icon:[576,512,[],"f034","M64 128l0-32 64 0 0 320-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-320 64 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48c0-26.5-21.5-48-48-48L160 32 48 32C21.5 32 0 53.5 0 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32zM502.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l32 0 0 192-32 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8l-32 0 0-192 32 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z"]},dx={prefix:"fas",iconName:"laptop",icon:[640,512,[128187],"f109","M128 32C92.7 32 64 60.7 64 96l0 256 64 0 0-256 384 0 0 256 64 0 0-256c0-35.3-28.7-64-64-64L128 32zM19.2 384C8.6 384 0 392.6 0 403.2C0 445.6 34.4 480 76.8 480l486.4 0c42.4 0 76.8-34.4 76.8-76.8c0-10.6-8.6-19.2-19.2-19.2L19.2 384z"]},mg={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},gg={prefix:"fas",iconName:"film",icon:[512,512,[127902],"f008","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM48 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 112l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16L64 96c-8.8 0-16 7.2-16 16zM416 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM160 128l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L192 96c-17.7 0-32 14.3-32 32zm32 160c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-128 0z"]},fx={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},pg=fx,hx={prefix:"fas",iconName:"circle-chevron-down",icon:[512,512,["chevron-circle-down"],"f13a","M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"]},mx={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z"]},gx={prefix:"fas",iconName:"paintbrush",icon:[576,512,[128396,"paint-brush"],"f1fc","M339.3 367.1c27.3-3.9 51.9-19.4 67.2-42.9L568.2 74.1c12.6-19.5 9.4-45.3-7.6-61.2S517.7-4.4 499.1 9.6L262.4 187.2c-24 18-38.2 46.1-38.4 76.1L339.3 367.1zm-19.6 25.4l-116-104.4C143.9 290.3 96 339.6 96 400c0 3.9 .2 7.8 .6 11.6C98.4 429.1 86.4 448 68.8 448L64 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0c61.9 0 112-50.1 112-112c0-2.5-.1-5-.2-7.5z"]},px=gx,yx={prefix:"fas",iconName:"ear-deaf",icon:[512,512,["deaf","deafness","hard-of-hearing"],"f2a4","M502.6 54.6l-40 40c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l40-40c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3zm-320 320l-128 128c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3zM240 128c-57.6 0-105.1 43.6-111.3 99.5c-1.9 17.6-17.8 30.2-35.3 28.3s-30.2-17.8-28.3-35.3C74.8 132.5 149.4 64 240 64c97.2 0 176 78.8 176 176c0 46-17.7 87.9-46.6 119.3c-12 13-17.4 24.8-17.4 34.7l0 6.1c0 61.9-50.1 112-112 112c-17.7 0-32-14.3-32-32s14.3-32 32-32c26.5 0 48-21.5 48-48l0-6.1c0-32.9 17.4-59.6 34.4-78c18.4-20 29.6-46.6 29.6-75.9c0-61.9-50.1-112-112-112zm0 80c-17.7 0-32 14.3-32 32c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-44.2 35.8-80 80-80s80 35.8 80 80c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-17.7-14.3-32-32-32z"]},bx=yx,zo={prefix:"fas",iconName:"bookmark",icon:[384,512,[128278,61591],"f02e","M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"]},nf={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144],"f007","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z"]},xx={prefix:"fas",iconName:"clipboard",icon:[384,512,[128203],"f328","M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM112 192l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},vx={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},Sx={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},jx=Sx,wx={prefix:"fas",iconName:"cloud-arrow-up",icon:[640,512,[62338,"cloud-upload","cloud-upload-alt"],"f0ee","M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-217c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39L296 392c0 13.3 10.7 24 24 24s24-10.7 24-24l0-134.1 39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0l-80 80z"]},af=wx,yg={prefix:"fas",iconName:"arrows-rotate",icon:[512,512,[128472,"refresh","sync"],"f021","M105.1 202.6c7.7-21.8 20.2-42.3 37.8-59.8c62.5-62.5 163.8-62.5 226.3 0L386.3 160 352 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l111.5 0c0 0 0 0 0 0l.4 0c17.7 0 32-14.3 32-32l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 35.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5zM39 289.3c-5 1.5-9.8 4.2-13.7 8.2c-4 4-6.7 8.8-8.1 14c-.3 1.2-.6 2.5-.8 3.8c-.3 1.7-.4 3.4-.4 5.1L16 432c0 17.7 14.3 32 32 32s32-14.3 32-32l0-35.1 17.6 17.5c0 0 0 0 0 0c87.5 87.4 229.3 87.4 316.7 0c24.4-24.4 42.1-53.1 52.9-83.8c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.5 62.5-163.8 62.5-226.3 0l-.1-.1L125.6 352l34.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48.4 288c-1.6 0-3.2 .1-4.8 .3s-3.1 .5-4.6 1z"]},Cm=yg,ys=yg,Mx={prefix:"fas",iconName:"layer-group",icon:[576,512,[],"f5fd","M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z"]},kx={prefix:"fas",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM96 48c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm-6.3 71.8c3.7-14 16.4-23.8 30.9-23.8l14.8 0c14.5 0 27.2 9.7 30.9 23.8l23.5 88.2c1.4 5.4 2.1 10.9 2.1 16.4c0 35.2-28.8 63.7-64 63.7s-64-28.5-64-63.7c0-5.5 .7-11.1 2.1-16.4l23.5-88.2zM112 336c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0z"]},_x=kx,Ax={prefix:"fas",iconName:"circle-arrow-right",icon:[512,512,["arrow-circle-right"],"f0a9","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM297 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L120 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l214.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L409 239c9.4 9.4 9.4 24.6 0 33.9L297 385z"]},zx=Ax,lf={prefix:"fas",iconName:"language",icon:[640,512,[],"f1ab","M0 128C0 92.7 28.7 64 64 64l192 0 48 0 16 0 256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64l-256 0-16 0-48 0L64 448c-35.3 0-64-28.7-64-64L0 128zm320 0l0 256 256 0 0-256-256 0zM178.3 175.9c-3.2-7.2-10.4-11.9-18.3-11.9s-15.1 4.7-18.3 11.9l-64 144c-4.5 10.1 .1 21.9 10.2 26.4s21.9-.1 26.4-10.2l8.9-20.1 73.6 0 8.9 20.1c4.5 10.1 16.3 14.6 26.4 10.2s14.6-16.3 10.2-26.4l-64-144zM160 233.2L179 276l-38 0 19-42.8zM448 164c11 0 20 9 20 20l0 4 44 0 16 0c11 0 20 9 20 20s-9 20-20 20l-2 0-1.6 4.5c-8.9 24.4-22.4 46.6-39.6 65.4c.9 .6 1.8 1.1 2.7 1.6l18.9 11.3c9.5 5.7 12.5 18 6.9 27.4s-18 12.5-27.4 6.9l-18.9-11.3c-4.5-2.7-8.8-5.5-13.1-8.5c-10.6 7.5-21.9 14-34 19.4l-3.6 1.6c-10.1 4.5-21.9-.1-26.4-10.2s.1-21.9 10.2-26.4l3.6-1.6c6.4-2.9 12.6-6.1 18.5-9.8l-12.2-12.2c-7.8-7.8-7.8-20.5 0-28.3s20.5-7.8 28.3 0l14.6 14.6 .5 .5c12.4-13.1 22.5-28.3 29.8-45L448 228l-72 0c-11 0-20-9-20-20s9-20 20-20l52 0 0-4c0-11 9-20 20-20z"]},Tx={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]},Cx={prefix:"fas",iconName:"question",icon:[320,512,[10067,10068,61736],"3f","M80 160c0-35.3 28.7-64 64-64l32 0c35.3 0 64 28.7 64 64l0 3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74l0 1.4c0 17.7 14.3 32 32 32s32-14.3 32-32l0-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7l0-3.6c0-70.7-57.3-128-128-128l-32 0C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},bg={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"]},Ci={prefix:"fas",iconName:"file-excel",icon:[384,512,[],"f1c3","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM155.7 250.2L192 302.1l36.3-51.9c7.6-10.9 22.6-13.5 33.4-5.9s13.5 22.6 5.9 33.4L221.3 344l46.4 66.2c7.6 10.9 5 25.8-5.9 33.4s-25.8 5-33.4-5.9L192 385.8l-36.3 51.9c-7.6 10.9-22.6 13.5-33.4 5.9s-13.5-22.6-5.9-33.4L162.7 344l-46.4-66.2c-7.6-10.9-5-25.8 5.9-33.4s25.8-5 33.4 5.9z"]},Ex={prefix:"fas",iconName:"heart",icon:[512,512,[128153,128154,128155,128156,128420,129293,129294,129505,9829,10084,61578],"f004","M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"]},sf={prefix:"fas",iconName:"recycle",icon:[512,512,[9842,9850,9851],"f1b8","M174.7 45.1C192.2 17 223 0 256 0s63.8 17 81.3 45.1l38.6 61.7 27-15.6c8.4-4.9 18.9-4.2 26.6 1.7s11.1 15.9 8.6 25.3l-23.4 87.4c-3.4 12.8-16.6 20.4-29.4 17l-87.4-23.4c-9.4-2.5-16.3-10.4-17.6-20s3.4-19.1 11.8-23.9l28.4-16.4L283 79c-5.8-9.3-16-15-27-15s-21.2 5.7-27 15l-17.5 28c-9.2 14.8-28.6 19.5-43.6 10.5c-15.3-9.2-20.2-29.2-10.7-44.4l17.5-28zM429.5 251.9c15-9 34.4-4.3 43.6 10.5l24.4 39.1c9.4 15.1 14.4 32.4 14.6 50.2c.3 53.1-42.7 96.4-95.8 96.4L320 448l0 32c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-64-64c-9.4-9.4-9.4-24.6 0-33.9l64-64c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 32 96.2 0c17.6 0 31.9-14.4 31.8-32c0-5.9-1.7-11.7-4.8-16.7l-24.4-39.1c-9.5-15.2-4.7-35.2 10.7-44.4zm-364.6-31L36 204.2c-8.4-4.9-13.1-14.3-11.8-23.9s8.2-17.5 17.6-20l87.4-23.4c12.8-3.4 26 4.2 29.4 17L182 241.2c2.5 9.4-.9 19.3-8.6 25.3s-18.2 6.6-26.6 1.7l-26.5-15.3L68.8 335.3c-3.1 5-4.8 10.8-4.8 16.7c-.1 17.6 14.2 32 31.8 32l32.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32.2 0C42.7 448-.3 404.8 0 351.6c.1-17.8 5.1-35.1 14.6-50.2l50.3-80.5z"]},Ei={prefix:"fas",iconName:"wrench",icon:[512,512,[128295],"f0ad","M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},Ox={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5L0 80C0 53.5 21.5 32 48 32l149.5 0c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Nx={prefix:"fas",iconName:"floppy-disk",icon:[448,512,[128190,128426,"save"],"f0c7","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-242.7c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32L64 32zm0 96c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L96 224c-17.7 0-32-14.3-32-32l0-64zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},Dx=Nx,Ot={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"]},Lx={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},La=Lx,xg={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},Rx=xg,rf={prefix:"fas",iconName:"hard-drive",icon:[512,512,[128436,"hdd"],"f0a0","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 184.4c-17-15.2-39.4-24.4-64-24.4L64 256c-24.6 0-47 9.2-64 24.4L0 96zM64 288l384 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64zM320 416a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm128-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Bx=rf,vg={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},Kx={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},of={prefix:"fas",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]},Ux={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},qx={prefix:"fas",iconName:"power-off",icon:[512,512,[9211],"f011","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 224c0 17.7 14.3 32 32 32s32-14.3 32-32l0-224zM143.5 120.6c13.6-11.3 15.4-31.5 4.1-45.1s-31.5-15.4-45.1-4.1C49.7 115.4 16 181.8 16 256c0 132.5 107.5 240 240 240s240-107.5 240-240c0-74.2-33.8-140.6-86.6-184.6c-13.6-11.3-33.8-9.4-45.1 4.1s-9.4 33.8 4.1 45.1c38.9 32.3 63.5 81 63.5 135.4c0 97.2-78.8 176-176 176s-176-78.8-176-176c0-54.4 24.7-103.1 63.5-135.4z"]},Hx={prefix:"fas",iconName:"closed-captioning",icon:[576,512,[],"f20a","M0 96C0 60.7 28.7 32 64 32l448 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"]},cf={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},Sg={prefix:"fas",iconName:"stop",icon:[384,512,[9209],"f04d","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"]},Vx={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},jg={prefix:"fas",iconName:"ellipsis",icon:[448,512,["ellipsis-h"],"f141","M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"]},Gx={prefix:"fas",iconName:"toolbox",icon:[512,512,[129520],"f552","M176 88l0 40 160 0 0-40c0-4.4-3.6-8-8-8L184 80c-4.4 0-8 3.6-8 8zm-48 40l0-40c0-30.9 25.1-56 56-56l144 0c30.9 0 56 25.1 56 56l0 40 28.1 0c12.7 0 24.9 5.1 33.9 14.1l51.9 51.9c9 9 14.1 21.2 14.1 33.9l0 92.1-128 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32-128 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L0 320l0-92.1c0-12.7 5.1-24.9 14.1-33.9l51.9-51.9c9-9 21.2-14.1 33.9-14.1l28.1 0zM0 416l0-64 128 0c0 17.7 14.3 32 32 32s32-14.3 32-32l128 0c0 17.7 14.3 32 32 32s32-14.3 32-32l128 0 0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64z"]},Yx={prefix:"fas",iconName:"bug",icon:[512,512,[],"f188","M256 0c53 0 96 43 96 96l0 3.6c0 15.7-12.7 28.4-28.4 28.4l-135.1 0c-15.7 0-28.4-12.7-28.4-28.4l0-3.6c0-53 43-96 96-96zM41.4 105.4c12.5-12.5 32.8-12.5 45.3 0l64 64c.7 .7 1.3 1.4 1.9 2.1c14.2-7.3 30.4-11.4 47.5-11.4l112 0c17.1 0 33.2 4.1 47.5 11.4c.6-.7 1.2-1.4 1.9-2.1l64-64c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-64 64c-.7 .7-1.4 1.3-2.1 1.9c6.2 12 10.1 25.3 11.1 39.5l64.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c0 24.6-5.5 47.8-15.4 68.6c2.2 1.3 4.2 2.9 6 4.8l64 64c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-63.1-63.1c-24.5 21.8-55.8 36.2-90.3 39.6L272 240c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 239.2c-34.5-3.4-65.8-17.8-90.3-39.6L86.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l64-64c1.9-1.9 3.9-3.4 6-4.8C101.5 367.8 96 344.6 96 320l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64.3 0c1.1-14.1 5-27.5 11.1-39.5c-.7-.6-1.4-1.2-2.1-1.9l-64-64c-12.5-12.5-12.5-32.8 0-45.3z"]},Fx={prefix:"fas",iconName:"bars-staggered",icon:[512,512,["reorder","stream"],"f550","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM64 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L96 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},Qx=Fx,Oi={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},Xx={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},Ra=Xx,Ix={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},Zx={prefix:"fas",iconName:"list-check",icon:[512,512,["tasks"],"f0ae","M152.1 38.2c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 113C-2.3 103.6-2.3 88.4 7 79s24.6-9.4 33.9 0l22.1 22.1 55.1-61.2c8.9-9.9 24-10.7 33.9-1.8zm0 160c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 273c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l22.1 22.1 55.1-61.2c8.9-9.9 24-10.7 33.9-1.8zM224 96c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32zm0 160c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32zM160 416c0-17.7 14.3-32 32-32l288 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-288 0c-17.7 0-32-14.3-32-32zM48 368a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},Px={prefix:"fas",iconName:"circle-half-stroke",icon:[512,512,[9680,"adjust"],"f042","M448 256c0-106-86-192-192-192l0 384c106 0 192-86 192-192zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},$x=Px,uf={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},wg={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},Mg=wg,Jx={prefix:"fas",iconName:"quote-left",icon:[448,512,[8220,"quote-left-alt"],"f10d","M0 216C0 149.7 53.7 96 120 96l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-32 0-32 0-72zm256 0c0-66.3 53.7-120 120-120l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-32 0-32 0-72z"]},Wx=Jx,ev={prefix:"fas",iconName:"equals",icon:[448,512,[62764],"3d","M48 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48 128zm0 192c-17.7 0-32 14.3-32 32s14.3 32 32 32l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48 320z"]},tv={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},nv=tv,av={prefix:"fas",iconName:"clock-rotate-left",icon:[512,512,["history"],"f1da","M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75zm181 53c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z"]},df=av,lv={prefix:"fas",iconName:"wand-magic",icon:[512,512,["magic"],"f0d0","M14.1 463.3c-18.7-18.7-18.7-49.1 0-67.9L395.4 14.1c18.7-18.7 49.1-18.7 67.9 0l34.6 34.6c18.7 18.7 18.7 49.1 0 67.9L116.5 497.9c-18.7 18.7-49.1 18.7-67.9 0L14.1 463.3zM347.6 187.6l105-105L429.4 59.3l-105 105 23.3 23.3z"]},sv=lv,iv={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},rv={prefix:"fas",iconName:"music",icon:[512,512,[127925],"f001","M499.1 6.3c8.1 6 12.9 15.6 12.9 25.7l0 72 0 264c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L448 147 192 223.8 192 432c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L128 200l0-72c0-14.1 9.3-26.6 22.8-30.7l320-96c9.7-2.9 20.2-1.1 28.3 5z"]},ov={prefix:"fas",iconName:"calendar",icon:[448,512,[128197,128198],"f133","M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z"]},cv={prefix:"fas",iconName:"clone",icon:[512,512,[],"f24d","M288 448L64 448l0-224 64 0 0-64-64 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-64-64 0 0 64zm-64-96l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64z"]},uv={prefix:"fas",iconName:"file-circle-plus",icon:[576,512,[58606],"e494","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zm48 96a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm16 80c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0 0-48z"]},To={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},dv={prefix:"fas",iconName:"briefcase",icon:[512,512,[128188],"f0b1","M184 48l144 0c4.4 0 8 3.6 8 8l0 40L176 96l0-40c0-4.4 3.6-8 8-8zm-56 8l0 40L64 96C28.7 96 0 124.7 0 160l0 96 192 0 128 0 192 0 0-96c0-35.3-28.7-64-64-64l-64 0 0-40c0-30.9-25.1-56-56-56L184 0c-30.9 0-56 25.1-56 56zM512 288l-192 0 0 32c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-32L0 288 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-128z"]},fv={prefix:"fas",iconName:"rectangle-xmark",icon:[512,512,[62164,"rectangle-times","times-rectangle","window-close"],"f410","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},hv=fv,kg={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},_g=kg,mv={prefix:"fas",iconName:"right-left",icon:[512,512,["exchange-alt"],"f362","M32 96l320 0 0-64c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l96 96c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-96 96c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-64L32 160c-17.7 0-32-14.3-32-32s14.3-32 32-32zM480 352c17.7 0 32 14.3 32 32s-14.3 32-32 32l-320 0 0 64c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-96-96c-6-6-9.4-14.1-9.4-22.6s3.4-16.6 9.4-22.6l96-96c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 64 320 0z"]},gv=mv,Fj={prefix:"fas",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"]};function pv(){const{data:a}=Nn();return{sonarr:(a==null?void 0:a.general.use_sonarr)??!1,radarr:(a==null?void 0:a.general.use_radarr)??!1}}function Ag(){const{data:a}=Nn();return(a==null?void 0:a.general.embedded_subs_show_desired)??!1}/*!
 * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 * Copyright 2024 Fonticons, Inc.
 */function yv(a,s,o){return(s=xv(s))in a?Object.defineProperty(a,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[s]=o,a}function Em(a,s){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);s&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(a,d).enumerable})),o.push.apply(o,r)}return o}function Y(a){for(var s=1;s<arguments.length;s++){var o=arguments[s]!=null?arguments[s]:{};s%2?Em(Object(o),!0).forEach(function(r){yv(a,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):Em(Object(o)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(o,r))})}return a}function bv(a,s){if(typeof a!="object"||!a)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var r=o.call(a,s);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function xv(a){var s=bv(a,"string");return typeof s=="symbol"?s:s+""}const Om=()=>{};let ff={},zg={},Tg=null,Cg={mark:Om,measure:Om};try{typeof window<"u"&&(ff=window),typeof document<"u"&&(zg=document),typeof MutationObserver<"u"&&(Tg=MutationObserver),typeof performance<"u"&&(Cg=performance)}catch{}const{userAgent:Nm=""}=ff.navigator||{},Ea=ff,qe=zg,Dm=Tg,oo=Cg;Ea.document;const ea=!!qe.documentElement&&!!qe.head&&typeof qe.addEventListener=="function"&&typeof qe.createElement=="function",Eg=~Nm.indexOf("MSIE")||~Nm.indexOf("Trident/");var vv=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,Sv=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Og={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},jv={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Ng=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],wt="classic",Co="duotone",wv="sharp",Mv="sharp-duotone",Dg=[wt,Co,wv,Mv],kv={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}},_v={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}},Av=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),zv={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}},Tv=["fak","fa-kit","fakd","fa-kit-duotone"],Lm={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},Cv=["kit"],Ev={kit:{"fa-kit":"fak"}},Ov=["fak","fakd"],Nv={kit:{fak:"fa-kit"}},Rm={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},co={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Dv=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Lv=["fak","fa-kit","fakd","fa-kit-duotone"],Rv={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Bv={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}},Kv={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]},kd={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},Uv=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],_d=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt",...Dv,...Uv],qv=["solid","regular","light","thin","duotone","brands"],Lg=[1,2,3,4,5,6,7,8,9,10],Hv=Lg.concat([11,12,13,14,15,16,17,18,19,20]),Vv=[...Object.keys(Kv),...qv,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",co.GROUP,co.SWAP_OPACITY,co.PRIMARY,co.SECONDARY].concat(Lg.map(a=>"".concat(a,"x"))).concat(Hv.map(a=>"w-".concat(a))),Gv={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}};const Jn="___FONT_AWESOME___",Ad=16,Rg="fa",Bg="svg-inline--fa",ul="data-fa-i2svg",zd="data-fa-pseudo-element",Yv="data-fa-pseudo-element-pending",hf="data-prefix",mf="data-icon",Bm="fontawesome-i2svg",Fv="async",Qv=["HTML","HEAD","STYLE","SCRIPT"],Kg=(()=>{try{return!0}catch{return!1}})();function Ni(a){return new Proxy(a,{get(s,o){return o in s?s[o]:s[wt]}})}const Ug=Y({},Og);Ug[wt]=Y(Y(Y(Y({},{"fa-duotone":"duotone"}),Og[wt]),Lm.kit),Lm["kit-duotone"]);const Xv=Ni(Ug),Td=Y({},zv);Td[wt]=Y(Y(Y(Y({},{duotone:"fad"}),Td[wt]),Rm.kit),Rm["kit-duotone"]);const Km=Ni(Td),Cd=Y({},kd);Cd[wt]=Y(Y({},Cd[wt]),Nv.kit);const gf=Ni(Cd),Ed=Y({},Bv);Ed[wt]=Y(Y({},Ed[wt]),Ev.kit);Ni(Ed);const Iv=vv,qg="fa-layers-text",Zv=Sv,Pv=Y({},kv);Ni(Pv);const $v=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],fd=jv,Jv=[...Cv,...Vv],ji=Ea.FontAwesomeConfig||{};function Wv(a){var s=qe.querySelector("script["+a+"]");if(s)return s.getAttribute(a)}function e5(a){return a===""?!0:a==="false"?!1:a==="true"?!0:a}qe&&typeof qe.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(s=>{let[o,r]=s;const d=e5(Wv(o));d!=null&&(ji[r]=d)});const Hg={styleDefault:"solid",familyDefault:wt,cssPrefix:Rg,replacementClass:Bg,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};ji.familyPrefix&&(ji.cssPrefix=ji.familyPrefix);const us=Y(Y({},Hg),ji);us.autoReplaceSvg||(us.observeMutations=!1);const J={};Object.keys(Hg).forEach(a=>{Object.defineProperty(J,a,{enumerable:!0,set:function(s){us[a]=s,wi.forEach(o=>o(J))},get:function(){return us[a]}})});Object.defineProperty(J,"familyPrefix",{enumerable:!0,set:function(a){us.cssPrefix=a,wi.forEach(s=>s(J))},get:function(){return us.cssPrefix}});Ea.FontAwesomeConfig=J;const wi=[];function t5(a){return wi.push(a),()=>{wi.splice(wi.indexOf(a),1)}}const _a=Ad,Cn={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function n5(a){if(!a||!ea)return;const s=qe.createElement("style");s.setAttribute("type","text/css"),s.innerHTML=a;const o=qe.head.childNodes;let r=null;for(let d=o.length-1;d>-1;d--){const f=o[d],h=(f.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(h)>-1&&(r=f)}return qe.head.insertBefore(s,r),a}const a5="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function ki(){let a=12,s="";for(;a-- >0;)s+=a5[Math.random()*62|0];return s}function bs(a){const s=[];for(let o=(a||[]).length>>>0;o--;)s[o]=a[o];return s}function pf(a){return a.classList?bs(a.classList):(a.getAttribute("class")||"").split(" ").filter(s=>s)}function Vg(a){return"".concat(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function l5(a){return Object.keys(a||{}).reduce((s,o)=>s+"".concat(o,'="').concat(Vg(a[o]),'" '),"").trim()}function Eo(a){return Object.keys(a||{}).reduce((s,o)=>s+"".concat(o,": ").concat(a[o].trim(),";"),"")}function yf(a){return a.size!==Cn.size||a.x!==Cn.x||a.y!==Cn.y||a.rotate!==Cn.rotate||a.flipX||a.flipY}function s5(a){let{transform:s,containerWidth:o,iconWidth:r}=a;const d={transform:"translate(".concat(o/2," 256)")},f="translate(".concat(s.x*32,", ").concat(s.y*32,") "),h="scale(".concat(s.size/16*(s.flipX?-1:1),", ").concat(s.size/16*(s.flipY?-1:1),") "),p="rotate(".concat(s.rotate," 0 0)"),b={transform:"".concat(f," ").concat(h," ").concat(p)},g={transform:"translate(".concat(r/2*-1," -256)")};return{outer:d,inner:b,path:g}}function i5(a){let{transform:s,width:o=Ad,height:r=Ad,startCentered:d=!1}=a,f="";return d&&Eg?f+="translate(".concat(s.x/_a-o/2,"em, ").concat(s.y/_a-r/2,"em) "):d?f+="translate(calc(-50% + ".concat(s.x/_a,"em), calc(-50% + ").concat(s.y/_a,"em)) "):f+="translate(".concat(s.x/_a,"em, ").concat(s.y/_a,"em) "),f+="scale(".concat(s.size/_a*(s.flipX?-1:1),", ").concat(s.size/_a*(s.flipY?-1:1),") "),f+="rotate(".concat(s.rotate,"deg) "),f}var r5=`:root, :host {
  --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";
  --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";
  --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";
  --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";
  --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
  --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone";
  --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone";
  --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone";
  --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
  --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";
  --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone";
  --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone";
  --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone";
}

svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
  overflow: visible;
  box-sizing: content-box;
}

.svg-inline--fa {
  display: var(--fa-display, inline-block);
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}
.svg-inline--fa.fa-2xs {
  vertical-align: 0.1em;
}
.svg-inline--fa.fa-xs {
  vertical-align: 0em;
}
.svg-inline--fa.fa-sm {
  vertical-align: -0.0714285705em;
}
.svg-inline--fa.fa-lg {
  vertical-align: -0.2em;
}
.svg-inline--fa.fa-xl {
  vertical-align: -0.25em;
}
.svg-inline--fa.fa-2xl {
  vertical-align: -0.3125em;
}
.svg-inline--fa.fa-pull-left {
  margin-right: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-pull-right {
  margin-left: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-li {
  width: var(--fa-li-width, 2em);
  top: 0.25em;
}
.svg-inline--fa.fa-fw {
  width: var(--fa-fw-width, 1.25em);
}

.fa-layers svg.svg-inline--fa {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}

.fa-layers-counter, .fa-layers-text {
  display: inline-block;
  position: absolute;
  text-align: center;
}

.fa-layers {
  display: inline-block;
  height: 1em;
  position: relative;
  text-align: center;
  vertical-align: -0.125em;
  width: 1em;
}
.fa-layers svg.svg-inline--fa {
  transform-origin: center center;
}

.fa-layers-text {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

.fa-layers-counter {
  background-color: var(--fa-counter-background-color, #ff253a);
  border-radius: var(--fa-counter-border-radius, 1em);
  box-sizing: border-box;
  color: var(--fa-inverse, #fff);
  line-height: var(--fa-counter-line-height, 1);
  max-width: var(--fa-counter-max-width, 5em);
  min-width: var(--fa-counter-min-width, 1.5em);
  overflow: hidden;
  padding: var(--fa-counter-padding, 0.25em 0.5em);
  right: var(--fa-right, 0);
  text-overflow: ellipsis;
  top: var(--fa-top, 0);
  transform: scale(var(--fa-counter-scale, 0.25));
  transform-origin: top right;
}

.fa-layers-bottom-right {
  bottom: var(--fa-bottom, 0);
  right: var(--fa-right, 0);
  top: auto;
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: bottom right;
}

.fa-layers-bottom-left {
  bottom: var(--fa-bottom, 0);
  left: var(--fa-left, 0);
  right: auto;
  top: auto;
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: bottom left;
}

.fa-layers-top-right {
  top: var(--fa-top, 0);
  right: var(--fa-right, 0);
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: top right;
}

.fa-layers-top-left {
  left: var(--fa-left, 0);
  right: auto;
  top: var(--fa-top, 0);
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: top left;
}

.fa-1x {
  font-size: 1em;
}

.fa-2x {
  font-size: 2em;
}

.fa-3x {
  font-size: 3em;
}

.fa-4x {
  font-size: 4em;
}

.fa-5x {
  font-size: 5em;
}

.fa-6x {
  font-size: 6em;
}

.fa-7x {
  font-size: 7em;
}

.fa-8x {
  font-size: 8em;
}

.fa-9x {
  font-size: 9em;
}

.fa-10x {
  font-size: 10em;
}

.fa-2xs {
  font-size: 0.625em;
  line-height: 0.1em;
  vertical-align: 0.225em;
}

.fa-xs {
  font-size: 0.75em;
  line-height: 0.0833333337em;
  vertical-align: 0.125em;
}

.fa-sm {
  font-size: 0.875em;
  line-height: 0.0714285718em;
  vertical-align: 0.0535714295em;
}

.fa-lg {
  font-size: 1.25em;
  line-height: 0.05em;
  vertical-align: -0.075em;
}

.fa-xl {
  font-size: 1.5em;
  line-height: 0.0416666682em;
  vertical-align: -0.125em;
}

.fa-2xl {
  font-size: 2em;
  line-height: 0.03125em;
  vertical-align: -0.1875em;
}

.fa-fw {
  text-align: center;
  width: 1.25em;
}

.fa-ul {
  list-style-type: none;
  margin-left: var(--fa-li-margin, 2.5em);
  padding-left: 0;
}
.fa-ul > li {
  position: relative;
}

.fa-li {
  left: calc(-1 * var(--fa-li-width, 2em));
  position: absolute;
  text-align: center;
  width: var(--fa-li-width, 2em);
  line-height: inherit;
}

.fa-border {
  border-color: var(--fa-border-color, #eee);
  border-radius: var(--fa-border-radius, 0.1em);
  border-style: var(--fa-border-style, solid);
  border-width: var(--fa-border-width, 0.08em);
  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
}

.fa-pull-left {
  float: left;
  margin-right: var(--fa-pull-margin, 0.3em);
}

.fa-pull-right {
  float: right;
  margin-left: var(--fa-pull-margin, 0.3em);
}

.fa-beat {
  animation-name: fa-beat;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-bounce {
  animation-name: fa-bounce;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
}

.fa-fade {
  animation-name: fa-fade;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-beat-fade {
  animation-name: fa-beat-fade;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-flip {
  animation-name: fa-flip;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-shake {
  animation-name: fa-shake;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin {
  animation-name: fa-spin;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 2s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin-reverse {
  --fa-animation-direction: reverse;
}

.fa-pulse,
.fa-spin-pulse {
  animation-name: fa-spin;
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, steps(8));
}

@media (prefers-reduced-motion: reduce) {
  .fa-beat,
.fa-bounce,
.fa-fade,
.fa-beat-fade,
.fa-flip,
.fa-pulse,
.fa-shake,
.fa-spin,
.fa-spin-pulse {
    animation-delay: -1ms;
    animation-duration: 1ms;
    animation-iteration-count: 1;
    transition-delay: 0s;
    transition-duration: 0s;
  }
}
@keyframes fa-beat {
  0%, 90% {
    transform: scale(1);
  }
  45% {
    transform: scale(var(--fa-beat-scale, 1.25));
  }
}
@keyframes fa-bounce {
  0% {
    transform: scale(1, 1) translateY(0);
  }
  10% {
    transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
  }
  30% {
    transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
  }
  50% {
    transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
  }
  57% {
    transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
  }
  64% {
    transform: scale(1, 1) translateY(0);
  }
  100% {
    transform: scale(1, 1) translateY(0);
  }
}
@keyframes fa-fade {
  50% {
    opacity: var(--fa-fade-opacity, 0.4);
  }
}
@keyframes fa-beat-fade {
  0%, 100% {
    opacity: var(--fa-beat-fade-opacity, 0.4);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(var(--fa-beat-fade-scale, 1.125));
  }
}
@keyframes fa-flip {
  50% {
    transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
  }
}
@keyframes fa-shake {
  0% {
    transform: rotate(-15deg);
  }
  4% {
    transform: rotate(15deg);
  }
  8%, 24% {
    transform: rotate(-18deg);
  }
  12%, 28% {
    transform: rotate(18deg);
  }
  16% {
    transform: rotate(-22deg);
  }
  20% {
    transform: rotate(22deg);
  }
  32% {
    transform: rotate(-12deg);
  }
  36% {
    transform: rotate(12deg);
  }
  40%, 100% {
    transform: rotate(0deg);
  }
}
@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.fa-rotate-90 {
  transform: rotate(90deg);
}

.fa-rotate-180 {
  transform: rotate(180deg);
}

.fa-rotate-270 {
  transform: rotate(270deg);
}

.fa-flip-horizontal {
  transform: scale(-1, 1);
}

.fa-flip-vertical {
  transform: scale(1, -1);
}

.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
  transform: scale(-1, -1);
}

.fa-rotate-by {
  transform: rotate(var(--fa-rotate-angle, 0));
}

.fa-stack {
  display: inline-block;
  vertical-align: middle;
  height: 2em;
  position: relative;
  width: 2.5em;
}

.fa-stack-1x,
.fa-stack-2x {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
  z-index: var(--fa-stack-z-index, auto);
}

.svg-inline--fa.fa-stack-1x {
  height: 1em;
  width: 1.25em;
}
.svg-inline--fa.fa-stack-2x {
  height: 2em;
  width: 2.5em;
}

.fa-inverse {
  color: var(--fa-inverse, #fff);
}

.sr-only,
.fa-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:not(:focus),
.fa-sr-only-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.svg-inline--fa .fa-primary {
  fill: var(--fa-primary-color, currentColor);
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa .fa-secondary {
  fill: var(--fa-secondary-color, currentColor);
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-primary {
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-secondary {
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa mask .fa-primary,
.svg-inline--fa mask .fa-secondary {
  fill: black;
}`;function Gg(){const a=Rg,s=Bg,o=J.cssPrefix,r=J.replacementClass;let d=r5;if(o!==a||r!==s){const f=new RegExp("\\.".concat(a,"\\-"),"g"),h=new RegExp("\\--".concat(a,"\\-"),"g"),p=new RegExp("\\.".concat(s),"g");d=d.replace(f,".".concat(o,"-")).replace(h,"--".concat(o,"-")).replace(p,".".concat(r))}return d}let Um=!1;function hd(){J.autoAddCss&&!Um&&(n5(Gg()),Um=!0)}var o5={mixout(){return{dom:{css:Gg,insertCss:hd}}},hooks(){return{beforeDOMElementCreation(){hd()},beforeI2svg(){hd()}}}};const Wn=Ea||{};Wn[Jn]||(Wn[Jn]={});Wn[Jn].styles||(Wn[Jn].styles={});Wn[Jn].hooks||(Wn[Jn].hooks={});Wn[Jn].shims||(Wn[Jn].shims=[]);var En=Wn[Jn];const Yg=[],Fg=function(){qe.removeEventListener("DOMContentLoaded",Fg),xo=1,Yg.map(a=>a())};let xo=!1;ea&&(xo=(qe.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(qe.readyState),xo||qe.addEventListener("DOMContentLoaded",Fg));function c5(a){ea&&(xo?setTimeout(a,0):Yg.push(a))}function Di(a){const{tag:s,attributes:o={},children:r=[]}=a;return typeof a=="string"?Vg(a):"<".concat(s," ").concat(l5(o),">").concat(r.map(Di).join(""),"</").concat(s,">")}function qm(a,s,o){if(a&&a[s]&&a[s][o])return{prefix:s,iconName:o,icon:a[s][o]}}var md=function(s,o,r,d){var f=Object.keys(s),h=f.length,p=o,b,g,x;for(r===void 0?(b=1,x=s[f[0]]):(b=0,x=r);b<h;b++)g=f[b],x=p(x,s[g],g,s);return x};function u5(a){const s=[];let o=0;const r=a.length;for(;o<r;){const d=a.charCodeAt(o++);if(d>=55296&&d<=56319&&o<r){const f=a.charCodeAt(o++);(f&64512)==56320?s.push(((d&1023)<<10)+(f&1023)+65536):(s.push(d),o--)}else s.push(d)}return s}function Od(a){const s=u5(a);return s.length===1?s[0].toString(16):null}function d5(a,s){const o=a.length;let r=a.charCodeAt(s),d;return r>=55296&&r<=56319&&o>s+1&&(d=a.charCodeAt(s+1),d>=56320&&d<=57343)?(r-55296)*1024+d-56320+65536:r}function Hm(a){return Object.keys(a).reduce((s,o)=>{const r=a[o];return!!r.icon?s[r.iconName]=r.icon:s[o]=r,s},{})}function Nd(a,s){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:r=!1}=o,d=Hm(s);typeof En.hooks.addPack=="function"&&!r?En.hooks.addPack(a,Hm(s)):En.styles[a]=Y(Y({},En.styles[a]||{}),d),a==="fas"&&Nd("fa",s)}const{styles:_i,shims:f5}=En,Qg=Object.keys(gf),h5=Qg.reduce((a,s)=>(a[s]=Object.keys(gf[s]),a),{});let bf=null,Xg={},Ig={},Zg={},Pg={},$g={};function m5(a){return~Jv.indexOf(a)}function g5(a,s){const o=s.split("-"),r=o[0],d=o.slice(1).join("-");return r===a&&d!==""&&!m5(d)?d:null}const Jg=()=>{const a=r=>md(_i,(d,f,h)=>(d[h]=md(f,r,{}),d),{});Xg=a((r,d,f)=>(d[3]&&(r[d[3]]=f),d[2]&&d[2].filter(p=>typeof p=="number").forEach(p=>{r[p.toString(16)]=f}),r)),Ig=a((r,d,f)=>(r[f]=f,d[2]&&d[2].filter(p=>typeof p=="string").forEach(p=>{r[p]=f}),r)),$g=a((r,d,f)=>{const h=d[2];return r[f]=f,h.forEach(p=>{r[p]=f}),r});const s="far"in _i||J.autoFetchSvg,o=md(f5,(r,d)=>{const f=d[0];let h=d[1];const p=d[2];return h==="far"&&!s&&(h="fas"),typeof f=="string"&&(r.names[f]={prefix:h,iconName:p}),typeof f=="number"&&(r.unicodes[f.toString(16)]={prefix:h,iconName:p}),r},{names:{},unicodes:{}});Zg=o.names,Pg=o.unicodes,bf=Oo(J.styleDefault,{family:J.familyDefault})};t5(a=>{bf=Oo(a.styleDefault,{family:J.familyDefault})});Jg();function xf(a,s){return(Xg[a]||{})[s]}function p5(a,s){return(Ig[a]||{})[s]}function rl(a,s){return($g[a]||{})[s]}function Wg(a){return Zg[a]||{prefix:null,iconName:null}}function y5(a){const s=Pg[a],o=xf("fas",a);return s||(o?{prefix:"fas",iconName:o}:null)||{prefix:null,iconName:null}}function Oa(){return bf}const ep=()=>({prefix:null,iconName:null,rest:[]});function b5(a){let s=wt;const o=Qg.reduce((r,d)=>(r[d]="".concat(J.cssPrefix,"-").concat(d),r),{});return Dg.forEach(r=>{(a.includes(o[r])||a.some(d=>h5[r].includes(d)))&&(s=r)}),s}function Oo(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:o=wt}=s,r=Xv[o][a];if(o===Co&&!a)return"fad";const d=Km[o][a]||Km[o][r],f=a in En.styles?a:null;return d||f||null}function x5(a){let s=[],o=null;return a.forEach(r=>{const d=g5(J.cssPrefix,r);d?o=d:r&&s.push(r)}),{iconName:o,rest:s}}function Vm(a){return a.sort().filter((s,o,r)=>r.indexOf(s)===o)}function No(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:o=!1}=s;let r=null;const d=_d.concat(Lv),f=Vm(a.filter(S=>d.includes(S))),h=Vm(a.filter(S=>!_d.includes(S))),p=f.filter(S=>(r=S,!Ng.includes(S))),[b=null]=p,g=b5(f),x=Y(Y({},x5(h)),{},{prefix:Oo(b,{family:g})});return Y(Y(Y({},x),w5({values:a,family:g,styles:_i,config:J,canonical:x,givenPrefix:r})),v5(o,r,x))}function v5(a,s,o){let{prefix:r,iconName:d}=o;if(a||!r||!d)return{prefix:r,iconName:d};const f=s==="fa"?Wg(d):{},h=rl(r,d);return d=f.iconName||h||d,r=f.prefix||r,r==="far"&&!_i.far&&_i.fas&&!J.autoFetchSvg&&(r="fas"),{prefix:r,iconName:d}}const S5=Dg.filter(a=>a!==wt||a!==Co),j5=Object.keys(kd).filter(a=>a!==wt).map(a=>Object.keys(kd[a])).flat();function w5(a){const{values:s,family:o,canonical:r,givenPrefix:d="",styles:f={},config:h={}}=a,p=o===Co,b=s.includes("fa-duotone")||s.includes("fad"),g=h.familyDefault==="duotone",x=r.prefix==="fad"||r.prefix==="fa-duotone";if(!p&&(b||g||x)&&(r.prefix="fad"),(s.includes("fa-brands")||s.includes("fab"))&&(r.prefix="fab"),!r.prefix&&S5.includes(o)&&(Object.keys(f).find(_=>j5.includes(_))||h.autoFetchSvg)){const _=Av.get(o).defaultShortPrefixId;r.prefix=_,r.iconName=rl(r.prefix,r.iconName)||r.iconName}return(r.prefix==="fa"||d==="fa")&&(r.prefix=Oa()||"fas"),r}class M5{constructor(){this.definitions={}}add(){for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];const d=o.reduce(this._pullDefinitions,{});Object.keys(d).forEach(f=>{this.definitions[f]=Y(Y({},this.definitions[f]||{}),d[f]),Nd(f,d[f]);const h=gf[wt][f];h&&Nd(h,d[f]),Jg()})}reset(){this.definitions={}}_pullDefinitions(s,o){const r=o.prefix&&o.iconName&&o.icon?{0:o}:o;return Object.keys(r).map(d=>{const{prefix:f,iconName:h,icon:p}=r[d],b=p[2];s[f]||(s[f]={}),b.length>0&&b.forEach(g=>{typeof g=="string"&&(s[f][g]=p)}),s[f][h]=p}),s}}let Gm=[],as={};const rs={},k5=Object.keys(rs);function _5(a,s){let{mixoutsTo:o}=s;return Gm=a,as={},Object.keys(rs).forEach(r=>{k5.indexOf(r)===-1&&delete rs[r]}),Gm.forEach(r=>{const d=r.mixout?r.mixout():{};if(Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(o[f]=d[f]),typeof d[f]=="object"&&Object.keys(d[f]).forEach(h=>{o[f]||(o[f]={}),o[f][h]=d[f][h]})}),r.hooks){const f=r.hooks();Object.keys(f).forEach(h=>{as[h]||(as[h]=[]),as[h].push(f[h])})}r.provides&&r.provides(rs)}),o}function Dd(a,s){for(var o=arguments.length,r=new Array(o>2?o-2:0),d=2;d<o;d++)r[d-2]=arguments[d];return(as[a]||[]).forEach(h=>{s=h.apply(null,[s,...r])}),s}function dl(a){for(var s=arguments.length,o=new Array(s>1?s-1:0),r=1;r<s;r++)o[r-1]=arguments[r];(as[a]||[]).forEach(f=>{f.apply(null,o)})}function Na(){const a=arguments[0],s=Array.prototype.slice.call(arguments,1);return rs[a]?rs[a].apply(null,s):void 0}function Ld(a){a.prefix==="fa"&&(a.prefix="fas");let{iconName:s}=a;const o=a.prefix||Oa();if(s)return s=rl(o,s)||s,qm(tp.definitions,o,s)||qm(En.styles,o,s)}const tp=new M5,A5=()=>{J.autoReplaceSvg=!1,J.observeMutations=!1,dl("noAuto")},z5={i2svg:function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ea?(dl("beforeI2svg",a),Na("pseudoElements2svg",a),Na("i2svg",a)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:s}=a;J.autoReplaceSvg===!1&&(J.autoReplaceSvg=!0),J.observeMutations=!0,c5(()=>{C5({autoReplaceSvgRoot:s}),dl("watch",a)})}},T5={icon:a=>{if(a===null)return null;if(typeof a=="object"&&a.prefix&&a.iconName)return{prefix:a.prefix,iconName:rl(a.prefix,a.iconName)||a.iconName};if(Array.isArray(a)&&a.length===2){const s=a[1].indexOf("fa-")===0?a[1].slice(3):a[1],o=Oo(a[0]);return{prefix:o,iconName:rl(o,s)||s}}if(typeof a=="string"&&(a.indexOf("".concat(J.cssPrefix,"-"))>-1||a.match(Iv))){const s=No(a.split(" "),{skipLookups:!0});return{prefix:s.prefix||Oa(),iconName:rl(s.prefix,s.iconName)||s.iconName}}if(typeof a=="string"){const s=Oa();return{prefix:s,iconName:rl(s,a)||a}}}},Pt={noAuto:A5,config:J,dom:z5,parse:T5,library:tp,findIconDefinition:Ld,toHtml:Di},C5=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:s=qe}=a;(Object.keys(En.styles).length>0||J.autoFetchSvg)&&ea&&J.autoReplaceSvg&&Pt.dom.i2svg({node:s})};function Do(a,s){return Object.defineProperty(a,"abstract",{get:s}),Object.defineProperty(a,"html",{get:function(){return a.abstract.map(o=>Di(o))}}),Object.defineProperty(a,"node",{get:function(){if(!ea)return;const o=qe.createElement("div");return o.innerHTML=a.html,o.children}}),a}function E5(a){let{children:s,main:o,mask:r,attributes:d,styles:f,transform:h}=a;if(yf(h)&&o.found&&!r.found){const{width:p,height:b}=o,g={x:p/b/2,y:.5};d.style=Eo(Y(Y({},f),{},{"transform-origin":"".concat(g.x+h.x/16,"em ").concat(g.y+h.y/16,"em")}))}return[{tag:"svg",attributes:d,children:s}]}function O5(a){let{prefix:s,iconName:o,children:r,attributes:d,symbol:f}=a;const h=f===!0?"".concat(s,"-").concat(J.cssPrefix,"-").concat(o):f;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Y(Y({},d),{},{id:h}),children:r}]}]}function vf(a){const{icons:{main:s,mask:o},prefix:r,iconName:d,transform:f,symbol:h,title:p,maskId:b,titleId:g,extra:x,watchable:S=!1}=a,{width:_,height:A}=o.found?o:s,T=Ov.includes(r),D=[J.replacementClass,d?"".concat(J.cssPrefix,"-").concat(d):""].filter(F=>x.classes.indexOf(F)===-1).filter(F=>F!==""||!!F).concat(x.classes).join(" ");let L={children:[],attributes:Y(Y({},x.attributes),{},{"data-prefix":r,"data-icon":d,class:D,role:x.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(_," ").concat(A)})};const M=T&&!~x.classes.indexOf("fa-fw")?{width:"".concat(_/A*16*.0625,"em")}:{};S&&(L.attributes[ul]=""),p&&(L.children.push({tag:"title",attributes:{id:L.attributes["aria-labelledby"]||"title-".concat(g||ki())},children:[p]}),delete L.attributes.title);const U=Y(Y({},L),{},{prefix:r,iconName:d,main:s,mask:o,maskId:b,transform:f,symbol:h,styles:Y(Y({},M),x.styles)}),{children:H,attributes:R}=o.found&&s.found?Na("generateAbstractMask",U)||{children:[],attributes:{}}:Na("generateAbstractIcon",U)||{children:[],attributes:{}};return U.children=H,U.attributes=R,h?O5(U):E5(U)}function Ym(a){const{content:s,width:o,height:r,transform:d,title:f,extra:h,watchable:p=!1}=a,b=Y(Y(Y({},h.attributes),f?{title:f}:{}),{},{class:h.classes.join(" ")});p&&(b[ul]="");const g=Y({},h.styles);yf(d)&&(g.transform=i5({transform:d,startCentered:!0,width:o,height:r}),g["-webkit-transform"]=g.transform);const x=Eo(g);x.length>0&&(b.style=x);const S=[];return S.push({tag:"span",attributes:b,children:[s]}),f&&S.push({tag:"span",attributes:{class:"sr-only"},children:[f]}),S}function N5(a){const{content:s,title:o,extra:r}=a,d=Y(Y(Y({},r.attributes),o?{title:o}:{}),{},{class:r.classes.join(" ")}),f=Eo(r.styles);f.length>0&&(d.style=f);const h=[];return h.push({tag:"span",attributes:d,children:[s]}),o&&h.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),h}const{styles:gd}=En;function Rd(a){const s=a[0],o=a[1],[r]=a.slice(4);let d=null;return Array.isArray(r)?d={tag:"g",attributes:{class:"".concat(J.cssPrefix,"-").concat(fd.GROUP)},children:[{tag:"path",attributes:{class:"".concat(J.cssPrefix,"-").concat(fd.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(J.cssPrefix,"-").concat(fd.PRIMARY),fill:"currentColor",d:r[1]}}]}:d={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:s,height:o,icon:d}}const D5={found:!1,width:512,height:512};function L5(a,s){!Kg&&!J.showMissingIcons&&a&&console.error('Icon with name "'.concat(a,'" and prefix "').concat(s,'" is missing.'))}function Bd(a,s){let o=s;return s==="fa"&&J.styleDefault!==null&&(s=Oa()),new Promise((r,d)=>{if(o==="fa"){const f=Wg(a)||{};a=f.iconName||a,s=f.prefix||s}if(a&&s&&gd[s]&&gd[s][a]){const f=gd[s][a];return r(Rd(f))}L5(a,s),r(Y(Y({},D5),{},{icon:J.showMissingIcons&&a?Na("missingIconAbstract")||{}:{}}))})}const Fm=()=>{},Kd=J.measurePerformance&&oo&&oo.mark&&oo.measure?oo:{mark:Fm,measure:Fm},xi='FA "6.7.2"',R5=a=>(Kd.mark("".concat(xi," ").concat(a," begins")),()=>np(a)),np=a=>{Kd.mark("".concat(xi," ").concat(a," ends")),Kd.measure("".concat(xi," ").concat(a),"".concat(xi," ").concat(a," begins"),"".concat(xi," ").concat(a," ends"))};var Sf={begin:R5,end:np};const fo=()=>{};function Qm(a){return typeof(a.getAttribute?a.getAttribute(ul):null)=="string"}function B5(a){const s=a.getAttribute?a.getAttribute(hf):null,o=a.getAttribute?a.getAttribute(mf):null;return s&&o}function K5(a){return a&&a.classList&&a.classList.contains&&a.classList.contains(J.replacementClass)}function U5(){return J.autoReplaceSvg===!0?ho.replace:ho[J.autoReplaceSvg]||ho.replace}function q5(a){return qe.createElementNS("http://www.w3.org/2000/svg",a)}function H5(a){return qe.createElement(a)}function ap(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:o=a.tag==="svg"?q5:H5}=s;if(typeof a=="string")return qe.createTextNode(a);const r=o(a.tag);return Object.keys(a.attributes||[]).forEach(function(f){r.setAttribute(f,a.attributes[f])}),(a.children||[]).forEach(function(f){r.appendChild(ap(f,{ceFn:o}))}),r}function V5(a){let s=" ".concat(a.outerHTML," ");return s="".concat(s,"Font Awesome fontawesome.com "),s}const ho={replace:function(a){const s=a[0];if(s.parentNode)if(a[1].forEach(o=>{s.parentNode.insertBefore(ap(o),s)}),s.getAttribute(ul)===null&&J.keepOriginalSource){let o=qe.createComment(V5(s));s.parentNode.replaceChild(o,s)}else s.remove()},nest:function(a){const s=a[0],o=a[1];if(~pf(s).indexOf(J.replacementClass))return ho.replace(a);const r=new RegExp("".concat(J.cssPrefix,"-.*"));if(delete o[0].attributes.id,o[0].attributes.class){const f=o[0].attributes.class.split(" ").reduce((h,p)=>(p===J.replacementClass||p.match(r)?h.toSvg.push(p):h.toNode.push(p),h),{toNode:[],toSvg:[]});o[0].attributes.class=f.toSvg.join(" "),f.toNode.length===0?s.removeAttribute("class"):s.setAttribute("class",f.toNode.join(" "))}const d=o.map(f=>Di(f)).join(`
`);s.setAttribute(ul,""),s.innerHTML=d}};function Xm(a){a()}function lp(a,s){const o=typeof s=="function"?s:fo;if(a.length===0)o();else{let r=Xm;J.mutateApproach===Fv&&(r=Ea.requestAnimationFrame||Xm),r(()=>{const d=U5(),f=Sf.begin("mutate");a.map(d),f(),o()})}}let jf=!1;function sp(){jf=!0}function Ud(){jf=!1}let vo=null;function Im(a){if(!Dm||!J.observeMutations)return;const{treeCallback:s=fo,nodeCallback:o=fo,pseudoElementsCallback:r=fo,observeMutationsRoot:d=qe}=a;vo=new Dm(f=>{if(jf)return;const h=Oa();bs(f).forEach(p=>{if(p.type==="childList"&&p.addedNodes.length>0&&!Qm(p.addedNodes[0])&&(J.searchPseudoElements&&r(p.target),s(p.target)),p.type==="attributes"&&p.target.parentNode&&J.searchPseudoElements&&r(p.target.parentNode),p.type==="attributes"&&Qm(p.target)&&~$v.indexOf(p.attributeName))if(p.attributeName==="class"&&B5(p.target)){const{prefix:b,iconName:g}=No(pf(p.target));p.target.setAttribute(hf,b||h),g&&p.target.setAttribute(mf,g)}else K5(p.target)&&o(p.target)})}),ea&&vo.observe(d,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function G5(){vo&&vo.disconnect()}function Y5(a){const s=a.getAttribute("style");let o=[];return s&&(o=s.split(";").reduce((r,d)=>{const f=d.split(":"),h=f[0],p=f.slice(1);return h&&p.length>0&&(r[h]=p.join(":").trim()),r},{})),o}function F5(a){const s=a.getAttribute("data-prefix"),o=a.getAttribute("data-icon"),r=a.innerText!==void 0?a.innerText.trim():"";let d=No(pf(a));return d.prefix||(d.prefix=Oa()),s&&o&&(d.prefix=s,d.iconName=o),d.iconName&&d.prefix||(d.prefix&&r.length>0&&(d.iconName=p5(d.prefix,a.innerText)||xf(d.prefix,Od(a.innerText))),!d.iconName&&J.autoFetchSvg&&a.firstChild&&a.firstChild.nodeType===Node.TEXT_NODE&&(d.iconName=a.firstChild.data)),d}function Q5(a){const s=bs(a.attributes).reduce((d,f)=>(d.name!=="class"&&d.name!=="style"&&(d[f.name]=f.value),d),{}),o=a.getAttribute("title"),r=a.getAttribute("data-fa-title-id");return J.autoA11y&&(o?s["aria-labelledby"]="".concat(J.replacementClass,"-title-").concat(r||ki()):(s["aria-hidden"]="true",s.focusable="false")),s}function X5(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Cn,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Zm(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:o,prefix:r,rest:d}=F5(a),f=Q5(a),h=Dd("parseNodeAttributes",{},a);let p=s.styleParser?Y5(a):[];return Y({iconName:o,title:a.getAttribute("title"),titleId:a.getAttribute("data-fa-title-id"),prefix:r,transform:Cn,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:d,styles:p,attributes:f}},h)}const{styles:I5}=En;function ip(a){const s=J.autoReplaceSvg==="nest"?Zm(a,{styleParser:!1}):Zm(a);return~s.extra.classes.indexOf(qg)?Na("generateLayersText",a,s):Na("generateSvgReplacementMutation",a,s)}function Z5(){return[...Tv,..._d]}function Pm(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ea)return Promise.resolve();const o=qe.documentElement.classList,r=x=>o.add("".concat(Bm,"-").concat(x)),d=x=>o.remove("".concat(Bm,"-").concat(x)),f=J.autoFetchSvg?Z5():Ng.concat(Object.keys(I5));f.includes("fa")||f.push("fa");const h=[".".concat(qg,":not([").concat(ul,"])")].concat(f.map(x=>".".concat(x,":not([").concat(ul,"])"))).join(", ");if(h.length===0)return Promise.resolve();let p=[];try{p=bs(a.querySelectorAll(h))}catch{}if(p.length>0)r("pending"),d("complete");else return Promise.resolve();const b=Sf.begin("onTree"),g=p.reduce((x,S)=>{try{const _=ip(S);_&&x.push(_)}catch(_){Kg||_.name==="MissingIcon"&&console.error(_)}return x},[]);return new Promise((x,S)=>{Promise.all(g).then(_=>{lp(_,()=>{r("active"),r("complete"),d("pending"),typeof s=="function"&&s(),b(),x()})}).catch(_=>{b(),S(_)})})}function P5(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;ip(a).then(o=>{o&&lp([o],s)})}function $5(a){return function(s){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=(s||{}).icon?s:Ld(s||{});let{mask:d}=o;return d&&(d=(d||{}).icon?d:Ld(d||{})),a(r,Y(Y({},o),{},{mask:d}))}}const J5=function(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:o=Cn,symbol:r=!1,mask:d=null,maskId:f=null,title:h=null,titleId:p=null,classes:b=[],attributes:g={},styles:x={}}=s;if(!a)return;const{prefix:S,iconName:_,icon:A}=a;return Do(Y({type:"icon"},a),()=>(dl("beforeDOMElementCreation",{iconDefinition:a,params:s}),J.autoA11y&&(h?g["aria-labelledby"]="".concat(J.replacementClass,"-title-").concat(p||ki()):(g["aria-hidden"]="true",g.focusable="false")),vf({icons:{main:Rd(A),mask:d?Rd(d.icon):{found:!1,width:null,height:null,icon:{}}},prefix:S,iconName:_,transform:Y(Y({},Cn),o),symbol:r,title:h,maskId:f,titleId:p,extra:{attributes:g,styles:x,classes:b}})))};var W5={mixout(){return{icon:$5(J5)}},hooks(){return{mutationObserverCallbacks(a){return a.treeCallback=Pm,a.nodeCallback=P5,a}}},provides(a){a.i2svg=function(s){const{node:o=qe,callback:r=()=>{}}=s;return Pm(o,r)},a.generateSvgReplacementMutation=function(s,o){const{iconName:r,title:d,titleId:f,prefix:h,transform:p,symbol:b,mask:g,maskId:x,extra:S}=o;return new Promise((_,A)=>{Promise.all([Bd(r,h),g.iconName?Bd(g.iconName,g.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(T=>{let[D,L]=T;_([s,vf({icons:{main:D,mask:L},prefix:h,iconName:r,transform:p,symbol:b,maskId:x,title:d,titleId:f,extra:S,watchable:!0})])}).catch(A)})},a.generateAbstractIcon=function(s){let{children:o,attributes:r,main:d,transform:f,styles:h}=s;const p=Eo(h);p.length>0&&(r.style=p);let b;return yf(f)&&(b=Na("generateAbstractTransformGrouping",{main:d,transform:f,containerWidth:d.width,iconWidth:d.width})),o.push(b||d.icon),{children:o,attributes:r}}}},e8={mixout(){return{layer(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:o=[]}=s;return Do({type:"layer"},()=>{dl("beforeDOMElementCreation",{assembler:a,params:s});let r=[];return a(d=>{Array.isArray(d)?d.map(f=>{r=r.concat(f.abstract)}):r=r.concat(d.abstract)}),[{tag:"span",attributes:{class:["".concat(J.cssPrefix,"-layers"),...o].join(" ")},children:r}]})}}}},t8={mixout(){return{counter(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{title:o=null,classes:r=[],attributes:d={},styles:f={}}=s;return Do({type:"counter",content:a},()=>(dl("beforeDOMElementCreation",{content:a,params:s}),N5({content:a.toString(),title:o,extra:{attributes:d,styles:f,classes:["".concat(J.cssPrefix,"-layers-counter"),...r]}})))}}}},n8={mixout(){return{text(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:o=Cn,title:r=null,classes:d=[],attributes:f={},styles:h={}}=s;return Do({type:"text",content:a},()=>(dl("beforeDOMElementCreation",{content:a,params:s}),Ym({content:a,transform:Y(Y({},Cn),o),title:r,extra:{attributes:f,styles:h,classes:["".concat(J.cssPrefix,"-layers-text"),...d]}})))}}},provides(a){a.generateLayersText=function(s,o){const{title:r,transform:d,extra:f}=o;let h=null,p=null;if(Eg){const b=parseInt(getComputedStyle(s).fontSize,10),g=s.getBoundingClientRect();h=g.width/b,p=g.height/b}return J.autoA11y&&!r&&(f.attributes["aria-hidden"]="true"),Promise.resolve([s,Ym({content:s.innerHTML,width:h,height:p,transform:d,title:r,extra:f,watchable:!0})])}}};const a8=new RegExp('"',"ug"),$m=[1105920,1112319],Jm=Y(Y(Y(Y({},{FontAwesome:{normal:"fas",400:"fas"}}),_v),Gv),Rv),qd=Object.keys(Jm).reduce((a,s)=>(a[s.toLowerCase()]=Jm[s],a),{}),l8=Object.keys(qd).reduce((a,s)=>{const o=qd[s];return a[s]=o[900]||[...Object.entries(o)][0][1],a},{});function s8(a){const s=a.replace(a8,""),o=d5(s,0),r=o>=$m[0]&&o<=$m[1],d=s.length===2?s[0]===s[1]:!1;return{value:Od(d?s[0]:s),isSecondary:r||d}}function i8(a,s){const o=a.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(s),d=isNaN(r)?"normal":r;return(qd[o]||{})[d]||l8[o]}function Wm(a,s){const o="".concat(Yv).concat(s.replace(":","-"));return new Promise((r,d)=>{if(a.getAttribute(o)!==null)return r();const h=bs(a.children).filter(_=>_.getAttribute(zd)===s)[0],p=Ea.getComputedStyle(a,s),b=p.getPropertyValue("font-family"),g=b.match(Zv),x=p.getPropertyValue("font-weight"),S=p.getPropertyValue("content");if(h&&!g)return a.removeChild(h),r();if(g&&S!=="none"&&S!==""){const _=p.getPropertyValue("content");let A=i8(b,x);const{value:T,isSecondary:D}=s8(_),L=g[0].startsWith("FontAwesome");let M=xf(A,T),U=M;if(L){const H=y5(T);H.iconName&&H.prefix&&(M=H.iconName,A=H.prefix)}if(M&&!D&&(!h||h.getAttribute(hf)!==A||h.getAttribute(mf)!==U)){a.setAttribute(o,U),h&&a.removeChild(h);const H=X5(),{extra:R}=H;R.attributes[zd]=s,Bd(M,A).then(F=>{const oe=vf(Y(Y({},H),{},{icons:{main:F,mask:ep()},prefix:A,iconName:U,extra:R,watchable:!0})),te=qe.createElementNS("http://www.w3.org/2000/svg","svg");s==="::before"?a.insertBefore(te,a.firstChild):a.appendChild(te),te.outerHTML=oe.map(Te=>Di(Te)).join(`
`),a.removeAttribute(o),r()}).catch(d)}else r()}else r()})}function r8(a){return Promise.all([Wm(a,"::before"),Wm(a,"::after")])}function o8(a){return a.parentNode!==document.head&&!~Qv.indexOf(a.tagName.toUpperCase())&&!a.getAttribute(zd)&&(!a.parentNode||a.parentNode.tagName!=="svg")}function e0(a){if(ea)return new Promise((s,o)=>{const r=bs(a.querySelectorAll("*")).filter(o8).map(r8),d=Sf.begin("searchPseudoElements");sp(),Promise.all(r).then(()=>{d(),Ud(),s()}).catch(()=>{d(),Ud(),o()})})}var c8={hooks(){return{mutationObserverCallbacks(a){return a.pseudoElementsCallback=e0,a}}},provides(a){a.pseudoElements2svg=function(s){const{node:o=qe}=s;J.searchPseudoElements&&e0(o)}}};let t0=!1;var u8={mixout(){return{dom:{unwatch(){sp(),t0=!0}}}},hooks(){return{bootstrap(){Im(Dd("mutationObserverCallbacks",{}))},noAuto(){G5()},watch(a){const{observeMutationsRoot:s}=a;t0?Ud():Im(Dd("mutationObserverCallbacks",{observeMutationsRoot:s}))}}}};const n0=a=>{let s={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return a.toLowerCase().split(" ").reduce((o,r)=>{const d=r.toLowerCase().split("-"),f=d[0];let h=d.slice(1).join("-");if(f&&h==="h")return o.flipX=!0,o;if(f&&h==="v")return o.flipY=!0,o;if(h=parseFloat(h),isNaN(h))return o;switch(f){case"grow":o.size=o.size+h;break;case"shrink":o.size=o.size-h;break;case"left":o.x=o.x-h;break;case"right":o.x=o.x+h;break;case"up":o.y=o.y-h;break;case"down":o.y=o.y+h;break;case"rotate":o.rotate=o.rotate+h;break}return o},s)};var d8={mixout(){return{parse:{transform:a=>n0(a)}}},hooks(){return{parseNodeAttributes(a,s){const o=s.getAttribute("data-fa-transform");return o&&(a.transform=n0(o)),a}}},provides(a){a.generateAbstractTransformGrouping=function(s){let{main:o,transform:r,containerWidth:d,iconWidth:f}=s;const h={transform:"translate(".concat(d/2," 256)")},p="translate(".concat(r.x*32,", ").concat(r.y*32,") "),b="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),g="rotate(".concat(r.rotate," 0 0)"),x={transform:"".concat(p," ").concat(b," ").concat(g)},S={transform:"translate(".concat(f/2*-1," -256)")},_={outer:h,inner:x,path:S};return{tag:"g",attributes:Y({},_.outer),children:[{tag:"g",attributes:Y({},_.inner),children:[{tag:o.icon.tag,children:o.icon.children,attributes:Y(Y({},o.icon.attributes),_.path)}]}]}}}};const pd={x:0,y:0,width:"100%",height:"100%"};function a0(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return a.attributes&&(a.attributes.fill||s)&&(a.attributes.fill="black"),a}function f8(a){return a.tag==="g"?a.children:[a]}var h8={hooks(){return{parseNodeAttributes(a,s){const o=s.getAttribute("data-fa-mask"),r=o?No(o.split(" ").map(d=>d.trim())):ep();return r.prefix||(r.prefix=Oa()),a.mask=r,a.maskId=s.getAttribute("data-fa-mask-id"),a}}},provides(a){a.generateAbstractMask=function(s){let{children:o,attributes:r,main:d,mask:f,maskId:h,transform:p}=s;const{width:b,icon:g}=d,{width:x,icon:S}=f,_=s5({transform:p,containerWidth:x,iconWidth:b}),A={tag:"rect",attributes:Y(Y({},pd),{},{fill:"white"})},T=g.children?{children:g.children.map(a0)}:{},D={tag:"g",attributes:Y({},_.inner),children:[a0(Y({tag:g.tag,attributes:Y(Y({},g.attributes),_.path)},T))]},L={tag:"g",attributes:Y({},_.outer),children:[D]},M="mask-".concat(h||ki()),U="clip-".concat(h||ki()),H={tag:"mask",attributes:Y(Y({},pd),{},{id:M,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[A,L]},R={tag:"defs",children:[{tag:"clipPath",attributes:{id:U},children:f8(S)},H]};return o.push(R,{tag:"rect",attributes:Y({fill:"currentColor","clip-path":"url(#".concat(U,")"),mask:"url(#".concat(M,")")},pd)}),{children:o,attributes:r}}}},m8={provides(a){let s=!1;Ea.matchMedia&&(s=Ea.matchMedia("(prefers-reduced-motion: reduce)").matches),a.missingIconAbstract=function(){const o=[],r={fill:"currentColor"},d={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};o.push({tag:"path",attributes:Y(Y({},r),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const f=Y(Y({},d),{},{attributeName:"opacity"}),h={tag:"circle",attributes:Y(Y({},r),{},{cx:"256",cy:"364",r:"28"}),children:[]};return s||h.children.push({tag:"animate",attributes:Y(Y({},d),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Y(Y({},f),{},{values:"1;0;1;1;0;1;"})}),o.push(h),o.push({tag:"path",attributes:Y(Y({},r),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:s?[]:[{tag:"animate",attributes:Y(Y({},f),{},{values:"1;0;0;0;0;1;"})}]}),s||o.push({tag:"path",attributes:Y(Y({},r),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Y(Y({},f),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:o}}}},g8={hooks(){return{parseNodeAttributes(a,s){const o=s.getAttribute("data-fa-symbol"),r=o===null?!1:o===""?!0:o;return a.symbol=r,a}}}},p8=[o5,W5,e8,t8,n8,c8,u8,d8,h8,m8,g8];_5(p8,{mixoutsTo:Pt});Pt.noAuto;Pt.config;Pt.library;Pt.dom;const Hd=Pt.parse;Pt.findIconDefinition;Pt.toHtml;const y8=Pt.icon;Pt.layer;Pt.text;Pt.counter;function l0(a,s){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);s&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(a,d).enumerable})),o.push.apply(o,r)}return o}function zn(a){for(var s=1;s<arguments.length;s++){var o=arguments[s]!=null?arguments[s]:{};s%2?l0(Object(o),!0).forEach(function(r){ls(a,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):l0(Object(o)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(o,r))})}return a}function So(a){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},So(a)}function ls(a,s,o){return s in a?Object.defineProperty(a,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[s]=o,a}function b8(a,s){if(a==null)return{};var o={},r=Object.keys(a),d,f;for(f=0;f<r.length;f++)d=r[f],!(s.indexOf(d)>=0)&&(o[d]=a[d]);return o}function x8(a,s){if(a==null)return{};var o=b8(a,s),r,d;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)r=f[d],!(s.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(a,r)&&(o[r]=a[r])}return o}function Vd(a){return v8(a)||S8(a)||j8(a)||w8()}function v8(a){if(Array.isArray(a))return Gd(a)}function S8(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function j8(a,s){if(a){if(typeof a=="string")return Gd(a,s);var o=Object.prototype.toString.call(a).slice(8,-1);if(o==="Object"&&a.constructor&&(o=a.constructor.name),o==="Map"||o==="Set")return Array.from(a);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Gd(a,s)}}function Gd(a,s){(s==null||s>a.length)&&(s=a.length);for(var o=0,r=new Array(s);o<s;o++)r[o]=a[o];return r}function w8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M8(a){var s,o=a.beat,r=a.fade,d=a.beatFade,f=a.bounce,h=a.shake,p=a.flash,b=a.spin,g=a.spinPulse,x=a.spinReverse,S=a.pulse,_=a.fixedWidth,A=a.inverse,T=a.border,D=a.listItem,L=a.flip,M=a.size,U=a.rotation,H=a.pull,R=(s={"fa-beat":o,"fa-fade":r,"fa-beat-fade":d,"fa-bounce":f,"fa-shake":h,"fa-flash":p,"fa-spin":b,"fa-spin-reverse":x,"fa-spin-pulse":g,"fa-pulse":S,"fa-fw":_,"fa-inverse":A,"fa-border":T,"fa-li":D,"fa-flip":L===!0,"fa-flip-horizontal":L==="horizontal"||L==="both","fa-flip-vertical":L==="vertical"||L==="both"},ls(s,"fa-".concat(M),typeof M<"u"&&M!==null),ls(s,"fa-rotate-".concat(U),typeof U<"u"&&U!==null&&U!==0),ls(s,"fa-pull-".concat(H),typeof H<"u"&&H!==null),ls(s,"fa-swap-opacity",a.swapOpacity),s);return Object.keys(R).map(function(F){return R[F]?F:null}).filter(function(F){return F})}function k8(a){return a=a-0,a===a}function rp(a){return k8(a)?a:(a=a.replace(/[\-_\s]+(.)?/g,function(s,o){return o?o.toUpperCase():""}),a.substr(0,1).toLowerCase()+a.substr(1))}var _8=["style"];function A8(a){return a.charAt(0).toUpperCase()+a.slice(1)}function z8(a){return a.split(";").map(function(s){return s.trim()}).filter(function(s){return s}).reduce(function(s,o){var r=o.indexOf(":"),d=rp(o.slice(0,r)),f=o.slice(r+1).trim();return d.startsWith("webkit")?s[A8(d)]=f:s[d]=f,s},{})}function op(a,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof s=="string")return s;var r=(s.children||[]).map(function(b){return op(a,b)}),d=Object.keys(s.attributes||{}).reduce(function(b,g){var x=s.attributes[g];switch(g){case"class":b.attrs.className=x,delete s.attributes.class;break;case"style":b.attrs.style=z8(x);break;default:g.indexOf("aria-")===0||g.indexOf("data-")===0?b.attrs[g.toLowerCase()]=x:b.attrs[rp(g)]=x}return b},{attrs:{}}),f=o.style,h=f===void 0?{}:f,p=x8(o,_8);return d.attrs.style=zn(zn({},d.attrs.style),h),a.apply(void 0,[s.tag,zn(zn({},d.attrs),p)].concat(Vd(r)))}var cp=!1;try{cp=!0}catch{}function T8(){if(!cp&&console&&typeof console.error=="function"){var a;(a=console).error.apply(a,arguments)}}function s0(a){if(a&&So(a)==="object"&&a.prefix&&a.iconName&&a.icon)return a;if(Hd.icon)return Hd.icon(a);if(a===null)return null;if(a&&So(a)==="object"&&a.prefix&&a.iconName)return a;if(Array.isArray(a)&&a.length===2)return{prefix:a[0],iconName:a[1]};if(typeof a=="string")return{prefix:"fas",iconName:a}}function yd(a,s){return Array.isArray(s)&&s.length>0||!Array.isArray(s)&&s?ls({},a,s):{}}var i0={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},ee=Ta.forwardRef(function(a,s){var o=zn(zn({},i0),a),r=o.icon,d=o.mask,f=o.symbol,h=o.className,p=o.title,b=o.titleId,g=o.maskId,x=s0(r),S=yd("classes",[].concat(Vd(M8(o)),Vd((h||"").split(" ")))),_=yd("transform",typeof o.transform=="string"?Hd.transform(o.transform):o.transform),A=yd("mask",s0(d)),T=y8(x,zn(zn(zn(zn({},S),_),A),{},{symbol:f,title:p,titleId:b,maskId:g}));if(!T)return T8("Could not find icon",x),null;var D=T.abstract,L={ref:s};return Object.keys(o).forEach(function(M){i0.hasOwnProperty(M)||(L[M]=o[M])}),C8(D[0],L)});ee.displayName="FontAwesomeIcon";ee.propTypes={beat:pe.bool,border:pe.bool,beatFade:pe.bool,bounce:pe.bool,className:pe.string,fade:pe.bool,flash:pe.bool,mask:pe.oneOfType([pe.object,pe.array,pe.string]),maskId:pe.string,fixedWidth:pe.bool,inverse:pe.bool,flip:pe.oneOf([!0,!1,"horizontal","vertical","both"]),icon:pe.oneOfType([pe.object,pe.array,pe.string]),listItem:pe.bool,pull:pe.oneOf(["right","left"]),pulse:pe.bool,rotation:pe.oneOf([0,90,180,270]),shake:pe.bool,size:pe.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:pe.bool,spinPulse:pe.bool,spinReverse:pe.bool,symbol:pe.oneOfType([pe.bool,pe.string]),title:pe.string,titleId:pe.string,transform:pe.oneOfType([pe.string,pe.object]),swapOpacity:pe.bool};var C8=op.bind(null,Ta.createElement);function E8(a){const s=gb(a,500),{data:o}=M6(s,s.length>=0);return v.useMemo(()=>(o==null?void 0:o.map(r=>{const{link:d,label:f,poster:h,type:p,value:b}=(()=>{if(r.sonarrSeriesId)return{poster:r.poster,link:`/series/${r.sonarrSeriesId}`,type:"show",label:`${r.title} (${r.year})`,value:`s-${r.sonarrSeriesId}`};if(r.radarrId)return{poster:r.poster,link:`/movies/${r.radarrId}`,type:"movie",value:`m-${r.radarrId}`,label:`${r.title} (${r.year})`};throw new Error("Unknown search result")})();return{value:b,poster:h,label:f,type:p,link:d}}))??[],[o])}const O8=({options:a,search:s})=>{const o=s.toLowerCase(),r=s.trim();return a.filter(d=>d.label.toLowerCase().includes(o)||d.label.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(r))},N8=()=>{const a=hs(),[s,o]=v.useState(""),r=E8(s),d=R0(`(max-width: ${B0(750)})`);return i.jsx(mn,{placeholder:"Search",withCheckIcon:!1,leftSection:i.jsx(ee,{icon:Ra}),rightSection:i.jsx(i.Fragment,{}),size:"sm",searchable:!0,scrollAreaProps:{type:"auto"},maxDropdownHeight:400,data:r,value:s,onSearchChange:f=>{o(f)},onBlur:()=>o(""),filter:O8,onOptionSubmit:f=>{var h;a(((h=r.find(p=>p.value===f))==null?void 0:h.link)||"/")},renderOption:f=>{const h=r.find(p=>p.value===f.option.value);return i.jsxs(go,{children:[i.jsx(K0,{src:h==null?void 0:h.poster,w:55,h:70}),i.jsx(G,{size:d?"xs":"md",pl:"xs",pr:"xs",lineClamp:3,children:h==null?void 0:h.label})]})}})},Qe=v.forwardRef(({icon:a,iconProps:s,label:o,tooltip:r,...d},f)=>i.jsx(Ai,{openDelay:1500,...r,label:o,children:i.jsx(mo,{"aria-label":o,...d,ref:f,children:i.jsx(ee,{icon:a,...s})})})),D8="_container_ep7n5_32",L8={container:D8},up=()=>i.jsxs(re,{justify:"center",gap:"xl",className:L8.container,children:[i.jsx(vi.Idle,{children:i.jsx(ee,{icon:uv,size:"2x"})}),i.jsx(vi.Accept,{children:i.jsx(ee,{icon:Ix,size:"2x"})}),i.jsx(vi.Reject,{children:i.jsx(ee,{icon:wg,size:"2x"})}),i.jsxs($,{gap:0,children:[i.jsx(G,{size:"lg",children:"Upload Subtitles"}),i.jsx(G,{c:"dimmed",size:"sm",children:"Attach as many files as you like, you will need to select file metadata before uploading"})]})]});/*!
 * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 * Copyright 2024 Fonticons, Inc.
 */const R8={prefix:"far",iconName:"face-dizzy",icon:[512,512,["dizzy"],"f567","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM103 135c9.4-9.4 24.6-9.4 33.9 0l23 23 23-23c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-23 23 23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-23-23-23 23c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23-23-23c-9.4-9.4-9.4-24.6 0-33.9zm192 0c9.4-9.4 24.6-9.4 33.9 0l23 23 23-23c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-23 23 23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-23-23-23 23c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23-23-23c-9.4-9.4-9.4-24.6 0-33.9z"]},B8=R8,K8={prefix:"far",iconName:"eye-slash",icon:[640,512,[],"f070","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"]},Lo={prefix:"far",iconName:"bookmark",icon:[384,512,[128278,61591],"f02e","M0 48C0 21.5 21.5 0 48 0l0 48 0 393.4 130.1-92.9c8.3-6 19.6-6 27.9 0L336 441.4 336 48 48 48 48 0 336 0c26.5 0 48 21.5 48 48l0 440c0 9-5 17.2-13 21.3s-17.6 3.4-24.9-1.8L192 397.5 37.9 507.5c-7.3 5.2-16.9 5.9-24.9 1.8S0 497 0 488L0 48z"]},dp={prefix:"far",iconName:"folder",icon:[512,512,[128193,128447,61716,"folder-blank"],"f07b","M0 96C0 60.7 28.7 32 64 32l132.1 0c19.1 0 37.4 7.6 50.9 21.1L289.9 96 448 96c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16l-161.4 0c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7L64 80z"]},bd="⏎ Back";function fp(a){let s=a.lastIndexOf("/");return s===-1&&(s=a.lastIndexOf("\\")),s}function r0(a){if(a.endsWith("/")||a.endsWith("\\"))return a;{const s=fp(a);return a.slice(0,s+1)}}const Yd=({defaultValue:a,type:s,onChange:o,...r})=>{const[d,f]=v.useState(!1),[h,p]=v.useState(a??""),[b,g]=v.useState(()=>r0(h)),{data:x}=w6(s,b,d),S=v.useMemo(()=>[{value:bd},...(x==null?void 0:x.map(D=>({value:D.path,item:D})))??[]],[x]),_=v.useMemo(()=>{const D=fp(b.slice(0,-1));return b.slice(0,D+1)},[b]);v.useEffect(()=>{if(h===b)return;const D=r0(h);D!==b&&(g(D),o&&o(D))},[b,h,o]);const A=v.useRef(null),T=({options:D,search:L})=>D.filter(M=>L===bd?!0:M.value.includes(L));return i.jsx(k4,{...r,ref:A,leftSection:i.jsx(ee,{icon:dp}),placeholder:"Click to start",data:S,value:h,limit:NaN,maxDropdownHeight:240,filter:T,onChange:D=>{p(D!==bd?D:_)},onFocus:()=>f(!0),onBlur:()=>f(!1)})};function hp(a){if(typeof a=="string")return a;if(typeof a=="number")return a.toString();throw Se("error","Unknown value type",a),new Error(`Invalid type (${typeof a}) in the SelectorOption, please provide a label builder`)}function mp({options:a,...s}){return i.jsx(mn,{"data-testid":"input-selector",comboboxProps:{withinPortal:!0},data:a,...s})}function St({value:a,defaultValue:s,options:o,onChange:r,getkey:d=hp,...f}){const h=v.useRef(d);h.current=d;const p=v.useMemo(()=>o.map(({value:S,label:_,...A})=>({label:_,value:h.current(S),payload:S,...A})),[h,o]),b=v.useMemo(()=>he.isNull(a)||he.isUndefined(a)?a:h.current(a),[h,a]),g=v.useMemo(()=>he.isNull(s)||he.isUndefined(s)?s:h.current(s),[s,h]),x=v.useCallback(S=>{var A;const _=((A=p.find(T=>T.value===S))==null?void 0:A.payload)??null;r==null||r(_)},[p,r]);return i.jsx(mn,{"data-testid":"input-selector",comboboxProps:{withinPortal:!0},data:p,defaultValue:g,value:b,onChange:x,...f})}function wf({value:a,defaultValue:s,options:o,onChange:r,getkey:d=hp,buildOption:f,...h}){const p=v.useRef(d);p.current=d;const b=v.useRef(f);b.current=f;const g=v.useMemo(()=>o.map(({value:A,...T})=>({value:p.current(A),payload:A,...T})),[o]),x=v.useMemo(()=>a&&a.map(p.current),[a]),S=v.useMemo(()=>s&&s.map(p.current),[s]),_=v.useCallback(A=>{var D;const T=[];for(const L of A){const M=(D=g.find(U=>U.value===L))==null?void 0:D.payload;M?T.push(M):b.current&&T.push(b.current(L))}r==null||r(T)},[g,r]);return i.jsx(_4,{...h,hidePickedOptions:!0,value:x,defaultValue:S,onChange:_,data:g})}const gp=v.createContext(!1);function pp(){return v.useContext(gp)}const Ro=gp.Provider,U8="_container_10vks_32",q8="_table_10vks_1",o0={container:U8,table:q8};function H8(a){return a.map(s=>i.jsx(gt.Th,{style:{whiteSpace:"nowrap"},children:cs(s.column.columnDef.header,s.getContext())},s.id))}function V8(a){return i.jsx(gt.Tr,{children:a.getVisibleCells().map(s=>i.jsx(gt.Td,{children:cs(s.column.columnDef.cell,s.getContext())},s.id))},a.id)}function yp(a){const{instance:s,tableStyles:o}=a,r=(o==null?void 0:o.headersRenderer)??H8,d=(o==null?void 0:o.rowRenderer)??V8,f=v.useMemo(()=>s.getHeaderGroups().reduce((x,S)=>S.headers.length>x?S.headers.length:x,0),[s]),h=s.getRowCount()===0,p=ko(),b=pp();let g;return b?g=Array((o==null?void 0:o.placeholder)??p).fill(0).map((x,S)=>i.jsx(gt.Tr,{children:i.jsx(gt.Td,{colSpan:f,children:i.jsx(A4,{height:24})})},S)):h&&(o!=null&&o.emptyText)?g=i.jsx(gt.Tr,{children:i.jsx(gt.Td,{colSpan:f,children:i.jsx(G,{ta:"center",children:o.emptyText})})}):g=s.getRowModel().rows.map(x=>d(x)),i.jsx($n,{className:o0.container,children:i.jsxs(gt,{className:o0.table,highlightOnHover:!0,striped:(o==null?void 0:o.striped)??!0,children:[i.jsx(gt.Thead,{hidden:o==null?void 0:o.hideHeader,children:s.getHeaderGroups().map(x=>i.jsx(gt.Tr,{children:r(x.headers)},x.id))}),i.jsx(gt.Tbody,{children:g})]})})}function qt(a){const{instanceRef:s,tableStyles:o,onRowSelectionChanged:r,onAllRowsExpandedChanged:d,...f}=a,h=ko(),p=I0({...f,getCoreRowModel:Z0(),autoResetPageIndex:!1,autoResetExpanded:!1,pageCount:h});s&&(s.current=p);const b=p.getSelectedRowModel().rows,g=v.useMemo(()=>b,[b]),x=v.useMemo(()=>r,[]),S=p.getIsAllRowsExpanded();return v.useEffect(()=>{x==null||x(g)},[x,g]),v.useEffect(()=>{d==null||d(S)},[d,S]),i.jsx(yp,{tableStyles:o,instance:p})}function G8(a,s){return a.getIsGrouped()?i.jsx("div",{children:cs(a.column.columnDef.cell,a.getContext())}):s.getCanExpand()||a.getIsAggregated()?null:cs(a.column.columnDef.cell,a.getContext())}function Y8(a){if(a.getCanExpand()){const s=a.getVisibleCells().find(o=>o.getIsGrouped());if(s){const o=a.getIsExpanded()?90:void 0;return i.jsx(gt.Tr,{style:{cursor:"pointer"},children:i.jsx(gt.Td,{colSpan:a.getVisibleCells().length,children:i.jsxs(G,{p:2,onClick:()=>a.toggleExpanded(),children:[cs(s.column.columnDef.cell,s.getContext()),i.jsx($n,{component:"span",mx:12,children:i.jsx(ee,{icon:cx,rotation:o})})]})},s.id)},a.id)}else return null}else return i.jsx(gt.Tr,{children:a.getVisibleCells().filter(s=>!s.getIsPlaceholder()).map(s=>i.jsx(gt.Td,{children:G8(s,a)},s.id))},a.id)}function F8(a){return a.map(s=>s.column.getIsGrouped()?i.jsx(v.Fragment,{},s.id):i.jsx(gt.Th,{colSpan:s.colSpan,children:cs(s.column.columnDef.header,s.getContext())},s.id))}function Q8(a){return i.jsx(qt,{...a,enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:eb(),getExpandedRowModel:W4(),tableStyles:{headersRenderer:F8,rowRenderer:Y8}})}const bp=({count:a,index:s,size:o,total:r,goto:d})=>{const h=r===0?0:o*s+1,p=Math.min(o*(s+1),r),b=pp();return i.jsxs(re,{p:16,justify:"space-between",children:[i.jsxs(G,{size:"sm",children:["Show ",h," to ",p," of ",r," entries"]}),i.jsx(D0,{size:"sm",color:b?"gray":"primary",value:s+1,onChange:g=>d(g-1),hidden:a<=1,total:a})]})};function fl(a){const{instanceRef:s,autoScroll:o,...r}=a,d=ko(),f=I0({...r,getCoreRowModel:Z0(),getPaginationRowModel:tb(),initialState:{pagination:{pageSize:d}}});s&&(s.current=f);const h=f.getState().pagination.pageIndex;v.useEffect(()=>{o&&W0()},[h,o]);const p=f.getState();return i.jsxs(i.Fragment,{children:[i.jsx(yp,{...r,instance:f}),i.jsx(bp,{count:f.getPageCount(),index:p.pagination.pageIndex,size:d,total:f.getRowCount(),goto:f.setPageIndex})]})}function Mf(a){const{query:s,...o}=a,{data:r={data:[],total:0},paginationStatus:{page:d,pageCount:f,totalCount:h,pageSize:p,isPageLoading:b},controls:{gotoPage:g}}=s,[x,S]=Y0();return v.useEffect(()=>{W0()},[d]),i.jsxs(Ro,{value:b,children:[i.jsx(qt,{...o,data:r.data}),i.jsx(bp,{count:f,index:d,size:p,total:h,goto:_=>{x.set("page",(_+1).toString()),S(x,{replace:!0}),g(_)}})]})}const xp=({icon:a,children:s,...o})=>i.jsx(de,{color:"dark",variant:"subtle",leftSection:i.jsx(ee,{icon:a}),...o,children:i.jsx(G,{size:"xs",children:s})});function X8(a){const{promise:s,onSuccess:o,...r}=a,[d,f]=v.useState(!1),h=v.useCallback(()=>{f(!0),s().then(p=>{f(!1),o&&o(p)})},[o,s]);return i.jsx(xp,{loading:d,onClick:h,...r})}const I8="_group_13q4v_32",Z8={group:I8},ce=({children:a})=>i.jsx(re,{p:12,justify:"space-between",className:Z8.group,children:a});ce.Button=xp;ce.MutateButton=X8;const vp=v.createContext(null);function Sp(){const a=v.useContext(vp);if(a===null)throw new Error("NavbarShowedContext not initialized");return a}const P8=vp.Provider,$8="_anchor_pa7ih_32",J8="_active_pa7ih_39",W8="_hover_pa7ih_47",eS="_badge_pa7ih_54",tS="_icon_pa7ih_60",nS="_nav_pa7ih_65",aS="_text_pa7ih_72",ll={anchor:$8,active:J8,hover:W8,badge:eS,icon:tS,nav:nS,text:aS},jp=v.createContext({selection:null,select:()=>{Se()}});function wp(){return v.useContext(jp)}function lS(a){const{badge:s,children:o}=a;return v.useMemo(()=>{if(typeof s=="string")return s;let r=s??0;return o===void 0?r:(r+=o.reduce((d,f)=>{const h=f.badge;return typeof h=="number"&&f.hidden!==!0?d+h:d},0)??0,r===0?void 0:r)},[s,o])}function sS(a,s){const{path:o,children:r}=s,{pathname:d}=F0(),f=v.useMemo(()=>wd(a,o??""),[a,o]),h=v.useMemo(()=>[f,...(r==null?void 0:r.map(b=>wd(f,b.path??"")))??[]],[f,r]),p=wp().selection;return v.useMemo(()=>(p==null?void 0:p.includes(f))||h.some(b=>Y4(b,d)),[d,h,f,p])}const iS=()=>{const[a,s]=v.useState(null),{toggleColorScheme:o}=N0(),d=z4("light")==="dark",f=Rj(),{pathname:h}=F0();return v.useEffect(()=>{s(null)},[h]),i.jsx(ss.Navbar,{p:"xs",className:ll.nav,children:i.jsxs(jp.Provider,{value:{selection:a,select:s},children:[i.jsx(ss.Section,{grow:!0,style:{overflowY:"auto",scrollbarWidth:"none"},children:i.jsx($,{gap:0,children:f.map((p,b)=>i.jsx(Mp,{parent:"/",route:p},Ve("nav",b)))})}),i.jsx(Je,{}),i.jsx(ss.Section,{mt:"xs",children:i.jsxs(re,{gap:"xs",children:[i.jsx(Qe,{label:"Change Theme",c:d?"yellow":"indigo",onClick:()=>o(),icon:d?Vx:iv}),i.jsx(dt,{href:"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XHHRWXT9YB7WE&source=url",target:"_blank",children:i.jsx(Qe,{label:"Donate",icon:Ex,c:"red"})})]})})]})})},Mp=({route:a,parent:s})=>{const{children:o,name:r,path:d,icon:f,hidden:h,element:p}=a,{select:b}=wp(),g=v.useMemo(()=>wd(s,d??""),[s,d]),x=lS(a),S=sS(s,a);if(h===!0||d===void 0||d.includes(":"))return null;if(o!==void 0){const _=i.jsx($,{gap:0,children:o.map((A,T)=>i.jsx(Mp,{parent:g,route:A},Ve(g,"nav",T)))});return r?i.jsxs($,{gap:0,children:[i.jsx(c0,{primary:!0,name:r,link:g,icon:f,badge:x,onClick:A=>{Se("info","clicked",g),p!==void 0||(o==null?void 0:o.find(D=>D.index===!0))!==void 0||A.preventDefault(),b(S?null:g)}}),i.jsx(po,{hidden:o.length===0,in:S,children:_})]}):_}else return i.jsx(c0,{name:r??g,link:g,icon:f,badge:x})},c0=({icon:a,link:s,name:o,badge:r,onClick:d,primary:f=!1})=>{const{show:h}=Sp(),{ref:p,hovered:b}=T4(),g=v.useMemo(()=>typeof r=="number"?r===0:typeof r=="string"?r.length===0:!0,[r]);return i.jsx(F4,{to:s,onClick:x=>{d==null||d(x),x.isDefaultPrevented()||h(!1)},className:({isActive:x})=>wm(wm(ll.anchor,{[ll.active]:x,[ll.hover]:b})),children:i.jsxs(G,{ref:p,inline:!0,p:"xs",size:"sm",fw:f?"bold":"normal",className:ll.text,span:!0,children:[a&&i.jsx(ee,{className:ll.icon,icon:a}),o,!g&&i.jsx(ze,{className:ll.badge,radius:"xs",children:r})]})})},rS="https://github.com/morpheus65535/bazarr",oS="********",cS=({error:a})=>{const s=v.useMemo(()=>{let o=a.stack??"";return o=o.replaceAll(window.location.host,oS),o},[a.stack]);return i.jsxs(We,{my:"lg",children:[i.jsx(cl,{children:i.jsxs(za,{children:[i.jsx($n,{component:"span",mr:"md",children:i.jsx(ee,{icon:B8})}),i.jsx(G,{component:"span",inherit:!0,children:"Oops! UI is crashed!"})]})}),i.jsx(cl,{my:"xl",children:i.jsx(ds,{children:s})}),i.jsxs(re,{justify:"center",children:[i.jsx(dt,{href:`${rS}/issues/new/choose`,target:"_blank",children:i.jsx(de,{color:"yellow",children:"Report Issue"})}),i.jsx(de,{onClick:J0,children:"Reload Page"})]})]})};class uS extends v.Component{constructor(s){super(s),this.state={error:null}}componentDidCatch(s){this.setState({error:s})}render(){const{children:s}=this.props,{error:o}=this.state;return o?i.jsx(cS,{error:o}):s}}const kp=v.createContext(null);function dS(){const a=v.useContext(kp);if(a===null)throw new Error("useIsOnline must be used within a OnlineProvider");return a.online}const fS=kp.Provider,hS=({message:a})=>i.jsx(We,{my:"xl",children:i.jsx(jt,{title:"Something is wrong!",color:"red",icon:i.jsx(ee,{icon:_g}),withCloseButton:!0,closeButtonLabel:"Reload",onClose:J0,children:i.jsx(G,{color:"red",children:a})})}),Bo={Auth:"/login",NotFound:"/not-found"},mS="_header_2jyqb_32",gS={header:mS},pS=()=>{const{data:a}=Nn(),s=(a==null?void 0:a.auth.type)==="form",{show:o,showed:r}=Sp(),f=!dS(),{shutdown:h,restart:p,logout:b}=ug(),g=fb();return i.jsx(ss.Header,{p:"md",className:gS.header,children:i.jsxs(re,{justify:"space-between",wrap:"nowrap",children:[i.jsxs(re,{wrap:"nowrap",children:[i.jsx(C4,{opened:r,onClick:()=>o(!r),size:"sm",hiddenFrom:"sm"}),i.jsx(dt,{onClick:g,children:i.jsx(U0,{alt:"brand",size:32,src:`${gn.baseUrl}/images/logo64.png`})}),i.jsx(ze,{size:"lg",radius:"sm",variant:"brand",visibleFrom:"sm",children:"Bazarr"})]}),i.jsxs(re,{gap:"xs",justify:"right",wrap:"nowrap",children:[i.jsx(N8,{}),i.jsxs(lt,{children:[i.jsx(lt.Target,{children:i.jsx(Qe,{label:"System",tooltip:{position:"left",openDelay:2e3},loading:f,c:f?"yellow":void 0,icon:Kx,size:"lg"})}),i.jsxs(lt.Dropdown,{children:[i.jsx(lt.Item,{leftSection:i.jsx(ee,{icon:xg}),onClick:()=>p(),children:"Restart"}),i.jsx(lt.Item,{leftSection:i.jsx(ee,{icon:qx}),onClick:()=>h(),children:"Shutdown"}),i.jsx(Je,{hidden:!s}),i.jsx(lt.Item,{hidden:!s,onClick:()=>b(),children:"Logout"})]})]})]})]})})},yS=()=>{const a=hs(),[s,o]=v.useState(null),[r,d]=v.useState(!1),[f,h]=v.useState(!0);return sd("app-critical-error",({detail:p})=>{o(p.message)}),sd("app-auth-changed",p=>{p.detail.authenticated||a(Bo.Auth)}),sd("app-online-status",({detail:p})=>{h(p.online)}),v.useEffect(()=>{gn.hasUpdate&&ol(fn.info("Update available","A new version of Bazarr is ready, restart is required"))},[]),s!==null?i.jsx(hS,{message:s}):i.jsx(uS,{children:i.jsx(P8,{value:{showed:r,show:d},children:i.jsx(fS,{value:{online:f,setOnline:h},children:i.jsxs(ss,{navbar:{width:dn.navBarWidth,breakpoint:"sm",collapsed:{mobile:!r}},header:{height:{base:dn.headerHeight}},padding:0,children:[i.jsx(pS,{}),i.jsx(iS,{}),i.jsx(ss.Main,{children:i.jsx(Q4,{})})]})})})})},u0=({children:a})=>i.jsx(v.Suspense,{fallback:i.jsx(fs,{visible:!0}),children:a});function Ba({mutation:a,onSuccess:s,onError:o,args:r,...d}){const{mutateAsync:f}=a,[h,p]=v.useState(!1),b=v.useCallback(async()=>{p(!0);try{const g=r();if(g!==null){const x=await f(g);s==null||s(x)}else o==null||o()}catch{o==null||o()}p(!1)},[r,f,o,s]);return i.jsx(Qe,{...d,loading:h,onClick:b})}const Ct=({children:a,global:s=!1,result:{isLoading:o}})=>i.jsxs(Ro,{value:o,children:[i.jsx(fs,{visible:s&&o}),a]}),bS=()=>{const{login:a}=ug(),s=Ut({initialValues:{username:"",password:""}});return i.jsx(We,{my:"xl",size:400,children:i.jsx(Pd,{shadow:"xl",children:i.jsxs($,{children:[i.jsx(U0,{mx:"auto",size:64,src:`${gn.baseUrl}/images/logo128.png`}),i.jsx(Je,{}),i.jsx("form",{onSubmit:s.onSubmit(o=>{a(o)}),children:i.jsxs($,{children:[i.jsx(yo,{name:"Username",placeholder:"Username",required:!0,...s.getInputProps("username")}),i.jsx(q0,{name:"Password",required:!0,placeholder:"Password",...s.getInputProps("password")}),i.jsx(Je,{}),i.jsx(de,{fullWidth:!0,tt:"uppercase",type:"submit",children:"Login"})]})})]})})})},xS=({value:a,long:s,...o})=>{const r=v.useMemo(()=>{let d=a.code2,f=":HI",h=":Forced";s&&(d=a.name,f=" HI",h=" Forced");let p=d;return a.hi?p+=f:a.forced&&(p+=h),p},[a,s]);return i.jsx(G,{inherit:!0,...o,children:r})},Et={Text:xS},Tt=({children:a,text:s,tooltip:o})=>he.isNull(s)||he.isUndefined(s)?a:i.jsx(Ai,{label:s,...o,style:{textWrap:"wrap"},events:{hover:!0,focus:!1,touch:!0},children:i.jsx("div",{children:a})}),vS=({blacklist:a})=>{const s=ig(),o=v.useMemo(()=>[{header:"Name",accessorKey:"title",cell:({row:{original:{radarrId:r}}})=>{const d=`/movies/${r}`;return i.jsx(dt,{className:"table-primary",component:Da,to:d,children:r})}},{header:"Language",accessorKey:"language",cell:({row:{original:{language:r}}})=>r?i.jsx(Et.Text,{value:r,long:!0}):null},{header:"Provider",accessorKey:"provider"},{header:"Date",accessorKey:"timestamp",cell:({row:{original:{timestamp:r,parsed_timestamp:d}}})=>r?i.jsx(Tt,{text:d,children:i.jsx(G,{children:r})}):null},{id:"subs_id",cell:({row:{original:{subs_id:r,provider:d}}})=>i.jsx(Ba,{label:"Remove from Blacklist",icon:Ot,mutation:s,args:()=>({all:!1,form:{provider:d,subs_id:r}})})}],[s]);return i.jsx(fl,{tableStyles:{emptyText:"No blacklisted movies subtitles"},columns:o,data:a})},SS=()=>{const a=l6(),{data:s}=a,{mutateAsync:o}=ig();return pt("Movies Blacklist - Bazarr"),i.jsx(We,{fluid:!0,px:0,children:i.jsx(Ct,{result:a,children:i.jsxs($,{children:[i.jsx(ce,{children:i.jsx(ce.MutateButton,{icon:Ot,disabled:(s==null?void 0:s.length)===0,promise:()=>o({all:!0}),children:"Remove All"})}),i.jsx(vS,{blacklist:s??[]})]})})})},jS=({blacklist:a})=>{const s=ag(),o=v.useMemo(()=>[{header:"Series",accessorKey:"seriesTitle",cell:({row:{original:{sonarrSeriesId:r,seriesTitle:d}}})=>{const f=`/series/${r}`;return i.jsx(dt,{className:"table-primary",component:Da,to:f,children:d})}},{header:"Episode",accessorKey:"episode_number"},{id:"episodeTitle"},{header:"Language",accessorKey:"language",cell:({row:{original:{language:r}}})=>r?i.jsx(Et.Text,{value:r,long:!0}):null},{header:"Provider",accessorKey:"provider"},{header:"Date",accessorKey:"timestamp",cell:({row:{original:{timestamp:r,parsed_timestamp:d}}})=>r?i.jsx(Tt,{text:d,children:i.jsx(G,{children:r})}):null},{id:"subs_id",cell:({row:{original:{subs_id:r,provider:d}}})=>i.jsx(Ba,{label:"Remove from Blacklist",icon:Ot,mutation:s,args:()=>({all:!1,form:{provider:d,subs_id:r}})})}],[s]);return i.jsx(fl,{tableStyles:{emptyText:"No blacklisted series subtitles"},columns:o,data:a})},wS=()=>{const a=Pb(),{mutateAsync:s}=ag();pt("Series Blacklist - Bazarr");const{data:o}=a;return i.jsx(Ct,{result:a,children:i.jsx(We,{fluid:!0,px:0,children:i.jsxs($,{children:[i.jsx(ce,{children:i.jsx(ce.MutateButton,{icon:Ot,disabled:(o==null?void 0:o.length)===0,promise:()=>s({all:!0}),children:"Remove All"})}),i.jsx(jS,{blacklist:o??[]})]})})})},MS=({mutation:a,item:s,onComplete:o,onCancel:r})=>{const{data:d,isFetching:f}=Ti(),{isPending:h,mutate:p}=a,b=Xe(),g=At(d??[],T=>T.name??"Unknown",T=>T.profileId.toString()??"-1"),x=v.useMemo(()=>(d==null?void 0:d.find(T=>T.profileId===(s==null?void 0:s.profileId)))??null,[d,s==null?void 0:s.profileId]),S=Ut({initialValues:{profile:x??null}}),_=At((s==null?void 0:s.audio_language)??[],T=>T.name,T=>T.code2??""),A=h||f||s===null;return i.jsxs("form",{onSubmit:S.onSubmit(({profile:T})=>{if(s){const D=is(s);if(D){p({id:[D],profileid:[(T==null?void 0:T.profileId)??null]}),o==null||o(),b.closeSelf();return}}S.setErrors({profile:"Invalid profile"})}),children:[i.jsx(fs,{visible:A}),i.jsxs($,{children:[i.jsx(wf,{label:"Audio Languages",disabled:!0,..._,value:(s==null?void 0:s.audio_language)??[]}),i.jsx(St,{...g,...S.getInputProps("profile"),clearable:!0,label:"Languages Profile"}),i.jsx(Je,{}),i.jsxs(re,{justify:"right",children:[i.jsx(de,{disabled:A,onClick:()=>{r==null||r(),b.closeSelf()},color:"gray",variant:"subtle",children:"Cancel"}),i.jsx(de,{disabled:A,type:"submit",children:"Save"})]})]})]})},Ko=yt(MS,"item-editor",{title:"Editor",size:"md"}),os=[{label:"Normal",value:"normal"},{label:"Hearing-Impaired",value:"hi"},{label:"Forced",value:"forced"}];function kS(a,s){return o=>a(o)?null:s}const zt={validation:kS};function Li(a){const{data:s}=Ti();return v.useMemo(()=>s==null?void 0:s.find(o=>o.profileId===a),[a,s])}function jo(){const a=gs();return v.useMemo(()=>{var r;const o=((r=a.data)==null?void 0:r.filter(d=>d.enabled).map(d=>({code2:d.code2,name:d.name})))??[];return{...a,data:o}},[a])}function Ri(a){const{data:s}=gs();return v.useMemo(()=>(a==null?void 0:a.items.map(({language:o,hi:r,forced:d})=>{var h;const f=((h=s==null?void 0:s.find(p=>p.code2===o))==null?void 0:h.name)??"";return{hi:r==="True",forced:d==="True",code2:o,name:f}}))??[],[s,a==null?void 0:a.items])}const _p=a=>a==="Chinese Simplified"?"Chinese":a,d0=a=>{if(a.language===null)return{state:"error",messages:"Language is not selected"};if(a.episode===null)return{state:"error",messages:"Episode is not selected"};{const{subtitles:s}=a.episode;if(s.find(r=>{var d;return r.code2===((d=a.language)==null?void 0:d.code2)&&he.isString(r.path)})!==void 0)return{state:"warning",messages:"Override existing subtitle"}}return{state:"valid"}},_S=({series:a,files:s,onComplete:o})=>{const r=Xe(),d=tg(a.sonarrSeriesId),f=At(d.data??[],M=>`(${M.season}x${M.episode}) ${M.title}`,M=>M.sonarrEpisodeId.toString()),h=Li(a.profileId),p=Ri(h),b=At(he.uniqBy(p,"code2"),M=>M.name,M=>M.code2),g=v.useMemo(()=>p.length>0?p[0]:null,[p]),x=Ut({initialValues:{files:s.map(M=>({file:M,language:g,forced:(g==null?void 0:g.forced)??!1,hi:(g==null?void 0:g.hi)??!1,episode:null})).map(M=>({...M,validateResult:d0(M)}))},validate:{files:zt.validation(M=>M.find(U=>U.language===null||U.episode===null||U.validateResult===void 0||U.validateResult.state==="error")===void 0,"Some files cannot be uploaded, please check")}}),S=zi(M=>{x.setValues(U=>{const H=M(U.files??[]);return H.forEach(R=>{R.validateResult=d0(R)}),{...U,files:H}})}),_=v.useMemo(()=>s.map(M=>M.name),[s]),A=x6(_);v.useEffect(()=>{A.data!==void 0&&S.update(M=>{var H;const U=A.data.find(R=>R.filename===M.file.name);return U&&(M.episode=((H=d.data)==null?void 0:H.find(R=>R.season===U.season&&R.episode===U.episode))??M.episode),M})},[S,d.data,A.data]);const T=({validateResult:M})=>{const U=v.useMemo(()=>{switch(M==null?void 0:M.state){case"valid":return To;case"warning":return La;case"error":return Mg;default:return mg}},[M==null?void 0:M.state]),H=v.useMemo(()=>{switch(M==null?void 0:M.state){case"valid":return"green";case"warning":return"yellow";case"error":return"red";default:return}},[M==null?void 0:M.state]);return i.jsx(Tt,{text:M==null?void 0:M.messages,children:i.jsx(G,{c:H,inline:!0,children:i.jsx(ee,{icon:U})})})},D=v.useMemo(()=>[{id:"validateResult",cell:({row:{original:{validateResult:M}}})=>i.jsx(T,{validateResult:M})},{header:"File",id:"filename",accessorKey:"file",cell:({row:{original:{file:{name:M}}}})=>i.jsx(G,{className:"table-primary",children:M})},{header:()=>i.jsx(St,{...b,value:null,placeholder:"Language",onChange:M=>{M&&S.update(U=>({...U,language:M}))}}),accessorKey:"language",cell:({row:{original:M,index:U}})=>i.jsx(St,{...b,className:"table-select",value:M.language,onChange:H=>{S.mutate(U,{...M,language:H})}})},{header:()=>i.jsx(St,{options:os,value:null,placeholder:"Type",onChange:M=>{M&&S.update(U=>{switch(M){case"hi":return{...U,hi:!0,forced:!1};case"forced":return{...U,hi:!1,forced:!0};case"normal":return{...U,hi:!1,forced:!1};default:return U}})}}),accessorKey:"type",cell:({row:{original:M,index:U}})=>{var H;return i.jsx(mn,{value:(H=os.find(R=>M.hi?R.value==="hi":M.forced?R.value==="forced":R.value==="normal"))==null?void 0:H.value,data:os,onChange:R=>{R&&S.mutate(U,{...M,hi:R==="hi",forced:R==="forced"})}})}},{id:"episode",header:"Episode",accessorKey:"episode",cell:({row:{original:M,index:U}})=>i.jsx(St,{...f,searchable:!0,className:"table-select",value:M.episode,onChange:H=>{S.mutate(U,{...M,episode:H})}})},{id:"action",cell:({row:{index:M}})=>i.jsx(Qe,{label:"Remove",icon:Ot,c:"red",onClick:()=>S.remove(M)})}],[S,f,b]),{upload:L}=_o();return i.jsx("form",{onSubmit:x.onSubmit(({files:M})=>{const{sonarrSeriesId:U}=a;M.forEach(H=>{const{file:R,hi:F,forced:oe,language:te,episode:Te}=H;if(te===null||Te===null)throw new Error("Invalid language or episode. This shouldn't happen, please report this bug.");const{code2:$t}=te,{sonarrEpisodeId:Nt}=Te;Le.create(R.name,ut.UploadSubtitle,L.mutateAsync,{seriesId:U,episodeId:Nt,form:{file:R,language:$t,hi:F,forced:oe}})}),o==null||o(),r.closeSelf()}),children:i.jsxs($,{className:"table-long-break",children:[i.jsx(qt,{columns:D,data:x.values.files}),i.jsx(Je,{}),i.jsx(de,{type:"submit",children:"Upload"})]})})},AS=yt(_S,"upload-series-subtitles",{title:"Upload Subtitles",size:"xl"}),Uo=({audios:a,badgeProps:s,...o})=>i.jsx(re,{gap:"xs",...o,children:a.map((r,d)=>i.jsx(ze,{color:"blue",...s,children:_p(r.name)},Ve(d,r.code2)))}),qo=({action:a,title:s})=>{let o=null,r="Unknown";switch(a){case 0:o=Ot,r="Delete";break;case 1:o=cf,r="Download";break;case 2:o=nf,r="Manual";break;case 5:o=of,r="Sync";break;case 3:o=sf,r="Upgrade";break;case 4:o=af,r="Upload";break;case 6:o=lf,r="Translated";break;default:o=Hx,r="Unknown";break}return o?i.jsx(Ai,{label:r,openDelay:500,position:"right",events:{hover:!0,focus:!1,touch:!0},children:i.jsx(ee,{"aria-label":r,title:s,icon:o})}):null},Ho=({index:a,empty:s="Unknown Profile"})=>{const{data:o}=Ti(),r=v.useMemo(()=>{var d;return((d=o==null?void 0:o.find(f=>f.profileId===a))==null?void 0:d.name)??s},[o,s,a]);return i.jsx(i.Fragment,{children:r})},Bi=({matches:a,dont:s,isHistory:o})=>{const r=s.length>0,[d,{close:f,open:h}]=E4(!1),p=R0(`(max-width: ${B0(750)})`),b=()=>o?i.jsx(ee,{icon:Zx}):i.jsx(G,{c:r?"yellow":"green",span:!0,children:i.jsx(ee,{icon:r?pg:jx})});return i.jsxs(id,{position:"left",opened:d,width:360,withArrow:!0,withinPortal:!0,children:[i.jsx(id.Target,{children:i.jsx(G,{onMouseEnter:h,onMouseLeave:f,children:i.jsx(b,{})})}),i.jsxs(id.Dropdown,{children:[i.jsx(G,{size:"xl",ta:"center",children:"Scoring Criteria"}),p?null:i.jsx(jt,{variant:"light",color:"blue",mb:"sm",children:"Not matching attributes will not prevent the subtitle to be downloaded and are strictly used for scoring the subtitle."}),i.jsxs(re,{justify:"left",gap:"xl",wrap:"nowrap",grow:!0,children:[i.jsxs($,{align:"flex-start",justify:"flex-start",gap:"xs",mb:"auto",children:[i.jsxs(go,{gap:"sm",children:[i.jsx(G,{c:"green",children:i.jsx(ee,{icon:uf})}),i.jsx(G,{c:"green",children:"Matching"})]}),i.jsx(Tn,{children:a.map((g,x)=>i.jsx(Tn.Item,{children:g},Ve(x,g,"match")))})]}),i.jsxs($,{align:"flex-start",justify:"flex-start",gap:"xs",mb:"auto",children:[i.jsxs(go,{gap:"sm",children:[i.jsx(G,{c:"yellow",children:i.jsx(ee,{icon:vg})}),i.jsx(G,{c:"yellow",children:"Not Matching"})]}),i.jsx(Tn,{children:s.map((g,x)=>i.jsx(Tn.Item,{children:g},Ve(x,g,"miss")))})]})]})]})]})},zS=({movie:a})=>{const s=i6(a.radarrId),{data:o}=s,r=sg(),d=v.useMemo(()=>[{id:"action",cell:({row:{original:{action:f}}})=>i.jsx(cl,{children:i.jsx(qo,{action:f})})},{header:"Language",accessorKey:"language",cell:({row:{original:{language:f}}})=>f?i.jsx(ze,{children:i.jsx(Et.Text,{value:f,long:!0})}):null},{header:"Provider",accessorKey:"provider"},{header:"Score",accessorKey:"score"},{id:"matches",cell:({row:{original:{matches:f,dont_matches:h}}})=>f.length||h.length?i.jsx(Bi,{matches:f,dont:h,isHistory:!0}):null},{header:"Date",accessorKey:"timestamp",cell:({row:{original:{timestamp:f,parsed_timestamp:h}}})=>i.jsx(Tt,{text:h,children:i.jsx(G,{children:f})})},{id:"blacklisted",cell:({row:{original:{blacklisted:f,radarrId:h,provider:p,subs_id:b,language:g,subtitles_path:x}}})=>b&&p&&g?i.jsx(Ba,{label:"Add to Blacklist",disabled:f,icon:Ci,mutation:r,args:()=>({id:h,form:{provider:p,subs_id:b,subtitles_path:x,language:g.code2}})}):null}],[r]);return i.jsx(Ct,{result:s,children:i.jsx(fl,{columns:d,data:o??[],tableStyles:{emptyText:"No history found"}})})},TS=yt(zS,"movie-history",{size:"xl",title:"Movie History"}),CS=({episode:a})=>{const s=Jb(a.sonarrEpisodeId),{data:o}=s,r=ng(),d=v.useMemo(()=>[{id:"action",cell:({row:{original:{action:f}}})=>i.jsx(cl,{children:i.jsx(qo,{action:f})})},{header:"Language",accessorKey:"language",cell:({row:{original:{language:f}}})=>f?i.jsx(ze,{children:i.jsx(Et.Text,{value:f,long:!0})}):null},{header:"Provider",accessorKey:"provider"},{header:"Score",accessorKey:"score"},{id:"matches",cell:f=>{const{matches:h,dont_matches:p}=f.row.original;return h.length||p.length?i.jsx(Bi,{matches:h,dont:p,isHistory:!0}):null}},{header:"Date",accessorKey:"timestamp",cell:({row:{original:{timestamp:f,parsed_timestamp:h}}})=>i.jsx(Tt,{text:h,children:i.jsx(G,{children:f})})},{id:"description",cell:({row:{original:{description:f}}})=>i.jsx(Tt,{text:f,children:i.jsx(ee,{size:"sm",icon:La})})},{id:"blacklisted",cell:({row:{original:{blacklisted:f,sonarrEpisodeId:h,sonarrSeriesId:p,provider:b,subs_id:g,language:x,subtitles_path:S}}})=>g&&b&&x?i.jsx(Ba,{label:"Add to Blacklist",disabled:f,icon:Ci,mutation:r,args:()=>({seriesId:p,episodeId:h,form:{provider:b,subs_id:g,subtitles_path:S,language:x.code2}})}):null}],[r]);return i.jsx(Ct,{result:s,children:i.jsx(fl,{autoScroll:!1,tableStyles:{emptyText:"No history found",placeholder:5},columns:d,data:o??[]})})},ES=yt(CS,"episode-history",{size:"xl"}),OS="Changing Color";function NS(a){return`color(name=${a})`}const f0=[{label:"White",value:"white"},{label:"Light Gray",value:"light-gray"},{label:"Red",value:"red"},{label:"Green",value:"green"},{label:"Yellow",value:"yellow"},{label:"Blue",value:"blue"},{label:"Magenta",value:"magenta"},{label:"Cyan",value:"cyan"},{label:"Black",value:"black"},{label:"Dark Red",value:"dark-red"},{label:"Dark Green",value:"dark-green"},{label:"Dark Yellow",value:"dark-yellow"},{label:"Dark Blue",value:"dark-blue"},{label:"Dark Magenta",value:"dark-magenta"},{label:"Dark Cyan",value:"dark-cyan"},{label:"Dark Grey",value:"dark-grey"}],DS=({selections:a,onSubmit:s})=>{const{mutateAsync:o}=ps(),r=Xe(),d=Ut({initialValues:{color:""},validate:{color:zt.validation(f=>f0.find(h=>h.value===f)!==void 0,"Must select a color")}});return i.jsx("form",{onSubmit:d.onSubmit(({color:f})=>{const h=NS(f);a.forEach(p=>Le.create(p.path,OS,o,{action:h,form:p})),s==null||s(),r.closeSelf()}),children:i.jsxs($,{children:[i.jsx(St,{required:!0,options:f0,...d.getInputProps("color")}),i.jsx(Je,{}),i.jsx(de,{type:"submit",children:"Start"})]})})},LS=yt(DS,"color-tool",{title:"Change Color"}),RS="Changing Frame Rate";function BS(a,s){return`change_FPS(from=${a},to=${s})`}const KS=({selections:a,onSubmit:s})=>{const{mutateAsync:o}=ps(),r=Xe(),d=Ut({initialValues:{from:0,to:0},validate:{from:zt.validation(f=>f>0,"The From value must be larger than 0"),to:zt.validation(f=>f>0,"The To value must be larger than 0")}});return i.jsx("form",{onSubmit:d.onSubmit(({from:f,to:h})=>{const p=BS(f,h);a.forEach(b=>Le.create(b.path,RS,o,{action:p,form:b})),s==null||s(),r.closeSelf()}),children:i.jsxs($,{children:[i.jsxs(re,{gap:"xs",grow:!0,children:[i.jsx(sl,{placeholder:"From",decimalScale:2,fixedDecimalScale:!0,...d.getInputProps("from")}),i.jsx(sl,{placeholder:"To",decimalScale:2,fixedDecimalScale:!0,...d.getInputProps("to")})]}),i.jsx(Je,{}),i.jsx(de,{type:"submit",children:"Start"})]})})},US=yt(KS,"frame-rate-tool",{title:"Change Frame Rate"}),qS="Changing Time";function h0(a,s,o,r){return`shift_offset(h=${a},m=${s},s=${o},ms=${r})`}const HS=({selections:a,onSubmit:s})=>{const{mutateAsync:o}=ps(),r=Xe(),d=Ut({initialValues:{positive:!0,hour:0,min:0,sec:0,ms:0},validate:{hour:zt.validation(h=>h>=0,"Hour must be larger than 0"),min:zt.validation(h=>h>=0,"Minute must be larger than 0"),sec:zt.validation(h=>h>=0,"Second must be larger than 0"),ms:zt.validation(h=>h>=0,"Millisecond must be larger than 0")}}),f=d.values.hour>0||d.values.min>0||d.values.sec>0||d.values.ms>0;return i.jsx("form",{onSubmit:d.onSubmit(({positive:h,hour:p,min:b,sec:g,ms:x})=>{let S;h?S=h0(p,b,g,x):S=h0(-p,-b,-g,-x),a.forEach(_=>Le.create(_.path,qS,o,{action:S,form:_})),s==null||s(),r.closeSelf()}),children:i.jsxs($,{children:[i.jsxs(re,{align:"end",gap:"xs",wrap:"nowrap",children:[i.jsx(de,{color:"gray",variant:"filled",style:{overflow:"visible"},onClick:()=>d.setValues(h=>({...h,positive:!h.positive})),children:i.jsx(ee,{icon:d.values.positive?uf:vg})}),i.jsx(sl,{min:0,label:"hour",...d.getInputProps("hour")}),i.jsx(sl,{min:0,label:"min",...d.getInputProps("min")}),i.jsx(sl,{min:0,label:"sec",...d.getInputProps("sec")}),i.jsx(sl,{min:0,label:"ms",...d.getInputProps("ms")})]}),i.jsx(Je,{}),i.jsx(de,{disabled:!f,type:"submit",children:"Start"})]})})},VS=yt(HS,"time-offset",{title:"Change Time"}),GS="Translating Subtitles",YS={af:"afrikaans",sq:"albanian",am:"amharic",ar:"arabic",hy:"armenian",az:"azerbaijani",eu:"basque",be:"belarusian",bn:"bengali",bs:"bosnian",bg:"bulgarian",ca:"catalan",ceb:"cebuano",ny:"chichewa",zh:"chinese (simplified)",zt:"chinese (traditional)",co:"corsican",hr:"croatian",cs:"czech",da:"danish",nl:"dutch",en:"english",eo:"esperanto",et:"estonian",tl:"filipino",fi:"finnish",fr:"french",fy:"frisian",gl:"galician",ka:"georgian",de:"german",el:"greek",gu:"gujarati",ht:"haitian creole",ha:"hausa",haw:"hawaiian",iw:"hebrew",hi:"hindi",hmn:"hmong",hu:"hungarian",is:"icelandic",ig:"igbo",id:"indonesian",ga:"irish",it:"italian",ja:"japanese",jw:"javanese",kn:"kannada",kk:"kazakh",km:"khmer",ko:"korean",ku:"kurdish (kurmanji)",ky:"kyrgyz",lo:"lao",la:"latin",lv:"latvian",lt:"lithuanian",lb:"luxembourgish",mk:"macedonian",mg:"malagasy",ms:"malay",ml:"malayalam",mt:"maltese",mi:"maori",mr:"marathi",mn:"mongolian",my:"myanmar (burmese)",ne:"nepali",no:"norwegian",ps:"pashto",fa:"persian",pl:"polish",pt:"portuguese",pa:"punjabi",ro:"romanian",ru:"russian",sm:"samoan",gd:"scots gaelic",sr:"serbian",st:"sesotho",sn:"shona",sd:"sindhi",si:"sinhala",sk:"slovak",sl:"slovenian",so:"somali",es:"spanish",su:"sundanese",sw:"swahili",sv:"swedish",tg:"tajik",ta:"tamil",te:"telugu",th:"thai",tr:"turkish",uk:"ukrainian",ur:"urdu",uz:"uzbek",vi:"vietnamese",cy:"welsh",xh:"xhosa",yi:"yiddish",yo:"yoruba",zu:"zulu",fil:"Filipino",he:"Hebrew"},FS=({selections:a,onSubmit:s})=>{var D,L;const o=Nn(),{mutateAsync:r}=ps(),d=Xe(),{data:f}=jo(),h=Ut({initialValues:{language:null},validate:{language:zt.validation(he.isObject,"Please select a language")}}),b=((L=(D=o==null?void 0:o.data)==null?void 0:D.translator)==null?void 0:L.translator_type)==="google_translate",g=v.useMemo(()=>b?f.filter(M=>M.code2 in YS):f,[f,b]),x=At(g,M=>M.name,M=>M.code2),_=(M=>{var R,F,oe,te;const U=(F=(R=M==null?void 0:M.data)==null?void 0:R.translator)==null?void 0:F.translator_type,H={service:"Google Translate",model:""};switch(U){case"gemini":return{...H,service:"Gemini",model:` (${((te=(oe=M==null?void 0:M.data)==null?void 0:oe.translator)==null?void 0:te.gemini_model)||""})`};case"lingarr":return{...H,service:"Lingarr"};default:return H}})(o),A=_.service,T=_.model;return i.jsx("form",{onSubmit:h.onSubmit(({language:M})=>{M&&(a.forEach(U=>Le.create(U.path,GS,r,{action:"translate",form:{...U,language:M.code2}})),s==null||s(),d.closeSelf())}),children:i.jsxs($,{children:[i.jsxs(jt,{children:[i.jsxs("div",{children:[A,T," will be used."]}),i.jsx("div",{children:"You can choose translation service in the subtitles settings."})]}),b&&i.jsxs(jt,{variant:"outline",children:["Enabled languages not listed here are unsupported by"," ",A,"."]}),i.jsx(St,{...x,...h.getInputProps("language")}),i.jsx(Je,{}),i.jsx(de,{type:"submit",children:"Start"})]})})},QS=yt(FS,"translation-tool",{title:"Translate Subtitle(s)"}),XS=[{label:"DEBUG",value:"DEBUG"},{label:"INFO",value:"INFO"},{label:"WARNING",value:"WARNING"},{label:"ERROR",value:"ERROR"},{label:"CRITICAL",value:"CRITICAL"}],kf=[{key:"addic7ed",description:"Requires Anti-Captcha Provider or cookies",inputs:[{type:"text",key:"username"},{type:"password",key:"password"},{type:"text",key:"cookies",name:"Cookies, e.g., PHPSESSID=abc; wikisubtitlesuser=xyz; wikisubtitlespass=efg"},{type:"text",key:"user_agent",name:"User-Agent, e.g., Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0"},{type:"switch",key:"vip",name:"VIP"}]},{key:"animekalesi",name:"AnimeKalesi",description:"Turkish Anime Series Subtitles Provider"},{key:"animetosho",name:"Anime Tosho",description:"Anime Tosho is a free, completely automated service which mirrors most torrents posted on TokyoTosho's anime category, Nyaa.si's English translated anime category and AniDex's anime category.",inputs:[{type:"text",key:"search_threshold",defaultValue:6,name:"Search Threshold. Increase if you often cannot find subtitles for your Anime. Note that increasing the value will decrease the performance of the search for each Episode."}],message:"Requires AniDB Integration."},{key:"avistaz",name:"AvistaZ",description:"avistaz.to - AvistaZ is an Asian torrent tracker for HD movies, TV shows and music",inputs:[{type:"text",key:"cookies",name:"Cookies, e.g., PHPSESSID=abc; wikisubtitlesuser=xyz; wikisubtitlespass=efg"},{type:"text",key:"user_agent",name:"User-Agent, e.g., Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0"}]},{key:"assrt",description:"Chinese Subtitles Provider",inputs:[{type:"text",key:"token"}]},{key:"betaseries",name:"BetaSeries",description:"French / English Provider for TV Shows Only",inputs:[{type:"text",key:"token",name:"API KEY"}]},{key:"bsplayer",name:"BSplayer",description:`Provider removed from Bazarr because it was causing too many issues.
It will always return no subtitles.`},{key:"cinemaz",name:"CinemaZ",description:`cinemaz.to - CinemaZ is a private torrent tracker which is dedicated to little-known
and cult films that you will not find on other popular torrent resources.`,inputs:[{type:"text",key:"cookies",name:"Cookies, e.g., PHPSESSID=abc; wikisubtitlesuser=xyz; wikisubtitlespass=efg"},{type:"text",key:"user_agent",name:"User-Agent, e.g., Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0"}]},{key:"embeddedsubtitles",name:"Embedded Subtitles",description:"This provider extracts embedded subtitles from your media files. You must disable 'Treat Embedded Subtitles as Downloaded' in Settings -> Subtitles for this provider to work.",inputs:[{type:"chips",key:"included_codecs",name:"Allowed codecs (subrip, ass, webvtt, mov_text). Leave empty to allow all.",defaultValue:[]},{type:"text",key:"timeout",defaultValue:600,name:"Extraction timeout in seconds"},{type:"switch",key:"hi_fallback",name:"Use HI subtitles as a fallback (don't enable this if you have a HI language profile)"},{type:"switch",key:"unknown_as_fallback",name:"Use subtitles with unknown info/language as fallback language"},{type:"text",key:"fallback_lang",name:"Fallback language",defaultValue:"en"}],message:"Warning for cloud users: this provider needs to read the entire file in order to extract subtitles."},{key:"gestdown",name:"Gestdown (Addic7ed proxy)",description:"Proxy for Addic7ed website. No need for login or cookies."},{key:"greeksubs",name:"GreekSubs",description:"Greek Subtitles Provider"},{key:"greeksubtitles",name:"GreekSubtitles",description:"Greek Subtitles Provider"},{key:"hdbits",name:"HDBits.org",description:"Private Tracker Subtitles Provider",message:"You must have 2FA enabled and whitelist your IP if you are running from a server.",inputs:[{type:"text",key:"username"},{type:"password",key:"passkey",name:"Your profile's passkey"}]},{key:"jimaku",name:"Jimaku.cc",description:"Japanese Subtitles Provider",message:"API key required. Subtitles stem from various sources and might have quality/timing issues.",inputs:[{type:"password",key:"api_key",name:"API key"},{type:"switch",key:"enable_name_search_fallback",name:"Search by name if no AniList ID was determined (Less accurate, required for live action)"},{type:"switch",key:"enable_archives_download",name:"Also consider archives alongside uncompressed subtitles"},{type:"switch",key:"enable_ai_subs",name:"Download AI generated subtitles"}]},{key:"hosszupuska",description:"Hungarian Subtitles Provider"},{key:"karagarga",name:"Karagarga.in",description:"Movie Subtitles Provider (Private Tracker)",inputs:[{type:"text",key:"username"},{type:"password",key:"password"},{type:"text",key:"f_username",name:"Forum username"},{type:"password",key:"f_password",name:"Forum password"}]},{key:"ktuvit",name:"Ktuvit",description:"Hebrew Subtitles Provider",inputs:[{type:"text",key:"email"},{type:"text",key:"hashed_password",name:"Hashed Password"}]},{key:"legendasdivx",name:"LegendasDivx",description:"Brazilian / Portuguese Subtitles Provider",inputs:[{type:"text",key:"username"},{type:"password",key:"password"},{type:"switch",key:"skip_wrong_fps",name:"Skip Wrong FPS"}]},{key:"legendasnet",name:"Legendas.net",description:"Brazilian Subtitles Provider",inputs:[{type:"text",key:"username"},{type:"password",key:"password"}]},{key:"napiprojekt",description:"Polish Subtitles Provider",inputs:[{type:"switch",key:"only_authors",name:"Skip subtitles without authors or possibly AI generated"},{type:"switch",key:"only_real_names",name:"Download subtitles with real name authors only"}]},{key:"napisy24",description:"Polish Subtitles Provider",message:"The provided credentials must have API access. Leave empty to use the defaults.",inputs:[{type:"text",key:"username"},{type:"password",key:"password"}]},{key:"nekur",description:"Latvian Subtitles Provider"},{key:"opensubtitles",name:"OpenSubtitles.org",description:"Only works if you have VIP status",inputs:[{type:"text",key:"username"},{type:"password",key:"password"},{type:"switch",key:"vip",name:"VIP"},{type:"switch",key:"ssl",name:"Use SSL"},{type:"switch",key:"skip_wrong_fps",name:"Skip Wrong FPS"}]},{key:"opensubtitlescom",name:"OpenSubtitles.com",inputs:[{type:"text",key:"username",validation:{rule:a=>/^.\S+@\S+$/.test(a)?"Invalid Username. Do not use your e-mail.":null}},{type:"password",key:"password"},{type:"switch",key:"use_hash",name:"Use Hash"},{type:"switch",key:"include_ai_translated",name:"Include AI translated subtitles in search results"}]},{key:"podnapisi",name:"Podnapisi",inputs:[{type:"switch",key:"verify_ssl",name:"Verify SSL certificate (disabling this introduces a MitM attack risk)",defaultValue:!0}]},{key:"regielive",name:"RegieLive",description:"Romanian Subtitles Provider"},{key:"soustitreseu",name:"Sous-Titres.eu",description:"Mostly French Subtitles Provider"},{key:"subdivx",description:"LATAM Spanish / Spanish Subtitles Provider"},{key:"subdl",inputs:[{type:"text",key:"api_key"}]},{key:"subf2m",name:"subf2m.co",inputs:[{type:"switch",key:"verify_ssl",name:"Verify SSL",defaultValue:!0},{type:"text",key:"user_agent",name:"User-agent header"}],message:"Make sure to use a unique and credible user agent."},{key:"subssabbz",name:"Subs.sab.bz",description:"Bulgarian Subtitles Provider"},{key:"subs4free",name:"Subs4Free",description:"Greek Subtitles Provider. Broken, may not work for some."},{key:"subs4series",name:"Subs4Series",description:`Greek Subtitles Provider.
Requires anti-captcha provider to solve captchas for each download.`},{key:"subscenter",description:"Hebrew Subtitles Provider"},{key:"subsro",name:"subs.ro",description:"Romanian Subtitles Provider"},{key:"subsunacs",name:"Subsunacs.net",description:"Bulgarian Subtitles Provider"},{key:"subsynchro",description:"French Subtitles Provider"},{key:"subtitrarinoi",name:"Subtitrari-noi.ro",description:"Romanian Subtitles Provider"},{key:"subtitriid",name:"subtitri.id.lv",description:"Latvian Subtitles Provider"},{key:"subtitulamostv",name:"Subtitulamos.tv",description:"Spanish Subtitles Provider"},{key:"supersubtitles"},{key:"titlovi",inputs:[{type:"text",key:"username"},{type:"password",key:"password"}]},{key:"titrari",name:"Titrari.ro",description:"Mostly Romanian Subtitles Provider"},{key:"titulky",name:"Titulky.com",description:"CZ/SK Subtitles Provider. Available only with VIP.",inputs:[{type:"text",key:"username"},{type:"password",key:"password"},{type:"switch",key:"approved_only",name:"Skip unapproved subtitles"},{type:"switch",key:"skip_wrong_fps",name:"Skip subtitles with mismatched fps to video's"}]},{key:"turkcealtyaziorg",name:"Turkcealtyazi.org",description:"Turkish Subtitles Provider",message:"For requests coming from outside of Turkey, cookies and user agent are required. Especially cf_clearance cookie.",inputs:[{type:"text",key:"cookies",name:"Cookies, e.g., PHPSESSID=abc; wikisubtitlesuser=xyz; wikisubtitlespass=efg"},{type:"text",key:"user_agent",name:"User-Agent, e.g., Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0"}]},{key:"tvsubtitles",name:"TVSubtitles"},{key:"whisperai",name:"Whisper",description:"AI Generated Subtitles powered by Whisper",inputs:[{type:"text",key:"endpoint",defaultValue:"http://127.0.0.1:9000",name:"Whisper ASR Docker Endpoint"},{type:"text",key:"response",defaultValue:5,name:"Connection/response timeout in seconds"},{type:"text",key:"timeout",defaultValue:3600,name:"Transcription/translation timeout in seconds"},{type:"select",key:"loglevel",name:"Logging level",options:XS},{type:"switch",key:"pass_video_name",name:"Pass video filename to Whisper (for logging)",defaultValue:!1},{type:"testbutton",key:"whisperai",name:"Test Connection button"}]},{key:"wizdom",description:"Wizdom.xyz Subtitles Provider"},{key:"xsubs",name:"XSubs",description:"Greek Subtitles Provider",inputs:[{type:"text",key:"username"},{type:"password",key:"password"}]},{key:"yavkanet",name:"Yavka.net",description:"Bulgarian Subtitles Provider"},{key:"yifysubtitles",name:"YIFY Subtitles"},{key:"zimuku",name:"Zimuku",description:"Chinese Subtitles Provider. Anti-captcha required."}],IS=[{key:"anidb",name:"AniDB",description:"AniDB is non-profit database of anime information that is freely open to the public.",inputs:[{type:"text",key:"api_client",name:"API Client"},{type:"text",key:"api_client_ver",name:"API Client Version"}]}],ZS=[{label:".hi (Hearing-Impaired)",value:"hi"},{label:".sdh (Subtitles for the Deaf or Hard-of-Hearing)",value:"sdh"},{label:".cc (Close Captioned)",value:"cc"}],PS=[{label:"AlongSide Media File",value:"current"},{label:"Relative Path to Media File",value:"relative"},{label:"Absolute Path",value:"absolute"}],$S=[{label:"ffprobe (faster than mediainfo. Part of Bazarr installation already)",value:"ffprobe"},{label:"mediainfo (slower but may give better results. User must install the mediainfo executable first)",value:"mediainfo"}],JS=[{label:"1 week",value:"1w"},{label:"2 weeks",value:"2w"},{label:"3 weeks",value:"3w"},{label:"4 weeks",value:"4w"}],WS=[{label:"3 days",value:"3d"},{label:"1 week",value:"1w"},{label:"2 weeks",value:"2w"},{label:"3 weeks",value:"3w"},{label:"4 weeks",value:"4w"}];function vt(a){return`color(name=${a})`}const e9=[{label:"White",value:vt("white")},{label:"Light Gray",value:vt("light-gray")},{label:"Red",value:vt("red")},{label:"Green",value:vt("green")},{label:"Yellow",value:vt("yellow")},{label:"Blue",value:vt("blue")},{label:"Magenta",value:vt("magenta")},{label:"Cyan",value:vt("cyan")},{label:"Black",value:vt("black")},{label:"Dark Red",value:vt("dark-red")},{label:"Dark Green",value:vt("dark-green")},{label:"Dark Yellow",value:vt("dark-yellow")},{label:"Dark Blue",value:vt("dark-blue")},{label:"Dark Magenta",value:vt("dark-magenta")},{label:"Dark Cyan",value:vt("dark-cyan")},{label:"Dark Grey",value:vt("dark-grey")}],t9=kf.map(a=>({label:a.key,value:a.key})),Ap=[{label:"60",value:60},{label:"120",value:120},{label:"300",value:300},{label:"600",value:600}],n9=[{label:"Google Translate",value:"google_translate"},{label:"Gemini",value:"gemini"},{label:"Lingarr",value:"lingarr"}],a9="Syncing Subtitle";function l9(a,s,o){const r=v6(o,s,a==="episode"),d=S6(o,s,a==="movie"),f=a==="episode"?r:d,h=[];if(f.data){if(f.data.audio_tracks.length>0){const p={group:"Embedded audio tracks",items:[]};h.push(p),f.data.audio_tracks.forEach(b=>{p.items.push({value:b.stream,label:`${b.name||b.language} (${b.stream})`})})}if(f.data.embedded_subtitles_tracks.length>0){const p={group:"Embedded subtitles tracks",items:[]};h.push(p),f.data.embedded_subtitles_tracks.forEach(b=>{p.items.push({value:b.stream,label:`${b.name||b.language} (${b.stream})`})})}if(f.data.external_subtitles_tracks.length>0){const p={group:"External Subtitles files",items:[]};h.push(p),f.data.external_subtitles_tracks.forEach(b=>{b&&p.items.push({value:b.path,label:b.name})})}return h}else return[]}const s9=({selections:a,onSubmit:s})=>{if(a.length===0)throw new Error("You need to select at least 1 media to sync");const{mutateAsync:o}=ps(),r=Xe(),d=a[0],f=d.type,h=d.id,p=d.path,b=l9(f,h,p),g=Ut({initialValues:{noFixFramerate:!1,gss:!1,hi:bo(d.hi),forced:bo(d.forced)}});return i.jsx("form",{onSubmit:g.onSubmit(x=>{a.forEach(S=>{const _={...S,reference:x.reference,max_offset_seconds:x.maxOffsetSeconds,no_fix_framerate:Ca(x.noFixFramerate),gss:Ca(x.gss)};Le.create(S.path,a9,o,{action:"sync",form:_})}),s==null||s(),r.closeSelf()}),children:i.jsxs($,{children:[i.jsx(jt,{title:"Subtitles",color:"gray",icon:i.jsx(ee,{icon:La}),children:i.jsxs(G,{size:"sm",children:[a.length," subtitles selected"]})}),i.jsx(mp,{clearable:!0,disabled:b.length===0||a.length!==1,label:"Reference",placeholder:"Default: choose automatically within video file",options:b,...g.getInputProps("reference")}),i.jsx(St,{clearable:!0,label:"Max Offset Seconds",options:Ap,placeholder:"Select...",...g.getInputProps("maxOffsetSeconds")}),i.jsx(hn,{label:"No Fix Framerate",...g.getInputProps("noFixFramerate")}),i.jsx(hn,{label:"Golden-Section Search",...g.getInputProps("gss")}),i.jsx(Je,{}),i.jsx(de,{type:"submit",children:"Sync"})]})})},i9=yt(s9,"sync-subtitle",{title:"Sync Subtitle Options",size:"lg"});function r9(){return v.useMemo(()=>[{key:"sync",icon:Oi,name:"Sync...",modal:i9},{key:"remove_HI",icon:bx,name:"Remove HI Tags"},{key:"remove_tags",icon:bg,name:"Remove Style Tags"},{key:"OCR_fixes",icon:vx,name:"OCR Fixes"},{key:"common",icon:sv,name:"Common Fixes"},{key:"fix_uppercase",icon:ux,name:"Fix Uppercase"},{key:"reverse_rtl",icon:gv,name:"Reverse RTL"},{key:"add_color",icon:px,name:"Add Color...",modal:LS},{key:"change_frame_rate",icon:gg,name:"Change Frame Rate...",modal:US},{key:"adjust_time",icon:of,name:"Adjust Times...",modal:VS},{key:"translation",icon:lf,name:"Translate...",modal:QS}],[])}const _f=({selections:a,children:s,menu:o,onAction:r})=>{const{mutateAsync:d}=ps(),f=v.useCallback((g,x)=>{a.forEach(S=>{const _={id:S.id,type:S.type,language:S.language,path:S.path,hi:S.hi,forced:S.forced};Le.create(S.path,x,d,{action:g,form:_})})},[d,a]),h=r9(),p=Xe(),b=a.length===0;return i.jsxs(lt,{withArrow:!0,withinPortal:!0,position:"left-end",...o,children:[i.jsx(lt.Target,{children:s}),i.jsxs(lt.Dropdown,{children:[i.jsx(lt.Label,{children:"Tools"}),h.map(g=>i.jsx(lt.Item,{disabled:b,leftSection:i.jsx(ee,{icon:g.icon}),onClick:()=>{g.modal?p.openContextModal(g.modal,{selections:a}):f(g.key,g.name)},children:g.name},g.key)),i.jsx(Je,{}),i.jsx(lt.Label,{children:"Actions"}),i.jsx(lt.Item,{disabled:a.length!==0||r===void 0,leftSection:i.jsx(ee,{icon:Ra}),onClick:()=>{r==null||r("search")},children:"Search"}),i.jsx(lt.Item,{disabled:a.length===0||r===void 0,color:"red",leftSection:i.jsx(ee,{icon:Ot}),onClick:()=>{p.openConfirmModal({title:"The following subtitles will be deleted",size:"lg",children:i.jsx(O4,{style:{maxHeight:"20rem"},children:i.jsx(Tn,{children:a.map(g=>i.jsx(Tn.Item,{my:"md",children:g.path},g.path))})}),onConfirm:()=>{r==null||r("delete")},labels:{confirm:"Delete",cancel:"Cancel"},confirmProps:{color:"red"}})},children:"Delete..."})]})]})};function o9(a){return $0(a)?{seriesId:0,id:a.radarrId,type:"movie",name:a.title,isMovie:!0}:{seriesId:a.sonarrSeriesId,id:a.sonarrEpisodeId,type:"episode",name:a.title,isMovie:!1}}const c9=a=>a.path.endsWith(".srt"),u9=({payload:a})=>{const[s,o]=v.useState([]),{remove:r,download:d}=_o(),{download:f,remove:h}=Ao(),p=Xe(),b=v.useMemo(()=>[{id:"selection",header:({table:x})=>i.jsx(hn,{id:"table-header-selection",indeterminate:x.getIsSomeRowsSelected(),checked:x.getIsAllRowsSelected(),onChange:x.getToggleAllRowsSelectedHandler()}),cell:({row:{index:x,getIsSelected:S,getToggleSelectedHandler:_}})=>i.jsx(hn,{id:`table-cell-${x}`,checked:S(),onChange:_(),onClick:_()})},{header:"Language",accessorKey:"raw_language",cell:({row:{original:{raw_language:x}}})=>i.jsx(ze,{color:"secondary",children:i.jsx(Et.Text,{value:x,long:!0})})},{id:"file",header:"File",accessorKey:"path",cell:({row:{original:{path:x}}})=>{let S=x.lastIndexOf("/");return S===-1&&(S=x.lastIndexOf("\\")),S!==-1?i.jsx(G,{children:x.slice(S+1)}):i.jsx(G,{children:x})}}],[]),g=v.useMemo(()=>a.flatMap(x=>{const{seriesId:S,id:_,type:A,name:T,isMovie:D}=o9(x);return x.subtitles.flatMap(L=>L.path?[{id:_,seriesId:S,type:A,language:L.code2,path:L.path,raw_language:L,name:T,hi:Ca(L.forced),forced:Ca(L.hi),isMovie:D}]:[])}),[a]);return i.jsxs($,{children:[i.jsx(qt,{tableStyles:{emptyText:"No external subtitles found"},enableRowSelection:x=>c9(x.original),onRowSelectionChanged:x=>o(x.map(S=>S.original)),columns:b,data:g}),i.jsx(Je,{}),i.jsx(re,{children:i.jsx(_f,{selections:s,onAction:x=>{s.forEach(S=>{const _={form:{language:S.language,hi:bo(S.hi),forced:bo(S.forced),path:S.path},radarrId:0,seriesId:0,episodeId:0};S.isMovie?_.radarrId=S.id:(_.seriesId=S.seriesId,_.episodeId=S.id);const A=S.isMovie?f:d,T=S.isMovie?h:r;x==="search"?Le.create(S.name,ut.SearchSubtitle,A.mutateAsync,_):x==="delete"&&S.path&&Le.create(S.name,ut.DeleteSubtitle,T.mutateAsync,_)}),p.closeAll()},children:i.jsx(de,{disabled:s.length===0,variant:"light",children:"Select Action"})})})]})},zp=yt(u9,"subtitle-tools",{title:"Subtitle Tools",size:"xl"}),Tp=a=>{const{item:s,details:o}=a,r=v.useMemo(()=>{const b=[];return s&&(b.push(i.jsx(es,{icon:dp,title:"File Path",styles:{root:{overflow:"unset"},label:{overflow:"hidden"}},children:i.jsx(Ai,{label:s.path,multiline:!0,style:{overflowWrap:"anywhere"},events:{hover:!0,focus:!1,touch:!0},children:i.jsx("span",{children:s.path})})},"file-path")),b.push(...(o==null?void 0:o.map((g,x)=>i.jsx(es,{icon:g.icon,children:g.text},Ve(x,"detail",g.text))))??[]),s.tags.length>0&&b.push(i.jsx(es,{icon:Ox,title:"Tags",children:s.tags.join("|")},"tags"))),b},[o,s]),d=v.useMemo(()=>(s==null?void 0:s.audio_language.map((b,g)=>i.jsx(es,{icon:rv,title:"Audio Language",children:_p(b.name)},Ve(g,"audio",b.code2))))??[],[s==null?void 0:s.audio_language]),f=Li(s==null?void 0:s.profileId),h=Ri(f),p=v.useMemo(()=>{const b=[];return f&&(b.push(i.jsx(es,{icon:Qx,title:"Languages Profile",children:f.name},"language-profile")),b.push(...h.map((g,x)=>i.jsx(es,{icon:lf,title:"Language",children:i.jsx(Et.Text,{long:!0,value:g})},Ve(x,"lang",g.code2))))),b},[f,h]);return i.jsx(N4,{src:(s==null?void 0:s.fanart)??"",children:i.jsxs(rd,{align:"flex-start",grow:!0,gutter:"xs",p:24,m:0,style:{backgroundColor:"rgba(0,0,0,0.7)"},styles:{inner:{flexWrap:"nowrap"}},children:[i.jsx(rd.Col,{span:1,visibleFrom:"sm",children:i.jsx(K0,{src:s==null?void 0:s.poster,mx:"auto",maw:"250px"})}),i.jsx(rd.Col,{span:8,maw:"100%",style:{overflow:"hidden"},children:i.jsxs($,{align:"flex-start",gap:"xs",mx:6,children:[i.jsxs(re,{align:"flex-start",wrap:"nowrap",maw:"100%",children:[i.jsx(za,{my:0,children:i.jsxs(G,{inherit:!0,c:"white",children:[i.jsx($n,{component:"span",mr:12,children:i.jsx(ee,{title:s!=null&&s.monitored?"monitored":"unmonitored",icon:s!=null&&s.monitored?zo:Lo})}),s==null?void 0:s.title]})}),i.jsxs(od,{position:"bottom",withArrow:!0,children:[i.jsx(od.Target,{children:i.jsx(G,{hidden:(s==null?void 0:s.alternativeTitles.length)===0,c:"white",children:i.jsx(ee,{icon:cv})})}),i.jsx(od.Dropdown,{children:i.jsx(Tn,{children:s==null?void 0:s.alternativeTitles.map((b,g)=>i.jsx(Tn.Item,{children:b},Ve(g,b)))})})]})]}),i.jsx(re,{gap:"xs",maw:"100%",children:r}),i.jsx(re,{gap:"xs",maw:"100%",children:d}),i.jsx(re,{gap:"xs",maw:"100%",children:p}),i.jsx(G,{size:"sm",c:"white",children:s==null?void 0:s.overview})]})})]})})},es=({icon:a,title:s,...o})=>i.jsx(ze,{leftSection:i.jsx(ee,{icon:a}),variant:"light",radius:"sm",size:"sm",style:{textTransform:"none"},"aria-label":s,...o});function Cp(a){const{download:s,query:o,item:r}=a,[d,f]=v.useState(!1),h=v.useMemo(()=>is(r),[r]),p=o(d?h:void 0),b=p.data!==void 0,g=v.useCallback(()=>{f(!0),p.refetch()},[p]),x=Ta.memo(({releaseInfo:T})=>{const[D,L]=v.useState(!1),M=v.useMemo(()=>T.slice(1).map((U,H)=>i.jsx(G,{children:U},H)),[T]);return T.length===0?i.jsx(G,{c:"dimmed",children:"Cannot get release info"}):i.jsxs($,{gap:0,onClick:()=>L(U=>!U),children:[i.jsxs(G,{className:"table-primary",span:!0,children:[T[0],T.length>1&&i.jsx(ee,{icon:Ux,rotation:D?180:void 0})]}),i.jsx(po,{in:D,children:i.jsx(i.Fragment,{children:M})})]})}),S=v.useMemo(()=>[{header:"Score",accessorKey:"score",cell:({row:{original:{score:T}}})=>i.jsxs(G,{className:"table-no-wrap",children:[T,"%"]})},{header:"Language",accessorKey:"language",cell:({row:{original:{language:T,hearing_impaired:D,forced:L}}})=>{const M={code2:T,hi:D==="True",forced:L==="True",name:""};return i.jsx(ze,{children:i.jsx(Et.Text,{value:M})})}},{header:"Provider",accessorKey:"provider",cell:({row:{original:{provider:T,url:D}}})=>{const L=T;return D?i.jsx(dt,{className:"table-no-wrap",href:D,target:"_blank",rel:"noopener noreferrer",children:L}):i.jsx(G,{children:L})}},{header:"Release",accessorKey:"release_info",cell:({row:{original:{release_info:T}}})=>i.jsx(x,{releaseInfo:T})},{header:"Uploader",accessorKey:"uploader",cell:({row:{original:{uploader:T}}})=>i.jsx(G,{className:"table-no-wrap",children:T??"-"})},{header:"Match",accessorKey:"matches",cell:T=>{const{matches:D,dont_matches:L}=T.row.original;return i.jsx(Bi,{matches:D,dont:L,isHistory:!1})}},{header:"Get",accessorKey:"subtitle",cell:({row:T})=>{const D=T.original;return i.jsx(Qe,{label:"Download",icon:cf,c:"brand",disabled:r===null,onClick:()=>{r&&Le.create(r.title,ut.DownloadSubtitle,s,r,D)}})}}],[s,r,x]),_=he.isString(r.sceneName)&&r.sceneName.length!==0,A=v.useMemo(()=>p.isFetching?"Searching":d?"Search Again":"Search",[p.isFetching,d]);return i.jsxs($,{children:[i.jsxs(jt,{title:"Resource",color:"gray",icon:i.jsx(ee,{icon:La}),children:[i.jsx(G,{size:"sm",children:r==null?void 0:r.path}),i.jsx(Je,{hidden:!_,my:"xs"}),i.jsx(ds,{hidden:!_,children:r==null?void 0:r.sceneName})]}),i.jsx(po,{in:b&&!p.isFetching,children:i.jsx(fl,{autoScroll:!1,tableStyles:{emptyText:"No result",placeholder:10},columns:S,data:p.data??[]})}),i.jsx(Je,{}),i.jsx(de,{loading:p.isFetching,fullWidth:!0,onClick:g,children:A})]})}const d9=yt(Cp,"movie-manual-search",{title:"Search Subtitles",size:"calc(100vw - 4rem)"}),f9=yt(Cp,"episode-manual-search",{title:"Search Subtitles",size:"calc(100vw - 4rem)"}),m0=({seriesId:a,episodeId:s,missing:o=!1,subtitle:r})=>{const{remove:d,download:f}=_o(),[h,p]=v.useState(!1),b=r.path===null,g=v.useMemo(()=>{if(h&&!b)return"highlight";if(o)return"warning";if(b)return"disabled"},[b,o,h]),x=v.useMemo(()=>{const _=[];return r.path&&_.push({id:s,type:"episode",language:r.code2,path:r.path,forced:Ca(r.forced),hi:Ca(r.hi)}),_},[s,r.code2,r.path,r.forced,r.hi]),S=i.jsx(ze,{variant:g,children:i.jsx(Et.Text,{value:r,long:!1})});return b?i.jsx(Ai.Floating,{label:"Embedded Subtitle",children:S}):i.jsx(_f,{menu:{trigger:"hover",onOpen:()=>p(!0),onClose:()=>p(!1)},selections:x,onAction:_=>{_==="search"?Le.create(r.name,ut.SearchSubtitle,f.mutateAsync,{seriesId:a,episodeId:s,form:{language:r.code2,hi:r.hi,forced:r.forced}}):_==="delete"&&r.path&&Le.create(r.name,ut.DeleteSubtitle,d.mutateAsync,{seriesId:a,episodeId:s,form:{language:r.code2,hi:r.hi,forced:r.forced,path:r.path}})},children:S})},h9=v.forwardRef(({episodes:a,profile:s,disabled:o,onAllRowsExpandedChanged:r},d)=>{const f=Ag(),h=d,p=Ri(s),{mutateAsync:b}=d6(),g=Xe(),x=v.useCallback((T,D)=>{const{language:L,hearing_impaired:M,forced:U,provider:H,subtitle:R,original_format:F}=D,{sonarrSeriesId:oe,sonarrEpisodeId:te}=T;return b({seriesId:oe,episodeId:te,form:{language:L,hi:M,forced:U,provider:H,subtitle:R,original_format:F}})},[b]),S=Ta.memo(({episode:T})=>{const D=T.sonarrSeriesId,L=v.useMemo(()=>{const M=T.sonarrEpisodeId,U=T.missing_subtitles.map((F,oe)=>i.jsx(m0,{missing:!0,seriesId:D,episodeId:M,subtitle:F},Ve(oe,F.code2,"missing")));let H=T.subtitles;f&&(H=eg(H,p));const R=H.map((F,oe)=>i.jsx(m0,{seriesId:D,episodeId:M,subtitle:F},Ve(oe,F.code2,"valid")));return[...U,...R]},[T,D]);return i.jsx(re,{gap:"xs",wrap:"nowrap",children:L})}),_=v.useMemo(()=>[{id:"monitored",cell:({row:{original:{monitored:T}}})=>i.jsx(ee,{title:T?"monitored":"unmonitored",icon:T?zo:Lo})},{header:"",accessorKey:"season",cell:({row:{original:{season:T}}})=>i.jsxs(G,{span:!0,children:["Season ",T]})},{header:"Episode",accessorKey:"episode"},{header:"Title",accessorKey:"title",cell:({row:{original:{sceneName:T,title:D}}})=>i.jsx(Tt,{text:T,children:i.jsx(G,{className:"table-primary",children:D})})},{header:"Audio",accessorKey:"audio_language",cell:({row:{original:{audio_language:T}}})=>i.jsx(Uo,{audios:T})},{header:"Subtitles",accessorKey:"missing_subtitles",cell:({row:{original:T}})=>i.jsx(S,{episode:T})},{header:"Actions",cell:({row:T})=>i.jsxs(re,{gap:"xs",wrap:"nowrap",children:[i.jsx(Qe,{label:"Manual Search",disabled:o,onClick:()=>{g.openContextModal(f9,{item:T.original,download:x,query:c6})},icon:nf}),i.jsx(Qe,{label:"History",disabled:o,onClick:()=>{g.openContextModal(ES,{episode:T.original},{title:`History - ${T.original.title}`})},icon:df})]})}],[o,x,g,S]),A=v.useMemo(()=>(a==null?void 0:a.reduce((T,D)=>Math.max(T,D.season),0))??0,[a]);return v.useEffect(()=>{var T;(T=h==null?void 0:h.current)==null||T.setExpanded(()=>({[`season:${A}`]:!0}))},[h,A]),i.jsx(Q8,{columns:_,data:a??[],instanceRef:h,onAllRowsExpandedChanged:r,initialState:{sorting:[{id:"season",desc:!0},{id:"episode",desc:!0}],grouping:["season"]},tableStyles:{emptyText:"No Episode Found For This Series"}})}),m9=()=>{var H;const a=Q0(),s=Number.parseInt(a.id),o=m6(s),r=tg(s),{data:d}=r,{data:f,isFetched:h}=o,p=tf(),{mutateAsync:b}=rg(),g=(d==null?void 0:d.length)!==0,x=v.useMemo(()=>[{icon:Bx,text:`${f==null?void 0:f.episodeFileCount} files`},{icon:kg,text:`${f==null?void 0:f.episodeMissingCount} missing subtitles`},{icon:f!=null&&f.ended?Sg:Oi,text:f!=null&&f.ended?"Ended":"Continuing"},{icon:ov,text:`Last ${f!=null&&f.ended?"aired on":"known airdate"}: ${f==null?void 0:f.lastAired}`},{icon:$x,text:(f==null?void 0:f.seriesType)??""}],[f]),S=Xe(),_=Li(f==null?void 0:f.profileId),A=og(),T=v.useCallback(R=>{f&&_?S.openContextModal(AS,{files:R,series:f}):ol(fn.warn("Cannot Upload Files","series or language profile is not ready"))},[S,_,f]);pt(`${(f==null?void 0:f.title)??"Unknown Series"} - Bazarr (Series)`);const D=v.useRef(null),[L,M]=v.useState((H=D==null?void 0:D.current)==null?void 0:H.getIsAllRowsExpanded()),U=v.useRef(null);return isNaN(s)||h&&!f?i.jsx(X0,{to:Bo.NotFound}):i.jsx(We,{px:0,fluid:!0,children:i.jsxs(Ct,{result:o,children:[i.jsx(vi.FullScreen,{openRef:U,active:_!==void 0,onDrop:T,children:i.jsx(up,{})}),i.jsxs(ce,{children:[i.jsxs(re,{gap:"xs",children:[i.jsx(ce.Button,{icon:ys,disabled:!g||A,onClick:()=>{f&&Le.create(f.title,ut.Sync,b,{action:"sync",seriesid:s})},children:"Sync"}),i.jsx(ce.Button,{icon:rf,disabled:!g||A,onClick:()=>{f&&Le.create(f.title,ut.ScanDisk,b,{action:"scan-disk",seriesid:s})},children:"Scan Disk"}),i.jsx(ce.Button,{icon:Ra,onClick:()=>{f&&Le.create(f.title,ut.SearchSubtitle,b,{action:"search-missing",seriesid:s})},disabled:f===void 0||f.episodeFileCount===0||f.profileId===null||!g,loading:A,children:"Search"})]}),i.jsxs(re,{gap:"xs",children:[i.jsx(ce.Button,{disabled:f===void 0||f.episodeFileCount===0||!g||A,icon:dv,onClick:()=>{d&&S.openContextModal(zp,{payload:d})},children:"Mass Edit"}),i.jsx(ce.Button,{disabled:f===void 0||f.episodeFileCount===0||f.profileId===null||!g||A,icon:af,onClick:()=>{var R;return(R=U.current)==null?void 0:R.call(U)},children:"Upload"}),i.jsx(ce.Button,{icon:Ei,disabled:A,onClick:()=>{f&&S.openContextModal(Ko,{item:f,mutation:p},{title:f.title})},children:"Edit Series"}),i.jsx(ce.Button,{icon:L?hg:hx,onClick:()=>{var R;(R=D.current)==null||R.toggleAllRowsExpanded()},children:L?"Collapse All":"Expand All"})]})]}),i.jsxs($,{children:[i.jsx(Tp,{item:f??null,details:x}),i.jsx(Ct,{result:r,children:i.jsx(h9,{ref:D,episodes:d??null,profile:_,disabled:A||!f||f.profileId===null,onAllRowsExpandedChanged:M})})]})]})})},g9=()=>i.jsxs(We,{my:"lg",children:[i.jsx(cl,{children:i.jsxs(za,{order:1,children:[i.jsx($n,{component:"span",mr:"md",children:i.jsx(ee,{icon:K8})}),"404"]})}),i.jsx(cl,{children:i.jsx(G,{children:"The Request URL No Found"})})]});function Ep({columns:a,name:s,query:o}){return pt(`${s} History - Bazarr`),i.jsx(We,{fluid:!0,px:0,children:i.jsx(Mf,{tableStyles:{emptyText:`Nothing Found in ${s} History`},columns:a,query:o})})}const p9=()=>{const a=sg(),s=v.useMemo(()=>[{id:"action",cell:({row:r})=>i.jsx(qo,{action:r.original.action})},{header:"Name",accessorKey:"title",cell:({row:r})=>{const d=`/movies/${r.original.radarrId}`;return i.jsx(dt,{className:"table-primary",component:Da,to:d,children:r.original.title})}},{header:"Language",accessorKey:"language",cell:({row:{original:{language:r}}})=>r?i.jsx(ze,{children:i.jsx(Et.Text,{value:r,long:!0})}):null},{header:"Score",accessorKey:"score"},{header:"Match",accessorKey:"matches",cell:r=>{const{matches:d,dont_matches:f}=r.row.original;return d.length||f.length?i.jsx(Bi,{matches:d,dont:f,isHistory:!0}):null}},{header:"Date",accessorKey:"timestamp",cell:({row:{original:{timestamp:r,parsed_timestamp:d}}})=>r?i.jsx(Tt,{text:d,children:i.jsx(G,{children:r})}):null},{header:"Info",accessorKey:"description",cell:({row:{original:{description:r}}})=>i.jsx(Tt,{text:r,children:i.jsx(ee,{size:"sm",icon:La})})},{header:"Upgradable",accessorKey:"upgradable",cell:({row:{original:{upgradable:r}}})=>r?i.jsx(Tt,{text:"This Subtitle File Is Eligible For An Upgrade.",children:i.jsx(ee,{size:"sm",icon:sf})}):null},{header:"Blacklist",accessorKey:"blacklisted",cell:({row:r})=>{const{blacklisted:d,radarrId:f,provider:h,subs_id:p,language:b,subtitles_path:g}=r.original;return p&&h&&b?i.jsx(Ba,{label:"Add to Blacklist",disabled:d,icon:Ci,mutation:a,args:()=>({id:f,form:{provider:h,subs_id:p,subtitles_path:g,language:b.code2}})}):null}}],[a]),o=s6();return i.jsx(Ep,{name:"Movies",query:o,columns:s})},y9=()=>{const a=ng(),s=v.useMemo(()=>[{id:"action",cell:({row:{original:r}})=>i.jsx(qo,{action:r.action})},{header:"Series",accessorKey:"seriesTitle",cell:({row:{original:{seriesTitle:r,sonarrSeriesId:d}}})=>{const f=`/series/${d}`;return i.jsx(dt,{className:"table-primary",component:Da,to:f,children:r})}},{header:"Episode",accessorKey:"episode_number"},{header:"Title",accessorKey:"episodeTitle",cell:({row:{original:{episodeTitle:r}}})=>i.jsx(G,{className:"table-no-wrap",children:r})},{header:"Language",accessorKey:"language",cell:({row:{original:{language:r}}})=>r?i.jsx(ze,{color:"secondary",children:i.jsx(Et.Text,{value:r,long:!0})}):null},{header:"Score",accessorKey:"score"},{header:"Match",accessorKey:"matches",cell:r=>{const{matches:d,dont_matches:f}=r.row.original;return d.length||f.length?i.jsx(Bi,{matches:d,dont:f,isHistory:!0}):null}},{header:"Date",accessorKey:"timestamp",cell:({row:{original:{timestamp:r,parsed_timestamp:d}}})=>r?i.jsx(Tt,{text:d,children:i.jsx(G,{children:r})}):null},{header:"Info",accessorKey:"description",cell:({row:{original:{description:r}}})=>i.jsx(Tt,{text:r,children:i.jsx(ee,{size:"sm",icon:La})})},{header:"Upgradable",accessorKey:"upgradable",cell:({row:{original:{upgradable:r}}})=>r?i.jsx(Tt,{text:"This Subtitle File Is Eligible For An Upgrade.",children:i.jsx(ee,{size:"sm",icon:sf})}):null},{header:"Blacklist",accessorKey:"blacklisted",cell:({row:r})=>{const{sonarrEpisodeId:d,sonarrSeriesId:f,provider:h,subs_id:p,language:b,subtitles_path:g,blacklisted:x}=r.original;return p&&h&&b?i.jsx(Ba,{label:"Add to Blacklist",disabled:x,icon:Ci,mutation:a,args:()=>({seriesId:f,episodeId:d,form:{provider:h,subs_id:p,subtitles_path:g,language:b.code2}})}):null}}],[a]),o=$b();return i.jsx(Ep,{name:"Series",query:o,columns:s})};function Op({query:a,columns:s}){const o=hs();return i.jsxs(i.Fragment,{children:[i.jsx(ce,{children:i.jsx(ce.Button,{disabled:a.paginationStatus.totalCount===0,icon:mx,onClick:()=>o("edit"),children:"Mass Edit"})}),i.jsx(Mf,{columns:s,query:a,tableStyles:{emptyText:"No items found"}})]})}const b9=()=>{const a=ef(),s=Xe(),o=n6(),r=v.useMemo(()=>[{id:"monitored",cell:({row:{original:{monitored:d}}})=>i.jsx(ee,{title:d?"monitored":"unmonitored",icon:d?zo:Lo})},{header:"Name",accessorKey:"title",cell:({row:{original:{title:d,radarrId:f}}})=>{const h=`/movies/${f}`;return i.jsx(dt,{className:"table-primary",component:Da,to:h,children:d})}},{header:"Audio",accessorKey:"audio_language",cell:({row:{original:{audio_language:d}}})=>i.jsx(Uo,{audios:d})},{header:"Languages Profile",accessorKey:"profileId",cell:({row:{original:{profileId:d}}})=>i.jsx(Ho,{index:d,empty:""})},{header:"Missing Subtitles",accessorKey:"missing_subtitles",cell:({row:{original:{missing_subtitles:d}}})=>i.jsx(i.Fragment,{children:d.map(f=>i.jsx(ze,{mr:"xs",color:"yellow",children:i.jsx(Et.Text,{value:f})},he.uniqueId(`${Ve(f.code2,f.hi,f.forced)}_`)))})},{id:"radarrId",cell:({row:d})=>i.jsx(Qe,{label:"Edit Movie",tooltip:{position:"left"},onClick:()=>s.openContextModal(Ko,{mutation:a,item:d.original},{title:d.original.title}),icon:Ei})}],[s,a]);return pt("Movies - Bazarr"),i.jsx(We,{fluid:!0,px:0,children:i.jsx(Op,{query:o,columns:r})})},g0=(a,s)=>{if(s.language===null)return{state:"error",messages:"Language is not selected"};{const{subtitles:o}=a;if(o.find(d=>{var f;return d.code2===((f=s.language)==null?void 0:f.code2)&&he.isString(d.path)})!==void 0)return{state:"warning",messages:"Override existing subtitle"}}return{state:"valid"}},x9=({files:a,movie:s,onComplete:o})=>{const r=Xe(),d=Li(s.profileId),f=Ri(d),h=At(he.uniqBy(f,"code2"),A=>A.name,A=>A.code2),p=v.useMemo(()=>f.length>0?f[0]:null,[f]),b=Ut({initialValues:{files:a.map(A=>({file:A,language:p,forced:(p==null?void 0:p.forced)??!1,hi:(p==null?void 0:p.hi)??!1})).map(A=>({...A,validateResult:g0(s,A)}))},validate:{files:zt.validation(A=>A.find(T=>T.language===null||T.validateResult===void 0||T.validateResult.state==="error")===void 0,"Some files cannot be uploaded, please check")}});v.useEffect(()=>{b.values.files.length<=0&&r.closeSelf()},[b.values.files.length,r]);const g=zi(A=>{b.setValues(T=>{const D=A(T.files??[]);return D.forEach(L=>{L.validateResult=g0(s,L)}),{...T,files:D}})}),x=({validateResult:A})=>{const T=v.useMemo(()=>{switch(A==null?void 0:A.state){case"valid":return To;case"warning":return La;case"error":return Mg;default:return mg}},[A==null?void 0:A.state]),D=v.useMemo(()=>{switch(A==null?void 0:A.state){case"valid":return"green";case"warning":return"yellow";case"error":return"red";default:return}},[A==null?void 0:A.state]);return i.jsx(Tt,{text:A==null?void 0:A.messages,children:i.jsx(G,{c:D,inline:!0,children:i.jsx(ee,{icon:T})})})},S=v.useMemo(()=>[{id:"validateResult",cell:({row:{original:{validateResult:A}}})=>i.jsx(x,{validateResult:A})},{header:"File",id:"filename",accessorKey:"file",cell:({row:{original:{file:A}}})=>i.jsx(G,{className:"table-primary",children:A.name})},{header:"Language",accessorKey:"language",cell:({row:{original:A,index:T}})=>i.jsx(St,{...h,className:"table-long-break",value:A.language,onChange:D=>{g.mutate(T,{...A,language:D})}})},{header:()=>i.jsx(St,{options:os,value:null,placeholder:"Type",onChange:A=>{A&&g.update(T=>{switch(A){case"hi":return{...T,hi:!0,forced:!1};case"forced":return{...T,hi:!1,forced:!0};case"normal":return{...T,hi:!1,forced:!1};default:return T}})}}),accessorKey:"type",cell:({row:{original:A,index:T}})=>{var D;return i.jsx(mn,{value:(D=os.find(L=>A.hi?L.value==="hi":A.forced?L.value==="forced":L.value==="normal"))==null?void 0:D.value,data:os,onChange:L=>{L&&g.mutate(T,{...A,hi:L==="hi",forced:L==="forced"})}})}},{id:"action",cell:({row:{index:A}})=>i.jsx(Qe,{label:"Remove",icon:Ot,c:"red",onClick:()=>g.remove(A)})}],[g,h]),{upload:_}=Ao();return i.jsx("form",{onSubmit:b.onSubmit(({files:A})=>{const{radarrId:T}=s;A.forEach(({file:D,language:L,hi:M,forced:U})=>{if(L===null)throw new Error("Language is not selected");Le.create(D.name,ut.UploadSubtitle,_.mutateAsync,{radarrId:T,form:{file:D,language:L.code2,hi:M,forced:U}})}),o==null||o(),r.closeSelf()}),children:i.jsxs($,{className:"table-long-break",children:[i.jsx(qt,{columns:S,data:b.values.files}),i.jsx(Je,{}),i.jsx(de,{type:"submit",children:"Upload"})]})})},v9=yt(x9,"upload-movie-subtitle",{title:"Upload Subtitles",size:"xl"}),Fd="Missing Subtitles";function p0(a){return!he.isString(a)||a.length===0}function xd(a){return a===Fd}const S9=({movie:a,profile:s,disabled:o})=>{const r=Ag(),d=Ri(s),{download:f,remove:h}=Ao(),p=Ta.memo(({item:x})=>{const{code2:S,path:_,hi:A,forced:T}=x,D=v.useMemo(()=>{const M=[];return _&&!xd(_)&&a!==null&&M.push({type:"movie",path:_,id:a.radarrId,language:S,forced:Ca(T),hi:Ca(A)}),M},[S,_,T,A]);if(a===null)return null;const{radarrId:L}=a;return xd(_)?i.jsx(Qe,{label:"Search Subtitle",icon:Ra,disabled:o,onClick:()=>{Le.create(a.title,ut.SearchSubtitle,f.mutateAsync,{radarrId:L,form:{language:S,forced:T,hi:A}})}}):i.jsx(_f,{selections:D,onAction:M=>{if(M==="delete"&&_)Le.create(a.title,ut.DeleteSubtitle,h.mutateAsync,{radarrId:L,form:{language:S,forced:T,hi:A,path:_}});else if(M==="search")throw new Error("This shouldn't happen, please report the bug")},children:i.jsx(Qe,{label:"Subtitle Actions",disabled:p0(_),icon:jg})})}),b=v.useMemo(()=>[{header:"Subtitle Path",accessorKey:"path",cell:({row:{original:{path:x}}})=>{const S={className:"table-primary"};return p0(x)?i.jsx(G,{className:"table-primary",children:"Video File Subtitle Track"}):xd(x)?i.jsx(G,{...S,c:"dimmed",children:x}):i.jsx(G,{...S,children:x})}},{header:"Language",accessorKey:"name",cell:({row:x})=>x.original.path===Fd?i.jsx(ze,{color:"primary",children:i.jsx(Et.Text,{value:x.original,long:!0})}):i.jsx(ze,{color:"secondary",children:i.jsx(Et.Text,{value:x.original,long:!0})})},{id:"code2",cell:({row:{original:x}})=>i.jsx(p,{item:x})}],[p]),g=v.useMemo(()=>{const x=(a==null?void 0:a.missing_subtitles.map(_=>({..._,path:Fd})))??[];let S=(a==null?void 0:a.subtitles)??[];return r&&(S=eg(S,d)),[...S,...x]},[a,r,d]);return i.jsx(qt,{columns:b,data:g,tableStyles:{emptyText:"No subtitles found for this movie"}})},j9=()=>{const a=Q0(),s=Number.parseInt(a.id??""),o=e6(s),{data:r,isFetched:d}=o,f=Li(r==null?void 0:r.profileId),h=Xe(),p=ef(),{mutateAsync:b}=lg(),{mutateAsync:g}=f6(),x=v.useCallback((D,L)=>{const{language:M,hearing_impaired:U,forced:H,provider:R,subtitle:F,original_format:oe}=L,{radarrId:te}=D;return g({radarrId:te,form:{language:M,hi:U,forced:H,provider:R,subtitle:F,original_format:oe}})},[g]),S=v.useCallback(D=>{r&&f?h.openContextModal(v9,{files:D,movie:r}):ol(fn.warn("Cannot Upload Files","movie or language profile is not ready"))},[h,r,f]),_=y6();pt(`${(r==null?void 0:r.title)??"Unknown Movie"} - Bazarr (Movies)`);const A=v.useRef(null);if(isNaN(s)||d&&!r)return i.jsx(X0,{to:Bo.NotFound});const T=(r==null?void 0:r.profileId)!==void 0;return i.jsx(We,{fluid:!0,px:0,children:i.jsxs(Ct,{result:o,children:[i.jsx(vi.FullScreen,{openRef:A,active:f!==void 0,onDrop:S,children:i.jsx(up,{})}),i.jsxs(ce,{children:[i.jsxs(re,{gap:"xs",children:[i.jsx(ce.Button,{icon:ys,disabled:_,onClick:()=>{r&&Le.create(r.title,ut.Sync,b,{action:"sync",radarrid:s})},children:"Sync"}),i.jsx(ce.Button,{icon:rf,disabled:_,onClick:()=>{r&&Le.create(r.title,ut.ScanDisk,b,{action:"scan-disk",radarrid:s})},children:"Scan Disk"}),i.jsx(ce.Button,{icon:Ra,disabled:!he.isNumber(r==null?void 0:r.profileId),loading:_,onClick:()=>{r&&Le.create(r.title,ut.SearchSubtitle,b,{action:"search-missing",radarrid:s})},children:"Search"}),i.jsx(ce.Button,{icon:nf,disabled:!he.isNumber(r==null?void 0:r.profileId)||_,onClick:()=>{r&&h.openContextModal(d9,{item:r,download:x,query:o6})},children:"Manual"})]}),i.jsxs(re,{gap:"xs",children:[i.jsx(ce.Button,{disabled:!T||r.profileId===null||_,icon:af,onClick:()=>{var D;return(D=A.current)==null?void 0:D.call(A)},children:"Upload"}),i.jsx(ce.Button,{icon:Ei,disabled:_,onClick:()=>{r&&h.openContextModal(Ko,{item:r,mutation:p},{title:r.title})},children:"Edit Movie"}),i.jsxs(lt,{children:[i.jsx(lt.Target,{children:i.jsx(Qe,{label:"More Actions",icon:jg,disabled:_})}),i.jsxs(lt.Dropdown,{children:[i.jsx(lt.Item,{leftSection:i.jsx(ee,{icon:Gx}),onClick:()=>{r&&h.openContextModal(zp,{payload:[r]})},children:"Mass Edit"}),i.jsx(lt.Item,{leftSection:i.jsx(ee,{icon:df}),onClick:()=>{r&&h.openContextModal(TS,{movie:r})},children:"History"})]})]})]})]}),i.jsxs($,{children:[i.jsx(Tp,{item:r??null,details:[]}),i.jsx(S9,{movie:r??null,profile:f,disabled:_})]})]})})};function Np(a){const{columns:s,data:o,mutation:r}=a,[d,f]=v.useState([]),[h,p]=v.useState([]),b=b6(),{data:g}=Ti(),x=v.useRef(null),S=hs(),_=v.useCallback(()=>S(".."),[S]),A=v.useMemo(()=>he.uniqBy([...h,...o??[]],is),[h,o]),T=At(g??[],R=>R.name),D=v.useMemo(()=>[{group:"Actions",items:[{label:"Clear",value:"",profileId:null}]},{group:"Profiles",items:T.options.map(R=>({value:R.value.profileId.toString(),label:R.label,profileId:R.value.profileId}))}],[T.options]),{mutateAsync:L}=r,M=v.useCallback(()=>{const F={id:[],profileid:[]};h.forEach(te=>{const Te=is(te);Te&&(F.id.push(Te),F.profileid.push(te.profileId))});const oe=async(te,Te)=>{if(te.length===0)return;const $t=te.slice(0,1e3),Nt=Te.slice(0,1e3);await L({id:$t,profileid:Nt}),await oe(te.slice(1e3),Te.slice(1e3))};return oe(F.id,F.profileid)},[h,L]),U=v.useCallback(R=>{var oe;const F=d.map(te=>({...te,profileId:R}));p(te=>he.uniqBy([...F,...te],is)),(oe=x.current)==null||oe.toggleAllRowsSelected(!1)},[d]),H=D4();return i.jsxs(We,{fluid:!0,px:0,children:[i.jsxs(ce,{children:[i.jsx($n,{children:i.jsx(mp,{onClick:()=>H.openDropdown(),onDropdownClose:()=>{H.resetSelectedOption()},placeholder:"Change Profile",withCheckIcon:!1,options:D,disabled:d.length===0,comboboxProps:{store:H,onOptionSubmit:R=>{U(R?+R:null)}}})}),i.jsxs($n,{children:[i.jsx(ce.Button,{icon:Rx,onClick:_,children:"Cancel"}),i.jsx(ce.MutateButton,{icon:To,disabled:h.length===0||b,promise:M,onSuccess:_,children:"Save"})]})]}),i.jsx(qt,{instanceRef:x,columns:s,data:A,enableRowSelection:!0,onRowSelectionChanged:R=>{f(R.map(F=>F.original))}})]})}const w9=()=>{const a=t6(),s=ef();pt("Movies - Bazarr (Mass Editor)");const o=v.useMemo(()=>[{id:"selection",header:({table:r})=>i.jsx(hn,{id:"table-header-selection",indeterminate:r.getIsSomeRowsSelected(),checked:r.getIsAllRowsSelected(),onChange:r.getToggleAllRowsSelectedHandler()}),cell:({row:{index:r,getIsSelected:d,getToggleSelectedHandler:f}})=>i.jsx(hn,{id:`table-cell-${r}`,checked:d(),onChange:f(),onClick:f()})},{header:"Name",accessorKey:"title"},{header:"Audio",accessorKey:"audio_language",cell:({row:{original:{audio_language:r}}})=>i.jsx(Uo,{audios:r})},{header:"Languages Profile",accessorKey:"profileId",cell:({row:{original:{profileId:r}}})=>i.jsx(Ho,{index:r})}],[]);return i.jsx(Ct,{result:a,children:i.jsx(Np,{columns:o,data:a.data??[],mutation:s})})},M9=()=>{const a=tf(),s=p6(),o=Xe(),r=v.useMemo(()=>[{id:"status",cell:({row:{original:d}})=>i.jsxs(re,{gap:"xs",wrap:"nowrap",children:[i.jsx(ee,{title:d.monitored?"monitored":"unmonitored",icon:d.monitored?zo:Lo}),i.jsx(ee,{title:d.ended?"Ended":"Continuing",icon:d.ended?Sg:Oi})]})},{header:"Name",accessorKey:"title",cell:({row:{original:d}})=>{const f=`/series/${d.sonarrSeriesId}`;return i.jsx(dt,{className:"table-primary",component:Da,to:f,children:d.title})}},{header:"Languages Profile",accessorKey:"profileId",cell:({row:{original:d}})=>i.jsx(Ho,{index:d.profileId,empty:""})},{header:"Episodes",accessorKey:"episodeFileCount",cell:d=>{const{episodeFileCount:f,episodeMissingCount:h,profileId:p,title:b}=d.row.original,g=`${f-h}/${f}`;return i.jsxs(lo.Root,{size:"xl",children:[i.jsx(lo.Section,{value:f===0||!p?0:(1-h/f)*100,color:h===0?"brand":"yellow",children:i.jsx(lo.Label,{children:g})}),h===f&&i.jsx(lo.Label,{styles:{label:{position:"absolute",top:"3px",left:"50%",transform:"translateX(-50%)"}},children:g})]},b)}},{id:"sonarrSeriesId",cell:({row:{original:d}})=>i.jsx(Qe,{label:"Edit Series",tooltip:{position:"left"},onClick:()=>o.openContextModal(Ko,{mutation:a,item:d},{title:d.title}),icon:Ei})}],[a,o]);return pt("Series - Bazarr"),i.jsx(We,{px:0,fluid:!0,children:i.jsx(Op,{query:s,columns:r})})},k9=()=>{const a=g6(),s=tf(),o=v.useMemo(()=>[{id:"selection",header:({table:r})=>i.jsx(hn,{id:"table-header-selection",indeterminate:r.getIsSomeRowsSelected(),checked:r.getIsAllRowsSelected(),onChange:r.getToggleAllRowsSelectedHandler()}),cell:({row:{index:r,getIsSelected:d,getToggleSelectedHandler:f}})=>i.jsx(hn,{id:`table-cell-${r}`,checked:d(),onChange:f(),onClick:f()})},{header:"Name",accessorKey:"title"},{header:"Audio",accessorKey:"audio_language",cell:({row:{original:{audio_language:r}}})=>i.jsx(Uo,{audios:r})},{header:"Languages Profile",accessorKey:"profileId",cell:({row:{original:{profileId:r}}})=>i.jsx(Ho,{index:r})}],[]);return pt("Series - Bazarr (Mass Editor)"),i.jsx(Ct,{result:a,children:i.jsx(Np,{columns:o,data:a.data??[],mutation:s})})},Vo=v.createContext(null);function Dp(){const a=v.useContext(Vo);if(a===null)throw new Error("useFormValues must be used within a FormContext");return a}function Af(){return{...Dp().values.settings}}function Ka(){const a=Dp(),s=v.useRef(a);s.current=a;const o=v.useCallback(d=>{Se("info","Updating values",d),s.current.setValues(f=>{const h={...f.settings,...d};return{...f,settings:h}})},[]),r=v.useCallback((d,f,h)=>{Se("info",`Updating value of ${f}`,d),s.current.setValues(p=>{const b={...p.settings,[f]:d},g={...p.hooks};return h&&(Se(),g[f]=h),{...p,settings:b,hooks:g}})},[]);return{update:o,setValue:r}}function zf(a,s){for(const o in s)if(o in a){Se("info","Running submit hook for",o,s[o]);const r=s[o],d=a[o];s[o]=d(r),Se("info","Finish submit hook",o,s[o])}}const Lp=v.createContext(null);function Rp(){return v.useContext(Lp)}const Tf=({value:a,children:s})=>i.jsx(Lp.Provider,{value:a,children:s});function vn(a){const{settingKey:s,settingOptions:o,...r}=a,d=_t(s,o),{setValue:f}=Ka(),h=v.useCallback(p=>{var g;const b=(p&&((g=o==null?void 0:o.onSaved)==null?void 0:g.call(o,p)))??p;f(b,s,o==null?void 0:o.onSubmit)},[o,f,s]);return{value:d,update:h,rest:r}}function _t(a,s){var h;const o=Rp(),r=v.useRef(s);r.current=s;const d=v.useMemo(()=>{var S,_;const p=(S=r.current)==null?void 0:S.onLoaded,b=(_=r.current)==null?void 0:_.defaultValue;if(p&&o)return Se(),p(o);const g=a.replaceAll("-","."),x=he.get({settings:o},g,null);return b&&(he.isNull(x)||he.isUndefined(x))?(Se("info",`${a} is falling back to`,b),b):x},[a,o]),f=Af();return a in f&&((h=r.current)==null?void 0:h.original)!==!0?f[a]:d}function _9(a,s,o){const{setValue:r}=Ka(),d=Af(),f=v.useRef(o);f.current=o;const h=v.useMemo(()=>a in d?d[a]:s,[a,d,s]);return v.useCallback((p,b)=>{const g=he.uniqBy([p,...h],f.current);r(g,a,b)},[h,r,a])}const A9="_card_1cni1_32",z9={card:A9},wo=({header:a,description:s,plus:o,onClick:r,lineClamp:d,titleStyles:f})=>i.jsx(L4,{p:"lg",onClick:r,className:z9.card,children:o?i.jsx(cl,{children:i.jsx(ee,{size:"2x",icon:uf})}):i.jsxs($,{h:"100%",gap:0,children:[i.jsx(G,{fw:"bold",style:f,children:a}),i.jsx(Tt,{text:s,children:i.jsx(G,{hidden:s===void 0,lineClamp:d,children:s})})]})});function T9(a,s){const o=X4(({currentLocation:d,nextLocation:f})=>a&&d.pathname!==f.pathname),r=v.useRef(a);v.useEffect(()=>{o.state==="blocked"&&r.current===a&&R4.openConfirmModal({title:"Unsaved Changes",children:s,labels:{confirm:"Leave",cancel:"Stay"},confirmProps:{color:"red"},onConfirm:()=>o.proceed(),onCancel:()=>o.reset(),closeOnCancel:!0,closeOnConfirm:!0}),r.current=a},[o,s,a])}const Dn=a=>{const{children:s,name:o}=a,{data:r,isLoading:d,isRefetching:f}=Nn(),{mutate:h,isPending:p}=cg(),b=Ut({initialValues:{settings:{},hooks:{}}});Jd(f,S=>{S||b.reset()});const g=v.useCallback(S=>{const{settings:_,hooks:A}=S;if(Object.keys(_).length>0){const T={..._};zf(A,T),Se("info","submitting settings",T),h(T)}},[h]),x=v.useMemo(()=>Object.keys(b.values.settings).length,[b.values.settings]);return T9(x>0,`You have ${x} unsaved changes, are you sure you want to leave?`),pt(`${o} - Bazarr (Settings)`),i.jsx(Tf,{value:r??null,children:i.jsx(Ro,{value:d||p,children:i.jsxs("form",{onSubmit:b.onSubmit(g),style:{position:"relative"},children:[i.jsx(fs,{visible:r===void 0}),i.jsx(ce,{children:i.jsx(re,{children:i.jsx(ce.Button,{type:"submit",icon:Dx,loading:p,disabled:x===0,rightSection:i.jsx(ze,{size:"xs",radius:"sm",hidden:x===0,children:x}),children:"Save"})})}),i.jsx(Vo.Provider,{value:b,children:i.jsx(We,{size:"xl",mx:0,children:s})})]})})})},C9=a=>{const{children:s,callbackModal:o}=a,{data:r,isLoading:d,isRefetching:f}=Nn(),{mutate:h,isPending:p}=cg(),b=Ut({initialValues:{settings:{},hooks:{}}});Jd(f,S=>{S||b.reset()});const g=v.useCallback(S=>{const{settings:_,hooks:A}=S;if(Object.keys(_).length>0){const T={..._};zf(A,T),Se("info","submitting settings",T),h(T),setTimeout(()=>{o(!0)},500)}},[h,o]),x=v.useMemo(()=>Object.keys(b.values.settings).length,[b.values.settings]);return i.jsx(Tf,{value:r??null,children:i.jsx(Ro,{value:d||p,children:i.jsxs("form",{onSubmit:b.onSubmit(g),style:{position:"relative"},children:[i.jsx(fs,{visible:r===void 0}),i.jsx(Vo.Provider,{value:b,children:i.jsx(We,{size:"xl",mx:0,children:s})}),i.jsx(ns,{h:"md"}),i.jsx(Je,{}),i.jsx(ns,{h:"md"}),i.jsxs(re,{justify:"right",children:[i.jsx(de,{type:"submit",disabled:x===0,loading:p,children:"Save"}),i.jsx(de,{onClick:()=>{o(!0)},children:"Close"})]})]})})})},Q=({type:a="info",children:s})=>i.jsx(G,{size:"sm",c:a==="info"?"dimmed":"yellow",my:0,children:s}),ie=({header:a,hidden:s,children:o})=>i.jsxs($,{hidden:s,gap:"xs",my:"lg",children:[i.jsx(za,{order:4,children:a}),i.jsx(Je,{}),o]}),je=({on:a,indent:s,children:o,settingKey:r})=>{const d=_t(r),f=v.useRef(a);f.current=a;const h=v.useMemo(()=>f.current?f.current(d):!!d,[d]);return i.jsx(po,{in:h,pl:s?"md":void 0,children:i.jsx($,{gap:"xs",children:o})})},Qd=({defaultValue:a,value:s,label:o,onChange:r})=>i.jsx(B4,{defaultValue:a,label:o,value:s?s==null?void 0:s.map(d=>d):[],onChange:r,clearable:!0}),Mi=a=>{const{value:s,update:o,rest:r}=vn(a);return i.jsx(sl,{...r,value:s??0,onChange:d=>{if(d===""&&(d=0),typeof d=="string")return o(+d);o(d)}})},Ue=a=>{const{value:s,update:o,rest:r}=vn(a);return i.jsx(yo,{...r,value:s??"",onChange:d=>{o(d.currentTarget.value)}})},Mo=a=>{const{value:s,update:o,rest:r}=vn(a);return i.jsx(q0,{...r,value:s??"",onChange:d=>{o(d.currentTarget.value)}})},Z=({label:a,...s})=>{const{value:o,update:r,rest:d}=vn(s);return i.jsx(H0,{label:a,onChange:f=>{r(f.currentTarget.checked)},disabled:d.disabled,checked:o??!1})};function ve(a){const{value:s,update:o,rest:r}=vn(a);return i.jsx(St,{...r,value:s,onChange:o})}function Bp(a){const{value:s,update:o,rest:r}=vn(a);return i.jsx(wf,{...r,value:s??[],onChange:o})}const Aa=a=>{const{value:s,update:o,rest:r}=vn(a),{label:d,...f}=r,{min:h=0,max:p=100}=a,b=hb([h,p]);return i.jsx(V0.Wrapper,{label:d,children:i.jsx(K4,{...f,marks:b,labelAlwaysOn:!0,onChange:o,value:s??0})})},Ki=a=>{const{value:s,update:o,rest:r}=vn(a),d=f=>{var p;const h=((p=a.sanitizeFn)==null?void 0:p.call(a,f))??f;o(h||null)};return i.jsx(Qd,{...r,value:s??[],onChange:d})},y0=a=>{const{value:s,update:o,rest:r}=vn(a);return i.jsx(Qe,{...r,onClick:()=>{var d;(d=a.onClick)==null||d.call(a,o,s??void 0)}})},E9=a=>{const{value:s,update:o,rest:r}=vn(a);return i.jsx(Yd,{...r,defaultValue:s??void 0,onChange:o})},Kp="languages-enabled",O9="settings-general-default_und_audio_lang",N9="settings-general-default_und_embedded_subtitles_lang",Up="languages-profiles",b0="notifications-providers",qp="settings-general-language_equals",D9="settings-general-path_mappings",L9="settings-general-path_mappings_movie",Xd="settings-general-use_sonarr",Id="settings-general-use_radarr",x0="settings-general-use_plex";function R9(a){return a==="sonarr"?D9:L9}function B9(a){return a==="sonarr"?Xd:Id}const Hp=({type:a})=>{const s=R9(a),o=_t(s),r=B9(a),d=_t(r,{original:!0}),{setValue:f}=Ka(),h=v.useCallback(S=>{f(S.map(_=>[_.from,_.to]),s)},[s,f]),p=v.useCallback(()=>{if(o){const S=[...o,["",""]];f(S,s)}},[o,s,f]),b=v.useMemo(()=>(o==null?void 0:o.map(S=>({from:S[0],to:S[1]})))??[],[o]),g=zi(S=>{h(S(b))}),x=v.useMemo(()=>[{header:he.capitalize(a),accessorKey:"from",cell:({row:{original:S,index:_}})=>i.jsx(Yd,{type:a,defaultValue:S.from,onChange:A=>{g.mutate(_,{...S,from:A})}})},{id:"arrow",cell:()=>i.jsx(ee,{icon:zx})},{header:"Bazarr",accessorKey:"to",cell:({row:{original:S,index:_}})=>i.jsx(Yd,{defaultValue:S.to,type:"bazarr",onChange:A=>{g.mutate(_,{...S,to:A})}})},{id:"action",accessorKey:"to",cell:({row:{index:S}})=>i.jsx(Qe,{label:"Remove",icon:Ot,onClick:()=>g.remove(S)})}],[g,a]);return d?i.jsxs(i.Fragment,{children:[i.jsx(qt,{tableStyles:{emptyText:"No mapping"},columns:x,data:b}),i.jsx(de,{fullWidth:!0,onClick:p,children:"Add"})]}):i.jsx(Q,{children:"Path Mappings will be available after staged changes are saved"})},Vp=({category:a})=>{const[s,o]=v.useState("Test"),[r,d]=v.useState("primary"),f=_t(`settings-${a}-ip`),h=_t(`settings-${a}-port`),p=_t(`settings-${a}-base_url`),b=_t(`settings-${a}-apikey`),g=_t(`settings-${a}-ssl`),x=v.useCallback(()=>{if(f&&b&&g!==null){let S,_=p;_&&_.startsWith("/")===!1&&(_="/"+_),h?S=`${f}:${h}${_??""}`:S=`${f}${_??""}`;const A={protocol:g?"https":"http",url:S,params:{apikey:b}};A.url.endsWith("/")||(A.url+="/"),X.utils.urlTest(A.protocol,A.url,A.params).then(T=>{T.status?(o(`Version: ${T.version}`),d("success")):(o(T.error),d("danger"))})}},[f,h,p,b,g]);return i.jsx(de,{autoContrast:!0,onClick:x,variant:r,title:s,children:s})},K9=({category:a})=>{const s="Test Connection",[o,r]=v.useState(s),[d,f]=v.useState("primary"),h=_t(`settings-${a}-endpoint`),p=v.useCallback(()=>{if(h!==null){const g={protocol:"http",url:new URL(h).host};g.url.endsWith("/")||(g.url+="/"),X.utils.providerUrlTest(g.protocol,g.url).then(x=>{x.status?(r(`${x.version}`),f("success")):(f("danger"),x.code===404?r("Connected but no version found (possibly whisper-asr?)"):r(x.error))})}},[h]);return v.useEffect(()=>{r(s)},[h]),i.jsx(de,{onClick:p,variant:d,title:o,children:o})},U9=[{label:"Basic",value:"basic"},{label:"Form",value:"form"}],q9=[{label:"Socks5 (local DNS)",value:"socks5"},{label:"Socks5h (remote DNS)",value:"socks5h"},{label:"HTTP(S)",value:"http"}],H9=[{label:"master",value:"master"},{label:"development",value:"development"}],v0="abcdef0123456789",vd="settings-auth-apikey",V9=()=>Array(32).fill(null).map(()=>v0.charAt(Math.floor(Math.random()*v0.length))).join(""),G9=()=>{const[a,s]=v.useState(!1),o=U4();return i.jsxs(Dn,{name:"General",children:[i.jsxs(ie,{header:"Host",children:[i.jsx(Ue,{label:"Address",placeholder:"*",settingKey:"settings-general-ip"}),i.jsx(Q,{children:"Valid IP address or '*' for all interfaces"}),i.jsx(Mi,{label:"Port",placeholder:"6767",settingKey:"settings-general-port"}),i.jsx(Ue,{label:"Base URL",leftSection:"/",settingKey:"settings-general-base_url",settingOptions:{onLoaded:r=>{var d;return((d=r.general.base_url)==null?void 0:d.slice(1))??""},onSubmit:r=>"/"+r}}),i.jsx(Q,{children:"Reverse proxy support"})]}),i.jsxs(ie,{header:"Security",children:[i.jsx(ve,{label:"Authentication",clearable:!0,options:U9,placeholder:"No Authentication",settingKey:"settings-auth-type"}),i.jsxs(je,{settingKey:"settings-auth-type",children:[i.jsx(Ue,{label:"Username",settingKey:"settings-auth-username"}),i.jsx(Mo,{label:"Password",settingKey:"settings-auth-password"})]}),i.jsx(Ue,{label:"API Key",disabled:window.isSecureContext,readOnly:!window.isSecureContext,rightSectionWidth:95,rightSectionProps:{style:{justifyContent:"flex-end"}},rightSection:i.jsxs(re,{gap:"xs",mx:"xs",justify:"right",children:[window.isSecureContext&&i.jsx(y0,{label:"Copy API Key",settingKey:vd,c:a?"green":void 0,icon:a?To:xx,onClick:(r,d)=>{d&&(o.copy(d),pb(s,1500))}}),i.jsx(y0,{label:"Regenerate",settingKey:vd,c:"red",icon:ys,onClick:r=>{r(V9())}})]}),settingKey:vd}),i.jsx(Z,{label:"Enable CORS headers",settingKey:"settings-cors-enabled"}),i.jsx(Q,{children:"Allow third parties to make requests towards your Bazarr installation. Requires a restart of Bazarr when changed"})]}),i.jsxs(ie,{header:"Proxy",children:[i.jsx(ve,{clearable:!0,settingKey:"settings-proxy-type",placeholder:"No Proxy",options:q9}),i.jsxs(je,{settingKey:"settings-proxy-type",on:r=>r!==null&&r!=="None",children:[i.jsx(Ue,{label:"Host",settingKey:"settings-proxy-url"}),i.jsx(Mi,{label:"Port",settingKey:"settings-proxy-port"}),i.jsx(Ue,{label:"Username",settingKey:"settings-proxy-username"}),i.jsx(Mo,{label:"Password",settingKey:"settings-proxy-password"}),i.jsx(Q,{children:"You only need to enter a username and password if one is required. Leave them blank otherwise"}),i.jsx(Ki,{label:"Ignored Addresses",settingKey:"settings-proxy-exclude"}),i.jsx(Q,{children:"List of excluded domains or IP addresses. Asterisk(wildcard), regex and CIDR are unsupported. You can use '.domain.com' to include all subdomains."})]})]}),i.jsxs(ie,{header:"Updates",hidden:!gn.canUpdate,children:[i.jsx(Z,{label:"Automatic",settingKey:"settings-general-auto_update"}),i.jsx(Q,{children:"Automatically download and install updates"}),i.jsx(ve,{options:H9,settingKey:"settings-general-branch"}),i.jsx(Q,{children:"Branch used by update mechanism"})]}),i.jsxs(ie,{header:"Logging",children:[i.jsx(Z,{label:"Debug",settingKey:"settings-general-debug"}),i.jsx(Q,{children:"Debug logging should only be enabled temporarily"}),i.jsx(Ue,{label:"Include Filter",settingKey:"settings-log-include_filter"}),i.jsx(Ue,{label:"Exclude Filter",settingKey:"settings-log-exclude_filter"}),i.jsx(Z,{label:"Use Regular Expressions (Regex)",settingKey:"settings-log-use_regex"}),i.jsx(Z,{label:"Ignore Case",settingKey:"settings-log-ignore_case"})]}),i.jsxs(ie,{header:"Backups",children:[i.jsx(E9,{label:"Folder",settingKey:"settings-backup-folder",type:"bazarr"}),i.jsx(Q,{children:"Absolute path to the backup directory"}),i.jsx(Mi,{label:"Retention",settingKey:"settings-backup-retention",rightSection:i.jsx($n,{w:"4rem",style:{justifyContent:"flex-end"},children:i.jsx(G,{size:"xs",px:"sm",c:"dimmed",children:"Days"})})})]}),i.jsxs(ie,{header:"Analytics",children:[i.jsx(Z,{label:"Enable",settingKey:"settings-analytics-enabled"}),i.jsx(Q,{children:"Send anonymous usage information, nothing that can identify you. This includes information on which providers you use, what languages you search for, Bazarr, Python, Sonarr, Radarr and what OS version you are using. We will use this information to prioritize features and bug fixes. Please, keep this enabled as this is the only way we have to better understand how you use Bazarr."})]})]})},Y9=({settingKey:a,label:s,options:o})=>{const r=Yp(),{setValue:d}=Ka(),f=At(o,h=>h.name);return i.jsx(V0.Wrapper,{label:s,children:i.jsx(wf,{...f,value:r,searchable:!0,onChange:h=>{d(h,a,p=>p.map(b=>b.code2))}})})},S0=({...a})=>{const s=Fp(),o=v.useMemo(()=>s.map(r=>({label:r.name,value:r.profileId})),[s]);return i.jsx(ve,{...a,clearable:!0,options:o,settingOptions:{onSubmit:r=>r===null?"":r}})},j0=({enabled:a=!1,...s})=>{const{data:o}=gs(),r=v.useMemo(()=>a?o==null?void 0:o.filter(f=>f.enabled):o,[o,a]),d=At(r??[],f=>f.name,f=>f.code3);return i.jsx(St,{...d,searchable:!0,...s})};function w0(a){const[s,o]=a.split("@");return s.length===0?void 0:{content:s,forced:o==="forced",hi:o==="hi"}}function F9(a){const[s,o]=a.split(":"),r=w0(s),d=w0(o);if(!(r===void 0||d===void 0))return{source:r,target:d}}function M0(a){let s=a.content.code3;return a.hi?s+="@hi":a.forced&&(s+="@forced"),s}function Q9(a){const s=M0(a.source),o=M0(a.target);return`${s}:${o}`}function X9(){const{data:a}=gs(),s=_t(qp);return v.useMemo(()=>(s==null?void 0:s.map(F9).map(o=>{if(o===void 0)return;const r=a==null?void 0:a.find(f=>f.code3===o.source.content),d=a==null?void 0:a.find(f=>f.code3===o.target.content);if(!(r===void 0||d===void 0))return{source:{...o.source,content:r},target:{...o.target,content:d}}}).filter(o=>o!==void 0))??[],[a,s])}const I9=()=>{const{data:a}=gs(),s=a!==void 0,o=X9(),{setValue:r}=Ka(),d=v.useCallback(g=>{const x=g.map(Q9);Se("info","updating language equals data",g),r(x,qp)},[r]),f=v.useCallback(()=>{if(a===void 0)return;const g=a.find(S=>S.enabled);if(g===void 0)return;const x=[...o,{source:{content:g,hi:!1,forced:!1},target:{content:g,hi:!1,forced:!1}}];d(x)},[o,a,d]),h=v.useCallback((g,x)=>{if(g<0||g>=o.length)return;const S=[...o];S[g]={...x},d(S)},[o,d]),p=v.useCallback(g=>{if(g<0||g>=o.length)return;const x=[...o];x.splice(g,1),d(x)},[o,d]),b=v.useMemo(()=>[{header:"Source",id:"source-lang",accessorKey:"source",cell:({row:{original:g,index:x}})=>i.jsx(j0,{enabled:!0,value:g.source.content,onChange:S=>{S!==null&&h(x,{...g,source:{...g.source,content:S}})}})},{id:"source-hi",cell:({row:g})=>i.jsx(hn,{label:"HI",checked:g.original.source.hi,onChange:({currentTarget:{checked:x}})=>{h(g.index,{...g.original,source:{...g.original.source,hi:x,forced:x?!1:g.original.source.forced}})}})},{id:"source-forced",cell:({row:g})=>i.jsx(hn,{label:"Forced",checked:g.original.source.forced,onChange:({currentTarget:{checked:x}})=>{h(g.index,{...g.original,source:{...g.original.source,forced:x,hi:x?!1:g.original.source.hi}})}})},{id:"equal-icon",cell:()=>i.jsx(ee,{icon:ev})},{header:"Target",id:"target-lang",cell:({row:g})=>i.jsx(j0,{enabled:!0,value:g.original.target.content,onChange:x=>{x!==null&&h(g.index,{...g.original,target:{...g.original.target,content:x}})}})},{id:"target-hi",cell:({row:g})=>i.jsx(hn,{label:"HI",checked:g.original.target.hi,onChange:({currentTarget:{checked:x}})=>{h(g.index,{...g.original,target:{...g.original.target,hi:x,forced:x?!1:g.original.target.forced}})}})},{id:"target-forced",cell:({row:g})=>i.jsx(hn,{label:"Forced",checked:g.original.target.forced,onChange:({currentTarget:{checked:x}})=>{h(g.index,{...g.original,target:{...g.original.target,forced:x,hi:x?!1:g.original.target.hi}})}})},{id:"action",cell:({row:g})=>i.jsx(Qe,{label:"Remove",icon:Ot,c:"red",onClick:()=>p(g.index)})}],[p,h]);return i.jsxs(i.Fragment,{children:[i.jsx(qt,{data:o,columns:b}),i.jsx(de,{fullWidth:!0,disabled:!s,onClick:f,children:s?"Add Equal":"No Enabled Languages"})]})},Z9="_content_6jo1g_33",P9="_evenly_6jo1g_38",k0={content:Z9,evenly:P9},Gp=65535,$9=[{label:"Any",value:{id:Gp,audio_exclude:"False",audio_only_include:"False",forced:"False",hi:"False",language:"any"}}],J9=[{label:"Normal or hearing-impaired",value:"normal"},{label:"Hearing-impaired required",value:"hi"},{label:"Forced (foreign part only)",value:"forced"}],W9=[{label:"Always",value:"always_include"},{label:"audio track matches",value:"audio_only_include"},{label:"no audio track matches",value:"audio_exclude"}],e7=({onComplete:a,languages:s,profile:o})=>{const r=Xe(),d=Ut({initialValues:o,validate:{name:zt.validation(M=>M.length>0,"Must have a name"),tag:zt.validation(M=>M?/^[a-z_0-9-]+$/.test(M):!0,"Only lowercase alphanumeric characters, underscores (_) and hyphens (-) are allowed"),items:zt.validation(M=>M.length>0,"Must contain at least 1 language")}}),f=At(s,M=>M.name),h=At(d.values.items,M=>{const U=M.hi==="True"?":hi":M.forced==="True"?":forced":"";return M.language+U},M=>String(M.id)),p=v.useMemo(()=>({...h,options:[...h.options,...$9]}),[h]),b=v.useMemo(()=>{var M;return((M=p.options.find(U=>U.value.id===d.values.cutoff))==null?void 0:M.value)??null},[p,d.values.cutoff]),g=At(d.values.mustContain,M=>M),x=At(d.values.mustNotContain,M=>M),S=zi(M=>{d.setValues(U=>({...U,items:M(U.items??[])}))}),_=v.useCallback(()=>{const M=1+d.values.items.reduce((U,H)=>Math.max(H.id,U),0);if(s.length>0){const U=s[0].code2,H={id:M,language:U,audio_exclude:"False",audio_only_include:"False",hi:"False",forced:"False"},R=[...d.values.items,H];d.setValues(F=>({...F,items:R}))}},[d,s]),A=Ta.memo(({item:M,index:U})=>{const H=v.useMemo(()=>{var R;return((R=f.options.find(F=>F.value.code2===M.language))==null?void 0:R.value)??null},[M.language]);return i.jsx(St,{...f,className:"table-select",value:H,onChange:R=>{R&&(M.language=R.code2,S.mutate(U,{...M,language:R.code2}))}})}),T=Ta.memo(({item:M,index:U})=>{const H=v.useMemo(()=>M.forced==="True"?"forced":M.hi==="True"?"hi":"normal",[M.forced,M.hi]);return i.jsx(mn,{value:H,data:J9,onChange:R=>{R&&S.mutate(U,{...M,hi:R==="hi"?"True":"False",forced:R==="forced"?"True":"False"})}})}),D=Ta.memo(({item:M,index:U})=>{const H=v.useMemo(()=>M.audio_exclude==="True"?"audio_exclude":M.audio_only_include==="True"?"audio_only_include":"always_include",[M.audio_exclude,M.audio_only_include]);return i.jsx(mn,{value:H,data:W9,onChange:R=>{R&&S.mutate(U,{...M,audio_exclude:R==="audio_exclude"?"True":"False",audio_only_include:R==="audio_only_include"?"True":"False"})}})}),L=v.useMemo(()=>[{header:"ID",accessorKey:"id"},{header:"Language",accessorKey:"language",cell:({row:{original:M,index:U}})=>i.jsx(A,{item:M,index:U})},{header:"Subtitles Type",accessorKey:"forced",cell:({row:{original:M,index:U}})=>i.jsx(T,{item:M,index:U})},{header:"Search only when...",accessorKey:"audio_exclude",cell:({row:{original:M,index:U}})=>i.jsx(D,{item:M,index:U})},{id:"action",cell:({row:M})=>i.jsx(Qe,{label:"Remove",icon:Ot,c:"red",onClick:()=>S.remove(M.index)})}],[S,A,T,D]);return i.jsx("form",{onSubmit:d.onSubmit(M=>{Se("info","Submitting language profile",M),a==null||a(M),r.closeSelf()}),children:i.jsxs($,{children:[i.jsxs(go,{direction:{base:"column",sm:"row"},gap:"sm",className:k0.evenly,children:[i.jsx(yo,{label:"Name",...d.getInputProps("name")}),i.jsx(yo,{label:"Tag",...d.getInputProps("tag"),onBlur:()=>d.setFieldValue("tag",M=>(M==null?void 0:M.toLowerCase().trim().replace(/\s+/g,"_"))??void 0)})]}),i.jsxs(so,{multiple:!0,chevronPosition:"right",defaultValue:["Languages"],className:k0.content,children:[i.jsx(so.Item,{value:"Languages",children:i.jsxs($,{children:[i.jsx(qt,{columns:L,data:d.values.items}),i.jsx(de,{fullWidth:!0,onClick:_,children:"Add Language"}),i.jsx(G,{c:"var(--mantine-color-error)",children:d.errors.items}),i.jsx(St,{clearable:!0,label:"Cutoff",...p,value:b,onChange:M=>{d.setFieldValue("cutoff",(M==null?void 0:M.id)??null)}})]})}),i.jsx(so.Item,{value:"Release Info",children:i.jsxs($,{children:[i.jsx(Qd,{label:"Must contain",...g,...d.getInputProps("mustContain")}),i.jsx(G,{size:"sm",children:"Subtitles release info must include one of those words or they will be excluded from search results (regex supported)."}),i.jsx(Qd,{label:"Must not contain",...x,...d.getInputProps("mustNotContain")}),i.jsx(G,{size:"sm",children:"Subtitles release info including one of those words (case insensitive) will be excluded from search results (regex supported)."})]})}),i.jsx(so.Item,{value:"Subtitles",children:i.jsxs($,{my:"xs",children:[i.jsx(H0,{label:"Use Original Format",checked:d.values.originalFormat??!1,...d.getInputProps("originalFormat")}),i.jsx(G,{size:"sm",children:"Download subtitle file without format conversion"})]})})]}),i.jsx(de,{type:"submit",children:"Save"})]})})},_0=yt(e7,"languages-profile-editor",{title:"Edit Languages Profile",size:"xl"}),t7=()=>{const a=Fp(),s=Yp(),o=v.useMemo(()=>1+a.reduce((x,S)=>Math.max(S.profileId,x),0),[a]),{setValue:r}=Ka(),d=Xe(),f=v.useCallback(x=>{r(x,Up,S=>JSON.stringify(S))},[r]),h=v.useCallback(x=>{const S=[...a],_=S.findIndex(A=>A.profileId===x.profileId);_!==-1?S[_]=x:S.push(x),f(S)},[a,f]),p=zi(x=>{const S=[...a];f(x(S))}),b=v.useMemo(()=>[{header:"Name",accessorKey:"name"},{header:"Tag",accessorKey:"tag"},{header:"Languages",accessorKey:"items",cell:({row:{original:{items:x,cutoff:S}}})=>i.jsx(re,{gap:"xs",wrap:"nowrap",children:x.map((_,A)=>{const T=_.id===S||S===Gp;return i.jsx(n7,{cutoff:T,item:_},A)})})},{header:"Must contain",accessorKey:"mustContain",cell:({row:{original:{mustContain:x}}})=>x?i.jsx(i.Fragment,{children:x.map((S,_)=>i.jsx(ze,{color:"gray",children:S},Ve(_,S)))}):null},{header:"Must not contain",accessorKey:"mustNotContain",cell:({row:{original:{mustNotContain:x}}})=>x?i.jsx(i.Fragment,{children:x.map((S,_)=>i.jsx(ze,{color:"gray",children:S},Ve(_,S)))}):null},{id:"profileId",cell:({row:x})=>{const S=x.original;return i.jsxs(re,{gap:"xs",wrap:"nowrap",children:[i.jsx(Qe,{label:"Edit Profile",icon:Ei,c:"gray",onClick:()=>{var T;const _=((T=he.maxBy(S.items,"id"))==null?void 0:T.id)||0,A={...he.cloneDeep(S),items:S.items.reduce((D,L)=>{const{ids:M,duplicatedIds:U,items:H}=D;return he.includes(M,L.id)?(U.push(L.id),H.push({...L,id:_+U.length}),D):(M.push(L.id),H.push(L),D)},{ids:[],duplicatedIds:[],items:[]}).items,tag:S.tag||void 0};d.openContextModal(_0,{languages:s,profile:A,onComplete:h})}}),i.jsx(Qe,{label:"Remove",icon:Ot,c:"red",onClick:()=>p.remove(x.index)})]})}}],[p,s,d,h]),g=s.length!==0;return i.jsxs(i.Fragment,{children:[i.jsx(qt,{columns:b,data:[...a]}),i.jsx(de,{fullWidth:!0,disabled:!g,onClick:()=>{const x={profileId:o,name:"",tag:void 0,items:[],cutoff:null,mustContain:[],mustNotContain:[],originalFormat:!1};d.openContextModal(_0,{languages:s,profile:x,onComplete:h})},children:g?"Add New Profile":"No Enabled Languages"})]})},n7=({cutoff:a,item:s})=>{const o=v.useMemo(()=>{let r=s.language;return s.hi==="True"?r+=":HI":s.forced==="True"&&(r+=":Forced"),r},[s.hi,s.forced,s.language]);return i.jsx(ze,{title:a?"Ignore others if this one is available":void 0,color:a?"primary":"secondary",children:o})};function Yp(){const{data:a}=jo(),s=_t(Kp);return s||a}function Fp(){const{data:a=[]}=Ti(),s=_t(Up);return s||a}const a7=()=>{const{data:a}=gs(),{data:s}=jo(),{data:o}=jo();return i.jsxs(Dn,{name:"Languages",children:[i.jsxs(ie,{header:"Subtitles Language",children:[i.jsx(Z,{label:"Single Language",settingKey:"settings-general-single_language"}),i.jsx(Q,{children:"Download a single Subtitles file without adding the language code to the filename."}),i.jsx(Q,{type:"warning",children:"We don't recommend enabling this option unless absolutely required (ie: media player not supporting language code in subtitles filename). Results may vary."}),i.jsx(Y9,{label:"Languages Filter",placeholder:"Select languages",settingKey:Kp,options:a??[]})]}),i.jsxs(ie,{header:"Language Equals",children:[i.jsx(Q,{children:"Treat the following languages as equal across all providers."}),i.jsx(I9,{})]}),i.jsxs(ie,{header:"Embedded Tracks Language",children:[i.jsx(Z,{label:"Deep analyze media file to get audio tracks language.",settingKey:"settings-general-parse_embedded_audio_track"}),i.jsx(je,{indent:!0,settingKey:"settings-general-parse_embedded_audio_track",children:i.jsx(ve,{clearable:!0,settingKey:O9,label:"Treat unknown language audio track as (changing this will trigger missing subtitles calculation)",placeholder:"Select languages",options:s.map(r=>({label:r.name,value:r.code2})),settingOptions:{onSubmit:r=>r===null?"":r}})}),i.jsx(ve,{clearable:!0,settingKey:N9,label:"Treat unknown language embedded subtitles track as (changing this will trigger full subtitles indexing using cache)",placeholder:"Select languages",options:o.map(r=>({label:r.name,value:r.code2})),settingOptions:{onSubmit:r=>r===null?"":r}})]}),i.jsx(ie,{header:"Languages Profile",children:i.jsx(t7,{})}),i.jsxs(ie,{header:"Tag-Based Automatic Language Profile Selection Settings",children:[i.jsxs(Q,{children:["If enabled, Bazarr will look at the names of all tags of a Series from Sonarr (or a Movie from Radarr) to find a matching Bazarr language profile tag. It will use as the language profile the FIRST tag from Sonarr/Radarr that matches the tag of a Bazarr language profile EXACTLY. If multiple tags match, there is no guarantee as to which one will be used, so choose your tag names carefully. Also, if you update the tag names in Sonarr/Radarr, Bazarr will detect this and repeat the matching process for the affected shows. However, if a show's only matching tag is removed from Sonarr/Radarr, Bazarr will NOT remove the show's existing language profile for that reason. But if you wish to have language profiles removed automatically by tag value, simply enter a list of one or more tags in the"," ",i.jsx(G,{fw:700,span:!0,children:"Remove Profile Tags"})," ","entry list below. If your video tag matches one of the tags in that list, then Bazarr will remove the language profile for that video. If there is a conflict between profile selection and profile removal, then profile removal wins out and is performed."]}),i.jsx(Z,{label:"Series",settingKey:"settings-general-serie_tag_enabled"}),i.jsx(Z,{label:"Movies",settingKey:"settings-general-movie_tag_enabled"}),i.jsx(Ki,{label:"Remove Profile Tags",settingKey:"settings-general-remove_profile_tags",sanitizeFn:r=>r==null?void 0:r.map(d=>d.replace(/[^a-z0-9_-]/gi,"").toLowerCase())}),i.jsx(Q,{children:"Enter tag values that will trigger a language profile removal. Leave empty if you don't want Bazarr to remove language profiles."})]}),i.jsxs(ie,{header:"Default Language Profiles For Newly Added Shows",children:[i.jsx(Z,{label:"Series",settingKey:"settings-general-serie_default_enabled"}),i.jsx(Q,{children:"Will apply only to Series added to Bazarr after enabling this option."}),i.jsx(je,{indent:!0,settingKey:"settings-general-serie_default_enabled",children:i.jsx(S0,{label:"Profile",placeholder:"Select a profile",settingKey:"settings-general-serie_default_profile"})}),i.jsx(Z,{label:"Movies",settingKey:"settings-general-movie_default_enabled"}),i.jsx(Q,{children:"Will apply only to Movies added to Bazarr after enabling this option."}),i.jsx(je,{indent:!0,settingKey:"settings-general-movie_default_enabled",children:i.jsx(S0,{label:"Profile",placeholder:"Select a profile",settingKey:"settings-general-movie_default_profile"})})]})]})};function l7({mutation:a,onSuccess:s,onError:o,args:r,...d}){const{mutateAsync:f}=a,[h,p]=v.useState(!1),b=v.useCallback(async()=>{p(!0);try{const g=r();if(g!==null){const x=await f(g);s==null||s(x)}else o==null||o()}catch{o==null||o()}p(!1)},[r,f,o,s]);return i.jsx(de,{...d,loading:h,onClick:b})}const s7=a=>a.map(s=>JSON.stringify(s)),i7=({selections:a,payload:s,onComplete:o})=>{const r=v.useMemo(()=>a.filter(b=>!b.enabled||b.name===(s==null?void 0:s.name)),[s==null?void 0:s.name,a]),d=At(r,b=>b.name),f=Xe(),h=Ut({initialValues:{selection:s,url:(s==null?void 0:s.url)??""},validate:{selection:zt.validation(he.isObject,"Please select a notification provider"),url:zt.validation(b=>b.trim().length!==0,"URL must not be empty")}}),p=ye({mutationFn:b=>X.system.testNotification(b)});return i.jsx("form",{onSubmit:h.onSubmit(({selection:b,url:g})=>{b&&o({...b,enabled:!0,url:g}),f.closeSelf()}),children:i.jsxs($,{children:[i.jsx(St,{searchable:!0,disabled:s!==null,...d,...h.getInputProps("selection"),onChange:b=>{h.setValues({selection:b,url:(b==null?void 0:b.url)??void 0})}}),i.jsx("div",{hidden:h.values.selection===null,children:i.jsx(q4,{minRows:4,placeholder:"URL",...h.getInputProps("url")})}),i.jsx(Je,{}),i.jsxs(re,{justify:"right",children:[i.jsx(l7,{mutation:p,args:()=>h.values.url,children:"Test"}),i.jsx(de,{hidden:s===null,color:"red",onClick:()=>{s&&o({...s,enabled:!1}),f.closeAll()},children:"Remove"}),i.jsx(de,{type:"submit",children:"Save"})]})]})})},A0=yt(i7,"notification-tool",{title:"Notification"}),r7=()=>{const a=_t(b0,{onLoaded:f=>f.notifications.providers,onSubmit:f=>f.map(h=>JSON.stringify(h))}),s=_9(b0,a??[],"name"),o=v.useCallback(f=>{s(f,s7)},[s]),r=Xe(),d=v.useMemo(()=>a==null?void 0:a.filter(f=>f.enabled).map((f,h)=>i.jsx(wo,{header:f.name,onClick:()=>r.openContextModal(A0,{payload:f,selections:a,onComplete:o})},Ve(h,f.name))),[r,a,o]);return i.jsxs(G0,{cols:3,children:[d,i.jsx(wo,{plus:!0,onClick:()=>r.openContextModal(A0,{payload:null,selections:a??[],onComplete:o})})]})},o7=()=>i.jsxs(Dn,{name:"Notifications",children:[i.jsxs(H4,{bg:"transparent",mt:"xl",icon:i.jsx(ee,{icon:Wx}),children:[i.jsxs(G,{children:["Thanks to caronc for his work on"," ",i.jsx(dt,{href:"https://github.com/caronc/apprise",target:"_blank",rel:"noopener noreferrer",children:"apprise"}),", the core of the Bazarr notification system."]}),i.jsxs(G,{children:["Please follow instructions on his"," ",i.jsx(dt,{href:"https://github.com/caronc/apprise/wiki",target:"_blank",rel:"noopener noreferrer",children:"Wiki"})," ","to configure your notification providers."]})]}),i.jsx(ie,{header:"Notifications",children:i.jsx(r7,{})}),i.jsxs(ie,{header:"Options",children:[i.jsx(Z,{label:"Silent for Manual Actions",settingKey:"settings-general-dont_notify_manual_actions"}),i.jsx(Q,{children:"Suppress notifications when manually download/upload subtitles."})]})]}),Go=()=>be({queryKey:[j.Plex,"auth","validate"],queryFn:async()=>{try{return await X.plex.validateAuth()}catch{return{valid:!1,auth_method:"oauth",error:"API unavailable"}}},staleTime:1e3*60*5,throwOnError:!1,retry:1}),c7=a=>be({queryKey:[j.Plex,"servers"],queryFn:()=>X.plex.servers(),enabled:!0,staleTime:1e3*60*2,...a}),u7=a=>{const s=(a==null?void 0:a.enabled)??!0;return be({queryKey:[j.Plex,"selectedServer"],queryFn:()=>X.plex.selectedServer(),enabled:s,staleTime:1e3*60*5,...a})},d7=()=>ye({mutationFn:()=>X.plex.createPin()}),f7=(a,s,o)=>be({queryKey:[j.Plex,"pinCheck",a],queryFn:()=>{if(!a)throw new Error("Pin ID is required");return X.plex.checkPin(a)},enabled:s&&!!a,retry:!1,refetchInterval:o,refetchOnWindowFocus:!1,staleTime:0}),h7=()=>{const a=ke();return ye({mutationFn:()=>X.plex.logout(),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Plex]}),a.invalidateQueries({queryKey:[j.System]})}})},m7=()=>{const a=ke();return ye({mutationFn:s=>X.plex.selectServer({machineIdentifier:s.machineIdentifier,name:s.name,uri:s.uri,local:s.local}),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Plex,"selectedServer"]})}})},g7=a=>{const s=(a==null?void 0:a.enabled)??!0;return be({queryKey:[j.Plex,"libraries"],queryFn:()=>X.plex.libraries(),enabled:s,staleTime:1e3*60*5,refetchOnWindowFocus:!1,...a})},p7=()=>{const a=ke();return ye({mutationFn:()=>X.plex.createWebhook(),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Plex,"webhooks"]})}})},y7=a=>{const s=(a==null?void 0:a.enabled)??!0;return be({queryKey:[j.Plex,"webhooks"],queryFn:()=>X.plex.listWebhooks(),enabled:s,staleTime:1e3*60*2,refetchOnWindowFocus:!1,...a})},b7=()=>{const a=ke();return ye({mutationFn:s=>X.plex.deleteWebhook(s),onSuccess:()=>{a.invalidateQueries({queryKey:[j.Plex,"webhooks"]})}})},x7="_librarySelector_16vza_32",v7="_alertMessage_16vza_36",S7="_loadingField_16vza_40",j7="_selectField_16vza_44",w7="_labelText_16vza_48",xn={librarySelector:x7,alertMessage:v7,loadingField:S7,selectField:j7,labelText:w7},z0=a=>{const{libraryType:s,placeholder:o,description:r,label:d,...f}=a,{value:h,update:p,rest:b}=vn(f),{data:g}=Go(),x=!!(g!=null&&g.valid&&(g==null?void 0:g.auth_method)==="oauth"),{data:S=[],isLoading:_,error:A}=g7({enabled:x}),D=S.filter(L=>L.type===s).map(L=>({value:L.title,label:`${L.title} (${L.count} items)`}));return x?_?i.jsx($,{gap:"xs",className:xn.librarySelector,children:i.jsx(mn,{...b,label:d,placeholder:"Loading libraries...",data:[],disabled:!0,className:xn.loadingField})}):A?i.jsx($,{gap:"xs",className:xn.librarySelector,children:i.jsxs(jt,{color:"red",variant:"light",className:xn.alertMessage,children:["Failed to load libraries:"," ",(A==null?void 0:A.message)||"Unknown error"]})}):D.length===0?i.jsx($,{gap:"xs",className:xn.librarySelector,children:i.jsxs(jt,{color:"gray",variant:"light",className:xn.alertMessage,children:["No ",s," libraries found on your Plex server."]})}):i.jsx("div",{className:xn.librarySelector,children:i.jsx(mn,{...b,label:d,placeholder:o||`Select ${s} library...`,data:D,description:r,value:h||"",onChange:L=>{L!==null&&p(L)},allowDeselect:!1,className:xn.selectField})}):i.jsxs($,{gap:"xs",className:xn.librarySelector,children:[i.jsx(G,{fw:500,className:xn.labelText,children:d}),i.jsx(jt,{color:"brand",variant:"light",className:xn.alertMessage,children:"Enable Plex OAuth above to automatically discover your libraries."})]})},T0={POLLING_INTERVAL_MS:2e3,AUTH_WINDOW_CONFIG:{width:600,height:700,features:"menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes"}},M7="_authSection_rc5ia_32",k7="_actionButton_rc5ia_36",_7="_authAlert_rc5ia_40",al={authSection:M7,actionButton:k7,authAlert:_7},A7=()=>{const{data:a,isLoading:s,error:o,refetch:r}=Go(),{mutateAsync:d}=d7(),{mutate:f}=h7(),[h,p]=v.useState(null),b=v.useRef(null),g=ke(),x=!!(h!=null&&h.pinId),{data:S}=f7((h==null?void 0:h.pinId)??null,x,h!=null&&h.pinId?T0.POLLING_INTERVAL_MS:!1);S!=null&&S.authenticated&&x&&(p(null),b.current&&(b.current.close(),b.current=null),r(),g.invalidateQueries({queryKey:[j.Plex,"servers"]}),g.invalidateQueries({queryKey:[j.Plex,"selectedServer"]}));const _=!!(a!=null&&a.valid&&(a==null?void 0:a.auth_method)==="oauth"),A=async()=>{const{data:L}=await d();p(L);const{width:M,height:U,features:H}=T0.AUTH_WINDOW_CONFIG,R=Math.round(window.screen.width/2-M/2),F=Math.round(window.screen.height/2-U/2);b.current=window.open(L.authUrl,"PlexAuth",`width=${M},height=${U},left=${R},top=${F},${H}`)},T=()=>{f()},D=()=>{p(null),b.current&&(b.current.close(),b.current=null),r()};return s&&!x?i.jsx(G,{children:"Loading authentication status..."}):x&&!(S!=null&&S.authenticated)?i.jsx(Si,{withBorder:!0,radius:"md",p:"lg",className:al.authSection,children:i.jsxs($,{gap:"md",children:[i.jsx(za,{order:4,children:"Plex OAuth"}),i.jsxs($,{gap:"sm",children:[i.jsx(G,{size:"lg",fw:600,children:"Complete Authentication"}),i.jsxs(G,{children:["PIN Code:"," ",i.jsx(G,{component:"span",fw:700,children:h==null?void 0:h.code})]}),i.jsx(G,{size:"sm",children:"Complete the authentication in the opened window."}),i.jsx(de,{onClick:D,variant:"light",color:"gray",size:"sm",className:al.actionButton,children:"Cancel"})]})]})}):_?i.jsx(Si,{withBorder:!0,radius:"md",p:"lg",className:al.authSection,children:i.jsxs($,{gap:"md",children:[i.jsx(za,{order:4,children:"Plex OAuth"}),i.jsxs(jt,{color:"brand",variant:"light",className:al.authAlert,children:["Connected as ",a==null?void 0:a.username," (",a==null?void 0:a.email,")"]}),i.jsx(de,{onClick:T,variant:"light",color:"gray",size:"sm",className:al.actionButton,children:"Disconnect from Plex"})]})}):i.jsx(Si,{withBorder:!0,radius:"md",p:"lg",className:al.authSection,children:i.jsxs($,{gap:"md",children:[i.jsx(za,{order:4,children:"Plex OAuth"}),i.jsxs($,{gap:"sm",children:[i.jsx(G,{size:"sm",children:"Connect your Plex account to enable secure, automated integration with Bazarr."}),i.jsx(G,{size:"xs",c:"dimmed",children:"Advanced users: Manual configuration is available via config.yaml if OAuth is not suitable."}),o&&i.jsx(jt,{color:"red",variant:"light",children:o.message||"Authentication failed"}),i.jsx(de,{onClick:A,variant:"filled",color:"brand",size:"md",className:al.actionButton,children:"Connect to Plex"})]})]})})},z7="_connectionIndicator_10djw_32",T7="_success_10djw_32",C7="_error_10djw_35",E7="_serverConnectionCard_10djw_39",uo={connectionIndicator:z7,success:T7,error:C7,serverConnectionCard:E7},C0=({servers:a,selectedServerId:s})=>{const o=a.find(r=>r.machineIdentifier===s);return o?i.jsxs(Pd,{withBorder:!0,p:"md",radius:"md",className:uo.serverConnectionCard,children:[i.jsx(G,{size:"sm",fw:600,mb:"xs",children:"Available Connections:"}),i.jsx($,{gap:"xs",children:o.connections.map((r,d)=>i.jsxs(re,{gap:"xs",children:[i.jsx(G,{size:"sm",className:`${uo.connectionIndicator} ${r.available?uo.success:uo.error}`,children:r.available?"✓":"✗"}),i.jsxs(G,{size:"sm",children:[r.uri,r.local&&" (Local)"]}),r.available&&r.latency&&i.jsxs(ze,{size:"sm",children:[r.latency,"ms"]})]},`${r.uri}-${d}`))})]}):null},O7="_serverSection_ba0gj_32",N7="_serverSelectGroup_ba0gj_45",D7="_serverSelectField_ba0gj_49",L7="_refreshButton_ba0gj_55",R7="_flexContainer_ba0gj_60",bi={serverSection:O7,serverSelectGroup:N7,serverSelectField:D7,refreshButton:L7,flexContainer:R7},B7=()=>{var R;const[a,s]=v.useState(null),[o,r]=v.useState(!1),[d,f]=v.useState(!1),[h,p]=v.useState(!1),{data:b}=Go(),{data:g=[],error:x,refetch:S}=c7(),{mutateAsync:_}=m7(),{data:A}=u7({enabled:!!(b!=null&&b.valid&&(b==null?void 0:b.auth_method)==="oauth")}),{setValue:T}=Ka(),D=!!(b!=null&&b.valid&&(b==null?void 0:b.auth_method)==="oauth");D&&!h?(s(null),r(!1),f(!1),p(!0)):!D&&h&&p(!1);const L=async F=>{if(F.bestConnection){r(!0);try{await _({machineIdentifier:F.machineIdentifier,name:F.name,uri:F.bestConnection.uri,local:F.bestConnection.local}),f(!0),T(F.bestConnection.uri,"plex_server"),T(F.name,"plex_server_name")}catch{}finally{r(!1)}}},M=async()=>{a&&await L(a)},U=F=>{s(F),f(!1)},H=()=>{if(A&&!a&&!d){s(A),f(!0);return}if(D&&g.length===1&&g[0].bestConnection&&!a&&!d&&!A){const F=g[0];s(F),L(F)}};return D&&(A||g.length>0)&&H(),D?i.jsx(Si,{withBorder:!0,radius:"md",p:"lg",className:bi.serverSection,children:i.jsxs($,{gap:"lg",children:[i.jsx(za,{order:4,children:"Plex Servers"}),x&&i.jsxs(jt,{color:"red",variant:"light",children:["Failed to load servers: ",x.message]}),D&&g.length===0&&!x?i.jsx(ze,{size:"md",children:"Testing server connections..."}):g.length===0?i.jsxs($,{gap:"sm",children:[i.jsx(G,{children:"No servers found."}),i.jsx(de,{onClick:()=>S(),variant:"light",color:"gray",children:"Refresh"})]}):g.length===1?i.jsxs($,{gap:"md",children:[i.jsxs(re,{justify:"space-between",align:"center",children:[i.jsx($,{gap:"xs",className:bi.flexContainer,children:i.jsxs(re,{gap:"xs",children:[i.jsxs(G,{children:[g[0].name," (",g[0].platform," - v",g[0].version,")"]}),d?i.jsx(ze,{color:"green",size:"sm",children:"Connected"}):g[0].bestConnection?null:i.jsx(ze,{color:"red",size:"sm",children:"Unavailable"})]})}),i.jsx(mo,{variant:"light",color:"gray",size:"lg",onClick:()=>S(),title:"Refresh server list",children:i.jsx(ee,{icon:Cm,size:"sm"})})]}),a&&i.jsx(C0,{servers:g,selectedServerId:a.machineIdentifier})]}):i.jsxs($,{gap:"md",children:[i.jsxs(re,{className:bi.serverSelectGroup,children:[i.jsx(mn,{label:"Select server",placeholder:"Choose a server...",data:g.map(F=>({value:F.machineIdentifier,label:`${F.name} (${F.platform} - v${F.version})${F.bestConnection?"":" (Unavailable)"}`,disabled:!F.bestConnection})),value:(a==null?void 0:a.machineIdentifier)||null,onChange:F=>{const oe=F&&g.find(te=>te.machineIdentifier===F)||null;U(oe)},className:bi.serverSelectField,searchable:!0}),i.jsx(de,{variant:"filled",color:"brand",disabled:!a||o,loading:o,onClick:M,children:"Select Server"}),i.jsx(mo,{variant:"light",color:"gray",size:"lg",onClick:()=>S(),className:bi.refreshButton,title:"Refresh server list",children:i.jsx(ee,{icon:Cm,size:"sm"})})]}),d&&a&&i.jsxs(jt,{color:"brand",variant:"light",children:['Server saved: "',a.name,'" (v',((R=g.find(F=>F.machineIdentifier===a.machineIdentifier))==null?void 0:R.version)||a.version||"Unknown",")"]}),a&&i.jsx(C0,{servers:g,selectedServerId:a.machineIdentifier})]})]})}):null},K7=()=>i.jsxs($,{gap:"lg",children:[i.jsx(A7,{}),i.jsx(B7,{})]}),U7="_webhookSelector_ztndg_32",q7="_alertMessage_ztndg_36",H7="_loadingField_ztndg_40",V7="_selectField_ztndg_44",G7="_labelText_ztndg_48",un={webhookSelector:U7,alertMessage:q7,loadingField:H7,selectField:V7,labelText:G7},Y7=a=>{var U,H;const{label:s,description:o}=a,[r,d]=v.useState(""),{data:f}=Go(),h=!!(f!=null&&f.valid&&(f==null?void 0:f.auth_method)==="oauth"),{data:p,isLoading:b,error:g,refetch:x}=y7({enabled:h}),S=p7(),_=b7(),A=(U=p==null?void 0:p.webhooks)==null?void 0:U.find(R=>R.url.includes("/api/webhooks/plex")),T=((H=p==null?void 0:p.webhooks)==null?void 0:H.map(R=>({value:R.url,label:R.url,isBazarr:R.url.includes("/api/webhooks/plex")})).sort((R,F)=>Number(F.isBazarr)-Number(R.isBazarr)).map(({value:R,label:F})=>({value:R,label:F})))||[],D=r||(A==null?void 0:A.url)||(T.length>0?T[0].value:""),L=async()=>{try{await S.mutateAsync(),io.show({title:"Success",message:"Plex webhook created successfully",color:"green"}),await x()}catch{io.show({title:"Error",message:"Failed to create webhook",color:"red"})}},M=async R=>{try{await _.mutateAsync(R),io.show({title:"Success",message:"Webhook deleted successfully",color:"green"}),R===D&&d(""),await x()}catch{io.show({title:"Error",message:"Failed to delete webhook",color:"red"})}};return h?b?i.jsx($,{gap:"xs",className:un.webhookSelector,children:i.jsx(mn,{label:s,placeholder:"Loading webhooks...",data:[],disabled:!0,className:un.loadingField})}):g?i.jsx($,{gap:"xs",className:un.webhookSelector,children:i.jsxs(jt,{color:"red",variant:"light",className:un.alertMessage,children:["Failed to load webhooks:"," ",(g==null?void 0:g.message)||"Unknown error"]})}):T.length===0?i.jsx("div",{className:un.webhookSelector,children:i.jsxs($,{gap:"xs",children:[i.jsxs(re,{justify:"space-between",align:"flex-end",children:[i.jsxs("div",{children:[i.jsx(G,{fw:500,className:un.labelText,children:s}),o&&i.jsx(G,{size:"sm",c:"dimmed",children:o})]}),i.jsx(de,{onClick:L,loading:S.isPending,size:"sm",children:"ADD"})]}),i.jsx(jt,{color:"gray",variant:"light",className:un.alertMessage,children:"No webhooks found on your Plex server."})]})}):i.jsx("div",{className:un.webhookSelector,children:i.jsxs($,{gap:"xs",children:[i.jsx(mn,{label:s,placeholder:"Select webhook...",data:T,description:o||"Create or remove webhooks in Plex to trigger subtitle searches. In this list you can find your current webhooks.",value:D,onChange:R=>d(R||""),allowDeselect:!1,className:un.selectField}),i.jsxs(re,{gap:"xs",children:[!A&&i.jsx(de,{onClick:L,loading:S.isPending,size:"sm",children:"ADD"}),D&&i.jsx(de,{onClick:()=>M(D),loading:_.isPending,size:"sm",variant:"light",color:"brand",children:"REMOVE"})]})]})}):i.jsxs($,{gap:"xs",className:un.webhookSelector,children:[i.jsx(G,{fw:500,className:un.labelText,children:s}),i.jsx(jt,{color:"brand",variant:"light",className:un.alertMessage,children:"Enable Plex OAuth above to automatically discover your webhooks."})]})},F7=()=>i.jsxs(Dn,{name:"Interface",children:[i.jsx(ie,{header:"Use Plex Media Server",children:i.jsx(Z,{label:"Enabled",settingKey:x0})}),i.jsxs(je,{settingKey:x0,children:[i.jsx(Si,{p:"xl",radius:"md",children:i.jsx($n,{children:i.jsx(K7,{})})}),i.jsxs(ie,{header:"Movie Library",children:[i.jsx(z0,{label:"Library Name",settingKey:"settings-plex-movie_library",libraryType:"movie",placeholder:"Movies",description:"Select your movie library from Plex"}),i.jsx(Z,{label:"Mark movies as recently added after downloading subtitles",settingKey:"settings-plex-set_movie_added"}),i.jsx(Z,{label:"Refresh movie metadata after downloading subtitles (recommended)",settingKey:"settings-plex-update_movie_library"})]}),i.jsxs(ie,{header:"Series Library",children:[i.jsx(z0,{label:"Library Name",settingKey:"settings-plex-series_library",libraryType:"show",placeholder:"TV Shows",description:"Select your TV show library from Plex"}),i.jsx(Z,{label:"Mark episodes as recently added after downloading subtitles",settingKey:"settings-plex-set_episode_added"}),i.jsx(Z,{label:"Refresh series metadata after downloading subtitles (recommended)",settingKey:"settings-plex-update_series_library"})]}),i.jsx(ie,{header:"Automation",children:i.jsx(Y7,{label:"Webhooks",description:"Create a Bazarr webhook in Plex to automatically search for subtitles when content starts playing. Manage and remove existing webhooks for convenience."})})]})]}),Q7=[{label:"Anti-Captcha",value:"anti-captcha"},{label:"Death by Captcha",value:"death-by-captcha"}],E0=({availableOptions:a,settingsKey:s})=>{const o=Rp(),r=Af(),d=_t(s),{update:f}=Ka(),h=Xe(),p=v.useCallback(g=>{o&&h.openContextModal(P7,{payload:g??null,enabledProviders:d??[],staged:r,settings:o,onChange:f,availableOptions:a,settingsKey:s})},[h,d,o,r,f,a,s]),b=v.useMemo(()=>d?d.flatMap(g=>{const x=a.find(S=>S.key===g);return x||[]}).map((g,x)=>i.jsx(wo,{titleStyles:{overflow:"hidden",textOverflow:"ellipsis"},header:g.name??he.capitalize(g.key),description:g.description,onClick:()=>p(g),lineClamp:2},Ve(g.key,x))):[],[d,p,a]);return i.jsxs(G0,{cols:3,children:[b,i.jsx(wo,{plus:!0,onClick:()=>p()})]})},X7=({option:a})=>{const s=a;return i.jsxs($,{gap:1,children:[i.jsx(G,{size:"md",children:s.value}),i.jsx(G,{size:"xs",children:s.payload.description})]})},I7=kf.map(a=>{var s;return(s=a.inputs)==null?void 0:s.map(o=>{var r;return o.validation===void 0?null:{[`settings-${a.key}-${o.key}`]:(r=o.validation)==null?void 0:r.rule}}).filter(o=>o&&Object.keys(o).length>0).reduce((o,r)=>({...o,...r}),{})}).filter(a=>a&&Object.keys(a).length>0).reduce((a,s)=>({...a,...s}),{}),Z7=({payload:a,enabledProviders:s,staged:o,settings:r,onChange:d,availableOptions:f,settingsKey:h})=>{const p=Xe(),b=v.useRef(d);b.current=d;const[g,x]=v.useState(a),S=Ut({initialValues:{settings:o,hooks:{}},validate:{settings:I7}}),_=v.useCallback(()=>{if(a&&s){const H=s.findIndex(R=>R===a.key);if(H!==-1){const R=[...s];R.splice(H,1),b.current({[h]:R}),p.closeAll()}}},[a,s,p,h]),A=v.useCallback(H=>{if(!S.validate().hasErrors&&g&&s){const F={...H.settings},oe=H.hooks;s.find(te=>te===g.key)===void 0&&(F[h]=[...s,g.key]),zf(oe,F),b.current(F),p.closeAll()}},[g,s,p,h,S]),T=g!==null,D=v.useCallback(H=>{x(H||{key:"",description:"Unknown Provider"})},[]),L=v.useMemo(()=>f.filter(H=>(s==null?void 0:s.find(R=>R===H.key&&R!==(g==null?void 0:g.key)))===void 0),[g==null?void 0:g.key,s,f]),M=At(L,H=>H.name??he.capitalize(H.key)),U=v.useMemo(()=>{var F;if(g===null||g.inputs===void 0)return null;const H=g.key,R=[];return(F=g.inputs)==null||F.forEach(oe=>{const te=oe.key,Te=oe.name??he.capitalize(oe.key),$t=oe.options??[],Nt=S.errors[`settings.settings-${H}-${te}`]?i.jsx(G,{c:"red",component:"span",size:"xs",children:S.errors[`settings.settings-${H}-${te}`]}):null;switch(oe.type){case"text":R.push(i.jsxs(v.Fragment,{children:[i.jsx(Ue,{label:Te,settingKey:`settings-${H}-${te}`}),Nt]},Ve(H,te)));return;case"password":R.push(i.jsxs(v.Fragment,{children:[i.jsx(Mo,{label:Te,settingKey:`settings-${H}-${te}`}),Nt]},Ve(H,te)));return;case"switch":R.push(i.jsxs(v.Fragment,{children:[i.jsx(Z,{inline:!0,label:Te,settingKey:`settings-${H}-${te}`}),Nt]},Ve(H,te)));return;case"select":R.push(i.jsxs(v.Fragment,{children:[i.jsx(ve,{label:Te,settingKey:`settings-${H}-${te}`,options:$t}),Nt]},Ve(H,te)));return;case"testbutton":R.push(i.jsx(K9,{category:te}));return;case"chips":R.push(i.jsxs(v.Fragment,{children:[i.jsx(Ki,{label:Te,settingKey:`settings-${H}-${te}`}),Nt]},Ve(H,te)));return}}),i.jsx($,{gap:"xs",children:R})},[g,S]);return i.jsx(Tf,{value:r,children:i.jsx(Vo.Provider,{value:S,children:i.jsxs($,{children:[i.jsxs($,{gap:"xs",children:[i.jsx(St,{"data-autofocus":!0,searchable:!0,placeholder:"Click to Select a Provider",renderOption:X7,disabled:a!==null,...M,value:g,onChange:D}),i.jsx(Q,{children:g==null?void 0:g.description}),U,i.jsx("div",{hidden:(g==null?void 0:g.message)===void 0,children:i.jsx(Q,{children:g==null?void 0:g.message})})]}),i.jsx(Je,{}),i.jsxs(re,{justify:"right",children:[i.jsx(de,{hidden:!a,color:"red",onClick:_,children:"Disable"}),i.jsx(de,{disabled:!T,onClick:()=>{A(S.values)},children:"Enable"})]})]})})})},P7=yt(Z7,"provider-tool",{title:"Provider",size:"calc(50vw)"}),$7=()=>i.jsxs(Dn,{name:"Providers",children:[i.jsx(ie,{header:"Enabled Providers",children:i.jsx(E0,{availableOptions:kf,settingsKey:"settings-general-enabled_providers"})}),i.jsxs(ie,{header:"Anti-Captcha Options",children:[i.jsx(ve,{clearable:!0,label:"Choose the anti-captcha provider you want to use",placeholder:"Select a provider",settingKey:"settings-general-anti_captcha_provider",options:Q7}),i.jsx(Q,{}),i.jsxs(je,{settingKey:"settings-general-anti_captcha_provider",on:a=>a==="anti-captcha",children:[i.jsx(Ue,{label:"Account Key",settingKey:"settings-anticaptcha-anti_captcha_key"}),i.jsx(dt,{href:"http://getcaptchasolution.com/eixxo1rsnw",children:"Anti-Captcha.com"}),i.jsx(Q,{children:"Link to subscribe"})]}),i.jsxs(je,{settingKey:"settings-general-anti_captcha_provider",on:a=>a==="death-by-captcha",children:[i.jsx(Ue,{label:"Username",settingKey:"settings-deathbycaptcha-username"}),i.jsx(Mo,{label:"Password",settingKey:"settings-deathbycaptcha-password"}),i.jsx(dt,{href:"https://www.deathbycaptcha.com",children:"DeathByCaptcha.com"}),i.jsx(Q,{children:"Link to subscribe"})]})]}),i.jsx(ie,{header:"Integrations",children:i.jsx(E0,{availableOptions:IS,settingsKey:"settings-general-enabled_integrations"})})]}),J7=[{label:"60",value:60},{label:"120",value:120},{label:"180",value:180},{label:"240",value:240},{label:"300",value:300},{label:"600",value:600}],W7=()=>i.jsxs(Dn,{name:"Radarr",children:[i.jsx(ie,{header:"Use Radarr",children:i.jsx(Z,{label:"Enabled",settingKey:Id})}),i.jsxs(je,{settingKey:Id,children:[i.jsxs(ie,{header:"Host",children:[i.jsx(Ue,{label:"Address",settingKey:"settings-radarr-ip"}),i.jsx(Q,{children:"Hostname or IPv4 Address"}),i.jsx(Mi,{label:"Port",settingKey:"settings-radarr-port"}),i.jsx(Ue,{label:"Base URL",leftSection:"/",settingKey:"settings-radarr-base_url",settingOptions:{onLoaded:a=>{var s;return((s=a.radarr.base_url)==null?void 0:s.slice(1))??""},onSubmit:a=>"/"+a}}),i.jsx(ve,{label:"HTTP Timeout",options:J7,settingKey:"settings-radarr-http_timeout"}),i.jsx(Ue,{label:"API Key",settingKey:"settings-radarr-apikey"}),i.jsx(Z,{label:"SSL",settingKey:"settings-radarr-ssl"}),i.jsx(Vp,{category:"radarr"})]}),i.jsxs(ie,{header:"Options",children:[i.jsx(Aa,{label:"Minimum Score For Movies",settingKey:"settings-general-minimum_score_movie"}),i.jsx(Ki,{label:"Excluded Tags",settingKey:"settings-radarr-excluded_tags",sanitizeFn:a=>a==null?void 0:a.map(s=>s.replace(/[^a-z0-9_-]/gi,"").toLowerCase())}),i.jsx(Q,{children:"Movies with those tags (case sensitive) in Radarr will be excluded from automatic download of subtitles."}),i.jsx(Z,{label:"Download Only Monitored",settingKey:"settings-radarr-only_monitored"}),i.jsx(Q,{children:"Automatic download of subtitles will only happen for monitored movies in Radarr."}),i.jsx(Z,{label:"Defer searching of subtitles until scheduled task execution",settingKey:"settings-radarr-defer_search_signalr"}),i.jsx(Q,{children:"If enabled, this option will prevent Bazarr from searching subtitles as soon as movies are imported."}),i.jsxs(Q,{children:["Search can be triggered using this command",i.jsx(ds,{children:`curl -H "Content-Type: application/json" -H "X-API-KEY: ###############################" -X POST 
                -d '{ "eventType": "Download", "movieFile": [ { "id": "$radarr_moviefile_id" } ] }' 
                http://localhost:6767/api/webhooks/radarr
              `})]})]}),i.jsx(ie,{header:"Path Mappings",children:i.jsx(Hp,{type:"radarr"})})]})]}),Qp=[{label:"Manually",value:5256e4},{label:"15 Minutes",value:15},{label:"1 Hour",value:60},{label:"3 Hours",value:180},{label:"6 Hours",value:360},{label:"12 Hours",value:720},{label:"24 Hours",value:1440},{label:"Weekly",value:10080}],ej=Qp,Zd=[{label:"Manually",value:"Manually"},{label:"Daily",value:"Daily"},{label:"Weekly",value:"Weekly"}],tj=Zd,Sd=[{label:"Monday",value:0},{label:"Tuesday",value:1},{label:"Wednesday",value:2},{label:"Thursday",value:3},{label:"Friday",value:4},{label:"Saturday",value:5},{label:"Sunday",value:6}],jd=[{label:"Manually",value:876e3},{label:"6 Hours",value:6},{label:"12 Hours",value:12},{label:"24 Hours",value:24},{label:"Weekly",value:168}],nj=()=>{const a=v.useMemo(()=>Array(24).fill(null).map((s,o)=>({label:`${o}:00`,value:o})),[]);return i.jsxs(Dn,{name:"Scheduler",children:[i.jsxs(ie,{header:"Sonarr/Radarr Sync",children:[i.jsx(ve,{label:"Sync with Sonarr",options:Qp,settingKey:"settings-sonarr-series_sync"}),i.jsx(Z,{label:"Sync Only Monitored Series",settingKey:"settings-sonarr-sync_only_monitored_series"}),i.jsx(je,{settingKey:"settings-sonarr-sync_only_monitored_series",children:i.jsx(Q,{children:"If enabled, only series with a monitored status in Sonarr will be synced. If you make changes to a specific unmonitored Sonarr series and you want Bazarr to know about those changes, simply toggle the monitored status back on in Sonarr and Bazarr will sync any changes."})}),i.jsxs(je,{settingKey:"settings-sonarr-sync_only_monitored_series",children:[i.jsx(Z,{label:"Sync Only Monitored Episodes",settingKey:"settings-sonarr-sync_only_monitored_episodes"}),i.jsx(je,{settingKey:"settings-sonarr-sync_only_monitored_episodes",children:i.jsx(Q,{children:"If enabled, only episodes with a monitored status in Sonarr will be synced. If you make changes to a specific unmonitored Sonarr episode (or season) and you want Bazarr to know about those changes, simply toggle the monitored status back on in Sonarr and Bazarr will sync any changes. This setting is especially helpful for long running TV series with many seasons and many episodes, but that are still actively producing new episodes (e.g. Saturday Night Live)."})})]}),i.jsx(ve,{label:"Sync with Radarr",options:ej,settingKey:"settings-radarr-movies_sync"}),i.jsx(Z,{label:"Sync Only Monitored Movies",settingKey:"settings-radarr-sync_only_monitored_movies"}),i.jsx(je,{settingKey:"settings-radarr-sync_only_monitored_movies",children:i.jsx(Q,{children:"If enabled, only movies with a monitored status in Radarr will be synced. If you make changes to a specific unmonitored Radarr movie and you want Bazarr to know about those changes, simply toggle the monitored status back on in Radarr and Bazarr will sync any changes."})})]}),i.jsxs(ie,{header:"Disk Indexing",children:[i.jsx(ve,{label:"Update All Episode Subtitles from Disk",settingKey:"settings-sonarr-full_update",options:Zd}),i.jsx(je,{settingKey:"settings-sonarr-full_update",on:s=>s==="Weekly",children:i.jsx(ve,{label:"Day of Week",settingKey:"settings-sonarr-full_update_day",options:Sd})}),i.jsx(je,{settingKey:"settings-sonarr-full_update",on:s=>s==="Daily"||s==="Weekly",children:i.jsx(ve,{label:"Time of Day",settingKey:"settings-sonarr-full_update_hour",options:a})}),i.jsx(Z,{label:"Use cached embedded subtitles parser results",settingKey:"settings-sonarr-use_ffprobe_cache"}),i.jsx(Q,{children:"If disabled, Bazarr will use the embedded subtitles parser to index episodes file properties on each run. This will result in higher disk I/O."}),i.jsx(ve,{label:"Update All Movie Subtitles from Disk",settingKey:"settings-radarr-full_update",options:Zd}),i.jsx(je,{settingKey:"settings-radarr-full_update",on:s=>s==="Weekly",children:i.jsx(ve,{label:"Day of Week",settingKey:"settings-radarr-full_update_day",options:Sd})}),i.jsx(je,{settingKey:"settings-radarr-full_update",on:s=>s==="Daily"||s==="Weekly",children:i.jsx(ve,{label:"Time of Day",settingKey:"settings-radarr-full_update_hour",options:a})}),i.jsx(Z,{label:"Use cached embedded subtitles parser results",settingKey:"settings-radarr-use_ffprobe_cache"}),i.jsx(Q,{children:"If disabled, Bazarr will use embedded subtitles parser to index movies file properties on each run. This will result in higher disk I/O."})]}),i.jsxs(ie,{header:"Search and Upgrade Subtitles",children:[i.jsx(ve,{label:"Search for Missing Series Subtitles",settingKey:"settings-general-wanted_search_frequency",options:jd}),i.jsx(ve,{label:"Search for Missing Movies Subtitles",options:jd,settingKey:"settings-general-wanted_search_frequency_movie"}),i.jsx(ve,{label:"Upgrade Previously Downloaded Subtitles",options:jd,settingKey:"settings-general-upgrade_frequency"})]}),i.jsxs(ie,{header:"Backup",children:[i.jsx(ve,{label:"Backup Database and Configuration File",settingKey:"settings-backup-frequency",options:tj}),i.jsx(je,{settingKey:"settings-backup-frequency",on:s=>s==="Weekly",children:i.jsx(ve,{label:"Day of Week",settingKey:"settings-backup-day",options:Sd})}),i.jsx(je,{settingKey:"settings-backup-frequency",on:s=>s==="Daily"||s==="Weekly",children:i.jsx(ve,{label:"Time of Day",settingKey:"settings-backup-hour",options:a})})]})]})},aj=[{label:"Standard",value:"standard"},{label:"Anime",value:"anime"},{label:"Daily",value:"daily"}],lj=[{label:"60",value:60},{label:"120",value:120},{label:"180",value:180},{label:"240",value:240},{label:"300",value:300},{label:"600",value:600}],sj=()=>i.jsxs(Dn,{name:"Sonarr",children:[i.jsx(ie,{header:"Use Sonarr",children:i.jsx(Z,{label:"Enabled",settingKey:Xd})}),i.jsxs(je,{settingKey:Xd,children:[i.jsxs(ie,{header:"Host",children:[i.jsx(Ue,{label:"Address",settingKey:"settings-sonarr-ip"}),i.jsx(Q,{children:"Hostname or IPv4 Address"}),i.jsx(Mi,{label:"Port",settingKey:"settings-sonarr-port"}),i.jsx(Ue,{label:"Base URL",leftSection:"/",settingKey:"settings-sonarr-base_url",settingOptions:{onLoaded:a=>{var s;return((s=a.sonarr.base_url)==null?void 0:s.slice(1))??""},onSubmit:a=>"/"+a}}),i.jsx(ve,{label:"HTTP Timeout",options:lj,settingKey:"settings-sonarr-http_timeout"}),i.jsx(Ue,{label:"API Key",settingKey:"settings-sonarr-apikey"}),i.jsx(Z,{label:"SSL",settingKey:"settings-sonarr-ssl"}),i.jsx(Vp,{category:"sonarr"})]}),i.jsxs(ie,{header:"Options",children:[i.jsx(Aa,{label:"Minimum Score For Episodes",settingKey:"settings-general-minimum_score"}),i.jsx(Ki,{label:"Excluded Tags",settingKey:"settings-sonarr-excluded_tags",sanitizeFn:a=>a==null?void 0:a.map(s=>s.replace(/[^a-z0-9_-]/gi,"").toLowerCase())}),i.jsx(Q,{children:"Episodes from series with those tags (case sensitive) in Sonarr will be excluded from automatic download of subtitles."}),i.jsx(Bp,{label:"Excluded Series Types",placeholder:"Select series types",settingKey:"settings-sonarr-excluded_series_types",options:aj}),i.jsx(Q,{children:"Episodes from series with those types in Sonarr will be excluded from automatic download of subtitles."}),i.jsx(Z,{label:"Download Only Monitored",settingKey:"settings-sonarr-only_monitored"}),i.jsx(Q,{children:"Automatic download of subtitles will only happen for monitored episodes in Sonarr."}),i.jsx(Z,{label:"Defer searching of subtitles until scheduled task execution",settingKey:"settings-sonarr-defer_search_signalr"}),i.jsx(Q,{children:"If enabled, this option will prevent Bazarr from searching subtitles as soon as episodes are imported."}),i.jsxs(Q,{children:["Search can be triggered using this command:",i.jsx(ds,{children:`curl -H "Content-Type: application/json" -H "X-API-KEY: ###############################" -X POST 
                -d '{ "eventType": "Download", "episodeFiles": [ { "id": "$sonarr_episodefile_id" } ] }' 
                http://localhost:6767/api/webhooks/sonarr
              `})]}),i.jsx(Z,{label:"Exclude season zero (extras)",settingKey:"settings-sonarr-exclude_season_zero"}),i.jsx(Q,{children:"Episodes from season zero (extras) from automatic download of subtitles."})]}),i.jsx(ie,{header:"Path Mappings",children:i.jsx(Hp,{type:"sonarr"})})]})]}),ts=a=>s=>{var o;return((o=s.general.subzero_mods)==null?void 0:o.includes(a))??!1},ij=a=>{var s;return((s=a.general.subzero_mods)==null?void 0:s.find(o=>o.startsWith("color")))??""},rj=[{option:"directory",description:"Full path of the episode file parent directory"},{option:"episode",description:"Full path of the episode file"},{option:"episode_name",description:"Filename of the episode without parent directory or extension"},{option:"subtitles",description:"Full path of the subtitles file"},{option:"subtitles_language",description:"Language of the subtitles file (may include HI or forced)"},{option:"subtitles_language_code2",description:"2-letter ISO-639 language code of the subtitles language (may include :hi or :forced)"},{option:"subtitles_language_code2_dot",description:"2-letter ISO-639 language code of the subtitles language (same as previous but with dot separator instead of colon)"},{option:"subtitles_language_code3",description:"3-letter ISO-639 language code of the subtitles language (may include :hi or :forced)"},{option:"subtitles_language_code3_dot",description:"3-letter ISO-639 language code of the subtitles language (same as previous but with dot separator instead of colon)"},{option:"episode_language",description:"Audio language of the episode file"},{option:"episode_language_code2",description:"2-letter ISO-639 language code of the episode audio language"},{option:"episode_language_code3",description:"3-letter ISO-639 language code of the episode audio language"},{option:"score",description:"Score of the subtitle file"},{option:"subtitle_id",description:"Provider ID of the subtitle file"},{option:"provider",description:"Provider of the subtitle file"},{option:"uploader",description:"Uploader of the subtitle file"},{option:"release_info",description:"Release info for the subtitle file"},{option:"series_id",description:"Sonarr series ID (Empty if movie)"},{option:"episode_id",description:"Sonarr episode ID or Radarr movie ID"}],oj=rj.map((a,s)=>i.jsxs("tr",{children:[i.jsx("td",{children:i.jsx(ds,{children:a.option})}),i.jsx("td",{children:a.description})]},s)),cj=()=>i.jsxs(Dn,{name:"Subtitles",children:[i.jsxs(ie,{header:"Subtitle File Options",children:[i.jsx(ve,{label:"Subtitle Folder",options:PS,settingKey:"settings-general-subfolder"}),i.jsx(Q,{children:"Choose the folder you wish to store/read the subtitles."}),i.jsx(je,{settingKey:"settings-general-subfolder",on:a=>a!==""&&a!=="current",children:i.jsx(Ue,{label:"Custom Subtitles Folder",settingKey:"settings-general-subfolder_custom"})}),i.jsx(ve,{label:"Hearing-impaired subtitles extension",options:ZS,settingKey:"settings-general-hi_extension"}),i.jsx(Q,{children:"What file extension to use when saving hearing-impaired subtitles to disk (e.g., video.en.sdh.srt)."}),i.jsx(Z,{label:"Encode Subtitles To UTF-8",settingKey:"settings-general-utf8_encode"}),i.jsx(Q,{children:"Re-encode downloaded subtitles to UTF-8. Should be left enabled in most cases."}),i.jsx(Z,{label:"Change Subtitle File Permission After Download (chmod)",settingKey:"settings-general-chmod_enabled"}),i.jsxs(je,{indent:!0,settingKey:"settings-general-chmod_enabled",children:[i.jsx(Ue,{placeholder:"0777",settingKey:"settings-general-chmod"}),i.jsx(Q,{children:"Must be a 4 digit octal number. Only for non-Windows systems."})]})]}),i.jsxs(ie,{header:"Embedded Subtitles Handling",children:[i.jsx(Z,{label:"Treat Embedded Subtitles as Downloaded",settingKey:"settings-general-use_embedded_subs"}),i.jsx(Q,{children:"Treat embedded subtitles in media files as already downloaded when determining missing ones."}),i.jsxs(je,{indent:!0,settingKey:"settings-general-use_embedded_subs",children:[i.jsx(ve,{settingKey:"settings-general-embedded_subtitles_parser",settingOptions:{onSaved:a=>a===void 0?"ffprobe":a},options:$S}),i.jsx(Q,{children:"Embedded Subtitles video parser."}),i.jsx(Z,{label:"Ignore Embedded PGS Subtitles",settingKey:"settings-general-ignore_pgs_subs"}),i.jsx(Q,{children:"Ignore PGS Subtitles when detecting embedded subtitles."}),i.jsx(Z,{label:"Ignore Embedded VobSub Subtitles",settingKey:"settings-general-ignore_vobsub_subs"}),i.jsx(Q,{children:"Ignore VobSub Subtitles when detecting embedded subtitles."}),i.jsx(Z,{label:"Ignore Embedded ASS Subtitles",settingKey:"settings-general-ignore_ass_subs"}),i.jsx(Q,{children:"Ignore ASS Subtitles when detecting embedded subtitles."}),i.jsx(Z,{label:"Show Only Desired Languages",settingKey:"settings-general-embedded_subs_show_desired"}),i.jsx(Q,{children:"Hide Embedded Subtitles for languages that are not currently desired."})]})]}),i.jsxs(ie,{header:"Upgrading Subtitles",children:[i.jsx(Z,{label:"Upgrade Previously Downloaded Subtitles",settingKey:"settings-general-upgrade_subs"}),i.jsx(Q,{children:"Schedule a task to upgrade subtitles previously downloaded by Bazarr."}),i.jsxs(je,{settingKey:"settings-general-upgrade_subs",children:[i.jsx(Aa,{settingKey:"settings-general-days_to_upgrade_subs",max:30,mb:"lg"}),i.jsx(Q,{children:"Number of days to go back in history to upgrade subtitles."}),i.jsx(Z,{label:"Upgrade Manually Downloaded or Translated Subtitles",settingKey:"settings-general-upgrade_manual"}),i.jsx(Q,{children:"Enable or disable upgrade of manually downloaded or translated subtitles."})]})]}),i.jsxs(ie,{header:"Performance / Optimization",children:[i.jsx(Z,{label:"Adaptive Searching",settingKey:"settings-general-adaptive_searching"}),i.jsx(Q,{children:"When enabled, Bazarr will skip searching providers for subtitles which have been searched recently."}),i.jsxs(je,{settingKey:"settings-general-adaptive_searching",children:[i.jsx(ve,{settingKey:"settings-general-adaptive_searching_delay",settingOptions:{onSaved:a=>a===void 0?"3w":a},options:JS}),i.jsx(Q,{children:"The delay from the first search to adaptive searching taking effect. During this time window Bazarr will continue to search for subtitles, even if they have been searched for recently."}),i.jsx(ve,{settingKey:"settings-general-adaptive_searching_delta",settingOptions:{onSaved:a=>a===void 0?"1w":a},options:WS}),i.jsx(Q,{children:"The delay between Bazarr searching for subtitles in adaptive search mode. If the media has been searched for more recently than this value, Bazarr will skip searching for subtitles."})]}),i.jsx(Z,{label:"Search Enabled Providers Simultaneously",settingKey:"settings-general-multithreading"}),i.jsx(Q,{children:"Search multiple providers at once. (Don't choose this on low powered devices)."}),i.jsx(Z,{label:"Skip video file hash calculation",settingKey:"settings-general-skip_hashing"}),i.jsx(Q,{children:"Skip video file hashing during search process to prevent a sleeping hard disk drive from waking up. However, this may decrease your search results scores."})]}),i.jsxs(ie,{header:"Sub-Zero Subtitle Content Modifications",children:[i.jsx(Q,{children:"After downloaded, content of the subtitles will be modified based on options selected below."}),i.jsx(Z,{label:"Hearing Impaired",settingOptions:{onLoaded:ts("remove_HI")},settingKey:"subzero-remove_HI"}),i.jsx(Q,{children:"Removes tags, text and characters from subtitles that are meant for hearing impaired people."}),i.jsx(Z,{label:"Remove Tags",settingOptions:{onLoaded:ts("remove_tags")},settingKey:"subzero-remove_tags"}),i.jsx(Q,{children:"Removes all possible style tags from the subtitle, such as font, bold, color etc."}),i.jsx(Z,{label:"OCR Fixes",settingOptions:{onLoaded:ts("OCR_fixes")},settingKey:"subzero-OCR_fixes"}),i.jsx(Q,{children:"Fix issues that happen when a subtitle gets converted from bitmap to text through OCR."}),i.jsx(Z,{label:"Common Fixes",settingOptions:{onLoaded:ts("common")},settingKey:"subzero-common"}),i.jsx(Q,{children:"Fix common and whitespace/punctuation issues in subtitles."}),i.jsx(Z,{label:"Fix Uppercase",settingOptions:{onLoaded:ts("fix_uppercase")},settingKey:"subzero-fix_uppercase"}),i.jsx(Q,{children:"Tries to make subtitles that are completely uppercase readable."}),i.jsx(ve,{placeholder:"Select a color...",label:"Color",clearable:!0,options:e9,settingOptions:{onLoaded:ij},settingKey:"subzero-color"}),i.jsx(Q,{children:"Adds color to your subtitles (for playback devices/software that don't ship their own color modes; only works for players that support color tags)."}),i.jsx(Z,{label:"Reverse RTL",settingOptions:{onLoaded:ts("reverse_rtl")},settingKey:"subzero-reverse_rtl"}),i.jsx(Q,{children:"Reverses the punctuation in right-to-left subtitles for problematic playback devices."})]}),i.jsxs(ie,{header:"Audio Synchronization / Alignment",children:[i.jsx(Z,{label:"Always use Audio Track as Reference for Syncing",settingKey:"settings-subsync-force_audio"}),i.jsx(Q,{children:"Use the audio track as reference for syncing, instead of the embedded subtitle."}),i.jsx(Z,{label:"Do Not Fix Framerate Mismatch",settingKey:"settings-subsync-no_fix_framerate"}),i.jsx(Q,{children:"If specified, subsync will not attempt to correct a framerate mismatch between reference and subtitles."}),i.jsx(Z,{label:"Golden-Section Search",settingKey:"settings-subsync-gss"}),i.jsx(Q,{children:"If specified, use golden-section search to try to find the optimal framerate ratio between video and subtitles."}),i.jsx(ve,{label:"Max Offset Seconds",options:Ap,settingKey:"settings-subsync-max_offset_seconds",defaultValue:60}),i.jsx(Q,{children:"The max allowed offset seconds for any subtitle segment."}),i.jsx(Z,{label:"Automatic Subtitles Audio Synchronization",settingKey:"settings-subsync-use_subsync"}),i.jsx(Q,{children:"Enable automatic audio synchronization after downloading subtitles."}),i.jsxs(je,{indent:!0,settingKey:"settings-subsync-use_subsync",children:[i.jsx(Bp,{placeholder:"Select providers...",label:"Do not sync subtitles downloaded from those providers",clearable:!0,options:t9,settingKey:"settings-subsync-checker-blacklisted_providers"}),i.jsx(Z,{label:"Debug",settingKey:"settings-subsync-debug"}),i.jsx(Q,{children:"Do not actually sync the subtitles but generate a .tar.gz file to be able to open an issue for ffsubsync. This file will reside alongside the media file."}),i.jsx(Z,{label:"Series Score Threshold For Audio Sync",settingKey:"settings-subsync-use_subsync_threshold"}),i.jsxs(je,{indent:!0,settingKey:"settings-subsync-use_subsync_threshold",children:[i.jsx(Aa,{settingKey:"settings-subsync-subsync_threshold"}),i.jsx(ns,{}),i.jsxs(Q,{children:["Only series subtitles with scores"," ",i.jsx(G,{fw:700,span:!0,children:"below"})," ","this value will be automatically synchronized."]})]}),i.jsx(Z,{label:"Movies Score Threshold For Audio Sync",settingKey:"settings-subsync-use_subsync_movie_threshold"}),i.jsxs(je,{indent:!0,settingKey:"settings-subsync-use_subsync_movie_threshold",children:[i.jsx(Aa,{settingKey:"settings-subsync-subsync_movie_threshold"}),i.jsx(ns,{}),i.jsxs(Q,{children:["Only movie subtitles with scores"," ",i.jsx(G,{fw:700,span:!0,children:"below"})," ","this value will be automatically synchronized."]})]})]})]}),i.jsxs(ie,{header:"Custom Post-Processing",children:[i.jsx(Z,{settingKey:"settings-general-use_postprocessing",label:"Custom Post-Processing"}),i.jsx(Q,{children:"Enable automatic execution of the post-processing command specified below after downloading a subtitle."}),i.jsxs(je,{indent:!0,settingKey:"settings-general-use_postprocessing",children:[i.jsx(Z,{settingKey:"settings-general-use_postprocessing_threshold",label:"Series Score Threshold For Post-Processing"}),i.jsxs(je,{indent:!0,settingKey:"settings-general-use_postprocessing_threshold",children:[i.jsx(Aa,{settingKey:"settings-general-postprocessing_threshold"}),i.jsx(ns,{}),i.jsxs(Q,{children:["Only series subtitles with scores"," ",i.jsx(G,{fw:700,span:!0,children:"below"})," ","this value will be automatically post-processed."]})]}),i.jsx(Z,{settingKey:"settings-general-use_postprocessing_threshold_movie",label:"Movies Score Threshold For Post-Processing"}),i.jsxs(je,{indent:!0,settingKey:"settings-general-use_postprocessing_threshold_movie",children:[i.jsx(Aa,{settingKey:"settings-general-postprocessing_threshold_movie"}),i.jsx(ns,{}),i.jsxs(Q,{children:["Only movie subtitles with scores"," ",i.jsx(G,{fw:700,span:!0,children:"below"})," ","this value will be automatically post-processed."]})]}),i.jsx(Ue,{label:"Command",settingKey:"settings-general-postprocessing_cmd"}),i.jsx(gt,{highlightOnHover:!0,fs:"sm",children:i.jsx("tbody",{children:oj})})]})]}),i.jsxs(ie,{header:"Translating",children:[i.jsx(Aa,{label:"Score for Translated Episode and Movie Subtitles",settingKey:"settings-translator-default_score"}),i.jsx(ve,{label:"Translator",clearable:!0,options:n9,placeholder:"Default translator",settingKey:"settings-translator-translator_type"}),i.jsxs(je,{settingKey:"settings-translator-translator_type",on:a=>a==="gemini",children:[i.jsx(Ue,{label:"Gemini model",settingKey:"settings-translator-gemini_model"}),i.jsx(Ue,{label:"Gemini API key",settingKey:"settings-translator-gemini_key"}),i.jsx(Q,{children:"You can generate it here: https://aistudio.google.com/apikey"})]}),i.jsxs(je,{settingKey:"settings-translator-translator_type",on:a=>a==="lingarr",children:[i.jsx(Ue,{label:"Lingarr endpoint",settingKey:"settings-translator-lingarr_url"}),i.jsx(Q,{children:"Base URL of Lingarr (e.g., http://localhost:9876)"})]}),i.jsx(Z,{label:"Add translation info at the beginning",settingKey:"settings-translator-translator_info"})]})]}),uj=[{label:"25",value:25},{label:"50",value:50},{label:"100",value:100},{label:"250",value:250},{label:"500",value:500},{label:"1000",value:1e3}],dj=[{label:"Auto",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}],fj=()=>i.jsxs(Dn,{name:"Interface",children:[i.jsx(ie,{header:"List View",children:i.jsx(ve,{label:"Page Size",options:uj,settingKey:bb,defaultValue:50})}),i.jsx(ie,{header:"Style",children:i.jsx(ve,{label:"Theme",options:dj,settingKey:"settings-general-theme",defaultValue:"auto"})})]}),hj=({announcements:a})=>{const s=z6(),o=v.useMemo(()=>[{header:"Since",accessorKey:"timestamp",cell:({row:{original:{timestamp:r}}})=>i.jsx(G,{className:"table-primary",children:r})},{header:"Announcement",accessorKey:"text",cell:({row:{original:{text:r}}})=>i.jsx(G,{className:"table-primary",children:r})},{header:"More Info",accessorKey:"link",cell:({row:{original:{link:r}}})=>r?i.jsx(mj,{link:r,children:"Link"}):i.jsx(G,{children:"n/a"})},{header:"Dismiss",accessorKey:"hash",cell:({row:{original:{dismissible:r,hash:d}}})=>i.jsx(Ba,{label:"Dismiss announcement",disabled:!r,icon:hv,mutation:s,args:()=>({hash:d})})}],[s]);return i.jsx(qt,{columns:o,data:a,tableStyles:{emptyText:"No announcements for now, come back later!"}})};function mj(a){const{link:s,children:o}=a;return i.jsx(dt,{href:s,target:"_blank",rel:"noopener noreferrer",children:o})}const gj=()=>{const a=A6(),{data:s}=a;return pt("Announcements - Bazarr (System)"),i.jsx(Ct,{result:a,children:i.jsx(We,{fluid:!0,px:0,children:i.jsx(hj,{announcements:s??[]})})})},pj=({backups:a})=>{const s=Xe(),o=N6(),r=D6(),d=v.useMemo(()=>[{header:"Name",accessorKey:"filename",cell:({row:{original:{filename:f}}})=>i.jsx(dt,{href:`${gn.baseUrl}/system/backup/download/${f}`,children:f})},{header:"Size",accessorKey:"size",cell:({row:{original:{size:f}}})=>i.jsx(G,{className:"table-no-wrap",children:f})},{header:"Time",accessorKey:"date",cell:({row:{original:{date:f}}})=>i.jsx(G,{className:"table-no-wrap",children:f})},{id:"restore",header:"Restore",accessorKey:"filename",cell:({row:{original:{filename:f}}})=>i.jsx(Qe,{label:"Restore",onClick:()=>s.openConfirmModal({title:"Restore Backup",children:i.jsxs(G,{size:"sm",children:["Are you sure you want to restore the backup (",f,")? Bazarr will automatically restart and reload the UI during the restore process."]}),labels:{confirm:"Restore",cancel:"Cancel"},confirmProps:{color:"red"},onConfirm:()=>o.mutate(f)}),icon:df})},{id:"delete",header:"Delete",accessorKey:"filename",cell:({row:{original:{filename:f}}})=>i.jsx(Qe,{label:"Delete",c:"red",onClick:()=>s.openConfirmModal({title:"Delete Backup",children:i.jsxs(G,{size:"sm",children:["Are you sure you want to delete the backup (",f,")?"]}),labels:{confirm:"Delete",cancel:"Cancel"},confirmProps:{color:"red"},onConfirm:()=>r.mutate(f)}),icon:Ot})}],[s,r,o]);return i.jsx(fl,{columns:d,data:a})},yj=()=>{const a=E6(),{mutate:s,isPending:o}=O6();return pt("Backups - Bazarr (System)"),i.jsx(Ct,{result:a,children:i.jsxs(We,{fluid:!0,px:0,children:[i.jsx(ce,{children:i.jsx(ce.Button,{icon:_x,loading:o,onClick:()=>s(),children:"Backup Now"})}),i.jsx(pj,{backups:a.data??[]})]})})},bj=({stack:a})=>{const s=v.useMemo(()=>a.split("\\n").map((o,r)=>i.jsx(G,{my:"xs",inherit:!0,children:o},r)),[a]);return i.jsx(ds,{block:!0,children:s})},xj=yt(bj,"system-log",{title:"Stack Traceback",size:"xl"});function vj(a){switch(a){case"DEBUG":return bg;case"ERROR":return Yx;case"INFO":return La;case"WARNING":return pg;default:return Cx}}const Sj=({logs:a})=>{const s=Xe(),o=v.useMemo(()=>[{accessorKey:"type",cell:({row:{original:{type:r}}})=>i.jsx(ee,{icon:vj(r)})},{Header:"Message",accessorKey:"message"},{Header:"Date",accessorKey:"timestamp"},{accessorKey:"exception",cell:({row:{original:{exception:r}}})=>r?i.jsx(Qe,{label:"Detail",icon:Mx,onClick:()=>s.openContextModal(xj,{stack:r})}):null}],[s]);return i.jsx(i.Fragment,{children:i.jsx(fl,{columns:o,data:a})})},jj=()=>{const a=k6(),{isFetching:s,data:o,refetch:r}=a,{mutate:d,isPending:f}=_6(),h=v.useCallback(()=>{window.open(`${gn.baseUrl}/bazarr.log`)},[]);pt("Logs - Bazarr (System)");const{data:p}=Nn(),b=L0(),g=()=>{const S=p==null?void 0:p.log.include_filter,_=p==null?void 0:p.log.exclude_filter,A=S!==""&&S!==void 0?1:0,L=[["","I"],["E","I/E"]][_!==""&&_!==void 0?1:0][A],M=p!=null&&p.general.debug?"Debug":"";return M+(M!==""&&L!==""?" ":"")+L},x=()=>{const S=A=>{A&&b.closeModal(_)},_=b.openModal({title:"Set Log Debug and Filter Options",children:i.jsx(C9,{callbackModal:S,children:i.jsxs($,{children:[i.jsx(Z,{label:"Debug",settingKey:"settings-general-debug"}),i.jsx(Q,{children:"Debug logging should only be enabled temporarily"}),i.jsx(Ue,{label:"Include Filter",settingKey:"settings-log-include_filter"}),i.jsx(Ue,{label:"Exclude Filter",settingKey:"settings-log-exclude_filter"}),i.jsx(Z,{label:"Use Regular Expressions (Regex)",settingKey:"settings-log-use_regex"}),i.jsx(Z,{label:"Ignore Case",settingKey:"settings-log-ignore_case"})]})})})};return i.jsx(We,{fluid:!0,px:0,children:i.jsxs(Ct,{result:a,children:[i.jsx(ce,{children:i.jsxs(re,{gap:"xs",children:[i.jsx(ce.Button,{loading:s,icon:ys,onClick:()=>r(),children:"Refresh"}),i.jsx(ce.Button,{icon:cf,onClick:h,children:"Download"}),i.jsx(ce.Button,{loading:f,icon:Ot,onClick:()=>d(),children:"Empty"}),i.jsx(ce.Button,{loading:f,icon:Tx,onClick:x,rightSection:g()!==""?i.jsx(ze,{size:"xs",radius:"sm",children:g()}):i.jsx(i.Fragment,{}),children:"Filter"})]})}),i.jsx(Sj,{logs:o??[]})]})})},wj=a=>{const s=v.useMemo(()=>[{header:"Name",accessorKey:"name"},{header:"Status",accessorKey:"status"},{header:"Next Retry",accessorKey:"retry"}],[]);return i.jsx(qt,{columns:s,data:a.providers})},Mj=()=>{const a=r6(),{isFetching:s,data:o,refetch:r}=a,{mutate:d,isPending:f}=u6();return pt("Providers - Bazarr (System)"),i.jsx(Ct,{result:a,children:i.jsxs(We,{fluid:!0,px:0,children:[i.jsx(ce,{children:i.jsxs(re,{children:[i.jsx(ce.Button,{loading:s,icon:ys,onClick:()=>r(),children:"Refresh"}),i.jsx(ce.Button,{icon:Ot,loading:f,onClick:()=>d(),children:"Reset"})]})}),i.jsx(wj,{providers:o??[]})]})})},kj=()=>{const a=L6(),{data:s}=a;return pt("Releases - Bazarr (System)"),i.jsx(We,{size:"md",py:12,children:i.jsx(Ct,{result:a,children:i.jsx($,{gap:"lg",children:s==null?void 0:s.map((o,r)=>i.jsx(_j,{...o},Ve(r,o.date)))})})})},_j=({name:a,body:s,date:o,prerelease:r,current:d})=>{const f=v.useMemo(()=>s.map(h=>h.replace(/(\s\[.*?\])\(.*?\)/,"")),[s]);return i.jsxs(Pd,{shadow:"md",p:"lg",children:[i.jsxs(re,{children:[i.jsx(G,{fw:"bold",children:a}),i.jsx(ze,{color:"blue",children:o}),i.jsx(ze,{color:r?"yellow":"green",children:r?"Development":"Master"}),d&&i.jsx(ze,{color:"indigo",children:"Installed"})]}),i.jsx(Je,{my:"sm"}),i.jsx(G,{children:"From newest to oldest:"}),i.jsx(Tn,{children:f.map((h,p)=>i.jsx(Tn.Item,{children:h},p))})]})},Aj=({tasks:a})=>{const s=C6(),o=v.useMemo(()=>[{header:"Name",accessorKey:"name",cell:({row:{original:{name:r}}})=>i.jsx(G,{className:"table-primary",children:r})},{header:"Interval",accessorKey:"interval",cell:({row:{original:{interval:r}}})=>i.jsx(G,{className:"table-no-wrap",children:r})},{header:"Next Execution",accessorKey:"next_run_in"},{header:"Run",accessorKey:"job_running",cell:({row:{original:{job_id:r,job_running:d}}})=>i.jsx(Ba,{label:"Run Job",icon:Oi,iconProps:{spin:d},mutation:s,args:()=>r})}],[s]);return i.jsx(qt,{initialState:{sorting:[{id:"name",desc:!1}]},columns:o,data:a,enableSorting:!0,getSortedRowModel:nb()})},zj=()=>{const a=T6(),{isFetching:s,data:o,refetch:r}=a;return pt("Tasks - Bazarr (System)"),i.jsx(Ct,{result:a,children:i.jsxs(We,{fluid:!0,px:0,children:[i.jsx(ce,{children:i.jsx(ce.Button,{loading:s,icon:ys,onClick:()=>r(),children:"Refresh"})}),i.jsx(Aj,{tasks:o??[]})]})})};function Xp({name:a,columns:s,query:o,searchAll:r}){const d=o.paginationStatus.totalCount,f=og();return pt(`Wanted ${a} - Bazarr`),i.jsxs(We,{fluid:!0,px:0,children:[i.jsx(ce,{children:i.jsx(ce.Button,{disabled:f||d===0,onClick:r,icon:Ra,children:"Search All"})}),i.jsx(Mf,{tableStyles:{emptyText:`No missing ${a} subtitles`},query:o,columns:s})]})}const Tj=()=>{const{download:a}=Ao(),s=v.useMemo(()=>[{header:"Name",accessorKey:"title",cell:({row:{original:{title:d,radarrId:f}}})=>{const h=`/movies/${f}`;return i.jsx(dt,{component:Da,to:h,children:d})}},{header:"Missing",accessorKey:"missing_subtitles",cell:({row:{original:{radarrId:d,missing_subtitles:f}}})=>i.jsx(re,{gap:"sm",children:f.map((h,p)=>i.jsx(ze,{color:a.isPending?"gray":void 0,leftSection:i.jsx(ee,{icon:Ra}),style:{cursor:"pointer"},onClick:()=>{Le.create(h.name,ut.SearchSubtitle,a.mutateAsync,{radarrId:d,form:{language:h.code2,hi:h.hi,forced:h.forced}})},children:i.jsx(Et.Text,{value:h})},Ve(p,h.code2)))})}],[a]),{mutateAsync:o}=lg(),r=a6();return i.jsx(Xp,{name:"Movies",columns:s,query:r,searchAll:()=>o({action:"search-wanted"})})},Cj=()=>{const{download:a}=_o(),s=v.useMemo(()=>[{header:"Name",accessorKey:"seriesTitle",cell:({row:{original:{sonarrSeriesId:d,seriesTitle:f}}})=>{const h=`/series/${d}`;return i.jsx(dt,{className:"table-primary",component:Da,to:h,children:f})}},{header:"Episode",accessorKey:"episode_number"},{accessorKey:"episodeTitle"},{header:"Missing",accessorKey:"missing_subtitles",cell:({row:{original:{sonarrSeriesId:d,sonarrEpisodeId:f,missing_subtitles:h}}})=>{const p=d,b=f;return i.jsx(re,{gap:"sm",children:h.map((g,x)=>i.jsx(ze,{color:a.isPending?"gray":void 0,leftSection:i.jsx(ee,{icon:Ra}),style:{cursor:"pointer"},onClick:()=>{Le.create(g.name,ut.SearchSubtitle,a.mutateAsync,{seriesId:p,episodeId:b,form:{language:g.code2,hi:g.hi,forced:g.forced}})},children:i.jsx(Et.Text,{value:g})},Ve(x,g.code2)))})}}],[a]),{mutateAsync:o}=rg(),r=Zb();return i.jsx(Xp,{name:"Series",columns:s,query:r,searchAll:()=>o({action:"search-wanted"})})},Ej=()=>{const{data:a}=Nn(),s=hs();return v.useEffect(()=>{if(a){const{use_sonarr:o,use_radarr:r}=a.general;s(o?"/series":r?"/movies":"/settings/general")}},[a,s]),i.jsx(fs,{visible:!0})},Oj=v.lazy(()=>P0(()=>import("./HistoryStats-BhZJnFtx.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),Nj=v.lazy(()=>P0(()=>import("./index-CWl1y9K6.js"),__vite__mapDeps([7,1,2,3,4]),import.meta.url));function Dj(){const{data:a}=j6(),{sonarr:s,radarr:o}=pv();return v.useMemo(()=>[{path:"/",element:i.jsx(yS,{}),children:[{index:!0,element:i.jsx(Ej,{})},{icon:Oi,name:"Series",path:"series",badge:a==null?void 0:a.sonarr_signalr,hidden:!s,children:[{index:!0,element:i.jsx(M9,{})},{path:"edit",hidden:!0,element:i.jsx(k9,{})},{path:":id",element:i.jsx(m9,{})}]},{icon:gg,name:"Movies",path:"movies",badge:a==null?void 0:a.radarr_signalr,hidden:!o,children:[{index:!0,element:i.jsx(b9,{})},{path:"edit",hidden:!0,element:i.jsx(w9,{})},{path:":id",element:i.jsx(j9,{})}]},{icon:of,name:"History",path:"history",hidden:!s&&!o,children:[{path:"series",name:"Episodes",hidden:!s,element:i.jsx(y9,{})},{path:"movies",name:"Movies",hidden:!o,element:i.jsx(p9,{})},{path:"stats",name:"Statistics",element:i.jsx(u0,{children:i.jsx(Oj,{})})}]},{icon:_g,name:"Wanted",path:"wanted",hidden:!s&&!o,children:[{name:"Episodes",path:"series",badge:a==null?void 0:a.episodes,hidden:!s,element:i.jsx(Cj,{})},{name:"Movies",path:"movies",badge:a==null?void 0:a.movies,hidden:!o,element:i.jsx(Tj,{})}]},{icon:Ci,name:"Blacklist",path:"blacklist",hidden:!s&&!o,children:[{path:"series",name:"Episodes",hidden:!s,element:i.jsx(wS,{})},{path:"movies",name:"Movies",hidden:!o,element:i.jsx(SS,{})}]},{icon:nv,name:"Settings",path:"settings",children:[{path:"general",name:"General",element:i.jsx(G9,{})},{path:"languages",name:"Languages",element:i.jsx(a7,{})},{path:"providers",name:"Providers",element:i.jsx($7,{})},{path:"subtitles",name:"Subtitles",element:i.jsx(cj,{})},{path:"sonarr",name:"Sonarr",element:i.jsx(sj,{})},{path:"radarr",name:"Radarr",element:i.jsx(W7,{})},{path:"plex",name:"Plex",element:i.jsx(F7,{})},{path:"notifications",name:"Notifications",element:i.jsx(o7,{})},{path:"scheduler",name:"Scheduler",element:i.jsx(nj,{})},{path:"ui",name:"UI",element:i.jsx(fj,{})}]},{icon:dx,name:"System",path:"system",children:[{path:"tasks",name:"Tasks",element:i.jsx(zj,{})},{path:"logs",name:"Logs",element:i.jsx(jj,{})},{path:"providers",name:"Providers",badge:a==null?void 0:a.providers,element:i.jsx(Mj,{})},{path:"backup",name:"Backups",element:i.jsx(yj,{})},{path:"status",name:"Status",badge:a==null?void 0:a.status,element:i.jsx(u0,{children:i.jsx(Nj,{})})},{path:"releases",name:"Releases",element:i.jsx(kj,{})},{path:"announcements",name:"Announcements",badge:a==null?void 0:a.announcements,element:i.jsx(gj,{})}]},{path:"*",hidden:!0,element:i.jsx(g9,{})}]},{path:Bo.Auth,hidden:!0,element:i.jsx(bS,{})}],[a==null?void 0:a.episodes,a==null?void 0:a.movies,a==null?void 0:a.providers,a==null?void 0:a.sonarr_signalr,a==null?void 0:a.radarr_signalr,a==null?void 0:a.announcements,a==null?void 0:a.status,o,s])}const Ip=v.createContext([]),Lj=()=>{const a=Dj(),s=v.useMemo(()=>I4(a,{basename:gn.baseUrl}),[a]);return i.jsx(Ip.Provider,{value:a,children:i.jsx(Z4,{router:s})})};function Rj(){return v.useContext(Ip)}const O0=document.getElementById("root");O0===null||cb.createRoot(O0).render(i.jsx(v.StrictMode,{children:i.jsx(ox,{children:i.jsx(Lj,{})})}));export{gn as E,ee as F,rS as G,j as Q,St as S,ce as T,X as a,At as b,gs as c,Ct as d,qt as e,Yj as f,Gj as g,Vj as h,Fj as i,bg as j,he as l,r6 as u};
