321 lines
416 KiB
JavaScript
321 lines
416 KiB
JavaScript
|
|
var th=Object.defineProperty;var nh=(e,t,n)=>t in e?th(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Tu=(e,t,n)=>nh(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))u(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&u(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function u(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var ot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T0={exports:{}},ei={},R0={exports:{}},H={};/**
|
|||
|
|
* @license React
|
|||
|
|
* react.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var zr=Symbol.for("react.element"),rh=Symbol.for("react.portal"),oh=Symbol.for("react.fragment"),ih=Symbol.for("react.strict_mode"),lh=Symbol.for("react.profiler"),ah=Symbol.for("react.provider"),sh=Symbol.for("react.context"),ch=Symbol.for("react.forward_ref"),dh=Symbol.for("react.suspense"),fh=Symbol.for("react.memo"),ph=Symbol.for("react.lazy"),Rs=Symbol.iterator;function hh(e){return e===null||typeof e!="object"?null:(e=Rs&&e[Rs]||e["@@iterator"],typeof e=="function"?e:null)}var P0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M0=Object.assign,L0={};function vu(e,t,n){this.props=e,this.context=t,this.refs=L0,this.updater=n||P0}vu.prototype.isReactComponent={};vu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};vu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function I0(){}I0.prototype=vu.prototype;function xa(e,t,n){this.props=e,this.context=t,this.refs=L0,this.updater=n||P0}var va=xa.prototype=new I0;va.constructor=xa;M0(va,vu.prototype);va.isPureReactComponent=!0;var Ps=Array.isArray,O0=Object.prototype.hasOwnProperty,ya={current:null},$0={key:!0,ref:!0,__self:!0,__source:!0};function B0(e,t,n){var u,r={},o=null,i=null;if(t!=null)for(u in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)O0.call(t,u)&&!$0.hasOwnProperty(u)&&(r[u]=t[u]);var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){for(var a=Array(l),s=0;s<l;s++)a[s]=arguments[s+2];r.children=a}if(e&&e.defaultProps)for(u in l=e.defaultProps,l)r[u]===void 0&&(r[u]=l[u]);return{$$typeof:zr,type:e,key:o,ref:i,props:r,_owner:ya.current}}function mh(e,t){return{$$typeof:zr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ba(e){return typeof e=="object"&&e!==null&&e.$$typeof===zr}function gh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ms=/\/+/g;function Si(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gh(""+e.key):t.toString(36)}function ao(e,t,n,u,r){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case zr:case rh:i=!0}}if(i)return i=e,r=r(i),e=u===""?"."+Si(i,0):u,Ps(r)?(n="",e!=null&&(n=e.replace(Ms,"$&/")+"/"),ao(r,t,n,"",function(s){return s})):r!=null&&(ba(r)&&(r=mh(r,n+(!r.key||i&&i.key===r.key?"":(""+r.key).replace(Ms,"$&/")+"/")+e)),t.push(r)),1;if(i=0,u=u===""?".":u+":",Ps(e))for(var l=0;l<e.length;l++){o=e[l];var a=u+Si(o,l);i+=ao(o,t,n,a,r)}else if(a=hh(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=u+Si(o,l++),i+=ao(o,t,n,a,r);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Br(e,t,n){if(e==null)return e;var u=[],r=0;return ao(e,u,"","",function(o){return t.call(n,o,r++)}),u}function xh(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Pe={current:null},so={transition:null},vh={ReactCurrentDispatcher:Pe,ReactCurrentBatchConfig:so,ReactCurrentOwner:ya};function U0(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Br,forEach:function(e,t,n){Br(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Br(e,function(){t++}),t},toArray:function(e){return Br(e,function(t){return t})||[]},only:function(e){if(!ba(e))throw Error("React.Children.only expected to receive a sing
|
|||
|
|
* @license React
|
|||
|
|
* react-jsx-runtime.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var yh=k,bh=Symbol.for("react.element"),kh=Symbol.for("react.fragment"),wh=Object.prototype.hasOwnProperty,_h=yh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ch={key:!0,ref:!0,__self:!0,__source:!0};function H0(e,t,n){var u,r={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(u in t)wh.call(t,u)&&!Ch.hasOwnProperty(u)&&(r[u]=t[u]);if(e&&e.defaultProps)for(u in t=e.defaultProps,t)r[u]===void 0&&(r[u]=t[u]);return{$$typeof:bh,type:e,key:o,ref:i,props:r,_owner:_h.current}}ei.Fragment=kh;ei.jsx=H0;ei.jsxs=H0;T0.exports=ei;var c=T0.exports,fl={},V0={exports:{}},Ye={},q0={exports:{}},W0={};/**
|
|||
|
|
* @license React
|
|||
|
|
* scheduler.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/(function(e){function t(F,P){var z=F.length;F.push(P);e:for(;0<z;){var T=z-1>>>1,O=F[T];if(0<r(O,P))F[T]=P,F[z]=O,z=T;else break e}}function n(F){return F.length===0?null:F[0]}function u(F){if(F.length===0)return null;var P=F[0],z=F.pop();if(z!==P){F[0]=z;e:for(var T=0,O=F.length,wt=O>>>1;T<wt;){var re=2*(T+1)-1,Le=F[re],je=re+1,Ve=F[je];if(0>r(Le,z))je<O&&0>r(Ve,Le)?(F[T]=Ve,F[je]=z,T=je):(F[T]=Le,F[re]=z,T=re);else if(je<O&&0>r(Ve,z))F[T]=Ve,F[je]=z,T=je;else break e}}return P}function r(F,P){var z=F.sortIndex-P.sortIndex;return z!==0?z:F.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var a=[],s=[],d=1,h=null,m=3,v=!1,x=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(F){for(var P=n(s);P!==null;){if(P.callback===null)u(s);else if(P.startTime<=F)u(s),P.sortIndex=P.expirationTime,t(a,P);else break;P=n(s)}}function y(F){if(_=!1,p(F),!x)if(n(a)!==null)x=!0,Y(b);else{var P=n(s);P!==null&&W(y,P.startTime-F)}}function b(F,P){x=!1,_&&(_=!1,g(S),S=-1),v=!0;var z=m;try{for(p(P),h=n(a);h!==null&&(!(h.expirationTime>P)||F&&!I());){var T=h.callback;if(typeof T=="function"){h.callback=null,m=h.priorityLevel;var O=T(h.expirationTime<=P);P=e.unstable_now(),typeof O=="function"?h.callback=O:h===n(a)&&u(a),p(P)}else u(a);h=n(a)}if(h!==null)var wt=!0;else{var re=n(s);re!==null&&W(y,re.startTime-P),wt=!1}return wt}finally{h=null,m=z,v=!1}}var w=!1,E=null,S=-1,A=5,j=-1;function I(){return!(e.unstable_now()-j<A)}function M(){if(E!==null){var F=e.unstable_now();j=F;var P=!0;try{P=E(!0,F)}finally{P?ue():(w=!1,E=null)}}else w=!1}var ue;if(typeof f=="function")ue=function(){f(M)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,B=L.port2;L.port1.onmessage=M,ue=function(){B.postMessage(null)}}else ue=function(){C(M,0)};function Y(F){E=F,w||(w=!0,ue())}function W(F,P){S=C(function(){F(e.unstable_now())},P)}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(F){F.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,Y(b))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(F){switch(m){case 1:case 2:case 3:var P=3;break;default:P=m}var z=m;m=P;try{return F()}finally{m=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,P){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var z=m;m=F;try{return P()}finally{m=z}},e.unstable_scheduleCallback=function(F,P,z){var T=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?T+z:T):z=T,F){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=z+O,F={id:d++,callback:P,priorityLevel:F,startTime:z,expirationTime:O,sortIndex:-1},z>T?(F.sortIndex=z,t(s,F),n(a)===null&&F===n(s)&&(_?(g(S),S=-1):_=!0,W(y,z-T))):(F.sortIndex=O,t(a,F),x||v||(x=!0,Y(b))),F},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(F){var P=m;return function(){var z=m;m=P;try{return F.apply(this,arguments)}finally{m=z}}}})(W0);q0.exports=W0;var Eh=q0.exports;/**
|
|||
|
|
* @license React
|
|||
|
|
* react-dom.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Sh=k,Qe=Eh;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var K0=new Set,ir={};function Ln(e,t){su(e,t),su(e+"Capture",t)}function su(e,t){for(ir[e]=t,e=0;e<t.length;e++)K0.add(t[e])}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pl=Object.prototype.hasOwnProperty,Ah=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ls={},Is={};function zh(e){return pl.call(Is,e)?!0:pl.call(Ls,e)?!1:Ah.test(e)?Is[e]=!0:(Ls[e]=!0,!1)}function Fh(e,t,n,u){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return u?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Dh(e,t,n,u){if(t===null||typeof t>"u"||Fh(e,t,n,u))return!0;if(u)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Me(e,t,n,u,r,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=u,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Se[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Se[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Se[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Se[e]=new Me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Se[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Se[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Se[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Se[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Se[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var ka=/[\-:]([a-z])/g;function wa(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-
|
|||
|
|
`+Ai+e}var zi=!1;function Fi(e,t){if(!e||zi)return"";zi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var u=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){u=s}e.call(t.prototype)}else{try{throw Error()}catch(s){u=s}e()}}catch(s){if(s&&u&&typeof s.stack=="string"){for(var r=s.stack.split(`
|
|||
|
|
`),o=u.stack.split(`
|
|||
|
|
`),i=r.length-1,l=o.length-1;1<=i&&0<=l&&r[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(r[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||r[i]!==o[l]){var a=`
|
|||
|
|
`+r[i].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=i&&0<=l);break}}}finally{zi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ku(e):""}function jh(e){switch(e.tag){case 5:return Ku(e.type);case 16:return Ku("Lazy");case 13:return Ku("Suspense");case 19:return Ku("SuspenseList");case 0:case 2:case 15:return e=Fi(e.type,!1),e;case 11:return e=Fi(e.type.render,!1),e;case 1:return e=Fi(e.type,!0),e;default:return""}}function xl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vn:return"Fragment";case Hn:return"Portal";case hl:return"Profiler";case Ca:return"StrictMode";case ml:return"Suspense";case gl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Q0:return(e.displayName||"Context")+".Consumer";case G0:return(e._context.displayName||"Context")+".Provider";case Ea:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Sa:return t=e.displayName||null,t!==null?t:xl(e.type)||"Memo";case en:t=e._payload,e=e._init;try{return xl(e(t))}catch{}}return null}function Nh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xl(t);case 8:return t===Ca?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Y0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Th(e){var t=Y0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),u=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(i){u=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return u},setValue:function(i){u=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hr(e){e._valueTracker||(e._valueTracker=Th(e))}function J0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),u="";return e&&(u=Y0(e)?e.checked?"true":"false":e.value),e=u,e!==n?(t.setValue(e),!0):!1}function Co(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vl(e,t){var n=t.checked;return se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $s(e,t){var n=t.defaultValue==null?"":t.defaultValue,u=t.checked!=null?t.checked:t.defaultChecked;n=vn(t.value!=null?t.value:n),e._wrapperState={initialChecked:u,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function X0(e,t){t=t.checked,t!=null&&_a(e,"checked",t,!1)}function yl(e,t){X0(e,t);var n=vn(t.value),u=t.type;if(n!=null)u==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(u==="submit"||u==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bl(e,t.type,n):t.hasOwnProperty("defaultValue")&&bl(e,t.type,vn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bs(e,t,n){if(t.hasOwnProperty("val
|
|||
|
|
`).replace(H1,"")}function Yr(e,t,n){if(t=cc(t),cc(e)!==t&&n)throw Error(D(425))}function No(){}var Rl=null,Pl=null;function Ml(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ll=typeof setTimeout=="function"?setTimeout:void 0,V1=typeof clearTimeout=="function"?clearTimeout:void 0,dc=typeof Promise=="function"?Promise:void 0,q1=typeof queueMicrotask=="function"?queueMicrotask:typeof dc<"u"?function(e){return dc.resolve(null).then(e).catch(W1)}:Ll;function W1(e){setTimeout(function(){throw e})}function Ui(e,t){var n=t,u=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(u===0){e.removeChild(r),dr(t);return}u--}else n!=="$"&&n!=="$?"&&n!=="$!"||u++;n=r}while(n);dr(t)}function pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function fc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var bu=Math.random().toString(36).slice(2),At="__reactFiber$"+bu,gr="__reactProps$"+bu,Vt="__reactContainer$"+bu,Il="__reactEvents$"+bu,K1="__reactListeners$"+bu,G1="__reactHandles$"+bu;function Sn(e){var t=e[At];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vt]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fc(e);e!==null;){if(n=e[At])return n;e=fc(e)}return t}e=n,n=e.parentNode}return null}function jr(e){return e=e[At]||e[Vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function oi(e){return e[gr]||null}var Ol=[],Qn=-1;function wn(e){return{current:e}}function ne(e){0>Qn||(e.current=Ol[Qn],Ol[Qn]=null,Qn--)}function J(e,t){Qn++,Ol[Qn]=e.current,e.current=t}var yn={},De=wn(yn),$e=wn(!1),jn=yn;function cu(e,t){var n=e.type.contextTypes;if(!n)return yn;var u=e.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===t)return u.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=t[o];return u&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Be(e){return e=e.childContextTypes,e!=null}function To(){ne($e),ne(De)}function pc(e,t,n){if(De.current!==yn)throw Error(D(168));J(De,t),J($e,n)}function Bd(e,t,n){var u=e.stateNode;if(t=t.childContextTypes,typeof u.getChildContext!="function")return n;u=u.getChildContext();for(var r in u)if(!(r in t))throw Error(D(108,Nh(e)||"Unknown",r));return se({},n,u)}function Ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,jn=De.current,J(De,e),J($e,$e.current),!0}function hc(e,t,n){var u=e.stateNode;if(!u)throw Error(D(169));n?(e=Bd(e,t,jn),u.__reactInternalMemoizedMergedChildContext=e,ne($e),ne(De),J(De,e)):ne($e),J($e,n)}var Ot=null,ii=!1,Hi=!1;function Ud(e){Ot===null?Ot=[e]:Ot.push(e)}function Q1(e){ii=!0,Ud(e)}function _n(){if(!Hi&&Ot!==null){Hi=!0;var e=0,t=Z;try{var n=Ot;for(Z=1;e<n.length;e++){var u=n[e];do u=u(!0);while(u!==null)}Ot=null,ii=!1}catch(r){throw Ot!==null&&(Ot=Ot.slice(e+1)),pd(za,_n),r}finally{Z=t,Hi=!1}}return null}var Zn=[],Yn=0,Po=null,Mo=0,tt=[],nt=0,Nn=null,$t=1,Bt="";function Cn(e,t){Zn[Yn++]=Mo,Zn[Yn++]=Po,Po=e,Mo=t}function Hd(e,t,n){tt[nt++]=$t,tt[nt++]=Bt,tt[nt++]=Nn,Nn=e;var u=$t;e=Bt;var r=32-ht(u)-1;u&=~(1<<r),n+=1;var o=32-ht(t)+r;if(30<o){var i=r-r%5;o=(u&(1<<i)-1).toString(32),u>>=i,r-=i,$t=1<<32-ht(t)+r|n<<r|u,Bt=o+e}else $t=1<<o|n<<r|u,Bt=e}function La(e){e.return!==null&&(Cn(e,1),Hd(e,1,0))}function Ia(e){for(;e===Po;)Po=Zn[--Yn],Zn[Yn]=null,Mo=Zn[--Yn],Zn[Yn]=null;for(;e===Nn;)Nn=tt[--nt],tt[nt]=null,Bt=tt[--nt],tt[nt]=null,$t=tt[--nt],tt[nt]=null}var Ge=null,Ke=null,oe=!1,pt=null;function Vd(e,t){var n=ut(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===nul
|
|||
|
|
Error generating stack: `+o.message+`
|
|||
|
|
`+o.stack}return{value:e,source:t,stack:r,digest:null}}function Gi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ql(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var rm=typeof WeakMap=="function"?WeakMap:Map;function vf(e,t,n){n=Ut(-1,n),n.tag=3,n.payload={element:null};var u=t.value;return n.callback=function(){Vo||(Vo=!0,ta=u),ql(e,t)},n}function yf(e,t,n){n=Ut(-1,n),n.tag=3;var u=e.type.getDerivedStateFromError;if(typeof u=="function"){var r=t.value;n.payload=function(){return u(r)},n.callback=function(){ql(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ql(e,t),typeof u!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Cc(e,t,n){var u=e.pingCache;if(u===null){u=e.pingCache=new rm;var r=new Set;u.set(t,r)}else r=u.get(t),r===void 0&&(r=new Set,u.set(t,r));r.has(n)||(r.add(n),e=vm.bind(null,e,t,n),t.then(e,e))}function Ec(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sc(e,t,n,u,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ut(-1,1),t.tag=2,hn(n,t,1))),n.lanes|=1),e)}var om=Gt.ReactCurrentOwner,Oe=!1;function Te(e,t,n,u){t.child=e===null?Kd(t,null,n,u):fu(t,e.child,n,u)}function Ac(e,t,n,u,r){n=n.render;var o=t.ref;return ou(t,r),u=Qa(e,t,n,u,o,r),n=Za(),e!==null&&!Oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wt(e,t,r)):(oe&&n&&La(t),t.flags|=1,Te(e,t,u,r),t.child)}function zc(e,t,n,u,r){if(e===null){var o=n.type;return typeof o=="function"&&!is(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,bf(e,t,o,u,r)):(e=bo(n.type,null,u,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&r)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:pr,n(i,u)&&e.ref===t.ref)return Wt(e,t,r)}return t.flags|=1,e=xn(o,u),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,n,u,r){if(e!==null){var o=e.memoizedProps;if(pr(o,u)&&e.ref===t.ref)if(Oe=!1,t.pendingProps=u=o,(e.lanes&r)!==0)e.flags&131072&&(Oe=!0);else return t.lanes=e.lanes,Wt(e,t,r)}return Wl(e,t,n,u,r)}function kf(e,t,n){var u=t.pendingProps,r=u.children,o=e!==null?e.memoizedState:null;if(u.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(eu,We),We|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(eu,We),We|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=o!==null?o.baseLanes:n,J(eu,We),We|=u}else o!==null?(u=o.baseLanes|n,t.memoizedState=null):u=n,J(eu,We),We|=u;return Te(e,t,r,n),t.child}function wf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wl(e,t,n,u,r){var o=Be(n)?jn:De.current;return o=cu(t,o),ou(t,r),n=Qa(e,t,n,u,o,r),u=Za(),e!==null&&!Oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wt(e,t,r)):(oe&&u&&La(t),t.flags|=1,Te(e,t,n,r),t.child)}function Fc(e,t,n,u,r){if(Be(n)){var o=!0;Ro(t)}else o=!1;if(ou(t,r),t.stateNode===null)xo(e,t),xf(t,n,u),Vl(t,n,u,r),u=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var a=i.context,s=n.contextType;typeof s=="object"&&s!==null?s=it(s):(s=Be(n)?jn:De.current,s=cu(t,s));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==u||a!==s)&&_c(t,i,u,s),tn=!1;var m=t.memoizedState;i.state=m,Oo(t,u,i,r),a=t.memoizedState,l!==u||m!==a||$e.current||tn?(typeof d=="function"&&(Hl(t,n,d,u),a=t.memoizedState),(l=tn||wc(t,n,l,u,m,a,s))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.comp
|
|||
|
|
* react-router v7.15.0
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Remix Software Inc.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE.md file in the root directory of this source tree.
|
|||
|
|
*
|
|||
|
|
* @license MIT
|
|||
|
|
*/var Hc="popstate";function Vc(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Dm(e={}){function t(u,r){var s;let o=(s=r.state)==null?void 0:s.masked,{pathname:i,search:l,hash:a}=o||u.location;return oa("",{pathname:i,search:l,hash:a},r.state&&r.state.usr||null,r.state&&r.state.key||"default",o?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function n(u,r){return typeof r=="string"?r:_r(r)}return Nm(t,n,null,e)}function ie(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function vt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jm(){return Math.random().toString(36).substring(2,10)}function qc(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function oa(e,t,n=null,u,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ku(t):t,state:n,key:t&&t.key||u||jm(),mask:r}}function _r({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ku(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let u=e.indexOf("?");u>=0&&(t.search=e.substring(u),e=e.substring(0,u)),e&&(t.pathname=e)}return t}function Nm(e,t,n,u={}){let{window:r=document.defaultView,v5Compat:o=!1}=u,i=r.history,l="POP",a=null,s=d();s==null&&(s=0,i.replaceState({...i.state,idx:s},""));function d(){return(i.state||{idx:null}).idx}function h(){l="POP";let C=d(),g=C==null?null:C-s;s=C,a&&a({action:l,location:_.location,delta:g})}function m(C,g){l="PUSH";let f=Vc(C)?C:oa(_.location,C,g);s=d()+1;let p=qc(f,s),y=_.createHref(f.mask||f);try{i.pushState(p,"",y)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;r.location.assign(y)}o&&a&&a({action:l,location:_.location,delta:1})}function v(C,g){l="REPLACE";let f=Vc(C)?C:oa(_.location,C,g);s=d();let p=qc(f,s),y=_.createHref(f.mask||f);i.replaceState(p,"",y),o&&a&&a({action:l,location:_.location,delta:0})}function x(C){return Tm(C)}let _={get action(){return l},get location(){return e(r,i)},listen(C){if(a)throw new Error("A history only accepts one active listener");return r.addEventListener(Hc,h),a=C,()=>{r.removeEventListener(Hc,h),a=null}},createHref(C){return t(r,C)},createURL:x,encodeLocation(C){let g=x(C);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:v,go(C){return i.go(C)}};return _}function Tm(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ie(n,"No window.location.(origin|href) available to create URL");let u=typeof e=="string"?e:_r(e);return u=u.replace(/ $/,"%20"),!t&&u.startsWith("//")&&(u=n+u),new URL(u,n)}function Wf(e,t,n="/"){return Rm(e,t,n,!1)}function Rm(e,t,n,u,r){let o=typeof t=="string"?ku(t):t,i=Kt(o.pathname||"/",n);if(i==null)return null;let l=Pm(e),a=null,s=Km(i);for(let d=0;a==null&&d<l.length;++d)a=qm(l[d],s,u);return a}function Pm(e){let t=Kf(e);return Mm(t),t}function Kf(e,t=[],n=[],u="",r=!1){let o=(i,l,a=r,s)=>{let d={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(u)&&a)return;ie(d.relativePath.startsWith(u),`Absolute route path "${d.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(u.length)}let h=gt([u,d.relativePath]),m=n.concat(d);i.children&&i.children.length>0&&(ie(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Kf(i.children,t,m,h,a)),!(i.path==null&&!i.index)&&t.push({path:h,score:Hm(h,i.index),routesMeta:m})};return e.forEach((i,l)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,l);else for(let s of Gf(i.path))o(i,l,!0,s)}),t}function Gf(e){let t=e.split("/");i
|
|||
|
|
|
|||
|
|
Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let d=st(),h;if(t){let g=typeof t=="string"?ku(t):t;ie(a==="/"||((C=g.pathname)==null?void 0:C.startsWith(a)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${a}" but pathname "${g.pathname}" was given in the \`location\` prop.`),h=g}else h=d;let m=h.pathname||"/",v=m;if(a!=="/"){let g=a.replace(/^\//,"").split("/");v="/"+m.replace(/^\//,"").split("/").slice(g.length).join("/")}let x=n&&n.state.matches.length?n.state.matches.map(g=>Object.assign(g,{route:n.manifest[g.route.id]||g.route})):Wf(e,{pathname:v});vt(s||x!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),vt(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=v2(x&&x.map(g=>Object.assign({},g,{params:Object.assign({},i,g.params),pathname:gt([a,u.encodeLocation?u.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?a:gt([a,u.encodeLocation?u.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),r,n);return t&&_?k.createElement(Tr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},_):_}function h2(){let e=_2(),t=t2(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,u="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:u},o={padding:"2px 4px",backgroundColor:u},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:r},n):null,i)}var m2=k.createElement(h2,null),ip=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=c2(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(bt.Provider,{value:this.props.routeContext},k.createElement(fs.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(g2,{error:e},t):t}};ip.contextType=Xf;var Xi=new WeakMap;function g2({children:e,error:t}){let{basename:n}=k.useContext(Xe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let u=s2(t.digest);if(u){let r=Xi.get(t);if(r)throw r;let o=Yf(u.location,n);if(Zf&&!Xi.get(t))if(o.isExternal||u.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:u.replace}));throw Xi.
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const lg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pp=(...e)=>e.filter((t,n,u)=>!!t&&t.trim()!==""&&u.indexOf(t)===n).join(" ").trim();/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var ag={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const sg=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:u,className:r="",children:o,iconNode:i,...l},a)=>k.createElement("svg",{ref:a,...ag,width:t,height:t,stroke:e,strokeWidth:u?Number(n)*24/Number(t):n,className:pp("lucide",r),...l},[...i.map(([s,d])=>k.createElement(s,d)),...Array.isArray(o)?o:[o]]));/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const V=(e,t)=>{const n=k.forwardRef(({className:u,...r},o)=>k.createElement(sg,{ref:o,iconNode:t,className:pp(`lucide-${lg(e)}`,u),...r}));return n.displayName=`${e}`,n};/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const cg=V("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const dg=V("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const fg=V("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const pg=V("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Zc=V("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const tl=V("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const hg=V("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const mg=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const gg=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const hp=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const xg=V("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const vg=V("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const yg=V("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const bg=V("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const kg=V("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const la=V("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const aa=V("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Mn=V("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const wg=V("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const sa=V("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Zo=V("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Yc=V("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const _g=V("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const ca=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Cg=V("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const ys=V("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Eg=V("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const da=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Sg=V("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Jc=V("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Ag=V("TestTubeDiagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Pr=V("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const zg=V("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Fg=V("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Dg=V("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const yi=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function mp(e){var t,n,u="";if(typeof e=="string"||typeof e=="number")u+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=mp(e[t]))&&(u&&(u+=" "),u+=n)}else for(n in e)e[n]&&(u&&(u+=" "),u+=n);return u}function gp(){for(var e,t,n=0,u="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=mp(e))&&(u&&(u+=" "),u+=t);return u}const bs="-",jg=e=>{const t=Tg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:u}=e;return{getClassGroupId:i=>{const l=i.split(bs);return l[0]===""&&l.length!==1&&l.shift(),xp(l,t)||Ng(i)},getConflictingClassGroupIds:(i,l)=>{const a=n[i]||[];return l&&u[i]?[...a,...u[i]]:a}}},xp=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],u=t.nextPart.get(n),r=u?xp(e.slice(1),u):void 0;if(r)return r;if(t.validators.length===0)return;const o=e.join(bs);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId},Xc=/^\[(.+)\]$/,Ng=e=>{if(Xc.test(e)){const t=Xc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Tg=e=>{const{theme:t,prefix:n}=e,u={nextPart:new Map,validators:[]};return Pg(Object.entries(e.classGroups),n).forEach(([o,i])=>{fa(i,u,o,t)}),u},fa=(e,t,n,u)=>{e.forEach(r=>{if(typeof r=="string"){const o=r===""?t:e0(t,r);o.classGroupId=n;return}if(typeof r=="function"){if(Rg(r)){fa(r(u),t,n,u);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([o,i])=>{fa(i,e0(t,o),n,u)})})},e0=(e,t)=>{let n=e;return t.split(bs).forEach(u=>{n.nextPart.has(u)||n.nextPart.set(u,{nextPart:new Map,validators:[]}),n=n.nextPart.get(u)}),n},Rg=e=>e.isThemeGetter,Pg=(e,t)=>t?e.map(([n,u])=>{const r=u.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[n,r]}):e,Mg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,u=new Map;const r=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,u=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=u.get(o))!==void 0)return r(o,i),i},set(o,i){n.has(o)?n.set(o,i):r(o,i)}}},vp="!",Lg=e=>{const{separator:t,experimentalParseClassName:n}=e,u=t.length===1,r=t[0],o=t.length,i=l=>{const a=[];let s=0,d=0,h;for(let C=0;C<l.length;C++){let g=l[C];if(s===0){if(g===r&&(u||l.slice(C,C+o)===t)){a.push(l.slice(d,C)),d=C+o;continue}if(g==="/"){h=C;continue}}g==="["?s++:g==="]"&&s--}const m=a.length===0?l:l.substring(d),v=m.startsWith(vp),x=v?m.substring(1):m,_=h&&h>d?h-d:void 0;return{modifiers:a,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:_}};return n?l=>n({className:l,parseClassName:i}):i},Ig=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(u=>{u[0]==="["?(t.push(...n.sort(),u),n=[]):n.push(u)}),t.push(...n.sort()),t},Og=e=>({cache:Mg(e.cacheSize),parseClassName:Lg(e),...jg(e)}),$g=/\s+/,Bg=(e,t)=>{const{parseClassName:n,getClassGroupId:u,getConflictingClassGroupIds:r}=t,o=[],i=e.trim().split($g);let l="";for(let a=i.length-1;a>=0;a-=1){const s=i[a],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}=n(s);let x=!!v,_=u(x?m.substring(0,v):m);if(!_){if(!x){l=s+(l.length>0?" "+l:l);continue}if(_=u(m),!_){l=s+(l.length>0?" "+l:l);continue}x=!1}const C=Ig(d).join(":"),g=h?C+vp:C,f=g+_;if(o.includes(f))continue;o.push(f);const p=r(_,x);for(let y=0;y<p.length;++y){const b=p[y];o.push(g+b)}l=s+(l.length>0?" "+l:l)}return l};function Ug(){let e=0,t,n,u="";for(;e<arguments.length;)(t=arguments[e++])&&(n=yp(t))&&(u&&(u+=" "),u+=n);return u}const yp=e=>{if(typeof e=="string")return e;let t,n="";for(let u=0;u<e.length;u++)e[u]&&(t=yp(e[u]))&&(n&&(n+=" "),n+=t);return n};function Hg(e,...t){let n,u,r,o=i;function i(a){const s=t.reduce((d,h)=>h(d),e());return n=Og(s),u=n.cache.get,r=n.cache.set,o=l,l(a)}function l(a){const s=u(a);if(s)return s;const d=Bg(a,n);return r(a,d),d}return function(){return o(Ug.apply(null,arguments))}}const ee=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},bp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Vg=/^\
|
|||
|
|
${p.id===v?"bg-indigo-50/60 border-l-2 border-l-indigo-500":"hover:bg-zinc-50/80 border-l-2 border-l-transparent"}`,children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[p.pinned?c.jsx(Yc,{size:11,className:"text-indigo-400 flex-shrink-0"}):null,c.jsx("div",{className:`text-sm truncate flex-1 ${p.id===v?"text-indigo-700 font-medium":"text-zinc-600"}`,children:p.title}),c.jsxs("div",{className:"opacity-0 group-hover:opacity-100 flex gap-0.5 transition-opacity duration-150 flex-shrink-0",children:[c.jsx("button",{onClick:y=>C(p.id,y),className:`p-1 rounded-md transition-colors ${p.pinned?"text-indigo-400":"text-zinc-300 hover:text-zinc-500 hover:bg-zinc-100"}`,title:p.pinned?"取消置顶":"置顶",children:c.jsx(Yc,{size:12})}),c.jsx("button",{onClick:y=>g(p.id,y),className:"p-1 rounded-md text-zinc-300 hover:text-red-500 hover:bg-red-50 transition-colors",title:"删除",children:c.jsx(Pr,{size:12})})]})]}),c.jsx("div",{className:"mt-0.5",children:c.jsx("span",{className:"text-[10px] text-zinc-300",children:f(p.updated_at)})})]},p.id)),e.length===0&&c.jsxs("div",{className:"flex flex-col items-center justify-center mt-16 text-zinc-300",children:[c.jsx(Zo,{size:28,className:"mb-3 opacity-30",strokeWidth:1.5}),c.jsx("p",{className:"text-xs text-zinc-400",children:"暂无对话"}),c.jsx("p",{className:"text-[10px] mt-1 text-zinc-300",children:"点击上方「新对话」开始"})]})]}),c.jsx(_p,{open:l.open,title:l.title,description:l.description,confirmText:l.confirmText,cancelText:l.cancelText,variant:l.variant,onConfirm:s,onCancel:d})]})}const yx={success:vg,error:xg,info:wg},bx={success:"text-green-600 bg-green-50 border-green-200",error:"text-red-600 bg-red-50 border-red-200",info:"text-zinc-600 bg-zinc-50 border-zinc-200"};function kx({toasts:e,dismiss:t}){return c.jsx("div",{className:"fixed bottom-6 right-6 z-[100] flex flex-col gap-2 pointer-events-none",children:e.map(n=>c.jsx(wx,{item:n,dismiss:t},n.id))})}function wx({item:e,dismiss:t}){const n=yx[e.type],u=k.useRef(null);return k.useEffect(()=>{var r;(r=u.current)==null||r.animate([{opacity:0,transform:"translateY(8px)"},{opacity:1,transform:"translateY(0)"}],{duration:200,fill:"forwards"})},[]),c.jsxs("div",{ref:u,className:zt("pointer-events-auto flex items-center gap-2 px-3.5 py-2.5 rounded-lg border shadow-lg text-sm",bx[e.type]),children:[c.jsx(n,{size:15,className:"flex-shrink-0"}),c.jsx("span",{className:"flex-1",children:e.message}),c.jsx("button",{onClick:()=>t(e.id),className:"opacity-60 hover:opacity-100 ml-1",children:c.jsx(yi,{size:13})})]})}function _x({children:e}){const{pathname:t}=st(),n=Cu(),u=t.startsWith("/chat"),{toasts:r,dismiss:o}=ks();return k.useEffect(()=>{const i=l=>{l.key==="Escape"&&(l.target instanceof HTMLInputElement||l.target instanceof HTMLTextAreaElement||l.target instanceof HTMLSelectElement||t.startsWith("/accounts/")&&t!=="/accounts"&&n("/accounts"))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t,n]),c.jsxs("div",{className:"h-screen flex bg-white text-zinc-900 overflow-hidden",children:[c.jsx(cx,{}),u&&c.jsx(vx,{}),c.jsx("main",{className:"flex-1 flex flex-col min-w-0 bg-gradient-to-br from-zinc-50/50 to-white",children:e}),c.jsx(kx,{toasts:r,dismiss:o})]})}class Cx{constructor(){Tu(this,"ws",null);Tu(this,"handlers",new Map);Tu(this,"reconnectTimer",null);Tu(this,"intentionallyClosed",!1)}connect(){this.intentionallyClosed=!1;const n=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`;this.ws=new WebSocket(n),this.ws.onopen=()=>{this.emit("connected",{})},this.ws.onmessage=u=>{try{const{type:r,data:o}=JSON.parse(u.data);this.emit(r,o)}catch{}},this.ws.onclose=()=>{this.intentionallyClosed||(this.reconnectTimer=setTimeout(()=>this.connect(),3e3))}}on(t,n){this.handlers.has(t)||this.handlers.set(t,[]),this.handlers.get(t).push(n)}off(t,n){const u=this.handlers.get(t);if(u){const r=u.indexOf(n);r!==-1&&u.splice(r,1)}}send(t,n={}){var u;((u=this.ws)==null?void 0:u.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:t,
|
|||
|
|
`," "],Nx=["{","}","|","\\","^","`"].concat(jx),Tx=["'"].concat(Nx),o0=["%","/","?",";","#"].concat(Tx),i0=["/","?","#"],Rx=255,l0=/^[+a-z0-9A-Z_-]{0,63}$/,Px=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,a0={javascript:!0,"javascript:":!0},s0={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function _s(e,t){if(e&&e instanceof Yo)return e;const n=new Yo;return n.parse(e,t),n}Yo.prototype.parse=function(e,t){let n,u,r,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const s=Dx.exec(o);if(s)return this.pathname=s[1],s[2]&&(this.search=s[2]),this}let i=zx.exec(o);if(i&&(i=i[0],n=i.toLowerCase(),this.protocol=i,o=o.substr(i.length)),(t||i||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=o.substr(0,2)==="//",r&&!(i&&a0[i])&&(o=o.substr(2),this.slashes=!0)),!a0[i]&&(r||i&&!s0[i])){let s=-1;for(let x=0;x<i0.length;x++)u=o.indexOf(i0[x]),u!==-1&&(s===-1||u<s)&&(s=u);let d,h;s===-1?h=o.lastIndexOf("@"):h=o.lastIndexOf("@",s),h!==-1&&(d=o.slice(0,h),o=o.slice(h+1),this.auth=d),s=-1;for(let x=0;x<o0.length;x++)u=o.indexOf(o0[x]),u!==-1&&(s===-1||u<s)&&(s=u);s===-1&&(s=o.length),o[s-1]===":"&&s--;const m=o.slice(0,s);o=o.slice(s),this.parseHost(m),this.hostname=this.hostname||"";const v=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!v){const x=this.hostname.split(/\./);for(let _=0,C=x.length;_<C;_++){const g=x[_];if(g&&!g.match(l0)){let f="";for(let p=0,y=g.length;p<y;p++)g.charCodeAt(p)>127?f+="x":f+=g[p];if(!f.match(l0)){const p=x.slice(0,_),y=x.slice(_+1),b=g.match(Px);b&&(p.push(b[1]),y.unshift(b[2])),y.length&&(o=y.join(".")+o),this.hostname=p.join(".");break}}}}this.hostname.length>Rx&&(this.hostname=""),v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),s0[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Yo.prototype.parseHost=function(e){let t=Fx.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Mx=Object.freeze(Object.defineProperty({__proto__:null,decode:gu,encode:Mr,format:ws,parse:_s},Symbol.toStringTag,{value:"Module"})),Sp=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ap=/[\0-\x1F\x7F-\x9F]/,Lx=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Cs=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uD
|
|||
|
|
`};Tt.fence=function(e,t,n,u,r){const o=e[t],i=o.info?xu(o.info).trim():"";let l="",a="";if(i){const d=i.split(/(\s+)/g);l=d[0],a=d.slice(2).join("")}let s;if(n.highlight?s=n.highlight(o.content,l,a)||bn(o.content):s=bn(o.content),s.indexOf("<pre")===0)return s+`
|
|||
|
|
`;if(i){const d=o.attrIndex("class"),h=o.attrs?o.attrs.slice():[];d<0?h.push(["class",n.langPrefix+l]):(h[d]=h[d].slice(),h[d][1]+=" "+n.langPrefix+l);const m={attrs:h};return`<pre><code${r.renderAttrs(m)}>${s}</code></pre>
|
|||
|
|
`}return`<pre><code${r.renderAttrs(o)}>${s}</code></pre>
|
|||
|
|
`};Tt.image=function(e,t,n,u,r){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,n,u),r.renderToken(e,t,n)};Tt.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|||
|
|
`:`<br>
|
|||
|
|
`};Tt.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|||
|
|
`:`<br>
|
|||
|
|
`:`
|
|||
|
|
`};Tt.text=function(e,t){return bn(e[t].content)};Tt.html_block=function(e,t){return e[t].content};Tt.html_inline=function(e,t){return e[t].content};function Su(){this.rules=bi({},Tt)}Su.prototype.renderAttrs=function(t){let n,u,r;if(!t.attrs)return"";for(r="",n=0,u=t.attrs.length;n<u;n++)r+=" "+bn(t.attrs[n][0])+'="'+bn(t.attrs[n][1])+'"';return r};Su.prototype.renderToken=function(t,n,u){const r=t[n];let o="";if(r.hidden)return"";r.block&&r.nesting!==-1&&n&&t[n-1].hidden&&(o+=`
|
|||
|
|
`),o+=(r.nesting===-1?"</":"<")+r.tag,o+=this.renderAttrs(r),r.nesting===0&&u.xhtmlOut&&(o+=" /");let i=!1;if(r.block&&(i=!0,r.nesting===1&&n+1<t.length)){const l=t[n+1];(l.type==="inline"||l.hidden||l.nesting===-1&&l.tag===r.tag)&&(i=!1)}return o+=i?`>
|
|||
|
|
`:">",o};Su.prototype.renderInline=function(e,t,n){let u="";const r=this.rules;for(let o=0,i=e.length;o<i;o++){const l=e[o].type;typeof r[l]<"u"?u+=r[l](e,o,t,n,this):u+=this.renderToken(e,o,t)}return u};Su.prototype.renderInlineAsText=function(e,t,n){let u="";for(let r=0,o=e.length;r<o;r++)switch(e[r].type){case"text":u+=e[r].content;break;case"image":u+=this.renderInlineAsText(e[r].children,t,n);break;case"html_inline":case"html_block":u+=e[r].content;break;case"softbreak":case"hardbreak":u+=`
|
|||
|
|
`;break}return u};Su.prototype.render=function(e,t,n){let u="";const r=this.rules;for(let o=0,i=e.length;o<i;o++){const l=e[o].type;l==="inline"?u+=this.renderInline(e[o].children,t,n):typeof r[l]<"u"?u+=r[l](e,o,t,n,this):u+=this.renderToken(e,o,t,n)}return u};function He(){this.__rules__=[],this.__cache__=null}He.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};He.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(u){t.indexOf(u)<0&&t.push(u)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(u){u.enabled&&(n&&u.alt.indexOf(n)<0||e.__cache__[n].push(u.fn))})})};He.prototype.at=function(e,t,n){const u=this.__find__(e),r=n||{};if(u===-1)throw new Error("Parser rule not found: "+e);this.__rules__[u].fn=t,this.__rules__[u].alt=r.alt||[],this.__cache__=null};He.prototype.before=function(e,t,n,u){const r=this.__find__(e),o=u||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};He.prototype.after=function(e,t,n,u){const r=this.__find__(e),o=u||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};He.prototype.push=function(e,t,n){const u=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:u.alt||[]}),this.__cache__=null};He.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(u){const r=this.__find__(u);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[r].enabled=!0,n.push(u)},this),this.__cache__=null,n};He.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};He.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(u){const r=this.__find__(u);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[r].enabled=!1,n.push(u)},this),this.__cache__=null,n};He.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function kt(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}kt.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let u=0,r=n.length;u<r;u++)if(n[u][0]===t)return u;return-1};kt.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};kt.prototype.attrSet=function(t,n){const u=this.attrIndex(t),r=[t,n];u<0?this.attrPush(r):this.attrs[u]=r};kt.prototype.attrGet=function(t){const n=this.attrIndex(t);let u=null;return n>=0&&(u=this.attrs[n][1]),u};kt.prototype.attrJoin=function(t,n){const u=this.attrIndex(t);u<0?this.attrPush([t,n]):this.attrs[u][1]=this.attrs[u][1]+" "+n};function Rp(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Rp.prototype.Token=kt;const x3=/\r\n?|\n/g,v3=/\0/g;function y3(e){let t;t=e.src.replace(x3,`
|
|||
|
|
`),t=t.replace(v3,"<22>"),e.src=t}function b3(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function k3(e){const t=e.tokens;for(let n=0,u=t.length;n<u;n++){const r=t[n];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function w3(e){return/^<a[>\s]/i.test(e)}function _3(e){return/^<\/a\s*>/i.test(e)}function C3(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,u=t.length;n<u;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,o=0;for(let i=r.length-1;i>=0;i--){const l=r[i];if(l.type==="link_close"){for(i--;r[i].level!==l.level&&r[i].type!=="link_open";)i--;continue}if(l.type==="html_inline"&&(w3(l.content)&&o>0&&o--,_3(l.content)&&o++),!(o>0)&&l.type==="text"&&e.md.linkify.test(l.content)){const a=l.content;let s=e.md.linkify.match(a);const d=[];let h=l.level,m=0;s.length>0&&s[0].index===0&&i>0&&r[i-1].type==="text_special"&&(s=s.slice(1));for(let v=0;v<s.length;v++){const x=s[v].url,_=e.md.normalizeLink(x);if(!e.md.validateLink(_))continue;let C=s[v].text;s[v].schema?s[v].schema==="mailto:"&&!/^mailto:/i.test(C)?C=e.md.normalizeLinkText("mailto:"+C).replace(/^mailto:/,""):C=e.md.normalizeLinkText(C):C=e.md.normalizeLinkText("http://"+C).replace(/^http:\/\//,"");const g=s[v].index;if(g>m){const b=new e.Token("text","",0);b.content=a.slice(m,g),b.level=h,d.push(b)}const f=new e.Token("link_open","a",1);f.attrs=[["href",_]],f.level=h++,f.markup="linkify",f.info="auto",d.push(f);const p=new e.Token("text","",0);p.content=C,p.level=h,d.push(p);const y=new e.Token("link_close","a",-1);y.level=--h,y.markup="linkify",y.info="auto",d.push(y),m=s[v].lastIndex}if(m<a.length){const v=new e.Token("text","",0);v.content=a.slice(m),v.level=h,d.push(v)}t[n].children=r=Np(r,i,d)}}}}const Pp=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,E3=/\((c|tm|r)\)/i,S3=/\((c|tm|r)\)/ig,A3={c:"©",r:"®",tm:"™"};function z3(e,t){return A3[t.toLowerCase()]}function F3(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&(u.content=u.content.replace(S3,z3)),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function D3(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&Pp.test(u.content)&&(u.content=u.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function j3(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(E3.test(e.tokens[t].content)&&F3(e.tokens[t].children),Pp.test(e.tokens[t].content)&&D3(e.tokens[t].children))}const N3=/['"]/,c0=/['"]/g,d0="’";function oo(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function T3(e,t){let n;const u=[];for(let r=0;r<e.length;r++){const o=e[r],i=e[r].level;for(n=u.length-1;n>=0&&!(u[n].level<=i);n--);if(u.length=n+1,o.type!=="text")continue;let l=o.content,a=0,s=l.length;e:for(;a<s;){c0.lastIndex=a;const d=c0.exec(l);if(!d)break;let h=!0,m=!0;a=d.index+1;const v=d[0]==="'";let x=32;if(d.index-1>=0)x=l.charCodeAt(d.index-1);else for(n=r-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){x=e[n].content.charCodeAt(e[n].content.length-1);break}let _=32;if(a<s)_=l.charCodeAt(a);else for(n=r+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){_=e[n].content.charCodeAt(0);break}const C=Sr(x)||Er(String.fromCharCode(x)),g=Sr(_)||Er(String.fromCharCode(_)),f=Cr(x),p=Cr(_);if(p?h=!1:g&&(f||C||(h=!1)),f?m=!1:C&&(p||g||(m=!1)),_===34&&d[0]==='"'&&x>=48&&x<=57&&(m=h=!1),h&&m&&(h=C,m=g),!h&&!m){v&&(o.content=oo(o.content,d.index,d0));continue}if(m)for(n=u.length-1;n>=0;n--){let y=u[n];if(u[n].level<i)break;if(y.single===v&&u[n].level===i){y=u[n];let b,w;v?(b=t.md.optio
|
|||
|
|
`,o.map=[t,e.line],!0}function O3(e,t,n,u){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>o)return!1;const i=e.src.charCodeAt(r);if(i!==126&&i!==96)return!1;let l=r;r=e.skipChars(r,i);let a=r-l;if(a<3)return!1;const s=e.src.slice(l,r),d=e.src.slice(r,o);if(i===96&&d.indexOf(String.fromCharCode(i))>=0)return!1;if(u)return!0;let h=t,m=!1;for(;h++,!(h>=n||(r=l=e.bMarks[h]+e.tShift[h],o=e.eMarks[h],r<o&&e.sCount[h]<e.blkIndent));)if(e.src.charCodeAt(r)===i&&!(e.sCount[h]-e.blkIndent>=4)&&(r=e.skipChars(r,i),!(r-l<a)&&(r=e.skipSpaces(r),!(r<o)))){m=!0;break}a=e.sCount[t],e.line=h+(m?1:0);const v=e.push("fence","code",0);return v.info=d,v.content=e.getLines(t+1,h,a,!0),v.markup=s,v.map=[t,e.line],!0}function $3(e,t,n,u){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const i=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(u)return!0;const l=[],a=[],s=[],d=[],h=e.md.block.ruler.getRules("blockquote"),m=e.parentType;e.parentType="blockquote";let v=!1,x;for(x=t;x<n;x++){const p=e.sCount[x]<e.blkIndent;if(r=e.bMarks[x]+e.tShift[x],o=e.eMarks[x],r>=o)break;if(e.src.charCodeAt(r++)===62&&!p){let b=e.sCount[x]+1,w,E;e.src.charCodeAt(r)===32?(r++,b++,E=!1,w=!0):e.src.charCodeAt(r)===9?(w=!0,(e.bsCount[x]+b)%4===3?(r++,b++,E=!1):E=!0):w=!1;let S=b;for(l.push(e.bMarks[x]),e.bMarks[x]=r;r<o;){const A=e.src.charCodeAt(r);if(X(A))A===9?S+=4-(S+e.bsCount[x]+(E?1:0))%4:S++;else break;r++}v=r>=o,a.push(e.bsCount[x]),e.bsCount[x]=e.sCount[x]+1+(w?1:0),s.push(e.sCount[x]),e.sCount[x]=S-b,d.push(e.tShift[x]),e.tShift[x]=r-e.bMarks[x];continue}if(v)break;let y=!1;for(let b=0,w=h.length;b<w;b++)if(h[b](e,x,n,!0)){y=!0;break}if(y){e.lineMax=x,e.blkIndent!==0&&(l.push(e.bMarks[x]),a.push(e.bsCount[x]),d.push(e.tShift[x]),s.push(e.sCount[x]),e.sCount[x]-=e.blkIndent);break}l.push(e.bMarks[x]),a.push(e.bsCount[x]),d.push(e.tShift[x]),s.push(e.sCount[x]),e.sCount[x]=-1}const _=e.blkIndent;e.blkIndent=0;const C=e.push("blockquote_open","blockquote",1);C.markup=">";const g=[t,0];C.map=g,e.md.block.tokenize(e,t,x);const f=e.push("blockquote_close","blockquote",-1);f.markup=">",e.lineMax=i,e.parentType=m,g[1]=e.line;for(let p=0;p<d.length;p++)e.bMarks[p+t]=l[p],e.tShift[p+t]=d[p],e.sCount[p+t]=s[p],e.bsCount[p+t]=a[p];return e.blkIndent=_,!0}function B3(e,t,n,u){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(o++);if(i!==42&&i!==45&&i!==95)return!1;let l=1;for(;o<r;){const s=e.src.charCodeAt(o++);if(s!==i&&!X(s))return!1;s===i&&l++}if(l<3)return!1;if(u)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(l+1).join(String.fromCharCode(i)),!0}function p0(e,t){const n=e.eMarks[t];let u=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(u++);if(r!==42&&r!==45&&r!==43)return-1;if(u<n){const o=e.src.charCodeAt(u);if(!X(o))return-1}return u}function h0(e,t){const n=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];let r=n;if(r+1>=u)return-1;let o=e.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=u)return-1;if(o=e.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<u&&(o=e.src.charCodeAt(r),!X(o))?-1:r}function U3(e,t){const n=e.level+2;for(let u=t+2,r=e.tokens.length-2;u<r;u++)e.tokens[u].level===n&&e.tokens[u].type==="paragraph_open"&&(e.tokens[u+2].hidden=!0,e.tokens[u].hidden=!0,u+=2)}function H3(e,t,n,u){let r,o,i,l,a=t,s=!0;if(e.sCount[a]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]<e.blkIndent)return!1;let d=!1;u&&e.parentType==="paragraph"&&e.sCount[a]>=e.blkIndent&&(d=!0);let h,m,v;if((v=h0(e,a))>=0){if(h=!0,i=e.bMarks[a]+e.tShift[a],m=Number(e.src.slice(i,v-1)),d&&m!==1)return!1}else if((v=p0(e,a))>=0)h=!1;else return!1;if(d&&e.skipSpaces(v)>=e.eMarks[a])return!1;if(u)return!0;const x=e.src.charCodeAt(v-1),_=e.tokens.length;h?(l=e.push("ordered_list_open","ol",1),m!==1&&(l.attrs=[["start",m]])):l=e.push("bullet_list_open","ul",1);const C=[a,0];l.map=C,l.markup=String.fromCharCode(x);let g=!1;const f=e.md.block.ruler.getRul
|
|||
|
|
flex items-end gap-2 bg-zinc-50 rounded-2xl border transition-all duration-200 px-4 py-3
|
|||
|
|
${t?"border-zinc-200 opacity-60":"border-zinc-200 focus-within:border-indigo-300 focus-within:shadow-md focus-within:shadow-indigo-50 focus-within:bg-white"}
|
|||
|
|
`,children:[c.jsx("textarea",{ref:a,value:n,onChange:v=>u(v.target.value),onKeyDown:h,rows:1,placeholder:t?"等待回复中...":"输入消息,或按 / 查看快捷命令...",className:"flex-1 bg-transparent text-sm resize-none outline-none placeholder:text-zinc-400 text-zinc-700 min-h-[24px] max-h-[120px]",disabled:t,style:{height:"auto"},onInput:v=>{const x=v.currentTarget;x.style.height="auto",x.style.height=Math.min(x.scrollHeight,120)+"px"}}),c.jsx("button",{onClick:d,disabled:!m,className:`
|
|||
|
|
w-8 h-8 rounded-xl flex items-center justify-center transition-all flex-shrink-0
|
|||
|
|
${m?"bg-indigo-600 text-white hover:bg-indigo-700 shadow-sm":"bg-zinc-200 text-zinc-400 cursor-not-allowed"}
|
|||
|
|
`,children:c.jsx(pg,{size:16,strokeWidth:2.5})})]}),c.jsx("p",{className:"text-[10px] text-zinc-400 text-center mt-1.5",children:"美图 Agent 可能会产生错误内容,请核实重要信息"})]})]})}function gy({phase:e,progress:t,currentItem:n,totalItems:u,status:r}){const o={images:"生成图片",upload:"上传素材",videos:"生成视频",tts:"配音",assemble:"成片组装"};return c.jsxs("div",{className:"bg-gradient-to-br from-zinc-900 to-zinc-800 border border-zinc-700/50 rounded-xl p-3.5 my-2 shadow-lg shadow-zinc-900/20",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsxs("span",{className:"text-xs text-zinc-400 font-medium",children:[o[e]||e,n&&u?` (${n}/${u})`:""]}),c.jsxs("span",{className:"text-xs font-mono text-zinc-500",children:[t,"%"]})]}),c.jsx("div",{className:"w-full h-1.5 bg-zinc-700/50 rounded-full overflow-hidden",children:c.jsx("div",{className:zt("h-full rounded-full transition-all duration-700 ease-out",t<100?"bg-gradient-to-r from-blue-500 to-indigo-400":"bg-gradient-to-r from-emerald-500 to-green-400"),style:{width:`${t}%`}})}),r&&c.jsx("p",{className:"text-xs text-zinc-500 mt-1.5",children:r})]})}const w0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_0=gp,xy=(e,t)=>n=>{var u;if((t==null?void 0:t.variants)==null)return _0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:o}=t,i=Object.keys(r).map(s=>{const d=n==null?void 0:n[s],h=o==null?void 0:o[s];if(d===null)return null;const m=w0(d)||w0(h);return r[s][m]}),l=n&&Object.entries(n).reduce((s,d)=>{let[h,m]=d;return m===void 0||(s[h]=m),s},{}),a=t==null||(u=t.compoundVariants)===null||u===void 0?void 0:u.reduce((s,d)=>{let{class:h,className:m,...v}=d;return Object.entries(v).every(x=>{let[_,C]=x;return Array.isArray(C)?C.includes({...o,...l}[_]):{...o,...l}[_]===C})?[...s,h,m]:s},[]);return _0(e,i,a,n==null?void 0:n.class,n==null?void 0:n.className)},vy=xy("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),yt=k.forwardRef(({className:e,variant:t,size:n,...u},r)=>c.jsx("button",{className:zt(vy({variant:t,size:n,className:e})),ref:r,...u}));yt.displayName="Button";function C0(){const{conversationId:e}=rp(),t=Cu(),{setConversations:n,selectedAccountId:u,conversations:r}=pa(),{messages:o,connected:i,thinking:l,toolStatus:a,pipeline:s,send:d,stop:h,createConversation:m,removeMessage:v}=Ex(e||null),[x,_]=k.useState(null),[C,g]=k.useState([]),[f,p]=k.useState(null),[y,b]=k.useState(null),[w,E]=k.useState(!1),S=k.useRef(!1),A=k.useRef(null),j=k.useRef(!1);k.useEffect(()=>{fe.listAccounts().then(g).catch(()=>{})},[]),k.useEffect(()=>{fe.listConversations().then(n).catch(()=>{})},[o]),k.useEffect(()=>{const z=o.filter(T=>T.role==="tool");if(z.length>0)try{const T=JSON.parse(z[z.length-1].content);T.manifest&&_(T.manifest)}catch{}},[o]),k.useEffect(()=>{const z=A.current;z&&(j.current||(z.scrollTop=z.scrollHeight))},[o,l,s,a]),k.useEffect(()=>{const z=A.current;if(!z)return;const T=()=>{const O=z.scrollHeight-z.scrollTop-z.clientHeight<80;j.current=!O,E(!O)};return z.addEventListener("scroll",T,{passive:!0}),()=>z.removeEventListener("scroll",T)},[]),k.useEffect(()=>{j.current=!1,E(!1)},[e]),k.useEffect(()=>{if(e&&i&&y){const z=setTimeout(()=>{d(y),b(null)},30
|
|||
|
|
|
|||
|
|
${z}`,p(null)),e?d(z):W(z)},[d,f,e]),P=k.useCallback(()=>{h()},[h]);if(!e){const z=r.slice(0,5);return c.jsx("div",{className:"flex-1 flex flex-col items-center justify-center bg-gradient-to-b from-white to-zinc-50/30",children:c.jsxs("div",{className:"w-full max-w-xl px-4",children:[c.jsxs("div",{className:"text-center mb-6",children:[c.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-indigo-50 to-violet-50 flex items-center justify-center mx-auto mb-4 shadow-sm",children:c.jsx(Zo,{size:24,className:"text-indigo-400",strokeWidth:1.5})}),c.jsx("h2",{className:"text-lg font-semibold text-zinc-800",children:"开始新对话"}),c.jsx("p",{className:"text-sm text-zinc-400 mt-1",children:"输入消息开始创作,对话将自动创建"})]}),c.jsx(k0,{onSend:F,disabled:l||S.current}),C.length>0&&c.jsxs("div",{className:"flex items-center gap-2 mt-3 justify-center",children:[c.jsx("span",{className:"text-xs text-zinc-400",children:"当前账号:"}),c.jsxs("select",{value:u||"",onChange:T=>pa.getState().setSelectedAccountId(T.target.value||null),className:"h-7 rounded-lg border border-zinc-100 bg-white px-2.5 text-xs text-zinc-600 hover:border-zinc-200 transition-colors",children:[c.jsx("option",{value:"",children:"不指定"}),C.map(T=>c.jsx("option",{value:T.id,children:T.name},T.id))]})]}),z.length>0&&c.jsxs("div",{className:"mt-8 border-t border-zinc-100 pt-4",children:[c.jsx("p",{className:"text-[10px] text-zinc-400 uppercase tracking-wider mb-2",children:"最近对话"}),z.map(T=>c.jsxs("button",{onClick:()=>t(`/chat/${T.id}`),className:"w-full flex items-center gap-2 px-3 py-2 rounded-xl text-left hover:bg-zinc-50/80 transition-colors group",children:[c.jsx(Zo,{size:13,className:"text-zinc-300 flex-shrink-0"}),c.jsx("span",{className:"text-sm text-zinc-600 truncate flex-1 group-hover:text-zinc-800",children:T.title}),c.jsx("span",{className:"text-[10px] text-zinc-300 flex-shrink-0",children:new Date(T.updated_at).toLocaleDateString("zh-CN",{month:"short",day:"numeric"})})]},T.id))]})]})})}return c.jsxs("div",{className:"flex-1 flex flex-col bg-white h-full",children:[c.jsxs("div",{className:"px-4 py-2 border-b border-zinc-100 flex items-center justify-between flex-shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:`w-2 h-2 rounded-full ${i?"bg-emerald-400 shadow-sm shadow-emerald-200":"bg-red-400 animate-pulse"}`}),c.jsx("span",{className:"text-xs text-zinc-400",children:i?"在线":"连接中"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[x&&c.jsxs(yt,{size:"sm",variant:"outline",className:"h-7 text-xs rounded-lg",onClick:I,children:[c.jsx(ys,{size:12,className:"mr-1"}),"断点续跑"]}),l&&c.jsxs(yt,{size:"sm",variant:"outline",className:"h-7 text-xs text-red-500 border-red-200 hover:bg-red-50 rounded-lg",onClick:P,children:[c.jsx(yg,{size:12,className:"mr-1"}),"停止"]})]})]}),c.jsx("div",{className:"flex-1 overflow-hidden relative",children:c.jsxs("div",{className:"h-full flex flex-col",children:[c.jsxs("div",{ref:A,className:"flex-1 overflow-y-auto px-4 py-4",children:[o.map((z,T)=>z.role!=="tool"&&c.jsx(hy,{message:z,isLast:T===o.length-1,isThinking:l,onRegenerate:z.role==="assistant"?ue:void 0,onContinue:z.role==="assistant"?L:void 0,onQuote:B,onDelete:Y},z.id)),s&&c.jsx(gy,{phase:s.phase,progress:s.progress,currentItem:s.currentItem,totalItems:s.totalItems,status:s.status}),l&&!s&&c.jsxs("div",{className:"flex items-center gap-2 text-zinc-400 text-sm py-2",children:[c.jsx(sa,{size:14,className:"animate-spin text-indigo-400"}),a||"思考中..."]})]}),w&&c.jsx("button",{onClick:()=>{var z;(z=A.current)==null||z.scrollTo({top:A.current.scrollHeight,behavior:"smooth"}),j.current=!1,E(!1)},className:"absolute bottom-4 left-1/2 -translate-x-1/2 w-9 h-9 rounded-full bg-white border border-zinc-200 shadow-lg shadow-zinc-200/60 flex items-center justify-center text-zinc-400 hover:text-zinc-700 hover:border-zinc-300 hover:shadow-xl transition-all",children:c.jsx(cg,{size:16})}),f&&c.jsxs("div",{className:"mx-4 px-3 py-1.5 bg-indigo-5
|
|||
|
|
${t?"bg-indigo-50/80 ring-1 ring-indigo-200 shadow-sm shadow-indigo-100/50":"bg-white border border-zinc-100 hover:border-zinc-200 hover:shadow-lg hover:shadow-zinc-100/80 hover:-translate-y-0.5"}`,children:[c.jsxs("div",{className:"flex items-start justify-between mb-2",children:[c.jsx("h3",{className:"font-semibold text-sm text-zinc-800 truncate flex-1 mr-2",children:e.name}),c.jsx("span",{className:`text-[10px] font-mono px-2 py-0.5 rounded-full ${t?"bg-indigo-100 text-indigo-600":"bg-zinc-100 text-zinc-500"}`,children:u})]}),e.description&&c.jsx("p",{className:"text-xs text-zinc-400 line-clamp-2 mb-3 leading-relaxed",children:e.description}),c.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[c.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-blue-50/80 text-blue-600",children:[c.jsx(Mn,{size:10}),E0[e.imageModel]||e.imageModel]}),c.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-violet-50/80 text-violet-600",children:[c.jsx(Dg,{size:10}),E0[e.videoModel]||e.videoModel]}),e.ttsVoice&&c.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-emerald-50/80 text-emerald-600",children:"TTS"})]})]})}function by({account:e,onSave:t}){const[n,u]=k.useState({name:e.name||"",description:e.description||"",pipeline:e.pipeline||"image-video",defaultFormat:e.defaultFormat||"9:16",imageModel:e.imageModel||"gemini",videoModel:e.videoModel||"veo3-fast",batchSize:e.batchSize||30,ttsVoice:e.ttsVoice||"",ttsInstruction:e.ttsInstruction||""}),[r,o]=k.useState(!1),i=(a,s)=>{u(d=>({...d,[a]:s})),o(!1)},l=()=>{t(n),o(!0),setTimeout(()=>o(!1),2e3)};return c.jsxs("div",{className:"max-w-lg space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"名称"}),c.jsx(he,{value:n.name,onChange:a=>i("name",a.target.value),className:"mt-1 bg-zinc-50 border-zinc-200"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"描述"}),c.jsx(he,{value:n.description,onChange:a=>i("description",a.target.value),placeholder:"账号描述...",className:"mt-1 bg-zinc-50 border-zinc-200"})]}),c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"画幅"}),c.jsxs("select",{value:n.defaultFormat,onChange:a=>i("defaultFormat",a.target.value),className:"mt-1 w-full h-10 rounded-md border border-zinc-200 bg-zinc-50 px-3 text-sm",children:[c.jsx("option",{value:"9:16",children:"9:16 竖屏"}),c.jsx("option",{value:"16:9",children:"16:9 横屏"}),c.jsx("option",{value:"1:1",children:"1:1 方形"}),c.jsx("option",{value:"4:3",children:"4:3"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"生图模型"}),c.jsxs("select",{value:n.imageModel,onChange:a=>i("imageModel",a.target.value),className:"mt-1 w-full h-10 rounded-md border border-zinc-200 bg-zinc-50 px-3 text-sm",children:[c.jsx("option",{value:"gemini",children:"Gemini"}),c.jsx("option",{value:"mj",children:"Midjourney"}),c.jsx("option",{value:"gpt",children:"GPT Image"}),c.jsx("option",{value:"kling",children:"Kling"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"视频模型"}),c.jsxs("select",{value:n.videoModel,onChange:a=>i("videoModel",a.target.value),className:"mt-1 w-full h-10 rounded-md border border-zinc-200 bg-zinc-50 px-3 text-sm",children:[c.jsx("option",{value:"veo3-fast",children:"Veo3 Fast"}),c.jsx("option",{value:"veo3-fast-frames",children:"Veo3 Frames"}),c.jsx("option",{value:"kling",children:"Kling"}),c.jsx("option",{value:"grok",children:"Grok"})]})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"Pipeline"}),c.jsxs("select",{value:n.pipeline,onChange:a=>i("pipeline",a.target.value),className:"mt-1 w-full h-10 rounded-md border border-zinc-200 bg-zinc-
|
|||
|
|
/**
|
|||
|
|
* Reset the text fill color so that placeholder is visible
|
|||
|
|
*/
|
|||
|
|
.`.concat(_o,`:empty {
|
|||
|
|
-webkit-text-fill-color: inherit !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Hack to apply on some CSS on IE10 and IE11
|
|||
|
|
*/
|
|||
|
|
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|||
|
|
/**
|
|||
|
|
* IE doesn't support '-webkit-text-fill-color'
|
|||
|
|
* So we use 'color: transparent' to make the text transparent on IE
|
|||
|
|
* Unlike other browsers, it doesn't affect caret color in IE
|
|||
|
|
*/
|
|||
|
|
.`).concat(_o,` {
|
|||
|
|
color: transparent !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.`).concat(_o,`::selection {
|
|||
|
|
background-color: #accef7 !important;
|
|||
|
|
color: transparent !important;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
`),Dy=et.forwardRef(function(t,n){var u=t.autoFocus,r=t.disabled,o=t.form,i=t.highlight,l=t.ignoreTabKey,a=l===void 0?!1:l,s=t.insertSpaces,d=s===void 0?!0:s,h=t.maxLength,m=t.minLength,v=t.name,x=t.onBlur,_=t.onClick,C=t.onFocus,g=t.onKeyDown,f=t.onKeyUp,p=t.onValueChange,y=t.padding,b=y===void 0?0:y,w=t.placeholder,E=t.preClassName,S=t.readOnly,A=t.required,j=t.style,I=t.tabSize,M=I===void 0?2:I,ue=t.textareaClassName,L=t.textareaId,B=t.value,Y=Cy(t,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),W=et.useRef({stack:[],offset:-1}),F=et.useRef(null),P=et.useState(!0),z=P[0],T=P[1],O={paddingTop:typeof b=="object"?b.top:b,paddingRight:typeof b=="object"?b.right:b,paddingBottom:typeof b=="object"?b.bottom:b,paddingLeft:typeof b=="object"?b.left:b},wt=i(B),re=function(N,Q){return N.substring(0,Q).split(`
|
|||
|
|
`)},Le=et.useCallback(function(N,Q){var U,q,pe;Q===void 0&&(Q=!1);var Ne=W.current,Pt=Ne.stack,zu=Ne.offset;if(Pt.length&&zu>-1){W.current.stack=Pt.slice(0,zu+1);var Fu=W.current.stack.length;if(Fu>D0){var $n=Fu-D0;W.current.stack=Pt.slice($n,Fu),W.current.offset=Math.max(W.current.offset-$n,0)}}var Ct=Date.now();if(Q){var Qt=W.current.stack[W.current.offset];if(Qt&&Ct-Qt.timestamp<Ay){var Du=/[^a-z0-9]([a-z0-9]+)$/i,qe=(U=re(Qt.value,Qt.selectionStart).pop())===null||U===void 0?void 0:U.match(Du),ju=(q=re(N.value,N.selectionStart).pop())===null||q===void 0?void 0:q.match(Du);if(qe!=null&&qe[1]&&(!((pe=ju==null?void 0:ju[1])===null||pe===void 0)&&pe.startsWith(qe[1]))){W.current.stack[W.current.offset]=be(be({},N),{timestamp:Ct});return}}}W.current.stack.push(be(be({},N),{timestamp:Ct})),W.current.offset++},[]),je=et.useCallback(function(){var N=F.current;if(N){var Q=N.value,U=N.selectionStart,q=N.selectionEnd;Le({value:Q,selectionStart:U,selectionEnd:q})}},[Le]),Ve=function(N){var Q=F.current;Q&&(Q.value=N.value,Q.selectionStart=N.selectionStart,Q.selectionEnd=N.selectionEnd,p==null||p(N.value))},_t=function(N){var Q=F.current,U=W.current.stack[W.current.offset];U&&Q&&(W.current.stack[W.current.offset]=be(be({},U),{selectionStart:Q.selectionStart,selectionEnd:Q.selectionEnd})),Le(N),Ve(N)},Or=function(){var N=W.current,Q=N.stack,U=N.offset,q=Q[U-1];q&&(Ve(q),W.current.offset=Math.max(U-1,0))},Au=function(){var N=W.current,Q=N.stack,U=N.offset,q=Q[U+1];q&&(Ve(q),W.current.offset=Math.min(U+1,Q.length-1))},On=function(N){if(!(g&&(g(N),N.defaultPrevented))){N.key==="Escape"&&N.currentTarget.blur();var Q=N.currentTarget,U=Q.value,q=Q.selectionStart,pe=Q.selectionEnd,Ne=(d?" ":" ").repeat(M);if(N.key==="Tab"&&!a&&z)if(N.preventDefault(),N.shiftKey){var Pt=re(U,q),zu=Pt.length-1,Fu=re(U,pe).length-1,$n=U.split(`
|
|||
|
|
`).map(function(Nu,js){return js>=zu&&js<=Fu&&Nu.startsWith(Ne)?Nu.substring(Ne.length):Nu}).join(`
|
|||
|
|
`);if(U!==$n){var Ct=Pt[zu];_t({value:$n,selectionStart:Ct!=null&&Ct.startsWith(Ne)?q-Ne.length:q,selectionEnd:pe-(U.length-$n.length)})}}else if(q!==pe){var Pt=re(U,q),Qt=Pt.length-1,Du=re(U,pe).length-1,Ct=Pt[Qt];_t({value:U.split(`
|
|||
|
|
`).map(function(Ns,Ts){return Ts>=Qt&&Ts<=Du?Ne+Ns:Ns}).join(`
|
|||
|
|
`),selectionStart:Ct&&/\S/.test(Ct)?q+Ne.length:q,selectionEnd:pe+Ne.length*(Du-Qt+1)})}else{var qe=q+Ne.length;_t({value:U.substring(0,q)+Ne+U.substring(pe),selectionStart:qe,selectionEnd:qe})}else if(N.key==="Backspace"){var ju=q!==pe,eh=U.substring(0,q);if(eh.endsWith(Ne)&&!ju){N.preventDefault();var qe=q-Ne.length;_t({value:U.substring(0,q-Ne.length)+U.substring(pe),selectionStart:qe,selectionEnd:qe})}}else if(N.key==="Enter"){if(q===pe){var Ei=re(U,q).pop(),$r=Ei==null?void 0:Ei.match(/^\s+/);if($r!=null&&$r[0]){N.preventDefault();var Ds=`
|
|||
|
|
`+$r[0],qe=q+Ds.length;_t({value:U.substring(0,q)+Ds+U.substring(pe),selectionStart:qe,selectionEnd:qe})}}}else if(N.keyCode===S0||N.keyCode===A0||N.keyCode===z0||N.keyCode===F0){var Mt=void 0;N.keyCode===S0&&N.shiftKey?Mt=["(",")"]:N.keyCode===A0?N.shiftKey?Mt=["{","}"]:Mt=["[","]"]:N.keyCode===z0?N.shiftKey?Mt=['"','"']:Mt=["'","'"]:N.keyCode===F0&&!N.shiftKey&&(Mt=["`","`"]),q!==pe&&Mt&&(N.preventDefault(),_t({value:U.substring(0,q)+Mt[0]+U.substring(q,pe)+Mt[1]+U.substring(pe),selectionStart:q,selectionEnd:pe+2}))}else(dl?N.metaKey&&N.keyCode===lo:N.ctrlKey&&N.keyCode===lo)&&!N.shiftKey&&!N.altKey?(N.preventDefault(),Or()):(dl?N.metaKey&&N.keyCode===lo&&N.shiftKey:zy?N.ctrlKey&&N.keyCode===Ey:N.ctrlKey&&N.keyCode===lo&&N.shiftKey)&&!N.altKey?(N.preventDefault(),Au()):N.keyCode===Sy&&N.ctrlKey&&(!dl||N.shiftKey)&&(N.preventDefault(),T(function(Nu){return!Nu}))}},Ci=function(N){var Q=N.currentTarget,U=Q.value,q=Q.selectionStart,pe=Q.selectionEnd;Le({value:U,selectionStart:q,selectionEnd:pe},!0),p(U)};return et.useEffect(function(){je()},[je]),et.useImperativeHandle(n,function(){return{get session(){return{history:W.current}},set session(N){W.current=N.history}}},[]),et.createElement("div",be({},Y,{style:be(be({},qu.container),j)}),et.createElement("pre",be({className:E,"aria-hidden":"true",style:be(be(be({},qu.editor),qu.highlight),O)},typeof wt=="string"?{dangerouslySetInnerHTML:{__html:wt+"<br />"}}:{children:wt})),et.createElement("textarea",{ref:function(N){return F.current=N},style:be(be(be({},qu.editor),qu.textarea),O),className:_o+(ue?" ".concat(ue):""),id:L,value:B,onChange:Ci,onKeyDown:On,onClick:_,onKeyUp:f,onFocus:C,onBlur:x,disabled:r,form:o,maxLength:h,minLength:m,name:v,placeholder:w,readOnly:S,required:A,autoFocus:u,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),et.createElement("style",{dangerouslySetInnerHTML:{__html:Fy}}))}),qu={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}},jy=Jp.default=Dy,Xp={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|||
|
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|||
|
|
*
|
|||
|
|
* @license MIT <https://opensource.org/licenses/MIT>
|
|||
|
|
* @author Lea Verou <https://lea.verou.me>
|
|||
|
|
* @namespace
|
|||
|
|
* @public
|
|||
|
|
*/var n=function(u){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,i={},l={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function f(p){return p instanceof a?new a(p.type,f(p.content),p.alias):Array.isArray(p)?p.map(f):p.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(f){return Object.prototype.toString.call(f).slice(8,-1)},objId:function(f){return f.__id||Object.defineProperty(f,"__id",{value:++o}),f.__id},clone:function f(p,y){y=y||{};var b,w;switch(l.util.type(p)){case"Object":if(w=l.util.objId(p),y[w])return y[w];b={},y[w]=b;for(var E in p)p.hasOwnProperty(E)&&(b[E]=f(p[E],y));return b;case"Array":return w=l.util.objId(p),y[w]?y[w]:(b=[],y[w]=b,p.forEach(function(S,A){b[A]=f(S,y)}),b);default:return p}},getLanguage:function(f){for(;f;){var p=r.exec(f.className);if(p)return p[1].toLowerCase();f=f.parentElement}return"none"},setLanguage:function(f,p){f.className=f.className.replace(RegExp(r,"gi"),""),f.classList.add("language-"+p)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(b){var f=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(b.stack)||[])[1];if(f){var p=document.getElementsByTagName("script");for(var y in p)if(p[y].src==f)return p[y]}return null}},isActive:function(f,p,y){for(var b="no-"+p;f;){var w=f.classList;if(w.contains(p))return!0;if(w.contains(b))return!1;f=f.parentElement}return!!y}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(f,p){var y=l.util.clone(l.languages[f]);for(var b in p)y[b]=p[b];return y},insertBefore:function(f,p,y,b){b=b||l.languages;var w=b[f],E={};for(var S in w)if(w.hasOwnProperty(S)){if(S==p)for(var A in y)y.hasOwnProperty(A)&&(E[A]=y[A]);y.hasOwnProperty(S)||(E[S]=w[S])}var j=b[f];return b[f]=E,l.languages.DFS(l.languages,function(I,M){M===j&&I!=f&&(this[I]=E)}),E},DFS:function f(p,y,b,w){w=w||{};var E=l.util.objId;for(var S in p)if(p.hasOwnProperty(S)){y.call(p,S,p[S],b||S);var A=p[S],j=l.util.type(A);j==="Object"&&!w[E(A)]?(w[E(A)]=!0,f(A,y,null,w)):j==="Array"&&!w[E(A)]&&(w[E(A)]=!0,f(A,y,S,w))}}},plugins:{},highlightAll:function(f,p){l.highlightAllUnder(document,f,p)},highlightAllUnder:function(f,p,y){var b={callback:y,container:f,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",b),b.elements=Array.prototype.slice.apply(b.container.querySelectorAll(b.selector)),l.hooks.run("before-all-elements-highlight",b);for(var w=0,E;E=b.elements[w++];)l.highlightElement(E,p===!0,b.callback)},highlightElement:function(f,p,y){var b=l.util.getLanguage(f),w=l.languages[b];l.util.setLanguage(f,b);var E=f.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(E,b);var S=f.textContent,A={element:f,language:b,grammar:w,code:S};function j(M){A.highlightedCode=M,l.hooks.run("before-insert",A),A.element.innerHTML=A.highlightedCode,l.hooks.run("after-highlight",A),l.hooks.run("complete",A),y&&y.call(A.element)}if(l.hooks.run("before-sanity-check",A),E=A.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!A.code){l.hooks.run("complete",A),y&&y.call(A.element);return}if(l.hooks.run("before-highlight",A),!A.grammar){j(l.util.encode(A.code));return}if(p&&u.Worker){var I=new Worker(l.filename);I.onmessage=function(M){j(M.data)},I.postMessage(JSON.stringify({language:A.language,code:A.code,immediateClose:!0}))}else j(l.highlight(A.code,A.grammar,A.language))},highlight:function(f,p,y){var b={code:f,grammar:p,language:y};if(l.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=l.tokenize(b.code,b.grammar),l.hooks.run("after-tokenize",b),a.stringify(l.util.encode(b.tokens),b.language)},tokenize:function(f,p){var y=p.rest;if(y){for(var b in y)p[b]=y[b];delete p.rest}var w=new h;return m(w,w.head,f),d(f,w,p,w.head,0
|
|||
|
|
`),C.hasAttribute("data-start")||C.setAttribute("data-start",String(A+1))}g.textContent=w,n.highlightElement(g)},function(w){C.setAttribute(l,d),g.textContent=w})}}),n.plugins.fileHighlight={highlight:function(C){for(var g=(C||document).querySelectorAll(h),f=0,p;p=g[f++];)n.highlightElement(p)}};var x=!1;n.fileHighlight=function(){x||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),x=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Xp);var j0=Xp.exports;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(d){return d=d.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}var u=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,r=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return u}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+r+o+"(?:"+r+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+r+o+")(?:"+r+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(u),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+r+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+r+"$"),inside:{"table-header":{pattern:RegExp(u),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(func
|
|||
|
|
${r===i?"border-indigo-600 text-indigo-600":"border-transparent text-zinc-500 hover:text-zinc-700"}`,children:l},i))}),c.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[r==="basic"&&c.jsx(by,{account:e,onSave:t}),r==="prompts"&&c.jsx(My,{accountId:e.id}),r==="capcut"&&c.jsx(Iy,{account:e,onSave:t}),r==="references"&&c.jsx(Oy,{account:e,onSave:t})]})]})}function Uy(){return c.jsxs("div",{className:"rounded-xl p-4 border border-zinc-100 bg-white",children:[c.jsxs("div",{className:"flex items-start justify-between mb-2",children:[c.jsx("div",{className:"skeleton h-4 w-24"}),c.jsx("div",{className:"skeleton h-4 w-10 rounded-full"})]}),c.jsx("div",{className:"skeleton h-3 w-full mb-2"}),c.jsx("div",{className:"skeleton h-3 w-2/3 mb-3"}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("div",{className:"skeleton h-4 w-14 rounded-full"}),c.jsx("div",{className:"skeleton h-4 w-12 rounded-full"})]})]})}function N0(){const{accountId:e}=rp(),t=Cu(),{accounts:n,loading:u,create:r,update:o,remove:i}=Yp(),[l,a]=k.useState(""),s=e&&n.find(m=>m.id===e)||null,d=n.filter(m=>{if(!l)return!0;const v=l.toLowerCase();return m.name.toLowerCase().includes(v)||(m.description||"").toLowerCase().includes(v)}),h=async()=>{const m=`新账号 ${n.length+1}`,v=await r({name:m,pipeline:"image-video",defaultFormat:"9:16",imageModel:"gemini",videoModel:"veo3-fast"});v!=null&&v.id&&t(`/accounts/${v.id}`)};return s?c.jsx(By,{account:s,onSave:m=>o(s.id,m),onDelete:()=>i(s.id).then(()=>t("/accounts")),onBack:()=>t("/accounts")}):c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-zinc-100 bg-white flex-shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("h1",{className:"text-base font-semibold text-zinc-800",children:"账号管理"}),c.jsxs("div",{className:"relative",children:[c.jsx(da,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-zinc-300"}),c.jsx(he,{value:l,onChange:m=>a(m.target.value),placeholder:"搜索账号...",className:"pl-8 h-8 w-48 text-xs bg-zinc-50/80 border-zinc-100 focus:bg-white"})]})]}),c.jsxs("button",{onClick:h,className:"inline-flex items-center gap-1.5 px-3.5 py-1.5 text-xs font-medium text-white bg-indigo-600 rounded-lg hover:bg-indigo-700 transition-colors shadow-sm shadow-indigo-200/50",children:[c.jsx(ca,{size:14}),"新建账号"]})]}),c.jsx("div",{className:"flex-1 overflow-auto p-6",children:u?c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:Array.from({length:6}).map((m,v)=>c.jsx(Uy,{},v))}):d.length>0?c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:d.map(m=>c.jsx(yy,{account:m,isSelected:m.id===e,onClick:()=>t(`/accounts/${m.id}`)},m.id))}):c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-zinc-300",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-zinc-50 flex items-center justify-center mb-4",children:c.jsx(da,{size:24,strokeWidth:1.5,className:"text-zinc-300"})}),l?c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"text-sm text-zinc-400",children:["没有匹配「",l,"」的账号"]}),c.jsx("button",{onClick:()=>a(""),className:"mt-2 text-xs text-indigo-500 hover:text-indigo-600",children:"清除搜索"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-sm text-zinc-400",children:"还没有创建任何账号"}),c.jsxs("button",{onClick:h,className:"mt-3 inline-flex items-center gap-1.5 px-4 py-2 text-xs font-medium text-white bg-indigo-600 rounded-lg hover:bg-indigo-700 transition-colors shadow-sm shadow-indigo-200/50",children:[c.jsx(ca,{size:14}),"创建第一个账号"]})]})]})})]})}function Hy(e){const[t,n]=k.useState([]),[u,r]=k.useState(!0),o=k.useCallback(()=>{r(!0),fe.listAssets(e).then(n).finally(()=>r(!1))},[e==null?void 0:e.accountId,e==null?void 0:e.type]);return k.useEffect(()=>{o()},[o]),{assets:t,loading:u,refresh:o,remove:l=>fe.deleteAsset(l).then(o)}}function Vy({title:e,subtitle:
|
|||
|
|
${n===w?"bg-white text-indigo-600 shadow-sm":"text-zinc-400 hover:text-zinc-600"}`,children:[c.jsx(S,{size:13}),E,c.jsx("span",{className:`text-[10px] px-1.5 rounded-full ${n===w?"bg-indigo-50 text-indigo-500":"bg-zinc-100 text-zinc-400"}`,children:A})]},w))}),c.jsxs("select",{value:e,onChange:w=>t(w.target.value),className:"h-8 rounded-lg border border-zinc-100 bg-zinc-50/80 px-2 text-xs hover:border-zinc-200 transition-colors",children:[c.jsx("option",{value:"",children:"全部账号"}),r.map(w=>c.jsx("option",{value:w.id,children:w.name},w.id))]}),c.jsx("div",{className:"flex-1"}),c.jsxs(yt,{size:"sm",variant:"outline",className:"h-8 text-xs rounded-lg",onClick:g,children:[c.jsx(ys,{size:12,className:"mr-1"}),"扫描"]})]}),c.jsx("div",{className:"flex-1 overflow-auto p-4",children:h?c.jsx("div",{children:Array.from({length:3}).map((w,E)=>c.jsx(Wy,{},E))}):y.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center mt-16 text-zinc-300",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-zinc-50 flex items-center justify-center mb-4",children:c.jsx(aa,{size:24,strokeWidth:1.5,className:"text-zinc-300"})}),c.jsx("p",{className:"text-sm text-zinc-400",children:n==="all"?"暂无资产":`暂无${n==="image"?"图片":"视频"}`}),c.jsx("p",{className:"text-xs mt-1 text-zinc-300",children:"点击「扫描」从 output 目录导入"})]}):y.map(([w,E])=>c.jsx(Vy,{title:f(w),subtitle:p(w),assets:E,onPreview:s,onDelete:m},w))}),a&&c.jsx(qy,{asset:a,allAssets:v,onClose:()=>s(null),onNavigate:s})]})}const Gy=[{title:"CapCut / 剪映",fields:[{key:"jianyingDraftPath",label:"剪映草稿路径",placeholder:"C:/Users/.../com.lveditor.draft"},{key:"capcutMateDir",label:"CapCut Mate 目录",placeholder:"C:/Users/.../capcut-mate"},{key:"capcutMateApiBase",label:"CapCut Mate API",placeholder:"http://localhost:30000"}]},{title:"Gemini 生图",fields:[{key:"geminiApiBaseUrl",label:"API Base URL",placeholder:"https://generativelanguage.googleapis.com"},{key:"geminiApiKey",label:"API Key",type:"password"},{key:"geminiModel",label:"模型",placeholder:"gemini-3.1-flash-image-preview"}]},{title:"Midjourney",fields:[{key:"mjApiBaseUrl",label:"API Base URL"},{key:"mjApiKey",label:"API Key",type:"password"}]},{title:"Veo 视频生成",fields:[{key:"veoApiBaseUrl",label:"API Base URL"},{key:"veoApiKey",label:"API Key",type:"password"},{key:"veoModel",label:"模型",placeholder:"veo3-fast-frames"},{key:"veoEnhancePrompt",label:"增强提示词",type:"toggle"},{key:"veoEnableUpsample",label:"启用 Upsample",type:"toggle"}]},{title:"Grok 视频生成",fields:[{key:"grokApiBaseUrl",label:"API Base URL"},{key:"grokApiKey",label:"API Key",type:"password"},{key:"grokModel",label:"模型",placeholder:"grok-video-3"}]},{title:"GPT Image",fields:[{key:"gptImageApiBaseUrl",label:"API Base URL"},{key:"gptImageApiKey",label:"API Key",type:"password"},{key:"gptImageModel",label:"模型",placeholder:"gpt-image-2"}]},{title:"Kling 可灵",fields:[{key:"kelingApiBaseUrl",label:"API Base URL",placeholder:"https://api-beijing.klingai.com"},{key:"kelingApiKey",label:"API Key",type:"password"},{key:"kelingSecretAccessKey",label:"Secret Key",type:"password"},{key:"kelingModel",label:"模型",placeholder:"kling-v2-5-turbo"}]},{title:"OSS 存储",fields:[{key:"ossRegion",label:"Region",placeholder:"oss-cn-hangzhou"},{key:"ossAccessKeyId",label:"Access Key ID"},{key:"ossAccessKeySecret",label:"Access Key Secret",type:"password"},{key:"ossBucket",label:"Bucket",placeholder:"my-bucket"},{key:"ossFolder",label:"目录前缀",placeholder:"tmp/"},{key:"ossExpires",label:"链接有效期(秒)",placeholder:"31536000"}]},{title:"TTS 语音合成",fields:[{key:"ttsApiBaseUrl",label:"API Base URL",placeholder:"https://dashscope.aliyuncs.com/api/v1"},{key:"ttsApiKey",label:"API Key",type:"password"},{key:"ttsModel",label:"模型",placeholder:"cosyvoice-v3.5-plus"},{key:"ttsVoice",label:"音色 ID",placeholder:"cosyvoice-v3.5-plus-bailian-xxx"},{key:"ttsLanguage",label:"语言",placeholder:"Chinese"}]}];function Qy(){var g;const[e,t]=k.use
|
|||
|
|
${e==="agent"?"border-indigo-600 text-indigo-600":"border-transparent text-zinc-500 hover:text-zinc-700"}`,children:"Agent 配置"}),c.jsx("button",{onClick:()=>t("skills"),className:`px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px
|
|||
|
|
${e==="skills"?"border-indigo-600 text-indigo-600":"border-transparent text-zinc-500 hover:text-zinc-700"}`,children:"工具配置"})]}),c.jsx("div",{className:"flex-1 overflow-auto",children:c.jsxs("div",{className:"max-w-2xl mx-auto p-6 space-y-6",children:[e==="agent"?c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"space-y-4",children:[c.jsx("h3",{className:"text-sm font-medium text-zinc-500 uppercase tracking-wide",children:"API 配置"}),c.jsxs("div",{className:"space-y-3 bg-white rounded-lg border border-zinc-200 p-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"协议"}),c.jsx("div",{className:"mt-1 flex gap-2",children:["anthropic","openai"].map(f=>c.jsx("button",{onClick:()=>x("protocol",f),className:`flex-1 py-2 rounded-md text-sm font-medium transition-colors border ${d.protocol===f?"bg-indigo-50 border-indigo-300 text-indigo-700":"bg-zinc-50 border-zinc-200 text-zinc-500 hover:bg-zinc-100"}`,children:f==="anthropic"?"Anthropic":"OpenAI"},f))}),c.jsx("p",{className:"text-[10px] text-zinc-400 mt-1",children:d.protocol==="anthropic"?"Anthropic 兼容协议(支持 Claude、GLM、DeepSeek 代理等)":"OpenAI 兼容协议(支持 GPT、DeepSeek、Qwen、Ollama 等)"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"模型"}),c.jsx(he,{value:d.model,onChange:f=>x("model",f.target.value),placeholder:d.protocol==="anthropic"?"claude-sonnet-4-6 或 GLM-5.1":"gpt-4o 或 deepseek-chat",className:"mt-1 bg-zinc-50 border-zinc-200"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"Base URL"}),c.jsx(he,{value:d.baseUrl,onChange:f=>x("baseUrl",f.target.value),placeholder:d.protocol==="anthropic"?"https://api.anthropic.com":"https://api.openai.com/v1",className:"mt-1 bg-zinc-50 border-zinc-200 font-mono text-xs"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"Auth Token"}),c.jsx(he,{value:d.authToken,onChange:f=>x("authToken",f.target.value),type:"password",placeholder:"sk-...",className:"mt-1 bg-zinc-50 border-zinc-200 font-mono text-xs"})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[c.jsxs(yt,{size:"sm",variant:"outline",className:"text-xs",disabled:i,onClick:async()=>{l(!0),s(null);try{await C();const p=await(await fetch("/api/configs/test-connection",{method:"POST"})).json();s(p)}catch(f){s({ok:!1,error:f.message})}l(!1)},children:[i?c.jsx(sa,{size:12,className:"mr-1 animate-spin"}):c.jsx(Ag,{size:12,className:"mr-1"}),i?"测试中...":"测试连接"]}),a&&c.jsx("span",{className:`text-xs ${a.ok?"text-green-600":"text-red-500"}`,children:a.ok?`连接成功 ${(g=a.models)!=null&&g.length?`(${a.models.join(", ")})`:""}`:a.error})]})]})]}),c.jsxs("section",{className:"space-y-4",children:[c.jsx("h3",{className:"text-sm font-medium text-zinc-500 uppercase tracking-wide",children:"默认参数"}),c.jsx("div",{className:"space-y-3 bg-white rounded-lg border border-zinc-200 p-4",children:c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"生图模型"}),c.jsxs("select",{value:d.defaultImageModel,onChange:f=>x("defaultImageModel",f.target.value),className:"mt-1 w-full h-10 rounded-md border border-zinc-200 bg-zinc-50 px-3 text-sm",children:[c.jsx("option",{value:"",children:"未设置"}),c.jsx("option",{value:"gemini",children:"Gemini"}),c.jsx("option",{value:"mj",children:"Midjourney"}),c.jsx("option",{value:"gpt",children:"GPT Image"}),c.jsx("option",{value:"kling",children:"Kling"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"视频模型"}),c.jsxs("select",{value:d.defaultVideoModel,onChange:f=>x("defaultVideoModel",f.target.value),className:"mt-1 w-full h-10 rounded-md border border-zinc-200 bg-zinc-50 px-3 text-sm",children:[c.jsx("option",{value:"",children:"未设置"}),c.jsx("option",{value:"veo3-fast",ch
|