karin-plugin-kkk 2.39.0 → 2.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -44
- package/README.md +70 -35
- package/lib/apps/admin.js +1 -1
- package/lib/apps/help.js +2 -2
- package/lib/build-metadata.json +5 -5
- package/lib/core_chunk/amagi.js +1 -1
- package/lib/core_chunk/amagiClient.js +1 -1
- package/lib/core_chunk/db.js +1 -1
- package/lib/core_chunk/main.js +629 -19
- package/lib/core_chunk/richtext.js +1 -1
- package/lib/core_chunk/template.d.mts +75 -3
- package/lib/core_chunk/template.js +1 -1
- package/lib/core_chunk/vendor.js +113 -113
- package/lib/karin-plugin-kkk.css +408 -41
- package/lib/root.js +1 -1
- package/lib/web/assets/{CronEditor-Cw1JG8-z.js → CronEditor-DiywKvi5.js} +1 -1
- package/lib/web/assets/{DesktopLayout-DhczG_oH.js → DesktopLayout-Dg2zhXab.js} +1 -1
- package/lib/web/assets/{MobileLayout-BPDCYfNY.js → MobileLayout-Bm9iTFi2.js} +1 -1
- package/lib/web/assets/{ThemeSwitch-CBS2uDXB.js → ThemeSwitch-C-Ak-yA2.js} +1 -1
- package/lib/web/assets/index-DfwUwUnH.css +2 -0
- package/lib/web/assets/{index-BFbeGR86.js → index-sIuuHdZD.js} +2 -2
- package/lib/web/assets/{separator-UALFsgvI.js → separator-eS-a7Ser.js} +1 -1
- package/lib/web/index.html +2 -2
- package/lib/web.config.js +1 -1
- package/package.json +2 -2
- package/lib/web/assets/index-CDqOqICt.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CronEditor-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CronEditor-DiywKvi5.js","assets/separator-eS-a7Ser.js","assets/DesktopLayout-Dg2zhXab.js","assets/ThemeSwitch-C-Ak-yA2.js","assets/MobileLayout-Bm9iTFi2.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
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,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(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 u=o((e=>{var t=Symbol.for(`react.transitional.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.consumer`),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.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=ee(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(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(e.unstable_now=void 0,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=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(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 x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),h=o(((e,t)=>{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=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var ee=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function oe(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function I(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),L=ae(null),ce=ae(null),le=ae(null);function ue(e,t){switch(I(ce,t),I(L,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Kd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(se),I(se,e)}function de(){oe(se),oe(L),oe(ce)}function fe(e){e.memoizedState!==null&&I(le,e);var t=se.current,n=Kd(t,e.type);t!==n&&(I(L,e),I(se,n))}function pe(e){L.current===e&&(oe(se),oe(L)),le.current===e&&(oe(le),np._currentValue=ne)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -44,4 +44,4 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
44
44
|
style="stroke: #88f; stroke-width: 2px; fill: none; stroke-opacity: 0.5; marker-end: url(#markerArrow);"
|
|
45
45
|
></path>
|
|
46
46
|
</svg>
|
|
47
|
-
</div>`),e.hasArrows=!0}format_textdiff(e,t){e.out(`<div class="jsondiffpatch-value">`),this.formatTextDiffString(e,t[0]),e.out(`</div>`)}};function fP(e){if(typeof e==`number`)return e;let t=String(e);for(let e of[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/'/g,`'`],[/"/g,`"`]])t=t.replace(e[0],e[1]);return t}var pP=function(e){let t=e||document,n=({textContent:e,innerText:t})=>e||t,r=(e,t,n)=>{let r=e.querySelectorAll(t);for(let e=0,t=r.length;e<t;e++)n(r[e])},i=({children:e},t)=>{for(let n=0,r=e.length;n<r;n++){let r=e[n];r&&t(r,n)}};r(t,`.jsondiffpatch-arrow`,({parentNode:e,children:t,style:r})=>{let a=e,o=t[0],s=o.children[1];o.style.display=`none`;let c=a.querySelector(`.jsondiffpatch-moved-destination`);if(!(c instanceof HTMLElement))return;let l=n(c),u=a.parentNode;if(!u)return;let d;if(i(u,e=>{e.getAttribute(`data-key`)===l&&(d=e)}),d)try{let e=d.offsetTop-a.offsetTop;o.setAttribute(`height`,`${Math.abs(e)+6}`),r.top=`${-8+(e>0?0:e)}px`;let t=e>0?`M30,0 Q-10,${Math.round(e/2)} 26,${e-4}`:`M30,${-e} Q-10,${Math.round(-e/2)} 26,4`;s.setAttribute(`d`,t),o.style.display=``}catch(e){console.debug(`[jsondiffpatch] error adjusting arrows: ${e}`)}})},mP=(e,t,n)=>{let r=t||document.body,i=`jsondiffpatch-unchanged-`,a={showing:`${i}showing`,hiding:`${i}hiding`,visible:`${i}visible`,hidden:`${i}hidden`},o=r.classList;if(!o)return;if(!n){o.remove(a.showing),o.remove(a.hiding),o.remove(a.visible),o.remove(a.hidden),e===!1&&o.add(a.hidden);return}e===!1?(o.remove(a.showing),o.add(a.visible),setTimeout(()=>{o.add(a.hiding)},10)):(o.remove(a.hiding),o.add(a.showing),o.remove(a.hidden));let s=setInterval(()=>{pP(r)},100);setTimeout(()=>{o.remove(a.showing),o.remove(a.hiding),e===!1?(o.add(a.hidden),o.remove(a.visible)):(o.add(a.visible),o.remove(a.hidden)),setTimeout(()=>{o.remove(a.visible),clearInterval(s)},n+400)},n)},hP=(e,t)=>mP(!1,e,t),gP;function _P(e,t){return gP||=new dP,gP.format(e,t)}var vP=e=>e.join(`.`),yP=e=>!!(e&&typeof e==`object`),Q=(e,t,n)=>e?t.reduce((e,t)=>{if(yP(e))return e[t]},e)??n:n,bP=(e,t,n)=>{let r=structuredClone(e),i=r;for(let e=0;e<t.length-1;e++){let n=t[e],r=i[n];yP(r)||(i[n]={}),i=i[n]}return i[t[t.length-1]]=n,r},xP=(e,t)=>{let n=Number(e);return Number.isFinite(n)?n:t},SP=(e,t)=>Array.isArray(e)&&e.includes(t),CP=e=>!!(e&&typeof e==`object`&&`description`in e),wP=e=>{if(!e||typeof e!=`object`)return e;let t=structuredClone(e);for(let{path:e,options:n}of[{path:[`bilibili`,`sendContent`],options:[`info`,`comment`,`video`,`image`]},{path:[`bilibili`,`displayContent`],options:[`cover`,`title`,`author`,`stats`,`desc`]},{path:[`bilibili`,`push`,`parseDynamicTypes`],options:[`DYNAMIC_TYPE_AV`,`DYNAMIC_TYPE_DRAW`,`DYNAMIC_TYPE_ARTICLE`]},{path:[`douyin`,`sendContent`],options:[`info`,`comment`,`video`,`image`]},{path:[`xiaohongshu`,`sendContent`],options:[`info`,`comment`,`video`,`image`]},{path:[`kuaishou`,`sendContent`],options:[`info`,`comment`,`video`,`image`]}]){let r=Q(t,e,null);if(!Array.isArray(r))continue;let i=n.filter(e=>r.includes(e)),a=t;for(let t=0;t<e.length-1;t++){let n=e[t];yP(a[n])||(a[n]={}),a=a[n]}a[e[e.length-1]]=i}return t},TP=e=>typeof e==`object`&&!!e,EP=e=>{let t={added:0,modified:0,deleted:0},n=e=>{if(TP(e)){if(Array.isArray(e)){e.length===1?t.added+=1:e.length===2?t.modified+=1:e.length===3&&e[2]===0&&(t.deleted+=1);return}for(let[t,r]of Object.entries(e))t!==`_t`&&n(r)}};return n(e),t},DP=({original:e,current:t,showUnchanged:n=!1})=>{let r=(0,v.useRef)(null),i=(0,v.useMemo)(()=>{if(!(!e||!t))return lP(wP(e),wP(t))},[e,t]),a=(0,v.useMemo)(()=>e?wP(e):void 0,[e]),o=(0,v.useMemo)(()=>{if(i)return _P(i,a)},[i,a]),s=(0,v.useMemo)(()=>EP(i),[i]);return(0,v.useEffect)(()=>{r.current&&(o?(r.current.innerHTML=o,n?mP(!0,r.current):hP(r.current)):r.current.innerHTML=``)},[o,n]),o?(0,V.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(yh,{size:`sm`,color:`success`,variant:`soft`,children:(0,V.jsxs)(yh.Label,{children:[`+ `,s.added,` 新增`]})}),(0,V.jsx)(yh,{size:`sm`,color:`warning`,variant:`soft`,children:(0,V.jsxs)(yh.Label,{children:[`~ `,s.modified,` 修改`]})}),(0,V.jsx)(yh,{size:`sm`,color:`danger`,variant:`soft`,children:(0,V.jsxs)(yh.Label,{children:[`- `,s.deleted,` 删除`]})})]}),(0,V.jsx)(`div`,{className:`max-h-[60vh] overflow-auto rounded-xl border border-default-200 bg-surface p-4`,children:(0,V.jsx)(`div`,{ref:r,className:`min-w-fit`})})]}):(0,V.jsx)(`div`,{className:`flex flex-col items-center justify-center gap-2 py-10 text-center`,children:(0,V.jsx)(zv,{className:`text-sm text-muted`,children:`当前没有检测到配置变更`})})},OP=`变更预览`,kP=`绿色 = 新增/改后的内容,红色 = 删除/改前的内容,灰色 = 没变化的内容。`,AP=({device:e,original:t,current:n,isOpen:r,onOpenChange:i})=>{let[a,o]=(0,v.useState)(!1),s=(0,V.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,V.jsx)(zv,{className:`text-xs text-muted`,children:kP}),(0,V.jsx)(P_,{size:`sm`,isSelected:a,onChange:o,"aria-label":`显示未变更字段`,children:(0,V.jsxs)(P_.Content,{children:[(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})}),`显示未变更`]})})]}),(0,V.jsx)(DP,{original:t,current:n,showUnchanged:a})]}),c=(0,V.jsx)(Hm,{slot:`close`,size:`sm`,variant:`secondary`,children:`关闭`});return e===`mobile`?(0,V.jsx)(Vh,{children:(0,V.jsx)(Vh.Backdrop,{isOpen:r,onOpenChange:i,children:(0,V.jsx)(Vh.Content,{placement:`bottom`,children:(0,V.jsxs)(Vh.Dialog,{className:`h-[85vh]`,children:[(0,V.jsx)(Vh.Handle,{}),(0,V.jsx)(Vh.CloseTrigger,{}),(0,V.jsx)(Vh.Header,{children:(0,V.jsx)(Vh.Heading,{children:OP})}),(0,V.jsx)(Vh.Body,{children:s}),(0,V.jsx)(Vh.Footer,{children:c})]})})})}):(0,V.jsx)($v,{children:(0,V.jsx)($v.Backdrop,{isOpen:r,onOpenChange:i,children:(0,V.jsx)($v.Container,{scroll:`inside`,size:`lg`,children:(0,V.jsxs)($v.Dialog,{className:`w-full max-w-4xl`,children:[(0,V.jsx)($v.CloseTrigger,{}),(0,V.jsxs)($v.Header,{children:[(0,V.jsx)($v.Icon,{className:`bg-accent-soft text-accent-soft-foreground`,children:(0,V.jsx)(ok,{className:`size-5`})}),(0,V.jsx)($v.Heading,{children:OP})]}),(0,V.jsx)($v.Body,{children:s}),(0,V.jsx)($v.Footer,{children:c})]})})})})},jP=e=>!!(e&&typeof e==`object`),$=(e,t,n)=>e?t.reduce((e,t)=>{if(jP(e))return e[t]},e)??n:n,MP=(e,t)=>Array.isArray(e)&&e.includes(t),NP=[{path:[`app`,`priority`],rules:[{condition:e=>$(e,[`app`,`videoTool`],!0),message:`修改此配置项需要先将「默认解析优先级」关闭`}]},{path:[`app`,`multiPageHeight`],rules:[{condition:e=>!$(e,[`app`,`multiPageRender`],!0),message:`修改此配置项需要先将「分页渲染」打开`}]},{path:[`app`,`livePhotoSystem`],rules:[{condition:e=>$(e,[`app`,`livePhotoMode`],`video_and_livephoto`)===`video_only`,message:`修改此配置项需要先将「Live Photo 处理和发送方式」改为非「仅视频」模式`}]},{path:[`amagi`,`APIServerMount`],rules:[{condition:e=>!$(e,[`amagi`,`APIServer`],!1),message:`修改此配置项需要先将「API 服务」打开`}]},{path:[`amagi`,`APIServerPort`],rules:[{condition:e=>$(e,[`amagi`,`APIServerMount`],!0),message:`修改此配置项需要先将「挂载到 Karin」关闭`}]},{path:[`app`,`qrLoginExternalAddr`],rules:[{condition:e=>$(e,[`app`,`qrLoginAddrType`],`lan`)!==`external`,message:`修改此配置项需要先将「扫码登录地址」改为「外部地址」`}]},{path:[`app`,`videoSendMode`],rules:[{condition:e=>$(e,[`app`,`usegroupfile`],!1),message:`修改此配置项需要先将「群文件上传」关闭`}]},{path:[`app`,`usegroupfile`],rules:[{condition:e=>$(e,[`app`,`videoSendMode`],`file`)===`base64`,message:`修改此配置项需要先将「本地视频发送方式」改为「File 协议」`}]},{path:[`app`,`groupfilevalue`],rules:[{condition:e=>!$(e,[`app`,`usegroupfile`],!1),message:`修改此配置项需要先将「群文件上传」打开`},{condition:e=>$(e,[`app`,`videoSendMode`],`file`)===`base64`,message:`修改此配置项需要先将「本地视频发送方式」改为「File 协议」`}]},{path:[`app`,`filelimit`],rules:[{condition:e=>!$(e,[`app`,`usefilelimit`],!1),message:`修改此配置项需要先将「视频上传拦截」打开`}]},{path:[`app`,`compresstrigger`],rules:[{condition:e=>!$(e,[`app`,`compress`],!1),message:`修改此配置项需要先将「压缩视频」打开`}]},{path:[`app`,`compressvalue`],rules:[{condition:e=>!$(e,[`app`,`compress`],!1),message:`修改此配置项需要先将「压缩视频」打开`}]},{path:[`app`,`downloadMaxSpeed`],rules:[{condition:e=>!$(e,[`app`,`downloadThrottle`],!1),message:`修改此配置项需要先将「下载限速」打开`}]},{path:[`app`,`downloadAutoReduce`],rules:[{condition:e=>!$(e,[`app`,`downloadThrottle`],!1),message:`修改此配置项需要先将「下载限速」打开`}]},{path:[`app`,`downloadMinSpeed`],rules:[{condition:e=>!$(e,[`app`,`downloadThrottle`],!1),message:`修改此配置项需要先将「下载限速」打开`},{condition:e=>!$(e,[`app`,`downloadAutoReduce`],!1),message:`修改此配置项需要先将「断流自动降速」打开`}]},{path:[`amagi`,`proxy`,`protocol`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`host`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`port`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`auth`,`username`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`auth`,`password`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`douyin`,`sendContent`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`numcomment`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`douyin`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`douyin`,`subCommentLimit`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`douyin`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`douyin`,`commentImageCollection`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`douyin`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`douyin`,`liveImageMergeMode`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`app`,`livePhotoMode`],`video_and_livephoto`)===`livephoto_only`,message:`修改此配置项需要先将「Live Photo 处理和发送方式」改为非「仅实况图」模式`}]},{path:[`douyin`,`videoQuality`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`maxAutoVideoSize`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`douyin`,`videoQuality`],`adapt`)!==`adapt`,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]},{path:[`douyin`,`videoInfoMode`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`displayContent`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`douyin`,`videoInfoMode`],`text`)===`image`,message:`修改此配置项需要先将「视频信息返回形式」改为「文本模式」`}]},{path:[`douyin`,`burnDanmaku`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`danmakuArea`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`danmakuFontSize`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`danmakuOpacity`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`verticalMode`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`videoCodec`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`push`,`permission`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`cron`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`parsedynamic`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`shareType`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`pushVideoQuality`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`pushMaxAutoVideoSize`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>$(e,[`douyin`,`push`,`pushVideoQuality`],`adapt`)!==`adapt`,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]},{path:[`bilibili`,`sendContent`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`numcomment`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`bilibili`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`bilibili`,`realCommentCount`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`bilibili`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`bilibili`,`commentImageCollection`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`bilibili`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`bilibili`,`videoQuality`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`maxAutoVideoSize`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>Number($(e,[`bilibili`,`videoQuality`],0))!==0,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]},{path:[`bilibili`,`videoInfoMode`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`displayContent`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`bilibili`,`videoInfoMode`],`text`)===`image`,message:`修改此配置项需要先将「视频信息返回形式」改为「文本模式」`}]},{path:[`bilibili`,`showDanmakuInVideoInfo`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`bilibili`,`videoInfoMode`],`text`)===`text`,message:`修改此配置项需要先将「视频信息返回形式」改为「图片模式」`}]},{path:[`bilibili`,`burnDanmaku`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`danmakuArea`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`danmakuFontSize`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`danmakuOpacity`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`verticalMode`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`videoCodec`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`push`,`permission`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`bilibili`,`push`,`cron`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`bilibili`,`push`,`parsedynamic`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`bilibili`,`push`,`parseDynamicTypes`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>!$(e,[`bilibili`,`push`,`parsedynamic`],!1),message:`修改此配置项需要先将「作品解析」打开`}]},{path:[`bilibili`,`push`,`pushVideoQuality`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>!$(e,[`bilibili`,`push`,`parsedynamic`],!1),message:`修改此配置项需要先将「作品解析」打开`}]},{path:[`bilibili`,`push`,`pushMaxAutoVideoSize`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>!$(e,[`bilibili`,`push`,`parsedynamic`],!1),message:`修改此配置项需要先将「作品解析」打开`},{condition:e=>Number($(e,[`bilibili`,`push`,`pushVideoQuality`],0))!==0,message:`修改此配置项需要先将「解析视频动态时的画质偏好」改为「自动选择」`}]},{path:[`kuaishou`,`comment`],rules:[{condition:e=>!$(e,[`kuaishou`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`kuaishou`,`numcomment`],rules:[{condition:e=>!$(e,[`kuaishou`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`kuaishou`,`comment`],!1),message:`修改此配置项需要先将「评论解析」打开`}]},{path:[`xiaohongshu`,`sendContent`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`xiaohongshu`,`numcomment`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`xiaohongshu`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`xiaohongshu`,`videoQuality`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`xiaohongshu`,`maxAutoVideoSize`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`xiaohongshu`,`videoQuality`],`adapt`)!==`adapt`,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]}],PP=e=>e.join(`.`),FP=(e,t)=>{let n=PP(t),r=NP.find(e=>PP(e.path)===n);if(!r)return``;for(let t of r.rules)if(t.condition(e))return t.message;return``},IP=[{label:`信息`,value:`info`},{label:`评论图`,value:`comment`},{label:`视频`,value:`video`},{label:`图片`,value:`image`}],LP=[{label:`封面`,value:`cover`},{label:`标题`,value:`title`},{label:`作者`,value:`author`},{label:`统计`,value:`stats`},{label:`简介`,value:`desc`}],RP=[{label:`自动选择`,value:`adapt`,description:`根据「视频体积上限(MB)」自动选择分辨率进行下载`},{label:`标清 540p`,value:`540p`},{label:`高清 720p`,value:`720p`},{label:`高清 1080p`,value:`1080p`},{label:`超清 2k`,value:`2k`},{label:`超清 4k`,value:`4k`}],zP=[{label:`自动选择`,value:`0`},{label:`240P 极速`,value:`6`},{label:`360P 流畅`,value:`16`},{label:`480P 清晰`,value:`32`,description:`需登录(配置ck)`},{label:`720P 高清`,value:`64`,description:`需登录(配置ck)`},{label:`720P60 高帧率`,value:`74`,description:`需登录(配置ck)`},{label:`1080P 高清`,value:`80`,description:`需登录(配置ck)`},{label:`1080P+ 高码率`,value:`112`,description:`需大会员&视频支持`},{label:`1080P60 高帧率`,value:`116`,description:`需大会员&视频支持`},{label:`4K 超清`,value:`120`,description:`需大会员&视频支持`},{label:`8K 超高清`,value:`127`,description:`需大会员&视频支持`}],BP=[{label:`视频动态`,value:`DYNAMIC_TYPE_AV`},{label:`图文动态`,value:`DYNAMIC_TYPE_DRAW`},{label:`文章动态`,value:`DYNAMIC_TYPE_ARTICLE`}],VP=[{label:`所有人`,value:`all`},{label:`管理员`,value:`admin`},{label:`主人`,value:`master`},{label:`群主`,value:`group.owner`},{label:`群管理员`,value:`group.admin`}],HP=[{label:`H.264`,value:`h264`,description:`兼容性最好,支持几乎所有设备`},{label:`H.265`,value:`h265`,description:`压缩率更高,近几年设备支持良好(推荐)`},{label:`AV1`,value:`av1`,description:`最新编码格式,压缩率最高,但编码较慢`}],UP=[{label:`关闭`,value:`off`,description:`保持原始比例,不做转换`},{label:`智能`,value:`standard`,description:`仅对宽屏比例视频生效`},{label:`强制 9:16`,value:`force`,description:`所有视频统一转为 9:16 竖屏`}],WP=[{label:`1/4 屏`,value:`0.25`,description:`仅顶部区域`},{label:`半屏`,value:`0.5`,description:`上半部分(推荐)`},{label:`3/4 屏`,value:`0.75`,description:`大部分区域`},{label:`全屏`,value:`1`,description:`铺满整个画面`}],GP=[{label:`小号`,value:`small`},{label:`中号`,value:`medium`},{label:`大号`,value:`large`}],KP={enabled:`已开启`,disabled:`已关闭`},qP=[{key:`amagi`,label:`接口库`,description:`请求与 Cookies`},{key:`app`,label:`通用`,description:`运行与交互`},{key:`douyin`,label:`抖音`,description:`解析与推送`},{key:`bilibili`,label:`哔哩哔哩`,description:`解析与推送`},{key:`kuaishou`,label:`快手`,description:`快手解析`},{key:`xiaohongshu`,label:`小红书`,description:`小红书解析`},{key:`pushlist`,label:`推送列表`,description:`订阅 JSON`}],JP=(0,v.lazy)(()=>vb(()=>import(`./CronEditor-Cw1JG8-z.js`),__vite__mapDeps([0,1]))),YP=({className:e,disabled:t,...n})=>{let[r,i]=(0,v.useState)(!1),a=r?`隐藏密码`:`显示密码`;return(0,V.jsxs)(`div`,{className:`relative w-full`,children:[(0,V.jsx)(Pv,{...n,variant:`secondary`,className:`w-full pr-10 ${e??``}`,type:r?`text`:`password`}),(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":a,className:`absolute right-1 top-1/2 -translate-y-1/2`,isDisabled:t,size:`sm`,type:`button`,variant:`tertiary`,onPress:()=>i(e=>!e),children:r?(0,V.jsx)(ik,{className:`size-4`,"aria-hidden":`true`}):(0,V.jsx)(ak,{className:`size-4`,"aria-hidden":`true`})})]})},XP=({config:e,device:t,classes:n,validationErrors:r,updateConfigValue:i})=>{let a=e=>{let n=CP(e)?e:{description:e},r=t===`mobile`?n.mobileContent??n.desktopContent:n.desktopContent;return(0,V.jsxs)(zv,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{children:n.description}),r?(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{"aria-label":`查看详细说明`,children:(0,V.jsx)(Hm,{isIconOnly:!0,size:`sm`,variant:`tertiary`,children:(0,V.jsx)(sk,{className:`size-4`,"aria-hidden":`true`})})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:t===`mobile`?`bottom`:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),(0,V.jsx)(`div`,{className:`max-w-72`,children:r})]})]}):null,n.extra]})},o=(n,r,i)=>{if(!i)return n;let a=FP(e,r);return a?t===`mobile`?(0,V.jsxs)(Wh,{children:[(0,V.jsx)(Wh.Trigger,{className:`w-full cursor-not-allowed`,children:n}),(0,V.jsx)(Wh.Content,{placement:`bottom`,children:(0,V.jsxs)(Wh.Dialog,{children:[(0,V.jsx)(Wh.Arrow,{}),(0,V.jsx)(`div`,{className:`max-w-72 text-sm`,children:a})]})})]}):(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{className:`w-full cursor-not-allowed`,children:n}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),(0,V.jsx)(`div`,{className:`max-w-72`,children:a})]})]}):n},s=(t,n,r,a)=>{let o=Q(e,t,[]),s=r?Array.from(new Set([...o,n])):o.filter(e=>e!==n);if(a&&r){let e=a.find(e=>e.includes(n));if(e){let t=e.filter(e=>e!==n);s=s.filter(e=>!t.includes(e))}}i(t,s)};return{renderSwitch:(t,n,r,s=!1)=>{let c=Q(e,t,!1),l=(0,V.jsxs)(P_,{isDisabled:s,isSelected:c,onChange:e=>i(t,e),children:[(0,V.jsxs)(P_.Content,{children:[(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})}),(0,V.jsx)(`span`,{className:`font-semibold`,children:n})]}),a(r||(c?KP.enabled:KP.disabled))]});return o(l,t,s)},renderTextField:(t,n,s,c)=>{let l=c?.type||`text`,u=String(Q(e,t,l===`number`?c?.fallback??0:``)),d=r[vP(t)],f=c?.disabled??!1,p=(0,V.jsxs)(Fv,{fullWidth:!0,isInvalid:!!d,isDisabled:f,name:t.join(`.`),type:l,value:u,onChange:e=>{i(t,l===`number`?xP(e,c?.fallback??0):e)},children:[(0,V.jsx)(Lv,{className:`font-semibold`,children:n}),l===`password`?(0,V.jsx)(YP,{disabled:f,max:c?.max,min:c?.min,pattern:c?.pattern,placeholder:c?.placeholder||n,step:c?.step}):(0,V.jsx)(Pv,{variant:`secondary`,max:c?.max,min:c?.min,pattern:c?.pattern,placeholder:c?.placeholder||n,step:c?.step}),d?(0,V.jsx)(Vv,{children:d}):a(s)]});return o(p,t,f)},renderSelectField:(t,n,r,s,c=e=>e,l=!1)=>{let u=String(Q(e,t,s[0]?.value||``)),d=(0,V.jsxs)(ny,{disabledKeys:s.filter(e=>e.disabled).map(e=>e.value),fullWidth:!0,isDisabled:l,name:t.join(`.`),placeholder:n,value:u,variant:`secondary`,onChange:e=>{e===null||Array.isArray(e)||i(t,c(String(e)))},children:[(0,V.jsx)(Lv,{className:`font-semibold`,children:n}),(0,V.jsxs)(ny.Trigger,{children:[(0,V.jsx)(ny.Value,{}),(0,V.jsx)(ny.Indicator,{})]}),a(r),(0,V.jsx)(ny.Popover,{children:(0,V.jsx)(Xv,{children:s.map(e=>(0,V.jsxs)(Xv.Item,{id:e.value,textValue:e.label,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,V.jsx)(Lv,{children:e.label}),e.description?(0,V.jsx)(zv,{children:e.description}):null]}),(0,V.jsx)(Xv.ItemIndicator,{})]},e.value))})})]});return o(d,t,l)},renderCheckboxGroup:(t,r,i,c,l=!1,u)=>{let d=Q(e,t,[]),f=(0,V.jsxs)(`div`,{className:n.field,children:[(0,V.jsx)(Lv,{className:`font-semibold`,children:r}),a(i),(0,V.jsx)(`div`,{className:n.choiceGrid,children:c.map(e=>(0,V.jsxs)(hh,{variant:`secondary`,isDisabled:l,isSelected:SP(d,e.value),onChange:n=>s(t,e.value,n,u),children:[(0,V.jsxs)(hh.Content,{children:[(0,V.jsx)(hh.Control,{children:(0,V.jsx)(hh.Indicator,{})}),e.label]}),e.description?(0,V.jsx)(zv,{children:e.description}):null]},e.value))})]});return o(f,t,l)},renderCronField:(r,a,s,c=!1)=>{let l=Q(e,r,`*/10 * * * *`),u=(0,V.jsx)(`div`,{className:n.field,children:(0,V.jsx)(v.Suspense,{fallback:(0,V.jsx)(`div`,{className:`h-64 animate-pulse rounded-lg bg-muted/30`}),children:(0,V.jsx)(JP,{device:t,disabled:c,value:l,onChange:e=>i(r,e)})})});return o(u,r,c)},renderPageHeader:(e,n)=>(0,V.jsxs)(`div`,{className:`mb-6 ${t===`mobile`?`pr-36`:``}`,"data-config-section":!0,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-bold`,children:e}),(0,V.jsx)(`div`,{className:`mt-3`,children:(0,V.jsx)(zv,{children:n})})]}),renderSubSection:(e,t)=>(0,V.jsxs)(Gm,{"data-config-section":!0,className:`mb-4`,children:[(0,V.jsx)(Gm.Header,{className:n.sectionHeader,children:(0,V.jsx)(Gm.Title,{className:`text-lg font-semibold`,children:e})}),(0,V.jsx)(Gm.Content,{className:n.sectionContent,children:(0,V.jsx)(`div`,{className:n.fields,children:t})})]})}},ZP={root:`relative flex min-w-0 max-w-full flex-col gap-8`,loading:`flex min-h-80 items-center justify-center gap-3`,header:`grid grid-cols-[minmax(0,1fr)_auto] items-start gap-8 pr-44`,headerCopy:`flex min-w-0 flex-col gap-2`,form:`flex min-w-0 max-w-full flex-col gap-6`,floatingActions:`fixed right-6 top-20 z-10`,actionControls:`flex items-center justify-end gap-3`,sectionHeader:`p-2`,sectionContent:`p-6`,fields:`grid grid-cols-2 gap-x-6 gap-y-5`,field:`flex min-w-0 flex-col gap-2`,choiceGrid:`grid grid-cols-2 gap-3`,divider:`col-span-full flex min-w-0 flex-col gap-2 pt-3`,tabsListContainer:`w-full min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain overscroll-y-none [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,tabsList:`w-fit min-w-max *:w-fit *:min-w-fit *:flex-none *:shrink-0 *:whitespace-nowrap`,topLevelFields:`mb-4 space-y-4 px-2`},QP={root:`relative flex min-w-0 max-w-full flex-col gap-5`,loading:`flex min-h-80 items-center justify-center gap-3`,header:`flex flex-col gap-3 pt-12`,headerCopy:`flex min-w-0 flex-col gap-2`,form:`flex min-w-0 max-w-full flex-col gap-3`,floatingActions:`sticky top-0 z-20 flex h-0 w-full justify-end overflow-visible`,actionControls:`flex w-fit h-11 p-1 items-center gap-2 rounded-full border border-default-200 bg-background/90 shadow-sm backdrop-blur-md`,sectionHeader:`p-1`,sectionContent:`p-0`,fields:`grid grid-cols-1 gap-5`,field:`flex min-w-0 flex-col gap-2`,choiceGrid:`grid grid-cols-1 gap-3`,divider:`col-span-full flex min-w-0 flex-col gap-2 pt-3`,tabsListContainer:`w-full min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain overscroll-y-none [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,tabsList:`w-fit min-w-max *:w-fit *:min-w-fit *:flex-none *:shrink-0 *:whitespace-nowrap`,topLevelFields:`mb-4 space-y-4 px-4`},$P=e=>e===`mobile`?QP:ZP,eF=({config:e,renderers:t})=>{let{renderPageHeader:n,renderSelectField:r,renderSubSection:i,renderSwitch:a,renderTextField:o}=t,s=Q(e,[`amagi`,`proxy`,`switch`],!1),c=Q(e,[`amagi`,`APIServer`],!1);return(0,V.jsxs)(V.Fragment,{children:[n(`接口库配置`,`接口库的 Cookies、请求、代理和 API 服务配置。保存后后端会重载接口库客户端。`),i(`平台 Cookies`,(0,V.jsxs)(V.Fragment,{children:[o([`amagi`,`cookies`,`douyin`],`抖音 Cookies`,`请输入你的抖音Cookies,不输入则无法使用抖音相关功能噢。`,{type:`password`}),o([`amagi`,`cookies`,`bilibili`],`B站 Cookies`,`请输入你的B站Cookies,不输入部分功能将受限噢。`,{type:`password`}),o([`amagi`,`cookies`,`kuaishou`],`快手 Cookies`,`请输入你的快手Cookies,不输入则无法使用快手相关功能噢。`,{type:`password`}),o([`amagi`,`cookies`,`xiaohongshu`],`小红书 Cookies`,`请输入你的小红书Cookies,不输入则无法使用小红书相关功能噢。`,{type:`password`})]})),i(`请求配置`,(0,V.jsxs)(V.Fragment,{children:[o([`amagi`,`timeout`],`请求超时时间`,`网络请求的超时时间,单位:毫秒。`,{type:`number`,fallback:15e3,min:1e3,max:3e5}),o([`amagi`,`User-Agent`],`User-Agent`,`请求头中的User-Agent字段,用于标识客户端类型。`)]})),i(`代理配置(可选)`,(0,V.jsxs)(V.Fragment,{children:[a([`amagi`,`proxy`,`switch`],`代理开关`,`开启后需要配置「代理主机」「代理端口」。`),r([`amagi`,`proxy`,`protocol`],`代理协议`,`代理服务使用的协议。`,[{label:`HTTP`,value:`http`},{label:`HTTPS`,value:`https`}],e=>e,!s),o([`amagi`,`proxy`,`host`],`代理主机`,`代理服务器的主机地址,如:127.0.0.1。`,{disabled:!s}),o([`amagi`,`proxy`,`port`],`代理端口`,`代理服务器的端口号。`,{type:`number`,fallback:7890,min:1,max:65535,disabled:!s}),o([`amagi`,`proxy`,`auth`,`username`],`代理用户名`,`代理服务器的认证用户名(如果需要)。`,{disabled:!s}),o([`amagi`,`proxy`,`auth`,`password`],`代理密码`,`代理服务器的认证密码(如果需要)。`,{type:`password`,disabled:!s})]})),i(`API 服务配置`,(0,V.jsxs)(V.Fragment,{children:[a([`amagi`,`APIServer`],`API 服务`,`本地部署一个视频解析API服务,接口范围为本插件用到的所有。`),a([`amagi`,`APIServerMount`],`挂载到 Karin`,`API 服务是否挂载到 Karin 上,开启后监听端口为 Karin 的 http 端口,修改后需重启。需开启「API服务」。`,!c),o([`amagi`,`APIServerPort`],`API 服务端口`,`仅未挂载到 Karin 时生效。`,{type:`number`,disabled:Q(e,[`amagi`,`APIServerMount`],!0),fallback:4567,min:1024,max:65535})]}))]})},tF=({config:e,renderers:t})=>{let{renderCheckboxGroup:n,renderPageHeader:r,renderSelectField:i,renderSubSection:a,renderSwitch:o,renderTextField:s}=t,c=Q(e,[`app`,`livePhotoMode`],`video_and_livephoto`);return(0,V.jsxs)(V.Fragment,{children:[r(`通用`,`插件运行、渲染和交互相关配置。`),a(`缓存设置`,(0,V.jsx)(V.Fragment,{children:o([`app`,`removeCache`],`自动删除视频缓存`,`任务完成后删除下载缓存。`)})),a(`交互设置`,(0,V.jsxs)(V.Fragment,{children:[o([`app`,`EmojiReply`],`表情回应`,`在解析任务开始时添加表情回应,若适配器不支持需要关闭。`),o([`app`,`parseTip`],`解析提示`,`发送提示信息:"检测到xxx链接,开始解析"。`),o([`app`,`fakeForward`],`伪造合并转发消息`,`开启后合并转发将使用触发者身份展示;关闭后使用机器人身份展示。`),n([`app`,`errorLogSendTo`],`错误日志`,`遇到错误时谁会收到错误日志。注:推送任务只可发送给主人。「第一个主人」与「所有主人」互斥。`,[{label:`第一个主人`,value:`master`},{label:`所有主人`,value:`allMasters`},{label:`触发者的群聊`,value:`trigger`}],!1,[[`master`,`allMasters`]])]})),a(`渲染设置`,(0,V.jsxs)(V.Fragment,{children:[s([`app`,`renderScale`],`渲染精度`,`可选值50~200,建议100。设置高精度会提高图片的精细度,过高可能会影响渲染与发送速度。`,{type:`number`,fallback:100,min:50,max:200}),i([`app`,`Theme`],`渲染图片的主题色`,`渲染评论图和推送图的主题色。`,[{label:`自动`,value:`0`,description:`06:00-18:00为浅色,18:00-06:00为深色`},{label:`浅色`,value:`1`},{label:`深色`,value:`2`},{label:`智能场景(实验性)`,value:`3`,description:`自动模式的超集;部分模板会根据封面色调 智能调整主题色,可能会出现不适配的情况。`}],e=>Number(e)),o([`app`,`RemoveWatermark`],`移除版本信息`,`渲染的图片是否移除底部版本信息。`),s([`app`,`RenderWaitTime`],`渲染图片的等待时间`,`单位:秒,Linux系统下不能为0;其他系统传递 0 可禁用。`,{type:`number`,fallback:60,min:0}),o([`app`,`multiPageRender`],`分页渲染`,`将模板渲染成多页的图片,以降低渲染器压力,默认开启,非必要不修改!`),s([`app`,`multiPageHeight`],`分页渲染时,每页的高度`,`经测试最佳每页高度为12000px,默认12000px。`,{type:`number`,disabled:!Q(e,[`app`,`multiPageRender`],!0),fallback:12e3,min:1e3,max:2e4})]})),a(`上传与下载设置`,(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(eg,{className:`flex flex-col gap-5 p-4 mb-4 rounded-3xl`,variant:`secondary`,children:[i([`app`,`videoSendMode`],`本地视频发送方式`,`选择本地视频交付给协议端的方式。`,[{label:`File 协议(本地文件)`,value:`file`,description:`使用 file 协议发送本地视频,需 Karin 与协议端在同一网络环境下`},{label:`Base64(编码传输)`,value:`base64`,description:`将本地视频转换为 base64 发送,传输数据量增大约 30%,不在同一网络环境可能导致额外带宽成本,适合 karin 和协议端不在同一网络环境`}],e=>e,Q(e,[`app`,`usegroupfile`],!1)),o([`app`,`usegroupfile`],`群文件上传`,`使用群文件上传,开启后会将视频文件上传到群文件中,需配置「群文件上传阈值」。与「本地视频发送方式 = Base64」互斥。`,Q(e,[`app`,`videoSendMode`],`file`)===`base64`),s([`app`,`groupfilevalue`],`群文件上传阈值`,`当文件大小超过该值时将使用群文件上传,单位:MB,「使用群文件上传」开启后才会生效。`,{type:`number`,fallback:100,min:1,disabled:!Q(e,[`app`,`usegroupfile`],!1)||Q(e,[`app`,`videoSendMode`],`file`)===`base64`})]}),(0,V.jsx)(eg,{className:`flex flex-col gap-5 p-4 mb-4 rounded-3xl`,variant:`secondary`,children:i([`app`,`imageSendMode`],`网络图片发送方式`,`图片资源发送给协议端的方式。`,[{label:`URL 链接(直接传递)`,value:`url`,description:`直接传递 HTTP 链接给上游下载,可能因上游网络问题导致下载超时`},{label:`File 协议(本地文件)`,value:`file`,description:`下载到本地后使用 file 协议发送,需 Karin 与协议端在同一网络环境下`},{label:`Base64(编码传输)`,value:`base64`,description:`下载后转换为 base64 发送,传输数据量增大约 30%,不在同一网络环境可能导致额外带宽成本`}])}),(0,V.jsxs)(eg,{className:`flex flex-col gap-5 p-4 mb-4 rounded-3xl`,variant:`secondary`,children:[o([`app`,`usefilelimit`],`视频上传拦截`,`开启后会根据视频文件大小判断是否需要上传,需配置「视频拦截阈值」。`),s([`app`,`filelimit`],`视频拦截阈值`,`视频文件大于该数值则直接结束任务,不会上传,单位: MB,「视频上传拦截」开启后才会生效。`,{type:`number`,fallback:20,min:1,disabled:!Q(e,[`app`,`usefilelimit`],!1)}),o([`app`,`compress`],`压缩视频`,`开启后会将视频文件压缩后再上传,适合上传大文件,任务过程中会吃满CPU,对低配服务器不友好。需配置「压缩触发阈值」与「压缩后的值」。`),s([`app`,`compresstrigger`],`压缩触发阈值`,`触发视频压缩的阈值,单位:MB。当文件大小超过该值时,才会压缩视频,「压缩视频」开启后才会生效。`,{type:`number`,fallback:80,min:1,disabled:!Q(e,[`app`,`compress`],!1)}),s([`app`,`compressvalue`],`压缩后的值`,`单位:MB,若视频文件大小大于「压缩触发阈值」的值,则会进行压缩至该值(±5%),「压缩视频」开启后才会生效。`,{type:`number`,fallback:30,min:1,disabled:!Q(e,[`app`,`compress`],!1)})]}),(0,V.jsxs)(eg,{className:`flex flex-col gap-5 p-4 rounded-3xl`,variant:`secondary`,children:[o([`app`,`downloadThrottle`],`下载限速`,`开启后会限制下载速度,避免触发服务器风控导致连接被重置(ECONNRESET)。如果下载时经常报错"连接被重置",建议开启。`),s([`app`,`downloadMaxSpeed`],`最大下载速度`,`限速开关打开后生效。单位:MB/s,建议值:10,根据实际情况调整。`,{type:`number`,fallback:10,min:1,max:100,disabled:!Q(e,[`app`,`downloadThrottle`],!1)}),o([`app`,`downloadAutoReduce`],`断流自动降速`,`限速开关打开后生效。当检测到下载中断时,自动降低下载速度,避免再次触发风控。`,!Q(e,[`app`,`downloadThrottle`],!1)),s([`app`,`downloadMinSpeed`],`最低下载速度`,`断流降速开关打开后生效。单位:MB/s,自动降速的下限值。`,{type:`number`,fallback:1,min:.5,max:50,disabled:!Q(e,[`app`,`downloadThrottle`],!1)||!Q(e,[`app`,`downloadAutoReduce`],!1)})]})]})),a(`Live Photo 兼容设置`,(0,V.jsxs)(V.Fragment,{children:[i([`app`,`livePhotoMode`],`Live Photo 处理和发送方式`,`解析遇到实况图时的处理和发送方式。注意:生成视频性能开销大,2C2G 服务器单张约需 20 秒。`,[{label:`视频 + 实况图`,value:`video_and_livephoto`,description:`生成并发送仿 iPhone Live Photo 播放效果的视频(播放三次)+ 对应系统的实况图`},{label:`仅视频`,value:`video_only`,description:`仅生成并发送仿 iPhone Live Photo 播放效果的视频(播放三次)`},{label:`仅实况图`,value:`livephoto_only`,description:`仅生成并发送对应系统的实况图,性能开销小`}]),i([`app`,`livePhotoSystem`],`Live Photo 静态图兼容系统`,`当解析到作品/动态包含 Live Photo 时,合并转发里发送的 Live Photo 静态图按所选系统生成。推荐 OPPO,兼容性最广。`,[{label:`Google`,value:`google`,description:`Google Motion Photo 格式`},{label:`小米(HyperOS)`,value:`xiaomi`,description:`兼容小米(任何版本)和 Google,但无法被 OPPO 识别`},{label:`OPPO(ColorOS)`,value:`oppo`,description:`推荐,兼容 OPPO、小米(较新版本)和 Google`},{label:`华为/荣耀(HarmonyOS/MagicOS)`,value:`huawei_honor`,description:`理论可行但未实测(作者无对应设备)`},{label:`vivo(Origin OS)`,value:`vivo`,description:`需要独立的图片和同名视频文件,暂不支持`,disabled:!0},{label:`iPhone(iOS)`,value:`iphone`,description:`需要独立的图片和同名视频文件,暂不支持`,disabled:!0}],e=>e,c===`video_only`)]})),a(`我的小玩具`,(0,V.jsxs)(V.Fragment,{children:[o([`app`,`videoTool`],`默认解析优先级`,`关闭后使用自定义优先级,修改后需重启。`),s([`app`,`priority`],`自定义优先级`,`默认解析优先级关闭后生效。`,{type:`number`,disabled:Q(e,[`app`,`videoTool`],!0),fallback:800}),i([`app`,`qrLoginAddrType`],`扫码登录地址`,`生成登录二维码时使用的服务器地址。`,[{label:`局域网`,value:`lan`,description:`适用于手机和服务器在同一局域网`},{label:`外部地址`,value:`external`,description:`适用于远程访问,需手动配置`}]),s([`app`,`qrLoginExternalAddr`],`外部访问地址`,`公网 IP 或域名,如:123.45.67.89 或 example.com。`,{disabled:Q(e,[`app`,`qrLoginAddrType`],`lan`)!==`external`})]}))]})},nF=({config:e,renderers:t,classes:n})=>{let{renderCheckboxGroup:r,renderCronField:i,renderPageHeader:a,renderSelectField:o,renderSubSection:s,renderSwitch:c,renderTextField:l}=t,u=Q(e,[`bilibili`,`switch`],!1),d=Q(e,[`bilibili`,`sendContent`],[]),f=Q(e,[`bilibili`,`burnDanmaku`],!1),p=Q(e,[`bilibili`,`videoQuality`],0),m=Q(e,[`bilibili`,`videoInfoMode`],`text`),h=Q(e,[`bilibili`,`push`,`switch`],!1),g=Q(e,[`bilibili`,`push`,`parsedynamic`],!1),_=Q(e,[`bilibili`,`push`,`pushVideoQuality`],0),v=!u||!SP(d,`comment`),y=!u||!f;return(0,V.jsxs)(V.Fragment,{children:[a(`哔哩哔哩`,`B站解析、动态图片布局、弹幕和推送基础设置。`),(0,V.jsxs)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:[c([`bilibili`,`switch`],`解析开关`,`B站解析开关,此开关为单独开关。`),r([`bilibili`,`sendContent`],`解析时发送的内容`,`若什么都不选,可能不会返回任何解析结果。`,IP.filter(e=>e.value!==`image`),!u)]}),s(`评论详情设置`,(0,V.jsxs)(V.Fragment,{children:[l([`bilibili`,`numcomment`],`评论解析数量`,`主评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:v}),c([`bilibili`,`realCommentCount`],`显示真实评论数量`,`关闭则显示解析到的评论数量。`,v),c([`bilibili`,`commentImageCollection`],`是否收集评论区的图片`,`开启后将收集评论区的图片,以合并转发的形式返回。`,v)]})),s(`渲染与画质设置`,(0,V.jsxs)(V.Fragment,{children:[o([`bilibili`,`videoQuality`],`画质偏好`,`解析视频的分辨率偏好。`,zP,Number,!u),l([`bilibili`,`maxAutoVideoSize`],`视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!u||Number(p)!==0}),o([`bilibili`,`imageLayout`],`解析图文动态时,遇到多张图片时的页面布局方式(动态推送图片也生效)`,`自动布局:少于4张时逐张上下排列;4~8张时瀑布流;9张及以上九宫格。`,[{label:`自动布局`,value:`auto`},{label:`逐张上下排列`,value:`vertical`},{label:`瀑布流排列`,value:`waterfall`},{label:`九宫格排列`,value:`grid`}]),o([`bilibili`,`videoInfoMode`],`视频信息返回形式`,`视频信息返回文本或图片。`,[{label:`图片模式`,value:`image`},{label:`文本模式`,value:`text`}],e=>e,!u),r([`bilibili`,`displayContent`],`视频信息前返回的内容`,`若什么都不选,则不会返回任何视频相关信息。`,LP,!u||m===`image`),c([`bilibili`,`showDanmakuInVideoInfo`],`视频信息图片中显示弹幕`,`开启后在视频信息图片的封面区域显示热门弹幕。关闭后不会请求弹幕数据,可提升解析速度。仅「视频信息返回形式」为图片模式时生效。`,!u||m===`text`)]})),s(`权限设置`,(0,V.jsx)(V.Fragment,{children:o([`bilibili`,`loginPerm`],`谁可以触发扫码登录`,`修改后需重启。`,VP)})),s(`弹幕烧录相关`,(0,V.jsxs)(V.Fragment,{children:[c([`bilibili`,`burnDanmaku`],`弹幕烧录`,`将弹幕硬编码到视频画面中。开启后视频需要重新编码,耗时较长,高分辨率视频会占用较多资源。`,!u),o([`bilibili`,`danmakuArea`],`弹幕区域`,`限制弹幕的显示范围,避免遮挡视频主体内容。`,WP,Number,y),o([`bilibili`,`danmakuFontSize`],`弹幕字号`,`弹幕文字大小。`,GP,e=>e,y),l([`bilibili`,`danmakuOpacity`],`弹幕透明度`,`0为完全透明,100为完全不透明,推荐70。`,{type:`number`,fallback:70,min:0,max:100,disabled:y}),o([`bilibili`,`verticalMode`],`竖屏适配`,`模拟手机端竖屏观看体验,视频居中显示,上下黑边区域用于展示弹幕。`,UP,e=>e,y),o([`bilibili`,`videoCodec`],`视频编码格式`,`弹幕烧录时使用的视频编码格式,会自动检测硬件加速。`,HP,e=>e,y)]})),s(`B站推送相关`,(0,V.jsxs)(V.Fragment,{children:[c([`bilibili`,`push`,`switch`],`推送开关`,`推送开关,修改后需重启;使用「#设置B站推送 + UID」配置推送列表。`),o([`bilibili`,`push`,`permission`],`谁可以设置推送`,`修改后需重启。`,VP,e=>e,!h),i([`bilibili`,`push`,`cron`],`定时任务表达式`,`定时推送的时间,支持可视化编辑或手动输入 cron 表达式。`,!h),c([`bilibili`,`push`,`parsedynamic`],`作品解析`,`触发推送时是否一同解析该作品。`,!h),r([`bilibili`,`push`,`parseDynamicTypes`],`需要解析的动态类型`,`选择推送时需要进一步解析的动态类型;未选择的类型只发送动态卡片。`,BP,!h||!g),o([`bilibili`,`push`,`pushVideoQuality`],`解析视频动态时的画质偏好`,`「作品解析」开启时生效,仅对视频动态有效。`,zP.filter(e=>e.value!==`127`),Number,!h||!g),l([`bilibili`,`push`,`pushMaxAutoVideoSize`],`视频动态的视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「解析视频动态时的画质偏好」 为 "自动选择" 且「作品解析」开启时生效,仅对视频动态有效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!h||!g||Number(_)!==0})]}))]})},rF=({config:e,renderers:t,classes:n})=>{let{renderCheckboxGroup:r,renderCronField:i,renderPageHeader:a,renderSelectField:o,renderSubSection:s,renderSwitch:c,renderTextField:l}=t,u=Q(e,[`app`,`livePhotoMode`],`video_and_livephoto`),d=Q(e,[`douyin`,`switch`],!1),f=Q(e,[`douyin`,`sendContent`],[]),p=Q(e,[`douyin`,`burnDanmaku`],!1),m=Q(e,[`douyin`,`videoQuality`],`adapt`),h=Q(e,[`douyin`,`videoInfoMode`],`text`),g=Q(e,[`douyin`,`push`,`switch`],!1),_=Q(e,[`douyin`,`push`,`pushVideoQuality`],`adapt`),v=!d||!SP(f,`comment`),y=!d||!p;return(0,V.jsxs)(V.Fragment,{children:[a(`抖音`,`抖音解析、画质、弹幕和推送基础设置。`),(0,V.jsxs)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:[c([`douyin`,`switch`],`解析开关`,`抖音解析开关,此开关为单独开关。`),r([`douyin`,`sendContent`],`解析时发送的内容`,`若什么都不选,可能不会返回任何解析结果。`,IP.filter(e=>e.value!==`image`),!d)]}),s(`评论详情设置`,(0,V.jsxs)(V.Fragment,{children:[l([`douyin`,`numcomment`],`评论解析数量`,`主评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:v}),l([`douyin`,`subCommentLimit`],`子评论请求数量`,`单条主评论下请求的子评论总条数(含多层嵌套)。注意:UI中最多显示 6 层回复嵌套,超出部分会被隐藏;因实际嵌套深度不可预知,配置数量不代表最终可见数量。`,{type:`number`,fallback:5,min:1,max:20,disabled:v}),c([`douyin`,`commentImageCollection`],`是否收集评论区的图片`,`开启后将收集评论区的图片,以合并转发的形式返回。`,v)]})),s(`渲染与画质设置`,(0,V.jsxs)(V.Fragment,{children:[o([`douyin`,`liveImageMergeMode`],`合辑 Live 图 BGM 合并方式`,`合辑 Live 图 BGM 合并方式,仅 Live Photo 模式不是「仅实况图」时生效。`,[{label:`连续`,value:`continuous`,description:`BGM 接续播放,结束后自动循环`},{label:`独立`,value:`independent`,description:`每张图 BGM 从头开始`}],e=>e,!d||u===`livephoto_only`),o([`douyin`,`videoQuality`],`画质偏好`,`解析视频的分辨率偏好。`,RP,e=>e,!d),l([`douyin`,`maxAutoVideoSize`],`视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!d||m!==`adapt`}),o([`douyin`,`videoInfoMode`],`视频信息返回形式`,`视频信息返回文本或图片。`,[{label:`图片模式`,value:`image`},{label:`文本模式`,value:`text`}],e=>e,!d),r([`douyin`,`displayContent`],`视频信息的内容`,`若什么都不选,则不会返回任何视频相关信息。`,LP.filter(e=>e.value!==`desc`),!d||h===`image`)]})),s(`权限设置`,(0,V.jsx)(V.Fragment,{children:o([`douyin`,`loginPerm`],`谁可以触发扫码登录`,`修改后需重启。`,VP)})),s(`弹幕烧录相关`,(0,V.jsxs)(V.Fragment,{children:[c([`douyin`,`burnDanmaku`],`弹幕烧录`,`将弹幕硬编码到视频画面中。开启后视频需要重新编码,耗时较长。`,!d),o([`douyin`,`danmakuArea`],`弹幕显示区域`,`限制弹幕范围,避免遮挡视频主体。`,WP,Number,y),o([`douyin`,`danmakuFontSize`],`弹幕字号`,`弹幕文字大小。`,GP,e=>e,y),l([`douyin`,`danmakuOpacity`],`弹幕透明度`,`0为完全透明,100为完全不透明,推荐70。`,{type:`number`,fallback:70,min:0,max:100,disabled:y}),o([`douyin`,`verticalMode`],`竖屏适配`,`针对横屏视频,模拟手机端竖屏观看体验,视频居中显示,上下黑边区域用于展示弹幕。`,UP,e=>e,y),o([`douyin`,`videoCodec`],`视频编码格式`,`烧录弹幕后的视频编码格式。`,HP,e=>e,y)]})),s(`抖音推送相关`,(0,V.jsxs)(V.Fragment,{children:[c([`douyin`,`push`,`switch`],`推送开关`,`推送开关,修改后需重启;使用「#设置抖音推送 + 抖音号」配置推送列表。`),o([`douyin`,`push`,`permission`],`谁可以设置推送`,`修改后需重启。`,VP,e=>e,!g),i([`douyin`,`push`,`cron`],`定时任务表达式`,`定时推送的时间,支持可视化编辑或手动输入 cron 表达式。`,!g),c([`douyin`,`push`,`parsedynamic`],`作品解析`,`触发推送时是否一同解析该作品。`,!g),o([`douyin`,`push`,`shareType`],`推送图二维码的类型`,`推送图二维码识别后的跳转类型。`,[{label:`网页链接`,value:`web`,description:`识别后访问抖音官网对应的作品地址`},{label:`下载链接`,value:`download`,description:`识别后访问无水印作品下载地址`}],e=>e,!g),o([`douyin`,`push`,`pushVideoQuality`],`画质偏好`,`推送解析时解析视频的分辨率偏好。`,RP,e=>e,!g),l([`douyin`,`push`,`pushMaxAutoVideoSize`],`视频体积上限(MB)`,`推送解析时根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!g||_!==`adapt`})]}))]})},iF=({config:e,renderers:t,classes:n})=>{let{renderPageHeader:r,renderSubSection:i,renderSwitch:a,renderTextField:o}=t,s=Q(e,[`kuaishou`,`switch`],!1),c=Q(e,[`kuaishou`,`comment`],!1);return(0,V.jsxs)(V.Fragment,{children:[r(`快手`,`快手解析基础设置。`),(0,V.jsx)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:a([`kuaishou`,`switch`],`解析开关`,`快手解析开关,此开关为单独开关。`)}),i(`评论详情设置`,(0,V.jsxs)(V.Fragment,{children:[a([`kuaishou`,`comment`],`评论解析`,`快手评论解析,开启后可发送快手作品评论图。`,!s),o([`kuaishou`,`numcomment`],`评论解析数量`,`快手评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:!s||!c})]}))]})},aF=({children:e,disabled:t,message:n,device:r})=>t?r===`mobile`?(0,V.jsxs)(Wh,{children:[(0,V.jsx)(Wh.Trigger,{className:`w-full cursor-not-allowed`,children:e}),(0,V.jsxs)(Wh.Content,{placement:`bottom`,children:[(0,V.jsx)(Wh.Arrow,{}),(0,V.jsx)(`div`,{className:`px-3 py-2`,children:(0,V.jsx)(`p`,{className:`text-sm text-foreground`,children:n})})]})]}):(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{className:`w-full cursor-not-allowed`,children:e}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),n]})]}):e,oF=e=>e===`desktop`?`grid grid-cols-2 gap-4`:`flex flex-col gap-4`,sF=[{label:`作品列表`,value:`post`,description:`推送用户发布的作品`},{label:`喜欢列表`,value:`favorite`,description:`推送用户喜欢的作品`},{label:`推荐列表`,value:`recommend`,description:`推送推荐的作品`},{label:`直播`,value:`live`,description:`推送直播状态`}],cF=[{label:`投稿视频`,value:`video`,description:`推送UP主投稿的视频`},{label:`图文动态`,value:`draw`,description:`推送图文动态`},{label:`纯文动态`,value:`word`,description:`推送纯文字动态`},{label:`直播动态`,value:`live`,description:`推送直播状态`},{label:`转发动态`,value:`forward`,description:`推送转发的动态`},{label:`投稿专栏`,value:`article`,description:`推送专栏文章`}],lF=[{label:`黑名单`,value:`blacklist`,description:`命中关键词/标签则不推送`},{label:`白名单`,value:`whitelist`,description:`只推送命中关键词/标签的内容`}],uF=({label:e,description:t,items:n,onAdd:r,onRemove:i,disabled:a=!1})=>{let[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),u=()=>{let e=o.trim();if(!e){l(`请输入内容`);return}if(n.includes(e)){l(`该项已存在,请勿重复添加`);return}r(e),s(``),l(``)};return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsxs)(Fv,{className:`flex-1`,isDisabled:a,isInvalid:!!c,value:o,onChange:e=>{s(e),c&&l(``)},children:[(0,V.jsx)(Lv,{children:e}),(0,V.jsx)(Pv,{variant:`secondary`,placeholder:`输入${e}`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),u())}}),c?(0,V.jsx)(Vv,{children:c}):null]}),(0,V.jsx)(Hm,{isDisabled:a,variant:`secondary`,onPress:u,children:(0,V.jsx)(dk,{className:`size-4`})})]}),n.length>0?(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.map(e=>(0,V.jsxs)(yh,{color:`accent`,variant:`soft`,children:[(0,V.jsx)(`span`,{children:e}),a?null:(0,V.jsx)(`button`,{type:`button`,className:`ml-1 rounded-full p-0.5 hover:bg-black/10`,onClick:()=>i(e),children:(0,V.jsx)(mk,{className:`size-3`})})]},e))}):(0,V.jsxs)(zv,{children:[`暂无`,e]}),(0,V.jsx)(zv,{children:t})]})},dF=(e,t)=>{if((e.success||e.code===200)&&e.data!==void 0)return e.data;throw Error(e.message||t)},fF=async()=>dF((await aN.get(`/kkk/v1/bots`)).data,`获取 Bot 列表失败`),pF=async e=>dF((await aN.get(`/kkk/v1/bots/${encodeURIComponent(e)}/groups`)).data,`获取群列表失败`),mF=async e=>e.length===0?[]:dF((await aN.post(`/kkk/v1/groups/batch`,{groups:e})).data,`获取推送目标信息失败`),hF=({mapping:e,compact:t=!1,stacked:n=!1})=>n?(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.groupName||e.groupId,src:e.groupAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.groupName||e.groupId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.groupName||e.groupId}),(0,V.jsx)(zv,{className:`block truncate`,children:e.groupId})]})]}),(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pl-8`,children:[(0,V.jsx)(nk,{className:`size-4 shrink-0 text-muted`}),(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.botName||e.botId,src:e.botAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.botName||e.botId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.botName||e.botId}),(0,V.jsx)(zv,{className:`block truncate`,children:t?e.botId:`Bot ${e.botId}`})]})]})]}):(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.groupName||e.groupId,src:e.groupAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.groupName||e.groupId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.groupName||e.groupId}),(0,V.jsx)(zv,{className:`block truncate`,children:e.groupId})]}),(0,V.jsx)(nk,{className:`size-4 shrink-0 text-muted`}),(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.botName||e.botId,src:e.botAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.botName||e.botId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.botName||e.botId}),(0,V.jsx)(zv,{className:`block truncate`,children:t?e.botId:`Bot ${e.botId}`})]})]}),gF=e=>`${e.groupId}:${e.botId}`,_F=e=>{let[t,n,r]=e.split(`:`);return!t||!n||r!==void 0?null:{groupId:t,botId:n}},vF=e=>{let t=new Set,n=[];return e.forEach(e=>{let r=_F(e);if(!r)return;let i=gF(r);t.has(i)||(t.add(i),n.push(i))}),n},yF=({device:e,mappings:t,onEdit:n,onRemove:r})=>(0,V.jsxs)(`div`,{className:e===`mobile`?`flex min-h-0 min-w-0 flex-1 flex-col gap-4`:`flex min-w-0 flex-col gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Lv,{children:`已配置目标`}),(0,V.jsxs)(zv,{children:[t.length,` 个推送目标`]})]}),t.length>0?(0,V.jsx)(`div`,{className:e===`mobile`?`flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto pb-2`:`flex max-h-72 flex-col gap-2 overflow-y-auto`,children:t.map(t=>{let i=gF(t);return(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 rounded-lg border border-default-200 bg-default-50/50 p-2.5`,children:[(0,V.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,V.jsx)(hF,{compact:!0,mapping:t,stacked:e===`mobile`})}),(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":`编辑推送目标`,size:`sm`,variant:`tertiary`,onPress:()=>n(i),children:(0,V.jsx)(uk,{className:`size-4`})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),`编辑`]})]}),(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":`删除推送目标`,size:`sm`,variant:`danger`,onPress:()=>r(i),children:(0,V.jsx)(mk,{className:`size-4`})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),`删除`]})]})]},i)})}):(0,V.jsx)(`div`,{className:`rounded-lg border border-dashed border-default-300 px-4 py-5 text-sm text-muted`,children:`还没有推送目标,点击上方按钮添加。`})]}),bF=({label:e,description:t,placeholder:n,disabled:r=!1,items:i,selectedId:a,onSelect:o})=>(0,V.jsxs)(ny,{fullWidth:!0,allowsEmptyCollection:!0,isDisabled:r,placeholder:n,value:a||null,variant:`secondary`,onChange:e=>o(String(e||``)),children:[(0,V.jsx)(Lv,{children:e}),(0,V.jsxs)(ny.Trigger,{children:[(0,V.jsx)(ny.Value,{children:({defaultChildren:e,isPlaceholder:t,state:n})=>{if(t||n.selectedItems.length===0)return e;let r=i.find(e=>e.id===n.selectedItems[0]?.key);return r?(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:r.name,src:r.avatar}),(0,V.jsx)(Lm.Fallback,{children:r.name.slice(0,1)})]}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block truncate`,children:r.name}),(0,V.jsx)(`span`,{className:`block truncate text-xs text-muted`,children:r.description})]})]}):e}}),(0,V.jsx)(ny.Indicator,{})]}),(0,V.jsx)(zv,{children:t}),!r&&i.length===0?(0,V.jsx)(zv,{className:`text-warning`,children:`当前没有可选项`}):null,(0,V.jsx)(ny.Popover,{className:`max-h-72`,children:(0,V.jsx)(Xv,{items:i,children:e=>(0,V.jsxs)(Xv.Item,{id:e.id,textValue:`${e.name} ${e.description}`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.name,src:e.avatar}),(0,V.jsx)(Lm.Fallback,{children:e.name.slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Lv,{className:`truncate`,children:e.name}),(0,V.jsx)(zv,{className:`truncate`,children:e.description})]})]}),(0,V.jsx)(Xv.ItemIndicator,{})]})})})]}),xF=({isOpen:e,device:t,initialMapping:n,onOpenChange:r,onConfirm:i})=>{let[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(n?.botId||``),[d,f]=(0,v.useState)(n?.groupId||``),[p,m]=(0,v.useState)(!0),[h,g]=(0,v.useState)(!!n?.botId),[_,y]=(0,v.useState)(``);(0,v.useEffect)(()=>{e&&(u(n?.botId||``),f(n?.groupId||``),c([]),o([]),m(!0),g(!!n?.botId),y(``))},[e,n?.botId,n?.groupId]);let b=(0,v.useMemo)(()=>a.find(e=>e.id===l),[a,l]),x=(0,v.useMemo)(()=>s.find(e=>e.id===d),[s,d]),S=(0,v.useMemo)(()=>a.map(e=>({id:e.id,name:e.name,avatar:e.avatar,description:e.id})),[a]),C=(0,v.useMemo)(()=>s.map(e=>({id:e.id,name:e.name,avatar:e.avatar,description:e.id})),[s]),w=!!(l&&d);(0,v.useEffect)(()=>{e&&fF().then(o).catch(e=>{y(e instanceof Error?e.message:`获取 Bot 列表失败`)}).finally(()=>m(!1))},[e]),(0,v.useEffect)(()=>{!e||!l||pF(l).then(e=>{c(e),f(t=>e.some(e=>e.id===t)?t:``)}).catch(e=>{y(e instanceof Error?e.message:`获取群列表失败`)}).finally(()=>g(!1))},[e,l]);let T=()=>{if(!w||!b||!x)return;let e={groupId:x.id,botId:b.id};x.name&&(e.groupName=x.name),x.avatar&&(e.groupAvatar=x.avatar),b.name&&(e.botName=b.name),b.avatar&&(e.botAvatar=b.avatar),b.isOnline!==void 0&&(e.isOnline=b.isOnline),i(e)},E=t===`desktop`?`right`:`bottom`,D=n?`编辑推送目标`:`添加推送目标`;return(0,V.jsx)(Vh.Backdrop,{isOpen:e,onOpenChange:r,children:(0,V.jsx)(Vh.Content,{placement:E,children:(0,V.jsxs)(Vh.Dialog,{className:t===`desktop`?`h-full w-105 max-w-[90vw]`:`max-h-[78dvh]`,children:[(0,V.jsx)(Vh.Handle,{}),(0,V.jsx)(Vh.CloseTrigger,{}),(0,V.jsxs)(Vh.Header,{children:[(0,V.jsx)(Vh.Heading,{children:D}),(0,V.jsx)(zv,{children:`先选择 Bot,再选择该 Bot 加入的群。`})]}),(0,V.jsxs)(Vh.Body,{className:`flex flex-col gap-4`,children:[(0,V.jsx)(bF,{description:`Karin 当前已注册且在线的 Bot。`,disabled:p,items:S,label:`机器人账号`,placeholder:`选择机器人账号`,selectedId:l,onSelect:e=>{y(``),c([]),g(!!e),u(e),f(``)}}),(0,V.jsx)(bF,{description:l?`当前 Bot 已加入的群。`:`请先选择机器人账号。`,disabled:!l||h,items:C,label:`推送群`,placeholder:`选择推送群`,selectedId:d,onSelect:f}),p||h?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在读取列表`}),(0,V.jsx)(`span`,{children:`正在读取列表`})]}):null,b&&x?(0,V.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-default-200 bg-default-50/60 p-3`,children:[(0,V.jsx)(Lv,{children:`将写入`}),(0,V.jsxs)(zv,{className:`mt-1`,children:[x.name,`(`,x.id,`) -> `,b.name,`(`,b.id,`)`]})]}):null,_?(0,V.jsx)(zv,{className:`text-danger`,children:_}):null]}),(0,V.jsxs)(Vh.Footer,{children:[(0,V.jsx)(Hm,{size:t===`mobile`?`sm`:`md`,slot:`close`,variant:`secondary`,children:`取消`}),(0,V.jsx)(Hm,{size:t===`mobile`?`sm`:`md`,slot:`close`,isDisabled:!w,onPress:T,children:n?`保存`:`添加`})]})]})})})},SF=(e,t,n)=>{let r=vF(e);return{values:r,mappings:r.map(e=>{let r=_F(e),i=n[e]||t.find(t=>gF(t)===e);if(!r)return null;let a={groupId:r.groupId,botId:r.botId};return i?.groupName&&(a.groupName=i.groupName),i?.groupAvatar&&(a.groupAvatar=i.groupAvatar),i?.botName&&(a.botName=i.botName),i?.botAvatar&&(a.botAvatar=i.botAvatar),i?.isOnline!==void 0&&(a.isOnline=i.isOnline),a}).filter(e=>!!e)}},CF=({isOpen:e,values:t,mappings:n,device:r,onOpenChange:i,onApply:a})=>{let[o,s]=(0,v.useState)(()=>vF(t)),[c,l]=(0,v.useState)({}),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!1),m=(0,v.useMemo)(()=>SF(o,n,c),[o,c,n]),h=r===`desktop`?`right`:`bottom`,g=u?_F(u):null,_=e=>{d(e),p(!0)};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Vh.Backdrop,{isOpen:e,onOpenChange:e=>{e||a(m.values),i(e)},variant:`blur`,children:(0,V.jsx)(Vh.Content,{placement:h,children:(0,V.jsxs)(Vh.Dialog,{className:r===`desktop`?`h-full w-130 max-w-[90vw]`:`max-h-[84dvh]`,children:[(0,V.jsx)(Vh.Handle,{}),(0,V.jsx)(Vh.CloseTrigger,{}),(0,V.jsxs)(Vh.Header,{children:[(0,V.jsx)(Vh.Heading,{children:`推送目标`}),(0,V.jsx)(zv,{children:`管理所有接收推送的群和 Bot 映射。`})]}),(0,V.jsxs)(Vh.Body,{className:`flex min-h-0 flex-col gap-3`,children:[(0,V.jsxs)(Hm,{className:`self-start`,size:r===`mobile`?`sm`:`md`,onPress:()=>_(null),children:[(0,V.jsx)(dk,{className:`size-4`}),`添加推送目标`]}),(0,V.jsx)(yF,{device:r,mappings:m.mappings,onEdit:e=>_(e),onRemove:e=>{s(t=>t.filter(t=>t!==e)),l(t=>{let n={...t};return delete n[e],n})}})]}),(0,V.jsxs)(Vh.Footer,{children:[(0,V.jsx)(Hm,{size:r===`mobile`?`sm`:`md`,slot:`close`,variant:`secondary`,children:`取消`}),(0,V.jsx)(Hm,{size:r===`mobile`?`sm`:`md`,slot:`close`,onPress:()=>{a(m.values)},children:`完成`})]})]})})}),(0,V.jsx)(xF,{device:r,initialMapping:g,isOpen:f,onConfirm:e=>{let t=gF(e),n=[...o],r=u?n.indexOf(u):-1;r>=0?n[r]=t:n.unshift(t),s(vF(n)),l(n=>{let r={...n,[t]:e};return u&&u!==t&&delete r[u],r}),p(!1),d(null)},onOpenChange:p},u||`new`)]})},wF=(e,t)=>{let n=_F(e);if(!n)return null;let r={groupId:n.groupId,botId:n.botId};return t?.groupName&&(r.groupName=t.groupName),t?.groupAvatar&&(r.groupAvatar=t.groupAvatar),t?.botName&&(r.botName=t.botName),t?.botAvatar&&(r.botAvatar=t.botAvatar),t?.isOnline!==void 0&&(r.isOnline=t.isOnline),r},TF=({value:e,disabled:t,itemLabel:n,device:r,onChange:i})=>{let a=(0,v.useMemo)(()=>vF(e),[e]),o=(0,v.useMemo)(()=>e.filter(e=>!_F(e)),[e]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(!1),p=(0,v.useMemo)(()=>a.map(e=>{let t=_F(e);return wF(e,t?s.find(e=>e.groupId===t.groupId&&e.botId===t.botId):void 0)}).filter(e=>!!e),[s,a]);(0,v.useEffect)(()=>{mF(a.map(_F).filter(e=>!!e)).then(c).catch(()=>c([])).finally(()=>u(!1))},[a]);let m=e=>i(vF(e)),h=`开启【${n}】的推送开关后才能编辑此字段`,g=a.length>0?`已配置 ${a.length} 个推送目标`:`还没有配置推送目标`;return(0,V.jsx)(aF,{disabled:t,device:r,message:h,children:(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-4 rounded-lg border border-default-200 bg-default-50/50 px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,V.jsx)(Lv,{children:`推送目标`}),(0,V.jsx)(zv,{className:`mt-1`,children:g})]}),(0,V.jsxs)(Hm,{isDisabled:t,size:r===`mobile`?`sm`:`md`,variant:r===`mobile`?`primary`:`secondary`,onPress:()=>f(!0),children:[(0,V.jsx)(uk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`管理`})]})]}),l?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在读取推送目标`}),(0,V.jsx)(`span`,{children:`正在读取推送目标`})]}):null,o.length>0?(0,V.jsxs)(`div`,{className:`rounded-lg border border-warning/30 bg-warning/10 p-3 text-sm`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 font-medium text-warning`,children:[(0,V.jsx)(hk,{className:`size-4`}),(0,V.jsxs)(`span`,{children:[`发现 `,o.length,` 条旧格式或错误格式`]})]}),(0,V.jsx)(zv,{className:`mt-1`,children:`建议删除后用可视化选择重新添加,避免后端解析异常。`})]}):null,(0,V.jsx)(CF,{device:r,isOpen:d,mappings:p,values:a,onApply:m,onOpenChange:f})]})})},EF=({disabled:e,itemLabel:t,device:n,value:r,onChange:i})=>(0,V.jsx)(TF,{disabled:e,device:n,itemLabel:t,value:r,onChange:i}),DF=({disabled:e,itemLabel:t,device:n,options:r,value:i,onChange:a})=>(0,V.jsx)(aF,{disabled:e,device:n,message:`开启【${t}】的推送开关后才能编辑此字段`,children:(0,V.jsxs)(lh,{"aria-label":`推送类型`,isDisabled:e,value:i,onChange:e=>a(e),children:[(0,V.jsx)(Lv,{children:`推送类型`}),(0,V.jsx)(zv,{children:`选择要推送的内容类型`}),(0,V.jsx)(`div`,{className:`mt-2 ${oF(n)}`,children:r.map(e=>(0,V.jsxs)(hh,{value:e.value,variant:`secondary`,children:[(0,V.jsxs)(hh.Content,{children:[(0,V.jsx)(hh.Control,{children:(0,V.jsx)(hh.Indicator,{})}),e.label]}),(0,V.jsx)(zv,{children:e.description})]},e.value))})]})}),OF=({disabled:e,itemLabel:t,device:n,value:r,onChange:i})=>(0,V.jsx)(aF,{disabled:e,device:n,message:`开启【${t}】的推送开关后才能编辑此字段`,children:(0,V.jsxs)(ny,{fullWidth:!0,isDisabled:e,value:r,onChange:e=>{e&&!Array.isArray(e)&&i(e)},children:[(0,V.jsx)(Lv,{children:`过滤模式`}),(0,V.jsxs)(ny.Trigger,{children:[(0,V.jsx)(ny.Value,{}),(0,V.jsx)(ny.Indicator,{})]}),(0,V.jsx)(zv,{children:`设置关键词/标签的过滤方式`}),(0,V.jsx)(ny.Popover,{children:(0,V.jsx)(Xv,{children:lF.map(e=>(0,V.jsxs)(Xv.Item,{id:e.value,textValue:e.label,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(Lv,{children:e.label}),(0,V.jsx)(zv,{children:e.description})]}),(0,V.jsx)(Xv.ItemIndicator,{})]},e.value))})})]})}),kF=({disabled:e,itemLabel:t,device:n,keywords:r,tags:i,onKeywordsChange:a,onTagsChange:o})=>{let s=`开启【${t}】的推送开关后才能编辑此字段`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(aF,{disabled:e,device:n,message:s,children:(0,V.jsx)(`div`,{children:(0,V.jsx)(uF,{label:`关键词`,description:`多个关键词用于内容过滤`,disabled:e,items:r,onAdd:e=>a([...r,e]),onRemove:e=>a(r.filter(t=>t!==e))})})}),(0,V.jsx)(aF,{disabled:e,device:n,message:s,children:(0,V.jsx)(`div`,{children:(0,V.jsx)(uF,{label:`标签`,description:`多个标签用于内容过滤`,disabled:e,items:i,onAdd:e=>o([...i,e]),onRemove:e=>o(i.filter(t=>t!==e))})})})]})},AF=({onDelete:e})=>(0,V.jsxs)(Hm,{className:`w-full`,variant:`danger`,onPress:e,children:[(0,V.jsx)(mk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`删除此推送项`})]}),jF=({item:e,index:t,list:n,onChange:r,device:i})=>{let a=i=>{let a=[...n];a[t]={...e,...i},r(a)},o=!e.switch,s=e.remark||`UID: ${e.host_mid}`||`未命名`,c=`开启【${s}】的推送开关后才能编辑此字段`;return(0,V.jsxs)(Vo.Item,{id:`bilibili-${t}`,children:[(0,V.jsx)(Vo.Heading,{children:(0,V.jsxs)(Vo.Trigger,{children:[(0,V.jsxs)(`div`,{className:`flex flex-1 items-center gap-3`,children:[(0,V.jsx)(`div`,{onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,V.jsx)(P_,{"aria-label":`推送开关`,isSelected:e.switch,onChange:e=>a({switch:e}),children:(0,V.jsx)(P_.Content,{children:(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})})})})}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`span`,{className:`font-medium`,children:e.remark||`UID: ${e.host_mid}`||`推送项 ${t+1}`}),(0,V.jsxs)(zv,{className:`text-xs`,children:[`B站 UID: `,e.host_mid]})]})]}),(0,V.jsx)(Vo.Indicator,{children:(0,V.jsx)(rk,{className:`size-5`})})]})}),(0,V.jsx)(Vo.Panel,{children:(0,V.jsx)(Vo.Body,{children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:oF(i),children:[(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,isRequired:!0,type:`number`,value:String(e.host_mid),onChange:e=>a({host_mid:Number(e)||0}),children:[(0,V.jsx)(Lv,{children:`B站 UID`}),(0,V.jsx)(Pv,{placeholder:`UP主的 UID`}),(0,V.jsx)(zv,{children:`B站用户的唯一标识,必填`})]})}),(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,value:e.remark,onChange:e=>a({remark:e}),children:[(0,V.jsx)(Lv,{children:`备注名称`}),(0,V.jsx)(Pv,{placeholder:`可选,用于识别该推送项`}),(0,V.jsx)(zv,{children:`方便识别的名称,如:UP主昵称`})]})})]}),(0,V.jsx)(EF,{disabled:o,device:i,itemLabel:s,value:e.group_id,onChange:e=>a({group_id:e})}),(0,V.jsx)(DF,{disabled:o,device:i,itemLabel:s,options:cF,value:e.pushTypes||[],onChange:e=>a({pushTypes:e})}),(0,V.jsx)(OF,{disabled:o,device:i,itemLabel:s,value:e.filterMode||`blacklist`,onChange:e=>a({filterMode:e})}),(0,V.jsx)(kF,{disabled:o,device:i,itemLabel:s,keywords:e.Keywords||[],tags:e.Tags||[],onKeywordsChange:e=>a({Keywords:e}),onTagsChange:e=>a({Tags:e})}),(0,V.jsx)(AF,{onDelete:()=>r(n.filter((e,n)=>n!==t))})]})})})]},t)},MF=({item:e,index:t,list:n,onChange:r,device:i})=>{let a=i=>{let a=[...n];a[t]={...e,...i},r(a)},o=!e.switch,s=e.remark||e.short_id||e.sec_uid||`未命名`,c=`开启【${s}】的推送开关后才能编辑此字段`;return(0,V.jsxs)(Vo.Item,{id:`douyin-${t}`,children:[(0,V.jsx)(Vo.Heading,{children:(0,V.jsxs)(Vo.Trigger,{children:[(0,V.jsxs)(`div`,{className:`flex flex-1 items-center gap-3`,children:[(0,V.jsx)(`div`,{onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,V.jsx)(P_,{"aria-label":`推送开关`,isSelected:e.switch,onChange:e=>a({switch:e}),children:(0,V.jsx)(P_.Content,{children:(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})})})})}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`span`,{className:`font-medium`,children:e.remark||e.short_id||e.sec_uid||`推送项 ${t+1}`}),(0,V.jsxs)(zv,{className:`text-xs`,children:[e.short_id&&`抖音号: ${e.short_id}`,e.sec_uid&&!e.short_id&&`sec_uid: ${e.sec_uid.slice(0,20)}...`]})]})]}),(0,V.jsx)(Vo.Indicator,{children:(0,V.jsx)(rk,{className:`size-5`})})]})}),(0,V.jsx)(Vo.Panel,{children:(0,V.jsx)(Vo.Body,{children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:oF(i),children:[(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,isRequired:!0,value:e.short_id,onChange:e=>a({short_id:e}),children:[(0,V.jsx)(Lv,{children:`抖音号`}),(0,V.jsx)(Pv,{placeholder:`用户的抖音号`,variant:`secondary`}),(0,V.jsx)(zv,{children:`用户的抖音号(short_id),必填`})]})}),(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,value:e.sec_uid,onChange:e=>a({sec_uid:e}),children:[(0,V.jsx)(Lv,{children:`sec_uid`}),(0,V.jsx)(Pv,{placeholder:`选填,会根据抖音号自动获取`,variant:`secondary`}),(0,V.jsx)(zv,{children:`用户的 sec_uid,可从分享链接获取。选填,推送时会自动获取`})]})})]}),(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,value:e.remark,onChange:e=>a({remark:e}),children:[(0,V.jsx)(Lv,{children:`备注名称`}),(0,V.jsx)(Pv,{placeholder:`可选,用于识别该推送项`,variant:`secondary`}),(0,V.jsx)(zv,{children:`方便识别的名称,如:博主昵称`})]})}),(0,V.jsx)(EF,{disabled:o,device:i,itemLabel:s,value:e.group_id,onChange:e=>a({group_id:e})}),(0,V.jsx)(DF,{disabled:o,device:i,itemLabel:s,options:sF,value:e.pushTypes||[],onChange:e=>a({pushTypes:e})}),(0,V.jsx)(OF,{disabled:o,device:i,itemLabel:s,value:e.filterMode||`blacklist`,onChange:e=>a({filterMode:e})}),(0,V.jsx)(kF,{disabled:o,device:i,itemLabel:s,keywords:e.Keywords||[],tags:e.Tags||[],onKeywordsChange:e=>a({Keywords:e}),onTagsChange:e=>a({Tags:e})}),(0,V.jsx)(AF,{onDelete:()=>r(n.filter((e,n)=>n!==t))})]})})})]},t)},NF=()=>({switch:!0,sec_uid:``,short_id:``,group_id:[],remark:``,pushTypes:[`post`],filterMode:`blacklist`,Keywords:[],Tags:[]}),PF=()=>({switch:!0,host_mid:0,group_id:[],remark:``,pushTypes:[`video`],filterMode:`blacklist`,Keywords:[],Tags:[]}),FF=({platform:e})=>(0,V.jsx)(`div`,{className:`rounded-lg border-2 border-dashed border-gray-300 p-8 text-center`,children:(0,V.jsxs)(`p`,{className:`text-muted`,children:[`暂无`,e===`douyin`?`抖音`:`B站`,`推送项,点击上方按钮添加`]})});function IF({douyinList:e,bilibiliList:t,onDouyinChange:n,onBilibiliChange:r,device:i}){let[a,o]=(0,v.useState)(`douyin`);return(0,V.jsx)(`div`,{className:`space-y-4`,children:(0,V.jsxs)(nv,{selectedKey:a,onSelectionChange:e=>o(e),children:[(0,V.jsx)(nv.ListContainer,{children:(0,V.jsxs)(nv.List,{children:[(0,V.jsxs)(nv.Tab,{id:`douyin`,children:[(0,V.jsx)(`span`,{children:`抖音推送`}),(0,V.jsx)(nv.Indicator,{})]}),(0,V.jsxs)(nv.Tab,{id:`bilibili`,children:[(0,V.jsx)(`span`,{children:`B站推送`}),(0,V.jsx)(nv.Indicator,{})]})]})}),(0,V.jsx)(nv.Panel,{id:`douyin`,children:(0,V.jsxs)(`div`,{className:`space-y-4 pt-4`,children:[(0,V.jsxs)(Hm,{className:`w-full`,variant:`primary`,size:`sm`,onPress:()=>n([...e,NF()]),children:[(0,V.jsx)(dk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`添加抖音推送项`})]}),e.length>0?(0,V.jsx)(Vo,{variant:`surface`,"aria-label":`抖音推送列表`,children:e.map((t,r)=>(0,V.jsx)(MF,{device:i,index:r,item:t,list:e,onChange:n},r))}):(0,V.jsx)(FF,{platform:`douyin`})]})}),(0,V.jsx)(nv.Panel,{id:`bilibili`,children:(0,V.jsxs)(`div`,{className:`space-y-4 pt-4`,children:[(0,V.jsxs)(Hm,{className:`w-full`,variant:`primary`,onPress:()=>r([...t,PF()]),children:[(0,V.jsx)(dk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`添加B站推送项`})]}),t.length>0?(0,V.jsx)(Vo,{variant:`surface`,"aria-label":`B站推送列表`,children:t.map((e,n)=>(0,V.jsx)(jF,{device:i,index:n,item:e,list:t,onChange:r},n))}):(0,V.jsx)(FF,{platform:`bilibili`})]})})]})})}var LF=({config:e,device:t,renderers:n,updateConfigValue:r})=>{let{renderPageHeader:i}=n;return(0,V.jsxs)(V.Fragment,{children:[i(`推送列表`,`管理「抖音」与「哔哩哔哩」的推送订阅。`),(0,V.jsx)(IF,{douyinList:e.pushlist?.douyin||[],bilibiliList:e.pushlist?.bilibili||[],onDouyinChange:e=>{r([`pushlist`,`douyin`],e)},onBilibiliChange:e=>{r([`pushlist`,`bilibili`],e)},device:t})]})},RF=({config:e,renderers:t,classes:n})=>{let{renderCheckboxGroup:r,renderPageHeader:i,renderSelectField:a,renderSubSection:o,renderSwitch:s,renderTextField:c}=t,l=Q(e,[`xiaohongshu`,`switch`],!1),u=Q(e,[`xiaohongshu`,`sendContent`],[]),d=Q(e,[`xiaohongshu`,`videoQuality`],`adapt`);return(0,V.jsxs)(V.Fragment,{children:[i(`小红书`,`小红书解析基础设置。`),(0,V.jsxs)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:[s([`xiaohongshu`,`switch`],`解析开关`,`小红书解析开关,此开关为单独开关。`),r([`xiaohongshu`,`sendContent`],`解析时发送的内容`,`若什么都不选,可能不会返回任何解析结果。`,IP,!l),c([`xiaohongshu`,`numcomment`],`评论解析数量`,`小红书评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:!l||!SP(u,`comment`)})]}),o(`渲染与画质设置`,(0,V.jsxs)(V.Fragment,{children:[a([`xiaohongshu`,`videoQuality`],`画质偏好`,`解析视频的分辨率偏好。`,RP,e=>e,!l),c([`xiaohongshu`,`maxAutoVideoSize`],`视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!l||d!==`adapt`})]}))]})},zF=e=>{switch(e.activeFile){case`amagi`:return(0,V.jsx)(eF,{...e});case`app`:return(0,V.jsx)(tF,{...e});case`douyin`:return(0,V.jsx)(rF,{...e});case`bilibili`:return(0,V.jsx)(nF,{...e});case`kuaishou`:return(0,V.jsx)(iF,{...e});case`xiaohongshu`:return(0,V.jsx)(RF,{...e});case`pushlist`:return(0,V.jsx)(LF,{...e})}},BF=(e,t)=>{let n=Number(e);return Number.isFinite(n)?t.min!==void 0&&n<t.min?t.error||`${t.label} 不能小于 ${t.min}`:t.max!==void 0&&n>t.max?t.error||`${t.label} 不能大于 ${t.max}`:``:`${t.label} 必须是数字`},VF=(e,t,n)=>{if(n.disabled)return;let r=BF(Q(t,n.path,0),n);r&&(e[vP(n.path)]=r)},HF=e=>typeof e==`string`&&/.+:.+/.test(e),UF=(e,t,n)=>{if(!Array.isArray(n)){e[`pushlist.${t}`]=`${t} 推送列表必须是数组`;return}let r=n.findIndex(e=>{if(!yP(e))return!0;let n=e.group_id,r=t===`douyin`?e.short_id:e.host_mid;return r==null||String(r).trim()===``||!Array.isArray(n)||n.length===0||n.some(e=>!HF(e))});r>=0&&(e[`pushlist.${t}`]=`${t} 推送列表第 ${r+1} 项缺少必填 UID/抖音号,或 group_id 未使用「群号:机器人账号」格式`)},WF=e=>{if(!e)return{};let t={},n=Q(e,[`app`,`livePhotoMode`],`video_and_livephoto`),r=Q(e,[`amagi`,`APIServerMount`],!1),i=Q(e,[`app`,`videoSendMode`],`file`),a=Q(e,[`app`,`usegroupfile`],!1),o=Q(e,[`app`,`usefilelimit`],!1),s=Q(e,[`app`,`compress`],!1),c=Q(e,[`app`,`downloadThrottle`],!1),l=Q(e,[`app`,`downloadAutoReduce`],!1),u=Q(e,[`amagi`,`proxy`,`switch`],!1),d=Q(e,[`douyin`,`switch`],!1),f=Q(e,[`douyin`,`sendContent`],[]),p=Q(e,[`douyin`,`burnDanmaku`],!1),m=Q(e,[`douyin`,`videoQuality`],`adapt`),h=Q(e,[`douyin`,`push`,`switch`],!1),g=Q(e,[`douyin`,`push`,`pushVideoQuality`],`adapt`),_=Q(e,[`bilibili`,`switch`],!1),v=Q(e,[`bilibili`,`sendContent`],[]),y=Q(e,[`bilibili`,`burnDanmaku`],!1),b=Q(e,[`bilibili`,`videoQuality`],0),x=Q(e,[`bilibili`,`push`,`switch`],!1),S=Q(e,[`bilibili`,`push`,`parsedynamic`],!1),C=Q(e,[`bilibili`,`push`,`pushVideoQuality`],0),w=Q(e,[`kuaishou`,`switch`],!1),T=Q(e,[`kuaishou`,`comment`],!1),E=Q(e,[`xiaohongshu`,`switch`],!1),D=Q(e,[`xiaohongshu`,`sendContent`],[]),O=Q(e,[`xiaohongshu`,`videoQuality`],`adapt`);return[{path:[`app`,`renderScale`],label:`渲染精度`,min:50,max:200},{path:[`app`,`RenderWaitTime`],label:`渲染图片的等待时间`,min:0},{path:[`app`,`multiPageHeight`],label:`分页渲染时,每页的高度`,min:1e3,max:2e4,disabled:!Q(e,[`app`,`multiPageRender`],!0),error:`请输入一个范围在 1000 到 20000 之间的数字`},{path:[`amagi`,`APIServerPort`],label:`API服务端口`,min:1024,max:65535,disabled:r,error:`请输入一个范围在 1024 到 65535 之间的数字`},{path:[`app`,`groupfilevalue`],label:`群文件上传阈值`,min:1,disabled:!a||i===`base64`},{path:[`app`,`filelimit`],label:`视频拦截阈值`,min:1,disabled:!o},{path:[`app`,`compresstrigger`],label:`压缩触发阈值`,min:1,disabled:!s},{path:[`app`,`compressvalue`],label:`压缩后的值`,min:1,disabled:!s},{path:[`app`,`downloadMaxSpeed`],label:`最大下载速度`,min:1,max:1e3,disabled:!c,error:`请输入一个范围在 1 到 1000 之间的数字`},{path:[`app`,`downloadMinSpeed`],label:`最低下载速度`,min:.1,max:100,disabled:!c||!l,error:`请输入一个范围在 0.1 到 100 之间的数字`},{path:[`amagi`,`timeout`],label:`请求超时时间`,min:1e3,max:3e5,error:`请输入一个范围在 1000 到 300000 之间的数字`},{path:[`amagi`,`proxy`,`port`],label:`代理端口`,min:1,max:65535,disabled:!u,error:`请输入一个范围在 1 到 65535 之间的数字`},{path:[`douyin`,`numcomment`],label:`评论解析数量`,min:1,disabled:!d||!SP(f,`comment`)},{path:[`douyin`,`subCommentLimit`],label:`次级评论解析数量`,min:1,max:20,disabled:!d||!SP(f,`comment`)},{path:[`douyin`,`maxAutoVideoSize`],label:`视频体积上限(MB)`,min:1,max:2e4,disabled:!d||m!==`adapt`},{path:[`douyin`,`danmakuOpacity`],label:`弹幕透明度`,min:0,max:100,disabled:!d||!p},{path:[`douyin`,`push`,`pushMaxAutoVideoSize`],label:`推送视频体积上限(MB)`,min:1,max:2e4,disabled:!h||g!==`adapt`},{path:[`bilibili`,`numcomment`],label:`评论解析数量`,min:1,disabled:!_||!SP(v,`comment`)},{path:[`bilibili`,`maxAutoVideoSize`],label:`视频体积上限(MB)`,min:1,max:2e4,disabled:!_||Number(b)!==0},{path:[`bilibili`,`danmakuOpacity`],label:`弹幕透明度`,min:0,max:100,disabled:!_||!y},{path:[`bilibili`,`push`,`pushMaxAutoVideoSize`],label:`视频动态的视频体积上限(MB)`,min:1,max:2e4,disabled:!x||!S||Number(C)!==0},{path:[`kuaishou`,`numcomment`],label:`评论解析数量`,min:1,disabled:!w||!T},{path:[`xiaohongshu`,`numcomment`],label:`评论解析数量`,min:1,disabled:!E||!SP(D,`comment`)},{path:[`xiaohongshu`,`maxAutoVideoSize`],label:`视频体积上限(MB)`,min:1,max:2e4,disabled:!E||O!==`adapt`}].forEach(n=>VF(t,e,n)),n===`video_only`&&delete t[`app.livePhotoSystem`],UF(t,`douyin`,e.pushlist?.douyin||[]),UF(t,`bilibili`,e.pushlist?.bilibili||[]),t},GF=({device:e=`desktop`})=>{let t=(0,v.useRef)(null),[n,r]=_C(),i=ry(),a=n.get(`file`),[o,s]=mb({config:null,savedConfig:null,activeFile:a&&qP.some(e=>e.key===a)?a:`amagi`}),{activeFile:c,config:l,savedConfig:u}=o,d=(0,v.useMemo)(()=>$P(e),[e]),f=e===`mobile`?`sm`:`md`,{loading:p,run:m}=db(lN,{onSuccess:e=>{s({config:structuredClone(e),savedConfig:structuredClone(e)})},onError:e=>{s_.danger(`加载配置失败`,{description:e.message})}}),{loading:h,runAsync:g}=db(uN,{manual:!0}),_=(0,v.useMemo)(()=>!l||!u?!1:!(0,LC.default)(wP(l),wP(u)),[l,u]),y=(0,v.useMemo)(()=>WF(l),[l]),b=(0,v.useMemo)(()=>Object.values(y).some(Boolean),[y]),x=(0,v.useMemo)(()=>_&&!b&&!p,[_,b,p]),S=fy((e,t)=>{s(n=>n.config?{config:bP(n.config,e,t)}:null)}),C=fy(()=>{if(!l||b)return;let e=l,t=g(e).then(()=>{s({savedConfig:e})});s_.promise(t,{loading:`正在保存配置...`,success:`配置已保存`,error:e=>e instanceof Error?e.message:`保存配置失败`})}),w=fy(()=>{m()}),T=fy(e=>{r({file:e})}),E=fy(e=>{e.preventDefault(),C()});(0,v.useEffect)(()=>{let e=n.get(`file`);e&&qP.some(t=>t.key===e)&&e!==c&&s({activeFile:e})},[n,c,s]),(0,v.useEffect)(()=>{let e=t.current?.querySelector(`[data-config-tabs-scroll="true"]`);if(!e)return;let n=t=>{let n=Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY;n&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!(e.scrollWidth<=e.clientWidth)&&(e.scrollLeft+=n))};return e.addEventListener(`wheel`,n,{passive:!1}),()=>{e.removeEventListener(`wheel`,n)}},[l]);let D=fy(()=>{t.current&&GO.fromTo(t.current.querySelectorAll(`[data-config-section]`),hN,{...gN,duration:fN(.35),stagger:pN(.03)})});(0,v.useEffect)(()=>{!l||t.current?.dataset.animated===`true`||(t.current&&(t.current.dataset.animated=`true`),D())},[l,D]),py(()=>{D()},[c]);let O=(0,v.useMemo)(()=>l?XP({config:l,device:e,classes:d,validationErrors:y,updateConfigValue:S}):{},[l,e,d,y,S]);if(p||!l)return(0,V.jsxs)(`div`,{className:`${d.root} ${d.loading}`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在读取配置`}),(0,V.jsx)(`span`,{children:`正在读取配置`})]});let k=(0,V.jsx)(`div`,{className:d.floatingActions,children:(0,V.jsxs)(`div`,{className:d.actionControls,children:[(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{"aria-label":`重新读取配置`,children:(0,V.jsx)(Hm,{isIconOnly:!0,size:f,variant:`secondary`,isDisabled:p||h,onPress:w,children:(0,V.jsx)(fk,{size:16,"aria-hidden":`true`})})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`bottom`,children:[(0,V.jsx)(Dv.Arrow,{}),`重新读取`]})]}),(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{"aria-label":`查看配置变更`,children:(0,V.jsx)(Hm,{isIconOnly:!0,size:f,variant:`secondary`,isDisabled:!_,onPress:i.open,children:(0,V.jsx)(ok,{size:16,"aria-hidden":`true`})})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`bottom`,children:[(0,V.jsx)(Dv.Arrow,{}),`查看变更`]})]}),(0,V.jsxs)(Hm,{size:f,isDisabled:!x,isPending:h,onPress:C,variant:`primary`,children:[(0,V.jsx)(pk,{size:16,"aria-hidden":`true`}),(0,V.jsx)(`span`,{children:`保存`})]})]})});return(0,V.jsxs)(`div`,{ref:t,className:d.root,children:[(0,V.jsx)(AP,{device:e,original:u,current:l,isOpen:i.isOpen,onOpenChange:i.setOpen}),(0,V.jsxs)(Uv,{className:d.form,onSubmit:E,children:[(0,V.jsx)(nv,{className:`w-full min-w-0 max-w-full`,selectedKey:c,onSelectionChange:T,children:(0,V.jsx)(nv.ListContainer,{className:d.tabsListContainer,"data-config-tabs-scroll":`true`,"data-scrollbar":`none`,children:(0,V.jsx)(nv.List,{"aria-label":`配置文件选择`,className:d.tabsList,children:qP.map((e,t)=>(0,V.jsxs)(nv.Tab,{id:e.key,children:[t>0?(0,V.jsx)(nv.Separator,{}):null,(0,V.jsx)(`span`,{className:`whitespace-nowrap`,children:e.label}),(0,V.jsx)(nv.Indicator,{})]},e.key))})})}),(0,V.jsxs)(`div`,{className:`relative min-w-0 max-w-full`,children:[k,(0,V.jsx)(zF,{activeFile:c,classes:d,config:l,device:e,renderers:O,updateConfigValue:S},c)]})]})]})},KF=({onLogin:e})=>{let[t,n]=mb({authKey:``,loading:!1,error:``}),[r,{toggle:i}]=pb(!1),a=r?`隐藏密钥`:`显示密钥`,o=fy(async r=>{r.preventDefault();let i=t.authKey.trim();if(!i){n({error:`请输入 Karin HTTP 鉴权密钥`});return}try{n({loading:!0,error:``}),await oN(i),e()}catch(e){n({error:e instanceof Error?e.message:`登录失败`})}finally{n({loading:!1})}});return(0,V.jsx)(eg,{className:`flex min-h-screen items-center justify-center px-4 py-8`,children:(0,V.jsxs)(Gm,{className:`w-full max-w-105`,children:[(0,V.jsxs)(Gm.Header,{className:`gap-4 p-6`,children:[(0,V.jsx)(ck,{className:`size-8 shrink-0`,"aria-hidden":`true`}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Gm.Title,{children:`Karin 鉴权`}),(0,V.jsx)(Gm.Description,{children:`使用 Karin HTTP 鉴权密钥登录后管理 KKK 配置。`})]})]}),(0,V.jsx)(Gm.Content,{className:`p-6`,children:(0,V.jsxs)(Uv,{className:`flex flex-col gap-6`,onSubmit:o,children:[(0,V.jsxs)(Fv,{fullWidth:!0,isInvalid:!!t.error,value:t.authKey,onChange:e=>{n({authKey:e,error:t.error?``:t.error})},children:[(0,V.jsx)(Lv,{children:`HTTP 鉴权密钥`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(Pv,{autoComplete:`current-password`,className:`min-w-0 flex-1`,placeholder:`请输入 Karin 的 HTTP_AUTH_KEY`,type:r?`text`:`password`}),(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":a,type:`button`,variant:`tertiary`,onPress:i,children:r?(0,V.jsx)(ik,{className:`size-4`,"aria-hidden":`true`}):(0,V.jsx)(ak,{className:`size-4`,"aria-hidden":`true`})})]}),(0,V.jsx)(zv,{children:t.error||`生产环境会复用 Karin 主 Web 已保存的登录凭据。`})]}),(0,V.jsx)(Hm,{fullWidth:!0,isPending:t.loading,type:`submit`,children:({isPending:e})=>(0,V.jsxs)(V.Fragment,{children:[e?(0,V.jsx)($h,{color:`current`,size:`sm`,"aria-label":`登录中`}):(0,V.jsx)(lk,{className:`size-4`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{children:`登录`})]})})]})})]})})},qF=`theme`,JF=`kkk-theme-changed`,YF=`karin-theme-change`,XF={light:`light`,dark:`dark`,system:`system`,inverse:`inverse`},ZF=e=>e===XF.system||e===XF.inverse,QF=e=>e===XF.light||e===XF.dark,$F=e=>!e||typeof e!=`object`?!1:e.type===YF,eI=()=>{let e=localStorage.getItem(qF);if(ZF(e))return e;try{let t=JSON.parse(e??``);if(ZF(t))return t}catch{}return localStorage.setItem(qF,XF.system),XF.system},tI=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches?XF.dark:XF.light,nI=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches?XF.light:XF.dark,rI=e=>e===XF.system?tI():nI(),iI=e=>aI(rI(e)),aI=e=>(document.documentElement.classList.remove(XF.light,XF.dark),document.documentElement.classList.add(e),document.documentElement.dataset.theme=e,e),oI=()=>{let[e,t]=(0,v.useState)(()=>eI()),[n,r]=(0,v.useState)(()=>rI(e)),i=(0,v.useRef)(!1),a=(0,v.useCallback)(e=>{localStorage.setItem(qF,e),t(e),r(iI(e)),window.dispatchEvent(new CustomEvent(JF,{detail:e}))},[]),o=(0,v.useCallback)(()=>{a(XF.system)},[a]),s=(0,v.useCallback)(()=>{a(XF.inverse)},[a]),c=(0,v.useCallback)(()=>{a(e===XF.system?XF.inverse:XF.system)},[a,e]);return(0,v.useEffect)(()=>{i.current?i.current=!1:r(iI(e));let n=window.matchMedia(`(prefers-color-scheme: dark)`),a=()=>{r(iI(e))},o=e=>{if(e.key!==qF||window.self!==window.top)return;let n=eI();t(n),r(iI(n))},s=e=>{let n=e.detail;ZF(n)&&(t(n),r(iI(n)))},c=e=>{if(!$F(e.data))return;let n=e.data.theme,a=ZF(n??null)?n:eI(),o=QF(e.data.appliedTheme)?e.data.appliedTheme:rI(a);i.current=!0,localStorage.setItem(qF,a),t(a),r(aI(o))};return n.addEventListener(`change`,a),window.addEventListener(`storage`,o),window.addEventListener(JF,s),window.addEventListener(`message`,c),()=>{n.removeEventListener(`change`,a),window.removeEventListener(`storage`,o),window.removeEventListener(JF,s),window.removeEventListener(`message`,c)}},[e]),{theme:e,appliedTheme:n,isDark:(0,v.useMemo)(()=>n===XF.dark,[n]),isLight:(0,v.useMemo)(()=>n===XF.light,[n]),isSystem:e===XF.system,isInverse:e===XF.inverse,setSystemTheme:o,setInverseTheme:s,toggleTheme:c}},sI=()=>document.documentElement.clientWidth||window.innerWidth,cI=(e=sI())=>e<=768?`mobile`:`desktop`,lI=()=>{let e=navigator.userAgent.toLowerCase();return[`android`,`webos`,`iphone`,`ipad`,`ipod`,`blackberry`,`windows phone`,`mobile`].some(t=>e.includes(t))},uI=()=>{let e=cI();return lI()||e===`mobile`?`mobile`:`desktop`},dI=()=>vb(()=>import(`./DesktopLayout-DhczG_oH.js`),__vite__mapDeps([2,1,3])),fI=()=>vb(()=>import(`./MobileLayout-BPDCYfNY.js`),__vite__mapDeps([4,3])),pI={config:`/kkk/assets/config`,about:`/kkk/assets/about`},mI={"/kkk/assets/config":`config`,"/kkk/assets/about":`about`},hI=({device:e})=>(0,V.jsxs)(eg,{className:`h-screen overflow-hidden bg-background`,children:[(0,V.jsx)(x_.Provider,{placement:`top`}),(0,V.jsx)(Jh,{hideScrollBar:!0,className:`h-full px-3 py-3 sm:px-5 sm:py-4 ${e===`mobile`?`data-[top-scroll=true]:mask-none data-[top-scroll=true]:[-webkit-mask-image:none] data-[top-bottom-scroll=true]:mask-[linear-gradient(180deg,black_calc(100%-var(--scroll-shadow-size)),transparent)] data-[top-bottom-scroll=true]:[-webkit-mask-image:linear-gradient(180deg,black_calc(100%-var(--scroll-shadow-size)),transparent)]`:``}`,size:56,children:(0,V.jsx)(GF,{device:e})})]}),gI=({LayoutComponent:e})=>{let t=Vx(),n=Wx(),r=mI[t.pathname]||`config`,i=fy(e=>{n(pI[e])});return e?(0,V.jsxs)(`div`,{children:[(0,V.jsx)(x_.Provider,{placement:`top`}),(0,V.jsx)(e,{activeMenu:r,onMenuChange:i})]}):(0,V.jsxs)(eg,{className:`flex min-h-screen items-center justify-center gap-4`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在加载布局`}),(0,V.jsx)(zv,{children:`正在加载`})]})},_I=()=>{oI();let[e,t]=mb({authenticated:NC(),device:uI(),LayoutComponent:null}),{authenticated:n,device:r,LayoutComponent:i}=e;(0,v.useEffect)(()=>{let e=()=>{t({authenticated:NC()})};return window.addEventListener(kC,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(kC,e),window.removeEventListener(`storage`,e)}},[t]);let a=fy(()=>{let e=uI();t(t=>t.device===e?null:{device:e,LayoutComponent:null})});(0,v.useEffect)(()=>{let e=0,t=()=>{window.cancelAnimationFrame(e),e=window.requestAnimationFrame(a)};return window.addEventListener(`resize`,t),window.addEventListener(`orientationchange`,t),()=>{window.cancelAnimationFrame(e),window.removeEventListener(`resize`,t),window.removeEventListener(`orientationchange`,t)}},[a]),(0,v.useEffect)(()=>{if(!n){t({LayoutComponent:null});return}let e=!1;return(async()=>{if(r===`mobile`){let n=await fI();e||t({LayoutComponent:n.default})}else{let n=await dI();e||t({LayoutComponent:n.default})}})(),()=>{e=!0}},[n,r,t]);let o=fy(()=>{t({authenticated:!0})});return n?(0,V.jsxs)(vS,{children:[(0,V.jsx)(gS,{path:`/kkk/assets/karin-config`,element:(0,V.jsx)(hI,{device:r})}),(0,V.jsx)(gS,{path:`/kkk/assets/config`,element:(0,V.jsx)(gI,{LayoutComponent:i})}),(0,V.jsx)(gS,{path:`/kkk/assets/about`,element:(0,V.jsx)(gI,{LayoutComponent:i})}),(0,V.jsx)(gS,{path:`/kkk/assets`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})}),(0,V.jsx)(gS,{path:`/kkk`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})}),(0,V.jsx)(gS,{path:`/kkk/login`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})}),(0,V.jsx)(gS,{path:`*`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})})]}):(0,V.jsxs)(vS,{children:[(0,V.jsx)(gS,{path:`/kkk/login`,element:(0,V.jsx)(KF,{onLogin:o})}),(0,V.jsx)(gS,{path:`*`,element:(0,V.jsx)(hS,{to:`/kkk/login`,replace:!0})})]})};(0,y.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(v.StrictMode,{children:(0,V.jsx)(()=>(0,V.jsx)(sC,{children:(0,V.jsx)(_I,{})}),{})}));export{Wa as $,yf as A,De as At,cl as B,Gm as C,et as Ct,Fp as D,Fe as Dt,Rp as E,ze as Et,xu as F,O as Ft,Y as G,qs as H,bu as I,h as It,oo as J,J as K,_u as L,d as Lt,uf as M,L as Mt,lf as N,E as Nt,Ef as O,R as Ot,Su as P,M as Pt,$a as Q,hu as R,l as Rt,Ym as S,nt as St,Lm as T,z as Tt,Fo as U,al as V,Io as W,q as X,so as Y,eo as Z,Wh as _,Kt as _t,IC as a,Mi as at,bh as b,xt as bt,ny as c,G as ct,Lv as d,Ti as dt,Ma as et,Fv as f,Si as ft,eg as g,Xt as gt,nv as h,$t as ht,GO as i,Gi as it,df as j,we as jt,vf as k,ke as kt,Xv as l,wi as lt,Dv as m,Gr as mt,GF as n,Yi as nt,pb as o,bi as ot,Pv as p,Ur as pt,po as q,tk as r,Xi as rt,fy as s,Ci as st,oI as t,Ea as tt,zv as u,K as ut,Vh as v,Jt as vt,Hm as w,B as wt,Sh as x,it as xt,Ch as y,Et as yt,pu as z};
|
|
47
|
+
</div>`),e.hasArrows=!0}format_textdiff(e,t){e.out(`<div class="jsondiffpatch-value">`),this.formatTextDiffString(e,t[0]),e.out(`</div>`)}};function fP(e){if(typeof e==`number`)return e;let t=String(e);for(let e of[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/'/g,`'`],[/"/g,`"`]])t=t.replace(e[0],e[1]);return t}var pP=function(e){let t=e||document,n=({textContent:e,innerText:t})=>e||t,r=(e,t,n)=>{let r=e.querySelectorAll(t);for(let e=0,t=r.length;e<t;e++)n(r[e])},i=({children:e},t)=>{for(let n=0,r=e.length;n<r;n++){let r=e[n];r&&t(r,n)}};r(t,`.jsondiffpatch-arrow`,({parentNode:e,children:t,style:r})=>{let a=e,o=t[0],s=o.children[1];o.style.display=`none`;let c=a.querySelector(`.jsondiffpatch-moved-destination`);if(!(c instanceof HTMLElement))return;let l=n(c),u=a.parentNode;if(!u)return;let d;if(i(u,e=>{e.getAttribute(`data-key`)===l&&(d=e)}),d)try{let e=d.offsetTop-a.offsetTop;o.setAttribute(`height`,`${Math.abs(e)+6}`),r.top=`${-8+(e>0?0:e)}px`;let t=e>0?`M30,0 Q-10,${Math.round(e/2)} 26,${e-4}`:`M30,${-e} Q-10,${Math.round(-e/2)} 26,4`;s.setAttribute(`d`,t),o.style.display=``}catch(e){console.debug(`[jsondiffpatch] error adjusting arrows: ${e}`)}})},mP=(e,t,n)=>{let r=t||document.body,i=`jsondiffpatch-unchanged-`,a={showing:`${i}showing`,hiding:`${i}hiding`,visible:`${i}visible`,hidden:`${i}hidden`},o=r.classList;if(!o)return;if(!n){o.remove(a.showing),o.remove(a.hiding),o.remove(a.visible),o.remove(a.hidden),e===!1&&o.add(a.hidden);return}e===!1?(o.remove(a.showing),o.add(a.visible),setTimeout(()=>{o.add(a.hiding)},10)):(o.remove(a.hiding),o.add(a.showing),o.remove(a.hidden));let s=setInterval(()=>{pP(r)},100);setTimeout(()=>{o.remove(a.showing),o.remove(a.hiding),e===!1?(o.add(a.hidden),o.remove(a.visible)):(o.add(a.visible),o.remove(a.hidden)),setTimeout(()=>{o.remove(a.visible),clearInterval(s)},n+400)},n)},hP=(e,t)=>mP(!1,e,t),gP;function _P(e,t){return gP||=new dP,gP.format(e,t)}var vP=e=>e.join(`.`),yP=e=>!!(e&&typeof e==`object`),Q=(e,t,n)=>e?t.reduce((e,t)=>{if(yP(e))return e[t]},e)??n:n,bP=(e,t,n)=>{let r=structuredClone(e),i=r;for(let e=0;e<t.length-1;e++){let n=t[e],r=i[n];yP(r)||(i[n]={}),i=i[n]}return i[t[t.length-1]]=n,r},xP=(e,t)=>{let n=Number(e);return Number.isFinite(n)?n:t},SP=(e,t)=>Array.isArray(e)&&e.includes(t),CP=e=>!!(e&&typeof e==`object`&&`description`in e),wP=e=>{if(!e||typeof e!=`object`)return e;let t=structuredClone(e);for(let{path:e,options:n}of[{path:[`bilibili`,`sendContent`],options:[`info`,`comment`,`video`,`image`]},{path:[`bilibili`,`displayContent`],options:[`cover`,`title`,`author`,`stats`,`desc`]},{path:[`bilibili`,`push`,`parseDynamicTypes`],options:[`DYNAMIC_TYPE_AV`,`DYNAMIC_TYPE_DRAW`,`DYNAMIC_TYPE_ARTICLE`]},{path:[`douyin`,`sendContent`],options:[`info`,`comment`,`video`,`image`]},{path:[`xiaohongshu`,`sendContent`],options:[`info`,`comment`,`video`,`image`]},{path:[`kuaishou`,`sendContent`],options:[`info`,`comment`,`video`,`image`]}]){let r=Q(t,e,null);if(!Array.isArray(r))continue;let i=n.filter(e=>r.includes(e)),a=t;for(let t=0;t<e.length-1;t++){let n=e[t];yP(a[n])||(a[n]={}),a=a[n]}a[e[e.length-1]]=i}return t},TP=e=>typeof e==`object`&&!!e,EP=e=>{let t={added:0,modified:0,deleted:0},n=e=>{if(TP(e)){if(Array.isArray(e)){e.length===1?t.added+=1:e.length===2?t.modified+=1:e.length===3&&e[2]===0&&(t.deleted+=1);return}for(let[t,r]of Object.entries(e))t!==`_t`&&n(r)}};return n(e),t},DP=({original:e,current:t,showUnchanged:n=!1})=>{let r=(0,v.useRef)(null),i=(0,v.useMemo)(()=>{if(!(!e||!t))return lP(wP(e),wP(t))},[e,t]),a=(0,v.useMemo)(()=>e?wP(e):void 0,[e]),o=(0,v.useMemo)(()=>{if(i)return _P(i,a)},[i,a]),s=(0,v.useMemo)(()=>EP(i),[i]);return(0,v.useEffect)(()=>{r.current&&(o?(r.current.innerHTML=o,n?mP(!0,r.current):hP(r.current)):r.current.innerHTML=``)},[o,n]),o?(0,V.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(yh,{size:`sm`,color:`success`,variant:`soft`,children:(0,V.jsxs)(yh.Label,{children:[`+ `,s.added,` 新增`]})}),(0,V.jsx)(yh,{size:`sm`,color:`warning`,variant:`soft`,children:(0,V.jsxs)(yh.Label,{children:[`~ `,s.modified,` 修改`]})}),(0,V.jsx)(yh,{size:`sm`,color:`danger`,variant:`soft`,children:(0,V.jsxs)(yh.Label,{children:[`- `,s.deleted,` 删除`]})})]}),(0,V.jsx)(`div`,{className:`max-h-[60vh] overflow-auto rounded-xl border border-default-200 bg-surface p-4`,children:(0,V.jsx)(`div`,{ref:r,className:`min-w-fit`})})]}):(0,V.jsx)(`div`,{className:`flex flex-col items-center justify-center gap-2 py-10 text-center`,children:(0,V.jsx)(zv,{className:`text-sm text-muted`,children:`当前没有检测到配置变更`})})},OP=`变更预览`,kP=`绿色 = 新增/改后的内容,红色 = 删除/改前的内容,灰色 = 没变化的内容。`,AP=({device:e,original:t,current:n,isOpen:r,onOpenChange:i})=>{let[a,o]=(0,v.useState)(!1),s=(0,V.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,V.jsx)(zv,{className:`text-xs text-muted`,children:kP}),(0,V.jsx)(P_,{size:`sm`,isSelected:a,onChange:o,"aria-label":`显示未变更字段`,children:(0,V.jsxs)(P_.Content,{children:[(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})}),`显示未变更`]})})]}),(0,V.jsx)(DP,{original:t,current:n,showUnchanged:a})]}),c=(0,V.jsx)(Hm,{slot:`close`,size:`sm`,variant:`secondary`,children:`关闭`});return e===`mobile`?(0,V.jsx)(Vh,{children:(0,V.jsx)(Vh.Backdrop,{isOpen:r,onOpenChange:i,children:(0,V.jsx)(Vh.Content,{placement:`bottom`,children:(0,V.jsxs)(Vh.Dialog,{className:`h-[85vh]`,children:[(0,V.jsx)(Vh.Handle,{}),(0,V.jsx)(Vh.CloseTrigger,{}),(0,V.jsx)(Vh.Header,{children:(0,V.jsx)(Vh.Heading,{children:OP})}),(0,V.jsx)(Vh.Body,{children:s}),(0,V.jsx)(Vh.Footer,{children:c})]})})})}):(0,V.jsx)($v,{children:(0,V.jsx)($v.Backdrop,{isOpen:r,onOpenChange:i,children:(0,V.jsx)($v.Container,{scroll:`inside`,size:`lg`,children:(0,V.jsxs)($v.Dialog,{className:`w-full max-w-4xl`,children:[(0,V.jsx)($v.CloseTrigger,{}),(0,V.jsxs)($v.Header,{children:[(0,V.jsx)($v.Icon,{className:`bg-accent-soft text-accent-soft-foreground`,children:(0,V.jsx)(ok,{className:`size-5`})}),(0,V.jsx)($v.Heading,{children:OP})]}),(0,V.jsx)($v.Body,{children:s}),(0,V.jsx)($v.Footer,{children:c})]})})})})},jP=e=>!!(e&&typeof e==`object`),$=(e,t,n)=>e?t.reduce((e,t)=>{if(jP(e))return e[t]},e)??n:n,MP=(e,t)=>Array.isArray(e)&&e.includes(t),NP=[{path:[`app`,`priority`],rules:[{condition:e=>$(e,[`app`,`videoTool`],!0),message:`修改此配置项需要先将「默认解析优先级」关闭`}]},{path:[`app`,`multiPageHeight`],rules:[{condition:e=>!$(e,[`app`,`multiPageRender`],!0),message:`修改此配置项需要先将「分页渲染」打开`}]},{path:[`app`,`livePhotoSystem`],rules:[{condition:e=>$(e,[`app`,`livePhotoMode`],`video_and_livephoto`)===`video_only`,message:`修改此配置项需要先将「Live Photo 处理和发送方式」改为非「仅视频」模式`}]},{path:[`amagi`,`APIServerMount`],rules:[{condition:e=>!$(e,[`amagi`,`APIServer`],!1),message:`修改此配置项需要先将「API 服务」打开`}]},{path:[`amagi`,`APIServerPort`],rules:[{condition:e=>$(e,[`amagi`,`APIServerMount`],!0),message:`修改此配置项需要先将「挂载到 Karin」关闭`}]},{path:[`app`,`qrLoginExternalAddr`],rules:[{condition:e=>$(e,[`app`,`qrLoginAddrType`],`lan`)!==`external`,message:`修改此配置项需要先将「扫码登录地址」改为「外部地址」`}]},{path:[`app`,`videoSendMode`],rules:[{condition:e=>$(e,[`app`,`usegroupfile`],!1),message:`修改此配置项需要先将「群文件上传」关闭`}]},{path:[`app`,`usegroupfile`],rules:[{condition:e=>$(e,[`app`,`videoSendMode`],`file`)===`base64`,message:`修改此配置项需要先将「本地视频发送方式」改为「File 协议」`}]},{path:[`app`,`groupfilevalue`],rules:[{condition:e=>!$(e,[`app`,`usegroupfile`],!1),message:`修改此配置项需要先将「群文件上传」打开`},{condition:e=>$(e,[`app`,`videoSendMode`],`file`)===`base64`,message:`修改此配置项需要先将「本地视频发送方式」改为「File 协议」`}]},{path:[`app`,`filelimit`],rules:[{condition:e=>!$(e,[`app`,`usefilelimit`],!1),message:`修改此配置项需要先将「视频上传拦截」打开`}]},{path:[`app`,`compresstrigger`],rules:[{condition:e=>!$(e,[`app`,`compress`],!1),message:`修改此配置项需要先将「压缩视频」打开`}]},{path:[`app`,`compressvalue`],rules:[{condition:e=>!$(e,[`app`,`compress`],!1),message:`修改此配置项需要先将「压缩视频」打开`}]},{path:[`app`,`downloadMaxSpeed`],rules:[{condition:e=>!$(e,[`app`,`downloadThrottle`],!1),message:`修改此配置项需要先将「下载限速」打开`}]},{path:[`app`,`downloadAutoReduce`],rules:[{condition:e=>!$(e,[`app`,`downloadThrottle`],!1),message:`修改此配置项需要先将「下载限速」打开`}]},{path:[`app`,`downloadMinSpeed`],rules:[{condition:e=>!$(e,[`app`,`downloadThrottle`],!1),message:`修改此配置项需要先将「下载限速」打开`},{condition:e=>!$(e,[`app`,`downloadAutoReduce`],!1),message:`修改此配置项需要先将「断流自动降速」打开`}]},{path:[`amagi`,`proxy`,`protocol`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`host`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`port`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`auth`,`username`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`amagi`,`proxy`,`auth`,`password`],rules:[{condition:e=>!$(e,[`amagi`,`proxy`,`switch`],!1),message:`修改此配置项需要先将「代理开关」打开`}]},{path:[`douyin`,`sendContent`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`numcomment`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`douyin`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`douyin`,`subCommentLimit`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`douyin`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`douyin`,`commentImageCollection`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`douyin`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`douyin`,`liveImageMergeMode`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`app`,`livePhotoMode`],`video_and_livephoto`)===`livephoto_only`,message:`修改此配置项需要先将「Live Photo 处理和发送方式」改为非「仅实况图」模式`}]},{path:[`douyin`,`videoQuality`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`maxAutoVideoSize`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`douyin`,`videoQuality`],`adapt`)!==`adapt`,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]},{path:[`douyin`,`videoInfoMode`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`displayContent`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`douyin`,`videoInfoMode`],`text`)===`image`,message:`修改此配置项需要先将「视频信息返回形式」改为「文本模式」`}]},{path:[`douyin`,`burnDanmaku`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`douyin`,`danmakuArea`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`danmakuFontSize`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`danmakuOpacity`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`verticalMode`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`videoCodec`],rules:[{condition:e=>!$(e,[`douyin`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`douyin`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`douyin`,`push`,`permission`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`cron`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`parsedynamic`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`shareType`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`pushVideoQuality`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`douyin`,`push`,`pushMaxAutoVideoSize`],rules:[{condition:e=>!$(e,[`douyin`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>$(e,[`douyin`,`push`,`pushVideoQuality`],`adapt`)!==`adapt`,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]},{path:[`bilibili`,`sendContent`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`numcomment`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`bilibili`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`bilibili`,`realCommentCount`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`bilibili`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`bilibili`,`commentImageCollection`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`bilibili`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`bilibili`,`videoQuality`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`maxAutoVideoSize`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>Number($(e,[`bilibili`,`videoQuality`],0))!==0,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]},{path:[`bilibili`,`videoInfoMode`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`displayContent`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`bilibili`,`videoInfoMode`],`text`)===`image`,message:`修改此配置项需要先将「视频信息返回形式」改为「文本模式」`}]},{path:[`bilibili`,`showDanmakuInVideoInfo`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`bilibili`,`videoInfoMode`],`text`)===`text`,message:`修改此配置项需要先将「视频信息返回形式」改为「图片模式」`}]},{path:[`bilibili`,`burnDanmaku`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`bilibili`,`danmakuArea`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`danmakuFontSize`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`danmakuOpacity`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`verticalMode`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`videoCodec`],rules:[{condition:e=>!$(e,[`bilibili`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`bilibili`,`burnDanmaku`],!1),message:`修改此配置项需要先将「弹幕烧录」打开`}]},{path:[`bilibili`,`push`,`permission`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`bilibili`,`push`,`cron`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`bilibili`,`push`,`parsedynamic`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`}]},{path:[`bilibili`,`push`,`parseDynamicTypes`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>!$(e,[`bilibili`,`push`,`parsedynamic`],!1),message:`修改此配置项需要先将「作品解析」打开`}]},{path:[`bilibili`,`push`,`pushVideoQuality`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>!$(e,[`bilibili`,`push`,`parsedynamic`],!1),message:`修改此配置项需要先将「作品解析」打开`}]},{path:[`bilibili`,`push`,`pushMaxAutoVideoSize`],rules:[{condition:e=>!$(e,[`bilibili`,`push`,`switch`],!1),message:`修改此配置项需要先将「推送开关」打开`},{condition:e=>!$(e,[`bilibili`,`push`,`parsedynamic`],!1),message:`修改此配置项需要先将「作品解析」打开`},{condition:e=>Number($(e,[`bilibili`,`push`,`pushVideoQuality`],0))!==0,message:`修改此配置项需要先将「解析视频动态时的画质偏好」改为「自动选择」`}]},{path:[`kuaishou`,`comment`],rules:[{condition:e=>!$(e,[`kuaishou`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`kuaishou`,`numcomment`],rules:[{condition:e=>!$(e,[`kuaishou`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!$(e,[`kuaishou`,`comment`],!1),message:`修改此配置项需要先将「评论解析」打开`}]},{path:[`xiaohongshu`,`sendContent`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`xiaohongshu`,`numcomment`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>!MP($(e,[`xiaohongshu`,`sendContent`],[]),`comment`),message:`修改此配置项需要在「解析时发送的内容」中勾选「评论图」`}]},{path:[`xiaohongshu`,`videoQuality`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`}]},{path:[`xiaohongshu`,`maxAutoVideoSize`],rules:[{condition:e=>!$(e,[`xiaohongshu`,`switch`],!1),message:`修改此配置项需要先将「解析开关」打开`},{condition:e=>$(e,[`xiaohongshu`,`videoQuality`],`adapt`)!==`adapt`,message:`修改此配置项需要先将「画质偏好」改为「自动选择」`}]}],PP=e=>e.join(`.`),FP=(e,t)=>{let n=PP(t),r=NP.find(e=>PP(e.path)===n);if(!r)return``;for(let t of r.rules)if(t.condition(e))return t.message;return``},IP=[{label:`信息`,value:`info`},{label:`评论图`,value:`comment`},{label:`视频`,value:`video`},{label:`图片`,value:`image`}],LP=[{label:`封面`,value:`cover`},{label:`标题`,value:`title`},{label:`作者`,value:`author`},{label:`统计`,value:`stats`},{label:`简介`,value:`desc`}],RP=[{label:`自动选择`,value:`adapt`,description:`根据「视频体积上限(MB)」自动选择分辨率进行下载`},{label:`标清 540p`,value:`540p`},{label:`高清 720p`,value:`720p`},{label:`高清 1080p`,value:`1080p`},{label:`超清 2k`,value:`2k`},{label:`超清 4k`,value:`4k`}],zP=[{label:`自动选择`,value:`0`},{label:`240P 极速`,value:`6`},{label:`360P 流畅`,value:`16`},{label:`480P 清晰`,value:`32`,description:`需登录(配置ck)`},{label:`720P 高清`,value:`64`,description:`需登录(配置ck)`},{label:`720P60 高帧率`,value:`74`,description:`需登录(配置ck)`},{label:`1080P 高清`,value:`80`,description:`需登录(配置ck)`},{label:`1080P+ 高码率`,value:`112`,description:`需大会员&视频支持`},{label:`1080P60 高帧率`,value:`116`,description:`需大会员&视频支持`},{label:`4K 超清`,value:`120`,description:`需大会员&视频支持`},{label:`8K 超高清`,value:`127`,description:`需大会员&视频支持`}],BP=[{label:`视频动态`,value:`DYNAMIC_TYPE_AV`},{label:`图文动态`,value:`DYNAMIC_TYPE_DRAW`},{label:`文章动态`,value:`DYNAMIC_TYPE_ARTICLE`}],VP=[{label:`所有人`,value:`all`},{label:`管理员`,value:`admin`},{label:`主人`,value:`master`},{label:`群主`,value:`group.owner`},{label:`群管理员`,value:`group.admin`}],HP=[{label:`H.264`,value:`h264`,description:`兼容性最好,支持几乎所有设备`},{label:`H.265`,value:`h265`,description:`压缩率更高,近几年设备支持良好(推荐)`},{label:`AV1`,value:`av1`,description:`最新编码格式,压缩率最高,但编码较慢`}],UP=[{label:`关闭`,value:`off`,description:`保持原始比例,不做转换`},{label:`智能`,value:`standard`,description:`仅对宽屏比例视频生效`},{label:`强制 9:16`,value:`force`,description:`所有视频统一转为 9:16 竖屏`}],WP=[{label:`1/4 屏`,value:`0.25`,description:`仅顶部区域`},{label:`半屏`,value:`0.5`,description:`上半部分(推荐)`},{label:`3/4 屏`,value:`0.75`,description:`大部分区域`},{label:`全屏`,value:`1`,description:`铺满整个画面`}],GP=[{label:`小号`,value:`small`},{label:`中号`,value:`medium`},{label:`大号`,value:`large`}],KP={enabled:`已开启`,disabled:`已关闭`},qP=[{key:`amagi`,label:`接口库`,description:`请求与 Cookies`},{key:`app`,label:`通用`,description:`运行与交互`},{key:`douyin`,label:`抖音`,description:`解析与推送`},{key:`bilibili`,label:`哔哩哔哩`,description:`解析与推送`},{key:`kuaishou`,label:`快手`,description:`快手解析`},{key:`xiaohongshu`,label:`小红书`,description:`小红书解析`},{key:`pushlist`,label:`推送列表`,description:`订阅 JSON`}],JP=(0,v.lazy)(()=>vb(()=>import(`./CronEditor-DiywKvi5.js`),__vite__mapDeps([0,1]))),YP=({className:e,disabled:t,...n})=>{let[r,i]=(0,v.useState)(!1),a=r?`隐藏密码`:`显示密码`;return(0,V.jsxs)(`div`,{className:`relative w-full`,children:[(0,V.jsx)(Pv,{...n,variant:`secondary`,className:`w-full pr-10 ${e??``}`,type:r?`text`:`password`}),(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":a,className:`absolute right-1 top-1/2 -translate-y-1/2`,isDisabled:t,size:`sm`,type:`button`,variant:`tertiary`,onPress:()=>i(e=>!e),children:r?(0,V.jsx)(ik,{className:`size-4`,"aria-hidden":`true`}):(0,V.jsx)(ak,{className:`size-4`,"aria-hidden":`true`})})]})},XP=({config:e,device:t,classes:n,validationErrors:r,updateConfigValue:i})=>{let a=e=>{let n=CP(e)?e:{description:e},r=t===`mobile`?n.mobileContent??n.desktopContent:n.desktopContent;return(0,V.jsxs)(zv,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{children:n.description}),r?(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{"aria-label":`查看详细说明`,children:(0,V.jsx)(Hm,{isIconOnly:!0,size:`sm`,variant:`tertiary`,children:(0,V.jsx)(sk,{className:`size-4`,"aria-hidden":`true`})})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:t===`mobile`?`bottom`:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),(0,V.jsx)(`div`,{className:`max-w-72`,children:r})]})]}):null,n.extra]})},o=(n,r,i)=>{if(!i)return n;let a=FP(e,r);return a?t===`mobile`?(0,V.jsxs)(Wh,{children:[(0,V.jsx)(Wh.Trigger,{className:`w-full cursor-not-allowed`,children:n}),(0,V.jsx)(Wh.Content,{placement:`bottom`,children:(0,V.jsxs)(Wh.Dialog,{children:[(0,V.jsx)(Wh.Arrow,{}),(0,V.jsx)(`div`,{className:`max-w-72 text-sm`,children:a})]})})]}):(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{className:`w-full cursor-not-allowed`,children:n}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),(0,V.jsx)(`div`,{className:`max-w-72`,children:a})]})]}):n},s=(t,n,r,a)=>{let o=Q(e,t,[]),s=r?Array.from(new Set([...o,n])):o.filter(e=>e!==n);if(a&&r){let e=a.find(e=>e.includes(n));if(e){let t=e.filter(e=>e!==n);s=s.filter(e=>!t.includes(e))}}i(t,s)};return{renderSwitch:(t,n,r,s=!1)=>{let c=Q(e,t,!1),l=(0,V.jsxs)(P_,{isDisabled:s,isSelected:c,onChange:e=>i(t,e),children:[(0,V.jsxs)(P_.Content,{children:[(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})}),(0,V.jsx)(`span`,{className:`font-semibold`,children:n})]}),a(r||(c?KP.enabled:KP.disabled))]});return o(l,t,s)},renderTextField:(t,n,s,c)=>{let l=c?.type||`text`,u=String(Q(e,t,l===`number`?c?.fallback??0:``)),d=r[vP(t)],f=c?.disabled??!1,p=(0,V.jsxs)(Fv,{fullWidth:!0,isInvalid:!!d,isDisabled:f,name:t.join(`.`),type:l,value:u,onChange:e=>{i(t,l===`number`?xP(e,c?.fallback??0):e)},children:[(0,V.jsx)(Lv,{className:`font-semibold`,children:n}),l===`password`?(0,V.jsx)(YP,{disabled:f,max:c?.max,min:c?.min,pattern:c?.pattern,placeholder:c?.placeholder||n,step:c?.step}):(0,V.jsx)(Pv,{variant:`secondary`,max:c?.max,min:c?.min,pattern:c?.pattern,placeholder:c?.placeholder||n,step:c?.step}),d?(0,V.jsx)(Vv,{children:d}):a(s)]});return o(p,t,f)},renderSelectField:(t,n,r,s,c=e=>e,l=!1)=>{let u=String(Q(e,t,s[0]?.value||``)),d=(0,V.jsxs)(ny,{disabledKeys:s.filter(e=>e.disabled).map(e=>e.value),fullWidth:!0,isDisabled:l,name:t.join(`.`),placeholder:n,value:u,variant:`secondary`,onChange:e=>{e===null||Array.isArray(e)||i(t,c(String(e)))},children:[(0,V.jsx)(Lv,{className:`font-semibold`,children:n}),(0,V.jsxs)(ny.Trigger,{children:[(0,V.jsx)(ny.Value,{}),(0,V.jsx)(ny.Indicator,{})]}),a(r),(0,V.jsx)(ny.Popover,{children:(0,V.jsx)(Xv,{children:s.map(e=>(0,V.jsxs)(Xv.Item,{id:e.value,textValue:e.label,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,V.jsx)(Lv,{children:e.label}),e.description?(0,V.jsx)(zv,{children:e.description}):null]}),(0,V.jsx)(Xv.ItemIndicator,{})]},e.value))})})]});return o(d,t,l)},renderCheckboxGroup:(t,r,i,c,l=!1,u)=>{let d=Q(e,t,[]),f=(0,V.jsxs)(`div`,{className:n.field,children:[(0,V.jsx)(Lv,{className:`font-semibold`,children:r}),a(i),(0,V.jsx)(`div`,{className:n.choiceGrid,children:c.map(e=>(0,V.jsxs)(hh,{variant:`secondary`,isDisabled:l,isSelected:SP(d,e.value),onChange:n=>s(t,e.value,n,u),children:[(0,V.jsxs)(hh.Content,{children:[(0,V.jsx)(hh.Control,{children:(0,V.jsx)(hh.Indicator,{})}),e.label]}),e.description?(0,V.jsx)(zv,{children:e.description}):null]},e.value))})]});return o(f,t,l)},renderCronField:(r,a,s,c=!1)=>{let l=Q(e,r,`*/10 * * * *`),u=(0,V.jsx)(`div`,{className:n.field,children:(0,V.jsx)(v.Suspense,{fallback:(0,V.jsx)(`div`,{className:`h-64 animate-pulse rounded-lg bg-muted/30`}),children:(0,V.jsx)(JP,{device:t,disabled:c,value:l,onChange:e=>i(r,e)})})});return o(u,r,c)},renderPageHeader:(e,n)=>(0,V.jsxs)(`div`,{className:`mb-6 ${t===`mobile`?`pr-36`:``}`,"data-config-section":!0,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-bold`,children:e}),(0,V.jsx)(`div`,{className:`mt-3`,children:(0,V.jsx)(zv,{children:n})})]}),renderSubSection:(e,t)=>(0,V.jsxs)(Gm,{"data-config-section":!0,className:`mb-4`,children:[(0,V.jsx)(Gm.Header,{className:n.sectionHeader,children:(0,V.jsx)(Gm.Title,{className:`text-lg font-semibold`,children:e})}),(0,V.jsx)(Gm.Content,{className:n.sectionContent,children:(0,V.jsx)(`div`,{className:n.fields,children:t})})]})}},ZP={root:`relative flex min-w-0 max-w-full flex-col gap-8`,loading:`flex min-h-80 items-center justify-center gap-3`,header:`grid grid-cols-[minmax(0,1fr)_auto] items-start gap-8 pr-44`,headerCopy:`flex min-w-0 flex-col gap-2`,form:`flex min-w-0 max-w-full flex-col gap-6`,floatingActions:`fixed right-6 top-20 z-10`,actionControls:`flex items-center justify-end gap-3`,sectionHeader:`p-2`,sectionContent:`p-6`,fields:`grid grid-cols-2 gap-x-6 gap-y-5`,field:`flex min-w-0 flex-col gap-2`,choiceGrid:`grid grid-cols-2 gap-3`,divider:`col-span-full flex min-w-0 flex-col gap-2 pt-3`,tabsListContainer:`w-full min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain overscroll-y-none [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,tabsList:`w-fit min-w-max *:w-fit *:min-w-fit *:flex-none *:shrink-0 *:whitespace-nowrap`,topLevelFields:`mb-4 space-y-4 px-2`},QP={root:`relative flex min-w-0 max-w-full flex-col gap-5`,loading:`flex min-h-80 items-center justify-center gap-3`,header:`flex flex-col gap-3 pt-12`,headerCopy:`flex min-w-0 flex-col gap-2`,form:`flex min-w-0 max-w-full flex-col gap-3`,floatingActions:`sticky top-0 z-20 flex h-0 w-full justify-end overflow-visible`,actionControls:`flex w-fit h-11 p-1 items-center gap-2 rounded-full border border-default-200 bg-background/90 shadow-sm backdrop-blur-md`,sectionHeader:`p-1`,sectionContent:`p-0`,fields:`grid grid-cols-1 gap-5`,field:`flex min-w-0 flex-col gap-2`,choiceGrid:`grid grid-cols-1 gap-3`,divider:`col-span-full flex min-w-0 flex-col gap-2 pt-3`,tabsListContainer:`w-full min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain overscroll-y-none [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,tabsList:`w-fit min-w-max *:w-fit *:min-w-fit *:flex-none *:shrink-0 *:whitespace-nowrap`,topLevelFields:`mb-4 space-y-4 px-4`},$P=e=>e===`mobile`?QP:ZP,eF=({config:e,renderers:t})=>{let{renderPageHeader:n,renderSelectField:r,renderSubSection:i,renderSwitch:a,renderTextField:o}=t,s=Q(e,[`amagi`,`proxy`,`switch`],!1),c=Q(e,[`amagi`,`APIServer`],!1);return(0,V.jsxs)(V.Fragment,{children:[n(`接口库配置`,`接口库的 Cookies、请求、代理和 API 服务配置。保存后后端会重载接口库客户端。`),i(`平台 Cookies`,(0,V.jsxs)(V.Fragment,{children:[o([`amagi`,`cookies`,`douyin`],`抖音 Cookies`,`请输入你的抖音Cookies,不输入则无法使用抖音相关功能噢。`,{type:`password`}),o([`amagi`,`cookies`,`bilibili`],`B站 Cookies`,`请输入你的B站Cookies,不输入部分功能将受限噢。`,{type:`password`}),o([`amagi`,`cookies`,`kuaishou`],`快手 Cookies`,`请输入你的快手Cookies,不输入则无法使用快手相关功能噢。`,{type:`password`}),o([`amagi`,`cookies`,`xiaohongshu`],`小红书 Cookies`,`请输入你的小红书Cookies,不输入则无法使用小红书相关功能噢。`,{type:`password`})]})),i(`请求配置`,(0,V.jsxs)(V.Fragment,{children:[o([`amagi`,`timeout`],`请求超时时间`,`网络请求的超时时间,单位:毫秒。`,{type:`number`,fallback:15e3,min:1e3,max:3e5}),o([`amagi`,`User-Agent`],`User-Agent`,`请求头中的User-Agent字段,用于标识客户端类型。`)]})),i(`代理配置(可选)`,(0,V.jsxs)(V.Fragment,{children:[a([`amagi`,`proxy`,`switch`],`代理开关`,`开启后需要配置「代理主机」「代理端口」。`),r([`amagi`,`proxy`,`protocol`],`代理协议`,`代理服务使用的协议。`,[{label:`HTTP`,value:`http`},{label:`HTTPS`,value:`https`}],e=>e,!s),o([`amagi`,`proxy`,`host`],`代理主机`,`代理服务器的主机地址,如:127.0.0.1。`,{disabled:!s}),o([`amagi`,`proxy`,`port`],`代理端口`,`代理服务器的端口号。`,{type:`number`,fallback:7890,min:1,max:65535,disabled:!s}),o([`amagi`,`proxy`,`auth`,`username`],`代理用户名`,`代理服务器的认证用户名(如果需要)。`,{disabled:!s}),o([`amagi`,`proxy`,`auth`,`password`],`代理密码`,`代理服务器的认证密码(如果需要)。`,{type:`password`,disabled:!s})]})),i(`API 服务配置`,(0,V.jsxs)(V.Fragment,{children:[a([`amagi`,`APIServer`],`API 服务`,`本地部署一个视频解析API服务,接口范围为本插件用到的所有。`),a([`amagi`,`APIServerMount`],`挂载到 Karin`,`API 服务是否挂载到 Karin 上,开启后监听端口为 Karin 的 http 端口,修改后需重启。需开启「API服务」。`,!c),o([`amagi`,`APIServerPort`],`API 服务端口`,`仅未挂载到 Karin 时生效。`,{type:`number`,disabled:Q(e,[`amagi`,`APIServerMount`],!0),fallback:4567,min:1024,max:65535})]}))]})},tF=({config:e,renderers:t})=>{let{renderCheckboxGroup:n,renderPageHeader:r,renderSelectField:i,renderSubSection:a,renderSwitch:o,renderTextField:s}=t,c=Q(e,[`app`,`livePhotoMode`],`video_and_livephoto`);return(0,V.jsxs)(V.Fragment,{children:[r(`通用`,`插件运行、渲染和交互相关配置。`),a(`缓存设置`,(0,V.jsx)(V.Fragment,{children:o([`app`,`removeCache`],`自动删除视频缓存`,`任务完成后删除下载缓存。`)})),a(`交互设置`,(0,V.jsxs)(V.Fragment,{children:[o([`app`,`EmojiReply`],`表情回应`,`在解析任务开始时添加表情回应,若适配器不支持需要关闭。`),o([`app`,`parseTip`],`解析提示`,`发送提示信息:"检测到xxx链接,开始解析"。`),o([`app`,`fakeForward`],`伪造合并转发消息`,`开启后合并转发将使用触发者身份展示;关闭后使用机器人身份展示。`),n([`app`,`errorLogSendTo`],`错误日志`,`遇到错误时谁会收到错误日志。注:推送任务只可发送给主人。「第一个主人」与「所有主人」互斥。`,[{label:`第一个主人`,value:`master`},{label:`所有主人`,value:`allMasters`},{label:`触发者的群聊`,value:`trigger`}],!1,[[`master`,`allMasters`]])]})),a(`渲染设置`,(0,V.jsxs)(V.Fragment,{children:[s([`app`,`renderScale`],`渲染精度`,`可选值50~200,建议100。设置高精度会提高图片的精细度,过高可能会影响渲染与发送速度。`,{type:`number`,fallback:100,min:50,max:200}),i([`app`,`Theme`],`渲染图片的主题色`,`渲染评论图和推送图的主题色。`,[{label:`自动`,value:`0`,description:`06:00-18:00为浅色,18:00-06:00为深色`},{label:`浅色`,value:`1`},{label:`深色`,value:`2`},{label:`智能场景(实验性)`,value:`3`,description:`自动模式的超集;部分模板会根据封面色调 智能调整主题色,可能会出现不适配的情况。`}],e=>Number(e)),o([`app`,`RemoveWatermark`],`移除版本信息`,`渲染的图片是否移除底部版本信息。`),s([`app`,`RenderWaitTime`],`渲染图片的等待时间`,`单位:秒,Linux系统下不能为0;其他系统传递 0 可禁用。`,{type:`number`,fallback:60,min:0}),o([`app`,`multiPageRender`],`分页渲染`,`将模板渲染成多页的图片,以降低渲染器压力,默认开启,非必要不修改!`),s([`app`,`multiPageHeight`],`分页渲染时,每页的高度`,`经测试最佳每页高度为12000px,默认12000px。`,{type:`number`,disabled:!Q(e,[`app`,`multiPageRender`],!0),fallback:12e3,min:1e3,max:2e4})]})),a(`上传与下载设置`,(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(eg,{className:`flex flex-col gap-5 p-4 mb-4 rounded-3xl`,variant:`secondary`,children:[i([`app`,`videoSendMode`],`本地视频发送方式`,`选择本地视频交付给协议端的方式。`,[{label:`File 协议(本地文件)`,value:`file`,description:`使用 file 协议发送本地视频,需 Karin 与协议端在同一网络环境下`},{label:`Base64(编码传输)`,value:`base64`,description:`将本地视频转换为 base64 发送,传输数据量增大约 30%,不在同一网络环境可能导致额外带宽成本,适合 karin 和协议端不在同一网络环境`}],e=>e,Q(e,[`app`,`usegroupfile`],!1)),o([`app`,`usegroupfile`],`群文件上传`,`使用群文件上传,开启后会将视频文件上传到群文件中,需配置「群文件上传阈值」。与「本地视频发送方式 = Base64」互斥。`,Q(e,[`app`,`videoSendMode`],`file`)===`base64`),s([`app`,`groupfilevalue`],`群文件上传阈值`,`当文件大小超过该值时将使用群文件上传,单位:MB,「使用群文件上传」开启后才会生效。`,{type:`number`,fallback:100,min:1,disabled:!Q(e,[`app`,`usegroupfile`],!1)||Q(e,[`app`,`videoSendMode`],`file`)===`base64`})]}),(0,V.jsx)(eg,{className:`flex flex-col gap-5 p-4 mb-4 rounded-3xl`,variant:`secondary`,children:i([`app`,`imageSendMode`],`网络图片发送方式`,`图片资源发送给协议端的方式。`,[{label:`URL 链接(直接传递)`,value:`url`,description:`直接传递 HTTP 链接给上游下载,可能因上游网络问题导致下载超时`},{label:`File 协议(本地文件)`,value:`file`,description:`下载到本地后使用 file 协议发送,需 Karin 与协议端在同一网络环境下`},{label:`Base64(编码传输)`,value:`base64`,description:`下载后转换为 base64 发送,传输数据量增大约 30%,不在同一网络环境可能导致额外带宽成本`}])}),(0,V.jsxs)(eg,{className:`flex flex-col gap-5 p-4 mb-4 rounded-3xl`,variant:`secondary`,children:[o([`app`,`usefilelimit`],`视频上传拦截`,`开启后会根据视频文件大小判断是否需要上传,需配置「视频拦截阈值」。`),s([`app`,`filelimit`],`视频拦截阈值`,`视频文件大于该数值则直接结束任务,不会上传,单位: MB,「视频上传拦截」开启后才会生效。`,{type:`number`,fallback:20,min:1,disabled:!Q(e,[`app`,`usefilelimit`],!1)}),o([`app`,`compress`],`压缩视频`,`开启后会将视频文件压缩后再上传,适合上传大文件,任务过程中会吃满CPU,对低配服务器不友好。需配置「压缩触发阈值」与「压缩后的值」。`),s([`app`,`compresstrigger`],`压缩触发阈值`,`触发视频压缩的阈值,单位:MB。当文件大小超过该值时,才会压缩视频,「压缩视频」开启后才会生效。`,{type:`number`,fallback:80,min:1,disabled:!Q(e,[`app`,`compress`],!1)}),s([`app`,`compressvalue`],`压缩后的值`,`单位:MB,若视频文件大小大于「压缩触发阈值」的值,则会进行压缩至该值(±5%),「压缩视频」开启后才会生效。`,{type:`number`,fallback:30,min:1,disabled:!Q(e,[`app`,`compress`],!1)})]}),(0,V.jsxs)(eg,{className:`flex flex-col gap-5 p-4 rounded-3xl`,variant:`secondary`,children:[o([`app`,`downloadThrottle`],`下载限速`,`开启后会限制下载速度,避免触发服务器风控导致连接被重置(ECONNRESET)。如果下载时经常报错"连接被重置",建议开启。`),s([`app`,`downloadMaxSpeed`],`最大下载速度`,`限速开关打开后生效。单位:MB/s,建议值:10,根据实际情况调整。`,{type:`number`,fallback:10,min:1,max:100,disabled:!Q(e,[`app`,`downloadThrottle`],!1)}),o([`app`,`downloadAutoReduce`],`断流自动降速`,`限速开关打开后生效。当检测到下载中断时,自动降低下载速度,避免再次触发风控。`,!Q(e,[`app`,`downloadThrottle`],!1)),s([`app`,`downloadMinSpeed`],`最低下载速度`,`断流降速开关打开后生效。单位:MB/s,自动降速的下限值。`,{type:`number`,fallback:1,min:.5,max:50,disabled:!Q(e,[`app`,`downloadThrottle`],!1)||!Q(e,[`app`,`downloadAutoReduce`],!1)})]})]})),a(`Live Photo 兼容设置`,(0,V.jsxs)(V.Fragment,{children:[i([`app`,`livePhotoMode`],`Live Photo 处理和发送方式`,`解析遇到实况图时的处理和发送方式。注意:生成视频性能开销大,2C2G 服务器单张约需 20 秒。`,[{label:`视频 + 实况图`,value:`video_and_livephoto`,description:`生成并发送仿 iPhone Live Photo 播放效果的视频(播放三次)+ 对应系统的实况图`},{label:`仅视频`,value:`video_only`,description:`仅生成并发送仿 iPhone Live Photo 播放效果的视频(播放三次)`},{label:`仅实况图`,value:`livephoto_only`,description:`仅生成并发送对应系统的实况图,性能开销小`}]),i([`app`,`livePhotoSystem`],`Live Photo 静态图兼容系统`,`当解析到作品/动态包含 Live Photo 时,合并转发里发送的 Live Photo 静态图按所选系统生成。推荐 OPPO,兼容性最广。`,[{label:`Google`,value:`google`,description:`Google Motion Photo 格式`},{label:`小米(HyperOS)`,value:`xiaomi`,description:`兼容小米(任何版本)和 Google,但无法被 OPPO 识别`},{label:`OPPO(ColorOS)`,value:`oppo`,description:`推荐,兼容 OPPO、小米(较新版本)和 Google`},{label:`华为/荣耀(HarmonyOS/MagicOS)`,value:`huawei_honor`,description:`理论可行但未实测(作者无对应设备)`},{label:`vivo(Origin OS)`,value:`vivo`,description:`需要独立的图片和同名视频文件,暂不支持`,disabled:!0},{label:`iPhone(iOS)`,value:`iphone`,description:`需要独立的图片和同名视频文件,暂不支持`,disabled:!0}],e=>e,c===`video_only`)]})),a(`我的小玩具`,(0,V.jsxs)(V.Fragment,{children:[o([`app`,`videoTool`],`默认解析优先级`,`关闭后使用自定义优先级,修改后需重启。`),s([`app`,`priority`],`自定义优先级`,`默认解析优先级关闭后生效。`,{type:`number`,disabled:Q(e,[`app`,`videoTool`],!0),fallback:800}),i([`app`,`qrLoginAddrType`],`扫码登录地址`,`生成登录二维码时使用的服务器地址。`,[{label:`局域网`,value:`lan`,description:`适用于手机和服务器在同一局域网`},{label:`外部地址`,value:`external`,description:`适用于远程访问,需手动配置`}]),s([`app`,`qrLoginExternalAddr`],`外部访问地址`,`公网 IP 或域名,如:123.45.67.89 或 example.com。`,{disabled:Q(e,[`app`,`qrLoginAddrType`],`lan`)!==`external`})]}))]})},nF=({config:e,renderers:t,classes:n})=>{let{renderCheckboxGroup:r,renderCronField:i,renderPageHeader:a,renderSelectField:o,renderSubSection:s,renderSwitch:c,renderTextField:l}=t,u=Q(e,[`bilibili`,`switch`],!1),d=Q(e,[`bilibili`,`sendContent`],[]),f=Q(e,[`bilibili`,`burnDanmaku`],!1),p=Q(e,[`bilibili`,`videoQuality`],0),m=Q(e,[`bilibili`,`videoInfoMode`],`text`),h=Q(e,[`bilibili`,`push`,`switch`],!1),g=Q(e,[`bilibili`,`push`,`parsedynamic`],!1),_=Q(e,[`bilibili`,`push`,`pushVideoQuality`],0),v=!u||!SP(d,`comment`),y=!u||!f;return(0,V.jsxs)(V.Fragment,{children:[a(`哔哩哔哩`,`B站解析、动态图片布局、弹幕和推送基础设置。`),(0,V.jsxs)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:[c([`bilibili`,`switch`],`解析开关`,`B站解析开关,此开关为单独开关。`),r([`bilibili`,`sendContent`],`解析时发送的内容`,`若什么都不选,可能不会返回任何解析结果。`,IP.filter(e=>e.value!==`image`),!u)]}),s(`评论详情设置`,(0,V.jsxs)(V.Fragment,{children:[l([`bilibili`,`numcomment`],`评论解析数量`,`主评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:v}),c([`bilibili`,`realCommentCount`],`显示真实评论数量`,`关闭则显示解析到的评论数量。`,v),c([`bilibili`,`commentImageCollection`],`是否收集评论区的图片`,`开启后将收集评论区的图片,以合并转发的形式返回。`,v)]})),s(`渲染与画质设置`,(0,V.jsxs)(V.Fragment,{children:[o([`bilibili`,`videoQuality`],`画质偏好`,`解析视频的分辨率偏好。`,zP,Number,!u),l([`bilibili`,`maxAutoVideoSize`],`视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!u||Number(p)!==0}),o([`bilibili`,`imageLayout`],`解析图文动态时,遇到多张图片时的页面布局方式(动态推送图片也生效)`,`自动布局:少于4张时逐张上下排列;4~8张时瀑布流;9张及以上九宫格。`,[{label:`自动布局`,value:`auto`},{label:`逐张上下排列`,value:`vertical`},{label:`瀑布流排列`,value:`waterfall`},{label:`九宫格排列`,value:`grid`}]),o([`bilibili`,`videoInfoMode`],`视频信息返回形式`,`视频信息返回文本或图片。`,[{label:`图片模式`,value:`image`},{label:`文本模式`,value:`text`}],e=>e,!u),r([`bilibili`,`displayContent`],`视频信息前返回的内容`,`若什么都不选,则不会返回任何视频相关信息。`,LP,!u||m===`image`),c([`bilibili`,`showDanmakuInVideoInfo`],`视频信息图片中显示弹幕`,`开启后在视频信息图片的封面区域显示热门弹幕。关闭后不会请求弹幕数据,可提升解析速度。仅「视频信息返回形式」为图片模式时生效。`,!u||m===`text`)]})),s(`权限设置`,(0,V.jsx)(V.Fragment,{children:o([`bilibili`,`loginPerm`],`谁可以触发扫码登录`,`修改后需重启。`,VP)})),s(`弹幕烧录相关`,(0,V.jsxs)(V.Fragment,{children:[c([`bilibili`,`burnDanmaku`],`弹幕烧录`,`将弹幕硬编码到视频画面中。开启后视频需要重新编码,耗时较长,高分辨率视频会占用较多资源。`,!u),o([`bilibili`,`danmakuArea`],`弹幕区域`,`限制弹幕的显示范围,避免遮挡视频主体内容。`,WP,Number,y),o([`bilibili`,`danmakuFontSize`],`弹幕字号`,`弹幕文字大小。`,GP,e=>e,y),l([`bilibili`,`danmakuOpacity`],`弹幕透明度`,`0为完全透明,100为完全不透明,推荐70。`,{type:`number`,fallback:70,min:0,max:100,disabled:y}),o([`bilibili`,`verticalMode`],`竖屏适配`,`模拟手机端竖屏观看体验,视频居中显示,上下黑边区域用于展示弹幕。`,UP,e=>e,y),o([`bilibili`,`videoCodec`],`视频编码格式`,`弹幕烧录时使用的视频编码格式,会自动检测硬件加速。`,HP,e=>e,y)]})),s(`B站推送相关`,(0,V.jsxs)(V.Fragment,{children:[c([`bilibili`,`push`,`switch`],`推送开关`,`推送开关,修改后需重启;使用「#设置B站推送 + UID」配置推送列表。`),o([`bilibili`,`push`,`permission`],`谁可以设置推送`,`修改后需重启。`,VP,e=>e,!h),i([`bilibili`,`push`,`cron`],`定时任务表达式`,`定时推送的时间,支持可视化编辑或手动输入 cron 表达式。`,!h),c([`bilibili`,`push`,`parsedynamic`],`作品解析`,`触发推送时是否一同解析该作品。`,!h),r([`bilibili`,`push`,`parseDynamicTypes`],`需要解析的动态类型`,`选择推送时需要进一步解析的动态类型;未选择的类型只发送动态卡片。`,BP,!h||!g),o([`bilibili`,`push`,`pushVideoQuality`],`解析视频动态时的画质偏好`,`「作品解析」开启时生效,仅对视频动态有效。`,zP.filter(e=>e.value!==`127`),Number,!h||!g),l([`bilibili`,`push`,`pushMaxAutoVideoSize`],`视频动态的视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「解析视频动态时的画质偏好」 为 "自动选择" 且「作品解析」开启时生效,仅对视频动态有效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!h||!g||Number(_)!==0})]}))]})},rF=({config:e,renderers:t,classes:n})=>{let{renderCheckboxGroup:r,renderCronField:i,renderPageHeader:a,renderSelectField:o,renderSubSection:s,renderSwitch:c,renderTextField:l}=t,u=Q(e,[`app`,`livePhotoMode`],`video_and_livephoto`),d=Q(e,[`douyin`,`switch`],!1),f=Q(e,[`douyin`,`sendContent`],[]),p=Q(e,[`douyin`,`burnDanmaku`],!1),m=Q(e,[`douyin`,`videoQuality`],`adapt`),h=Q(e,[`douyin`,`videoInfoMode`],`text`),g=Q(e,[`douyin`,`push`,`switch`],!1),_=Q(e,[`douyin`,`push`,`pushVideoQuality`],`adapt`),v=!d||!SP(f,`comment`),y=!d||!p;return(0,V.jsxs)(V.Fragment,{children:[a(`抖音`,`抖音解析、画质、弹幕和推送基础设置。`),(0,V.jsxs)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:[c([`douyin`,`switch`],`解析开关`,`抖音解析开关,此开关为单独开关。`),r([`douyin`,`sendContent`],`解析时发送的内容`,`若什么都不选,可能不会返回任何解析结果。`,IP.filter(e=>e.value!==`image`),!d)]}),s(`评论详情设置`,(0,V.jsxs)(V.Fragment,{children:[l([`douyin`,`numcomment`],`评论解析数量`,`主评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:v}),l([`douyin`,`subCommentLimit`],`子评论请求数量`,`单条主评论下请求的子评论总条数(含多层嵌套)。注意:UI中最多显示 6 层回复嵌套,超出部分会被隐藏;因实际嵌套深度不可预知,配置数量不代表最终可见数量。`,{type:`number`,fallback:5,min:1,max:20,disabled:v}),c([`douyin`,`commentImageCollection`],`是否收集评论区的图片`,`开启后将收集评论区的图片,以合并转发的形式返回。`,v)]})),s(`渲染与画质设置`,(0,V.jsxs)(V.Fragment,{children:[o([`douyin`,`liveImageMergeMode`],`合辑 Live 图 BGM 合并方式`,`合辑 Live 图 BGM 合并方式,仅 Live Photo 模式不是「仅实况图」时生效。`,[{label:`连续`,value:`continuous`,description:`BGM 接续播放,结束后自动循环`},{label:`独立`,value:`independent`,description:`每张图 BGM 从头开始`}],e=>e,!d||u===`livephoto_only`),o([`douyin`,`videoQuality`],`画质偏好`,`解析视频的分辨率偏好。`,RP,e=>e,!d),l([`douyin`,`maxAutoVideoSize`],`视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!d||m!==`adapt`}),o([`douyin`,`videoInfoMode`],`视频信息返回形式`,`视频信息返回文本或图片。`,[{label:`图片模式`,value:`image`},{label:`文本模式`,value:`text`}],e=>e,!d),r([`douyin`,`displayContent`],`视频信息的内容`,`若什么都不选,则不会返回任何视频相关信息。`,LP.filter(e=>e.value!==`desc`),!d||h===`image`)]})),s(`权限设置`,(0,V.jsx)(V.Fragment,{children:o([`douyin`,`loginPerm`],`谁可以触发扫码登录`,`修改后需重启。`,VP)})),s(`弹幕烧录相关`,(0,V.jsxs)(V.Fragment,{children:[c([`douyin`,`burnDanmaku`],`弹幕烧录`,`将弹幕硬编码到视频画面中。开启后视频需要重新编码,耗时较长。`,!d),o([`douyin`,`danmakuArea`],`弹幕显示区域`,`限制弹幕范围,避免遮挡视频主体。`,WP,Number,y),o([`douyin`,`danmakuFontSize`],`弹幕字号`,`弹幕文字大小。`,GP,e=>e,y),l([`douyin`,`danmakuOpacity`],`弹幕透明度`,`0为完全透明,100为完全不透明,推荐70。`,{type:`number`,fallback:70,min:0,max:100,disabled:y}),o([`douyin`,`verticalMode`],`竖屏适配`,`针对横屏视频,模拟手机端竖屏观看体验,视频居中显示,上下黑边区域用于展示弹幕。`,UP,e=>e,y),o([`douyin`,`videoCodec`],`视频编码格式`,`烧录弹幕后的视频编码格式。`,HP,e=>e,y)]})),s(`抖音推送相关`,(0,V.jsxs)(V.Fragment,{children:[c([`douyin`,`push`,`switch`],`推送开关`,`推送开关,修改后需重启;使用「#设置抖音推送 + 抖音号」配置推送列表。`),o([`douyin`,`push`,`permission`],`谁可以设置推送`,`修改后需重启。`,VP,e=>e,!g),i([`douyin`,`push`,`cron`],`定时任务表达式`,`定时推送的时间,支持可视化编辑或手动输入 cron 表达式。`,!g),c([`douyin`,`push`,`parsedynamic`],`作品解析`,`触发推送时是否一同解析该作品。`,!g),o([`douyin`,`push`,`shareType`],`推送图二维码的类型`,`推送图二维码识别后的跳转类型。`,[{label:`网页链接`,value:`web`,description:`识别后访问抖音官网对应的作品地址`},{label:`下载链接`,value:`download`,description:`识别后访问无水印作品下载地址`}],e=>e,!g),o([`douyin`,`push`,`pushVideoQuality`],`画质偏好`,`推送解析时解析视频的分辨率偏好。`,RP,e=>e,!g),l([`douyin`,`push`,`pushMaxAutoVideoSize`],`视频体积上限(MB)`,`推送解析时根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!g||_!==`adapt`})]}))]})},iF=({config:e,renderers:t,classes:n})=>{let{renderPageHeader:r,renderSubSection:i,renderSwitch:a,renderTextField:o}=t,s=Q(e,[`kuaishou`,`switch`],!1),c=Q(e,[`kuaishou`,`comment`],!1);return(0,V.jsxs)(V.Fragment,{children:[r(`快手`,`快手解析基础设置。`),(0,V.jsx)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:a([`kuaishou`,`switch`],`解析开关`,`快手解析开关,此开关为单独开关。`)}),i(`评论详情设置`,(0,V.jsxs)(V.Fragment,{children:[a([`kuaishou`,`comment`],`评论解析`,`快手评论解析,开启后可发送快手作品评论图。`,!s),o([`kuaishou`,`numcomment`],`评论解析数量`,`快手评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:!s||!c})]}))]})},aF=({children:e,disabled:t,message:n,device:r})=>t?r===`mobile`?(0,V.jsxs)(Wh,{children:[(0,V.jsx)(Wh.Trigger,{className:`w-full cursor-not-allowed`,children:e}),(0,V.jsxs)(Wh.Content,{placement:`bottom`,children:[(0,V.jsx)(Wh.Arrow,{}),(0,V.jsx)(`div`,{className:`px-3 py-2`,children:(0,V.jsx)(`p`,{className:`text-sm text-foreground`,children:n})})]})]}):(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{className:`w-full cursor-not-allowed`,children:e}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),n]})]}):e,oF=e=>e===`desktop`?`grid grid-cols-2 gap-4`:`flex flex-col gap-4`,sF=[{label:`作品列表`,value:`post`,description:`推送用户发布的作品`},{label:`喜欢列表`,value:`favorite`,description:`推送用户喜欢的作品`},{label:`推荐列表`,value:`recommend`,description:`推送推荐的作品`},{label:`直播`,value:`live`,description:`推送直播状态`}],cF=[{label:`投稿视频`,value:`video`,description:`推送UP主投稿的视频`},{label:`图文动态`,value:`draw`,description:`推送图文动态`},{label:`纯文动态`,value:`word`,description:`推送纯文字动态`},{label:`直播动态`,value:`live`,description:`推送直播状态`},{label:`转发动态`,value:`forward`,description:`推送转发的动态`},{label:`投稿专栏`,value:`article`,description:`推送专栏文章`}],lF=[{label:`黑名单`,value:`blacklist`,description:`命中关键词/标签则不推送`},{label:`白名单`,value:`whitelist`,description:`只推送命中关键词/标签的内容`}],uF=({label:e,description:t,items:n,onAdd:r,onRemove:i,disabled:a=!1})=>{let[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),u=()=>{let e=o.trim();if(!e){l(`请输入内容`);return}if(n.includes(e)){l(`该项已存在,请勿重复添加`);return}r(e),s(``),l(``)};return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsxs)(Fv,{className:`flex-1`,isDisabled:a,isInvalid:!!c,value:o,onChange:e=>{s(e),c&&l(``)},children:[(0,V.jsx)(Lv,{children:e}),(0,V.jsx)(Pv,{variant:`secondary`,placeholder:`输入${e}`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),u())}}),c?(0,V.jsx)(Vv,{children:c}):null]}),(0,V.jsx)(Hm,{isDisabled:a,variant:`secondary`,onPress:u,children:(0,V.jsx)(dk,{className:`size-4`})})]}),n.length>0?(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.map(e=>(0,V.jsxs)(yh,{color:`accent`,variant:`soft`,children:[(0,V.jsx)(`span`,{children:e}),a?null:(0,V.jsx)(`button`,{type:`button`,className:`ml-1 rounded-full p-0.5 hover:bg-black/10`,onClick:()=>i(e),children:(0,V.jsx)(mk,{className:`size-3`})})]},e))}):(0,V.jsxs)(zv,{children:[`暂无`,e]}),(0,V.jsx)(zv,{children:t})]})},dF=(e,t)=>{if((e.success||e.code===200)&&e.data!==void 0)return e.data;throw Error(e.message||t)},fF=async()=>dF((await aN.get(`/kkk/v1/bots`)).data,`获取 Bot 列表失败`),pF=async e=>dF((await aN.get(`/kkk/v1/bots/${encodeURIComponent(e)}/groups`)).data,`获取群列表失败`),mF=async e=>e.length===0?[]:dF((await aN.post(`/kkk/v1/groups/batch`,{groups:e})).data,`获取推送目标信息失败`),hF=({mapping:e,compact:t=!1,stacked:n=!1})=>n?(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.groupName||e.groupId,src:e.groupAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.groupName||e.groupId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.groupName||e.groupId}),(0,V.jsx)(zv,{className:`block truncate`,children:e.groupId})]})]}),(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pl-8`,children:[(0,V.jsx)(nk,{className:`size-4 shrink-0 text-muted`}),(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.botName||e.botId,src:e.botAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.botName||e.botId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.botName||e.botId}),(0,V.jsx)(zv,{className:`block truncate`,children:t?e.botId:`Bot ${e.botId}`})]})]})]}):(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.groupName||e.groupId,src:e.groupAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.groupName||e.groupId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.groupName||e.groupId}),(0,V.jsx)(zv,{className:`block truncate`,children:e.groupId})]}),(0,V.jsx)(nk,{className:`size-4 shrink-0 text-muted`}),(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.botName||e.botId,src:e.botAvatar}),(0,V.jsx)(Lm.Fallback,{children:(e.botName||e.botId).slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(Lv,{className:`block truncate`,children:e.botName||e.botId}),(0,V.jsx)(zv,{className:`block truncate`,children:t?e.botId:`Bot ${e.botId}`})]})]}),gF=e=>`${e.groupId}:${e.botId}`,_F=e=>{let[t,n,r]=e.split(`:`);return!t||!n||r!==void 0?null:{groupId:t,botId:n}},vF=e=>{let t=new Set,n=[];return e.forEach(e=>{let r=_F(e);if(!r)return;let i=gF(r);t.has(i)||(t.add(i),n.push(i))}),n},yF=({device:e,mappings:t,onEdit:n,onRemove:r})=>(0,V.jsxs)(`div`,{className:e===`mobile`?`flex min-h-0 min-w-0 flex-1 flex-col gap-4`:`flex min-w-0 flex-col gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Lv,{children:`已配置目标`}),(0,V.jsxs)(zv,{children:[t.length,` 个推送目标`]})]}),t.length>0?(0,V.jsx)(`div`,{className:e===`mobile`?`flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto pb-2`:`flex max-h-72 flex-col gap-2 overflow-y-auto`,children:t.map(t=>{let i=gF(t);return(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 rounded-lg border border-default-200 bg-default-50/50 p-2.5`,children:[(0,V.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,V.jsx)(hF,{compact:!0,mapping:t,stacked:e===`mobile`})}),(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":`编辑推送目标`,size:`sm`,variant:`tertiary`,onPress:()=>n(i),children:(0,V.jsx)(uk,{className:`size-4`})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),`编辑`]})]}),(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":`删除推送目标`,size:`sm`,variant:`danger`,onPress:()=>r(i),children:(0,V.jsx)(mk,{className:`size-4`})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`top`,children:[(0,V.jsx)(Dv.Arrow,{}),`删除`]})]})]},i)})}):(0,V.jsx)(`div`,{className:`rounded-lg border border-dashed border-default-300 px-4 py-5 text-sm text-muted`,children:`还没有推送目标,点击上方按钮添加。`})]}),bF=({label:e,description:t,placeholder:n,disabled:r=!1,items:i,selectedId:a,onSelect:o})=>(0,V.jsxs)(ny,{fullWidth:!0,allowsEmptyCollection:!0,isDisabled:r,placeholder:n,value:a||null,variant:`secondary`,onChange:e=>o(String(e||``)),children:[(0,V.jsx)(Lv,{children:e}),(0,V.jsxs)(ny.Trigger,{children:[(0,V.jsx)(ny.Value,{children:({defaultChildren:e,isPlaceholder:t,state:n})=>{if(t||n.selectedItems.length===0)return e;let r=i.find(e=>e.id===n.selectedItems[0]?.key);return r?(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:r.name,src:r.avatar}),(0,V.jsx)(Lm.Fallback,{children:r.name.slice(0,1)})]}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block truncate`,children:r.name}),(0,V.jsx)(`span`,{className:`block truncate text-xs text-muted`,children:r.description})]})]}):e}}),(0,V.jsx)(ny.Indicator,{})]}),(0,V.jsx)(zv,{children:t}),!r&&i.length===0?(0,V.jsx)(zv,{className:`text-warning`,children:`当前没有可选项`}):null,(0,V.jsx)(ny.Popover,{className:`max-h-72`,children:(0,V.jsx)(Xv,{items:i,children:e=>(0,V.jsxs)(Xv.Item,{id:e.id,textValue:`${e.name} ${e.description}`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,V.jsxs)(Lm,{size:`sm`,children:[(0,V.jsx)(Lm.Image,{alt:e.name,src:e.avatar}),(0,V.jsx)(Lm.Fallback,{children:e.name.slice(0,1)})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Lv,{className:`truncate`,children:e.name}),(0,V.jsx)(zv,{className:`truncate`,children:e.description})]})]}),(0,V.jsx)(Xv.ItemIndicator,{})]})})})]}),xF=({isOpen:e,device:t,initialMapping:n,onOpenChange:r,onConfirm:i})=>{let[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(n?.botId||``),[d,f]=(0,v.useState)(n?.groupId||``),[p,m]=(0,v.useState)(!0),[h,g]=(0,v.useState)(!!n?.botId),[_,y]=(0,v.useState)(``);(0,v.useEffect)(()=>{e&&(u(n?.botId||``),f(n?.groupId||``),c([]),o([]),m(!0),g(!!n?.botId),y(``))},[e,n?.botId,n?.groupId]);let b=(0,v.useMemo)(()=>a.find(e=>e.id===l),[a,l]),x=(0,v.useMemo)(()=>s.find(e=>e.id===d),[s,d]),S=(0,v.useMemo)(()=>a.map(e=>({id:e.id,name:e.name,avatar:e.avatar,description:e.id})),[a]),C=(0,v.useMemo)(()=>s.map(e=>({id:e.id,name:e.name,avatar:e.avatar,description:e.id})),[s]),w=!!(l&&d);(0,v.useEffect)(()=>{e&&fF().then(o).catch(e=>{y(e instanceof Error?e.message:`获取 Bot 列表失败`)}).finally(()=>m(!1))},[e]),(0,v.useEffect)(()=>{!e||!l||pF(l).then(e=>{c(e),f(t=>e.some(e=>e.id===t)?t:``)}).catch(e=>{y(e instanceof Error?e.message:`获取群列表失败`)}).finally(()=>g(!1))},[e,l]);let T=()=>{if(!w||!b||!x)return;let e={groupId:x.id,botId:b.id};x.name&&(e.groupName=x.name),x.avatar&&(e.groupAvatar=x.avatar),b.name&&(e.botName=b.name),b.avatar&&(e.botAvatar=b.avatar),b.isOnline!==void 0&&(e.isOnline=b.isOnline),i(e)},E=t===`desktop`?`right`:`bottom`,D=n?`编辑推送目标`:`添加推送目标`;return(0,V.jsx)(Vh.Backdrop,{isOpen:e,onOpenChange:r,children:(0,V.jsx)(Vh.Content,{placement:E,children:(0,V.jsxs)(Vh.Dialog,{className:t===`desktop`?`h-full w-105 max-w-[90vw]`:`max-h-[78dvh]`,children:[(0,V.jsx)(Vh.Handle,{}),(0,V.jsx)(Vh.CloseTrigger,{}),(0,V.jsxs)(Vh.Header,{children:[(0,V.jsx)(Vh.Heading,{children:D}),(0,V.jsx)(zv,{children:`先选择 Bot,再选择该 Bot 加入的群。`})]}),(0,V.jsxs)(Vh.Body,{className:`flex flex-col gap-4`,children:[(0,V.jsx)(bF,{description:`Karin 当前已注册且在线的 Bot。`,disabled:p,items:S,label:`机器人账号`,placeholder:`选择机器人账号`,selectedId:l,onSelect:e=>{y(``),c([]),g(!!e),u(e),f(``)}}),(0,V.jsx)(bF,{description:l?`当前 Bot 已加入的群。`:`请先选择机器人账号。`,disabled:!l||h,items:C,label:`推送群`,placeholder:`选择推送群`,selectedId:d,onSelect:f}),p||h?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在读取列表`}),(0,V.jsx)(`span`,{children:`正在读取列表`})]}):null,b&&x?(0,V.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-default-200 bg-default-50/60 p-3`,children:[(0,V.jsx)(Lv,{children:`将写入`}),(0,V.jsxs)(zv,{className:`mt-1`,children:[x.name,`(`,x.id,`) -> `,b.name,`(`,b.id,`)`]})]}):null,_?(0,V.jsx)(zv,{className:`text-danger`,children:_}):null]}),(0,V.jsxs)(Vh.Footer,{children:[(0,V.jsx)(Hm,{size:t===`mobile`?`sm`:`md`,slot:`close`,variant:`secondary`,children:`取消`}),(0,V.jsx)(Hm,{size:t===`mobile`?`sm`:`md`,slot:`close`,isDisabled:!w,onPress:T,children:n?`保存`:`添加`})]})]})})})},SF=(e,t,n)=>{let r=vF(e);return{values:r,mappings:r.map(e=>{let r=_F(e),i=n[e]||t.find(t=>gF(t)===e);if(!r)return null;let a={groupId:r.groupId,botId:r.botId};return i?.groupName&&(a.groupName=i.groupName),i?.groupAvatar&&(a.groupAvatar=i.groupAvatar),i?.botName&&(a.botName=i.botName),i?.botAvatar&&(a.botAvatar=i.botAvatar),i?.isOnline!==void 0&&(a.isOnline=i.isOnline),a}).filter(e=>!!e)}},CF=({isOpen:e,values:t,mappings:n,device:r,onOpenChange:i,onApply:a})=>{let[o,s]=(0,v.useState)(()=>vF(t)),[c,l]=(0,v.useState)({}),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!1),m=(0,v.useMemo)(()=>SF(o,n,c),[o,c,n]),h=r===`desktop`?`right`:`bottom`,g=u?_F(u):null,_=e=>{d(e),p(!0)};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Vh.Backdrop,{isOpen:e,onOpenChange:e=>{e||a(m.values),i(e)},variant:`blur`,children:(0,V.jsx)(Vh.Content,{placement:h,children:(0,V.jsxs)(Vh.Dialog,{className:r===`desktop`?`h-full w-130 max-w-[90vw]`:`max-h-[84dvh]`,children:[(0,V.jsx)(Vh.Handle,{}),(0,V.jsx)(Vh.CloseTrigger,{}),(0,V.jsxs)(Vh.Header,{children:[(0,V.jsx)(Vh.Heading,{children:`推送目标`}),(0,V.jsx)(zv,{children:`管理所有接收推送的群和 Bot 映射。`})]}),(0,V.jsxs)(Vh.Body,{className:`flex min-h-0 flex-col gap-3`,children:[(0,V.jsxs)(Hm,{className:`self-start`,size:r===`mobile`?`sm`:`md`,onPress:()=>_(null),children:[(0,V.jsx)(dk,{className:`size-4`}),`添加推送目标`]}),(0,V.jsx)(yF,{device:r,mappings:m.mappings,onEdit:e=>_(e),onRemove:e=>{s(t=>t.filter(t=>t!==e)),l(t=>{let n={...t};return delete n[e],n})}})]}),(0,V.jsxs)(Vh.Footer,{children:[(0,V.jsx)(Hm,{size:r===`mobile`?`sm`:`md`,slot:`close`,variant:`secondary`,children:`取消`}),(0,V.jsx)(Hm,{size:r===`mobile`?`sm`:`md`,slot:`close`,onPress:()=>{a(m.values)},children:`完成`})]})]})})}),(0,V.jsx)(xF,{device:r,initialMapping:g,isOpen:f,onConfirm:e=>{let t=gF(e),n=[...o],r=u?n.indexOf(u):-1;r>=0?n[r]=t:n.unshift(t),s(vF(n)),l(n=>{let r={...n,[t]:e};return u&&u!==t&&delete r[u],r}),p(!1),d(null)},onOpenChange:p},u||`new`)]})},wF=(e,t)=>{let n=_F(e);if(!n)return null;let r={groupId:n.groupId,botId:n.botId};return t?.groupName&&(r.groupName=t.groupName),t?.groupAvatar&&(r.groupAvatar=t.groupAvatar),t?.botName&&(r.botName=t.botName),t?.botAvatar&&(r.botAvatar=t.botAvatar),t?.isOnline!==void 0&&(r.isOnline=t.isOnline),r},TF=({value:e,disabled:t,itemLabel:n,device:r,onChange:i})=>{let a=(0,v.useMemo)(()=>vF(e),[e]),o=(0,v.useMemo)(()=>e.filter(e=>!_F(e)),[e]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(!1),p=(0,v.useMemo)(()=>a.map(e=>{let t=_F(e);return wF(e,t?s.find(e=>e.groupId===t.groupId&&e.botId===t.botId):void 0)}).filter(e=>!!e),[s,a]);(0,v.useEffect)(()=>{mF(a.map(_F).filter(e=>!!e)).then(c).catch(()=>c([])).finally(()=>u(!1))},[a]);let m=e=>i(vF(e)),h=`开启【${n}】的推送开关后才能编辑此字段`,g=a.length>0?`已配置 ${a.length} 个推送目标`:`还没有配置推送目标`;return(0,V.jsx)(aF,{disabled:t,device:r,message:h,children:(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-4 rounded-lg border border-default-200 bg-default-50/50 px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,V.jsx)(Lv,{children:`推送目标`}),(0,V.jsx)(zv,{className:`mt-1`,children:g})]}),(0,V.jsxs)(Hm,{isDisabled:t,size:r===`mobile`?`sm`:`md`,variant:r===`mobile`?`primary`:`secondary`,onPress:()=>f(!0),children:[(0,V.jsx)(uk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`管理`})]})]}),l?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在读取推送目标`}),(0,V.jsx)(`span`,{children:`正在读取推送目标`})]}):null,o.length>0?(0,V.jsxs)(`div`,{className:`rounded-lg border border-warning/30 bg-warning/10 p-3 text-sm`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 font-medium text-warning`,children:[(0,V.jsx)(hk,{className:`size-4`}),(0,V.jsxs)(`span`,{children:[`发现 `,o.length,` 条旧格式或错误格式`]})]}),(0,V.jsx)(zv,{className:`mt-1`,children:`建议删除后用可视化选择重新添加,避免后端解析异常。`})]}):null,(0,V.jsx)(CF,{device:r,isOpen:d,mappings:p,values:a,onApply:m,onOpenChange:f})]})})},EF=({disabled:e,itemLabel:t,device:n,value:r,onChange:i})=>(0,V.jsx)(TF,{disabled:e,device:n,itemLabel:t,value:r,onChange:i}),DF=({disabled:e,itemLabel:t,device:n,options:r,value:i,onChange:a})=>(0,V.jsx)(aF,{disabled:e,device:n,message:`开启【${t}】的推送开关后才能编辑此字段`,children:(0,V.jsxs)(lh,{"aria-label":`推送类型`,isDisabled:e,value:i,onChange:e=>a(e),children:[(0,V.jsx)(Lv,{children:`推送类型`}),(0,V.jsx)(zv,{children:`选择要推送的内容类型`}),(0,V.jsx)(`div`,{className:`mt-2 ${oF(n)}`,children:r.map(e=>(0,V.jsxs)(hh,{value:e.value,variant:`secondary`,children:[(0,V.jsxs)(hh.Content,{children:[(0,V.jsx)(hh.Control,{children:(0,V.jsx)(hh.Indicator,{})}),e.label]}),(0,V.jsx)(zv,{children:e.description})]},e.value))})]})}),OF=({disabled:e,itemLabel:t,device:n,value:r,onChange:i})=>(0,V.jsx)(aF,{disabled:e,device:n,message:`开启【${t}】的推送开关后才能编辑此字段`,children:(0,V.jsxs)(ny,{fullWidth:!0,isDisabled:e,value:r,onChange:e=>{e&&!Array.isArray(e)&&i(e)},children:[(0,V.jsx)(Lv,{children:`过滤模式`}),(0,V.jsxs)(ny.Trigger,{children:[(0,V.jsx)(ny.Value,{}),(0,V.jsx)(ny.Indicator,{})]}),(0,V.jsx)(zv,{children:`设置关键词/标签的过滤方式`}),(0,V.jsx)(ny.Popover,{children:(0,V.jsx)(Xv,{children:lF.map(e=>(0,V.jsxs)(Xv.Item,{id:e.value,textValue:e.label,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(Lv,{children:e.label}),(0,V.jsx)(zv,{children:e.description})]}),(0,V.jsx)(Xv.ItemIndicator,{})]},e.value))})})]})}),kF=({disabled:e,itemLabel:t,device:n,keywords:r,tags:i,onKeywordsChange:a,onTagsChange:o})=>{let s=`开启【${t}】的推送开关后才能编辑此字段`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(aF,{disabled:e,device:n,message:s,children:(0,V.jsx)(`div`,{children:(0,V.jsx)(uF,{label:`关键词`,description:`多个关键词用于内容过滤`,disabled:e,items:r,onAdd:e=>a([...r,e]),onRemove:e=>a(r.filter(t=>t!==e))})})}),(0,V.jsx)(aF,{disabled:e,device:n,message:s,children:(0,V.jsx)(`div`,{children:(0,V.jsx)(uF,{label:`标签`,description:`多个标签用于内容过滤`,disabled:e,items:i,onAdd:e=>o([...i,e]),onRemove:e=>o(i.filter(t=>t!==e))})})})]})},AF=({onDelete:e})=>(0,V.jsxs)(Hm,{className:`w-full`,variant:`danger`,onPress:e,children:[(0,V.jsx)(mk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`删除此推送项`})]}),jF=({item:e,index:t,list:n,onChange:r,device:i})=>{let a=i=>{let a=[...n];a[t]={...e,...i},r(a)},o=!e.switch,s=e.remark||`UID: ${e.host_mid}`||`未命名`,c=`开启【${s}】的推送开关后才能编辑此字段`;return(0,V.jsxs)(Vo.Item,{id:`bilibili-${t}`,children:[(0,V.jsx)(Vo.Heading,{children:(0,V.jsxs)(Vo.Trigger,{children:[(0,V.jsxs)(`div`,{className:`flex flex-1 items-center gap-3`,children:[(0,V.jsx)(`div`,{onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,V.jsx)(P_,{"aria-label":`推送开关`,isSelected:e.switch,onChange:e=>a({switch:e}),children:(0,V.jsx)(P_.Content,{children:(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})})})})}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`span`,{className:`font-medium`,children:e.remark||`UID: ${e.host_mid}`||`推送项 ${t+1}`}),(0,V.jsxs)(zv,{className:`text-xs`,children:[`B站 UID: `,e.host_mid]})]})]}),(0,V.jsx)(Vo.Indicator,{children:(0,V.jsx)(rk,{className:`size-5`})})]})}),(0,V.jsx)(Vo.Panel,{children:(0,V.jsx)(Vo.Body,{children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:oF(i),children:[(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,isRequired:!0,type:`number`,value:String(e.host_mid),onChange:e=>a({host_mid:Number(e)||0}),children:[(0,V.jsx)(Lv,{children:`B站 UID`}),(0,V.jsx)(Pv,{placeholder:`UP主的 UID`}),(0,V.jsx)(zv,{children:`B站用户的唯一标识,必填`})]})}),(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,value:e.remark,onChange:e=>a({remark:e}),children:[(0,V.jsx)(Lv,{children:`备注名称`}),(0,V.jsx)(Pv,{placeholder:`可选,用于识别该推送项`}),(0,V.jsx)(zv,{children:`方便识别的名称,如:UP主昵称`})]})})]}),(0,V.jsx)(EF,{disabled:o,device:i,itemLabel:s,value:e.group_id,onChange:e=>a({group_id:e})}),(0,V.jsx)(DF,{disabled:o,device:i,itemLabel:s,options:cF,value:e.pushTypes||[],onChange:e=>a({pushTypes:e})}),(0,V.jsx)(OF,{disabled:o,device:i,itemLabel:s,value:e.filterMode||`blacklist`,onChange:e=>a({filterMode:e})}),(0,V.jsx)(kF,{disabled:o,device:i,itemLabel:s,keywords:e.Keywords||[],tags:e.Tags||[],onKeywordsChange:e=>a({Keywords:e}),onTagsChange:e=>a({Tags:e})}),(0,V.jsx)(AF,{onDelete:()=>r(n.filter((e,n)=>n!==t))})]})})})]},t)},MF=({item:e,index:t,list:n,onChange:r,device:i})=>{let a=i=>{let a=[...n];a[t]={...e,...i},r(a)},o=!e.switch,s=e.remark||e.short_id||e.sec_uid||`未命名`,c=`开启【${s}】的推送开关后才能编辑此字段`;return(0,V.jsxs)(Vo.Item,{id:`douyin-${t}`,children:[(0,V.jsx)(Vo.Heading,{children:(0,V.jsxs)(Vo.Trigger,{children:[(0,V.jsxs)(`div`,{className:`flex flex-1 items-center gap-3`,children:[(0,V.jsx)(`div`,{onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,V.jsx)(P_,{"aria-label":`推送开关`,isSelected:e.switch,onChange:e=>a({switch:e}),children:(0,V.jsx)(P_.Content,{children:(0,V.jsx)(P_.Control,{children:(0,V.jsx)(P_.Thumb,{})})})})}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`span`,{className:`font-medium`,children:e.remark||e.short_id||e.sec_uid||`推送项 ${t+1}`}),(0,V.jsxs)(zv,{className:`text-xs`,children:[e.short_id&&`抖音号: ${e.short_id}`,e.sec_uid&&!e.short_id&&`sec_uid: ${e.sec_uid.slice(0,20)}...`]})]})]}),(0,V.jsx)(Vo.Indicator,{children:(0,V.jsx)(rk,{className:`size-5`})})]})}),(0,V.jsx)(Vo.Panel,{children:(0,V.jsx)(Vo.Body,{children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:oF(i),children:[(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,isRequired:!0,value:e.short_id,onChange:e=>a({short_id:e}),children:[(0,V.jsx)(Lv,{children:`抖音号`}),(0,V.jsx)(Pv,{placeholder:`用户的抖音号`,variant:`secondary`}),(0,V.jsx)(zv,{children:`用户的抖音号(short_id),必填`})]})}),(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,value:e.sec_uid,onChange:e=>a({sec_uid:e}),children:[(0,V.jsx)(Lv,{children:`sec_uid`}),(0,V.jsx)(Pv,{placeholder:`选填,会根据抖音号自动获取`,variant:`secondary`}),(0,V.jsx)(zv,{children:`用户的 sec_uid,可从分享链接获取。选填,推送时会自动获取`})]})})]}),(0,V.jsx)(aF,{disabled:o,device:i,message:c,children:(0,V.jsxs)(Fv,{fullWidth:!0,isDisabled:o,value:e.remark,onChange:e=>a({remark:e}),children:[(0,V.jsx)(Lv,{children:`备注名称`}),(0,V.jsx)(Pv,{placeholder:`可选,用于识别该推送项`,variant:`secondary`}),(0,V.jsx)(zv,{children:`方便识别的名称,如:博主昵称`})]})}),(0,V.jsx)(EF,{disabled:o,device:i,itemLabel:s,value:e.group_id,onChange:e=>a({group_id:e})}),(0,V.jsx)(DF,{disabled:o,device:i,itemLabel:s,options:sF,value:e.pushTypes||[],onChange:e=>a({pushTypes:e})}),(0,V.jsx)(OF,{disabled:o,device:i,itemLabel:s,value:e.filterMode||`blacklist`,onChange:e=>a({filterMode:e})}),(0,V.jsx)(kF,{disabled:o,device:i,itemLabel:s,keywords:e.Keywords||[],tags:e.Tags||[],onKeywordsChange:e=>a({Keywords:e}),onTagsChange:e=>a({Tags:e})}),(0,V.jsx)(AF,{onDelete:()=>r(n.filter((e,n)=>n!==t))})]})})})]},t)},NF=()=>({switch:!0,sec_uid:``,short_id:``,group_id:[],remark:``,pushTypes:[`post`],filterMode:`blacklist`,Keywords:[],Tags:[]}),PF=()=>({switch:!0,host_mid:0,group_id:[],remark:``,pushTypes:[`video`],filterMode:`blacklist`,Keywords:[],Tags:[]}),FF=({platform:e})=>(0,V.jsx)(`div`,{className:`rounded-lg border-2 border-dashed border-gray-300 p-8 text-center`,children:(0,V.jsxs)(`p`,{className:`text-muted`,children:[`暂无`,e===`douyin`?`抖音`:`B站`,`推送项,点击上方按钮添加`]})});function IF({douyinList:e,bilibiliList:t,onDouyinChange:n,onBilibiliChange:r,device:i}){let[a,o]=(0,v.useState)(`douyin`);return(0,V.jsx)(`div`,{className:`space-y-4`,children:(0,V.jsxs)(nv,{selectedKey:a,onSelectionChange:e=>o(e),children:[(0,V.jsx)(nv.ListContainer,{children:(0,V.jsxs)(nv.List,{children:[(0,V.jsxs)(nv.Tab,{id:`douyin`,children:[(0,V.jsx)(`span`,{children:`抖音推送`}),(0,V.jsx)(nv.Indicator,{})]}),(0,V.jsxs)(nv.Tab,{id:`bilibili`,children:[(0,V.jsx)(`span`,{children:`B站推送`}),(0,V.jsx)(nv.Indicator,{})]})]})}),(0,V.jsx)(nv.Panel,{id:`douyin`,children:(0,V.jsxs)(`div`,{className:`space-y-4 pt-4`,children:[(0,V.jsxs)(Hm,{className:`w-full`,variant:`primary`,size:`sm`,onPress:()=>n([...e,NF()]),children:[(0,V.jsx)(dk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`添加抖音推送项`})]}),e.length>0?(0,V.jsx)(Vo,{variant:`surface`,"aria-label":`抖音推送列表`,children:e.map((t,r)=>(0,V.jsx)(MF,{device:i,index:r,item:t,list:e,onChange:n},r))}):(0,V.jsx)(FF,{platform:`douyin`})]})}),(0,V.jsx)(nv.Panel,{id:`bilibili`,children:(0,V.jsxs)(`div`,{className:`space-y-4 pt-4`,children:[(0,V.jsxs)(Hm,{className:`w-full`,variant:`primary`,onPress:()=>r([...t,PF()]),children:[(0,V.jsx)(dk,{className:`size-4`}),(0,V.jsx)(`span`,{children:`添加B站推送项`})]}),t.length>0?(0,V.jsx)(Vo,{variant:`surface`,"aria-label":`B站推送列表`,children:t.map((e,n)=>(0,V.jsx)(jF,{device:i,index:n,item:e,list:t,onChange:r},n))}):(0,V.jsx)(FF,{platform:`bilibili`})]})})]})})}var LF=({config:e,device:t,renderers:n,updateConfigValue:r})=>{let{renderPageHeader:i}=n;return(0,V.jsxs)(V.Fragment,{children:[i(`推送列表`,`管理「抖音」与「哔哩哔哩」的推送订阅。`),(0,V.jsx)(IF,{douyinList:e.pushlist?.douyin||[],bilibiliList:e.pushlist?.bilibili||[],onDouyinChange:e=>{r([`pushlist`,`douyin`],e)},onBilibiliChange:e=>{r([`pushlist`,`bilibili`],e)},device:t})]})},RF=({config:e,renderers:t,classes:n})=>{let{renderCheckboxGroup:r,renderPageHeader:i,renderSelectField:a,renderSubSection:o,renderSwitch:s,renderTextField:c}=t,l=Q(e,[`xiaohongshu`,`switch`],!1),u=Q(e,[`xiaohongshu`,`sendContent`],[]),d=Q(e,[`xiaohongshu`,`videoQuality`],`adapt`);return(0,V.jsxs)(V.Fragment,{children:[i(`小红书`,`小红书解析基础设置。`),(0,V.jsxs)(`div`,{className:n.topLevelFields,"data-config-section":!0,children:[s([`xiaohongshu`,`switch`],`解析开关`,`小红书解析开关,此开关为单独开关。`),r([`xiaohongshu`,`sendContent`],`解析时发送的内容`,`若什么都不选,可能不会返回任何解析结果。`,IP,!l),c([`xiaohongshu`,`numcomment`],`评论解析数量`,`小红书评论解析数量。`,{type:`number`,fallback:5,min:1,disabled:!l||!SP(u,`comment`)})]}),o(`渲染与画质设置`,(0,V.jsxs)(V.Fragment,{children:[a([`xiaohongshu`,`videoQuality`],`画质偏好`,`解析视频的分辨率偏好。`,RP,e=>e,!l),c([`xiaohongshu`,`maxAutoVideoSize`],`视频体积上限(MB)`,`根据该值自动选择分辨率进行下载。仅在「画质偏好」 为 "自动选择" 时生效。`,{type:`number`,fallback:50,min:1,max:2e4,disabled:!l||d!==`adapt`})]}))]})},zF=e=>{switch(e.activeFile){case`amagi`:return(0,V.jsx)(eF,{...e});case`app`:return(0,V.jsx)(tF,{...e});case`douyin`:return(0,V.jsx)(rF,{...e});case`bilibili`:return(0,V.jsx)(nF,{...e});case`kuaishou`:return(0,V.jsx)(iF,{...e});case`xiaohongshu`:return(0,V.jsx)(RF,{...e});case`pushlist`:return(0,V.jsx)(LF,{...e})}},BF=(e,t)=>{let n=Number(e);return Number.isFinite(n)?t.min!==void 0&&n<t.min?t.error||`${t.label} 不能小于 ${t.min}`:t.max!==void 0&&n>t.max?t.error||`${t.label} 不能大于 ${t.max}`:``:`${t.label} 必须是数字`},VF=(e,t,n)=>{if(n.disabled)return;let r=BF(Q(t,n.path,0),n);r&&(e[vP(n.path)]=r)},HF=e=>typeof e==`string`&&/.+:.+/.test(e),UF=(e,t,n)=>{if(!Array.isArray(n)){e[`pushlist.${t}`]=`${t} 推送列表必须是数组`;return}let r=n.findIndex(e=>{if(!yP(e))return!0;let n=e.group_id,r=t===`douyin`?e.short_id:e.host_mid;return r==null||String(r).trim()===``||!Array.isArray(n)||n.length===0||n.some(e=>!HF(e))});r>=0&&(e[`pushlist.${t}`]=`${t} 推送列表第 ${r+1} 项缺少必填 UID/抖音号,或 group_id 未使用「群号:机器人账号」格式`)},WF=e=>{if(!e)return{};let t={},n=Q(e,[`app`,`livePhotoMode`],`video_and_livephoto`),r=Q(e,[`amagi`,`APIServerMount`],!1),i=Q(e,[`app`,`videoSendMode`],`file`),a=Q(e,[`app`,`usegroupfile`],!1),o=Q(e,[`app`,`usefilelimit`],!1),s=Q(e,[`app`,`compress`],!1),c=Q(e,[`app`,`downloadThrottle`],!1),l=Q(e,[`app`,`downloadAutoReduce`],!1),u=Q(e,[`amagi`,`proxy`,`switch`],!1),d=Q(e,[`douyin`,`switch`],!1),f=Q(e,[`douyin`,`sendContent`],[]),p=Q(e,[`douyin`,`burnDanmaku`],!1),m=Q(e,[`douyin`,`videoQuality`],`adapt`),h=Q(e,[`douyin`,`push`,`switch`],!1),g=Q(e,[`douyin`,`push`,`pushVideoQuality`],`adapt`),_=Q(e,[`bilibili`,`switch`],!1),v=Q(e,[`bilibili`,`sendContent`],[]),y=Q(e,[`bilibili`,`burnDanmaku`],!1),b=Q(e,[`bilibili`,`videoQuality`],0),x=Q(e,[`bilibili`,`push`,`switch`],!1),S=Q(e,[`bilibili`,`push`,`parsedynamic`],!1),C=Q(e,[`bilibili`,`push`,`pushVideoQuality`],0),w=Q(e,[`kuaishou`,`switch`],!1),T=Q(e,[`kuaishou`,`comment`],!1),E=Q(e,[`xiaohongshu`,`switch`],!1),D=Q(e,[`xiaohongshu`,`sendContent`],[]),O=Q(e,[`xiaohongshu`,`videoQuality`],`adapt`);return[{path:[`app`,`renderScale`],label:`渲染精度`,min:50,max:200},{path:[`app`,`RenderWaitTime`],label:`渲染图片的等待时间`,min:0},{path:[`app`,`multiPageHeight`],label:`分页渲染时,每页的高度`,min:1e3,max:2e4,disabled:!Q(e,[`app`,`multiPageRender`],!0),error:`请输入一个范围在 1000 到 20000 之间的数字`},{path:[`amagi`,`APIServerPort`],label:`API服务端口`,min:1024,max:65535,disabled:r,error:`请输入一个范围在 1024 到 65535 之间的数字`},{path:[`app`,`groupfilevalue`],label:`群文件上传阈值`,min:1,disabled:!a||i===`base64`},{path:[`app`,`filelimit`],label:`视频拦截阈值`,min:1,disabled:!o},{path:[`app`,`compresstrigger`],label:`压缩触发阈值`,min:1,disabled:!s},{path:[`app`,`compressvalue`],label:`压缩后的值`,min:1,disabled:!s},{path:[`app`,`downloadMaxSpeed`],label:`最大下载速度`,min:1,max:1e3,disabled:!c,error:`请输入一个范围在 1 到 1000 之间的数字`},{path:[`app`,`downloadMinSpeed`],label:`最低下载速度`,min:.1,max:100,disabled:!c||!l,error:`请输入一个范围在 0.1 到 100 之间的数字`},{path:[`amagi`,`timeout`],label:`请求超时时间`,min:1e3,max:3e5,error:`请输入一个范围在 1000 到 300000 之间的数字`},{path:[`amagi`,`proxy`,`port`],label:`代理端口`,min:1,max:65535,disabled:!u,error:`请输入一个范围在 1 到 65535 之间的数字`},{path:[`douyin`,`numcomment`],label:`评论解析数量`,min:1,disabled:!d||!SP(f,`comment`)},{path:[`douyin`,`subCommentLimit`],label:`次级评论解析数量`,min:1,max:20,disabled:!d||!SP(f,`comment`)},{path:[`douyin`,`maxAutoVideoSize`],label:`视频体积上限(MB)`,min:1,max:2e4,disabled:!d||m!==`adapt`},{path:[`douyin`,`danmakuOpacity`],label:`弹幕透明度`,min:0,max:100,disabled:!d||!p},{path:[`douyin`,`push`,`pushMaxAutoVideoSize`],label:`推送视频体积上限(MB)`,min:1,max:2e4,disabled:!h||g!==`adapt`},{path:[`bilibili`,`numcomment`],label:`评论解析数量`,min:1,disabled:!_||!SP(v,`comment`)},{path:[`bilibili`,`maxAutoVideoSize`],label:`视频体积上限(MB)`,min:1,max:2e4,disabled:!_||Number(b)!==0},{path:[`bilibili`,`danmakuOpacity`],label:`弹幕透明度`,min:0,max:100,disabled:!_||!y},{path:[`bilibili`,`push`,`pushMaxAutoVideoSize`],label:`视频动态的视频体积上限(MB)`,min:1,max:2e4,disabled:!x||!S||Number(C)!==0},{path:[`kuaishou`,`numcomment`],label:`评论解析数量`,min:1,disabled:!w||!T},{path:[`xiaohongshu`,`numcomment`],label:`评论解析数量`,min:1,disabled:!E||!SP(D,`comment`)},{path:[`xiaohongshu`,`maxAutoVideoSize`],label:`视频体积上限(MB)`,min:1,max:2e4,disabled:!E||O!==`adapt`}].forEach(n=>VF(t,e,n)),n===`video_only`&&delete t[`app.livePhotoSystem`],UF(t,`douyin`,e.pushlist?.douyin||[]),UF(t,`bilibili`,e.pushlist?.bilibili||[]),t},GF=({device:e=`desktop`})=>{let t=(0,v.useRef)(null),[n,r]=_C(),i=ry(),a=n.get(`file`),[o,s]=mb({config:null,savedConfig:null,activeFile:a&&qP.some(e=>e.key===a)?a:`amagi`}),{activeFile:c,config:l,savedConfig:u}=o,d=(0,v.useMemo)(()=>$P(e),[e]),f=e===`mobile`?`sm`:`md`,{loading:p,run:m}=db(lN,{onSuccess:e=>{s({config:structuredClone(e),savedConfig:structuredClone(e)})},onError:e=>{s_.danger(`加载配置失败`,{description:e.message})}}),{loading:h,runAsync:g}=db(uN,{manual:!0}),_=(0,v.useMemo)(()=>!l||!u?!1:!(0,LC.default)(wP(l),wP(u)),[l,u]),y=(0,v.useMemo)(()=>WF(l),[l]),b=(0,v.useMemo)(()=>Object.values(y).some(Boolean),[y]),x=(0,v.useMemo)(()=>_&&!b&&!p,[_,b,p]),S=fy((e,t)=>{s(n=>n.config?{config:bP(n.config,e,t)}:null)}),C=fy(()=>{if(!l||b)return;let e=l,t=g(e).then(()=>{s({savedConfig:e})});s_.promise(t,{loading:`正在保存配置...`,success:`配置已保存`,error:e=>e instanceof Error?e.message:`保存配置失败`})}),w=fy(()=>{m()}),T=fy(e=>{r({file:e})}),E=fy(e=>{e.preventDefault(),C()});(0,v.useEffect)(()=>{let e=n.get(`file`);e&&qP.some(t=>t.key===e)&&e!==c&&s({activeFile:e})},[n,c,s]),(0,v.useEffect)(()=>{let e=t.current?.querySelector(`[data-config-tabs-scroll="true"]`);if(!e)return;let n=t=>{let n=Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY;n&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!(e.scrollWidth<=e.clientWidth)&&(e.scrollLeft+=n))};return e.addEventListener(`wheel`,n,{passive:!1}),()=>{e.removeEventListener(`wheel`,n)}},[l]);let D=fy(()=>{t.current&&GO.fromTo(t.current.querySelectorAll(`[data-config-section]`),hN,{...gN,duration:fN(.35),stagger:pN(.03)})});(0,v.useEffect)(()=>{!l||t.current?.dataset.animated===`true`||(t.current&&(t.current.dataset.animated=`true`),D())},[l,D]),py(()=>{D()},[c]);let O=(0,v.useMemo)(()=>l?XP({config:l,device:e,classes:d,validationErrors:y,updateConfigValue:S}):{},[l,e,d,y,S]);if(p||!l)return(0,V.jsxs)(`div`,{className:`${d.root} ${d.loading}`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在读取配置`}),(0,V.jsx)(`span`,{children:`正在读取配置`})]});let k=(0,V.jsx)(`div`,{className:d.floatingActions,children:(0,V.jsxs)(`div`,{className:d.actionControls,children:[(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{"aria-label":`重新读取配置`,children:(0,V.jsx)(Hm,{isIconOnly:!0,size:f,variant:`secondary`,isDisabled:p||h,onPress:w,children:(0,V.jsx)(fk,{size:16,"aria-hidden":`true`})})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`bottom`,children:[(0,V.jsx)(Dv.Arrow,{}),`重新读取`]})]}),(0,V.jsxs)(Dv,{delay:0,children:[(0,V.jsx)(Dv.Trigger,{"aria-label":`查看配置变更`,children:(0,V.jsx)(Hm,{isIconOnly:!0,size:f,variant:`secondary`,isDisabled:!_,onPress:i.open,children:(0,V.jsx)(ok,{size:16,"aria-hidden":`true`})})}),(0,V.jsxs)(Dv.Content,{showArrow:!0,placement:`bottom`,children:[(0,V.jsx)(Dv.Arrow,{}),`查看变更`]})]}),(0,V.jsxs)(Hm,{size:f,isDisabled:!x,isPending:h,onPress:C,variant:`primary`,children:[(0,V.jsx)(pk,{size:16,"aria-hidden":`true`}),(0,V.jsx)(`span`,{children:`保存`})]})]})});return(0,V.jsxs)(`div`,{ref:t,className:d.root,children:[(0,V.jsx)(AP,{device:e,original:u,current:l,isOpen:i.isOpen,onOpenChange:i.setOpen}),(0,V.jsxs)(Uv,{className:d.form,onSubmit:E,children:[(0,V.jsx)(nv,{className:`w-full min-w-0 max-w-full`,selectedKey:c,onSelectionChange:T,children:(0,V.jsx)(nv.ListContainer,{className:d.tabsListContainer,"data-config-tabs-scroll":`true`,"data-scrollbar":`none`,children:(0,V.jsx)(nv.List,{"aria-label":`配置文件选择`,className:d.tabsList,children:qP.map((e,t)=>(0,V.jsxs)(nv.Tab,{id:e.key,children:[t>0?(0,V.jsx)(nv.Separator,{}):null,(0,V.jsx)(`span`,{className:`whitespace-nowrap`,children:e.label}),(0,V.jsx)(nv.Indicator,{})]},e.key))})})}),(0,V.jsxs)(`div`,{className:`relative min-w-0 max-w-full`,children:[k,(0,V.jsx)(zF,{activeFile:c,classes:d,config:l,device:e,renderers:O,updateConfigValue:S},c)]})]})]})},KF=({onLogin:e})=>{let[t,n]=mb({authKey:``,loading:!1,error:``}),[r,{toggle:i}]=pb(!1),a=r?`隐藏密钥`:`显示密钥`,o=fy(async r=>{r.preventDefault();let i=t.authKey.trim();if(!i){n({error:`请输入 Karin HTTP 鉴权密钥`});return}try{n({loading:!0,error:``}),await oN(i),e()}catch(e){n({error:e instanceof Error?e.message:`登录失败`})}finally{n({loading:!1})}});return(0,V.jsx)(eg,{className:`flex min-h-screen items-center justify-center px-4 py-8`,children:(0,V.jsxs)(Gm,{className:`w-full max-w-105`,children:[(0,V.jsxs)(Gm.Header,{className:`gap-4 p-6`,children:[(0,V.jsx)(ck,{className:`size-8 shrink-0`,"aria-hidden":`true`}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(Gm.Title,{children:`Karin 鉴权`}),(0,V.jsx)(Gm.Description,{children:`使用 Karin HTTP 鉴权密钥登录后管理 KKK 配置。`})]})]}),(0,V.jsx)(Gm.Content,{className:`p-6`,children:(0,V.jsxs)(Uv,{className:`flex flex-col gap-6`,onSubmit:o,children:[(0,V.jsxs)(Fv,{fullWidth:!0,isInvalid:!!t.error,value:t.authKey,onChange:e=>{n({authKey:e,error:t.error?``:t.error})},children:[(0,V.jsx)(Lv,{children:`HTTP 鉴权密钥`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(Pv,{autoComplete:`current-password`,className:`min-w-0 flex-1`,placeholder:`请输入 Karin 的 HTTP_AUTH_KEY`,type:r?`text`:`password`}),(0,V.jsx)(Hm,{isIconOnly:!0,"aria-label":a,type:`button`,variant:`tertiary`,onPress:i,children:r?(0,V.jsx)(ik,{className:`size-4`,"aria-hidden":`true`}):(0,V.jsx)(ak,{className:`size-4`,"aria-hidden":`true`})})]}),(0,V.jsx)(zv,{children:t.error||`生产环境会复用 Karin 主 Web 已保存的登录凭据。`})]}),(0,V.jsx)(Hm,{fullWidth:!0,isPending:t.loading,type:`submit`,children:({isPending:e})=>(0,V.jsxs)(V.Fragment,{children:[e?(0,V.jsx)($h,{color:`current`,size:`sm`,"aria-label":`登录中`}):(0,V.jsx)(lk,{className:`size-4`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{children:`登录`})]})})]})})]})})},qF=`theme`,JF=`kkk-theme-changed`,YF=`karin-theme-change`,XF={light:`light`,dark:`dark`,system:`system`,inverse:`inverse`},ZF=e=>e===XF.system||e===XF.inverse,QF=e=>e===XF.light||e===XF.dark,$F=e=>!e||typeof e!=`object`?!1:e.type===YF,eI=()=>{let e=localStorage.getItem(qF);if(ZF(e))return e;try{let t=JSON.parse(e??``);if(ZF(t))return t}catch{}return localStorage.setItem(qF,XF.system),XF.system},tI=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches?XF.dark:XF.light,nI=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches?XF.light:XF.dark,rI=e=>e===XF.system?tI():nI(),iI=e=>aI(rI(e)),aI=e=>(document.documentElement.classList.remove(XF.light,XF.dark),document.documentElement.classList.add(e),document.documentElement.dataset.theme=e,e),oI=()=>{let[e,t]=(0,v.useState)(()=>eI()),[n,r]=(0,v.useState)(()=>rI(e)),i=(0,v.useRef)(!1),a=(0,v.useCallback)(e=>{localStorage.setItem(qF,e),t(e),r(iI(e)),window.dispatchEvent(new CustomEvent(JF,{detail:e}))},[]),o=(0,v.useCallback)(()=>{a(XF.system)},[a]),s=(0,v.useCallback)(()=>{a(XF.inverse)},[a]),c=(0,v.useCallback)(()=>{a(e===XF.system?XF.inverse:XF.system)},[a,e]);return(0,v.useEffect)(()=>{i.current?i.current=!1:r(iI(e));let n=window.matchMedia(`(prefers-color-scheme: dark)`),a=()=>{r(iI(e))},o=e=>{if(e.key!==qF||window.self!==window.top)return;let n=eI();t(n),r(iI(n))},s=e=>{let n=e.detail;ZF(n)&&(t(n),r(iI(n)))},c=e=>{if(!$F(e.data))return;let n=e.data.theme,a=ZF(n??null)?n:eI(),o=QF(e.data.appliedTheme)?e.data.appliedTheme:rI(a);i.current=!0,localStorage.setItem(qF,a),t(a),r(aI(o))};return n.addEventListener(`change`,a),window.addEventListener(`storage`,o),window.addEventListener(JF,s),window.addEventListener(`message`,c),()=>{n.removeEventListener(`change`,a),window.removeEventListener(`storage`,o),window.removeEventListener(JF,s),window.removeEventListener(`message`,c)}},[e]),{theme:e,appliedTheme:n,isDark:(0,v.useMemo)(()=>n===XF.dark,[n]),isLight:(0,v.useMemo)(()=>n===XF.light,[n]),isSystem:e===XF.system,isInverse:e===XF.inverse,setSystemTheme:o,setInverseTheme:s,toggleTheme:c}},sI=()=>document.documentElement.clientWidth||window.innerWidth,cI=(e=sI())=>e<=768?`mobile`:`desktop`,lI=()=>{let e=navigator.userAgent.toLowerCase();return[`android`,`webos`,`iphone`,`ipad`,`ipod`,`blackberry`,`windows phone`,`mobile`].some(t=>e.includes(t))},uI=()=>{let e=cI();return lI()||e===`mobile`?`mobile`:`desktop`},dI=()=>vb(()=>import(`./DesktopLayout-Dg2zhXab.js`),__vite__mapDeps([2,1,3])),fI=()=>vb(()=>import(`./MobileLayout-Bm9iTFi2.js`),__vite__mapDeps([4,3])),pI={config:`/kkk/assets/config`,about:`/kkk/assets/about`},mI={"/kkk/assets/config":`config`,"/kkk/assets/about":`about`},hI=({device:e})=>(0,V.jsxs)(eg,{className:`h-screen overflow-hidden bg-background`,children:[(0,V.jsx)(x_.Provider,{placement:`top`}),(0,V.jsx)(Jh,{hideScrollBar:!0,className:`h-full px-3 py-3 sm:px-5 sm:py-4 ${e===`mobile`?`data-[top-scroll=true]:mask-none data-[top-scroll=true]:[-webkit-mask-image:none] data-[top-bottom-scroll=true]:mask-[linear-gradient(180deg,black_calc(100%-var(--scroll-shadow-size)),transparent)] data-[top-bottom-scroll=true]:[-webkit-mask-image:linear-gradient(180deg,black_calc(100%-var(--scroll-shadow-size)),transparent)]`:``}`,size:56,children:(0,V.jsx)(GF,{device:e})})]}),gI=({LayoutComponent:e})=>{let t=Vx(),n=Wx(),r=mI[t.pathname]||`config`,i=fy(e=>{n(pI[e])});return e?(0,V.jsxs)(`div`,{children:[(0,V.jsx)(x_.Provider,{placement:`top`}),(0,V.jsx)(e,{activeMenu:r,onMenuChange:i})]}):(0,V.jsxs)(eg,{className:`flex min-h-screen items-center justify-center gap-4`,children:[(0,V.jsx)($h,{size:`sm`,"aria-label":`正在加载布局`}),(0,V.jsx)(zv,{children:`正在加载`})]})},_I=()=>{oI();let[e,t]=mb({authenticated:NC(),device:uI(),LayoutComponent:null}),{authenticated:n,device:r,LayoutComponent:i}=e;(0,v.useEffect)(()=>{let e=()=>{t({authenticated:NC()})};return window.addEventListener(kC,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(kC,e),window.removeEventListener(`storage`,e)}},[t]);let a=fy(()=>{let e=uI();t(t=>t.device===e?null:{device:e,LayoutComponent:null})});(0,v.useEffect)(()=>{let e=0,t=()=>{window.cancelAnimationFrame(e),e=window.requestAnimationFrame(a)};return window.addEventListener(`resize`,t),window.addEventListener(`orientationchange`,t),()=>{window.cancelAnimationFrame(e),window.removeEventListener(`resize`,t),window.removeEventListener(`orientationchange`,t)}},[a]),(0,v.useEffect)(()=>{if(!n){t({LayoutComponent:null});return}let e=!1;return(async()=>{if(r===`mobile`){let n=await fI();e||t({LayoutComponent:n.default})}else{let n=await dI();e||t({LayoutComponent:n.default})}})(),()=>{e=!0}},[n,r,t]);let o=fy(()=>{t({authenticated:!0})});return n?(0,V.jsxs)(vS,{children:[(0,V.jsx)(gS,{path:`/kkk/assets/karin-config`,element:(0,V.jsx)(hI,{device:r})}),(0,V.jsx)(gS,{path:`/kkk/assets/config`,element:(0,V.jsx)(gI,{LayoutComponent:i})}),(0,V.jsx)(gS,{path:`/kkk/assets/about`,element:(0,V.jsx)(gI,{LayoutComponent:i})}),(0,V.jsx)(gS,{path:`/kkk/assets`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})}),(0,V.jsx)(gS,{path:`/kkk`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})}),(0,V.jsx)(gS,{path:`/kkk/login`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})}),(0,V.jsx)(gS,{path:`*`,element:(0,V.jsx)(hS,{to:`/kkk/assets/config`,replace:!0})})]}):(0,V.jsxs)(vS,{children:[(0,V.jsx)(gS,{path:`/kkk/login`,element:(0,V.jsx)(KF,{onLogin:o})}),(0,V.jsx)(gS,{path:`*`,element:(0,V.jsx)(hS,{to:`/kkk/login`,replace:!0})})]})};(0,y.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(v.StrictMode,{children:(0,V.jsx)(()=>(0,V.jsx)(sC,{children:(0,V.jsx)(_I,{})}),{})}));export{Wa as $,yf as A,De as At,cl as B,Gm as C,et as Ct,Fp as D,Fe as Dt,Rp as E,ze as Et,xu as F,O as Ft,Y as G,qs as H,bu as I,h as It,oo as J,J as K,_u as L,d as Lt,uf as M,L as Mt,lf as N,E as Nt,Ef as O,R as Ot,Su as P,M as Pt,$a as Q,hu as R,l as Rt,Ym as S,nt as St,Lm as T,z as Tt,Fo as U,al as V,Io as W,q as X,so as Y,eo as Z,Wh as _,Kt as _t,IC as a,Mi as at,bh as b,xt as bt,ny as c,G as ct,Lv as d,Ti as dt,Ma as et,Fv as f,Si as ft,eg as g,Xt as gt,nv as h,$t as ht,GO as i,Gi as it,df as j,we as jt,vf as k,ke as kt,Xv as l,wi as lt,Dv as m,Gr as mt,GF as n,Yi as nt,pb as o,bi as ot,Pv as p,Ur as pt,po as q,tk as r,Xi as rt,fy as s,Ci as st,oI as t,Ea as tt,zv as u,K as ut,Vh as v,Jt as vt,Hm as w,B as wt,Sh as x,it as xt,Ch as y,Et as yt,pu as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,I as t,ft as n,gt as r,mt as i}from"./index-
|
|
1
|
+
import{F as e,I as t,ft as n,gt as r,mt as i}from"./index-sIuuHdZD.js";var a=i({base:`separator`,defaultVariants:{orientation:`horizontal`,variant:`default`},variants:{orientation:{horizontal:`separator--horizontal`,vertical:`separator--vertical`},variant:{default:`separator--default`,secondary:`separator--secondary`,tertiary:`separator--tertiary`}}}),o=r(),s=({className:r,orientation:i,variant:s,...c})=>{let l=n(t),u=i??l?.orientation??`horizontal`;return(0,o.jsx)(e,{"data-orientation":u,"data-slot":`separator`,orientation:u,className:a({orientation:u,variant:s,className:r}),...c})},c=Object.assign(s,{Root:s});export{c as t};
|
package/lib/web/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<meta name="description" content="KKK Config - Karin 插件配置管理面板" />
|
|
8
8
|
<title>KKK Config</title>
|
|
9
|
-
<script type="module" crossorigin src="/kkk/assets/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/kkk/assets/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/kkk/assets/assets/index-sIuuHdZD.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/kkk/assets/assets/index-DfwUwUnH.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
package/lib/web.config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as webConfig } from "./core_chunk/main.js";
|
|
2
2
|
export { webConfig as default, webConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "karin-plugin-kkk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.0",
|
|
4
4
|
"description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"karin",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"web": "./lib/web.config.js",
|
|
90
90
|
"ts-web": "./src/web.config.ts"
|
|
91
91
|
},
|
|
92
|
-
"timestamp": "2026-07-
|
|
92
|
+
"timestamp": "2026-07-18T20:29:34.500Z"
|
|
93
93
|
}
|