diff --git a/cmd/telesrv-admin/web/dist/assets/index-DLK0oYaN.js b/cmd/telesrv-admin/web/dist/assets/index-DLK0oYaN.js new file mode 100644 index 00000000..6fcdad10 --- /dev/null +++ b/cmd/telesrv-admin/web/dist/assets/index-DLK0oYaN.js @@ -0,0 +1,8 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,ee=Object.prototype.hasOwnProperty,S={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function C(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)ee.call(n,i)&&!te.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,se(x);else{var t=n(l);t!==null&&ce(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(te),te=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ce(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var ee=!1,S=null,te=-1,C=5,w=-1;function ne(){return!(e.unstable_now()-we||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(te),te=-1):h=!0,ce(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,se(x))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u(),n=f();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,d=/^[: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]*$/,p={},m={};function h(e){return l.call(m,e)?!0:l.call(p,e)?!1:d.test(e)?m[e]=!0:(p[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function ee(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2s||i[o]!==a[s]){var c=` +`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(``)&&(c=c.replace(``,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{he=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?me(e):``}function _e(e){switch(e.tag){case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 2:case 15:return e=ge(e.type,!1),e;case 11:return e=ge(e.type.render,!1),e;case 1:return e=ge(e.type,!0),e;default:return``}}function ve(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case w:return`Fragment`;case C:return`Portal`;case re:return`Profiler`;case ne:return`StrictMode`;case se:return`Suspense`;case ce:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ae:return(e.displayName||`Context`)+`.Consumer`;case ie:return(e._context.displayName||`Context`)+`.Provider`;case oe:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case le:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}function ye(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ve(t);case 8:return t===ne?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function be(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function xe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Se(e){var t=xe(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ce(e){e._valueTracker||=Se(e)}function we(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=xe(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Te(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ee(e,t){var n=t.checked;return E({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function De(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=be(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function D(e,t){t=t.checked,t!=null&&ee(e,`checked`,t,!1)}function Oe(e,t){D(e,t);var n=be(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Ae(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Ae(e,t.type,be(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ke(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Ae(e,t,n){(t!==`number`||Te(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var je=Array.isArray;function O(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i`+t.valueOf().toString()+``,t=Re.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ve={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},He=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ve).forEach(function(e){He.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ve[t]=Ve[e]})});function Ue(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ve.hasOwnProperty(e)&&Ve[e]?(``+t).trim():t+`px`}function We(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ue(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ge=E({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ke(e,t){if(t){if(Ge[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function qe(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;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 Je=null;function Ye(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xe=null,Ze=null,Qe=null;function $e(e){if(e=Ji(e)){if(typeof Xe!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Xi(t),Xe(e.stateNode,e.type,t))}}function et(e){Ze?Qe?Qe.push(e):Qe=[e]:Ze=e}function tt(){if(Ze){var e=Ze,t=Qe;if(Qe=Ze=null,$e(e),t)for(e=0;e>>=0,e===0?32:31-(Pt(e)/Ft|0)|0}var Lt=64,Rt=4194304;function zt(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=zt(a))):r=zt(s)}else o=n&~i,o===0?a!==0&&(r=zt(a)):r=zt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Kt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function qt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=cr),dr=` `,fr=!1;function pr(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var hr=!1;function gr(e,t){switch(e){case`compositionend`:return mr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function _r(e,t){if(hr)return e===`compositionend`||!sr&&pr(e,t)?(e=jn(),An=kn=On=null,hr=!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)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=zr(n)}}function Vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(){for(var e=window,t=Te();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Te(e.document)}return t}function Ur(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`)}function Wr(e){var t=Hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Vr(n.ownerDocument.documentElement,n)){if(r!==null&&Ur(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Br(n,a);var o=Br(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n=document.documentMode,Kr=null,qr=null,Jr=null,Yr=!1;function Xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yr||Kr==null||Kr!==Te(r)||(r=Kr,`selectionStart`in r&&Ur(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jr&&Rr(Jr,r)||(Jr=r,r=xi(qr,`onSelect`),0Qi||(e.current=Zi[Qi],Zi[Qi]=null,Qi--)}function I(e,t){Qi++,Zi[Qi]=e.current,e.current=t}var ea={},L=$i(ea),ta=$i(!1),na=ea;function ra(e,t){var n=e.type.contextTypes;if(!n)return ea;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ia(e){return e=e.childContextTypes,e!=null}function aa(){F(ta),F(L)}function oa(e,t,n){if(L.current!==ea)throw Error(r(168));I(L,t),I(ta,n)}function sa(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ye(e)||`Unknown`,a));return E({},n,i)}function ca(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ea,na=L.current,I(L,e),I(ta,ta.current),!0}function la(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=sa(e,t,na),i.__reactInternalMemoizedMergedChildContext=e,F(ta),F(L),I(L,e)):F(ta),I(ta,n)}var ua=null,da=!1,fa=!1;function pa(e){ua===null?ua=[e]:ua.push(e)}function ma(e){da=!0,pa(e)}function ha(){if(!fa&&ua!==null){fa=!0;var e=0,t=N;try{var n=ua;for(N=1;e>=o,i-=o,Ca=1<<32-Nt(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),R&&Ta(r,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&Ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&Ta(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),R&&Ta(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===w&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case te:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===w){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===le&&Wa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ha(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===w?(r=Zl(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=Xl(i.type,i.key,i.props,null,e.mode,o),o.ref=Ha(e,r,i),o.return=e,e=o)}return s(e);case C:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=eu(i,e.mode,o),r.return=e,e=r}return s(e);case le:return l=i._init,_(e,r,l(i._payload),o)}if(je(i))return h(e,r,i,o);if(fe(i))return g(e,r,i,o);Ua(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=$l(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ka=Ga(!0),qa=Ga(!1),Ja=$i(null),Ya=null,Xa=null,Za=null;function Qa(){Za=Xa=Ya=null}function $a(e){var t=Ja.current;F(Ja),e._currentValue=t}function eo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function to(e,t){Ya=e,Za=Xa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Bs=!0),e.firstContext=null)}function no(e){var t=e._currentValue;if(Za!==e)if(e={context:e,memoizedValue:t,next:null},Xa===null){if(Ya===null)throw Error(r(308));Xa=e,Ya.dependencies={lanes:0,firstContext:e}}else Xa=Xa.next=e;return t}var ro=null;function io(e){ro===null?ro=[e]:ro.push(e)}function ao(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,io(t)):(n.next=i.next,i.next=n),t.interleaved=n,oo(e,r)}function oo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,oo(e,n)}return i=r.interleaved,i===null?(t.next=t,io(r)):(t.next=i.next,i.next=t),r.interleaved=t,oo(e,n)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}function mo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ho(e,t,n,r){var i=e.updateQueue;so=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:so=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Yc|=o,e.lanes=o,e.memoizedState=d}}function go(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ao.transition;Ao.transition={};try{e(!1),t()}finally{N=n,Ao.transition=r}}function ps(){return Bo().memoizedState}function ms(e,t,n){var r=ml(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gs(e))_s(t,n);else if(n=ao(e,t,n,r),n!==null){var i=pl();hl(n,e,r,i),vs(n,t,r)}}function hs(e,t,n){var r=ml(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gs(e))_s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o)){var c=t.interleaved;c===null?(i.next=i,io(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=ao(e,t,i,r),n!==null&&(i=pl(),hl(n,e,r,i),vs(n,t,r))}}function gs(e){var t=e.alternate;return e===B||t!==null&&t===B}function _s(e,t){No=Mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}var ys={readContext:no,useCallback:U,useContext:U,useEffect:U,useImperativeHandle:U,useInsertionEffect:U,useLayoutEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useMutableSource:U,useSyncExternalStore:U,useId:U,unstable_isNewReconciler:!1},bs={readContext:no,useCallback:function(e,t){return zo().memoizedState=[e,t===void 0?null:t],e},useContext:no,useEffect:ns,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),es(4194308,4,os.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){return es(4,2,e,t)},useMemo:function(e,t){var n=zo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=zo();return e={current:e},t.memoizedState=e},useState:Zo,useDebugValue:cs,useDeferredValue:function(e){return zo().memoizedState=e},useTransition:function(){var e=Zo(!1),t=e[0];return e=fs.bind(null,e[1]),zo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=B,a=zo();if(R){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Y===null)throw Error(r(349));jo&30||Ko(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ns(Jo.bind(null,i,o,e),[e]),i.flags|=2048,Qo(9,qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=zo(),t=Y.identifierPrefix;if(R){var n=wa,r=Ca;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Po++,0<\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Vi]=t,e[Hi]=i,uc(e,t,!1,!1),t.stateNode=e;a:{switch(c=qe(n,i),n){case`dialog`:P(`cancel`,e),P(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:P(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;otl&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Eo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!R)return W(t),null}else 2*M()-s.renderingStartTime>tl&&n!==1073741824&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(W(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=M(),t.sibling=null,n=z.current,I(z,i?n&1|2:n&1),t);case 22:case 23:return Tl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Kc&1073741824&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function hc(e,t){switch(Oa(t),t.tag){case 1:return ia(t.type)&&aa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),F(ta),F(L),Oo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return To(t),null;case 13:if(F(z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(z),null;case 4:return Co(),null;case 10:return $a(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var gc=!1,G=!1,_c=typeof WeakSet==`function`?WeakSet:Set,K=null;function vc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){$(e,t,n)}else n.current=null}function yc(e,t,n){try{n()}catch(n){$(e,t,n)}}var bc=!1;function xc(e,t){if(ki=xn,e=Hr(),Ur(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ai={focusedElem:e,selectionRange:n},xn=!1,K=t;K!==null;)if(t=K,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Cs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){$(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return h=bc,bc=!1,h}function Sc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&yc(t,n,a)}i=i.next}while(i!==r)}}function Cc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Tc(e){var t=e.alternate;t!==null&&(e.alternate=null,Tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vi],delete t[Hi],delete t[Wi],delete t[Gi],delete t[Ki])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Dc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(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.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Oc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Oi));else if(r!==4&&(e=e.child,e!==null))for(Oc(e,t,n),e=e.sibling;e!==null;)Oc(e,t,n),e=e.sibling}function kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(kc(e,t,n),e=e.sibling;e!==null;)kc(e,t,n),e=e.sibling}var q=null,Ac=!1;function jc(e,t,n){for(n=n.child;n!==null;)Mc(e,t,n),n=n.sibling}function Mc(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount==`function`)try{jt.onCommitFiberUnmount(At,n)}catch{}switch(n.tag){case 5:G||vc(n,t);case 6:var r=q,i=Ac;q=null,jc(e,t,n),q=r,Ac=i,q!==null&&(Ac?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(Ac?(e=q,n=n.stateNode,e.nodeType===8?Li(e.parentNode,n):e.nodeType===1&&Li(e,n),yn(e)):Li(q,n.stateNode));break;case 4:r=q,i=Ac,q=n.stateNode.containerInfo,Ac=!0,jc(e,t,n),q=r,Ac=i;break;case 0:case 11:case 14:case 15:if(!G&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&yc(n,t,o),i=i.next}while(i!==r)}jc(e,t,n);break;case 1:if(!G&&(vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){$(n,t,e)}jc(e,t,n);break;case 21:jc(e,t,n);break;case 22:n.mode&1?(G=(r=G)||n.memoizedState!==null,jc(e,t,n),G=r):jc(e,t,n);break;default:jc(e,t,n)}}function Nc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _c),t.forEach(function(t){var r=Hl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Pc(e,t){var n=t.deletions;if(n!==null)for(var i=0;ia&&(a=s),i&=~o}if(i=a,i=M()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Hc(i/1960))-i,10e?16:e,sl===null)var i=!1;else{if(e=sl,sl=null,cl=0,J&6)throw Error(r(331));var a=J;for(J|=4,K=e.current;K!==null;){var o=K,s=o.child;if(K.flags&16){var c=o.deletions;if(c!==null){for(var l=0;lM()-el?El(e,0):Zc|=n),gl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Rt,Rt<<=1,!(Rt&130023424)&&(Rt=4194304)):t=1);var n=pl();e=oo(e,t),e!==null&&(Kt(e,t,n),gl(e,n))}function Vl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bl(e,n)}function Hl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Bl(e,n)}var Ul=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ta.current)Bs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Bs=!1,lc(e,t,n);Bs=!!(e.flags&131072)}else Bs=!1,R&&t.flags&1048576&&Ea(t,ya,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;sc(e,t),e=t.pendingProps;var a=ra(t,L.current);to(t,n),a=Lo(null,t,i,e,a,n);var o=Ro();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ia(i)?(o=!0,ca(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,co(t),a.updater=Ts,t.stateNode=a,a._reactInternals=t,ks(t,i,e,n),t=Ys(null,t,i,!0,o,n)):(t.tag=0,R&&o&&Da(t),Vs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(sc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=Cs(i,e),a){case 0:t=qs(null,t,i,e,n);break a;case 1:t=Js(null,t,i,e,n);break a;case 11:t=Hs(null,t,i,e,n);break a;case 14:t=Us(null,t,i,Cs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Js(e,t,i,a,n);case 3:a:{if(Xs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,lo(e,t),ho(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=As(Error(r(423)),t),t=Zs(e,t,i,n,a);break a}else if(i!==a){a=As(Error(r(424)),t),t=Zs(e,t,i,n,a);break a}else for(Aa=Ri(t.stateNode.containerInfo.firstChild),ka=t,R=!0,ja=null,n=qa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(za(),i===a){t=cc(e,t,n);break a}Vs(e,t,i,n)}t=t.child}return t;case 5:return wo(t),e===null&&Fa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,ji(i,a)?s=null:o!==null&&ji(i,o)&&(t.flags|=32),Ks(e,t),Vs(e,t,s,n),t.child;case 6:return e===null&&Fa(t),null;case 13:return ec(e,t,n);case 4:return So(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ka(t,null,i,n):Vs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Hs(e,t,i,a,n);case 7:return Vs(e,t,t.pendingProps,n),t.child;case 8:return Vs(e,t,t.pendingProps.children,n),t.child;case 12:return Vs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,I(Ja,i._currentValue),i._currentValue=s,o!==null)if(Lr(o.value,s)){if(o.children===a.children&&!ta.current){t=cc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=uo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),eo(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),eo(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Vs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,to(t,n),a=no(a),i=i(a),t.flags|=1,Vs(e,t,i,n),t.child;case 14:return i=t.type,a=Cs(i,t.pendingProps),a=Cs(i.type,a),Us(e,t,i,a,n);case 15:return Ws(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),sc(e,t),t.tag=1,ia(i)?(e=!0,ca(t)):e=!1,to(t,n),Ds(t,i,a),ks(t,i,a,n),Ys(null,t,i,!0,e,n);case 19:return oc(e,t,n);case 22:return Gs(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return bt(e,t)}function Gl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kl(e,t,n,r){return new Gl(e,t,n,r)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jl(e){if(typeof e==`function`)return+!!ql(e);if(e!=null){if(e=e.$$typeof,e===oe)return 11;if(e===T)return 14}return 2}function Yl(e,t){var n=e.alternate;return n===null?(n=Kl(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&14680064,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}function Xl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ql(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case w:return Zl(n.children,a,o,t);case ne:s=8,a|=8;break;case re:return e=Kl(12,n,t,a|2),e.elementType=re,e.lanes=o,e;case se:return e=Kl(13,n,t,a),e.elementType=se,e.lanes=o,e;case ce:return e=Kl(19,n,t,a),e.elementType=ce,e.lanes=o,e;case ue:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case ie:s=10;break a;case ae:s=9;break a;case oe:s=11;break a;case T:s=14;break a;case le:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Kl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Zl(e,t,n,r){return e=Kl(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Kl(22,e,r,t),e.elementType=ue,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=Kl(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Kl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gt(0),this.expirationTimes=Gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,i,a,o,s,c){return e=new tu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},co(a),e}function ru(e,t,n){var r=3{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=m();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),g=c(u()),_=c(h(),1),v=class extends Error{status;constructor(e,t){super(t),this.status=e}};async function y(e,t={}){let n=await fetch(e,{credentials:`same-origin`,headers:{"Content-Type":`application/json`,...t.headers??{}},...t}),r=await n.text(),i=r?JSON.parse(r):null;if(!n.ok){let e=i?.error||i?.Error||i?.message||n.statusText;throw new v(n.status,e)}return i}function b(e){return e instanceof Error?e.message:String(e)}var x={session:()=>y(`/api/session`),login:e=>y(`/api/login`,{method:`POST`,body:JSON.stringify({secret:e})}),logout:()=>y(`/api/logout`,{method:`POST`,body:`{}`}),accounts:e=>y(`/api/accounts?${e.toString()}`),account:e=>y(`/api/accounts/${e}`),channels:e=>y(`/api/channels?${e.toString()}`),channel:e=>y(`/api/channels/${e}`),messages:e=>y(`/api/messages?${e.toString()}`),message:(e,t)=>y(`/api/messages/detail?${new URLSearchParams({owner_user_id:String(e),msg_id:String(t)}).toString()}`),groupMessages:e=>y(`/api/messages/groups?${e.toString()}`),groupMessage:(e,t)=>y(`/api/messages/groups/detail?${new URLSearchParams({channel_id:String(e),msg_id:String(t)}).toString()}`),action:(e,t)=>y(e,{method:`POST`,body:JSON.stringify(t)})},ee=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),te={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},C=(0,g.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,g.createElement)(`svg`,{ref:c,...te,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:S(`lucide`,i),...s},[...o.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(a)?a:[a]])),w=(e,t)=>{let n=(0,g.forwardRef)(({className:n,...r},i)=>(0,g.createElement)(C,{ref:i,iconNode:t,className:S(`lucide-${ee(e)}`,n),...r}));return n.displayName=`${e}`,n},ne=w(`BadgeCheck`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),re=w(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),ie=w(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ae=w(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),oe=w(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),se=w(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),ce=w(`Cable`,[[`path`,{d:`M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1`,key:`10bnsj`}],[`path`,{d:`M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9`,key:`1eqmu1`}],[`path`,{d:`M21 21v-2h-4`,key:`14zm7j`}],[`path`,{d:`M3 5h4V3`,key:`z442eg`}],[`path`,{d:`M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3`,key:`ebdjd7`}]]),T=w(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),le=w(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ue=w(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),de=w(`Clock3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16.5 12`,key:`1aq6pp`}]]),fe=w(`Database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),E=w(`FileJson`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),pe=w(`History`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),me=w(`KeyRound`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),he=w(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ge=w(`LogOut`,[[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}],[`polyline`,{points:`16 17 21 12 16 7`,key:`1gabdz`}],[`line`,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,key:`1uyos4`}]]),_e=w(`MessageSquareText`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M13 8H7`,key:`14i4kc`}],[`path`,{d:`M17 12H7`,key:`16if0g`}]]),ve=w(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),ye=w(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),be=w(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),xe=w(`Server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Se=w(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Ce=w(`Shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),we=w(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),Te=w(`Users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`1da9ce`}]]),Ee=w(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),De=o((e=>{var t=u(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),D=o(((e,t)=>{t.exports=De()}))(),Oe=`telesrv.admin.lang`,ke={en:{"app.adminConsole":`Admin Console`,"app.localAccess":`Local access`,"app.title":`telesrv admin`,"common.actions":`Actions`,"common.admins":`Admins`,"common.backToList":`Back to list`,"common.channel":`Channel`,"common.channelOrGroup":`Channel / Group`,"common.clear":`Clear`,"common.close":`Close`,"common.count":`Count`,"common.deleted":`Deleted`,"common.detail":`Details`,"common.device":`Device`,"common.disabled":`Disabled`,"common.enabled":`Enabled`,"common.fromPeer":`From Peer`,"common.group":`Group`,"common.id":`ID`,"common.limit":`Limit`,"common.loading":`Loading`,"common.member":`Member`,"common.members":`Members`,"common.messageId":`Message ID`,"common.name":`Name`,"common.no":`No`,"common.noResults":`No results`,"common.none":`None`,"common.normal":`Normal`,"common.operations":`Operations`,"common.owner":`Owner`,"common.platform":`Platform`,"common.refresh":`Refresh`,"common.search":`Search`,"common.sender":`Sender`,"common.status":`Status`,"common.survived":`Live`,"common.time":`Time`,"common.type":`Type`,"common.updatedAt":`Updated`,"common.username":`Username`,"common.valid":`Valid`,"common.verified":`Verified`,"common.views":`Views`,"common.yes":`Yes`,"route.accounts":`Accounts`,"route.accountsSubtitle":`Console / Accounts`,"route.channels":`Supergroups and Channels`,"route.channelsSubtitle":`Console / Channels`,"route.dashboard":`Operations Console`,"route.dashboardSubtitle":`Console / Overview`,"route.messages":`Message Audit`,"route.messagesSubtitle":`Console / Messages`,"layout.navigation":`Navigation`,"layout.primaryNav":`Primary navigation`,"layout.dashboard":`Overview`,"layout.accounts":`Accounts`,"layout.channels":`Supergroups / Channels`,"layout.messages":`Messages`,"layout.privateMessages":`Private`,"layout.groupMessages":`Groups`,"layout.runtime":`Runtime`,"layout.adminBackend":`Admin backend`,"layout.ready":`Ready`,"layout.pgRead":`PG read`,"layout.readOnly":`Read-only`,"layout.writeOps":`Write operations`,"layout.dryRun":`Dry-run`,"layout.actor":`Actor: {actor}`,"layout.logout":`Log out`,"language.en":`EN`,"language.zh":`中文`,"login.heading":`Operations Admin`,"login.body":`Enter credentials to open the console.`,"login.secret":`Admin password or token`,"login.submit":`Log in`,"login.submitting":`Logging in`,"dashboard.eyebrow":`Runtime Overview`,"dashboard.title":`Console Overview`,"dashboard.readPath":`Read path`,"dashboard.readPathValue":`PG read-only`,"dashboard.writePath":`Write path`,"dashboard.executionPolicy":`Execution policy`,"dashboard.dryRunFirst":`Dry-run first`,"dashboard.accountsText":`Account status, premium, verification, sessions.`,"dashboard.channelsText":`Public entities, member counts, verification state.`,"dashboard.messagesText":`Message boxes, updates, outbox state.`,"dashboard.strip.dryRun":`All dangerous actions start with dry-run`,"dashboard.strip.token":`Browser never stores internal tokens`,"dashboard.strip.pagination":`Lists use cursor pagination`,"dashboard.strip.snapshot":`Detail pages retain raw state snapshots`,"account.pageTitle":`Accounts`,"account.queryResults":`Search results`,"account.recentActive":`Recently active accounts`,"account.currentPage":`Accounts on page`,"account.onlineDevices":`Online device records`,"account.premium":`Premium`,"account.frozen":`Frozen`,"account.searchPlaceholder":`User ID / phone / username`,"account.userID":`User ID`,"account.phone":`Phone`,"account.lastActive":`Last active`,"account.notVerified":`Not verified`,"account.notPremium":`Not premium`,"account.premiumUntil":`Premium expires`,"account.activeSessions":`Authorized devices`,"account.accountFlags":`Account flags`,"account.restriction":`Restriction`,"account.restricted":`Restricted`,"account.createdAt":`Created`,"account.detailTitle":`Account #{id}`,"account.profile":`Account Profile`,"account.loadingDetail":`Loading account detail`,"account.waitingData":`Waiting for data`,"account.noUsername":`No username`,"account.noPhone":`No phone`,"account.sendFrozen":`Sending frozen`,"account.sendNormal":`Sending allowed`,"account.authorizationsTitle":`Authorized Devices`,"account.authorizationsCount":`{count} authorizations`,"account.recentAdminOps":`Recent Admin Actions`,"account.recent30Audit":`Last 30 audit rows`,"account.actionDock":`Account Actions`,"account.freezeSend":`Freeze sending`,"account.unfreezeSend":`Unfreeze sending`,"account.premiumMonths":`Premium duration (months)`,"account.premiumMonthsAria":`Set premium duration in months`,"account.setPremium":`Set premium`,"account.clearPremium":`Clear premium`,"account.setVerified":`Set verified`,"account.clearVerified":`Clear verified`,"channel.pageTitle":`Supergroups and Channels`,"channel.recentUpdated":`Recently updated`,"channel.currentPage":`Entities on page`,"channel.megagroups":`Supergroups`,"channel.broadcasts":`Channels`,"channel.verifiedCount":`Verified`,"channel.searchPlaceholder":`Channel ID / username / title`,"channel.channelID":`Channel ID`,"channel.kind":`Kind`,"channel.title":`Title`,"channel.pts":`PTS`,"channel.detailProfile":`Channel Profile`,"channel.loadingDetail":`Loading channel detail`,"channel.creator":`Creator {id}`,"channel.governance":`Moderation`,"channel.governanceValue":`Banned {banned} / Kicked {kicked}`,"channel.flags":`Channel flags`,"channel.rawRow":`Channel Raw Row`,"channel.rawRowText":`Database read-only snapshot`,"channel.actionDock":`Channel Actions`,"channel.setVerified":`Set verified`,"channel.clearVerified":`Clear verified`,"channel.kind.broadcast":`Channel`,"channel.kind.forum":`Supergroup / Forum`,"channel.kind.megagroup":`Supergroup`,"channel.kind.generic":`Channel / Group`,"messages.privateTitle":`Private Messages`,"messages.privateEyebrow":`Private message boxes`,"messages.groupTitle":`Group Messages`,"messages.groupEyebrow":`Supergroup / channel messages`,"messages.selectPrivatePeers":`Search and select the owner user and peer user first`,"messages.selectChannel":`Search and select a supergroup or channel first`,"messages.ownerUser":`Owner user`,"messages.peerUser":`Peer user`,"messages.beforeDatePlaceholder":`before_date cursor`,"messages.beforeIDPlaceholder":`before_msg_id cursor`,"messages.limitPlaceholder":`limit <= 100`,"messages.searchMessages":`Search messages`,"messages.nextPage":`Next page`,"messages.currentPage":`Messages on page`,"messages.deleted":`Deleted`,"messages.outgoing":`Outgoing`,"messages.incoming":`Incoming`,"messages.ownerPeer":`Owner / Peer`,"messages.deleteSelected":`Delete selected messages`,"messages.idsPlaceholder":`Message IDs, comma separated`,"messages.revoke":`Revoke for both sides`,"messages.previewDelete":`Dry-run delete`,"messages.clearHistory":`Clear private history`,"messages.maxIDPlaceholder":`max_id cutoff`,"messages.maxBatchesPlaceholder":`max_batches`,"messages.justClear":`Clear only this side`,"messages.previewClearHistory":`Dry-run clear history`,"messages.direction":`Direction`,"messages.body":`Body`,"messages.privateDetailTitle":`Message #{id}`,"messages.detailEyebrow":`Message Detail`,"messages.backPrivate":`Back to private messages`,"messages.backGroup":`Back to group messages`,"messages.ownerPeerTitle":`Owner {owner} · Peer {peer}`,"messages.senderSubtitle":`Sender {sender} · {date}`,"messages.boxID":`Message box ID`,"messages.privateMessageID":`Private message ID`,"messages.messageSender":`Message sender`,"messages.messageBox":`Message Box`,"messages.dialogRow":`Dialog Row`,"messages.privateRow":`Private Message Row`,"messages.channelMessageRow":`Channel Message Row`,"messages.channelRow":`Channel Row`,"messages.userUpdateEvents":`Update Events`,"messages.channelUpdateEvents":`Channel Update Events`,"messages.eventJson":`Event JSON`,"messages.dispatchOutbox":`Dispatch Queue`,"messages.messageBoxesSnapshot":`message_boxes read-only snapshot`,"messages.dialogSnapshot":`dialogs read-only snapshot`,"messages.privateSnapshot":`private_messages read-only snapshot`,"messages.channelMessagesSnapshot":`channel_messages read-only snapshot`,"messages.channelSnapshot":`channels read-only snapshot`,"messages.userEventsSource":`durable user_update_events`,"messages.channelEventsSource":`durable channel_update_events`,"messages.outboxSource":`online/offline dispatch_outbox`,"messages.attempts":`Attempts`,"messages.deleteThis":`Delete this message`,"messages.groupDetailTitle":`Group Message #{id}`,"messages.channelGroupTitle":`Channel / Group {id}`,"messages.mediaCount":`With media`,"messages.channelPosts":`Channel posts`,"messages.channelGroup":`Channel / Group`,"messages.pinned":`Pinned`,"messages.channelPost":`Channel post`,"messages.msgIDsInvalid":`Message IDs are invalid`,"auth.device":`Device`,"auth.platform":`Platform`,"auth.ip":`IP`,"auth.lastActive":`Last active`,"auth.revokeCurrent":`Revoke current`,"auth.keepCurrent":`Keep current`,"auth.revokeAll":`Revoke all devices`,"picker.userPlaceholder":`Search user_id / phone / username`,"picker.channelPlaceholder":`Search channel_id / username / title`,"picker.verified":`Verified`,"picker.regular":`Regular`,"action.reasonRequired":`Please enter an operation reason`,"action.flow":`Action Flow`,"action.close":`Close`,"action.stepReason":`Enter reason`,"action.stepDryRun":`Dry-run check`,"action.stepConfirm":`Confirm execution`,"action.reason":`Operation reason`,"action.reasonPlaceholder":`Describe why this operation is being performed`,"action.requestPreview":`Request preview`,"action.result":`Action result`,"action.commandID":`Command ID`,"action.status":`Status`,"action.dryRun":`Dry-run`,"action.runAgain":`Run dry-run again`,"action.runDry":`Run dry-run first`,"action.confirm":`Confirm execution`,"audit.id":`ID`,"audit.commandID":`Command ID`,"audit.action":`Action`,"audit.actor":`Actor`,"audit.status":`Status`,"audit.dryRun":`Dry-run`,"audit.reason":`Reason`,"audit.time":`Time`},zh:{"app.adminConsole":`管理控制台`,"app.localAccess":`本地访问`,"app.title":`telesrv 管理后台`,"common.actions":`操作`,"common.admins":`管理员`,"common.backToList":`返回列表`,"common.channel":`频道`,"common.channelOrGroup":`频道/群`,"common.clear":`清除`,"common.close":`关闭`,"common.count":`数量`,"common.deleted":`已删除`,"common.detail":`详情`,"common.device":`设备`,"common.disabled":`已禁用`,"common.enabled":`已启用`,"common.fromPeer":`From Peer`,"common.group":`群组`,"common.id":`ID`,"common.limit":`条数`,"common.loading":`加载中`,"common.member":`成员`,"common.members":`成员`,"common.messageId":`消息 ID`,"common.name":`姓名`,"common.no":`否`,"common.noResults":`无结果`,"common.none":`无`,"common.normal":`正常`,"common.operations":`操作`,"common.owner":`所属`,"common.platform":`平台`,"common.refresh":`刷新`,"common.search":`查询`,"common.sender":`发送方`,"common.status":`状态`,"common.survived":`存活`,"common.time":`时间`,"common.type":`类型`,"common.updatedAt":`更新时间`,"common.username":`用户名`,"common.valid":`有效`,"common.verified":`已认证`,"common.views":`浏览`,"common.yes":`是`,"route.accounts":`账号管理`,"route.accountsSubtitle":`控制台 / 账号`,"route.channels":`超级群与频道`,"route.channelsSubtitle":`控制台 / 频道`,"route.dashboard":`运维控制台`,"route.dashboardSubtitle":`控制台 / 总览`,"route.messages":`消息审计`,"route.messagesSubtitle":`控制台 / 消息`,"layout.navigation":`导航`,"layout.primaryNav":`主导航`,"layout.dashboard":`总览`,"layout.accounts":`账号`,"layout.channels":`超级群/频道`,"layout.messages":`消息`,"layout.privateMessages":`私聊`,"layout.groupMessages":`群聊`,"layout.runtime":`运行状态`,"layout.adminBackend":`管理后台`,"layout.ready":`就绪`,"layout.pgRead":`PG 读取`,"layout.readOnly":`只读`,"layout.writeOps":`写操作`,"layout.dryRun":`预演`,"layout.actor":`操作者:{actor}`,"layout.logout":`退出`,"language.en":`EN`,"language.zh":`中文`,"login.heading":`运维后台`,"login.body":`输入凭据后进入控制台。`,"login.secret":`管理员密码或 token`,"login.submit":`登录`,"login.submitting":`登录中`,"dashboard.eyebrow":`运行总览`,"dashboard.title":`控制台总览`,"dashboard.readPath":`读路径`,"dashboard.readPathValue":`PG 只读`,"dashboard.writePath":`写路径`,"dashboard.executionPolicy":`执行策略`,"dashboard.dryRunFirst":`先预演`,"dashboard.accountsText":`账号状态、会员、认证、会话。`,"dashboard.channelsText":`公开实体、成员计数、认证状态。`,"dashboard.messagesText":`消息盒、update、outbox 状态。`,"dashboard.strip.dryRun":`所有危险操作先预演`,"dashboard.strip.token":`浏览器不持有内部 token`,"dashboard.strip.pagination":`列表使用游标分页`,"dashboard.strip.snapshot":`详情页保留原始状态快照`,"account.pageTitle":`账号`,"account.queryResults":`查询结果`,"account.recentActive":`最近活跃账号`,"account.currentPage":`当前页账号`,"account.onlineDevices":`在线设备记录`,"account.premium":`会员`,"account.frozen":`冻结`,"account.searchPlaceholder":`用户 ID / 手机号 / 用户名`,"account.userID":`用户 ID`,"account.phone":`手机号`,"account.lastActive":`最近活跃`,"account.notVerified":`未认证`,"account.notPremium":`非会员`,"account.premiumUntil":`会员到期`,"account.activeSessions":`授权设备`,"account.accountFlags":`账号标记`,"account.restriction":`限制状态`,"account.restricted":`已限制`,"account.createdAt":`创建时间`,"account.detailTitle":`账号 #{id}`,"account.profile":`账号档案`,"account.loadingDetail":`加载账号详情`,"account.waitingData":`等待数据`,"account.noUsername":`无用户名`,"account.noPhone":`无手机号`,"account.sendFrozen":`发消息冻结`,"account.sendNormal":`发送正常`,"account.authorizationsTitle":`授权设备`,"account.authorizationsCount":`共 {count} 个授权`,"account.recentAdminOps":`最近后台操作`,"account.recent30Audit":`最近 30 条审计`,"account.actionDock":`账号操作`,"account.freezeSend":`冻结发消息`,"account.unfreezeSend":`解冻发消息`,"account.premiumMonths":`会员时长(月)`,"account.premiumMonthsAria":`设置会员时长,单位月`,"account.setPremium":`设置会员`,"account.clearPremium":`取消会员`,"account.setVerified":`设置认证`,"account.clearVerified":`取消认证`,"channel.pageTitle":`超级群与频道`,"channel.recentUpdated":`最近更新`,"channel.currentPage":`当前页实体`,"channel.megagroups":`超级群`,"channel.broadcasts":`频道`,"channel.verifiedCount":`已认证`,"channel.searchPlaceholder":`频道 ID / 用户名 / 标题`,"channel.channelID":`频道 ID`,"channel.kind":`类型`,"channel.title":`标题`,"channel.pts":`PTS`,"channel.detailProfile":`频道档案`,"channel.loadingDetail":`加载频道详情`,"channel.creator":`创建者 {id}`,"channel.governance":`治理状态`,"channel.governanceValue":`封禁 {banned} / 踢出 {kicked}`,"channel.flags":`频道标记`,"channel.rawRow":`频道原始行`,"channel.rawRowText":`数据库只读快照`,"channel.actionDock":`频道操作`,"channel.setVerified":`设置认证`,"channel.clearVerified":`取消认证`,"channel.kind.broadcast":`频道`,"channel.kind.forum":`超级群/论坛`,"channel.kind.megagroup":`超级群`,"channel.kind.generic":`频道/群`,"messages.privateTitle":`私聊消息`,"messages.privateEyebrow":`私聊消息盒`,"messages.groupTitle":`群聊消息`,"messages.groupEyebrow":`超级群 / 频道消息`,"messages.selectPrivatePeers":`请先搜索并选择所属用户和对端用户`,"messages.selectChannel":`请先搜索并选择超级群或频道`,"messages.ownerUser":`所属用户`,"messages.peerUser":`对端用户`,"messages.beforeDatePlaceholder":`before_date 游标`,"messages.beforeIDPlaceholder":`before_msg_id 游标`,"messages.limitPlaceholder":`条数 <= 100`,"messages.searchMessages":`查询消息`,"messages.nextPage":`下一页`,"messages.currentPage":`当前页消息`,"messages.deleted":`已删除`,"messages.outgoing":`发出消息`,"messages.incoming":`收到`,"messages.ownerPeer":`所属 / 对端`,"messages.deleteSelected":`删除指定消息`,"messages.idsPlaceholder":`消息 ID,逗号分隔`,"messages.revoke":`同步撤回`,"messages.previewDelete":`预演删除`,"messages.clearHistory":`清空私聊历史`,"messages.maxIDPlaceholder":`max_id 截止消息`,"messages.maxBatchesPlaceholder":`max_batches 批次数`,"messages.justClear":`仅清本侧`,"messages.previewClearHistory":`预演清历史`,"messages.direction":`方向`,"messages.body":`正文`,"messages.privateDetailTitle":`消息 #{id}`,"messages.detailEyebrow":`消息详情`,"messages.backPrivate":`返回私聊消息`,"messages.backGroup":`返回群聊消息`,"messages.ownerPeerTitle":`所属 {owner} · 对端 {peer}`,"messages.senderSubtitle":`发送方 {sender} · {date}`,"messages.boxID":`消息盒 ID`,"messages.privateMessageID":`私聊消息 ID`,"messages.messageSender":`发送方`,"messages.messageBox":`消息盒`,"messages.dialogRow":`会话行`,"messages.privateRow":`私聊消息行`,"messages.channelMessageRow":`消息行`,"messages.channelRow":`频道行`,"messages.userUpdateEvents":`更新事件`,"messages.channelUpdateEvents":`频道更新事件`,"messages.eventJson":`事件 JSON`,"messages.dispatchOutbox":`分发队列`,"messages.messageBoxesSnapshot":`message_boxes 只读快照`,"messages.dialogSnapshot":`dialogs 只读快照`,"messages.privateSnapshot":`private_messages 只读快照`,"messages.channelMessagesSnapshot":`channel_messages 只读快照`,"messages.channelSnapshot":`channels 只读快照`,"messages.userEventsSource":`durable user_update_events`,"messages.channelEventsSource":`durable channel_update_events`,"messages.outboxSource":`在线/离线 dispatch_outbox`,"messages.attempts":`尝试`,"messages.deleteThis":`删除此消息`,"messages.groupDetailTitle":`群聊消息 #{id}`,"messages.channelGroupTitle":`频道/群 {id}`,"messages.mediaCount":`有媒体`,"messages.channelPosts":`频道帖子`,"messages.channelGroup":`频道 / 群`,"messages.pinned":`置顶`,"messages.channelPost":`频道帖子`,"messages.msgIDsInvalid":`消息 ID 无效`,"auth.device":`设备`,"auth.platform":`平台`,"auth.ip":`IP`,"auth.lastActive":`最近活跃`,"auth.revokeCurrent":`撤销当前`,"auth.keepCurrent":`保留当前`,"auth.revokeAll":`撤销全部设备`,"picker.userPlaceholder":`搜索 user_id / phone / username`,"picker.channelPlaceholder":`搜索 channel_id / username / title`,"picker.verified":`认证`,"picker.regular":`普通`,"action.reasonRequired":`请填写操作原因`,"action.flow":`操作流程`,"action.close":`关闭`,"action.stepReason":`填写原因`,"action.stepDryRun":`预演检查`,"action.stepConfirm":`确认执行`,"action.reason":`操作原因`,"action.reasonPlaceholder":`说明本次操作原因`,"action.requestPreview":`请求预览`,"action.result":`操作结果`,"action.commandID":`命令 ID`,"action.status":`状态`,"action.dryRun":`预演`,"action.runAgain":`重新预演`,"action.runDry":`先预演`,"action.confirm":`确认执行`,"audit.id":`ID`,"audit.commandID":`命令 ID`,"audit.action":`动作`,"audit.actor":`操作者`,"audit.status":`状态`,"audit.dryRun":`预演`,"audit.reason":`原因`,"audit.time":`时间`}},Ae=(0,g.createContext)(null);function je({children:e}){let[t,n]=(0,g.useState)(()=>Pe());(0,g.useEffect)(()=>{try{localStorage.setItem(Oe,t)}catch{}document.documentElement.lang=t===`zh`?`zh-CN`:`en`,document.documentElement.dir=`ltr`,document.documentElement.setAttribute(`translate`,`no`),document.body.classList.add(`notranslate`),document.title=Ne(t,`app.title`)},[t]);let r=(0,g.useMemo)(()=>({lang:t,setLang:n,t:(e,n)=>Ne(t,e,n)}),[t]);return(0,D.jsx)(Ae.Provider,{value:r,children:e})}function O(){let e=(0,g.useContext)(Ae);if(!e)throw Error(`useI18n must be used inside I18nProvider`);return e}function Me(){let{lang:e,setLang:t,t:n}=O();return(0,D.jsx)(`div`,{className:`language-switch`,role:`group`,"aria-label":`Language`,children:[`en`,`zh`].map(r=>(0,D.jsx)(`button`,{className:e===r?`active`:``,type:`button`,"aria-pressed":e===r,onClick:()=>t(r),children:n(`language.${r}`)},r))})}function Ne(e,t,n){let r=ke[e][t]??ke.en[t]??t;return n?r.replace(/\{(\w+)\}/g,(e,t)=>String(n[t]??``)):r}function Pe(){try{let e=Fe(new URLSearchParams(window.location.search).get(`lang`));if(e)return e}catch{}try{let e=Fe(localStorage.getItem(Oe));if(e)return e}catch{}let e=navigator.languages?.length?navigator.languages:[navigator.language];for(let t of e){let e=Fe(t);if(e)return e}return`en`}function Fe(e){if(!e)return null;let t=e.trim().toLowerCase().replace(`_`,`-`);return t===`zh`||t.startsWith(`zh-`)?`zh`:t===`en`||t.startsWith(`en-`)?`en`:null}function Ie(){return{href:`${window.location.pathname}${window.location.search}`,path:window.location.pathname,search:new URLSearchParams(window.location.search)}}function Le(e,t){return e.startsWith(`/accounts`)?t(`route.accounts`):e.startsWith(`/channels`)?t(`route.channels`):e.startsWith(`/messages`)?t(`route.messages`):t(`route.dashboard`)}function Re(e,t){return e.startsWith(`/accounts`)?t(`route.accountsSubtitle`):e.startsWith(`/channels`)?t(`route.channelsSubtitle`):e.startsWith(`/messages`)?t(`route.messagesSubtitle`):t(`route.dashboardSubtitle`)}function ze({href:e,navigate:t,className:n,children:r}){return(0,D.jsx)(`a`,{className:n,href:e,onClick:n=>{n.preventDefault(),t(e)},children:r})}function Be(){let{t:e}=O();return(0,D.jsxs)(`div`,{className:`boot-screen`,children:[(0,D.jsxs)(`div`,{className:`brand compact brand-elevated`,children:[(0,D.jsx)(`span`,{className:`brand-mark`,children:`T`}),(0,D.jsxs)(`span`,{children:[(0,D.jsx)(`strong`,{children:`telesrv`}),(0,D.jsx)(`small`,{children:e(`app.adminConsole`)})]})]}),(0,D.jsx)(`div`,{className:`loader-bar`})]})}function Ve({actor:e,route:t,navigate:n,onLogout:r,children:i}){let{t:a}=O(),o=t.path.startsWith(`/messages`),[s,c]=(0,g.useState)(o);(0,g.useEffect)(()=>{o&&c(!0)},[o]);async function l(){await x.logout().catch(()=>void 0),r()}return(0,D.jsxs)(`div`,{className:`shell`,children:[(0,D.jsxs)(`aside`,{className:`sidebar`,children:[(0,D.jsxs)(ze,{className:`brand`,href:`/`,navigate:n,children:[(0,D.jsx)(`span`,{className:`brand-mark`,children:`T`}),(0,D.jsxs)(`span`,{children:[(0,D.jsx)(`strong`,{children:`telesrv`}),(0,D.jsx)(`small`,{children:a(`app.adminConsole`)})]})]}),(0,D.jsx)(`div`,{className:`sidebar-label`,children:a(`layout.navigation`)}),(0,D.jsxs)(`nav`,{className:`nav-list`,"aria-label":a(`layout.primaryNav`),children:[(0,D.jsx)(He,{icon:(0,D.jsx)(he,{size:16}),href:`/`,route:t,navigate:n,children:a(`layout.dashboard`)}),(0,D.jsx)(He,{icon:(0,D.jsx)(Te,{size:16}),href:`/accounts`,route:t,navigate:n,children:a(`layout.accounts`)}),(0,D.jsx)(He,{icon:(0,D.jsx)(Se,{size:16}),href:`/channels`,route:t,navigate:n,children:a(`layout.channels`)}),(0,D.jsxs)(`div`,{className:`nav-section ${o?`active`:``} ${s?`open`:``}`,children:[(0,D.jsxs)(`button`,{className:`nav-section-toggle`,type:`button`,"aria-expanded":s,onClick:()=>c(e=>!e),children:[(0,D.jsx)(_e,{size:16}),(0,D.jsx)(`span`,{children:a(`layout.messages`)}),(0,D.jsx)(le,{className:`nav-section-chevron`,size:15})]}),s&&(0,D.jsxs)(`div`,{className:`nav-children`,children:[(0,D.jsx)(He,{href:`/messages/private`,route:t,navigate:n,activeWhen:e=>e===`/messages`||e===`/messages/detail`||e.startsWith(`/messages/private`),children:a(`layout.privateMessages`)}),(0,D.jsx)(He,{href:`/messages/groups`,route:t,navigate:n,activeWhen:e=>e.startsWith(`/messages/groups`),children:a(`layout.groupMessages`)})]})]})]}),(0,D.jsxs)(`div`,{className:`sidebar-status`,children:[(0,D.jsx)(`div`,{className:`sidebar-label`,children:a(`layout.runtime`)}),(0,D.jsxs)(`div`,{className:`runtime-row`,children:[(0,D.jsx)(xe,{size:14}),(0,D.jsx)(`span`,{children:a(`layout.adminBackend`)}),(0,D.jsx)(`strong`,{children:a(`layout.ready`)})]}),(0,D.jsxs)(`div`,{className:`runtime-row`,children:[(0,D.jsx)(fe,{size:14}),(0,D.jsx)(`span`,{children:a(`layout.pgRead`)}),(0,D.jsx)(`strong`,{children:a(`layout.readOnly`)})]}),(0,D.jsxs)(`div`,{className:`runtime-row`,children:[(0,D.jsx)(Ce,{size:14}),(0,D.jsx)(`span`,{children:a(`layout.writeOps`)}),(0,D.jsx)(`strong`,{children:a(`layout.dryRun`)})]})]})]}),(0,D.jsxs)(`div`,{className:`workspace`,children:[(0,D.jsxs)(`header`,{className:`topbar`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`eyebrow`,children:Re(t.path,a)}),(0,D.jsx)(`h1`,{children:Le(t.path,a)})]}),(0,D.jsxs)(`div`,{className:`topbar-actions`,children:[(0,D.jsx)(Me,{}),(0,D.jsx)(`span`,{className:`actor-pill`,children:a(`layout.actor`,{actor:e})}),(0,D.jsxs)(`button`,{className:`btn ghost icon-text`,type:`button`,onClick:l,title:a(`layout.logout`),children:[(0,D.jsx)(ge,{size:16}),` `,a(`layout.logout`)]})]})]}),(0,D.jsx)(`main`,{className:`content`,children:i})]})]})}function He({href:e,route:t,navigate:n,icon:r,children:i,activeWhen:a}){return(0,D.jsxs)(ze,{className:`nav-item ${(a?a(t.path):e===`/`?t.path===`/`:t.path.startsWith(e))?`active`:``}`,href:e,navigate:n,children:[r??(0,D.jsx)(`span`,{"aria-hidden":`true`,className:`nav-dot`}),(0,D.jsx)(`span`,{children:i})]})}function Ue(e){let t=e.trim();return!t||t.startsWith(`+`)?t:/^\d+$/.test(t)?`+${t}`:t}function We(e){let t=e.trim();return t?t.startsWith(`@`)?t:`@${t}`:``}function Ge(e){return`${e.FirstName||``} ${e.LastName||``}`.trim()||`-`}function Ke(e,t){let n=t??(e=>({"channel.kind.broadcast":`Channel`,"channel.kind.forum":`Supergroup / Forum`,"channel.kind.megagroup":`Supergroup`,"channel.kind.generic":`Channel / Group`})[e]??e);return e.Broadcast&&!e.Megagroup?n(`channel.kind.broadcast`):e.Megagroup&&e.Forum?n(`channel.kind.forum`):e.Megagroup?n(`channel.kind.megagroup`):n(`channel.kind.generic`)}function qe(e){if(!e||e.startsWith(`0001-`))return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString()}function Je(e){if(!e||e<=0)return``;let t=new Date(e*1e3);return Number.isNaN(t.getTime())?``:t.toLocaleString()}function Ye(e){if(!e.trim())return 0;let t=Number.parseInt(e,10);return Number.isFinite(t)?t:0}function Xe(e,t=`msg ids invalid`){let n=e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean).map(e=>Number.parseInt(e,10));if(n.length===0||n.some(e=>!Number.isFinite(e)||e<=0))throw Error(t);return n}function Ze({title:e,eyebrow:t,children:n,actions:r}){return(0,D.jsxs)(`div`,{className:`page-frame`,children:[(0,D.jsxs)(`div`,{className:`page-title-row`,children:[(0,D.jsxs)(`div`,{children:[t&&(0,D.jsx)(`div`,{className:`eyebrow`,children:t}),(0,D.jsx)(`h2`,{children:e})]}),r&&(0,D.jsx)(`div`,{className:`page-actions`,children:r})]}),n]})}function Qe({children:e}){return(0,D.jsx)(`div`,{className:`query-panel`,children:e})}function $e({main:e,side:t}){return(0,D.jsxs)(`div`,{className:`split-layout`,children:[(0,D.jsx)(`div`,{className:`split-main`,children:e}),(0,D.jsx)(`aside`,{className:`split-side`,children:t})]})}function et({title:e,text:t,action:n}){return(0,D.jsxs)(`div`,{className:`section-head`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h2`,{children:e}),t&&(0,D.jsx)(`p`,{children:t})]}),n&&(0,D.jsx)(`div`,{className:`section-action`,children:n})]})}function tt({children:e}){return(0,D.jsxs)(`div`,{className:`alert`,children:[(0,D.jsx)(re,{size:16}),` `,(0,D.jsx)(`span`,{children:e})]})}function k({children:e,tone:t=`neutral`}){return(0,D.jsx)(`span`,{className:`badge ${t}`,children:e})}function nt({label:e,value:t,tone:n}){return(0,D.jsxs)(`div`,{className:`status-item ${n}`,children:[(0,D.jsx)(`span`,{children:e}),(0,D.jsx)(`strong`,{children:t})]})}function A({label:e,value:t,tone:n=`neutral`,mono:r=!1}){return(0,D.jsxs)(`div`,{className:`metric ${n}`,children:[(0,D.jsx)(`span`,{children:e}),(0,D.jsx)(`strong`,{className:r?`mono`:``,children:t})]})}function j({label:e,value:t,mono:n=!1}){return(0,D.jsxs)(`div`,{className:`summary-item`,children:[(0,D.jsx)(`span`,{children:e}),(0,D.jsx)(`strong`,{className:n?`mono`:``,children:t})]})}function rt({rows:e}){let{t}=O();return(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:t(`audit.id`)}),(0,D.jsx)(`th`,{children:t(`audit.commandID`)}),(0,D.jsx)(`th`,{children:t(`audit.action`)}),(0,D.jsx)(`th`,{children:t(`audit.actor`)}),(0,D.jsx)(`th`,{children:t(`audit.status`)}),(0,D.jsx)(`th`,{children:t(`audit.dryRun`)}),(0,D.jsx)(`th`,{children:t(`audit.reason`)}),(0,D.jsx)(`th`,{children:t(`audit.time`)})]})}),(0,D.jsxs)(`tbody`,{children:[e.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{children:e.ID}),(0,D.jsx)(`td`,{className:`mono`,children:e.CommandID}),(0,D.jsx)(`td`,{children:e.Action}),(0,D.jsx)(`td`,{children:e.Actor}),(0,D.jsx)(`td`,{children:e.Status}),(0,D.jsx)(`td`,{children:e.DryRun?t(`common.yes`):t(`common.no`)}),(0,D.jsx)(`td`,{className:`truncate`,children:e.Reason}),(0,D.jsx)(`td`,{children:qe(e.CreatedAt)})]},e.ID)),e.length===0&&(0,D.jsx)(it,{colSpan:8})]})]})})}function it({colSpan:e}){let{t}=O();return(0,D.jsx)(`tr`,{children:(0,D.jsx)(`td`,{colSpan:e,className:`empty-cell`,children:t(`common.noResults`)})})}function at({label:e}){return(0,D.jsx)(`section`,{className:`surface`,children:(0,D.jsx)(`div`,{className:`loading-line`,children:e})})}function ot({value:e}){return(0,D.jsx)(`pre`,{className:`json-block`,children:e||`{}`})}function st({onLogin:e}){let{t}=O(),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1);async function c(t){t.preventDefault(),s(!0),a(``);try{e((await x.login(n)).actor)}catch(e){a(b(e))}finally{s(!1)}}return(0,D.jsx)(`main`,{className:`login-page`,children:(0,D.jsxs)(`section`,{className:`login-panel`,children:[(0,D.jsxs)(`div`,{className:`login-head`,children:[(0,D.jsxs)(`div`,{className:`brand brand-elevated`,children:[(0,D.jsx)(`span`,{className:`brand-mark`,children:`T`}),(0,D.jsxs)(`span`,{children:[(0,D.jsx)(`strong`,{children:`telesrv`}),(0,D.jsx)(`small`,{children:t(`app.adminConsole`)})]})]}),(0,D.jsxs)(`div`,{className:`login-head-actions`,children:[(0,D.jsx)(Me,{}),(0,D.jsx)(`span`,{className:`login-chip`,children:t(`app.localAccess`)})]})]}),(0,D.jsxs)(`div`,{className:`login-copy`,children:[(0,D.jsx)(`h1`,{children:t(`login.heading`)}),(0,D.jsx)(`p`,{children:t(`login.body`)})]}),i&&(0,D.jsx)(tt,{children:i}),(0,D.jsxs)(`form`,{className:`form-stack`,onSubmit:c,children:[(0,D.jsxs)(`label`,{children:[(0,D.jsx)(`span`,{children:t(`login.secret`)}),(0,D.jsx)(`input`,{autoFocus:!0,type:`password`,value:n,autoComplete:`current-password`,onChange:e=>r(e.target.value)})]}),(0,D.jsx)(`button`,{className:`btn primary full`,type:`submit`,disabled:o,children:t(o?`login.submitting`:`login.submit`)})]})]})})}var ct=m();function lt({label:e,path:t,payload:n,icon:r,compact:i=!1,tone:a=`danger`,onDone:o}){let{t:s}=O(),[c,l]=(0,g.useState)(!1),[u,d]=(0,g.useState)(``),[f,p]=(0,g.useState)(null),[m,h]=(0,g.useState)(``),[_,v]=(0,g.useState)(!1);function y(){d(``),p(null),h(``)}async function ee(e){if(!u.trim()){h(s(`action.reasonRequired`));return}v(!0),h(``);try{let r={...n(),reason:u,confirm:e};p(await x.action(t,r)),e&&o?.()}catch(e){h(b(e))}finally{v(!1)}}let S=f?.dry_run&&!f.error,te=`btn ${a===`danger`?`danger`:a===`warn`?`warn`:``} ${i?`compact-btn`:``}`,C=(0,g.useMemo)(()=>{try{return n()}catch(e){return{payload_error:b(e)}}},[c,n]);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`button`,{className:te,type:`button`,onClick:()=>{y(),l(!0)},children:[r,e]}),c&&(0,ct.createPortal)((0,D.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,D.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":e,children:[(0,D.jsxs)(`div`,{className:`modal-head`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`eyebrow`,children:s(`action.flow`)}),(0,D.jsx)(`h2`,{children:e})]}),(0,D.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:()=>l(!1),"aria-label":s(`action.close`),children:(0,D.jsx)(Ee,{size:15})})]}),(0,D.jsxs)(`div`,{className:`command-body`,children:[(0,D.jsxs)(`div`,{className:`command-steps`,children:[(0,D.jsxs)(`div`,{className:`command-step ${u.trim()?`done`:`active`}`,children:[(0,D.jsx)(`span`,{children:`1`}),(0,D.jsx)(`strong`,{children:s(`action.stepReason`)})]}),(0,D.jsxs)(`div`,{className:`command-step ${f?.dry_run?`done`:u.trim()?`active`:``}`,children:[(0,D.jsx)(`span`,{children:`2`}),(0,D.jsx)(`strong`,{children:s(`action.stepDryRun`)})]}),(0,D.jsxs)(`div`,{className:`command-step ${f&&!f.dry_run&&!f.error?`done`:S?`active`:``}`,children:[(0,D.jsx)(`span`,{children:`3`}),(0,D.jsx)(`strong`,{children:s(`action.stepConfirm`)})]})]}),(0,D.jsxs)(`label`,{className:`form-field`,children:[(0,D.jsx)(`span`,{children:s(`action.reason`)}),(0,D.jsx)(`textarea`,{value:u,onChange:e=>d(e.target.value),rows:3,placeholder:s(`action.reasonPlaceholder`)})]}),(0,D.jsxs)(`div`,{className:`command-preview`,children:[(0,D.jsxs)(`div`,{className:`preview-head`,children:[(0,D.jsx)(E,{size:14}),` `,s(`action.requestPreview`)]}),(0,D.jsx)(ot,{value:JSON.stringify(C,null,2)})]}),m&&(0,D.jsx)(tt,{children:m}),f&&(0,D.jsxs)(`div`,{className:`result-box`,children:[(0,D.jsxs)(`div`,{className:`result-title`,children:[f.error?(0,D.jsx)(re,{size:16}):(0,D.jsx)(ie,{size:16}),(0,D.jsx)(`strong`,{children:f.message||f.error||s(`action.result`)})]}),(0,D.jsxs)(`div`,{className:`result-line`,children:[(0,D.jsx)(`span`,{children:s(`action.commandID`)}),(0,D.jsx)(`strong`,{children:f.command_id})]}),(0,D.jsxs)(`div`,{className:`result-line`,children:[(0,D.jsx)(`span`,{children:s(`action.status`)}),(0,D.jsx)(`strong`,{children:f.status})]}),(0,D.jsxs)(`div`,{className:`result-line`,children:[(0,D.jsx)(`span`,{children:s(`action.dryRun`)}),(0,D.jsx)(`strong`,{children:f.dry_run?s(`common.yes`):s(`common.no`)})]}),(0,D.jsx)(`div`,{className:`result-message`,children:f.message||f.error}),f.details&&(0,D.jsx)(ot,{value:JSON.stringify(f.details,null,2)})]})]}),(0,D.jsxs)(`div`,{className:`modal-actions`,children:[(0,D.jsx)(`button`,{className:`btn`,type:`button`,onClick:()=>l(!1),children:s(`common.close`)}),(0,D.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>ee(!1),disabled:_,children:[_?(0,D.jsx)(ae,{size:15,className:`spin`}):(0,D.jsx)(ve,{size:15}),s(f?`action.runAgain`:`action.runDry`)]}),(0,D.jsxs)(`button`,{className:`btn danger icon-text`,type:`button`,onClick:()=>ee(!0),disabled:_||!S,children:[(0,D.jsx)(ie,{size:15}),s(`action.confirm`)]})]})]})}),document.body)]})}function ut({rows:e,userID:t,onDone:n}){let{t:r}=O(),[i,a]=(0,g.useState)(()=>new Set);(0,g.useEffect)(()=>{a(new Set)},[t]);let o=(0,g.useMemo)(()=>e.filter(e=>!i.has(e.Hash)),[e,i]);function s(e){a(t=>e(t)),n()}return(0,D.jsxs)(`div`,{className:`authorization-block`,children:[(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table authorization-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:r(`auth.device`)}),(0,D.jsx)(`th`,{children:r(`auth.platform`)}),(0,D.jsx)(`th`,{children:r(`auth.ip`)}),(0,D.jsx)(`th`,{children:r(`auth.lastActive`)}),(0,D.jsx)(`th`,{className:`device-actions-head`,children:r(`common.actions`)})]})}),(0,D.jsxs)(`tbody`,{children:[o.map(n=>(0,D.jsxs)(`tr`,{children:[(0,D.jsxs)(`td`,{className:`device-text`,children:[n.DeviceModel,` `,n.SystemVersion]}),(0,D.jsxs)(`td`,{className:`device-text`,children:[n.Platform,` `,n.AppVersion]}),(0,D.jsx)(`td`,{children:n.IP}),(0,D.jsx)(`td`,{children:qe(n.ActiveAt)}),(0,D.jsx)(`td`,{className:`device-actions-cell`,children:(0,D.jsxs)(`div`,{className:`device-actions`,children:[(0,D.jsx)(lt,{label:r(`auth.revokeCurrent`),icon:(0,D.jsx)(ge,{size:13}),compact:!0,path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,hash:n.Hash}),onDone:()=>s(e=>new Set([...e,n.Hash]))}),(0,D.jsx)(lt,{label:r(`auth.keepCurrent`),icon:(0,D.jsx)(Se,{size:13}),compact:!0,path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,keep_hash:n.Hash}),onDone:()=>s(()=>new Set(e.filter(e=>e.Hash!==n.Hash).map(e=>e.Hash)))})]})})]},n.Hash)),o.length===0&&(0,D.jsx)(it,{colSpan:5})]})]})}),(0,D.jsx)(`div`,{className:`danger-zone`,children:(0,D.jsx)(lt,{label:r(`auth.revokeAll`),icon:(0,D.jsx)(ce,{size:15}),path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,revoke_all:!0}),onDone:()=>s(()=>new Set(e.map(e=>e.Hash)))})})]})}function dt({id:e,navigate:t}){let{t:n}=O(),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(`1`);async function d(){c(!0),o(``);try{i(await x.account(e))}catch(e){o(b(e))}finally{c(!1)}}if((0,g.useEffect)(()=>{d()},[e]),a)return(0,D.jsx)(tt,{children:a});if(!r)return(0,D.jsx)(at,{label:n(s?`account.loadingDetail`:`account.waitingData`)});let f=r.Account;return(0,D.jsx)(Ze,{title:n(`account.detailTitle`,{id:f.ID}),eyebrow:n(`account.profile`),actions:(0,D.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/accounts`),children:[(0,D.jsx)(se,{size:15}),` `,n(`common.backToList`)]}),children:(0,D.jsx)($e,{main:(0,D.jsxs)(`div`,{className:`stacked-sections`,children:[(0,D.jsxs)(`section`,{className:`entity-head`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`entity-title`,children:Ge(f)}),(0,D.jsxs)(`div`,{className:`entity-subtitle`,children:[We(f.Username)||n(`account.noUsername`),` · `,Ue(f.Phone)||n(`account.noPhone`)]})]}),(0,D.jsxs)(`div`,{className:`entity-badges`,children:[f.PremiumUntil>0?(0,D.jsx)(k,{tone:`good`,children:n(`account.premium`)}):(0,D.jsx)(k,{children:n(`account.notPremium`)}),r.Verified?(0,D.jsx)(k,{tone:`good`,children:n(`common.verified`)}):(0,D.jsx)(k,{children:n(`account.notVerified`)}),f.Frozen?(0,D.jsx)(k,{tone:`danger`,children:n(`account.sendFrozen`)}):(0,D.jsx)(k,{children:n(`account.sendNormal`)})]})]}),(0,D.jsxs)(`div`,{className:`summary-grid`,children:[(0,D.jsx)(j,{label:n(`account.userID`),value:String(f.ID),mono:!0}),(0,D.jsx)(j,{label:n(`account.lastActive`),value:Je(r.LastSeenAt)||`-`}),(0,D.jsx)(j,{label:n(`account.premiumUntil`),value:f.PremiumUntil>0?Je(f.PremiumUntil):n(`common.none`)}),(0,D.jsx)(j,{label:n(`common.updatedAt`),value:qe(f.UpdatedAt)||`-`}),(0,D.jsx)(j,{label:n(`account.activeSessions`),value:String(r.Authorizations.length)}),(0,D.jsx)(j,{label:n(`account.accountFlags`),value:`support=${r.Support} bot=${r.Bot}`}),(0,D.jsx)(j,{label:n(`account.restriction`),value:r.HasRestriction?r.Restriction.Reason||n(`account.restricted`):n(`common.none`)}),(0,D.jsx)(j,{label:n(`account.createdAt`),value:qe(f.CreatedAt)||`-`})]}),r.About&&(0,D.jsx)(`p`,{className:`about-text`,children:r.About}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:n(`account.authorizationsTitle`),text:n(`account.authorizationsCount`,{count:r.Authorizations.length})}),(0,D.jsx)(ut,{rows:r.Authorizations,userID:f.ID,onDone:d})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:n(`account.recentAdminOps`),text:n(`account.recent30Audit`)}),(0,D.jsx)(rt,{rows:r.AuditLogs})]})]}),side:(0,D.jsxs)(`section`,{className:`action-dock`,children:[(0,D.jsx)(`div`,{className:`dock-title`,children:n(`account.actionDock`)}),(0,D.jsx)(lt,{label:f.Frozen?n(`account.unfreezeSend`):n(`account.freezeSend`),icon:(0,D.jsx)(re,{size:15}),path:`/api/actions/freeze-send`,payload:()=>({user_id:f.ID,frozen:!f.Frozen}),onDone:d}),(0,D.jsxs)(`label`,{className:`duration-field`,children:[(0,D.jsx)(`span`,{children:n(`account.premiumMonths`)}),(0,D.jsx)(`input`,{"aria-label":n(`account.premiumMonthsAria`),value:l,onChange:e=>u(e.target.value),type:`number`,min:`1`,max:`120`})]}),(0,D.jsxs)(`div`,{className:`action-stack`,children:[(0,D.jsx)(lt,{label:n(`account.setPremium`),icon:(0,D.jsx)(oe,{size:15}),tone:`warn`,path:`/api/actions/grant-premium`,payload:()=>({user_id:f.ID,months:Ye(l)}),onDone:d}),(0,D.jsx)(lt,{label:n(`account.clearPremium`),icon:(0,D.jsx)(oe,{size:15}),tone:`warn`,path:`/api/actions/grant-premium`,payload:()=>({user_id:f.ID,months:0}),onDone:d}),(0,D.jsx)(lt,{label:r.Verified?n(`account.clearVerified`):n(`account.setVerified`),icon:(0,D.jsx)(ne,{size:15}),tone:`warn`,path:`/api/actions/set-verified`,payload:()=>({user_id:f.ID,verified:!r.Verified}),onDone:d})]})]})})})}function ft(e){return e.reduce((e,t)=>(e.devices+=t.DeviceCount,t.PremiumUntil>0&&(e.premium+=1),t.Frozen&&(e.frozen+=1),e),{devices:0,premium:0,frozen:0})}function pt(e){return e.reduce((e,t)=>(t.Megagroup&&(e.megagroups+=1),t.Broadcast&&(e.broadcasts+=1),t.Verified&&(e.verified+=1),e),{megagroups:0,broadcasts:0,verified:0})}function mt({navigate:e}){let{t}=O(),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(`50`),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)({beforeID:0,beforeActiveUS:0}),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(``);async function m(e=!1){d(!0),p(``);let t=new URLSearchParams({limit:i});n.trim()?t.set(`q`,n.trim()):e&&(t.set(`before_id`,String(c.beforeID)),t.set(`before_active_us`,String(c.beforeActiveUS)));try{let e=await x.accounts(t);s(e),l({beforeID:e.next_before_id,beforeActiveUS:e.next_before_active_us})}catch(e){p(b(e))}finally{d(!1)}}(0,g.useEffect)(()=>{m(!1)},[]);let h=ft(o?.rows??[]);return(0,D.jsxs)(Ze,{title:t(`account.pageTitle`),eyebrow:o?.listing===!1?t(`account.queryResults`):t(`account.recentActive`),actions:(0,D.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>m(!1),disabled:u,children:[(0,D.jsx)(ye,{size:15}),` `,t(`common.refresh`)]}),children:[f&&(0,D.jsx)(tt,{children:f}),(0,D.jsxs)(`div`,{className:`metric-row`,children:[(0,D.jsx)(A,{label:t(`account.currentPage`),value:String(o?.rows.length??0)}),(0,D.jsx)(A,{label:t(`account.onlineDevices`),value:String(h.devices)}),(0,D.jsx)(A,{label:t(`account.premium`),value:String(h.premium),tone:`good`}),(0,D.jsx)(A,{label:t(`account.frozen`),value:String(h.frozen),tone:h.frozen>0?`danger`:`neutral`})]}),(0,D.jsx)(Qe,{children:(0,D.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),m(!1)},children:[(0,D.jsxs)(`label`,{className:`searchbox`,children:[(0,D.jsx)(be,{size:15}),(0,D.jsx)(`input`,{value:n,onChange:e=>r(e.target.value),placeholder:t(`account.searchPlaceholder`)})]}),(0,D.jsxs)(`label`,{className:`field-inline`,children:[(0,D.jsx)(`span`,{children:t(`common.limit`)}),(0,D.jsx)(`input`,{className:`small-input`,value:i,onChange:e=>a(e.target.value),type:`number`,min:`1`,max:`100`})]}),(0,D.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:u,children:[u?(0,D.jsx)(ae,{size:15,className:`spin`}):(0,D.jsx)(be,{size:15}),` `,t(`common.search`)]}),o?.listing&&o.has_more&&(0,D.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>m(!0),disabled:u,children:[(0,D.jsx)(ue,{size:15}),` `,t(`messages.nextPage`)]})]})}),(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:t(`account.userID`)}),(0,D.jsx)(`th`,{children:t(`account.phone`)}),(0,D.jsx)(`th`,{children:t(`common.username`)}),(0,D.jsx)(`th`,{children:t(`common.name`)}),(0,D.jsx)(`th`,{children:t(`common.device`)}),(0,D.jsx)(`th`,{children:t(`account.lastActive`)}),(0,D.jsx)(`th`,{children:t(`account.premium`)}),(0,D.jsx)(`th`,{children:t(`common.verified`)}),(0,D.jsx)(`th`,{children:t(`account.frozen`)}),(0,D.jsx)(`th`,{children:t(`common.updatedAt`)}),(0,D.jsx)(`th`,{})]})}),(0,D.jsxs)(`tbody`,{children:[o?.rows.map(n=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{className:`mono`,children:n.ID}),(0,D.jsx)(`td`,{children:Ue(n.Phone)}),(0,D.jsx)(`td`,{children:We(n.Username)}),(0,D.jsx)(`td`,{children:Ge(n)}),(0,D.jsx)(`td`,{children:n.DeviceCount}),(0,D.jsx)(`td`,{children:qe(n.LastActiveAt)}),(0,D.jsx)(`td`,{children:n.PremiumUntil>0?(0,D.jsxs)(k,{tone:`good`,children:[t(`account.premium`),` `,Je(n.PremiumUntil)]}):(0,D.jsx)(k,{children:t(`common.none`)})}),(0,D.jsx)(`td`,{children:n.Verified?(0,D.jsx)(k,{tone:`good`,children:t(`common.verified`)}):(0,D.jsx)(k,{children:t(`account.notVerified`)})}),(0,D.jsx)(`td`,{children:n.Frozen?(0,D.jsx)(k,{tone:`danger`,children:t(`account.frozen`)}):(0,D.jsx)(k,{children:t(`common.normal`)})}),(0,D.jsx)(`td`,{children:qe(n.UpdatedAt)}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/accounts/${n.ID}`),children:[t(`common.detail`),` `,(0,D.jsx)(ue,{size:14})]})})]},n.ID)),(!o||o.rows.length===0)&&(0,D.jsx)(it,{colSpan:11})]})]})})]})}function ht({id:e,navigate:t}){let{t:n}=O(),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``);async function s(){o(``);try{i(await x.channel(e))}catch(e){o(b(e))}}if((0,g.useEffect)(()=>{s()},[e]),a)return(0,D.jsx)(tt,{children:a});if(!r)return(0,D.jsx)(at,{label:n(`channel.loadingDetail`)});let c=r.Channel;return(0,D.jsx)(Ze,{title:`${Ke(c,n)} #${c.ID}`,eyebrow:n(`channel.detailProfile`),actions:(0,D.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/channels`),children:[(0,D.jsx)(se,{size:15}),` `,n(`common.backToList`)]}),children:(0,D.jsx)($e,{main:(0,D.jsxs)(`div`,{className:`stacked-sections`,children:[(0,D.jsxs)(`section`,{className:`entity-head`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`entity-title`,children:c.Title||`-`}),(0,D.jsxs)(`div`,{className:`entity-subtitle`,children:[We(c.Username)||n(`account.noUsername`),` · `,n(`channel.creator`,{id:c.CreatorUserID})]})]}),(0,D.jsxs)(`div`,{className:`entity-badges`,children:[(0,D.jsx)(k,{children:Ke(c,n)}),c.Verified?(0,D.jsx)(k,{tone:`good`,children:n(`common.verified`)}):(0,D.jsx)(k,{children:n(`account.notVerified`)}),c.Deleted?(0,D.jsx)(k,{tone:`danger`,children:n(`common.deleted`)}):(0,D.jsx)(k,{children:n(`common.valid`)})]})]}),(0,D.jsxs)(`div`,{className:`summary-grid`,children:[(0,D.jsx)(j,{label:n(`channel.channelID`),value:String(c.ID),mono:!0}),(0,D.jsx)(j,{label:`access_hash`,value:String(c.AccessHash),mono:!0}),(0,D.jsx)(j,{label:n(`common.members`),value:`${c.ParticipantsCount} / ${n(`common.admins`)} ${c.AdminsCount}`}),(0,D.jsx)(j,{label:n(`channel.governance`),value:n(`channel.governanceValue`,{banned:c.BannedCount,kicked:c.KickedCount})}),(0,D.jsx)(j,{label:n(`channel.flags`),value:`broadcast=${c.Broadcast} megagroup=${c.Megagroup} forum=${c.Forum}`}),(0,D.jsx)(j,{label:`top / pinned / PTS`,value:`${c.TopMessageID} / ${c.PinnedMessageID} / ${c.PTS}`}),(0,D.jsx)(j,{label:n(`account.createdAt`),value:Je(c.Date)||`-`}),(0,D.jsx)(j,{label:n(`common.updatedAt`),value:qe(c.UpdatedAt)||`-`})]}),c.About&&(0,D.jsx)(`p`,{className:`about-text`,children:c.About}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:n(`account.recentAdminOps`),text:n(`account.recent30Audit`)}),(0,D.jsx)(rt,{rows:r.AuditLogs})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:n(`channel.rawRow`),text:n(`channel.rawRowText`)}),(0,D.jsx)(ot,{value:r.ChannelJSON})]})]}),side:(0,D.jsxs)(`section`,{className:`action-dock`,children:[(0,D.jsx)(`div`,{className:`dock-title`,children:n(`channel.actionDock`)}),(0,D.jsx)(lt,{label:c.Verified?n(`channel.clearVerified`):n(`channel.setVerified`),icon:(0,D.jsx)(ne,{size:15}),tone:`warn`,path:`/api/actions/set-channel-verified`,payload:()=>({channel_id:c.ID,verified:!c.Verified}),onDone:s})]})})})}function gt({navigate:e}){let{t}=O(),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(`50`),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)({beforeID:0,beforeUpdatedUS:0}),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(``);async function m(e=!1){d(!0),p(``);let t=new URLSearchParams({limit:i});n.trim()?t.set(`q`,n.trim()):e&&(t.set(`before_id`,String(c.beforeID)),t.set(`before_updated_us`,String(c.beforeUpdatedUS)));try{let e=await x.channels(t);s(e),l({beforeID:e.next_before_id,beforeUpdatedUS:e.next_before_updated_us})}catch(e){p(b(e))}finally{d(!1)}}(0,g.useEffect)(()=>{m(!1)},[]);let h=pt(o?.rows??[]);return(0,D.jsxs)(Ze,{title:t(`channel.pageTitle`),eyebrow:o?.listing===!1?t(`account.queryResults`):t(`channel.recentUpdated`),actions:(0,D.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>m(!1),disabled:u,children:[(0,D.jsx)(ye,{size:15}),` `,t(`common.refresh`)]}),children:[f&&(0,D.jsx)(tt,{children:f}),(0,D.jsxs)(`div`,{className:`metric-row`,children:[(0,D.jsx)(A,{label:t(`channel.currentPage`),value:String(o?.rows.length??0)}),(0,D.jsx)(A,{label:t(`channel.megagroups`),value:String(h.megagroups)}),(0,D.jsx)(A,{label:t(`channel.broadcasts`),value:String(h.broadcasts)}),(0,D.jsx)(A,{label:t(`channel.verifiedCount`),value:String(h.verified),tone:`good`})]}),(0,D.jsx)(Qe,{children:(0,D.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),m(!1)},children:[(0,D.jsxs)(`label`,{className:`searchbox`,children:[(0,D.jsx)(be,{size:15}),(0,D.jsx)(`input`,{value:n,onChange:e=>r(e.target.value),placeholder:t(`channel.searchPlaceholder`)})]}),(0,D.jsxs)(`label`,{className:`field-inline`,children:[(0,D.jsx)(`span`,{children:t(`common.limit`)}),(0,D.jsx)(`input`,{className:`small-input`,value:i,onChange:e=>a(e.target.value),type:`number`,min:`1`,max:`100`})]}),(0,D.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:u,children:[u?(0,D.jsx)(ae,{size:15,className:`spin`}):(0,D.jsx)(be,{size:15}),` `,t(`common.search`)]}),o?.listing&&o.has_more&&(0,D.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>m(!0),disabled:u,children:[(0,D.jsx)(ue,{size:15}),` `,t(`messages.nextPage`)]})]})}),(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:t(`channel.channelID`)}),(0,D.jsx)(`th`,{children:t(`channel.kind`)}),(0,D.jsx)(`th`,{children:t(`common.username`)}),(0,D.jsx)(`th`,{children:t(`channel.title`)}),(0,D.jsx)(`th`,{children:t(`common.members`)}),(0,D.jsx)(`th`,{children:t(`common.admins`)}),(0,D.jsx)(`th`,{children:`PTS`}),(0,D.jsx)(`th`,{children:t(`common.verified`)}),(0,D.jsx)(`th`,{children:t(`common.updatedAt`)}),(0,D.jsx)(`th`,{})]})}),(0,D.jsxs)(`tbody`,{children:[o?.rows.map(n=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{className:`mono`,children:n.ID}),(0,D.jsx)(`td`,{children:Ke(n,t)}),(0,D.jsx)(`td`,{children:We(n.Username)}),(0,D.jsx)(`td`,{children:n.Title}),(0,D.jsx)(`td`,{children:n.ParticipantsCount}),(0,D.jsx)(`td`,{children:n.AdminsCount}),(0,D.jsx)(`td`,{children:n.PTS}),(0,D.jsx)(`td`,{children:n.Verified?(0,D.jsx)(k,{tone:`good`,children:t(`common.verified`)}):(0,D.jsx)(k,{children:t(`account.notVerified`)})}),(0,D.jsx)(`td`,{children:qe(n.UpdatedAt)}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/channels/${n.ID}`),children:[t(`common.detail`),` `,(0,D.jsx)(ue,{size:14})]})})]},n.ID)),(!o||o.rows.length===0)&&(0,D.jsx)(it,{colSpan:10})]})]})})]})}function _t({navigate:e}){let{t}=O();return(0,D.jsxs)(`div`,{className:`dashboard-layout`,children:[(0,D.jsxs)(`section`,{className:`overview-band`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`eyebrow`,children:t(`dashboard.eyebrow`)}),(0,D.jsx)(`h2`,{children:t(`dashboard.title`)})]}),(0,D.jsxs)(`div`,{className:`overview-metrics`,children:[(0,D.jsx)(nt,{label:t(`dashboard.readPath`),value:t(`dashboard.readPathValue`),tone:`neutral`}),(0,D.jsx)(nt,{label:t(`dashboard.writePath`),value:`Admin API`,tone:`good`}),(0,D.jsx)(nt,{label:t(`dashboard.executionPolicy`),value:t(`dashboard.dryRunFirst`),tone:`warn`})]})]}),(0,D.jsxs)(`div`,{className:`command-grid`,children:[(0,D.jsx)(vt,{icon:(0,D.jsx)(Te,{}),title:t(`route.accounts`),text:t(`dashboard.accountsText`),href:`/accounts`,navigate:e}),(0,D.jsx)(vt,{icon:(0,D.jsx)(Se,{}),title:t(`route.channels`),text:t(`dashboard.channelsText`),href:`/channels`,navigate:e}),(0,D.jsx)(vt,{icon:(0,D.jsx)(_e,{}),title:t(`route.messages`),text:t(`dashboard.messagesText`),href:`/messages`,navigate:e})]}),(0,D.jsxs)(`section`,{className:`work-strip`,children:[(0,D.jsxs)(`div`,{className:`strip-item`,children:[(0,D.jsx)(ie,{size:16}),(0,D.jsx)(`span`,{children:t(`dashboard.strip.dryRun`)})]}),(0,D.jsxs)(`div`,{className:`strip-item`,children:[(0,D.jsx)(me,{size:16}),(0,D.jsx)(`span`,{children:t(`dashboard.strip.token`)})]}),(0,D.jsxs)(`div`,{className:`strip-item`,children:[(0,D.jsx)(de,{size:16}),(0,D.jsx)(`span`,{children:t(`dashboard.strip.pagination`)})]}),(0,D.jsxs)(`div`,{className:`strip-item`,children:[(0,D.jsx)(E,{size:16}),(0,D.jsx)(`span`,{children:t(`dashboard.strip.snapshot`)})]})]})]})}function vt({icon:e,title:t,text:n,href:r,navigate:i}){return(0,D.jsxs)(ze,{className:`launcher`,href:r,navigate:i,children:[(0,D.jsx)(`span`,{className:`launcher-icon`,children:e}),(0,D.jsxs)(`span`,{className:`launcher-copy`,children:[(0,D.jsx)(`strong`,{children:t}),(0,D.jsx)(`span`,{children:n})]}),(0,D.jsx)(ue,{size:16})]})}function yt({channelID:e,msgID:t,navigate:n}){let{t:r}=O(),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(``);async function c(){s(``);try{a(await x.groupMessage(e,t))}catch(e){s(b(e))}}if((0,g.useEffect)(()=>{c()},[e,t]),o)return(0,D.jsx)(tt,{children:o});if(!i)return(0,D.jsx)(at,{label:r(`common.loading`)});let l=i.Message;return(0,D.jsx)(Ze,{title:r(`messages.groupDetailTitle`,{id:l.ID}),eyebrow:r(`messages.detailEyebrow`),actions:(0,D.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>n(`/messages/groups`),children:[(0,D.jsx)(se,{size:15}),` `,r(`messages.backGroup`)]}),children:(0,D.jsxs)(`div`,{className:`stacked-sections`,children:[(0,D.jsxs)(`section`,{className:`entity-head`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`entity-title`,children:r(`messages.channelGroupTitle`,{id:l.ChannelID})}),(0,D.jsx)(`div`,{className:`entity-subtitle`,children:r(`messages.senderSubtitle`,{sender:l.SenderUserID,date:Je(l.Date)})})]}),(0,D.jsxs)(`div`,{className:`entity-badges`,children:[l.Deleted?(0,D.jsx)(k,{tone:`danger`,children:r(`common.deleted`)}):(0,D.jsx)(k,{children:r(`common.survived`)}),l.Pinned&&(0,D.jsx)(k,{tone:`warn`,children:r(`messages.pinned`)}),l.Post&&(0,D.jsx)(k,{children:r(`messages.channelPost`)}),(0,D.jsxs)(k,{children:[`pts `,l.PTS]})]})]}),(0,D.jsxs)(`div`,{className:`summary-grid`,children:[(0,D.jsx)(j,{label:r(`common.messageId`),value:String(l.ID),mono:!0}),(0,D.jsx)(j,{label:r(`messages.channelGroup`),value:String(l.ChannelID),mono:!0}),(0,D.jsx)(j,{label:`From Peer`,value:`${l.FromPeerType}:${l.FromPeerID}`,mono:!0}),(0,D.jsx)(j,{label:r(`common.views`),value:String(l.ViewsCount)})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.channelMessageRow`),text:r(`messages.channelMessagesSnapshot`)}),(0,D.jsx)(ot,{value:i.MessageJSON})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.channelRow`),text:r(`messages.channelSnapshot`)}),(0,D.jsx)(ot,{value:i.ChannelJSON})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.channelUpdateEvents`),text:r(`messages.channelEventsSource`)}),(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:`PTS`}),(0,D.jsx)(`th`,{children:r(`common.count`)}),(0,D.jsx)(`th`,{children:r(`common.type`)}),(0,D.jsx)(`th`,{children:r(`common.messageId`)}),(0,D.jsx)(`th`,{children:r(`common.sender`)}),(0,D.jsx)(`th`,{children:r(`common.time`)})]})}),(0,D.jsxs)(`tbody`,{children:[i.UpdateEvents.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{children:e.PTS}),(0,D.jsx)(`td`,{children:e.PTSCount}),(0,D.jsx)(`td`,{children:e.Type}),(0,D.jsx)(`td`,{children:e.MessageID}),(0,D.jsx)(`td`,{children:e.SenderUserID}),(0,D.jsx)(`td`,{children:Je(e.Date)})]},`${e.PTS}-${e.Type}-${e.MessageID}`)),i.UpdateEvents.length===0&&(0,D.jsx)(it,{colSpan:6})]})]})})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.eventJson`)}),(0,D.jsxs)(`div`,{className:`raw-grid`,children:[i.UpdateEvents.map(e=>(0,D.jsx)(ot,{value:e.JSON},`${e.PTS}-${e.Type}-json`)),i.UpdateEvents.length===0&&(0,D.jsx)(`div`,{className:`empty-panel`,children:r(`common.noResults`)})]})]})]})})}function bt({label:e,value:t,onChange:n}){let{t:r}=O(),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)([]),[c,l]=(0,g.useState)(!1),[u,d]=(0,g.useState)(``);async function f(){l(!0),d(``);let e=new URLSearchParams({limit:`20`});i.trim()&&e.set(`q`,i.trim());try{s((await x.accounts(e)).rows)}catch(e){d(b(e))}finally{l(!1)}}return(0,g.useEffect)(()=>{f()},[]),(0,D.jsxs)(`div`,{className:`entity-picker`,children:[(0,D.jsxs)(`div`,{className:`picker-head`,children:[(0,D.jsx)(`span`,{children:e}),t?(0,D.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(null),children:[(0,D.jsx)(Ee,{size:13}),` `,r(`common.clear`)]}):null]}),t?(0,D.jsxs)(`div`,{className:`selected-entity`,children:[(0,D.jsx)(T,{size:15}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:Ge(t)}),(0,D.jsx)(`span`,{className:`mono`,children:t.ID})]}),(0,D.jsx)(`span`,{children:We(t.Username)||Ue(t.Phone)||`-`})]}):null,(0,D.jsxs)(`div`,{className:`picker-search`,children:[(0,D.jsx)(be,{size:15}),(0,D.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),f())},placeholder:r(`picker.userPlaceholder`)}),(0,D.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:f,disabled:c,children:c?(0,D.jsx)(ae,{size:14,className:`spin`}):r(`common.search`)})]}),u&&(0,D.jsx)(`div`,{className:`picker-error`,children:u}),(0,D.jsxs)(`div`,{className:`picker-results`,children:[o.map(e=>(0,D.jsxs)(`button`,{className:`picker-row ${t?.ID===e.ID?`selected`:``}`,type:`button`,onClick:()=>n(e),children:[(0,D.jsx)(`span`,{className:`mono`,children:e.ID}),(0,D.jsx)(`strong`,{children:Ge(e)}),(0,D.jsx)(`span`,{children:We(e.Username)||Ue(e.Phone)||`-`}),e.Verified?(0,D.jsx)(k,{tone:`good`,children:r(`picker.verified`)}):(0,D.jsx)(k,{children:r(`picker.regular`)})]},e.ID)),o.length===0&&!c?(0,D.jsx)(`div`,{className:`picker-empty`,children:r(`common.noResults`)}):null]})]})}function xt({label:e,value:t,onChange:n}){let{t:r}=O(),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)([]),[c,l]=(0,g.useState)(!1),[u,d]=(0,g.useState)(``);async function f(){l(!0),d(``);let e=new URLSearchParams({limit:`20`});i.trim()&&e.set(`q`,i.trim());try{s((await x.channels(e)).rows)}catch(e){d(b(e))}finally{l(!1)}}return(0,g.useEffect)(()=>{f()},[]),(0,D.jsxs)(`div`,{className:`entity-picker`,children:[(0,D.jsxs)(`div`,{className:`picker-head`,children:[(0,D.jsx)(`span`,{children:e}),t?(0,D.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(null),children:[(0,D.jsx)(Ee,{size:13}),` `,r(`common.clear`)]}):null]}),t?(0,D.jsxs)(`div`,{className:`selected-entity`,children:[(0,D.jsx)(T,{size:15}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:t.Title||`-`}),(0,D.jsx)(`span`,{className:`mono`,children:t.ID})]}),(0,D.jsx)(`span`,{children:We(t.Username)||Ke(t,r)})]}):null,(0,D.jsxs)(`div`,{className:`picker-search`,children:[(0,D.jsx)(be,{size:15}),(0,D.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),f())},placeholder:r(`picker.channelPlaceholder`)}),(0,D.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:f,disabled:c,children:c?(0,D.jsx)(ae,{size:14,className:`spin`}):r(`common.search`)})]}),u&&(0,D.jsx)(`div`,{className:`picker-error`,children:u}),(0,D.jsxs)(`div`,{className:`picker-results`,children:[o.map(e=>(0,D.jsxs)(`button`,{className:`picker-row ${t?.ID===e.ID?`selected`:``}`,type:`button`,onClick:()=>n(e),children:[(0,D.jsx)(`span`,{className:`mono`,children:e.ID}),(0,D.jsx)(`strong`,{children:e.Title||`-`}),(0,D.jsx)(`span`,{children:We(e.Username)||Ke(e,r)}),e.Verified?(0,D.jsx)(k,{tone:`good`,children:r(`picker.verified`)}):(0,D.jsx)(k,{children:Ke(e,r)})]},e.ID)),o.length===0&&!c?(0,D.jsx)(`div`,{className:`picker-empty`,children:r(`common.noResults`)}):null]})]})}function St({navigate:e}){let{t}=O(),[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(`100`),[u,d]=(0,g.useState)(null),[f,p]=(0,g.useState)(``);async function m(e=!1){if(p(``),!n){p(t(`messages.selectChannel`));return}let r=new URLSearchParams({channel_id:String(n.ID),limit:c});if(e&&u?.rows.length){let e=u.rows[u.rows.length-1];r.set(`before_date`,String(e.Date)),r.set(`before_id`,String(e.ID)),a(String(e.Date)),s(String(e.ID))}else i&&r.set(`before_date`,i),o&&r.set(`before_id`,o);try{d(await x.groupMessages(r))}catch(e){p(b(e))}}function h(e){r(e),a(``),s(``),d(null)}let _=u?.rows??[];return(0,D.jsxs)(Ze,{title:t(`messages.groupTitle`),eyebrow:t(`messages.groupEyebrow`),children:[f&&(0,D.jsx)(tt,{children:f}),(0,D.jsxs)(Qe,{children:[(0,D.jsx)(`div`,{className:`message-selector-grid single`,children:(0,D.jsx)(xt,{label:t(`messages.channelGroup`),value:n,onChange:h})}),(0,D.jsxs)(`form`,{className:`toolbar message-query`,onSubmit:e=>{e.preventDefault(),m(!1)},children:[(0,D.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:t(`messages.beforeDatePlaceholder`)}),(0,D.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:t(`messages.beforeIDPlaceholder`)}),(0,D.jsx)(`input`,{className:`small-input`,value:c,onChange:e=>l(e.target.value),placeholder:t(`messages.limitPlaceholder`)}),(0,D.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,children:[(0,D.jsx)(be,{size:15}),` `,t(`messages.searchMessages`)]}),_.length?(0,D.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>m(!0),children:[(0,D.jsx)(ue,{size:15}),` `,t(`messages.nextPage`)]}):null]})]}),(0,D.jsxs)(`div`,{className:`metric-row`,children:[(0,D.jsx)(A,{label:t(`messages.currentPage`),value:String(_.length)}),(0,D.jsx)(A,{label:t(`messages.mediaCount`),value:String(_.filter(e=>e.Media&&e.Media!==`{}`).length)}),(0,D.jsx)(A,{label:t(`messages.channelPosts`),value:String(_.filter(e=>e.Post).length)}),(0,D.jsx)(A,{label:t(`messages.channelGroup`),value:n?`${n.Title||Ke(n,t)} (${n.ID})`:`-`})]}),(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:t(`common.messageId`)}),(0,D.jsx)(`th`,{children:t(`common.time`)}),(0,D.jsx)(`th`,{children:t(`common.sender`)}),(0,D.jsx)(`th`,{children:`From Peer`}),(0,D.jsx)(`th`,{children:`PTS`}),(0,D.jsx)(`th`,{children:t(`common.views`)}),(0,D.jsx)(`th`,{children:t(`common.status`)}),(0,D.jsx)(`th`,{children:t(`messages.body`)}),(0,D.jsx)(`th`,{})]})}),(0,D.jsxs)(`tbody`,{children:[_.map(n=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{className:`mono`,children:n.ID}),(0,D.jsx)(`td`,{children:Je(n.Date)}),(0,D.jsx)(`td`,{className:`mono`,children:n.SenderUserID}),(0,D.jsxs)(`td`,{className:`mono`,children:[n.FromPeerType,`:`,n.FromPeerID]}),(0,D.jsx)(`td`,{children:n.PTS}),(0,D.jsx)(`td`,{children:n.ViewsCount}),(0,D.jsx)(`td`,{children:n.Deleted?(0,D.jsx)(k,{tone:`danger`,children:t(`common.deleted`)}):n.Pinned?(0,D.jsx)(k,{tone:`warn`,children:t(`messages.pinned`)}):(0,D.jsx)(k,{children:t(`common.survived`)})}),(0,D.jsx)(`td`,{className:`truncate`,children:n.Body}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/messages/groups/detail?channel_id=${n.ChannelID}&msg_id=${n.ID}`),children:[t(`common.detail`),` `,(0,D.jsx)(ue,{size:14})]})})]},`${n.ChannelID}-${n.ID}`)),_.length===0&&(0,D.jsx)(it,{colSpan:9})]})]})})]})}function Ct({ownerUserID:e,msgID:t,navigate:n}){let{t:r}=O(),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(``);async function c(){s(``);try{a(await x.message(e,t))}catch(e){s(b(e))}}if((0,g.useEffect)(()=>{c()},[e,t]),o)return(0,D.jsx)(tt,{children:o});if(!i)return(0,D.jsx)(at,{label:r(`common.loading`)});let l=i.Message;return(0,D.jsx)(Ze,{title:r(`messages.privateDetailTitle`,{id:l.BoxID}),eyebrow:r(`messages.detailEyebrow`),actions:(0,D.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>n(`/messages/private`),children:[(0,D.jsx)(se,{size:15}),` `,r(`messages.backPrivate`)]}),children:(0,D.jsx)($e,{main:(0,D.jsxs)(`div`,{className:`stacked-sections`,children:[(0,D.jsxs)(`section`,{className:`entity-head`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`entity-title`,children:r(`messages.ownerPeerTitle`,{owner:l.OwnerUserID,peer:l.PeerID})}),(0,D.jsx)(`div`,{className:`entity-subtitle`,children:r(`messages.senderSubtitle`,{sender:l.FromUserID,date:Je(l.Date)})})]}),(0,D.jsxs)(`div`,{className:`entity-badges`,children:[l.Deleted?(0,D.jsx)(k,{tone:`danger`,children:r(`common.deleted`)}):(0,D.jsx)(k,{children:r(`common.survived`)}),(0,D.jsxs)(k,{children:[`pts `,l.PTS]}),(0,D.jsx)(k,{children:l.Outgoing?r(`messages.outgoing`):r(`messages.incoming`)})]})]}),(0,D.jsxs)(`div`,{className:`summary-grid`,children:[(0,D.jsx)(j,{label:r(`messages.boxID`),value:String(l.BoxID),mono:!0}),(0,D.jsx)(j,{label:r(`messages.privateMessageID`),value:String(l.PrivateMessageID),mono:!0}),(0,D.jsx)(j,{label:r(`messages.messageSender`),value:String(l.MessageSenderID),mono:!0}),(0,D.jsx)(j,{label:r(`common.time`),value:Je(l.Date)})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.messageBox`),text:r(`messages.messageBoxesSnapshot`)}),(0,D.jsx)(ot,{value:i.MessageJSON})]}),(0,D.jsxs)(`div`,{className:`raw-grid`,children:[(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.dialogRow`),text:r(`messages.dialogSnapshot`)}),(0,D.jsx)(ot,{value:i.DialogJSON})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.privateRow`),text:r(`messages.privateSnapshot`)}),(0,D.jsx)(ot,{value:i.PrivateJSON})]})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.userUpdateEvents`),text:r(`messages.userEventsSource`)}),(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:`PTS`}),(0,D.jsx)(`th`,{children:r(`common.count`)}),(0,D.jsx)(`th`,{children:r(`common.type`)}),(0,D.jsx)(`th`,{children:r(`common.time`)})]})}),(0,D.jsxs)(`tbody`,{children:[i.UpdateEvents.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{children:e.PTS}),(0,D.jsx)(`td`,{children:e.PTSCount}),(0,D.jsx)(`td`,{children:e.Type}),(0,D.jsx)(`td`,{children:Je(e.Date)})]},`${e.PTS}-${e.Type}`)),i.UpdateEvents.length===0&&(0,D.jsx)(it,{colSpan:4})]})]})})]}),(0,D.jsxs)(`section`,{className:`section-block`,children:[(0,D.jsx)(et,{title:r(`messages.dispatchOutbox`),text:r(`messages.outboxSource`)}),(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:`ID`}),(0,D.jsx)(`th`,{children:r(`account.userID`)}),(0,D.jsx)(`th`,{children:`PTS`}),(0,D.jsx)(`th`,{children:r(`common.type`)}),(0,D.jsx)(`th`,{children:r(`common.status`)}),(0,D.jsx)(`th`,{children:r(`messages.attempts`)}),(0,D.jsx)(`th`,{children:r(`common.updatedAt`)})]})}),(0,D.jsxs)(`tbody`,{children:[i.Outbox.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{children:e.ID}),(0,D.jsx)(`td`,{children:e.TargetUserID}),(0,D.jsx)(`td`,{children:e.PTS}),(0,D.jsx)(`td`,{children:e.EventType}),(0,D.jsx)(`td`,{children:e.Status}),(0,D.jsx)(`td`,{children:e.Attempts}),(0,D.jsx)(`td`,{children:qe(e.UpdatedAt)})]},e.ID)),i.Outbox.length===0&&(0,D.jsx)(it,{colSpan:7})]})]})})]})]}),side:(0,D.jsxs)(`section`,{className:`action-dock`,children:[(0,D.jsx)(`div`,{className:`dock-title`,children:r(`common.operations`)}),(0,D.jsx)(lt,{label:r(`messages.deleteThis`),icon:(0,D.jsx)(we,{size:15}),path:`/api/actions/delete-messages`,payload:()=>({owner_user_id:l.OwnerUserID,peer_id:l.PeerID,ids:[l.BoxID],revoke:!0}),onDone:c})]})})})}function M({navigate:e}){let{t}=O(),[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(`100`),[f,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(!0),[_,v]=(0,g.useState)(!1),[y,ee]=(0,g.useState)(``),[S,te]=(0,g.useState)(`1`),[C,w]=(0,g.useState)(null),[ne,re]=(0,g.useState)(``);async function ie(e=!1){if(re(``),!n||!i){re(t(`messages.selectPrivatePeers`));return}let r=new URLSearchParams({owner_user_id:String(n.ID),peer_id:String(i.ID),limit:u});if(e&&C?.rows.length){let e=C.rows[C.rows.length-1];r.set(`before_date`,String(e.Date)),r.set(`before_id`,String(e.BoxID)),s(String(e.Date)),l(String(e.BoxID))}else o&&r.set(`before_date`,o),c&&r.set(`before_id`,c);try{w(await x.messages(r))}catch(e){re(b(e))}}function ae(e){r(e),s(``),l(``),w(null)}function oe(e){a(e),s(``),l(``),w(null)}return(0,D.jsxs)(Ze,{title:t(`messages.privateTitle`),eyebrow:t(`messages.privateEyebrow`),children:[ne&&(0,D.jsx)(tt,{children:ne}),(0,D.jsxs)(Qe,{children:[(0,D.jsxs)(`div`,{className:`message-selector-grid`,children:[(0,D.jsx)(bt,{label:t(`messages.ownerUser`),value:n,onChange:ae}),(0,D.jsx)(bt,{label:t(`messages.peerUser`),value:i,onChange:oe})]}),(0,D.jsxs)(`form`,{className:`toolbar message-query`,onSubmit:e=>{e.preventDefault(),ie(!1)},children:[(0,D.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:t(`messages.beforeDatePlaceholder`)}),(0,D.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),placeholder:t(`messages.beforeIDPlaceholder`)}),(0,D.jsx)(`input`,{className:`small-input`,value:u,onChange:e=>d(e.target.value),placeholder:t(`messages.limitPlaceholder`)}),(0,D.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,children:[(0,D.jsx)(be,{size:15}),` `,t(`messages.searchMessages`)]}),C?.rows.length?(0,D.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>ie(!0),children:[(0,D.jsx)(ue,{size:15}),` `,t(`messages.nextPage`)]}):null]})]}),(0,D.jsxs)(`div`,{className:`metric-row`,children:[(0,D.jsx)(A,{label:t(`messages.currentPage`),value:String(C?.rows.length??0)}),(0,D.jsx)(A,{label:t(`messages.deleted`),value:String((C?.rows??[]).filter(e=>e.Deleted).length),tone:`danger`}),(0,D.jsx)(A,{label:t(`messages.outgoing`),value:String((C?.rows??[]).filter(e=>e.Outgoing).length)}),(0,D.jsx)(A,{label:t(`messages.ownerPeer`),value:n&&i?`${Ge(n)} / ${Ge(i)}`:`-`})]}),(0,D.jsxs)(`div`,{className:`operation-row`,children:[(0,D.jsxs)(`div`,{className:`operation-box`,children:[(0,D.jsxs)(`div`,{className:`operation-title`,children:[(0,D.jsx)(we,{size:15}),` `,t(`messages.deleteSelected`)]}),(0,D.jsx)(`input`,{value:f,onChange:e=>p(e.target.value),placeholder:t(`messages.idsPlaceholder`)}),(0,D.jsxs)(`label`,{className:`checkline`,children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>h(e.target.checked)}),` `,t(`messages.revoke`)]}),(0,D.jsx)(lt,{path:`/api/actions/delete-messages`,label:t(`messages.previewDelete`),payload:()=>({owner_user_id:n?.ID??0,peer_id:i?.ID??0,ids:Xe(f,t(`messages.msgIDsInvalid`)),revoke:m})})]}),(0,D.jsxs)(`div`,{className:`operation-box`,children:[(0,D.jsxs)(`div`,{className:`operation-title`,children:[(0,D.jsx)(pe,{size:15}),` `,t(`messages.clearHistory`)]}),(0,D.jsx)(`input`,{value:y,onChange:e=>ee(e.target.value),placeholder:t(`messages.maxIDPlaceholder`)}),(0,D.jsx)(`input`,{value:S,onChange:e=>te(e.target.value),placeholder:t(`messages.maxBatchesPlaceholder`)}),(0,D.jsxs)(`label`,{className:`checkline`,children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>h(e.target.checked)}),` `,t(`messages.revoke`)]}),(0,D.jsxs)(`label`,{className:`checkline`,children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),` `,t(`messages.justClear`)]}),(0,D.jsx)(lt,{path:`/api/actions/delete-history`,label:t(`messages.previewClearHistory`),payload:()=>({owner_user_id:n?.ID??0,peer_id:i?.ID??0,max_id:Ye(y),max_batches:Ye(S),just_clear:_,revoke:m})})]})]}),(0,D.jsx)(`div`,{className:`table-wrap`,children:(0,D.jsxs)(`table`,{className:`data-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:t(`common.messageId`)}),(0,D.jsx)(`th`,{children:t(`common.time`)}),(0,D.jsx)(`th`,{children:t(`common.sender`)}),(0,D.jsx)(`th`,{children:t(`messages.direction`)}),(0,D.jsx)(`th`,{children:`PTS`}),(0,D.jsx)(`th`,{children:t(`common.status`)}),(0,D.jsx)(`th`,{children:t(`messages.body`)}),(0,D.jsx)(`th`,{})]})}),(0,D.jsxs)(`tbody`,{children:[C?.rows.map(n=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{className:`mono`,children:n.BoxID}),(0,D.jsx)(`td`,{children:Je(n.Date)}),(0,D.jsx)(`td`,{className:`mono`,children:n.FromUserID}),(0,D.jsx)(`td`,{children:n.Outgoing?t(`messages.outgoing`):t(`messages.incoming`)}),(0,D.jsx)(`td`,{children:n.PTS}),(0,D.jsx)(`td`,{children:n.Deleted?(0,D.jsx)(k,{tone:`danger`,children:t(`common.deleted`)}):(0,D.jsx)(k,{children:t(`common.survived`)})}),(0,D.jsx)(`td`,{className:`truncate`,children:n.Body}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/messages/private/detail?owner_user_id=${n.OwnerUserID}&msg_id=${n.BoxID}`),children:[t(`common.detail`),` `,(0,D.jsx)(ue,{size:14})]})})]},`${n.OwnerUserID}-${n.BoxID}`)),(!C||C.rows.length===0)&&(0,D.jsx)(it,{colSpan:8})]})]})})]})}function wt({route:e,navigate:t}){let n=e.path.match(/^\/accounts\/(\d+)$/)?.[1],r=e.path.match(/^\/channels\/(\d+)$/)?.[1];return n?(0,D.jsx)(dt,{id:Number(n),navigate:t}):r?(0,D.jsx)(ht,{id:Number(r),navigate:t}):e.path===`/accounts`?(0,D.jsx)(mt,{navigate:t}):e.path===`/channels`?(0,D.jsx)(gt,{navigate:t}):e.path===`/messages/detail`||e.path===`/messages/private/detail`?(0,D.jsx)(Ct,{ownerUserID:Number(e.search.get(`owner_user_id`)||`0`),msgID:Number(e.search.get(`msg_id`)||`0`),navigate:t}):e.path===`/messages/groups/detail`?(0,D.jsx)(yt,{channelID:Number(e.search.get(`channel_id`)||`0`),msgID:Number(e.search.get(`msg_id`)||`0`),navigate:t}):e.path===`/messages/groups`?(0,D.jsx)(St,{navigate:t}):e.path===`/messages`||e.path===`/messages/private`?(0,D.jsx)(M,{navigate:t}):(0,D.jsx)(_t,{navigate:t})}function Tt(){let[e,t]=(0,g.useState)(void 0),[n,r]=(0,g.useState)(()=>Ie());(0,g.useEffect)(()=>{let e=()=>r(Ie());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,g.useEffect)(()=>{x.session().then(e=>t(e.actor)).catch(e=>{if(e instanceof v&&e.status===401){t(null);return}t(null)})},[]);let i=e=>{window.history.pushState(null,``,e),r(Ie())};return e===void 0?(0,D.jsx)(Be,{}):e===null?(0,D.jsx)(st,{onLogin:t}):(0,D.jsx)(Ve,{actor:e,route:n,navigate:i,onLogout:()=>t(null),children:(0,D.jsx)(wt,{route:n,navigate:i})})}_.createRoot(document.getElementById(`root`)).render((0,D.jsx)(g.StrictMode,{children:(0,D.jsx)(je,{children:(0,D.jsx)(Tt,{})})})); \ No newline at end of file diff --git a/cmd/telesrv-admin/web/dist/assets/index-IDEWWIS9.css b/cmd/telesrv-admin/web/dist/assets/index-IDEWWIS9.css deleted file mode 100644 index c6d3e784..00000000 --- a/cmd/telesrv-admin/web/dist/assets/index-IDEWWIS9.css +++ /dev/null @@ -1 +0,0 @@ -:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f3f5f7;--panel:#fff;--panel-subtle:#f8fafb;--panel-strong:#eef2f5;--line:#d9e1e8;--line-strong:#c2ccd6;--text:#101828;--muted:#667085;--muted-2:#98a2b3;--brand:#176d61;--brand-2:#245b9d;--good:#167447;--warn:#a15c07;--danger:#b42318;--sidebar:#11161d;--sidebar-soft:#1b222b;--sidebar-line:#2c3541;--focus:#176d6129;--shadow:0 18px 52px #10182824}*{box-sizing:border-box}html,body,#root{min-height:100%}body{color:var(--text);background:var(--bg);margin:0;font:13px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,textarea{font:inherit}a{color:inherit;text-decoration:none}.shell{grid-template-columns:232px minmax(0,1fr);min-height:100vh;display:grid}.sidebar{color:#eef2f6;background:var(--sidebar);border-right:1px solid var(--sidebar-line);flex-direction:column;gap:16px;height:100vh;padding:18px 12px;display:flex;position:sticky;top:0}.brand{align-items:center;gap:10px;min-height:42px;padding:0 4px;display:flex}.brand.compact{justify-content:center}.brand-elevated .brand-mark{box-shadow:0 8px 24px #176d6142}.brand-mark{color:#fff;background:var(--brand);border:1px solid #fff3;border-radius:8px;place-items:center;width:34px;height:34px;font-weight:800;display:grid}.brand strong{font-size:14px;line-height:1.1;display:block}.brand small{color:#aeb8c4;margin-top:3px;font-size:11px;display:block}.sidebar-label{color:#8492a6;text-transform:uppercase;padding:0 8px;font-size:11px;font-weight:700}.nav-list,.nav-section{gap:4px;display:grid}.nav-section-toggle{color:#8fa0b4;cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;border-radius:7px;grid-template-columns:18px minmax(0,1fr) 16px;align-items:center;gap:9px;width:100%;min-height:38px;padding:0 10px;font-size:12px;font-weight:800;display:grid}.nav-section-toggle:hover,.nav-section.active .nav-section-toggle{color:#fff;background:var(--sidebar-soft);border-color:#34404d}.nav-section-chevron{color:#8fa0b4;justify-self:end;transition:transform .14s}.nav-section.open .nav-section-chevron{transform:rotate(180deg)}.nav-children{gap:4px;padding:2px 0 2px 18px;display:grid}.nav-item{color:#c6d0dc;border:1px solid #0000;border-radius:7px;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:9px;min-height:38px;padding:0 10px;display:grid}.nav-dot{background:#687789;border-radius:999px;justify-self:center;width:6px;height:6px}.nav-item:hover,.nav-item.active{color:#fff;background:var(--sidebar-soft);border-color:#34404d}.nav-item.active .nav-dot{background:var(--brand)}.sidebar-status{gap:7px;margin-top:auto;display:grid}.runtime-row{color:#cbd5df;background:#171d25;border:1px solid #27313c;border-radius:7px;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:32px;padding:0 8px;display:grid}.runtime-row strong{color:#fff;font-size:11px}.workspace{min-width:0}.topbar{z-index:20;border-bottom:1px solid var(--line);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fffffff0;justify-content:space-between;align-items:center;gap:18px;min-height:66px;padding:12px 24px;display:flex;position:sticky;top:0}.topbar h1{margin:2px 0 0;font-size:20px;line-height:1.2}.topbar-actions,.page-actions,.section-action,.entity-badges,.row-actions,.modal-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.actor-pill{color:#344054;background:var(--panel-subtle);border:1px solid var(--line);border-radius:999px;align-items:center;min-height:30px;padding:0 10px;display:inline-flex}.content{gap:16px;padding:18px 24px 30px;display:grid}.eyebrow{color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:800}.dashboard-layout,.stacked-sections{gap:14px;display:grid}.overview-band,.page-frame{background:var(--panel);border:1px solid var(--line);border-radius:8px;min-width:0}.overview-band{grid-template-columns:minmax(220px,1fr) minmax(420px,.9fr);align-items:center;gap:16px;padding:16px;display:grid}.overview-band h2,.page-title-row h2,.section-head h2,.modal h2{margin:0;font-size:18px;line-height:1.25}.overview-metrics,.metric-row{grid-template-columns:repeat(4,minmax(120px,1fr));gap:8px;display:grid}.overview-metrics{grid-template-columns:repeat(3,minmax(120px,1fr))}.status-item,.metric,.summary-item{background:var(--panel-subtle);border:1px solid var(--line);border-radius:7px;min-width:0;padding:10px}.status-item span,.metric span,.summary-item span{color:var(--muted);margin-bottom:6px;font-size:11px;display:block}.status-item strong,.metric strong,.summary-item strong{overflow-wrap:anywhere;color:var(--text);font-weight:800;display:block}.status-item.good,.metric.good{border-color:#afd8bf}.status-item.warn,.metric.warn{border-color:#e7c77e}.metric.danger{border-color:#efb4ad}.command-grid{grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px;display:grid}.launcher{background:var(--panel);border:1px solid var(--line);border-radius:8px;grid-template-columns:38px minmax(0,1fr) 18px;align-items:center;gap:12px;min-height:94px;padding:14px;display:grid}.launcher:hover{border-color:var(--brand)}.launcher-icon{width:38px;height:38px;color:var(--brand);background:#edf7f4;border:1px solid #c9e2dc;border-radius:8px;place-items:center;display:grid}.launcher-copy{gap:4px;display:grid}.launcher-copy strong{font-size:15px}.launcher-copy span{color:var(--muted)}.work-strip{grid-template-columns:repeat(4,minmax(160px,1fr));gap:8px;display:grid}.strip-item{color:#344054;background:var(--panel);border:1px solid var(--line);border-radius:8px;align-items:center;gap:8px;min-height:38px;padding:0 10px;display:flex}.page-frame{gap:14px;padding:14px;display:grid}.page-title-row{border-bottom:1px solid var(--line);justify-content:space-between;align-items:flex-start;gap:14px;padding-bottom:12px;display:flex}.query-panel{background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;padding:10px}.toolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.message-query input{width:150px}.message-selector-grid{grid-template-columns:repeat(2,minmax(280px,1fr));gap:10px;margin-bottom:10px;display:grid}.message-selector-grid.single{grid-template-columns:minmax(320px,620px)}.entity-picker{border:1px solid var(--line);background:#fff;border-radius:8px;gap:8px;min-width:0;padding:10px;display:grid}.picker-head{color:#344054;justify-content:space-between;align-items:center;gap:8px;min-height:24px;font-weight:800;display:flex}.selected-entity{color:#0f3f38;background:#eef8f5;border:1px solid #b9dcd3;border-radius:7px;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:40px;padding:7px 9px;display:grid}.selected-entity strong,.selected-entity span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.selected-entity div{gap:2px;min-width:0;display:grid}.selected-entity div span{color:#52606d;font-size:11px}.picker-search{background:var(--panel-subtle);border:1px solid var(--line-strong);border-radius:7px;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:7px;height:34px;padding:0 6px 0 9px;display:grid}.picker-search input{width:100%;height:30px;box-shadow:none;background:0 0;border:0;padding:0}.picker-results{border:1px solid var(--line);border-radius:7px;max-height:236px;display:grid;overflow:auto}.picker-row{min-height:36px;color:var(--text);border:0;border-bottom:1px solid var(--line);cursor:pointer;text-align:left;background:#fff;grid-template-columns:96px minmax(120px,1fr) minmax(120px,1fr) auto;align-items:center;gap:8px;padding:6px 8px;display:grid}.picker-row:last-child{border-bottom:0}.picker-row:hover,.picker-row.selected{background:#f3f8f6}.picker-row strong,.picker-row span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.picker-empty,.picker-error{color:var(--muted);text-align:center;padding:9px}.picker-error{color:var(--danger);background:#fff2f0;border:1px solid #efb4ad;border-radius:7px}input,textarea{color:var(--text);border:1px solid var(--line-strong);background:#fff;border-radius:7px;outline:none}input{width:190px;height:34px;padding:0 10px}textarea{resize:vertical;width:100%;padding:9px 10px}input:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--focus)}.small-input{width:88px}.field-inline{color:var(--muted);align-items:center;gap:6px;display:inline-flex}.field-inline span{font-size:11px;font-weight:700}.searchbox{border:1px solid var(--line-strong);background:#fff;border-radius:7px;align-items:center;gap:8px;width:min(380px,100%);height:34px;padding:0 10px;display:inline-flex}.searchbox input{width:100%;height:30px;box-shadow:none;border:0;padding:0}.btn{color:#1d2939;border:1px solid var(--line-strong);cursor:pointer;white-space:nowrap;background:#fff;border-radius:7px;justify-content:center;align-items:center;gap:6px;min-height:34px;padding:0 12px;display:inline-flex}.btn:hover:not(:disabled){background:#f7f9fb}.btn:disabled{color:var(--muted-2);cursor:not-allowed}.btn.primary{color:#fff;background:var(--brand);border-color:var(--brand)}.btn.primary:hover:not(:disabled){background:#12594f}.btn.ghost{background:var(--panel-subtle)}.btn.danger{color:var(--danger);background:#fff7f5;border-color:#efb4ad}.btn.danger:hover:not(:disabled){background:#ffeceb}.btn.warn{color:var(--warn);background:#fff8ec;border-color:#e7c77e}.btn.warn:hover:not(:disabled){background:#fff1d6}.btn:disabled,.btn.primary:disabled,.btn.warn:disabled,.btn.danger:disabled{color:var(--muted-2);border-color:var(--line);cursor:not-allowed;background:#f3f5f7}.btn.full{width:100%}.icon-text{gap:7px}.compact-btn{min-height:28px;padding:0 8px;font-size:12px}.row-link,.link-button{color:var(--brand-2);cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0;display:inline-flex}.table-wrap{border:1px solid var(--line);border-radius:8px;width:100%;overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:12.5px}.data-table th,.data-table td{border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;white-space:nowrap;height:38px;padding:7px 9px}.data-table th{z-index:0;color:#475467;background:var(--panel-strong);font-weight:800;position:sticky;top:0}.data-table tbody tr:hover{background:#fbfcfd}.data-table tr:last-child td{border-bottom:0}.mono{font-family:SFMono-Regular,Consolas,Liberation Mono,monospace}.truncate{text-overflow:ellipsis;max-width:380px;overflow:hidden}.badge{color:#4f5b68;white-space:nowrap;background:#f3f6f8;border:1px solid #d7e0e8;border-radius:999px;align-items:center;min-height:22px;padding:1px 8px;display:inline-flex}.badge.good{color:var(--good);background:#eef8f2;border-color:#b9dcc7}.badge.danger{color:var(--danger);background:#fff2f0;border-color:#efb4ad}.badge.warn{color:var(--warn);background:#fff8e7;border-color:#e7c77e}.empty-cell{color:var(--muted);text-align:center}.split-layout{grid-template-columns:minmax(0,1fr) 330px;align-items:start;gap:14px;display:grid}.split-main,.split-side{min-width:0}.entity-head{background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;justify-content:space-between;align-items:flex-start;gap:14px;padding:14px;display:flex}.entity-title{font-size:20px;font-weight:800;line-height:1.25}.entity-subtitle{color:var(--muted);margin-top:4px}.summary-grid{grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px;display:grid}.about-text{color:#344054;border:1px solid var(--line);background:#fbfcfd;border-radius:8px;margin:0;padding:10px}.section-block,.action-dock,.surface{background:var(--panel);border:1px solid var(--line);border-radius:8px;min-width:0;padding:12px}.section-head{justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px;display:flex}.section-head p{color:var(--muted);margin:5px 0 0}.action-dock{gap:10px;display:grid;position:sticky;top:82px}.dock-title{color:#344054;border-bottom:1px solid var(--line);padding-bottom:4px;font-weight:800}.action-dock>.btn,.action-dock .action-stack .btn{justify-content:center;width:100%}.duration-field{gap:4px;display:grid}.duration-field span{color:var(--muted);font-size:11px;font-weight:800}.duration-field input{width:100%}.action-stack{gap:10px;display:grid}.action-stack .btn,.action-dock>.btn{min-height:42px}.danger-zone{border-top:1px solid var(--line);flex-wrap:wrap;gap:8px;margin-top:10px;padding-top:10px;display:flex}.authorization-block{gap:10px;display:grid}.authorization-table{table-layout:fixed;min-width:720px}.authorization-table th,.authorization-table td{height:46px}.device-text{text-overflow:ellipsis;max-width:260px;overflow:hidden}.device-actions-head{width:190px}.device-actions-cell{width:190px;min-width:190px}.device-actions{white-space:normal;grid-template-columns:repeat(2,minmax(82px,1fr));gap:6px;min-width:178px;display:grid}.device-actions .btn{justify-content:center;width:100%}.operation-row{grid-template-columns:repeat(2,minmax(280px,1fr));gap:10px;display:grid}.operation-box{background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px;padding:10px;display:flex}.operation-title{align-items:center;gap:6px;width:100%;font-weight:800;display:flex}.checkline{color:var(--muted);align-items:center;gap:6px;display:inline-flex}.checkline input{width:auto;height:auto}.alert{color:#8a251d;background:#fff2f0;border:1px solid #efb4ad;border-radius:8px;align-items:flex-start;gap:8px;padding:9px 10px;display:flex}.json-block{color:#d8e6f0;background:#141a22;border:1px solid #2a3542;border-radius:8px;max-height:520px;margin:0;padding:12px;font-size:12px;overflow:auto}.raw-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.loading-line{min-height:80px;color:var(--muted);place-items:center;display:grid}.empty-panel{min-height:92px;color:var(--muted);background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;place-items:center;display:grid}.modal-backdrop{z-index:10000;background:#11182785;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.modal{border:1px solid var(--line);width:min(760px,100%);max-height:min(820px,100vh - 48px);box-shadow:var(--shadow);background:#fff;border-radius:8px;padding:0;overflow:hidden}.command-modal{flex-direction:column;display:flex}.modal-head{border-bottom:1px solid var(--line);justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 18px 12px;display:flex}.icon-btn{background:var(--panel-subtle);border:1px solid var(--line);cursor:pointer;border-radius:7px;place-items:center;width:30px;height:30px;display:grid}.command-steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.command-body{gap:12px;padding:14px 18px;display:grid;overflow:auto}.command-step{min-height:38px;color:var(--muted);background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;align-items:center;gap:8px;padding:0 10px;display:flex}.command-step span{border:1px solid var(--line);background:#fff;border-radius:999px;place-items:center;width:20px;height:20px;font-size:11px;font-weight:800;display:grid}.command-step.active{color:var(--brand);border-color:#a9d8ce}.command-step.done{color:var(--good);border-color:#b9dcc7}.form-field{gap:6px;display:grid}.form-field span,.form-stack span{color:#4b5563;font-weight:800}.command-preview{gap:8px;display:grid}.command-preview .json-block{max-height:150px}.preview-head,.result-title{color:#344054;align-items:center;gap:7px;font-weight:800;display:flex}.result-box{border:1px solid var(--line);background:#fbfcfd;border-radius:8px;gap:8px;padding:10px;display:grid}.result-line{grid-template-columns:92px minmax(0,1fr);gap:8px;display:grid}.result-line span{color:var(--muted)}.result-line strong{overflow-wrap:anywhere}.result-message{color:#344054}.modal-actions{border-top:1px solid var(--line);background:#fff;justify-content:flex-end;padding:12px 18px}.login-page{background:var(--bg);place-items:center;min-height:100vh;padding:24px;display:grid}.login-panel{border:1px solid var(--line);width:min(420px,100%);box-shadow:var(--shadow);background:#fff;border-radius:8px;gap:18px;padding:22px;display:grid}.login-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.login-chip{min-height:24px;color:var(--brand);background:#edf7f4;border:1px solid #c9e2dc;border-radius:999px;align-items:center;padding:0 8px;font-size:12px;display:inline-flex}.login-copy h1{margin:0;font-size:22px}.login-copy p{color:var(--muted);margin:8px 0 0}.form-stack{gap:12px;display:grid}.form-stack label{gap:6px;display:grid}.form-stack input{width:100%}.boot-screen{align-content:center;place-items:center;gap:18px;min-height:100vh;display:grid}.loader-bar{background:#d7dde4;border-radius:999px;width:180px;height:4px;overflow:hidden}.loader-bar:before{content:"";background:var(--brand);width:42%;height:100%;animation:1s ease-in-out infinite load;display:block}.spin{animation:.8s linear infinite spin}@keyframes load{0%{transform:translate(-120%)}to{transform:translate(260%)}}@keyframes spin{to{transform:rotate(360deg)}}@media (width<=1120px){.shell{grid-template-columns:1fr}.sidebar{height:auto;position:static}.nav-list{grid-template-columns:repeat(4,minmax(0,1fr))}.sidebar-status{display:none}.overview-band,.split-layout,.operation-row,.raw-grid,.message-selector-grid,.message-selector-grid.single{grid-template-columns:1fr}.action-dock{position:static}}@media (width<=760px){.content,.topbar{padding-left:14px;padding-right:14px}.command-grid,.work-strip,.overview-metrics,.metric-row,.summary-grid,.command-steps{grid-template-columns:1fr}.sidebar{gap:12px;padding:14px}.nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar,.page-title-row,.entity-head{flex-direction:column;align-items:flex-start}input,.searchbox{width:100%}.toolbar{align-items:stretch}.picker-row,.selected-entity{grid-template-columns:1fr}} diff --git a/cmd/telesrv-admin/web/dist/assets/index-W1-UPxwc.css b/cmd/telesrv-admin/web/dist/assets/index-W1-UPxwc.css new file mode 100644 index 00000000..1d71b83b --- /dev/null +++ b/cmd/telesrv-admin/web/dist/assets/index-W1-UPxwc.css @@ -0,0 +1 @@ +:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f3f5f7;--panel:#fff;--panel-subtle:#f8fafb;--panel-strong:#eef2f5;--line:#d9e1e8;--line-strong:#c2ccd6;--text:#101828;--muted:#667085;--muted-2:#98a2b3;--brand:#176d61;--brand-2:#245b9d;--good:#167447;--warn:#a15c07;--danger:#b42318;--sidebar:#11161d;--sidebar-soft:#1b222b;--sidebar-line:#2c3541;--focus:#176d6129;--shadow:0 18px 52px #10182824}*{box-sizing:border-box}html,body,#root{min-height:100%}body{color:var(--text);background:var(--bg);margin:0;font:13px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,textarea{font:inherit}a{color:inherit;text-decoration:none}.shell{grid-template-columns:232px minmax(0,1fr);min-height:100vh;display:grid}.sidebar{color:#eef2f6;background:var(--sidebar);border-right:1px solid var(--sidebar-line);flex-direction:column;gap:16px;height:100vh;padding:18px 12px;display:flex;position:sticky;top:0}.brand{align-items:center;gap:10px;min-height:42px;padding:0 4px;display:flex}.brand.compact{justify-content:center}.brand-elevated .brand-mark{box-shadow:0 8px 24px #176d6142}.brand-mark{color:#fff;background:var(--brand);border:1px solid #fff3;border-radius:8px;place-items:center;width:34px;height:34px;font-weight:800;display:grid}.brand strong{font-size:14px;line-height:1.1;display:block}.brand small{color:#aeb8c4;margin-top:3px;font-size:11px;display:block}.sidebar-label{color:#8492a6;text-transform:uppercase;padding:0 8px;font-size:11px;font-weight:700}.nav-list,.nav-section{gap:4px;display:grid}.nav-section-toggle{color:#8fa0b4;cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;border-radius:7px;grid-template-columns:18px minmax(0,1fr) 16px;align-items:center;gap:9px;width:100%;min-height:38px;padding:0 10px;font-size:12px;font-weight:800;display:grid}.nav-section-toggle:hover,.nav-section.active .nav-section-toggle{color:#fff;background:var(--sidebar-soft);border-color:#34404d}.nav-section-chevron{color:#8fa0b4;justify-self:end;transition:transform .14s}.nav-section.open .nav-section-chevron{transform:rotate(180deg)}.nav-children{gap:4px;padding:2px 0 2px 18px;display:grid}.nav-item{color:#c6d0dc;border:1px solid #0000;border-radius:7px;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:9px;min-height:38px;padding:0 10px;display:grid}.nav-dot{background:#687789;border-radius:999px;justify-self:center;width:6px;height:6px}.nav-item:hover,.nav-item.active{color:#fff;background:var(--sidebar-soft);border-color:#34404d}.nav-item.active .nav-dot{background:var(--brand)}.sidebar-status{gap:7px;margin-top:auto;display:grid}.runtime-row{color:#cbd5df;background:#171d25;border:1px solid #27313c;border-radius:7px;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:32px;padding:0 8px;display:grid}.runtime-row strong{color:#fff;font-size:11px}.workspace{min-width:0}.topbar{z-index:20;border-bottom:1px solid var(--line);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fffffff0;justify-content:space-between;align-items:center;gap:18px;min-height:66px;padding:12px 24px;display:flex;position:sticky;top:0}.topbar h1{margin:2px 0 0;font-size:20px;line-height:1.2}.topbar-actions,.page-actions,.section-action,.entity-badges,.row-actions,.modal-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.language-switch{background:var(--panel-subtle);border:1px solid var(--line);border-radius:999px;align-items:center;min-height:30px;padding:2px;display:inline-flex}.language-switch button{min-width:42px;min-height:24px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:999px;padding:0 9px;font-weight:800}.language-switch button.active{color:#fff;background:var(--brand)}.language-switch button:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.actor-pill{color:#344054;background:var(--panel-subtle);border:1px solid var(--line);border-radius:999px;align-items:center;min-height:30px;padding:0 10px;display:inline-flex}.content{gap:16px;padding:18px 24px 30px;display:grid}.eyebrow{color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:800}.dashboard-layout,.stacked-sections{gap:14px;display:grid}.overview-band,.page-frame{background:var(--panel);border:1px solid var(--line);border-radius:8px;min-width:0}.overview-band{grid-template-columns:minmax(220px,1fr) minmax(420px,.9fr);align-items:center;gap:16px;padding:16px;display:grid}.overview-band h2,.page-title-row h2,.section-head h2,.modal h2{margin:0;font-size:18px;line-height:1.25}.overview-metrics,.metric-row{grid-template-columns:repeat(4,minmax(120px,1fr));gap:8px;display:grid}.overview-metrics{grid-template-columns:repeat(3,minmax(120px,1fr))}.status-item,.metric,.summary-item{background:var(--panel-subtle);border:1px solid var(--line);border-radius:7px;min-width:0;padding:10px}.status-item span,.metric span,.summary-item span{color:var(--muted);margin-bottom:6px;font-size:11px;display:block}.status-item strong,.metric strong,.summary-item strong{overflow-wrap:anywhere;color:var(--text);font-weight:800;display:block}.status-item.good,.metric.good{border-color:#afd8bf}.status-item.warn,.metric.warn{border-color:#e7c77e}.metric.danger{border-color:#efb4ad}.command-grid{grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px;display:grid}.launcher{background:var(--panel);border:1px solid var(--line);border-radius:8px;grid-template-columns:38px minmax(0,1fr) 18px;align-items:center;gap:12px;min-height:94px;padding:14px;display:grid}.launcher:hover{border-color:var(--brand)}.launcher-icon{width:38px;height:38px;color:var(--brand);background:#edf7f4;border:1px solid #c9e2dc;border-radius:8px;place-items:center;display:grid}.launcher-copy{gap:4px;display:grid}.launcher-copy strong{font-size:15px}.launcher-copy span{color:var(--muted)}.work-strip{grid-template-columns:repeat(4,minmax(160px,1fr));gap:8px;display:grid}.strip-item{color:#344054;background:var(--panel);border:1px solid var(--line);border-radius:8px;align-items:center;gap:8px;min-height:38px;padding:0 10px;display:flex}.page-frame{gap:14px;padding:14px;display:grid}.page-title-row{border-bottom:1px solid var(--line);justify-content:space-between;align-items:flex-start;gap:14px;padding-bottom:12px;display:flex}.query-panel{background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;padding:10px}.toolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.message-query input{width:150px}.message-selector-grid{grid-template-columns:repeat(2,minmax(280px,1fr));gap:10px;margin-bottom:10px;display:grid}.message-selector-grid.single{grid-template-columns:minmax(320px,620px)}.entity-picker{border:1px solid var(--line);background:#fff;border-radius:8px;gap:8px;min-width:0;padding:10px;display:grid}.picker-head{color:#344054;justify-content:space-between;align-items:center;gap:8px;min-height:24px;font-weight:800;display:flex}.selected-entity{color:#0f3f38;background:#eef8f5;border:1px solid #b9dcd3;border-radius:7px;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:40px;padding:7px 9px;display:grid}.selected-entity strong,.selected-entity span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.selected-entity div{gap:2px;min-width:0;display:grid}.selected-entity div span{color:#52606d;font-size:11px}.picker-search{background:var(--panel-subtle);border:1px solid var(--line-strong);border-radius:7px;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:7px;height:34px;padding:0 6px 0 9px;display:grid}.picker-search input{width:100%;height:30px;box-shadow:none;background:0 0;border:0;padding:0}.picker-results{border:1px solid var(--line);border-radius:7px;max-height:236px;display:grid;overflow:auto}.picker-row{min-height:36px;color:var(--text);border:0;border-bottom:1px solid var(--line);cursor:pointer;text-align:left;background:#fff;grid-template-columns:96px minmax(120px,1fr) minmax(120px,1fr) auto;align-items:center;gap:8px;padding:6px 8px;display:grid}.picker-row:last-child{border-bottom:0}.picker-row:hover,.picker-row.selected{background:#f3f8f6}.picker-row strong,.picker-row span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.picker-empty,.picker-error{color:var(--muted);text-align:center;padding:9px}.picker-error{color:var(--danger);background:#fff2f0;border:1px solid #efb4ad;border-radius:7px}input,textarea{color:var(--text);border:1px solid var(--line-strong);background:#fff;border-radius:7px;outline:none}input{width:190px;height:34px;padding:0 10px}textarea{resize:vertical;width:100%;padding:9px 10px}input:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--focus)}.small-input{width:88px}.field-inline{color:var(--muted);align-items:center;gap:6px;display:inline-flex}.field-inline span{font-size:11px;font-weight:700}.searchbox{border:1px solid var(--line-strong);background:#fff;border-radius:7px;align-items:center;gap:8px;width:min(380px,100%);height:34px;padding:0 10px;display:inline-flex}.searchbox input{width:100%;height:30px;box-shadow:none;border:0;padding:0}.btn{color:#1d2939;border:1px solid var(--line-strong);cursor:pointer;white-space:nowrap;background:#fff;border-radius:7px;justify-content:center;align-items:center;gap:6px;min-height:34px;padding:0 12px;display:inline-flex}.btn:hover:not(:disabled){background:#f7f9fb}.btn:disabled{color:var(--muted-2);cursor:not-allowed}.btn.primary{color:#fff;background:var(--brand);border-color:var(--brand)}.btn.primary:hover:not(:disabled){background:#12594f}.btn.ghost{background:var(--panel-subtle)}.btn.danger{color:var(--danger);background:#fff7f5;border-color:#efb4ad}.btn.danger:hover:not(:disabled){background:#ffeceb}.btn.warn{color:var(--warn);background:#fff8ec;border-color:#e7c77e}.btn.warn:hover:not(:disabled){background:#fff1d6}.btn:disabled,.btn.primary:disabled,.btn.warn:disabled,.btn.danger:disabled{color:var(--muted-2);border-color:var(--line);cursor:not-allowed;background:#f3f5f7}.btn.full{width:100%}.icon-text{gap:7px}.compact-btn{min-height:28px;padding:0 8px;font-size:12px}.row-link,.link-button{color:var(--brand-2);cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0;display:inline-flex}.table-wrap{border:1px solid var(--line);border-radius:8px;width:100%;overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:12.5px}.data-table th,.data-table td{border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;white-space:nowrap;height:38px;padding:7px 9px}.data-table th{z-index:0;color:#475467;background:var(--panel-strong);font-weight:800;position:sticky;top:0}.data-table tbody tr:hover{background:#fbfcfd}.data-table tr:last-child td{border-bottom:0}.mono{font-family:SFMono-Regular,Consolas,Liberation Mono,monospace}.truncate{text-overflow:ellipsis;max-width:380px;overflow:hidden}.badge{color:#4f5b68;white-space:nowrap;background:#f3f6f8;border:1px solid #d7e0e8;border-radius:999px;align-items:center;min-height:22px;padding:1px 8px;display:inline-flex}.badge.good{color:var(--good);background:#eef8f2;border-color:#b9dcc7}.badge.danger{color:var(--danger);background:#fff2f0;border-color:#efb4ad}.badge.warn{color:var(--warn);background:#fff8e7;border-color:#e7c77e}.empty-cell{color:var(--muted);text-align:center}.split-layout{grid-template-columns:minmax(0,1fr) 330px;align-items:start;gap:14px;display:grid}.split-main,.split-side{min-width:0}.entity-head{background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;justify-content:space-between;align-items:flex-start;gap:14px;padding:14px;display:flex}.entity-title{font-size:20px;font-weight:800;line-height:1.25}.entity-subtitle{color:var(--muted);margin-top:4px}.summary-grid{grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px;display:grid}.about-text{color:#344054;border:1px solid var(--line);background:#fbfcfd;border-radius:8px;margin:0;padding:10px}.section-block,.action-dock,.surface{background:var(--panel);border:1px solid var(--line);border-radius:8px;min-width:0;padding:12px}.section-head{justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px;display:flex}.section-head p{color:var(--muted);margin:5px 0 0}.action-dock{gap:10px;display:grid;position:sticky;top:82px}.dock-title{color:#344054;border-bottom:1px solid var(--line);padding-bottom:4px;font-weight:800}.action-dock>.btn,.action-dock .action-stack .btn{justify-content:center;width:100%}.duration-field{gap:4px;display:grid}.duration-field span{color:var(--muted);font-size:11px;font-weight:800}.duration-field input{width:100%}.action-stack{gap:10px;display:grid}.action-stack .btn,.action-dock>.btn{min-height:42px}.danger-zone{border-top:1px solid var(--line);flex-wrap:wrap;gap:8px;margin-top:10px;padding-top:10px;display:flex}.authorization-block{gap:10px;display:grid}.authorization-table{table-layout:fixed;min-width:720px}.authorization-table th,.authorization-table td{height:46px}.device-text{text-overflow:ellipsis;max-width:260px;overflow:hidden}.device-actions-head{width:190px}.device-actions-cell{width:190px;min-width:190px}.device-actions{white-space:normal;grid-template-columns:repeat(2,minmax(82px,1fr));gap:6px;min-width:178px;display:grid}.device-actions .btn{justify-content:center;width:100%}.operation-row{grid-template-columns:repeat(2,minmax(280px,1fr));gap:10px;display:grid}.operation-box{background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px;padding:10px;display:flex}.operation-title{align-items:center;gap:6px;width:100%;font-weight:800;display:flex}.checkline{color:var(--muted);align-items:center;gap:6px;display:inline-flex}.checkline input{width:auto;height:auto}.alert{color:#8a251d;background:#fff2f0;border:1px solid #efb4ad;border-radius:8px;align-items:flex-start;gap:8px;padding:9px 10px;display:flex}.json-block{color:#d8e6f0;background:#141a22;border:1px solid #2a3542;border-radius:8px;max-height:520px;margin:0;padding:12px;font-size:12px;overflow:auto}.raw-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.loading-line{min-height:80px;color:var(--muted);place-items:center;display:grid}.empty-panel{min-height:92px;color:var(--muted);background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;place-items:center;display:grid}.modal-backdrop{z-index:10000;background:#11182785;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.modal{border:1px solid var(--line);width:min(760px,100%);max-height:min(820px,100vh - 48px);box-shadow:var(--shadow);background:#fff;border-radius:8px;padding:0;overflow:hidden}.command-modal{flex-direction:column;display:flex}.modal-head{border-bottom:1px solid var(--line);justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 18px 12px;display:flex}.icon-btn{background:var(--panel-subtle);border:1px solid var(--line);cursor:pointer;border-radius:7px;place-items:center;width:30px;height:30px;display:grid}.command-steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.command-body{gap:12px;padding:14px 18px;display:grid;overflow:auto}.command-step{min-height:38px;color:var(--muted);background:var(--panel-subtle);border:1px solid var(--line);border-radius:8px;align-items:center;gap:8px;padding:0 10px;display:flex}.command-step span{border:1px solid var(--line);background:#fff;border-radius:999px;place-items:center;width:20px;height:20px;font-size:11px;font-weight:800;display:grid}.command-step.active{color:var(--brand);border-color:#a9d8ce}.command-step.done{color:var(--good);border-color:#b9dcc7}.form-field{gap:6px;display:grid}.form-field span,.form-stack span{color:#4b5563;font-weight:800}.command-preview{gap:8px;display:grid}.command-preview .json-block{max-height:150px}.preview-head,.result-title{color:#344054;align-items:center;gap:7px;font-weight:800;display:flex}.result-box{border:1px solid var(--line);background:#fbfcfd;border-radius:8px;gap:8px;padding:10px;display:grid}.result-line{grid-template-columns:92px minmax(0,1fr);gap:8px;display:grid}.result-line span{color:var(--muted)}.result-line strong{overflow-wrap:anywhere}.result-message{color:#344054}.modal-actions{border-top:1px solid var(--line);background:#fff;justify-content:flex-end;padding:12px 18px}.login-page{background:var(--bg);place-items:center;min-height:100vh;padding:24px;display:grid}.login-panel{border:1px solid var(--line);width:min(420px,100%);box-shadow:var(--shadow);background:#fff;border-radius:8px;gap:18px;padding:22px;display:grid}.login-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.login-head-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.login-chip{min-height:24px;color:var(--brand);background:#edf7f4;border:1px solid #c9e2dc;border-radius:999px;align-items:center;padding:0 8px;font-size:12px;display:inline-flex}.login-copy h1{margin:0;font-size:22px}.login-copy p{color:var(--muted);margin:8px 0 0}.form-stack{gap:12px;display:grid}.form-stack label{gap:6px;display:grid}.form-stack input{width:100%}.boot-screen{align-content:center;place-items:center;gap:18px;min-height:100vh;display:grid}.loader-bar{background:#d7dde4;border-radius:999px;width:180px;height:4px;overflow:hidden}.loader-bar:before{content:"";background:var(--brand);width:42%;height:100%;animation:1s ease-in-out infinite load;display:block}.spin{animation:.8s linear infinite spin}@keyframes load{0%{transform:translate(-120%)}to{transform:translate(260%)}}@keyframes spin{to{transform:rotate(360deg)}}@media (width<=1120px){.shell{grid-template-columns:1fr}.sidebar{height:auto;position:static}.nav-list{grid-template-columns:repeat(4,minmax(0,1fr))}.sidebar-status{display:none}.overview-band,.split-layout,.operation-row,.raw-grid,.message-selector-grid,.message-selector-grid.single{grid-template-columns:1fr}.action-dock{position:static}}@media (width<=760px){.content,.topbar{padding-left:14px;padding-right:14px}.command-grid,.work-strip,.overview-metrics,.metric-row,.summary-grid,.command-steps{grid-template-columns:1fr}.sidebar{gap:12px;padding:14px}.nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar,.page-title-row,.entity-head{flex-direction:column;align-items:flex-start}input,.searchbox{width:100%}.toolbar{align-items:stretch}.picker-row,.selected-entity{grid-template-columns:1fr}} diff --git a/cmd/telesrv-admin/web/dist/assets/index-m3onrdER.js b/cmd/telesrv-admin/web/dist/assets/index-m3onrdER.js deleted file mode 100644 index 317d1df5..00000000 --- a/cmd/telesrv-admin/web/dist/assets/index-m3onrdER.js +++ /dev/null @@ -1,8 +0,0 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,ee=Object.prototype.hasOwnProperty,S={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function te(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)ee.call(n,i)&&!C.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,se(x);else{var t=n(l);t!==null&&ce(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(C),C=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ce(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var ee=!1,S=null,C=-1,te=5,w=-1;function ne(){return!(e.unstable_now()-we||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(C),C=-1):h=!0,ce(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,se(x))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u(),n=f();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,d=/^[: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]*$/,p={},m={};function h(e){return l.call(m,e)?!0:l.call(p,e)?!1:d.test(e)?m[e]=!0:(p[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function ee(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2s||i[o]!==a[s]){var c=` -`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(``)&&(c=c.replace(``,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{he=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?me(e):``}function _e(e){switch(e.tag){case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 2:case 15:return e=ge(e.type,!1),e;case 11:return e=ge(e.type.render,!1),e;case 1:return e=ge(e.type,!0),e;default:return``}}function ve(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case w:return`Fragment`;case te:return`Portal`;case re:return`Profiler`;case ne:return`StrictMode`;case se:return`Suspense`;case ce:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ae:return(e.displayName||`Context`)+`.Consumer`;case ie:return(e._context.displayName||`Context`)+`.Provider`;case oe:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case le:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}function ye(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ve(t);case 8:return t===ne?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function D(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function xe(e){var t=be(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Se(e){e._valueTracker||=xe(e)}function Ce(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=be(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function we(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Te(e,t){var n=t.checked;return E({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ee(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=D(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function De(e,t){t=t.checked,t!=null&&ee(e,`checked`,t,!1)}function Oe(e,t){De(e,t);var n=D(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?O(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&O(e,t.type,D(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ke(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function O(e,t,n){(t!==`number`||we(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Ae=Array.isArray;function je(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i`+t.valueOf().toString()+``,t=Re.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ve={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},He=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ve).forEach(function(e){He.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ve[t]=Ve[e]})});function Ue(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ve.hasOwnProperty(e)&&Ve[e]?(``+t).trim():t+`px`}function We(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ue(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ge=E({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ke(e,t){if(t){if(Ge[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function k(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;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 qe=null;function A(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var j=null,Je=null,Ye=null;function Xe(e){if(e=Ji(e)){if(typeof j!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Xi(t),j(e.stateNode,e.type,t))}}function Ze(e){Je?Ye?Ye.push(e):Ye=[e]:Je=e}function Qe(){if(Je){var e=Je,t=Ye;if(Ye=Je=null,Xe(e),t)for(e=0;e>>=0,e===0?32:31-(Pt(e)/Ft|0)|0}var Lt=64,Rt=4194304;function zt(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=zt(a))):r=zt(s)}else o=n&~i,o===0?a!==0&&(r=zt(a)):r=zt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Kt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function qt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=cr),dr=` `,fr=!1;function pr(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var hr=!1;function gr(e,t){switch(e){case`compositionend`:return mr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function _r(e,t){if(hr)return e===`compositionend`||!sr&&pr(e,t)?(e=jn(),An=kn=On=null,hr=!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)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=zr(n)}}function Vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(){for(var e=window,t=we();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=we(e.document)}return t}function Ur(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`)}function Wr(e){var t=Hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Vr(n.ownerDocument.documentElement,n)){if(r!==null&&Ur(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Br(n,a);var o=Br(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n=document.documentMode,Kr=null,qr=null,Jr=null,Yr=!1;function Xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yr||Kr==null||Kr!==we(r)||(r=Kr,`selectionStart`in r&&Ur(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jr&&Rr(Jr,r)||(Jr=r,r=xi(qr,`onSelect`),0Qi||(e.current=Zi[Qi],Zi[Qi]=null,Qi--)}function I(e,t){Qi++,Zi[Qi]=e.current,e.current=t}var ea={},L=$i(ea),ta=$i(!1),na=ea;function ra(e,t){var n=e.type.contextTypes;if(!n)return ea;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ia(e){return e=e.childContextTypes,e!=null}function aa(){F(ta),F(L)}function oa(e,t,n){if(L.current!==ea)throw Error(r(168));I(L,t),I(ta,n)}function sa(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ye(e)||`Unknown`,a));return E({},n,i)}function ca(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ea,na=L.current,I(L,e),I(ta,ta.current),!0}function la(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=sa(e,t,na),i.__reactInternalMemoizedMergedChildContext=e,F(ta),F(L),I(L,e)):F(ta),I(ta,n)}var ua=null,da=!1,fa=!1;function pa(e){ua===null?ua=[e]:ua.push(e)}function ma(e){da=!0,pa(e)}function ha(){if(!fa&&ua!==null){fa=!0;var e=0,t=N;try{var n=ua;for(N=1;e>=o,i-=o,Ca=1<<32-Nt(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),R&&Ta(r,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&Ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&Ta(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),R&&Ta(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===w&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===w){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===le&&Wa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ha(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===w?(r=Zl(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=Xl(i.type,i.key,i.props,null,e.mode,o),o.ref=Ha(e,r,i),o.return=e,e=o)}return s(e);case te:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=eu(i,e.mode,o),r.return=e,e=r}return s(e);case le:return l=i._init,_(e,r,l(i._payload),o)}if(Ae(i))return h(e,r,i,o);if(fe(i))return g(e,r,i,o);Ua(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=$l(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ka=Ga(!0),qa=Ga(!1),Ja=$i(null),Ya=null,Xa=null,Za=null;function Qa(){Za=Xa=Ya=null}function $a(e){var t=Ja.current;F(Ja),e._currentValue=t}function eo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function to(e,t){Ya=e,Za=Xa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Bs=!0),e.firstContext=null)}function no(e){var t=e._currentValue;if(Za!==e)if(e={context:e,memoizedValue:t,next:null},Xa===null){if(Ya===null)throw Error(r(308));Xa=e,Ya.dependencies={lanes:0,firstContext:e}}else Xa=Xa.next=e;return t}var ro=null;function io(e){ro===null?ro=[e]:ro.push(e)}function ao(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,io(t)):(n.next=i.next,i.next=n),t.interleaved=n,oo(e,r)}function oo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,oo(e,n)}return i=r.interleaved,i===null?(t.next=t,io(r)):(t.next=i.next,i.next=t),r.interleaved=t,oo(e,n)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}function mo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ho(e,t,n,r){var i=e.updateQueue;so=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:so=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Yc|=o,e.lanes=o,e.memoizedState=d}}function go(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ao.transition;Ao.transition={};try{e(!1),t()}finally{N=n,Ao.transition=r}}function ps(){return Bo().memoizedState}function ms(e,t,n){var r=ml(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gs(e))_s(t,n);else if(n=ao(e,t,n,r),n!==null){var i=pl();hl(n,e,r,i),vs(n,t,r)}}function hs(e,t,n){var r=ml(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gs(e))_s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o)){var c=t.interleaved;c===null?(i.next=i,io(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=ao(e,t,i,r),n!==null&&(i=pl(),hl(n,e,r,i),vs(n,t,r))}}function gs(e){var t=e.alternate;return e===B||t!==null&&t===B}function _s(e,t){No=Mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}var ys={readContext:no,useCallback:U,useContext:U,useEffect:U,useImperativeHandle:U,useInsertionEffect:U,useLayoutEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useMutableSource:U,useSyncExternalStore:U,useId:U,unstable_isNewReconciler:!1},bs={readContext:no,useCallback:function(e,t){return zo().memoizedState=[e,t===void 0?null:t],e},useContext:no,useEffect:ns,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),es(4194308,4,os.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){return es(4,2,e,t)},useMemo:function(e,t){var n=zo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=zo();return e={current:e},t.memoizedState=e},useState:Zo,useDebugValue:cs,useDeferredValue:function(e){return zo().memoizedState=e},useTransition:function(){var e=Zo(!1),t=e[0];return e=fs.bind(null,e[1]),zo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=B,a=zo();if(R){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Y===null)throw Error(r(349));jo&30||Ko(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ns(Jo.bind(null,i,o,e),[e]),i.flags|=2048,Qo(9,qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=zo(),t=Y.identifierPrefix;if(R){var n=wa,r=Ca;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Po++,0<\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Vi]=t,e[Hi]=i,uc(e,t,!1,!1),t.stateNode=e;a:{switch(c=k(n,i),n){case`dialog`:P(`cancel`,e),P(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:P(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;otl&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Eo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!R)return W(t),null}else 2*M()-s.renderingStartTime>tl&&n!==1073741824&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(W(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=M(),t.sibling=null,n=z.current,I(z,i?n&1|2:n&1),t);case 22:case 23:return Tl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Kc&1073741824&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function hc(e,t){switch(Oa(t),t.tag){case 1:return ia(t.type)&&aa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),F(ta),F(L),Oo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return To(t),null;case 13:if(F(z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(z),null;case 4:return Co(),null;case 10:return $a(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var gc=!1,G=!1,_c=typeof WeakSet==`function`?WeakSet:Set,K=null;function vc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){$(e,t,n)}else n.current=null}function yc(e,t,n){try{n()}catch(n){$(e,t,n)}}var bc=!1;function xc(e,t){if(ki=xn,e=Hr(),Ur(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ai={focusedElem:e,selectionRange:n},xn=!1,K=t;K!==null;)if(t=K,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Cs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){$(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return h=bc,bc=!1,h}function Sc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&yc(t,n,a)}i=i.next}while(i!==r)}}function Cc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Tc(e){var t=e.alternate;t!==null&&(e.alternate=null,Tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vi],delete t[Hi],delete t[Wi],delete t[Gi],delete t[Ki])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Dc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(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.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Oc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Oi));else if(r!==4&&(e=e.child,e!==null))for(Oc(e,t,n),e=e.sibling;e!==null;)Oc(e,t,n),e=e.sibling}function kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(kc(e,t,n),e=e.sibling;e!==null;)kc(e,t,n),e=e.sibling}var q=null,Ac=!1;function jc(e,t,n){for(n=n.child;n!==null;)Mc(e,t,n),n=n.sibling}function Mc(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount==`function`)try{jt.onCommitFiberUnmount(At,n)}catch{}switch(n.tag){case 5:G||vc(n,t);case 6:var r=q,i=Ac;q=null,jc(e,t,n),q=r,Ac=i,q!==null&&(Ac?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(Ac?(e=q,n=n.stateNode,e.nodeType===8?Li(e.parentNode,n):e.nodeType===1&&Li(e,n),yn(e)):Li(q,n.stateNode));break;case 4:r=q,i=Ac,q=n.stateNode.containerInfo,Ac=!0,jc(e,t,n),q=r,Ac=i;break;case 0:case 11:case 14:case 15:if(!G&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&yc(n,t,o),i=i.next}while(i!==r)}jc(e,t,n);break;case 1:if(!G&&(vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){$(n,t,e)}jc(e,t,n);break;case 21:jc(e,t,n);break;case 22:n.mode&1?(G=(r=G)||n.memoizedState!==null,jc(e,t,n),G=r):jc(e,t,n);break;default:jc(e,t,n)}}function Nc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _c),t.forEach(function(t){var r=Hl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Pc(e,t){var n=t.deletions;if(n!==null)for(var i=0;ia&&(a=s),i&=~o}if(i=a,i=M()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Hc(i/1960))-i,10e?16:e,sl===null)var i=!1;else{if(e=sl,sl=null,cl=0,J&6)throw Error(r(331));var a=J;for(J|=4,K=e.current;K!==null;){var o=K,s=o.child;if(K.flags&16){var c=o.deletions;if(c!==null){for(var l=0;lM()-el?El(e,0):Zc|=n),gl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Rt,Rt<<=1,!(Rt&130023424)&&(Rt=4194304)):t=1);var n=pl();e=oo(e,t),e!==null&&(Kt(e,t,n),gl(e,n))}function Vl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bl(e,n)}function Hl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Bl(e,n)}var Ul=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ta.current)Bs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Bs=!1,lc(e,t,n);Bs=!!(e.flags&131072)}else Bs=!1,R&&t.flags&1048576&&Ea(t,ya,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;sc(e,t),e=t.pendingProps;var a=ra(t,L.current);to(t,n),a=Lo(null,t,i,e,a,n);var o=Ro();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ia(i)?(o=!0,ca(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,co(t),a.updater=Ts,t.stateNode=a,a._reactInternals=t,ks(t,i,e,n),t=Ys(null,t,i,!0,o,n)):(t.tag=0,R&&o&&Da(t),Vs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(sc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=Cs(i,e),a){case 0:t=qs(null,t,i,e,n);break a;case 1:t=Js(null,t,i,e,n);break a;case 11:t=Hs(null,t,i,e,n);break a;case 14:t=Us(null,t,i,Cs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Js(e,t,i,a,n);case 3:a:{if(Xs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,lo(e,t),ho(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=As(Error(r(423)),t),t=Zs(e,t,i,n,a);break a}else if(i!==a){a=As(Error(r(424)),t),t=Zs(e,t,i,n,a);break a}else for(Aa=Ri(t.stateNode.containerInfo.firstChild),ka=t,R=!0,ja=null,n=qa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(za(),i===a){t=cc(e,t,n);break a}Vs(e,t,i,n)}t=t.child}return t;case 5:return wo(t),e===null&&Fa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,ji(i,a)?s=null:o!==null&&ji(i,o)&&(t.flags|=32),Ks(e,t),Vs(e,t,s,n),t.child;case 6:return e===null&&Fa(t),null;case 13:return ec(e,t,n);case 4:return So(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ka(t,null,i,n):Vs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Hs(e,t,i,a,n);case 7:return Vs(e,t,t.pendingProps,n),t.child;case 8:return Vs(e,t,t.pendingProps.children,n),t.child;case 12:return Vs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,I(Ja,i._currentValue),i._currentValue=s,o!==null)if(Lr(o.value,s)){if(o.children===a.children&&!ta.current){t=cc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=uo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),eo(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),eo(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Vs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,to(t,n),a=no(a),i=i(a),t.flags|=1,Vs(e,t,i,n),t.child;case 14:return i=t.type,a=Cs(i,t.pendingProps),a=Cs(i.type,a),Us(e,t,i,a,n);case 15:return Ws(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),sc(e,t),t.tag=1,ia(i)?(e=!0,ca(t)):e=!1,to(t,n),Ds(t,i,a),ks(t,i,a,n),Ys(null,t,i,!0,e,n);case 19:return oc(e,t,n);case 22:return Gs(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return bt(e,t)}function Gl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kl(e,t,n,r){return new Gl(e,t,n,r)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jl(e){if(typeof e==`function`)return+!!ql(e);if(e!=null){if(e=e.$$typeof,e===oe)return 11;if(e===T)return 14}return 2}function Yl(e,t){var n=e.alternate;return n===null?(n=Kl(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&14680064,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}function Xl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ql(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case w:return Zl(n.children,a,o,t);case ne:s=8,a|=8;break;case re:return e=Kl(12,n,t,a|2),e.elementType=re,e.lanes=o,e;case se:return e=Kl(13,n,t,a),e.elementType=se,e.lanes=o,e;case ce:return e=Kl(19,n,t,a),e.elementType=ce,e.lanes=o,e;case ue:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case ie:s=10;break a;case ae:s=9;break a;case oe:s=11;break a;case T:s=14;break a;case le:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Kl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Zl(e,t,n,r){return e=Kl(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Kl(22,e,r,t),e.elementType=ue,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=Kl(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Kl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gt(0),this.expirationTimes=Gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,i,a,o,s,c){return e=new tu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},co(a),e}function ru(e,t,n){var r=3{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=m();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),g=c(u()),_=c(h(),1),v=class extends Error{status;constructor(e,t){super(t),this.status=e}};async function y(e,t={}){let n=await fetch(e,{credentials:`same-origin`,headers:{"Content-Type":`application/json`,...t.headers??{}},...t}),r=await n.text(),i=r?JSON.parse(r):null;if(!n.ok){let e=i?.error||i?.Error||i?.message||n.statusText;throw new v(n.status,e)}return i}function b(e){return e instanceof Error?e.message:String(e)}var x={session:()=>y(`/api/session`),login:e=>y(`/api/login`,{method:`POST`,body:JSON.stringify({secret:e})}),logout:()=>y(`/api/logout`,{method:`POST`,body:`{}`}),accounts:e=>y(`/api/accounts?${e.toString()}`),account:e=>y(`/api/accounts/${e}`),channels:e=>y(`/api/channels?${e.toString()}`),channel:e=>y(`/api/channels/${e}`),messages:e=>y(`/api/messages?${e.toString()}`),message:(e,t)=>y(`/api/messages/detail?${new URLSearchParams({owner_user_id:String(e),msg_id:String(t)}).toString()}`),groupMessages:e=>y(`/api/messages/groups?${e.toString()}`),groupMessage:(e,t)=>y(`/api/messages/groups/detail?${new URLSearchParams({channel_id:String(e),msg_id:String(t)}).toString()}`),action:(e,t)=>y(e,{method:`POST`,body:JSON.stringify(t)})},ee=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),C={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},te=(0,g.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,g.createElement)(`svg`,{ref:c,...C,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:S(`lucide`,i),...s},[...o.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(a)?a:[a]])),w=(e,t)=>{let n=(0,g.forwardRef)(({className:n,...r},i)=>(0,g.createElement)(te,{ref:i,iconNode:t,className:S(`lucide-${ee(e)}`,n),...r}));return n.displayName=`${e}`,n},ne=w(`BadgeCheck`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),re=w(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),ie=w(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ae=w(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),oe=w(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),se=w(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),ce=w(`Cable`,[[`path`,{d:`M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1`,key:`10bnsj`}],[`path`,{d:`M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9`,key:`1eqmu1`}],[`path`,{d:`M21 21v-2h-4`,key:`14zm7j`}],[`path`,{d:`M3 5h4V3`,key:`z442eg`}],[`path`,{d:`M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3`,key:`ebdjd7`}]]),T=w(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),le=w(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ue=w(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),de=w(`Clock3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16.5 12`,key:`1aq6pp`}]]),fe=w(`Database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),E=w(`FileJson`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),pe=w(`History`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),me=w(`KeyRound`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),he=w(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ge=w(`LogOut`,[[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}],[`polyline`,{points:`16 17 21 12 16 7`,key:`1gabdz`}],[`line`,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,key:`1uyos4`}]]),_e=w(`MessageSquareText`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M13 8H7`,key:`14i4kc`}],[`path`,{d:`M17 12H7`,key:`16if0g`}]]),ve=w(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),ye=w(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),D=w(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),be=w(`Server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),xe=w(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Se=w(`Shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Ce=w(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),we=w(`Users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`1da9ce`}]]),Te=w(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Ee(){return{href:`${window.location.pathname}${window.location.search}`,path:window.location.pathname,search:new URLSearchParams(window.location.search)}}function De(e){return e.startsWith(`/accounts`)?`账号管理`:e.startsWith(`/channels`)?`超级群与频道`:e.startsWith(`/messages`)?`消息审计`:`运维控制台`}function Oe(e){return e.startsWith(`/accounts`)?`控制台 / 账号`:e.startsWith(`/channels`)?`控制台 / 频道`:e.startsWith(`/messages`)?`控制台 / 消息`:`控制台 / 总览`}var ke=o((e=>{var t=u(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),O=o(((e,t)=>{t.exports=ke()}))();function Ae({href:e,navigate:t,className:n,children:r}){return(0,O.jsx)(`a`,{className:n,href:e,onClick:n=>{n.preventDefault(),t(e)},children:r})}function je(){return(0,O.jsxs)(`div`,{className:`boot-screen`,children:[(0,O.jsxs)(`div`,{className:`brand compact brand-elevated`,children:[(0,O.jsx)(`span`,{className:`brand-mark`,children:`T`}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:`telesrv`}),(0,O.jsx)(`small`,{children:`管理控制台`})]})]}),(0,O.jsx)(`div`,{className:`loader-bar`})]})}function Me({actor:e,route:t,navigate:n,onLogout:r,children:i}){let a=t.path.startsWith(`/messages`),[o,s]=(0,g.useState)(a);(0,g.useEffect)(()=>{a&&s(!0)},[a]);async function c(){await x.logout().catch(()=>void 0),r()}return(0,O.jsxs)(`div`,{className:`shell`,children:[(0,O.jsxs)(`aside`,{className:`sidebar`,children:[(0,O.jsxs)(Ae,{className:`brand`,href:`/`,navigate:n,children:[(0,O.jsx)(`span`,{className:`brand-mark`,children:`T`}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:`telesrv`}),(0,O.jsx)(`small`,{children:`管理控制台`})]})]}),(0,O.jsx)(`div`,{className:`sidebar-label`,children:`导航`}),(0,O.jsxs)(`nav`,{className:`nav-list`,"aria-label":`主导航`,children:[(0,O.jsx)(Ne,{icon:(0,O.jsx)(he,{size:16}),href:`/`,route:t,navigate:n,children:`总览`}),(0,O.jsx)(Ne,{icon:(0,O.jsx)(we,{size:16}),href:`/accounts`,route:t,navigate:n,children:`账号`}),(0,O.jsx)(Ne,{icon:(0,O.jsx)(xe,{size:16}),href:`/channels`,route:t,navigate:n,children:`超级群/频道`}),(0,O.jsxs)(`div`,{className:`nav-section ${a?`active`:``} ${o?`open`:``}`,children:[(0,O.jsxs)(`button`,{className:`nav-section-toggle`,type:`button`,"aria-expanded":o,onClick:()=>s(e=>!e),children:[(0,O.jsx)(_e,{size:16}),(0,O.jsx)(`span`,{children:`消息`}),(0,O.jsx)(le,{className:`nav-section-chevron`,size:15})]}),o&&(0,O.jsxs)(`div`,{className:`nav-children`,children:[(0,O.jsx)(Ne,{href:`/messages/private`,route:t,navigate:n,activeWhen:e=>e===`/messages`||e===`/messages/detail`||e.startsWith(`/messages/private`),children:`私聊`}),(0,O.jsx)(Ne,{href:`/messages/groups`,route:t,navigate:n,activeWhen:e=>e.startsWith(`/messages/groups`),children:`群聊`})]})]})]}),(0,O.jsxs)(`div`,{className:`sidebar-status`,children:[(0,O.jsx)(`div`,{className:`sidebar-label`,children:`运行状态`}),(0,O.jsxs)(`div`,{className:`runtime-row`,children:[(0,O.jsx)(be,{size:14}),(0,O.jsx)(`span`,{children:`管理后台`}),(0,O.jsx)(`strong`,{children:`就绪`})]}),(0,O.jsxs)(`div`,{className:`runtime-row`,children:[(0,O.jsx)(fe,{size:14}),(0,O.jsx)(`span`,{children:`PG 读取`}),(0,O.jsx)(`strong`,{children:`只读`})]}),(0,O.jsxs)(`div`,{className:`runtime-row`,children:[(0,O.jsx)(Se,{size:14}),(0,O.jsx)(`span`,{children:`写操作`}),(0,O.jsx)(`strong`,{children:`预演`})]})]})]}),(0,O.jsxs)(`div`,{className:`workspace`,children:[(0,O.jsxs)(`header`,{className:`topbar`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`eyebrow`,children:Oe(t.path)}),(0,O.jsx)(`h1`,{children:De(t.path)})]}),(0,O.jsxs)(`div`,{className:`topbar-actions`,children:[(0,O.jsxs)(`span`,{className:`actor-pill`,children:[`操作者:`,e]}),(0,O.jsxs)(`button`,{className:`btn ghost icon-text`,type:`button`,onClick:c,title:`退出`,children:[(0,O.jsx)(ge,{size:16}),` 退出`]})]})]}),(0,O.jsx)(`main`,{className:`content`,children:i})]})]})}function Ne({href:e,route:t,navigate:n,icon:r,children:i,activeWhen:a}){return(0,O.jsxs)(Ae,{className:`nav-item ${(a?a(t.path):e===`/`?t.path===`/`:t.path.startsWith(e))?`active`:``}`,href:e,navigate:n,children:[r??(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`nav-dot`}),(0,O.jsx)(`span`,{children:i})]})}function Pe(e){let t=e.trim();return!t||t.startsWith(`+`)?t:/^\d+$/.test(t)?`+${t}`:t}function Fe(e){let t=e.trim();return t?t.startsWith(`@`)?t:`@${t}`:``}function Ie(e){return`${e.FirstName||``} ${e.LastName||``}`.trim()||`-`}function Le(e){return e.Broadcast&&!e.Megagroup?`频道`:e.Megagroup&&e.Forum?`超级群/论坛`:e.Megagroup?`超级群`:`频道/群`}function Re(e){if(!e||e.startsWith(`0001-`))return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString()}function ze(e){if(!e||e<=0)return``;let t=new Date(e*1e3);return Number.isNaN(t.getTime())?``:t.toLocaleString()}function Be(e){if(!e.trim())return 0;let t=Number.parseInt(e,10);return Number.isFinite(t)?t:0}function Ve(e){let t=e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean).map(e=>Number.parseInt(e,10));if(t.length===0||t.some(e=>!Number.isFinite(e)||e<=0))throw Error(`msg ids invalid`);return t}function He({title:e,eyebrow:t,children:n,actions:r}){return(0,O.jsxs)(`div`,{className:`page-frame`,children:[(0,O.jsxs)(`div`,{className:`page-title-row`,children:[(0,O.jsxs)(`div`,{children:[t&&(0,O.jsx)(`div`,{className:`eyebrow`,children:t}),(0,O.jsx)(`h2`,{children:e})]}),r&&(0,O.jsx)(`div`,{className:`page-actions`,children:r})]}),n]})}function Ue({children:e}){return(0,O.jsx)(`div`,{className:`query-panel`,children:e})}function We({main:e,side:t}){return(0,O.jsxs)(`div`,{className:`split-layout`,children:[(0,O.jsx)(`div`,{className:`split-main`,children:e}),(0,O.jsx)(`aside`,{className:`split-side`,children:t})]})}function Ge({title:e,text:t,action:n}){return(0,O.jsxs)(`div`,{className:`section-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{children:e}),t&&(0,O.jsx)(`p`,{children:t})]}),n&&(0,O.jsx)(`div`,{className:`section-action`,children:n})]})}function Ke({children:e}){return(0,O.jsxs)(`div`,{className:`alert`,children:[(0,O.jsx)(re,{size:16}),` `,(0,O.jsx)(`span`,{children:e})]})}function k({children:e,tone:t=`neutral`}){return(0,O.jsx)(`span`,{className:`badge ${t}`,children:e})}function qe({label:e,value:t,tone:n}){return(0,O.jsxs)(`div`,{className:`status-item ${n}`,children:[(0,O.jsx)(`span`,{children:e}),(0,O.jsx)(`strong`,{children:t})]})}function A({label:e,value:t,tone:n=`neutral`,mono:r=!1}){return(0,O.jsxs)(`div`,{className:`metric ${n}`,children:[(0,O.jsx)(`span`,{children:e}),(0,O.jsx)(`strong`,{className:r?`mono`:``,children:t})]})}function j({label:e,value:t,mono:n=!1}){return(0,O.jsxs)(`div`,{className:`summary-item`,children:[(0,O.jsx)(`span`,{children:e}),(0,O.jsx)(`strong`,{className:n?`mono`:``,children:t})]})}function Je({rows:e}){return(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`ID`}),(0,O.jsx)(`th`,{children:`命令 ID`}),(0,O.jsx)(`th`,{children:`动作`}),(0,O.jsx)(`th`,{children:`操作者`}),(0,O.jsx)(`th`,{children:`状态`}),(0,O.jsx)(`th`,{children:`预演`}),(0,O.jsx)(`th`,{children:`原因`}),(0,O.jsx)(`th`,{children:`时间`})]})}),(0,O.jsxs)(`tbody`,{children:[e.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:e.ID}),(0,O.jsx)(`td`,{className:`mono`,children:e.CommandID}),(0,O.jsx)(`td`,{children:e.Action}),(0,O.jsx)(`td`,{children:e.Actor}),(0,O.jsx)(`td`,{children:e.Status}),(0,O.jsx)(`td`,{children:e.DryRun?`是`:`否`}),(0,O.jsx)(`td`,{className:`truncate`,children:e.Reason}),(0,O.jsx)(`td`,{children:Re(e.CreatedAt)})]},e.ID)),e.length===0&&(0,O.jsx)(Ye,{colSpan:8})]})]})})}function Ye({colSpan:e}){return(0,O.jsx)(`tr`,{children:(0,O.jsx)(`td`,{colSpan:e,className:`empty-cell`,children:`无结果`})})}function Xe({label:e}){return(0,O.jsx)(`section`,{className:`surface`,children:(0,O.jsx)(`div`,{className:`loading-line`,children:e})})}function Ze({value:e}){return(0,O.jsx)(`pre`,{className:`json-block`,children:e||`{}`})}function Qe({onLogin:e}){let[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(!1);async function s(n){n.preventDefault(),o(!0),i(``);try{e((await x.login(t)).actor)}catch(e){i(b(e))}finally{o(!1)}}return(0,O.jsx)(`main`,{className:`login-page`,children:(0,O.jsxs)(`section`,{className:`login-panel`,children:[(0,O.jsxs)(`div`,{className:`login-head`,children:[(0,O.jsxs)(`div`,{className:`brand brand-elevated`,children:[(0,O.jsx)(`span`,{className:`brand-mark`,children:`T`}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:`telesrv`}),(0,O.jsx)(`small`,{children:`管理控制台`})]})]}),(0,O.jsx)(`span`,{className:`login-chip`,children:`本地访问`})]}),(0,O.jsxs)(`div`,{className:`login-copy`,children:[(0,O.jsx)(`h1`,{children:`运维后台`}),(0,O.jsx)(`p`,{children:`输入凭据后进入控制台。`})]}),r&&(0,O.jsx)(Ke,{children:r}),(0,O.jsxs)(`form`,{className:`form-stack`,onSubmit:s,children:[(0,O.jsxs)(`label`,{children:[(0,O.jsx)(`span`,{children:`管理员密码或 token`}),(0,O.jsx)(`input`,{autoFocus:!0,type:`password`,value:t,autoComplete:`current-password`,onChange:e=>n(e.target.value)})]}),(0,O.jsx)(`button`,{className:`btn primary full`,type:`submit`,disabled:a,children:a?`登录中`:`登录`})]})]})})}var $e=m();function et({label:e,path:t,payload:n,icon:r,compact:i=!1,tone:a=`danger`,onDone:o}){let[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``),[d,f]=(0,g.useState)(null),[p,m]=(0,g.useState)(``),[h,_]=(0,g.useState)(!1);function v(){u(``),f(null),m(``)}async function y(e){if(!l.trim()){m(`请填写操作原因`);return}_(!0),m(``);try{let r={...n(),reason:l,confirm:e};f(await x.action(t,r)),e&&o?.()}catch(e){m(b(e))}finally{_(!1)}}let ee=d?.dry_run&&!d.error,S=`btn ${a===`danger`?`danger`:a===`warn`?`warn`:``} ${i?`compact-btn`:``}`,C=(0,g.useMemo)(()=>{try{return n()}catch(e){return{payload_error:b(e)}}},[s,n]);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{className:S,type:`button`,onClick:()=>{v(),c(!0)},children:[r,e]}),s&&(0,$e.createPortal)((0,O.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,O.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":e,children:[(0,O.jsxs)(`div`,{className:`modal-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`eyebrow`,children:`操作流程`}),(0,O.jsx)(`h2`,{children:e})]}),(0,O.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:()=>c(!1),"aria-label":`关闭`,children:(0,O.jsx)(Te,{size:15})})]}),(0,O.jsxs)(`div`,{className:`command-body`,children:[(0,O.jsxs)(`div`,{className:`command-steps`,children:[(0,O.jsxs)(`div`,{className:`command-step ${l.trim()?`done`:`active`}`,children:[(0,O.jsx)(`span`,{children:`1`}),(0,O.jsx)(`strong`,{children:`填写原因`})]}),(0,O.jsxs)(`div`,{className:`command-step ${d?.dry_run?`done`:l.trim()?`active`:``}`,children:[(0,O.jsx)(`span`,{children:`2`}),(0,O.jsx)(`strong`,{children:`预演检查`})]}),(0,O.jsxs)(`div`,{className:`command-step ${d&&!d.dry_run&&!d.error?`done`:ee?`active`:``}`,children:[(0,O.jsx)(`span`,{children:`3`}),(0,O.jsx)(`strong`,{children:`确认执行`})]})]}),(0,O.jsxs)(`label`,{className:`form-field`,children:[(0,O.jsx)(`span`,{children:`操作原因`}),(0,O.jsx)(`textarea`,{value:l,onChange:e=>u(e.target.value),rows:3,placeholder:`说明本次操作原因`})]}),(0,O.jsxs)(`div`,{className:`command-preview`,children:[(0,O.jsxs)(`div`,{className:`preview-head`,children:[(0,O.jsx)(E,{size:14}),` 请求预览`]}),(0,O.jsx)(Ze,{value:JSON.stringify(C,null,2)})]}),p&&(0,O.jsx)(Ke,{children:p}),d&&(0,O.jsxs)(`div`,{className:`result-box`,children:[(0,O.jsxs)(`div`,{className:`result-title`,children:[d.error?(0,O.jsx)(re,{size:16}):(0,O.jsx)(ie,{size:16}),(0,O.jsx)(`strong`,{children:d.message||d.error||`操作结果`})]}),(0,O.jsxs)(`div`,{className:`result-line`,children:[(0,O.jsx)(`span`,{children:`命令 ID`}),(0,O.jsx)(`strong`,{children:d.command_id})]}),(0,O.jsxs)(`div`,{className:`result-line`,children:[(0,O.jsx)(`span`,{children:`状态`}),(0,O.jsx)(`strong`,{children:d.status})]}),(0,O.jsxs)(`div`,{className:`result-line`,children:[(0,O.jsx)(`span`,{children:`预演`}),(0,O.jsx)(`strong`,{children:d.dry_run?`是`:`否`})]}),(0,O.jsx)(`div`,{className:`result-message`,children:d.message||d.error}),d.details&&(0,O.jsx)(Ze,{value:JSON.stringify(d.details,null,2)})]})]}),(0,O.jsxs)(`div`,{className:`modal-actions`,children:[(0,O.jsx)(`button`,{className:`btn`,type:`button`,onClick:()=>c(!1),children:`关闭`}),(0,O.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>y(!1),disabled:h,children:[h?(0,O.jsx)(ae,{size:15,className:`spin`}):(0,O.jsx)(ve,{size:15}),d?`重新预演`:`先预演`]}),(0,O.jsxs)(`button`,{className:`btn danger icon-text`,type:`button`,onClick:()=>y(!0),disabled:h||!ee,children:[(0,O.jsx)(ie,{size:15}),`确认执行`]})]})]})}),document.body)]})}function tt({rows:e,userID:t,onDone:n}){let[r,i]=(0,g.useState)(()=>new Set);(0,g.useEffect)(()=>{i(new Set)},[t]);let a=(0,g.useMemo)(()=>e.filter(e=>!r.has(e.Hash)),[e,r]);function o(e){i(t=>e(t)),n()}return(0,O.jsxs)(`div`,{className:`authorization-block`,children:[(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table authorization-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`设备`}),(0,O.jsx)(`th`,{children:`平台`}),(0,O.jsx)(`th`,{children:`IP`}),(0,O.jsx)(`th`,{children:`最近活跃`}),(0,O.jsx)(`th`,{className:`device-actions-head`,children:`操作`})]})}),(0,O.jsxs)(`tbody`,{children:[a.map(n=>(0,O.jsxs)(`tr`,{children:[(0,O.jsxs)(`td`,{className:`device-text`,children:[n.DeviceModel,` `,n.SystemVersion]}),(0,O.jsxs)(`td`,{className:`device-text`,children:[n.Platform,` `,n.AppVersion]}),(0,O.jsx)(`td`,{children:n.IP}),(0,O.jsx)(`td`,{children:Re(n.ActiveAt)}),(0,O.jsx)(`td`,{className:`device-actions-cell`,children:(0,O.jsxs)(`div`,{className:`device-actions`,children:[(0,O.jsx)(et,{label:`撤销当前`,icon:(0,O.jsx)(ge,{size:13}),compact:!0,path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,hash:n.Hash}),onDone:()=>o(e=>new Set([...e,n.Hash]))}),(0,O.jsx)(et,{label:`保留当前`,icon:(0,O.jsx)(xe,{size:13}),compact:!0,path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,keep_hash:n.Hash}),onDone:()=>o(()=>new Set(e.filter(e=>e.Hash!==n.Hash).map(e=>e.Hash)))})]})})]},n.Hash)),a.length===0&&(0,O.jsx)(Ye,{colSpan:5})]})]})}),(0,O.jsx)(`div`,{className:`danger-zone`,children:(0,O.jsx)(et,{label:`撤销全部设备`,icon:(0,O.jsx)(ce,{size:15}),path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,revoke_all:!0}),onDone:()=>o(()=>new Set(e.map(e=>e.Hash)))})})]})}function nt({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(`1`);async function u(){s(!0),a(``);try{r(await x.account(e))}catch(e){a(b(e))}finally{s(!1)}}if((0,g.useEffect)(()=>{u()},[e]),i)return(0,O.jsx)(Ke,{children:i});if(!n)return(0,O.jsx)(Xe,{label:o?`加载账号详情`:`等待数据`});let d=n.Account;return(0,O.jsx)(He,{title:`账号 #${d.ID}`,eyebrow:`账号档案`,actions:(0,O.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/accounts`),children:[(0,O.jsx)(se,{size:15}),` 返回列表`]}),children:(0,O.jsx)(We,{main:(0,O.jsxs)(`div`,{className:`stacked-sections`,children:[(0,O.jsxs)(`section`,{className:`entity-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`entity-title`,children:Ie(d)}),(0,O.jsxs)(`div`,{className:`entity-subtitle`,children:[Fe(d.Username)||`无用户名`,` · `,Pe(d.Phone)||`无手机号`]})]}),(0,O.jsxs)(`div`,{className:`entity-badges`,children:[d.PremiumUntil>0?(0,O.jsx)(k,{tone:`good`,children:`会员`}):(0,O.jsx)(k,{children:`非会员`}),n.Verified?(0,O.jsx)(k,{tone:`good`,children:`已认证`}):(0,O.jsx)(k,{children:`未认证`}),d.Frozen?(0,O.jsx)(k,{tone:`danger`,children:`发消息冻结`}):(0,O.jsx)(k,{children:`发送正常`})]})]}),(0,O.jsxs)(`div`,{className:`summary-grid`,children:[(0,O.jsx)(j,{label:`用户 ID`,value:String(d.ID),mono:!0}),(0,O.jsx)(j,{label:`最后在线`,value:ze(n.LastSeenAt)||`-`}),(0,O.jsx)(j,{label:`会员到期`,value:d.PremiumUntil>0?ze(d.PremiumUntil):`无`}),(0,O.jsx)(j,{label:`更新时间`,value:Re(d.UpdatedAt)||`-`}),(0,O.jsx)(j,{label:`授权设备`,value:String(n.Authorizations.length)}),(0,O.jsx)(j,{label:`账号标记`,value:`support=${n.Support} bot=${n.Bot}`}),(0,O.jsx)(j,{label:`限制状态`,value:n.HasRestriction?n.Restriction.Reason||`已限制`:`无`}),(0,O.jsx)(j,{label:`创建时间`,value:Re(d.CreatedAt)||`-`})]}),n.About&&(0,O.jsx)(`p`,{className:`about-text`,children:n.About}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`授权设备`,text:`共 ${n.Authorizations.length} 个授权`}),(0,O.jsx)(tt,{rows:n.Authorizations,userID:d.ID,onDone:u})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`最近后台操作`,text:`最近 30 条审计`}),(0,O.jsx)(Je,{rows:n.AuditLogs})]})]}),side:(0,O.jsxs)(`section`,{className:`action-dock`,children:[(0,O.jsx)(`div`,{className:`dock-title`,children:`账号操作`}),(0,O.jsx)(et,{label:d.Frozen?`解冻发消息`:`冻结发消息`,icon:(0,O.jsx)(re,{size:15}),path:`/api/actions/freeze-send`,payload:()=>({user_id:d.ID,frozen:!d.Frozen}),onDone:u}),(0,O.jsxs)(`label`,{className:`duration-field`,children:[(0,O.jsx)(`span`,{children:`会员时长(月)`}),(0,O.jsx)(`input`,{"aria-label":`设置会员时长,单位月`,value:c,onChange:e=>l(e.target.value),type:`number`,min:`1`,max:`120`})]}),(0,O.jsxs)(`div`,{className:`action-stack`,children:[(0,O.jsx)(et,{label:`设置会员`,icon:(0,O.jsx)(oe,{size:15}),tone:`warn`,path:`/api/actions/grant-premium`,payload:()=>({user_id:d.ID,months:Be(c)}),onDone:u}),(0,O.jsx)(et,{label:`取消会员`,icon:(0,O.jsx)(oe,{size:15}),tone:`warn`,path:`/api/actions/grant-premium`,payload:()=>({user_id:d.ID,months:0}),onDone:u}),(0,O.jsx)(et,{label:n.Verified?`取消认证`:`设置认证`,icon:(0,O.jsx)(ne,{size:15}),tone:`warn`,path:`/api/actions/set-verified`,payload:()=>({user_id:d.ID,verified:!n.Verified}),onDone:u})]})]})})})}function rt(e){return e.reduce((e,t)=>(e.devices+=t.DeviceCount,t.PremiumUntil>0&&(e.premium+=1),t.Frozen&&(e.frozen+=1),e),{devices:0,premium:0,frozen:0})}function it(e){return e.reduce((e,t)=>(t.Megagroup&&(e.megagroups+=1),t.Broadcast&&(e.broadcasts+=1),t.Verified&&(e.verified+=1),e),{megagroups:0,broadcasts:0,verified:0})}function at({navigate:e}){let[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(`50`),[a,o]=(0,g.useState)(null),[s,c]=(0,g.useState)({beforeID:0,beforeActiveUS:0}),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``);async function p(e=!1){u(!0),f(``);let n=new URLSearchParams({limit:r});t.trim()?n.set(`q`,t.trim()):e&&(n.set(`before_id`,String(s.beforeID)),n.set(`before_active_us`,String(s.beforeActiveUS)));try{let e=await x.accounts(n);o(e),c({beforeID:e.next_before_id,beforeActiveUS:e.next_before_active_us})}catch(e){f(b(e))}finally{u(!1)}}(0,g.useEffect)(()=>{p(!1)},[]);let m=rt(a?.rows??[]);return(0,O.jsxs)(He,{title:`账号`,eyebrow:a?.listing===!1?`查询结果`:`最近活跃账号`,actions:(0,O.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>p(!1),disabled:l,children:[(0,O.jsx)(ye,{size:15}),` 刷新`]}),children:[d&&(0,O.jsx)(Ke,{children:d}),(0,O.jsxs)(`div`,{className:`metric-row`,children:[(0,O.jsx)(A,{label:`当前页账号`,value:String(a?.rows.length??0)}),(0,O.jsx)(A,{label:`在线设备记录`,value:String(m.devices)}),(0,O.jsx)(A,{label:`会员`,value:String(m.premium),tone:`good`}),(0,O.jsx)(A,{label:`冻结`,value:String(m.frozen),tone:m.frozen>0?`danger`:`neutral`})]}),(0,O.jsx)(Ue,{children:(0,O.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),p(!1)},children:[(0,O.jsxs)(`label`,{className:`searchbox`,children:[(0,O.jsx)(D,{size:15}),(0,O.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`用户 ID / 手机号 / 用户名`})]}),(0,O.jsxs)(`label`,{className:`field-inline`,children:[(0,O.jsx)(`span`,{children:`条数`}),(0,O.jsx)(`input`,{className:`small-input`,value:r,onChange:e=>i(e.target.value),type:`number`,min:`1`,max:`100`})]}),(0,O.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:l,children:[l?(0,O.jsx)(ae,{size:15,className:`spin`}):(0,O.jsx)(D,{size:15}),` 查询`]}),a?.listing&&a.has_more&&(0,O.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>p(!0),disabled:l,children:[(0,O.jsx)(ue,{size:15}),` 下一页`]})]})}),(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`用户 ID`}),(0,O.jsx)(`th`,{children:`手机号`}),(0,O.jsx)(`th`,{children:`用户名`}),(0,O.jsx)(`th`,{children:`姓名`}),(0,O.jsx)(`th`,{children:`设备`}),(0,O.jsx)(`th`,{children:`最近活跃`}),(0,O.jsx)(`th`,{children:`会员`}),(0,O.jsx)(`th`,{children:`认证`}),(0,O.jsx)(`th`,{children:`冻结`}),(0,O.jsx)(`th`,{children:`更新时间`}),(0,O.jsx)(`th`,{})]})}),(0,O.jsxs)(`tbody`,{children:[a?.rows.map(t=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{className:`mono`,children:t.ID}),(0,O.jsx)(`td`,{children:Pe(t.Phone)}),(0,O.jsx)(`td`,{children:Fe(t.Username)}),(0,O.jsx)(`td`,{children:Ie(t)}),(0,O.jsx)(`td`,{children:t.DeviceCount}),(0,O.jsx)(`td`,{children:Re(t.LastActiveAt)}),(0,O.jsx)(`td`,{children:t.PremiumUntil>0?(0,O.jsxs)(k,{tone:`good`,children:[`会员 `,ze(t.PremiumUntil)]}):(0,O.jsx)(k,{children:`无`})}),(0,O.jsx)(`td`,{children:t.Verified?(0,O.jsx)(k,{tone:`good`,children:`已认证`}):(0,O.jsx)(k,{children:`未认证`})}),(0,O.jsx)(`td`,{children:t.Frozen?(0,O.jsx)(k,{tone:`danger`,children:`冻结`}):(0,O.jsx)(k,{children:`正常`})}),(0,O.jsx)(`td`,{children:Re(t.UpdatedAt)}),(0,O.jsx)(`td`,{children:(0,O.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/accounts/${t.ID}`),children:[`详情 `,(0,O.jsx)(ue,{size:14})]})})]},t.ID)),(!a||a.rows.length===0)&&(0,O.jsx)(Ye,{colSpan:11})]})]})})]})}function ot({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``);async function o(){a(``);try{r(await x.channel(e))}catch(e){a(b(e))}}if((0,g.useEffect)(()=>{o()},[e]),i)return(0,O.jsx)(Ke,{children:i});if(!n)return(0,O.jsx)(Xe,{label:`加载频道详情`});let s=n.Channel;return(0,O.jsx)(He,{title:`${Le(s)} #${s.ID}`,eyebrow:`频道档案`,actions:(0,O.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/channels`),children:[(0,O.jsx)(se,{size:15}),` 返回列表`]}),children:(0,O.jsx)(We,{main:(0,O.jsxs)(`div`,{className:`stacked-sections`,children:[(0,O.jsxs)(`section`,{className:`entity-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`entity-title`,children:s.Title||`-`}),(0,O.jsxs)(`div`,{className:`entity-subtitle`,children:[Fe(s.Username)||`无用户名`,` · 创建者 `,s.CreatorUserID]})]}),(0,O.jsxs)(`div`,{className:`entity-badges`,children:[(0,O.jsx)(k,{children:Le(s)}),s.Verified?(0,O.jsx)(k,{tone:`good`,children:`已认证`}):(0,O.jsx)(k,{children:`未认证`}),s.Deleted?(0,O.jsx)(k,{tone:`danger`,children:`已删除`}):(0,O.jsx)(k,{children:`有效`})]})]}),(0,O.jsxs)(`div`,{className:`summary-grid`,children:[(0,O.jsx)(j,{label:`频道 ID`,value:String(s.ID),mono:!0}),(0,O.jsx)(j,{label:`access_hash`,value:String(s.AccessHash),mono:!0}),(0,O.jsx)(j,{label:`成员`,value:`${s.ParticipantsCount} / 管理员 ${s.AdminsCount}`}),(0,O.jsx)(j,{label:`治理状态`,value:`封禁 ${s.BannedCount} / 踢出 ${s.KickedCount}`}),(0,O.jsx)(j,{label:`频道标记`,value:`broadcast=${s.Broadcast} megagroup=${s.Megagroup} forum=${s.Forum}`}),(0,O.jsx)(j,{label:`top / pinned / PTS`,value:`${s.TopMessageID} / ${s.PinnedMessageID} / ${s.PTS}`}),(0,O.jsx)(j,{label:`创建时间`,value:ze(s.Date)||`-`}),(0,O.jsx)(j,{label:`更新时间`,value:Re(s.UpdatedAt)||`-`})]}),s.About&&(0,O.jsx)(`p`,{className:`about-text`,children:s.About}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`最近后台操作`,text:`最近 30 条审计`}),(0,O.jsx)(Je,{rows:n.AuditLogs})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`频道原始行`,text:`数据库只读快照`}),(0,O.jsx)(Ze,{value:n.ChannelJSON})]})]}),side:(0,O.jsxs)(`section`,{className:`action-dock`,children:[(0,O.jsx)(`div`,{className:`dock-title`,children:`频道操作`}),(0,O.jsx)(et,{label:s.Verified?`取消认证`:`设置认证`,icon:(0,O.jsx)(ne,{size:15}),tone:`warn`,path:`/api/actions/set-channel-verified`,payload:()=>({channel_id:s.ID,verified:!s.Verified}),onDone:o})]})})})}function st({navigate:e}){let[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(`50`),[a,o]=(0,g.useState)(null),[s,c]=(0,g.useState)({beforeID:0,beforeUpdatedUS:0}),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``);async function p(e=!1){u(!0),f(``);let n=new URLSearchParams({limit:r});t.trim()?n.set(`q`,t.trim()):e&&(n.set(`before_id`,String(s.beforeID)),n.set(`before_updated_us`,String(s.beforeUpdatedUS)));try{let e=await x.channels(n);o(e),c({beforeID:e.next_before_id,beforeUpdatedUS:e.next_before_updated_us})}catch(e){f(b(e))}finally{u(!1)}}(0,g.useEffect)(()=>{p(!1)},[]);let m=it(a?.rows??[]);return(0,O.jsxs)(He,{title:`超级群与频道`,eyebrow:a?.listing===!1?`查询结果`:`最近更新`,actions:(0,O.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>p(!1),disabled:l,children:[(0,O.jsx)(ye,{size:15}),` 刷新`]}),children:[d&&(0,O.jsx)(Ke,{children:d}),(0,O.jsxs)(`div`,{className:`metric-row`,children:[(0,O.jsx)(A,{label:`当前页实体`,value:String(a?.rows.length??0)}),(0,O.jsx)(A,{label:`超级群`,value:String(m.megagroups)}),(0,O.jsx)(A,{label:`频道`,value:String(m.broadcasts)}),(0,O.jsx)(A,{label:`已认证`,value:String(m.verified),tone:`good`})]}),(0,O.jsx)(Ue,{children:(0,O.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),p(!1)},children:[(0,O.jsxs)(`label`,{className:`searchbox`,children:[(0,O.jsx)(D,{size:15}),(0,O.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`频道 ID / 用户名 / 标题`})]}),(0,O.jsxs)(`label`,{className:`field-inline`,children:[(0,O.jsx)(`span`,{children:`条数`}),(0,O.jsx)(`input`,{className:`small-input`,value:r,onChange:e=>i(e.target.value),type:`number`,min:`1`,max:`100`})]}),(0,O.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:l,children:[l?(0,O.jsx)(ae,{size:15,className:`spin`}):(0,O.jsx)(D,{size:15}),` 查询`]}),a?.listing&&a.has_more&&(0,O.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>p(!0),disabled:l,children:[(0,O.jsx)(ue,{size:15}),` 下一页`]})]})}),(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`频道 ID`}),(0,O.jsx)(`th`,{children:`类型`}),(0,O.jsx)(`th`,{children:`用户名`}),(0,O.jsx)(`th`,{children:`标题`}),(0,O.jsx)(`th`,{children:`成员`}),(0,O.jsx)(`th`,{children:`管理员`}),(0,O.jsx)(`th`,{children:`PTS`}),(0,O.jsx)(`th`,{children:`认证`}),(0,O.jsx)(`th`,{children:`更新时间`}),(0,O.jsx)(`th`,{})]})}),(0,O.jsxs)(`tbody`,{children:[a?.rows.map(t=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{className:`mono`,children:t.ID}),(0,O.jsx)(`td`,{children:Le(t)}),(0,O.jsx)(`td`,{children:Fe(t.Username)}),(0,O.jsx)(`td`,{children:t.Title}),(0,O.jsx)(`td`,{children:t.ParticipantsCount}),(0,O.jsx)(`td`,{children:t.AdminsCount}),(0,O.jsx)(`td`,{children:t.PTS}),(0,O.jsx)(`td`,{children:t.Verified?(0,O.jsx)(k,{tone:`good`,children:`已认证`}):(0,O.jsx)(k,{children:`未认证`})}),(0,O.jsx)(`td`,{children:Re(t.UpdatedAt)}),(0,O.jsx)(`td`,{children:(0,O.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/channels/${t.ID}`),children:[`详情 `,(0,O.jsx)(ue,{size:14})]})})]},t.ID)),(!a||a.rows.length===0)&&(0,O.jsx)(Ye,{colSpan:10})]})]})})]})}function ct({navigate:e}){return(0,O.jsxs)(`div`,{className:`dashboard-layout`,children:[(0,O.jsxs)(`section`,{className:`overview-band`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`eyebrow`,children:`运行总览`}),(0,O.jsx)(`h2`,{children:`控制台总览`})]}),(0,O.jsxs)(`div`,{className:`overview-metrics`,children:[(0,O.jsx)(qe,{label:`读路径`,value:`PG 只读`,tone:`neutral`}),(0,O.jsx)(qe,{label:`写路径`,value:`Admin API`,tone:`good`}),(0,O.jsx)(qe,{label:`执行策略`,value:`先预演`,tone:`warn`})]})]}),(0,O.jsxs)(`div`,{className:`command-grid`,children:[(0,O.jsx)(lt,{icon:(0,O.jsx)(we,{}),title:`账号管理`,text:`账号状态、会员、认证、会话。`,href:`/accounts`,navigate:e}),(0,O.jsx)(lt,{icon:(0,O.jsx)(xe,{}),title:`超级群与频道`,text:`公开实体、成员计数、认证状态。`,href:`/channels`,navigate:e}),(0,O.jsx)(lt,{icon:(0,O.jsx)(_e,{}),title:`消息审计`,text:`消息盒、update、outbox 状态。`,href:`/messages`,navigate:e})]}),(0,O.jsxs)(`section`,{className:`work-strip`,children:[(0,O.jsxs)(`div`,{className:`strip-item`,children:[(0,O.jsx)(ie,{size:16}),(0,O.jsx)(`span`,{children:`所有危险操作先预演`})]}),(0,O.jsxs)(`div`,{className:`strip-item`,children:[(0,O.jsx)(me,{size:16}),(0,O.jsx)(`span`,{children:`浏览器不持有内部 token`})]}),(0,O.jsxs)(`div`,{className:`strip-item`,children:[(0,O.jsx)(de,{size:16}),(0,O.jsx)(`span`,{children:`列表使用游标分页`})]}),(0,O.jsxs)(`div`,{className:`strip-item`,children:[(0,O.jsx)(E,{size:16}),(0,O.jsx)(`span`,{children:`详情页保留原始状态快照`})]})]})]})}function lt({icon:e,title:t,text:n,href:r,navigate:i}){return(0,O.jsxs)(Ae,{className:`launcher`,href:r,navigate:i,children:[(0,O.jsx)(`span`,{className:`launcher-icon`,children:e}),(0,O.jsxs)(`span`,{className:`launcher-copy`,children:[(0,O.jsx)(`strong`,{children:t}),(0,O.jsx)(`span`,{children:n})]}),(0,O.jsx)(ue,{size:16})]})}function ut({channelID:e,msgID:t,navigate:n}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``);async function s(){o(``);try{i(await x.groupMessage(e,t))}catch(e){o(b(e))}}if((0,g.useEffect)(()=>{s()},[e,t]),a)return(0,O.jsx)(Ke,{children:a});if(!r)return(0,O.jsx)(Xe,{label:`加载群聊消息详情`});let c=r.Message;return(0,O.jsx)(He,{title:`群聊消息 #${c.ID}`,eyebrow:`消息详情`,actions:(0,O.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>n(`/messages/groups`),children:[(0,O.jsx)(se,{size:15}),` 返回群聊消息`]}),children:(0,O.jsxs)(`div`,{className:`stacked-sections`,children:[(0,O.jsxs)(`section`,{className:`entity-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`entity-title`,children:[`频道/群 `,c.ChannelID]}),(0,O.jsxs)(`div`,{className:`entity-subtitle`,children:[`发送方 `,c.SenderUserID,` · `,ze(c.Date)]})]}),(0,O.jsxs)(`div`,{className:`entity-badges`,children:[c.Deleted?(0,O.jsx)(k,{tone:`danger`,children:`已删除`}):(0,O.jsx)(k,{children:`存活`}),c.Pinned&&(0,O.jsx)(k,{tone:`warn`,children:`置顶`}),c.Post&&(0,O.jsx)(k,{children:`频道帖子`}),(0,O.jsxs)(k,{children:[`pts `,c.PTS]})]})]}),(0,O.jsxs)(`div`,{className:`summary-grid`,children:[(0,O.jsx)(j,{label:`消息 ID`,value:String(c.ID),mono:!0}),(0,O.jsx)(j,{label:`频道 / 群`,value:String(c.ChannelID),mono:!0}),(0,O.jsx)(j,{label:`From Peer`,value:`${c.FromPeerType}:${c.FromPeerID}`,mono:!0}),(0,O.jsx)(j,{label:`浏览`,value:String(c.ViewsCount)})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`消息行`,text:`channel_messages 只读快照`}),(0,O.jsx)(Ze,{value:r.MessageJSON})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`频道行`,text:`channels 只读快照`}),(0,O.jsx)(Ze,{value:r.ChannelJSON})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`频道更新事件`,text:`durable channel_update_events`}),(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`PTS`}),(0,O.jsx)(`th`,{children:`数量`}),(0,O.jsx)(`th`,{children:`类型`}),(0,O.jsx)(`th`,{children:`消息 ID`}),(0,O.jsx)(`th`,{children:`发送方`}),(0,O.jsx)(`th`,{children:`时间`})]})}),(0,O.jsxs)(`tbody`,{children:[r.UpdateEvents.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:e.PTS}),(0,O.jsx)(`td`,{children:e.PTSCount}),(0,O.jsx)(`td`,{children:e.Type}),(0,O.jsx)(`td`,{children:e.MessageID}),(0,O.jsx)(`td`,{children:e.SenderUserID}),(0,O.jsx)(`td`,{children:ze(e.Date)})]},`${e.PTS}-${e.Type}-${e.MessageID}`)),r.UpdateEvents.length===0&&(0,O.jsx)(Ye,{colSpan:6})]})]})})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`事件 JSON`}),(0,O.jsxs)(`div`,{className:`raw-grid`,children:[r.UpdateEvents.map(e=>(0,O.jsx)(Ze,{value:e.JSON},`${e.PTS}-${e.Type}-json`)),r.UpdateEvents.length===0&&(0,O.jsx)(`div`,{className:`empty-panel`,children:`无结果`})]})]})]})})}function dt({label:e,value:t,onChange:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(){c(!0),u(``);let e=new URLSearchParams({limit:`20`});r.trim()&&e.set(`q`,r.trim());try{o((await x.accounts(e)).rows)}catch(e){u(b(e))}finally{c(!1)}}return(0,g.useEffect)(()=>{d()},[]),(0,O.jsxs)(`div`,{className:`entity-picker`,children:[(0,O.jsxs)(`div`,{className:`picker-head`,children:[(0,O.jsx)(`span`,{children:e}),t?(0,O.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(null),children:[(0,O.jsx)(Te,{size:13}),` 清除`]}):null]}),t?(0,O.jsxs)(`div`,{className:`selected-entity`,children:[(0,O.jsx)(T,{size:15}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:Ie(t)}),(0,O.jsx)(`span`,{className:`mono`,children:t.ID})]}),(0,O.jsx)(`span`,{children:Fe(t.Username)||Pe(t.Phone)||`-`})]}):null,(0,O.jsxs)(`div`,{className:`picker-search`,children:[(0,O.jsx)(D,{size:15}),(0,O.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())},placeholder:`搜索 user_id / phone / username`}),(0,O.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:d,disabled:s,children:s?(0,O.jsx)(ae,{size:14,className:`spin`}):`搜索`})]}),l&&(0,O.jsx)(`div`,{className:`picker-error`,children:l}),(0,O.jsxs)(`div`,{className:`picker-results`,children:[a.map(e=>(0,O.jsxs)(`button`,{className:`picker-row ${t?.ID===e.ID?`selected`:``}`,type:`button`,onClick:()=>n(e),children:[(0,O.jsx)(`span`,{className:`mono`,children:e.ID}),(0,O.jsx)(`strong`,{children:Ie(e)}),(0,O.jsx)(`span`,{children:Fe(e.Username)||Pe(e.Phone)||`-`}),e.Verified?(0,O.jsx)(k,{tone:`good`,children:`认证`}):(0,O.jsx)(k,{children:`普通`})]},e.ID)),a.length===0&&!s?(0,O.jsx)(`div`,{className:`picker-empty`,children:`无结果`}):null]})]})}function ft({label:e,value:t,onChange:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(){c(!0),u(``);let e=new URLSearchParams({limit:`20`});r.trim()&&e.set(`q`,r.trim());try{o((await x.channels(e)).rows)}catch(e){u(b(e))}finally{c(!1)}}return(0,g.useEffect)(()=>{d()},[]),(0,O.jsxs)(`div`,{className:`entity-picker`,children:[(0,O.jsxs)(`div`,{className:`picker-head`,children:[(0,O.jsx)(`span`,{children:e}),t?(0,O.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(null),children:[(0,O.jsx)(Te,{size:13}),` 清除`]}):null]}),t?(0,O.jsxs)(`div`,{className:`selected-entity`,children:[(0,O.jsx)(T,{size:15}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:t.Title||`-`}),(0,O.jsx)(`span`,{className:`mono`,children:t.ID})]}),(0,O.jsx)(`span`,{children:Fe(t.Username)||Le(t)})]}):null,(0,O.jsxs)(`div`,{className:`picker-search`,children:[(0,O.jsx)(D,{size:15}),(0,O.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())},placeholder:`搜索 channel_id / username / title`}),(0,O.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:d,disabled:s,children:s?(0,O.jsx)(ae,{size:14,className:`spin`}):`搜索`})]}),l&&(0,O.jsx)(`div`,{className:`picker-error`,children:l}),(0,O.jsxs)(`div`,{className:`picker-results`,children:[a.map(e=>(0,O.jsxs)(`button`,{className:`picker-row ${t?.ID===e.ID?`selected`:``}`,type:`button`,onClick:()=>n(e),children:[(0,O.jsx)(`span`,{className:`mono`,children:e.ID}),(0,O.jsx)(`strong`,{children:e.Title||`-`}),(0,O.jsx)(`span`,{children:Fe(e.Username)||Le(e)}),e.Verified?(0,O.jsx)(k,{tone:`good`,children:`认证`}):(0,O.jsx)(k,{children:Le(e)})]},e.ID)),a.length===0&&!s?(0,O.jsx)(`div`,{className:`picker-empty`,children:`无结果`}):null]})]})}function pt({navigate:e}){let[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(`100`),[l,u]=(0,g.useState)(null),[d,f]=(0,g.useState)(``);async function p(e=!1){if(f(``),!t){f(`请先搜索并选择超级群或频道`);return}let n=new URLSearchParams({channel_id:String(t.ID),limit:s});if(e&&l?.rows.length){let e=l.rows[l.rows.length-1];n.set(`before_date`,String(e.Date)),n.set(`before_id`,String(e.ID)),i(String(e.Date)),o(String(e.ID))}else r&&n.set(`before_date`,r),a&&n.set(`before_id`,a);try{u(await x.groupMessages(n))}catch(e){f(b(e))}}function m(e){n(e),i(``),o(``),u(null)}let h=l?.rows??[];return(0,O.jsxs)(He,{title:`群聊消息`,eyebrow:`超级群 / 频道消息`,children:[d&&(0,O.jsx)(Ke,{children:d}),(0,O.jsxs)(Ue,{children:[(0,O.jsx)(`div`,{className:`message-selector-grid single`,children:(0,O.jsx)(ft,{label:`超级群 / 频道`,value:t,onChange:m})}),(0,O.jsxs)(`form`,{className:`toolbar message-query`,onSubmit:e=>{e.preventDefault(),p(!1)},children:[(0,O.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`before_date 游标`}),(0,O.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`before_msg_id 游标`}),(0,O.jsx)(`input`,{className:`small-input`,value:s,onChange:e=>c(e.target.value),placeholder:`条数 <= 100`}),(0,O.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,children:[(0,O.jsx)(D,{size:15}),` 查询消息`]}),h.length?(0,O.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>p(!0),children:[(0,O.jsx)(ue,{size:15}),` 下一页`]}):null]})]}),(0,O.jsxs)(`div`,{className:`metric-row`,children:[(0,O.jsx)(A,{label:`当前页消息`,value:String(h.length)}),(0,O.jsx)(A,{label:`有媒体`,value:String(h.filter(e=>e.Media&&e.Media!==`{}`).length)}),(0,O.jsx)(A,{label:`频道帖子`,value:String(h.filter(e=>e.Post).length)}),(0,O.jsx)(A,{label:`频道 / 群`,value:t?`${t.Title||Le(t)} (${t.ID})`:`-`})]}),(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`消息 ID`}),(0,O.jsx)(`th`,{children:`时间`}),(0,O.jsx)(`th`,{children:`发送方`}),(0,O.jsx)(`th`,{children:`From Peer`}),(0,O.jsx)(`th`,{children:`PTS`}),(0,O.jsx)(`th`,{children:`浏览`}),(0,O.jsx)(`th`,{children:`状态`}),(0,O.jsx)(`th`,{children:`正文`}),(0,O.jsx)(`th`,{})]})}),(0,O.jsxs)(`tbody`,{children:[h.map(t=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{className:`mono`,children:t.ID}),(0,O.jsx)(`td`,{children:ze(t.Date)}),(0,O.jsx)(`td`,{className:`mono`,children:t.SenderUserID}),(0,O.jsxs)(`td`,{className:`mono`,children:[t.FromPeerType,`:`,t.FromPeerID]}),(0,O.jsx)(`td`,{children:t.PTS}),(0,O.jsx)(`td`,{children:t.ViewsCount}),(0,O.jsx)(`td`,{children:t.Deleted?(0,O.jsx)(k,{tone:`danger`,children:`已删除`}):t.Pinned?(0,O.jsx)(k,{tone:`warn`,children:`置顶`}):(0,O.jsx)(k,{children:`存活`})}),(0,O.jsx)(`td`,{className:`truncate`,children:t.Body}),(0,O.jsx)(`td`,{children:(0,O.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/messages/groups/detail?channel_id=${t.ChannelID}&msg_id=${t.ID}`),children:[`详情 `,(0,O.jsx)(ue,{size:14})]})})]},`${t.ChannelID}-${t.ID}`)),h.length===0&&(0,O.jsx)(Ye,{colSpan:9})]})]})})]})}function mt({ownerUserID:e,msgID:t,navigate:n}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``);async function s(){o(``);try{i(await x.message(e,t))}catch(e){o(b(e))}}if((0,g.useEffect)(()=>{s()},[e,t]),a)return(0,O.jsx)(Ke,{children:a});if(!r)return(0,O.jsx)(Xe,{label:`加载消息详情`});let c=r.Message;return(0,O.jsx)(He,{title:`消息 #${c.BoxID}`,eyebrow:`消息详情`,actions:(0,O.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>n(`/messages/private`),children:[(0,O.jsx)(se,{size:15}),` 返回私聊消息`]}),children:(0,O.jsx)(We,{main:(0,O.jsxs)(`div`,{className:`stacked-sections`,children:[(0,O.jsxs)(`section`,{className:`entity-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`entity-title`,children:[`所属 `,c.OwnerUserID,` · 对端 `,c.PeerID]}),(0,O.jsxs)(`div`,{className:`entity-subtitle`,children:[`发送方 `,c.FromUserID,` · `,ze(c.Date)]})]}),(0,O.jsxs)(`div`,{className:`entity-badges`,children:[c.Deleted?(0,O.jsx)(k,{tone:`danger`,children:`已删除`}):(0,O.jsx)(k,{children:`存活`}),(0,O.jsxs)(k,{children:[`pts `,c.PTS]}),(0,O.jsx)(k,{children:c.Outgoing?`发出`:`收到`})]})]}),(0,O.jsxs)(`div`,{className:`summary-grid`,children:[(0,O.jsx)(j,{label:`消息盒 ID`,value:String(c.BoxID),mono:!0}),(0,O.jsx)(j,{label:`私聊消息 ID`,value:String(c.PrivateMessageID),mono:!0}),(0,O.jsx)(j,{label:`发送方`,value:String(c.MessageSenderID),mono:!0}),(0,O.jsx)(j,{label:`时间`,value:ze(c.Date)})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`消息盒`,text:`message_boxes 只读快照`}),(0,O.jsx)(Ze,{value:r.MessageJSON})]}),(0,O.jsxs)(`div`,{className:`raw-grid`,children:[(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`会话行`,text:`dialogs 只读快照`}),(0,O.jsx)(Ze,{value:r.DialogJSON})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`私聊消息行`,text:`private_messages 只读快照`}),(0,O.jsx)(Ze,{value:r.PrivateJSON})]})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`更新事件`,text:`durable user_update_events`}),(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`PTS`}),(0,O.jsx)(`th`,{children:`数量`}),(0,O.jsx)(`th`,{children:`类型`}),(0,O.jsx)(`th`,{children:`时间`})]})}),(0,O.jsxs)(`tbody`,{children:[r.UpdateEvents.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:e.PTS}),(0,O.jsx)(`td`,{children:e.PTSCount}),(0,O.jsx)(`td`,{children:e.Type}),(0,O.jsx)(`td`,{children:ze(e.Date)})]},`${e.PTS}-${e.Type}`)),r.UpdateEvents.length===0&&(0,O.jsx)(Ye,{colSpan:4})]})]})})]}),(0,O.jsxs)(`section`,{className:`section-block`,children:[(0,O.jsx)(Ge,{title:`分发队列`,text:`在线/离线 dispatch_outbox`}),(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`ID`}),(0,O.jsx)(`th`,{children:`用户`}),(0,O.jsx)(`th`,{children:`PTS`}),(0,O.jsx)(`th`,{children:`类型`}),(0,O.jsx)(`th`,{children:`状态`}),(0,O.jsx)(`th`,{children:`尝试`}),(0,O.jsx)(`th`,{children:`更新时间`})]})}),(0,O.jsxs)(`tbody`,{children:[r.Outbox.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:e.ID}),(0,O.jsx)(`td`,{children:e.TargetUserID}),(0,O.jsx)(`td`,{children:e.PTS}),(0,O.jsx)(`td`,{children:e.EventType}),(0,O.jsx)(`td`,{children:e.Status}),(0,O.jsx)(`td`,{children:e.Attempts}),(0,O.jsx)(`td`,{children:Re(e.UpdatedAt)})]},e.ID)),r.Outbox.length===0&&(0,O.jsx)(Ye,{colSpan:7})]})]})})]})]}),side:(0,O.jsxs)(`section`,{className:`action-dock`,children:[(0,O.jsx)(`div`,{className:`dock-title`,children:`消息操作`}),(0,O.jsx)(et,{label:`删除此消息`,icon:(0,O.jsx)(Ce,{size:15}),path:`/api/actions/delete-messages`,payload:()=>({owner_user_id:c.OwnerUserID,peer_id:c.PeerID,ids:[c.BoxID],revoke:!0}),onDone:s})]})})})}function ht({navigate:e}){let[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(``),[l,u]=(0,g.useState)(`100`),[d,f]=(0,g.useState)(``),[p,m]=(0,g.useState)(!0),[h,_]=(0,g.useState)(!1),[v,y]=(0,g.useState)(``),[ee,S]=(0,g.useState)(`1`),[C,te]=(0,g.useState)(null),[w,ne]=(0,g.useState)(``);async function re(e=!1){if(ne(``),!t||!r){ne(`请先搜索并选择所属用户和对端用户`);return}let n=new URLSearchParams({owner_user_id:String(t.ID),peer_id:String(r.ID),limit:l});if(e&&C?.rows.length){let e=C.rows[C.rows.length-1];n.set(`before_date`,String(e.Date)),n.set(`before_id`,String(e.BoxID)),o(String(e.Date)),c(String(e.BoxID))}else a&&n.set(`before_date`,a),s&&n.set(`before_id`,s);try{te(await x.messages(n))}catch(e){ne(b(e))}}function ie(e){n(e),o(``),c(``),te(null)}function ae(e){i(e),o(``),c(``),te(null)}return(0,O.jsxs)(He,{title:`私聊消息`,eyebrow:`私聊消息盒`,children:[w&&(0,O.jsx)(Ke,{children:w}),(0,O.jsxs)(Ue,{children:[(0,O.jsxs)(`div`,{className:`message-selector-grid`,children:[(0,O.jsx)(dt,{label:`所属用户`,value:t,onChange:ie}),(0,O.jsx)(dt,{label:`对端用户`,value:r,onChange:ae})]}),(0,O.jsxs)(`form`,{className:`toolbar message-query`,onSubmit:e=>{e.preventDefault(),re(!1)},children:[(0,O.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`before_date 游标`}),(0,O.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`before_msg_id 游标`}),(0,O.jsx)(`input`,{className:`small-input`,value:l,onChange:e=>u(e.target.value),placeholder:`条数 <= 100`}),(0,O.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,children:[(0,O.jsx)(D,{size:15}),` 查询消息`]}),C?.rows.length?(0,O.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>re(!0),children:[(0,O.jsx)(ue,{size:15}),` 下一页`]}):null]})]}),(0,O.jsxs)(`div`,{className:`metric-row`,children:[(0,O.jsx)(A,{label:`当前页消息`,value:String(C?.rows.length??0)}),(0,O.jsx)(A,{label:`已删除`,value:String((C?.rows??[]).filter(e=>e.Deleted).length),tone:`danger`}),(0,O.jsx)(A,{label:`发出消息`,value:String((C?.rows??[]).filter(e=>e.Outgoing).length)}),(0,O.jsx)(A,{label:`所属 / 对端`,value:t&&r?`${Ie(t)} / ${Ie(r)}`:`-`})]}),(0,O.jsxs)(`div`,{className:`operation-row`,children:[(0,O.jsxs)(`div`,{className:`operation-box`,children:[(0,O.jsxs)(`div`,{className:`operation-title`,children:[(0,O.jsx)(Ce,{size:15}),` 删除指定消息`]}),(0,O.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`消息 ID,逗号分隔`}),(0,O.jsxs)(`label`,{className:`checkline`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),` 同步撤回`]}),(0,O.jsx)(et,{path:`/api/actions/delete-messages`,label:`预演删除`,payload:()=>({owner_user_id:t?.ID??0,peer_id:r?.ID??0,ids:Ve(d),revoke:p})})]}),(0,O.jsxs)(`div`,{className:`operation-box`,children:[(0,O.jsxs)(`div`,{className:`operation-title`,children:[(0,O.jsx)(pe,{size:15}),` 清空私聊历史`]}),(0,O.jsx)(`input`,{value:v,onChange:e=>y(e.target.value),placeholder:`max_id 截止消息`}),(0,O.jsx)(`input`,{value:ee,onChange:e=>S(e.target.value),placeholder:`max_batches 批次数`}),(0,O.jsxs)(`label`,{className:`checkline`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),` 同步撤回`]}),(0,O.jsxs)(`label`,{className:`checkline`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>_(e.target.checked)}),` 仅清本侧`]}),(0,O.jsx)(et,{path:`/api/actions/delete-history`,label:`预演清历史`,payload:()=>({owner_user_id:t?.ID??0,peer_id:r?.ID??0,max_id:Be(v),max_batches:Be(ee),just_clear:h,revoke:p})})]})]}),(0,O.jsx)(`div`,{className:`table-wrap`,children:(0,O.jsxs)(`table`,{className:`data-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`消息 ID`}),(0,O.jsx)(`th`,{children:`时间`}),(0,O.jsx)(`th`,{children:`发送方`}),(0,O.jsx)(`th`,{children:`方向`}),(0,O.jsx)(`th`,{children:`PTS`}),(0,O.jsx)(`th`,{children:`状态`}),(0,O.jsx)(`th`,{children:`正文`}),(0,O.jsx)(`th`,{})]})}),(0,O.jsxs)(`tbody`,{children:[C?.rows.map(t=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{className:`mono`,children:t.BoxID}),(0,O.jsx)(`td`,{children:ze(t.Date)}),(0,O.jsx)(`td`,{className:`mono`,children:t.FromUserID}),(0,O.jsx)(`td`,{children:t.Outgoing?`发出`:`收到`}),(0,O.jsx)(`td`,{children:t.PTS}),(0,O.jsx)(`td`,{children:t.Deleted?(0,O.jsx)(k,{tone:`danger`,children:`已删除`}):(0,O.jsx)(k,{children:`存活`})}),(0,O.jsx)(`td`,{className:`truncate`,children:t.Body}),(0,O.jsx)(`td`,{children:(0,O.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/messages/private/detail?owner_user_id=${t.OwnerUserID}&msg_id=${t.BoxID}`),children:[`详情 `,(0,O.jsx)(ue,{size:14})]})})]},`${t.OwnerUserID}-${t.BoxID}`)),(!C||C.rows.length===0)&&(0,O.jsx)(Ye,{colSpan:8})]})]})})]})}function gt({route:e,navigate:t}){let n=e.path.match(/^\/accounts\/(\d+)$/)?.[1],r=e.path.match(/^\/channels\/(\d+)$/)?.[1];return n?(0,O.jsx)(nt,{id:Number(n),navigate:t}):r?(0,O.jsx)(ot,{id:Number(r),navigate:t}):e.path===`/accounts`?(0,O.jsx)(at,{navigate:t}):e.path===`/channels`?(0,O.jsx)(st,{navigate:t}):e.path===`/messages/detail`||e.path===`/messages/private/detail`?(0,O.jsx)(mt,{ownerUserID:Number(e.search.get(`owner_user_id`)||`0`),msgID:Number(e.search.get(`msg_id`)||`0`),navigate:t}):e.path===`/messages/groups/detail`?(0,O.jsx)(ut,{channelID:Number(e.search.get(`channel_id`)||`0`),msgID:Number(e.search.get(`msg_id`)||`0`),navigate:t}):e.path===`/messages/groups`?(0,O.jsx)(pt,{navigate:t}):e.path===`/messages`||e.path===`/messages/private`?(0,O.jsx)(ht,{navigate:t}):(0,O.jsx)(ct,{navigate:t})}function _t(){let[e,t]=(0,g.useState)(void 0),[n,r]=(0,g.useState)(()=>Ee());(0,g.useEffect)(()=>{let e=()=>r(Ee());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,g.useEffect)(()=>{x.session().then(e=>t(e.actor)).catch(e=>{if(e instanceof v&&e.status===401){t(null);return}t(null)})},[]);let i=e=>{window.history.pushState(null,``,e),r(Ee())};return e===void 0?(0,O.jsx)(je,{}):e===null?(0,O.jsx)(Qe,{onLogin:t}):(0,O.jsx)(Me,{actor:e,route:n,navigate:i,onLogout:()=>t(null),children:(0,O.jsx)(gt,{route:n,navigate:i})})}_.createRoot(document.getElementById(`root`)).render((0,O.jsx)(g.StrictMode,{children:(0,O.jsx)(_t,{})})); \ No newline at end of file diff --git a/cmd/telesrv-admin/web/dist/index.html b/cmd/telesrv-admin/web/dist/index.html index c7fa4691..03735136 100644 --- a/cmd/telesrv-admin/web/dist/index.html +++ b/cmd/telesrv-admin/web/dist/index.html @@ -1,11 +1,11 @@ - + telesrv admin - - + +
diff --git a/cmd/telesrv-admin/web/index.html b/cmd/telesrv-admin/web/index.html index bc4cfccc..81352931 100644 --- a/cmd/telesrv-admin/web/index.html +++ b/cmd/telesrv-admin/web/index.html @@ -1,5 +1,5 @@ - + diff --git a/cmd/telesrv-admin/web/src/components/ActionButton.tsx b/cmd/telesrv-admin/web/src/components/ActionButton.tsx index fe6fa6d3..e2d41ad1 100644 --- a/cmd/telesrv-admin/web/src/components/ActionButton.tsx +++ b/cmd/telesrv-admin/web/src/components/ActionButton.tsx @@ -3,6 +3,7 @@ import type { ReactNode } from "react"; import { useMemo, useState } from "react"; import { createPortal } from "react-dom"; import { api, errorMessage } from "../api"; +import { useI18n } from "../i18n"; import type { CommandResult } from "../types"; import { Alert, JsonBlock } from "./ui"; @@ -25,6 +26,7 @@ export function ActionButton({ tone?: ActionTone; onDone?: () => void; }) { + const { t } = useI18n(); const [open, setOpen] = useState(false); const [reason, setReason] = useState(""); const [result, setResult] = useState(null); @@ -39,7 +41,7 @@ export function ActionButton({ async function run(confirm: boolean) { if (!reason.trim()) { - setError("请填写操作原因"); + setError(t("action.reasonRequired")); return; } setBusy(true); @@ -86,55 +88,55 @@ export function ActionButton({
-
操作流程
+
{t("action.flow")}

{label}

- +
- 1填写原因 + 1{t("action.stepReason")}
- 2预演检查 + 2{t("action.stepDryRun")}
- 3确认执行 + 3{t("action.stepConfirm")}