修复nas复制报错和添加用户使用引导
This commit is contained in:
1 parent
150cff53e3
commit
9fb86e625c
9 files changed
+765
-320
No files matched your search
@@ -43,7 +43,6 @@ coverage/
|
||||
|
||||
# 知识库文件夹 - 不同步到 GitHub
|
||||
Knowledge base/
|
||||
飞牛打包部署指南.md
|
||||
|
||||
# 构建输出
|
||||
dist/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# FlyPic 飞图
|
||||
|
||||
专为飞牛 fnOS 设计的轻量、快速、稳定的图像素材检索浏览应用。
|
||||
主要飞牛 fnOS 设计的轻量、快速、稳定的图像素材检索浏览应用。
|
||||
|
||||
## ✨ 核心特性
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
- 🔍 **智能搜索** - 多关键词组合搜索,高级筛选(格式/大小/方向)
|
||||
- 📱 **移动适配** - 响应式设计,手机上也能流畅使用
|
||||
- 🆓 **开源免费** - 100% 开源,MIT 协议
|
||||
- 其他平台
|
||||
|
||||
## 🛠️ 技术栈
|
||||
|
||||
|
||||
@@ -1,226 +0,0 @@
|
||||
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gd={exports:{}},$o={},yd={exports:{}},Se={};/**
|
||||
* @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 ms=Symbol.for("react.element"),Sm=Symbol.for("react.portal"),bm=Symbol.for("react.fragment"),Em=Symbol.for("react.strict_mode"),Cm=Symbol.for("react.profiler"),Nm=Symbol.for("react.provider"),Rm=Symbol.for("react.context"),Tm=Symbol.for("react.forward_ref"),Om=Symbol.for("react.suspense"),Im=Symbol.for("react.memo"),Am=Symbol.for("react.lazy"),dc=Symbol.iterator;function jm(e){return e===null||typeof e!="object"?null:(e=dc&&e[dc]||e["@@iterator"],typeof e=="function"?e:null)}var vd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wd=Object.assign,xd={};function vi(e,t,r){this.props=e,this.context=t,this.refs=xd,this.updater=r||vd}vi.prototype.isReactComponent={};vi.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")};vi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _d(){}_d.prototype=vi.prototype;function ou(e,t,r){this.props=e,this.context=t,this.refs=xd,this.updater=r||vd}var au=ou.prototype=new _d;au.constructor=ou;wd(au,vi.prototype);au.isPureReactComponent=!0;var hc=Array.isArray,kd=Object.prototype.hasOwnProperty,lu={current:null},Sd={key:!0,ref:!0,__self:!0,__source:!0};function bd(e,t,r){var n,i={},s=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)kd.call(t,n)&&!Sd.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1<a){for(var l=Array(a),f=0;f<a;f++)l[f]=arguments[f+2];i.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)i[n]===void 0&&(i[n]=a[n]);return{$$typeof:ms,type:e,key:s,ref:o,props:i,_owner:lu.current}}function zm(e,t){return{$$typeof:ms,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function uu(e){return typeof e=="object"&&e!==null&&e.$$typeof===ms}function Lm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var pc=/\/+/g;function ha(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Lm(""+e.key):t.toString(36)}function Ys(e,t,r,n,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ms:case Sm:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+ha(o,0):n,hc(i)?(r="",e!=null&&(r=e.replace(pc,"$&/")+"/"),Ys(i,t,r,"",function(f){return f})):i!=null&&(uu(i)&&(i=zm(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(pc,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",hc(e))for(var a=0;a<e.length;a++){s=e[a];var l=n+ha(s,a);o+=Ys(s,t,r,l,i)}else if(l=jm(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=n+ha(s,a++),o+=Ys(s,t,r,l,i);else if(s==="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 o}function Cs(e,t,r){if(e==null)return e;var n=[],i=0;return Ys(e,n,"","",function(s){return t.call(r,s,i++)}),n}function Pm(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},Zs={transition:null},Fm={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:Zs,ReactCurrentOwner:lu};function Ed(){throw Error("act(...) is not supported in production builds of React.")}Se.Children={map:Cs,forEach:function(e,t,r){Cs(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Cs(e,function(){t++}),t},toArray:function(e){return Cs(e,function(t){return t})||[]},only:function(e){if(!uu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Component=vi;Se.Fragment=bm;Se.Profiler=Cm;Se.PureComponent=ou;Se.StrictMode=Em;Se.Suspense=Om;Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fm;Se.act=Ed;Se.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=wd({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=lu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)kd.call(t,l)&&!Sd.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var f=0;f<l;f++)a[f]=arguments[f+2];n.children=a}return{$$typeof:ms,type:e.type,key:i,ref:s,props:n,_owner:o}};Se.createContext=function(e){return e={$$typeof:Rm,_currentValue:e,_currentValue2:e,_threadCountLine truncated
|
||||
* @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 Dm=Z,Mm=Symbol.for("react.element"),Bm=Symbol.for("react.fragment"),Um=Object.prototype.hasOwnProperty,$m=Dm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wm={key:!0,ref:!0,__self:!0,__source:!0};function Cd(e,t,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)Um.call(t,n)&&!Wm.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:Mm,type:e,key:s,ref:o,props:i,_owner:$m.current}}$o.Fragment=Bm;$o.jsx=Cd;$o.jsxs=Cd;gd.exports=$o;var S=gd.exports,Za={},Nd={exports:{}},Nt={},Rd={exports:{}},Td={};/**
|
||||
* @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($,D){var H=$.length;$.push(D);e:for(;0<H;){var I=H-1>>>1,A=$[I];if(0<i(A,D))$[I]=D,$[H]=A,H=I;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var D=$[0],H=$.pop();if(H!==D){$[0]=H;e:for(var I=0,A=$.length,V=A>>>1;I<V;){var M=2*(I+1)-1,W=$[M],oe=M+1,he=$[oe];if(0>i(W,H))oe<A&&0>i(he,W)?($[I]=he,$[oe]=H,I=oe):($[I]=W,$[M]=H,I=M);else if(oe<A&&0>i(he,H))$[I]=he,$[oe]=H,I=oe;else break e}}return D}function i($,D){var H=$.sortIndex-D.sortIndex;return H!==0?H:$.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],f=[],p=1,y=null,x=3,g=!1,m=!1,u=!1,v=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w($){for(var D=r(f);D!==null;){if(D.callback===null)n(f);else if(D.startTime<=$)n(f),D.sortIndex=D.expirationTime,t(l,D);else break;D=r(f)}}function k($){if(u=!1,w($),!m)if(r(l)!==null)m=!0,se(b);else{var D=r(f);D!==null&&Q(k,D.startTime-$)}}function b($,D){m=!1,u&&(u=!1,c(L),L=-1),g=!0;var H=x;try{for(w(D),y=r(l);y!==null&&(!(y.expirationTime>D)||$&&!ee());){var I=y.callback;if(typeof I=="function"){y.callback=null,x=y.priorityLevel;var A=I(y.expirationTime<=D);D=e.unstable_now(),typeof A=="function"?y.callback=A:y===r(l)&&n(l),w(D)}else n(l);y=r(l)}if(y!==null)var V=!0;else{var M=r(f);M!==null&&Q(k,M.startTime-D),V=!1}return V}finally{y=null,x=H,g=!1}}var N=!1,T=null,L=-1,O=5,F=-1;function ee(){return!(e.unstable_now()-F<O)}function R(){if(T!==null){var $=e.unstable_now();F=$;var D=!0;try{D=T(!0,$)}finally{D?U():(N=!1,T=null)}}else N=!1}var U;if(typeof d=="function")U=function(){d(R)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,q=_.port2;_.port1.onmessage=R,U=function(){q.postMessage(null)}}else U=function(){v(R,0)};function se($){T=$,N||(N=!0,U())}function Q($,D){L=v(function(){$(e.unstable_now())},D)}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($){$.callback=null},e.unstable_continueExecution=function(){m||g||(m=!0,se(b))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function($){switch(x){case 1:case 2:case 3:var D=3;break;default:D=x}var H=x;x=D;try{return $()}finally{x=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,D){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var H=x;x=$;try{return D()}finally{x=H}},e.unstable_scheduleCallback=function($,D,H){var I=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?I+H:I):H=I,$){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=H+A,$={id:p++,callback:D,priorityLevel:$,startTime:H,expirationTime:A,sortIndex:-1},H>I?($.sortIndex=H,t(f,$),r(l)===null&&$===r(f)&&(u?(c(L),L=-1):u=!0,Q(k,H-I))):($.sortIndex=A,t(l,$),m||g||(m=!0,se(b))),$},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function($){var D=x;return function(){var H=x;x=D;try{return $.apply(this,arguments)}finally{x=H}}}})(Td);Rd.exports=Td;var Hm=Rd.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 Vm=Z,Ct=Hm;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 Od=new Set,Qi={};function In(e,t){ui(e,t),ui(e+"Capture",t)}function ui(e,t){for(Qi[e]=t,e=0;e<t.length;e++)Od.add(t[e])}var Or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qa=Object.prototype.hasOwnProperty,qm=/^[: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]*$/,mc={},gc={};function Km(e){return Qa.call(gc,e)?!0:Qa.call(mc,e)?!1:qm.test(e)?gc[e]=!0:(mc[e]=!0,!1)}function Xm(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ym(e,t,r,n){if(t===null||typeof t>"u"||Xm(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 ht(e,t,r,n,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new ht(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){et[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var cu=/[\-:]([a-z])/g;function fu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(cu,fu);et[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(cu,fu);et[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(cu,fu);et[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function du(e,t,r,n){var i=et.hasOwnProperty(t)?et[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!==
Line truncated
|
||||
`+pa+e}var ma=!1;function ga(e,t){if(!e||ma)return"";ma=!0;var r=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(f){var n=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){n=f}e.call(t.prototype)}else{try{throw Error()}catch(f){n=f}e()}}catch(f){if(f&&n&&typeof f.stack=="string"){for(var i=f.stack.split(`
|
||||
`),s=n.stack.split(`
|
||||
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
||||
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{ma=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pi(e):""}function Zm(e){switch(e.tag){case 5:return Pi(e.type);case 16:return Pi("Lazy");case 13:return Pi("Suspense");case 19:return Pi("SuspenseList");case 0:case 2:case 15:return e=ga(e.type,!1),e;case 11:return e=ga(e.type.render,!1),e;case 1:return e=ga(e.type,!0),e;default:return""}}function tl(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 Hn:return"Fragment";case Wn:return"Portal";case Ga:return"Profiler";case hu:return"StrictMode";case Ja:return"Suspense";case el:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ad:return(e.displayName||"Context")+".Consumer";case Id:return(e._context.displayName||"Context")+".Provider";case pu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mu:return t=e.displayName||null,t!==null?t:tl(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return tl(e(t))}catch{}}return null}function Qm(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 tl(t);case 8:return t===hu?"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 on(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gm(e){var t=zd(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rs(e){e._valueTracker||(e._valueTracker=Gm(e))}function Ld(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=zd(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function mo(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 rl(e,t){var r=t.checked;return Be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function vc(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=on(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Pd(e,t){t=t.checked,t!=null&&du(e,"checked",t,!1)}function nl(e,t){Pd(e,t);var r=on(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?il(e,t.type,r):t.hasOwnProperty("defaultValue")&&il(e,t.type,on(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wc(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function il(e,t,r){(t!=="number"||mo(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Fi=Array.isArray;function ri(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+on(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function sl(e,t){if(t.dan
Line truncated
|
||||
`).replace(lg,"")}function Ps(e,t,r){if(t=$c(t),$c(e)!==t&&r)throw Error(ie(425))}function So(){}var vl=null,wl=null;function xl(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 _l=typeof setTimeout=="function"?setTimeout:void 0,ug=typeof clearTimeout=="function"?clearTimeout:void 0,Wc=typeof Promise=="function"?Promise:void 0,cg=typeof queueMicrotask=="function"?queueMicrotask:typeof Wc<"u"?function(e){return Wc.resolve(null).then(e).catch(fg)}:_l;function fg(e){setTimeout(function(){throw e})}function Ta(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),rs(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);rs(t)}function Gr(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 Hc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var xi=Math.random().toString(36).slice(2),lr="__reactFiber$"+xi,as="__reactProps$"+xi,Ir="__reactContainer$"+xi,kl="__reactEvents$"+xi,dg="__reactListeners$"+xi,hg="__reactHandles$"+xi;function vn(e){var t=e[lr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ir]||r[lr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Hc(e);e!==null;){if(r=e[lr])return r;e=Hc(e)}return t}e=r,r=e.parentNode}return null}function vs(e){return e=e[lr]||e[Ir],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function Ko(e){return e[as]||null}var Sl=[],Yn=-1;function un(e){return{current:e}}function Le(e){0>Yn||(e.current=Sl[Yn],Sl[Yn]=null,Yn--)}function Oe(e,t){Yn++,Sl[Yn]=e.current,e.current=t}var an={},ot=un(an),gt=un(!1),En=an;function ci(e,t){var r=e.type.contextTypes;if(!r)return an;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yt(e){return e=e.childContextTypes,e!=null}function bo(){Le(gt),Le(ot)}function Vc(e,t,r){if(ot.current!==an)throw Error(ie(168));Oe(ot,t),Oe(gt,r)}function bh(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(ie(108,Qm(e)||"Unknown",i));return Be({},r,n)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||an,En=ot.current,Oe(ot,e),Oe(gt,gt.current),!0}function qc(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=bh(e,t,En),n.__reactInternalMemoizedMergedChildContext=e,Le(gt),Le(ot),Oe(ot,e)):Le(gt),Oe(gt,r)}var Er=null,Xo=!1,Oa=!1;function Eh(e){Er===null?Er=[e]:Er.push(e)}function pg(e){Xo=!0,Eh(e)}function cn(){if(!Oa&&Er!==null){Oa=!0;var e=0,t=Re;try{var r=Er;for(Re=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Er=null,Xo=!1}catch(i){throw Er!==null&&(Er=Er.slice(e+1)),Zd(yu,cn),i}finally{Re=t,Oa=!1}}return null}var Zn=[],Qn=0,Co=null,No=0,zt=[],Lt=0,Cn=null,Nr=1,Rr="";function mn(e,t){Zn[Qn++]=No,Zn[Qn++]=Co,Co=e,No=t}function Ch(e,t,r){zt[Lt++]=Nr,zt[Lt++]=Rr,zt[Lt++]=Cn,Cn=e;var n=Nr;e=Rr;var i=32-Yt(n)-1;n&=~(1<<i),r+=1;var s=32-Yt(t)+i;if(30<s){var o=i-i%5;s=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Nr=1<<32-Yt(t)+i|r<<i|n,Rr=s+e}else Nr=1<<s|r<<i|n,Rr=e}function Cu(e){e.return!==null&&(mn(e,1),Ch(e,1,0))}function Nu(e){for(;e===Co;)Co=Zn[--Qn],Zn[Qn]=null,No=Zn[--Qn],Zn[Qn]=null;for(;e===Cn;)Cn=zt[--Lt],zt[Lt]=null,Rr=zt[--Lt],zt[Lt]=null,Nr=zt[--Lt],zt[Lt]=null}var Et=null,bt=null,Fe=!1,Xt=null;function Nh(e,t){var r=Dt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Kc(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Et=e,bt=Gr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Et=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Cn!==null?{id:Nr,overflow:Rr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Dt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Et=e,bt=null,!0):!1;default:return!1}}function bl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function El(e){if(Fe){var t=bt;if(t){var r=t;if(!Kc(e,t)){if(bl(e))throw Error(ie(418));t=Gr(r.nextSibling);var n=Et;t&&Kc(e,t)?Nh(n,r):(e.flags=e.flags&-4097|2,Fe=!1,Et=e)}}else{if(bl(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Fe=!1,Et=e}}}function Xc(e){
Line truncated
|
||||
Error generating stack: `+s.message+`
|
||||
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function La(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Tl(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Sg=typeof WeakMap=="function"?WeakMap:Map;function ep(e,t,r){r=Tr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Lo||(Lo=!0,Ml=n),Tl(e,t)},r}function tp(e,t,r){r=Tr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Tl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Tl(e,t),typeof n!="function"&&(en===null?en=new Set([this]):en.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function rf(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Sg;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Fg.bind(null,e,t,r),t.then(e,e))}function nf(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 sf(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Tr(-1,1),t.tag=2,Jr(r,t,1))),r.lanes|=1),e)}var bg=zr.ReactCurrentOwner,mt=!1;function ct(e,t,r,n){t.child=e===null?Oh(t,null,r,n):di(t,e.child,r,n)}function of(e,t,r,n,i){r=r.render;var s=t.ref;return oi(t,i),n=Du(e,t,r,n,s,i),r=Mu(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jr(e,t,i)):(Fe&&r&&Cu(t),t.flags|=1,ct(e,t,n,i),t.child)}function af(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!Yu(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,rp(e,t,s,n,i)):(e=oo(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:is,r(o,n)&&e.ref===t.ref)return jr(e,t,i)}return t.flags|=1,e=rn(s,n),e.ref=t.ref,e.return=t,t.child=e}function rp(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(is(s,n)&&e.ref===t.ref)if(mt=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(mt=!0);else return t.lanes=e.lanes,jr(e,t,i)}return Ol(e,t,r,n,i)}function np(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oe(ei,St),St|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oe(ei,St),St|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,Oe(ei,St),St|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,Oe(ei,St),St|=n;return ct(e,t,i,r),t.child}function ip(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ol(e,t,r,n,i){var s=yt(r)?En:ot.current;return s=ci(t,s),oi(t,i),r=Du(e,t,r,n,s,i),n=Mu(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jr(e,t,i)):(Fe&&n&&Cu(t),t.flags|=1,ct(e,t,r,i),t.child)}function lf(e,t,r,n,i){if(yt(r)){var s=!0;Eo(t)}else s=!1;if(oi(t,i),t.stateNode===null)no(e,t),Jh(t,r,n),Rl(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,f=r.contextType;typeof f=="object"&&f!==null?f=Bt(f):(f=yt(r)?En:ot.current,f=ci(t,f));var p=r.getDerivedStateFromProps,y=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function";y||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==f)&&tf(t,o,n,f),Wr=!1;var x=t.memoizedState;o.state=x,Oo(t,n,o,i),l=t.memoizedState,a!==n||x!==l||gt.current||Wr?(typeof p=="function"&&(Nl(t,r,p,n),l=t.memoizedState),(a=Wr||ef(t,r,a,n,x,l,f))?(y||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=f,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Ah(e,t),a=t.memoizedProps,f=t.type===t.elementType?a:Vt(t.type,a),o.props=f,y=t.pendingProps,x=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Bt(l):(l=yt(r)?En:ot.current,l=ci(t,l));var g=r.getDerivedStateFromProps;(p=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==y||x!==l)&&tf(t,o,n,l),Wr=!1,x=t.memoizedState,o.state=x,Oo(t,n,o,i);var m=t.memoizedS
Line truncated
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var gi=Z;function Wy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hy=typeof Object.is=="function"?Object.is:Wy,Vy=gi.useState,qy=gi.useEffect,Ky=gi.useLayoutEffect,Xy=gi.useDebugValue;function Yy(e,t){var r=t(),n=Vy({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return Ky(function(){i.value=r,i.getSnapshot=t,$a(i)&&s({inst:i})},[e,r,t]),qy(function(){return $a(i)&&s({inst:i}),e(function(){$a(i)&&s({inst:i})})},[e]),Xy(r),r}function $a(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Hy(e,r)}catch{return!0}}function Zy(e,t){return t()}var Qy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Zy:Yy;Vp.useSyncExternalStore=gi.useSyncExternalStore!==void 0?gi.useSyncExternalStore:Qy;Hp.exports=Vp;var Gy=Hp.exports;/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var oa=Z,Jy=Gy;function ev(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tv=typeof Object.is=="function"?Object.is:ev,rv=Jy.useSyncExternalStore,nv=oa.useRef,iv=oa.useEffect,sv=oa.useMemo,ov=oa.useDebugValue;Wp.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var s=nv(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=sv(function(){function l(g){if(!f){if(f=!0,p=g,g=n(g),i!==void 0&&o.hasValue){var m=o.value;if(i(m,g))return y=m}return y=g}if(m=y,tv(p,g))return m;var u=n(g);return i!==void 0&&i(m,u)?(p=g,m):(p=g,y=u)}var f=!1,p,y,x=r===void 0?null:r;return[function(){return l(t())},x===null?void 0:function(){return l(x())}]},[t,r,n,i]);var a=rv(e,s[0],s[1]);return iv(function(){o.hasValue=!0,o.value=a},[a]),ov(a),a};$p.exports=Wp;var av=$p.exports;const lv=su(av),qp={},{useDebugValue:uv}=ke,{useSyncExternalStoreWithSelector:cv}=lv;let Rf=!1;const fv=e=>e;function dv(e,t=fv,r){(qp?"production":void 0)!=="production"&&r&&!Rf&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Rf=!0);const n=cv(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return uv(n),n}const Tf=e=>{(qp?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?$y(e):e,r=(n,i)=>dv(t,n,i);return Object.assign(r,t),r},hv=e=>e?Tf(e):Tf,me=hv((e,t)=>({theme:"light",setTheme:r=>e({theme:r}),toggleTheme:()=>e(r=>({theme:r.theme==="light"?"dark":"light"})),libraries:[],currentLibraryId:null,setLibraries:r=>e({libraries:r}),setCurrentLibrary:r=>e({currentLibraryId:r}),addLibrary:r=>e(n=>({libraries:[...n.libraries,r]})),removeLibrary:r=>e(n=>({libraries:n.libraries.filter(i=>i.id!==r),currentLibraryId:n.currentLibraryId===r?null:n.currentLibraryId})),images:[],filteredImages:[],totalImageCount:0,setImages:r=>e({images:r,filteredImages:r}),setFilteredImages:r=>e({filteredImages:r}),setTotalImageCount:r=>e({totalImageCount:r}),imageLoadingState:{isLoading:!1,loadedCount:0,totalCount:0,hasMore:!1},setImageLoadingState:r=>e(n=>({imageLoadingState:{...n.imageLoadingState,...r}})),appendImages:r=>e(n=>({images:[...n.images,...r],filteredImages:[...n.filteredImages,...r]})),folders:[],selectedFolder:null,setFolders:r=>e({folders:r}),setSelectedFolder:r=>e({selectedFolder:r}),searchKeywords:"",filters:{formats:[],minSize:null,maxSize:null,startDate:null,endDate:null},setSearchKeywords:r=>e({searchKeywords:r}),setFilters:r=>e(n=>({filters:{...n.filters,...r}})),resetFilters:()=>e({searchKeywords:"",filters:{formats:[],minSize:null,maxSize:null,startDate:null,endDate:null}}),selectedImage:null,setSelectedImage:r=>e({selectedImage:r}),selectedImages:[],setSelectedImages:r=>e({selectedImages:r}),toggleImageSelection:r=>e(n=>n.selectedImages.some(s=>s.path===r.path)?{selectedImages:n.selectedImages.filter(s=>s.path!==r.path)}:{selectedImages:[...n.selectedImages,r]}),clearSelection:()=>e({selectedImages:[],selectedImage:null}),scanProgress:null,scanStartTime:null,setScanProgress:r=>e(n=>r&&!n.scanStartTime&&r.current>0?{scanProgress:r,scanStartTime:Date.now()}:r?{scanProgress:r}:{scanProgress:null,scanStartTime:null}),isResizingPanels:!1,setIsResizingPanels:r=>e({isResizingPanels:r}),resizingSide:null,setResizingSide:r=>e({resizingSide:r}),thumbnailHeight:200,setThumbnailHeight:r=>e({thumbnailHeight:r}),mobileView:"main",setMobileView:r=>e({mobileView:r}),getCurrentLibrary:()=>{const r=t();return r.libraries.find(n=>n.id===r.currentLibraryId)}}));function Kp(e,t){return function(){return e.apply(t,arguments)}}const{toString:pv}=Object.prototype,{getPrototypeOf:sc}=Object,{iterator:aa,toStringTag:Xp}=Symbol,la=(e=>t=>{const r=pv.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Gt=e=>(e=e.toLowerCase(),t=>la(t)===e),ua=e=>t=>typeof t===e,{isArray:ki}=Array,yi=ua("undefined");function xs(e){return e!==null&&!yi(e)&&e.constructor!==null&&!yi(e.constructor)&&wt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Yp=Gt("ArrayBuffer");function mv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Yp(e.buffer),t}const gv=ua("string"),wt=ua("function"),Zp=ua("number"),_s=e=>e!==null&&typeof e=="object",yv=e=>e===!0||e===!1,fo=e=>{if(la(e)!=="object")return!1;const t=sc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Xp in e)&&!(aa in e)},vv=e=>{if(!_s(e)||xs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wv=Gt("Date"),xv=Gt("File"),_v=Gt("Blob"),kv=Gt("FileList"),Sv=e=>_s(e)&&wt(e.pipe),bv=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||wt(e.append)&&((t=Line truncated
|
||||
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&m1[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},zf=Symbol("internals");function Li(e){return e&&String(e).trim().toLowerCase()}function ho(e){return e===!1||e==null?e:K.isArray(e)?e.map(ho):String(e)}function y1(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const v1=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wa(e,t,r,n,i){if(K.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!K.isString(t)){if(K.isString(n))return t.indexOf(n)!==-1;if(K.isRegExp(n))return n.test(t)}}function w1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function x1(e,t){const r=K.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:!0})})}let xt=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(a,l,f){const p=Li(l);if(!p)throw new Error("header name must be a non-empty string");const y=K.findKey(i,p);(!y||i[y]===void 0||f===!0||f===void 0&&i[y]!==!1)&&(i[y||l]=ho(a))}const o=(a,l)=>K.forEach(a,(f,p)=>s(f,p,l));if(K.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(K.isString(t)&&(t=t.trim())&&!v1(t))o(g1(t),r);else if(K.isObject(t)&&K.isIterable(t)){let a={},l,f;for(const p of t){if(!K.isArray(p))throw TypeError("Object iterator must return a key-value pair");a[f=p[0]]=(l=a[f])?K.isArray(l)?[...l,p[1]]:[l,p[1]]:p[1]}o(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Li(t),t){const n=K.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return y1(i);if(K.isFunction(r))return r.call(this,i,n);if(K.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Li(t),t){const n=K.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Wa(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(o){if(o=Li(o),o){const a=K.findKey(n,o);a&&(!r||Wa(n,n[a],a,r))&&(delete n[a],i=!0)}}return K.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||Wa(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return K.forEach(this,(i,s)=>{const o=K.findKey(n,s);if(o){r[o]=ho(i),delete r[s];return}const a=t?w1(s):String(s).trim();a!==s&&delete r[s],r[a]=ho(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return K.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&K.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[zf]=this[zf]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Li(o);n[a]||(x1(i,o),n[a]=!0)}return K.isArray(t)?t.forEach(s):s(t),this}};xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);K.reduceDescriptors(xt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});K.freezeMethods(xt);function Ha(e,t){const r=this||Ss,n=t||r,i=xt.from(n.headers);let s=n.data;return K.forEach(e,function(a){s=a.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function lm(e){return!!(e&&e.__CANCEL__)}function Si(e,t,r){we.call(this,e??"canceled",we.ERR_CANCELED,t,r),this.name="CanceledError"}K.inherits(Si,we,{__CANCEL__:!0});function um(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new we("Request failed with status code "+r.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function _1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function k1(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const f=Date.now(),p=n[s];o||(o=f),r[i]=l,n[i]=f;let y=s,x=0;for(;y!==i;)x+=r[y++],y=y%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),f-o<t)return;const g=p&&f-p;return g?Math.round(x*1e3/g):void 0}}function S1(e,t){let r=0,n=1e3/t,i,s;const o=(f,p=Date.now())=>{r=p,i=null,s&&(clearTimeout(s),s=null),e(...f)};return[(...f)=>{const p=Date.now(),y=p-r;y>=n?o(f,p):(i=f,s||(s=setTimeout(()=>{s=null,o(i)},n-y)))},()=>i&&o(i)]}const Mo=(e,t,r=3)=>{let n=0;const i=k1(50,250);return S1(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-n,f=i(l),p=o<=a;n=o;const y={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:f||void 0,estimated:f&&a&&p?(a-o)/f:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(y)},r)},Lf=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Pf=e=>(...t)=>K.asap(()=>e(...t)),b1=st.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,st.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(st.origin),st.navigator&&/(msie|trident)/i.test(st.navigator.userAgent)):()=>!0,E1=st.hasStandardBrowserEnv?{write(e,t,r,n,i,s,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];K.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),K.isString(n)&&a.push(`path=${n}`),K.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),K.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function C1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function N1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function cm(e,t,r){let n=!C1(t);return e&&(n||r==!1)?N1(e,t):t}const Ff=e=>e instanceof xt?{...e}:e;function On(e,t){t=t||{};const r={};function n(f,p,y,x){return K.isPlainObject(f)&&K.isPlainObject(p)?K.merge.call({caseless:x},f,p):K.isPlainObject(p)?K.merge({},p):K.isArray(p)?p.slice():p}function i(f,p,y,x){if(K.isUndefined(p)){if(!K.isUndefined(f))return n(void 0,f,y,x)}else return n(f,p,y,x)}function s(f,p){if(!K.isUndefined(p))return n(void 0,p)}function o(f,p){if(K.isUndefined(p)){if(!K.isUndefined(f))return n(void 0,f)}else return n(void 0,p)}function a(f,p,y){if(y in t)return n(f,p);if(y in e)return n(void 0,f)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(f,p,y)=>i(Ff(f),Ff(p),y,!0)};return K.forEach(Object.keys({...e,...t}),function(p){const y=l[p]||i,x=y(e[p],t[p],p);K.isUndefined(x)&&y!==a||(r[p]=x)}),r}const fm=e=>{const t=On({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=xt.from(o),t.url=sm(cm(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),K.isFormData(r)){if(st.hasStandardBrowserEnv||st.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(K.isFunction(r.getHeaders)){const l=r.getHeaders(),f=["content-type","content-length"];Object.entries(l).forEach(([p,y])=>{f.inclu
Line truncated
|
||||
`+o.map(Wf).join(`
|
||||
`):" "+Wf(o[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const hm={getAdapter:D1,adapters:lc};function Va(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Si(null,e)}function Hf(e){return Va(e),e.headers=xt.from(e.headers),e.data=Ha.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hm.getAdapter(e.adapter||Ss.adapter,e)(e).then(function(n){return Va(e),n.data=Ha.call(e,e.transformResponse,n),n.headers=xt.from(n.headers),n},function(n){return lm(n)||(Va(e),n&&n.response&&(n.response.data=Ha.call(e,e.transformResponse,n.response),n.response.headers=xt.from(n.response.headers))),Promise.reject(n)})}const pm="1.13.2",fa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fa[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Vf={};fa.transitional=function(t,r,n){function i(s,o){return"[Axios v"+pm+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new we(i(o," has been removed"+(r?" in "+r:"")),we.ERR_DEPRECATED);return r&&!Vf[o]&&(Vf[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,a):!0}};fa.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function M1(e,t,r){if(typeof e!="object")throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new we("option "+s+" must be "+l,we.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new we("Unknown option "+s,we.ERR_BAD_OPTION)}}const po={assertOptions:M1,validators:fa},or=po.validators;let bn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new jf,response:new jf}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
||||
`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=On(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&po.assertOptions(n,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},!1),i!=null&&(K.isFunction(i)?r.paramsSerializer={serialize:i}:po.assertOptions(i,{encode:or.function,serialize:or.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),po.assertOptions(r,{baseUrl:or.spelling("baseURL"),withXsrfToken:or.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&K.merge(s.common,s[r.method]);s&&K.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),r.headers=xt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(r)===!1||(l=l&&u.synchronous,a.unshift(u.fulfilled,u.rejected))});const f=[];this.interceptors.response.forEach(function(u){f.push(u.fulfilled,u.rejected)});let p,y=0,x;if(!l){const m=[Hf.bind(this),void 0];for(m.unshift(...a),m.push(...f),x=m.length,p=Promise.resolve(r);y<x;)p=p.then(m[y++],m[y++]);return p}x=a.length;let g=r;for(;y<x;){const m=a[y++],u=a[y++];try{g=m(g)}catch(v){u.call(this,v);break}}try{p=Hf.call(this,g)}catch(m){return Promise.reject(m)}for(y=0,x=f.length;y<x;)p=p.then(f[y++],f[y++]);return p}getUri(t){t=On(this.defaults,t);const r=cm(t.baseURL,t.url,t.allowAbsoluteUrls);return sm(r,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){bn.prototype[t]=function(r,n){return this.request(On(n||{},{method:t,url:r,data:(n||{}).data}))}});K.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(On(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}bn.prototype[t]=r(),bn.prototype[t+"Form"]=r(!0)});let B1=class mm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,a){n.reason||(n.reason=new Si(s,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new mm(function(i){t=i}),cancel:t}}};function U1(e){return function(r){return e.apply(null,r)}}function $1(e){return K.isObject(e)&&e.isAxiosError===!0}const Gl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Gl).forEach(([e,t])=>{Gl[t]=e});function gm(e){const t=new bn(e),r=Kp(bn.prototype.request,t);return K.extend(r,bn.prototype,t,{allOwnKeys:!0}),K.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return gm(On(e,i))},r}const xe=gm(Ss);xe.Axios=bn;xe.CanceledError=Si;xe.CancelToken=B1;xe.isCancel=lm;xe.VERSION=pm;xe.toFormData=ca;xe.AxiosError=we;xe.Cancel=xe.CanceledError;xe.all=function(t){return Promise.all(t)};xe.spread=U1;xe.isAxiosError=$1;xe.mergeConfig=On;xe.AxiosH
Line truncated
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var W1={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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const H1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ie=(e,t)=>{const r=Z.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:l,...f},p)=>Z.createElement("svg",{ref:p,...W1,width:i,height:i,stroke:n,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${H1(e)}`,a].join(" "),...f},[...t.map(([y,x])=>Z.createElement(y,x)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const V1=Ie("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const q1=Ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Kf=Ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const K1=Ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const X1=Ie("ChevronsDown",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Y1=Ie("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Z1=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Q1=Ie("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const G1=Ie("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const J1=Ie("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ew=Ie("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Xf=Ie("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const tw=Ie("FolderDown",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m15 13-3 3-3-3",key:"6j2sf0"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zi=Ie("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const rw=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Yf=Ie("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const nw=Ie("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const iw=Ie("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",key:"1xcu5"}],["circle",{cx:"17.5",cy:"10.5",r:".5",key:"736e4u"}],["circle",{cx:"8.5",cy:"7.5",r:".5",key:"clrty"}],["circle",{cx:"6.5",cy:"12.5",r:".5",key:"1s4xz9"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const sw=Ie("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ym=Ie("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zf=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Bo=Ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Qf=Ie("Sliders",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Gf=Ie("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ow=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vm=Ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ps={LIBRARY:"library",FOLDER:"folder",IMAGES:"images"};let Jf=0;const aw=()=>(Jf+=1,`req_${Date.now()}_${Jf}`);class lw{constructor(){this.activeRequests=new Map,this.requestContexts=new Map}createRequest(t){const r=aw(),n=new AbortController,i={id:r,type:t,createdAt:Date.now(),abortController:n,signal:n.signal,status:"pending",isActive:!0,cancel:()=>{if(i.isActive){i.isActive=!1,i.status="cancelled",n.abort(),this.requestContexts.delete(r);const s=this.activeRequests.get(t);s&&s.delete(r)}}};return this.requestContexts.set(r,i),this.activeRequests.has(t)||this.activeRequests.set(t,new Map),this.activeRequests.get(t).set(r,i),i}cancelAll(t){const r=this.activeRequests.get(t);if(r){for(const n of r.values())n.cancel();r.clear()}}cancelAllRequests(){for(const t of Object.values(ps))this.cancelAll(t)}isValid(t){const r=this.requestContexts.get(t);return r?r.isActive:!1}complete(t){const r=this.requestContexts.get(t);if(r&&r.isActive){r.status="completed",r.isActive=!1,this.requestContexts.delete(t);const n=this.activeRequests.get(r.type);n&&n.delete(t)}}error(t){const r=this.requestContexts.get(t);if(r&&r.isActive){r.status="error",r.isActive=!1,this.requestContexts.delete(t);const n=this.activeRequests.get(r.type);n&&n.delete(t)}}getActiveCount(t){const r=this.activeRequests.get(t);return r?r.size:0}hasActiveRequests(t){return this.getActiveCount(t)>0}}const Ft=new lw;function Jl(){Ft.cancelAll(ps.IMAGES)}function uw(e){e&&setTimeout(()=>{},300)}const cw=async e=>{try{return(await sn.getStatus(e)).data}catch{return null}};function ed(){const{libraries:e,currentLibraryId:t,folders:r,selectedFolder:n,totalImageCount:i,setCurrentLibrary:s,setSelectedFolder:o,addLibrary:a,removeLibrary:l}=me(),[f,p]=Z.useState(!1),[y,x]=Z.useState(""),[g,m]=Z.useState(""),[u,v]=Z.useState(""),[c,d]=Z.useState(""),[w,k]=Z.useState(new Set),[b,N]=Z.useState(!1),[T,L]=Z.useState(!1),O=Z.useRef(null),F=V=>{d(V),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{v(V)},300)};Z.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const ee=async()=>{if(!y.trim()){alert("请输入素材库名称");return}if(!g.trim()){alert("请输入文件夹路径");return}N(!0);try{console.log("📝 添加素材库...");const V=await Cr.add(y.trim(),g.trim()),M=V.data.id,W=V.data.hasExistingIndex;if(a({id:M,name:y.trim(),path:g.trim()}),x(""),m(""),p(!1),N(!1),console.log("🔄 切换到新素材库..."),await Cr.setCurrent(M),s(M),o(null),me.getState().setImages([]),me.getState().setFolders([]),me.getState().setSelectedImage(null),me.getState().setTotalImageCount(0),me.getState().setScanProgress({libraryId:M,current:0,total:0,percent:0,status:"preparing"}),W){console.log("检测到已有索引,先加载现有数据...");try{const[oe,he]=await Promise.all([$e.getFolders(M),$e.getCount(M)]);me.getState().setFolders(oe.data.folders),me.getState().setTotalImageCount(he.data.count),console.log("✅ 已加载现有数据")}catch(oe){console.warn("⚠️ 加载现有数据失败:",oe)}}console.log("🔍 开始异步扫描..."),W?(console.log("执行增量同步,检测变化..."),sn.sync(M,!1)):(console.log("首次添加,执行全量扫描..."),sn.fullScan(M,!1)),console.log("✅ 扫描已启动,请等待进度显示...")}catch(V){console.error("❌ Error adding library:",V),alert("添加素材库失败: "+V.message),me.getState().setScanProgress(null),N(!1)}},R=async V=>{if(V!==t){L(!0);try{Jl(),Ft.cancelAllRequests(),me.getState().setScanProgress(null),me.getState().setSelectedImage(null),me.getState().setImages([]),me.getState().setFolders([]),me.getState().setImageLoadingState({isLoading:!1,loadedCount:0,totalCount:0,hasMore:!1}),o(null),await Cr.setCurrent(V);const[M,W]=await Promise.all([$e.getFolders(V),$e.getCount(V)]);me.getState().setFolders(M.data.folders),me.getState().setTotalImageCount(W.data.count),s(V),cw(V).then(oe=>{var he,ce;oe&&oe.status==="paused"&&(oe.needsRescan?(me.getState().setScanProgress({...oe.progress,libraryId:V,canStop:!0,isPaused:!0,pendingCount:((he=oe.progress)==null?void 0:he.total)-((ce=oe.progress)==null?void 0:ce.current)||0,needsRescan:!0}),console.log("⏸️ 发现中断的扫描,需要继续完成")):oe.pendingCount>0&&(me.getState().setScanProgress({...oe.progress,libraryId:V,canStop:!0,isPaused:!0,pendingCount:oe.pendingCount}),console.log(`⏸️ 发现暂停的扫描,待处理: ${oe.pendingCount} 张`)))}).catch(()=>{})}catch(M){console.error("Error setting current library:",M),alert("切换素材库失败: "+M.message),me.getState().setImageLoadingState({isLoading:!1})}finally{L(!1)}}},U=async()=>{if(!t)return;const V=e.find(W=>W.id===t);if(!(!V||!confirm(`确定要删除素材库"${V.name}"吗?
|
||||
|
||||
路径: ${V.path}
|
||||
|
||||
⚠️ 注意:
|
||||
• 将删除索引数据并释放数据库连接
|
||||
• 不会删除原始图片文件
|
||||
• .flypic 文件夹将保留,您可以手动删除`)))try{await Cr.delete(t),l(t),me.getState().setImages([]),me.getState().setFolders([]),me.getState().setSelectedImage(null),me.getState().setSelectedFolder(null);const W=e.filter(oe=>oe.id!==t);if(W.length>0){const oe=W[0];await Cr.setCurrent(oe.id),s(oe.id)}console.log(`✅ 素材库已删除: ${V.name}`),console.log(`数据库连接已释放,可手动删除: ${V.path}\\.flypic`)}catch(W){console.error("Error deleting library:",W),alert("删除素材库失败: "+W.message)}},_=V=>{const M=new Set(w);M.has(V)?M.delete(V):M.add(V),k(M)},q=V=>{const M=[],W=oe=>{oe.forEach(he=>{he.children&&he.children.length>0&&(M.push(he.path),W(he.children))})};return W(V),M},se=()=>{const V=q(D.length>0?D:r);k(new Set(V))},Q=()=>{k(new Set)},$=()=>{const V=q(D.length>0?D:r);return V.length>0&&V.every(M=>w.has(M))},D=Z.useMemo(()=>{if(!u)return r;const V=u.trim().toLowerCase().split(/\s+/).filter(he=>he.length>0);if(V.length===0)return r;const M=[],W=he=>he.reduce((ce,fe)=>{const J=fe.name.toLowerCase(),ae=fe.path.toLowerCase(),Y=V.every(z=>J.includes(z)),le=V.every(z=>ae.includes(z));let h=[];return fe.children&&fe.children.length>0&&(h=W(fe.children)),(Y||le||h.length>0)&&(ce.push({...fe,children:h}),h.length>0&&M.push(fe.path)),ce},[]),oe=W(r);return M.length>0&&setTimeout(()=>{k(he=>{const ce=new Set(he);return M.forEach(fe=>ce.add(fe)),ce})},0),oe},[r,u]),H=(V,M)=>{V.stopPropagation(),_(M)},I=V=>{const M=V.children&&V.children.length>0;n!==V.path?(Jl(),o(V.path)):M&&_(V.path)},A=(V,M=0)=>V.map(W=>{const oe=w.has(W.path),he=W.children&&W.children.length>0,ce=n===W.path;return S.jsxs("div",{children:[S.jsxs("div",{className:`flex items-center px-3 py-2 cursor-pointer rounded-md transition-colors ${ce?"bg-blue-50 dark:bg-blue-900":"hover:bg-gray-100 dark:hover:bg-gray-700"}`,style:{paddingLeft:`${M*16+12}px`},onClick:()=>I(W),children:[he?S.jsx("div",{className:"flex items-center justify-center w-5 h-5 mr-1 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600 rounded",onClick:fe=>H(fe,W.path),children:oe?S.jsx(Kf,{className:"w-4 h-4 text-gray-500"}):S.jsx(K1,{className:"w-4 h-4 text-gray-500"})}):S.jsx("div",{className:"w-5 mr-1"}),S.jsx(Zi,{className:"w-4 h-4 mr-2 text-gray-500 flex-shrink-0"}),S.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate flex-1",children:W.name}),S.jsx("span",{className:"text-xs text-gray-400 ml-2 flex-shrink-0",children:W.image_count})]}),he&&oe&&A(W.children,M+1)]},W.path)});return S.jsxs("div",{className:"w-full h-full border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 flex flex-col",children:[S.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:[S.jsx("div",{className:"flex items-center justify-between mb-3",children:S.jsx("h2",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300",children:"素材库"})}),S.jsxs("div",{className:"flex gap-2",children:[S.jsxs("div",{className:"relative flex-1",children:[S.jsxs("select",{value:t||"",onChange:V=>{const M=V.target.value;M==="__add__"?p(!0):M&&R(M)},disabled:T,className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",style:{paddingRight:"2rem"},children:[e.length===0&&S.jsx("option",{value:"",children:"暂无素材库"}),e.map(V=>S.jsx("option",{value:V.id,children:V.name},V.id)),S.jsx("option",{value:"__add__",style:{borderTop:"1px solid #ccc"},children:"+ 添加新素材库"})]}),S.jsx(Kf,{className:"absolute right-2 top-2.5 w-4 h-4 text-gray-400 pointer-events-none"})]}),t&&e.length>0&&S.jsx("button",{onClick:U,className:"px-3 py-2 border border-red-300 dark:border-red-600 rounded-lg hover:bg-red-50 dark:hover:bg-red-900 text-red-600 dark:text-red-400 transition-colors",title:"删除当前素材库",children:S.jsx(ow,{className:"w-4 h-4"})})]}),f&&S.jsxs("div",{className:"mt-3 p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700",children:[S.jsxs("div",{className:"flex items-center justify-between mb-2",children:[S.jsx("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"添加素材库"}),S.jsx("button",{onClick:()=>p(!1),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600",children:S.jsx(vm,{className:"w-4 h-4 text-gray-500"})})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("input",{type:"text",placeholder:"素材库名称",value:y,onChange:V=>x(V.target.value),onKeyDown:V=>V.key==="Enter"&&ee(),autoFocus:!0,className:"w-full px-2 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100"}),S.jsx("input",{type:"text",placeholder:"文件夹路径(例如:C:\\Users\\Pictures)",value:g,onChange:V=>m(V.target.value),onKeyDown:V=>V.key==="Enter"&&ee(),className:"w-full px-2 py
Line truncated
|
||||
|
||||
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
||||
<http://stuartk.com/jszip>
|
||||
|
||||
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
||||
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
||||
|
||||
JSZip uses the library pako released under the MIT license :
|
||||
https://github.com/nodeca/pako/blob/main/LICENSE
|
||||
*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,i,s){function o(f,p){if(!i[f]){if(!n[f]){var y=typeof Xs=="function"&&Xs;if(!p&&y)return y(f,!0);if(a)return a(f,!0);var x=new Error("Cannot find module '"+f+"'");throw x.code="MODULE_NOT_FOUND",x}var g=i[f]={exports:{}};n[f][0].call(g.exports,function(m){var u=n[f][1][m];return o(u||m)},g,g.exports,r,n,i,s)}return i[f].exports}for(var a=typeof Xs=="function"&&Xs,l=0;l<s.length;l++)o(s[l]);return o}({1:[function(r,n,i){var s=r("./utils"),o=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var f,p,y,x,g,m,u,v=[],c=0,d=l.length,w=d,k=s.getTypeOf(l)!=="string";c<l.length;)w=d-c,y=k?(f=l[c++],p=c<d?l[c++]:0,c<d?l[c++]:0):(f=l.charCodeAt(c++),p=c<d?l.charCodeAt(c++):0,c<d?l.charCodeAt(c++):0),x=f>>2,g=(3&f)<<4|p>>4,m=1<w?(15&p)<<2|y>>6:64,u=2<w?63&y:64,v.push(a.charAt(x)+a.charAt(g)+a.charAt(m)+a.charAt(u));return v.join("")},i.decode=function(l){var f,p,y,x,g,m,u=0,v=0,c="data:";if(l.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");var d,w=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&w--,l.charAt(l.length-2)===a.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=o.uint8array?new Uint8Array(0|w):new Array(0|w);u<l.length;)f=a.indexOf(l.charAt(u++))<<2|(x=a.indexOf(l.charAt(u++)))>>4,p=(15&x)<<4|(g=a.indexOf(l.charAt(u++)))>>2,y=(3&g)<<6|(m=a.indexOf(l.charAt(u++))),d[v++]=f,g!==64&&(d[v++]=p),m!==64&&(d[v++]=y);return d}},{"./support":30,"./utils":32}],2:[function(r,n,i){var s=r("./external"),o=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function f(p,y,x,g,m){this.compressedSize=p,this.uncompressedSize=y,this.crc32=x,this.compression=g,this.compressedContent=m}f.prototype={getContentWorker:function(){var p=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),y=this;return p.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},f.createWorkerFrom=function(p,y,x){return p.pipe(new a).pipe(new l("uncompressedSize")).pipe(y.compressWorker(x)).pipe(new l("compressedSize")).withStreamInfo("compression",y)},n.exports=f},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,i){var s=r("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,i){var s=r("./utils"),o=function(){for(var a,l=[],f=0;f<256;f++){a=f;for(var p=0;p<8;p++)a=1&a?3988292384^a>>>1:a>>>1;l[f]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?function(f,p,y,x){var g=o,m=x+y;f^=-1;for(var u=x;u<m;u++)f=f>>>8^g[255&(f^p[u])];return-1^f}(0|l,a,a.length,0):function(f,p,y,x){var g=o,m=x+y;f^=-1;for(var u=x;u<m;u++)f=f>>>8^g[255&(f^p.charCodeAt(u))];return-1^f}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(r,n,i){var s=null;s=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:s}},{lie:37}],7:[function(r,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),f=s?"uint8array":"array";function p(y,x){l.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=x,this.meta={}}i.magic="\b\0",a.inherits(p,l),p.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(f,y.data),!1)},p.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(x){y.push({data:x,meta:y.meta})}},i.compressWorker=function(y){return new p("Deflate",y)},i.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,i){function s(g,m){var u,v="";for(u=0;u<m;u++)v+=String.fromCharCode(255&g),g>>>=8;return v}function o(g,m,u,v,c,d){var w,k,b=g.file,N=g.compression,T=d!==f.Line truncated
|
||||
\0`,M+=s(I,2),M+=N.magic,M+=s(w,2),M+=s(k,2),M+=s(H.crc32,4),M+=s(H.compressedSize,4),M+=s(H.uncompressedSize,4),M+=s(L.length,2),M+=s(q.length,2),{fileRecord:y.LOCAL_FILE_HEADER+M+L+q,dirRecord:y.CENTRAL_FILE_HEADER+s(V,2)+M+s(ee.length,2)+"\0\0\0\0"+s(A,4)+s(v,4)+L+q+ee}}var a=r("../utils"),l=r("../stream/GenericWorker"),f=r("../utf8"),p=r("../crc32"),y=r("../signature");function x(g,m,u,v){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=u,this.encodeFileName=v,this.streamFiles=g,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(x,l),x.prototype.push=function(g){var m=g.meta.percent||0,u=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(g):(this.bytesWritten+=g.data.length,l.prototype.push.call(this,{data:g.data,meta:{currentFile:this.currentFile,percent:u?(m+100*(u-v-1))/u:100}}))},x.prototype.openedSource=function(g){this.currentSourceOffset=this.bytesWritten,this.currentFile=g.file.name;var m=this.streamFiles&&!g.file.dir;if(m){var u=o(g,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:u.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(g){this.accumulate=!1;var m=this.streamFiles&&!g.file.dir,u=o(g,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),m)this.push({data:function(v){return y.DATA_DESCRIPTOR+s(v.crc32,4)+s(v.compressedSize,4)+s(v.uncompressedSize,4)}(g),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var g=this.bytesWritten,m=0;m<this.dirRecords.length;m++)this.push({data:this.dirRecords[m],meta:{percent:100}});var u=this.bytesWritten-g,v=function(c,d,w,k,b){var N=a.transformTo("string",b(k));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(c,2)+s(c,2)+s(d,4)+s(w,4)+s(N.length,2)+N}(this.dirRecords.length,u,g,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(g){this._sources.push(g);var m=this;return g.on("data",function(u){m.processChunk(u)}),g.on("end",function(){m.closedSource(m.previous.streamInfo),m._sources.length?m.prepareNextSource():m.end()}),g.on("error",function(u){m.error(u)}),this},x.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(g){var m=this._sources;if(!l.prototype.error.call(this,g))return!1;for(var u=0;u<m.length;u++)try{m[u].error(g)}catch{}return!0},x.prototype.lock=function(){l.prototype.lock.call(this);for(var g=this._sources,m=0;m<g.length;m++)g[m].lock()},n.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,i){var s=r("../compressions"),o=r("./ZipFileWorker");i.generateWorker=function(a,l,f){var p=new o(l.streamFiles,f,l.platform,l.encodeFileName),y=0;try{a.forEach(function(x,g){y++;var m=function(d,w){var k=d||w,b=s[k];if(!b)throw new Error(k+" is not a valid compression method !");return b}(g.options.compression,l.compression),u=g.options.compressionOptions||l.compressionOptions||{},v=g.dir,c=g.date;g._compressWorker(m,u).withStreamInfo("file",{name:x,dir:v,date:c,comment:g.comment||"",unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions}).pipe(p)}),p.entriesCount=y}catch(x){p.error(x)}return p}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,i){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=r("./object")).loadAsync=r("./load"),s.support=r("./support"),s.defaults=r("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=r("./external"),n.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,i){var s=r("./utils"),o=r("./external"),a=r("./utf8"),l=r("./zipEntries"),f=r("./stream/Crc32Probe"),p=r("./nodejsUtils");function y(x){return new o.Promise(function(g,m){var u=x.decompressed.getContentWorker().pipe(new f);u.on("error",function(v){m(v)}).on("end",function(){u.streamInfo.crc32!==x.decompressed.crc32?m(new Error("Corrupted zip : CRC32 mismatch")):g()}).resume()})}n.exports=function(x,g){var m=this
Line truncated
|
||||
`),V=H.map(M=>M.filename).join(`
|
||||
`);try{await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([A],{type:"text/html"}),"text/plain":new Blob([V],{type:"text/plain"})})]),c(!0),setTimeout(()=>c(!1),2e3)}catch(M){console.error("写入剪贴板失败:",M),alert(`复制失败。
|
||||
|
||||
提示:浏览器限制,多张图片会以 HTML 格式复制。
|
||||
可粘贴到 Word、富文本编辑器等。
|
||||
|
||||
如需单独使用,请使用"导出"功能。`)}}catch(H){console.error("复制图片失败:",H),alert("复制图片失败,请重试")}},se=async()=>{w(!0);try{const H=F?t:[e];if(H.length===1){const I=$e.getOriginalUrl(r,H[0].path),A=document.createElement("a");A.href=I,A.download=H[0].filename,A.target="_blank",document.body.appendChild(A),A.click(),document.body.removeChild(A)}else{const I=new hd,A=I.folder("images");b(0);for(let W=0;W<H.length;W++){const oe=H[W],he=$e.getOriginalUrl(r,oe.path);try{const fe=await(await fetch(he)).blob();A.file(oe.filename,fe);const J=Math.round((W+1)/H.length*90);b(J),console.log(`已添加: ${oe.filename} (${W+1}/${H.length})`)}catch(ce){console.error(`下载失败: ${oe.filename}`,ce)}}b(95),console.log("正在生成 ZIP 文件...");const V=await I.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}});b(100);const M=document.createElement("a");M.href=URL.createObjectURL(V),M.download=`FlyPic_导出_${H.length}张_${Date.now()}.zip`,document.body.appendChild(M),M.click(),document.body.removeChild(M),URL.revokeObjectURL(M.href),console.log("导出完成!")}}catch(H){console.error("导出失败:",H),alert("导出失败,请重试")}finally{w(!1)}},Q=async()=>{if(!n){alert("请先选择一个文件夹");return}T(!0),O(0);try{const H=i.filter(oe=>oe.folder&&oe.folder.startsWith(n));if(H.length===0){alert("当前文件夹没有图片");return}const I=new hd,A=n.split("/").pop()||"images",V=I.folder(A);for(let oe=0;oe<H.length;oe++){const he=H[oe],ce=$e.getOriginalUrl(r,he.path);try{const J=await(await fetch(ce)).blob(),ae=he.folder.replace(n,"").replace(/^\//,""),Y=ae?`${ae}/${he.filename}`:he.filename;V.file(Y,J);const le=Math.round((oe+1)/H.length*90);O(le),console.log(`已添加: ${Y} (${oe+1}/${H.length})`)}catch(fe){console.error(`下载失败: ${he.filename}`,fe)}}O(95),console.log("正在生成 ZIP 文件...");const M=await I.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}});O(100);const W=document.createElement("a");W.href=URL.createObjectURL(M),W.download=`${A}_${H.length}张_${Date.now()}.zip`,document.body.appendChild(W),W.click(),document.body.removeChild(W),URL.revokeObjectURL(W.href),console.log("文件夹导出完成!")}catch(H){console.error("导出文件夹失败:",H),alert("导出文件夹失败,请重试")}finally{T(!1)}},$=H=>H<1024?H+" B":H<1024*1024?(H/1024).toFixed(2)+" KB":(H/(1024*1024)).toFixed(2)+" MB",D=H=>new Date(H).toLocaleString("zh-CN");return S.jsxs("div",{className:"w-full border-l border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 flex flex-col h-full",children:[l&&S.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 flex items-center",children:S.jsxs("button",{onClick:()=>s("main"),className:"flex items-center gap-2 text-gray-700 dark:text-gray-300 hover:text-blue-500",children:[S.jsx(V1,{className:"w-5 h-5"}),S.jsx("span",{className:"text-sm font-medium",children:"返回"})]})}),S.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:S.jsxs("div",{className:"w-full aspect-square bg-gray-100 dark:bg-gray-700 rounded-lg overflow-hidden relative",children:[S.jsx("img",{src:p,alt:ee.filename,decoding:"async",className:`w-full h-full object-contain transition-opacity duration-300 ${x?"opacity-75":"opacity-100"}`}),x&&S.jsx("div",{className:"absolute top-2 right-2 bg-blue-500 text-white text-xs px-2 py-1 rounded",children:"加载原图中..."})]})}),S.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4 min-h-0",children:S.jsxs("div",{children:[S.jsx("h3",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"基本信息"}),S.jsxs("div",{className:"space-y-2 text-sm",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"文件名:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100 break-all",children:e.filename})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"尺寸:"}),S.jsxs("p",{className:"text-gray-900 dark:text-gray-100",children:[e.width," × ",e.height]})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"大小:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100",children:$(e.size)})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"格式:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100 uppercase",children:e.format})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"创建时间:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100",children:D(e.created_at)})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"修改时间:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100",children:D(e.modified_at)})]}),S.jsxs("div",{children:[S.jsx("span",{className
Line truncated
|
||||
@@ -0,0 +1,224 @@
|
||||
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gf={exports:{}},$o={},yf={exports:{}},Se={};/**
|
||||
* @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 ms=Symbol.for("react.element"),Sm=Symbol.for("react.portal"),bm=Symbol.for("react.fragment"),Em=Symbol.for("react.strict_mode"),Cm=Symbol.for("react.profiler"),Nm=Symbol.for("react.provider"),Rm=Symbol.for("react.context"),Tm=Symbol.for("react.forward_ref"),Om=Symbol.for("react.suspense"),Im=Symbol.for("react.memo"),Am=Symbol.for("react.lazy"),fc=Symbol.iterator;function jm(e){return e===null||typeof e!="object"?null:(e=fc&&e[fc]||e["@@iterator"],typeof e=="function"?e:null)}var vf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wf=Object.assign,xf={};function vi(e,t,n){this.props=e,this.context=t,this.refs=xf,this.updater=n||vf}vi.prototype.isReactComponent={};vi.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")};vi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _f(){}_f.prototype=vi.prototype;function ou(e,t,n){this.props=e,this.context=t,this.refs=xf,this.updater=n||vf}var au=ou.prototype=new _f;au.constructor=ou;wf(au,vi.prototype);au.isPureReactComponent=!0;var hc=Array.isArray,kf=Object.prototype.hasOwnProperty,lu={current:null},Sf={key:!0,ref:!0,__self:!0,__source:!0};function bf(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)kf.call(t,r)&&!Sf.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),d=0;d<a;d++)l[d]=arguments[d+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:ms,type:e,key:s,ref:o,props:i,_owner:lu.current}}function zm(e,t){return{$$typeof:ms,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function uu(e){return typeof e=="object"&&e!==null&&e.$$typeof===ms}function Lm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pc=/\/+/g;function ha(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Lm(""+e.key):t.toString(36)}function Ys(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ms:case Sm:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ha(o,0):r,hc(i)?(n="",e!=null&&(n=e.replace(pc,"$&/")+"/"),Ys(i,t,n,"",function(d){return d})):i!=null&&(uu(i)&&(i=zm(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(pc,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",hc(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+ha(s,a);o+=Ys(s,t,n,l,i)}else if(l=jm(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+ha(s,a++),o+=Ys(s,t,n,l,i);else if(s==="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 o}function Cs(e,t,n){if(e==null)return e;var r=[],i=0;return Ys(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Pm(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 ft={current:null},Zs={transition:null},Fm={ReactCurrentDispatcher:ft,ReactCurrentBatchConfig:Zs,ReactCurrentOwner:lu};function Ef(){throw Error("act(...) is not supported in production builds of React.")}Se.Children={map:Cs,forEach:function(e,t,n){Cs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Cs(e,function(){t++}),t},toArray:function(e){return Cs(e,function(t){return t})||[]},only:function(e){if(!uu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Component=vi;Se.Fragment=bm;Se.Profiler=Cm;Se.PureComponent=ou;Se.StrictMode=Em;Se.Suspense=Om;Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fm;Se.act=Ef;Se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=wf({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=lu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)kf.call(t,l)&&!Sf.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var d=0;d<l;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:ms,type:e.type,key:i,ref:s,props:r,_owner:o}};Se.createContext=function(e){return e={$$typeof:Rm,_currentValue:e,_currentValue2:e,_threadCountLine truncated
|
||||
* @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 Dm=Z,Mm=Symbol.for("react.element"),Bm=Symbol.for("react.fragment"),Um=Object.prototype.hasOwnProperty,$m=Dm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wm={key:!0,ref:!0,__self:!0,__source:!0};function Cf(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Um.call(t,r)&&!Wm.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Mm,type:e,key:s,ref:o,props:i,_owner:$m.current}}$o.Fragment=Bm;$o.jsx=Cf;$o.jsxs=Cf;gf.exports=$o;var S=gf.exports,Za={},Nf={exports:{}},Nt={},Rf={exports:{}},Tf={};/**
|
||||
* @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(H,U){var ee=H.length;H.push(U);e:for(;0<ee;){var z=ee-1>>>1,F=H[z];if(0<i(F,U))H[z]=U,H[ee]=F,ee=z;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var U=H[0],ee=H.pop();if(ee!==U){H[0]=ee;e:for(var z=0,F=H.length,A=F>>>1;z<A;){var B=2*(z+1)-1,D=H[B],le=B+1,de=H[le];if(0>i(D,ee))le<F&&0>i(de,D)?(H[z]=de,H[le]=ee,z=le):(H[z]=D,H[B]=ee,z=B);else if(le<F&&0>i(de,ee))H[z]=de,H[le]=ee,z=le;else break e}}return U}function i(H,U){var ee=H.sortIndex-U.sortIndex;return ee!==0?ee:H.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],d=[],p=1,y=null,x=3,g=!1,m=!1,u=!1,v=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(H){for(var U=n(d);U!==null;){if(U.callback===null)r(d);else if(U.startTime<=H)r(d),U.sortIndex=U.expirationTime,t(l,U);else break;U=n(d)}}function k(H){if(u=!1,w(H),!m)if(n(l)!==null)m=!0,ce(b);else{var U=n(d);U!==null&&Q(k,U.startTime-H)}}function b(H,U){m=!1,u&&(u=!1,c(P),P=-1),g=!0;var ee=x;try{for(w(U),y=n(l);y!==null&&(!(y.expirationTime>U)||H&&!J());){var z=y.callback;if(typeof z=="function"){y.callback=null,x=y.priorityLevel;var F=z(y.expirationTime<=U);U=e.unstable_now(),typeof F=="function"?y.callback=F:y===n(l)&&r(l),w(U)}else r(l);y=n(l)}if(y!==null)var A=!0;else{var B=n(d);B!==null&&Q(k,B.startTime-U),A=!1}return A}finally{y=null,x=ee,g=!1}}var N=!1,T=null,P=-1,O=5,M=-1;function J(){return!(e.unstable_now()-M<O)}function R(){if(T!==null){var H=e.unstable_now();M=H;var U=!0;try{U=T(!0,H)}finally{U?W():(N=!1,T=null)}}else N=!1}var W;if(typeof h=="function")W=function(){h(R)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,V=_.port2;_.port1.onmessage=R,W=function(){V.postMessage(null)}}else W=function(){v(R,0)};function ce(H){T=H,N||(N=!0,W())}function Q(H,U){P=v(function(){H(e.unstable_now())},U)}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(H){H.callback=null},e.unstable_continueExecution=function(){m||g||(m=!0,ce(b))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(H){switch(x){case 1:case 2:case 3:var U=3;break;default:U=x}var ee=x;x=U;try{return H()}finally{x=ee}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,U){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ee=x;x=H;try{return U()}finally{x=ee}},e.unstable_scheduleCallback=function(H,U,ee){var z=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?z+ee:z):ee=z,H){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=ee+F,H={id:p++,callback:U,priorityLevel:H,startTime:ee,expirationTime:F,sortIndex:-1},ee>z?(H.sortIndex=ee,t(d,H),n(l)===null&&H===n(d)&&(u?(c(P),P=-1):u=!0,Q(k,ee-z))):(H.sortIndex=F,t(l,H),m||g||(m=!0,ce(b))),H},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(H){var U=x;return function(){var ee=x;x=U;try{return H.apply(this,arguments)}finally{x=ee}}}})(Tf);Rf.exports=Tf;var Hm=Rf.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 Vm=Z,Ct=Hm;function ae(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 Of=new Set,Qi={};function Ir(e,t){ui(e,t),ui(e+"Capture",t)}function ui(e,t){for(Qi[e]=t,e=0;e<t.length;e++)Of.add(t[e])}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qa=Object.prototype.hasOwnProperty,qm=/^[: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]*$/,mc={},gc={};function Km(e){return Qa.call(gc,e)?!0:Qa.call(mc,e)?!1:qm.test(e)?gc[e]=!0:(mc[e]=!0,!1)}function Xm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ym(e,t,n,r){if(t===null||typeof t>"u"||Xm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new ht(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){et[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var cu=/[\-:]([a-z])/g;function du(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(cu,du);et[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(cu,du);et[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(cu,du);et[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function fu(e,t,n,r){var i=et.hasOwnProperty(t)?et[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!==
Line truncated
|
||||
`+pa+e}var ma=!1;function ga(e,t){if(!e||ma)return"";ma=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
|
||||
`),s=r.stack.split(`
|
||||
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
||||
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{ma=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pi(e):""}function Zm(e){switch(e.tag){case 5:return Pi(e.type);case 16:return Pi("Lazy");case 13:return Pi("Suspense");case 19:return Pi("SuspenseList");case 0:case 2:case 15:return e=ga(e.type,!1),e;case 11:return e=ga(e.type.render,!1),e;case 1:return e=ga(e.type,!0),e;default:return""}}function tl(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 Hr:return"Fragment";case Wr:return"Portal";case Ga:return"Profiler";case hu:return"StrictMode";case Ja:return"Suspense";case el:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Af:return(e.displayName||"Context")+".Consumer";case If:return(e._context.displayName||"Context")+".Provider";case pu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mu:return t=e.displayName||null,t!==null?t:tl(e.type)||"Memo";case Wn:t=e._payload,e=e._init;try{return tl(e(t))}catch{}}return null}function Qm(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 tl(t);case 8:return t===hu?"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 or(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gm(e){var t=zf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rs(e){e._valueTracker||(e._valueTracker=Gm(e))}function Lf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function mo(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 nl(e,t){var n=t.checked;return Ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Pf(e,t){t=t.checked,t!=null&&fu(e,"checked",t,!1)}function rl(e,t){Pf(e,t);var n=or(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?il(e,t.type,n):t.hasOwnProperty("defaultValue")&&il(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function il(e,t,n){(t!=="number"||mo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fi=Array.isArray;function ni(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+or(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function sl(e,t){if(t.dan
Line truncated
|
||||
`).replace(lg,"")}function Ps(e,t,n){if(t=$c(t),$c(e)!==t&&n)throw Error(ae(425))}function So(){}var vl=null,wl=null;function xl(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 _l=typeof setTimeout=="function"?setTimeout:void 0,ug=typeof clearTimeout=="function"?clearTimeout:void 0,Wc=typeof Promise=="function"?Promise:void 0,cg=typeof queueMicrotask=="function"?queueMicrotask:typeof Wc<"u"?function(e){return Wc.resolve(null).then(e).catch(dg)}:_l;function dg(e){setTimeout(function(){throw e})}function Ta(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ns(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ns(t)}function Jn(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 Hc(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 xi=Math.random().toString(36).slice(2),un="__reactFiber$"+xi,as="__reactProps$"+xi,An="__reactContainer$"+xi,kl="__reactEvents$"+xi,fg="__reactListeners$"+xi,hg="__reactHandles$"+xi;function vr(e){var t=e[un];if(t)return t;for(var n=e.parentNode;n;){if(t=n[An]||n[un]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hc(e);e!==null;){if(n=e[un])return n;e=Hc(e)}return t}e=n,n=e.parentNode}return null}function vs(e){return e=e[un]||e[An],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ae(33))}function Ko(e){return e[as]||null}var Sl=[],Yr=-1;function ur(e){return{current:e}}function Le(e){0>Yr||(e.current=Sl[Yr],Sl[Yr]=null,Yr--)}function Oe(e,t){Yr++,Sl[Yr]=e.current,e.current=t}var ar={},ot=ur(ar),gt=ur(!1),Er=ar;function ci(e,t){var n=e.type.contextTypes;if(!n)return ar;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yt(e){return e=e.childContextTypes,e!=null}function bo(){Le(gt),Le(ot)}function Vc(e,t,n){if(ot.current!==ar)throw Error(ae(168));Oe(ot,t),Oe(gt,n)}function bh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,Qm(e)||"Unknown",i));return Ue({},n,r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ar,Er=ot.current,Oe(ot,e),Oe(gt,gt.current),!0}function qc(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=bh(e,t,Er),r.__reactInternalMemoizedMergedChildContext=e,Le(gt),Le(ot),Oe(ot,e)):Le(gt),Oe(gt,n)}var Cn=null,Xo=!1,Oa=!1;function Eh(e){Cn===null?Cn=[e]:Cn.push(e)}function pg(e){Xo=!0,Eh(e)}function cr(){if(!Oa&&Cn!==null){Oa=!0;var e=0,t=Re;try{var n=Cn;for(Re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Cn=null,Xo=!1}catch(i){throw Cn!==null&&(Cn=Cn.slice(e+1)),Zf(yu,cr),i}finally{Re=t,Oa=!1}}return null}var Zr=[],Qr=0,Co=null,No=0,zt=[],Lt=0,Cr=null,Rn=1,Tn="";function mr(e,t){Zr[Qr++]=No,Zr[Qr++]=Co,Co=e,No=t}function Ch(e,t,n){zt[Lt++]=Rn,zt[Lt++]=Tn,zt[Lt++]=Cr,Cr=e;var r=Rn;e=Tn;var i=32-Yt(r)-1;r&=~(1<<i),n+=1;var s=32-Yt(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Rn=1<<32-Yt(t)+i|n<<i|r,Tn=s+e}else Rn=1<<s|n<<i|r,Tn=e}function Cu(e){e.return!==null&&(mr(e,1),Ch(e,1,0))}function Nu(e){for(;e===Co;)Co=Zr[--Qr],Zr[Qr]=null,No=Zr[--Qr],Zr[Qr]=null;for(;e===Cr;)Cr=zt[--Lt],zt[Lt]=null,Tn=zt[--Lt],zt[Lt]=null,Rn=zt[--Lt],zt[Lt]=null}var Et=null,bt=null,Fe=!1,Xt=null;function Nh(e,t){var n=Dt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Kc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Et=e,bt=Jn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Et=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Cr!==null?{id:Rn,overflow:Tn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Et=e,bt=null,!0):!1;default:return!1}}function bl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function El(e){if(Fe){var t=bt;if(t){var n=t;if(!Kc(e,t)){if(bl(e))throw Error(ae(418));t=Jn(n.nextSibling);var r=Et;t&&Kc(e,t)?Nh(r,n):(e.flags=e.flags&-4097|2,Fe=!1,Et=e)}}else{if(bl(e))throw Error(ae(418));e.flags=e.flags&-4097|2,Fe=!1,Et=e}}}function Xc(e){
Line truncated
|
||||
Error generating stack: `+s.message+`
|
||||
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function La(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Tl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Sg=typeof WeakMap=="function"?WeakMap:Map;function ep(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Lo||(Lo=!0,Ml=r),Tl(e,t)},n}function tp(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Tl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Tl(e,t),typeof r!="function"&&(tr===null?tr=new Set([this]):tr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Sg;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Fg.bind(null,e,t,n),t.then(e,e))}function rd(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 id(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=On(-1,1),t.tag=2,er(n,t,1))),n.lanes|=1),e)}var bg=Ln.ReactCurrentOwner,mt=!1;function ct(e,t,n,r){t.child=e===null?Oh(t,null,n,r):fi(t,e.child,n,r)}function sd(e,t,n,r,i){n=n.render;var s=t.ref;return oi(t,i),r=Du(e,t,n,r,s,i),n=Mu(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zn(e,t,i)):(Fe&&n&&Cu(t),t.flags|=1,ct(e,t,r,i),t.child)}function od(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Yu(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,np(e,t,s,r,i)):(e=oo(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:is,n(o,r)&&e.ref===t.ref)return zn(e,t,i)}return t.flags|=1,e=rr(s,r),e.ref=t.ref,e.return=t,t.child=e}function np(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(is(s,r)&&e.ref===t.ref)if(mt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(mt=!0);else return t.lanes=e.lanes,zn(e,t,i)}return Ol(e,t,n,r,i)}function rp(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oe(ei,St),St|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oe(ei,St),St|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Oe(ei,St),St|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Oe(ei,St),St|=r;return ct(e,t,i,n),t.child}function ip(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ol(e,t,n,r,i){var s=yt(n)?Er:ot.current;return s=ci(t,s),oi(t,i),n=Du(e,t,n,r,s,i),r=Mu(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zn(e,t,i)):(Fe&&r&&Cu(t),t.flags|=1,ct(e,t,n,i),t.child)}function ad(e,t,n,r,i){if(yt(n)){var s=!0;Eo(t)}else s=!1;if(oi(t,i),t.stateNode===null)ro(e,t),Jh(t,n,r),Rl(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,d=n.contextType;typeof d=="object"&&d!==null?d=Bt(d):(d=yt(n)?Er:ot.current,d=ci(t,d));var p=n.getDerivedStateFromProps,y=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function";y||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==d)&&td(t,o,r,d),Hn=!1;var x=t.memoizedState;o.state=x,Oo(t,r,o,i),l=t.memoizedState,a!==r||x!==l||gt.current||Hn?(typeof p=="function"&&(Nl(t,n,p,r),l=t.memoizedState),(a=Hn||ed(t,n,a,r,x,l,d))?(y||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=d,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ah(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:Vt(t.type,a),o.props=d,y=t.pendingProps,x=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Bt(l):(l=yt(n)?Er:ot.current,l=ci(t,l));var g=n.getDerivedStateFromProps;(p=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==y||x!==l)&&td(t,o,r,l),Hn=!1,x=t.memoizedState,o.state=x,Oo(t,r,o,i);var m=t.memoizedS
Line truncated
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var gi=Z;function Wy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hy=typeof Object.is=="function"?Object.is:Wy,Vy=gi.useState,qy=gi.useEffect,Ky=gi.useLayoutEffect,Xy=gi.useDebugValue;function Yy(e,t){var n=t(),r=Vy({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Ky(function(){i.value=n,i.getSnapshot=t,$a(i)&&s({inst:i})},[e,n,t]),qy(function(){return $a(i)&&s({inst:i}),e(function(){$a(i)&&s({inst:i})})},[e]),Xy(n),n}function $a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hy(e,n)}catch{return!0}}function Zy(e,t){return t()}var Qy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Zy:Yy;Vp.useSyncExternalStore=gi.useSyncExternalStore!==void 0?gi.useSyncExternalStore:Qy;Hp.exports=Vp;var Gy=Hp.exports;/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var oa=Z,Jy=Gy;function ev(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tv=typeof Object.is=="function"?Object.is:ev,nv=Jy.useSyncExternalStore,rv=oa.useRef,iv=oa.useEffect,sv=oa.useMemo,ov=oa.useDebugValue;Wp.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=rv(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=sv(function(){function l(g){if(!d){if(d=!0,p=g,g=r(g),i!==void 0&&o.hasValue){var m=o.value;if(i(m,g))return y=m}return y=g}if(m=y,tv(p,g))return m;var u=r(g);return i!==void 0&&i(m,u)?(p=g,m):(p=g,y=u)}var d=!1,p,y,x=n===void 0?null:n;return[function(){return l(t())},x===null?void 0:function(){return l(x())}]},[t,n,r,i]);var a=nv(e,s[0],s[1]);return iv(function(){o.hasValue=!0,o.value=a},[a]),ov(a),a};$p.exports=Wp;var av=$p.exports;const lv=su(av),qp={},{useDebugValue:uv}=ke,{useSyncExternalStoreWithSelector:cv}=lv;let Nd=!1;const dv=e=>e;function fv(e,t=dv,n){(qp?"production":void 0)!=="production"&&n&&!Nd&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Nd=!0);const r=cv(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return uv(r),r}const Rd=e=>{(qp?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?$y(e):e,n=(r,i)=>fv(t,r,i);return Object.assign(n,t),n},hv=e=>e?Rd(e):Rd,me=hv((e,t)=>({theme:"light",setTheme:n=>e({theme:n}),toggleTheme:()=>e(n=>({theme:n.theme==="light"?"dark":"light"})),libraries:[],currentLibraryId:null,setLibraries:n=>e({libraries:n}),setCurrentLibrary:n=>e({currentLibraryId:n}),addLibrary:n=>e(r=>({libraries:[...r.libraries,n]})),removeLibrary:n=>e(r=>({libraries:r.libraries.filter(i=>i.id!==n),currentLibraryId:r.currentLibraryId===n?null:r.currentLibraryId})),images:[],filteredImages:[],totalImageCount:0,setImages:n=>e({images:n,filteredImages:n}),setFilteredImages:n=>e({filteredImages:n}),setTotalImageCount:n=>e({totalImageCount:n}),imageLoadingState:{isLoading:!1,loadedCount:0,totalCount:0,hasMore:!1},setImageLoadingState:n=>e(r=>({imageLoadingState:{...r.imageLoadingState,...n}})),appendImages:n=>e(r=>({images:[...r.images,...n],filteredImages:[...r.filteredImages,...n]})),folders:[],selectedFolder:null,setFolders:n=>e({folders:n}),setSelectedFolder:n=>e({selectedFolder:n}),searchKeywords:"",filters:{formats:[],minSize:null,maxSize:null,startDate:null,endDate:null},setSearchKeywords:n=>e({searchKeywords:n}),setFilters:n=>e(r=>({filters:{...r.filters,...n}})),resetFilters:()=>e({searchKeywords:"",filters:{formats:[],minSize:null,maxSize:null,startDate:null,endDate:null}}),selectedImage:null,setSelectedImage:n=>e({selectedImage:n}),selectedImages:[],setSelectedImages:n=>e({selectedImages:n}),toggleImageSelection:n=>e(r=>r.selectedImages.some(s=>s.path===n.path)?{selectedImages:r.selectedImages.filter(s=>s.path!==n.path)}:{selectedImages:[...r.selectedImages,n]}),clearSelection:()=>e({selectedImages:[],selectedImage:null}),scanProgress:null,scanStartTime:null,setScanProgress:n=>e(r=>n&&!r.scanStartTime&&n.current>0?{scanProgress:n,scanStartTime:Date.now()}:n?{scanProgress:n}:{scanProgress:null,scanStartTime:null}),isResizingPanels:!1,setIsResizingPanels:n=>e({isResizingPanels:n}),resizingSide:null,setResizingSide:n=>e({resizingSide:n}),thumbnailHeight:200,setThumbnailHeight:n=>e({thumbnailHeight:n}),mobileView:"main",setMobileView:n=>e({mobileView:n}),getCurrentLibrary:()=>{const n=t();return n.libraries.find(r=>r.id===n.currentLibraryId)}}));function Kp(e,t){return function(){return e.apply(t,arguments)}}const{toString:pv}=Object.prototype,{getPrototypeOf:sc}=Object,{iterator:aa,toStringTag:Xp}=Symbol,la=(e=>t=>{const n=pv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gt=e=>(e=e.toLowerCase(),t=>la(t)===e),ua=e=>t=>typeof t===e,{isArray:ki}=Array,yi=ua("undefined");function xs(e){return e!==null&&!yi(e)&&e.constructor!==null&&!yi(e.constructor)&&wt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Yp=Gt("ArrayBuffer");function mv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Yp(e.buffer),t}const gv=ua("string"),wt=ua("function"),Zp=ua("number"),_s=e=>e!==null&&typeof e=="object",yv=e=>e===!0||e===!1,fo=e=>{if(la(e)!=="object")return!1;const t=sc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Xp in e)&&!(aa in e)},vv=e=>{if(!_s(e)||xs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wv=Gt("Date"),xv=Gt("File"),_v=Gt("Blob"),kv=Gt("FileList"),Sv=e=>_s(e)&&wt(e.pipe),bv=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||wt(e.append)&&((t=Line truncated
|
||||
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&m1[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},jd=Symbol("internals");function Li(e){return e&&String(e).trim().toLowerCase()}function ho(e){return e===!1||e==null?e:K.isArray(e)?e.map(ho):String(e)}function y1(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const v1=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wa(e,t,n,r,i){if(K.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!K.isString(t)){if(K.isString(r))return t.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(t)}}function w1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function x1(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let xt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,d){const p=Li(l);if(!p)throw new Error("header name must be a non-empty string");const y=K.findKey(i,p);(!y||i[y]===void 0||d===!0||d===void 0&&i[y]!==!1)&&(i[y||l]=ho(a))}const o=(a,l)=>K.forEach(a,(d,p)=>s(d,p,l));if(K.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(K.isString(t)&&(t=t.trim())&&!v1(t))o(g1(t),n);else if(K.isObject(t)&&K.isIterable(t)){let a={},l,d;for(const p of t){if(!K.isArray(p))throw TypeError("Object iterator must return a key-value pair");a[d=p[0]]=(l=a[d])?K.isArray(l)?[...l,p[1]]:[l,p[1]]:p[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=Li(t),t){const r=K.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return y1(i);if(K.isFunction(n))return n.call(this,i,r);if(K.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Li(t),t){const r=K.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Wa(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=Li(o),o){const a=K.findKey(r,o);a&&(!n||Wa(r,r[a],a,n))&&(delete r[a],i=!0)}}return K.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Wa(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return K.forEach(this,(i,s)=>{const o=K.findKey(r,s);if(o){n[o]=ho(i),delete n[s];return}const a=t?w1(s):String(s).trim();a!==s&&delete n[s],n[a]=ho(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&K.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[jd]=this[jd]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Li(o);r[a]||(x1(i,o),r[a]=!0)}return K.isArray(t)?t.forEach(s):s(t),this}};xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);K.reduceDescriptors(xt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});K.freezeMethods(xt);function Ha(e,t){const n=this||Ss,r=t||n,i=xt.from(r.headers);let s=r.data;return K.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function lm(e){return!!(e&&e.__CANCEL__)}function Si(e,t,n){we.call(this,e??"canceled",we.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(Si,we,{__CANCEL__:!0});function um(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function _1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function k1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const d=Date.now(),p=r[s];o||(o=d),n[i]=l,r[i]=d;let y=s,x=0;for(;y!==i;)x+=n[y++],y=y%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),d-o<t)return;const g=p&&d-p;return g?Math.round(x*1e3/g):void 0}}function S1(e,t){let n=0,r=1e3/t,i,s;const o=(d,p=Date.now())=>{n=p,i=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const p=Date.now(),y=p-n;y>=r?o(d,p):(i=d,s||(s=setTimeout(()=>{s=null,o(i)},r-y)))},()=>i&&o(i)]}const Mo=(e,t,n=3)=>{let r=0;const i=k1(50,250);return S1(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,d=i(l),p=o<=a;r=o;const y={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:d||void 0,estimated:d&&a&&p?(a-o)/d:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(y)},n)},zd=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ld=e=>(...t)=>K.asap(()=>e(...t)),b1=st.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,st.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(st.origin),st.navigator&&/(msie|trident)/i.test(st.navigator.userAgent)):()=>!0,E1=st.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),K.isString(r)&&a.push(`path=${r}`),K.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),K.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function C1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function N1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function cm(e,t,n){let r=!C1(t);return e&&(r||n==!1)?N1(e,t):t}const Pd=e=>e instanceof xt?{...e}:e;function Or(e,t){t=t||{};const n={};function r(d,p,y,x){return K.isPlainObject(d)&&K.isPlainObject(p)?K.merge.call({caseless:x},d,p):K.isPlainObject(p)?K.merge({},p):K.isArray(p)?p.slice():p}function i(d,p,y,x){if(K.isUndefined(p)){if(!K.isUndefined(d))return r(void 0,d,y,x)}else return r(d,p,y,x)}function s(d,p){if(!K.isUndefined(p))return r(void 0,p)}function o(d,p){if(K.isUndefined(p)){if(!K.isUndefined(d))return r(void 0,d)}else return r(void 0,p)}function a(d,p,y){if(y in t)return r(d,p);if(y in e)return r(void 0,d)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(d,p,y)=>i(Pd(d),Pd(p),y,!0)};return K.forEach(Object.keys({...e,...t}),function(p){const y=l[p]||i,x=y(e[p],t[p],p);K.isUndefined(x)&&y!==a||(n[p]=x)}),n}const dm=e=>{const t=Or({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=xt.from(o),t.url=sm(cm(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),K.isFormData(n)){if(st.hasStandardBrowserEnv||st.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const l=n.getHeaders(),d=["content-type","content-length"];Object.entries(l).forEach(([p,y])=>{d.inclu
Line truncated
|
||||
`+o.map($d).join(`
|
||||
`):" "+$d(o[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const hm={getAdapter:D1,adapters:lc};function Va(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Si(null,e)}function Wd(e){return Va(e),e.headers=xt.from(e.headers),e.data=Ha.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hm.getAdapter(e.adapter||Ss.adapter,e)(e).then(function(r){return Va(e),r.data=Ha.call(e,e.transformResponse,r),r.headers=xt.from(r.headers),r},function(r){return lm(r)||(Va(e),r&&r.response&&(r.response.data=Ha.call(e,e.transformResponse,r.response),r.response.headers=xt.from(r.response.headers))),Promise.reject(r)})}const pm="1.13.2",da={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{da[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Hd={};da.transitional=function(t,n,r){function i(s,o){return"[Axios v"+pm+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new we(i(o," has been removed"+(n?" in "+n:"")),we.ERR_DEPRECATED);return n&&!Hd[o]&&(Hd[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};da.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function M1(e,t,n){if(typeof e!="object")throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new we("option "+s+" must be "+l,we.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new we("Unknown option "+s,we.ERR_BAD_OPTION)}}const po={assertOptions:M1,validators:da},an=po.validators;let br=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ad,response:new Ad}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||||
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Or(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&po.assertOptions(r,{silentJSONParsing:an.transitional(an.boolean),forcedJSONParsing:an.transitional(an.boolean),clarifyTimeoutError:an.transitional(an.boolean)},!1),i!=null&&(K.isFunction(i)?n.paramsSerializer={serialize:i}:po.assertOptions(i,{encode:an.function,serialize:an.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),po.assertOptions(n,{baseUrl:an.spelling("baseURL"),withXsrfToken:an.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&K.merge(s.common,s[n.method]);s&&K.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=xt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(n)===!1||(l=l&&u.synchronous,a.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let p,y=0,x;if(!l){const m=[Wd.bind(this),void 0];for(m.unshift(...a),m.push(...d),x=m.length,p=Promise.resolve(n);y<x;)p=p.then(m[y++],m[y++]);return p}x=a.length;let g=n;for(;y<x;){const m=a[y++],u=a[y++];try{g=m(g)}catch(v){u.call(this,v);break}}try{p=Wd.call(this,g)}catch(m){return Promise.reject(m)}for(y=0,x=d.length;y<x;)p=p.then(d[y++],d[y++]);return p}getUri(t){t=Or(this.defaults,t);const n=cm(t.baseURL,t.url,t.allowAbsoluteUrls);return sm(n,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){br.prototype[t]=function(n,r){return this.request(Or(r||{},{method:t,url:n,data:(r||{}).data}))}});K.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Or(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}br.prototype[t]=n(),br.prototype[t+"Form"]=n(!0)});let B1=class mm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Si(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new mm(function(i){t=i}),cancel:t}}};function U1(e){return function(n){return e.apply(null,n)}}function $1(e){return K.isObject(e)&&e.isAxiosError===!0}const Gl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Gl).forEach(([e,t])=>{Gl[t]=e});function gm(e){const t=new br(e),n=Kp(br.prototype.request,t);return K.extend(n,br.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return gm(Or(e,i))},n}const xe=gm(Ss);xe.Axios=br;xe.CanceledError=Si;xe.CancelToken=B1;xe.isCancel=lm;xe.VERSION=pm;xe.toFormData=ca;xe.AxiosError=we;xe.Cancel=xe.CanceledError;xe.all=function(t){return Promise.all(t)};xe.spread=U1;xe.isAxiosError=$1;xe.mergeConfig=Or;xe.AxiosH
Line truncated
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var W1={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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const H1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ie=(e,t)=>{const n=Z.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:l,...d},p)=>Z.createElement("svg",{ref:p,...W1,width:i,height:i,stroke:r,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${H1(e)}`,a].join(" "),...d},[...t.map(([y,x])=>Z.createElement(y,x)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const V1=Ie("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const q1=Ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const qd=Ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const K1=Ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const X1=Ie("ChevronsDown",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Y1=Ie("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Z1=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Q1=Ie("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const G1=Ie("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const J1=Ie("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ew=Ie("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Kd=Ie("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const tw=Ie("FolderDown",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m15 13-3 3-3-3",key:"6j2sf0"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zi=Ie("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const nw=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Xd=Ie("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const rw=Ie("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const iw=Ie("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",key:"1xcu5"}],["circle",{cx:"17.5",cy:"10.5",r:".5",key:"736e4u"}],["circle",{cx:"8.5",cy:"7.5",r:".5",key:"clrty"}],["circle",{cx:"6.5",cy:"12.5",r:".5",key:"1s4xz9"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const sw=Ie("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ym=Ie("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Yd=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Bo=Ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zd=Ie("Sliders",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Qd=Ie("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
||||
* @license lucide-react v0.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ow=Ie("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.300.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vm=Ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ps={LIBRARY:"library",FOLDER:"folder",IMAGES:"images"};let Gd=0;const aw=()=>(Gd+=1,`req_${Date.now()}_${Gd}`);class lw{constructor(){this.activeRequests=new Map,this.requestContexts=new Map}createRequest(t){const n=aw(),r=new AbortController,i={id:n,type:t,createdAt:Date.now(),abortController:r,signal:r.signal,status:"pending",isActive:!0,cancel:()=>{if(i.isActive){i.isActive=!1,i.status="cancelled",r.abort(),this.requestContexts.delete(n);const s=this.activeRequests.get(t);s&&s.delete(n)}}};return this.requestContexts.set(n,i),this.activeRequests.has(t)||this.activeRequests.set(t,new Map),this.activeRequests.get(t).set(n,i),i}cancelAll(t){const n=this.activeRequests.get(t);if(n){for(const r of n.values())r.cancel();n.clear()}}cancelAllRequests(){for(const t of Object.values(ps))this.cancelAll(t)}isValid(t){const n=this.requestContexts.get(t);return n?n.isActive:!1}complete(t){const n=this.requestContexts.get(t);if(n&&n.isActive){n.status="completed",n.isActive=!1,this.requestContexts.delete(t);const r=this.activeRequests.get(n.type);r&&r.delete(t)}}error(t){const n=this.requestContexts.get(t);if(n&&n.isActive){n.status="error",n.isActive=!1,this.requestContexts.delete(t);const r=this.activeRequests.get(n.type);r&&r.delete(t)}}getActiveCount(t){const n=this.activeRequests.get(t);return n?n.size:0}hasActiveRequests(t){return this.getActiveCount(t)>0}}const Ft=new lw;function Jl(){Ft.cancelAll(ps.IMAGES)}function uw(e){e&&setTimeout(()=>{},300)}const cw=async e=>{try{return(await sr.getStatus(e)).data}catch{return null}};function Jd(){const{libraries:e,currentLibraryId:t,folders:n,selectedFolder:r,totalImageCount:i,setCurrentLibrary:s,setSelectedFolder:o,addLibrary:a,removeLibrary:l}=me(),[d,p]=Z.useState(!1),[y,x]=Z.useState(""),[g,m]=Z.useState(""),[u,v]=Z.useState(""),[c,h]=Z.useState(""),[w,k]=Z.useState(new Set),[b,N]=Z.useState(!1),[T,P]=Z.useState(!1),O=Z.useRef(null),M=A=>{h(A),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{v(A)},300)};Z.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const J=async()=>{if(!y.trim()){alert("请输入素材库名称");return}if(!g.trim()){alert("请输入文件夹路径");return}N(!0);try{console.log("📝 添加素材库...");const A=await Nn.add(y.trim(),g.trim()),B=A.data.id,D=A.data.hasExistingIndex;if(a({id:B,name:y.trim(),path:g.trim()}),x(""),m(""),p(!1),N(!1),console.log("🔄 切换到新素材库..."),await Nn.setCurrent(B),s(B),o(null),me.getState().setImages([]),me.getState().setFolders([]),me.getState().setSelectedImage(null),me.getState().setTotalImageCount(0),me.getState().setScanProgress({libraryId:B,current:0,total:0,percent:0,status:"preparing"}),D){console.log("检测到已有索引,先加载现有数据...");try{const[le,de]=await Promise.all([Me.getFolders(B),Me.getCount(B)]);me.getState().setFolders(le.data.folders),me.getState().setTotalImageCount(de.data.count),console.log("✅ 已加载现有数据")}catch(le){console.warn("⚠️ 加载现有数据失败:",le)}}console.log("🔍 开始异步扫描..."),D?(console.log("执行增量同步,检测变化..."),sr.sync(B,!1)):(console.log("首次添加,执行全量扫描..."),sr.fullScan(B,!1)),console.log("✅ 扫描已启动,请等待进度显示...")}catch(A){console.error("❌ Error adding library:",A),alert("添加素材库失败: "+A.message),me.getState().setScanProgress(null),N(!1)}},R=async A=>{if(A!==t){P(!0);try{Jl(),Ft.cancelAllRequests(),me.getState().setScanProgress(null),me.getState().setSelectedImage(null),me.getState().setImages([]),me.getState().setFolders([]),me.getState().setImageLoadingState({isLoading:!1,loadedCount:0,totalCount:0,hasMore:!1}),o(null),await Nn.setCurrent(A);const[B,D]=await Promise.all([Me.getFolders(A),Me.getCount(A)]);me.getState().setFolders(B.data.folders),me.getState().setTotalImageCount(D.data.count),s(A),cw(A).then(le=>{var de,ue;le&&le.status==="paused"&&(le.needsRescan?(me.getState().setScanProgress({...le.progress,libraryId:A,canStop:!0,isPaused:!0,pendingCount:((de=le.progress)==null?void 0:de.total)-((ue=le.progress)==null?void 0:ue.current)||0,needsRescan:!0}),console.log("⏸️ 发现中断的扫描,需要继续完成")):le.pendingCount>0&&(me.getState().setScanProgress({...le.progress,libraryId:A,canStop:!0,isPaused:!0,pendingCount:le.pendingCount}),console.log(`⏸️ 发现暂停的扫描,待处理: ${le.pendingCount} 张`)))}).catch(()=>{})}catch(B){console.error("Error setting current library:",B),alert("切换素材库失败: "+B.message),me.getState().setImageLoadingState({isLoading:!1})}finally{P(!1)}}},W=async()=>{if(!t)return;const A=e.find(D=>D.id===t);if(!(!A||!confirm(`确定要删除素材库"${A.name}"吗?
|
||||
|
||||
路径: ${A.path}
|
||||
|
||||
⚠️ 注意:
|
||||
• 将删除索引数据并释放数据库连接
|
||||
• 不会删除原始图片文件
|
||||
• .flypic 文件夹将保留,您可以手动删除`)))try{await Nn.delete(t),l(t),me.getState().setImages([]),me.getState().setFolders([]),me.getState().setSelectedImage(null),me.getState().setSelectedFolder(null);const D=e.filter(le=>le.id!==t);if(D.length>0){const le=D[0];await Nn.setCurrent(le.id),s(le.id)}console.log(`✅ 素材库已删除: ${A.name}`),console.log(`数据库连接已释放,可手动删除: ${A.path}\\.flypic`)}catch(D){console.error("Error deleting library:",D),alert("删除素材库失败: "+D.message)}},_=A=>{const B=new Set(w);B.has(A)?B.delete(A):B.add(A),k(B)},V=A=>{const B=[],D=le=>{le.forEach(de=>{de.children&&de.children.length>0&&(B.push(de.path),D(de.children))})};return D(A),B},ce=()=>{const A=V(U.length>0?U:n);k(new Set(A))},Q=()=>{k(new Set)},H=()=>{const A=V(U.length>0?U:n);return A.length>0&&A.every(B=>w.has(B))},U=Z.useMemo(()=>{if(!u)return n;const A=u.trim().toLowerCase().split(/\s+/).filter(de=>de.length>0);if(A.length===0)return n;const B=[],D=de=>de.reduce((ue,se)=>{const X=se.name.toLowerCase(),re=se.path.toLowerCase(),q=A.every(I=>X.includes(I)),ne=A.every(I=>re.includes(I));let f=[];return se.children&&se.children.length>0&&(f=D(se.children)),(q||ne||f.length>0)&&(ue.push({...se,children:f}),f.length>0&&B.push(se.path)),ue},[]),le=D(n);return B.length>0&&setTimeout(()=>{k(de=>{const ue=new Set(de);return B.forEach(se=>ue.add(se)),ue})},0),le},[n,u]),ee=(A,B)=>{A.stopPropagation(),_(B)},z=A=>{const B=A.children&&A.children.length>0;r!==A.path?(Jl(),o(A.path)):B&&_(A.path)},F=(A,B=0)=>A.map(D=>{const le=w.has(D.path),de=D.children&&D.children.length>0,ue=r===D.path;return S.jsxs("div",{children:[S.jsxs("div",{className:`flex items-center px-3 py-2 cursor-pointer rounded-md transition-colors ${ue?"bg-blue-50 dark:bg-blue-900":"hover:bg-gray-100 dark:hover:bg-gray-700"}`,style:{paddingLeft:`${B*16+12}px`},onClick:()=>z(D),children:[de?S.jsx("div",{className:"flex items-center justify-center w-5 h-5 mr-1 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600 rounded",onClick:se=>ee(se,D.path),children:le?S.jsx(qd,{className:"w-4 h-4 text-gray-500"}):S.jsx(K1,{className:"w-4 h-4 text-gray-500"})}):S.jsx("div",{className:"w-5 mr-1"}),S.jsx(Zi,{className:"w-4 h-4 mr-2 text-gray-500 flex-shrink-0"}),S.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate flex-1",children:D.name}),S.jsx("span",{className:"text-xs text-gray-400 ml-2 flex-shrink-0",children:D.image_count})]}),de&&le&&F(D.children,B+1)]},D.path)});return S.jsxs("div",{className:"w-full h-full border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 flex flex-col",children:[S.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:[S.jsx("div",{className:"flex items-center justify-between mb-3",children:S.jsx("h2",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300",children:"素材库"})}),S.jsxs("div",{className:"flex gap-2",children:[S.jsxs("div",{className:"relative flex-1",children:[S.jsxs("select",{value:t||"",onChange:A=>{const B=A.target.value;B==="__add__"?p(!0):B&&R(B)},disabled:T,className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",style:{paddingRight:"2rem"},children:[e.length===0&&S.jsx("option",{value:"",children:"暂无素材库"}),e.map(A=>S.jsx("option",{value:A.id,children:A.name},A.id)),S.jsx("option",{value:"__add__",style:{borderTop:"1px solid #ccc"},children:"+ 添加新素材库"})]}),S.jsx(qd,{className:"absolute right-2 top-2.5 w-4 h-4 text-gray-400 pointer-events-none"})]}),t&&e.length>0&&S.jsx("button",{onClick:W,className:"px-3 py-2 border border-red-300 dark:border-red-600 rounded-lg hover:bg-red-50 dark:hover:bg-red-900 text-red-600 dark:text-red-400 transition-colors",title:"删除当前素材库",children:S.jsx(ow,{className:"w-4 h-4"})})]}),d&&S.jsxs("div",{className:"mt-3 p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700",children:[S.jsxs("div",{className:"flex items-center justify-between mb-2",children:[S.jsx("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"添加素材库"}),S.jsx("button",{onClick:()=>p(!1),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600",children:S.jsx(vm,{className:"w-4 h-4 text-gray-500"})})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("input",{type:"text",placeholder:"素材库名称",value:y,onChange:A=>x(A.target.value),onKeyDown:A=>A.key==="Enter"&&J(),autoFocus:!0,className:"w-full px-2 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100"}),S.jsx("input",{type:"text",placeholder:"文件夹路径(例如:C:\\Users\\Pictures)",value:g,onChange:A=>m(A.target.value),onKeyDown:A=>A.key==="Enter"&&J(),className:"w-full px-2 py
Line truncated
|
||||
|
||||
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
||||
<http://stuartk.com/jszip>
|
||||
|
||||
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
||||
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
||||
|
||||
JSZip uses the library pako released under the MIT license :
|
||||
https://github.com/nodeca/pako/blob/main/LICENSE
|
||||
*/(function(e,t){(function(n){e.exports=n()})(function(){return function n(r,i,s){function o(d,p){if(!i[d]){if(!r[d]){var y=typeof Xs=="function"&&Xs;if(!p&&y)return y(d,!0);if(a)return a(d,!0);var x=new Error("Cannot find module '"+d+"'");throw x.code="MODULE_NOT_FOUND",x}var g=i[d]={exports:{}};r[d][0].call(g.exports,function(m){var u=r[d][1][m];return o(u||m)},g,g.exports,n,r,i,s)}return i[d].exports}for(var a=typeof Xs=="function"&&Xs,l=0;l<s.length;l++)o(s[l]);return o}({1:[function(n,r,i){var s=n("./utils"),o=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var d,p,y,x,g,m,u,v=[],c=0,h=l.length,w=h,k=s.getTypeOf(l)!=="string";c<l.length;)w=h-c,y=k?(d=l[c++],p=c<h?l[c++]:0,c<h?l[c++]:0):(d=l.charCodeAt(c++),p=c<h?l.charCodeAt(c++):0,c<h?l.charCodeAt(c++):0),x=d>>2,g=(3&d)<<4|p>>4,m=1<w?(15&p)<<2|y>>6:64,u=2<w?63&y:64,v.push(a.charAt(x)+a.charAt(g)+a.charAt(m)+a.charAt(u));return v.join("")},i.decode=function(l){var d,p,y,x,g,m,u=0,v=0,c="data:";if(l.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");var h,w=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&w--,l.charAt(l.length-2)===a.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|w):new Array(0|w);u<l.length;)d=a.indexOf(l.charAt(u++))<<2|(x=a.indexOf(l.charAt(u++)))>>4,p=(15&x)<<4|(g=a.indexOf(l.charAt(u++)))>>2,y=(3&g)<<6|(m=a.indexOf(l.charAt(u++))),h[v++]=d,g!==64&&(h[v++]=p),m!==64&&(h[v++]=y);return h}},{"./support":30,"./utils":32}],2:[function(n,r,i){var s=n("./external"),o=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),l=n("./stream/DataLengthProbe");function d(p,y,x,g,m){this.compressedSize=p,this.uncompressedSize=y,this.crc32=x,this.compression=g,this.compressedContent=m}d.prototype={getContentWorker:function(){var p=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),y=this;return p.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(p,y,x){return p.pipe(new a).pipe(new l("uncompressedSize")).pipe(y.compressWorker(x)).pipe(new l("compressedSize")).withStreamInfo("compression",y)},r.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,i){var s=n("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,i){var s=n("./utils"),o=function(){for(var a,l=[],d=0;d<256;d++){a=d;for(var p=0;p<8;p++)a=1&a?3988292384^a>>>1:a>>>1;l[d]=a}return l}();r.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?function(d,p,y,x){var g=o,m=x+y;d^=-1;for(var u=x;u<m;u++)d=d>>>8^g[255&(d^p[u])];return-1^d}(0|l,a,a.length,0):function(d,p,y,x){var g=o,m=x+y;d^=-1;for(var u=x;u<m;u++)d=d>>>8^g[255&(d^p.charCodeAt(u))];return-1^d}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(n,r,i){var s=null;s=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:s}},{lie:37}],7:[function(n,r,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=n("pako"),a=n("./utils"),l=n("./stream/GenericWorker"),d=s?"uint8array":"array";function p(y,x){l.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=x,this.meta={}}i.magic="\b\0",a.inherits(p,l),p.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(d,y.data),!1)},p.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(x){y.push({data:x,meta:y.meta})}},i.compressWorker=function(y){return new p("Deflate",y)},i.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,i){function s(g,m){var u,v="";for(u=0;u<m;u++)v+=String.fromCharCode(255&g),g>>>=8;return v}function o(g,m,u,v,c,h){var w,k,b=g.file,N=g.compression,T=h!==d.Line truncated
|
||||
\0`,B+=s(z,2),B+=N.magic,B+=s(w,2),B+=s(k,2),B+=s(ee.crc32,4),B+=s(ee.compressedSize,4),B+=s(ee.uncompressedSize,4),B+=s(P.length,2),B+=s(V.length,2),{fileRecord:y.LOCAL_FILE_HEADER+B+P+V,dirRecord:y.CENTRAL_FILE_HEADER+s(A,2)+B+s(J.length,2)+"\0\0\0\0"+s(F,4)+s(v,4)+P+V+J}}var a=n("../utils"),l=n("../stream/GenericWorker"),d=n("../utf8"),p=n("../crc32"),y=n("../signature");function x(g,m,u,v){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=u,this.encodeFileName=v,this.streamFiles=g,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(x,l),x.prototype.push=function(g){var m=g.meta.percent||0,u=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(g):(this.bytesWritten+=g.data.length,l.prototype.push.call(this,{data:g.data,meta:{currentFile:this.currentFile,percent:u?(m+100*(u-v-1))/u:100}}))},x.prototype.openedSource=function(g){this.currentSourceOffset=this.bytesWritten,this.currentFile=g.file.name;var m=this.streamFiles&&!g.file.dir;if(m){var u=o(g,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:u.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(g){this.accumulate=!1;var m=this.streamFiles&&!g.file.dir,u=o(g,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),m)this.push({data:function(v){return y.DATA_DESCRIPTOR+s(v.crc32,4)+s(v.compressedSize,4)+s(v.uncompressedSize,4)}(g),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var g=this.bytesWritten,m=0;m<this.dirRecords.length;m++)this.push({data:this.dirRecords[m],meta:{percent:100}});var u=this.bytesWritten-g,v=function(c,h,w,k,b){var N=a.transformTo("string",b(k));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(c,2)+s(c,2)+s(h,4)+s(w,4)+s(N.length,2)+N}(this.dirRecords.length,u,g,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(g){this._sources.push(g);var m=this;return g.on("data",function(u){m.processChunk(u)}),g.on("end",function(){m.closedSource(m.previous.streamInfo),m._sources.length?m.prepareNextSource():m.end()}),g.on("error",function(u){m.error(u)}),this},x.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(g){var m=this._sources;if(!l.prototype.error.call(this,g))return!1;for(var u=0;u<m.length;u++)try{m[u].error(g)}catch{}return!0},x.prototype.lock=function(){l.prototype.lock.call(this);for(var g=this._sources,m=0;m<g.length;m++)g[m].lock()},r.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,i){var s=n("../compressions"),o=n("./ZipFileWorker");i.generateWorker=function(a,l,d){var p=new o(l.streamFiles,d,l.platform,l.encodeFileName),y=0;try{a.forEach(function(x,g){y++;var m=function(h,w){var k=h||w,b=s[k];if(!b)throw new Error(k+" is not a valid compression method !");return b}(g.options.compression,l.compression),u=g.options.compressionOptions||l.compressionOptions||{},v=g.dir,c=g.date;g._compressWorker(m,u).withStreamInfo("file",{name:x,dir:v,date:c,comment:g.comment||"",unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions}).pipe(p)}),p.entriesCount=y}catch(x){p.error(x)}return p}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,i){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,i){var s=n("./utils"),o=n("./external"),a=n("./utf8"),l=n("./zipEntries"),d=n("./stream/Crc32Probe"),p=n("./nodejsUtils");function y(x){return new o.Promise(function(g,m){var u=x.decompressed.getContentWorker().pipe(new d);u.on("error",function(v){m(v)}).on("end",function(){u.streamInfo.crc32!==x.decompressed.crc32?m(new Error("Corrupted zip : CRC32 mismatch")):g()}).resume()})}r.exports=function(x,g){var m=thi
Line truncated
|
||||
(当前浏览器环境限制,无法直接复制图片)`)):alert(`复制失败,请手动复制图片链接:
|
||||
`+A)}catch(A){console.error("复制图片失败:",A),alert("复制图片失败,请重试")}},Q=async A=>new Promise(async B=>{try{const D=document.createElement("div");D.setAttribute("contenteditable","true"),D.style.position="fixed",D.style.left="-9999px",D.style.top="-9999px",D.style.opacity="0",document.body.appendChild(D);for(const{url:se,filename:X}of A)try{const q=await(await fetch(se)).blob(),ne=new Image;ne.crossOrigin="anonymous",await new Promise((E,j)=>{ne.onload=E,ne.onerror=j,ne.src=URL.createObjectURL(q)});const f=document.createElement("canvas");f.width=ne.width,f.height=ne.height,f.getContext("2d").drawImage(ne,0,0),URL.revokeObjectURL(ne.src);const L=f.toDataURL("image/png"),C=document.createElement("img");C.src=L,C.alt=X,C.style.display="block",C.style.marginBottom="10px",D.appendChild(C)}catch(re){console.error(`加载图片失败: ${X}`,re)}await new Promise(se=>setTimeout(se,100));const le=document.createRange();le.selectNodeContents(D);const de=window.getSelection();de.removeAllRanges(),de.addRange(le);let ue=!1;try{ue=document.execCommand("copy")}catch(se){console.error("execCommand copy 失败:",se)}de.removeAllRanges(),document.body.removeChild(D),B(ue)}catch(D){console.error("批量复制图片失败:",D),B(!1)}}),H=async()=>{try{const A=P?t:[e];if(A.length===1){await ce();return}const B=A.map(ue=>({url:Me.getOriginalUrl(n,ue.path),filename:ue.filename})),D=A.map(ue=>ue.filename).join(`
|
||||
`);if(R())try{const se=(await Promise.all(A.map(async X=>{const re=Me.getOriginalUrl(n,X.path),ne=await(await fetch(re)).blob();return new Promise(f=>{const I=new FileReader;I.onloadend=()=>{f({dataUrl:I.result,filename:X.filename})},I.readAsDataURL(ne)})}))).map(({dataUrl:X,filename:re})=>`<img src="${X}" alt="${re}" style="display:block; margin:10px 0;">`).join(`
|
||||
`);await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([se],{type:"text/html"}),"text/plain":new Blob([D],{type:"text/plain"})})]),u(!0),setTimeout(()=>u(!1),2e3);return}catch(ue){console.warn("Clipboard API 失败,尝试备用方案:",ue)}if(console.log("尝试 contenteditable 批量复制方案..."),await Q(B)){u(!0),setTimeout(()=>u(!1),2e3);return}console.warn("批量图片复制失败,降级为复制文件名"),V(D)?(u(!0),setTimeout(()=>u(!1),2e3),alert(`已复制 ${A.length} 个文件名到剪贴板
|
||||
(当前环境限制,建议使用"导出"功能)`)):alert('复制失败,请使用"导出"功能下载图片')}catch(A){console.error("复制图片失败:",A),alert("复制图片失败,请重试")}},U=async()=>{c(!0);try{const A=P?t:[e];if(A.length===1){const B=Me.getOriginalUrl(n,A[0].path),D=document.createElement("a");D.href=B,D.download=A[0].filename,D.target="_blank",document.body.appendChild(D),D.click(),document.body.removeChild(D)}else{const B=new hf,D=B.folder("images");w(0);for(let ue=0;ue<A.length;ue++){const se=A[ue],X=Me.getOriginalUrl(n,se.path);try{const q=await(await fetch(X)).blob();D.file(se.filename,q);const ne=Math.round((ue+1)/A.length*90);w(ne),console.log(`已添加: ${se.filename} (${ue+1}/${A.length})`)}catch(re){console.error(`下载失败: ${se.filename}`,re)}}w(95),console.log("正在生成 ZIP 文件...");const le=await B.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}});w(100);const de=document.createElement("a");de.href=URL.createObjectURL(le),de.download=`FlyPic_导出_${A.length}张_${Date.now()}.zip`,document.body.appendChild(de),de.click(),document.body.removeChild(de),URL.revokeObjectURL(de.href),console.log("导出完成!")}}catch(A){console.error("导出失败:",A),alert("导出失败,请重试")}finally{c(!1)}},ee=async()=>{if(!r){alert("请先选择一个文件夹");return}b(!0),T(0);try{const A=i.filter(se=>se.folder&&se.folder.startsWith(r));if(A.length===0){alert("当前文件夹没有图片");return}const B=new hf,D=r.split("/").pop()||"images",le=B.folder(D);for(let se=0;se<A.length;se++){const X=A[se],re=Me.getOriginalUrl(n,X.path);try{const ne=await(await fetch(re)).blob(),f=X.folder.replace(r,"").replace(/^\//,""),I=f?`${f}/${X.filename}`:X.filename;le.file(I,ne);const L=Math.round((se+1)/A.length*90);T(L),console.log(`已添加: ${I} (${se+1}/${A.length})`)}catch(q){console.error(`下载失败: ${X.filename}`,q)}}T(95),console.log("正在生成 ZIP 文件...");const de=await B.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}});T(100);const ue=document.createElement("a");ue.href=URL.createObjectURL(de),ue.download=`${D}_${A.length}张_${Date.now()}.zip`,document.body.appendChild(ue),ue.click(),document.body.removeChild(ue),URL.revokeObjectURL(ue.href),console.log("文件夹导出完成!")}catch(A){console.error("导出文件夹失败:",A),alert("导出文件夹失败,请重试")}finally{b(!1)}},z=A=>A<1024?A+" B":A<1024*1024?(A/1024).toFixed(2)+" KB":(A/(1024*1024)).toFixed(2)+" MB",F=A=>new Date(A).toLocaleString("zh-CN");return S.jsxs("div",{className:"w-full border-l border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 flex flex-col h-full",children:[l&&S.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 flex items-center",children:S.jsxs("button",{onClick:()=>s("main"),className:"flex items-center gap-2 text-gray-700 dark:text-gray-300 hover:text-blue-500",children:[S.jsx(V1,{className:"w-5 h-5"}),S.jsx("span",{className:"text-sm font-medium",children:"返回"})]})}),S.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:S.jsxs("div",{className:"w-full aspect-square bg-gray-100 dark:bg-gray-700 rounded-lg overflow-hidden relative",children:[S.jsx("img",{src:p,alt:O.filename,decoding:"async",className:`w-full h-full object-contain transition-opacity duration-300 ${x?"opacity-75":"opacity-100"}`}),x&&S.jsx("div",{className:"absolute top-2 right-2 bg-blue-500 text-white text-xs px-2 py-1 rounded",children:"加载原图中..."})]})}),S.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4 min-h-0",children:S.jsxs("div",{children:[S.jsx("h3",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"基本信息"}),S.jsxs("div",{className:"space-y-2 text-sm",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"文件名:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100 break-all",children:e.filename})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"尺寸:"}),S.jsxs("p",{className:"text-gray-900 dark:text-gray-100",children:[e.width," × ",e.height]})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"大小:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100",children:z(e.size)})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"格式:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100 uppercase",children:e.format})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"创建时间:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100",children:F(e.created_at)})]}),S.jsxs("div",{children:[S.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"修改时间:"}),S.jsx("p",{className:"text-gray-900 dark:text-gray-100",
Line truncated
|
||||
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>FlyPic 飞图 - 图片素材库管理</title>
|
||||
<script type="module" crossorigin src="/assets/index-BQRQ1pO1.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CGwCzICz.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-lXh_CTLb.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,5 +27,26 @@
|
||||
"helpText": "默认端口为 15002,如果该端口被占用,请修改为其他可用端口。"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"stepTitle": "使用说明",
|
||||
"items": [
|
||||
{
|
||||
"type": "tips",
|
||||
"helpText": "<div style=\"text-align: center; padding: 20px 0;\"><div style=\"font-size: 32px; color: #ff4d00; font-weight: 900; text-shadow: 1px 1px 2px rgba(0,0,0,0.1);\">⚠️ <strong>重要提示</strong></div><div style=\"font-size: 18px; color: #666; margin-top: 10px;\">使用前请仔细阅读以下说明</div></div>"
|
||||
},
|
||||
{
|
||||
"type": "tips",
|
||||
"helpText": "<div style=\"text-align: center; background: #fff8e6; border: 1px solid #ffe58f; border-radius: 8px; padding: 16px; margin: 20px 0;\"><div style=\"font-size: 18px; font-weight: bold; color: #d48806; margin-bottom: 8px;\"><strong>📁 素材库路径</strong></div><div style=\"font-size: 14px; color: #666;\">添加素材库时需输入飞牛文件系统的<strong>完整路径</strong></div><div style=\"font-size: 16px; color: #1890ff; background: #f0f5ff; padding: 8px 16px; border-radius: 4px; margin-top: 8px; font-family: monospace;\">/vol1/1000/图片库</div></div>"
|
||||
},
|
||||
{
|
||||
"type": "tips",
|
||||
"helpText": "<div style=\"text-align: center; background: #fff1f0; border: 1px solid #ffa39e; border-radius: 8px; padding: 16px; margin: 20px 0;\"><div style=\"font-size: 18px; font-weight: bold; color: #cf1322; margin-bottom: 8px;\"><strong>🔐 文件夹权限(必须配置)</strong></div><div style=\"font-size: 14px; color: #666;\">请确保应用对素材库文件夹有<strong>读取权限</strong></div><div style=\"font-size: 14px; color: #cf1322; margin-top: 8px;\">👉 在飞牛「应用设置」→「授权目录」中添加素材库路径</div></div>"
|
||||
},
|
||||
{
|
||||
"type": "tips",
|
||||
"helpText": "<div style=\"text-align: center; background: #f6ffed; border: 1px solid #b7eb8f; border-radius: 8px; padding: 16px; margin: 20px 0;\"><div style=\"font-size: 18px; font-weight: bold; color: #389e0d; margin-bottom: 8px;\"><strong>📖 更多帮助</strong></div><div style=\"font-size: 14px; color: #666;\">详细使用教程和常见问题解答,请访问官网</div><div style=\"margin-top: 8px;\"><a target=\"_blank\" href=\"https://flypic.shikejk.com/\" style=\"font-size: 16px; color: #1890ff;\">https://flypic.shikejk.com/</a></div></div>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -9,7 +9,6 @@ function RightPanel() {
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
const [imageUrl, setImageUrl] = useState(''); // 当前显示的图片URL
|
||||
const [isLoadingOriginal, setIsLoadingOriginal] = useState(false);
|
||||
const [copied, setCopied] = useState(false);
|
||||
const [imageCopied, setImageCopied] = useState(false);
|
||||
const [isExporting, setIsExporting] = useState(false);
|
||||
const [exportProgress, setExportProgress] = useState(0);
|
||||
@@ -93,72 +92,242 @@ function RightPanel() {
|
||||
return imageAPI.getOriginalUrl(currentLibraryId, selectedImage.path);
|
||||
};
|
||||
|
||||
// 检查剪贴板 API 是否可用
|
||||
const isClipboardApiSupported = () => {
|
||||
return typeof ClipboardItem !== 'undefined' &&
|
||||
navigator.clipboard &&
|
||||
typeof navigator.clipboard.write === 'function';
|
||||
};
|
||||
|
||||
// 备用方案:使用 contenteditable + execCommand 复制图片(适用于非 HTTPS 环境)
|
||||
const fallbackCopyImage = async (imageUrl) => {
|
||||
return new Promise((resolve) => {
|
||||
// 创建一个隐藏的 contenteditable 容器
|
||||
const container = document.createElement('div');
|
||||
container.setAttribute('contenteditable', 'true');
|
||||
container.style.position = 'fixed';
|
||||
container.style.left = '-9999px';
|
||||
container.style.top = '-9999px';
|
||||
container.style.opacity = '0';
|
||||
document.body.appendChild(container);
|
||||
|
||||
// 创建图片元素
|
||||
const img = document.createElement('img');
|
||||
img.crossOrigin = 'anonymous';
|
||||
|
||||
img.onload = () => {
|
||||
// 将图片添加到容器
|
||||
container.appendChild(img);
|
||||
|
||||
// 选中容器内容
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(container);
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
|
||||
// 执行复制命令
|
||||
let success = false;
|
||||
try {
|
||||
success = document.execCommand('copy');
|
||||
} catch (err) {
|
||||
console.error('execCommand copy 失败:', err);
|
||||
}
|
||||
|
||||
// 清理
|
||||
selection.removeAllRanges();
|
||||
document.body.removeChild(container);
|
||||
|
||||
resolve(success);
|
||||
};
|
||||
|
||||
img.onerror = () => {
|
||||
document.body.removeChild(container);
|
||||
resolve(false);
|
||||
};
|
||||
|
||||
img.src = imageUrl;
|
||||
});
|
||||
};
|
||||
|
||||
// 备用方案:使用 canvas + blob URL 复制图片
|
||||
const fallbackCopyImageViaCanvas = async (imageUrl) => {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
// 获取图片数据
|
||||
const response = await fetch(imageUrl);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 创建图片元素
|
||||
const img = new Image();
|
||||
img.crossOrigin = 'anonymous';
|
||||
|
||||
const loadPromise = new Promise((res, rej) => {
|
||||
img.onload = res;
|
||||
img.onerror = rej;
|
||||
});
|
||||
|
||||
img.src = URL.createObjectURL(blob);
|
||||
await loadPromise;
|
||||
|
||||
// 使用 canvas 转换
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0);
|
||||
|
||||
// 清理 blob URL
|
||||
URL.revokeObjectURL(img.src);
|
||||
|
||||
// 获取 data URL
|
||||
const dataUrl = canvas.toDataURL('image/png');
|
||||
|
||||
// 创建 contenteditable 容器
|
||||
const container = document.createElement('div');
|
||||
container.setAttribute('contenteditable', 'true');
|
||||
container.style.position = 'fixed';
|
||||
container.style.left = '-9999px';
|
||||
container.style.top = '-9999px';
|
||||
container.style.opacity = '0';
|
||||
document.body.appendChild(container);
|
||||
|
||||
// 创建使用 data URL 的图片
|
||||
const copyImg = document.createElement('img');
|
||||
copyImg.src = dataUrl;
|
||||
container.appendChild(copyImg);
|
||||
|
||||
// 等待图片渲染
|
||||
await new Promise(r => setTimeout(r, 50));
|
||||
|
||||
// 选中并复制
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(container);
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
|
||||
let success = false;
|
||||
try {
|
||||
success = document.execCommand('copy');
|
||||
} catch (err) {
|
||||
console.error('execCommand copy 失败:', err);
|
||||
}
|
||||
|
||||
// 清理
|
||||
selection.removeAllRanges();
|
||||
document.body.removeChild(container);
|
||||
|
||||
resolve(success);
|
||||
} catch (err) {
|
||||
console.error('Canvas 复制失败:', err);
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 备用方案:使用 execCommand 复制文本
|
||||
const fallbackCopyText = (text) => {
|
||||
const textArea = document.createElement('textarea');
|
||||
textArea.value = text;
|
||||
textArea.style.position = 'fixed';
|
||||
textArea.style.left = '-9999px';
|
||||
textArea.style.top = '-9999px';
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
return true;
|
||||
} catch (err) {
|
||||
console.error('execCommand 复制失败:', err);
|
||||
return false;
|
||||
} finally {
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
};
|
||||
|
||||
// 复制图片到剪贴板(支持粘贴到聊天软件和文件管理器)
|
||||
const copyImageToClipboard = async () => {
|
||||
try {
|
||||
// 获取原图URL
|
||||
const imageUrl = imageAPI.getOriginalUrl(currentLibraryId, selectedImage.path);
|
||||
|
||||
// 获取图片数据
|
||||
const response = await fetch(imageUrl);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 创建临时图片元素
|
||||
const img = new Image();
|
||||
const loadPromise = new Promise((resolve, reject) => {
|
||||
img.onload = resolve;
|
||||
img.onerror = reject;
|
||||
});
|
||||
img.src = URL.createObjectURL(blob);
|
||||
await loadPromise;
|
||||
|
||||
// 使用 canvas 转换为 PNG
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0);
|
||||
|
||||
// 转换为 PNG blob
|
||||
canvas.toBlob(async (pngBlob) => {
|
||||
// 方案1:尝试现代 Clipboard API(需要 HTTPS)
|
||||
if (isClipboardApiSupported()) {
|
||||
try {
|
||||
// 创建包含多种格式的剪贴板项
|
||||
// 获取图片数据
|
||||
const response = await fetch(imageUrl);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 创建临时图片元素
|
||||
const img = new Image();
|
||||
const loadPromise = new Promise((resolve, reject) => {
|
||||
img.onload = resolve;
|
||||
img.onerror = reject;
|
||||
});
|
||||
img.src = URL.createObjectURL(blob);
|
||||
await loadPromise;
|
||||
|
||||
// 使用 canvas 转换为 PNG
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0);
|
||||
|
||||
// 清理 blob URL
|
||||
URL.revokeObjectURL(img.src);
|
||||
|
||||
// 转换为 PNG blob
|
||||
const pngBlob = await new Promise((resolve) => {
|
||||
canvas.toBlob(resolve, 'image/png');
|
||||
});
|
||||
|
||||
// 尝试写入剪贴板
|
||||
const clipboardItem = new ClipboardItem({
|
||||
'image/png': pngBlob,
|
||||
// 添加 HTML 格式(支持更多粘贴场景)
|
||||
'text/html': new Blob(
|
||||
[`<img src="${imageUrl}" alt="${selectedImage.filename}">`],
|
||||
{ type: 'text/html' }
|
||||
),
|
||||
// 添加纯文本格式(文件路径)
|
||||
'text/plain': new Blob(
|
||||
[imageUrl],
|
||||
{ type: 'text/plain' }
|
||||
)
|
||||
'image/png': pngBlob
|
||||
});
|
||||
|
||||
await navigator.clipboard.write([clipboardItem]);
|
||||
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
return;
|
||||
} catch (err) {
|
||||
console.error('写入剪贴板失败:', err);
|
||||
// 如果多格式失败,尝试只复制图像
|
||||
try {
|
||||
await navigator.clipboard.write([
|
||||
new ClipboardItem({ 'image/png': pngBlob })
|
||||
]);
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
} catch (fallbackErr) {
|
||||
console.error('备用方案也失败:', fallbackErr);
|
||||
alert('复制失败,请重试');
|
||||
}
|
||||
console.warn('Clipboard API 失败,尝试备用方案:', err);
|
||||
}
|
||||
}, 'image/png');
|
||||
}
|
||||
|
||||
// 清理
|
||||
URL.revokeObjectURL(img.src);
|
||||
// 方案2:使用 canvas + contenteditable + execCommand(非 HTTPS 环境)
|
||||
console.log('尝试 Canvas + execCommand 方案...');
|
||||
const canvasSuccess = await fallbackCopyImageViaCanvas(imageUrl);
|
||||
if (canvasSuccess) {
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
return;
|
||||
}
|
||||
|
||||
// 方案3:直接使用图片 URL + contenteditable
|
||||
console.log('尝试直接图片 URL 方案...');
|
||||
const directSuccess = await fallbackCopyImage(imageUrl);
|
||||
if (directSuccess) {
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
return;
|
||||
}
|
||||
|
||||
// 方案4:最后降级为复制链接
|
||||
console.warn('所有图片复制方案失败,降级为复制链接');
|
||||
const textSuccess = fallbackCopyText(imageUrl);
|
||||
if (textSuccess) {
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
alert('已复制图片链接到剪贴板\n(当前浏览器环境限制,无法直接复制图片)');
|
||||
} else {
|
||||
alert('复制失败,请手动复制图片链接:\n' + imageUrl);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('复制图片失败:', error);
|
||||
@@ -166,6 +335,85 @@ function RightPanel() {
|
||||
}
|
||||
};
|
||||
|
||||
// 使用 contenteditable 复制多张图片(非 HTTPS 环境)
|
||||
const fallbackCopyMultipleImages = async (imageUrls) => {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
// 创建 contenteditable 容器
|
||||
const container = document.createElement('div');
|
||||
container.setAttribute('contenteditable', 'true');
|
||||
container.style.position = 'fixed';
|
||||
container.style.left = '-9999px';
|
||||
container.style.top = '-9999px';
|
||||
container.style.opacity = '0';
|
||||
document.body.appendChild(container);
|
||||
|
||||
// 加载所有图片并转换为 data URL
|
||||
for (const { url, filename } of imageUrls) {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
const blob = await response.blob();
|
||||
|
||||
const img = new Image();
|
||||
img.crossOrigin = 'anonymous';
|
||||
|
||||
await new Promise((res, rej) => {
|
||||
img.onload = res;
|
||||
img.onerror = rej;
|
||||
img.src = URL.createObjectURL(blob);
|
||||
});
|
||||
|
||||
// 使用 canvas 转换为 data URL
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0);
|
||||
URL.revokeObjectURL(img.src);
|
||||
|
||||
const dataUrl = canvas.toDataURL('image/png');
|
||||
|
||||
// 创建图片元素
|
||||
const copyImg = document.createElement('img');
|
||||
copyImg.src = dataUrl;
|
||||
copyImg.alt = filename;
|
||||
copyImg.style.display = 'block';
|
||||
copyImg.style.marginBottom = '10px';
|
||||
container.appendChild(copyImg);
|
||||
} catch (err) {
|
||||
console.error(`加载图片失败: ${filename}`, err);
|
||||
}
|
||||
}
|
||||
|
||||
// 等待图片渲染
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
|
||||
// 选中并复制
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(container);
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
|
||||
let success = false;
|
||||
try {
|
||||
success = document.execCommand('copy');
|
||||
} catch (err) {
|
||||
console.error('execCommand copy 失败:', err);
|
||||
}
|
||||
|
||||
// 清理
|
||||
selection.removeAllRanges();
|
||||
document.body.removeChild(container);
|
||||
|
||||
resolve(success);
|
||||
} catch (err) {
|
||||
console.error('批量复制图片失败:', err);
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 批量复制图片
|
||||
const copyMultipleImages = async () => {
|
||||
try {
|
||||
@@ -177,52 +425,76 @@ function RightPanel() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 多张图片:浏览器限制,只能复制为 HTML 格式(包含多个 img 标签)
|
||||
// 这样粘贴到支持 HTML 的应用时,会显示为多张图片
|
||||
|
||||
// 加载所有图片并转换为 base64
|
||||
const imageDataList = await Promise.all(
|
||||
imagesToCopy.map(async (img) => {
|
||||
const imageUrl = imageAPI.getOriginalUrl(currentLibraryId, img.path);
|
||||
const response = await fetch(imageUrl);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 转换为 base64
|
||||
return new Promise((resolve) => {
|
||||
const reader = new FileReader();
|
||||
reader.onloadend = () => {
|
||||
resolve({
|
||||
dataUrl: reader.result,
|
||||
filename: img.filename
|
||||
});
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
// 创建 HTML 格式(多个图片)
|
||||
const htmlContent = imageDataList.map(({ dataUrl, filename }) =>
|
||||
`<img src="${dataUrl}" alt="${filename}" style="display:block; margin:10px 0;">`
|
||||
).join('\n');
|
||||
// 多张图片
|
||||
const imageUrls = imagesToCopy.map(img => ({
|
||||
url: imageAPI.getOriginalUrl(currentLibraryId, img.path),
|
||||
filename: img.filename
|
||||
}));
|
||||
|
||||
// 创建纯文本格式(文件名列表)
|
||||
const textContent = imagesToCopy.map(img => img.filename).join('\n');
|
||||
|
||||
try {
|
||||
// 尝试写入多种格式
|
||||
await navigator.clipboard.write([
|
||||
new ClipboardItem({
|
||||
'text/html': new Blob([htmlContent], { type: 'text/html' }),
|
||||
'text/plain': new Blob([textContent], { type: 'text/plain' })
|
||||
})
|
||||
]);
|
||||
|
||||
// 方案1:尝试现代 Clipboard API
|
||||
if (isClipboardApiSupported()) {
|
||||
try {
|
||||
// 加载所有图片并转换为 base64
|
||||
const imageDataList = await Promise.all(
|
||||
imagesToCopy.map(async (img) => {
|
||||
const imageUrl = imageAPI.getOriginalUrl(currentLibraryId, img.path);
|
||||
const response = await fetch(imageUrl);
|
||||
const blob = await response.blob();
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const reader = new FileReader();
|
||||
reader.onloadend = () => {
|
||||
resolve({
|
||||
dataUrl: reader.result,
|
||||
filename: img.filename
|
||||
});
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
// 创建 HTML 格式
|
||||
const htmlContent = imageDataList.map(({ dataUrl, filename }) =>
|
||||
`<img src="${dataUrl}" alt="${filename}" style="display:block; margin:10px 0;">`
|
||||
).join('\n');
|
||||
|
||||
await navigator.clipboard.write([
|
||||
new ClipboardItem({
|
||||
'text/html': new Blob([htmlContent], { type: 'text/html' }),
|
||||
'text/plain': new Blob([textContent], { type: 'text/plain' })
|
||||
})
|
||||
]);
|
||||
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
return;
|
||||
} catch (err) {
|
||||
console.warn('Clipboard API 失败,尝试备用方案:', err);
|
||||
}
|
||||
}
|
||||
|
||||
// 方案2:使用 contenteditable + execCommand
|
||||
console.log('尝试 contenteditable 批量复制方案...');
|
||||
const success = await fallbackCopyMultipleImages(imageUrls);
|
||||
if (success) {
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
} catch (err) {
|
||||
console.error('写入剪贴板失败:', err);
|
||||
alert(`复制失败。\n\n提示:浏览器限制,多张图片会以 HTML 格式复制。\n可粘贴到 Word、富文本编辑器等。\n\n如需单独使用,请使用"导出"功能。`);
|
||||
return;
|
||||
}
|
||||
|
||||
// 方案3:降级为复制文件名列表
|
||||
console.warn('批量图片复制失败,降级为复制文件名');
|
||||
const textSuccess = fallbackCopyText(textContent);
|
||||
if (textSuccess) {
|
||||
setImageCopied(true);
|
||||
setTimeout(() => setImageCopied(false), 2000);
|
||||
alert(`已复制 ${imagesToCopy.length} 个文件名到剪贴板\n(当前环境限制,建议使用"导出"功能)`);
|
||||
} else {
|
||||
alert('复制失败,请使用"导出"功能下载图片');
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
# FlyPic 飞牛 NAS 打包部署指南
|
||||
|
||||
本指南介绍如何将 FlyPic 打包成飞牛 fnOS 应用包(.fpk)并部署到飞牛 NAS。
|
||||
|
||||
## 前置要求
|
||||
|
||||
### 开发环境(Windows/Mac/Linux)
|
||||
- Node.js 18+
|
||||
- Docker Desktop(用于编译 Linux 版本依赖)
|
||||
|
||||
### 飞牛 NAS
|
||||
- fnOS 系统
|
||||
- fnpack 命令行工具(通过 `npm install -g fnpack` 安装)
|
||||
|
||||
## 一、构建应用
|
||||
|
||||
### 方法一:使用 Docker 构建(推荐)
|
||||
|
||||
此方法会自动编译 Linux 版本的原生模块(Sharp、better-sqlite3),上传到飞牛后可直接使用。
|
||||
|
||||
```bash
|
||||
# 确保 Docker Desktop 正在运行
|
||||
node scripts/build-fpk-docker.js
|
||||
```
|
||||
|
||||
构建完成后,`flypic` 目录将包含:
|
||||
- `app/server/` - 后端代码和前端构建产物
|
||||
- `app/server/node_modules/` - Linux 版本的依赖(约 50MB)
|
||||
- `app/ui/` - 应用 UI 配置
|
||||
- `cmd/` - 生命周期脚本
|
||||
- `wizard/` - 安装向导配置
|
||||
- `manifest` - 应用清单
|
||||
|
||||
### 方法二:仅构建代码(需在飞牛上安装依赖)
|
||||
|
||||
```bash
|
||||
node scripts/build-fpk.js
|
||||
```
|
||||
|
||||
此方法不包含 node_modules,需要在飞牛 NAS 上手动安装依赖。
|
||||
|
||||
## 二、上传到飞牛 NAS
|
||||
|
||||
将整个 `flypic` 文件夹上传到飞牛 NAS,可以使用:
|
||||
- 飞牛文件管理器
|
||||
- SFTP/SCP
|
||||
- SMB 共享
|
||||
|
||||
建议上传到用户目录,如:`/vol1/1000/flypic`
|
||||
|
||||
## 三、打包 .fpk 文件
|
||||
|
||||
SSH 登录到飞牛 NAS,执行:
|
||||
|
||||
```bash
|
||||
# 进入应用目录
|
||||
cd /vol1/1000/flypic
|
||||
|
||||
# 打包应用
|
||||
fnpack build
|
||||
```
|
||||
|
||||
成功后会生成 `flypic_x.x.x_all.fpk` 文件。
|
||||
|
||||
## 四、安装应用
|
||||
|
||||
### 方法一:通过飞牛应用中心安装
|
||||
1. 打开飞牛 fnOS 桌面
|
||||
2. 进入「应用中心」→「手动安装」
|
||||
3. 选择生成的 `.fpk` 文件
|
||||
4. 按照安装向导完成安装
|
||||
|
||||
### 方法二:命令行安装
|
||||
```bash
|
||||
fnpack install flypic_x.x.x_all.fpk
|
||||
```
|
||||
|
||||
## 五、配置应用
|
||||
|
||||
安装完成后,首次使用需要:
|
||||
|
||||
1. **配置授权目录**:在飞牛应用设置中,为 FlyPic 添加素材库文件夹的访问权限
|
||||
|
||||
2. **添加素材库**:打开 FlyPic,添加素材库时输入完整路径,如:
|
||||
- `/vol1/1000/图片库`
|
||||
- `/vol2/photos`
|
||||
|
||||
## 目录结构说明
|
||||
|
||||
```
|
||||
flypic/
|
||||
├── app/
|
||||
│ ├── server/ # 应用服务器
|
||||
│ │ ├── server.js # 主入口
|
||||
│ │ ├── package.json
|
||||
│ │ ├── node_modules/ # 依赖(Docker 构建时包含)
|
||||
│ │ ├── public/ # 前端静态文件
|
||||
│ │ ├── routes/ # API 路由
|
||||
│ │ ├── database/ # 数据库模块
|
||||
│ │ └── utils/ # 工具函数
|
||||
│ └── ui/
|
||||
│ ├── config # UI 配置
|
||||
│ └── images/ # 应用图标
|
||||
├── cmd/
|
||||
│ ├── main # 启动脚本
|
||||
│ ├── install_init # 安装前脚本
|
||||
│ ├── install_callback # 安装后脚本
|
||||
│ └── ... # 其他生命周期脚本
|
||||
├── wizard/
|
||||
│ └── install # 安装向导配置
|
||||
├── config/
|
||||
│ └── resource # 资源配置
|
||||
├── manifest # 应用清单
|
||||
├── ICON.PNG # 应用图标 256x256
|
||||
└── ICON_256.PNG # 应用图标 256x256
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
|
||||
### Q: 应用启动失败,显示"异常退出"
|
||||
A: 检查以下几点:
|
||||
1. 确保使用 Docker 构建方法,包含 Linux 版本的 node_modules
|
||||
2. 检查应用日志,查看具体错误信息
|
||||
3. 确保端口 15002 未被占用
|
||||
|
||||
### Q: 无法访问素材库文件夹
|
||||
A: 在飞牛应用设置中配置授权目录,添加素材库路径的访问权限。
|
||||
|
||||
### Q: 如何更新应用?
|
||||
A:
|
||||
1. 重新构建:`node scripts/build-fpk-docker.js`
|
||||
2. 上传到飞牛并打包:`fnpack build`
|
||||
3. 在应用中心选择「更新」或重新安装
|
||||
|
||||
### Q: 如何查看应用日志?
|
||||
A: 在飞牛系统日志中查看,或 SSH 登录后查看应用日志文件。
|
||||
|
||||
## 开发调试
|
||||
|
||||
本地开发时,可以分别启动前后端:
|
||||
|
||||
```bash
|
||||
# 终端 1:启动后端
|
||||
cd backend
|
||||
npm install
|
||||
npm run dev
|
||||
|
||||
# 终端 2:启动前端
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
访问 http://localhost:5173 进行开发调试。
|
||||
Reference in new issue
Block a user