nx-sk 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/assets/nx-sk/references/40-files.md +2 -2
- package/package.json +1 -1
- package/src/web/frontend/components/fieldEditor.jsx +17 -1
- package/src/web/frontend/styles.css +2 -0
- package/src/web/public/assets/{files-2chm08H_.js → files-DMIKmyJN.js} +1 -1
- package/src/web/public/assets/{index-DzD8wu27.js → index-DpX9p_OX.js} +2 -2
- package/src/web/public/assets/{index-DLtjhflt.css → index-lfnBM8pt.css} +1 -1
- package/src/web/public/assets/{view-CzDoriKQ.js → view-Bh_6V4-F.js} +1 -1
- package/src/web/public/assets/{view-Cuhbkxa8.js → view-CDaAGMaO.js} +1 -1
- package/src/web/public/assets/{view-DmRiyvj2.js → view-DCR3mXQP.js} +1 -1
- package/src/web/public/assets/{view-BJmqIMAn.js → view-DTFmAEtL.js} +1 -1
- package/src/web/public/assets/view-qNmLIhoy.js +7 -0
- package/src/web/public/assets/{view-B-jmSJ3J.js → view-uH2FjbJC.js} +1 -1
- package/src/web/public/index.html +2 -2
- package/src/web/public/assets/view-C0WrdqsX.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
本文件格式参考 [Keep a Changelog](https://keepachangelog.com/),中文正文。
|
|
4
4
|
|
|
5
|
+
## [0.8.1] - 2026-10-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **条目里的附件字段框支持拖拽上传**:把文件(可多个)直接拖进 `file` 字段框即上传并追加到列表,悬停时虚线描边提示(与「附件」中心同一套视觉语言);超过 `maxItems` 上限时拖入会明确提示。之前只有「附件」中心页支持拖拽。
|
|
10
|
+
|
|
5
11
|
## [0.8.0] - 2026-10-13
|
|
6
12
|
|
|
7
13
|
### Added
|
|
@@ -97,8 +97,8 @@ nx-sk file restore f_xxxx --to "D:\资料" # Web 上传件没有原始
|
|
|
97
97
|
- **组织方式由栏目驱动、不预定义分类**:筛选片按「哪些栏目在引用附件」动态生成(外加「未引用」),
|
|
98
98
|
每张卡片显示被哪个栏目 / 条目 / 字段引用;
|
|
99
99
|
- 编辑弹窗可改名称 / 分类 / 标签 / 备注(改分类或文件名时物理原件随之移动);
|
|
100
|
-
- 条目表单里的 `file`
|
|
101
|
-
|
|
100
|
+
- 条目表单里的 `file` 字段是**列表**:文件可直接**拖进字段框**(可多选)、点「上传文件」多选、
|
|
101
|
+
从库里逐个追加、逐行移除;保存即建立链接。
|
|
102
102
|
|
|
103
103
|
## 七、看不到 `file` 上传字段 / 条目里解析不到附件
|
|
104
104
|
|
package/package.json
CHANGED
|
@@ -62,7 +62,10 @@ function toIds(value) {
|
|
|
62
62
|
export function FileFieldControl({ def, value, onChange }) {
|
|
63
63
|
const { toast, guard, patchUi } = useStore();
|
|
64
64
|
const [data, setData] = useState(null);
|
|
65
|
+
const [dragOver, setDragOver] = useState(false);
|
|
65
66
|
const uploadRef = useRef(null);
|
|
67
|
+
// dragenter/dragleave 在子元素间穿梭时会成对触发,用深度计数避免「还没离开就熄掉高亮」
|
|
68
|
+
const dragDepth = useRef(0);
|
|
66
69
|
const ids = toIds(value);
|
|
67
70
|
const max = Number(def.maxItems) || 0;
|
|
68
71
|
const full = max > 0 && ids.length >= max;
|
|
@@ -99,8 +102,21 @@ export function FileFieldControl({ def, value, onChange }) {
|
|
|
99
102
|
const add = (id) => { if (id && !ids.includes(id)) onChange([...ids, id]); };
|
|
100
103
|
const removeAt = (id) => onChange(ids.filter((x) => x !== id));
|
|
101
104
|
|
|
105
|
+
// 拖拽文件进字段框 = 直接上传并追加(与「附件」中心同一套手感)
|
|
106
|
+
const onDrop = guard(async (e) => {
|
|
107
|
+
dragDepth.current = 0;
|
|
108
|
+
setDragOver(false);
|
|
109
|
+
await upload(e.dataTransfer?.files);
|
|
110
|
+
});
|
|
111
|
+
|
|
102
112
|
return (
|
|
103
|
-
<div
|
|
113
|
+
<div
|
|
114
|
+
className={`file-picker ${dragOver ? 'drag' : ''}`}
|
|
115
|
+
onDragEnter={(e) => { e.preventDefault(); dragDepth.current += 1; setDragOver(true); }}
|
|
116
|
+
onDragOver={(e) => e.preventDefault()}
|
|
117
|
+
onDragLeave={() => { dragDepth.current -= 1; if (dragDepth.current <= 0) { dragDepth.current = 0; setDragOver(false); } }}
|
|
118
|
+
onDrop={onDrop}
|
|
119
|
+
>
|
|
104
120
|
{ids.map((id) => {
|
|
105
121
|
const rec = byId(id);
|
|
106
122
|
if (!rec) {
|
|
@@ -384,6 +384,8 @@ a.file-name:hover { text-decoration: underline; }
|
|
|
384
384
|
|
|
385
385
|
/* ── 字段里的附件选择器 ─────────────────────────────── */
|
|
386
386
|
.file-picker { display: flex; flex-direction: column; gap: 4px; }
|
|
387
|
+
/* 拖文件悬停在字段框上:与「附件」中心同一套视觉语言(虚线描边 + 浅底) */
|
|
388
|
+
.file-picker.drag { outline: 2px dashed var(--ink); outline-offset: -4px; background: var(--soft); }
|
|
387
389
|
.file-picker .file-pick-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
|
|
388
390
|
.file-picker select { flex: 1; min-width: 120px; }
|
|
389
391
|
.file-preview {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./index-
|
|
1
|
+
import{a as l}from"./index-DpX9p_OX.js";let r=null;function o(n=!1){return!n&&r||(r=l("/api/files").then(e=>e).catch(e=>{throw r=null,e})),r}function i(){return r=null,o(!0)}function u(n){return new Promise((e,a)=>{const t=new FileReader;t.onload=()=>e(t.result),t.onerror=()=>a(new Error("读取文件失败")),t.readAsDataURL(n)})}export{u as f,o as l,i as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/view-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/view-qNmLIhoy.js","assets/files-DMIKmyJN.js","assets/view-DTFmAEtL.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const L of document.querySelectorAll('link[rel="modulepreload"]'))V(L);new MutationObserver(L=>{for(const I of L)if(I.type==="childList")for(const A of I.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&V(A)}).observe(document,{childList:!0,subtree:!0});function m(L){const I={};return L.integrity&&(I.integrity=L.integrity),L.referrerPolicy&&(I.referrerPolicy=L.referrerPolicy),L.crossOrigin==="use-credentials"?I.credentials="include":L.crossOrigin==="anonymous"?I.credentials="omit":I.credentials="same-origin",I}function V(L){if(L.ep)return;L.ep=!0;const I=m(L);fetch(L.href,I)}})();var Ci={exports:{}},wr={},Ni={exports:{}},B={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -38,4 +38,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/view-C0WrdqsX.j
|
|
|
38
38
|
`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=i&&0<=o);break}}}finally{$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?v(e):""}function G(e){switch(e.tag){case 5:return v(e.type);case 16:return v("Lazy");case 13:return v("Suspense");case 19:return v("SuspenseList");case 0:case 2:case 15:return e=Q(e.type,!1),e;case 11:return e=Q(e.type.render,!1),e;case 1:return e=Q(e.type,!0),e;default:return""}}function Z(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 Ie:return"Fragment";case Ce:return"Portal";case Pt:return"Profiler";case Ge:return"StrictMode";case He:return"Suspense";case rt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yt:return(e.displayName||"Context")+".Consumer";case gt:return(e._context.displayName||"Context")+".Provider";case ft:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dt:return t=e.displayName||null,t!==null?t:Z(e.type)||"Memo";case Me:t=e._payload,e=e._init;try{return Z(e(t))}catch{}}return null}function le(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 Z(t);case 8:return t===Ge?"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 ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function We(e){var t=ae(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 l=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,u.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sr(e){e._valueTracker||(e._valueTracker=We(e))}function ji(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ae(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Er(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 jl(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Oi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ee(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 Di(e,t){t=t.checked,t!=null&&ie(e,"checked",t,!1)}function Ol(e,t){Di(e,t);var n=ee(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")?Dl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Dl(e,t.type,ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ii(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 Dl(e,t,n){(t!=="number"||Er(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dn=Array.isArray;function sn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ee(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Il(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(m(91));return N({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mi(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(m(92));if(Dn(n)){if(1<n.length)throw Error(m(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ee(n)}}function Fi(e,t){var n=ee(t.value),r=ee(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ui(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ai(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ml(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ai(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xr,Vi=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xr=xr||document.createElement("div"),xr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function In(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ba=["Webkit","ms","Moz","O"];Object.keys(Mn).forEach(function(e){Ba.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mn[t]=Mn[e]})});function $i(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mn.hasOwnProperty(e)&&Mn[e]?(""+t).trim():t+"px"}function Bi(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=$i(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Ha=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fl(e,t){if(t){if(Ha[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(m(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(m(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(m(61))}if(t.style!=null&&typeof t.style!="object")throw Error(m(62))}}function Ul(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Al=null;function Vl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $l=null,an=null,cn=null;function Hi(e){if(e=lr(e)){if(typeof $l!="function")throw Error(m(280));var t=e.stateNode;t&&(t=Kr(t),$l(e.stateNode,e.type,t))}}function Wi(e){an?cn?cn.push(e):cn=[e]:an=e}function Qi(){if(an){var e=an,t=cn;if(cn=an=null,Hi(e),t)for(e=0;e<t.length;e++)Hi(t[e])}}function Ki(e,t){return e(t)}function Yi(){}var Bl=!1;function Xi(e,t,n){if(Bl)return e(t,n);Bl=!0;try{return Ki(e,t,n)}finally{Bl=!1,(an!==null||cn!==null)&&(Yi(),Qi())}}function Fn(e,t){var n=e.stateNode;if(n===null)return null;var r=Kr(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(m(231,t,typeof n));return n}var Hl=!1;if(M)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){Hl=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{Hl=!1}function Wa(e,t,n,r,l,u,i,o,s){var p=Array.prototype.slice.call(arguments,3);try{t.apply(n,p)}catch(y){this.onError(y)}}var An=!1,_r=null,Cr=!1,Wl=null,Qa={onError:function(e){An=!0,_r=e}};function Ka(e,t,n,r,l,u,i,o,s){An=!1,_r=null,Wa.apply(Qa,arguments)}function Ya(e,t,n,r,l,u,i,o,s){if(Ka.apply(this,arguments),An){if(An){var p=_r;An=!1,_r=null}else throw Error(m(198));Cr||(Cr=!0,Wl=p)}}function Xt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Gi(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Zi(e){if(Xt(e)!==e)throw Error(m(188))}function Xa(e){var t=e.alternate;if(!t){if(t=Xt(e),t===null)throw Error(m(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var u=l.alternate;if(u===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===n)return Zi(l),e;if(u===r)return Zi(l),t;u=u.sibling}throw Error(m(188))}if(n.return!==r.return)n=l,r=u;else{for(var i=!1,o=l.child;o;){if(o===n){i=!0,n=l,r=u;break}if(o===r){i=!0,r=l,n=u;break}o=o.sibling}if(!i){for(o=u.child;o;){if(o===n){i=!0,n=u,r=l;break}if(o===r){i=!0,r=u,n=l;break}o=o.sibling}if(!i)throw Error(m(189))}}if(n.alternate!==r)throw Error(m(190))}if(n.tag!==3)throw Error(m(188));return n.stateNode.current===n?e:t}function Ji(e){return e=Xa(e),e!==null?qi(e):null}function qi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=qi(e);if(t!==null)return t;e=e.sibling}return null}var bi=_.unstable_scheduleCallback,eo=_.unstable_cancelCallback,Ga=_.unstable_shouldYield,Za=_.unstable_requestPaint,ve=_.unstable_now,Ja=_.unstable_getCurrentPriorityLevel,Ql=_.unstable_ImmediatePriority,to=_.unstable_UserBlockingPriority,Nr=_.unstable_NormalPriority,qa=_.unstable_LowPriority,no=_.unstable_IdlePriority,Pr=null,pt=null;function ba(e){if(pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Pr,e,void 0,(e.current.flags&128)===128)}catch{}}var lt=Math.clz32?Math.clz32:nc,ec=Math.log,tc=Math.LN2;function nc(e){return e>>>=0,e===0?32:31-(ec(e)/tc|0)|0}var zr=64,Tr=4194304;function Vn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Lr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,u=e.pingedLanes,i=n&268435455;if(i!==0){var o=i&~l;o!==0?r=Vn(o):(u&=i,u!==0&&(r=Vn(u)))}else i=n&~l,i!==0?r=Vn(i):u!==0&&(r=Vn(u));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-lt(t),l=1<<n,r|=e[n],t&=~l;return r}function rc(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes;0<u;){var i=31-lt(u),o=1<<i,s=l[i];s===-1?((o&n)===0||(o&r)!==0)&&(l[i]=rc(o,t)):s<=t&&(e.expiredLanes|=o),u&=~o}}function Kl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ro(){var e=zr;return zr<<=1,(zr&4194240)===0&&(zr=64),e}function Yl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $n(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lt(t),e[t]=n}function uc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-lt(n),u=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~u}}function Xl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-lt(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var te=0;function lo(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var uo,Gl,io,oo,so,Zl=!1,Rr=[],zt=null,Tt=null,Lt=null,Bn=new Map,Hn=new Map,Rt=[],ic="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ao(e,t){switch(e){case"focusin":case"focusout":zt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":Bn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hn.delete(t.pointerId)}}function Wn(e,t,n,r,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:u,targetContainers:[l]},t!==null&&(t=lr(t),t!==null&&Gl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function oc(e,t,n,r,l){switch(t){case"focusin":return zt=Wn(zt,e,t,n,r,l),!0;case"dragenter":return Tt=Wn(Tt,e,t,n,r,l),!0;case"mouseover":return Lt=Wn(Lt,e,t,n,r,l),!0;case"pointerover":var u=l.pointerId;return Bn.set(u,Wn(Bn.get(u)||null,e,t,n,r,l)),!0;case"gotpointercapture":return u=l.pointerId,Hn.set(u,Wn(Hn.get(u)||null,e,t,n,r,l)),!0}return!1}function co(e){var t=Gt(e.target);if(t!==null){var n=Xt(t);if(n!==null){if(t=n.tag,t===13){if(t=Gi(n),t!==null){e.blockedOn=t,so(e.priority,function(){io(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ql(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Al=r,n.target.dispatchEvent(r),Al=null}else return t=lr(n),t!==null&&Gl(t),e.blockedOn=n,!1;t.shift()}return!0}function fo(e,t,n){jr(e)&&n.delete(t)}function sc(){Zl=!1,zt!==null&&jr(zt)&&(zt=null),Tt!==null&&jr(Tt)&&(Tt=null),Lt!==null&&jr(Lt)&&(Lt=null),Bn.forEach(fo),Hn.forEach(fo)}function Qn(e,t){e.blockedOn===t&&(e.blockedOn=null,Zl||(Zl=!0,_.unstable_scheduleCallback(_.unstable_NormalPriority,sc)))}function Kn(e){function t(l){return Qn(l,e)}if(0<Rr.length){Qn(Rr[0],e);for(var n=1;n<Rr.length;n++){var r=Rr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(zt!==null&&Qn(zt,e),Tt!==null&&Qn(Tt,e),Lt!==null&&Qn(Lt,e),Bn.forEach(t),Hn.forEach(t),n=0;n<Rt.length;n++)r=Rt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&(n=Rt[0],n.blockedOn===null);)co(n),n.blockedOn===null&&Rt.shift()}var fn=b.ReactCurrentBatchConfig,Or=!0;function ac(e,t,n,r){var l=te,u=fn.transition;fn.transition=null;try{te=1,Jl(e,t,n,r)}finally{te=l,fn.transition=u}}function cc(e,t,n,r){var l=te,u=fn.transition;fn.transition=null;try{te=4,Jl(e,t,n,r)}finally{te=l,fn.transition=u}}function Jl(e,t,n,r){if(Or){var l=ql(e,t,n,r);if(l===null)hu(e,t,r,Dr,n),ao(e,r);else if(oc(l,e,t,n,r))r.stopPropagation();else if(ao(e,r),t&4&&-1<ic.indexOf(e)){for(;l!==null;){var u=lr(l);if(u!==null&&uo(u),u=ql(e,t,n,r),u===null&&hu(e,t,r,Dr,n),u===l)break;l=u}l!==null&&r.stopPropagation()}else hu(e,t,r,null,n)}}var Dr=null;function ql(e,t,n,r){if(Dr=null,e=Vl(r),e=Gt(e),e!==null)if(t=Xt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Gi(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Dr=e,null}function po(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ja()){case Ql:return 1;case to:return 4;case Nr:case qa:return 16;case no:return 536870912;default:return 16}default:return 16}}var jt=null,bl=null,Ir=null;function mo(){if(Ir)return Ir;var e,t=bl,n=t.length,r,l="value"in jt?jt.value:jt.textContent,u=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===l[u-r];r++);return Ir=l.slice(e,1<r?1-r:void 0)}function Mr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Fr(){return!0}function ho(){return!1}function Qe(e){function t(n,r,l,u,i){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(u):u[o]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Fr:ho,this.isPropagationStopped=ho,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Fr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Fr)},persist:function(){},isPersistent:Fr}),t}var dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=Qe(dn),Yn=N({},dn,{view:0,detail:0}),fc=Qe(Yn),tu,nu,Xn,Ur=N({},Yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Xn&&(Xn&&e.type==="mousemove"?(tu=e.screenX-Xn.screenX,nu=e.screenY-Xn.screenY):nu=tu=0,Xn=e),tu)},movementY:function(e){return"movementY"in e?e.movementY:nu}}),vo=Qe(Ur),dc=N({},Ur,{dataTransfer:0}),pc=Qe(dc),mc=N({},Yn,{relatedTarget:0}),ru=Qe(mc),hc=N({},dn,{animationName:0,elapsedTime:0,pseudoElement:0}),vc=Qe(hc),yc=N({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gc=Qe(yc),wc=N({},dn,{data:0}),yo=Qe(wc),kc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sc={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ec={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xc(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ec[e])?!!t[e]:!1}function lu(){return xc}var _c=N({},Yn,{key:function(e){if(e.key){var t=kc[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lu,charCode:function(e){return e.type==="keypress"?Mr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Cc=Qe(_c),Nc=N({},Ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),go=Qe(Nc),Pc=N({},Yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lu}),zc=Qe(Pc),Tc=N({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lc=Qe(Tc),Rc=N({},Ur,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),jc=Qe(Rc),Oc=[9,13,27,32],uu=M&&"CompositionEvent"in window,Gn=null;M&&"documentMode"in document&&(Gn=document.documentMode);var Dc=M&&"TextEvent"in window&&!Gn,wo=M&&(!uu||Gn&&8<Gn&&11>=Gn),ko=" ",So=!1;function Eo(e,t){switch(e){case"keyup":return Oc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pn=!1;function Ic(e,t){switch(e){case"compositionend":return xo(t);case"keypress":return t.which!==32?null:(So=!0,ko);case"textInput":return e=t.data,e===ko&&So?null:e;default:return null}}function Mc(e,t){if(pn)return e==="compositionend"||!uu&&Eo(e,t)?(e=mo(),Ir=bl=jt=null,pn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return wo&&t.locale!=="ko"?null:t.data;default:return null}}var Fc={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fc[e.type]:t==="textarea"}function Co(e,t,n,r){Wi(r),t=Hr(t,"onChange"),0<t.length&&(n=new eu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Jn=null;function Uc(e){Ho(e,0)}function Ar(e){var t=gn(e);if(ji(t))return e}function Ac(e,t){if(e==="change")return t}var No=!1;if(M){var iu;if(M){var ou="oninput"in document;if(!ou){var Po=document.createElement("div");Po.setAttribute("oninput","return;"),ou=typeof Po.oninput=="function"}iu=ou}else iu=!1;No=iu&&(!document.documentMode||9<document.documentMode)}function zo(){Zn&&(Zn.detachEvent("onpropertychange",To),Jn=Zn=null)}function To(e){if(e.propertyName==="value"&&Ar(Jn)){var t=[];Co(t,Jn,e,Vl(e)),Xi(Uc,t)}}function Vc(e,t,n){e==="focusin"?(zo(),Zn=t,Jn=n,Zn.attachEvent("onpropertychange",To)):e==="focusout"&&zo()}function $c(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ar(Jn)}function Bc(e,t){if(e==="click")return Ar(t)}function Hc(e,t){if(e==="input"||e==="change")return Ar(t)}function Wc(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ut=typeof Object.is=="function"?Object.is:Wc;function qn(e,t){if(ut(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!H.call(t,l)||!ut(e[l],t[l]))return!1}return!0}function Lo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ro(e,t){var n=Lo(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Lo(n)}}function jo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oo(){for(var e=window,t=Er();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Er(e.document)}return t}function su(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Qc(e){var t=Oo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jo(n.ownerDocument.documentElement,n)){if(r!==null&&su(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,u=Math.min(r.start,l);r=r.end===void 0?u:Math.min(r.end,l),!e.extend&&u>r&&(l=r,r=u,u=l),l=Ro(n,u);var i=Ro(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Kc=M&&"documentMode"in document&&11>=document.documentMode,mn=null,au=null,bn=null,cu=!1;function Do(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cu||mn==null||mn!==Er(r)||(r=mn,"selectionStart"in r&&su(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bn&&qn(bn,r)||(bn=r,r=Hr(au,"onSelect"),0<r.length&&(t=new eu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mn)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hn={animationend:Vr("Animation","AnimationEnd"),animationiteration:Vr("Animation","AnimationIteration"),animationstart:Vr("Animation","AnimationStart"),transitionend:Vr("Transition","TransitionEnd")},fu={},Io={};M&&(Io=document.createElement("div").style,"AnimationEvent"in window||(delete hn.animationend.animation,delete hn.animationiteration.animation,delete hn.animationstart.animation),"TransitionEvent"in window||delete hn.transitionend.transition);function $r(e){if(fu[e])return fu[e];if(!hn[e])return e;var t=hn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Io)return fu[e]=t[n];return e}var Mo=$r("animationend"),Fo=$r("animationiteration"),Uo=$r("animationstart"),Ao=$r("transitionend"),Vo=new Map,$o="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ot(e,t){Vo.set(e,t),I(t,[e])}for(var du=0;du<$o.length;du++){var pu=$o[du],Yc=pu.toLowerCase(),Xc=pu[0].toUpperCase()+pu.slice(1);Ot(Yc,"on"+Xc)}Ot(Mo,"onAnimationEnd"),Ot(Fo,"onAnimationIteration"),Ot(Uo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(Ao,"onTransitionEnd"),A("onMouseEnter",["mouseout","mouseover"]),A("onMouseLeave",["mouseout","mouseover"]),A("onPointerEnter",["pointerout","pointerover"]),A("onPointerLeave",["pointerout","pointerover"]),I("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),I("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),I("onBeforeInput",["compositionend","keypress","textInput","paste"]),I("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),I("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),I("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var er="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Gc=new Set("cancel close invalid load scroll toggle".split(" ").concat(er));function Bo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Ya(r,t,void 0,e),e.currentTarget=null}function Ho(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var i=r.length-1;0<=i;i--){var o=r[i],s=o.instance,p=o.currentTarget;if(o=o.listener,s!==u&&l.isPropagationStopped())break e;Bo(l,o,p),u=s}else for(i=0;i<r.length;i++){if(o=r[i],s=o.instance,p=o.currentTarget,o=o.listener,s!==u&&l.isPropagationStopped())break e;Bo(l,o,p),u=s}}}if(Cr)throw e=Wl,Cr=!1,Wl=null,e}function oe(e,t){var n=t[Su];n===void 0&&(n=t[Su]=new Set);var r=e+"__bubble";n.has(r)||(Wo(t,e,2,!1),n.add(r))}function mu(e,t,n){var r=0;t&&(r|=4),Wo(n,e,r,t)}var Br="_reactListening"+Math.random().toString(36).slice(2);function tr(e){if(!e[Br]){e[Br]=!0,V.forEach(function(n){n!=="selectionchange"&&(Gc.has(n)||mu(n,!1,e),mu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Br]||(t[Br]=!0,mu("selectionchange",!1,t))}}function Wo(e,t,n,r){switch(po(t)){case 1:var l=ac;break;case 4:l=cc;break;default:l=Jl}n=l.bind(null,t,n,e),l=void 0,!Hl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function hu(e,t,n,r,l){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var o=r.stateNode.containerInfo;if(o===l||o.nodeType===8&&o.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var s=i.tag;if((s===3||s===4)&&(s=i.stateNode.containerInfo,s===l||s.nodeType===8&&s.parentNode===l))return;i=i.return}for(;o!==null;){if(i=Gt(o),i===null)return;if(s=i.tag,s===5||s===6){r=u=i;continue e}o=o.parentNode}}r=r.return}Xi(function(){var p=u,y=Vl(n),w=[];e:{var h=Vo.get(e);if(h!==void 0){var E=eu,P=e;switch(e){case"keypress":if(Mr(n)===0)break e;case"keydown":case"keyup":E=Cc;break;case"focusin":P="focus",E=ru;break;case"focusout":P="blur",E=ru;break;case"beforeblur":case"afterblur":E=ru;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":E=vo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=pc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=zc;break;case Mo:case Fo:case Uo:E=vc;break;case Ao:E=Lc;break;case"scroll":E=fc;break;case"wheel":E=jc;break;case"copy":case"cut":case"paste":E=gc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=go}var z=(t&4)!==0,ye=!z&&e==="scroll",f=z?h!==null?h+"Capture":null:h;z=[];for(var a=p,d;a!==null;){d=a;var k=d.stateNode;if(d.tag===5&&k!==null&&(d=k,f!==null&&(k=Fn(a,f),k!=null&&z.push(nr(a,k,d)))),ye)break;a=a.return}0<z.length&&(h=new E(h,P,null,n,y),w.push({event:h,listeners:z}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",E=e==="mouseout"||e==="pointerout",h&&n!==Al&&(P=n.relatedTarget||n.fromElement)&&(Gt(P)||P[wt]))break e;if((E||h)&&(h=y.window===y?y:(h=y.ownerDocument)?h.defaultView||h.parentWindow:window,E?(P=n.relatedTarget||n.toElement,E=p,P=P?Gt(P):null,P!==null&&(ye=Xt(P),P!==ye||P.tag!==5&&P.tag!==6)&&(P=null)):(E=null,P=p),E!==P)){if(z=vo,k="onMouseLeave",f="onMouseEnter",a="mouse",(e==="pointerout"||e==="pointerover")&&(z=go,k="onPointerLeave",f="onPointerEnter",a="pointer"),ye=E==null?h:gn(E),d=P==null?h:gn(P),h=new z(k,a+"leave",E,n,y),h.target=ye,h.relatedTarget=d,k=null,Gt(y)===p&&(z=new z(f,a+"enter",P,n,y),z.target=d,z.relatedTarget=ye,k=z),ye=k,E&&P)t:{for(z=E,f=P,a=0,d=z;d;d=vn(d))a++;for(d=0,k=f;k;k=vn(k))d++;for(;0<a-d;)z=vn(z),a--;for(;0<d-a;)f=vn(f),d--;for(;a--;){if(z===f||f!==null&&z===f.alternate)break t;z=vn(z),f=vn(f)}z=null}else z=null;E!==null&&Qo(w,h,E,z,!1),P!==null&&ye!==null&&Qo(w,ye,P,z,!0)}}e:{if(h=p?gn(p):window,E=h.nodeName&&h.nodeName.toLowerCase(),E==="select"||E==="input"&&h.type==="file")var T=Ac;else if(_o(h))if(No)T=Hc;else{T=$c;var O=Vc}else(E=h.nodeName)&&E.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=Bc);if(T&&(T=T(e,p))){Co(w,T,n,y);break e}O&&O(e,h,p),e==="focusout"&&(O=h._wrapperState)&&O.controlled&&h.type==="number"&&Dl(h,"number",h.value)}switch(O=p?gn(p):window,e){case"focusin":(_o(O)||O.contentEditable==="true")&&(mn=O,au=p,bn=null);break;case"focusout":bn=au=mn=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Do(w,n,y);break;case"selectionchange":if(Kc)break;case"keydown":case"keyup":Do(w,n,y)}var D;if(uu)e:{switch(e){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else pn?Eo(e,n)&&(U="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(U="onCompositionStart");U&&(wo&&n.locale!=="ko"&&(pn||U!=="onCompositionStart"?U==="onCompositionEnd"&&pn&&(D=mo()):(jt=y,bl="value"in jt?jt.value:jt.textContent,pn=!0)),O=Hr(p,U),0<O.length&&(U=new yo(U,e,null,n,y),w.push({event:U,listeners:O}),D?U.data=D:(D=xo(n),D!==null&&(U.data=D)))),(D=Dc?Ic(e,n):Mc(e,n))&&(p=Hr(p,"onBeforeInput"),0<p.length&&(y=new yo("onBeforeInput","beforeinput",null,n,y),w.push({event:y,listeners:p}),y.data=D))}Ho(w,t)})}function nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hr(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,u=l.stateNode;l.tag===5&&u!==null&&(l=u,u=Fn(e,n),u!=null&&r.unshift(nr(e,u,l)),u=Fn(e,t),u!=null&&r.push(nr(e,u,l))),e=e.return}return r}function vn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qo(e,t,n,r,l){for(var u=t._reactName,i=[];n!==null&&n!==r;){var o=n,s=o.alternate,p=o.stateNode;if(s!==null&&s===r)break;o.tag===5&&p!==null&&(o=p,l?(s=Fn(n,u),s!=null&&i.unshift(nr(n,s,o))):l||(s=Fn(n,u),s!=null&&i.push(nr(n,s,o)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Zc=/\r\n?/g,Jc=/\u0000|\uFFFD/g;function Ko(e){return(typeof e=="string"?e:""+e).replace(Zc,`
|
|
39
39
|
`).replace(Jc,"")}function Wr(e,t,n){if(t=Ko(t),Ko(e)!==t&&n)throw Error(m(425))}function Qr(){}var vu=null,yu=null;function gu(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 wu=typeof setTimeout=="function"?setTimeout:void 0,qc=typeof clearTimeout=="function"?clearTimeout:void 0,Yo=typeof Promise=="function"?Promise:void 0,bc=typeof queueMicrotask=="function"?queueMicrotask:typeof Yo<"u"?function(e){return Yo.resolve(null).then(e).catch(ef)}:wu;function ef(e){setTimeout(function(){throw e})}function ku(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Kn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Kn(t)}function Dt(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 Xo(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 yn=Math.random().toString(36).slice(2),mt="__reactFiber$"+yn,rr="__reactProps$"+yn,wt="__reactContainer$"+yn,Su="__reactEvents$"+yn,tf="__reactListeners$"+yn,nf="__reactHandles$"+yn;function Gt(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Xo(e);e!==null;){if(n=e[mt])return n;e=Xo(e)}return t}e=n,n=e.parentNode}return null}function lr(e){return e=e[mt]||e[wt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(m(33))}function Kr(e){return e[rr]||null}var Eu=[],wn=-1;function It(e){return{current:e}}function se(e){0>wn||(e.current=Eu[wn],Eu[wn]=null,wn--)}function ue(e,t){wn++,Eu[wn]=e.current,e.current=t}var Mt={},ze=It(Mt),Fe=It(!1),Zt=Mt;function kn(e,t){var n=e.type.contextTypes;if(!n)return Mt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in n)l[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ue(e){return e=e.childContextTypes,e!=null}function Yr(){se(Fe),se(ze)}function Go(e,t,n){if(ze.current!==Mt)throw Error(m(168));ue(ze,t),ue(Fe,n)}function Zo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(m(108,le(e)||"Unknown",l));return N({},n,r)}function Xr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mt,Zt=ze.current,ue(ze,e),ue(Fe,Fe.current),!0}function Jo(e,t,n){var r=e.stateNode;if(!r)throw Error(m(169));n?(e=Zo(e,t,Zt),r.__reactInternalMemoizedMergedChildContext=e,se(Fe),se(ze),ue(ze,e)):se(Fe),ue(Fe,n)}var kt=null,Gr=!1,xu=!1;function qo(e){kt===null?kt=[e]:kt.push(e)}function rf(e){Gr=!0,qo(e)}function Ft(){if(!xu&&kt!==null){xu=!0;var e=0,t=te;try{var n=kt;for(te=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}kt=null,Gr=!1}catch(l){throw kt!==null&&(kt=kt.slice(e+1)),bi(Ql,Ft),l}finally{te=t,xu=!1}}return null}var Sn=[],En=0,Zr=null,Jr=0,Ze=[],Je=0,Jt=null,St=1,Et="";function qt(e,t){Sn[En++]=Jr,Sn[En++]=Zr,Zr=e,Jr=t}function bo(e,t,n){Ze[Je++]=St,Ze[Je++]=Et,Ze[Je++]=Jt,Jt=e;var r=St;e=Et;var l=32-lt(r)-1;r&=~(1<<l),n+=1;var u=32-lt(t)+l;if(30<u){var i=l-l%5;u=(r&(1<<i)-1).toString(32),r>>=i,l-=i,St=1<<32-lt(t)+l|n<<l|r,Et=u+e}else St=1<<u|n<<l|r,Et=e}function _u(e){e.return!==null&&(qt(e,1),bo(e,1,0))}function Cu(e){for(;e===Zr;)Zr=Sn[--En],Sn[En]=null,Jr=Sn[--En],Sn[En]=null;for(;e===Jt;)Jt=Ze[--Je],Ze[Je]=null,Et=Ze[--Je],Ze[Je]=null,St=Ze[--Je],Ze[Je]=null}var Ke=null,Ye=null,ce=!1,it=null;function es(e,t){var n=tt(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 ts(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,Ke=e,Ye=Dt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ke=e,Ye=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Jt!==null?{id:St,overflow:Et}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=tt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ke=e,Ye=null,!0):!1;default:return!1}}function Nu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pu(e){if(ce){var t=Ye;if(t){var n=t;if(!ts(e,t)){if(Nu(e))throw Error(m(418));t=Dt(n.nextSibling);var r=Ke;t&&ts(e,t)?es(r,n):(e.flags=e.flags&-4097|2,ce=!1,Ke=e)}}else{if(Nu(e))throw Error(m(418));e.flags=e.flags&-4097|2,ce=!1,Ke=e}}}function ns(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ke=e}function qr(e){if(e!==Ke)return!1;if(!ce)return ns(e),ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!gu(e.type,e.memoizedProps)),t&&(t=Ye)){if(Nu(e))throw rs(),Error(m(418));for(;t;)es(e,t),t=Dt(t.nextSibling)}if(ns(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ye=Dt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ye=null}}else Ye=Ke?Dt(e.stateNode.nextSibling):null;return!0}function rs(){for(var e=Ye;e;)e=Dt(e.nextSibling)}function xn(){Ye=Ke=null,ce=!1}function zu(e){it===null?it=[e]:it.push(e)}var lf=b.ReactCurrentBatchConfig;function ur(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(m(309));var r=n.stateNode}if(!r)throw Error(m(147,e));var l=r,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(i){var o=l.refs;i===null?delete o[u]:o[u]=i},t._stringRef=u,t)}if(typeof e!="string")throw Error(m(284));if(!n._owner)throw Error(m(290,e))}return e}function br(e,t){throw e=Object.prototype.toString.call(t),Error(m(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ls(e){var t=e._init;return t(e._payload)}function us(e){function t(f,a){if(e){var d=f.deletions;d===null?(f.deletions=[a],f.flags|=16):d.push(a)}}function n(f,a){if(!e)return null;for(;a!==null;)t(f,a),a=a.sibling;return null}function r(f,a){for(f=new Map;a!==null;)a.key!==null?f.set(a.key,a):f.set(a.index,a),a=a.sibling;return f}function l(f,a){return f=Qt(f,a),f.index=0,f.sibling=null,f}function u(f,a,d){return f.index=d,e?(d=f.alternate,d!==null?(d=d.index,d<a?(f.flags|=2,a):d):(f.flags|=2,a)):(f.flags|=1048576,a)}function i(f){return e&&f.alternate===null&&(f.flags|=2),f}function o(f,a,d,k){return a===null||a.tag!==6?(a=wi(d,f.mode,k),a.return=f,a):(a=l(a,d),a.return=f,a)}function s(f,a,d,k){var T=d.type;return T===Ie?y(f,a,d.props.children,k,d.key):a!==null&&(a.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Me&&ls(T)===a.type)?(k=l(a,d.props),k.ref=ur(f,a,d),k.return=f,k):(k=xl(d.type,d.key,d.props,null,f.mode,k),k.ref=ur(f,a,d),k.return=f,k)}function p(f,a,d,k){return a===null||a.tag!==4||a.stateNode.containerInfo!==d.containerInfo||a.stateNode.implementation!==d.implementation?(a=ki(d,f.mode,k),a.return=f,a):(a=l(a,d.children||[]),a.return=f,a)}function y(f,a,d,k,T){return a===null||a.tag!==7?(a=on(d,f.mode,k,T),a.return=f,a):(a=l(a,d),a.return=f,a)}function w(f,a,d){if(typeof a=="string"&&a!==""||typeof a=="number")return a=wi(""+a,f.mode,d),a.return=f,a;if(typeof a=="object"&&a!==null){switch(a.$$typeof){case je:return d=xl(a.type,a.key,a.props,null,f.mode,d),d.ref=ur(f,null,a),d.return=f,d;case Ce:return a=ki(a,f.mode,d),a.return=f,a;case Me:var k=a._init;return w(f,k(a._payload),d)}if(Dn(a)||F(a))return a=on(a,f.mode,d,null),a.return=f,a;br(f,a)}return null}function h(f,a,d,k){var T=a!==null?a.key:null;if(typeof d=="string"&&d!==""||typeof d=="number")return T!==null?null:o(f,a,""+d,k);if(typeof d=="object"&&d!==null){switch(d.$$typeof){case je:return d.key===T?s(f,a,d,k):null;case Ce:return d.key===T?p(f,a,d,k):null;case Me:return T=d._init,h(f,a,T(d._payload),k)}if(Dn(d)||F(d))return T!==null?null:y(f,a,d,k,null);br(f,d)}return null}function E(f,a,d,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return f=f.get(d)||null,o(a,f,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case je:return f=f.get(k.key===null?d:k.key)||null,s(a,f,k,T);case Ce:return f=f.get(k.key===null?d:k.key)||null,p(a,f,k,T);case Me:var O=k._init;return E(f,a,d,O(k._payload),T)}if(Dn(k)||F(k))return f=f.get(d)||null,y(a,f,k,T,null);br(a,k)}return null}function P(f,a,d,k){for(var T=null,O=null,D=a,U=a=0,xe=null;D!==null&&U<d.length;U++){D.index>U?(xe=D,D=null):xe=D.sibling;var J=h(f,D,d[U],k);if(J===null){D===null&&(D=xe);break}e&&D&&J.alternate===null&&t(f,D),a=u(J,a,U),O===null?T=J:O.sibling=J,O=J,D=xe}if(U===d.length)return n(f,D),ce&&qt(f,U),T;if(D===null){for(;U<d.length;U++)D=w(f,d[U],k),D!==null&&(a=u(D,a,U),O===null?T=D:O.sibling=D,O=D);return ce&&qt(f,U),T}for(D=r(f,D);U<d.length;U++)xe=E(D,f,U,d[U],k),xe!==null&&(e&&xe.alternate!==null&&D.delete(xe.key===null?U:xe.key),a=u(xe,a,U),O===null?T=xe:O.sibling=xe,O=xe);return e&&D.forEach(function(Kt){return t(f,Kt)}),ce&&qt(f,U),T}function z(f,a,d,k){var T=F(d);if(typeof T!="function")throw Error(m(150));if(d=T.call(d),d==null)throw Error(m(151));for(var O=T=null,D=a,U=a=0,xe=null,J=d.next();D!==null&&!J.done;U++,J=d.next()){D.index>U?(xe=D,D=null):xe=D.sibling;var Kt=h(f,D,J.value,k);if(Kt===null){D===null&&(D=xe);break}e&&D&&Kt.alternate===null&&t(f,D),a=u(Kt,a,U),O===null?T=Kt:O.sibling=Kt,O=Kt,D=xe}if(J.done)return n(f,D),ce&&qt(f,U),T;if(D===null){for(;!J.done;U++,J=d.next())J=w(f,J.value,k),J!==null&&(a=u(J,a,U),O===null?T=J:O.sibling=J,O=J);return ce&&qt(f,U),T}for(D=r(f,D);!J.done;U++,J=d.next())J=E(D,f,U,J.value,k),J!==null&&(e&&J.alternate!==null&&D.delete(J.key===null?U:J.key),a=u(J,a,U),O===null?T=J:O.sibling=J,O=J);return e&&D.forEach(function(Uf){return t(f,Uf)}),ce&&qt(f,U),T}function ye(f,a,d,k){if(typeof d=="object"&&d!==null&&d.type===Ie&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case je:e:{for(var T=d.key,O=a;O!==null;){if(O.key===T){if(T=d.type,T===Ie){if(O.tag===7){n(f,O.sibling),a=l(O,d.props.children),a.return=f,f=a;break e}}else if(O.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Me&&ls(T)===O.type){n(f,O.sibling),a=l(O,d.props),a.ref=ur(f,O,d),a.return=f,f=a;break e}n(f,O);break}else t(f,O);O=O.sibling}d.type===Ie?(a=on(d.props.children,f.mode,k,d.key),a.return=f,f=a):(k=xl(d.type,d.key,d.props,null,f.mode,k),k.ref=ur(f,a,d),k.return=f,f=k)}return i(f);case Ce:e:{for(O=d.key;a!==null;){if(a.key===O)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=ki(d,f.mode,k),a.return=f,f=a}return i(f);case Me:return O=d._init,ye(f,a,O(d._payload),k)}if(Dn(d))return P(f,a,d,k);if(F(d))return z(f,a,d,k);br(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=wi(d,f.mode,k),a.return=f,f=a),i(f)):n(f,a)}return ye}var _n=us(!0),is=us(!1),el=It(null),tl=null,Cn=null,Tu=null;function Lu(){Tu=Cn=tl=null}function Ru(e){var t=el.current;se(el),e._currentValue=t}function ju(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Nn(e,t){tl=e,Tu=Cn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ae=!0),e.firstContext=null)}function qe(e){var t=e._currentValue;if(Tu!==e)if(e={context:e,memoizedValue:t,next:null},Cn===null){if(tl===null)throw Error(m(308));Cn=e,tl.dependencies={lanes:0,firstContext:e}}else Cn=Cn.next=e;return t}var bt=null;function Ou(e){bt===null?bt=[e]:bt.push(e)}function os(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ou(t)):(n.next=l.next,l.next=n),t.interleaved=n,xt(e,r)}function xt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ut=!1;function Du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ss(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function At(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Y&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,xt(e,n)}return l=r.interleaved,l===null?(t.next=t,Ou(r)):(t.next=l.next,l.next=t),r.interleaved=t,xt(e,n)}function nl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xl(e,n)}}function as(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?l=u=i:u=u.next=i,n=n.next}while(n!==null);u===null?l=u=t:u=u.next=t}else l=u=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function rl(e,t,n,r){var l=e.updateQueue;Ut=!1;var u=l.firstBaseUpdate,i=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var s=o,p=s.next;s.next=null,i===null?u=p:i.next=p,i=s;var y=e.alternate;y!==null&&(y=y.updateQueue,o=y.lastBaseUpdate,o!==i&&(o===null?y.firstBaseUpdate=p:o.next=p,y.lastBaseUpdate=s))}if(u!==null){var w=l.baseState;i=0,y=p=s=null,o=u;do{var h=o.lane,E=o.eventTime;if((r&h)===h){y!==null&&(y=y.next={eventTime:E,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var P=e,z=o;switch(h=t,E=n,z.tag){case 1:if(P=z.payload,typeof P=="function"){w=P.call(E,w,h);break e}w=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=z.payload,h=typeof P=="function"?P.call(E,w,h):P,h==null)break e;w=N({},w,h);break e;case 2:Ut=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[o]:h.push(o))}else E={eventTime:E,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},y===null?(p=y=E,s=w):y=y.next=E,i|=h;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;h=o,o=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);if(y===null&&(s=w),l.baseState=s,l.firstBaseUpdate=p,l.lastBaseUpdate=y,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else u===null&&(l.shared.lanes=0);nn|=i,e.lanes=i,e.memoizedState=w}}function cs(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(m(191,l));l.call(r)}}}var ir={},ht=It(ir),or=It(ir),sr=It(ir);function en(e){if(e===ir)throw Error(m(174));return e}function Iu(e,t){switch(ue(sr,t),ue(or,e),ue(ht,ir),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ml(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ml(t,e)}se(ht),ue(ht,t)}function Pn(){se(ht),se(or),se(sr)}function fs(e){en(sr.current);var t=en(ht.current),n=Ml(t,e.type);t!==n&&(ue(or,e),ue(ht,n))}function Mu(e){or.current===e&&(se(ht),se(or))}var fe=It(0);function ll(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fu=[];function Uu(){for(var e=0;e<Fu.length;e++)Fu[e]._workInProgressVersionPrimary=null;Fu.length=0}var ul=b.ReactCurrentDispatcher,Au=b.ReactCurrentBatchConfig,tn=0,de=null,we=null,Se=null,il=!1,ar=!1,cr=0,uf=0;function Te(){throw Error(m(321))}function Vu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ut(e[n],t[n]))return!1;return!0}function $u(e,t,n,r,l,u){if(tn=u,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ul.current=e===null||e.memoizedState===null?cf:ff,e=n(r,l),ar){u=0;do{if(ar=!1,cr=0,25<=u)throw Error(m(301));u+=1,Se=we=null,t.updateQueue=null,ul.current=df,e=n(r,l)}while(ar)}if(ul.current=al,t=we!==null&&we.next!==null,tn=0,Se=we=de=null,il=!1,t)throw Error(m(300));return e}function Bu(){var e=cr!==0;return cr=0,e}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?de.memoizedState=Se=e:Se=Se.next=e,Se}function be(){if(we===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=Se===null?de.memoizedState:Se.next;if(t!==null)Se=t,we=e;else{if(e===null)throw Error(m(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},Se===null?de.memoizedState=Se=e:Se=Se.next=e}return Se}function fr(e,t){return typeof t=="function"?t(e):t}function Hu(e){var t=be(),n=t.queue;if(n===null)throw Error(m(311));n.lastRenderedReducer=e;var r=we,l=r.baseQueue,u=n.pending;if(u!==null){if(l!==null){var i=l.next;l.next=u.next,u.next=i}r.baseQueue=l=u,n.pending=null}if(l!==null){u=l.next,r=r.baseState;var o=i=null,s=null,p=u;do{var y=p.lane;if((tn&y)===y)s!==null&&(s=s.next={lane:0,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null}),r=p.hasEagerState?p.eagerState:e(r,p.action);else{var w={lane:y,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null};s===null?(o=s=w,i=r):s=s.next=w,de.lanes|=y,nn|=y}p=p.next}while(p!==null&&p!==u);s===null?i=r:s.next=o,ut(r,t.memoizedState)||(Ae=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do u=l.lane,de.lanes|=u,nn|=u,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wu(e){var t=be(),n=t.queue;if(n===null)throw Error(m(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,u=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do u=e(u,i.action),i=i.next;while(i!==l);ut(u,t.memoizedState)||(Ae=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,r]}function ds(){}function ps(e,t){var n=de,r=be(),l=t(),u=!ut(r.memoizedState,l);if(u&&(r.memoizedState=l,Ae=!0),r=r.queue,Qu(vs.bind(null,n,r,e),[e]),r.getSnapshot!==t||u||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,dr(9,hs.bind(null,n,r,l,t),void 0,null),Ee===null)throw Error(m(349));(tn&30)!==0||ms(n,t,l)}return l}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=de.updateQueue,t===null?(t={lastEffect:null,stores:null},de.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&gs(e)}function vs(e,t,n){return n(function(){ys(t)&&gs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ut(e,n)}catch{return!0}}function gs(e){var t=xt(e,1);t!==null&&ct(t,e,1,-1)}function ws(e){var t=vt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fr,lastRenderedState:e},t.queue=e,e=e.dispatch=af.bind(null,de,e),[t.memoizedState,e]}function dr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=de.updateQueue,t===null?(t={lastEffect:null,stores:null},de.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ks(){return be().memoizedState}function ol(e,t,n,r){var l=vt();de.flags|=e,l.memoizedState=dr(1|t,n,void 0,r===void 0?null:r)}function sl(e,t,n,r){var l=be();r=r===void 0?null:r;var u=void 0;if(we!==null){var i=we.memoizedState;if(u=i.destroy,r!==null&&Vu(r,i.deps)){l.memoizedState=dr(t,n,u,r);return}}de.flags|=e,l.memoizedState=dr(1|t,n,u,r)}function Ss(e,t){return ol(8390656,8,e,t)}function Qu(e,t){return sl(2048,8,e,t)}function Es(e,t){return sl(4,2,e,t)}function xs(e,t){return sl(4,4,e,t)}function _s(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Cs(e,t,n){return n=n!=null?n.concat([e]):null,sl(4,4,_s.bind(null,t,e),n)}function Ku(){}function Ns(e,t){var n=be();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ps(e,t){var n=be();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function zs(e,t,n){return(tn&21)===0?(e.baseState&&(e.baseState=!1,Ae=!0),e.memoizedState=n):(ut(n,t)||(n=ro(),de.lanes|=n,nn|=n,e.baseState=!0),t)}function of(e,t){var n=te;te=n!==0&&4>n?n:4,e(!0);var r=Au.transition;Au.transition={};try{e(!1),t()}finally{te=n,Au.transition=r}}function Ts(){return be().memoizedState}function sf(e,t,n){var r=Ht(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e))Rs(t,n);else if(n=os(e,t,n,r),n!==null){var l=De();ct(n,e,r,l),js(n,t,r)}}function af(e,t,n){var r=Ht(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,o=u(i,n);if(l.hasEagerState=!0,l.eagerState=o,ut(o,i)){var s=t.interleaved;s===null?(l.next=l,Ou(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=os(e,t,l,r),n!==null&&(l=De(),ct(n,e,r,l),js(n,t,r))}}function Ls(e){var t=e.alternate;return e===de||t!==null&&t===de}function Rs(e,t){ar=il=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xl(e,n)}}var al={readContext:qe,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},cf={readContext:qe,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:qe,useEffect:Ss,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ol(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ol(4194308,4,e,t)},useInsertionEffect:function(e,t){return ol(4,2,e,t)},useMemo:function(e,t){var n=vt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=sf.bind(null,de,e),[r.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:ws,useDebugValue:Ku,useDeferredValue:function(e){return vt().memoizedState=e},useTransition:function(){var e=ws(!1),t=e[0];return e=of.bind(null,e[1]),vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=de,l=vt();if(ce){if(n===void 0)throw Error(m(407));n=n()}else{if(n=t(),Ee===null)throw Error(m(349));(tn&30)!==0||ms(r,t,n)}l.memoizedState=n;var u={value:n,getSnapshot:t};return l.queue=u,Ss(vs.bind(null,r,u,e),[e]),r.flags|=2048,dr(9,hs.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=vt(),t=Ee.identifierPrefix;if(ce){var n=Et,r=St;n=(r&~(1<<32-lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=uf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ff={readContext:qe,useCallback:Ns,useContext:qe,useEffect:Qu,useImperativeHandle:Cs,useInsertionEffect:Es,useLayoutEffect:xs,useMemo:Ps,useReducer:Hu,useRef:ks,useState:function(){return Hu(fr)},useDebugValue:Ku,useDeferredValue:function(e){var t=be();return zs(t,we.memoizedState,e)},useTransition:function(){var e=Hu(fr)[0],t=be().memoizedState;return[e,t]},useMutableSource:ds,useSyncExternalStore:ps,useId:Ts,unstable_isNewReconciler:!1},df={readContext:qe,useCallback:Ns,useContext:qe,useEffect:Qu,useImperativeHandle:Cs,useInsertionEffect:Es,useLayoutEffect:xs,useMemo:Ps,useReducer:Wu,useRef:ks,useState:function(){return Wu(fr)},useDebugValue:Ku,useDeferredValue:function(e){var t=be();return we===null?t.memoizedState=e:zs(t,we.memoizedState,e)},useTransition:function(){var e=Wu(fr)[0],t=be().memoizedState;return[e,t]},useMutableSource:ds,useSyncExternalStore:ps,useId:Ts,unstable_isNewReconciler:!1};function ot(e,t){if(e&&e.defaultProps){t=N({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:N({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var cl={isMounted:function(e){return(e=e._reactInternals)?Xt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=De(),l=Ht(e),u=_t(r,l);u.payload=t,n!=null&&(u.callback=n),t=At(e,u,l),t!==null&&(ct(t,e,l,r),nl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=De(),l=Ht(e),u=_t(r,l);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=At(e,u,l),t!==null&&(ct(t,e,l,r),nl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=De(),r=Ht(e),l=_t(n,r);l.tag=2,t!=null&&(l.callback=t),t=At(e,l,r),t!==null&&(ct(t,e,r,n),nl(t,e,r))}};function Os(e,t,n,r,l,u,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,i):t.prototype&&t.prototype.isPureReactComponent?!qn(n,r)||!qn(l,u):!0}function Ds(e,t,n){var r=!1,l=Mt,u=t.contextType;return typeof u=="object"&&u!==null?u=qe(u):(l=Ue(t)?Zt:ze.current,r=t.contextTypes,u=(r=r!=null)?kn(e,l):Mt),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=cl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=u),t}function Is(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&cl.enqueueReplaceState(t,t.state,null)}function Xu(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Du(e);var u=t.contextType;typeof u=="object"&&u!==null?l.context=qe(u):(u=Ue(t)?Zt:ze.current,l.context=kn(e,u)),l.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Yu(e,t,u,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&cl.enqueueReplaceState(l,l.state,null),rl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function zn(e,t){try{var n="",r=t;do n+=G(r),r=r.return;while(r);var l=n}catch(u){l=`
|
|
40
40
|
Error generating stack: `+u.message+`
|
|
41
|
-
`+u.stack}return{value:e,source:t,stack:l,digest:null}}function Gu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Zu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pf=typeof WeakMap=="function"?WeakMap:Map;function Ms(e,t,n){n=_t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,fi=r),Zu(e,t)},n}function Fs(e,t,n){n=_t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Zu(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){Zu(e,t),typeof r!="function"&&($t===null?$t=new Set([this]):$t.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Us(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pf;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Pf.bind(null,e,t,n),t.then(e,e))}function As(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 Vs(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_t(-1,1),t.tag=2,At(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var mf=b.ReactCurrentOwner,Ae=!1;function Oe(e,t,n,r){t.child=e===null?is(t,null,n,r):_n(t,e.child,n,r)}function $s(e,t,n,r,l){n=n.render;var u=t.ref;return Nn(t,l),r=$u(e,t,n,r,u,l),n=Bu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ct(e,t,l)):(ce&&n&&_u(t),t.flags|=1,Oe(e,t,r,l),t.child)}function Bs(e,t,n,r,l){if(e===null){var u=n.type;return typeof u=="function"&&!gi(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,Hs(e,t,u,r,l)):(e=xl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&l)===0){var i=u.memoizedProps;if(n=n.compare,n=n!==null?n:qn,n(i,r)&&e.ref===t.ref)return Ct(e,t,l)}return t.flags|=1,e=Qt(u,r),e.ref=t.ref,e.return=t,t.child=e}function Hs(e,t,n,r,l){if(e!==null){var u=e.memoizedProps;if(qn(u,r)&&e.ref===t.ref)if(Ae=!1,t.pendingProps=r=u,(e.lanes&l)!==0)(e.flags&131072)!==0&&(Ae=!0);else return t.lanes=e.lanes,Ct(e,t,l)}return Ju(e,t,n,r,l)}function Ws(e,t,n){var r=t.pendingProps,l=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(Ln,Xe),Xe|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(Ln,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:n,ue(Ln,Xe),Xe|=r}else u!==null?(r=u.baseLanes|n,t.memoizedState=null):r=n,ue(Ln,Xe),Xe|=r;return Oe(e,t,l,n),t.child}function Qs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ju(e,t,n,r,l){var u=Ue(n)?Zt:ze.current;return u=kn(t,u),Nn(t,l),n=$u(e,t,n,r,u,l),r=Bu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ct(e,t,l)):(ce&&r&&_u(t),t.flags|=1,Oe(e,t,n,l),t.child)}function Ks(e,t,n,r,l){if(Ue(n)){var u=!0;Xr(t)}else u=!1;if(Nn(t,l),t.stateNode===null)dl(e,t),Ds(t,n,r),Xu(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,o=t.memoizedProps;i.props=o;var s=i.context,p=n.contextType;typeof p=="object"&&p!==null?p=qe(p):(p=Ue(n)?Zt:ze.current,p=kn(t,p));var y=n.getDerivedStateFromProps,w=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function";w||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==r||s!==p)&&Is(t,i,r,p),Ut=!1;var h=t.memoizedState;i.state=h,rl(t,r,i,l),s=t.memoizedState,o!==r||h!==s||Fe.current||Ut?(typeof y=="function"&&(Yu(t,n,y,r),s=t.memoizedState),(o=Ut||Os(t,n,o,r,h,s,p))?(w||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=p,r=o):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ss(e,t),o=t.memoizedProps,p=t.type===t.elementType?o:ot(t.type,o),i.props=p,w=t.pendingProps,h=i.context,s=n.contextType,typeof s=="object"&&s!==null?s=qe(s):(s=Ue(n)?Zt:ze.current,s=kn(t,s));var E=n.getDerivedStateFromProps;(y=typeof E=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==w||h!==s)&&Is(t,i,r,s),Ut=!1,h=t.memoizedState,i.state=h,rl(t,r,i,l);var P=t.memoizedState;o!==w||h!==P||Fe.current||Ut?(typeof E=="function"&&(Yu(t,n,E,r),P=t.memoizedState),(p=Ut||Os(t,n,p,r,h,P,s)||!1)?(y||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,P,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,P,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=P),i.props=r,i.state=P,i.context=s,r=p):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return qu(e,t,n,r,u,l)}function qu(e,t,n,r,l,u){Qs(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Jo(t,n,!1),Ct(e,t,u);r=t.stateNode,mf.current=t;var o=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=_n(t,e.child,null,u),t.child=_n(t,null,o,u)):Oe(e,t,o,u),t.memoizedState=r.state,l&&Jo(t,n,!0),t.child}function Ys(e){var t=e.stateNode;t.pendingContext?Go(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Go(e,t.context,!1),Iu(e,t.containerInfo)}function Xs(e,t,n,r,l){return xn(),zu(l),t.flags|=256,Oe(e,t,n,r),t.child}var bu={dehydrated:null,treeContext:null,retryLane:0};function ei(e){return{baseLanes:e,cachePool:null,transitions:null}}function Gs(e,t,n){var r=t.pendingProps,l=fe.current,u=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(l&2)!==0),o?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),ue(fe,l&1),e===null)return Pu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=r.children,e=r.fallback,u?(r=t.mode,u=t.child,i={mode:"hidden",children:i},(r&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=i):u=_l(i,r,0,null),e=on(e,r,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=ei(n),t.memoizedState=bu,e):ti(t,i));if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null))return hf(e,t,i,r,o,l,n);if(u){u=r.fallback,i=t.mode,l=e.child,o=l.sibling;var s={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Qt(l,s),r.subtreeFlags=l.subtreeFlags&14680064),o!==null?u=Qt(o,u):(u=on(u,i,n,null),u.flags|=2),u.return=t,r.return=t,r.sibling=u,t.child=r,r=u,u=t.child,i=e.child.memoizedState,i=i===null?ei(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},u.memoizedState=i,u.childLanes=e.childLanes&~n,t.memoizedState=bu,r}return u=e.child,e=u.sibling,r=Qt(u,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ti(e,t){return t=_l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fl(e,t,n,r){return r!==null&&zu(r),_n(t,e.child,null,n),e=ti(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hf(e,t,n,r,l,u,i){if(n)return t.flags&256?(t.flags&=-257,r=Gu(Error(m(422))),fl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=r.fallback,l=t.mode,r=_l({mode:"visible",children:r.children},l,0,null),u=on(u,l,i,null),u.flags|=2,r.return=t,u.return=t,r.sibling=u,t.child=r,(t.mode&1)!==0&&_n(t,e.child,null,i),t.child.memoizedState=ei(i),t.memoizedState=bu,u);if((t.mode&1)===0)return fl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var o=r.dgst;return r=o,u=Error(m(419)),r=Gu(u,r,void 0),fl(e,t,i,r)}if(o=(i&e.childLanes)!==0,Ae||o){if(r=Ee,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|i))!==0?0:l,l!==0&&l!==u.retryLane&&(u.retryLane=l,xt(e,l),ct(r,e,l,-1))}return yi(),r=Gu(Error(m(421))),fl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=zf.bind(null,e),l._reactRetry=t,null):(e=u.treeContext,Ye=Dt(l.nextSibling),Ke=t,ce=!0,it=null,e!==null&&(Ze[Je++]=St,Ze[Je++]=Et,Ze[Je++]=Jt,St=e.id,Et=e.overflow,Jt=t),t=ti(t,r.children),t.flags|=4096,t)}function Zs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ju(e.return,t,n)}function ni(e,t,n,r,l){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=n,u.tailMode=l)}function Js(e,t,n){var r=t.pendingProps,l=r.revealOrder,u=r.tail;if(Oe(e,t,r.children,n),r=fe.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zs(e,n,t);else if(e.tag===19)Zs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ue(fe,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&ll(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ni(t,!1,l,n,u);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&ll(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ni(t,!0,n,null,u);break;case"together":ni(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ct(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(m(153));if(t.child!==null){for(e=t.child,n=Qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function vf(e,t,n){switch(t.tag){case 3:Ys(t),xn();break;case 5:fs(t);break;case 1:Ue(t.type)&&Xr(t);break;case 4:Iu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;ue(el,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ue(fe,fe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Gs(e,t,n):(ue(fe,fe.current&1),e=Ct(e,t,n),e!==null?e.sibling:null);ue(fe,fe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Js(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ue(fe,fe.current),r)break;return null;case 22:case 23:return t.lanes=0,Ws(e,t,n)}return Ct(e,t,n)}var qs,ri,bs,ea;qs=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ri=function(){},bs=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,en(ht.current);var u=null;switch(n){case"input":l=jl(e,l),r=jl(e,r),u=[];break;case"select":l=N({},l,{value:void 0}),r=N({},r,{value:void 0}),u=[];break;case"textarea":l=Il(e,l),r=Il(e,r),u=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Qr)}Fl(n,r);var i;n=null;for(p in l)if(!r.hasOwnProperty(p)&&l.hasOwnProperty(p)&&l[p]!=null)if(p==="style"){var o=l[p];for(i in o)o.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(L.hasOwnProperty(p)?u||(u=[]):(u=u||[]).push(p,null));for(p in r){var s=r[p];if(o=l!=null?l[p]:void 0,r.hasOwnProperty(p)&&s!==o&&(s!=null||o!=null))if(p==="style")if(o){for(i in o)!o.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in s)s.hasOwnProperty(i)&&o[i]!==s[i]&&(n||(n={}),n[i]=s[i])}else n||(u||(u=[]),u.push(p,n)),n=s;else p==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,o=o?o.__html:void 0,s!=null&&o!==s&&(u=u||[]).push(p,s)):p==="children"?typeof s!="string"&&typeof s!="number"||(u=u||[]).push(p,""+s):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(L.hasOwnProperty(p)?(s!=null&&p==="onScroll"&&oe("scroll",e),u||o===s||(u=[])):(u=u||[]).push(p,s))}n&&(u=u||[]).push("style",n);var p=u;(t.updateQueue=p)&&(t.flags|=4)}},ea=function(e,t,n,r){n!==r&&(t.flags|=4)};function pr(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yf(e,t,n){var r=t.pendingProps;switch(Cu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Ue(t.type)&&Yr(),Le(t),null;case 3:return r=t.stateNode,Pn(),se(Fe),se(ze),Uu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(qr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,it!==null&&(mi(it),it=null))),ri(e,t),Le(t),null;case 5:Mu(t);var l=en(sr.current);if(n=t.type,e!==null&&t.stateNode!=null)bs(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(m(166));return Le(t),null}if(e=en(ht.current),qr(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[mt]=t,r[rr]=u,e=(t.mode&1)!==0,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(l=0;l<er.length;l++)oe(er[l],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":Oi(r,u),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},oe("invalid",r);break;case"textarea":Mi(r,u),oe("invalid",r)}Fl(n,u),l=null;for(var i in u)if(u.hasOwnProperty(i)){var o=u[i];i==="children"?typeof o=="string"?r.textContent!==o&&(u.suppressHydrationWarning!==!0&&Wr(r.textContent,o,e),l=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(u.suppressHydrationWarning!==!0&&Wr(r.textContent,o,e),l=["children",""+o]):L.hasOwnProperty(i)&&o!=null&&i==="onScroll"&&oe("scroll",r)}switch(n){case"input":Sr(r),Ii(r,u,!0);break;case"textarea":Sr(r),Ui(r);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(r.onclick=Qr)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ai(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[mt]=t,e[rr]=r,qs(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ul(n,r),n){case"dialog":oe("cancel",e),oe("close",e),l=r;break;case"iframe":case"object":case"embed":oe("load",e),l=r;break;case"video":case"audio":for(l=0;l<er.length;l++)oe(er[l],e);l=r;break;case"source":oe("error",e),l=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),l=r;break;case"details":oe("toggle",e),l=r;break;case"input":Oi(e,r),l=jl(e,r),oe("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=N({},r,{value:void 0}),oe("invalid",e);break;case"textarea":Mi(e,r),l=Il(e,r),oe("invalid",e);break;default:l=r}Fl(n,l),o=l;for(u in o)if(o.hasOwnProperty(u)){var s=o[u];u==="style"?Bi(e,s):u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Vi(e,s)):u==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&In(e,s):typeof s=="number"&&In(e,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(L.hasOwnProperty(u)?s!=null&&u==="onScroll"&&oe("scroll",e):s!=null&&ie(e,u,s,i))}switch(n){case"input":Sr(e),Ii(e,r,!1);break;case"textarea":Sr(e),Ui(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ee(r.value));break;case"select":e.multiple=!!r.multiple,u=r.value,u!=null?sn(e,!!r.multiple,u,!1):r.defaultValue!=null&&sn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Qr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Le(t),null;case 6:if(e&&t.stateNode!=null)ea(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(m(166));if(n=en(sr.current),en(ht.current),qr(t)){if(r=t.stateNode,n=t.memoizedProps,r[mt]=t,(u=r.nodeValue!==n)&&(e=Ke,e!==null))switch(e.tag){case 3:Wr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Wr(r.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[mt]=t,t.stateNode=r}return Le(t),null;case 13:if(se(fe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&Ye!==null&&(t.mode&1)!==0&&(t.flags&128)===0)rs(),xn(),t.flags|=98560,u=!1;else if(u=qr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(m(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(m(317));u[mt]=t}else xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),u=!1}else it!==null&&(mi(it),it=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(fe.current&1)!==0?ke===0&&(ke=3):yi())),t.updateQueue!==null&&(t.flags|=4),Le(t),null);case 4:return Pn(),ri(e,t),e===null&&tr(t.stateNode.containerInfo),Le(t),null;case 10:return Ru(t.type._context),Le(t),null;case 17:return Ue(t.type)&&Yr(),Le(t),null;case 19:if(se(fe),u=t.memoizedState,u===null)return Le(t),null;if(r=(t.flags&128)!==0,i=u.rendering,i===null)if(r)pr(u,!1);else{if(ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ll(e),i!==null){for(t.flags|=128,pr(u,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)u=n,e=r,u.flags&=14680066,i=u.alternate,i===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,u.type=i.type,e=i.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ue(fe,fe.current&1|2),t.child}e=e.sibling}u.tail!==null&&ve()>Rn&&(t.flags|=128,r=!0,pr(u,!1),t.lanes=4194304)}else{if(!r)if(e=ll(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!i.alternate&&!ce)return Le(t),null}else 2*ve()-u.renderingStartTime>Rn&&n!==1073741824&&(t.flags|=128,r=!0,pr(u,!1),t.lanes=4194304);u.isBackwards?(i.sibling=t.child,t.child=i):(n=u.last,n!==null?n.sibling=i:t.child=i,u.last=i)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ve(),t.sibling=null,n=fe.current,ue(fe,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return vi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Xe&1073741824)!==0&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(m(156,t.tag))}function gf(e,t){switch(Cu(t),t.tag){case 1:return Ue(t.type)&&Yr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pn(),se(Fe),se(ze),Uu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Mu(t),null;case 13:if(se(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(m(340));xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(fe),null;case 4:return Pn(),null;case 10:return Ru(t.type._context),null;case 22:case 23:return vi(),null;case 24:return null;default:return null}}var pl=!1,Re=!1,wf=typeof WeakSet=="function"?WeakSet:Set,C=null;function Tn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){me(e,t,r)}else n.current=null}function li(e,t,n){try{n()}catch(r){me(e,t,r)}}var ta=!1;function kf(e,t){if(vu=Or,e=Oo(),su(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var i=0,o=-1,s=-1,p=0,y=0,w=e,h=null;t:for(;;){for(var E;w!==n||l!==0&&w.nodeType!==3||(o=i+l),w!==u||r!==0&&w.nodeType!==3||(s=i+r),w.nodeType===3&&(i+=w.nodeValue.length),(E=w.firstChild)!==null;)h=w,w=E;for(;;){if(w===e)break t;if(h===n&&++p===l&&(o=i),h===u&&++y===r&&(s=i),(E=w.nextSibling)!==null)break;w=h,h=w.parentNode}w=E}n=o===-1||s===-1?null:{start:o,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(yu={focusedElem:e,selectionRange:n},Or=!1,C=t;C!==null;)if(t=C,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,C=e;else for(;C!==null;){t=C;try{var P=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var z=P.memoizedProps,ye=P.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?z:ot(t.type,z),ye);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(m(163))}}catch(k){me(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,C=e;break}C=t.return}return P=ta,ta=!1,P}function mr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&li(t,n,u)}l=l.next}while(l!==r)}}function ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ui(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function na(e){var t=e.alternate;t!==null&&(e.alternate=null,na(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mt],delete t[rr],delete t[Su],delete t[tf],delete t[nf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ra(e){return e.tag===5||e.tag===3||e.tag===4}function la(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ra(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ii(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qr));else if(r!==4&&(e=e.child,e!==null))for(ii(e,t,n),e=e.sibling;e!==null;)ii(e,t,n),e=e.sibling}function oi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oi(e,t,n),e=e.sibling;e!==null;)oi(e,t,n),e=e.sibling}var Ne=null,st=!1;function Vt(e,t,n){for(n=n.child;n!==null;)ua(e,t,n),n=n.sibling}function ua(e,t,n){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Pr,n)}catch{}switch(n.tag){case 5:Re||Tn(n,t);case 6:var r=Ne,l=st;Ne=null,Vt(e,t,n),Ne=r,st=l,Ne!==null&&(st?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(st?(e=Ne,n=n.stateNode,e.nodeType===8?ku(e.parentNode,n):e.nodeType===1&&ku(e,n),Kn(e)):ku(Ne,n.stateNode));break;case 4:r=Ne,l=st,Ne=n.stateNode.containerInfo,st=!0,Vt(e,t,n),Ne=r,st=l;break;case 0:case 11:case 14:case 15:if(!Re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,i=u.destroy;u=u.tag,i!==void 0&&((u&2)!==0||(u&4)!==0)&&li(n,t,i),l=l.next}while(l!==r)}Vt(e,t,n);break;case 1:if(!Re&&(Tn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){me(n,t,o)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Vt(e,t,n),Re=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function ia(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wf),t.forEach(function(r){var l=Tf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function at(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var u=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 5:Ne=o.stateNode,st=!1;break e;case 3:Ne=o.stateNode.containerInfo,st=!0;break e;case 4:Ne=o.stateNode.containerInfo,st=!0;break e}o=o.return}if(Ne===null)throw Error(m(160));ua(u,i,l),Ne=null,st=!1;var s=l.alternate;s!==null&&(s.return=null),l.return=null}catch(p){me(l,t,p)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)oa(t,e),t=t.sibling}function oa(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(at(t,e),yt(e),r&4){try{mr(3,e,e.return),ml(3,e)}catch(z){me(e,e.return,z)}try{mr(5,e,e.return)}catch(z){me(e,e.return,z)}}break;case 1:at(t,e),yt(e),r&512&&n!==null&&Tn(n,n.return);break;case 5:if(at(t,e),yt(e),r&512&&n!==null&&Tn(n,n.return),e.flags&32){var l=e.stateNode;try{In(l,"")}catch(z){me(e,e.return,z)}}if(r&4&&(l=e.stateNode,l!=null)){var u=e.memoizedProps,i=n!==null?n.memoizedProps:u,o=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{o==="input"&&u.type==="radio"&&u.name!=null&&Di(l,u),Ul(o,i);var p=Ul(o,u);for(i=0;i<s.length;i+=2){var y=s[i],w=s[i+1];y==="style"?Bi(l,w):y==="dangerouslySetInnerHTML"?Vi(l,w):y==="children"?In(l,w):ie(l,y,w,p)}switch(o){case"input":Ol(l,u);break;case"textarea":Fi(l,u);break;case"select":var h=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!u.multiple;var E=u.value;E!=null?sn(l,!!u.multiple,E,!1):h!==!!u.multiple&&(u.defaultValue!=null?sn(l,!!u.multiple,u.defaultValue,!0):sn(l,!!u.multiple,u.multiple?[]:"",!1))}l[rr]=u}catch(z){me(e,e.return,z)}}break;case 6:if(at(t,e),yt(e),r&4){if(e.stateNode===null)throw Error(m(162));l=e.stateNode,u=e.memoizedProps;try{l.nodeValue=u}catch(z){me(e,e.return,z)}}break;case 3:if(at(t,e),yt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kn(t.containerInfo)}catch(z){me(e,e.return,z)}break;case 4:at(t,e),yt(e);break;case 13:at(t,e),yt(e),l=e.child,l.flags&8192&&(u=l.memoizedState!==null,l.stateNode.isHidden=u,!u||l.alternate!==null&&l.alternate.memoizedState!==null||(ci=ve())),r&4&&ia(e);break;case 22:if(y=n!==null&&n.memoizedState!==null,e.mode&1?(Re=(p=Re)||y,at(t,e),Re=p):at(t,e),yt(e),r&8192){if(p=e.memoizedState!==null,(e.stateNode.isHidden=p)&&!y&&(e.mode&1)!==0)for(C=e,y=e.child;y!==null;){for(w=C=y;C!==null;){switch(h=C,E=h.child,h.tag){case 0:case 11:case 14:case 15:mr(4,h,h.return);break;case 1:Tn(h,h.return);var P=h.stateNode;if(typeof P.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,P.props=t.memoizedProps,P.state=t.memoizedState,P.componentWillUnmount()}catch(z){me(r,n,z)}}break;case 5:Tn(h,h.return);break;case 22:if(h.memoizedState!==null){ca(w);continue}}E!==null?(E.return=h,C=E):ca(w)}y=y.sibling}e:for(y=null,w=e;;){if(w.tag===5){if(y===null){y=w;try{l=w.stateNode,p?(u=l.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(o=w.stateNode,s=w.memoizedProps.style,i=s!=null&&s.hasOwnProperty("display")?s.display:null,o.style.display=$i("display",i))}catch(z){me(e,e.return,z)}}}else if(w.tag===6){if(y===null)try{w.stateNode.nodeValue=p?"":w.memoizedProps}catch(z){me(e,e.return,z)}}else if((w.tag!==22&&w.tag!==23||w.memoizedState===null||w===e)&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===e)break e;for(;w.sibling===null;){if(w.return===null||w.return===e)break e;y===w&&(y=null),w=w.return}y===w&&(y=null),w.sibling.return=w.return,w=w.sibling}}break;case 19:at(t,e),yt(e),r&4&&ia(e);break;case 21:break;default:at(t,e),yt(e)}}function yt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ra(n)){var r=n;break e}n=n.return}throw Error(m(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(In(l,""),r.flags&=-33);var u=la(e);oi(e,u,l);break;case 3:case 4:var i=r.stateNode.containerInfo,o=la(e);ii(e,o,i);break;default:throw Error(m(161))}}catch(s){me(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sf(e,t,n){C=e,sa(e)}function sa(e,t,n){for(var r=(e.mode&1)!==0;C!==null;){var l=C,u=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||pl;if(!i){var o=l.alternate,s=o!==null&&o.memoizedState!==null||Re;o=pl;var p=Re;if(pl=i,(Re=s)&&!p)for(C=l;C!==null;)i=C,s=i.child,i.tag===22&&i.memoizedState!==null?fa(l):s!==null?(s.return=i,C=s):fa(l);for(;u!==null;)C=u,sa(u),u=u.sibling;C=l,pl=o,Re=p}aa(e)}else(l.subtreeFlags&8772)!==0&&u!==null?(u.return=l,C=u):aa(e)}}function aa(e){for(;C!==null;){var t=C;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Re||ml(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Re)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:ot(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&cs(t,u,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cs(t,i,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var p=t.alternate;if(p!==null){var y=p.memoizedState;if(y!==null){var w=y.dehydrated;w!==null&&Kn(w)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(m(163))}Re||t.flags&512&&ui(t)}catch(h){me(t,t.return,h)}}if(t===e){C=null;break}if(n=t.sibling,n!==null){n.return=t.return,C=n;break}C=t.return}}function ca(e){for(;C!==null;){var t=C;if(t===e){C=null;break}var n=t.sibling;if(n!==null){n.return=t.return,C=n;break}C=t.return}}function fa(e){for(;C!==null;){var t=C;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ml(4,t)}catch(s){me(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(s){me(t,l,s)}}var u=t.return;try{ui(t)}catch(s){me(t,u,s)}break;case 5:var i=t.return;try{ui(t)}catch(s){me(t,i,s)}}}catch(s){me(t,t.return,s)}if(t===e){C=null;break}var o=t.sibling;if(o!==null){o.return=t.return,C=o;break}C=t.return}}var Ef=Math.ceil,hl=b.ReactCurrentDispatcher,si=b.ReactCurrentOwner,et=b.ReactCurrentBatchConfig,Y=0,Ee=null,ge=null,Pe=0,Xe=0,Ln=It(0),ke=0,hr=null,nn=0,vl=0,ai=0,vr=null,Ve=null,ci=0,Rn=1/0,Nt=null,yl=!1,fi=null,$t=null,gl=!1,Bt=null,wl=0,yr=0,di=null,kl=-1,Sl=0;function De(){return(Y&6)!==0?ve():kl!==-1?kl:kl=ve()}function Ht(e){return(e.mode&1)===0?1:(Y&2)!==0&&Pe!==0?Pe&-Pe:lf.transition!==null?(Sl===0&&(Sl=ro()),Sl):(e=te,e!==0||(e=window.event,e=e===void 0?16:po(e.type)),e)}function ct(e,t,n,r){if(50<yr)throw yr=0,di=null,Error(m(185));$n(e,n,r),((Y&2)===0||e!==Ee)&&(e===Ee&&((Y&2)===0&&(vl|=n),ke===4&&Wt(e,Pe)),$e(e,r),n===1&&Y===0&&(t.mode&1)===0&&(Rn=ve()+500,Gr&&Ft()))}function $e(e,t){var n=e.callbackNode;lc(e,t);var r=Lr(e,e===Ee?Pe:0);if(r===0)n!==null&&eo(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&eo(n),t===1)e.tag===0?rf(pa.bind(null,e)):qo(pa.bind(null,e)),bc(function(){(Y&6)===0&&Ft()}),n=null;else{switch(lo(r)){case 1:n=Ql;break;case 4:n=to;break;case 16:n=Nr;break;case 536870912:n=no;break;default:n=Nr}n=Sa(n,da.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function da(e,t){if(kl=-1,Sl=0,(Y&6)!==0)throw Error(m(327));var n=e.callbackNode;if(jn()&&e.callbackNode!==n)return null;var r=Lr(e,e===Ee?Pe:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=El(e,r);else{t=r;var l=Y;Y|=2;var u=ha();(Ee!==e||Pe!==t)&&(Nt=null,Rn=ve()+500,ln(e,t));do try{Cf();break}catch(o){ma(e,o)}while(!0);Lu(),hl.current=u,Y=l,ge!==null?t=0:(Ee=null,Pe=0,t=ke)}if(t!==0){if(t===2&&(l=Kl(e),l!==0&&(r=l,t=pi(e,l))),t===1)throw n=hr,ln(e,0),Wt(e,r),$e(e,ve()),n;if(t===6)Wt(e,r);else{if(l=e.current.alternate,(r&30)===0&&!xf(l)&&(t=El(e,r),t===2&&(u=Kl(e),u!==0&&(r=u,t=pi(e,u))),t===1))throw n=hr,ln(e,0),Wt(e,r),$e(e,ve()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(m(345));case 2:un(e,Ve,Nt);break;case 3:if(Wt(e,r),(r&130023424)===r&&(t=ci+500-ve(),10<t)){if(Lr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){De(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=wu(un.bind(null,e,Ve,Nt),t);break}un(e,Ve,Nt);break;case 4:if(Wt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-lt(r);u=1<<i,i=t[i],i>l&&(l=i),r&=~u}if(r=l,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ef(r/1960))-r,10<r){e.timeoutHandle=wu(un.bind(null,e,Ve,Nt),r);break}un(e,Ve,Nt);break;case 5:un(e,Ve,Nt);break;default:throw Error(m(329))}}}return $e(e,ve()),e.callbackNode===n?da.bind(null,e):null}function pi(e,t){var n=vr;return e.current.memoizedState.isDehydrated&&(ln(e,t).flags|=256),e=El(e,t),e!==2&&(t=Ve,Ve=n,t!==null&&mi(t)),e}function mi(e){Ve===null?Ve=e:Ve.push.apply(Ve,e)}function xf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],u=l.getSnapshot;l=l.value;try{if(!ut(u(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wt(e,t){for(t&=~ai,t&=~vl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-lt(t),r=1<<n;e[n]=-1,t&=~r}}function pa(e){if((Y&6)!==0)throw Error(m(327));jn();var t=Lr(e,0);if((t&1)===0)return $e(e,ve()),null;var n=El(e,t);if(e.tag!==0&&n===2){var r=Kl(e);r!==0&&(t=r,n=pi(e,r))}if(n===1)throw n=hr,ln(e,0),Wt(e,t),$e(e,ve()),n;if(n===6)throw Error(m(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,un(e,Ve,Nt),$e(e,ve()),null}function hi(e,t){var n=Y;Y|=1;try{return e(t)}finally{Y=n,Y===0&&(Rn=ve()+500,Gr&&Ft())}}function rn(e){Bt!==null&&Bt.tag===0&&(Y&6)===0&&jn();var t=Y;Y|=1;var n=et.transition,r=te;try{if(et.transition=null,te=1,e)return e()}finally{te=r,et.transition=n,Y=t,(Y&6)===0&&Ft()}}function vi(){Xe=Ln.current,se(Ln)}function ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,qc(n)),ge!==null)for(n=ge.return;n!==null;){var r=n;switch(Cu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yr();break;case 3:Pn(),se(Fe),se(ze),Uu();break;case 5:Mu(r);break;case 4:Pn();break;case 13:se(fe);break;case 19:se(fe);break;case 10:Ru(r.type._context);break;case 22:case 23:vi()}n=n.return}if(Ee=e,ge=e=Qt(e.current,null),Pe=Xe=t,ke=0,hr=null,ai=vl=nn=0,Ve=vr=null,bt!==null){for(t=0;t<bt.length;t++)if(n=bt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,u=n.pending;if(u!==null){var i=u.next;u.next=l,r.next=i}n.pending=r}bt=null}return e}function ma(e,t){do{var n=ge;try{if(Lu(),ul.current=al,il){for(var r=de.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}il=!1}if(tn=0,Se=we=de=null,ar=!1,cr=0,si.current=null,n===null||n.return===null){ke=1,hr=t,ge=null;break}e:{var u=e,i=n.return,o=n,s=t;if(t=Pe,o.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var p=s,y=o,w=y.tag;if((y.mode&1)===0&&(w===0||w===11||w===15)){var h=y.alternate;h?(y.updateQueue=h.updateQueue,y.memoizedState=h.memoizedState,y.lanes=h.lanes):(y.updateQueue=null,y.memoizedState=null)}var E=As(i);if(E!==null){E.flags&=-257,Vs(E,i,o,u,t),E.mode&1&&Us(u,p,t),t=E,s=p;var P=t.updateQueue;if(P===null){var z=new Set;z.add(s),t.updateQueue=z}else P.add(s);break e}else{if((t&1)===0){Us(u,p,t),yi();break e}s=Error(m(426))}}else if(ce&&o.mode&1){var ye=As(i);if(ye!==null){(ye.flags&65536)===0&&(ye.flags|=256),Vs(ye,i,o,u,t),zu(zn(s,o));break e}}u=s=zn(s,o),ke!==4&&(ke=2),vr===null?vr=[u]:vr.push(u),u=i;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var f=Ms(u,s,t);as(u,f);break e;case 1:o=s;var a=u.type,d=u.stateNode;if((u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&($t===null||!$t.has(d)))){u.flags|=65536,t&=-t,u.lanes|=t;var k=Fs(u,o,t);as(u,k);break e}}u=u.return}while(u!==null)}ya(n)}catch(T){t=T,ge===n&&n!==null&&(ge=n=n.return);continue}break}while(!0)}function ha(){var e=hl.current;return hl.current=al,e===null?al:e}function yi(){(ke===0||ke===3||ke===2)&&(ke=4),Ee===null||(nn&268435455)===0&&(vl&268435455)===0||Wt(Ee,Pe)}function El(e,t){var n=Y;Y|=2;var r=ha();(Ee!==e||Pe!==t)&&(Nt=null,ln(e,t));do try{_f();break}catch(l){ma(e,l)}while(!0);if(Lu(),Y=n,hl.current=r,ge!==null)throw Error(m(261));return Ee=null,Pe=0,ke}function _f(){for(;ge!==null;)va(ge)}function Cf(){for(;ge!==null&&!Ga();)va(ge)}function va(e){var t=ka(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?ya(e):ge=t,si.current=null}function ya(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=yf(n,t,Xe),n!==null){ge=n;return}}else{if(n=gf(n,t),n!==null){n.flags&=32767,ge=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,ge=null;return}}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);ke===0&&(ke=5)}function un(e,t,n){var r=te,l=et.transition;try{et.transition=null,te=1,Nf(e,t,n,r)}finally{et.transition=l,te=r}return null}function Nf(e,t,n,r){do jn();while(Bt!==null);if((Y&6)!==0)throw Error(m(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(m(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(uc(e,u),e===Ee&&(ge=Ee=null,Pe=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||gl||(gl=!0,Sa(Nr,function(){return jn(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=et.transition,et.transition=null;var i=te;te=1;var o=Y;Y|=4,si.current=null,kf(e,n),oa(n,e),Qc(yu),Or=!!vu,yu=vu=null,e.current=n,Sf(n),Za(),Y=o,te=i,et.transition=u}else e.current=n;if(gl&&(gl=!1,Bt=e,wl=l),u=e.pendingLanes,u===0&&($t=null),ba(n.stateNode),$e(e,ve()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(yl)throw yl=!1,e=fi,fi=null,e;return(wl&1)!==0&&e.tag!==0&&jn(),u=e.pendingLanes,(u&1)!==0?e===di?yr++:(yr=0,di=e):yr=0,Ft(),null}function jn(){if(Bt!==null){var e=lo(wl),t=et.transition,n=te;try{if(et.transition=null,te=16>e?16:e,Bt===null)var r=!1;else{if(e=Bt,Bt=null,wl=0,(Y&6)!==0)throw Error(m(331));var l=Y;for(Y|=4,C=e.current;C!==null;){var u=C,i=u.child;if((C.flags&16)!==0){var o=u.deletions;if(o!==null){for(var s=0;s<o.length;s++){var p=o[s];for(C=p;C!==null;){var y=C;switch(y.tag){case 0:case 11:case 15:mr(8,y,u)}var w=y.child;if(w!==null)w.return=y,C=w;else for(;C!==null;){y=C;var h=y.sibling,E=y.return;if(na(y),y===p){C=null;break}if(h!==null){h.return=E,C=h;break}C=E}}}var P=u.alternate;if(P!==null){var z=P.child;if(z!==null){P.child=null;do{var ye=z.sibling;z.sibling=null,z=ye}while(z!==null)}}C=u}}if((u.subtreeFlags&2064)!==0&&i!==null)i.return=u,C=i;else e:for(;C!==null;){if(u=C,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:mr(9,u,u.return)}var f=u.sibling;if(f!==null){f.return=u.return,C=f;break e}C=u.return}}var a=e.current;for(C=a;C!==null;){i=C;var d=i.child;if((i.subtreeFlags&2064)!==0&&d!==null)d.return=i,C=d;else e:for(i=a;C!==null;){if(o=C,(o.flags&2048)!==0)try{switch(o.tag){case 0:case 11:case 15:ml(9,o)}}catch(T){me(o,o.return,T)}if(o===i){C=null;break e}var k=o.sibling;if(k!==null){k.return=o.return,C=k;break e}C=o.return}}if(Y=l,Ft(),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Pr,e)}catch{}r=!0}return r}finally{te=n,et.transition=t}}return!1}function ga(e,t,n){t=zn(n,t),t=Ms(e,t,1),e=At(e,t,1),t=De(),e!==null&&($n(e,1,t),$e(e,t))}function me(e,t,n){if(e.tag===3)ga(e,e,n);else for(;t!==null;){if(t.tag===3){ga(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($t===null||!$t.has(r))){e=zn(n,e),e=Fs(t,e,1),t=At(t,e,1),e=De(),t!==null&&($n(t,1,e),$e(t,e));break}}t=t.return}}function Pf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=De(),e.pingedLanes|=e.suspendedLanes&n,Ee===e&&(Pe&n)===n&&(ke===4||ke===3&&(Pe&130023424)===Pe&&500>ve()-ci?ln(e,0):ai|=n),$e(e,t)}function wa(e,t){t===0&&((e.mode&1)===0?t=1:(t=Tr,Tr<<=1,(Tr&130023424)===0&&(Tr=4194304)));var n=De();e=xt(e,t),e!==null&&($n(e,t,n),$e(e,n))}function zf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wa(e,n)}function Tf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(m(314))}r!==null&&r.delete(t),wa(e,n)}var ka;ka=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Ae=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ae=!1,vf(e,t,n);Ae=(e.flags&131072)!==0}else Ae=!1,ce&&(t.flags&1048576)!==0&&bo(t,Jr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;dl(e,t),e=t.pendingProps;var l=kn(t,ze.current);Nn(t,n),l=$u(null,t,r,e,l,n);var u=Bu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ue(r)?(u=!0,Xr(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Du(t),l.updater=cl,t.stateNode=l,l._reactInternals=t,Xu(t,r,e,n),t=qu(null,t,r,!0,u,n)):(t.tag=0,ce&&u&&_u(t),Oe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(dl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Rf(r),e=ot(r,e),l){case 0:t=Ju(null,t,r,e,n);break e;case 1:t=Ks(null,t,r,e,n);break e;case 11:t=$s(null,t,r,e,n);break e;case 14:t=Bs(null,t,r,ot(r.type,e),n);break e}throw Error(m(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),Ju(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),Ks(e,t,r,l,n);case 3:e:{if(Ys(t),e===null)throw Error(m(387));r=t.pendingProps,u=t.memoizedState,l=u.element,ss(e,t),rl(t,r,null,n);var i=t.memoizedState;if(r=i.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=zn(Error(m(423)),t),t=Xs(e,t,r,n,l);break e}else if(r!==l){l=zn(Error(m(424)),t),t=Xs(e,t,r,n,l);break e}else for(Ye=Dt(t.stateNode.containerInfo.firstChild),Ke=t,ce=!0,it=null,n=is(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xn(),r===l){t=Ct(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return fs(t),e===null&&Pu(t),r=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,gu(r,l)?i=null:u!==null&&gu(r,u)&&(t.flags|=32),Qs(e,t),Oe(e,t,i,n),t.child;case 6:return e===null&&Pu(t),null;case 13:return Gs(e,t,n);case 4:return Iu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_n(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),$s(e,t,r,l,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,u=t.memoizedProps,i=l.value,ue(el,r._currentValue),r._currentValue=i,u!==null)if(ut(u.value,i)){if(u.children===l.children&&!Fe.current){t=Ct(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var o=u.dependencies;if(o!==null){i=u.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=_t(-1,n&-n),s.tag=2;var p=u.updateQueue;if(p!==null){p=p.shared;var y=p.pending;y===null?s.next=s:(s.next=y.next,y.next=s),p.pending=s}}u.lanes|=n,s=u.alternate,s!==null&&(s.lanes|=n),ju(u.return,n,t),o.lanes|=n;break}s=s.next}}else if(u.tag===10)i=u.type===t.type?null:u.child;else if(u.tag===18){if(i=u.return,i===null)throw Error(m(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),ju(i,n,t),i=u.sibling}else i=u.child;if(i!==null)i.return=u;else for(i=u;i!==null;){if(i===t){i=null;break}if(u=i.sibling,u!==null){u.return=i.return,i=u;break}i=i.return}u=i}Oe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Nn(t,n),l=qe(l),r=r(l),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,l=ot(r,t.pendingProps),l=ot(r.type,l),Bs(e,t,r,l,n);case 15:return Hs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),dl(e,t),t.tag=1,Ue(r)?(e=!0,Xr(t)):e=!1,Nn(t,n),Ds(t,r,l),Xu(t,r,l,n),qu(null,t,r,!0,e,n);case 19:return Js(e,t,n);case 22:return Ws(e,t,n)}throw Error(m(156,t.tag))};function Sa(e,t){return bi(e,t)}function Lf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tt(e,t,n,r){return new Lf(e,t,n,r)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Rf(e){if(typeof e=="function")return gi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ft)return 11;if(e===dt)return 14}return 2}function Qt(e,t){var n=e.alternate;return n===null?(n=tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xl(e,t,n,r,l,u){var i=2;if(r=e,typeof e=="function")gi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ie:return on(n.children,l,u,t);case Ge:i=8,l|=8;break;case Pt:return e=tt(12,n,t,l|2),e.elementType=Pt,e.lanes=u,e;case He:return e=tt(13,n,t,l),e.elementType=He,e.lanes=u,e;case rt:return e=tt(19,n,t,l),e.elementType=rt,e.lanes=u,e;case pe:return _l(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gt:i=10;break e;case Yt:i=9;break e;case ft:i=11;break e;case dt:i=14;break e;case Me:i=16,r=null;break e}throw Error(m(130,e==null?e:typeof e,""))}return t=tt(i,n,t,l),t.elementType=e,t.type=r,t.lanes=u,t}function on(e,t,n,r){return e=tt(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=tt(22,e,r,t),e.elementType=pe,e.lanes=n,e.stateNode={isHidden:!1},e}function wi(e,t,n){return e=tt(6,e,null,t),e.lanes=n,e}function ki(e,t,n){return t=tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jf(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yl(0),this.expirationTimes=Yl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Si(e,t,n,r,l,u,i,o,s){return e=new jf(e,t,n,o,s),t===1?(t=1,u===!0&&(t|=8)):t=0,u=tt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Du(u),e}function Of(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ce,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ea(e){if(!e)return Mt;e=e._reactInternals;e:{if(Xt(e)!==e||e.tag!==1)throw Error(m(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ue(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(m(171))}if(e.tag===1){var n=e.type;if(Ue(n))return Zo(e,n,t)}return t}function xa(e,t,n,r,l,u,i,o,s){return e=Si(n,r,!0,e,l,u,i,o,s),e.context=Ea(null),n=e.current,r=De(),l=Ht(n),u=_t(r,l),u.callback=t??null,At(n,u,l),e.current.lanes=l,$n(e,l,r),$e(e,r),e}function Cl(e,t,n,r){var l=t.current,u=De(),i=Ht(l);return n=Ea(n),t.context===null?t.context=n:t.pendingContext=n,t=_t(u,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=At(l,t,i),e!==null&&(ct(e,l,i,u),nl(e,l,i)),i}function Nl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function _a(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ei(e,t){_a(e,t),(e=e.alternate)&&_a(e,t)}function Df(){return null}var Ca=typeof reportError=="function"?reportError:function(e){console.error(e)};function xi(e){this._internalRoot=e}Pl.prototype.render=xi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(m(409));Cl(e,t,null,null)},Pl.prototype.unmount=xi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rn(function(){Cl(null,e,null,null)}),t[wt]=null}};function Pl(e){this._internalRoot=e}Pl.prototype.unstable_scheduleHydration=function(e){if(e){var t=oo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&t!==0&&t<Rt[n].priority;n++);Rt.splice(n,0,e),n===0&&co(e)}};function _i(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Na(){}function If(e,t,n,r,l){if(l){if(typeof r=="function"){var u=r;r=function(){var p=Nl(i);u.call(p)}}var i=xa(t,r,e,0,null,!1,!1,"",Na);return e._reactRootContainer=i,e[wt]=i.current,tr(e.nodeType===8?e.parentNode:e),rn(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var o=r;r=function(){var p=Nl(s);o.call(p)}}var s=Si(e,0,!1,null,null,!1,!1,"",Na);return e._reactRootContainer=s,e[wt]=s.current,tr(e.nodeType===8?e.parentNode:e),rn(function(){Cl(t,s,n,r)}),s}function Tl(e,t,n,r,l){var u=n._reactRootContainer;if(u){var i=u;if(typeof l=="function"){var o=l;l=function(){var s=Nl(i);o.call(s)}}Cl(t,i,e,l)}else i=If(n,t,e,l,r);return Nl(i)}uo=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vn(t.pendingLanes);n!==0&&(Xl(t,n|1),$e(t,ve()),(Y&6)===0&&(Rn=ve()+500,Ft()))}break;case 13:rn(function(){var r=xt(e,1);if(r!==null){var l=De();ct(r,e,1,l)}}),Ei(e,1)}},Gl=function(e){if(e.tag===13){var t=xt(e,134217728);if(t!==null){var n=De();ct(t,e,134217728,n)}Ei(e,134217728)}},io=function(e){if(e.tag===13){var t=Ht(e),n=xt(e,t);if(n!==null){var r=De();ct(n,e,t,r)}Ei(e,t)}},oo=function(){return te},so=function(e,t){var n=te;try{return te=e,t()}finally{te=n}},$l=function(e,t,n){switch(t){case"input":if(Ol(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Kr(r);if(!l)throw Error(m(90));ji(r),Ol(r,l)}}}break;case"textarea":Fi(e,n);break;case"select":t=n.value,t!=null&&sn(e,!!n.multiple,t,!1)}},Ki=hi,Yi=rn;var Mf={usingClientEntryPoint:!1,Events:[lr,gn,Kr,Wi,Qi,hi]},gr={findFiberByHostInstance:Gt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ff={bundleType:gr.bundleType,version:gr.version,rendererPackageName:gr.rendererPackageName,rendererConfig:gr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ji(e),e===null?null:e.stateNode},findFiberByHostInstance:gr.findFiberByHostInstance||Df,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{Pr=Ll.inject(Ff),pt=Ll}catch{}}return Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mf,Be.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_i(t))throw Error(m(200));return Of(e,t,null,n)},Be.createRoot=function(e,t){if(!_i(e))throw Error(m(299));var n=!1,r="",l=Ca;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Si(e,1,!1,null,null,n,!1,r,l),e[wt]=t.current,tr(e.nodeType===8?e.parentNode:e),new xi(t)},Be.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(m(188)):(e=Object.keys(e).join(","),Error(m(268,e)));return e=Ji(t),e=e===null?null:e.stateNode,e},Be.flushSync=function(e){return rn(e)},Be.hydrate=function(e,t,n){if(!zl(t))throw Error(m(200));return Tl(null,e,t,!0,n)},Be.hydrateRoot=function(e,t,n){if(!_i(e))throw Error(m(405));var r=n!=null&&n.hydratedSources||null,l=!1,u="",i=Ca;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=xa(t,null,e,1,n??null,l,!1,u,i),e[wt]=t.current,tr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Pl(t)},Be.render=function(e,t,n){if(!zl(t))throw Error(m(200));return Tl(null,e,t,!1,n)},Be.unmountComponentAtNode=function(e){if(!zl(e))throw Error(m(40));return e._reactRootContainer?(rn(function(){Tl(null,null,e,!1,function(){e._reactRootContainer=null,e[wt]=null})}),!0):!1},Be.unstable_batchedUpdates=hi,Be.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zl(n))throw Error(m(200));if(e==null||e._reactInternals===void 0)throw Error(m(38));return Tl(e,t,n,!1,r)},Be.version="18.3.1-next-f1338f8080-20240426",Be}var Da;function Qf(){if(Da)return Pi.exports;Da=1;function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(_){console.error(_)}}return g(),Pi.exports=Wf(),Pi.exports}var Ia;function Kf(){if(Ia)return Rl;Ia=1;var g=Qf();return Rl.createRoot=g.createRoot,Rl.hydrateRoot=g.hydrateRoot,Rl}var Yf=Kf();const Xf="modulepreload",Gf=function(g){return"/"+g},Ma={},On=function(_,m,V){let L=Promise.resolve();if(m&&m.length>0){let A=function(j){return Promise.all(j.map(W=>Promise.resolve(W).then(K=>({status:"fulfilled",value:K}),K=>({status:"rejected",reason:K}))))};document.getElementsByTagName("link");const M=document.querySelector("meta[property=csp-nonce]"),H=(M==null?void 0:M.nonce)||(M==null?void 0:M.getAttribute("nonce"));L=A(m.map(j=>{if(j=Gf(j),j in Ma)return;Ma[j]=!0;const W=j.endsWith(".css"),K=W?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${j}"]${K}`))return;const R=document.createElement("link");if(R.rel=W?"stylesheet":Xf,W||(R.as="script"),R.crossOrigin="",R.href=j,H&&R.setAttribute("nonce",H),document.head.appendChild(R),W)return new Promise((he,_e)=>{R.addEventListener("load",he),R.addEventListener("error",()=>_e(new Error(`Unable to preload CSS for ${j}`)))})}))}function I(A){const M=new Event("vite:preloadError",{cancelable:!0});if(M.payload=A,window.dispatchEvent(M),!M.defaultPrevented)throw A}return L.then(A=>{for(const M of A||[])M.status==="rejected"&&I(M.reason);return _().catch(I)})},Ri=[{id:"sections",title:"栏目",order:500,component:X.lazy(()=>On(()=>import("./view-DmRiyvj2.js"),[]))},{id:"entries",title:"条目",order:600,tab:!1,component:X.lazy(()=>On(()=>import("./view-C0WrdqsX.js"),__vite__mapDeps([0,1])))},{id:"files",title:"附件",order:650,component:X.lazy(()=>On(()=>import("./view-BJmqIMAn.js"),__vite__mapDeps([2,1])))},{id:"export",title:"导出",order:700,component:X.lazy(()=>On(()=>import("./view-B-jmSJ3J.js"),[]))},{id:"backup",title:"加密备份",order:750,component:X.lazy(()=>On(()=>import("./view-CzDoriKQ.js"),[]))},{id:"settings",title:"设置",order:900,component:X.lazy(()=>On(()=>import("./view-Cuhbkxa8.js"),[]))}],Zf=Ri.find(g=>g.id==="entries").component;Ri.map(g=>g.id);const Jf=3e4;async function qf(g,_={}){const m=new AbortController,V=setTimeout(()=>m.abort(),_.timeoutMs||Jf);try{const L=await fetch(g,{method:_.method||"GET",headers:_.body?{"content-type":"application/json"}:void 0,body:_.body?JSON.stringify(_.body):void 0,signal:m.signal}),I=await L.json().catch(()=>{throw new Error(`HTTP ${L.status}`)});if(!I.ok){const A=new Error(I.error||"请求失败");throw A.code=I.code,A}return I.data}catch(L){throw L&&L.name==="AbortError"?new Error("请求超时(本地服务无响应)"):L}finally{clearTimeout(V)}}const Aa="nx-sk-ui",Fa={view:"job",entry:"",q:"",mask:!1};function bf(){try{return{...Fa,...JSON.parse(localStorage.getItem(Aa)||"{}")}}catch{return{...Fa}}}const Va=X.createContext(null);function ed({children:g}){const[_,m]=X.useState(null),[V,L]=X.useState(null),[I,A]=X.useState(bf),[M,H]=X.useState([]),[j,W]=X.useState(null),K=X.useCallback(re=>{A(ie=>{const b={...ie,...re};try{localStorage.setItem(Aa,JSON.stringify(b))}catch{}return b})},[]),R=X.useCallback(async()=>{try{const re=await qf("/api/bootstrap");return m(re),L(null),re}catch(re){return L(re.message||String(re)),null}},[]);X.useEffect(()=>{R()},[R]);const he=X.useCallback((re,ie="ok")=>{const b=`${Date.now()}-${Math.random().toString(36).slice(2,6)}`;H(je=>[...je,{id:b,message:re,kind:ie}]),setTimeout(()=>H(je=>je.filter(Ce=>Ce.id!==b)),2600)},[]),_e=X.useCallback(re=>new Promise(ie=>{W({...re,resolve:ie})}),[]),ne=X.useCallback(re=>{W(ie=>{var b;return(b=ie==null?void 0:ie.resolve)==null||b.call(ie,re),null})},[]),q=X.useCallback(re=>async(...ie)=>{try{await re(...ie)}catch(b){he((b==null?void 0:b.message)||String(b),"bad")}},[he]),nt=X.useMemo(()=>({boot:_,bootError:V,ui:I,patchUi:K,reload:R,toast:he,dialog:_e,closeDialog:ne,guard:q,toasts:M,dialogState:j}),[_,V,I,K,R,he,_e,ne,q,M,j]);return x.jsx(Va.Provider,{value:nt,children:g})}function kr(){const g=X.useContext(Va);if(!g)throw new Error("useStore 必须在 StoreProvider 内使用");return g}function $a({text:g,children:_,className:m="",title:V}){const{toast:L}=kr(),I=async()=>{const A=String(g??"");try{await navigator.clipboard.writeText(A),L("已复制")}catch{L("复制失败:浏览器拒绝了剪贴板访问","bad")}};return x.jsx("span",{className:`copyable ${m}`,title:V||`点击复制:${g}`,onClick:I,role:"button",tabIndex:0,onKeyDown:A=>{A.key==="Enter"&&I()},children:_??g})}function id({children:g,kind:_=""}){return x.jsx("span",{className:`tag ${_}`,children:g})}class td extends X.Component{constructor(_){super(_),this.state={err:null}}static getDerivedStateFromError(_){return{err:_}}render(){var _;return this.state.err?x.jsxs("div",{className:"pad stack",children:[x.jsx("div",{children:x.jsx("strong",{children:"这个视图崩了"})}),x.jsx("div",{className:"muted",children:String(((_=this.state.err)==null?void 0:_.message)||this.state.err)}),x.jsx("div",{className:"hint",children:"切到别的 tab 仍然可用;修好之后本页会自愈。"})]}):this.props.children}}function nd(){const{toasts:g}=kr();return g.length?x.jsx("div",{className:"toasts",children:g.map(_=>x.jsx("div",{className:`toast ${_.kind==="ok"?"":"bad"}`,children:_.message},_.id))}):null}function od({title:g,children:_,onClose:m,footer:V}){return X.useEffect(()=>{const L=I=>{I.key==="Escape"&&(m==null||m())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[m]),x.jsx("div",{className:"mask",onClick:L=>{L.target===L.currentTarget&&(m==null||m())},children:x.jsxs("div",{className:"dialog",children:[x.jsxs("div",{className:"dialog-title",children:[x.jsx("span",{className:"grow nowrap",children:g}),x.jsx("button",{className:"btn small ghost",onClick:m,children:"关闭"})]}),x.jsx("div",{className:"dialog-body",children:_}),V?x.jsx("div",{className:"dialog-foot",children:V}):null]})})}function rd(){const{dialogState:g,closeDialog:_}=kr(),m=X.useRef(null);if(X.useEffect(()=>{g!=null&&g.input&&m.current&&m.current.focus()},[g]),!g)return null;const{message:V,detail:L,danger:I,input:A,confirmText:M="确定",cancelText:H="取消",hideCancel:j}=g;return x.jsx("div",{className:"mask",children:x.jsxs("div",{className:"dialog",children:[x.jsx("div",{className:"dialog-title",children:I?"危险操作":"确认"}),x.jsxs("div",{className:"dialog-body stack",children:[x.jsx("div",{children:V}),L?x.jsx("pre",{className:"block",children:L}):null,A?x.jsx("input",{ref:m,defaultValue:A.defaultValue||"",placeholder:A.placeholder||""}):null]}),x.jsxs("div",{className:"dialog-foot",children:[j?null:x.jsx("button",{className:"btn ghost",onClick:()=>_(null),children:H}),x.jsx("button",{className:`btn ${I?"danger":""}`,onClick:()=>{var W;return _(A?((W=m.current)==null?void 0:W.value)??"":!0)},children:M})]})]})})}function sd({module:g}){const{boot:_}=kr(),m=((_==null?void 0:_.commands)||[]).filter(V=>V.module===g);return m.length?x.jsxs("div",{className:"cli-hint",children:[x.jsx("span",{className:"cli-hint-label",children:"这个页面上的每个操作都有一条同构的 CLI 命令:"}),m.map((V,L)=>x.jsxs(X.Fragment,{children:[L>0?x.jsx("span",{className:"cli-hint-sep",children:" · "}):null,x.jsx($a,{className:"cli-cmd",text:V.command,title:`点击复制:${V.usage}`,children:V.command})]},V.id)),x.jsxs("span",{className:"cli-hint-tail",children:["。加 ",x.jsx("code",{className:"cli-cmd",children:"--json"})," 得机器可读输出。"]})]}):null}function ad({children:g}){return x.jsx("div",{className:"row muted",children:g})}function Ua(){const g=/^#\/?([^?/]*)/.exec(window.location.hash||"");return g?decodeURIComponent(g[1]):""}function ld(){const{boot:g,bootError:_,ui:m,patchUi:V,reload:L}=kr(),I=X.useMemo(()=>{const j=((g==null?void 0:g.sections)||[]).map(R=>({id:R.id,title:R.title,order:R.order,kind:"section",count:R.entries})),W=Ri.filter(R=>R.tab!==!1).map(R=>({id:R.id,title:R.title,order:R.order,kind:"view",component:R.component})),K=new Set;return[...j,...W].sort((R,he)=>(R.order??50)-(he.order??50)).filter(R=>K.has(R.id)?!1:(K.add(R.id),!0))},[g]),A=!!g,M=I.find(j=>j.id===m.view)||(A?I[0]:null)||null;X.useEffect(()=>{const j=Ua();j&&j!==m.view?V({view:j}):window.location.hash||(window.location.hash=`#/${m.view}`)},[]),X.useEffect(()=>{const j=()=>{const W=Ua();W&&V({view:W})};return window.addEventListener("hashchange",j),()=>window.removeEventListener("hashchange",j)},[V]),X.useEffect(()=>{A&&M&&M.id!==m.view&&V({view:M.id})},[A,M,m.view,V]);const H=j=>{V({view:j}),window.location.hash=`#/${j}`};return x.jsxs("div",{className:"app",children:[x.jsxs("header",{className:"top",children:[x.jsxs("span",{className:"brand",children:[x.jsx("img",{src:"/logo-rounded.png",alt:""}),"nx-sk"]}),x.jsx("span",{className:"tagline",children:"本机个人资源管理器"}),g?x.jsxs("span",{className:"ver mono",children:["v",g.app.version]}):null,x.jsxs("span",{className:"right rowgap",children:[g?x.jsxs("span",{className:"store",title:`存储目录:${g.storePathRaw}`,children:[x.jsx("span",{className:"store-label",children:"存储"}),x.jsx($a,{className:"mono nowrap",text:g.storePathRaw,children:g.storePath})]}):null,x.jsx("button",{className:"btn small ghost",onClick:()=>L(),children:"刷新数据"})]})]}),x.jsxs("nav",{className:"tabs",children:[I.map((j,W)=>x.jsxs(X.Fragment,{children:[W>0&&I[W-1].kind!==j.kind?x.jsx("span",{className:"tabs-sep","aria-hidden":!0}):null,x.jsxs("button",{className:`tab ${j.id===(M==null?void 0:M.id)?"active":""}`,onClick:()=>H(j.id),children:[j.title,typeof j.count=="number"?x.jsx("span",{className:"count",children:j.count}):null]})]},j.id)),I.length?null:x.jsx("span",{className:"muted",children:"正在装载…"})]}),x.jsxs("main",{className:"body",children:[_?x.jsxs("div",{className:"pad stack",children:[x.jsx("div",{className:"bad",children:x.jsx("strong",{children:"读不到后端上下文"})}),x.jsx("pre",{className:"block",children:_}),x.jsx("div",{className:"hint",children:"确认 nx-sk serve 正在运行;或点右上角「刷新数据」重试。"})]}):null,!_&&!A?x.jsx("div",{className:"pad muted",children:"正在装载…"}):null,!_&&A&&M?x.jsx(td,{children:x.jsx(X.Suspense,{fallback:x.jsx("div",{className:"pad muted",children:"加载中…"}),children:M.kind==="section"?x.jsx(ud,{sectionId:M.id}):x.jsx(M.component,{})})},M.id):null]}),x.jsx(nd,{}),x.jsx(rd,{})]})}function ud({sectionId:g}){const _=Zf;return x.jsx(_,{sectionId:g})}Yf.createRoot(document.getElementById("root")).render(x.jsx(X.StrictMode,{children:x.jsx(ed,{children:x.jsx(ld,{})})}));export{sd as C,ad as E,od as M,id as T,qf as a,$a as b,x as j,X as r,kr as u};
|
|
41
|
+
`+u.stack}return{value:e,source:t,stack:l,digest:null}}function Gu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Zu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pf=typeof WeakMap=="function"?WeakMap:Map;function Ms(e,t,n){n=_t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,fi=r),Zu(e,t)},n}function Fs(e,t,n){n=_t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Zu(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){Zu(e,t),typeof r!="function"&&($t===null?$t=new Set([this]):$t.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Us(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pf;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Pf.bind(null,e,t,n),t.then(e,e))}function As(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 Vs(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_t(-1,1),t.tag=2,At(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var mf=b.ReactCurrentOwner,Ae=!1;function Oe(e,t,n,r){t.child=e===null?is(t,null,n,r):_n(t,e.child,n,r)}function $s(e,t,n,r,l){n=n.render;var u=t.ref;return Nn(t,l),r=$u(e,t,n,r,u,l),n=Bu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ct(e,t,l)):(ce&&n&&_u(t),t.flags|=1,Oe(e,t,r,l),t.child)}function Bs(e,t,n,r,l){if(e===null){var u=n.type;return typeof u=="function"&&!gi(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,Hs(e,t,u,r,l)):(e=xl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&l)===0){var i=u.memoizedProps;if(n=n.compare,n=n!==null?n:qn,n(i,r)&&e.ref===t.ref)return Ct(e,t,l)}return t.flags|=1,e=Qt(u,r),e.ref=t.ref,e.return=t,t.child=e}function Hs(e,t,n,r,l){if(e!==null){var u=e.memoizedProps;if(qn(u,r)&&e.ref===t.ref)if(Ae=!1,t.pendingProps=r=u,(e.lanes&l)!==0)(e.flags&131072)!==0&&(Ae=!0);else return t.lanes=e.lanes,Ct(e,t,l)}return Ju(e,t,n,r,l)}function Ws(e,t,n){var r=t.pendingProps,l=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(Ln,Xe),Xe|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(Ln,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:n,ue(Ln,Xe),Xe|=r}else u!==null?(r=u.baseLanes|n,t.memoizedState=null):r=n,ue(Ln,Xe),Xe|=r;return Oe(e,t,l,n),t.child}function Qs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ju(e,t,n,r,l){var u=Ue(n)?Zt:ze.current;return u=kn(t,u),Nn(t,l),n=$u(e,t,n,r,u,l),r=Bu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ct(e,t,l)):(ce&&r&&_u(t),t.flags|=1,Oe(e,t,n,l),t.child)}function Ks(e,t,n,r,l){if(Ue(n)){var u=!0;Xr(t)}else u=!1;if(Nn(t,l),t.stateNode===null)dl(e,t),Ds(t,n,r),Xu(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,o=t.memoizedProps;i.props=o;var s=i.context,p=n.contextType;typeof p=="object"&&p!==null?p=qe(p):(p=Ue(n)?Zt:ze.current,p=kn(t,p));var y=n.getDerivedStateFromProps,w=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function";w||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==r||s!==p)&&Is(t,i,r,p),Ut=!1;var h=t.memoizedState;i.state=h,rl(t,r,i,l),s=t.memoizedState,o!==r||h!==s||Fe.current||Ut?(typeof y=="function"&&(Yu(t,n,y,r),s=t.memoizedState),(o=Ut||Os(t,n,o,r,h,s,p))?(w||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=p,r=o):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ss(e,t),o=t.memoizedProps,p=t.type===t.elementType?o:ot(t.type,o),i.props=p,w=t.pendingProps,h=i.context,s=n.contextType,typeof s=="object"&&s!==null?s=qe(s):(s=Ue(n)?Zt:ze.current,s=kn(t,s));var E=n.getDerivedStateFromProps;(y=typeof E=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==w||h!==s)&&Is(t,i,r,s),Ut=!1,h=t.memoizedState,i.state=h,rl(t,r,i,l);var P=t.memoizedState;o!==w||h!==P||Fe.current||Ut?(typeof E=="function"&&(Yu(t,n,E,r),P=t.memoizedState),(p=Ut||Os(t,n,p,r,h,P,s)||!1)?(y||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,P,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,P,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=P),i.props=r,i.state=P,i.context=s,r=p):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return qu(e,t,n,r,u,l)}function qu(e,t,n,r,l,u){Qs(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Jo(t,n,!1),Ct(e,t,u);r=t.stateNode,mf.current=t;var o=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=_n(t,e.child,null,u),t.child=_n(t,null,o,u)):Oe(e,t,o,u),t.memoizedState=r.state,l&&Jo(t,n,!0),t.child}function Ys(e){var t=e.stateNode;t.pendingContext?Go(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Go(e,t.context,!1),Iu(e,t.containerInfo)}function Xs(e,t,n,r,l){return xn(),zu(l),t.flags|=256,Oe(e,t,n,r),t.child}var bu={dehydrated:null,treeContext:null,retryLane:0};function ei(e){return{baseLanes:e,cachePool:null,transitions:null}}function Gs(e,t,n){var r=t.pendingProps,l=fe.current,u=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(l&2)!==0),o?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),ue(fe,l&1),e===null)return Pu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=r.children,e=r.fallback,u?(r=t.mode,u=t.child,i={mode:"hidden",children:i},(r&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=i):u=_l(i,r,0,null),e=on(e,r,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=ei(n),t.memoizedState=bu,e):ti(t,i));if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null))return hf(e,t,i,r,o,l,n);if(u){u=r.fallback,i=t.mode,l=e.child,o=l.sibling;var s={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Qt(l,s),r.subtreeFlags=l.subtreeFlags&14680064),o!==null?u=Qt(o,u):(u=on(u,i,n,null),u.flags|=2),u.return=t,r.return=t,r.sibling=u,t.child=r,r=u,u=t.child,i=e.child.memoizedState,i=i===null?ei(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},u.memoizedState=i,u.childLanes=e.childLanes&~n,t.memoizedState=bu,r}return u=e.child,e=u.sibling,r=Qt(u,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ti(e,t){return t=_l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fl(e,t,n,r){return r!==null&&zu(r),_n(t,e.child,null,n),e=ti(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hf(e,t,n,r,l,u,i){if(n)return t.flags&256?(t.flags&=-257,r=Gu(Error(m(422))),fl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=r.fallback,l=t.mode,r=_l({mode:"visible",children:r.children},l,0,null),u=on(u,l,i,null),u.flags|=2,r.return=t,u.return=t,r.sibling=u,t.child=r,(t.mode&1)!==0&&_n(t,e.child,null,i),t.child.memoizedState=ei(i),t.memoizedState=bu,u);if((t.mode&1)===0)return fl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var o=r.dgst;return r=o,u=Error(m(419)),r=Gu(u,r,void 0),fl(e,t,i,r)}if(o=(i&e.childLanes)!==0,Ae||o){if(r=Ee,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|i))!==0?0:l,l!==0&&l!==u.retryLane&&(u.retryLane=l,xt(e,l),ct(r,e,l,-1))}return yi(),r=Gu(Error(m(421))),fl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=zf.bind(null,e),l._reactRetry=t,null):(e=u.treeContext,Ye=Dt(l.nextSibling),Ke=t,ce=!0,it=null,e!==null&&(Ze[Je++]=St,Ze[Je++]=Et,Ze[Je++]=Jt,St=e.id,Et=e.overflow,Jt=t),t=ti(t,r.children),t.flags|=4096,t)}function Zs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ju(e.return,t,n)}function ni(e,t,n,r,l){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=n,u.tailMode=l)}function Js(e,t,n){var r=t.pendingProps,l=r.revealOrder,u=r.tail;if(Oe(e,t,r.children,n),r=fe.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zs(e,n,t);else if(e.tag===19)Zs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ue(fe,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&ll(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ni(t,!1,l,n,u);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&ll(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ni(t,!0,n,null,u);break;case"together":ni(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ct(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(m(153));if(t.child!==null){for(e=t.child,n=Qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function vf(e,t,n){switch(t.tag){case 3:Ys(t),xn();break;case 5:fs(t);break;case 1:Ue(t.type)&&Xr(t);break;case 4:Iu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;ue(el,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ue(fe,fe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Gs(e,t,n):(ue(fe,fe.current&1),e=Ct(e,t,n),e!==null?e.sibling:null);ue(fe,fe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Js(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ue(fe,fe.current),r)break;return null;case 22:case 23:return t.lanes=0,Ws(e,t,n)}return Ct(e,t,n)}var qs,ri,bs,ea;qs=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ri=function(){},bs=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,en(ht.current);var u=null;switch(n){case"input":l=jl(e,l),r=jl(e,r),u=[];break;case"select":l=N({},l,{value:void 0}),r=N({},r,{value:void 0}),u=[];break;case"textarea":l=Il(e,l),r=Il(e,r),u=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Qr)}Fl(n,r);var i;n=null;for(p in l)if(!r.hasOwnProperty(p)&&l.hasOwnProperty(p)&&l[p]!=null)if(p==="style"){var o=l[p];for(i in o)o.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(L.hasOwnProperty(p)?u||(u=[]):(u=u||[]).push(p,null));for(p in r){var s=r[p];if(o=l!=null?l[p]:void 0,r.hasOwnProperty(p)&&s!==o&&(s!=null||o!=null))if(p==="style")if(o){for(i in o)!o.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in s)s.hasOwnProperty(i)&&o[i]!==s[i]&&(n||(n={}),n[i]=s[i])}else n||(u||(u=[]),u.push(p,n)),n=s;else p==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,o=o?o.__html:void 0,s!=null&&o!==s&&(u=u||[]).push(p,s)):p==="children"?typeof s!="string"&&typeof s!="number"||(u=u||[]).push(p,""+s):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(L.hasOwnProperty(p)?(s!=null&&p==="onScroll"&&oe("scroll",e),u||o===s||(u=[])):(u=u||[]).push(p,s))}n&&(u=u||[]).push("style",n);var p=u;(t.updateQueue=p)&&(t.flags|=4)}},ea=function(e,t,n,r){n!==r&&(t.flags|=4)};function pr(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yf(e,t,n){var r=t.pendingProps;switch(Cu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Ue(t.type)&&Yr(),Le(t),null;case 3:return r=t.stateNode,Pn(),se(Fe),se(ze),Uu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(qr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,it!==null&&(mi(it),it=null))),ri(e,t),Le(t),null;case 5:Mu(t);var l=en(sr.current);if(n=t.type,e!==null&&t.stateNode!=null)bs(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(m(166));return Le(t),null}if(e=en(ht.current),qr(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[mt]=t,r[rr]=u,e=(t.mode&1)!==0,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(l=0;l<er.length;l++)oe(er[l],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":Oi(r,u),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},oe("invalid",r);break;case"textarea":Mi(r,u),oe("invalid",r)}Fl(n,u),l=null;for(var i in u)if(u.hasOwnProperty(i)){var o=u[i];i==="children"?typeof o=="string"?r.textContent!==o&&(u.suppressHydrationWarning!==!0&&Wr(r.textContent,o,e),l=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(u.suppressHydrationWarning!==!0&&Wr(r.textContent,o,e),l=["children",""+o]):L.hasOwnProperty(i)&&o!=null&&i==="onScroll"&&oe("scroll",r)}switch(n){case"input":Sr(r),Ii(r,u,!0);break;case"textarea":Sr(r),Ui(r);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(r.onclick=Qr)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ai(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[mt]=t,e[rr]=r,qs(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ul(n,r),n){case"dialog":oe("cancel",e),oe("close",e),l=r;break;case"iframe":case"object":case"embed":oe("load",e),l=r;break;case"video":case"audio":for(l=0;l<er.length;l++)oe(er[l],e);l=r;break;case"source":oe("error",e),l=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),l=r;break;case"details":oe("toggle",e),l=r;break;case"input":Oi(e,r),l=jl(e,r),oe("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=N({},r,{value:void 0}),oe("invalid",e);break;case"textarea":Mi(e,r),l=Il(e,r),oe("invalid",e);break;default:l=r}Fl(n,l),o=l;for(u in o)if(o.hasOwnProperty(u)){var s=o[u];u==="style"?Bi(e,s):u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Vi(e,s)):u==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&In(e,s):typeof s=="number"&&In(e,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(L.hasOwnProperty(u)?s!=null&&u==="onScroll"&&oe("scroll",e):s!=null&&ie(e,u,s,i))}switch(n){case"input":Sr(e),Ii(e,r,!1);break;case"textarea":Sr(e),Ui(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ee(r.value));break;case"select":e.multiple=!!r.multiple,u=r.value,u!=null?sn(e,!!r.multiple,u,!1):r.defaultValue!=null&&sn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Qr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Le(t),null;case 6:if(e&&t.stateNode!=null)ea(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(m(166));if(n=en(sr.current),en(ht.current),qr(t)){if(r=t.stateNode,n=t.memoizedProps,r[mt]=t,(u=r.nodeValue!==n)&&(e=Ke,e!==null))switch(e.tag){case 3:Wr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Wr(r.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[mt]=t,t.stateNode=r}return Le(t),null;case 13:if(se(fe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&Ye!==null&&(t.mode&1)!==0&&(t.flags&128)===0)rs(),xn(),t.flags|=98560,u=!1;else if(u=qr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(m(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(m(317));u[mt]=t}else xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),u=!1}else it!==null&&(mi(it),it=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(fe.current&1)!==0?ke===0&&(ke=3):yi())),t.updateQueue!==null&&(t.flags|=4),Le(t),null);case 4:return Pn(),ri(e,t),e===null&&tr(t.stateNode.containerInfo),Le(t),null;case 10:return Ru(t.type._context),Le(t),null;case 17:return Ue(t.type)&&Yr(),Le(t),null;case 19:if(se(fe),u=t.memoizedState,u===null)return Le(t),null;if(r=(t.flags&128)!==0,i=u.rendering,i===null)if(r)pr(u,!1);else{if(ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ll(e),i!==null){for(t.flags|=128,pr(u,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)u=n,e=r,u.flags&=14680066,i=u.alternate,i===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,u.type=i.type,e=i.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ue(fe,fe.current&1|2),t.child}e=e.sibling}u.tail!==null&&ve()>Rn&&(t.flags|=128,r=!0,pr(u,!1),t.lanes=4194304)}else{if(!r)if(e=ll(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!i.alternate&&!ce)return Le(t),null}else 2*ve()-u.renderingStartTime>Rn&&n!==1073741824&&(t.flags|=128,r=!0,pr(u,!1),t.lanes=4194304);u.isBackwards?(i.sibling=t.child,t.child=i):(n=u.last,n!==null?n.sibling=i:t.child=i,u.last=i)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ve(),t.sibling=null,n=fe.current,ue(fe,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return vi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Xe&1073741824)!==0&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(m(156,t.tag))}function gf(e,t){switch(Cu(t),t.tag){case 1:return Ue(t.type)&&Yr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pn(),se(Fe),se(ze),Uu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Mu(t),null;case 13:if(se(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(m(340));xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(fe),null;case 4:return Pn(),null;case 10:return Ru(t.type._context),null;case 22:case 23:return vi(),null;case 24:return null;default:return null}}var pl=!1,Re=!1,wf=typeof WeakSet=="function"?WeakSet:Set,C=null;function Tn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){me(e,t,r)}else n.current=null}function li(e,t,n){try{n()}catch(r){me(e,t,r)}}var ta=!1;function kf(e,t){if(vu=Or,e=Oo(),su(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var i=0,o=-1,s=-1,p=0,y=0,w=e,h=null;t:for(;;){for(var E;w!==n||l!==0&&w.nodeType!==3||(o=i+l),w!==u||r!==0&&w.nodeType!==3||(s=i+r),w.nodeType===3&&(i+=w.nodeValue.length),(E=w.firstChild)!==null;)h=w,w=E;for(;;){if(w===e)break t;if(h===n&&++p===l&&(o=i),h===u&&++y===r&&(s=i),(E=w.nextSibling)!==null)break;w=h,h=w.parentNode}w=E}n=o===-1||s===-1?null:{start:o,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(yu={focusedElem:e,selectionRange:n},Or=!1,C=t;C!==null;)if(t=C,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,C=e;else for(;C!==null;){t=C;try{var P=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var z=P.memoizedProps,ye=P.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?z:ot(t.type,z),ye);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(m(163))}}catch(k){me(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,C=e;break}C=t.return}return P=ta,ta=!1,P}function mr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&li(t,n,u)}l=l.next}while(l!==r)}}function ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ui(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function na(e){var t=e.alternate;t!==null&&(e.alternate=null,na(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mt],delete t[rr],delete t[Su],delete t[tf],delete t[nf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ra(e){return e.tag===5||e.tag===3||e.tag===4}function la(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ra(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ii(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qr));else if(r!==4&&(e=e.child,e!==null))for(ii(e,t,n),e=e.sibling;e!==null;)ii(e,t,n),e=e.sibling}function oi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oi(e,t,n),e=e.sibling;e!==null;)oi(e,t,n),e=e.sibling}var Ne=null,st=!1;function Vt(e,t,n){for(n=n.child;n!==null;)ua(e,t,n),n=n.sibling}function ua(e,t,n){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Pr,n)}catch{}switch(n.tag){case 5:Re||Tn(n,t);case 6:var r=Ne,l=st;Ne=null,Vt(e,t,n),Ne=r,st=l,Ne!==null&&(st?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(st?(e=Ne,n=n.stateNode,e.nodeType===8?ku(e.parentNode,n):e.nodeType===1&&ku(e,n),Kn(e)):ku(Ne,n.stateNode));break;case 4:r=Ne,l=st,Ne=n.stateNode.containerInfo,st=!0,Vt(e,t,n),Ne=r,st=l;break;case 0:case 11:case 14:case 15:if(!Re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,i=u.destroy;u=u.tag,i!==void 0&&((u&2)!==0||(u&4)!==0)&&li(n,t,i),l=l.next}while(l!==r)}Vt(e,t,n);break;case 1:if(!Re&&(Tn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){me(n,t,o)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Vt(e,t,n),Re=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function ia(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wf),t.forEach(function(r){var l=Tf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function at(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var u=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 5:Ne=o.stateNode,st=!1;break e;case 3:Ne=o.stateNode.containerInfo,st=!0;break e;case 4:Ne=o.stateNode.containerInfo,st=!0;break e}o=o.return}if(Ne===null)throw Error(m(160));ua(u,i,l),Ne=null,st=!1;var s=l.alternate;s!==null&&(s.return=null),l.return=null}catch(p){me(l,t,p)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)oa(t,e),t=t.sibling}function oa(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(at(t,e),yt(e),r&4){try{mr(3,e,e.return),ml(3,e)}catch(z){me(e,e.return,z)}try{mr(5,e,e.return)}catch(z){me(e,e.return,z)}}break;case 1:at(t,e),yt(e),r&512&&n!==null&&Tn(n,n.return);break;case 5:if(at(t,e),yt(e),r&512&&n!==null&&Tn(n,n.return),e.flags&32){var l=e.stateNode;try{In(l,"")}catch(z){me(e,e.return,z)}}if(r&4&&(l=e.stateNode,l!=null)){var u=e.memoizedProps,i=n!==null?n.memoizedProps:u,o=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{o==="input"&&u.type==="radio"&&u.name!=null&&Di(l,u),Ul(o,i);var p=Ul(o,u);for(i=0;i<s.length;i+=2){var y=s[i],w=s[i+1];y==="style"?Bi(l,w):y==="dangerouslySetInnerHTML"?Vi(l,w):y==="children"?In(l,w):ie(l,y,w,p)}switch(o){case"input":Ol(l,u);break;case"textarea":Fi(l,u);break;case"select":var h=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!u.multiple;var E=u.value;E!=null?sn(l,!!u.multiple,E,!1):h!==!!u.multiple&&(u.defaultValue!=null?sn(l,!!u.multiple,u.defaultValue,!0):sn(l,!!u.multiple,u.multiple?[]:"",!1))}l[rr]=u}catch(z){me(e,e.return,z)}}break;case 6:if(at(t,e),yt(e),r&4){if(e.stateNode===null)throw Error(m(162));l=e.stateNode,u=e.memoizedProps;try{l.nodeValue=u}catch(z){me(e,e.return,z)}}break;case 3:if(at(t,e),yt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kn(t.containerInfo)}catch(z){me(e,e.return,z)}break;case 4:at(t,e),yt(e);break;case 13:at(t,e),yt(e),l=e.child,l.flags&8192&&(u=l.memoizedState!==null,l.stateNode.isHidden=u,!u||l.alternate!==null&&l.alternate.memoizedState!==null||(ci=ve())),r&4&&ia(e);break;case 22:if(y=n!==null&&n.memoizedState!==null,e.mode&1?(Re=(p=Re)||y,at(t,e),Re=p):at(t,e),yt(e),r&8192){if(p=e.memoizedState!==null,(e.stateNode.isHidden=p)&&!y&&(e.mode&1)!==0)for(C=e,y=e.child;y!==null;){for(w=C=y;C!==null;){switch(h=C,E=h.child,h.tag){case 0:case 11:case 14:case 15:mr(4,h,h.return);break;case 1:Tn(h,h.return);var P=h.stateNode;if(typeof P.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,P.props=t.memoizedProps,P.state=t.memoizedState,P.componentWillUnmount()}catch(z){me(r,n,z)}}break;case 5:Tn(h,h.return);break;case 22:if(h.memoizedState!==null){ca(w);continue}}E!==null?(E.return=h,C=E):ca(w)}y=y.sibling}e:for(y=null,w=e;;){if(w.tag===5){if(y===null){y=w;try{l=w.stateNode,p?(u=l.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(o=w.stateNode,s=w.memoizedProps.style,i=s!=null&&s.hasOwnProperty("display")?s.display:null,o.style.display=$i("display",i))}catch(z){me(e,e.return,z)}}}else if(w.tag===6){if(y===null)try{w.stateNode.nodeValue=p?"":w.memoizedProps}catch(z){me(e,e.return,z)}}else if((w.tag!==22&&w.tag!==23||w.memoizedState===null||w===e)&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===e)break e;for(;w.sibling===null;){if(w.return===null||w.return===e)break e;y===w&&(y=null),w=w.return}y===w&&(y=null),w.sibling.return=w.return,w=w.sibling}}break;case 19:at(t,e),yt(e),r&4&&ia(e);break;case 21:break;default:at(t,e),yt(e)}}function yt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ra(n)){var r=n;break e}n=n.return}throw Error(m(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(In(l,""),r.flags&=-33);var u=la(e);oi(e,u,l);break;case 3:case 4:var i=r.stateNode.containerInfo,o=la(e);ii(e,o,i);break;default:throw Error(m(161))}}catch(s){me(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sf(e,t,n){C=e,sa(e)}function sa(e,t,n){for(var r=(e.mode&1)!==0;C!==null;){var l=C,u=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||pl;if(!i){var o=l.alternate,s=o!==null&&o.memoizedState!==null||Re;o=pl;var p=Re;if(pl=i,(Re=s)&&!p)for(C=l;C!==null;)i=C,s=i.child,i.tag===22&&i.memoizedState!==null?fa(l):s!==null?(s.return=i,C=s):fa(l);for(;u!==null;)C=u,sa(u),u=u.sibling;C=l,pl=o,Re=p}aa(e)}else(l.subtreeFlags&8772)!==0&&u!==null?(u.return=l,C=u):aa(e)}}function aa(e){for(;C!==null;){var t=C;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Re||ml(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Re)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:ot(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&cs(t,u,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cs(t,i,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var p=t.alternate;if(p!==null){var y=p.memoizedState;if(y!==null){var w=y.dehydrated;w!==null&&Kn(w)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(m(163))}Re||t.flags&512&&ui(t)}catch(h){me(t,t.return,h)}}if(t===e){C=null;break}if(n=t.sibling,n!==null){n.return=t.return,C=n;break}C=t.return}}function ca(e){for(;C!==null;){var t=C;if(t===e){C=null;break}var n=t.sibling;if(n!==null){n.return=t.return,C=n;break}C=t.return}}function fa(e){for(;C!==null;){var t=C;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ml(4,t)}catch(s){me(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(s){me(t,l,s)}}var u=t.return;try{ui(t)}catch(s){me(t,u,s)}break;case 5:var i=t.return;try{ui(t)}catch(s){me(t,i,s)}}}catch(s){me(t,t.return,s)}if(t===e){C=null;break}var o=t.sibling;if(o!==null){o.return=t.return,C=o;break}C=t.return}}var Ef=Math.ceil,hl=b.ReactCurrentDispatcher,si=b.ReactCurrentOwner,et=b.ReactCurrentBatchConfig,Y=0,Ee=null,ge=null,Pe=0,Xe=0,Ln=It(0),ke=0,hr=null,nn=0,vl=0,ai=0,vr=null,Ve=null,ci=0,Rn=1/0,Nt=null,yl=!1,fi=null,$t=null,gl=!1,Bt=null,wl=0,yr=0,di=null,kl=-1,Sl=0;function De(){return(Y&6)!==0?ve():kl!==-1?kl:kl=ve()}function Ht(e){return(e.mode&1)===0?1:(Y&2)!==0&&Pe!==0?Pe&-Pe:lf.transition!==null?(Sl===0&&(Sl=ro()),Sl):(e=te,e!==0||(e=window.event,e=e===void 0?16:po(e.type)),e)}function ct(e,t,n,r){if(50<yr)throw yr=0,di=null,Error(m(185));$n(e,n,r),((Y&2)===0||e!==Ee)&&(e===Ee&&((Y&2)===0&&(vl|=n),ke===4&&Wt(e,Pe)),$e(e,r),n===1&&Y===0&&(t.mode&1)===0&&(Rn=ve()+500,Gr&&Ft()))}function $e(e,t){var n=e.callbackNode;lc(e,t);var r=Lr(e,e===Ee?Pe:0);if(r===0)n!==null&&eo(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&eo(n),t===1)e.tag===0?rf(pa.bind(null,e)):qo(pa.bind(null,e)),bc(function(){(Y&6)===0&&Ft()}),n=null;else{switch(lo(r)){case 1:n=Ql;break;case 4:n=to;break;case 16:n=Nr;break;case 536870912:n=no;break;default:n=Nr}n=Sa(n,da.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function da(e,t){if(kl=-1,Sl=0,(Y&6)!==0)throw Error(m(327));var n=e.callbackNode;if(jn()&&e.callbackNode!==n)return null;var r=Lr(e,e===Ee?Pe:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=El(e,r);else{t=r;var l=Y;Y|=2;var u=ha();(Ee!==e||Pe!==t)&&(Nt=null,Rn=ve()+500,ln(e,t));do try{Cf();break}catch(o){ma(e,o)}while(!0);Lu(),hl.current=u,Y=l,ge!==null?t=0:(Ee=null,Pe=0,t=ke)}if(t!==0){if(t===2&&(l=Kl(e),l!==0&&(r=l,t=pi(e,l))),t===1)throw n=hr,ln(e,0),Wt(e,r),$e(e,ve()),n;if(t===6)Wt(e,r);else{if(l=e.current.alternate,(r&30)===0&&!xf(l)&&(t=El(e,r),t===2&&(u=Kl(e),u!==0&&(r=u,t=pi(e,u))),t===1))throw n=hr,ln(e,0),Wt(e,r),$e(e,ve()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(m(345));case 2:un(e,Ve,Nt);break;case 3:if(Wt(e,r),(r&130023424)===r&&(t=ci+500-ve(),10<t)){if(Lr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){De(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=wu(un.bind(null,e,Ve,Nt),t);break}un(e,Ve,Nt);break;case 4:if(Wt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-lt(r);u=1<<i,i=t[i],i>l&&(l=i),r&=~u}if(r=l,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ef(r/1960))-r,10<r){e.timeoutHandle=wu(un.bind(null,e,Ve,Nt),r);break}un(e,Ve,Nt);break;case 5:un(e,Ve,Nt);break;default:throw Error(m(329))}}}return $e(e,ve()),e.callbackNode===n?da.bind(null,e):null}function pi(e,t){var n=vr;return e.current.memoizedState.isDehydrated&&(ln(e,t).flags|=256),e=El(e,t),e!==2&&(t=Ve,Ve=n,t!==null&&mi(t)),e}function mi(e){Ve===null?Ve=e:Ve.push.apply(Ve,e)}function xf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],u=l.getSnapshot;l=l.value;try{if(!ut(u(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wt(e,t){for(t&=~ai,t&=~vl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-lt(t),r=1<<n;e[n]=-1,t&=~r}}function pa(e){if((Y&6)!==0)throw Error(m(327));jn();var t=Lr(e,0);if((t&1)===0)return $e(e,ve()),null;var n=El(e,t);if(e.tag!==0&&n===2){var r=Kl(e);r!==0&&(t=r,n=pi(e,r))}if(n===1)throw n=hr,ln(e,0),Wt(e,t),$e(e,ve()),n;if(n===6)throw Error(m(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,un(e,Ve,Nt),$e(e,ve()),null}function hi(e,t){var n=Y;Y|=1;try{return e(t)}finally{Y=n,Y===0&&(Rn=ve()+500,Gr&&Ft())}}function rn(e){Bt!==null&&Bt.tag===0&&(Y&6)===0&&jn();var t=Y;Y|=1;var n=et.transition,r=te;try{if(et.transition=null,te=1,e)return e()}finally{te=r,et.transition=n,Y=t,(Y&6)===0&&Ft()}}function vi(){Xe=Ln.current,se(Ln)}function ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,qc(n)),ge!==null)for(n=ge.return;n!==null;){var r=n;switch(Cu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yr();break;case 3:Pn(),se(Fe),se(ze),Uu();break;case 5:Mu(r);break;case 4:Pn();break;case 13:se(fe);break;case 19:se(fe);break;case 10:Ru(r.type._context);break;case 22:case 23:vi()}n=n.return}if(Ee=e,ge=e=Qt(e.current,null),Pe=Xe=t,ke=0,hr=null,ai=vl=nn=0,Ve=vr=null,bt!==null){for(t=0;t<bt.length;t++)if(n=bt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,u=n.pending;if(u!==null){var i=u.next;u.next=l,r.next=i}n.pending=r}bt=null}return e}function ma(e,t){do{var n=ge;try{if(Lu(),ul.current=al,il){for(var r=de.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}il=!1}if(tn=0,Se=we=de=null,ar=!1,cr=0,si.current=null,n===null||n.return===null){ke=1,hr=t,ge=null;break}e:{var u=e,i=n.return,o=n,s=t;if(t=Pe,o.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var p=s,y=o,w=y.tag;if((y.mode&1)===0&&(w===0||w===11||w===15)){var h=y.alternate;h?(y.updateQueue=h.updateQueue,y.memoizedState=h.memoizedState,y.lanes=h.lanes):(y.updateQueue=null,y.memoizedState=null)}var E=As(i);if(E!==null){E.flags&=-257,Vs(E,i,o,u,t),E.mode&1&&Us(u,p,t),t=E,s=p;var P=t.updateQueue;if(P===null){var z=new Set;z.add(s),t.updateQueue=z}else P.add(s);break e}else{if((t&1)===0){Us(u,p,t),yi();break e}s=Error(m(426))}}else if(ce&&o.mode&1){var ye=As(i);if(ye!==null){(ye.flags&65536)===0&&(ye.flags|=256),Vs(ye,i,o,u,t),zu(zn(s,o));break e}}u=s=zn(s,o),ke!==4&&(ke=2),vr===null?vr=[u]:vr.push(u),u=i;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var f=Ms(u,s,t);as(u,f);break e;case 1:o=s;var a=u.type,d=u.stateNode;if((u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&($t===null||!$t.has(d)))){u.flags|=65536,t&=-t,u.lanes|=t;var k=Fs(u,o,t);as(u,k);break e}}u=u.return}while(u!==null)}ya(n)}catch(T){t=T,ge===n&&n!==null&&(ge=n=n.return);continue}break}while(!0)}function ha(){var e=hl.current;return hl.current=al,e===null?al:e}function yi(){(ke===0||ke===3||ke===2)&&(ke=4),Ee===null||(nn&268435455)===0&&(vl&268435455)===0||Wt(Ee,Pe)}function El(e,t){var n=Y;Y|=2;var r=ha();(Ee!==e||Pe!==t)&&(Nt=null,ln(e,t));do try{_f();break}catch(l){ma(e,l)}while(!0);if(Lu(),Y=n,hl.current=r,ge!==null)throw Error(m(261));return Ee=null,Pe=0,ke}function _f(){for(;ge!==null;)va(ge)}function Cf(){for(;ge!==null&&!Ga();)va(ge)}function va(e){var t=ka(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?ya(e):ge=t,si.current=null}function ya(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=yf(n,t,Xe),n!==null){ge=n;return}}else{if(n=gf(n,t),n!==null){n.flags&=32767,ge=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,ge=null;return}}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);ke===0&&(ke=5)}function un(e,t,n){var r=te,l=et.transition;try{et.transition=null,te=1,Nf(e,t,n,r)}finally{et.transition=l,te=r}return null}function Nf(e,t,n,r){do jn();while(Bt!==null);if((Y&6)!==0)throw Error(m(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(m(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(uc(e,u),e===Ee&&(ge=Ee=null,Pe=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||gl||(gl=!0,Sa(Nr,function(){return jn(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=et.transition,et.transition=null;var i=te;te=1;var o=Y;Y|=4,si.current=null,kf(e,n),oa(n,e),Qc(yu),Or=!!vu,yu=vu=null,e.current=n,Sf(n),Za(),Y=o,te=i,et.transition=u}else e.current=n;if(gl&&(gl=!1,Bt=e,wl=l),u=e.pendingLanes,u===0&&($t=null),ba(n.stateNode),$e(e,ve()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(yl)throw yl=!1,e=fi,fi=null,e;return(wl&1)!==0&&e.tag!==0&&jn(),u=e.pendingLanes,(u&1)!==0?e===di?yr++:(yr=0,di=e):yr=0,Ft(),null}function jn(){if(Bt!==null){var e=lo(wl),t=et.transition,n=te;try{if(et.transition=null,te=16>e?16:e,Bt===null)var r=!1;else{if(e=Bt,Bt=null,wl=0,(Y&6)!==0)throw Error(m(331));var l=Y;for(Y|=4,C=e.current;C!==null;){var u=C,i=u.child;if((C.flags&16)!==0){var o=u.deletions;if(o!==null){for(var s=0;s<o.length;s++){var p=o[s];for(C=p;C!==null;){var y=C;switch(y.tag){case 0:case 11:case 15:mr(8,y,u)}var w=y.child;if(w!==null)w.return=y,C=w;else for(;C!==null;){y=C;var h=y.sibling,E=y.return;if(na(y),y===p){C=null;break}if(h!==null){h.return=E,C=h;break}C=E}}}var P=u.alternate;if(P!==null){var z=P.child;if(z!==null){P.child=null;do{var ye=z.sibling;z.sibling=null,z=ye}while(z!==null)}}C=u}}if((u.subtreeFlags&2064)!==0&&i!==null)i.return=u,C=i;else e:for(;C!==null;){if(u=C,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:mr(9,u,u.return)}var f=u.sibling;if(f!==null){f.return=u.return,C=f;break e}C=u.return}}var a=e.current;for(C=a;C!==null;){i=C;var d=i.child;if((i.subtreeFlags&2064)!==0&&d!==null)d.return=i,C=d;else e:for(i=a;C!==null;){if(o=C,(o.flags&2048)!==0)try{switch(o.tag){case 0:case 11:case 15:ml(9,o)}}catch(T){me(o,o.return,T)}if(o===i){C=null;break e}var k=o.sibling;if(k!==null){k.return=o.return,C=k;break e}C=o.return}}if(Y=l,Ft(),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Pr,e)}catch{}r=!0}return r}finally{te=n,et.transition=t}}return!1}function ga(e,t,n){t=zn(n,t),t=Ms(e,t,1),e=At(e,t,1),t=De(),e!==null&&($n(e,1,t),$e(e,t))}function me(e,t,n){if(e.tag===3)ga(e,e,n);else for(;t!==null;){if(t.tag===3){ga(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($t===null||!$t.has(r))){e=zn(n,e),e=Fs(t,e,1),t=At(t,e,1),e=De(),t!==null&&($n(t,1,e),$e(t,e));break}}t=t.return}}function Pf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=De(),e.pingedLanes|=e.suspendedLanes&n,Ee===e&&(Pe&n)===n&&(ke===4||ke===3&&(Pe&130023424)===Pe&&500>ve()-ci?ln(e,0):ai|=n),$e(e,t)}function wa(e,t){t===0&&((e.mode&1)===0?t=1:(t=Tr,Tr<<=1,(Tr&130023424)===0&&(Tr=4194304)));var n=De();e=xt(e,t),e!==null&&($n(e,t,n),$e(e,n))}function zf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wa(e,n)}function Tf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(m(314))}r!==null&&r.delete(t),wa(e,n)}var ka;ka=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Ae=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ae=!1,vf(e,t,n);Ae=(e.flags&131072)!==0}else Ae=!1,ce&&(t.flags&1048576)!==0&&bo(t,Jr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;dl(e,t),e=t.pendingProps;var l=kn(t,ze.current);Nn(t,n),l=$u(null,t,r,e,l,n);var u=Bu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ue(r)?(u=!0,Xr(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Du(t),l.updater=cl,t.stateNode=l,l._reactInternals=t,Xu(t,r,e,n),t=qu(null,t,r,!0,u,n)):(t.tag=0,ce&&u&&_u(t),Oe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(dl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Rf(r),e=ot(r,e),l){case 0:t=Ju(null,t,r,e,n);break e;case 1:t=Ks(null,t,r,e,n);break e;case 11:t=$s(null,t,r,e,n);break e;case 14:t=Bs(null,t,r,ot(r.type,e),n);break e}throw Error(m(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),Ju(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),Ks(e,t,r,l,n);case 3:e:{if(Ys(t),e===null)throw Error(m(387));r=t.pendingProps,u=t.memoizedState,l=u.element,ss(e,t),rl(t,r,null,n);var i=t.memoizedState;if(r=i.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=zn(Error(m(423)),t),t=Xs(e,t,r,n,l);break e}else if(r!==l){l=zn(Error(m(424)),t),t=Xs(e,t,r,n,l);break e}else for(Ye=Dt(t.stateNode.containerInfo.firstChild),Ke=t,ce=!0,it=null,n=is(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xn(),r===l){t=Ct(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return fs(t),e===null&&Pu(t),r=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,gu(r,l)?i=null:u!==null&&gu(r,u)&&(t.flags|=32),Qs(e,t),Oe(e,t,i,n),t.child;case 6:return e===null&&Pu(t),null;case 13:return Gs(e,t,n);case 4:return Iu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_n(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),$s(e,t,r,l,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,u=t.memoizedProps,i=l.value,ue(el,r._currentValue),r._currentValue=i,u!==null)if(ut(u.value,i)){if(u.children===l.children&&!Fe.current){t=Ct(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var o=u.dependencies;if(o!==null){i=u.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=_t(-1,n&-n),s.tag=2;var p=u.updateQueue;if(p!==null){p=p.shared;var y=p.pending;y===null?s.next=s:(s.next=y.next,y.next=s),p.pending=s}}u.lanes|=n,s=u.alternate,s!==null&&(s.lanes|=n),ju(u.return,n,t),o.lanes|=n;break}s=s.next}}else if(u.tag===10)i=u.type===t.type?null:u.child;else if(u.tag===18){if(i=u.return,i===null)throw Error(m(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),ju(i,n,t),i=u.sibling}else i=u.child;if(i!==null)i.return=u;else for(i=u;i!==null;){if(i===t){i=null;break}if(u=i.sibling,u!==null){u.return=i.return,i=u;break}i=i.return}u=i}Oe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Nn(t,n),l=qe(l),r=r(l),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,l=ot(r,t.pendingProps),l=ot(r.type,l),Bs(e,t,r,l,n);case 15:return Hs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ot(r,l),dl(e,t),t.tag=1,Ue(r)?(e=!0,Xr(t)):e=!1,Nn(t,n),Ds(t,r,l),Xu(t,r,l,n),qu(null,t,r,!0,e,n);case 19:return Js(e,t,n);case 22:return Ws(e,t,n)}throw Error(m(156,t.tag))};function Sa(e,t){return bi(e,t)}function Lf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tt(e,t,n,r){return new Lf(e,t,n,r)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Rf(e){if(typeof e=="function")return gi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ft)return 11;if(e===dt)return 14}return 2}function Qt(e,t){var n=e.alternate;return n===null?(n=tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xl(e,t,n,r,l,u){var i=2;if(r=e,typeof e=="function")gi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ie:return on(n.children,l,u,t);case Ge:i=8,l|=8;break;case Pt:return e=tt(12,n,t,l|2),e.elementType=Pt,e.lanes=u,e;case He:return e=tt(13,n,t,l),e.elementType=He,e.lanes=u,e;case rt:return e=tt(19,n,t,l),e.elementType=rt,e.lanes=u,e;case pe:return _l(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gt:i=10;break e;case Yt:i=9;break e;case ft:i=11;break e;case dt:i=14;break e;case Me:i=16,r=null;break e}throw Error(m(130,e==null?e:typeof e,""))}return t=tt(i,n,t,l),t.elementType=e,t.type=r,t.lanes=u,t}function on(e,t,n,r){return e=tt(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=tt(22,e,r,t),e.elementType=pe,e.lanes=n,e.stateNode={isHidden:!1},e}function wi(e,t,n){return e=tt(6,e,null,t),e.lanes=n,e}function ki(e,t,n){return t=tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jf(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yl(0),this.expirationTimes=Yl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Si(e,t,n,r,l,u,i,o,s){return e=new jf(e,t,n,o,s),t===1?(t=1,u===!0&&(t|=8)):t=0,u=tt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Du(u),e}function Of(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ce,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ea(e){if(!e)return Mt;e=e._reactInternals;e:{if(Xt(e)!==e||e.tag!==1)throw Error(m(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ue(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(m(171))}if(e.tag===1){var n=e.type;if(Ue(n))return Zo(e,n,t)}return t}function xa(e,t,n,r,l,u,i,o,s){return e=Si(n,r,!0,e,l,u,i,o,s),e.context=Ea(null),n=e.current,r=De(),l=Ht(n),u=_t(r,l),u.callback=t??null,At(n,u,l),e.current.lanes=l,$n(e,l,r),$e(e,r),e}function Cl(e,t,n,r){var l=t.current,u=De(),i=Ht(l);return n=Ea(n),t.context===null?t.context=n:t.pendingContext=n,t=_t(u,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=At(l,t,i),e!==null&&(ct(e,l,i,u),nl(e,l,i)),i}function Nl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function _a(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ei(e,t){_a(e,t),(e=e.alternate)&&_a(e,t)}function Df(){return null}var Ca=typeof reportError=="function"?reportError:function(e){console.error(e)};function xi(e){this._internalRoot=e}Pl.prototype.render=xi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(m(409));Cl(e,t,null,null)},Pl.prototype.unmount=xi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rn(function(){Cl(null,e,null,null)}),t[wt]=null}};function Pl(e){this._internalRoot=e}Pl.prototype.unstable_scheduleHydration=function(e){if(e){var t=oo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&t!==0&&t<Rt[n].priority;n++);Rt.splice(n,0,e),n===0&&co(e)}};function _i(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Na(){}function If(e,t,n,r,l){if(l){if(typeof r=="function"){var u=r;r=function(){var p=Nl(i);u.call(p)}}var i=xa(t,r,e,0,null,!1,!1,"",Na);return e._reactRootContainer=i,e[wt]=i.current,tr(e.nodeType===8?e.parentNode:e),rn(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var o=r;r=function(){var p=Nl(s);o.call(p)}}var s=Si(e,0,!1,null,null,!1,!1,"",Na);return e._reactRootContainer=s,e[wt]=s.current,tr(e.nodeType===8?e.parentNode:e),rn(function(){Cl(t,s,n,r)}),s}function Tl(e,t,n,r,l){var u=n._reactRootContainer;if(u){var i=u;if(typeof l=="function"){var o=l;l=function(){var s=Nl(i);o.call(s)}}Cl(t,i,e,l)}else i=If(n,t,e,l,r);return Nl(i)}uo=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vn(t.pendingLanes);n!==0&&(Xl(t,n|1),$e(t,ve()),(Y&6)===0&&(Rn=ve()+500,Ft()))}break;case 13:rn(function(){var r=xt(e,1);if(r!==null){var l=De();ct(r,e,1,l)}}),Ei(e,1)}},Gl=function(e){if(e.tag===13){var t=xt(e,134217728);if(t!==null){var n=De();ct(t,e,134217728,n)}Ei(e,134217728)}},io=function(e){if(e.tag===13){var t=Ht(e),n=xt(e,t);if(n!==null){var r=De();ct(n,e,t,r)}Ei(e,t)}},oo=function(){return te},so=function(e,t){var n=te;try{return te=e,t()}finally{te=n}},$l=function(e,t,n){switch(t){case"input":if(Ol(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Kr(r);if(!l)throw Error(m(90));ji(r),Ol(r,l)}}}break;case"textarea":Fi(e,n);break;case"select":t=n.value,t!=null&&sn(e,!!n.multiple,t,!1)}},Ki=hi,Yi=rn;var Mf={usingClientEntryPoint:!1,Events:[lr,gn,Kr,Wi,Qi,hi]},gr={findFiberByHostInstance:Gt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ff={bundleType:gr.bundleType,version:gr.version,rendererPackageName:gr.rendererPackageName,rendererConfig:gr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ji(e),e===null?null:e.stateNode},findFiberByHostInstance:gr.findFiberByHostInstance||Df,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{Pr=Ll.inject(Ff),pt=Ll}catch{}}return Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mf,Be.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_i(t))throw Error(m(200));return Of(e,t,null,n)},Be.createRoot=function(e,t){if(!_i(e))throw Error(m(299));var n=!1,r="",l=Ca;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Si(e,1,!1,null,null,n,!1,r,l),e[wt]=t.current,tr(e.nodeType===8?e.parentNode:e),new xi(t)},Be.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(m(188)):(e=Object.keys(e).join(","),Error(m(268,e)));return e=Ji(t),e=e===null?null:e.stateNode,e},Be.flushSync=function(e){return rn(e)},Be.hydrate=function(e,t,n){if(!zl(t))throw Error(m(200));return Tl(null,e,t,!0,n)},Be.hydrateRoot=function(e,t,n){if(!_i(e))throw Error(m(405));var r=n!=null&&n.hydratedSources||null,l=!1,u="",i=Ca;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=xa(t,null,e,1,n??null,l,!1,u,i),e[wt]=t.current,tr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Pl(t)},Be.render=function(e,t,n){if(!zl(t))throw Error(m(200));return Tl(null,e,t,!1,n)},Be.unmountComponentAtNode=function(e){if(!zl(e))throw Error(m(40));return e._reactRootContainer?(rn(function(){Tl(null,null,e,!1,function(){e._reactRootContainer=null,e[wt]=null})}),!0):!1},Be.unstable_batchedUpdates=hi,Be.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zl(n))throw Error(m(200));if(e==null||e._reactInternals===void 0)throw Error(m(38));return Tl(e,t,n,!1,r)},Be.version="18.3.1-next-f1338f8080-20240426",Be}var Da;function Qf(){if(Da)return Pi.exports;Da=1;function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(_){console.error(_)}}return g(),Pi.exports=Wf(),Pi.exports}var Ia;function Kf(){if(Ia)return Rl;Ia=1;var g=Qf();return Rl.createRoot=g.createRoot,Rl.hydrateRoot=g.hydrateRoot,Rl}var Yf=Kf();const Xf="modulepreload",Gf=function(g){return"/"+g},Ma={},On=function(_,m,V){let L=Promise.resolve();if(m&&m.length>0){let A=function(j){return Promise.all(j.map(W=>Promise.resolve(W).then(K=>({status:"fulfilled",value:K}),K=>({status:"rejected",reason:K}))))};document.getElementsByTagName("link");const M=document.querySelector("meta[property=csp-nonce]"),H=(M==null?void 0:M.nonce)||(M==null?void 0:M.getAttribute("nonce"));L=A(m.map(j=>{if(j=Gf(j),j in Ma)return;Ma[j]=!0;const W=j.endsWith(".css"),K=W?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${j}"]${K}`))return;const R=document.createElement("link");if(R.rel=W?"stylesheet":Xf,W||(R.as="script"),R.crossOrigin="",R.href=j,H&&R.setAttribute("nonce",H),document.head.appendChild(R),W)return new Promise((he,_e)=>{R.addEventListener("load",he),R.addEventListener("error",()=>_e(new Error(`Unable to preload CSS for ${j}`)))})}))}function I(A){const M=new Event("vite:preloadError",{cancelable:!0});if(M.payload=A,window.dispatchEvent(M),!M.defaultPrevented)throw A}return L.then(A=>{for(const M of A||[])M.status==="rejected"&&I(M.reason);return _().catch(I)})},Ri=[{id:"sections",title:"栏目",order:500,component:X.lazy(()=>On(()=>import("./view-DCR3mXQP.js"),[]))},{id:"entries",title:"条目",order:600,tab:!1,component:X.lazy(()=>On(()=>import("./view-qNmLIhoy.js"),__vite__mapDeps([0,1])))},{id:"files",title:"附件",order:650,component:X.lazy(()=>On(()=>import("./view-DTFmAEtL.js"),__vite__mapDeps([2,1])))},{id:"export",title:"导出",order:700,component:X.lazy(()=>On(()=>import("./view-uH2FjbJC.js"),[]))},{id:"backup",title:"加密备份",order:750,component:X.lazy(()=>On(()=>import("./view-Bh_6V4-F.js"),[]))},{id:"settings",title:"设置",order:900,component:X.lazy(()=>On(()=>import("./view-CDaAGMaO.js"),[]))}],Zf=Ri.find(g=>g.id==="entries").component;Ri.map(g=>g.id);const Jf=3e4;async function qf(g,_={}){const m=new AbortController,V=setTimeout(()=>m.abort(),_.timeoutMs||Jf);try{const L=await fetch(g,{method:_.method||"GET",headers:_.body?{"content-type":"application/json"}:void 0,body:_.body?JSON.stringify(_.body):void 0,signal:m.signal}),I=await L.json().catch(()=>{throw new Error(`HTTP ${L.status}`)});if(!I.ok){const A=new Error(I.error||"请求失败");throw A.code=I.code,A}return I.data}catch(L){throw L&&L.name==="AbortError"?new Error("请求超时(本地服务无响应)"):L}finally{clearTimeout(V)}}const Aa="nx-sk-ui",Fa={view:"job",entry:"",q:"",mask:!1};function bf(){try{return{...Fa,...JSON.parse(localStorage.getItem(Aa)||"{}")}}catch{return{...Fa}}}const Va=X.createContext(null);function ed({children:g}){const[_,m]=X.useState(null),[V,L]=X.useState(null),[I,A]=X.useState(bf),[M,H]=X.useState([]),[j,W]=X.useState(null),K=X.useCallback(re=>{A(ie=>{const b={...ie,...re};try{localStorage.setItem(Aa,JSON.stringify(b))}catch{}return b})},[]),R=X.useCallback(async()=>{try{const re=await qf("/api/bootstrap");return m(re),L(null),re}catch(re){return L(re.message||String(re)),null}},[]);X.useEffect(()=>{R()},[R]);const he=X.useCallback((re,ie="ok")=>{const b=`${Date.now()}-${Math.random().toString(36).slice(2,6)}`;H(je=>[...je,{id:b,message:re,kind:ie}]),setTimeout(()=>H(je=>je.filter(Ce=>Ce.id!==b)),2600)},[]),_e=X.useCallback(re=>new Promise(ie=>{W({...re,resolve:ie})}),[]),ne=X.useCallback(re=>{W(ie=>{var b;return(b=ie==null?void 0:ie.resolve)==null||b.call(ie,re),null})},[]),q=X.useCallback(re=>async(...ie)=>{try{await re(...ie)}catch(b){he((b==null?void 0:b.message)||String(b),"bad")}},[he]),nt=X.useMemo(()=>({boot:_,bootError:V,ui:I,patchUi:K,reload:R,toast:he,dialog:_e,closeDialog:ne,guard:q,toasts:M,dialogState:j}),[_,V,I,K,R,he,_e,ne,q,M,j]);return x.jsx(Va.Provider,{value:nt,children:g})}function kr(){const g=X.useContext(Va);if(!g)throw new Error("useStore 必须在 StoreProvider 内使用");return g}function $a({text:g,children:_,className:m="",title:V}){const{toast:L}=kr(),I=async()=>{const A=String(g??"");try{await navigator.clipboard.writeText(A),L("已复制")}catch{L("复制失败:浏览器拒绝了剪贴板访问","bad")}};return x.jsx("span",{className:`copyable ${m}`,title:V||`点击复制:${g}`,onClick:I,role:"button",tabIndex:0,onKeyDown:A=>{A.key==="Enter"&&I()},children:_??g})}function id({children:g,kind:_=""}){return x.jsx("span",{className:`tag ${_}`,children:g})}class td extends X.Component{constructor(_){super(_),this.state={err:null}}static getDerivedStateFromError(_){return{err:_}}render(){var _;return this.state.err?x.jsxs("div",{className:"pad stack",children:[x.jsx("div",{children:x.jsx("strong",{children:"这个视图崩了"})}),x.jsx("div",{className:"muted",children:String(((_=this.state.err)==null?void 0:_.message)||this.state.err)}),x.jsx("div",{className:"hint",children:"切到别的 tab 仍然可用;修好之后本页会自愈。"})]}):this.props.children}}function nd(){const{toasts:g}=kr();return g.length?x.jsx("div",{className:"toasts",children:g.map(_=>x.jsx("div",{className:`toast ${_.kind==="ok"?"":"bad"}`,children:_.message},_.id))}):null}function od({title:g,children:_,onClose:m,footer:V}){return X.useEffect(()=>{const L=I=>{I.key==="Escape"&&(m==null||m())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[m]),x.jsx("div",{className:"mask",onClick:L=>{L.target===L.currentTarget&&(m==null||m())},children:x.jsxs("div",{className:"dialog",children:[x.jsxs("div",{className:"dialog-title",children:[x.jsx("span",{className:"grow nowrap",children:g}),x.jsx("button",{className:"btn small ghost",onClick:m,children:"关闭"})]}),x.jsx("div",{className:"dialog-body",children:_}),V?x.jsx("div",{className:"dialog-foot",children:V}):null]})})}function rd(){const{dialogState:g,closeDialog:_}=kr(),m=X.useRef(null);if(X.useEffect(()=>{g!=null&&g.input&&m.current&&m.current.focus()},[g]),!g)return null;const{message:V,detail:L,danger:I,input:A,confirmText:M="确定",cancelText:H="取消",hideCancel:j}=g;return x.jsx("div",{className:"mask",children:x.jsxs("div",{className:"dialog",children:[x.jsx("div",{className:"dialog-title",children:I?"危险操作":"确认"}),x.jsxs("div",{className:"dialog-body stack",children:[x.jsx("div",{children:V}),L?x.jsx("pre",{className:"block",children:L}):null,A?x.jsx("input",{ref:m,defaultValue:A.defaultValue||"",placeholder:A.placeholder||""}):null]}),x.jsxs("div",{className:"dialog-foot",children:[j?null:x.jsx("button",{className:"btn ghost",onClick:()=>_(null),children:H}),x.jsx("button",{className:`btn ${I?"danger":""}`,onClick:()=>{var W;return _(A?((W=m.current)==null?void 0:W.value)??"":!0)},children:M})]})]})})}function sd({module:g}){const{boot:_}=kr(),m=((_==null?void 0:_.commands)||[]).filter(V=>V.module===g);return m.length?x.jsxs("div",{className:"cli-hint",children:[x.jsx("span",{className:"cli-hint-label",children:"这个页面上的每个操作都有一条同构的 CLI 命令:"}),m.map((V,L)=>x.jsxs(X.Fragment,{children:[L>0?x.jsx("span",{className:"cli-hint-sep",children:" · "}):null,x.jsx($a,{className:"cli-cmd",text:V.command,title:`点击复制:${V.usage}`,children:V.command})]},V.id)),x.jsxs("span",{className:"cli-hint-tail",children:["。加 ",x.jsx("code",{className:"cli-cmd",children:"--json"})," 得机器可读输出。"]})]}):null}function ad({children:g}){return x.jsx("div",{className:"row muted",children:g})}function Ua(){const g=/^#\/?([^?/]*)/.exec(window.location.hash||"");return g?decodeURIComponent(g[1]):""}function ld(){const{boot:g,bootError:_,ui:m,patchUi:V,reload:L}=kr(),I=X.useMemo(()=>{const j=((g==null?void 0:g.sections)||[]).map(R=>({id:R.id,title:R.title,order:R.order,kind:"section",count:R.entries})),W=Ri.filter(R=>R.tab!==!1).map(R=>({id:R.id,title:R.title,order:R.order,kind:"view",component:R.component})),K=new Set;return[...j,...W].sort((R,he)=>(R.order??50)-(he.order??50)).filter(R=>K.has(R.id)?!1:(K.add(R.id),!0))},[g]),A=!!g,M=I.find(j=>j.id===m.view)||(A?I[0]:null)||null;X.useEffect(()=>{const j=Ua();j&&j!==m.view?V({view:j}):window.location.hash||(window.location.hash=`#/${m.view}`)},[]),X.useEffect(()=>{const j=()=>{const W=Ua();W&&V({view:W})};return window.addEventListener("hashchange",j),()=>window.removeEventListener("hashchange",j)},[V]),X.useEffect(()=>{A&&M&&M.id!==m.view&&V({view:M.id})},[A,M,m.view,V]);const H=j=>{V({view:j}),window.location.hash=`#/${j}`};return x.jsxs("div",{className:"app",children:[x.jsxs("header",{className:"top",children:[x.jsxs("span",{className:"brand",children:[x.jsx("img",{src:"/logo-rounded.png",alt:""}),"nx-sk"]}),x.jsx("span",{className:"tagline",children:"本机个人资源管理器"}),g?x.jsxs("span",{className:"ver mono",children:["v",g.app.version]}):null,x.jsxs("span",{className:"right rowgap",children:[g?x.jsxs("span",{className:"store",title:`存储目录:${g.storePathRaw}`,children:[x.jsx("span",{className:"store-label",children:"存储"}),x.jsx($a,{className:"mono nowrap",text:g.storePathRaw,children:g.storePath})]}):null,x.jsx("button",{className:"btn small ghost",onClick:()=>L(),children:"刷新数据"})]})]}),x.jsxs("nav",{className:"tabs",children:[I.map((j,W)=>x.jsxs(X.Fragment,{children:[W>0&&I[W-1].kind!==j.kind?x.jsx("span",{className:"tabs-sep","aria-hidden":!0}):null,x.jsxs("button",{className:`tab ${j.id===(M==null?void 0:M.id)?"active":""}`,onClick:()=>H(j.id),children:[j.title,typeof j.count=="number"?x.jsx("span",{className:"count",children:j.count}):null]})]},j.id)),I.length?null:x.jsx("span",{className:"muted",children:"正在装载…"})]}),x.jsxs("main",{className:"body",children:[_?x.jsxs("div",{className:"pad stack",children:[x.jsx("div",{className:"bad",children:x.jsx("strong",{children:"读不到后端上下文"})}),x.jsx("pre",{className:"block",children:_}),x.jsx("div",{className:"hint",children:"确认 nx-sk serve 正在运行;或点右上角「刷新数据」重试。"})]}):null,!_&&!A?x.jsx("div",{className:"pad muted",children:"正在装载…"}):null,!_&&A&&M?x.jsx(td,{children:x.jsx(X.Suspense,{fallback:x.jsx("div",{className:"pad muted",children:"加载中…"}),children:M.kind==="section"?x.jsx(ud,{sectionId:M.id}):x.jsx(M.component,{})})},M.id):null]}),x.jsx(nd,{}),x.jsx(rd,{})]})}function ud({sectionId:g}){const _=Zf;return x.jsx(_,{sectionId:g})}Yf.createRoot(document.getElementById("root")).render(x.jsx(X.StrictMode,{children:x.jsx(ed,{children:x.jsx(ld,{})})}));export{sd as C,ad as E,od as M,id as T,qf as a,$a as b,x as j,X as r,kr as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--ink: #14161a;--paper: #fff;--soft: #f5f6f7;--soft-2: #ebedf0;--mid: #8b9096;--danger: #b3261e;--border: 1px solid var(--soft-2);--row-h: 28px;--btn-h: 32px;--fs-core: 12px;--radius-btn: 8px;--shadow-relief: -1px -1px 2px rgba(255, 255, 255, .85), 2px 2px 6px rgba(20, 22, 26, .07);--shadow-relief-press: inset 1px 1px 2px rgba(20, 22, 26, .1), inset -1px -1px 2px rgba(255, 255, 255, .7);--shadow-relief-inset: inset 1px 1px 2px rgba(20, 22, 26, .06), inset -1px -1px 2px rgba(255, 255, 255, .9)}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Microsoft YaHei,sans-serif;font-size:var(--fs-core);line-height:1.5;-webkit-font-smoothing:antialiased}.mono,code,.path,.cli-cmd{font-family:ui-monospace,Consolas,Courier New,monospace}.muted{color:var(--mid)}.bad{color:var(--danger)}.nowrap{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pad{padding:10px 14px}.rowgap{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.grow{flex:1;min-width:0}.right{margin-left:auto}.app{display:flex;flex-direction:column;height:100%;min-height:0}header.top{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px 14px;border-bottom:var(--border);flex-shrink:0}header.top .brand{font-size:15px;font-weight:700;letter-spacing:.2px;line-height:1;display:inline-flex;align-items:center;gap:8px}header.top .brand img{width:22px;height:22px;border-radius:6px;display:block}header.top .tagline{color:var(--mid);font-size:11px}header.top .ver{font-size:10px;color:var(--mid);background:var(--soft);border:var(--border);border-radius:999px;padding:1px 8px;line-height:1.7}header.top .store{display:inline-flex;align-items:center;gap:6px;min-width:0;font-size:11px;color:var(--mid)}header.top .store .store-label{color:var(--mid)}header.top .store .copyable{max-width:30ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nav.tabs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 14px;border-bottom:var(--border);flex-shrink:0}.tabs-sep{width:1px;height:18px;background:var(--soft-2);margin:0 4px}main.body{flex:1;min-height:0;overflow:auto}.tab{font:inherit;font-size:var(--fs-core);height:var(--btn-h);padding:0 12px;border:0;border-radius:var(--radius-btn);background:var(--soft);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;gap:7px}.tab .count{color:var(--mid);font-size:10px;font-variant-numeric:tabular-nums}.tab.active{background:var(--paper);box-shadow:var(--shadow-relief);font-weight:600}.btn{font:inherit;font-size:var(--fs-core);cursor:pointer;height:var(--btn-h);padding:0 12px;border:0;border-radius:var(--radius-btn);background:var(--ink);color:var(--paper);box-shadow:var(--shadow-relief);display:inline-flex;align-items:center;gap:4px;transition:box-shadow .12s,transform .08s}.btn:hover:not(:disabled){box-shadow:var(--shadow-relief),0 0 0 3px #14161a0d}.btn:active:not(:disabled){box-shadow:var(--shadow-relief-press);transform:translateY(1px)}.btn:disabled{background:var(--soft);color:var(--mid);box-shadow:var(--shadow-relief-inset);cursor:not-allowed}.btn.ghost{background:var(--soft);color:var(--ink)}.btn.danger{background:var(--danger);color:#fff}.btn.small{height:22px;padding:0 8px;font-size:11px;border-radius:6px}input,select,textarea{font:inherit;font-size:var(--fs-core);color:var(--ink);background:var(--paper);border:var(--border);border-radius:6px;padding:0 8px}input,select{height:var(--row-h)}textarea{padding:5px 8px;resize:vertical;min-height:56px;line-height:1.5}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--soft-2);box-shadow:var(--shadow-relief-inset)}label.inline{display:inline-flex;align-items:center;gap:6px}.card{border-bottom:var(--border)}.card:last-child{border-bottom:0}.card>.colhead{display:flex;align-items:center;gap:8px;height:var(--row-h);padding:0 14px;border-bottom:var(--border);font-size:13px;font-weight:600}.card>.colbody{padding:0}.row{display:flex;align-items:center;gap:8px;min-height:var(--row-h);padding:0 14px;border-bottom:var(--border);font-size:var(--fs-core);transition:background .12s}.row:hover{background:var(--soft)}.row:last-child{border-bottom:0}.row .name{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row .desc{color:var(--mid);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row .acts{margin-left:auto;display:flex;align-items:center;gap:6px;flex-shrink:0}.row.selectable{cursor:pointer}.row.selected{background:var(--soft);box-shadow:inset 2px 0 0 var(--ink)}.tag{display:inline-flex;align-items:center;height:22px;padding:0 7px;border-radius:999px;background:var(--soft);color:var(--mid);font-size:11px;white-space:nowrap}.tag.strong{background:var(--ink);color:var(--paper)}.tag.bad{background:#fbeae9;color:var(--danger)}.copyable{cursor:copy;border-radius:4px;padding:0 3px}.copyable:hover{background:var(--soft)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:0 14px}.field{border-bottom:var(--border);padding:5px 0;min-width:0}.field>.flabel{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--mid)}.field>.flabel .fkey{font-family:ui-monospace,Consolas,monospace;font-size:10px;color:var(--soft-2)}.field>.fctrl{margin-top:3px}.field input,.field select,.field textarea{width:100%}.field.wide{grid-column:1 / -1}.group-title{display:flex;align-items:center;gap:8px;height:var(--row-h);padding:0 14px;border-bottom:var(--border);background:var(--soft);font-size:11px;color:var(--mid);letter-spacing:.5px}.cli-hint{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:6px 14px;color:var(--mid);font-size:11px;border-top:var(--border)}.cli-hint-label{margin-right:4px}.cli-hint-sep{color:var(--soft-2)}.cli-cmd{color:var(--ink)}.toasts{position:fixed;right:14px;bottom:14px;display:flex;flex-direction:column;gap:6px;z-index:40}.toast{background:var(--ink);color:var(--paper);padding:7px 12px;border-radius:8px;font-size:var(--fs-core);box-shadow:var(--shadow-relief);max-width:420px}.toast.bad{background:var(--danger)}.mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#14161a47;display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}.dialog{background:var(--paper);border-radius:8px;min-width:320px;max-width:min(880px,92vw);max-height:86vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 40px #14161a2e}.dialog-title{display:flex;align-items:center;gap:8px;height:var(--row-h);padding:0 14px;border-bottom:var(--border);font-size:13px;font-weight:600;flex-shrink:0}.dialog-body{padding:10px 14px;overflow:auto;min-height:0}.dialog-foot{display:flex;gap:8px;justify-content:flex-end;padding:8px 14px;border-top:var(--border);flex-shrink:0}pre.block{margin:0;padding:10px 14px;background:var(--soft);border-radius:8px;font-family:ui-monospace,Consolas,monospace;font-size:11px;line-height:1.55;white-space:pre-wrap;word-break:break-word;max-height:60vh;overflow:auto}.hint{color:var(--mid);font-size:11px}.stack{display:flex;flex-direction:column;gap:10px}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.cols{display:flex;gap:14px;align-items:flex-start;padding:0 14px 14px}.col{flex:1;min-width:0}.desc{color:var(--mid)}.cols>.col>.card{border:var(--border);border-radius:4px}.files-page{min-height:100%;position:relative}.files-page.drag-over{outline:2px dashed var(--ink);outline-offset:-8px;background:var(--soft)}.tab.small{height:22px;padding:0 8px;font-size:11px;border-radius:6px}.file-filters{padding-top:4px;padding-bottom:4px}.drop-hint{margin:0 14px;padding:18px;text-align:center;border:1px dashed var(--ink);border-radius:8px;background:var(--paper);font-weight:600}.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}.file-card{display:flex;flex-direction:column;border:var(--border);border-radius:8px;overflow:hidden;background:var(--paper)}.file-thumb{display:flex;align-items:center;justify-content:center;height:120px;background:var(--soft);border-bottom:var(--border)}.file-thumb img{max-width:100%;max-height:100%;object-fit:contain}.ext-badge{font-size:22px;font-weight:700;letter-spacing:1px;color:var(--mid);font-family:ui-monospace,Consolas,monospace}.file-meta{padding:8px 10px 4px;display:flex;flex-direction:column;gap:4px}a.file-name{color:var(--ink);font-weight:600;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}a.file-name:hover{text-decoration:underline}.file-acts{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px 10px 8px;margin-top:auto}.btn.ghost.danger-ghost{color:var(--danger)}.file-picker{display:flex;flex-direction:column;gap:4px}.file-picker .file-pick-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.file-picker select{flex:1;min-width:120px}.file-preview{display:flex;align-items:center;gap:8px;border:var(--border);border-radius:6px;padding:4px 8px;background:var(--soft)}.file-preview img{width:40px;height:40px;object-fit:cover;border-radius:4px;border:var(--border);background:#fff}.file-preview .file-preview-name{color:var(--ink);text-decoration:none;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-preview .file-preview-name:hover{text-decoration:underline}
|
|
1
|
+
:root{--ink: #14161a;--paper: #fff;--soft: #f5f6f7;--soft-2: #ebedf0;--mid: #8b9096;--danger: #b3261e;--border: 1px solid var(--soft-2);--row-h: 28px;--btn-h: 32px;--fs-core: 12px;--radius-btn: 8px;--shadow-relief: -1px -1px 2px rgba(255, 255, 255, .85), 2px 2px 6px rgba(20, 22, 26, .07);--shadow-relief-press: inset 1px 1px 2px rgba(20, 22, 26, .1), inset -1px -1px 2px rgba(255, 255, 255, .7);--shadow-relief-inset: inset 1px 1px 2px rgba(20, 22, 26, .06), inset -1px -1px 2px rgba(255, 255, 255, .9)}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Microsoft YaHei,sans-serif;font-size:var(--fs-core);line-height:1.5;-webkit-font-smoothing:antialiased}.mono,code,.path,.cli-cmd{font-family:ui-monospace,Consolas,Courier New,monospace}.muted{color:var(--mid)}.bad{color:var(--danger)}.nowrap{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pad{padding:10px 14px}.rowgap{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.grow{flex:1;min-width:0}.right{margin-left:auto}.app{display:flex;flex-direction:column;height:100%;min-height:0}header.top{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px 14px;border-bottom:var(--border);flex-shrink:0}header.top .brand{font-size:15px;font-weight:700;letter-spacing:.2px;line-height:1;display:inline-flex;align-items:center;gap:8px}header.top .brand img{width:22px;height:22px;border-radius:6px;display:block}header.top .tagline{color:var(--mid);font-size:11px}header.top .ver{font-size:10px;color:var(--mid);background:var(--soft);border:var(--border);border-radius:999px;padding:1px 8px;line-height:1.7}header.top .store{display:inline-flex;align-items:center;gap:6px;min-width:0;font-size:11px;color:var(--mid)}header.top .store .store-label{color:var(--mid)}header.top .store .copyable{max-width:30ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nav.tabs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 14px;border-bottom:var(--border);flex-shrink:0}.tabs-sep{width:1px;height:18px;background:var(--soft-2);margin:0 4px}main.body{flex:1;min-height:0;overflow:auto}.tab{font:inherit;font-size:var(--fs-core);height:var(--btn-h);padding:0 12px;border:0;border-radius:var(--radius-btn);background:var(--soft);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;gap:7px}.tab .count{color:var(--mid);font-size:10px;font-variant-numeric:tabular-nums}.tab.active{background:var(--paper);box-shadow:var(--shadow-relief);font-weight:600}.btn{font:inherit;font-size:var(--fs-core);cursor:pointer;height:var(--btn-h);padding:0 12px;border:0;border-radius:var(--radius-btn);background:var(--ink);color:var(--paper);box-shadow:var(--shadow-relief);display:inline-flex;align-items:center;gap:4px;transition:box-shadow .12s,transform .08s}.btn:hover:not(:disabled){box-shadow:var(--shadow-relief),0 0 0 3px #14161a0d}.btn:active:not(:disabled){box-shadow:var(--shadow-relief-press);transform:translateY(1px)}.btn:disabled{background:var(--soft);color:var(--mid);box-shadow:var(--shadow-relief-inset);cursor:not-allowed}.btn.ghost{background:var(--soft);color:var(--ink)}.btn.danger{background:var(--danger);color:#fff}.btn.small{height:22px;padding:0 8px;font-size:11px;border-radius:6px}input,select,textarea{font:inherit;font-size:var(--fs-core);color:var(--ink);background:var(--paper);border:var(--border);border-radius:6px;padding:0 8px}input,select{height:var(--row-h)}textarea{padding:5px 8px;resize:vertical;min-height:56px;line-height:1.5}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--soft-2);box-shadow:var(--shadow-relief-inset)}label.inline{display:inline-flex;align-items:center;gap:6px}.card{border-bottom:var(--border)}.card:last-child{border-bottom:0}.card>.colhead{display:flex;align-items:center;gap:8px;height:var(--row-h);padding:0 14px;border-bottom:var(--border);font-size:13px;font-weight:600}.card>.colbody{padding:0}.row{display:flex;align-items:center;gap:8px;min-height:var(--row-h);padding:0 14px;border-bottom:var(--border);font-size:var(--fs-core);transition:background .12s}.row:hover{background:var(--soft)}.row:last-child{border-bottom:0}.row .name{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row .desc{color:var(--mid);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row .acts{margin-left:auto;display:flex;align-items:center;gap:6px;flex-shrink:0}.row.selectable{cursor:pointer}.row.selected{background:var(--soft);box-shadow:inset 2px 0 0 var(--ink)}.tag{display:inline-flex;align-items:center;height:22px;padding:0 7px;border-radius:999px;background:var(--soft);color:var(--mid);font-size:11px;white-space:nowrap}.tag.strong{background:var(--ink);color:var(--paper)}.tag.bad{background:#fbeae9;color:var(--danger)}.copyable{cursor:copy;border-radius:4px;padding:0 3px}.copyable:hover{background:var(--soft)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:0 14px}.field{border-bottom:var(--border);padding:5px 0;min-width:0}.field>.flabel{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--mid)}.field>.flabel .fkey{font-family:ui-monospace,Consolas,monospace;font-size:10px;color:var(--soft-2)}.field>.fctrl{margin-top:3px}.field input,.field select,.field textarea{width:100%}.field.wide{grid-column:1 / -1}.group-title{display:flex;align-items:center;gap:8px;height:var(--row-h);padding:0 14px;border-bottom:var(--border);background:var(--soft);font-size:11px;color:var(--mid);letter-spacing:.5px}.cli-hint{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:6px 14px;color:var(--mid);font-size:11px;border-top:var(--border)}.cli-hint-label{margin-right:4px}.cli-hint-sep{color:var(--soft-2)}.cli-cmd{color:var(--ink)}.toasts{position:fixed;right:14px;bottom:14px;display:flex;flex-direction:column;gap:6px;z-index:40}.toast{background:var(--ink);color:var(--paper);padding:7px 12px;border-radius:8px;font-size:var(--fs-core);box-shadow:var(--shadow-relief);max-width:420px}.toast.bad{background:var(--danger)}.mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#14161a47;display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}.dialog{background:var(--paper);border-radius:8px;min-width:320px;max-width:min(880px,92vw);max-height:86vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 40px #14161a2e}.dialog-title{display:flex;align-items:center;gap:8px;height:var(--row-h);padding:0 14px;border-bottom:var(--border);font-size:13px;font-weight:600;flex-shrink:0}.dialog-body{padding:10px 14px;overflow:auto;min-height:0}.dialog-foot{display:flex;gap:8px;justify-content:flex-end;padding:8px 14px;border-top:var(--border);flex-shrink:0}pre.block{margin:0;padding:10px 14px;background:var(--soft);border-radius:8px;font-family:ui-monospace,Consolas,monospace;font-size:11px;line-height:1.55;white-space:pre-wrap;word-break:break-word;max-height:60vh;overflow:auto}.hint{color:var(--mid);font-size:11px}.stack{display:flex;flex-direction:column;gap:10px}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.cols{display:flex;gap:14px;align-items:flex-start;padding:0 14px 14px}.col{flex:1;min-width:0}.desc{color:var(--mid)}.cols>.col>.card{border:var(--border);border-radius:4px}.files-page{min-height:100%;position:relative}.files-page.drag-over{outline:2px dashed var(--ink);outline-offset:-8px;background:var(--soft)}.tab.small{height:22px;padding:0 8px;font-size:11px;border-radius:6px}.file-filters{padding-top:4px;padding-bottom:4px}.drop-hint{margin:0 14px;padding:18px;text-align:center;border:1px dashed var(--ink);border-radius:8px;background:var(--paper);font-weight:600}.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}.file-card{display:flex;flex-direction:column;border:var(--border);border-radius:8px;overflow:hidden;background:var(--paper)}.file-thumb{display:flex;align-items:center;justify-content:center;height:120px;background:var(--soft);border-bottom:var(--border)}.file-thumb img{max-width:100%;max-height:100%;object-fit:contain}.ext-badge{font-size:22px;font-weight:700;letter-spacing:1px;color:var(--mid);font-family:ui-monospace,Consolas,monospace}.file-meta{padding:8px 10px 4px;display:flex;flex-direction:column;gap:4px}a.file-name{color:var(--ink);font-weight:600;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}a.file-name:hover{text-decoration:underline}.file-acts{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px 10px 8px;margin-top:auto}.btn.ghost.danger-ghost{color:var(--danger)}.file-picker{display:flex;flex-direction:column;gap:4px}.file-picker.drag{outline:2px dashed var(--ink);outline-offset:-4px;background:var(--soft)}.file-picker .file-pick-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.file-picker select{flex:1;min-width:120px}.file-preview{display:flex;align-items:center;gap:8px;border:var(--border);border-radius:6px;padding:4px 8px;background:var(--soft)}.file-preview img{width:40px;height:40px;object-fit:cover;border-radius:4px;border:var(--border);background:#fff}.file-preview .file-preview-name{color:var(--ink);text-decoration:none;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-preview .file-preview-name:hover{text-decoration:underline}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as P,r,a as v,j as e,E as A,C as B,M as L}from"./index-
|
|
1
|
+
import{u as P,r,a as v,j as e,E as A,C as B,M as L}from"./index-DpX9p_OX.js";const O=28*1024*1024,F=20;function I(){const s=new Date,t=a=>String(a).padStart(2,"0");return`${s.getFullYear()}${t(s.getMonth()+1)}${t(s.getDate())}-${t(s.getHours())}${t(s.getMinutes())}${t(s.getSeconds())}`}function U(s,t){const a=new Blob([t],{type:"application/json;charset=utf-8"}),d=URL.createObjectURL(a),l=document.createElement("a");l.href=d,l.download=s,document.body.appendChild(l),l.click(),l.remove(),setTimeout(()=>URL.revokeObjectURL(d),1e3)}function x({title:s,items:t,render:a,total:d}){if(!t||!t.length)return null;const l=d!=null&&d>t.length;return e.jsxs("div",{children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:s}),l?e.jsxs("span",{className:"fkey",children:["共 ",d," 处"]}):null]}),e.jsx("ul",{className:"stack",style:{margin:"4px 0 0",paddingLeft:18},children:t.slice(0,F).map((p,h)=>e.jsx("li",{children:a(p)},h))})]})}function V({r:s}){const t=s.files||{};return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{children:["新增栏目 ",(s.addedSections||[]).length," 个 / 新增条目 ",s.addedEntriesTotal||0," 条; 补空 ",s.filledTotal||0," 处;冲突 ",s.conflictsTotal||0," 处 (",s.counts?`栏目 ${s.counts.sectionsBefore} → ${s.counts.sectionsAfter},条目 ${s.counts.entriesBefore} → ${s.counts.entriesAfter}`:"",")"]}),e.jsx(x,{title:"补空明细(本地留空,已用备份值填上)",items:s.filled,total:s.filledTotal,render:a=>e.jsxs("span",{children:[a.section," / ",a.entry," · ",a.label," = ",a.value||"(空)"]})}),e.jsx(x,{title:"冲突(两边都有值且不同,已保留本地,请手动核对)",items:s.conflicts,total:s.conflictsTotal,render:a=>e.jsxs("span",{children:[a.section," / ",a.entry," · ",a.label,": 本地 ",a.localValue||"(空)"," | 备份 ",a.backupValue||"(空)"]})}),e.jsx(x,{title:"结构补齐(只增:备份多出的分组/字段已补进本地栏目)",items:s.structureAdded,render:a=>e.jsxs("span",{children:[a.id,": +",a.fields.length," 字段 [",a.fields.join(", "),"]",a.groups.length?`,+分组 [${a.groups.join(", ")}]`:""]})}),e.jsx(x,{title:"本地独有字段(备份里没有,已原样保留)",items:s.structureOnlyLocal,render:a=>e.jsxs("span",{children:[a.id,": [",a.fields.join(", "),"]"]})}),(s.kvMismatch||[]).length?e.jsxs("div",{className:"muted",children:["kv 标记与备份不一致、未合并结构的栏目: ",s.kvMismatch.join(", ")]}):null,(s.settingsFilled||[]).length?e.jsxs("div",{children:["设置补空: ",s.settingsFilled.join(", ")]}):null,e.jsx("div",{children:S(t)}),s.exportsSkipped?e.jsxs("div",{className:"muted",children:["备份里的导出历史 ",s.exportsSkipped," 条未并入(保留本机记录)"]}):null,s.resealed?e.jsxs("div",{className:"muted",children:["用本机密钥库重新加密的密钥字段: ",s.resealed," 个"]}):null,e.jsxs("div",{className:"muted",children:["备份生成于 ",s.backupCreatedAt||"未知"]}),e.jsxs("pre",{className:"block",children:["导入前的安全快照:",s.safetySnapshot]})]})}function S(s){const t=[];return s.toAdd!=null&&t.push(`台账新增 ${s.toAdd} 条、沿用本地 ${s.kept||0} 条`),s.written&&t.push(`落盘原件 ${s.written} 个`),s.healed&&t.push(`补齐缺失原件 ${s.healed} 个`),s.skippedExisting&&t.push(`磁盘已有但内容不同、保留磁盘 ${s.skippedExisting} 个`),s.checksumMismatch&&t.push(`校验不符被拒 ${s.checksumMismatch} 个`),s.missingBinaryTotal&&t.push(`${s.missingBinaryTotal} 条台账无原件(备份未携带)`),t.length?`附件: ${t.join(";")}${s.bytes?`(共 ${s.bytes} 字节)`:""}`:"附件: 台账已并入,原件均已就位"}function _({r:s}){const t=s.filesStats||{};return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{children:["已整份替换为备份内容:",s.sections," 个栏目 / ",s.entries," 条条目(附件台账 ",s.filesInBackup||0," 条)"]}),e.jsx("div",{children:S({...t})}),s.resealed?e.jsxs("div",{className:"muted",children:["用本机密钥库重新加密的密钥字段: ",s.resealed," 个"]}):null,e.jsxs("div",{className:"muted",children:["备份生成于 ",s.backupCreatedAt||"未知"]}),e.jsxs("pre",{className:"block",children:["恢复前的安全快照:",s.safetySnapshot]})]})}function H(){const{toast:s,guard:t,dialog:a,reload:d}=P(),[l,p]=r.useState(""),[h,b]=r.useState(""),[f,C]=r.useState(!1),[m,g]=r.useState(""),[c,N]=r.useState(null),[u,w]=r.useState(null),k=r.useRef(null),R=t(async()=>{if(!l){s("请先设置备份口令","bad");return}if(l!==h){s("两次输入的口令不一致","bad");return}const n=await v("/api/backup",{method:"POST",body:{password:l,"with-files":f}}),i=`nx-sk-backup-${I()}.nxskbak`;U(i,JSON.stringify(n.archive,null,2)+`
|
|
2
2
|
`);const o=n.counts,j=f?`;嵌入原件 ${o.filesEmbedded} 个`:`;附件台账 ${o.files||0} 条未嵌原件`;s(`已生成加密备份:${o.sections} 栏目 / ${o.entries} 条目${j}`),p(""),b("")}),T=async n=>{var j;const i=(j=n.target.files)==null?void 0:j[0];if(!i)return;const o=await i.text();N({name:i.name,bytes:i.size,text:o})},y=()=>c?m?c.bytes>O?(s("备份文件超过 28MB,可能超过接口上限;请改用 CLI 导入:nx-sk backup import","bad"),!1):!0:(s("请输入备份口令","bad"),!1):(s("请先选择备份文件","bad"),!1),$=n=>(w(n),g(""),N(null),k.current&&(k.current.value=""),d()),E=t(async()=>{if(!y()||!await a({confirmText:"解密并合并导入",message:"合并导入:只把备份里有、而当前缺失或留空的内容补进来,不会覆盖你已填过的值,也不会删改本地栏目结构。",detail:`备份文件:${c.name}
|
|
3
3
|
冲突(两边都有值且不同)会保留本地、列在导入报告里。
|
|
4
4
|
导入前会自动给当前数据留一份安全快照(可回滚)。`}))return;const i=await v("/api/backup/restore",{method:"POST",body:{password:m,content:c.text}});await $(i)}),M=t(async()=>{if(!y()||!await a({danger:!0,confirmText:"解密并整份替换",message:"整份替换:当前数据会被备份内容整体覆盖,包括删掉备份里没有的条目。",detail:`备份文件:${c.name}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as b,r as d,a as k,j as s,b as r,E as F,C as I,T as $}from"./index-
|
|
1
|
+
import{u as b,r as d,a as k,j as s,b as r,E as F,C as I,T as $}from"./index-DpX9p_OX.js";function D(){var N,v,u,g,f,w,y,S;const{boot:e,reload:t,toast:n,guard:C}=b(),[o,h]=d.useState(null),[l,i]=d.useState(null),j=typeof window>"u"?"":window.location.origin,p=typeof window>"u"?"":window.location.port||"80",m=d.useCallback(async()=>{try{const a=await k("/api/settings");h(a),i({...a.settings})}catch(a){n(a.message,"bad")}},[n]);d.useEffect(()=>{m()},[m]);const E=C(async()=>{const a={exportDir:l.exportDir,exportFormat:l.exportFormat,includeSecretsInExport:!!l.includeSecretsInExport,defaultSection:l.defaultSection},x=await k("/api/settings",{method:"PATCH",body:a});n("设置已保存"),h({...o,settings:x.set}),await t()});return!o||!l?s.jsx("div",{className:"pad muted",children:"加载中…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"toolbar rowgap pad",children:[s.jsx("strong",{children:"设置"}),s.jsx("span",{className:"muted",children:"本机配置与运行状态"}),s.jsx("span",{className:"grow"}),s.jsx("button",{className:"btn small ghost",onClick:m,children:"重新读取"})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"colhead",children:"存储与运行"}),s.jsxs("div",{className:"colbody",children:[s.jsx(c,{label:"数据目录",value:e==null?void 0:e.home,copy:e==null?void 0:e.home}),s.jsx(c,{label:"store.json",value:e==null?void 0:e.storePath,copy:e==null?void 0:e.storePathRaw}),s.jsx(c,{label:"栏目 / 条目",value:e?`${e.counts.sections} / ${e.counts.entries}`:""}),s.jsx(c,{label:"命令条数",value:e?String(e.counts.commands):""}),s.jsx(c,{label:"app / node",value:e?`v${e.app.version} · node ${e.app.node} · ${e.app.platform}`:""}),s.jsx(c,{label:"环境变量覆盖",value:e?Object.entries(e.envOverrides).filter(([,a])=>a).map(([a,x])=>`${a}=${x}`).join(" ")||"(无)":""})]})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"colhead",children:"密钥(密文落盘)"}),s.jsxs("div",{className:"colbody",children:[s.jsx(c,{label:"密钥来源",value:((N=e==null?void 0:e.vault)==null?void 0:N.source)==="env"?"环境变量 NX_SK_PASSPHRASE(口令不落盘)":"本机密钥文件"}),s.jsx(c,{label:"密钥文件",value:((v=e==null?void 0:e.vault)==null?void 0:v.keyFile)||((u=e==null?void 0:e.vault)==null?void 0:u.saltFile)||"",copy:((g=e==null?void 0:e.vault)==null?void 0:g.keyFile)||((f=e==null?void 0:e.vault)==null?void 0:f.saltFile)}),s.jsx("div",{className:"row",children:s.jsx("span",{className:"desc",children:(w=e==null?void 0:e.vault)==null?void 0:w.note})}),s.jsx("div",{className:"row",children:s.jsx("span",{className:"desc bad",children:"删掉密钥文件或换掉口令后,已存的密文都解不开了——导出前先确认密钥可用。"})})]})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"colhead",children:"面板与 CLI"}),s.jsxs("div",{className:"colbody",children:[s.jsxs("div",{className:"row",children:[s.jsx("span",{className:"name",children:"面板地址"}),s.jsx("span",{className:"desc mono",children:j}),s.jsx("span",{className:"acts",children:s.jsx(r,{className:"mono",text:j,children:"复制"})})]}),s.jsxs("div",{className:"row",children:[s.jsx("span",{className:"name",children:"重启面板"}),s.jsx("span",{className:"desc",children:"面板本身就是 serve 提供的;改代码后重启它即可"}),s.jsx("span",{className:"acts",children:s.jsx(r,{className:"mono",text:`nx-sk serve --port ${p}`,children:`nx-sk serve --port ${p}`})})]})]})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"colhead",children:"默认行为"}),s.jsxs("div",{className:"pad",children:[s.jsxs("div",{className:"grid",children:[s.jsxs("div",{className:"field",children:[s.jsx("div",{className:"flabel",children:s.jsx("span",{children:"默认导出格式"})}),s.jsx("div",{className:"fctrl",children:s.jsxs("select",{value:l.exportFormat,onChange:a=>i({...l,exportFormat:a.target.value}),children:[s.jsx("option",{value:"both",children:"JSON + Markdown"}),s.jsx("option",{value:"json",children:"仅 JSON"}),s.jsx("option",{value:"md",children:"仅 Markdown"})]})})]}),s.jsxs("div",{className:"field",children:[s.jsxs("div",{className:"flabel",children:[s.jsx("span",{children:"默认导出目录"}),s.jsx("span",{className:"fkey",children:"留空 = ~/nx-sk/export"})]}),s.jsx("div",{className:"fctrl",children:s.jsx("input",{value:l.exportDir,onChange:a=>i({...l,exportDir:a.target.value})})})]}),s.jsxs("div",{className:"field",children:[s.jsxs("div",{className:"flabel",children:[s.jsx("span",{children:"默认栏目"}),s.jsx("span",{className:"fkey",children:"CLI 未指定 --section 时的首选"})]}),s.jsx("div",{className:"fctrl",children:s.jsx("input",{value:l.defaultSection,onChange:a=>i({...l,defaultSection:a.target.value})})})]}),s.jsxs("div",{className:"field",children:[s.jsxs("div",{className:"flabel",children:[s.jsx("span",{children:"导出默认带明文密钥"}),s.jsx("span",{className:"fkey",children:"默认开;要分享出去时关掉"})]}),s.jsx("div",{className:"fctrl",children:s.jsxs("label",{className:"inline",children:[s.jsx("input",{type:"checkbox",checked:!!l.includeSecretsInExport,onChange:a=>i({...l,includeSecretsInExport:a.target.checked})}),s.jsx("span",{className:l.includeSecretsInExport?"muted":"bad",children:l.includeSecretsInExport?"开(导出文件含真实凭据,注意别外发)":"关(凭据打码后再导出)"})]})})]})]}),s.jsx("div",{className:"rowgap",style:{marginTop:8},children:s.jsx("button",{className:"btn",onClick:E,children:"保存设置"})})]})]}),s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"colhead",children:["自动快照",s.jsx("span",{className:"right muted",children:((y=e==null?void 0:e.snapshots)==null?void 0:y.length)??0})]}),s.jsxs("div",{className:"colbody",children:[s.jsx("div",{className:"row",children:s.jsx("span",{className:"desc",children:"每次删除条目 / 栏目、修改设置前,都会在 ~/nx-sk/backup 留一份可回滚的整库快照。"})}),(S=e==null?void 0:e.snapshots)!=null&&S.length?e.snapshots.map(a=>s.jsxs("div",{className:"row",children:[s.jsx("span",{className:"mono name",children:a.name}),s.jsx("span",{className:"desc",children:a.at}),s.jsx("span",{className:"acts",children:s.jsxs("span",{className:"tag",children:[Math.ceil(a.bytes/1024)," KB"]})})]},a.name)):s.jsx(F,{children:"还没有快照。"})]})]}),e!=null&&e.migration?s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"colhead",children:"数据迁移"}),s.jsxs("div",{className:"colbody",children:[s.jsx("div",{className:"row",children:s.jsxs("span",{className:"desc",children:["store 已从 v",e.migration.from," 迁到 v",e.migration.to,":密钥栏目字段 ",e.migration.fieldsBefore," → ",e.migration.fieldsAfter,",",e.migration.entries," 条条目"]})}),s.jsxs("div",{className:"row",children:[s.jsx("span",{className:"desc",children:"迁移前的原始文件"}),s.jsx("span",{className:"acts",children:s.jsx(r,{className:"mono",text:e.migration.snapshotRaw||"",children:e.migration.snapshot})})]}),e.migration.legacyValuesKept?s.jsx("div",{className:"row",children:s.jsxs("span",{className:"desc",children:["另保留了 ",e.migration.legacyValuesKept," 个旧字段的值(不再显示,但没删)"]})}):null]})]}):null,e!=null&&e.corrupt?s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"colhead",children:"上次读取异常"}),s.jsx("div",{className:"colbody",children:s.jsx("div",{className:"row",children:s.jsxs("span",{className:"desc bad",children:["store.json 解析失败,已挪到 ",e.corrupt.to,"(原文件没有被覆盖)"]})})})]}):null,s.jsx(I,{module:"settings"})]})}function c({label:e,value:t,copy:n}){return s.jsxs("div",{className:"row",children:[s.jsx("span",{className:"name",children:e}),s.jsx("span",{className:"desc mono",children:t||"(空)"}),n?s.jsx("span",{className:"acts",children:s.jsx(r,{className:"mono",text:n,children:"复制"})}):s.jsx($,{children:" "})]})}export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as R,r as j,a as h,j as e,T as N,E as T,C as I,M as U}from"./index-DzD8wu27.js";const P=["text","textarea","number","date","month","bool","select","tags","secret","file"];function M(){const{reload:d,toast:n,guard:o,dialog:u}=R(),[t,b]=j.useState(null),[f,r]=j.useState([]),[x,i]=j.useState(null),[c,m]=j.useState(null),a=j.useCallback(async()=>{try{const[s,l]=await Promise.all([h("/api/sections"),h("/api/sections/templates")]);b(s),r(l.templates),i(null)}catch(s){i(s.message)}},[]);j.useEffect(()=>{a()},[a]);const p=o(async s=>{const l=await h(`/api/sections/${encodeURIComponent(s.id)}/dump`);m({kind:"dump",title:`${s.title}(${s.id})的全部信息`,body:e.jsx("pre",{className:"block",children:JSON.stringify(l,null,2)})})}),C=o(async s=>{const l=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({kind:"edit",id:s.id,form:{title:l.title,description:l.description,order:String(l.order),titleLabel:l.titleLabel,titleField:l.titleField||""},full:l})}),w=o(async s=>{const l={id:s.id.trim(),title:s.title.trim()||s.id.trim(),template:s.template||void 0,description:s.description,order:Number(s.order)||50};await h("/api/sections",{method:"POST",body:l}),n("栏目已创建"),m(null),await a(),await d()}),$=o(async s=>{const l={title:s.form.title,description:s.form.description,order:Number(s.form.order)||50,titleLabel:s.form.titleLabel,titleField:s.form.titleField};await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"PATCH",body:l}),n("栏目已更新");const v=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:v}),await a(),await d()}),S=o(async(s,l)=>{await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"PATCH",body:{"add-field":l}}),n(`已新增字段 ${l.key}`);const v=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:v}),await a()}),F=o(async s=>{var y,k;const l=await h(`/api/sections/${encodeURIComponent(s.id)}/sync`,{method:"POST"});if(l.upToDate){n("已是最新,模板里没有需要补的字段");return}const v=[(y=l.addedGroups)!=null&&y.length?`分组 ${l.addedGroups.join("、")}`:"",(k=l.addedFields)!=null&&k.length?`字段 ${l.addedFields.join("、")}`:""].filter(Boolean).join(";");n(`已按模板补齐:${v||"无变化"}`);const g=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:g}),await a(),await d()}),E=o(async(s,l)=>{if(!await u({message:`从字段字典里删掉「${l}」?已填的值会留在条目里(只是不再显示/校验)。`,danger:!0,confirmText:"删除字段"}))return;await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"PATCH",body:{"remove-field":l}}),n(`已删字段 ${l}`);const g=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:g}),await a()}),L=o(async s=>{await u({message:`删除栏目「${s.title}」,连带其中 ${s.entries} 条条目?删除前会自动留快照。`,danger:!0,confirmText:"连带删除"})&&(await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"DELETE",body:{force:!0}}),n("栏目已删除"),await a(),await d())});return x?e.jsxs("div",{className:"pad stack",children:[e.jsx("div",{className:"bad",children:e.jsx("strong",{children:"读不到栏目"})}),e.jsx("pre",{className:"block",children:x})]}):t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"toolbar rowgap pad",children:[e.jsx("strong",{children:"栏目"}),e.jsxs("span",{className:"muted",children:["共 ",t.count," 个 · 条目 ",t.totalEntries," 条"]}),e.jsx("span",{className:"grow"}),e.jsx("button",{className:"btn small ghost",onClick:a,children:"刷新"}),e.jsx("button",{className:"btn small",onClick:()=>{var s;return m({kind:"create",form:{id:"",title:"",template:((s=f[0])==null?void 0:s.id)||"",description:"",order:"50"}})},children:"新建栏目"})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"colhead",children:"全部栏目"}),e.jsx("div",{className:"colbody",children:t.sections.length?t.sections.map(s=>e.jsxs("div",{className:"row",children:[e.jsx("span",{className:"name",children:s.title}),e.jsx("span",{className:"mono muted",children:s.id}),s.template?e.jsx(N,{children:s.template}):e.jsx(N,{children:"自定义"}),e.jsx("span",{className:"desc",children:s.description}),e.jsxs("span",{className:"acts",children:[e.jsxs("span",{className:"tag",children:[s.fields," 字段"]}),e.jsxs("span",{className:"tag",children:[s.entries," 条目"]}),e.jsx("button",{className:"btn small ghost",onClick:()=>p(s),children:"全部信息"}),e.jsx("button",{className:"btn small ghost",onClick:()=>C(s),children:"编辑"}),e.jsx("button",{className:"btn small ghost",onClick:()=>L(s),children:"删除"})]})]},s.id)):e.jsx(T,{children:"还没有栏目。点「新建栏目」,用内置模板(求职 / 密钥)起步。"})})]}),e.jsx("div",{className:"pad hint",children:"栏目 = 一组同构条目 + 一份字段字典。字典是数据,所以这里加一个字段,CLI 与面板立刻就都能填它。"}),e.jsx(I,{module:"sections"}),c?e.jsxs(U,{title:z(c),onClose:()=>m(null),children:[c.kind==="dump"?c.body:null,c.kind==="create"?e.jsx(A,{templates:f,form:c.form,onChange:s=>m(l=>({...l,form:{...l.form,...s}})),onSubmit:()=>{if(!/^[a-z][a-z0-9_-]{0,63}$/.test(c.form.id.trim())){n("栏目 id 必须是小写字母开头,仅含 a-z 0-9 _ -","bad");return}w(c.form)}}):null,c.kind==="edit"?e.jsx(D,{modal:c,onChange:s=>m(l=>({...l,form:{...l.form,...s}})),onSave:()=>$(c),onSync:()=>F(c),onAddField:s=>S(c,s),onRemoveField:s=>E(c,s),onClose:()=>m(null)}):null]}):null]}):e.jsx("div",{className:"pad muted",children:"加载中…"})}function z(d){return d.kind==="dump"?d.title:d.kind==="create"?"新建栏目":`编辑栏目 ${d.id}`}function A({templates:d,form:n,onChange:o,onSubmit:u}){return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{className:"grid",children:[e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"栏目 id"}),e.jsx("span",{className:"fkey",children:"小写字母开头,仅 a-z 0-9 _ -"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:n.id,onChange:t=>o({id:t.target.value}),placeholder:"例如 projects"})})]}),e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"标题"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:n.title,onChange:t=>o({title:t.target.value}),placeholder:"例如 项目档案"})})]}),e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"从模板起步"})}),e.jsx("div",{className:"fctrl",children:e.jsxs("select",{value:n.template,onChange:t=>o({template:t.target.value}),children:[e.jsx("option",{value:"",children:"(空栏目,自定义字段)"}),d.map(t=>e.jsxs("option",{value:t.id,children:[t.label,"(",t.fields," 字段)"]},t.id))]})})]}),e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"排序"}),e.jsx("span",{className:"fkey",children:"越小越靠前"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{type:"number",value:n.order,onChange:t=>o({order:t.target.value})})})]})]}),e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"描述"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:n.description,onChange:t=>o({description:t.target.value})})})]}),e.jsxs("div",{className:"rowgap",children:[e.jsx("button",{className:"btn",onClick:u,children:"创建"}),e.jsx("span",{className:"hint",children:"同 id 已存在会直接报冲突,不会静默覆盖。"})]})]})}function D({modal:d,onChange:n,onSave:o,onSync:u,onAddField:t,onRemoveField:b,onClose:f}){var m;const[r,x]=j.useState({key:"",label:"",type:"text",group:""}),i=d.full,c=(i==null?void 0:i.groupList)||[];return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{className:"grid",children:[e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"标题"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:d.form.title,onChange:a=>n({title:a.target.value})})})]}),e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"排序"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{type:"number",value:d.form.order,onChange:a=>n({order:a.target.value})})})]}),e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"条目名字段"}),e.jsx("span",{className:"fkey",children:"列表里显示哪个字段"})]}),e.jsx("div",{className:"fctrl",children:e.jsxs("select",{value:d.form.titleField,onChange:a=>n({titleField:a.target.value}),children:[e.jsx("option",{value:"",children:"(用条目 title)"}),((i==null?void 0:i.fieldList)||[]).map(a=>e.jsxs("option",{value:a.key,children:[a.label,"(",a.key,")"]},a.key))]})})]}),e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"名称标签"}),e.jsx("span",{className:"fkey",children:"新建条目时问什么"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:d.form.titleLabel,onChange:a=>n({titleLabel:a.target.value})})})]})]}),e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"描述"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:d.form.description,onChange:a=>n({description:a.target.value})})})]}),e.jsxs("div",{className:"rowgap",children:[e.jsx("button",{className:"btn",onClick:o,children:"保存栏目属性"}),i!=null&&i.template?e.jsx("button",{className:"btn ghost",onClick:u,title:`按模板「${i.template}」补齐新增的分组与字段(只增不改不删)`,children:"同步模板字段"}):null,e.jsx("button",{className:"btn ghost",onClick:f,children:"关闭"})]}),i!=null&&i.template?e.jsxs("div",{className:"hint",children:["本栏目由模板「",i.template,"」创建。模板后来新增的字段**不会自动**出现在这里, 点「同步模板字段」补齐(例如求职模板新增的「附件资料」组 / 简历、头像等 file 字段)。"]}):null,e.jsxs("div",{className:"card",style:{border:"1px solid var(--soft-2)",borderRadius:4},children:[e.jsxs("div",{className:"colhead",children:["字段字典(",((m=i==null?void 0:i.fieldList)==null?void 0:m.length)||0,")"]}),e.jsxs("div",{className:"colbody",children:[c.map(a=>e.jsxs("div",{children:[e.jsxs("div",{className:"group-title",children:[a.title,"(",a.id,")"]}),(i.fieldList||[]).filter(p=>p.group===a.id).map(p=>e.jsxs("div",{className:"row",children:[e.jsx("span",{className:"name",children:p.label}),e.jsx("span",{className:"mono muted",children:p.key}),e.jsx(N,{children:p.type}),p.sensitive?e.jsx(N,{kind:"bad",children:"密文"}):null,e.jsx("span",{className:"desc",children:p.hint||""}),e.jsx("span",{className:"acts",children:e.jsx("button",{className:"btn small ghost",onClick:()=>b(p.key),children:"删除"})})]},p.key))]},a.id)),((i==null?void 0:i.fieldList)||[]).filter(a=>!c.some(p=>p.id===a.group)).map(a=>e.jsxs("div",{className:"row",children:[e.jsx("span",{className:"name",children:a.label}),e.jsx("span",{className:"mono muted",children:a.key}),e.jsx(N,{children:a.type}),e.jsxs("span",{className:"desc",children:["分组 ",a.group,"(不在 groups 列表里)"]}),e.jsx("span",{className:"acts",children:e.jsx("button",{className:"btn small ghost",onClick:()=>b(a.key),children:"删除"})})]},a.key))]})]}),e.jsxs("div",{className:"card",style:{border:"1px solid var(--soft-2)",borderRadius:4},children:[e.jsx("div",{className:"colhead",children:"新增字段"}),e.jsxs("div",{className:"pad rowgap",children:[e.jsx("input",{style:{width:150},placeholder:"key(英文字母开头)",value:r.key,onChange:a=>x({...r,key:a.target.value})}),e.jsx("input",{style:{width:150},placeholder:"标签(中文名)",value:r.label,onChange:a=>x({...r,label:a.target.value})}),e.jsx("select",{style:{width:110},value:r.type,onChange:a=>x({...r,type:a.target.value}),children:P.map(a=>e.jsx("option",{value:a,children:a},a))}),e.jsxs("select",{style:{width:150},value:r.group,onChange:a=>x({...r,group:a.target.value}),children:[e.jsx("option",{value:"",children:"(首个分组)"}),c.map(a=>e.jsx("option",{value:a.id,children:a.title},a.id))]}),e.jsx("button",{className:"btn small",onClick:()=>{const a={key:r.key.trim(),label:r.label.trim()||r.key.trim(),type:r.type};r.group&&(a.group=r.group),t(a),x({key:"",label:"",type:"text",group:r.group})},children:"加入字典"}),e.jsx("span",{className:"hint",children:"加完立刻生效:CLI 与面板都能填它。"})]})]})]})}export{M as default};
|
|
1
|
+
import{u as R,r as j,a as h,j as e,T as N,E as T,C as I,M as U}from"./index-DpX9p_OX.js";const P=["text","textarea","number","date","month","bool","select","tags","secret","file"];function M(){const{reload:d,toast:n,guard:o,dialog:u}=R(),[t,b]=j.useState(null),[f,r]=j.useState([]),[x,i]=j.useState(null),[c,m]=j.useState(null),a=j.useCallback(async()=>{try{const[s,l]=await Promise.all([h("/api/sections"),h("/api/sections/templates")]);b(s),r(l.templates),i(null)}catch(s){i(s.message)}},[]);j.useEffect(()=>{a()},[a]);const p=o(async s=>{const l=await h(`/api/sections/${encodeURIComponent(s.id)}/dump`);m({kind:"dump",title:`${s.title}(${s.id})的全部信息`,body:e.jsx("pre",{className:"block",children:JSON.stringify(l,null,2)})})}),C=o(async s=>{const l=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({kind:"edit",id:s.id,form:{title:l.title,description:l.description,order:String(l.order),titleLabel:l.titleLabel,titleField:l.titleField||""},full:l})}),w=o(async s=>{const l={id:s.id.trim(),title:s.title.trim()||s.id.trim(),template:s.template||void 0,description:s.description,order:Number(s.order)||50};await h("/api/sections",{method:"POST",body:l}),n("栏目已创建"),m(null),await a(),await d()}),$=o(async s=>{const l={title:s.form.title,description:s.form.description,order:Number(s.form.order)||50,titleLabel:s.form.titleLabel,titleField:s.form.titleField};await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"PATCH",body:l}),n("栏目已更新");const v=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:v}),await a(),await d()}),S=o(async(s,l)=>{await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"PATCH",body:{"add-field":l}}),n(`已新增字段 ${l.key}`);const v=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:v}),await a()}),F=o(async s=>{var y,k;const l=await h(`/api/sections/${encodeURIComponent(s.id)}/sync`,{method:"POST"});if(l.upToDate){n("已是最新,模板里没有需要补的字段");return}const v=[(y=l.addedGroups)!=null&&y.length?`分组 ${l.addedGroups.join("、")}`:"",(k=l.addedFields)!=null&&k.length?`字段 ${l.addedFields.join("、")}`:""].filter(Boolean).join(";");n(`已按模板补齐:${v||"无变化"}`);const g=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:g}),await a(),await d()}),E=o(async(s,l)=>{if(!await u({message:`从字段字典里删掉「${l}」?已填的值会留在条目里(只是不再显示/校验)。`,danger:!0,confirmText:"删除字段"}))return;await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"PATCH",body:{"remove-field":l}}),n(`已删字段 ${l}`);const g=await h(`/api/sections/${encodeURIComponent(s.id)}`);m({...s,full:g}),await a()}),L=o(async s=>{await u({message:`删除栏目「${s.title}」,连带其中 ${s.entries} 条条目?删除前会自动留快照。`,danger:!0,confirmText:"连带删除"})&&(await h(`/api/sections/${encodeURIComponent(s.id)}`,{method:"DELETE",body:{force:!0}}),n("栏目已删除"),await a(),await d())});return x?e.jsxs("div",{className:"pad stack",children:[e.jsx("div",{className:"bad",children:e.jsx("strong",{children:"读不到栏目"})}),e.jsx("pre",{className:"block",children:x})]}):t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"toolbar rowgap pad",children:[e.jsx("strong",{children:"栏目"}),e.jsxs("span",{className:"muted",children:["共 ",t.count," 个 · 条目 ",t.totalEntries," 条"]}),e.jsx("span",{className:"grow"}),e.jsx("button",{className:"btn small ghost",onClick:a,children:"刷新"}),e.jsx("button",{className:"btn small",onClick:()=>{var s;return m({kind:"create",form:{id:"",title:"",template:((s=f[0])==null?void 0:s.id)||"",description:"",order:"50"}})},children:"新建栏目"})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"colhead",children:"全部栏目"}),e.jsx("div",{className:"colbody",children:t.sections.length?t.sections.map(s=>e.jsxs("div",{className:"row",children:[e.jsx("span",{className:"name",children:s.title}),e.jsx("span",{className:"mono muted",children:s.id}),s.template?e.jsx(N,{children:s.template}):e.jsx(N,{children:"自定义"}),e.jsx("span",{className:"desc",children:s.description}),e.jsxs("span",{className:"acts",children:[e.jsxs("span",{className:"tag",children:[s.fields," 字段"]}),e.jsxs("span",{className:"tag",children:[s.entries," 条目"]}),e.jsx("button",{className:"btn small ghost",onClick:()=>p(s),children:"全部信息"}),e.jsx("button",{className:"btn small ghost",onClick:()=>C(s),children:"编辑"}),e.jsx("button",{className:"btn small ghost",onClick:()=>L(s),children:"删除"})]})]},s.id)):e.jsx(T,{children:"还没有栏目。点「新建栏目」,用内置模板(求职 / 密钥)起步。"})})]}),e.jsx("div",{className:"pad hint",children:"栏目 = 一组同构条目 + 一份字段字典。字典是数据,所以这里加一个字段,CLI 与面板立刻就都能填它。"}),e.jsx(I,{module:"sections"}),c?e.jsxs(U,{title:z(c),onClose:()=>m(null),children:[c.kind==="dump"?c.body:null,c.kind==="create"?e.jsx(A,{templates:f,form:c.form,onChange:s=>m(l=>({...l,form:{...l.form,...s}})),onSubmit:()=>{if(!/^[a-z][a-z0-9_-]{0,63}$/.test(c.form.id.trim())){n("栏目 id 必须是小写字母开头,仅含 a-z 0-9 _ -","bad");return}w(c.form)}}):null,c.kind==="edit"?e.jsx(D,{modal:c,onChange:s=>m(l=>({...l,form:{...l.form,...s}})),onSave:()=>$(c),onSync:()=>F(c),onAddField:s=>S(c,s),onRemoveField:s=>E(c,s),onClose:()=>m(null)}):null]}):null]}):e.jsx("div",{className:"pad muted",children:"加载中…"})}function z(d){return d.kind==="dump"?d.title:d.kind==="create"?"新建栏目":`编辑栏目 ${d.id}`}function A({templates:d,form:n,onChange:o,onSubmit:u}){return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{className:"grid",children:[e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"栏目 id"}),e.jsx("span",{className:"fkey",children:"小写字母开头,仅 a-z 0-9 _ -"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:n.id,onChange:t=>o({id:t.target.value}),placeholder:"例如 projects"})})]}),e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"标题"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:n.title,onChange:t=>o({title:t.target.value}),placeholder:"例如 项目档案"})})]}),e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"从模板起步"})}),e.jsx("div",{className:"fctrl",children:e.jsxs("select",{value:n.template,onChange:t=>o({template:t.target.value}),children:[e.jsx("option",{value:"",children:"(空栏目,自定义字段)"}),d.map(t=>e.jsxs("option",{value:t.id,children:[t.label,"(",t.fields," 字段)"]},t.id))]})})]}),e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"排序"}),e.jsx("span",{className:"fkey",children:"越小越靠前"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{type:"number",value:n.order,onChange:t=>o({order:t.target.value})})})]})]}),e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"描述"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:n.description,onChange:t=>o({description:t.target.value})})})]}),e.jsxs("div",{className:"rowgap",children:[e.jsx("button",{className:"btn",onClick:u,children:"创建"}),e.jsx("span",{className:"hint",children:"同 id 已存在会直接报冲突,不会静默覆盖。"})]})]})}function D({modal:d,onChange:n,onSave:o,onSync:u,onAddField:t,onRemoveField:b,onClose:f}){var m;const[r,x]=j.useState({key:"",label:"",type:"text",group:""}),i=d.full,c=(i==null?void 0:i.groupList)||[];return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{className:"grid",children:[e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"标题"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:d.form.title,onChange:a=>n({title:a.target.value})})})]}),e.jsxs("div",{className:"field",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"排序"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{type:"number",value:d.form.order,onChange:a=>n({order:a.target.value})})})]}),e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"条目名字段"}),e.jsx("span",{className:"fkey",children:"列表里显示哪个字段"})]}),e.jsx("div",{className:"fctrl",children:e.jsxs("select",{value:d.form.titleField,onChange:a=>n({titleField:a.target.value}),children:[e.jsx("option",{value:"",children:"(用条目 title)"}),((i==null?void 0:i.fieldList)||[]).map(a=>e.jsxs("option",{value:a.key,children:[a.label,"(",a.key,")"]},a.key))]})})]}),e.jsxs("div",{className:"field",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"名称标签"}),e.jsx("span",{className:"fkey",children:"新建条目时问什么"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:d.form.titleLabel,onChange:a=>n({titleLabel:a.target.value})})})]})]}),e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"描述"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:d.form.description,onChange:a=>n({description:a.target.value})})})]}),e.jsxs("div",{className:"rowgap",children:[e.jsx("button",{className:"btn",onClick:o,children:"保存栏目属性"}),i!=null&&i.template?e.jsx("button",{className:"btn ghost",onClick:u,title:`按模板「${i.template}」补齐新增的分组与字段(只增不改不删)`,children:"同步模板字段"}):null,e.jsx("button",{className:"btn ghost",onClick:f,children:"关闭"})]}),i!=null&&i.template?e.jsxs("div",{className:"hint",children:["本栏目由模板「",i.template,"」创建。模板后来新增的字段**不会自动**出现在这里, 点「同步模板字段」补齐(例如求职模板新增的「附件资料」组 / 简历、头像等 file 字段)。"]}):null,e.jsxs("div",{className:"card",style:{border:"1px solid var(--soft-2)",borderRadius:4},children:[e.jsxs("div",{className:"colhead",children:["字段字典(",((m=i==null?void 0:i.fieldList)==null?void 0:m.length)||0,")"]}),e.jsxs("div",{className:"colbody",children:[c.map(a=>e.jsxs("div",{children:[e.jsxs("div",{className:"group-title",children:[a.title,"(",a.id,")"]}),(i.fieldList||[]).filter(p=>p.group===a.id).map(p=>e.jsxs("div",{className:"row",children:[e.jsx("span",{className:"name",children:p.label}),e.jsx("span",{className:"mono muted",children:p.key}),e.jsx(N,{children:p.type}),p.sensitive?e.jsx(N,{kind:"bad",children:"密文"}):null,e.jsx("span",{className:"desc",children:p.hint||""}),e.jsx("span",{className:"acts",children:e.jsx("button",{className:"btn small ghost",onClick:()=>b(p.key),children:"删除"})})]},p.key))]},a.id)),((i==null?void 0:i.fieldList)||[]).filter(a=>!c.some(p=>p.id===a.group)).map(a=>e.jsxs("div",{className:"row",children:[e.jsx("span",{className:"name",children:a.label}),e.jsx("span",{className:"mono muted",children:a.key}),e.jsx(N,{children:a.type}),e.jsxs("span",{className:"desc",children:["分组 ",a.group,"(不在 groups 列表里)"]}),e.jsx("span",{className:"acts",children:e.jsx("button",{className:"btn small ghost",onClick:()=>b(a.key),children:"删除"})})]},a.key))]})]}),e.jsxs("div",{className:"card",style:{border:"1px solid var(--soft-2)",borderRadius:4},children:[e.jsx("div",{className:"colhead",children:"新增字段"}),e.jsxs("div",{className:"pad rowgap",children:[e.jsx("input",{style:{width:150},placeholder:"key(英文字母开头)",value:r.key,onChange:a=>x({...r,key:a.target.value})}),e.jsx("input",{style:{width:150},placeholder:"标签(中文名)",value:r.label,onChange:a=>x({...r,label:a.target.value})}),e.jsx("select",{style:{width:110},value:r.type,onChange:a=>x({...r,type:a.target.value}),children:P.map(a=>e.jsx("option",{value:a,children:a},a))}),e.jsxs("select",{style:{width:150},value:r.group,onChange:a=>x({...r,group:a.target.value}),children:[e.jsx("option",{value:"",children:"(首个分组)"}),c.map(a=>e.jsx("option",{value:a.id,children:a.title},a.id))]}),e.jsx("button",{className:"btn small",onClick:()=>{const a={key:r.key.trim(),label:r.label.trim()||r.key.trim(),type:r.type};r.group&&(a.group=r.group),t(a),x({key:"",label:"",type:"text",group:r.group})},children:"加入字典"}),e.jsx("span",{className:"hint",children:"加完立刻生效:CLI 与面板都能填它。"})]})]})]})}export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as q,r,a as p,j as e,b as w,T as A,E as H,C as _,M as z}from"./index-
|
|
1
|
+
import{u as q,r,a as p,j as e,b as w,T as A,E as H,C as _,M as z}from"./index-DpX9p_OX.js";import{f as K,r as f}from"./files-DMIKmyJN.js";function S(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(2)} MB`}const Q=t=>`${t.sectionTitle} / ${t.entryTitle||"(无名)"} / ${t.fieldLabel}`;function X(){const{toast:t,guard:l,dialog:m,reload:n}=q(),[i,k]=r.useState(null),[C,$]=r.useState(null),[u,N]=r.useState(""),[g,E]=r.useState(""),[D,v]=r.useState(!1),[d,h]=r.useState(null),T=r.useRef(null),x=r.useRef(0),o=r.useCallback(async()=>{try{const a=new URLSearchParams;u&&a.set("section",u),g&&a.set("q",g);const s=a.toString(),c=await p(`/api/files${s?`?${s}`:""}`);k(c),$(null)}catch(a){$(a.message),k(null)}},[u,g]);r.useEffect(()=>{o()},[o]);const b=r.useCallback(async a=>{const s=Array.from(a||[]);if(!s.length)return;let c=0;for(const j of s)try{const y=await K(j);await p("/api/files",{method:"POST",body:{content:y,name:j.name}}),c+=1}catch(y){t(`${j.name} 上传失败:${y.message}`,"bad")}c&&t(`已导入 ${c} 个附件(到栏目条目里选它即可链接)`),await f(),await o(),await n()},[o,n,t]),P=r.useCallback(a=>{a.preventDefault(),x.current=0,v(!1),b(a.dataTransfer.files)},[b]),I=l(async()=>{h({kind:"path",form:{path:"",copy:!1}})}),R=l(async a=>{if(!a.path.trim()){t("请填本机文件的绝对路径","bad");return}const s=await p("/api/files",{method:"POST",body:{path:a.path.trim(),copy:a.copy}});h(null),t(s.duplicated?"库中已有相同文件":s.moved?"已移动进附件库(可还原)":"已复制进附件库"),await f(),await o(),await n()}),B=l(async a=>{h({kind:"edit",id:a.id,form:{name:a.name,tags:a.tags.join("、"),note:a.note}})}),F=l(async(a,s)=>{await p(`/api/files/${encodeURIComponent(a)}`,{method:"PATCH",body:{name:s.name,tags:s.tags.split(/[,,、;;]+/).map(c=>c.trim()).filter(Boolean),note:s.note}}),h(null),t("附件已更新"),await f(),await o()}),U=l(async a=>{const s=await m({message:`把「${a.name}」还原到哪?`,detail:a.sourceDisplay?`默认移回原始位置并撤销台账:${a.sourceDisplay}`:"该附件没有原始位置记录,请在下一步填写目标目录。",input:a.sourceDisplay?void 0:{placeholder:"目标目录绝对路径,例如 D:\\资料"},confirmText:"移回并撤销台账",cancelText:"取消"});if(s===null)return;const c={};s&&typeof s=="string"&&(c.to=s.trim());const j=await p(`/api/files/${encodeURIComponent(a.id)}/restore`,{method:"POST",body:c});t(`已还原到 ${j.displayPath}`),await f(),await o(),await n()}),O=l(async a=>{const s=await m({message:`导出「${a.name}」的副本到哪个目录?库中原件保留。`,input:{placeholder:"目标目录绝对路径,例如 D:\\资料"},confirmText:"导出副本"});if(!s)return;const c=await p(`/api/files/${encodeURIComponent(a.id)}/restore`,{method:"POST",body:{to:String(s).trim(),copy:!0}});t(`已导出到 ${c.displayPath}`)}),L=l(async a=>{await m({message:`删除附件「${a.name}」?物理原件会一起删除,删除前自动留台账快照。`,detail:"想保留原件、只撤销台账,请改用「还原」。",danger:!0,confirmText:"删除"})&&(await p(`/api/files/${encodeURIComponent(a.id)}`,{method:"DELETE"}),t("已删除"),await f(),await o(),await n())});if(C)return e.jsxs("div",{className:"pad stack",children:[e.jsx("div",{className:"bad",children:e.jsx("strong",{children:"附件库读不到"})}),e.jsx("pre",{className:"block",children:C})]});if(!i)return e.jsx("div",{className:"pad muted",children:"加载中…"});const M=i.sections||[];return e.jsxs("div",{className:`files-page ${D?"drag-over":""}`,onDragEnter:a=>{a.preventDefault(),x.current+=1,v(!0)},onDragOver:a=>a.preventDefault(),onDragLeave:a=>{a.preventDefault(),x.current-=1,x.current<=0&&(x.current=0,v(!1))},onDrop:P,children:[e.jsxs("div",{className:"toolbar rowgap pad",children:[e.jsx("strong",{children:"附件"}),e.jsxs("span",{className:"muted",children:[i.total," 个 · ",S(i.totalBytes)]}),e.jsxs("span",{className:"hint",title:"被栏目条目的 file 字段引用的附件数",children:["被引用 ",i.total-i.unlinked,"/",i.total]}),e.jsx(w,{className:"hint",text:i.rootRaw,title:"点击复制附件库目录",children:i.root}),e.jsx("span",{className:"grow"}),e.jsx("input",{style:{width:180},placeholder:"搜索名称 / 备注 / 标签 / 引用它的条目",value:g,onChange:a=>E(a.target.value)}),e.jsx("button",{className:"btn small ghost",onClick:o,children:"刷新"}),e.jsx("button",{className:"btn small ghost",onClick:I,children:"本机路径导入"}),e.jsx("button",{className:"btn small",onClick:()=>{var a;return(a=T.current)==null?void 0:a.click()},children:"上传文件"}),e.jsx("input",{ref:T,type:"file",multiple:!0,style:{display:"none"},onChange:a=>{b(a.target.files),a.target.value=""}})]}),e.jsxs("div",{className:"rowgap pad file-filters",children:[e.jsxs("button",{className:`tab small ${u?"":"active"}`,onClick:()=>N(""),children:["全部",e.jsx("span",{className:"count",children:i.total})]}),M.map(a=>e.jsxs("button",{className:`tab small ${u===a.id?"active":""}`,onClick:()=>N(a.id),title:`被「${a.title}」栏目引用的附件`,children:[a.title,e.jsx("span",{className:"count",children:a.count})]},a.id)),e.jsxs("button",{className:`tab small ${u==="none"?"active":""}`,onClick:()=>N("none"),children:["未引用",e.jsx("span",{className:"count",children:i.unlinked})]})]}),D?e.jsx("div",{className:"drop-hint",children:"松开鼠标,文件直接导入附件库"}):null,i.files.length?e.jsx("div",{className:"file-grid pad",children:i.files.map(a=>{var s;return e.jsxs("div",{className:"file-card",children:[e.jsx("a",{className:"file-thumb",href:a.url,target:"_blank",rel:"noreferrer",title:"在浏览器中预览",children:a.isImage?e.jsx("img",{src:a.url,alt:a.name,loading:"lazy"}):e.jsx("span",{className:"ext-badge",children:a.ext?a.ext.slice(1).toUpperCase():"FILE"})}),e.jsxs("div",{className:"file-meta",children:[e.jsx("a",{className:"file-name",href:a.url,target:"_blank",rel:"noreferrer",title:a.name,children:a.name}),e.jsxs("div",{className:"rowgap",style:{gap:4},children:[e.jsx("span",{className:"hint",children:S(a.bytes)}),a.mode==="move"?e.jsx(A,{children:"移动导入"}):null]}),(s=a.usedBy)!=null&&s.length?e.jsxs("div",{className:"hint",title:"条目的 file 字段引用了本附件",children:["被引用:",a.usedBy.map(Q).join("、")]}):e.jsx("div",{className:"hint",children:"未被任何条目引用(到栏目条目里选它即可链接)"})]}),e.jsxs("div",{className:"file-acts",children:[e.jsx("a",{className:"btn small ghost",href:a.downloadUrl,children:"下载"}),e.jsx("button",{className:"btn small ghost",onClick:()=>O(a),children:"导出副本"}),e.jsx("button",{className:"btn small ghost",onClick:()=>U(a),children:"还原"}),e.jsx("button",{className:"btn small ghost",onClick:()=>B(a),children:"编辑"}),e.jsx("button",{className:"btn small ghost danger-ghost",onClick:()=>L(a),children:"删除"}),e.jsx("span",{className:"grow"}),e.jsx(w,{className:"hint",text:a.path,title:"点击复制物理路径",children:"路径"}),e.jsx(w,{className:"hint",text:a.url,title:"点击复制链接",children:"链接"})]})]},a.id)})}):e.jsxs("div",{className:"pad",children:[e.jsx(H,{children:"还没有附件。把文件拖到这里、点「上传文件」,或用「本机路径导入」把原件移动进库;随后到栏目的条目里选它。"}),e.jsx("div",{className:"hint pad",children:'CLI:nx-sk file add --path "D:\\简历\\张三-简历.pdf"(默认移动;--copy 仅复制)'})]}),e.jsx(_,{module:"files"}),d?e.jsx(z,{title:d.kind==="edit"?"编辑附件":"从本机路径导入",onClose:()=>h(null),children:d.kind==="path"?e.jsx(V,{form:d.form,onChange:a=>h(s=>({...s,form:{...s.form,...a}})),onSubmit:()=>R(d.form)}):e.jsx(G,{form:d.form,onChange:a=>h(s=>({...s,form:{...s.form,...a}})),onSubmit:()=>F(d.id,d.form)})}):null]})}function V({form:t,onChange:l,onSubmit:m}){return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"本机文件的绝对路径"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:t.path,placeholder:"例如 D:\\简历\\张三-简历.pdf",onChange:n=>l({path:n.target.value})})})]}),e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"导入方式"})}),e.jsx("div",{className:"fctrl",children:e.jsxs("label",{className:"inline",children:[e.jsx("input",{type:"checkbox",checked:t.copy,onChange:n=>l({copy:n.target.checked})}),e.jsx("span",{className:"hint",children:"仅复制、保留原件(默认把原件移动进库,可用「还原」撤销)"})]})})]}),e.jsx("div",{className:"rowgap",children:e.jsx("button",{className:"btn",onClick:m,children:"导入"})})]})}function G({form:t,onChange:l,onSubmit:m}){return e.jsxs("div",{className:"stack",children:[e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"文件名"})}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:t.name,onChange:n=>l({name:n.target.value})})})]}),e.jsxs("div",{className:"field wide",children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:"标签"}),e.jsx("span",{className:"fkey",children:"多个用「、」分隔"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:t.tags,onChange:n=>l({tags:n.target.value})})})]}),e.jsxs("div",{className:"field wide",children:[e.jsx("div",{className:"flabel",children:e.jsx("span",{children:"备注"})}),e.jsx("div",{className:"fctrl",children:e.jsx("textarea",{rows:2,value:t.note,onChange:n=>l({note:n.target.value})})})]}),e.jsxs("div",{className:"rowgap",children:[e.jsx("button",{className:"btn",onClick:m,children:"保存"}),e.jsx("span",{className:"hint",children:"改文件名时,物理原件会随之移动。要链接到条目,请在栏目条目的 file 字段里选本附件。"})]})]})}export{X as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{j as e,u as _,r as h,a as w,b as H,E as L,C as q,T as B,M as z}from"./index-DpX9p_OX.js";import{l as V,f as Y,r as G}from"./files-DMIKmyJN.js";function Q({value:c,onChange:g,minRows:m=2,placeholder:x,disabled:l,maxLength:d}){const v=h.useRef(null);return h.useLayoutEffect(()=>{const s=v.current;s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)},[c]),e.jsx("textarea",{ref:v,value:String(c??""),onChange:s=>g(s.target.value),rows:m,placeholder:x,disabled:l,maxLength:d,style:{resize:"none",overflow:"hidden",width:"100%"}})}function W(c){const g=c==null?[]:Array.isArray(c)?c:[c],m=[];for(const x of g){const l=String(x??"").trim();l&&!m.includes(l)&&m.push(l)}return m}function J({def:c,value:g,onChange:m}){const{toast:x,guard:l,patchUi:d}=_(),[v,s]=h.useState(null),[p,j]=h.useState(!1),S=h.useRef(null),C=h.useRef(0),f=W(g),r=Number(c.maxItems)||0,b=r>0&&f.length>=r,N=h.useCallback(async()=>{try{s(await V())}catch{}},[]);h.useEffect(()=>{N()},[N]);const I=(v==null?void 0:v.files)||[],T=i=>I.find(o=>o.id===i)||null,E=I.filter(i=>!f.includes(i.id)),D=l(async i=>{const o=[...i||[]];if(!o.length)return;if(b){x(`「${c.label}」最多 ${r} 个附件,先移除一个`,"bad");return}const U=[...f];let A=0;for(const F of o){const K=await Y(F),R=await w("/api/files",{method:"POST",body:{content:K,name:F.name}});if(U.includes(R.id)){A+=1;continue}U.push(R.id)}m(U);const O=o.length-A;x(A?`已上传并关联 ${O} 个;${A} 个库里已有,直接引用`:`已上传并关联 ${o.length} 个`),s(await G())}),a=i=>{i&&!f.includes(i)&&m([...f,i])},t=i=>m(f.filter(o=>o!==i)),y=l(async i=>{var o;C.current=0,j(!1),await D((o=i.dataTransfer)==null?void 0:o.files)});return e.jsxs("div",{className:`file-picker ${p?"drag":""}`,onDragEnter:i=>{i.preventDefault(),C.current+=1,j(!0)},onDragOver:i=>i.preventDefault(),onDragLeave:()=>{C.current-=1,C.current<=0&&(C.current=0,j(!1))},onDrop:y,children:[f.map(i=>{const o=T(i);return o?e.jsxs("div",{className:"file-preview",children:[o.isImage?e.jsx("img",{src:o.url,alt:o.name}):e.jsx("span",{className:"ext-badge",style:{fontSize:13,width:40,textAlign:"center"},children:o.ext?o.ext.slice(1).toUpperCase():"FILE"}),e.jsx("a",{className:"file-preview-name grow",href:o.url,target:"_blank",rel:"noreferrer",title:o.displayPath,children:o.name}),e.jsx("a",{className:"btn small ghost",href:o.downloadUrl,children:"下载"}),e.jsx(H,{className:"hint",text:o.path,title:"点击复制物理路径",children:"路径"}),e.jsx("button",{type:"button",className:"btn small ghost",onClick:()=>t(i),children:"移除"})]},i):e.jsxs("div",{className:"file-preview",children:[e.jsxs("span",{className:"hint bad grow",children:["引用的附件已不存在(",i,")—— 重新上传,或移除。"]}),e.jsx("button",{type:"button",className:"btn small ghost",onClick:()=>t(i),children:"移除"})]},i)}),f.length?null:e.jsx("span",{className:"hint",children:"还没有附件。"}),e.jsxs("div",{className:"file-pick-row",children:[e.jsxs("select",{value:"",disabled:b||!E.length,onChange:i=>a(i.target.value),children:[e.jsx("option",{value:"",children:E.length?"(从附件库选一个,选中即追加)":"(库里没有可再选的附件)"}),E.map(i=>e.jsx("option",{value:i.id,children:i.name},i.id))]}),e.jsx("button",{type:"button",className:"btn small",disabled:b,onClick:()=>{var i;return(i=S.current)==null?void 0:i.click()},children:"上传文件"}),e.jsx("button",{type:"button",className:"btn small ghost",onClick:()=>d({view:"files"}),children:"附件中心"}),e.jsx("input",{ref:S,type:"file",multiple:!0,style:{display:"none"},onChange:i=>{D(i.target.files),i.target.value=""}})]}),b?e.jsxs("span",{className:"hint",children:["已达上限(",r," 个):先移除一个,或把字段的 maxItems 调大。"]}):null,c.hint?e.jsx("span",{className:"hint",children:c.hint}):null]})}function X({def:c,value:g,onChange:m,disabled:x}){const l=c.type||"text",d=g??"";if(l==="file")return e.jsx(J,{def:c,value:d,onChange:m});if(l==="bool"){const s=d===!0||d==="true"||d==="是";return e.jsxs("label",{className:"inline",children:[e.jsx("input",{type:"checkbox",checked:s,onChange:p=>m(p.target.checked)}),e.jsx("span",{className:"muted",children:s?"是":"否"})]})}if(l==="select"){const s=c.options||[],p=d!==""&&!s.includes(d);return e.jsxs("select",{value:p?"__custom":String(d),onChange:j=>m(j.target.value==="__custom"?"":j.target.value),children:[e.jsx("option",{value:"",children:"(未填写)"}),s.map(j=>e.jsx("option",{value:j,children:j},j)),p?e.jsxs("option",{value:"__custom",children:[String(d),"(当前值,不在候选里)"]}):null]})}if(l==="textarea")return e.jsx(Q,{value:d,onChange:m});if(l==="tags"){const s=Array.isArray(d)?d.join("、"):String(d);return e.jsx("input",{value:s,placeholder:c.maxItems?`多个用「、」分隔,最多 ${c.maxItems} 个`:"多个用「、」分隔",onChange:p=>m(p.target.value.split(/[,,、;;]+/).map(j=>j.trim()).filter(Boolean))})}const v=l==="number"?"number":l==="date"?"date":l==="month"?"month":"text";return l==="secret"?e.jsx("input",{type:"text",value:String(d),placeholder:"密文落盘;原样保留占位则视为不修改",disabled:x,onChange:s=>m(s.target.value)}):e.jsx("input",{type:v,value:String(d),onChange:s=>m(s.target.value)})}function Z({title:c,fields:g,draft:m,onPatch:x}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"group-title",children:c}),e.jsx("div",{className:"pad",children:e.jsx("div",{className:"grid",children:g.map(l=>e.jsxs("div",{className:`field ${l.type==="textarea"||l.type==="file"?"wide":""}`,children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:l.label}),l.sensitive?e.jsx("span",{className:"tag bad",children:"密文"}):null,l.fill&&l.fill!=="normal"?e.jsx("span",{className:"tag",children:l.fillLabel||l.fill}):null,e.jsx("span",{className:"fkey",children:l.key})]}),e.jsx("div",{className:"fctrl",children:e.jsx(X,{def:l,value:m[l.key],onChange:d=>x(l.key,d)})})]},l.key))})})]})}function ee({sectionId:c,sectionTitle:g}){const{ui:m,patchUi:x,toast:l,guard:d,dialog:v,reload:s}=_(),[p,j]=h.useState(null),[S,C]=h.useState({}),[f,r]=h.useState({name:"",value:""}),b=!!m.mask,N=h.useCallback(async()=>{try{const a=`section=${encodeURIComponent(c)}${b?"&mask=1":""}`,t=await w(`/api/keys?${a}`);j(t);const y={};for(const i of t.keys)y[i.name]=i.value??"";C(y)}catch(a){l(a.message,"bad"),j(null)}},[c,b,l]);h.useEffect(()=>{N()},[N]);const I=d(async a=>{const t=S[a.name];(a.value??"")!==t&&(await w(`/api/keys/${encodeURIComponent(a.name)}`,{method:"PUT",body:{value:t,section:c}}),l(`已保存 ${a.name}`),await N())}),T=d(async(a,t)=>{const y=String(t||"").trim();if(!(!y||y===a.name)){if(p.keys.some(i=>i.name===y)){l(`已经有叫「${y}」的键了`,"bad"),await N();return}await w(`/api/entries/${encodeURIComponent(a.id)}`,{method:"PATCH",body:{title:y}}),C(i=>{const o={};for(const[U,A]of Object.entries(i))o[U===a.name?y:U]=A;return o}),l(`已重命名为 ${y}`),await N(),await s()}}),E=d(async()=>{const a=f.name.trim();if(!a){l("先填键名,例如 OPENAI_KEY","bad");return}if(p.keys.some(t=>t.name===a)){l(`已经有叫「${a}」的键了——直接在上面那行改值即可`,"bad");return}await w(`/api/keys/${encodeURIComponent(a)}`,{method:"PUT",body:{value:f.value,section:c}}),r({name:"",value:""}),l(`已新增 ${a}`),await N(),await s()}),D=d(async a=>{await v({message:`删除「${a.name}」?删除前会自动留一份整库快照在 ~/nx-sk/backup。`,danger:!0,confirmText:"删除"})&&(await w(`/api/keys/${encodeURIComponent(a.name)}`,{method:"DELETE",body:{section:c}}),l(`已删除 ${a.name}`),await N(),await s())});return p?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"toolbar rowgap pad",children:[e.jsx("strong",{children:g}),e.jsxs("span",{className:"muted",children:[p.count," 个键 · 名称 → 值"]}),e.jsx("span",{className:"grow"}),e.jsxs("label",{className:"inline hint",children:[e.jsx("input",{type:"checkbox",checked:b,onChange:()=>x({mask:!b})}),"打码显示(投屏/截图时用)"]}),e.jsx("button",{className:"btn small ghost",onClick:N,children:"刷新"})]}),e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"colhead",children:[e.jsx("span",{style:{width:200},children:"名称"}),e.jsx("span",{className:"grow",children:"值"})]}),e.jsxs("div",{className:"colbody",children:[p.keys.length?p.keys.map(a=>e.jsxs("div",{className:"row",children:[e.jsx("input",{className:"mono",style:{width:200},defaultValue:a.name,title:"改完按回车或点开别处即重命名",onBlur:t=>T(a,t.target.value),onKeyDown:t=>{t.key==="Enter"&&t.currentTarget.blur()}}),e.jsx("input",{className:"mono grow",value:S[a.name]??"",onChange:t=>C(y=>({...y,[a.name]:t.target.value})),onBlur:()=>I(a),onKeyDown:t=>{t.key==="Enter"&&t.currentTarget.blur()}}),e.jsxs("span",{className:"acts",children:[e.jsx(H,{className:"tag",text:S[a.name]??"",title:"点击复制值",children:"复制"}),e.jsx("button",{className:"btn small ghost",onClick:()=>D(a),children:"删除"})]})]},a.id)):e.jsx(L,{children:"还没有密钥。在下面一行填「名称 / 值」按添加,或 CLI:nx-sk key set OPENAI_KEY sk-xxx"}),e.jsxs("div",{className:"row",children:[e.jsx("input",{className:"mono",style:{width:200},placeholder:"新键名,例如 OPENAI_KEY",value:f.name,onChange:a=>r(t=>({...t,name:a.target.value})),onKeyDown:a=>{a.key==="Enter"&&E()}}),e.jsx("input",{className:"mono grow",placeholder:"值(留空也行,之后再填)",value:f.value,onChange:a=>r(t=>({...t,value:a.target.value})),onKeyDown:a=>{a.key==="Enter"&&E()}}),e.jsx("span",{className:"acts",children:e.jsx("button",{className:"btn small",onClick:E,children:"添加"})})]})]})]}),e.jsx("div",{className:"pad hint",children:"改值:直接在「值」列改完按回车(或点开别处)即保存。改键名同理。 值以密文落盘,这里显示的是原文;要打码勾上方那个框。删除前自动整库快照。"}),e.jsx(q,{module:"entries"})]}):e.jsx("div",{className:"pad muted",children:"加载中…"})}const M=c=>c==null?"":Array.isArray(c)?c.join("、"):String(c);function ne({sectionId:c}){var R;const{ui:g,patchUi:m,toast:x,guard:l,dialog:d,reload:v}=_(),[s,p]=h.useState(null),[j,S]=h.useState(null),[C,f]=h.useState(!1),[r,b]=h.useState(null),[N,I]=h.useState(null),[T,E]=h.useState(""),D=!!g.mask,a=h.useCallback(async n=>{f(!0),S(null);try{const u=await w(`/api/sections/${encodeURIComponent(c)}/dump${D?"?mask=1":""}`);p(u);const $=n||g.entry,k=u.entries.find(P=>P.id===$)||u.entries[0]||null;b(k?{id:k.id,title:k.title,values:{...k.values}}:null),k&&k.id!==g.entry&&m({entry:k.id})}catch(u){S(u.message),p(null),b(null)}finally{f(!1)}},[c,D]);h.useEffect(()=>{a()},[a]);const t=h.useMemo(()=>(s==null?void 0:s.entries.find(n=>n.id===(r==null?void 0:r.id)))||null,[s,r]),y=h.useMemo(()=>s?s.groups.map(n=>({...n,fields:s.fields.filter(u=>u.group===n.id)})).filter(n=>n.fields.length):[],[s]),i=(n,u)=>b($=>$&&{...$,values:{...$.values,[n]:u}}),o=h.useMemo(()=>{if(!r||!t)return{set:{},titleChanged:!1,count:0};const n={};for(const u of s.fields)M(t.values[u.key])!==M(r.values[u.key])&&(n[u.key]=r.values[u.key]);return{set:n,titleChanged:r.title!==t.title,count:Object.keys(n).length+(r.title!==t.title?1:0)}},[r,t,s]),U=l(async()=>{if(!r||!t)return;if(!o.count){x("没有改动");return}const n={set:o.set};o.titleChanged&&(n.title=r.title),await w(`/api/entries/${encodeURIComponent(r.id)}`,{method:"PATCH",body:n}),x(`已保存 ${o.count} 处改动`),await a(r.id),await v()}),A=l(async()=>{var P;if(!r){x("先新建一条条目","bad");return}const n=T.indexOf("=");if(n<=0){x("用 字段=值 的格式,例如 微信=zhangsan","bad");return}const u=T.slice(0,n).trim(),$=T.slice(n+1),k=await w(`/api/entries/${encodeURIComponent(r.id)}`,{method:"PATCH",body:{set:{[u]:$}}});E(""),x(`已写入 ${u}${(P=k.newFields)!=null&&P.length?"(新字段已登记)":""}`),await a(r.id),await v()}),O=l(async()=>{const n=(s==null?void 0:s.section.titleLabel)||"名称",u=await d({message:`新建「${s==null?void 0:s.section.title}」条目,${n}是?`,input:{placeholder:`例如 ${(s==null?void 0:s.section.titleField)||"名称"}`}});if(!u)return;const $={section:c,title:u};s!=null&&s.section.titleField&&($.set={[s.section.titleField]:u});const k=await w("/api/entries",{method:"POST",body:$});x(`已新建:${k.title}`),await a(k.id),await v()}),F=l(async()=>{!t||!await d({message:`删除条目「${t.title}」?删除前会自动留一份快照在 ~/nx-sk/backup。`,danger:!0,confirmText:"删除"})||(await w(`/api/entries/${encodeURIComponent(t.id)}`,{method:"DELETE"}),x("已删除"),await a(""),await v())}),K=l(async()=>{const n=await w("/api/export",{method:"POST",body:{section:c,format:"both"}});I({title:"导出结果",body:e.jsx("pre",{className:"block",children:`目录: ${n.dir}
|
|
2
|
+
格式: ${n.format}
|
|
3
|
+
条目: ${n.entries}
|
|
4
|
+
凭据: ${n.withSecrets?"含明文":"已打码"}
|
|
5
|
+
|
|
6
|
+
${n.files.map(u=>`${u.path} ${u.bytes} 字节`).join(`
|
|
7
|
+
`)}`})})});return j?e.jsxs("div",{className:"pad stack",children:[e.jsx("div",{className:"bad",children:e.jsx("strong",{children:"栏目读不到"})}),e.jsx("pre",{className:"block",children:j}),e.jsx("div",{className:"hint",children:"如果这个栏目刚被删掉,切到「栏目」tab 看看现有栏目。"})]}):s?s.section.kv?e.jsx(ee,{sectionId:c,sectionTitle:s.section.title}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"toolbar rowgap pad",children:[e.jsx("strong",{children:s.section.title}),e.jsx(B,{children:s.section.id}),e.jsxs("span",{className:"muted",children:[s.count," 条 / ",s.section.fields," 字段"]}),s.section.description?e.jsx("span",{className:"desc muted nowrap grow",children:s.section.description}):e.jsx("span",{className:"grow"}),e.jsxs("label",{className:"inline hint",children:[e.jsx("input",{type:"checkbox",checked:D,onChange:()=>m({mask:!D})}),"打码显示(投屏/截图时用)"]}),e.jsx("button",{className:"btn small ghost",onClick:()=>a(),children:"刷新"}),e.jsx("button",{className:"btn small ghost",onClick:K,children:"导出本栏目"}),e.jsx("button",{className:"btn small",onClick:O,children:"新建条目"})]}),e.jsxs("div",{className:"cols",children:[e.jsx("div",{className:"col",style:{flex:"0 0 300px"},children:e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"colhead",children:["条目列表",e.jsx("span",{className:"right muted",children:s.count})]}),e.jsx("div",{className:"colbody",children:s.entries.length?s.entries.map(n=>e.jsxs("div",{className:`row selectable ${n.id===(r==null?void 0:r.id)?"selected":""}`,onClick:()=>{m({entry:n.id}),b({id:n.id,title:n.title,values:{...n.values}})},children:[e.jsx("span",{className:"name",children:n.title||"(无名)"}),e.jsx("span",{className:"acts",children:n.missing.length?e.jsxs("span",{className:"tag",children:[n.completeness.ratio,"%"]}):e.jsx("span",{className:"tag strong",children:"已填满"})})]},n.id)):e.jsxs(L,{children:["还没有条目。点右上角「新建条目」,或用 CLI:nx-sk entry add --section ",s.section.id," --set ..."]})})]})}),e.jsx("div",{className:"col",children:r?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"colhead",children:[e.jsx("span",{className:"grow nowrap",children:(t==null?void 0:t.title)||r.title}),e.jsx("span",{className:"muted mono",children:r.id}),t?e.jsxs(B,{kind:t.missing.length?"":"strong",children:["完整度 ",t.completeness.ratio,"%"]}):null]}),e.jsxs("div",{className:"field wide pad",style:{borderBottom:"1px solid var(--soft-2)"},children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:s.section.titleLabel||"名称"}),e.jsx("span",{className:"bad",children:"改动后必须保存"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:r.title,onChange:n=>b(u=>({...u,title:n.target.value}))})})]}),e.jsxs("div",{className:"rowgap",style:{padding:"6px 14px",borderBottom:"1px solid var(--soft-2)"},children:[e.jsx("input",{className:"grow",style:{minWidth:220},placeholder:"直接加字段:字段=值 (回车写入;没见过的键会自动登记)",value:T,onChange:n=>E(n.target.value),onKeyDown:n=>{n.key==="Enter"&&A()}}),e.jsx("button",{className:"btn small",onClick:A,disabled:!T.includes("="),children:"写入"})]}),y.map(n=>e.jsx(Z,{title:n.title,fields:n.fields,draft:r.values,onPatch:i},n.id)),e.jsxs("div",{className:"rowgap pad",children:[e.jsxs("button",{className:"btn",onClick:U,disabled:!o.count,children:["保存",o.count?`(${o.count} 处改动)`:""]}),e.jsx("button",{className:"btn ghost",onClick:()=>a(r.id),disabled:!o.count,children:"放弃改动"}),e.jsx("button",{className:"btn ghost",onClick:F,children:"删除条目"}),t!=null&&t.missing.length?e.jsxs("span",{className:"hint",children:["模板建议里还有 ",t.missing.length," 项没填(不影响使用):",t.missing.slice(0,5).map(n=>n.label).join("、"),t.missing.length>5?"…":""]}):null,(R=t==null?void 0:t.excluded)!=null&&R.length?e.jsxs("span",{className:"hint",children:["另有 ",t.excluded.length," 项已标不填、不计入完整度:",t.excluded.slice(0,6).map(n=>n.label).join("、"),t.excluded.length>6?"…":""]}):null]})]}):e.jsx("div",{className:"card",children:e.jsx(L,{children:"左边选一条,或新建一条"})})})]}),e.jsx(q,{module:"entries"}),N?e.jsx(z,{title:N.title,onClose:()=>I(null),children:N.body}):null]}):e.jsx("div",{className:"pad muted",children:C?"加载中…":"暂无数据"})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as C,r as i,a as h,j as s,b as f,T as j,E as b,C as y,M as E}from"./index-
|
|
1
|
+
import{u as C,r as i,a as h,j as s,b as f,T as j,E as b,C as y,M as E}from"./index-DpX9p_OX.js";function W(){var u,N,v;const{boot:r,toast:d,guard:w}=C(),[g,S]=i.useState([]),[a,k]=i.useState(null),[c,n]=i.useState({format:"both",section:"",out:"",withSecrets:!1}),[o,m]=i.useState(null),x=i.useCallback(async()=>{try{const[e,l]=await Promise.all([h("/api/sections"),h("/api/exports")]);S(e.sections),k(l)}catch(e){d(e.message,"bad")}},[d]);i.useEffect(()=>{x()},[x]),i.useEffect(()=>{const e=r==null?void 0:r.settings;e&&n(l=>({...l,format:e.exportFormat||"both",withSecrets:!!e.includeSecretsInExport,out:e.exportDir||""}))},[r]);const $=()=>({format:c.format,out:c.out.trim()||void 0,section:c.section||void 0,...c.withSecrets?{"with-secrets":!0}:{"no-secrets":!0}}),p=w(async e=>{const l=await h("/api/export",{method:"POST",body:{...$(),"dry-run":!!e}});if(e){m({title:"试运行(没有写盘)",body:s.jsx("pre",{className:"block",children:`目录: ${l.wouldWrite.dir}
|
|
2
2
|
栏目: ${l.wouldWrite.sections} 条目: ${l.wouldWrite.entries}
|
|
3
3
|
凭据: ${l.wouldWrite.withSecrets?"含明文":"已打码"}
|
|
4
4
|
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" />
|
|
9
9
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
10
10
|
<link rel="apple-touch-icon" href="/logo-rounded.png" />
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-DpX9p_OX.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-lfnBM8pt.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{j as e,u as R,r as h,a as k,b as O,E as P,C as B,T as _,M as z}from"./index-DzD8wu27.js";import{l as V,f as Y,r as G}from"./files-2chm08H_.js";function Q({value:i,onChange:g,minRows:u=2,placeholder:x,disabled:l,maxLength:r}){const y=h.useRef(null);return h.useLayoutEffect(()=>{const t=y.current;t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)},[i]),e.jsx("textarea",{ref:y,value:String(i??""),onChange:t=>g(t.target.value),rows:u,placeholder:x,disabled:l,maxLength:r,style:{resize:"none",overflow:"hidden",width:"100%"}})}function W(i){const g=i==null?[]:Array.isArray(i)?i:[i],u=[];for(const x of g){const l=String(x??"").trim();l&&!u.includes(l)&&u.push(l)}return u}function J({def:i,value:g,onChange:u}){const{toast:x,guard:l,patchUi:r}=R(),[y,t]=h.useState(null),p=h.useRef(null),m=W(g),w=Number(i.maxItems)||0,$=w>0&&m.length>=w,E=h.useCallback(async()=>{try{t(await V())}catch{}},[]);h.useEffect(()=>{E()},[E]);const o=(y==null?void 0:y.files)||[],v=c=>o.find(s=>s.id===c)||null,f=o.filter(c=>!m.includes(c.id)),I=l(async c=>{const s=[...c||[]];if(!s.length)return;if($){x(`「${i.label}」最多 ${w} 个附件,先移除一个`,"bad");return}const n=[...m];let j=0;for(const b of s){const D=await Y(b),U=await k("/api/files",{method:"POST",body:{content:D,name:b.name}});if(n.includes(U.id)){j+=1;continue}n.push(U.id)}u(n);const S=s.length-j;x(j?`已上传并关联 ${S} 个;${j} 个库里已有,直接引用`:`已上传并关联 ${s.length} 个`),t(await G())}),T=c=>{c&&!m.includes(c)&&u([...m,c])},A=c=>u(m.filter(s=>s!==c));return e.jsxs("div",{className:"file-picker",children:[m.map(c=>{const s=v(c);return s?e.jsxs("div",{className:"file-preview",children:[s.isImage?e.jsx("img",{src:s.url,alt:s.name}):e.jsx("span",{className:"ext-badge",style:{fontSize:13,width:40,textAlign:"center"},children:s.ext?s.ext.slice(1).toUpperCase():"FILE"}),e.jsx("a",{className:"file-preview-name grow",href:s.url,target:"_blank",rel:"noreferrer",title:s.displayPath,children:s.name}),e.jsx("a",{className:"btn small ghost",href:s.downloadUrl,children:"下载"}),e.jsx(O,{className:"hint",text:s.path,title:"点击复制物理路径",children:"路径"}),e.jsx("button",{type:"button",className:"btn small ghost",onClick:()=>A(c),children:"移除"})]},c):e.jsxs("div",{className:"file-preview",children:[e.jsxs("span",{className:"hint bad grow",children:["引用的附件已不存在(",c,")—— 重新上传,或移除。"]}),e.jsx("button",{type:"button",className:"btn small ghost",onClick:()=>A(c),children:"移除"})]},c)}),m.length?null:e.jsx("span",{className:"hint",children:"还没有附件。"}),e.jsxs("div",{className:"file-pick-row",children:[e.jsxs("select",{value:"",disabled:$||!f.length,onChange:c=>T(c.target.value),children:[e.jsx("option",{value:"",children:f.length?"(从附件库选一个,选中即追加)":"(库里没有可再选的附件)"}),f.map(c=>e.jsx("option",{value:c.id,children:c.name},c.id))]}),e.jsx("button",{type:"button",className:"btn small",disabled:$,onClick:()=>{var c;return(c=p.current)==null?void 0:c.click()},children:"上传文件"}),e.jsx("button",{type:"button",className:"btn small ghost",onClick:()=>r({view:"files"}),children:"附件中心"}),e.jsx("input",{ref:p,type:"file",multiple:!0,style:{display:"none"},onChange:c=>{I(c.target.files),c.target.value=""}})]}),$?e.jsxs("span",{className:"hint",children:["已达上限(",w," 个):先移除一个,或把字段的 maxItems 调大。"]}):null,i.hint?e.jsx("span",{className:"hint",children:i.hint}):null]})}function X({def:i,value:g,onChange:u,disabled:x}){const l=i.type||"text",r=g??"";if(l==="file")return e.jsx(J,{def:i,value:r,onChange:u});if(l==="bool"){const t=r===!0||r==="true"||r==="是";return e.jsxs("label",{className:"inline",children:[e.jsx("input",{type:"checkbox",checked:t,onChange:p=>u(p.target.checked)}),e.jsx("span",{className:"muted",children:t?"是":"否"})]})}if(l==="select"){const t=i.options||[],p=r!==""&&!t.includes(r);return e.jsxs("select",{value:p?"__custom":String(r),onChange:m=>u(m.target.value==="__custom"?"":m.target.value),children:[e.jsx("option",{value:"",children:"(未填写)"}),t.map(m=>e.jsx("option",{value:m,children:m},m)),p?e.jsxs("option",{value:"__custom",children:[String(r),"(当前值,不在候选里)"]}):null]})}if(l==="textarea")return e.jsx(Q,{value:r,onChange:u});if(l==="tags"){const t=Array.isArray(r)?r.join("、"):String(r);return e.jsx("input",{value:t,placeholder:i.maxItems?`多个用「、」分隔,最多 ${i.maxItems} 个`:"多个用「、」分隔",onChange:p=>u(p.target.value.split(/[,,、;;]+/).map(m=>m.trim()).filter(Boolean))})}const y=l==="number"?"number":l==="date"?"date":l==="month"?"month":"text";return l==="secret"?e.jsx("input",{type:"text",value:String(r),placeholder:"密文落盘;原样保留占位则视为不修改",disabled:x,onChange:t=>u(t.target.value)}):e.jsx("input",{type:y,value:String(r),onChange:t=>u(t.target.value)})}function Z({title:i,fields:g,draft:u,onPatch:x}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"group-title",children:i}),e.jsx("div",{className:"pad",children:e.jsx("div",{className:"grid",children:g.map(l=>e.jsxs("div",{className:`field ${l.type==="textarea"||l.type==="file"?"wide":""}`,children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:l.label}),l.sensitive?e.jsx("span",{className:"tag bad",children:"密文"}):null,l.fill&&l.fill!=="normal"?e.jsx("span",{className:"tag",children:l.fillLabel||l.fill}):null,e.jsx("span",{className:"fkey",children:l.key})]}),e.jsx("div",{className:"fctrl",children:e.jsx(X,{def:l,value:u[l.key],onChange:r=>x(l.key,r)})})]},l.key))})})]})}function ee({sectionId:i,sectionTitle:g}){const{ui:u,patchUi:x,toast:l,guard:r,dialog:y,reload:t}=R(),[p,m]=h.useState(null),[w,$]=h.useState({}),[E,o]=h.useState({name:"",value:""}),v=!!u.mask,f=h.useCallback(async()=>{try{const s=`section=${encodeURIComponent(i)}${v?"&mask=1":""}`,n=await k(`/api/keys?${s}`);m(n);const j={};for(const S of n.keys)j[S.name]=S.value??"";$(j)}catch(s){l(s.message,"bad"),m(null)}},[i,v,l]);h.useEffect(()=>{f()},[f]);const I=r(async s=>{const n=w[s.name];(s.value??"")!==n&&(await k(`/api/keys/${encodeURIComponent(s.name)}`,{method:"PUT",body:{value:n,section:i}}),l(`已保存 ${s.name}`),await f())}),T=r(async(s,n)=>{const j=String(n||"").trim();if(!(!j||j===s.name)){if(p.keys.some(S=>S.name===j)){l(`已经有叫「${j}」的键了`,"bad"),await f();return}await k(`/api/entries/${encodeURIComponent(s.id)}`,{method:"PATCH",body:{title:j}}),$(S=>{const b={};for(const[D,U]of Object.entries(S))b[D===s.name?j:D]=U;return b}),l(`已重命名为 ${j}`),await f(),await t()}}),A=r(async()=>{const s=E.name.trim();if(!s){l("先填键名,例如 OPENAI_KEY","bad");return}if(p.keys.some(n=>n.name===s)){l(`已经有叫「${s}」的键了——直接在上面那行改值即可`,"bad");return}await k(`/api/keys/${encodeURIComponent(s)}`,{method:"PUT",body:{value:E.value,section:i}}),o({name:"",value:""}),l(`已新增 ${s}`),await f(),await t()}),c=r(async s=>{await y({message:`删除「${s.name}」?删除前会自动留一份整库快照在 ~/nx-sk/backup。`,danger:!0,confirmText:"删除"})&&(await k(`/api/keys/${encodeURIComponent(s.name)}`,{method:"DELETE",body:{section:i}}),l(`已删除 ${s.name}`),await f(),await t())});return p?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"toolbar rowgap pad",children:[e.jsx("strong",{children:g}),e.jsxs("span",{className:"muted",children:[p.count," 个键 · 名称 → 值"]}),e.jsx("span",{className:"grow"}),e.jsxs("label",{className:"inline hint",children:[e.jsx("input",{type:"checkbox",checked:v,onChange:()=>x({mask:!v})}),"打码显示(投屏/截图时用)"]}),e.jsx("button",{className:"btn small ghost",onClick:f,children:"刷新"})]}),e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"colhead",children:[e.jsx("span",{style:{width:200},children:"名称"}),e.jsx("span",{className:"grow",children:"值"})]}),e.jsxs("div",{className:"colbody",children:[p.keys.length?p.keys.map(s=>e.jsxs("div",{className:"row",children:[e.jsx("input",{className:"mono",style:{width:200},defaultValue:s.name,title:"改完按回车或点开别处即重命名",onBlur:n=>T(s,n.target.value),onKeyDown:n=>{n.key==="Enter"&&n.currentTarget.blur()}}),e.jsx("input",{className:"mono grow",value:w[s.name]??"",onChange:n=>$(j=>({...j,[s.name]:n.target.value})),onBlur:()=>I(s),onKeyDown:n=>{n.key==="Enter"&&n.currentTarget.blur()}}),e.jsxs("span",{className:"acts",children:[e.jsx(O,{className:"tag",text:w[s.name]??"",title:"点击复制值",children:"复制"}),e.jsx("button",{className:"btn small ghost",onClick:()=>c(s),children:"删除"})]})]},s.id)):e.jsx(P,{children:"还没有密钥。在下面一行填「名称 / 值」按添加,或 CLI:nx-sk key set OPENAI_KEY sk-xxx"}),e.jsxs("div",{className:"row",children:[e.jsx("input",{className:"mono",style:{width:200},placeholder:"新键名,例如 OPENAI_KEY",value:E.name,onChange:s=>o(n=>({...n,name:s.target.value})),onKeyDown:s=>{s.key==="Enter"&&A()}}),e.jsx("input",{className:"mono grow",placeholder:"值(留空也行,之后再填)",value:E.value,onChange:s=>o(n=>({...n,value:s.target.value})),onKeyDown:s=>{s.key==="Enter"&&A()}}),e.jsx("span",{className:"acts",children:e.jsx("button",{className:"btn small",onClick:A,children:"添加"})})]})]})]}),e.jsx("div",{className:"pad hint",children:"改值:直接在「值」列改完按回车(或点开别处)即保存。改键名同理。 值以密文落盘,这里显示的是原文;要打码勾上方那个框。删除前自动整库快照。"}),e.jsx(B,{module:"entries"})]}):e.jsx("div",{className:"pad muted",children:"加载中…"})}const L=i=>i==null?"":Array.isArray(i)?i.join("、"):String(i);function ne({sectionId:i}){var K;const{ui:g,patchUi:u,toast:x,guard:l,dialog:r,reload:y}=R(),[t,p]=h.useState(null),[m,w]=h.useState(null),[$,E]=h.useState(!1),[o,v]=h.useState(null),[f,I]=h.useState(null),[T,A]=h.useState(""),c=!!g.mask,s=h.useCallback(async a=>{E(!0),w(null);try{const d=await k(`/api/sections/${encodeURIComponent(i)}/dump${c?"?mask=1":""}`);p(d);const C=a||g.entry,N=d.entries.find(F=>F.id===C)||d.entries[0]||null;v(N?{id:N.id,title:N.title,values:{...N.values}}:null),N&&N.id!==g.entry&&u({entry:N.id})}catch(d){w(d.message),p(null),v(null)}finally{E(!1)}},[i,c]);h.useEffect(()=>{s()},[s]);const n=h.useMemo(()=>(t==null?void 0:t.entries.find(a=>a.id===(o==null?void 0:o.id)))||null,[t,o]),j=h.useMemo(()=>t?t.groups.map(a=>({...a,fields:t.fields.filter(d=>d.group===a.id)})).filter(a=>a.fields.length):[],[t]),S=(a,d)=>v(C=>C&&{...C,values:{...C.values,[a]:d}}),b=h.useMemo(()=>{if(!o||!n)return{set:{},titleChanged:!1,count:0};const a={};for(const d of t.fields)L(n.values[d.key])!==L(o.values[d.key])&&(a[d.key]=o.values[d.key]);return{set:a,titleChanged:o.title!==n.title,count:Object.keys(a).length+(o.title!==n.title?1:0)}},[o,n,t]),D=l(async()=>{if(!o||!n)return;if(!b.count){x("没有改动");return}const a={set:b.set};b.titleChanged&&(a.title=o.title),await k(`/api/entries/${encodeURIComponent(o.id)}`,{method:"PATCH",body:a}),x(`已保存 ${b.count} 处改动`),await s(o.id),await y()}),U=l(async()=>{var F;if(!o){x("先新建一条条目","bad");return}const a=T.indexOf("=");if(a<=0){x("用 字段=值 的格式,例如 微信=zhangsan","bad");return}const d=T.slice(0,a).trim(),C=T.slice(a+1),N=await k(`/api/entries/${encodeURIComponent(o.id)}`,{method:"PATCH",body:{set:{[d]:C}}});A(""),x(`已写入 ${d}${(F=N.newFields)!=null&&F.length?"(新字段已登记)":""}`),await s(o.id),await y()}),M=l(async()=>{const a=(t==null?void 0:t.section.titleLabel)||"名称",d=await r({message:`新建「${t==null?void 0:t.section.title}」条目,${a}是?`,input:{placeholder:`例如 ${(t==null?void 0:t.section.titleField)||"名称"}`}});if(!d)return;const C={section:i,title:d};t!=null&&t.section.titleField&&(C.set={[t.section.titleField]:d});const N=await k("/api/entries",{method:"POST",body:C});x(`已新建:${N.title}`),await s(N.id),await y()}),H=l(async()=>{!n||!await r({message:`删除条目「${n.title}」?删除前会自动留一份快照在 ~/nx-sk/backup。`,danger:!0,confirmText:"删除"})||(await k(`/api/entries/${encodeURIComponent(n.id)}`,{method:"DELETE"}),x("已删除"),await s(""),await y())}),q=l(async()=>{const a=await k("/api/export",{method:"POST",body:{section:i,format:"both"}});I({title:"导出结果",body:e.jsx("pre",{className:"block",children:`目录: ${a.dir}
|
|
2
|
-
格式: ${a.format}
|
|
3
|
-
条目: ${a.entries}
|
|
4
|
-
凭据: ${a.withSecrets?"含明文":"已打码"}
|
|
5
|
-
|
|
6
|
-
${a.files.map(d=>`${d.path} ${d.bytes} 字节`).join(`
|
|
7
|
-
`)}`})})});return m?e.jsxs("div",{className:"pad stack",children:[e.jsx("div",{className:"bad",children:e.jsx("strong",{children:"栏目读不到"})}),e.jsx("pre",{className:"block",children:m}),e.jsx("div",{className:"hint",children:"如果这个栏目刚被删掉,切到「栏目」tab 看看现有栏目。"})]}):t?t.section.kv?e.jsx(ee,{sectionId:i,sectionTitle:t.section.title}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"toolbar rowgap pad",children:[e.jsx("strong",{children:t.section.title}),e.jsx(_,{children:t.section.id}),e.jsxs("span",{className:"muted",children:[t.count," 条 / ",t.section.fields," 字段"]}),t.section.description?e.jsx("span",{className:"desc muted nowrap grow",children:t.section.description}):e.jsx("span",{className:"grow"}),e.jsxs("label",{className:"inline hint",children:[e.jsx("input",{type:"checkbox",checked:c,onChange:()=>u({mask:!c})}),"打码显示(投屏/截图时用)"]}),e.jsx("button",{className:"btn small ghost",onClick:()=>s(),children:"刷新"}),e.jsx("button",{className:"btn small ghost",onClick:q,children:"导出本栏目"}),e.jsx("button",{className:"btn small",onClick:M,children:"新建条目"})]}),e.jsxs("div",{className:"cols",children:[e.jsx("div",{className:"col",style:{flex:"0 0 300px"},children:e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"colhead",children:["条目列表",e.jsx("span",{className:"right muted",children:t.count})]}),e.jsx("div",{className:"colbody",children:t.entries.length?t.entries.map(a=>e.jsxs("div",{className:`row selectable ${a.id===(o==null?void 0:o.id)?"selected":""}`,onClick:()=>{u({entry:a.id}),v({id:a.id,title:a.title,values:{...a.values}})},children:[e.jsx("span",{className:"name",children:a.title||"(无名)"}),e.jsx("span",{className:"acts",children:a.missing.length?e.jsxs("span",{className:"tag",children:[a.completeness.ratio,"%"]}):e.jsx("span",{className:"tag strong",children:"已填满"})})]},a.id)):e.jsxs(P,{children:["还没有条目。点右上角「新建条目」,或用 CLI:nx-sk entry add --section ",t.section.id," --set ..."]})})]})}),e.jsx("div",{className:"col",children:o?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"colhead",children:[e.jsx("span",{className:"grow nowrap",children:(n==null?void 0:n.title)||o.title}),e.jsx("span",{className:"muted mono",children:o.id}),n?e.jsxs(_,{kind:n.missing.length?"":"strong",children:["完整度 ",n.completeness.ratio,"%"]}):null]}),e.jsxs("div",{className:"field wide pad",style:{borderBottom:"1px solid var(--soft-2)"},children:[e.jsxs("div",{className:"flabel",children:[e.jsx("span",{children:t.section.titleLabel||"名称"}),e.jsx("span",{className:"bad",children:"改动后必须保存"})]}),e.jsx("div",{className:"fctrl",children:e.jsx("input",{value:o.title,onChange:a=>v(d=>({...d,title:a.target.value}))})})]}),e.jsxs("div",{className:"rowgap",style:{padding:"6px 14px",borderBottom:"1px solid var(--soft-2)"},children:[e.jsx("input",{className:"grow",style:{minWidth:220},placeholder:"直接加字段:字段=值 (回车写入;没见过的键会自动登记)",value:T,onChange:a=>A(a.target.value),onKeyDown:a=>{a.key==="Enter"&&U()}}),e.jsx("button",{className:"btn small",onClick:U,disabled:!T.includes("="),children:"写入"})]}),j.map(a=>e.jsx(Z,{title:a.title,fields:a.fields,draft:o.values,onPatch:S},a.id)),e.jsxs("div",{className:"rowgap pad",children:[e.jsxs("button",{className:"btn",onClick:D,disabled:!b.count,children:["保存",b.count?`(${b.count} 处改动)`:""]}),e.jsx("button",{className:"btn ghost",onClick:()=>s(o.id),disabled:!b.count,children:"放弃改动"}),e.jsx("button",{className:"btn ghost",onClick:H,children:"删除条目"}),n!=null&&n.missing.length?e.jsxs("span",{className:"hint",children:["模板建议里还有 ",n.missing.length," 项没填(不影响使用):",n.missing.slice(0,5).map(a=>a.label).join("、"),n.missing.length>5?"…":""]}):null,(K=n==null?void 0:n.excluded)!=null&&K.length?e.jsxs("span",{className:"hint",children:["另有 ",n.excluded.length," 项已标不填、不计入完整度:",n.excluded.slice(0,6).map(a=>a.label).join("、"),n.excluded.length>6?"…":""]}):null]})]}):e.jsx("div",{className:"card",children:e.jsx(P,{children:"左边选一条,或新建一条"})})})]}),e.jsx(B,{module:"entries"}),f?e.jsx(z,{title:f.title,onClose:()=>I(null),children:f.body}):null]}):e.jsx("div",{className:"pad muted",children:$?"加载中…":"暂无数据"})}export{ne as default};
|