@akairos/typeset-studio 0.2.5 → 0.2.6
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/README.md +16 -2
- package/dist/assets/index-JCv_QmUn.css +1 -0
- package/dist/assets/index-X9ezH_RG.js +317 -0
- package/dist/index.html +2 -2
- package/dist/lib/adapter.js +1 -1
- package/dist/lib/{canvas-renderer-cxnar75n.js → canvas-renderer-4jg80agt.js} +1 -1
- package/dist/lib/{index-zdhqg5f0.js → index-bf1zs3mv.js} +291 -54
- package/dist/lib/{index-t9w3p2p9.js → index-hegsbxc0.js} +71 -3
- package/dist/lib/{index-h2580xma.js → index-p8ttqbs6.js} +3 -3
- package/dist/lib/index.js +3 -3
- package/dist/lib/{render-xxd348m1.js → render-3043w6s6.js} +2 -2
- package/package.json +3 -3
- package/src/adapter.ts +1 -1
- package/src/core/canvas-draw.ts +53 -43
- package/src/core/canvas-presets.ts +37 -0
- package/src/core/canvas-renderer.test.ts +56 -0
- package/src/core/canvas-style.ts +149 -0
- package/src/core/engine.ts +2 -0
- package/src/core/types.ts +30 -3
- package/src/index.ts +4 -0
- package/src/server/index.ts +1 -1
- package/src/server/routes/slots.test.ts +22 -0
- package/src/server/routes/templates.ts +15 -0
- package/src/web/App.tsx +27 -7
- package/src/web/components/CanvasStyleInspector.tsx +95 -0
- package/src/web/components/Header.tsx +24 -9
- package/src/web/components/ParamsInspector.tsx +6 -1
- package/src/web/components/SaveTemplateModal.tsx +106 -0
- package/src/web/components/TemplateDrawer.tsx +323 -0
- package/src/web/hooks/useTypeset.ts +3 -1
- package/dist/assets/index-3Ko1UCBU.css +0 -1
- package/dist/assets/index-De-aHsvp.js +0 -317
- package/src/web/components/TemplateModal.tsx +0 -393
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const x of d)if(x.type==="childList")for(const g of x.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&c(g)}).observe(document,{childList:!0,subtree:!0});function s(d){const x={};return d.integrity&&(x.integrity=d.integrity),d.referrerPolicy&&(x.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?x.credentials="include":d.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(d){if(d.ep)return;d.ep=!0;const x=s(d);fetch(d.href,x)}})();function Hx(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var uo={exports:{}},zi={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var sx;function L2(){if(sx)return zi;sx=1;var u=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(c,d,x){var g=null;if(x!==void 0&&(g=""+x),d.key!==void 0&&(g=""+d.key),"key"in d){x={};for(var v in d)v!=="key"&&(x[v]=d[v])}else x=d;return d=x.ref,{$$typeof:u,type:c,key:g,ref:d!==void 0?d:null,props:x}}return zi.Fragment=r,zi.jsx=s,zi.jsxs=s,zi}var ox;function H2(){return ox||(ox=1,uo.exports=L2()),uo.exports}var f=H2(),ro={exports:{}},Ne={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var fx;function U2(){if(fx)return Ne;fx=1;var u=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),w=Symbol.iterator;function M(A){return A===null||typeof A!="object"?null:(A=w&&A[w]||A["@@iterator"],typeof A=="function"?A:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,L={};function $(A,X,Z){this.props=A,this.context=X,this.refs=L,this.updater=Z||Q}$.prototype.isReactComponent={},$.prototype.setState=function(A,X){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,X,"setState")},$.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function ee(){}ee.prototype=$.prototype;function ce(A,X,Z){this.props=A,this.context=X,this.refs=L,this.updater=Z||Q}var ue=ce.prototype=new ee;ue.constructor=ce,B(ue,$.prototype),ue.isPureReactComponent=!0;var H=Array.isArray;function V(){}var G={H:null,A:null,T:null,S:null},S=Object.prototype.hasOwnProperty;function q(A,X,Z){var W=Z.ref;return{$$typeof:u,type:A,key:X,ref:W!==void 0?W:null,props:Z}}function _(A,X){return q(A.type,X,A.props)}function te(A){return typeof A=="object"&&A!==null&&A.$$typeof===u}function ne(A){var X={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(Z){return X[Z]})}var he=/\/+/g;function Y(A,X){return typeof A=="object"&&A!==null&&A.key!=null?ne(""+A.key):X.toString(36)}function O(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(V,V):(A.status="pending",A.then(function(X){A.status==="pending"&&(A.status="fulfilled",A.value=X)},function(X){A.status==="pending"&&(A.status="rejected",A.reason=X)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function k(A,X,Z,W,me){var ge=typeof A;(ge==="undefined"||ge==="boolean")&&(A=null);var Ae=!1;if(A===null)Ae=!0;else switch(ge){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(A.$$typeof){case u:case r:Ae=!0;break;case y:return Ae=A._init,k(Ae(A._payload),X,Z,W,me)}}if(Ae)return me=me(A),Ae=W===""?"."+Y(A,0):W,H(me)?(Z="",Ae!=null&&(Z=Ae.replace(he,"$&/")+"/"),k(me,X,Z,"",function(Xt){return Xt})):me!=null&&(te(me)&&(me=_(me,Z+(me.key==null||A&&A.key===me.key?"":(""+me.key).replace(he,"$&/")+"/")+Ae)),X.push(me)),1;Ae=0;var de=W===""?".":W+":";if(H(A))for(var ve=0;ve<A.length;ve++)W=A[ve],ge=de+Y(W,ve),Ae+=k(W,X,Z,ge,me);else if(ve=M(A),typeof ve=="function")for(A=ve.call(A),ve=0;!(W=A.next()).done;)W=W.value,ge=de+Y(W,ve++),Ae+=k(W,X,Z,ge,me);else if(ge==="object"){if(typeof A.then=="function")return k(O(A),X,Z,W,me);throw X=String(A),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function D(A,X,Z){if(A==null)return A;var W=[],me=0;return k(A,W,"","",function(ge){return X.call(Z,ge,me++)}),W}function K(A){if(A._status===-1){var X=A._result,Z=X();Z.then(function(W){(A._status===0||A._status===-1)&&(A._status=1,A._result=W,Z.status===void 0&&(Z.status="fulfilled",Z.value=W))},function(W){(A._status===0||A._status===-1)&&(A._status=2,A._result=W,Z.status===void 0&&(Z.status="rejected",Z.reason=W))}),A._status===-1&&(A._status=0,A._result=Z)}if(A._status===1)return A._result.default;throw A._result}var P=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function re(A){var X=G.T,Z={};Z.types=X!==null?X.types:null,G.T=Z;try{var W=A(),me=G.S;me!==null&&me(Z,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(V,P)}catch(ge){P(ge)}finally{X!==null&&Z.types!==null&&(X.types=Z.types),G.T=X}}function le(A){var X=G.T;if(X!==null){var Z=X.types;Z===null?X.types=[A]:Z.indexOf(A)===-1&&Z.push(A)}else re(le.bind(null,A))}var ae={map:D,forEach:function(A,X,Z){D(A,function(){X.apply(this,arguments)},Z)},count:function(A){var X=0;return D(A,function(){X++}),X},toArray:function(A){return D(A,function(X){return X})||[]},only:function(A){if(!te(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ne.Activity=p,Ne.Children=ae,Ne.Component=$,Ne.Fragment=s,Ne.Profiler=d,Ne.PureComponent=ce,Ne.StrictMode=c,Ne.Suspense=N,Ne.ViewTransition=b,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(A){return G.H.useMemoCache(A)}},Ne.addTransitionType=le,Ne.cache=function(A){return function(){return A.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(A,X,Z){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var W=B({},A.props),me=A.key;if(X!=null)for(ge in X.key!==void 0&&(me=""+X.key),X)!S.call(X,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&X.ref===void 0||(W[ge]=X[ge]);var ge=arguments.length-2;if(ge===1)W.children=Z;else if(1<ge){for(var Ae=Array(ge),de=0;de<ge;de++)Ae[de]=arguments[de+2];W.children=Ae}return q(A.type,me,W)},Ne.createContext=function(A){return A={$$typeof:g,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:x,_context:A},A},Ne.createElement=function(A,X,Z){var W,me={},ge=null;if(X!=null)for(W in X.key!==void 0&&(ge=""+X.key),X)S.call(X,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(me[W]=X[W]);var Ae=arguments.length-2;if(Ae===1)me.children=Z;else if(1<Ae){for(var de=Array(Ae),ve=0;ve<Ae;ve++)de[ve]=arguments[ve+2];me.children=de}if(A&&A.defaultProps)for(W in Ae=A.defaultProps,Ae)me[W]===void 0&&(me[W]=Ae[W]);return q(A,ge,me)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(A){return{$$typeof:v,render:A}},Ne.isValidElement=te,Ne.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:K}},Ne.memo=function(A,X){return{$$typeof:m,type:A,compare:X===void 0?null:X}},Ne.startTransition=re,Ne.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Ne.use=function(A){return G.H.use(A)},Ne.useActionState=function(A,X,Z){return G.H.useActionState(A,X,Z)},Ne.useCallback=function(A,X){return G.H.useCallback(A,X)},Ne.useContext=function(A){return G.H.useContext(A)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(A,X){return G.H.useDeferredValue(A,X)},Ne.useEffect=function(A,X){return G.H.useEffect(A,X)},Ne.useEffectEvent=function(A){return G.H.useEffectEvent(A)},Ne.useId=function(){return G.H.useId()},Ne.useImperativeHandle=function(A,X,Z){return G.H.useImperativeHandle(A,X,Z)},Ne.useInsertionEffect=function(A,X){return G.H.useInsertionEffect(A,X)},Ne.useLayoutEffect=function(A,X){return G.H.useLayoutEffect(A,X)},Ne.useMemo=function(A,X){return G.H.useMemo(A,X)},Ne.useOptimistic=function(A,X){return G.H.useOptimistic(A,X)},Ne.useReducer=function(A,X,Z){return G.H.useReducer(A,X,Z)},Ne.useRef=function(A){return G.H.useRef(A)},Ne.useState=function(A){return G.H.useState(A)},Ne.useSyncExternalStore=function(A,X,Z){return G.H.useSyncExternalStore(A,X,Z)},Ne.useTransition=function(){return G.H.useTransition()},Ne.version="19.3.0",Ne}var dx;function Fo(){return dx||(dx=1,ro.exports=U2()),ro.exports}var fe=Fo();const G2=Hx(fe);var co={exports:{}},_i={},so={exports:{}},oo={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var xx;function q2(){return xx||(xx=1,(function(u){function r(O,k){var D=O.length;O.push(k);e:for(;0<D;){var K=D-1>>>1,P=O[K];if(0<d(P,k))O[K]=k,O[D]=P,D=K;else break e}}function s(O){return O.length===0?null:O[0]}function c(O){if(O.length===0)return null;var k=O[0],D=O.pop();if(D!==k){O[0]=D;e:for(var K=0,P=O.length,re=P>>>1;K<re;){var le=2*(K+1)-1,ae=O[le],A=le+1,X=O[A];if(0>d(ae,D))A<P&&0>d(X,ae)?(O[K]=X,O[A]=D,K=A):(O[K]=ae,O[le]=D,K=le);else if(A<P&&0>d(X,D))O[K]=X,O[A]=D,K=A;else break e}}return k}function d(O,k){var D=O.sortIndex-k.sortIndex;return D!==0?D:O.id-k.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;u.unstable_now=function(){return x.now()}}else{var g=Date,v=g.now();u.unstable_now=function(){return g.now()-v}}var N=[],m=[],y=1,p=null,b=3,w=!1,M=!1,Q=!1,B=!1,L=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,ee=typeof setImmediate<"u"?setImmediate:null;function ce(O){for(var k=s(m);k!==null;){if(k.callback===null)c(m);else if(k.startTime<=O)c(m),k.sortIndex=k.expirationTime,r(N,k);else break;k=s(m)}}function ue(O){if(Q=!1,ce(O),!M)if(s(N)!==null)M=!0,H||(H=!0,te());else{var k=s(m);k!==null&&Y(ue,k.startTime-O)}}var H=!1,V=-1,G=5,S=-1;function q(){return B?!0:!(u.unstable_now()-S<G)}function _(){if(B=!1,H){var O=u.unstable_now();S=O;var k=!0;try{e:{M=!1,Q&&(Q=!1,$(V),V=-1),w=!0;var D=b;try{t:{for(ce(O),p=s(N);p!==null&&!(p.expirationTime>O&&q());){var K=p.callback;if(typeof K=="function"){p.callback=null,b=p.priorityLevel;var P=K(p.expirationTime<=O);if(O=u.unstable_now(),typeof P=="function"){p.callback=P,ce(O),k=!0;break t}p===s(N)&&c(N),ce(O)}else c(N);p=s(N)}if(p!==null)k=!0;else{var re=s(m);re!==null&&Y(ue,re.startTime-O),k=!1}}break e}finally{p=null,b=D,w=!1}k=void 0}}finally{k?te():H=!1}}}var te;if(typeof ee=="function")te=function(){ee(_)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,he=ne.port2;ne.port1.onmessage=_,te=function(){he.postMessage(null)}}else te=function(){L(_,0)};function Y(O,k){V=L(function(){O(u.unstable_now())},k)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(O){O.callback=null},u.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<O?Math.floor(1e3/O):5},u.unstable_getCurrentPriorityLevel=function(){return b},u.unstable_next=function(O){switch(b){case 1:case 2:case 3:var k=3;break;default:k=b}var D=b;b=k;try{return O()}finally{b=D}},u.unstable_requestPaint=function(){B=!0},u.unstable_runWithPriority=function(O,k){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var D=b;b=O;try{return k()}finally{b=D}},u.unstable_scheduleCallback=function(O,k,D){var K=u.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?K+D:K):D=K,O){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=D+P,O={id:y++,callback:k,priorityLevel:O,startTime:D,expirationTime:P,sortIndex:-1},D>K?(O.sortIndex=D,r(m,O),s(N)===null&&O===s(m)&&(Q?($(V),V=-1):Q=!0,Y(ue,D-K))):(O.sortIndex=P,r(N,O),M||w||(M=!0,H||(H=!0,te()))),O},u.unstable_shouldYield=q,u.unstable_wrapCallback=function(O){var k=b;return function(){var D=b;b=k;try{return O.apply(this,arguments)}finally{b=D}}}})(oo)),oo}var hx;function Y2(){return hx||(hx=1,so.exports=q2()),so.exports}var fo={exports:{}},ft={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var mx;function X2(){if(mx)return ft;mx=1;var u=Fo();function r(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var c={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal"),x=Symbol.for("react.recoverable"),g=Symbol.for("react.optimistic_key");function v(y,p,b){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:w==null?null:w===g?g:""+w,children:y,containerInfo:p,implementation:b}}var N=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,ft.browser=function(y){return{$$typeof:x,_reason:y}},ft.createPortal=function(y,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return v(y,p,null,b)},ft.flushSync=function(y){var p=N.T,b=c.p;try{if(N.T=null,c.p=2,y)return y()}finally{N.T=p,c.p=b,c.d.f()}},ft.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,c.d.C(y,p))},ft.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},ft.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,w=m(b,p.crossOrigin),M=typeof p.integrity=="string"?p.integrity:void 0,Q=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?c.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:w,integrity:M,fetchPriority:Q}):b==="script"&&c.d.X(y,{crossOrigin:w,integrity:M,fetchPriority:Q,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ft.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);c.d.M(y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}}else p==null&&c.d.M(y)},ft.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,w=m(b,p.crossOrigin);c.d.L(y,b,{crossOrigin:w,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},ft.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=m(p.as,p.crossOrigin);c.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}else c.d.m(y)},ft.requestFormReset=function(y){c.d.r(y)},ft.unstable_batchedUpdates=function(y,p){return y(p)},ft.useFormState=function(y,p,b){return N.H.useFormState(y,p,b)},ft.useFormStatus=function(){return N.H.useHostTransitionStatus()},ft.version="19.3.0",ft}var gx;function Q2(){if(gx)return fo.exports;gx=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(r){console.error(r)}}return u(),fo.exports=X2(),fo.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var px;function V2(){if(px)return _i;px=1;var u=Y2(),r=Fo(),s=Q2();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function g(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 v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function N(e){if(x(e)!==e)throw Error(c(188))}function m(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,n=t;;){var a=l.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===l)return N(a),e;if(i===n)return N(a),t;i=i.sibling}throw Error(c(188))}if(l.return!==n.return)l=a,n=i;else{for(var o=!1,h=a.child;h;){if(h===l){o=!0,l=a,n=i;break}if(h===n){o=!0,n=a,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,n=a;break}if(h===n){o=!0,n=i,l=a;break}h=h.sibling}if(!o)throw Error(c(189))}}if(l.alternate!==n)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}function p(e,t,l,n,a,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,n,a,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,l,n,a,i))return!0;e=e.sibling}return!1}function b(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function w(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function M(e){var t=[null,null],l=b(e);return l===null||Q(t,e,l.child,{foundSelf:!1}),t}function Q(e,t,l,n){for(;l!==null;){if(l===t)n.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(n.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&Q(e,t,l.child,n))return!0;l=l.sibling}return!1}function B(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(c(559))}}var L=null,$=null;function ee(e,t,l){return e===l?!0:e===t?(L=e,!0):!1}function ce(e,t,l){return e===l?($=e,!1):e===t?($!==null&&(L=e),!0):!1}function ue(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function H(e,t,l){for(var n=0,a=e;a;a=l(a))n++;a=0;for(var i=t;i;i=l(i))a++;for(;0<n-a;)e=l(e),n--;for(;0<a-n;)t=l(t),a--;for(;n--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var V=Object.assign,G=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),q=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),he=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),le=Symbol.for("react.legacy_hidden"),ae=Symbol.for("react.memo_cache_sentinel"),A=Symbol.for("react.view_transition"),X=Symbol.for("react.recoverable"),Z=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case ne:return"Profiler";case te:return"StrictMode";case k:return"Suspense";case D:return"SuspenseList";case re:return"Activity";case A:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case q:return"Portal";case Y:return e.displayName||"Context";case he:return(e._context.displayName||"Context")+".Consumer";case O:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var Ae=Array.isArray,de=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Xt={pending:!1,data:null,method:null,action:null},Ha=[],Fl=-1;function pe(e){return{current:e}}function ye(e){0>Fl||(e.current=Ha[Fl],Ha[Fl]=null,Fl--)}function Ce(e,t){Fl++,Ha[Fl]=e.current,e.current=t}var Ge=pe(null),Je=pe(null),At=pe(null),Pt=pe(null);function Qt(e,t){switch(Ce(At,t),Ce(Je,e),Ce(Ge,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?b1(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=b1(t),e=v1(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ye(Ge),Ce(Ge,e)}function jl(){ye(Ge),ye(Je),ye(At)}function Ua(e){var t=e.memoizedState;t!==null&&(ka._currentValue=t.memoizedState,Ce(Pt,e)),t=Ge.current;var l=v1(t,e.type);t!==l&&(Ce(Je,e),Ce(Ge,l))}function Ln(e){Je.current===e&&(ye(Ge),ye(Je)),Pt.current===e&&(ye(Pt),ka._currentValue=Xt)}var sn,Li;function xl(e){if(sn===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);sn=t&&t[1]||"",Li=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+sn+e+Li}var el=!1;function Dl(e,t){if(!e||el)return"";el=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(ie){var T=ie}Reflect.construct(e,[],I)}else{try{I.call()}catch(ie){T=ie}I=!1;try{var R=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),I=!0,new e}finally{I&&(R!==void 0?Object.defineProperty(e.prototype,"props",R):delete e.prototype.props)}}}else{try{throw Error()}catch(ie){T=ie}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(ie){if(ie&&T&&typeof ie.stack=="string")return[ie.stack,T.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var E=o.split(`
|
|
44
|
+
`),j=h.split(`
|
|
45
|
+
`);for(a=n=0;n<E.length&&!E[n].includes("DetermineComponentFrameRoot");)n++;for(;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;if(n===E.length||a===j.length)for(n=E.length-1,a=j.length-1;1<=n&&0<=a&&E[n]!==j[a];)a--;for(;1<=n&&0<=a;n--,a--)if(E[n]!==j[a]){if(n!==1||a!==1)do if(n--,a--,0>a||E[n]!==j[a]){var U=`
|
|
46
|
+
`+E[n].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=n&&0<=a);break}}}finally{el=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?xl(l):""}function Ga(e,t){switch(e.tag){case 26:case 27:case 5:return xl(e.type);case 16:return xl("Lazy");case 13:return e.child!==t&&t!==null?xl("Suspense Fallback"):xl("Suspense");case 19:return xl("SuspenseList");case 0:case 15:return Dl(e.type,!1);case 11:return Dl(e.type.render,!1);case 1:return Dl(e.type,!0);case 31:return xl("Activity");case 30:return xl("ViewTransition");default:return""}}function Hn(e){try{var t="",l=null;do t+=Ga(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var on=Object.prototype.hasOwnProperty,Un=u.unstable_scheduleCallback,Gn=u.unstable_cancelCallback,jr=u.unstable_shouldYield,Dr=u.unstable_requestPaint,dt=u.unstable_now,Qh=u.unstable_getCurrentPriorityLevel,Uo=u.unstable_ImmediatePriority,Go=u.unstable_UserBlockingPriority,Hi=u.unstable_NormalPriority,Vh=u.unstable_LowPriority,qo=u.unstable_IdlePriority,Zh=u.log,Kh=u.unstable_setDisableYieldValue,qa=null,Ct=null;function Ol(e){if(typeof Zh=="function"&&Kh(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(qa,e)}catch{}}var Mt=Math.clz32?Math.clz32:Wh,Jh=Math.log,Ih=Math.LN2;function Wh(e){return e>>>=0,e===0?32:31-(Jh(e)/Ih|0)|0}var Ui=256,Gi=262144,qi=4194304;function fn(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Yi(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=n&134217727;return h!==0?(n=h&~i,n!==0?a=fn(n):(o&=h,o!==0?a=fn(o):l||(l=h&~e,l!==0&&(a=fn(l))))):(h=n&~i,h!==0?a=fn(h):o!==0?a=fn(o):l||(l=n&~e,l!==0&&(a=fn(l)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:a}function Ya(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Yo(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-Mt(l),a=1<<n;t|=e[n],l&=~a}return t}function $h(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xo(){var e=qi;return qi<<=1,(qi&62914560)===0&&(qi=4194304),e}function Or(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Xa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ph(e,t,l,n,a,i){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,E=e.expirationTimes,j=e.hiddenUpdates;for(l=o&~l;0<l;){var U=31-Mt(l),I=1<<U;h[U]=0,E[U]=-1;var T=j[U];if(T!==null)for(j[U]=null,U=0;U<T.length;U++){var R=T[U];R!==null&&(R.lane&=-536870913)}l&=~I}n!==0&&Qo(e,n,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Qo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Mt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Vo(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-Mt(l),a=1<<n;a&t|e[n]&t&&(e[n]|=t),l&=~a}}function Zo(e,t){var l=t&-t;return l=(l&42)!==0?1:Br(l),(l&(e.suspendedLanes|t))!==0?0:l}function Br(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function zr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ko(){var e=ve.p;return e!==0?e:(e=window.event,e===void 0?32:lx(e.type))}function Jo(e,t){var l=ve.p;try{return ve.p=e,t()}finally{ve.p=l}}var hl=Math.random().toString(36).slice(2),it="__reactFiber$"+hl,bt="__reactProps$"+hl,qn="__reactContainer$"+hl,Io="__reactEvents$"+hl,em="__reactListeners$"+hl,tm="__reactHandles$"+hl,Wo="__reactResources$"+hl,Qa="__reactMarker$"+hl,Xi="__reactLoad$"+hl;function Qi(e){delete e[it],delete e[bt],delete e[em],delete e[tm]}function dn(e){var t;if(t=e[it])return t;for(var l=e.parentNode;l;){if(t=l[qn]||l[it]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=_1(e);e!==null;){if(l=e[it])return l;e=_1(e)}return t}e=l,l=e.parentNode}return null}function Yn(e){if(e=e[it]||e[qn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Va(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Xn(e){var t=e[Wo];return t||(t=e[Wo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function tt(e){e[Qa]=!0}function $o(e){e[Xi]=void 0}var Po=new Set,ef={};function xn(e,t){Qn(e,t),Qn(e+"Capture",t)}function Qn(e,t){for(ef[e]=t,e=0;e<t.length;e++)Po.add(t[e])}var lm=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),tf={},lf={};function nm(e){return on.call(lf,e)?!0:on.call(tf,e)?!1:lm.test(e)?lf[e]=!0:(tf[e]=!0,!1)}var Oe=!1;function nf(){var e=Oe;return Oe=!1,e}function Vi(e,t,l){if(nm(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function Zi(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function ml(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,n)}}function wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function af(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function am(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _r(e){if(!e._valueTracker){var t=af(e)?"checked":"value";e._valueTracker=am(e,t,""+e[t])}}function uf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=af(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}var im=/[\n"\\]/g;function zt(e){return e.replace(im,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Rr(e,t,l,n,a,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wt(t)):e.value!==""+wt(t)&&(e.value=""+wt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?o==="number"&&e.value==t?Lr(e,wt(e.value)):Lr(e,wt(t)):l!=null?Lr(e,wt(l)):n!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+wt(h):e.removeAttribute("name")}function rf(e,t,l,n,a,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){_r(e);return}l=l!=null?""+wt(l):"",t=t!=null?""+wt(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=h?e.checked:!!n,e.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),_r(e)}function Lr(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Vn(e,t,l,n){if(e=e.options,t){t={};for(var a=0;a<l.length;a++)t["$"+l[a]]=!0;for(l=0;l<e.length;l++)a=t.hasOwnProperty("$"+e[l].value),e[l].selected!==a&&(e[l].selected=a),a&&n&&(e[l].defaultSelected=!0)}else{for(l=""+wt(l),t=null,a=0;a<e.length;a++){if(e[a].value===l){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function cf(e,t,l){if(t!=null&&(t=""+wt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+wt(l):""}function sf(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(c(92));if(Ae(n)){if(1<n.length)throw Error(c(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=wt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),_r(e)}function Zn(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var um=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function of(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||um.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function ff(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="",Oe=!0);for(var a in t)n=t[a],t.hasOwnProperty(a)&&l[a]!==n&&(of(e,a,n),Oe=!0)}else for(var i in t)t.hasOwnProperty(i)&&of(e,i,t[i])}function Hr(e){if(e.indexOf("-")===-1)return!1;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 rm=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ki(e){return cm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function tl(){}var Ur=null;function Gr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kn=null,Jn=null;function df(e){var t=Yn(e);if(t&&(e=t.stateNode)){var l=e[bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Rr(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+zt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var a=n[bt]||null;if(!a)throw Error(c(90));Rr(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&uf(n)}break e;case"textarea":cf(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Vn(e,!!l.multiple,t,!1)}}}var qr=!1;function xf(e,t,l){if(qr)return e(t,l);qr=!0;try{var n=e(t);return n}finally{if(qr=!1,(Kn!==null||Jn!==null)&&(Ku(),Kn&&(t=Kn,e=Jn,Jn=Kn=null,df(t),e)))for(t=0;t<e.length;t++)df(e[t])}}function Za(e,t){var l=e.stateNode;if(l===null)return null;var n=l[bt]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(c(231,t,typeof l));return l}var gl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yr=!1;if(gl)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){Yr=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{Yr=!1}var Bl=null,Xr=null,Ji=null;function hf(){if(Ji)return Ji;var e,t=Xr,l=t.length,n,a="value"in Bl?Bl.value:Bl.textContent,i=a.length;for(e=0;e<l&&t[e]===a[e];e++);var o=l-e;for(n=1;n<=o&&t[l-n]===a[i-n];n++);return Ji=a.slice(e,1<n?1-n:void 0)}function Ii(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 Wi(){return!0}function mf(){return!1}function ht(e){function t(l,n,a,i,o){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Wi:mf,this.isPropagationStopped=mf,this}return V(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Wi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wi)},persist:function(){},isPersistent:Wi}),t}var zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$i=ht(zl),Ja=V({},zl,{view:0,detail:0}),sm=ht(Ja),Qr,Vr,Ia,Pi=V({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kr,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!==Ia&&(Ia&&e.type==="mousemove"?(Qr=e.screenX-Ia.screenX,Vr=e.screenY-Ia.screenY):Vr=Qr=0,Ia=e),Qr)},movementY:function(e){return"movementY"in e?e.movementY:Vr}}),gf=ht(Pi),om=V({},Pi,{dataTransfer:0}),fm=ht(om),dm=V({},Ja,{relatedTarget:0}),Zr=ht(dm),xm=V({},zl,{animationName:0,elapsedTime:0,pseudoElement:0}),hm=ht(xm),mm=V({},zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gm=ht(mm),pm=V({},zl,{data:0}),pf=ht(pm),bm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vm={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"},ym={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ym[e])?!!t[e]:!1}function Kr(){return Nm}var Sm=V({},Ja,{key:function(e){if(e.key){var t=bm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ii(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kr,charCode:function(e){return e.type==="keypress"?Ii(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ii(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Em=ht(Sm),Am=V({},Pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bf=ht(Am),Cm=V({},zl,{submitter:0}),Mm=ht(Cm),wm=V({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kr}),km=ht(wm),Tm=V({},zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fm=ht(Tm),jm=V({},Pi,{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}),Dm=ht(jm),Om=V({},zl,{newState:0,oldState:0,source:0}),Bm=ht(Om),zm=[9,13,27,32],Jr=gl&&"CompositionEvent"in window,Wa=null;gl&&"documentMode"in document&&(Wa=document.documentMode);var _m=gl&&"TextEvent"in window&&!Wa,vf=gl&&(!Jr||Wa&&8<Wa&&11>=Wa),yf=" ",Nf=!1;function Sf(e,t){switch(e){case"keyup":return zm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ef(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var In=!1;function Rm(e,t){switch(e){case"compositionend":return Ef(t);case"keypress":return t.which!==32?null:(Nf=!0,yf);case"textInput":return e=t.data,e===yf&&Nf?null:e;default:return null}}function Lm(e,t){if(In)return e==="compositionend"||!Jr&&Sf(e,t)?(e=hf(),Ji=Xr=Bl=null,In=!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 vf&&t.locale!=="ko"?null:t.data;default:return null}}var Hm={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 Af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hm[e.type]:t==="textarea"}function Cf(e,t,l,n){Kn?Jn?Jn.push(n):Jn=[n]:Kn=n,t=er(t,"onChange"),0<t.length&&(l=new $i("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var $a=null,Pa=null;function Um(e){d1(e,0)}function eu(e){var t=Va(e);if(uf(t))return e}function Mf(e,t){if(e==="change")return t}var wf=!1;if(gl){var Ir;if(gl){var Wr="oninput"in document;if(!Wr){var kf=document.createElement("div");kf.setAttribute("oninput","return;"),Wr=typeof kf.oninput=="function"}Ir=Wr}else Ir=!1;wf=Ir&&(!document.documentMode||9<document.documentMode)}function Tf(){$a&&($a.detachEvent("onpropertychange",Ff),Pa=$a=null)}function Ff(e){if(e.propertyName==="value"&&eu(Pa)){var t=[];Cf(t,Pa,e,Gr(e)),xf(Um,t)}}function Gm(e,t,l){e==="focusin"?(Tf(),$a=t,Pa=l,$a.attachEvent("onpropertychange",Ff)):e==="focusout"&&Tf()}function qm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return eu(Pa)}function Ym(e,t){if(e==="click")return eu(t)}function Xm(e,t){if(e==="input"||e==="change")return eu(t)}function Qm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Qm;function ei(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!on.call(t,a)||!kt(e[a],t[a]))return!1}return!0}function $r(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 jf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Df(e,t){var l=jf(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=jf(l)}}function Of(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Of(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$r(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=$r(e.document)}return t}function Pr(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")}var Vm=gl&&"documentMode"in document&&11>=document.documentMode,Wn=null,ec=null,ti=null,tc=!1;function zf(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;tc||Wn==null||Wn!==$r(n)||(n=Wn,"selectionStart"in n&&Pr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ti&&ei(ti,n)||(ti=n,n=er(ec,"onSelect"),0<n.length&&(t=new $i("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=Wn)))}function hn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var $n={animationend:hn("Animation","AnimationEnd"),animationiteration:hn("Animation","AnimationIteration"),animationstart:hn("Animation","AnimationStart"),transitionrun:hn("Transition","TransitionRun"),transitionstart:hn("Transition","TransitionStart"),transitioncancel:hn("Transition","TransitionCancel"),transitionend:hn("Transition","TransitionEnd")},lc={},_f={};gl&&(_f=document.createElement("div").style,"AnimationEvent"in window||(delete $n.animationend.animation,delete $n.animationiteration.animation,delete $n.animationstart.animation),"TransitionEvent"in window||delete $n.transitionend.transition);function mn(e){if(lc[e])return lc[e];if(!$n[e])return e;var t=$n[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in _f)return lc[e]=t[l];return e}var Rf=mn("animationend"),Lf=mn("animationiteration"),Hf=mn("animationstart"),Zm=mn("transitionrun"),Km=mn("transitionstart"),Jm=mn("transitioncancel"),Uf=mn("transitionend"),Gf=new Map,nc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");nc.push("scrollEnd");function Vt(e,t){Gf.set(e,t),xn(t,[e])}var Im=0;function pl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=It.identifierPrefix;var l=Im++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function qf(e){if(e==null||typeof e=="string")return e;var t=null,l=ba;if(l!==null)for(var n=0;n<l.length;n++){var a=e[l[n]];if(a!=null){if(a==="none")return"none";t=t==null?a:t+(" "+a)}}return t??e.default}function bl(e,t){return e=qf(e),t=qf(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var tu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},_t=[],Pn=0,ac=0;function lu(){for(var e=Pn,t=ac=Pn=0;t<e;){var l=_t[t];_t[t++]=null;var n=_t[t];_t[t++]=null;var a=_t[t];_t[t++]=null;var i=_t[t];if(_t[t++]=null,n!==null&&a!==null){var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}i!==0&&Yf(l,a,i)}}function nu(e,t,l,n){_t[Pn++]=e,_t[Pn++]=t,_t[Pn++]=l,_t[Pn++]=n,ac|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ic(e,t,l,n){return nu(e,t,l,n),au(e)}function gn(e,t){return nu(e,null,null,t),au(e)}function Yf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var a=!1,i=e.return;i!==null;)i.childLanes|=l,n=i.alternate,n!==null&&(n.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Mt(l),e=i.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=l|536870912),i):null}function au(e){if(50<Ei)throw Ei=0,Zu=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ea={};function Wm(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(e,t,l,n){return new Wm(e,t,l,n)}function uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vl(e,t){var l=e.alternate;return l===null?(l=vt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Xf(e,t){e.flags&=1206910978;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function iu(e,t,l,n,a,i){var o=0;if(n=e,typeof n=="function")uc(n)&&(o=1);else if(typeof n=="string")o=C2(e,l,Ge.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(n){case re:return e=vt(31,l,t,a),e.elementType=re,e.lanes=i,e;case _:return pn(l.children,a,i,t);case te:o=8,a|=24;break;case ne:return e=vt(12,l,t,a|2),e.elementType=ne,e.lanes=i,e;case k:return e=vt(13,l,t,a),e.elementType=k,e.lanes=i,e;case D:return e=vt(19,l,t,a),e.elementType=D,e.lanes=i,e;case le:case A:return e=a|32,e=vt(30,l,t,e),e.elementType=A,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case Y:o=10;break e;case he:o=9;break e;case O:o=11;break e;case K:o=14;break e;case P:o=16,n=null;break e}o=29,l=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=vt(o,l,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function pn(e,t,l,n){return e=vt(7,e,n,t),e.lanes=l,e}function rc(e,t,l){return e=vt(6,e,null,t),e.lanes=l,e}function Qf(e){var t=vt(18,null,null,0);return t.stateNode=e,t}function cc(e,t,l){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Vf=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var l=Vf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Hn(t)},Vf.set(e,t),t)}return{value:e,source:t,stack:Hn(t)}}var ta=[],la=0,uu=null,li=0,Lt=[],Ht=0,_l=null,ll=1,nl="";function yl(e,t){ta[la++]=li,ta[la++]=uu,uu=e,li=t}function Zf(e,t,l){Lt[Ht++]=ll,Lt[Ht++]=nl,Lt[Ht++]=_l,_l=e;var n=ll;e=nl;var a=32-Mt(n)-1;n&=~(1<<a),l+=1;var i=32-Mt(t)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,ll=1<<32-Mt(t)+a|l<<a|n,nl=i+e}else ll=1<<i|l<<a|n,nl=e}function ru(e){e.return!==null&&(yl(e,1),Zf(e,1,0))}function sc(e){for(;e===uu;)uu=ta[--la],ta[la]=null,li=ta[--la],ta[la]=null;for(;e===_l;)_l=Lt[--Ht],Lt[Ht]=null,nl=Lt[--Ht],Lt[Ht]=null,ll=Lt[--Ht],Lt[Ht]=null}function Kf(e,t){Lt[Ht++]=ll,Lt[Ht++]=nl,Lt[Ht++]=_l,ll=t.id,nl=t.overflow,_l=e}var lt=null,qe=null,Me=!1,Rl=null,Ut=!1,oc=Error(c(519));function Ll(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ni(Rt(t,e)),oc}function Jf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[it]=e,t[bt]=n,l){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(l=0;l<Ci.length;l++)Te(Ci[l],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),rf(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),sf(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||g1(t.textContent,l)?(n.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),n.onScroll!=null&&Te("scroll",t),n.onScrollEnd!=null&&Te("scrollend",t),n.onClick!=null&&(t.onclick=tl),t=!0):t=!1,t||Ll(e,!0)}function cu(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Ut=!1;return;case 27:case 3:Ut=!0;return;default:lt=lt.return}}function na(e){if(e!==lt)return!1;if(!Me)return cu(e),Me=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Us(e.type,e.memoizedProps)),l=!l),l&&qe&&Ll(e),cu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));qe=z1(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));qe=z1(e)}else t===27?(t=qe,en(e.type)?(e=Js,Js=null,qe=e):qe=t):qe=lt?qt(e.stateNode.nextSibling):null;return!0}function bn(){qe=lt=null,Me=!1}function fc(){var e=Rl;return e!==null&&(St===null?St=e:St.push.apply(St,e),Rl=null),e}function ni(e){Rl===null?Rl=[e]:Rl.push(e)}var dc=pe(null),vn=null,Nl=null;function Hl(e,t,l){Ce(dc,t._currentValue),t._currentValue=l}function Sl(e){e._currentValue=dc.current,ye(dc)}function su(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function xc(e,t,l,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var o=a.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=a;for(var E=0;E<t.length;E++)if(h.context===t[E]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),su(i.return,l,e),n||(o=null);break e}i=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(c(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),su(o,l,e),o=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=l,o=a.alternate,o!==null&&(o.lanes|=l),su(a.return,l,e),o=a.child,o=o!==null?o.sibling:null):o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function yn(e,t,l,n){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=a.type;kt(a.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(a===Pt.current){if(o=a.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(ka):e=[ka])}a=a.return}return e!==null&&xc(t,e,l,n),t.flags|=262144,e!==null}function ou(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Nn(e){vn=e,Nl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ut(e){return If(vn,e)}function fu(e,t){return vn===null&&Nn(e),If(e,t)}function If(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Nl===null){if(e===null)throw Error(c(308));Nl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Nl=Nl.next=t;return l}var $m=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Pm=u.unstable_scheduleCallback,eg=u.unstable_NormalPriority,Ie={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hc(){return{controller:new $m,data:new Map,refCount:0}}function ai(e){e.refCount--,e.refCount===0&&Pm(eg,function(){e.controller.abort()})}function Wf(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var n=t[e];l.indexOf(n)===-1&&l.push(n)}}}var ii=null;function tg(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ui=null,mc=0,Sn=0,aa=null;function lg(e,t){if(ui===null){var l=ui=[];mc=0,Sn=js(),aa={status:"pending",value:void 0,then:function(n){l.push(n)}}}return mc++,t.then($f,$f),t}function $f(){if(--mc===0&&(ii=null,ui!==null)){aa!==null&&(aa.status="fulfilled");var e=ui;ui=null,Sn=0,aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ng(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<l.length;a++)(0,l[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var Pf=de.S;de.S=function(e,t){if(Qd=dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&lg(e,t),ii!==null)for(var l=Sa;l!==null;)Wf(l,ii),l=l.next;if(l=e.types,l!==null){for(var n=Sa;n!==null;)Wf(n,l),n=n.next;if(Sn!==0){n=ii,n===null&&(n=ii=[]);for(var a=0;a<l.length;a++){var i=l[a];n.indexOf(i)===-1&&n.push(i)}}}Pf!==null&&Pf(e,t)};var En=pe(null);function gc(){var e=En.current;return e!==null?e:Ue.pooledCache}function du(e,t){t===null?Ce(En,En.current):Ce(En,t.pool)}function e0(){var e=gc();return e===null?null:{parent:Ie._currentValue,pool:e}}var ia=Error(c(460)),pc=Error(c(474)),xu=Error(c(542)),hu={then:function(){}};function t0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function l0(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(tl,tl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,a0(e),e===void 0&&!("reason"in t)?Error(c(600)):e;default:if(typeof t.status=="string")t.then(tl,tl);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,a0(e),e}throw Cn=t,ia}}function An(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Cn=l,ia):l}}var Cn=null;function n0(){if(Cn===null)throw Error(c(459));var e=Cn;return Cn=null,e}function a0(e){if(e===ia||e===xu)throw Error(c(483))}var ua=null,ri=0;function mu(e){var t=ri;return ri+=1,ua===null&&(ua=[]),l0(ua,e,t)}function Ul(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gu(e,t){throw t.$$typeof===G?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function i0(e){function t(F,C){if(e){var z=F.deletions;z===null?(F.deletions=[C],F.flags|=16):z.push(C)}}function l(F,C){if(!e)return null;for(;C!==null;)t(F,C),C=C.sibling;return null}function n(F){for(var C=new Map;F!==null;)F.key===null?C.set(F.index,F):C.set(F.key,F),F=F.sibling;return C}function a(F,C){return F=vl(F,C),F.index=0,F.sibling=null,F}function i(F,C,z){return F.index=z,e?(z=F.alternate,z!==null?(z=z.index,z<C?(F.flags|=2,C):z):(F.flags|=134217730,C)):(F.flags|=1048576,C)}function o(F){return e&&F.alternate===null&&(F.flags|=134217730),F}function h(F,C,z,J){return C===null||C.tag!==6?(C=rc(z,F.mode,J),C.return=F,C):(C=a(C,z),C.return=F,C)}function E(F,C,z,J){var se=z.type;return se===_?(F=U(F,C,z.props.children,J,z.key),Ul(F,z),F):C!==null&&(C.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===P&&An(se)===C.type)?(C=a(C,z.props),Ul(C,z),C.return=F,C):(C=iu(z.type,z.key,z.props,null,F.mode,J),Ul(C,z),C.return=F,C)}function j(F,C,z,J){return C===null||C.tag!==4||C.stateNode.containerInfo!==z.containerInfo||C.stateNode.implementation!==z.implementation?(C=cc(z,F.mode,J),C.return=F,C):(C=a(C,z.children||[]),C.return=F,C)}function U(F,C,z,J,se){return C===null||C.tag!==7?(C=pn(z,F.mode,J,se),C.return=F,C):(C=a(C,z),C.return=F,C)}function I(F,C,z){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=rc(""+C,F.mode,z),C.return=F,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case S:return z=iu(C.type,C.key,C.props,null,F.mode,z),Ul(z,C),z.return=F,z;case q:return C=cc(C,F.mode,z),C.return=F,C;case P:return C=An(C),I(F,C,z)}if(Ae(C)||W(C))return C=pn(C,F.mode,z,null),C.return=F,C;if(typeof C.then=="function")return I(F,mu(C),z);if(C.$$typeof===Y)return I(F,fu(F,C),z);gu(F,C)}return null}function T(F,C,z,J){var se=C!==null?C.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return se!==null?null:h(F,C,""+z,J);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case S:return z.key===se?E(F,C,z,J):null;case q:return z.key===se?j(F,C,z,J):null;case P:return z=An(z),T(F,C,z,J)}if(Ae(z)||W(z))return se!==null?null:U(F,C,z,J,null);if(typeof z.then=="function")return T(F,C,mu(z),J);if(z.$$typeof===Y)return T(F,C,fu(F,z),J);gu(F,z)}return null}function R(F,C,z,J,se){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return F=F.get(z)||null,h(C,F,""+J,se);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case S:return F=F.get(J.key===null?z:J.key)||null,E(C,F,J,se);case q:return F=F.get(J.key===null?z:J.key)||null,j(C,F,J,se);case P:return J=An(J),R(F,C,z,J,se)}if(Ae(J)||W(J))return F=F.get(z)||null,U(C,F,J,se,null);if(typeof J.then=="function")return R(F,C,z,mu(J),se);if(J.$$typeof===Y)return R(F,C,z,fu(C,J),se);gu(C,J)}return null}function ie(F,C,z,J){for(var se=null,je=null,xe=C,be=C=0,Pe=null;xe!==null&&be<z.length;be++){xe.index>be?(Pe=xe,xe=null):Pe=xe.sibling;var De=T(F,xe,z[be],J);if(De===null){xe===null&&(xe=Pe);break}e&&xe&&De.alternate===null&&t(F,xe),C=i(De,C,be),je===null?se=De:je.sibling=De,je=De,xe=Pe}if(be===z.length)return l(F,xe),Me&&yl(F,be),se;if(xe===null){for(;be<z.length;be++)xe=I(F,z[be],J),xe!==null&&(C=i(xe,C,be),je===null?se=xe:je.sibling=xe,je=xe);return Me&&yl(F,be),se}for(xe=n(xe);be<z.length;be++)Pe=R(xe,F,be,z[be],J),Pe!==null&&(e&&(De=Pe.alternate,De!==null&&xe.delete(De.key===null?be:De.key)),C=i(Pe,C,be),je===null?se=Pe:je.sibling=Pe,je=Pe);return e&&xe.forEach(function(un){return t(F,un)}),Me&&yl(F,be),se}function oe(F,C,z,J){if(z==null)throw Error(c(151));for(var se=null,je=null,xe=C,be=C=0,Pe=null,De=z.next();xe!==null&&!De.done;be++,De=z.next()){xe.index>be?(Pe=xe,xe=null):Pe=xe.sibling;var un=T(F,xe,De.value,J);if(un===null){xe===null&&(xe=Pe);break}e&&xe&&un.alternate===null&&t(F,xe),C=i(un,C,be),je===null?se=un:je.sibling=un,je=un,xe=Pe}if(De.done)return l(F,xe),Me&&yl(F,be),se;if(xe===null){for(;!De.done;be++,De=z.next())De=I(F,De.value,J),De!==null&&(C=i(De,C,be),je===null?se=De:je.sibling=De,je=De);return Me&&yl(F,be),se}for(xe=n(xe);!De.done;be++,De=z.next())De=R(xe,F,be,De.value,J),De!==null&&(e&&(Pe=De.alternate,Pe!==null&&xe.delete(Pe.key===null?be:Pe.key)),C=i(De,C,be),je===null?se=De:je.sibling=De,je=De);return e&&xe.forEach(function(R2){return t(F,R2)}),Me&&yl(F,be),se}function Ee(F,C,z,J){if(typeof z=="object"&&z!==null&&z.type===_&&z.key===null&&z.props.ref===void 0&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case S:e:{for(var se=z.key;C!==null;){if(C.key===se){if(se=z.type,se===_){if(C.tag===7){l(F,C.sibling),J=a(C,z.props.children),Ul(J,z),J.return=F,F=J;break e}}else if(C.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===P&&An(se)===C.type){l(F,C.sibling),J=a(C,z.props),Ul(J,z),J.return=F,F=J;break e}l(F,C);break}else t(F,C);C=C.sibling}z.type===_?(J=pn(z.props.children,F.mode,J,z.key),Ul(J,z),J.return=F,F=J):(J=iu(z.type,z.key,z.props,null,F.mode,J),Ul(J,z),J.return=F,F=J)}return o(F);case q:e:{for(se=z.key;C!==null;){if(C.key===se)if(C.tag===4&&C.stateNode.containerInfo===z.containerInfo&&C.stateNode.implementation===z.implementation){l(F,C.sibling),J=a(C,z.children||[]),J.return=F,F=J;break e}else{l(F,C);break}else t(F,C);C=C.sibling}J=cc(z,F.mode,J),J.return=F,F=J}return o(F);case P:return z=An(z),Ee(F,C,z,J)}if(Ae(z))return ie(F,C,z,J);if(W(z)){if(se=W(z),typeof se!="function")throw Error(c(150));return z=se.call(z),oe(F,C,z,J)}if(typeof z.then=="function")return Ee(F,C,mu(z),J);if(z.$$typeof===Y)return Ee(F,C,fu(F,z),J);gu(F,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,C!==null&&C.tag===6?(l(F,C.sibling),J=a(C,z),J.return=F,F=J):(l(F,C),J=rc(z,F.mode,J),J.return=F,F=J),o(F)):l(F,C)}return function(F,C,z,J){try{ri=0;var se=Ee(F,C,z,J);return ua=null,se}catch(xe){if(xe===ia||xe===xu)throw xe;var je=vt(29,xe,null,F.mode);return je.lanes=J,je.return=F,je}finally{}}}var Mn=i0(!0),u0=i0(!1),Gl=!1;function bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ql(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yl(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Be&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=au(e),Yf(e,null,l),t}return nu(e,n,t,l),au(e)}function ci(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Vo(e,l)}}function yc(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?a=i=t:i=i.next=t}else a=i=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Nc=!1;function si(){if(Nc){var e=aa;if(e!==null)throw e}}function oi(e,t,l,n){Nc=!1;var a=e.updateQueue;Gl=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var E=h,j=E.next;E.next=null,o===null?i=j:o.next=j,o=E;var U=e.alternate;U!==null&&(U=U.updateQueue,h=U.lastBaseUpdate,h!==o&&(h===null?U.firstBaseUpdate=j:h.next=j,U.lastBaseUpdate=E))}if(i!==null){var I=a.baseState;o=0,U=j=E=null,h=i;do{var T=h.lane&-536870913,R=T!==h.lane;if(R?(Fe&T)===T:(n&T)===T){T!==0&&T===Sn&&(Nc=!0),U!==null&&(U=U.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var ie=e,oe=h;T=t;var Ee=l;switch(oe.tag){case 1:if(ie=oe.payload,typeof ie=="function"){I=ie.call(Ee,I,T);break e}I=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=oe.payload,T=typeof ie=="function"?ie.call(Ee,I,T):ie,T==null)break e;I=V({},I,T);break e;case 2:Gl=!0}}T=h.callback,T!==null&&(e.flags|=64,R&&(e.flags|=8192),R=a.callbacks,R===null?a.callbacks=[T]:R.push(T))}else R={lane:T,tag:h.tag,payload:h.payload,callback:h.callback,next:null},U===null?(j=U=R,E=I):U=U.next=R,o|=T;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;R=h,h=R.next,R.next=null,a.lastBaseUpdate=R,a.shared.pending=null}}while(!0);U===null&&(E=I),a.baseState=E,a.firstBaseUpdate=j,a.lastBaseUpdate=U,i===null&&(a.shared.lanes=0),Il|=o,e.lanes=o,e.memoizedState=I}}function r0(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function c0(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)r0(l[e],t)}var Xl=pe(null),pu=pe(0);function s0(e,t){e=wl,Ce(pu,e),Ce(Xl,t),wl=e|t.baseLanes}function Sc(){Ce(pu,wl),Ce(Xl,Xl.current)}function Ec(){wl=pu.current,ye(Xl),ye(pu)}var rt=pe(null),xt=null;function Ql(e){var t=e.alternate;Ce(ct,ct.current&1),Ce(rt,e),xt===null&&(t===null||Xl.current!==null||t.memoizedState!==null)&&(xt=e)}function Ac(e){Ce(ct,ct.current),Ce(rt,e),xt===null&&(xt=e)}function o0(e){e.tag===22?(Ce(ct,ct.current),Ce(rt,e),xt===null&&(xt=e)):Vl()}function Vl(){Ce(ct,ct.current),Ce(rt,rt.current)}function Tt(e){ye(rt),xt===e&&(xt=null),ye(ct)}var ct=pe(0);function fi(e,t){Ce(rt,rt.current),Ce(ct,t)}function Cc(e){ye(ct),ye(rt),xt===e&&(xt=null)}function bu(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Zs(l)||Ks(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 El=0,Se=null,He=null,We=null,vu=!1,ra=!1,wn=!1,yu=0,di=0,ca=null,ag=0;function Ve(){throw Error(c(321))}function Mc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!kt(e[l],t[l]))return!1;return!0}function wc(e,t,l,n,a,i){return El=i,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,de.H=e===null||e.memoizedState===null?Z0:K0,wn=!1,i=l(n,a),wn=!1,ra&&(i=d0(t,l,n,a)),f0(e),i}function f0(e){de.H=wu;var t=He!==null&&He.next!==null;if(El=0,We=He=Se=null,vu=!1,di=0,ca=null,t)throw Error(c(300));e===null||$e||(e=e.dependencies,e!==null&&ou(e)&&($e=!0))}function d0(e,t,l,n){Se=e;var a=0;do{if(ra&&(ca=null),di=0,ra=!1,25<=a)throw Error(c(301));if(a+=1,We=He=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}de.H=dg,i=t(l,n)}while(ra);return i}function ig(){var e=de.H,t=e.useState()[0];return t=typeof t.then=="function"?xi(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(Se.flags|=1024),t}function kc(){var e=yu!==0;return yu=0,e}function Tc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Fc(e){if(vu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vu=!1}El=0,We=He=Se=null,ra=!1,di=yu=0,ca=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Se.memoizedState=We=e:We=We.next=e,We}function Ke(){if(He===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=We===null?Se.memoizedState:We.next;if(t!==null)We=t,He=e;else{if(e===null)throw Se.alternate===null?Error(c(467)):Error(c(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},We===null?Se.memoizedState=We=e:We=We.next=e}return We}function Nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xi(e){var t=di;return di+=1,ca===null&&(ca=[]),e=l0(ca,e,t),t=Se,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,de.H=t===null||t.memoizedState===null?Z0:K0),e}function Su(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xi(e);if(e.$$typeof===X)return;if(e.$$typeof===Y)return ut(e)}throw Error(c(438,String(e)))}function jc(e){var t=null,l=Se.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=Se.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Nu(),Se.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=ae;return t.index++,l}function Al(e,t){return typeof t=="function"?t(e):t}function Eu(e){var t=Ke();return Dc(t,He,e)}function Dc(e,t,l){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=l;var a=e.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}t.baseQueue=a=i,n.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var h=o=null,E=null,j=t,U=!1;do{var I=j.lane&-536870913;if(I!==j.lane?(Fe&I)===I:(El&I)===I){var T=j.revertLane;if(T===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),I===Sn&&(U=!0);else if((El&T)===T){j=j.next,T===Sn&&(U=!0);continue}else I={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},E===null?(h=E=I,o=i):E=E.next=I,Se.lanes|=T,Il|=T;I=j.action,wn&&l(i,I),i=j.hasEagerState?j.eagerState:l(i,I)}else T={lane:I,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},E===null?(h=E=T,o=i):E=E.next=T,Se.lanes|=I,Il|=I;j=j.next}while(j!==null&&j!==t);if(E===null?o=i:E.next=h,!kt(i,e.memoizedState)&&($e=!0,U&&(l=aa,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=E,n.lastRenderedState=i}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Oc(e){var t=Ke(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var n=l.dispatch,a=l.pending,i=t.memoizedState;if(a!==null){l.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);kt(i,t.memoizedState)||($e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,n]}function x0(e,t,l){var n=Se,a=Ke(),i=Me;if(i){if(l===void 0)throw Error(c(407));l=l()}else l=t();var o=!kt((He||a).memoizedState,l);if(o&&(a.memoizedState=l,$e=!0),a=a.queue,_c(g0.bind(null,n,a,e),[e]),e=a.getSnapshot!==t||o||We!==null&&(We.memoizedState.tag&1)!==0,sa(e?9:8,{destroy:void 0},m0.bind(null,n,a,l,t),null),e){if(n.flags|=2048,Ue===null)throw Error(c(349));i||(El&127)!==0||h0(n,t,l)}return l}function h0(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Se.updateQueue,t===null?(t=Nu(),Se.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function m0(e,t,l,n){t.value=l,t.getSnapshot=n,p0(t)&&b0(e)}function g0(e,t,l){return l(function(){p0(t)&&b0(e)})}function p0(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!kt(e,l)}catch{return!0}}function b0(e){var t=gn(e,2);t!==null&&Et(t,e,2)}function Bc(e){var t=mt();if(typeof e=="function"){var l=e;if(e=l(),wn){Ol(!0);try{l()}finally{Ol(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:e},t}function v0(e,t,l,n){return e.baseState=l,Dc(e,He,typeof n=="function"?n:Al)}function ug(e,t,l,n,a){if(Mu(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};de.T!==null?l(!0):i.isTransition=!1,n(i),l=t.pending,l===null?(i.next=t.pending=i,y0(t,i)):(i.next=l.next,t.pending=l.next=i)}}function y0(e,t){var l=t.action,n=t.payload,a=e.state;if(t.isTransition){var i=de.T,o={};o.types=i!==null?i.types:null,de.T=o;try{var h=l(a,n),E=de.S;E!==null&&E(o,h),N0(e,t,h)}catch(j){zc(e,t,j)}finally{i!==null&&o.types!==null&&(i.types=o.types),de.T=i}}else try{i=l(a,n),N0(e,t,i)}catch(j){zc(e,t,j)}}function N0(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){S0(e,t,n)},function(n){return zc(e,t,n)}):S0(e,t,l)}function S0(e,t,l){t.status="fulfilled",t.value=l,E0(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,y0(e,l)))}function zc(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,E0(t),t=t.next;while(t!==n)}e.action=null}function E0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function A0(e,t){return t}function C0(e,t){if(Me){var l=Ue.formState;if(l!==null){e:{var n=Se;if(Me){if(qe){t:{for(var a=qe,i=Ut;a.nodeType!==8;){if(!i){a=null;break t}if(a=qt(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){qe=qt(a.nextSibling),n=a.data==="F!";break e}}Ll(n)}n=!1}n&&(t=l[0])}}return l=mt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:A0,lastRenderedState:t},l.queue=n,l=X0.bind(null,Se,n),n.dispatch=l,n=Bc(!1),i=Gc.bind(null,Se,!1,n.queue),n=mt(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,l=ug.bind(null,Se,a,i,l),a.dispatch=l,n.memoizedState=e,[t,l,!1]}function M0(e){var t=Ke();return w0(t,He,e)}function w0(e,t,l){if(t=Dc(e,t,A0)[0],e=Eu(Al)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=xi(t)}catch(o){throw o===ia?xu:o}else n=t;t=Ke();var a=t.queue,i=a.dispatch;return l!==t.memoizedState&&(Se.flags|=2048,sa(9,{destroy:void 0},rg.bind(null,a,l),null)),[n,i,e]}function rg(e,t){e.action=t}function k0(e){var t=Ke(),l=He;if(l!==null)return w0(t,l,e);Ke(),t=t.memoizedState,l=Ke();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function sa(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=Se.updateQueue,t===null&&(t=Nu(),Se.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function T0(){return Ke().memoizedState}function Au(e,t,l,n){var a=mt();Se.flags|=e,a.memoizedState=sa(1|t,{destroy:void 0},l,n===void 0?null:n)}function Cu(e,t,l,n){var a=Ke();n=n===void 0?null:n;var i=a.memoizedState.inst;He!==null&&n!==null&&Mc(n,He.memoizedState.deps)?a.memoizedState=sa(t,i,l,n):(Se.flags|=e,a.memoizedState=sa(1|t,i,l,n))}function F0(e,t){Au(8390656,8,e,t)}function _c(e,t){Cu(2048,8,e,t)}function cg(e){Se.flags|=4;var t=Se.updateQueue;if(t===null)t=Nu(),Se.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function j0(e){var t=Ke().memoizedState;return cg({ref:t,nextImpl:e}),function(){if((Be&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function D0(e,t){return Cu(4,2,e,t)}function O0(e,t){return Cu(4,4,e,t)}function B0(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function z0(e,t,l){l=l!=null?l.concat([e]):null,Cu(4,4,B0.bind(null,t,e),l)}function Rc(){}function _0(e,t){var l=Ke();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Mc(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function R0(e,t){var l=Ke();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Mc(t,n[1]))return n[0];if(n=e(),wn){Ol(!0);try{e()}finally{Ol(!1)}}return l.memoizedState=[n,t],n}function Lc(e,t,l){return l===void 0||(El&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Zd(),Se.lanes|=e,Il|=e,l)}function L0(e,t,l,n){return kt(l,t)?l:Xl.current!==null?(e=Lc(e,l,n),kt(e,t)||($e=!0),e):(El&106)===0||(El&1073741824)!==0&&(Fe&261930)===0?($e=!0,e.memoizedState=l):(e=Zd(),Se.lanes|=e,Il|=e,t)}function H0(e,t,l,n,a){var i=ve.p;ve.p=i!==0&&8>i?i:8;var o=de.T,h={};h.types=o!==null?o.types:null,de.T=h,Gc(e,!1,t,l);try{var E=a(),j=de.S;if(j!==null&&j(h,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var U=ng(E,n);hi(e,t,U,Ot(e))}else hi(e,t,n,Ot(e))}catch(I){hi(e,t,{then:function(){},status:"rejected",reason:I},Ot())}finally{ve.p=i,o!==null&&h.types!==null&&(o.types=h.types),de.T=o}}function sg(){}function Hc(e,t,l,n){if(e.tag!==5)throw Error(c(476));var a=U0(e).queue;H0(e,a,t,Xt,l===null?sg:function(){return G0(e),l(n)})}function U0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Xt,baseState:Xt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:Xt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function G0(e){var t=U0(e);t.next===null&&(t=e.alternate.memoizedState),hi(e,t.next.queue,{},Ot())}function Uc(){return ut(ka)}function q0(){return Ke().memoizedState}function Y0(){return Ke().memoizedState}function og(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Ot();e=ql(l);var n=Yl(t,e,l);n!==null&&(Et(n,t,l),ci(n,t,l)),t={cache:hc()},e.payload=t;return}t=t.return}}function fg(e,t,l){var n=Ot();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Mu(e)?Q0(t,l):(l=ic(e,t,l,n),l!==null&&(Et(l,e,n),V0(l,t,n)))}function X0(e,t,l){var n=Ot();hi(e,t,l,n)}function hi(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Mu(e))Q0(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,l);if(a.hasEagerState=!0,a.eagerState=h,kt(h,o))return nu(e,t,a,0),Ue===null&&lu(),!1}catch{}finally{}if(l=ic(e,t,a,n),l!==null)return Et(l,e,n),V0(l,t,n),!0}return!1}function Gc(e,t,l,n){if(n={lane:2,revertLane:js(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Mu(e)){if(t)throw Error(c(479))}else t=ic(e,l,n,2),t!==null&&Et(t,e,2)}function Mu(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Q0(e,t){ra=vu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function V0(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Vo(e,l)}}var wu={readContext:ut,use:Su,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve,useEffectEvent:Ve},Z0={readContext:ut,use:Su,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:F0,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Au(4194308,4,B0.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Au(4194308,4,e,t)},useInsertionEffect:function(e,t){Au(4,2,e,t)},useMemo:function(e,t){var l=mt();t=t===void 0?null:t;var n=e();if(wn){Ol(!0);try{e()}finally{Ol(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=mt();if(l!==void 0){var a=l(t);if(wn){Ol(!0);try{l(t)}finally{Ol(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=fg.bind(null,Se,e),[n.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Bc(e);var t=e.queue,l=X0.bind(null,Se,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Rc,useDeferredValue:function(e,t){var l=mt();return Lc(l,e,t)},useTransition:function(){var e=Bc(!1);return e=H0.bind(null,Se,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=Se,a=mt();if(Me){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),Ue===null)throw Error(c(349));(Fe&127)!==0||h0(n,t,l)}a.memoizedState=l;var i={value:l,getSnapshot:t};return a.queue=i,F0(g0.bind(null,n,i,e),[e]),n.flags|=2048,sa(9,{destroy:void 0},m0.bind(null,n,i,l,t),null),l},useId:function(){var e=mt(),t=Ue.identifierPrefix;if(Me){var l=nl,n=ll;l=(n&~(1<<32-Mt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=yu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ag++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Uc,useFormState:C0,useActionState:C0,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Gc.bind(null,Se,!0,l),l.dispatch=t,[e,t]},useMemoCache:jc,useCacheRefresh:function(){return mt().memoizedState=og.bind(null,Se)},useEffectEvent:function(e){var t=mt(),l={impl:e};return t.memoizedState=l,function(){if((Be&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},K0={readContext:ut,use:Su,useCallback:_0,useContext:ut,useEffect:_c,useImperativeHandle:z0,useInsertionEffect:D0,useLayoutEffect:O0,useMemo:R0,useReducer:Eu,useRef:T0,useState:function(){return Eu(Al)},useDebugValue:Rc,useDeferredValue:function(e,t){var l=Ke();return L0(l,He.memoizedState,e,t)},useTransition:function(){var e=Eu(Al)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:x0,useId:q0,useHostTransitionStatus:Uc,useFormState:M0,useActionState:M0,useOptimistic:function(e,t){var l=Ke();return v0(l,He,e,t)},useMemoCache:jc,useCacheRefresh:Y0,useEffectEvent:j0},dg={readContext:ut,use:Su,useCallback:_0,useContext:ut,useEffect:_c,useImperativeHandle:z0,useInsertionEffect:D0,useLayoutEffect:O0,useMemo:R0,useReducer:Oc,useRef:T0,useState:function(){return Oc(Al)},useDebugValue:Rc,useDeferredValue:function(e,t){var l=Ke();return He===null?Lc(l,e,t):L0(l,He.memoizedState,e,t)},useTransition:function(){var e=Oc(Al)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:x0,useId:q0,useHostTransitionStatus:Uc,useFormState:k0,useActionState:k0,useOptimistic:function(e,t){var l=Ke();return He!==null?v0(l,He,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:jc,useCacheRefresh:Y0,useEffectEvent:j0};function qc(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:V({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Yc={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=Ot(),a=ql(n);a.payload=t,l!=null&&(a.callback=l),t=Yl(e,a,n),t!==null&&(Et(t,e,n),ci(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=Ot(),a=ql(n);a.tag=1,a.payload=t,l!=null&&(a.callback=l),t=Yl(e,a,n),t!==null&&(Et(t,e,n),ci(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Ot(),n=ql(l);n.tag=2,t!=null&&(n.callback=t),t=Yl(e,n,l),t!==null&&(Et(t,e,l),ci(t,e,l))}};function J0(e,t,l,n,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!ei(l,n)||!ei(a,i):!0}function I0(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&Yc.enqueueReplaceState(t,t.state,null)}function kn(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=V({},l));for(var a in e)l[a]===void 0&&(l[a]=e[a])}return l}function W0(e){tu(e)}function $0(e){console.error(e)}function P0(e){tu(e)}function ku(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function ed(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Xc(e,t,l){return l=ql(l),l.tag=3,l.payload={element:null},l.callback=function(){ku(e,t)},l}function td(e){return e=ql(e),e.tag=3,e}function ld(e,t,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;e.payload=function(){return a(i)},e.callback=function(){ed(t,l,n)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){ed(t,l,n),typeof a!="function"&&(Wl===null?Wl=new Set([this]):Wl.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function xg(e,t,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&yn(t,l,a,!0),l=rt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return xt===null?Ju():l.alternate===null&&Ze===0&&(Ze=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===hu?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),ks(e,n,a)),!1;case 22:return l.flags|=65536,n===hu?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),ks(e,n,a)),!1}throw Error(c(435,l.tag))}return ks(e,n,a),Ju(),!1}if(Me)return t=rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==oc&&(e=Error(c(422),{cause:n}),ni(Rt(e,l)))):(n!==oc&&(t=Error(c(423),{cause:n}),ni(Rt(t,l))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Rt(n,l),a=Xc(e.stateNode,n,a),yc(e,a),Ze!==4&&(Ze=2)),!1;var i=Error(c(520),{cause:n});if(i=Rt(i,l),Si===null?Si=[i]:Si.push(i),Ze!==4&&(Ze=2),t===null)return!0;n=Rt(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=a&-a,l.lanes|=e,e=Xc(l.stateNode,n,e),yc(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Wl===null||!Wl.has(i))))return l.flags|=65536,a&=-a,l.lanes|=a,a=td(a),ld(a,e,l,n),yc(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Qc=Error(c(461)),$e=!1;function et(e,t,l,n){t.child=e===null?u0(t,null,l,n):Mn(t,e.child,l,n)}function nd(e,t,l,n,a){l=l.render;var i=t.ref;if("ref"in n){var o={};for(var h in n)h!=="ref"&&(o[h]=n[h])}else o=n;return Nn(t),n=wc(e,t,l,o,i,a),h=kc(),e!==null&&!$e?(Tc(e,t,a),Cl(e,t,a)):(Me&&h&&ru(t),t.flags|=1,et(e,t,n,a),t.child)}function ad(e,t,l,n,a){if(e===null){var i=l.type;return typeof i=="function"&&!uc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,id(e,t,i,n,a)):(e=iu(l.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Pc(e,a)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:ei,l(o,n)&&e.ref===t.ref)return Cl(e,t,a)}return t.flags|=1,e=vl(i,n),e.ref=t.ref,e.return=t,t.child=e}function id(e,t,l,n,a){if(e!==null){var i=e.memoizedProps;if(ei(i,n)&&e.ref===t.ref)if($e=!1,t.pendingProps=n=i,Pc(e,a))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,Cl(e,t,a)}return Vc(e,t,l,n,a)}function ud(e,t,l,n){var a=n.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,t.child=null;return rd(e,t,i,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&du(t,i!==null?i.cachePool:null),i!==null?s0(t,i):Sc(),o0(t);else return n=t.lanes=536870912,rd(e,t,i!==null?i.baseLanes|l:l,l,n)}else i!==null?(du(t,i.cachePool),s0(t,i),Vl(),t.memoizedState=null):(e!==null&&du(t,null),Sc(),Vl());return et(e,t,a,l),t.child}function mi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rd(e,t,l,n,a){var i=gc();return i=i===null?null:{parent:Ie._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&du(t,null),Sc(),o0(t),e!==null&&yn(e,t,n,!0),t.childLanes=a,null}function Tu(e,t){return t=Fu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cd(e,t,l){return Mn(t,e.child,null,l),e=Tu(t,t.pendingProps),e.flags|=2,Tt(t),t.memoizedState=null,e}function hg(e,t,l){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(n.mode==="hidden")return e=Tu(t,n),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},mi(null,e);if(Ac(t),(e=qe)?(e=B1(e,Ut),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_l!==null?{id:ll,overflow:nl}:null,retryLane:536870912,hydrationErrors:null},l=Qf(e),l.return=t,t.child=l,lt=t,qe=null)):e=null,e===null)throw Ll(t);return t.lanes=536870912,null}return Tu(t,n)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Ac(t),a)if(t.flags&256)t.flags&=-257,t=cd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if($e||yn(e,t,l,!1),a=(l&e.childLanes)!==0,$e||a){if(Xl.current===null){if(n=Ue,n!==null&&(o=Zo(n,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,gn(e,o),Et(n,e,o),Qc;Ju()}t=cd(e,t,l)}else e=i.treeContext,qe=qt(o.nextSibling),lt=t,Me=!0,Rl=null,Ut=!1,e!==null&&Kf(t,e),t=Tu(t,n),t.flags|=134221824;return t}return e=vl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function oa(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Vc(e,t,l,n,a){return Nn(t),l=wc(e,t,l,n,void 0,a),n=kc(),e!==null&&!$e?(Tc(e,t,a),Cl(e,t,a)):(Me&&n&&ru(t),t.flags|=1,et(e,t,l,a),t.child)}function sd(e,t,l,n,a,i){return Nn(t),t.updateQueue=null,l=d0(t,n,l,a),f0(e),n=kc(),e!==null&&!$e?(Tc(e,t,i),Cl(e,t,i)):(Me&&n&&ru(t),t.flags|=1,et(e,t,l,i),t.child)}function od(e,t,l,n,a){if(Nn(t),t.stateNode===null){var i=ea,o=l.contextType;typeof o=="object"&&o!==null&&(i=ut(o)),i=new l(n,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Yc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=n,i.state=t.memoizedState,i.refs={},bc(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?ut(o):ea,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(qc(t,l,o,n),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Yc.enqueueReplaceState(i,i.state,null),oi(t,n,i,a),si(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,E=kn(l,h);i.props=E;var j=i.context,U=l.contextType;o=ea,typeof U=="object"&&U!==null&&(o=ut(U));var I=l.getDerivedStateFromProps;U=typeof I=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,U||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||j!==o)&&I0(t,i,n,o),Gl=!1;var T=t.memoizedState;i.state=T,oi(t,n,i,a),si(),j=t.memoizedState,h||T!==j||Gl?(typeof I=="function"&&(qc(t,l,I,n),j=t.memoizedState),(E=Gl||J0(t,l,E,n,T,j,o))?(U||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=n,t.memoizedState=j),i.props=n,i.state=j,i.context=o,n=E):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,vc(e,t),o=t.memoizedProps,U=kn(l,o),i.props=U,I=t.pendingProps,T=i.context,j=l.contextType,E=ea,typeof j=="object"&&j!==null&&(E=ut(j)),h=l.getDerivedStateFromProps,(j=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==I||T!==E)&&I0(t,i,n,E),Gl=!1,T=t.memoizedState,i.state=T,oi(t,n,i,a),si();var R=t.memoizedState;o!==I||T!==R||Gl||e!==null&&e.dependencies!==null&&ou(e.dependencies)?(typeof h=="function"&&(qc(t,l,h,n),R=t.memoizedState),(U=Gl||J0(t,l,U,n,T,R,E)||e!==null&&e.dependencies!==null&&ou(e.dependencies))?(j||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,R,E),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,R,E)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=R),i.props=n,i.state=R,i.context=E,n=U):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),n=!1)}return i=n,oa(e,t),n=(t.flags&128)!==0,i||n?(i=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&n?(t.child=Mn(t,e.child,null,a),t.child=Mn(t,null,l,a)):et(e,t,l,a),t.memoizedState=i.state,e=t.child):e=Cl(e,t,a),e}function fd(e,t,l,n){return bn(),t.flags|=256,et(e,t,l,n),t.child}var Zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:e0()}}function Jc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Dt),e}function dd(e,t,l){var n=t.pendingProps,a=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(ct.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(a?Ql(t):Vl(),(e=qe)?(e=B1(e,Ut),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_l!==null?{id:ll,overflow:nl}:null,retryLane:536870912,hydrationErrors:null},l=Qf(e),l.return=t,t.child=l,lt=t,qe=null)):e=null,e===null)throw Ll(t);return Ks(e)?t.lanes=32:t.lanes=536870912,null}return i=n.children,n=n.fallback,a?(Vl(),a=t.mode,i=Fu({mode:"hidden",children:i},a),n=pn(n,a,l,null),i.return=t,n.return=t,i.sibling=n,t.child=i,n=t.child,n.memoizedState=Kc(l),n.childLanes=Jc(e,o,l),t.memoizedState=Zc,mi(null,n)):(Ql(t),Ic(t,i))}var h=e.memoizedState;if(h!==null){var E=h.dehydrated;if(E!==null)return mg(e,t,i,o,n,E,h,l)}return a?(Vl(),a=n.fallback,i=t.mode,h=e.child,E=h.sibling,n=vl(h,{mode:"hidden",children:n.children}),n.subtreeFlags=h.subtreeFlags&1206910976,E!==null?a=vl(E,a):(a=pn(a,i,l,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,mi(null,n),n=t.child,a=e.child.memoizedState,a===null?a=Kc(l):(i=a.cachePool,i!==null?(h=Ie._currentValue,i=i.parent!==h?{parent:h,pool:h}:i):i=e0(),a={baseLanes:a.baseLanes|l,cachePool:i}),n.memoizedState=a,n.childLanes=Jc(e,o,l),t.memoizedState=Zc,mi(e.child,n)):(Ql(t),l=e.child,e=l.sibling,l=vl(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function Ic(e,t){return t=Fu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fu(e,t){return e=vt(22,e,null,t),e.lanes=0,e}function ju(e,t,l){return Mn(t,e.child,null,l),e=Ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mg(e,t,l,n,a,i,o,h){if(l)return t.flags&256?(Ql(t),t.flags&=-257,ju(e,t,h)):t.memoizedState!==null?(Vl(),t.child=e.child,t.flags|=128,null):(Vl(),i=a.fallback,o=t.mode,a=Fu({mode:"visible",children:a.children},o),i=pn(i,o,h,null),i.flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,Mn(t,e.child,null,h),a=t.child,a.memoizedState=Kc(h),a.childLanes=Jc(e,n,h),t.memoizedState=Zc,mi(null,a));if(Ql(t),Ks(i)){if(n=i.nextSibling&&i.nextSibling.dataset,n)var E=n.dgst;return n=E,n!==""&&(a=Error(c(419)),a.stack="",a.digest=n,ni({value:a,source:null,stack:null})),ju(e,t,h)}if($e||yn(e,t,h,!1),n=(h&e.childLanes)!==0,$e||n){if(Xl.current!==null)return ju(e,t,h);if(n=Ue,n!==null&&(a=Zo(n,h),a!==0&&a!==o.retryLane))throw o.retryLane=a,gn(e,a),Et(n,e,a),Qc;return Zs(i)||Ju(),ju(e,t,h)}return Zs(i)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,qe=qt(i.nextSibling),lt=t,Me=!0,Rl=null,Ut=!1,e!==null&&Kf(t,e),t=Ic(t,a.children),t.flags|=134221824,t)}function xd(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),su(e.return,t,l)}function hd(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&bu(l)===null&&(t=e),e=e.sibling}return t}function Du(e,t,l,n,a,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=l,o.tailMode=a,o.treeForkCount=i)}function Wc(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function $c(e,t,l){var n=t.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var o=ct.current;if(t.flags&128)return fi(t,o),null;var h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,fi(t,o),a==="backwards"&&e!==null?(Wc(e),et(e,t,n,l),Wc(e)):et(e,t,n,l),n=Me?li:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xd(e,l,t);else if(e.tag===19)xd(e,l,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}switch(a){case"backwards":l=hd(t.child),l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null,Wc(t)),Du(t,!0,a,null,i,n);break;case"unstable_legacy-backwards":for(l=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&bu(e)===null){t.child=a;break}e=a.sibling,a.sibling=l,l=a,a=e}Du(t,!0,l,null,i,n);break;case"together":Du(t,!1,null,null,void 0,n);break;case"independent":t.memoizedState=null;break;default:l=hd(t.child),l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null),Du(t,!1,a,l,i,n)}return t.child}function md(e,t,l){var n=t.pendingProps;return Hl(t,t.type,n.value),et(e,t,n.children,l),t.child}function Cl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Il|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(yn(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=vl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=vl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ou(e)))}function gg(e,t,l){switch(t.tag){case 3:Qt(t,t.stateNode.containerInfo),Hl(t,Ie,e.memoizedState.cache),bn();break;case 27:case 5:Ua(t);break;case 4:Qt(t,t.stateNode.containerInfo);break;case 10:Hl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ac(t),null;break;case 13:var n=t.memoizedState;if(n!==null){if(n.dehydrated!==null)return Ql(t),t.flags|=128,null;n=yn(e,t,l,!1);var a=t.child.childLanes;return n||(l&a)!==0?dd(e,t,l):(Ql(t),e=Cl(e,t,l),e!==null?e.sibling:null)}Ql(t);break;case 19:if(t.flags&128)return $c(e,t,l);if(a=(e.flags&128)!==0,n=(l&t.childLanes)!==0,n||(yn(e,t,l,!1),n=(l&t.childLanes)!==0),a){if(n)return $c(e,t,l);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),fi(t,ct.current),n)break;return null;case 22:return t.lanes=0,ud(e,t,l,t.pendingProps);case 24:Hl(t,Ie,e.memoizedState.cache)}return Cl(e,t,l)}function gd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Pc(e,l)&&(t.flags&128)===0)return $e=!1,gg(e,t,l);$e=(e.flags&131072)!==0}else $e=!1,Me&&(t.flags&1048576)!==0&&Zf(t,li,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=An(t.elementType),t.type=e,typeof e=="function")uc(e)?(n=kn(e,n),t.tag=1,t=od(null,t,e,n,l)):(t.tag=0,t=Vc(null,t,e,n,l));else{if(e!=null){var a=e.$$typeof;if(a===O){t.tag=11,t=nd(null,t,e,n,l);break e}else if(a===K){t.tag=14,t=ad(null,t,e,n,l);break e}else if(a===Y){t.tag=10,t.type=e,t=md(null,t,l);break e}}throw t=ge(e)||e,Error(c(306,t,""))}}return t;case 0:return Vc(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,a=kn(n,t.pendingProps),od(e,t,n,a,l);case 3:e:{if(Qt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var i=t.memoizedState;a=i.element,vc(e,t),oi(t,n,null,l);var o=t.memoizedState;if(n=o.cache,Hl(t,Ie,n),n!==i.cache&&xc(t,[Ie],l,!0),si(),n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=fd(e,t,n,l);break e}else if(n!==a){a=Rt(Error(c(424)),t),ni(a),t=fd(e,t,n,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(qe=qt(e.firstChild),lt=t,Me=!0,Rl=null,Ut=!0,l=u0(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(bn(),n===a){t=Cl(e,t,l);break e}et(e,t,n,l)}t=t.child}return t;case 26:return oa(e,t),e===null?(l=G1(t.type,null,t.pendingProps,null))?t.memoizedState=l:Me||(t.stateNode=y1(t.type,t.pendingProps,At.current,t)):t.memoizedState=G1(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ua(t),e===null&&Me&&(n=t.stateNode=R1(t.type,t.pendingProps,At.current),lt=t,Ut=!0,a=qe,en(t.type)?(Js=a,qe=qt(n.firstChild)):qe=a),et(e,t,t.pendingProps.children,l),oa(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((a=n=qe)&&(n=o2(n,t.type,t.pendingProps,Ut),n!==null?(t.stateNode=n,lt=t,qe=qt(n.firstChild),Ut=!1,a=!0):a=!1),a||Ll(t)),Ua(t),a=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,n=i.children,Us(a,i)?n=null:o!==null&&Us(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=wc(e,t,ig,null,null,l),ka._currentValue=a),oa(e,t),et(e,t,n,l),t.child;case 6:return e===null&&Me&&((e=l=qe)&&(l=f2(l,t.pendingProps,Ut),l!==null?(t.stateNode=l,lt=t,qe=null,e=!0):e=!1),e||Ll(t)),null;case 13:return dd(e,t,l);case 4:return Qt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Mn(t,null,n,l):et(e,t,n,l),t.child;case 11:return nd(e,t,t.type,t.pendingProps,l);case 7:return n=t.pendingProps,oa(e,t),et(e,t,n,l),t.child;case 8:return et(e,t,t.pendingProps.children,l),t.child;case 12:return et(e,t,t.pendingProps.children,l),t.child;case 10:return md(e,t,l);case 9:return a=t.type._context,n=t.pendingProps.children,Nn(t),a=ut(a),n=n(a),t.flags|=1,et(e,t,n,l),t.child;case 14:return ad(e,t,t.type,t.pendingProps,l);case 15:return id(e,t,t.type,t.pendingProps,l);case 19:return $c(e,t,l);case 31:return hg(e,t,l);case 22:return ud(e,t,l,t.pendingProps);case 24:return Nn(t),n=ut(Ie),e===null?(a=gc(),a===null&&(a=Ue,i=hc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=l),a=i),t.memoizedState={parent:n,cache:a},bc(t),Hl(t,Ie,a)):((e.lanes&l)!==0&&(vc(e,t),oi(t,null,null,l),si()),a=e.memoizedState,i=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Hl(t,Ie,n)):(n=i.cache,Hl(t,Ie,n),n!==a.cache&&xc(t,[Ie],l,!0))),et(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),n=t.pendingProps,n.name!=null&&n.name!=="auto"?t.flags|=e===null?18882560:18874368:Me&&ru(t),e!==null&&e.memoizedProps.name!==n.name?t.flags|=4194816:oa(e,t),et(e,t,n.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Ml(e){e.flags|=4}function es(e,t,l,n,a){var i;if((i=(e.mode&32)!==0)&&(i=l===null?Q1(t,n):Q1(t,n)&&(n.src!==l.src||n.srcSet!==l.srcSet)),i){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Wd())e.flags|=8192;else throw Cn=hu,pc}else e.flags&=-16777217}function pd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!V1(t))if(Wd())e.flags|=8192;else throw Cn=hu,pc}function Ou(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xo():536870912,e.lanes|=t,ma|=t)}function gi(e,t){if(!Me)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&1206910976,n|=a.flags&1206910976,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function pg(e,t,l){var n=t.pendingProps;switch(sc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sl(Ie),jl(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(na(t)?Ml(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fc())),Ye(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Ml(t),i!==null?(Ye(t),pd(t,i)):(Ye(t),es(t,a,null,n,l))):i?i!==e.memoizedState?(Ml(t),Ye(t),pd(t,i)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Ml(t),Ye(t),es(t,a,e,n,l)),null;case 27:if(Ln(t),l=At.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Ml(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return Ye(t),t.subtreeFlags&=-33554433,null}e=Ge.current,na(t)?Jf(t):(e=R1(a,n,l),t.stateNode=e,Ml(t))}return Ye(t),t.subtreeFlags&=-33554433,null;case 5:if(Ln(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Ml(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return Ye(t),t.subtreeFlags&=-33554433,null}if(i=Ge.current,na(t))Jf(t);else{var o=wi(At.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(a,{is:n.is}):o.createElement(a)}}i[it]=t,i[bt]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(ot(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Ml(t)}}return Ye(t),t.subtreeFlags&=-33554433,es(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Ml(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=At.current,na(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=lt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||g1(e.nodeValue,l)),e||Ll(t,!0)}else e=wi(e).createTextNode(n),e[it]=t,t.stateNode=e}return Ye(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=na(t),l!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[it]=t}else bn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else l=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Tt(t),t):(Tt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Ye(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=na(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(c(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[it]=t}else bn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),a=!1}else a=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Tt(t),t):(Tt(t),null)}return Tt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ou(t,t.updateQueue),Ye(t),null);case 4:return jl(),e===null&&zs(t.stateNode.containerInfo),t.flags|=67108864,Ye(t),null;case 10:return Sl(t.type),Ye(t),null;case 19:if(Cc(t),n=t.memoizedState,n===null)return Ye(t),null;if(a=(t.flags&128)!==0,i=n.rendering,i===null)if(a)gi(n,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=bu(e),i!==null){for(t.flags|=128,gi(n,!1),e=i.updateQueue,t.updateQueue=e,Ou(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Xf(l,e),l=l.sibling;return fi(t,ct.current&1|2),Me&&yl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&dt()>Qu&&(t.flags|=128,a=!0,gi(n,!1),t.lanes=4194304)}else{if(!a)if(e=bu(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ou(t,e),gi(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!i.alternate&&!Me)return Ye(t),null}else 2*dt()-n.renderingStartTime>Qu&&l!==536870912&&(t.flags|=128,a=!0,gi(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}if(n.tail!==null){e=n.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return n.rendering=e,n.tail=e.sibling,n.renderingStartTime=dt(),e.sibling=null,i=ct.current,i=a?i&1|2:i&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||Me?fi(t,i):(l=i,Ce(rt,t),Ce(ct,l),xt===null&&(xt=t)),Me&&yl(t,n.treeForkCount),e}return Ye(t),null;case 22:case 23:return Tt(t),Ec(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),l=t.updateQueue,l!==null&&Ou(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&ye(En),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Sl(Ie),Ye(t),null;case 25:return null;case 30:return t.flags|=33554432,Ye(t),null}throw Error(c(156,t.tag))}function bg(e,t){switch(sc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sl(Ie),jl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ln(t),null;case 31:if(t.memoizedState!==null){if(Tt(t),t.alternate===null)throw Error(c(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Tt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Cc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return jl(),null;case 10:return Sl(t.type),null;case 22:case 23:return Tt(t),Ec(),e!==null&&ye(En),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sl(Ie),null;case 25:return null;default:return null}}function bd(e,t){switch(sc(t),t.tag){case 3:Sl(Ie),jl();break;case 26:case 27:case 5:Ln(t);break;case 4:jl();break;case 31:t.memoizedState!==null&&Tt(t);break;case 13:Tt(t);break;case 19:Cc(t);break;case 10:Sl(t.type);break;case 22:case 23:Tt(t),Ec(),e!==null&&ye(En);break;case 24:Sl(Ie)}}function pi(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var i=l.create,o=l.inst;n=i(),o.destroy=n}l=l.next}while(l!==a)}}catch(h){Re(t,t.return,h)}}function Zl(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){var o=n.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=t;var E=l,j=h;try{j()}catch(U){Re(a,E,U)}}}n=n.next}while(n!==i)}}catch(U){Re(t,t.return,U)}}function vd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{c0(t,l)}catch(n){Re(e,e.return,n)}}}function yd(e,t,l){l.props=kn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Re(e,t,n)}}function al(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:var a=e.stateNode,i=pl(e.memoizedProps,a);(a.ref===null||a.ref.name!==i)&&(a.ref=w1(i)),n=a.ref;break;case 7:if(e.stateNode===null){var o=new Bt(e);p(e.child,!1,c2,o,void 0,void 0),e.stateNode=o}n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(h){Re(e,t,h)}}function st(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){Re(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){Re(e,t,a)}else l.current=null}function Bu(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)O1(e.stateNode,t[l])}function Nd(e){for(var t=e.return;t!==null&&(ls(t)&&O1(e.stateNode,t.stateNode),!ts(t));)t=t.return}function bi(e){for(var t=e.return;t!==null&&(ls(t)&&s2(e.stateNode,t.stateNode),!ts(t));)t=t.return}function ts(e){return e.tag===5||e.tag===3||e.tag===27}function ls(e){return e&&e.tag===7&&e.stateNode!==null}function ns(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){Re(e,e.return,a)}}function as(e,t,l){try{var n=e.stateNode;Xg(n,e.type,l,t),n[bt]=t}catch(a){Re(e,e.return,a)}}function Sd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&en(e.type)||e.tag===4}function is(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sd(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.tag===27&&en(e.type)||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 us(e,t,l,n){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(a,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(a),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=tl)),Bu(e,n),Oe=!0;else if(a!==4&&(a===27&&(Bu(e,n),n=null,en(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(us(e,t,l,n),e=e.sibling;e!==null;)us(e,t,l,n),e=e.sibling}function zu(e,t,l,n){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?l.insertBefore(a,t):l.appendChild(a),Bu(e,n),Oe=!0;else if(a!==4&&(a===27&&(Bu(e,n),n=null,en(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(zu(e,t,l,n),e=e.sibling;e!==null;)zu(e,t,l,n),e=e.sibling}function Ed(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);ot(t,n,l),t[it]=e,t[bt]=l}catch(i){Re(e,e.return,i)}}var _u=!1,Ft=null;function Ad(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(_u=!0)}var il=null;function Cd(){var e=il;return il=null,e}var yt=0;function fa(e,t,l,n,a){return yt=0,Md(e.child,t,l,n,a)}function Md(e,t,l,n,a){for(var i=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(n!==null){var h=Ys(o);n.push(h),h.view&&(i=!0)}else i||Ys(o).view&&(i=!0);_u=!0,C1(o,yt===0?t:t+"_"+yt,l),yt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&a||Md(e.child,t,l,n,a)&&(i=!0));e=e.sibling}return i}function ul(e,t){for(;e!==null;)e.tag===5?M1(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ul(e.child,t)),e=e.sibling}function Ru(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ru(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(c(544));var l=t.name;t=bl(t.default,t.share),t!=="none"&&(fa(e,l,t,null,!1)||ul(e.child,!1))}e=e.sibling}}function rs(e,t){if(e.tag===30){var l=e.stateNode,n=e.memoizedProps,a=pl(n,l),i=bl(n.default,l.paired?n.share:n.enter);i!=="none"?fa(e,a,i,null,!1)?(Ru(e),l.paired||t||va(e,n.onEnter)):ul(e.child,!1):Ru(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)rs(e,t),e=e.sibling;else Ru(e)}function cs(e){if(Ft!==null&&Ft.size!==0){var t=Ft;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,n=l.name;if(n!=null&&n!=="auto"){var a=t.get(n);if(a!==void 0){var i=bl(l.default,l.share);if(i!=="none"&&(fa(e,n,i,null,!1)?(i=e.stateNode,a.paired=i,i.paired=a,va(e,l.onShare)):ul(e.child,!1)),t.delete(n),t.size===0)break}}}cs(e)}e=e.sibling}}}function ss(e){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode),n=Ft!==null?Ft.get(l):void 0,a=bl(t.default,n!==void 0?t.share:t.exit);a!=="none"&&(fa(e,l,a,null,!1)?n!==void 0?(a=e.stateNode,n.paired=a,a.paired=n,Ft.delete(l),va(e,t.onShare)):va(e,t.onExit):ul(e.child,!1)),Ft!==null&&cs(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)ss(e),e=e.sibling;else Ft!==null&&cs(e)}function wd(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode);t=bl(t.default,t.update),e.flags&=-5,t!=="none"&&fa(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&wd(e);e=e.sibling}}function os(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,ul(e.child,!1))}os(e)}e=e.sibling}}function Lu(e){if(e.tag===30)e.stateNode.paired=null,ul(e.child,!1),os(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Lu(e),e=e.sibling;else os(e)}function kd(e){for(e=e.child;e!==null;)e.tag===30?ul(e.child,!1):(e.subtreeFlags&33554432)!==0&&kd(e),e=e.sibling}function fs(e,t,l,n,a,i,o){for(var h=!1;t!==null;){if(t.tag===5){var E=t.stateNode;if(i!==null&&yt<i.length){var j=i[yt],U=Ys(E);(j.view||U.view)&&(h=!0);var I;if(I=(e.flags&4)===0)if(U.clip)I=!0;else{I=j.rect;var T=U.rect;I=I.y!==T.y||I.x!==T.x||I.height!==T.height||I.width!==T.width}I&&(e.flags|=4),U.abs?U=!j.abs:(j=j.rect,U=U.rect,U=j.height!==U.height||j.width!==U.width),U&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&C1(E,yt===0?l:l+"_"+yt,a),h&&(e.flags&4)!==0||(il===null&&(il=[]),il.push(E,yt===0?n:n+"_"+yt,t.memoizedProps)),yt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:fs(e,t.child,l,n,a,i,o)&&(h=!0));t=t.sibling}return h}function Td(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,n=e.stateNode,a=pl(l,n),i=bl(l.default,l.update),o;o=e.memoizedState,e.memoizedState=null,n=e;var h=e.child;yt=0,a=fs(n,h,a,a,i,o,!1),(e.flags&4)!==0&&a&&va(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Td(e);e=e.sibling}}var nt=!1,ze=!1,rl=!1,ds=!1,Fd=typeof WeakSet=="function"?WeakSet:Set,at=null,cl=!1,vi=!1,Hu=!1,xs=!1;function vg(e,t,l){if(e=e.containerInfo,Ls=Ta,e=Bf(e),Pr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var h=0,E=-1,j=-1,U=0,I=0,T=e,R=null;t:for(;;){for(var ie;T!==n||i!==0&&T.nodeType!==3||(E=h+i),T!==o||a!==0&&T.nodeType!==3||(j=h+a),T.nodeType===3&&(h+=T.nodeValue.length),(ie=T.firstChild)!==null;)R=T,T=ie;for(;;){if(T===e)break t;if(R===n&&++U===i&&(E=h),R===o&&++I===a&&(j=h),(ie=T.nextSibling)!==null)break;T=R,R=T.parentNode}T=ie}n=E===-1||j===-1?null:{start:E,end:j}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hs={focusedElem:e,selectionRange:n},Ta=!1,l=(l&335544064)===l,at=t,t=l?9270:1024;at!==null;){if(e=at,l&&(n=e.deletions,n!==null))for(i=0;i<n.length;i++)l&&ss(n[i]);if(e.alternate===null&&(e.flags&2)!==0)l&&Ad(e),Uu(l);else{if(e.tag===22){if(n=e.alternate,e.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&ss(n),Uu(l);continue}else if(n!==null&&n.memoizedState!==null){l&&Ad(e),Uu(l);continue}}n=e.child,(e.subtreeFlags&t)!==0&&n!==null?(n.return=e,at=n):(l&&wd(e),Uu(l))}}Ft=null}function Uu(e){for(;at!==null;){var t=at,l=e,n=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((a&1024)!==0&&n!==null){l=void 0,a=n.memoizedProps,n=n.memoizedState;var i=t.stateNode;try{var o=kn(t.type,a);l=i.getSnapshotBeforeUpdate(o,n),i.__reactInternalSnapshotBeforeUpdate=l}catch(h){Re(t,t.return,h)}}break;case 3:if((a&1024)!==0){if(n=t.stateNode.containerInfo,l=n.nodeType,l===9)Vs(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Vs(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&n!==null&&(l=pl(n.memoizedProps,n.stateNode),a=t.memoizedProps,a=bl(a.default,a.update),a!=="none"&&fa(n,l,a,n.memoizedState=[],!0));break;default:if((a&1024)!==0)throw Error(c(163))}if(n=t.sibling,n!==null){n.return=t.return,at=n;break}at=t.return}}function jd(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:sl(e,l),n&4&&pi(5,l);break;case 1:if(sl(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Re(l,l.return,o)}else{var a=kn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Re(l,l.return,o)}}n&64&&vd(l),n&512&&al(l,l.return);break;case 3:if(sl(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{c0(e,t)}catch(o){Re(l,l.return,o)}}break;case 27:t===null&&n&4&&Ed(l);case 26:case 5:sl(e,l),t===null&&n&4&&ns(l),n&512&&al(l,l.return);break;case 12:sl(e,l);break;case 31:sl(e,l),n&4&&zd(e,l);break;case 13:sl(e,l),n&4&&_d(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=jg.bind(null,l),d2(e,l))));break;case 22:if(n=l.memoizedState!==null||nt,!n){var i=t!==null&&t.memoizedState!==null||ze;t=nt,a=ze,nt=n,(ze=i)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),Jt(e,l,n)):sl(e,l),nt=t,ze=a}break;case 30:sl(e,l),n&512&&al(l,l.return);break;case 7:n&512&&al(l,l.return);default:sl(e,l)}}function hs(e,t){for(e=e.child;e!==null;)Dd(e,t),e=e.sibling}function Dd(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var n=l.style;typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"}else{var a=e.stateNode,i=e.memoizedProps.style,o=i!=null&&i.hasOwnProperty("display")?i.display:null;a.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(E){Re(e,e.return,E)}ms(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Oe=!0}catch(E){Re(e,e.return,E)}break;case 18:try{var h=e.stateNode;t?A1(h,!0):A1(e.stateNode,!1)}catch(E){Re(e,e.return,E)}break;case 22:case 23:e.memoizedState===null&&hs(e,t);break;default:hs(e,t)}}function ms(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,n=t;switch(l.tag){case 4:Dd(l,n);break e;case 22:l.memoizedState===null&&ms(l,n);break e;default:ms(l,n)}}e=e.sibling}}function Od(e){var t=e.alternate;t!==null&&(e.alternate=null,Od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Xe=null,Nt=!1;function Zt(e,t,l){for(l=l.child;l!==null;)Bd(e,t,l),l=l.sibling}function Bd(e,t,l){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(qa,l)}catch{}switch(l.tag){case 26:ze||st(l,t),Zt(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!ze&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ze||st(l,t),bi(l);var n=Xe,a=Nt;en(l.type)&&(Xe=l.stateNode,Nt=!1),Zt(e,t,l),L1(l.stateNode,l.type,l.memoizedProps),Xe=n,Nt=a;break;case 5:ze||st(l,t),bi(l);case 6:if(l.tag===6&&bi(l),n=Xe,a=Nt,Xe=null,Zt(e,t,l),Xe=n,Nt=a,Xe!==null)if(Nt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(l.stateNode),Oe=!0}catch(i){Re(l,t,i)}else try{Xe.removeChild(l.stateNode),Oe=!0}catch(i){Re(l,t,i)}break;case 18:Xe!==null&&(Nt?(e=Xe,E1(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Fa(e)):E1(Xe,l.stateNode));break;case 4:n=Xe,a=Nt,Xe=l.stateNode.containerInfo,Nt=!0,Zt(e,t,l),Xe=n,Nt=a;break;case 0:case 11:case 14:case 15:Zl(2,l,t),ze||Zl(4,l,t),Zt(e,t,l);break;case 1:ze||(st(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&yd(l,t,n)),Zt(e,t,l);break;case 21:Zt(e,t,l);break;case 22:ze=(n=ze)||l.memoizedState!==null,Zt(e,t,l),ze=n;break;case 30:st(l,t),Zt(e,t,l);break;case 7:ze||st(l,t),Zt(e,t,l);break;default:Zt(e,t,l)}}function zd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fa(e)}catch(l){Re(t,t.return,l)}}}function _d(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fa(e)}catch(l){Re(t,t.return,l)}}function yg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Fd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Fd),t;default:throw Error(c(435,e.tag))}}function Gu(e,t){var l=yg(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var a=Dg.bind(null,e,n);n.then(a,a)}})}function gt(e,t,l){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],o=e,h=t,E=h;e:for(;E!==null;){switch(E.tag){case 27:if(en(E.type)){Xe=E.stateNode,Nt=!1;break e}break;case 5:Xe=E.stateNode,Nt=!1;break e;case 3:case 4:Xe=E.stateNode.containerInfo,Nt=!0;break e}E=E.return}if(Xe===null)throw Error(c(160));Bd(o,h,i),Xe=null,Nt=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rd(t,e,l),t=t.sibling}var Kt=null;function Rd(e,t,l){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(n=e.updateQueue,n=n!==null?n.events:null,n!==null))for(var i=0;i<n.length;i++){var o=n[i];o.ref.impl=o.nextImpl}gt(t,e,l),pt(e),a&4&&(Zl(3,e,e.return),pi(3,e),Zl(5,e,e.return));break;case 1:gt(t,e,l),pt(e),a&512&&(ze||n===null||st(n,n.return)),a&64&&nt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(i=Kt,gt(t,e,l),pt(e),a&512&&(ze||n===null||st(n,n.return)),a&4)if(a=n!==null?n.memoizedState:null,l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null)if(nt)e.stateNode=y1(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,a=i.ownerDocument||i;t:switch(t){case"title":n=a.getElementsByTagName("title")[0],(!n||n[Qa]||n[it]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=a.createElement(t),a.head.insertBefore(n,a.querySelector("head > title"))),ot(n,t,l),n[it]=e,tt(n),t=n;break e;case"link":if(i=X1("link","href",a).get(t+(l.href||""))){for(o=0;o<i.length;o++)if(n=i[o],n.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&n.getAttribute("rel")===(l.rel==null?null:l.rel)&&n.getAttribute("title")===(l.title==null?null:l.title)&&n.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(o,1);break t}}n=a.createElement(t),ot(n,t,l),a.head.appendChild(n);break;case"meta":if(i=X1("meta","content",a).get(t+(l.content||""))){for(o=0;o<i.length;o++)if(n=i[o],n.getAttribute("content")===(l.content==null?null:""+l.content)&&n.getAttribute("name")===(l.name==null?null:l.name)&&n.getAttribute("property")===(l.property==null?null:l.property)&&n.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&n.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(o,1);break t}}n=a.createElement(t),ot(n,t,l),a.head.appendChild(n);break;default:throw Error(c(468,t))}n[it]=e,tt(n),t=n}e.stateNode=t}else nt||Ps(i,e.type,e.stateNode);else e.stateNode=Y1(i,l,e.memoizedProps);else a!==l?(a===null?(t=n.stateNode,t===null||ze||t.parentNode.removeChild(t)):a.count--,l===null?nt||Ps(i,e.type,e.stateNode):Y1(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&as(e,e.memoizedProps,n.memoizedProps);break;case 27:gt(t,e,l),pt(e),a&512&&(ze||n===null||st(n,n.return)),n!==null&&a&4&&as(e,e.memoizedProps,n.memoizedProps);break;case 5:if(i=rl,rl=!1,gt(t,e,l),rl=i,pt(e),a&512&&(ze||n===null||st(n,n.return)),e.flags&32){t=e.stateNode;try{Zn(t,""),Oe=!0}catch(U){Re(e,e.return,U)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,as(e,t,n!==null?n.memoizedProps:t)),a&1024&&(ds=!0);break;case 6:if(gt(t,e,l),pt(e),a&4){if(e.stateNode===null)throw Error(c(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Oe=!0}catch(U){Re(e,e.return,U)}}break;case 3:if(Oe=!1,lr=null,i=Kt,Kt=ki(t.containerInfo),gt(t,e,l),Kt=i,pt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Fa(t.containerInfo)}catch(U){Re(e,e.return,U)}ds&&(ds=!1,Ld(e)),Oe=!1;break;case 4:a=rl,rl=nt,n=nf(),i=Kt,Kt=ki(e.stateNode.containerInfo),gt(t,e,l),pt(e),Kt=i,Oe&&vi&&(Hu=!0),Oe=n,rl=a;break;case 12:gt(t,e,l),pt(e);break;case 31:gt(t,e,l),pt(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Gu(e,t)));break;case 13:gt(t,e,l),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Xu=dt()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Gu(e,t)));break;case 22:i=e.memoizedState!==null,o=n!==null&&n.memoizedState!==null;var h=nt,E=ze,j=rl;nt=h||i,rl=j||i,ze=E||o,gt(t,e,l),ze=E,rl=j,nt=h,pt(e),a&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||n===null||o||nt||ze||(t=o||ze,l=nt,n=ze,nt=i||nt,ze=t,Kl(e,2),nt=l,ze=n),!i&&rl||hs(e,i)),a&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Gu(e,l))));break;case 19:gt(t,e,l),pt(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Gu(e,t)));break;case 30:a&512&&(ze||n===null||st(n,n.return)),a=nf(),i=vi,o=(l&335544064)===l,h=e.memoizedProps,vi=o&&bl(h.default,h.update)!=="none",gt(t,e,l),pt(e),o&&n!==null&&Oe&&(e.flags|=4),vi=i,Oe=a;break;case 21:break;case 7:a&512&&(ze||n===null||st(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=e);default:gt(t,e,l),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(Sd(n)){l=n;break}n=n.return}n=null;for(var a=e.return;a!==null;){if(ls(a)){var i=a.stateNode;n===null?n=[i]:n.push(i)}if(ts(a))break;a=a.return}var o=n;if(l==null)throw Error(c(160));switch(l.tag){case 27:var h=l.stateNode,E=is(e);zu(e,E,h,o);break;case 5:var j=l.stateNode;l.flags&32&&(Zn(j,""),l.flags&=-33);var U=is(e);zu(e,U,j,o);break;case 3:case 4:var I=l.stateNode.containerInfo,T=is(e);us(e,T,I,o);break;default:throw Error(c(161))}}catch(R){Re(e,e.return,R)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ld(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ld(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ta=!0,t.reset(),Ta=!1),e=e.sibling}}function da(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Hd(t,e),t=t.sibling;else Td(t)}function Hd(e,t){var l=e.alternate;if(l===null)rs(e,!1);else switch(e.tag){case 3:if(xs=cl=!1,Cd(),da(t,e),!cl&&!Hu){if(e=il,e!==null)for(var n=0;n<e.length;n+=3){l=e[n];var a=e[n+1];M1(l,e[n+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+a+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),xs=!0}il=null;break;case 5:da(t,e);break;case 4:n=cl,cl=!1,da(t,e),cl&&(Hu=!0),cl=n;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?rs(e,!1):da(t,e));break;case 30:n=cl,a=Cd(),cl=!1,da(t,e),cl&&(e.flags|=4);var i=e.memoizedProps,o=e.stateNode;t=pl(i,o),o=pl(l.memoizedProps,o);var h=bl(i.default,i.update);h==="none"?t=!1:(i=l.memoizedState,l.memoizedState=null,l=e.child,yt=0,t=fs(e,l,t,o,h,i,!0),yt!==(i===null?0:i.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(va(e,e.memoizedProps.onUpdate),il=a):a!==null&&(a.push.apply(a,il),il=a),cl=(e.flags&32)!==0?!0:n;break;default:da(t,e)}}function sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jd(e,t.alternate,t),t=t.sibling}function Kl(e,t){for(e=e.child;e!==null;){var l=e,n=t;switch(l.tag){case 0:case 11:case 14:case 15:Zl(4,l,l.return),Kl(l,n);break;case 1:st(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&yd(l,l.return,a),Kl(l,n);break;case 27:(n&2)!==0&&L1(l.stateNode,l.type,l.memoizedProps);case 5:st(l,l.return),l.tag!==5&&l.tag!==27||bi(l),Kl(l,n);break;case 6:bi(l);break;case 26:st(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||ze||a.parentNode.removeChild(a),Kl(l,n);break;case 22:l.memoizedState===null&&Kl(l,n);break;case 30:st(l,l.return),Kl(l,n);break;case 7:st(l,l.return);default:Kl(l,n)}e=e.sibling}}function Jt(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var n=t.alternate,a=e,i=t,o=i.flags,h=(l&1)!==0;switch(i.tag){case 0:case 11:case 15:Jt(a,i,l),pi(4,i);break;case 1:if(Jt(a,i,l),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(U){Re(n,n.return,U)}if(n=i,a=n.updateQueue,a!==null){var E=n.stateNode;try{var j=a.shared.hiddenCallbacks;if(j!==null)for(a.shared.hiddenCallbacks=null,a=0;a<j.length;a++)r0(j[a],E)}catch(U){Re(n,n.return,U)}}h&&o&64&&vd(i),al(i,i.return);break;case 27:(l&2)!==0&&Ed(i);case 5:i.tag!==5&&i.tag!==27||Nd(i),Jt(a,i,l),h&&n===null&&o&4&&ns(i),al(i,i.return);break;case 6:Nd(i);break;case 26:E=i.stateNode,i.memoizedState!==null||E===null||nt||Ps(ki(E.ownerDocument),i.type,E),Jt(a,i,l),h&&n===null&&o&4&&ns(i),al(i,i.return);break;case 12:Jt(a,i,l);break;case 31:Jt(a,i,l),h&&o&4&&zd(a,i);break;case 13:Jt(a,i,l),h&&o&4&&_d(a,i);break;case 22:i.memoizedState===null&&Jt(a,i,l),al(i,i.return);break;case 30:Jt(a,i,l),al(i,i.return);break;case 7:al(i,i.return);default:Jt(a,i,l)}t=t.sibling}}function gs(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ai(l))}function ps(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ai(e))}function Gt(e,t,l,n){var a=(l&335544064)===l;if(t.subtreeFlags&(a?10262:10256))for(t=t.child;t!==null;)Ud(e,t,l,n),t=t.sibling;else a&&kd(t)}function Ud(e,t,l,n){var a=(l&335544064)===l;a&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Lu(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,l,n),i&2048&&pi(9,t);break;case 1:Gt(e,t,l,n);break;case 3:Gt(e,t,l,n),a&&xs&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&ai(i)));break;case 12:if(i&2048){Gt(e,t,l,n),i=t.stateNode;try{var o=t.memoizedProps,h=o.id,E=o.onPostCommit;typeof E=="function"&&E(h,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(j){Re(t,t.return,j)}}else Gt(e,t,l,n);break;case 31:Gt(e,t,l,n);break;case 13:Gt(e,t,l,n);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?(a&&h!==null&&h.memoizedState===null&&Lu(h),o._visibility&2?Gt(e,t,l,n):yi(e,t)):(a&&h!==null&&h.memoizedState!==null&&Lu(t),o._visibility&2?Gt(e,t,l,n):(o._visibility|=2,xa(e,t,l,n,(t.subtreeFlags&10256)!==0||!1))),i&2048&&gs(h,t);break;case 24:Gt(e,t,l,n),i&2048&&ps(t.alternate,t);break;case 30:a&&(i=t.alternate,i!==null&&(ul(i.child,!0),ul(t.child,!0))),Gt(e,t,l,n);break;default:Gt(e,t,l,n)}}function xa(e,t,l,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=l,E=n,j=o.flags;switch(o.tag){case 0:case 11:case 15:xa(i,o,h,E,a),pi(8,o);break;case 23:break;case 22:var U=o.stateNode;o.memoizedState!==null?U._visibility&2?xa(i,o,h,E,a):yi(i,o):(U._visibility|=2,xa(i,o,h,E,a)),a&&j&2048&&gs(o.alternate,o);break;case 24:xa(i,o,h,E,a),a&&j&2048&&ps(o.alternate,o);break;default:xa(i,o,h,E,a)}t=t.sibling}}function yi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,a=n.flags;switch(n.tag){case 22:yi(l,n),a&2048&&gs(n.alternate,n);break;case 24:yi(l,n),a&2048&&ps(n.alternate,n);break;default:yi(l,n)}t=t.sibling}}var Tn=8192;function Fn(e,t,l){if(e.subtreeFlags&Tn)for(e=e.child;e!==null;)Gd(e,t,l),e=e.sibling}function Gd(e,t,l){switch(e.tag){case 26:Fn(e,t,l),e.flags&Tn&&(e.memoizedState!==null?M2(l,Kt,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&K1(l,e)));break;case 5:Fn(e,t,l),e.flags&Tn&&(e=e.stateNode,(t&335544128)===t&&K1(l,e));break;case 3:case 4:var n=Kt;Kt=ki(e.stateNode.containerInfo),Fn(e,t,l),Kt=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Tn,Tn=16777216,Fn(e,t,l),Tn=n):Fn(e,t,l));break;case 30:if((e.flags&Tn)!==0&&(n=e.memoizedProps.name,n!=null&&n!=="auto")){var a=e.stateNode;a.paired=null,Ft===null&&(Ft=new Map),Ft.set(n,a)}Fn(e,t,l);break;default:Fn(e,t,l)}}function qd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ni(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];at=n,Xd(n,e)}qd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yd(e),e=e.sibling}function Yd(e){switch(e.tag){case 0:case 11:case 15:Ni(e),e.flags&2048&&Zl(9,e,e.return);break;case 3:Ni(e);break;case 12:Ni(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qu(e)):Ni(e);break;default:Ni(e)}}function qu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];at=n,Xd(n,e)}qd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Zl(8,t,t.return),qu(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,qu(t));break;default:qu(t)}e=e.sibling}}function Xd(e,t){for(;at!==null;){var l=at;switch(l.tag){case 0:case 11:case 15:Zl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ai(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,at=n;else e:for(l=e;at!==null;){n=at;var a=n.sibling,i=n.return;if(Od(n),n===l){at=null;break e}if(a!==null){a.return=i,at=a;break e}at=i}}}var Ng={getCacheForType:function(e){var t=ut(Ie),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ut(Ie).controller.signal}},Sg=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ue=null,ke=null,Fe=0,_e=0,jt=null,Jl=!1,ha=!1,bs=!1,wl=0,Ze=0,Il=0,jn=0,Yu=0,Dt=0,ma=0,Si=null,St=null,vs=!1,Xu=0,Qd=0,Qu=1/0,Vu=null,Wl=null,Qe=0,It=null,Dn=null,ol=0,ys=0,Ns=null,Vd=null,ga=null,pa=null,ba=null,Ei=0,Zu=null;function Ot(){return(Be&2)!==0&&Fe!==0?Fe&-Fe:de.T!==null?js():Ko()}function Zd(){if(Dt===0)if((Fe&536870912)===0||Me){var e=Gi;Gi<<=1,(Gi&3932160)===0&&(Gi=262144),Dt=e}else Dt=536870912;return e=rt.current,e!==null&&(e.flags|=32),Dt}function va(e,t){if(t!=null){var l=e.stateNode,n=l.ref;n===null&&(n=l.ref=w1(pl(e.memoizedProps,l))),pa===null&&(pa=[]),pa.push(t.bind(null,n))}}function Et(e,t,l){(e===Ue&&(_e===2||_e===9)||e.cancelPendingCommit!==null)&&(ya(e,0),$l(e,Fe,Dt,!1)),Xa(e,l),((Be&2)===0||e!==Ue)&&(e===Ue&&((Be&2)===0&&(jn|=l),Ze===4&&$l(e,Fe,Dt,!1)),fl(e))}function Kd(e,t,l){if((Be&6)!==0)throw Error(c(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ya(e,t),a=n?Cg(e,t):Es(e,t,!0),i=n;do{if(a===0){ha&&!n&&$l(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Eg(l)){a=Es(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;a=Si;var E=h.current.memoizedState.isDehydrated;if(E&&(ya(h,o).flags|=256),o=Es(h,o,!1),o!==2&&o!==6){if(bs&&!E){h.errorRecoveryDisabledLanes|=i,jn|=i,a=4;break e}i=St,St=a,i!==null&&(St===null?St=i:St.push.apply(St,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){ya(e,0),$l(e,t,0,!0);break}e:{switch(n=e,i=a,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:$l(n,t,Dt,!Jl);break e;case 2:St=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(a=Xu+300-dt(),10<a)){if($l(n,t,Dt,!Jl),Yi(n,0,!0)!==0)break e;ol=t,n.timeoutHandle=qs(Jd.bind(null,n,l,St,Vu,vs,t,Dt,jn,ma,Jl,i,"Throttled",-0,0),a);break e}Jd(n,l,St,Vu,vs,t,Dt,jn,ma,Jl,i,null,-0,0)}}break}while(!0);fl(e)}function Jd(e,t,l,n,a,i,o,h,E,j,U,I,T,R){e.timeoutHandle=-1;var ie=t.subtreeFlags,oe=(i&335544064)===i;if(I=null,(oe||ie&8192||(ie&16785408)===16785408)&&(I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tl},Ft=null,Gd(t,i,I),oe&&(ie=I,oe=e.containerInfo,oe=(oe.nodeType===9?oe:oe.ownerDocument).__reactViewTransition,oe!=null&&(ie.count++,ie.waitingForViewTransition=!0,ie=ji.bind(ie),oe.finished.then(ie,ie))),ie=(i&62914560)===i?Xu-dt():(i&4194048)===i?Qd-dt():0,ie=w2(I,ie),ie!==null)){ol=i,e.cancelPendingCommit=ie(n1.bind(null,e,t,i,l,n,a,o,h,E,j,U,I,null,T,R)),$l(e,i,o,!j);return}n1(e,t,i,l,n,a,o,h,E,j,U,I)}function Eg(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],i=a.getSnapshot;a=a.value;try{if(!kt(i(),a))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 $l(e,t,l,n){t=Yo(e,t),t&=~Yu,t&=~jn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var i=31-Mt(a),o=1<<i;n[i]=-1,a&=~o}l!==0&&Qo(e,l,t)}function Ku(){return(Be&6)===0?(Ai(0),!1):!0}function Ss(){if(ke!==null){if(_e===0)var e=ke.return;else e=ke,Nl=vn=null,Fc(e),ua=null,ri=0,e=ke;for(;e!==null;)bd(e.alternate,e),e=e.return;ke=null}}function ya(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,Zg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ol=0,Ss(),Ue=e,ke=l=vl(e.current,null),Fe=t,_e=0,jt=null,Jl=!1,ha=Ya(e,t),bs=!1,ma=Dt=Yu=jn=Il=Ze=0,St=Si=null,vs=!1,wl=Yo(e,t),lu(),l}function Id(e,t){Se=null,de.H=wu,t===ia||t===xu?(t=n0(),_e=3):t===pc?(t=n0(),_e=4):_e=t===Qc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,ke===null&&(Ze=1,ku(e,Rt(t,e.current)))}function Wd(){var e=rt.current;return e===null?!0:(Fe&4194048)===Fe?xt===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===xt:!1}function $d(){var e=de.H;return de.H=wu,e===null?wu:e}function Pd(){var e=de.A;return de.A=Ng,e}function Ju(){Ze=4,Jl||(Fe&4194048)!==Fe&&rt.current!==null||(ha=!0),(Il&134217727)===0&&(jn&134217727)===0||Ue===null||$l(Ue,Fe,Dt,!1)}function Es(e,t,l){var n=Be;Be|=2;var a=$d(),i=Pd();(Ue!==e||Fe!==t)&&(Vu=null,ya(e,t)),t=!1;var o=Ze;e:do try{if(_e!==0&&ke!==null){var h=ke,E=jt;switch(_e){case 8:Ss(),o=6;break e;case 3:case 2:case 9:case 6:rt.current===null&&(t=!0);var j=_e;if(_e=0,jt=null,Na(e,h,E,j),l&&ha){o=0;break e}break;default:j=_e,_e=0,jt=null,Na(e,h,E,j)}}Ag(),o=Ze;break}catch(U){Id(e,U)}while(!0);return t&&e.shellSuspendCounter++,Nl=vn=null,Be=n,de.H=a,de.A=i,ke===null&&(Ue=null,Fe=0,lu()),o}function Ag(){for(;ke!==null;)e1(ke)}function Cg(e,t){var l=Be;Be|=2;var n=$d(),a=Pd();Ue!==e||Fe!==t?(Vu=null,Qu=dt()+500,ya(e,t)):ha=Ya(e,t);e:do try{if(_e!==0&&ke!==null){t=ke;var i=jt;t:switch(_e){case 1:_e=0,jt=null,Na(e,t,i,1);break;case 2:case 9:if(t0(i)){_e=0,jt=null,t1(t);break}t=function(){_e!==2&&_e!==9||Ue!==e||(_e=7),fl(e)},i.then(t,t);break e;case 3:_e=7;break e;case 4:_e=5;break e;case 7:t0(i)?(_e=0,jt=null,t1(t)):(_e=0,jt=null,Na(e,t,i,7));break;case 5:var o=null;switch(ke.tag){case 26:o=ke.memoizedState;case 5:case 27:var h=ke;if(o?V1(o):h.stateNode.complete){_e=0,jt=null;var E=h.sibling;if(E!==null)ke=E;else{var j=h.return;j!==null?(ke=j,Iu(j)):ke=null}break t}}_e=0,jt=null,Na(e,t,i,5);break;case 6:_e=0,jt=null,Na(e,t,i,6);break;case 8:Ss(),Ze=6;break e;default:throw Error(c(462))}}Mg();break}catch(U){Id(e,U)}while(!0);return Nl=vn=null,de.H=n,de.A=a,Be=l,ke!==null?0:(Ue=null,Fe=0,lu(),Ze)}function Mg(){for(;ke!==null&&!jr();)e1(ke)}function e1(e){var t=gd(e.alternate,e,wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):ke=t}function t1(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=sd(l,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=sd(l,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:Fc(t);var n=t;n===lt&&(Me?(cu(n),n.tag===5&&n.stateNode!=null&&(qe=n.stateNode)):(cu(n),Me=!0));default:bd(l,t),t=ke=Xf(t,wl),t=gd(l,t,wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):ke=t}function Na(e,t,l,n){Nl=vn=null,Fc(t),ua=null,ri=0;var a=t.return;try{if(xg(e,a,t,l,Fe)){Ze=1,ku(e,Rt(l,e.current)),ke=null;return}}catch(i){if(a!==null)throw ke=a,i;Ze=1,ku(e,Rt(l,e.current)),ke=null;return}t.flags&32768?(Me||n===1?e=!0:ha||(Fe&536870912)!==0?e=!1:(Jl=e=!0,(n===2||n===9||n===3||n===6)&&(n=rt.current,n!==null&&n.tag===13&&(n.flags|=16384))),l1(t,e)):Iu(t)}function Iu(e){var t=e;do{if((t.flags&32768)!==0){l1(t,Jl);return}e=t.return;var l=pg(t.alternate,t,wl);if(l!==null){ke=l;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Ze===0&&(Ze=5)}function l1(e,t){do{var l=bg(e.alternate,e);if(l!==null){l.flags&=32767,ke=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=l}while(e!==null);Ze=6,ke=null}function n1(e,t,l,n,a,i,o,h,E,j,U,I){e.cancelPendingCommit=null;do Wu();while(Qe!==0);if((Be&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));e===Ue&&(ke=Ue=null,Fe=0),Dn=t,It=e,ol=l,Ns=a,Vd=n,wg(e,t,l,o,h,E,I)}}function wg(e,t,l,n,a,i,o){var h=t.lanes|t.childLanes;if(ys=h,h|=ac,Ph(e,l,h,n,a,i),pa=null,(l&335544064)===l?(ba=tg(e),n=10262):(ba=null,n=10256),(t.subtreeFlags&n)!==0||(t.flags&n)!==0?(e.callbackNode=null,e.callbackPriority=0,Og(Hi,function(){return ws(),null})):(e.callbackNode=null,e.callbackPriority=0),_u=!1,n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=de.T,de.T=null,a=ve.p,ve.p=2,i=Be,Be|=4;try{vg(e,t,l)}finally{Be=i,ve.p=a,de.T=n}}Qe=1,_u?ga=Pg(o,e.containerInfo,ba,As,Cs,Tg,Ms,ws,kg):(As(),Cs(),Ms())}function kg(e){if(Qe!==0){var t=It.onRecoverableError;t(e,{componentStack:null})}}function Tg(){Qe===3&&(Qe=0,Hd(Dn,It),Qe=4)}function As(){if(Qe===1){Qe=0;var e=It,t=Dn,l=ol,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=de.T,de.T=null;var a=ve.p;ve.p=2;var i=Be;Be|=4;try{vi=Hu=!1,Rd(t,e,l),l=Hs;var o=Bf(e.containerInfo),h=l.focusedElem,E=l.selectionRange;if(o!==h&&h&&h.ownerDocument&&Of(h.ownerDocument.documentElement,h)){if(E!==null&&Pr(h)){var j=E.start,U=E.end;if(U===void 0&&(U=j),"selectionStart"in h)h.selectionStart=j,h.selectionEnd=Math.min(U,h.value.length);else{var I=h.ownerDocument||document,T=I&&I.defaultView||window;if(T.getSelection){var R=T.getSelection(),ie=h.textContent.length,oe=Math.min(E.start,ie),Ee=E.end===void 0?oe:Math.min(E.end,ie);!R.extend&&oe>Ee&&(o=Ee,Ee=oe,oe=o);var F=Df(h,oe),C=Df(h,Ee);if(F&&C&&(R.rangeCount!==1||R.anchorNode!==F.node||R.anchorOffset!==F.offset||R.focusNode!==C.node||R.focusOffset!==C.offset)){var z=I.createRange();z.setStart(F.node,F.offset),R.removeAllRanges(),oe>Ee?(R.addRange(z),R.extend(C.node,C.offset)):(z.setEnd(C.node,C.offset),R.addRange(z))}}}}for(I=[],R=h;R=R.parentNode;)R.nodeType===1&&I.push({element:R,left:R.scrollLeft,top:R.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<I.length;h++){var J=I[h];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Ta=!!Ls,Hs=Ls=null}finally{Be=i,ve.p=a,de.T=n}}e.current=t,Qe=2}}function Cs(){if(Qe===2){Qe=0;var e=It,t=Dn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=de.T,de.T=null;var n=ve.p;ve.p=2;var a=Be;Be|=4;try{jd(e,t.alternate,t)}finally{Be=a,ve.p=n,de.T=l}}Qe=3}}function Ms(){if(Qe===4||Qe===3){Qe=0;var e=ga;ga=null,Dr();var t=It,l=Dn,n=ol,a=Vd,i=(n&335544064)===n?10262:10256;if((l.subtreeFlags&i)!==0||(l.flags&i)!==0?Qe=5:(Qe=0,Dn=It=null,a1(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(Wl=null),zr(n),l=l.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(qa,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=de.T,i=ve.p,ve.p=2,de.T=null;try{for(var o=t.onRecoverableError,h=0;h<a.length;h++){var E=a[h];o(E.value,{componentStack:E.stack})}}finally{de.T=l,ve.p=i}}if(a=pa,o=ba,ba=null,a!==null&&(pa=null,o===null&&(o=[]),e!==null))for(E=0;E<a.length;E++)l=(0,a[E])(o),l!==void 0&&e.finished.finally(l);(ol&3)!==0&&Wu(),fl(t),i=t.pendingLanes,(n&261930)!==0&&(i&42)!==0?t===Zu?Ei++:(Ei=0,Zu=t):(Ei=0,Zu=null),Ai(0)}}function a1(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ai(t)))}function Wu(){return ga!==null&&(ga.skipTransition(),ga=null),As(),Cs(),Ms(),ws()}function ws(){if(Qe!==5)return!1;var e=It,t=ys;ys=0;var l=zr(ol),n=de.T,a=ve.p;try{ve.p=32>l?32:l,de.T=null,l=Ns,Ns=null;var i=It,o=ol;if(Qe=0,Dn=It=null,ol=0,(Be&6)!==0)throw Error(c(331));var h=Be;if(Be|=4,Yd(i.current),Ud(i,i.current,o,l),Be=h,Ai(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(qa,i)}catch{}return!0}finally{ve.p=a,de.T=n,a1(e,t)}}function i1(e,t,l){t=Rt(l,t),t=Xc(e.stateNode,t,2),e=Yl(e,t,2),e!==null&&(Xa(e,2),fl(e))}function Re(e,t,l){if(e.tag===3)i1(e,e,l);else for(;t!==null;){if(t.tag===3){i1(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Wl===null||!Wl.has(n))){e=Rt(l,e),l=td(2),n=Yl(t,l,2),n!==null&&(ld(l,n,t,e),Xa(n,2),fl(n));break}}t=t.return}}function ks(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new Sg;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(bs=!0,a.add(l),e=Fg.bind(null,e,t,l),t.then(e,e))}function Fg(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ue===e&&(Fe&l)===l&&((Ze===4||Ze===3&&(Fe&62914560)===Fe&&300>dt()-Xu)&&(Be&2)===0?ya(e,0):Yu|=l,ma===Fe&&(ma=0)),fl(e)}function u1(e,t){t===0&&(t=Xo()),e=gn(e,t),e!==null&&(Xa(e,t),fl(e))}function jg(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),u1(e,l)}function Dg(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),u1(e,l)}function Og(e,t){return Un(e,t)}var Sa=null,Ea=null,Ts=!1,$u=!1,Fs=!1,Pl=0;function fl(e){e!==Ea&&e.next===null&&(Ea===null?Sa=Ea=e:Ea=Ea.next=e),$u=!0,Ts||(Ts=!0,zg())}function Ai(e,t){if(!Fs&&$u){Fs=!0;do for(var l=!1,n=Sa;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var o=n.suspendedLanes,h=n.pingedLanes;i=(1<<31-Mt(42|e)+1)-1,i&=a&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,o1(n,i))}else i=Fe,i=Yi(n,n===Ue?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||Ya(n,i)||(l=!0,o1(n,i));n=n.next}while(l);Fs=!1}}function Bg(){r1()}function r1(){$u=Ts=!1;var e=0;Pl!==0&&Vg()&&(e=Pl);for(var t=dt(),l=null,n=Sa;n!==null;){var a=n.next,i=c1(n,t);i===0?(n.next=null,l===null?Sa=a:l.next=a,a===null&&(Ea=l)):(l=n,(e!==0||(i&3)!==0)&&($u=!0)),n=a}Qe!==0&&Qe!==5||Ai(e),Pl!==0&&(Pl=0)}function c1(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-Mt(i),h=1<<o,E=a[o];E===-1?((h&l)===0||(h&n)!==0)&&(a[o]=$h(h,t)):E<=t&&(e.expiredLanes|=h),i&=~h}if(t=Ue,l=Fe,l=Yi(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(_e===2||_e===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Gn(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ya(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&Gn(n),zr(l)){case 2:case 8:l=Go;break;case 32:l=Hi;break;case 268435456:l=qo;break;default:l=Hi}return n=s1.bind(null,e),l=Un(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&Gn(n),e.callbackPriority=2,e.callbackNode=null,2}function s1(e,t){if(Qe!==0&&Qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Wu()&&e.callbackNode!==l)return null;var n=Fe;return n=Yi(e,e===Ue?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Kd(e,n,t),c1(e,dt()),e.callbackNode!=null&&e.callbackNode===l?s1.bind(null,e):null)}function o1(e,t){if(Wu())return null;Kd(e,t,!0)}function zg(){Kg(function(){(Be&6)!==0?Un(Uo,Bg):r1()})}function js(){if(Pl===0){var e=Sn;e===0&&(e=Ui,Ui<<=1,(Ui&261888)===0&&(Ui=256)),Pl=e}return Pl}function f1(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ki(e)}function _g(e,t,l,n,a){if(t==="submit"&&l&&l.stateNode===a){var i=f1((a[bt]||null).action),o=n.submitter;o&&(t=(t=o[bt]||null)?f1(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new $i("action","action",null,n,a);e.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Pl!==0){var E=new FormData(a,o);Hc(l,{pending:!0,data:E,method:a.method,action:i},null,E)}}else typeof i=="function"&&(h.preventDefault(),E=new FormData(a,o),Hc(l,{pending:!0,data:E,method:a.method,action:i},i,E))},currentTarget:a}]})}}for(var Ds=0;Ds<nc.length;Ds++){var Os=nc[Ds],Rg=Os.toLowerCase(),Lg=Os[0].toUpperCase()+Os.slice(1);Vt(Rg,"on"+Lg)}Vt(Rf,"onAnimationEnd"),Vt(Lf,"onAnimationIteration"),Vt(Hf,"onAnimationStart"),Vt("dblclick","onDoubleClick"),Vt("focusin","onFocus"),Vt("focusout","onBlur"),Vt(Zm,"onTransitionRun"),Vt(Km,"onTransitionStart"),Vt(Jm,"onTransitionCancel"),Vt(Uf,"onTransitionEnd"),Qn("onMouseEnter",["mouseout","mouseover"]),Qn("onMouseLeave",["mouseout","mouseover"]),Qn("onPointerEnter",["pointerout","pointerover"]),Qn("onPointerLeave",["pointerout","pointerover"]),xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xn("onBeforeInput",["compositionend","keypress","textInput","paste"]),xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),Hg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function d1(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var h=n[o],E=h.instance,j=h.currentTarget;if(h=h.listener,E!==i&&a.isPropagationStopped())break e;i=h,a.currentTarget=j;try{i(a)}catch(U){tu(U)}a.currentTarget=null,i=E}else for(o=0;o<n.length;o++){if(h=n[o],E=h.instance,j=h.currentTarget,h=h.listener,E!==i&&a.isPropagationStopped())break e;i=h,a.currentTarget=j;try{i(a)}catch(U){tu(U)}a.currentTarget=null,i=E}}}}function Te(e,t){var l=t[Io];l===void 0&&(l=t[Io]=new Set);var n=e+"__bubble";l.has(n)||(x1(t,e,2,!1),l.add(n))}function Bs(e,t,l){var n=0;t&&(n|=4),x1(l,e,n,t)}var Pu="_reactListening"+Math.random().toString(36).slice(2);function zs(e){if(!e[Pu]){e[Pu]=!0,Po.forEach(function(l){l!=="selectionchange"&&(Hg.has(l)||Bs(l,!1,e),Bs(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pu]||(t[Pu]=!0,Bs("selectionchange",!1,t))}}function x1(e,t,l,n){switch(lx(t)){case 2:var a=j2;break;case 8:a=D2;break;default:a=to}l=a.bind(null,t,l,e),a=void 0,!Yr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,l,{capture:!0,passive:a}):e.addEventListener(t,l,!0):a!==void 0?e.addEventListener(t,l,{passive:a}):e.addEventListener(t,l,!1)}function _s(e,t,l,n,a){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var h=n.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=n.return;o!==null;){var E=o.tag;if((E===3||E===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=dn(h),o===null)return;if(E=o.tag,E===5||E===6||E===26||E===27){n=i=o;continue e}h=h.parentNode}}n=n.return}xf(function(){var j=i,U=Gr(l),I=[];e:{var T=Gf.get(e);if(T!==void 0){var R=$i,ie=e;switch(e){case"keypress":if(Ii(l)===0)break e;case"keydown":case"keyup":R=Em;break;case"focusin":ie="focus",R=Zr;break;case"focusout":ie="blur",R=Zr;break;case"beforeblur":case"afterblur":R=Zr;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":R=gf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":R=fm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":R=km;break;case Rf:case Lf:case Hf:R=hm;break;case Uf:R=Fm;break;case"scroll":case"scrollend":R=sm;break;case"wheel":R=Dm;break;case"copy":case"cut":case"paste":R=gm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":R=bf;break;case"submit":R=Mm;break;case"toggle":case"beforetoggle":R=Bm}var oe=(t&4)!==0,Ee=!oe&&(e==="scroll"||e==="scrollend"),F=oe?T!==null?T+"Capture":null:T;oe=[];for(var C=j,z;C!==null;){var J=C;if(z=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||z===null||F===null||(J=Za(C,F),J!=null&&oe.push(Mi(C,J,z))),Ee)break;C=C.return}0<oe.length&&(T=new R(T,ie,null,l,U),I.push({event:T,listeners:oe}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",T=e==="mouseout"||e==="pointerout",R&&l!==Ur&&(ie=l.relatedTarget||l.fromElement)&&(dn(ie)||ie[qn]))break e;(T||R)&&(ie=U.window===U?U:(R=U.ownerDocument)?R.defaultView||R.parentWindow:window,T?(R=l.relatedTarget||l.toElement,T=j,R=R?dn(R):null,R!==null&&(Ee=x(R),oe=R.tag,R!==Ee||oe!==5&&oe!==27&&oe!==6)&&(R=null)):(T=null,R=j),T!==R&&(oe=gf,J="onMouseLeave",F="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(oe=bf,J="onPointerLeave",F="onPointerEnter",C="pointer"),Ee=T==null?ie:Va(T),z=R==null?ie:Va(R),ie=new oe(J,C+"leave",T,l,U),ie.target=Ee,ie.relatedTarget=z,J=null,dn(U)===j&&(oe=new oe(F,C+"enter",R,l,U),oe.target=z,oe.relatedTarget=Ee,J=oe),Ee=J,oe=T&&R?H(T,R,Ug):null,T!==null&&h1(I,ie,T,oe,!1),R!==null&&Ee!==null&&h1(I,Ee,R,oe,!0)))}e:{if(T=j?Va(j):window,R=T.nodeName&&T.nodeName.toLowerCase(),R==="select"||R==="input"&&T.type==="file")var se=Mf;else if(Af(T))if(wf)se=Xm;else{se=qm;var je=Gm}else R=T.nodeName,!R||R.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?j&&Hr(j.elementType)&&(se=Mf):se=Ym;if(se&&(se=se(e,j))){Cf(I,se,l,U);break e}je&&je(e,T,j)}switch(je=j?Va(j):window,e){case"focusin":(Af(je)||je.contentEditable==="true")&&(Wn=je,ec=j,ti=null);break;case"focusout":ti=ec=Wn=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,zf(I,l,U);break;case"selectionchange":if(Vm)break;case"keydown":case"keyup":zf(I,l,U)}var xe;if(Jr)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else In?Sf(e,l)&&(be="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(be="onCompositionStart");be&&(vf&&l.locale!=="ko"&&(In||be!=="onCompositionStart"?be==="onCompositionEnd"&&In&&(xe=hf()):(Bl=U,Xr="value"in Bl?Bl.value:Bl.textContent,In=!0)),je=er(j,be),0<je.length&&(be=new pf(be,e,null,l,U),I.push({event:be,listeners:je}),xe?be.data=xe:(xe=Ef(l),xe!==null&&(be.data=xe)))),(xe=_m?Rm(e,l):Lm(e,l))&&(be=er(j,"onBeforeInput"),0<be.length&&(je=new pf("onBeforeInput","beforeinput",null,l,U),I.push({event:je,listeners:be}),je.data=xe)),_g(I,e,j,l,U)}d1(I,t)})}function Mi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function er(e,t){for(var l=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Za(e,l),a!=null&&n.unshift(Mi(e,a,i)),a=Za(e,t),a!=null&&n.push(Mi(e,a,i))),e.tag===3)return n;e=e.return}return[]}function Ug(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function h1(e,t,l,n,a){for(var i=t._reactName,o=[];l!==null&&l!==n;){var h=l,E=h.alternate,j=h.stateNode;if(h=h.tag,E!==null&&E===n)break;h!==5&&h!==26&&h!==27||j===null||(E=j,a?(j=Za(l,i),j!=null&&o.unshift(Mi(l,j,E))):a||(j=Za(l,i),j!=null&&o.push(Mi(l,j,E)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var Gg=/\r\n?/g,qg=/\u0000|\uFFFD/g;function m1(e){return(typeof e=="string"?e:""+e).replace(Gg,`
|
|
49
|
+
`).replace(qg,"")}function g1(e,t){return t=m1(t),m1(e)===t}function Le(e,t,l,n,a,i){switch(l){case"children":if(typeof n=="string")t==="body"||t==="textarea"&&n===""||Zn(e,n);else if(typeof n=="number"||typeof n=="bigint")t!=="body"&&Zn(e,""+n);else return;break;case"className":Zi(e,"class",n);break;case"tabIndex":Zi(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Zi(e,l,n);break;case"style":ff(e,n,i);return;case"data":if(t!=="object"){Zi(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Ki(n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&Le(e,t,"name",a.name,a,null),Le(e,t,"formEncType",a.formEncType,a,null),Le(e,t,"formMethod",a.formMethod,a,null),Le(e,t,"formTarget",a.formTarget,a,null)):(Le(e,t,"encType",a.encType,a,null),Le(e,t,"method",a.method,a,null),Le(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Ki(n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=tl);return;case"onScroll":n!=null&&Te("scroll",e);return;case"onScrollEnd":n!=null&&Te("scrollend",e);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));i?.__html!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=Ki(n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":Te("beforetoggle",e),Te("toggle",e),Vi(e,"popover",n);break;case"xlinkActuate":ml(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":ml(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":ml(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":ml(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":ml(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":ml(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":ml(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":ml(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":ml(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Vi(e,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=rm.get(l)||l,Vi(e,l,n);else return}Oe=!0}function Rs(e,t,l,n,a,i){switch(l){case"style":ff(e,n,i);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));i?.__html!==l&&(e.innerHTML=l)}}break;case"children":if(typeof n=="string")Zn(e,n);else if(typeof n=="number"||typeof n=="bigint")Zn(e,""+n);else return;break;case"onScroll":n!=null&&Te("scroll",e);return;case"onScrollEnd":n!=null&&Te("scrollend",e);return;case"onClick":n!=null&&(e.onclick=tl);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!ef.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),i=l.slice(2,a?l.length-7:void 0),t=e[bt]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(i,t,a),typeof n=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(i,n,a);break e}Oe=!0,l in e?e[l]=n:n===!0?e.setAttribute(l,""):Vi(e,l,n)}return}Oe=!0}function ot(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var n=!1,a=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Le(e,t,i,o,l,null)}}a&&Le(e,t,"srcSet",l.srcSet,l,null),n&&Le(e,t,"src",l.src,l,null);return;case"input":Te("invalid",e);var h=i=o=a=null,E=null,j=null;for(n in l)if(l.hasOwnProperty(n)){var U=l[n];if(U!=null)switch(n){case"name":a=U;break;case"type":o=U;break;case"checked":E=U;break;case"defaultChecked":j=U;break;case"value":i=U;break;case"defaultValue":h=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(c(137,t));break;default:Le(e,t,n,U,l,null)}}rf(e,i,h,E,j,o,a,!1);return;case"select":Te("invalid",e),n=o=i=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":n=h;default:Le(e,t,a,h,l,null)}t=i,l=o,e.multiple=!!n,t!=null?Vn(e,!!n,t,!1):l!=null&&Vn(e,!!n,l,!0);return;case"textarea":Te("invalid",e),i=a=n=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":n=h;break;case"defaultValue":a=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:Le(e,t,o,h,l,null)}sf(e,n,a,i);return;case"option":for(E in l)if(l.hasOwnProperty(E)&&(n=l[E],n!=null))switch(E){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Le(e,t,E,n,l,null)}return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(n=0;n<Ci.length;n++)Te(Ci[n],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in l)if(l.hasOwnProperty(j)&&(n=l[j],n!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Le(e,t,j,n,l,null)}return;default:if(Hr(t)){for(U in l)l.hasOwnProperty(U)&&(n=l[U],n!==void 0&&Rs(e,t,U,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&Le(e,t,h,n,l,null))}var Yg={};function Xg(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,h=null,E=null,j=null,U=null;for(R in l){var I=l[R];if(l.hasOwnProperty(R)&&I!=null)switch(R){case"checked":break;case"value":break;case"defaultValue":E=I;default:n.hasOwnProperty(R)||Le(e,t,R,null,n,I)}}for(var T in n){var R=n[T];if(I=l[T],n.hasOwnProperty(T)&&(R!=null||I!=null))switch(T){case"type":R!==I&&(Oe=!0),i=R;break;case"name":R!==I&&(Oe=!0),a=R;break;case"checked":R!==I&&(Oe=!0),j=R;break;case"defaultChecked":R!==I&&(Oe=!0),U=R;break;case"value":R!==I&&(Oe=!0),o=R;break;case"defaultValue":R!==I&&(Oe=!0),h=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(c(137,t));break;default:R!==I&&Le(e,t,T,R,n,I)}}Rr(e,o,h,E,j,U,i,a);return;case"select":R=o=h=T=null;for(i in l)if(E=l[i],l.hasOwnProperty(i)&&E!=null)switch(i){case"value":break;case"multiple":R=E;default:n.hasOwnProperty(i)||Le(e,t,i,null,n,E)}for(a in n)if(i=n[a],E=l[a],n.hasOwnProperty(a)&&(i!=null||E!=null))switch(a){case"value":i!==E&&(Oe=!0),T=i;break;case"defaultValue":i!==E&&(Oe=!0),h=i;break;case"multiple":i!==E&&(Oe=!0),o=i;default:i!==E&&Le(e,t,a,i,n,E)}t=h,l=o,n=R,T!=null?Vn(e,!!l,T,!1):!!n!=!!l&&(t!=null?Vn(e,!!l,t,!0):Vn(e,!!l,l?[]:"",!1));return;case"textarea":R=T=null;for(h in l)if(a=l[h],l.hasOwnProperty(h)&&a!=null&&!n.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Le(e,t,h,null,n,a)}for(o in n)if(a=n[o],i=l[o],n.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":a!==i&&(Oe=!0),T=a;break;case"defaultValue":a!==i&&(Oe=!0),R=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(c(91));break;default:a!==i&&Le(e,t,o,a,n,i)}cf(e,T,R);return;case"option":for(var ie in l)if(T=l[ie],l.hasOwnProperty(ie)&&T!=null&&!n.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Le(e,t,ie,null,n,T)}for(E in n)if(T=n[E],R=l[E],n.hasOwnProperty(E)&&T!==R&&(T!=null||R!=null))switch(E){case"selected":T!==R&&(Oe=!0),e.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:Le(e,t,E,T,n,R)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in l)T=l[oe],l.hasOwnProperty(oe)&&T!=null&&!n.hasOwnProperty(oe)&&Le(e,t,oe,null,n,T);for(j in n)if(T=n[j],R=l[j],n.hasOwnProperty(j)&&T!==R&&(T!=null||R!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(c(137,t));break;default:Le(e,t,j,T,n,R)}return;default:if(Hr(t)){for(var Ee in l)T=l[Ee],l.hasOwnProperty(Ee)&&T!==void 0&&!n.hasOwnProperty(Ee)&&Rs(e,t,Ee,void 0,n,T);for(U in n)T=n[U],R=l[U],!n.hasOwnProperty(U)||T===R||T===void 0&&R===void 0||Rs(e,t,U,T,n,R);return}}for(var F in l)T=l[F],l.hasOwnProperty(F)&&T!=null&&!n.hasOwnProperty(F)&&Le(e,t,F,null,n,T);for(I in n)T=n[I],R=l[I],!n.hasOwnProperty(I)||T===R||T==null&&R==null||Le(e,t,I,T,n,R)}function p1(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Qg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],i=a.transferSize,o=a.initiatorType,h=a.duration;if(i&&h&&p1(o)){for(o=0,h=a.responseEnd,n+=1;n<l.length;n++){var E=l[n],j=E.startTime;if(j>h)break;var U=E.transferSize,I=E.initiatorType;U&&p1(I)&&(E=E.responseEnd,o+=U*(E<h?1:(h-j)/(E-j)))}if(--n,t+=8*(i+o)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ls=null,Hs=null;function wi(e){return e.nodeType===9?e:e.ownerDocument}function b1(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function v1(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function y1(e,t,l,n){return l=wi(l).createElement(e),l[it]=n,l[bt]=t,ot(l,e,t),tt(l),l}function Us(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gs=null;function Vg(){var e=window.event;return e&&e.type==="popstate"?e===Gs?!1:(Gs=e,!0):(Gs=null,!1)}var qs=typeof setTimeout=="function"?setTimeout:void 0,Zg=typeof clearTimeout=="function"?clearTimeout:void 0,N1=typeof Promise=="function"?Promise:void 0,S1=typeof requestAnimationFrame=="function"?requestAnimationFrame:qs,Kg=typeof queueMicrotask=="function"?queueMicrotask:typeof N1<"u"?function(e){return N1.resolve(null).then(e).catch(Jg)}:qs;function Jg(e){setTimeout(function(){throw e})}function en(e){return e==="head"}function E1(e,t){var l=t,n=0;do{var a=l.nextSibling;if(e.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(a),Fa(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Is(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Is(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[Qa]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&Is(e.ownerDocument.body);l=a}while(l);Fa(t)}function A1(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function C1(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var n=1;else for(var a=n=0;a<t.length;a++){var i=t[a];0<i.width&&0<i.height&&n++}n===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function M1(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Ig(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function Ys(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return Ig(t,l,e)}function Wg(e){return e.documentElement.clientHeight}function $g(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Pg(e,t,l,n,a,i,o,h,E){var j=t.nodeType===9?t:t.ownerDocument;try{var U=j.startViewTransition({update:function(){var T=j.defaultView,R=T.navigation&&T.navigation.transition,ie=j.fonts.status;n();var oe=[];if(ie==="loaded"&&(Wg(j),j.fonts.status==="loading"&&oe.push(j.fonts.ready)),ie=oe.length,e!==null)for(var Ee=e.suspenseyImages,F=0,C=0;C<Ee.length;C++){var z=Ee[C];if(!z.complete){var J=z.getBoundingClientRect();if(0<J.bottom&&0<J.right&&J.top<T.innerHeight&&J.left<T.innerWidth){if(F+=Z1(z),F>nr){oe.length=ie;break}z=new Promise($g.bind(z)),oe.push(z)}}}if(0<oe.length)return T=Promise.race([Promise.all(oe),new Promise(function(se){return setTimeout(se,500)})]).then(a,a),(R?Promise.allSettled([R.finished,T]):T).then(i,i);if(a(),R)return R.finished.then(i,i);i()},types:l});j.__reactViewTransition=U;var I=[];return U.ready.then(function(){for(var T=j.documentElement.getAnimations({subtree:!0}),R=0;R<T.length;R++){var ie=T[R],oe=ie.effect,Ee=oe.pseudoElement;if(Ee!=null&&Ee.startsWith("::view-transition")){I.push(ie),ie=oe.getKeyframes();for(var F=Ee=void 0,C=!0,z=0;z<ie.length;z++){var J=ie[z],se=J.width;if(Ee===void 0)Ee=se;else if(Ee!==se){C=!1;break}if(se=J.height,F===void 0)F=se;else if(F!==se){C=!1;break}delete J.width,delete J.height,J.transform==="none"&&delete J.transform}C&&Ee!==void 0&&F!==void 0&&(oe.setKeyframes(ie),C=getComputedStyle(oe.target,oe.pseudoElement),C.width!==Ee||C.height!==F)&&(C=ie[0],C.width=Ee,C.height=F,C=ie[ie.length-1],C.width=Ee,C.height=F,oe.setKeyframes(ie))}}o()},function(T){j.__reactViewTransition===U&&(j.__reactViewTransition=null);try{if(typeof T=="object"&&T!==null)switch(T.name){case"InvalidStateError":(T.message==="View transition was skipped because document visibility state is hidden."||T.message==="Skipping view transition because document visibility state has become hidden."||T.message==="Skipping view transition because viewport size changed."||T.message==="Transition was aborted because of invalid state")&&(T=null)}T!==null&&E(T)}finally{n(),a(),o()}}),U.finished.finally(function(){for(var T=0;T<I.length;T++)I[T].cancel();j.__reactViewTransition===U&&(j.__reactViewTransition=null),h()}),U}catch{return n(),a(),o(),null}}function On(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}On.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:V({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},On.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),n=[],a=0;a<l.length;a++){var i=l[a].effect;i!==null&&i.target===e&&i.pseudoElement===t&&n.push(l[a])}return n},On.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function w1(e){return{name:e,group:new On("group",e),imagePair:new On("image-pair",e),old:new On("old",e),new:new On("new",e)}}function Bt(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Bt.prototype.addEventListener=function(e,t,l){var n=null,a=null;if(!(l!=null&&typeof l!="boolean"&&(n=l.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(T1(i,e,t,l)===-1){var o=this,h=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(h=function(E){o.removeEventListener(e,t,l),typeof t=="function"?t.call(this,E):t.handleEvent(E)}),n!==null&&(a=o.removeEventListener.bind(o,e,t,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=Aa(l),i.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:h,cleanup:a}),p(this._fragmentFiber.child,!1,e2,e,h,n)}this._eventListeners=i}};function e2(e,t,l,n){return B(e).addEventListener(t,l,n),!1}Bt.prototype.removeEventListener=function(e,t,l){var n=this._eventListeners;if(n!==null&&(t=T1(n,e,t,l),t!==-1)){var a=n[t];l=a.attachedListener;var i=a.cleanup;a=Aa(a.optionsOrUseCapture),p(this._fragmentFiber.child,!1,t2,e,l,a),n.splice(t,1),i!==null&&i()}};function t2(e,t,l,n){return B(e).removeEventListener(t,l,n),!1}function Aa(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function k1(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function T1(e,t,l,n){if(e.length===0)return-1;n=k1(n);for(var a=0;a<e.length;a++){var i=e[a];if(i.type===t&&i.listener===l&&k1(i.optionsOrUseCapture)===n)return a}return-1}Bt.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=B(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var n=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var a=0;a<l.length;a++){var i=l[a];n.addEventListener(i.type,i.attachedListener,Aa(i.optionsOrUseCapture))}if(t.appendChild(n),e=n.dispatchEvent(e),l)for(a=0;a<l.length;a++)i=l[a],n.removeEventListener(i.type,i.attachedListener,Aa(i.optionsOrUseCapture));return t.removeChild(n),e}return t.dispatchEvent(e)},Bt.prototype.focus=function(e){p(this._fragmentFiber.child,!0,F1,e,void 0,void 0)};function F1(e,t){return e.tag===6?!1:(e=B(e),x2(e,t))}Bt.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Xs,t,void 0,void 0);for(var l=t.length-1;0<=l&&!F1(t[l],e);l--);};function Xs(e,t){return t.push(e),!1}Bt.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=B(e),e=wi(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,l2,e,void 0,void 0))};function l2(e,t){return e.tag===6?!1:(e=B(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Bt.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,n2,e,void 0,void 0)};function n2(e,t){return e.tag===6||(e=B(e),t.observe(e)),!1}Bt.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,a2,e,void 0,void 0);for(var l=t=0;l<Wt.length;l++){var n=Wt[l];n.fragmentInstance===this&&n.observer===e?e.unobserve(n.instance):Wt[t++]=n}Wt.length=t}};function a2(e,t){return e.tag===6||(e=B(e),t.unobserve(e)),!1}var Wt=[],Qs=!1;function i2(e,t,l){Wt.push({fragmentInstance:e,observer:t,instance:l}),Qs||(Qs=!0,h2(function(){Qs=!1;var n=Wt;Wt=[];for(var a=0;a<n.length;a++){var i=n[a];i.observer.unobserve(i.instance)}}))}Bt.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,u2,e,void 0,void 0),e};function u2(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=B(e),t.push.apply(t,e.getClientRects());return!1}Bt.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:B(t).getRootNode(e)},Bt.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];p(this._fragmentFiber.child,!1,Xs,l,void 0,void 0);var n=B(t);if(l.length===0){if(l=n,w(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var a=n=l.compareDocumentPosition(e);return l===e?a=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=M(t)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(e=B(l).compareDocumentPosition(e),a=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),a|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=B(l[0]),a=B(l[l.length-1]);var i=w(this._fragmentFiber)?t.parentElement:n;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),h=a.compareDocumentPosition(e),E=o&Node.DOCUMENT_POSITION_CONTAINED_BY||h&Node.DOCUMENT_POSITION_CONTAINED_BY;return h=n&&i&&o&Node.DOCUMENT_POSITION_FOLLOWING&&h&Node.DOCUMENT_POSITION_PRECEDING,t=n&&t===e||i&&a===e||E||h?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&t===e||!i&&a===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||r2(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function r2(e,t,l,n,a){var i=dn(a);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){l=!0;break e}i=i.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=a.ownerDocument,a===i||a===i.documentElement||a===i.body;e:{for(i=t,t=b(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===l)&&(t=H(l,i,ue),t===null?t=!1:(p(t,!0,ee,i,l),i=L,L=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===n)&&(t=H(n,i,ue),t===null?t=!1:(p(t,!0,ce,i,n),i=L,$=L=null,t=i!==null)),t):!1}function j1(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Bt.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(c(566));var t=[];p(this._fragmentFiber.child,!1,Xs,t,void 0,void 0);var l=e!==!1;if(t.length===0){var n=M(this._fragmentFiber);if(n=l?n[1]||n[0]||b(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){e=B(n),j1(e,l);return}if(n=B(n),n.nodeType!==9){if(n.nodeType===11){l="host"in n?n.host:null,l!==null&&l.scrollIntoView(e);return}n.scrollIntoView(e)}}for(n=l?t.length-1:0;n!==(l?-1:t.length);){var a=t[n];a.tag===6?(a=B(a),j1(a,l)):B(a).scrollIntoView(e),n+=l?-1:1}};function c2(e,t){return e=B(e),D1(e,t),!1}function D1(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function O1(e,t){var l=t._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];e.addEventListener(a.type,a.attachedListener,Aa(a.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(i){for(var o=0,h=0;h<Wt.length;h++){var E=Wt[h];(E.fragmentInstance!==t||E.observer!==i||E.instance!==e)&&(Wt[o++]=E)}Wt.length=o,i.observe(e)}),D1(e,t))}function s2(e,t){var l=t._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];e.removeEventListener(a.type,a.attachedListener,Aa(a.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(i){typeof i.rootMargin=="string"?i2(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Vs(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Vs(l),Qi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function o2(e,t,l,n){for(;e.nodeType===1;){var a=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Qa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=qt(e.nextSibling),e===null)break}return null}function f2(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=qt(e.nextSibling),e===null))return null;return e}function B1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qt(e.nextSibling),e===null))return null;return e}function Zs(e){return e.data==="$?"||e.data==="$~"}function Ks(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function d2(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function qt(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Js=null;function z1(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return qt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function _1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function x2(e,t){function l(){n=!0}if(e.ownerDocument.activeElement===e)return!0;var n=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return n}function h2(e){S1(function(){S1(function(t){return e(t)})})}function R1(e,t,l){switch(t=wi(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function L1(e,t,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&Le(e,t,n,null,Yg,a)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===tl&&(e.onclick=null),Qi(e)}function Is(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qi(e)}var Yt=new Map,H1=new Set;function ki(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var kl=ve.d;ve.d={f:m2,r:g2,D:p2,C:b2,L:v2,m:y2,X:S2,S:N2,M:E2};function m2(){var e=kl.f(),t=Ku();return e||t}function g2(e){var t=Yn(e);t!==null&&t.tag===5&&t.type==="form"?G0(t):kl.r(e)}var Ca=typeof document>"u"?null:document;function U1(e,t,l){var n=Ca;if(n&&typeof t=="string"&&t){var a=zt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),H1.has(a)||(H1.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),ot(t,"link",e),tt(t),n.head.appendChild(t)))}}function p2(e){kl.D(e),U1("dns-prefetch",e,null)}function b2(e,t){kl.C(e,t),U1("preconnect",e,t)}function v2(e,t,l){kl.L(e,t,l);var n=Ca;if(n&&e&&t){var a='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+zt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+zt(l.imageSizes)+'"]')):a+='[href="'+zt(e)+'"]';var i=a;switch(t){case"style":i=Ma(e);break;case"script":i=wa(e)}if(!(Yt.has(i)||(e=V({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Yt.set(i,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(Ti(i))||t==="script"&&n.querySelector(Fi(i))))){var o=n.createElement("link");ot(o,"link",e),t==="style"&&(o[Xi]=!0,o.onload=o.onerror=function(){$o(o)}),tt(o),n.head.appendChild(o)}}}function y2(e,t){kl.m(e,t);var l=Ca;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+zt(n)+'"][href="'+zt(e)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=wa(e)}if(!Yt.has(i)&&(e=V({rel:"modulepreload",href:e},t),Yt.set(i,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Fi(i)))return}n=l.createElement("link"),ot(n,"link",e),tt(n),l.head.appendChild(n)}}}function N2(e,t,l){kl.S(e,t,l);var n=Ca;if(n&&e){var a=Xn(n).hoistableStyles,i=Ma(e);t=t||"default";var o=a.get(i);if(!o){var h={loading:0,preload:null};if(o=n.querySelector(Ti(i)))h.loading=5;else{e=V({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Yt.get(i))&&Ws(e,l);var E=o=n.createElement("link");tt(E),ot(E,"link",e),E._p=new Promise(function(j,U){E.onload=j,E.onerror=U}),E.addEventListener("load",function(){h.loading|=1}),E.addEventListener("error",function(){h.loading|=2}),h.loading|=4,tr(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(i,o)}}}function S2(e,t){kl.X(e,t);var l=Ca;if(l&&e){var n=Xn(l).hoistableScripts,a=wa(e),i=n.get(a);i||(i=l.querySelector(Fi(a)),i||(e=V({src:e,async:!0},t),(t=Yt.get(a))&&$s(e,t),i=l.createElement("script"),tt(i),ot(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function E2(e,t){kl.M(e,t);var l=Ca;if(l&&e){var n=Xn(l).hoistableScripts,a=wa(e),i=n.get(a);i||(i=l.querySelector(Fi(a)),i||(e=V({src:e,async:!0,type:"module"},t),(t=Yt.get(a))&&$s(e,t),i=l.createElement("script"),tt(i),ot(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function G1(e,t,l,n){var a=(a=At.current)?ki(a):null;if(!a)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ma(l.href),t=Xn(a).hoistableStyles,n=t.get(l),n||(n={type:"style",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ma(l.href);var i=Xn(a).hoistableStyles,o=i.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=a.querySelector(Ti(e)))?i._p||(o.instance=i,o.state.loading=5):(i=Yt.get(e),i||(i={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Yt.set(e,i)),A2(a,e,i,o.state))),t&&n===null)throw Error(c(528,""));return o}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=wa(l),t=Xn(a).hoistableScripts,n=t.get(l),n||(n={type:"script",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Ma(e){return'href="'+zt(e)+'"'}function Ti(e){return'link[rel="stylesheet"]['+e+"]"}function q1(e){return V({},e,{"data-precedence":e.precedence,precedence:null})}function A2(e,t,l,n){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Xi]!==!0){n.loading=1;return}}else t=e.createElement("link"),t[Xi]=!0,t.onload=t.onerror=$o.bind(null,t),ot(t,"link",l),tt(t),e.head.appendChild(t);n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2})}function wa(e){return'[src="'+zt(e)+'"]'}function Fi(e){return"script[async]"+e}function Y1(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+zt(l.href)+'"]');if(n)return t.instance=n,tt(n),n;var a=V({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),tt(n),ot(n,"style",a),tr(n,l.precedence,e),t.instance=n;case"stylesheet":a=Ma(l.href);var i=e.querySelector(Ti(a));if(i)return t.state.loading|=4,t.instance=i,tt(i),i;n=q1(l),(a=Yt.get(a))&&Ws(n,a),i=(e.ownerDocument||e).createElement("link"),tt(i);var o=i;return o._p=new Promise(function(h,E){o.onload=h,o.onerror=E}),ot(i,"link",n),t.state.loading|=4,tr(i,l.precedence,e),t.instance=i;case"script":return i=wa(l.src),(a=e.querySelector(Fi(i)))?(t.instance=a,tt(a),a):(n=l,(a=Yt.get(i))&&(n=V({},l),$s(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),tt(a),ot(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,tr(n,l.precedence,e));return t.instance}function tr(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,o=0;o<n.length;o++){var h=n[o];if(h.dataset.precedence===t)i=h;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Ws(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $s(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var lr=null;function X1(e,t,l){if(lr===null){var n=new Map,a=lr=new Map;a.set(l,n)}else a=lr,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),a=0;a<l.length;a++){var i=l[a];if(!(i[Qa]||i[it]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=n.get(o);h?h.push(i):n.set(o,[i])}}return n}function Ps(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function C2(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Q1(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function V1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Z1(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function K1(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Z1(t),e.suspenseyImages.push(t)),e=k2.bind(e),t.decode().then(e,e))}function M2(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Ma(n.href),i=t.querySelector(Ti(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ji.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,tt(i);return}i=t.ownerDocument||t,n=q1(n),(a=Yt.get(a))&&Ws(n,a),i=i.createElement("link"),tt(i);var o=i;o._p=new Promise(function(h,E){o.onload=h,o.onerror=E}),ot(i,"link",n),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=ji.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var nr=0;function w2(e,t){return e.stylesheets&&e.count===0&&ir(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&ir(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&nr===0&&(nr=62500*Qg());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ir(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>nr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function J1(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ir(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ji(){this.count--,J1(this)}function k2(){this.imgCount--,J1(this)}var ar=null;function ir(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ar=new Map,t.forEach(T2,e),ar=null,ji.call(e))}function T2(e,t){if(!(t.state.loading&4)){var l=ar.get(e);if(l)var n=l.get(null);else{l=new Map,ar.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),n=o)}n&&l.set(null,n)}a=t.instance,o=a.getAttribute("data-precedence"),i=l.get(o)||n,i===n&&l.set(null,a),l.set(o,a),this.count++,n=ji.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var ka={$$typeof:Y,Provider:null,Consumer:null,_currentValue:Xt,_currentValue2:Xt,_threadCount:0};function F2(e,t,l,n,a,i,o,h,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Or(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Or(0),this.hiddenUpdates=Or(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.transitionTypes=null,this.incompleteTransitions=new Map}function I1(e,t,l,n,a,i,o,h,E,j,U,I){return e=new F2(e,t,l,o,E,j,U,I,h),t=1,i===!0&&(t|=24),i=vt(3,null,null,t),e.current=i,i.stateNode=e,t=hc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:l,cache:t},bc(i),e}function W1(e){return e?(e=ea,e):ea}function $1(e,t,l,n,a,i){a=W1(a),n.context===null?n.context=a:n.pendingContext=a,n=ql(t),n.payload={element:l},i=i===void 0?null:i,i!==null&&(n.callback=i),l=Yl(e,n,t),l!==null&&(Et(l,e,t),ci(l,e,t))}function P1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function eo(e,t){P1(e,t),(e=e.alternate)&&P1(e,t)}function ex(e){if(e.tag===13||e.tag===31){var t=gn(e,67108864);t!==null&&Et(t,e,67108864),eo(e,67108864)}}function tx(e){if(e.tag===13||e.tag===31){var t=Ot();t=Br(t);var l=gn(e,t);l!==null&&Et(l,e,t),eo(e,t)}}var Ta=!0;function j2(e,t,l,n){var a=de.T;de.T=null;var i=ve.p;try{ve.p=2,to(e,t,l,n)}finally{ve.p=i,de.T=a}}function D2(e,t,l,n){var a=de.T;de.T=null;var i=ve.p;try{ve.p=8,to(e,t,l,n)}finally{ve.p=i,de.T=a}}function to(e,t,l,n){if(Ta){var a=lo(n);if(a===null)_s(e,t,n,ur,l),nx(e,n);else if(B2(a,e,t,l,n))n.stopPropagation();else if(nx(e,n),t&4&&-1<O2.indexOf(e)){for(;a!==null;){var i=Yn(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=fn(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var E=1<<31-Mt(o);h.entanglements[1]|=E,o&=~E}fl(i),(Be&6)===0&&(Qu=dt()+500,Ai(0))}}break;case 31:case 13:h=gn(i,2),h!==null&&Et(h,i,2),Ku(),eo(i,2)}if(i=lo(n),i===null&&_s(e,t,n,ur,l),i===a)break;a=i}a!==null&&n.stopPropagation()}else _s(e,t,n,null,l)}}function lo(e){return e=Gr(e),no(e)}var ur=null;function no(e){if(ur=null,e=dn(e),e!==null){var t=x(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=g(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ur=e,null}function lx(e){switch(e){case"beforetoggle":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"seeked":case"submit":case"toggle":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"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qh()){case Uo:return 2;case Go:return 8;case Hi:case Vh:return 32;case qo:return 268435456;default:return 32}default:return 32}}var ao=!1,tn=null,ln=null,nn=null,Di=new Map,Oi=new Map,an=[],O2="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".split(" ");function nx(e,t){switch(e){case"focusin":case"focusout":tn=null;break;case"dragenter":case"dragleave":ln=null;break;case"mouseover":case"mouseout":nn=null;break;case"pointerover":case"pointerout":Di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oi.delete(t.pointerId)}}function Bi(e,t,l,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Yn(t),t!==null&&ex(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function B2(e,t,l,n,a){switch(t){case"focusin":return tn=Bi(tn,e,t,l,n,a),!0;case"dragenter":return ln=Bi(ln,e,t,l,n,a),!0;case"mouseover":return nn=Bi(nn,e,t,l,n,a),!0;case"pointerover":var i=a.pointerId;return Di.set(i,Bi(Di.get(i)||null,e,t,l,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Oi.set(i,Bi(Oi.get(i)||null,e,t,l,n,a)),!0}return!1}function ax(e){var t=dn(e.target);if(t!==null){var l=x(t);if(l!==null){if(t=l.tag,t===13){if(t=g(l),t!==null){e.blockedOn=t,Jo(e.priority,function(){tx(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Jo(e.priority,function(){tx(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function rr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=lo(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);Ur=n,l.target.dispatchEvent(n),Ur=null}else return t=Yn(l),t!==null&&ex(t),e.blockedOn=l,!1;t.shift()}return!0}function ix(e,t,l){rr(e)&&l.delete(t)}function z2(){ao=!1,tn!==null&&rr(tn)&&(tn=null),ln!==null&&rr(ln)&&(ln=null),nn!==null&&rr(nn)&&(nn=null),Di.forEach(ix),Oi.forEach(ix)}function cr(e,t){e.blockedOn===t&&(e.blockedOn=null,ao||(ao=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,z2)))}var sr=null;function ux(e){sr!==e&&(sr=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){sr===e&&(sr=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(no(n||l)===null)continue;break}var i=Yn(l);i!==null&&(e.splice(t,3),t-=3,Hc(i,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Fa(e){function t(E){return cr(E,e)}tn!==null&&cr(tn,e),ln!==null&&cr(ln,e),nn!==null&&cr(nn,e),Di.forEach(t),Oi.forEach(t);for(var l=0;l<an.length;l++){var n=an[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<an.length&&(l=an[0],l.blockedOn===null);)ax(l),l.blockedOn===null&&an.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],i=l[n+1],o=a[bt]||null;if(typeof i=="function")o||ux(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[bt]||null)h=o.formAction;else if(no(a)!==null)continue}else h=o.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),ux(l)}}}function rx(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function io(e){this._internalRoot=e}or.prototype.render=io.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,n=Ot();$1(l,n,e,t,null,null)},or.prototype.unmount=io.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$1(e.current,2,null,e,null,null),Ku(),t[qn]=null}};function or(e){this._internalRoot=e}or.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ko();e={blockedOn:null,target:e,priority:t};for(var l=0;l<an.length&&t!==0&&t<an[l].priority;l++);an.splice(l,0,e),l===0&&ax(e)}};var cx=r.version;if(cx!=="19.3.0")throw Error(c(527,cx,"19.3.0"));ve.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=m(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var _2={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:de,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fr.isDisabled&&fr.supportsFiber)try{qa=fr.inject(_2),Ct=fr}catch{}}return _i.createRoot=function(e,t){if(!d(e))throw Error(c(299));var l=!1,n="",a=W0,i=$0,o=P0;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=I1(e,1,!1,null,null,l,n,null,a,i,o,rx),e[qn]=t.current,zs(e),new io(t)},_i.hydrateRoot=function(e,t,l){if(!d(e))throw Error(c(299));var n=!1,a="",i=W0,o=$0,h=P0,E=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(E=l.formState)),t=I1(e,1,!0,t,l??null,n,a,E,i,o,h,rx),t.context=W1(null),l=t.current,n=Ot(),n=Br(n),a=ql(n),a.callback=null,Yl(l,a,n),l=n,t.current.lanes=l,Xa(t,l),fl(t),e[qn]=t.current,zs(e),new or(t)},_i.version="19.3.0",_i}var bx;function Z2(){if(bx)return co.exports;bx=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(r){console.error(r)}}return u(),co.exports=V2(),co.exports}var K2=Z2();const J2=Hx(K2);/**
|
|
50
|
+
* @license lucide-react v1.55.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const I2=u=>u?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
55
|
+
* @license lucide-react v1.55.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/function W2(u,r,s=[]){if(r==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:I2(u),size:24,node:r,...s.length>0?{aliases:s}:{}}}/**
|
|
60
|
+
* @license lucide-react v1.55.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const $2=u=>{let r="",s=!1;for(const c of u){if(c==="-"||c==="_"||c<=" "){s=r.length>0;continue}r.length===0?r+=c.toLowerCase():r+=s?c.toUpperCase():c,s=!1}return r};/**
|
|
65
|
+
* @license lucide-react v1.55.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const P2=u=>{const r=$2(u);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
70
|
+
* @license lucide-react v1.55.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const No=(...u)=>u.filter((r,s,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===s).join(" ").trim();/**
|
|
75
|
+
* @license lucide-react v1.55.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const Bn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
80
|
+
* @license lucide-react v1.55.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/function xo(u){return u!=null}function ep(u,r={}){const s=r.attributeNames??{},c=b=>s[b]??b,d=u.size??u.width??Bn.width,x=u.size??u.height??Bn.height,g=u.aliases?.filter(b=>typeof b=="string"&&b.trim()!=="").map(b=>`lucide-${b}`)??[],v=[...u.name?[`lucide-${u.name}`]:[],...g],N=r.className?.split(" ").filter(Boolean)??[],m=r.includeDefaultClasses===!1?No(...N):No("lucide",...v,...N),y=r.absoluteStrokeWidth?Number(r.strokeWidth??Bn["stroke-width"])*Number(u.size??u.width??Bn.width)/Number(r.size??r.width??Bn.width):r.strokeWidth??Bn["stroke-width"];return["svg",{...Object.entries(Bn).reduce((b,[w,M])=>(b[c(w)]=M,b),{}),..."color"in r&&r.color&&{[c("stroke")]:r.color},..."size"in r&&xo(r.size)&&{[c("width")]:r.size,[c("height")]:r.size},..."width"in r&&xo(r.width)&&{[c("width")]:r.width},..."height"in r&&xo(r.height)&&{[c("height")]:r.height},[c("stroke-width")]:y,...m&&{[c("class")]:m},[c("viewBox")]:`0 0 ${d} ${x}`,...r.hasA11yProp===!1?{[c("aria-hidden")]:"true"}:{},..."attributes"in r&&r.attributes},u.node.map(b=>{const[w,M,Q]=b,B=r.nonScalingStroke?{[c("vector-effect")]:"non-scaling-stroke",...M}:M;return Q?[w,B,Q]:[w,B]})]}/**
|
|
85
|
+
* @license lucide-react v1.55.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/function tp(u,r={}){return ep(u,{...r,attributeNames:{...r.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
90
|
+
* @license lucide-react v1.55.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const lp=u=>{for(const r in u)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},np=fe.createContext({}),ap=()=>fe.useContext(np),ip=fe.forwardRef(({color:u,size:r,width:s,height:c,strokeWidth:d,absoluteStrokeWidth:x,nonScalingStroke:g,className:v="",children:N,iconNode:m=[],icon:y={node:m,aliases:[],size:24},...p},b)=>{const{size:w=24,strokeWidth:M=2,absoluteStrokeWidth:Q=!1,nonScalingStroke:B=!1,color:L="currentColor",className:$=""}=ap()??{},ee=!!N||lp(p),[ce,ue,H=[]]=tp(y,{color:u??L,width:s??r??w,height:c??r??w,strokeWidth:d??M,absoluteStrokeWidth:x??Q,nonScalingStroke:g??B,className:No($,v),hasA11yProp:ee,attributes:p});return fe.createElement(ce,{ref:b,...ue},[...H.map(([V,G])=>fe.createElement(V,G)),...Array.isArray(N)?N:[N]])});/**
|
|
95
|
+
* @license lucide-react v1.55.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/function we(u,r=[],s=[]){const c=typeof u=="string"?W2(u,r,s):u,d=fe.forwardRef(({className:x,...g},v)=>fe.createElement(ip,{ref:v,icon:c,className:x,...g}));return c.name&&(d.displayName=P2(c.name)),d}/**
|
|
100
|
+
* @license lucide-react v1.55.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Ux={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};Ux.node;const up=we(Ux);/**
|
|
105
|
+
* @license lucide-react v1.55.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Gx={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};Gx.node;const rp=we(Gx);/**
|
|
110
|
+
* @license lucide-react v1.55.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const qx={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};qx.node;const cp=we(qx);/**
|
|
115
|
+
* @license lucide-react v1.55.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const Yx={name:"bookmark",size:24,node:[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]};Yx.node;const sp=we(Yx);/**
|
|
120
|
+
* @license lucide-react v1.55.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const Xx={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Xx.node;const Qx=we(Xx);/**
|
|
125
|
+
* @license lucide-react v1.55.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Vx={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};Vx.node;const op=we(Vx);/**
|
|
130
|
+
* @license lucide-react v1.55.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const Zx={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};Zx.node;const fp=we(Zx);/**
|
|
135
|
+
* @license lucide-react v1.55.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const Kx={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};Kx.node;const dp=we(Kx);/**
|
|
140
|
+
* @license lucide-react v1.55.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const Jx={name:"heading-2",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]};Jx.node;const xp=we(Jx);/**
|
|
145
|
+
* @license lucide-react v1.55.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const Ix={name:"heading-1",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]};Ix.node;const hp=we(Ix);/**
|
|
150
|
+
* @license lucide-react v1.55.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const Wx={name:"highlighter",size:24,node:[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]};Wx.node;const mp=we(Wx);/**
|
|
155
|
+
* @license lucide-react v1.55.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const $x={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};$x.node;const gp=we($x);/**
|
|
160
|
+
* @license lucide-react v1.55.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Px={name:"key",size:24,node:[["path",{d:"m2 21 9.6-9.6",key:"9l79m3"}],["path",{d:"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19",key:"fw8biw"}],["circle",{cx:"15.5",cy:"7.5",r:"5.5",key:"4wxmhb"}]]};Px.node;const eh=we(Px);/**
|
|
165
|
+
* @license lucide-react v1.55.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const th={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};th.node;const pp=we(th);/**
|
|
170
|
+
* @license lucide-react v1.55.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const lh={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};lh.node;const bp=we(lh);/**
|
|
175
|
+
* @license lucide-react v1.55.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const nh={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};nh.node;const vp=we(nh);/**
|
|
180
|
+
* @license lucide-react v1.55.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const ah={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};ah.node;const yp=we(ah);/**
|
|
185
|
+
* @license lucide-react v1.55.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const ih={name:"palette",size:24,node:[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]};ih.node;const Np=we(ih);/**
|
|
190
|
+
* @license lucide-react v1.55.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const uh={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};uh.node;const Sp=we(uh);/**
|
|
195
|
+
* @license lucide-react v1.55.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const rh={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};rh.node;const ch=we(rh);/**
|
|
200
|
+
* @license lucide-react v1.55.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const sh={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};sh.node;const Ep=we(sh);/**
|
|
205
|
+
* @license lucide-react v1.55.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const oh={name:"rows-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}]],aliases:["rows"]};oh.node;const Ap=we(oh);/**
|
|
210
|
+
* @license lucide-react v1.55.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const fh={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};fh.node;const dh=we(fh);/**
|
|
215
|
+
* @license lucide-react v1.55.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const xh={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};xh.node;const Cp=we(xh);/**
|
|
220
|
+
* @license lucide-react v1.55.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const hh={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};hh.node;const Mp=we(hh);/**
|
|
225
|
+
* @license lucide-react v1.55.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const mh={name:"sliders-vertical",size:24,node:[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],aliases:["sliders"]};mh.node;const wp=we(mh);/**
|
|
230
|
+
* @license lucide-react v1.55.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const gh={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};gh.node;const So=we(gh);/**
|
|
235
|
+
* @license lucide-react v1.55.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const ph={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};ph.node;const ho=we(ph);/**
|
|
240
|
+
* @license lucide-react v1.55.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const bh={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};bh.node;const kp=we(bh);/**
|
|
245
|
+
* @license lucide-react v1.55.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const vh={name:"text-align-end",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],aliases:["align-right"]};vh.node;const Tp=we(vh);/**
|
|
250
|
+
* @license lucide-react v1.55.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const yh={name:"text-align-center",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],aliases:["align-center"]};yh.node;const Fp=we(yh);/**
|
|
255
|
+
* @license lucide-react v1.55.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const Nh={name:"text-align-start",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],aliases:["text","align-left"]};Nh.node;const jp=we(Nh);/**
|
|
260
|
+
* @license lucide-react v1.55.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Sh={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};Sh.node;const Eh=we(Sh);/**
|
|
265
|
+
* @license lucide-react v1.55.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const Ah={name:"type",size:24,node:[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]};Ah.node;const Dp=we(Ah);/**
|
|
270
|
+
* @license lucide-react v1.55.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Ch={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};Ch.node;const Op=we(Ch);/**
|
|
275
|
+
* @license lucide-react v1.55.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const Mh={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};Mh.node;const jo=we(Mh);/**
|
|
280
|
+
* @license lucide-react v1.55.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const wh={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};wh.node;const kh=we(wh);/**
|
|
285
|
+
* @license lucide-react v1.55.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const Th={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};Th.node;const Bp=we(Th),zp=({isOpen:u,onClose:r,currentKey:s,onSaveKey:c,isVerified:d})=>{const[x,g]=fe.useState(s),[v,N]=fe.useState(null);if(!u)return null;const m=()=>{c(x.trim()),N("密钥已更新并保存至本地存储"),setTimeout(()=>{r()},800)};return f.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 dark:bg-black/70 backdrop-blur-sm flex items-center justify-center p-4",children:f.jsxs("div",{className:"bg-white dark:bg-[#0f0f0f] border border-[#eaeaea] dark:border-[#262626] rounded-xl w-full max-w-md flex flex-col shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-150 transition-colors",children:[f.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[#eaeaea] dark:border-[#222222]",children:[f.jsxs("div",{className:"flex items-center gap-2 font-semibold text-sm text-[#171717] dark:text-white",children:[f.jsx(eh,{className:"w-4 h-4 text-amber-500 dark:text-amber-400"}),f.jsx("span",{children:"超管密钥授权"})]}),f.jsx("button",{onClick:r,className:"text-[#888888] hover:text-black dark:hover:text-white p-1 rounded-md hover:bg-[#f5f5f5] dark:hover:bg-[#1a1a1a]",children:f.jsx(jo,{className:"w-4 h-4"})})]}),f.jsxs("div",{className:"p-5 flex flex-col gap-4",children:[f.jsxs("div",{className:"text-xs text-[#666666] dark:text-[#888888] leading-relaxed",children:["服务端默认通过 ",f.jsx("code",{className:"text-black dark:text-[#ededed] font-mono font-semibold",children:"TYPESET_ADMIN_KEY"})," 保护模板持久化、图片上传和无头出图 API。请填入服务启动时控制台打印的管理员密钥。"]}),f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("label",{className:"text-[11px] font-mono text-[#888888] dark:text-[#666666]",children:"X-Admin-Key"}),f.jsx("input",{type:"password",value:x,onChange:y=>g(y.target.value),placeholder:"tsk_...",className:"bg-[#fafafa] dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#2a2a2a] rounded-lg px-3 py-2 text-xs font-mono text-black dark:text-white focus:outline-none focus:border-black dark:focus:border-[#444444]"})]}),v?f.jsxs("div",{className:"text-xs text-emerald-700 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/20 px-3 py-2 rounded-lg flex items-center gap-2 font-medium",children:[f.jsx(Qx,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:v})]}):d?f.jsxs("div",{className:"text-xs text-emerald-700 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/20 px-3 py-2 rounded-lg flex items-center gap-2 font-medium",children:[f.jsx(Cp,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"密钥已通过验证,拥有超管权限"})]}):f.jsx("div",{className:"text-xs text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20 px-3 py-2 rounded-lg",children:"当前密钥未验证或已失效,请检查后端 .env 配置"}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsx("button",{onClick:r,className:"px-3 py-1.5 rounded-lg border border-[#eaeaea] dark:border-[#262626] text-xs text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white hover:bg-[#f5f5f5] dark:hover:bg-[#161616]",children:"取消"}),f.jsx("button",{onClick:m,className:"px-4 py-1.5 bg-black text-white hover:bg-[#262626] dark:bg-white dark:text-black dark:hover:bg-[#eaeaea] text-xs font-semibold rounded-lg transition-all btn-vercel",children:"保存并授权"})]})]})]})})},vx={"wechat-cover-2.35":{id:"wechat-cover-2.35",name:"微信文章封面",ratio:2.35,width:2350,height:1e3,description:"微信公众号官方推荐大图封面 (2.35:1),适合主标题视觉张力、副标题与装饰图层",defaultSafeArea:{top:120,right:140,bottom:120,left:140}},"longform-3-4":{id:"longform-3-4",name:"通用长图文",ratio:3/4,width:1080,height:1440,description:"3:4 手机端阅读长文/图文卡片,支持多页分页、矩形图片绕排、目标填充率优化",defaultSafeArea:{top:96,right:88,bottom:96,left:88}},"wide-16-9":{id:"wide-16-9",name:"通用宽屏",ratio:16/9,width:1920,height:1080,description:"16:9 横版宽屏,适合推特/X 动态配图、技术博客 Banner、视频封面与分栏排版",defaultSafeArea:{top:100,right:120,bottom:100,left:120}},"square-1-1":{id:"square-1-1",name:"通用正方形",ratio:1,width:1200,height:1200,description:"1:1 正方形卡片,适合金句名言卡、公众号次条、小红书方图与社交媒体方版海报",defaultSafeArea:{top:100,right:100,bottom:100,left:100}}};function Tl(u){return vx[u]??vx["longform-3-4"]}function zn(u,r,s=20){const c=Math.max(100,u.width-r.left-r.right),d=Math.max(100,u.height-r.top-r.bottom-s);return{stageWidth:c,stageHeight:d,stageX:r.left,stageY:r.top}}const _p={pattern:"none",color:"#527561",opacity:.12,size:56},Rp={style:"none",color:"#527561",endColor:"#d7ad72",width:3,inset:32,radius:24,opacity:.8},Fh={none:"无花纹",lines:"横线",grid:"网格",dots:"圆点",diagonal:"斜线",waves:"波浪",rings:"同心圆",burst:"放射线",checker:"棋盘格",grain:"纸张颗粒"},jh={none:"无边框",solid:"实线",dashed:"虚线",double:"双线",corners:"四角装饰",gradient:"渐变描边"};function Dh(u){if(u===void 0)return;if(!u||typeof u!="object"||Array.isArray(u))throw new RangeError("无效的背景与边框配置");const r=c=>{if(typeof c!="string"||!/^#[0-9a-f]{6}$/i.test(c))throw new RangeError("背景装饰颜色必须是六位十六进制颜色")},s=(c,d,x)=>{if(!Number.isFinite(c)||c<d||c>x)throw new RangeError(`背景装饰参数必须在 ${d} 到 ${x} 之间`)};if(u.fill){const c=u.fill;if(c.type==="solid")r(c.color);else{if(c.type==="linear")s(c.angle,0,360);else if(c.type==="radial")s(c.position?.x,0,100),s(c.position?.y,0,100);else throw new RangeError("未知背景类型");if(!Array.isArray(c.stops)||c.stops.length<2||c.stops.length>8)throw new RangeError("渐变需要 2 到 8 个颜色节点");for(const d of c.stops){if(!d)throw new RangeError("无效的渐变节点");r(d.color),s(d.offset,0,100)}}}if(u.pattern){const c=u.pattern;if(!Object.hasOwn(Fh,c.pattern))throw new RangeError("未知背景花纹");r(c.color),s(c.opacity,0,1),s(c.size,16,240)}if(u.border){const c=u.border;if(!Object.hasOwn(jh,c.style))throw new RangeError("未知边框样式");r(c.color),r(c.endColor),s(c.width,1,24),s(c.inset,0,200),s(c.radius,0,200),s(c.opacity,0,1)}}function Lp(u,r,s){if(u.save(),s.type==="solid")u.fillStyle=s.color;else{let c;if(s.type==="linear"){const d=s.angle*Math.PI/180,x=Math.abs(Math.cos(d))*r.width/2+Math.abs(Math.sin(d))*r.height/2,g=Math.cos(d)*x,v=Math.sin(d)*x;c=u.createLinearGradient(r.width/2-g,r.height/2-v,r.width/2+g,r.height/2+v)}else{const d=r.width*s.position.x/100,x=r.height*s.position.y/100,g=Math.hypot(Math.max(d,r.width-d),Math.max(x,r.height-x));c=u.createRadialGradient(d,x,0,d,x,g)}for(const d of s.stops)c.addColorStop(d.offset/100,d.color);u.fillStyle=c}u.fillRect(0,0,r.width,r.height),u.restore()}function Hp(u,r,s){if(s.pattern==="none"||s.opacity===0)return;const{width:c,height:d}=r,x=Math.max(16,s.size);switch(u.save(),u.strokeStyle=u.fillStyle=s.color,u.globalAlpha=s.opacity,u.lineWidth=1.5,u.beginPath(),s.pattern){case"grid":case"lines":if(s.pattern==="grid")for(let g=x/2;g<c;g+=x)u.moveTo(g,0),u.lineTo(g,d);for(let g=x/2;g<d;g+=x)u.moveTo(0,g),u.lineTo(c,g);break;case"dots":for(let g=x/2;g<c;g+=x)for(let v=x/2;v<d;v+=x)u.moveTo(g+2,v),u.arc(g,v,2,0,Math.PI*2);break;case"diagonal":for(let g=-d;g<c;g+=x)u.moveTo(g,0),u.lineTo(g+d,d);break;case"waves":for(let g=-x;g<d+x;g+=x){u.moveTo(0,g);for(let v=0;v<c;v+=x*2)u.bezierCurveTo(v+x*.5,g-x*.45,v+x*1.5,g+x*.45,v+x*2,g)}break;case"rings":for(let g=x;g<Math.hypot(c,d);g+=x)u.moveTo(c*.82+g,d*.18),u.arc(c*.82,d*.18,g,0,Math.PI*2);break;case"burst":for(let g=0;g<Math.PI*2;g+=Math.PI/Math.max(8,Math.round(x/3)))u.moveTo(c*.8,d*.2),u.lineTo(c*.8+Math.cos(g)*c*2,d*.2+Math.sin(g)*d*2);break;case"checker":for(let g=0;g<c;g+=x)for(let v=0;v<d;v+=x)(Math.round(g/x)+Math.round(v/x))%2===0&&u.rect(g,v,x,x);break;case"grain":{let g=42;const v=()=>(g=Math.imul(g,1664525)+1013904223>>>0,g/4294967296);for(let N=0;N<c*d/(x*3);N++){const m=v()*c,y=v()*d;u.rect(m,y,.6+v()*1.2,.6+v()*1.2)}break}}["dots","checker","grain"].includes(s.pattern)?u.fill():u.stroke(),u.restore()}function Up(u,r,s){if(!s||s.style==="none"||s.opacity===0)return;const c=Math.min(s.inset+s.width/2,Math.min(r.width,r.height)/2-1),d=r.width-c*2,x=r.height-c*2;if(u.save(),u.globalAlpha=s.opacity,u.lineWidth=s.width,u.strokeStyle=s.color,s.style==="gradient"){const v=u.createLinearGradient(0,0,r.width,r.height);v.addColorStop(0,s.color),v.addColorStop(1,s.endColor),u.strokeStyle=v}s.style==="dashed"&&u.setLineDash([s.width*4,s.width*3]);const g=v=>{u.beginPath(),u.roundRect(c+v,c+v,d-v*2,x-v*2,Math.max(0,s.radius-v)),u.stroke()};if(s.style==="corners"){const v=Math.min(d,x)*.12;for(const N of[c,r.width-c])for(const m of[c,r.height-c]){const y=N===c?1:-1,p=m===c?1:-1;u.beginPath(),u.moveTo(N+y*v,m),u.lineTo(N,m),u.lineTo(N,m+p*v),u.stroke()}}else g(0),s.style==="double"&&g(s.width*3+4);u.restore()}function Gp(u,r=!1){const c=((u||"").split(",")[0]||"").replace(/["'\\]/g,"").trim();return c.includes("Noto Sans")?r?'"Hiragino Sans GB", sans-serif':'"Noto Sans SC", "PingFang SC", sans-serif':c.includes("PingFang")?r?'"Hiragino Sans GB", sans-serif':'"PingFang SC", "Noto Sans SC", sans-serif':c.includes("Noto Serif")?r?'"Songti SC", serif':'"Noto Serif SC", "Songti SC", serif':c.includes("Songti")||c==="STSong"?r?'"Songti SC", serif':'"Songti SC", "Noto Serif SC", serif':c.includes("Kai")||c.includes("WenKai")?r?'"STKaiti", "Kaiti SC", "Songti SC", serif':'"LXGW WenKai GB Screen", "LXGW WenKai Screen", "Kaiti SC", "STKaiti", serif':c.includes("Yuan")?r?'"STYuanti", "Yuanti SC", "Hiragino Sans GB", sans-serif':'"Yuanti SC", "STYuanti", "PingFang SC", sans-serif':c.includes("Inter")?r?'Inter, "Hiragino Sans GB", sans-serif':'Inter, "PingFang SC", sans-serif':c.includes("Georgia")?'Georgia, "Songti SC", serif':c.toLowerCase().includes("serif")||c.includes("Song")?`"${c}", "Songti SC", serif`:r?`"${c}", "Hiragino Sans GB", "PingFang SC", sans-serif`:`"${c}", "PingFang SC", sans-serif`}function ja(u,r=!1){if(!u)return'16px "PingFang SC", sans-serif';const s=u.match(/^(.*?)([\d.]+(?:px|pt|em|rem))\s+(.+)$/);if(!s)return u;const c=s[1],d=s[2],x=s[3];return`${c}${d} ${Gp(x,r)}`}async function qp(u,r){const{page:s,spec:c,config:d,totalPageCount:x=1,getImage:g,isServer:v=!1}=r,{algorithm:N,theme:m,chrome:y}=d;Dh(d.canvasStyle),u.save(),u.fillStyle=m.bgColor,u.fillRect(0,0,c.width,c.height),u.restore(),d.canvasStyle?.fill&&Lp(u,c,d.canvasStyle.fill);const p=d.coverTheme,b=async G=>{if(!G)return;const S=await g(G.src);if(!S)throw new Error("Failed to load cover theme image");const q=G.fit==="contain"?Math.min(c.width/S.width,c.height/S.height):Math.max(c.width/S.width,c.height/S.height),_=G.fit==="fill"?c.width:S.width*q,te=G.fit==="fill"?c.height:S.height*q;u.save(),u.globalAlpha=G.opacity,u.drawImage(S,(c.width-_)*G.position.x/100,(c.height-te)*G.position.y/100,_,te),u.restore()};if(p){if(!d.canvasStyle?.fill){const S=p.background.fill;if(u.save(),S.type==="solid")u.fillStyle=S.color;else{let q;if(S.type==="linear"){const _=S.angle*Math.PI/180,te=Math.cos(_)*c.width/2,ne=Math.sin(_)*c.height/2;q=u.createLinearGradient(c.width/2-te,c.height/2-ne,c.width/2+te,c.height/2+ne)}else{const _=c.width*S.position.x/100,te=c.height*S.position.y/100;q=u.createRadialGradient(_,te,0,_,te,Math.hypot(c.width,c.height))}for(const _ of S.stops)q.addColorStop(_.offset/100,_.color);u.fillStyle=q}u.fillRect(0,0,c.width,c.height),u.restore()}await b(p.background.image),p.background.overlay&&(u.save(),u.fillStyle=p.background.overlay.color,u.globalAlpha=p.background.overlay.opacity,u.fillRect(0,0,c.width,c.height),u.restore());const G=p.decoration;if(!d.canvasStyle?.pattern){u.save(),u.strokeStyle=u.fillStyle=G.color,u.globalAlpha=G.opacity;const S=Math.max(8,G.size);if(u.beginPath(),["lines","grid","dots"].includes(G.pattern)){for(let q=0;q<c.width;q+=S)if(G.pattern==="grid"&&(u.moveTo(q,0),u.lineTo(q,c.height)),G.pattern==="dots")for(let _=0;_<c.height;_+=S)u.moveTo(q+2,_),u.arc(q,_,2,0,Math.PI*2);if(G.pattern!=="dots")for(let q=0;q<c.height;q+=S)u.moveTo(0,q),u.lineTo(c.width,q)}else if(G.pattern==="rings")for(let q=S;q<Math.hypot(c.width,c.height);q+=S)u.moveTo(c.width/2+q,c.height/2),u.arc(c.width/2,c.height/2,q,0,Math.PI*2);else if(G.pattern==="burst")for(let q=0;q<Math.PI*2;q+=Math.PI/Math.max(8,Math.round(S/3)))u.moveTo(c.width/2,c.height/2),u.lineTo(c.width/2+Math.cos(q)*c.width,c.height/2+Math.sin(q)*c.height);G.pattern==="dots"?u.fill():u.stroke(),u.restore()}await b(G.image)}d.canvasStyle?.pattern&&Hp(u,c,d.canvasStyle.pattern);const{stageX:w,stageY:M}=zn(c,N.safeArea,N.contentBottomGap),Q=d.aspectRatio==="wechat-cover-2.35",B=y?.showHeader??!Q,L=(y?.showWatermark??!Q)&&!!d.watermarkText?.trim(),$=(y?.showPageNumber??(!Q&&x>1))&&x>1;if(B&&(L||$)){const G=Math.max(24,Math.floor(N.safeArea.top*.45));if(L&&(u.save(),u.font=ja("600 14px PingFang SC",v),u.fillStyle=m.watermarkColor,u.globalAlpha=.45,u.textBaseline="middle",u.textAlign="left",u.fillText(d.watermarkText.toUpperCase(),N.safeArea.left,G),u.restore()),$){u.save();const S=`P.${String(s.pageNumber).padStart(2,"0")}`;u.font='500 12px "SF Mono", Monaco, Menlo, Consolas, monospace',u.textBaseline="middle",u.textAlign="left";const _=u.measureText(S).width+16,te=24,ne=c.width-N.safeArea.right-_,he=G-te/2;u.strokeStyle=m.textColor,u.globalAlpha=.4,u.lineWidth=1,u.beginPath(),u.roundRect(ne,he,_,te,12),u.stroke(),u.fillStyle=m.textColor,u.fillText(S,ne+8,G),u.restore()}}const ee=[...s.images||[]].sort((G,S)=>{const q=G.zIndex??(G.isAbsolute?20:5),_=S.zIndex??(S.isAbsolute?20:5);return q-_}),ce=async G=>{for(const S of G){let q;try{q=await g(S.src)}catch(D){throw S.templateAssetKey?new Error(`模板素材 ${S.templateAssetKey} 加载失败:${D instanceof Error?D.message:String(D)}`):D}if(!q&&S.templateAssetKey)throw new Error(`模板素材 ${S.templateAssetKey} 加载失败:图片不存在或无法读取`);const _=w+S.x,te=M+S.y,ne=_+S.width/2,he=te+S.height/2;u.save(),u.translate(ne,he),S.rotate&&u.rotate(S.rotate*Math.PI/180),u.globalAlpha=S.opacity??1;const Y=S.width,O=S.height,k=Math.min(S.borderRadius??12,Y/2,O/2);if(u.beginPath(),u.roundRect(-Y/2,-O/2,Y,O,k),u.clip(),q?u.drawImage(q,-Y/2,-O/2,Y,O):(u.fillStyle=m.cardBg||"#222222",u.fillRect(-Y/2,-O/2,Y,O)),u.restore(),S.caption?.trim()){u.save();const D=Math.max(14,Math.round(N.baseFontSize*.45));u.font=ja(`400 ${D}px PingFang SC`,v),u.fillStyle=m.captionColor,u.textBaseline="top",u.textAlign="center",u.fillText(S.caption,ne,te+O+12),u.restore()}}};await ce(ee.filter(G=>(G.zIndex??(G.isAbsolute?20:5))<10));for(const G of s.lines){const S=w+G.x,q=M+G.y;if(G.className==="body-quote"){u.save(),u.fillStyle=m.accentColor,u.globalAlpha=.85,u.beginPath();const te=Math.max(1,G.lineHeight-8);typeof u.roundRect=="function"?u.roundRect(w,q+4,3.5,te,2):u.rect(w,q+4,3.5,te),u.fill(),u.restore()}if(G.bullet&&G.bulletX!==void 0){if(u.save(),u.fillStyle=m.accentColor,G.bullet==="•"){const te=Math.max(3,Math.round(N.baseFontSize*.08)),ne=w+G.bulletX+8,he=q+Math.round(G.lineHeight*.42);u.beginPath(),u.arc(ne,he,te,0,Math.PI*2),u.fill()}else u.font=ja(G.font,v),u.textBaseline="top",u.textAlign="left",u.fillText(G.bullet,w+G.bulletX,q);u.restore()}let _=S;for(const te of G.fragments){const ne=te.font||G.font,he=ja(ne,v);u.font=he,u.textBaseline="top",u.textAlign="left",te.highlight?u.fillStyle=m.accentColor:G.className.includes("heading")?u.fillStyle=m.headingColor||m.textColor:G.className.includes("quote")?u.fillStyle=m.quoteColor||m.textColor:u.fillStyle=m.textColor,u.letterSpacing=`${te.letterSpacing||0}px`,u.fillText(te.text,_,q);const Y=te.letterSpacing?te.occupiedWidth:u.measureText(te.text).width;_+=Y+(te.gapBefore||0)}}await ce(ee.filter(G=>(G.zIndex??(G.isAbsolute?20:5))>=10)),u.letterSpacing="0px";const ue=y?.showFooter??!Q,H=y?.showFooterDivider??(!Q&&!!d.footerText?.trim()),V=(y?.showFooterText??!Q)&&!!d.footerText?.trim();if(ue){const G=c.height-Math.max(24,Math.floor(N.safeArea.bottom*.45));if(H&&(u.save(),u.strokeStyle=m.borderSubtle||"#e5e5e5",u.lineWidth=1,u.beginPath(),u.moveTo(N.safeArea.left,G-14),u.lineTo(c.width-N.safeArea.right,G-14),u.stroke(),u.restore()),y?.showFillRatio&&(u.save(),u.font=ja("500 13px PingFang SC",v),u.fillStyle=m.captionColor,u.textBaseline="middle",u.textAlign="right",u.fillText(`填充率 ${Math.round(s.fillRatio*100)}%`,c.width-N.safeArea.right,G),u.restore()),V){u.save();const S=p?.typography.footer;u.font=ja(S?`${S.fontWeight} ${S.fontSize}px "${S.fontFamily}"`:"500 13px PingFang SC",v),u.letterSpacing=`${S?.letterSpacing||0}px`,u.fillStyle=m.watermarkColor||m.captionColor,u.globalAlpha=.6,u.textBaseline="middle",u.textAlign="left",u.fillText(d.footerText,N.safeArea.left,G),u.restore()}}Up(u,c,d.canvasStyle?.border)}const Yp=({page:u,spec:r,config:s,totalPageCount:c,zoom:d})=>{const x=fe.useRef(null),[g,v]=fe.useState(null);return fe.useEffect(()=>{const N=x.current;if(!N)return;const m=N.getContext("2d");if(!m)return;N.dataset.renderState="loading",v(null);let y=!1;const p=new AbortController,b=M=>M?new Promise(Q=>{const B=new Image;let L;const $=ce=>{p.signal.removeEventListener("abort",ee),B.onload=B.onerror=null,L&&(L.onload=L.onerror=null),Q(ce)},ee=()=>$(null);if(p.signal.aborted){$(null);return}p.signal.addEventListener("abort",ee,{once:!0}),B.crossOrigin="anonymous",B.onload=()=>$(B),B.onerror=()=>{L=new Image,L.onload=()=>$(L),L.onerror=()=>$(null),L.src=M},B.src=M}):Promise.resolve(null);return(async()=>{const M=document.createElement("canvas");M.width=r.width,M.height=r.height;const Q=M.getContext("2d");Q&&(await qp(Q,{page:u,spec:r,config:s,totalPageCount:c,getImage:b,isServer:!1}),y||(m.clearRect(0,0,r.width,r.height),m.drawImage(M,0,0),N.dataset.renderState="ready"))})().catch(M=>{y||(N.dataset.renderState="error",m.clearRect(0,0,r.width,r.height),v(M instanceof Error?M.message:"画布绘制失败"))}),()=>{y=!0,p.abort()}},[u,r,s,c]),f.jsxs(f.Fragment,{children:[f.jsx("canvas",{id:`typeset-page-${u.pageNumber}`,ref:x,width:r.width,height:r.height,className:"typeset-page absolute top-0 left-0 border border-[#e0e0e0] dark:border-[#222222] shadow-sm select-none",style:{width:r.width*d,height:r.height*d,backgroundColor:s.theme.bgColor}}),g&&f.jsx("div",{role:"alert",className:"absolute inset-0 flex items-center justify-center bg-white/90 p-4 text-sm text-red-600",children:g})]})},Xp=({result:u,zoom:r,viewportRef:s,onAutoFit:c,isAutoFit:d,viewMode:x="grid",onToggleViewMode:g,onFocusPage:v})=>{const{pages:N,canvasSpec:m,config:y}=u;return f.jsxs("main",{ref:s,className:"flex-1 min-w-0 overflow-auto bg-[#f5f5f5] dark:bg-[#050505] bg-grid flex flex-col p-6 select-none relative transition-colors",children:[f.jsxs("div",{className:"sticky top-0 z-20 self-center mb-6 px-3.5 py-1.5 rounded-full bg-white/90 dark:bg-[#111111]/90 backdrop-blur border border-[#eaeaea] dark:border-[#222222] text-[11px] font-mono text-[#666666] dark:text-[#888888] flex items-center gap-2.5 shadow-sm",children:[f.jsx("span",{className:"text-[#171717] dark:text-white font-semibold",children:m.name}),f.jsx("span",{children:"•"}),f.jsxs("span",{children:[m.width," × ",m.height,"px"]}),f.jsx("span",{children:"•"}),f.jsxs("span",{className:"text-black dark:text-white font-medium",children:[N.length," 张图片"]}),N.length>1&&g&&f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"•"}),f.jsxs("div",{className:"flex items-center bg-[#eaeaea] dark:bg-[#1a1a1a] rounded-md p-0.5 border border-[#dfdfdf] dark:border-[#262626]",children:[f.jsxs("button",{onClick:()=>g("grid"),className:`flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium transition-all ${x==="grid"?"bg-white dark:bg-[#2b2b2b] text-black dark:text-white shadow-xs font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,title:"多图瀑布流平铺全览",children:[f.jsx(bp,{className:"w-3 h-3"}),f.jsx("span",{children:"多图平铺"})]}),f.jsxs("button",{onClick:()=>g("stack"),className:`flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium transition-all ${x==="stack"?"bg-white dark:bg-[#2b2b2b] text-black dark:text-white shadow-xs font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,title:"单列纵向逐页滚动",children:[f.jsx(Ap,{className:"w-3 h-3"}),f.jsx("span",{children:"纵向单列"})]})]})]}),c&&f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"•"}),f.jsx("button",{onClick:c,className:`hover:text-black dark:hover:text-white transition-colors underline underline-offset-2 ${d?"text-emerald-600 dark:text-emerald-400 font-semibold":""}`,title:N.length>1?"缩放至视口内完整排列多张图片":"自适应画布比例",children:d?N.length>1?"已平铺适配":"已自适应":N.length>1?"平铺适配":"自适应"})]})]}),f.jsx("div",{className:"min-w-fit w-full flex-1 flex flex-col items-center justify-start pb-32",children:f.jsx("div",{className:`flex items-start justify-center gap-7 transition-all duration-300 ${x==="grid"?"flex-wrap max-w-full":"flex-col items-center"}`,children:N.map(p=>f.jsxs("div",{className:"flex flex-col items-center",children:[N.length>1&&f.jsxs("div",{className:"mb-2 px-2.5 py-1 rounded-md bg-white/90 dark:bg-[#181818]/90 border border-[#eaeaea] dark:border-[#262626] text-[11px] font-mono text-[#666666] dark:text-[#888888] shadow-xs flex items-center justify-between transition-colors",style:{width:m.width*r},children:[f.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[f.jsxs("span",{className:"font-semibold text-[#171717] dark:text-white",children:["第 ",p.pageNumber," / ",N.length," 页"]}),f.jsx("span",{children:"•"}),f.jsx("span",{className:"truncate",children:m.name})]}),v&&f.jsxs("button",{onClick:b=>{b.stopPropagation(),v(p.pageNumber)},className:"shrink-0 text-[10px] px-1.5 py-0.5 rounded bg-[#f5f5f5] dark:bg-[#242424] hover:bg-[#eaeaea] dark:hover:bg-[#333333] text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors flex items-center gap-1 cursor-pointer",title:"放大聚焦此页",children:[f.jsx(kh,{className:"w-2.5 h-2.5"}),f.jsx("span",{children:"聚焦单图"})]})]}),f.jsx("div",{onDoubleClick:()=>v?.(p.pageNumber),className:"relative shrink-0 shadow-xl dark:shadow-2xl rounded-sm transition-shadow hover:shadow-2xl cursor-pointer",title:N.length>1?"双击放大聚焦此页":void 0,style:{width:m.width*r,height:m.height*r},children:f.jsx(Yp,{page:p,spec:m,config:y,totalPageCount:N.length,zoom:r})})]},p.pageNumber))})})]})},Qp=({markdown:u,onMarkdownChange:r,images:s,onAddImage:c,onToggleBackground:d,onResetImageLayout:x,backgroundImageIds:g,onUpdateImage:v,onRemoveImage:N,onMoveImage:m,pageCount:y=1,highlightWords:p,onHighlightWordsChange:b,adminKey:w})=>{const[M,Q]=fe.useState("text"),[B,L]=fe.useState(""),$=fe.useRef(null),[ee,ce]=fe.useState(!1),ue=S=>{r(u?`${u}
|
|
290
|
+
|
|
291
|
+
${S}`:S)},H=async S=>{const q=S.target.files?.[0];if(!q)return;const _=ne=>c({src:ne,alt:q.name,caption:"",x:40,y:400,width:440,height:300,captionHeight:36,layoutPreset:"auto"}),te=()=>{const ne=new FileReader;ne.onload=()=>{typeof ne.result=="string"&&_(ne.result)},ne.readAsDataURL(q)};ce(!0);try{const ne=new FormData;ne.append("file",q);const Y=await(await fetch("/api/upload",{method:"POST",headers:w?{"x-admin-key":w}:{},body:ne})).json();Y.ok&&Y.url?_(Y.url):te()}catch{te()}finally{ce(!1),$.current&&($.current.value="")}},V=()=>{B.trim()&&(p.includes(B.trim())||b([...p,B.trim()]),L(""))},G=S=>{b(p.filter(q=>q!==S))};return f.jsxs("aside",{className:"w-80 border-r border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] flex flex-col shrink-0 select-none transition-colors",children:[f.jsxs("div",{className:"flex border-b border-[#eaeaea] dark:border-[#222222] bg-[#f9f9f9] dark:bg-[#050505] p-1 gap-1",children:[f.jsxs("button",{onClick:()=>Q("text"),className:`flex-1 flex items-center justify-center gap-1.5 py-1.5 text-xs rounded font-medium transition-all ${M==="text"?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-[#cccccc]"}`,children:[f.jsx(fp,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"正文"})]}),f.jsxs("button",{onClick:()=>Q("images"),className:`flex-1 flex items-center justify-center gap-1.5 py-1.5 text-xs rounded font-medium transition-all ${M==="images"?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-[#cccccc]"}`,children:[f.jsx(gp,{className:"w-3.5 h-3.5"}),f.jsxs("span",{children:["配图 (",s.length,")"]})]}),f.jsxs("button",{onClick:()=>Q("highlights"),className:`flex-1 flex items-center justify-center gap-1.5 py-1.5 text-xs rounded font-medium transition-all ${M==="highlights"?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-[#cccccc]"}`,children:[f.jsx(mp,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"重点词"})]})]}),M==="text"&&f.jsxs("div",{className:"flex-1 flex flex-col p-3 gap-2 overflow-hidden",children:[f.jsxs("div",{className:"flex items-center gap-1 pb-1 flex-wrap border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("button",{onClick:()=>ue("# 标题"),className:"px-2 py-1 bg-[#f5f5f5] dark:bg-[#141414] hover:bg-[#eaeaea] dark:hover:bg-[#202020] text-[#555555] dark:text-[#aaaaaa] hover:text-black dark:hover:text-white rounded text-[11px] font-mono flex items-center gap-1 transition-colors",title:"插入主标题",children:[f.jsx(hp,{className:"w-3 h-3"}),f.jsx("span",{children:"H1"})]}),f.jsxs("button",{onClick:()=>ue("## 二级标题"),className:"px-2 py-1 bg-[#f5f5f5] dark:bg-[#141414] hover:bg-[#eaeaea] dark:hover:bg-[#202020] text-[#555555] dark:text-[#aaaaaa] hover:text-black dark:hover:text-white rounded text-[11px] font-mono flex items-center gap-1 transition-colors",title:"插入副标题",children:[f.jsx(xp,{className:"w-3 h-3"}),f.jsx("span",{children:"H2"})]}),f.jsx("button",{onClick:()=>ue("> 引用格言名句..."),className:"px-2 py-1 bg-[#f5f5f5] dark:bg-[#141414] hover:bg-[#eaeaea] dark:hover:bg-[#202020] text-[#555555] dark:text-[#aaaaaa] hover:text-black dark:hover:text-white rounded text-[11px] font-mono transition-colors",title:"插入引用块",children:"Quote"}),f.jsxs("button",{onClick:()=>ue("【第二页】"),className:"px-2 py-1 bg-blue-500/10 hover:bg-blue-500/20 text-blue-600 dark:text-blue-400 rounded text-[11px] font-mono flex items-center gap-1 transition-colors",title:"显式分页标记",children:[f.jsx(pp,{className:"w-3 h-3"}),f.jsx("span",{children:"分页面"})]})]}),f.jsx("textarea",{value:u,onChange:S=>r(S.target.value),placeholder:"在此输入 Markdown 内容,纯算法即时排版...",className:"flex-1 w-full bg-[#fafafa] dark:bg-[#0d0d0d] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-3 text-xs font-mono text-[#171717] dark:text-[#ededed] placeholder-[#999999] dark:placeholder-[#444444] resize-none focus:outline-none focus:border-black dark:focus:border-[#444444] transition-all leading-relaxed"}),f.jsxs("div",{className:"flex items-center justify-between text-[11px] text-[#888888] dark:text-[#555555] font-mono px-1",children:[f.jsxs("span",{children:["字符数: ",u.length]}),f.jsxs("span",{children:["行数: ",u.split(`
|
|
292
|
+
`).length]})]})]}),M==="images"&&f.jsxs("div",{className:"flex-1 flex flex-col p-3 gap-3 overflow-y-auto",children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"file",ref:$,onChange:H,accept:"image/*",className:"hidden"}),f.jsxs("button",{onClick:()=>$.current?.click(),disabled:ee,className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-lg border border-dashed border-[#d4d4d4] dark:border-[#333333] hover:border-black dark:hover:border-[#555555] bg-[#fafafa] dark:bg-[#0f0f0f] hover:bg-[#f5f5f5] dark:hover:bg-[#141414] text-xs text-[#555555] dark:text-[#cccccc] hover:text-black dark:hover:text-white transition-all",children:[f.jsx(Op,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:ee?"正在上传...":"上传配图素材"})]}),f.jsx("button",{onClick:()=>c({src:"https://images.unsplash.com/photo-1579783900882-c0d3dad7b119?w=800&auto=format&fit=crop&q=80",alt:"艺术插画",caption:"示例艺术配图",x:36,y:400,width:440,height:300,captionHeight:36,layoutPreset:"auto"}),className:"px-3 py-2.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] bg-[#fafafa] dark:bg-[#0f0f0f] hover:bg-[#f5f5f5] dark:hover:bg-[#141414] text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white transition-all",title:"插入在线示例图",children:f.jsx(Sp,{className:"w-3.5 h-3.5"})})]}),f.jsx("div",{className:"flex flex-col gap-2.5",children:s.length===0?f.jsx("div",{className:"text-center py-8 text-xs text-[#888888] dark:text-[#555555]",children:"暂无配图素材,点击上方按钮上传或插入"}):s.map((S,q)=>f.jsxs("div",{className:"bg-[#fafafa] dark:bg-[#0f0f0f] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-2.5 flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("img",{src:S.src,alt:S.alt,className:"w-12 h-12 object-cover rounded bg-[#eeeeee] dark:bg-[#1a1a1a] border border-[#e5e5e5] dark:border-[#262626] shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[f.jsxs("span",{className:"text-[10px] px-1 rounded bg-[#eaeaea] dark:bg-[#262626] font-mono text-[#555555] dark:text-[#aaaaaa] font-semibold shrink-0",children:["#",q+1]}),f.jsx("span",{className:"text-xs font-medium text-[#171717] dark:text-white truncate max-w-[120px]",children:S.caption||S.alt||`配图 #${q+1}`}),f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border border-emerald-500/20 font-medium shrink-0",children:["第 ",S.pageIndex||1," 页"]})]}),f.jsxs("div",{className:"text-[10px] text-[#888888] dark:text-[#666666] font-mono mt-0.5",children:[S.width," × ",S.height,"px · X: ",S.x??0,", Y: ",S.y??0]})]}),f.jsxs("div",{className:"flex items-center gap-0.5",children:[f.jsx("button",{onClick:()=>m?.(S.id,"up"),disabled:q===0,className:"p-1 text-[#888888] hover:text-black dark:hover:text-white disabled:opacity-20 rounded hover:bg-[#eeeeee] dark:hover:bg-[#1f1f1f]",title:"上移顺序 (调整在同一页中的先后次序)",children:f.jsx(cp,{className:"w-3.5 h-3.5"})}),f.jsx("button",{onClick:()=>m?.(S.id,"down"),disabled:q===s.length-1,className:"p-1 text-[#888888] hover:text-black dark:hover:text-white disabled:opacity-20 rounded hover:bg-[#eeeeee] dark:hover:bg-[#1f1f1f]",title:"下移顺序 (调整在同一页中的先后次序)",children:f.jsx(up,{className:"w-3.5 h-3.5"})}),f.jsx("button",{onClick:()=>N(S.id),className:"p-1 text-[#888888] hover:text-red-500 rounded hover:bg-[#eeeeee] dark:hover:bg-[#1f1f1f]",title:"删除该图",children:f.jsx(Eh,{className:"w-3.5 h-3.5"})})]})]}),f.jsxs("div",{className:"flex bg-[#eeeeee] dark:bg-[#1a1a1a] p-0.5 rounded text-[11px] font-medium pt-1 border-t border-[#eeeeee] dark:border-[#1a1a1a]",children:[f.jsx("button",{onClick:()=>v(S.id,{isAbsolute:!1}),className:`flex-1 py-1 rounded transition-all text-center ${S.isAbsolute?"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white":"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold"}`,children:"绕排避让 (Flow)"}),f.jsx("button",{onClick:()=>v(S.id,{isAbsolute:!0,layoutPreset:"custom",zIndex:S.zIndex??15,rotate:S.rotate??0,opacity:S.opacity??1}),className:`flex-1 py-1 rounded transition-all text-center ${S.isAbsolute?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:"自由图层 (Absolute)"})]}),f.jsxs("div",{className:"flex flex-col gap-2 text-[11px]",children:[f.jsxs("label",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"checkbox",checked:S.templateAssetKey!==void 0,onChange:_=>v(S.id,{templateAssetKey:_.target.checked?`asset_${S.id.replace(/[^a-zA-Z0-9_-]/g,"_")}`:void 0,repeatEveryPage:!1})}),"固定模板素材"]}),S.templateAssetKey!==void 0&&f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"flex flex-col gap-1",children:["素材标识",f.jsx("input",{"aria-label":"素材标识",value:S.templateAssetKey,onChange:_=>v(S.id,{templateAssetKey:_.target.value}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1"})]}),s.some(_=>_.id!==S.id&&_.templateAssetKey===S.templateAssetKey)&&f.jsx("span",{role:"alert",className:"text-red-600",children:"素材标识不能重复"}),f.jsxs("label",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"checkbox",disabled:!S.isAbsolute,checked:!!(S.isAbsolute&&S.repeatEveryPage),onChange:_=>v(S.id,{repeatEveryPage:_.target.checked})}),"每页重复"]}),!S.isAbsolute&&f.jsx("span",{className:"text-[#888888]",children:"每页重复仅支持自由图层,避免阻塞文字排版。"}),f.jsx("span",{className:"text-[#888888]",children:"默认保留此图,仅按素材标识明确替换。"})]}),S.isAbsolute&&f.jsxs("label",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"checkbox",checked:g.includes(S.id),onChange:_=>d(S.id,_.target.checked)}),"设为整页背景"]}),f.jsx("button",{type:"button",onClick:()=>x(S.id),title:"恢复上传或应用模板时的尺寸、位置和图层设置",className:"rounded border border-[#d4d4d4] dark:border-[#333333] px-2 py-1.5 hover:bg-[#eeeeee] dark:hover:bg-[#222222]",children:"重置布局"})]}),S.isAbsolute?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"text-[10px] text-blue-600 dark:text-blue-400 bg-blue-500/10 p-1.5 rounded flex items-center gap-1 font-medium",children:[f.jsx(So,{className:"w-3 h-3 shrink-0"}),f.jsx("span",{children:"自由定位图层:脱离文本流,不触发障碍物绕排"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"所属页面"}),f.jsx("select",{value:S.pageIndex||1,onChange:_=>v(S.id,{pageIndex:parseInt(_.target.value,10)||1}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] focus:outline-none",children:Array.from({length:Math.max(y,2)},(_,te)=>te+1).map(_=>f.jsxs("option",{value:_,children:["第 ",_," 页 ",_===1?"(首页/封面)":""]},_))})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] mb-1",children:[f.jsx("span",{children:"层级 (Z-Index)"}),f.jsx("span",{className:"font-mono text-black dark:text-white font-semibold",children:S.zIndex??15})]}),f.jsx("div",{className:"flex gap-1",children:[{label:"底",val:0,title:"底层背景"},{label:"文字",val:10,title:"正文同层"},{label:"顶",val:20,title:"置顶贴纸"}].map(_=>f.jsx("button",{onClick:()=>v(S.id,{zIndex:_.val}),title:_.title,className:`flex-1 py-0.5 text-[10px] rounded border ${(S.zIndex??15)===_.val?"bg-black dark:bg-white text-white dark:text-black border-transparent font-bold":"border-[#d4d4d4] dark:border-[#262626] text-[#666666] dark:text-[#888888]"}`,children:_.label},_.val))})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] mb-1",children:[f.jsxs("span",{className:"flex items-center gap-0.5",children:[f.jsx(Ep,{className:"w-2.5 h-2.5"})," 旋转角度"]}),f.jsxs("span",{className:"font-mono text-black dark:text-white font-semibold",children:[S.rotate??0,"°"]})]}),f.jsx("input",{type:"range",min:"-45",max:"45",step:"1",value:S.rotate??0,onChange:_=>v(S.id,{rotate:parseInt(_.target.value,10)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded cursor-pointer mt-1"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] mb-1",children:[f.jsx("span",{children:"不透明度"}),f.jsxs("span",{className:"font-mono text-black dark:text-white font-semibold",children:[Math.round((S.opacity??1)*100),"%"]})]}),f.jsx("input",{type:"range",min:"0.1",max:"1",step:"0.05",value:S.opacity??1,onChange:_=>v(S.id,{opacity:parseFloat(_.target.value)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded cursor-pointer mt-1"})]})]}),f.jsxs("div",{className:"text-[11px]",children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"圆角半径 (px)"}),f.jsx("input",{type:"number",min:"0",step:"4",value:S.borderRadius??12,onChange:_=>v(S.id,{borderRadius:parseInt(_.target.value,10)||0}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"横向 X"}),f.jsx("input",{type:"number",step:"10",value:S.x??0,onChange:_=>v(S.id,{x:parseInt(_.target.value,10)||0}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"纵向 Y"}),f.jsx("input",{type:"number",step:"10",value:S.y??0,onChange:_=>v(S.id,{y:parseInt(_.target.value,10)||0}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"宽度 (W)"}),f.jsx("input",{type:"number",step:"10",value:S.width??420,onChange:_=>v(S.id,{width:Math.max(20,parseInt(_.target.value,10)||20)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"高度 (H)"}),f.jsx("input",{type:"number",step:"10",value:S.height??280,onChange:_=>v(S.id,{height:Math.max(20,parseInt(_.target.value,10)||20)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"排版预设"}),f.jsxs("select",{value:S.layoutPreset||"auto",onChange:_=>v(S.id,{layoutPreset:_.target.value}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] focus:outline-none",children:[f.jsx("option",{value:"auto",children:"自适应 (Auto)"}),f.jsx("option",{value:"mid-left",children:"居左浮动 (Left)"}),f.jsx("option",{value:"mid-right",children:"居右浮动 (Right)"}),f.jsx("option",{value:"center",children:"居中横幅 (Center)"}),f.jsx("option",{value:"staggered",children:"交错排版 (Staggered)"}),f.jsx("option",{value:"corner-soft",children:"角落软着陆 (Corner)"}),f.jsx("option",{value:"fill",children:"底部填满 (Fill)"}),f.jsx("option",{value:"custom",children:"自定义坐标 (Custom)"})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"所属页面"}),f.jsx("select",{value:S.pageIndex||1,onChange:_=>v(S.id,{pageIndex:parseInt(_.target.value,10)||1}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] focus:outline-none",children:Array.from({length:Math.max(y,2)},(_,te)=>te+1).map(_=>f.jsxs("option",{value:_,children:["第 ",_," 页 ",_===1?"(首页/封面)":""]},_))})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"宽度 (W)"}),f.jsx("input",{type:"number",min:"50",step:"10",value:S.width??420,onChange:_=>v(S.id,{width:Math.max(50,parseInt(_.target.value,10)||50)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"高度 (H)"}),f.jsx("input",{type:"number",min:"50",step:"10",value:S.height??280,onChange:_=>v(S.id,{height:Math.max(50,parseInt(_.target.value,10)||50)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"纵向位置 Y"}),f.jsx("input",{type:"number",step:"20",value:S.y??300,onChange:_=>v(S.id,{y:parseInt(_.target.value,10)||0,layoutPreset:"custom"}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"横向坐标 X"}),f.jsx("input",{type:"number",step:"10",value:S.x??16,onChange:_=>v(S.id,{x:parseInt(_.target.value,10)||0,layoutPreset:"custom"}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] text-[11px] block mb-1",children:"图片说明 (Caption)"}),f.jsx("input",{type:"text",placeholder:"下方说明文字...",value:S.caption||"",onChange:_=>v(S.id,{caption:_.target.value}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white text-[11px] focus:outline-none"})]})]})]},S.id))})]}),M==="highlights"&&f.jsxs("div",{className:"flex-1 flex flex-col p-3 gap-3 overflow-y-auto",children:[f.jsx("div",{className:"text-xs text-[#666666] dark:text-[#888888] leading-relaxed",children:"在正文中出现的高亮词,将被算法自动匹配并渲染为品牌强调色。"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",placeholder:"新增高亮关键词...",value:B,onChange:S=>L(S.target.value),onKeyDown:S=>S.key==="Enter"&&V(),className:"flex-1 bg-white dark:bg-[#0d0d0d] border border-[#d4d4d4] dark:border-[#222222] rounded-lg px-2.5 py-1.5 text-xs text-black dark:text-white placeholder-[#888888] dark:placeholder-[#555555] focus:outline-none focus:border-black dark:focus:border-[#444444]"}),f.jsx("button",{onClick:V,className:"px-3 py-1.5 bg-black dark:bg-[#1f1f1f] hover:bg-[#262626] text-white rounded-lg text-xs font-medium",children:"添加"})]}),f.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:p.map(S=>f.jsxs("span",{className:"flex items-center gap-1 px-2.5 py-1 rounded-md bg-[#f0fdf4] dark:bg-[#161616] border border-[#bbf7d0] dark:border-[#262626] text-xs text-emerald-700 dark:text-emerald-400 font-medium",children:[f.jsx(So,{className:"w-3 h-3"}),f.jsx("span",{children:S}),f.jsx("button",{onClick:()=>G(S),className:"hover:text-red-500 ml-1",children:"×"})]},S))})]})]})},Vp=[{id:"wechat-cover-2.35",label:"微信封面",ratioTag:"2.35:1"},{id:"longform-3-4",label:"通用长图文",ratioTag:"3:4"},{id:"wide-16-9",label:"通用宽屏",ratioTag:"16:9"},{id:"square-1-1",label:"通用正方形",ratioTag:"1:1"}],Zp=({currentRatio:u,onSelectRatio:r,zoom:s,onZoomChange:c,onAutoFit:d,isAutoFit:x,onOpenTemplates:g,isTemplateDrawerOpen:v,templateName:N,onSaveTemplate:m,onOpenAuth:y,onExport:p,isExporting:b,isAuthed:w,pageCount:M,themeMode:Q,onToggleThemeMode:B})=>f.jsxs("header",{className:"h-14 border-b border-[#eaeaea] dark:border-[#222222] bg-white/80 dark:bg-[#000000]/80 backdrop-blur-md px-4 flex items-center justify-between select-none z-30 shrink-0 transition-colors",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 font-semibold text-[#171717] dark:text-white tracking-tight text-sm",children:[f.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded bg-black dark:bg-white text-white dark:text-black font-black text-xs shadow-sm",children:"▲"}),f.jsx("span",{className:"hidden 2xl:inline",children:"Typeset Studio"})]}),f.jsx("span",{className:"text-xs text-[#888888] dark:text-[#555555] font-mono hidden 2xl:inline",children:"v0.2.6"}),f.jsxs("div",{title:N||"未命名模板",className:"flex min-w-0 items-center gap-1.5 px-2 py-0.5 rounded-full bg-[#f5f5f5] dark:bg-[#111111] border border-[#e5e5e5] dark:border-[#222222] text-[11px] text-emerald-600 dark:text-[#00e676]",children:[f.jsx("span",{className:"w-1.5 h-1.5 shrink-0 rounded-full bg-emerald-500 dark:bg-[#00e676]"}),f.jsx("span",{"aria-live":"polite",className:"max-w-40 truncate",children:N||"未命名模板"})]})]}),f.jsx("div",{className:"flex items-center bg-[#f5f5f5] dark:bg-[#0a0a0a] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-0.5 shadow-inner",children:Vp.map(L=>{const $=u===L.id;return f.jsxs("button",{onClick:()=>r(L.id),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${$?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-[#171717] dark:hover:text-[#cccccc] hover:bg-[#eaeaea] dark:hover:bg-[#141414]"}`,children:[f.jsx("span",{className:"hidden xl:inline",children:L.label}),f.jsx("span",{className:`text-[10px] font-mono px-1 py-0.2 rounded ${$?"bg-[#eaeaea] dark:bg-[#333333] text-black dark:text-white font-semibold":"bg-[#e5e5e5] dark:bg-[#181818] text-[#777777] dark:text-[#666666]"}`,children:L.ratioTag})]},L.id)})}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("div",{className:"flex items-center bg-[#f5f5f5] dark:bg-[#0a0a0a] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-0.5 text-xs text-[#666666] dark:text-[#888888]",children:[f.jsx("button",{onClick:()=>c(Math.max(.2,Number((s-.05).toFixed(2)))),className:"p-1 hover:text-black dark:hover:text-white rounded hover:bg-[#e8e8e8] dark:hover:bg-[#1f1f1f]",title:"缩小",children:f.jsx(Bp,{className:"w-3.5 h-3.5"})}),f.jsxs("span",{onDoubleClick:d,className:"w-11 text-center font-mono text-[11px] text-[#333333] dark:text-[#cccccc] cursor-pointer hover:underline select-none",title:"双击恢复自适应",children:[Math.round(s*100),"%"]}),f.jsx("button",{onClick:()=>c(Math.min(1.5,Number((s+.05).toFixed(2)))),className:"p-1 hover:text-black dark:hover:text-white rounded hover:bg-[#e8e8e8] dark:hover:bg-[#1f1f1f]",title:"放大",children:f.jsx(kh,{className:"w-3.5 h-3.5"})}),d&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"w-[1px] h-3 bg-[#e0e0e0] dark:bg-[#262626] mx-0.5"}),f.jsxs("button",{onClick:d,className:`flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] transition-all ${x?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-xs font-semibold":"hover:text-black dark:hover:text-white hover:bg-[#e8e8e8] dark:hover:bg-[#1f1f1f]"}`,title:M>1?"缩放至视口内完整排列多张图片(瀑布流平铺)":"自适应画布大小",children:[f.jsx(vp,{className:"w-3 h-3"}),f.jsx("span",{children:M>1?"多图平铺":"自适应"})]})]})]}),f.jsx("button",{onClick:B,className:"p-2 rounded-lg border border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] hover:bg-[#f5f5f5] dark:hover:bg-[#161616] text-[#444444] dark:text-[#cccccc] transition-all btn-vercel",title:Q==="light"?"切换至深色模式":"切换至浅色模式",children:Q==="light"?f.jsx(yp,{className:"w-3.5 h-3.5 text-[#555555]"}):f.jsx(kp,{className:"w-3.5 h-3.5 text-amber-400"})}),f.jsxs("button",{onClick:g,"aria-expanded":v,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] hover:bg-[#f5f5f5] dark:hover:bg-[#161616] text-xs text-[#333333] dark:text-[#cccccc] hover:text-black dark:hover:text-white transition-all btn-vercel",children:[f.jsx(dp,{className:"w-3.5 h-3.5 text-[#777777] dark:text-[#888888]"}),f.jsx("span",{children:"模板库"})]}),f.jsxs("button",{onClick:m,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] hover:bg-[#f5f5f5] dark:hover:bg-[#161616] text-xs text-[#333333] dark:text-[#cccccc] transition-all btn-vercel",children:[f.jsx(dh,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"保存模板"})]}),f.jsxs("button",{onClick:p,disabled:b,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-black text-white hover:bg-[#262626] dark:bg-white dark:text-black dark:hover:bg-[#eaeaea] text-xs font-semibold transition-all btn-vercel shadow-sm disabled:opacity-50",children:[b?f.jsx(ch,{className:"w-3.5 h-3.5 animate-spin"}):f.jsx(op,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:b?"导出中...":"导出图片"}),M>1&&f.jsxs("span",{className:"text-[10px] bg-white/20 dark:bg-black text-white px-1.5 py-0.2 rounded font-mono",children:[M,"P"]})]}),f.jsx("button",{onClick:y,className:`p-1.5 rounded-lg border transition-all btn-vercel ${w?"border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] text-[#777777] dark:text-[#888888] hover:text-black dark:hover:text-white hover:bg-[#f5f5f5] dark:hover:bg-[#161616]":"border-amber-500/50 bg-amber-500/10 text-amber-600 dark:text-amber-400"}`,title:w?"超管密钥已就绪":"配置超管密钥",children:f.jsx(eh,{className:"w-3.5 h-3.5"})})]})]});function Kp(){const[u,r]=fe.useState([]),[s,c]=fe.useState(!1),d=fe.useCallback(async(x=!1)=>{try{c(!0);const g=await fetch(`/api/fonts${x?"?refresh=1":""}`);if(!g.ok)return;const v=await g.json();if(!v.ok||!Array.isArray(v.fonts))return;r(v.fonts);let N=!1;if(typeof window<"u"&&"FontFace"in window&&document.fonts)for(const m of v.fonts)try{let y=!1;const p=[];if(document.fonts.forEach(b=>{(b.family===m.family||b.family===`"${m.family}"`)&&(y=!0,p.push(b))}),x&&(p.forEach(b=>document.fonts.delete(b)),y=!1),!y){const w=await new FontFace(m.family,`url(${m.url}${x?`?v=${Date.now()}`:""})`).load();document.fonts.add(w),N=!0}}catch(y){console.warn(`[useLocalFonts] Failed to load web font ${m.family}:`,y)}N&&window.dispatchEvent(new Event("typeset-fonts-loaded"))}catch(g){console.warn("[useLocalFonts] Failed to fetch local fonts:",g)}finally{c(!1)}},[]);return fe.useEffect(()=>{d()},[d]),{fonts:u,loading:s,refreshFonts:()=>d(!0)}}const mo="w-full rounded border border-[#dfdfdf] dark:border-[#333333] bg-white dark:bg-[#141414] px-2 py-1 text-[11px]";function Jp({config:u,onChange:r}){const s=u.canvasStyle||{},c=s.fill||u.coverTheme?.background.fill||{type:"solid",color:u.theme.bgColor},d=s.pattern||u.coverTheme?.decoration||_p,x=s.border||Rp,g=b=>r({...s,fill:b}),v=b=>r({...s,pattern:{...d,...b}}),N=b=>r({...s,border:{...x,...b}}),m=(b,w,M)=>f.jsxs("label",{className:"flex items-center justify-between gap-2",children:[f.jsx("span",{children:b}),f.jsxs("span",{className:"flex items-center gap-1.5 font-mono",children:[f.jsx("span",{children:w}),f.jsx("input",{"aria-label":b,type:"color",value:w,onChange:Q=>M(Q.target.value),className:"h-6 w-7 cursor-pointer bg-transparent"})]})]}),y=(b,w,M,Q,B,L=1)=>f.jsxs("label",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"flex justify-between",children:[f.jsx("span",{children:b}),f.jsx("span",{className:"font-mono",children:L<1?`${Math.round(w*100)}%`:w})]}),f.jsx("input",{"aria-label":b,type:"range",min:M,max:Q,step:L,value:w,onChange:$=>B(Number($.target.value)),className:"w-full accent-emerald-600"})]}),p=b=>{const w=c.type==="solid"?c.color:c.stops[0].color,M=c.type==="solid"?[{color:w,offset:0},{color:u.theme.accentColor,offset:100}]:c.stops;g(b==="solid"?{type:b,color:w}:b==="linear"?{type:b,angle:90,stops:M}:{type:b,position:{x:50,y:30},stops:M})};return f.jsxs("section",{className:"border-b border-[#f0f0f0] dark:border-[#1c1c1c] p-3.5 text-xs",children:[f.jsx("div",{className:"mb-3 font-semibold text-[#171717] dark:text-white",children:"背景、花纹与边框"}),f.jsxs("div",{className:"flex flex-col gap-3 text-[11px] text-[#666666] dark:text-[#aaaaaa]",children:[f.jsxs("label",{className:"flex flex-col gap-1",children:["背景类型",f.jsxs("select",{className:mo,value:c.type,onChange:b=>p(b.target.value),children:[f.jsx("option",{value:"solid",children:"纯色"}),f.jsx("option",{value:"linear",children:"线性渐变"}),f.jsx("option",{value:"radial",children:"径向渐变"})]})]}),c.type==="solid"?m("背景颜色",c.color,b=>g({type:"solid",color:b})):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-2 rounded border border-[#eaeaea] dark:border-[#333333] p-2",children:[c.stops.map((b,w)=>f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("label",{className:"flex flex-1 items-center gap-1.5",children:[f.jsx("input",{"aria-label":`渐变颜色 ${w+1}`,type:"color",value:b.color,onChange:M=>g({...c,stops:c.stops.map((Q,B)=>B===w?{...Q,color:M.target.value}:Q)}),className:"h-6 w-7 bg-transparent"}),f.jsx("span",{className:"font-mono",children:b.color})]}),f.jsx("button",{type:"button",disabled:c.stops.length<=2,onClick:()=>g({...c,stops:c.stops.filter((M,Q)=>Q!==w)}),className:"disabled:opacity-30","aria-label":`删除渐变颜色 ${w+1}`,children:"移除"})]}),y(`节点 ${w+1} 位置`,b.offset,0,100,M=>g({...c,stops:c.stops.map((Q,B)=>B===w?{...Q,offset:M}:Q)}))]},w)),f.jsx("button",{type:"button",disabled:c.stops.length>=8,onClick:()=>g({...c,stops:[...c.stops,{color:u.theme.accentColor,offset:50}]}),className:"rounded border border-[#dfdfdf] dark:border-[#333333] py-1 disabled:opacity-30",children:"添加颜色节点"})]}),c.type==="linear"?y("渐变角度",c.angle,0,360,b=>g({...c,angle:b})):f.jsxs(f.Fragment,{children:[y("渐变中心 X",c.position.x,0,100,b=>g({...c,position:{...c.position,x:b}})),y("渐变中心 Y",c.position.y,0,100,b=>g({...c,position:{...c.position,y:b}}))]})]}),f.jsxs("label",{className:"flex flex-col gap-1",children:["几何花纹",f.jsx("select",{className:mo,value:d.pattern,onChange:b=>v({pattern:b.target.value}),children:Object.entries(Fh).map(([b,w])=>f.jsx("option",{value:b,children:w},b))})]}),d.pattern!=="none"&&f.jsxs(f.Fragment,{children:[m("花纹颜色",d.color,b=>v({color:b})),y("花纹透明度",d.opacity,0,1,b=>v({opacity:b}),.01),y("花纹间距",d.size,16,240,b=>v({size:b}))]}),f.jsxs("label",{className:"flex flex-col gap-1",children:["边框样式",f.jsx("select",{className:mo,value:x.style,onChange:b=>N({style:b.target.value}),children:Object.entries(jh).map(([b,w])=>f.jsx("option",{value:b,children:w},b))})]}),x.style!=="none"&&f.jsxs(f.Fragment,{children:[m("边框颜色",x.color,b=>N({color:b})),x.style==="gradient"&&m("边框渐变终色",x.endColor,b=>N({endColor:b})),y("边框粗细",x.width,1,24,b=>N({width:b})),y("边框内缩",x.inset,0,200,b=>N({inset:b})),x.style!=="corners"&&y("边框圆角",x.radius,0,200,b=>N({radius:b})),y("边框透明度",x.opacity,0,1,b=>N({opacity:b}),.01)]}),f.jsx("p",{className:"leading-relaxed text-[#888888]",children:"配置随模板保存,作用于每页。背景图会覆盖底色与花纹;边框绘制在最上层。"})]})]})}const yx=[{label:"苹方 / 极简黑体 (默认清爽)",value:"PingFang SC"},{label:"思源黑体 (现代极简·粗黑)",value:"Noto Sans SC"},{label:"典雅宋体 (经典报刊·书卷)",value:"Songti SC"},{label:"思源宋体 (高阶报刊·典雅)",value:"Noto Serif SC"},{label:"人文楷体 (温润随笔·手写)",value:"Kaiti SC"},{label:"柔和圆体 (亲和灵动·现代)",value:"Yuanti SC"},{label:"Inter / 国际西文无衬线",value:"Inter"},{label:"Georgia / 文艺西文衬线",value:"Georgia"}],Ip=({config:u,onUpdateAlgorithm:r,onUpdateTheme:s,onUpdateTypography:c,onUpdateSafeArea:d,onUpdateBranding:x,onUpdateChrome:g,onUpdateCanvasStyle:v})=>{const{algorithm:N,theme:m,typography:y}=u,{fonts:p,loading:b,refreshFonts:w}=Kp();return f.jsxs("aside",{className:"w-80 border-l border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] flex flex-col shrink-0 select-none overflow-y-auto transition-colors",children:[f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(rp,{className:"w-3.5 h-3.5 text-blue-500 dark:text-blue-400"}),f.jsx("span",{children:"文字对齐与空间居中"})]}),f.jsxs("div",{className:"flex flex-col gap-3 text-xs",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1.5 font-medium",children:"垂直排版对齐 (封面必备)"}),f.jsx("div",{className:"grid grid-cols-3 gap-1 bg-[#f5f5f5] dark:bg-[#141414] p-1 rounded-lg border border-[#e5e5e5] dark:border-[#262626]",children:[{id:"top",label:"顶端对齐"},{id:"center",label:"垂直居中"},{id:"bottom",label:"底端对齐"}].map(M=>f.jsx("button",{onClick:()=>r({verticalAlign:M.id}),className:`py-1 text-[11px] rounded transition-all font-medium ${(N.verticalAlign||"top")===M.id?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:M.label},M.id))})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1.5 font-medium",children:"水平排版对齐"}),f.jsxs("div",{className:"grid grid-cols-3 gap-1 bg-[#f5f5f5] dark:bg-[#141414] p-1 rounded-lg border border-[#e5e5e5] dark:border-[#262626]",children:[f.jsxs("button",{onClick:()=>r({textAlign:"left"}),className:`py-1 flex items-center justify-center gap-1 text-[11px] rounded transition-all font-medium ${(N.textAlign||"left")==="left"?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:[f.jsx(jp,{className:"w-3 h-3"}),f.jsx("span",{children:"居左"})]}),f.jsxs("button",{onClick:()=>r({textAlign:"center"}),className:`py-1 flex items-center justify-center gap-1 text-[11px] rounded transition-all font-medium ${N.textAlign==="center"?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:[f.jsx(Fp,{className:"w-3 h-3"}),f.jsx("span",{children:"居中"})]}),f.jsxs("button",{onClick:()=>r({textAlign:"right"}),className:`py-1 flex items-center justify-center gap-1 text-[11px] rounded transition-all font-medium ${N.textAlign==="right"?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:[f.jsx(Tp,{className:"w-3 h-3"}),f.jsx("span",{children:"居右"})]})]})]})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center justify-between text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Dp,{className:"w-3.5 h-3.5 text-indigo-500 dark:text-indigo-400"}),f.jsx("span",{children:"字体与排版字阶"})]}),f.jsx("button",{onClick:()=>w(),disabled:b,title:"重新扫描 public/fonts 目录",className:"p-1 text-[#888888] hover:text-black dark:hover:text-white rounded hover:bg-[#eaeaea] dark:hover:bg-[#222222] transition-colors",children:f.jsx(ch,{className:`w-3 h-3 ${b?"animate-spin text-blue-500":""}`})})]}),f.jsxs("div",{className:"flex flex-col gap-3 text-xs",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1",children:"标题字体 (Heading Font)"}),f.jsxs("select",{value:y.headingFont,onChange:M=>c({headingFont:M.target.value}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded-md px-2 py-1.5 text-black dark:text-white text-xs focus:outline-none",children:[p.length>0&&f.jsx("optgroup",{label:"✨ 项目本地字体 (public/fonts)",children:p.map(M=>f.jsx("option",{value:M.family,children:M.label},`head-local-${M.family}`))}),f.jsx("optgroup",{label:"🌐 系统 / 云端预设",children:yx.map(M=>f.jsx("option",{value:M.value,children:M.label},`head-preset-${M.value}`))})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1",children:"正文字体 (Body Font)"}),f.jsxs("select",{value:y.bodyFont,onChange:M=>c({bodyFont:M.target.value}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded-md px-2 py-1.5 text-black dark:text-white text-xs focus:outline-none",children:[p.length>0&&f.jsx("optgroup",{label:"✨ 项目本地字体 (public/fonts)",children:p.map(M=>f.jsx("option",{value:M.family,children:M.label},`body-local-${M.family}`))}),f.jsx("optgroup",{label:"🌐 系统 / 云端预设",children:yx.map(M=>f.jsx("option",{value:M.value,children:M.label},`body-preset-${M.value}`))})]})]}),p.length===0?f.jsx("div",{className:"text-[10px] text-[#888888] dark:text-[#666666] flex items-center justify-between pt-1 border-t border-[#f5f5f5] dark:border-[#1a1a1a]",children:f.jsxs("span",{children:["💡 将 .ttf / .otf 放入 ",f.jsx("code",{children:"public/fonts/"})," 即可识别"]})}):f.jsx("div",{className:"text-[10px] text-emerald-600 dark:text-emerald-400 flex items-center justify-between pt-1 border-t border-[#f5f5f5] dark:border-[#1a1a1a]",children:f.jsxs("span",{children:["✨ 已加载 ",p.length," 个项目本地字体"]})})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(wp,{className:"w-3.5 h-3.5 text-blue-500 dark:text-blue-400"}),f.jsx("span",{children:"字号与比例参数"})]}),f.jsxs("div",{className:"flex flex-col gap-3.5 text-xs",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"基准字号 (Base Size)"}),f.jsxs("span",{className:"text-[#171717] dark:text-white font-semibold",children:[N.baseFontSize,"px"]})]}),f.jsx("input",{type:"range",min:"24",max:"96",step:"1",value:N.baseFontSize,onChange:M=>r({baseFontSize:parseInt(M.target.value,10)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"比例字阶系数 (大标题倍率)"}),f.jsxs("span",{className:"text-[#171717] dark:text-white font-semibold",children:[N.scaleRatio.toFixed(2),"x"]})]}),f.jsx("input",{type:"range",min:"1.15",max:"1.6",step:"0.01",value:N.scaleRatio,onChange:M=>r({scaleRatio:parseFloat(M.target.value)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"行高舒展倍率"}),f.jsx("span",{className:"text-[#171717] dark:text-white font-semibold",children:N.lineHeightMultiplier.toFixed(2)})]}),f.jsx("input",{type:"range",min:"1.2",max:"1.8",step:"0.02",value:N.lineHeightMultiplier,onChange:M=>r({lineHeightMultiplier:parseFloat(M.target.value)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"配图避让间隙 (Gap)"}),f.jsxs("span",{className:"text-[#171717] dark:text-white font-semibold",children:[N.obstacleGap,"px"]})]}),f.jsx("input",{type:"range",min:"12",max:"48",step:"2",value:N.obstacleGap,onChange:M=>r({obstacleGap:parseInt(M.target.value,10)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(Mp,{className:"w-3.5 h-3.5 text-emerald-600 dark:text-emerald-400"}),f.jsx("span",{children:"版心安全边距"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px] font-mono",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"上边距 (Top)"}),f.jsx("input",{type:"number",value:N.safeArea.top,onChange:M=>d({top:parseInt(M.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"下边距 (Bottom)"}),f.jsx("input",{type:"number",value:N.safeArea.bottom,onChange:M=>d({bottom:parseInt(M.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"左边距 (Left)"}),f.jsx("input",{type:"number",value:N.safeArea.left,onChange:M=>d({left:parseInt(M.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"右边距 (Right)"}),f.jsx("input",{type:"number",value:N.safeArea.right,onChange:M=>d({right:parseInt(M.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(Np,{className:"w-3.5 h-3.5 text-purple-600 dark:text-purple-400"}),f.jsx("span",{children:"视觉色彩主题"})]}),f.jsxs("div",{className:"flex flex-col gap-2.5 text-xs",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx("button",{onClick:()=>s({bgColor:"#ffffff",textColor:"#171717",headingColor:"#171717",accentColor:"#059669",quoteColor:"#525252",cardBg:"#f5f5f5"}),className:"w-6 h-6 rounded-full bg-[#ffffff] border-2 border-emerald-500 shadow-sm hover:scale-105 transition-all",title:"素白雅致 (推荐)"}),f.jsx("button",{onClick:()=>s({bgColor:"#f9fcfa",textColor:"#22201d",headingColor:"#0f2e22",accentColor:"#1d4f39",quoteColor:"#474038",cardBg:"#ffffff"}),className:"w-6 h-6 rounded-full bg-[#f9fcfa] border border-[#ccc] shadow-sm hover:scale-105 transition-all",title:"纸白浅草"}),f.jsx("button",{onClick:()=>s({bgColor:"#0a0a0a",textColor:"#ededed",headingColor:"#ffffff",accentColor:"#00e676",quoteColor:"#a0a0a0",cardBg:"#121212"}),className:"w-6 h-6 rounded-full bg-[#0a0a0a] border border-[#444] shadow-sm hover:scale-105 transition-all",title:"深邃暗夜"}),f.jsx("button",{onClick:()=>s({bgColor:"#09090b",textColor:"#fafafa",headingColor:"#ffffff",accentColor:"#3b82f6",quoteColor:"#a1a1aa",cardBg:"#18181b"}),className:"w-6 h-6 rounded-full bg-[#09090b] border border-blue-500 shadow-sm hover:scale-105 transition-all",title:"数码蓝暗黑"})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] font-medium",children:"标题颜色 (Heading)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:m.headingColor||m.textColor,onChange:M=>s({headingColor:M.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:m.headingColor||m.textColor})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888]",children:"正文字色 (Text)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:m.textColor,onChange:M=>s({textColor:M.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:m.textColor})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888]",children:"重点强调色 (Accent)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:m.accentColor,onChange:M=>s({accentColor:M.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:m.accentColor})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888]",children:"背景底色 (Canvas)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:u.canvasStyle?.fill?.type==="solid"?u.canvasStyle.fill.color:m.bgColor,onChange:M=>s({bgColor:M.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:m.bgColor})]})]})]})]}),f.jsx(Jp,{config:u,onChange:v}),f.jsxs("div",{className:"p-3.5",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(sp,{className:"w-3.5 h-3.5 text-amber-500 dark:text-amber-400"}),f.jsx("span",{children:"页眉页脚与版式装饰 (Chrome)"})]}),f.jsxs("div",{className:"flex flex-col gap-3 text-xs",children:[f.jsxs("div",{className:"bg-[#f9f9f9] dark:bg-[#141414] p-2.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-semibold text-[#333333] dark:text-[#cccccc] text-[11px]",children:"顶部栏 (Header)"}),f.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showHeader??!!u.watermarkText?.trim(),onChange:M=>g({showHeader:M.target.checked}),className:"rounded text-emerald-500 accent-emerald-500 cursor-pointer"}),f.jsx("span",{className:"text-[10px] text-[#666666] dark:text-[#888888]",children:"启用"})]})]}),(u.chrome?.showHeader??!!u.watermarkText?.trim())&&f.jsxs("div",{className:"flex flex-col gap-2 pl-2 border-l-2 border-[#e0e0e0] dark:border-[#2a2a2a] mt-1",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"水印 / 品牌标识"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showWatermark??!0,onChange:M=>g({showWatermark:M.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]}),f.jsx("input",{type:"text",value:u.watermarkText,onChange:M=>x(u.footerText,M.target.value),placeholder:"作者水印/标识文本...",className:"w-full bg-white dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white text-[11px]"})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"页码角标 (P.01)"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showPageNumber??u.aspectRatio==="longform-3-4",onChange:M=>g({showPageNumber:M.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]})]})]}),f.jsxs("div",{className:"bg-[#f9f9f9] dark:bg-[#141414] p-2.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-semibold text-[#333333] dark:text-[#cccccc] text-[11px]",children:"底部栏 (Footer)"}),f.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFooter??!!u.footerText?.trim(),onChange:M=>g({showFooter:M.target.checked}),className:"rounded text-emerald-500 accent-emerald-500 cursor-pointer"}),f.jsx("span",{className:"text-[10px] text-[#666666] dark:text-[#888888]",children:"启用"})]})]}),(u.chrome?.showFooter??!!u.footerText?.trim())&&f.jsxs("div",{className:"flex flex-col gap-2 pl-2 border-l-2 border-[#e0e0e0] dark:border-[#2a2a2a] mt-1",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"页脚署名 / 版权"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFooterText??!0,onChange:M=>g({showFooterText:M.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]}),f.jsx("input",{type:"text",value:u.footerText,onChange:M=>x(M.target.value,u.watermarkText),placeholder:"页脚版权/署名...",className:"w-full bg-white dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white text-[11px]"})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"顶部分割细线"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFooterDivider??!!u.footerText?.trim(),onChange:M=>g({showFooterDivider:M.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"算法填充率提示"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFillRatio??!1,onChange:M=>g({showFillRatio:M.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]})]})]})]})]})]})},Wp=({isOpen:u,onClose:r,refreshKey:s,onApplyTemplate:c,adminKey:d})=>{const[x,g]=fe.useState([]),[v,N]=fe.useState({}),[m,y]=fe.useState("default"),[p,b]=fe.useState("all"),[w,M]=fe.useState(!1),[Q,B]=fe.useState(null),L=async(H=m)=>{try{const V=await fetch(`/api/templates/slots?account=${encodeURIComponent(H)}`,{headers:{"x-admin-key":d}}),G=await V.json();if(!V.ok||!G.ok)throw new Error(G.message||G.error||"获取槽位失败");G.ok&&G.slots&&N(G.slots)}catch(V){B(V instanceof Error?V.message:"模板请求失败")}},$=async(H,V)=>{try{const G=await fetch("/api/templates/slots",{method:"POST",headers:{"Content-Type":"application/json",...d?{"x-admin-key":d}:{}},body:JSON.stringify({slot:H,templateId:V,account:m})}),S=await G.json();if(!G.ok||!S.ok)throw new Error(S.message||S.error||"设置默认模板失败");S.ok&&await L(m)}catch(G){B(G instanceof Error?G.message:"模板请求失败")}},ee=async()=>{M(!0),B(null);try{const H=await fetch("/api/templates",{headers:d?{"x-admin-key":d}:{}}),V=await H.json();H.ok&&V.ok&&Array.isArray(V.templates)?g(V.templates):B(V.message||"获取模板失败,请检查密钥")}catch{B("连接后端服务失败")}finally{M(!1)}};fe.useEffect(()=>{u&&(ee(),L(m))},[u,m,d,s]),fe.useEffect(()=>{if(!u)return;const H=V=>{V.key==="Escape"&&!document.querySelector("dialog[open]")&&r()};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[u,r]);const ce=async H=>{try{const V=await fetch(`/api/templates/${encodeURIComponent(H)}`,{method:"DELETE",headers:d?{"x-admin-key":d}:{}}),G=await V.json();if(!V.ok||!G.ok)throw new Error(G.message||G.error||"删除模板失败");g(S=>S.filter(q=>q.id!==H)),await L(m)}catch(V){B(V instanceof Error?V.message:"模板请求失败")}};if(!u)return null;const ue=x.filter(H=>p==="all"?!0:H.slot===p);return f.jsxs("aside",{"aria-label":"模板库",className:"absolute inset-y-0 right-0 z-40 w-80 max-w-full bg-white dark:bg-[#0f0f0f] border-l border-[#eaeaea] dark:border-[#262626] flex flex-col shadow-xl overflow-hidden",children:[f.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[#eaeaea] dark:border-[#222222]",children:[f.jsxs("div",{className:"flex items-center gap-2 font-semibold text-sm text-[#171717] dark:text-white",children:[f.jsx(So,{className:"w-4 h-4 text-emerald-500 dark:text-emerald-400"}),f.jsx("span",{children:"模板库"})]}),f.jsx("button",{onClick:r,"aria-label":"关闭模板库",className:"text-[#888888] hover:text-black dark:hover:text-white p-1 rounded-md hover:bg-[#f5f5f5] dark:hover:bg-[#1a1a1a]",children:f.jsx(jo,{className:"w-4 h-4"})})]}),f.jsxs("div",{className:"p-3 flex-1 min-h-0 flex flex-col gap-4 overflow-y-auto",children:[Q&&f.jsx("div",{role:"alert",className:"text-xs text-red-500 bg-red-500/10 p-2 rounded border border-red-500/20",children:Q}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("div",{className:"flex items-center justify-between text-xs",children:f.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-[#666666] dark:text-[#888888]",children:[f.jsx("span",{children:"槽位账号:"}),f.jsxs("select",{value:m,onChange:H=>y(H.target.value),className:"bg-white dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#2a2a2a] rounded px-2 py-0.5 text-xs text-black dark:text-white focus:outline-none font-mono",children:[f.jsx("option",{value:"default",children:"default (主账号)"}),f.jsx("option",{value:"ancientone",children:"ancientone"})]})]})}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1 text-xs",children:[f.jsx("button",{onClick:()=>b("all"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${p==="all"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"全部"}),f.jsx("button",{onClick:()=>b("article_cover"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${p==="article_cover"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"文章封面"}),f.jsx("button",{onClick:()=>b("newspic_cover"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${p==="newspic_cover"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"贴图封面"}),f.jsx("button",{onClick:()=>b("newspic_content"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${p==="newspic_content"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"贴图内容"})]})]}),f.jsx("div",{className:"flex flex-col gap-2",children:w?f.jsx("div",{className:"text-center py-8 text-xs text-[#888888] dark:text-[#555555]",children:"正在加载模板..."}):ue.length===0?f.jsx("div",{className:"text-center py-8 text-xs text-[#888888] dark:text-[#555555]",children:"暂无匹配模板"}):ue.map(H=>{const V=v.article_cover?.id===H.id,G=v.newspic_cover?.id===H.id,S=v.newspic_content?.id===H.id;return f.jsxs("div",{className:"flex flex-col justify-between p-3 rounded-lg bg-[#fafafa] dark:bg-[#141414] border border-[#eaeaea] dark:border-[#222222] hover:border-[#cccccc] dark:hover:border-[#333333] transition-all gap-2 group",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-5 h-5 rounded border border-[#d4d4d4] dark:border-[#333333] shrink-0",style:{backgroundColor:H.theme.bgColor}}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[f.jsx("span",{className:"text-xs font-semibold text-[#171717] dark:text-white",children:H.name}),H.slot&&f.jsx("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-blue-500/10 text-blue-600 dark:text-blue-400 border border-blue-500/20 font-medium",children:H.slot==="article_cover"?"文章封面":H.slot==="newspic_cover"?"贴图封面":"贴图内容"}),V&&f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/20 font-medium flex items-center gap-0.5",children:[f.jsx(ho,{className:"w-2.5 h-2.5 fill-amber-500"})," 文章封面默认"]}),G&&f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/20 font-medium flex items-center gap-0.5",children:[f.jsx(ho,{className:"w-2.5 h-2.5 fill-amber-500"})," 贴图封面默认"]}),S&&f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border border-emerald-500/20 font-medium flex items-center gap-0.5",children:[f.jsx(ho,{className:"w-2.5 h-2.5 fill-emerald-500"})," 贴图内容默认"]})]}),f.jsxs("div",{className:"text-[10px] text-[#888888] dark:text-[#666666] font-mono mt-0.5",children:[H.aspectRatio," • 字号: ",H.algorithm.baseFontSize,"px",H.images&&H.images.length>0&&` • 配图: ${H.images.length}个`]})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[H.id&&f.jsxs("select",{value:"",onChange:q=>{q.target.value&&$(q.target.value,H.id)},className:"text-[11px] bg-white dark:bg-[#1a1a1a] border border-[#d4d4d4] dark:border-[#333333] text-[#666666] dark:text-[#aaaaaa] rounded px-2 py-1 focus:outline-none",title:"为此账号设为某个槽位的默认模板",children:[f.jsx("option",{value:"",children:"设为槽位默认..."}),f.jsx("option",{value:"article_cover",children:"设为「文章封面默认」"}),f.jsx("option",{value:"newspic_cover",children:"设为「贴图封面默认」"}),f.jsx("option",{value:"newspic_content",children:"设为「贴图内容默认」"})]}),f.jsxs("button",{onClick:()=>{c(H)},className:"flex items-center gap-1 px-2.5 py-1 bg-white dark:bg-[#1f1f1f] hover:bg-emerald-50 dark:hover:bg-emerald-500/20 text-[#333333] dark:text-[#cccccc] hover:text-emerald-700 dark:hover:text-emerald-400 border border-[#d4d4d4] dark:border-[#2a2a2a] hover:border-emerald-500/40 rounded text-xs transition-all font-medium",children:[f.jsx(Qx,{className:"w-3 h-3"}),f.jsx("span",{children:"套用"})]}),H.id&&!H.id.startsWith("tpl_wechat_")&&!H.id.startsWith("tpl_longform_")&&!H.id.startsWith("tpl_square_")&&!H.id.startsWith("tpl_wide_")&&f.jsx("button",{onClick:()=>ce(H.id),className:"p-1 text-[#888888] dark:text-[#555555] hover:text-red-500 rounded hover:bg-[#f0f0f0] dark:hover:bg-[#1f1f1f]",title:"删除自定义模板",children:f.jsx(Eh,{className:"w-3.5 h-3.5"})})]})]},H.id)})})]})]})};function Cr(u=[]){if(!Array.isArray(u))throw new RangeError("模板图片必须是数组");const r=new Set;for(const s of u){if(!s||typeof s!="object")throw new RangeError("无效的模板图片");if(s.templateAssetKey===void 0)continue;const c=s.templateAssetKey;if(s.repeatEveryPage!==void 0&&typeof s.repeatEveryPage!="boolean")throw new RangeError(`素材 ${c} 的每页重复开关必须是布尔值`);if(typeof c!="string"||!/^[a-zA-Z0-9_-]+$/.test(c))throw new RangeError("素材标识只能包含字母、数字、下划线和短横线");if(s.repeatEveryPage&&!s.isAbsolute)throw new RangeError(`素材 ${c} 的每页重复仅支持自由定位模式`);if(r.has(c))throw new RangeError(`重复的模板素材标识:${c}`);r.add(c)}}function $p(u,r=[],s={}){if(Cr(r),!s||typeof s!="object"||Array.isArray(s))throw new RangeError("素材替换必须是标识到图片地址的映射");const c=r.filter(v=>v.templateAssetKey);for(const[v,N]of Object.entries(s)){if(!c.some(m=>m.templateAssetKey===v))throw new RangeError(`未知模板素材:${v}`);if(typeof N!="string"||!N.trim())throw new RangeError(`素材 ${v} 的替换图片不能为空`)}const d=u.filter(v=>!v.templateAssetKey),x=r.filter(v=>!v.templateAssetKey);return[...d.length===0?x.map(v=>({...v,id:`img_${crypto.randomUUID()}`})):d.map((v,N)=>{const m=x[N];return m?{...v,layoutPreset:m.layoutPreset??v.layoutPreset,isAbsolute:m.isAbsolute??v.isAbsolute,x:m.x??v.x,y:m.y??v.y,width:m.width??v.width,height:m.height??v.height,rotate:m.rotate??v.rotate,opacity:m.opacity??v.opacity,zIndex:m.zIndex??v.zIndex,borderRadius:m.borderRadius??v.borderRadius,captionHeight:m.captionHeight??v.captionHeight,pageIndex:m.pageIndex??v.pageIndex}:v}),...c.map(v=>({...v,src:Object.hasOwn(s,v.templateAssetKey)?s[v.templateAssetKey]:v.src}))]}const Pp=({isOpen:u,onClose:r,currentConfig:s,onSaved:c,adminKey:d})=>{const x=fe.useRef(null),[g,v]=fe.useState(""),[N,m]=fe.useState("none"),[y,p]=fe.useState(!1),[b,w]=fe.useState(null);fe.useEffect(()=>{u?(v(s.name||"我的自定义模板"),m(s.slot||(s.aspectRatio==="wechat-cover-2.35"?"article_cover":"newspic_content")),w(null),x.current?.showModal()):x.current?.close()},[u]);const M=async Q=>{if(Q.preventDefault(),!(!g.trim()||y)){p(!0),w(null);try{Cr(s.images);const B=await fetch("/api/templates",{method:"POST",headers:{"Content-Type":"application/json",...d?{"x-admin-key":d}:{}},body:JSON.stringify({...s,id:void 0,name:g.trim(),slot:N==="none"?void 0:N})}),L=await B.json();if(!B.ok||!L.ok)throw new Error(L.message||L.error||"保存模板失败");c(L.template),r()}catch(B){w(B instanceof Error?B.message:"保存模板请求异常")}finally{p(!1)}}};return f.jsx("dialog",{ref:x,"aria-labelledby":"save-template-title",onCancel:Q=>{Q.preventDefault(),y||r()},className:"m-auto w-[calc(100%-2rem)] max-w-sm p-0 rounded-xl border border-[#eaeaea] dark:border-[#262626] bg-white dark:bg-[#0f0f0f] text-[#171717] dark:text-white shadow-2xl backdrop:bg-black/40",children:f.jsxs("form",{onSubmit:M,children:[f.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[#eaeaea] dark:border-[#222222]",children:[f.jsx("h2",{id:"save-template-title",className:"text-sm font-semibold",children:"保存模板"}),f.jsx("button",{type:"button",onClick:r,disabled:y,"aria-label":"关闭保存模板",className:"p-1 rounded hover:bg-black/5 dark:hover:bg-white/10 disabled:opacity-50",children:f.jsx(jo,{className:"w-4 h-4"})})]}),f.jsxs("div",{className:"p-5 flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-2 text-xs",children:["模板名称",f.jsx("input",{autoFocus:!0,required:!0,value:g,onChange:Q=>v(Q.target.value),placeholder:"输入模板名称",className:"bg-transparent border border-[#d4d4d4] dark:border-[#333333] rounded px-3 py-2 focus:outline-none focus:border-emerald-500"})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-xs",children:["保存到槽位",f.jsxs("select",{value:N,onChange:Q=>m(Q.target.value),className:"bg-white dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#333333] rounded px-3 py-2",children:[f.jsx("option",{value:"article_cover",children:"文章封面 (2.35:1)"}),f.jsx("option",{value:"newspic_cover",children:"贴图封面 (3:4)"}),f.jsx("option",{value:"newspic_content",children:"贴图内容 (3:4)"}),f.jsx("option",{value:"none",children:"通用模板"})]})]}),b&&f.jsx("p",{role:"alert",className:"text-xs text-red-500",children:b}),f.jsxs("button",{type:"submit",disabled:y||!g.trim(),className:"flex items-center justify-center gap-2 px-3 py-2 rounded bg-black text-white dark:bg-white dark:text-black text-xs font-semibold disabled:opacity-50",children:[f.jsx(dh,{className:"w-3.5 h-3.5"}),y?"保存中...":"保存模板"]})]})]})})},go="typeset_studio_admin_key";function eb(){const[u,r]=fe.useState(()=>localStorage.getItem(go)||""),[s,c]=fe.useState(null),[d,x]=fe.useState(!1),g=async N=>{if(!N)return c(!1),!1;x(!0);try{const p=!!(await(await fetch("/api/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:N})})).json()).ok;return c(p),p}catch{return c(!1),!1}finally{x(!1)}},v=N=>{localStorage.setItem(go,N),r(N),g(N)};return fe.useEffect(()=>{(async()=>{let m=u;if(!m)try{const p=await(await fetch("/api/auth/current-key")).json();p.ok&&p.key&&(m=p.key,r(p.key),localStorage.setItem(go,p.key))}catch{}m?g(m):c(!1)})()},[]),{adminKey:u,setAdminKey:v,isVerified:s,isVerifying:d,verifyKey:g}}const tb=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Nx=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function lb(u){if(u<=255)return tb[u];let r=0,s=Nx.length-1;for(;r<=s;){const c=r+s>>1,d=Nx[c];if(u<d[0]){s=c-1;continue}if(u>d[1]){r=c+1;continue}return d[2]}return"L"}function nb(u){const r=u.length;if(r===0)return null;const s=new Array(r);let c=!1;for(let m=0;m<r;){const y=u.charCodeAt(m);let p=y,b=1;if(y>=55296&&y<=56319&&m+1<r){const M=u.charCodeAt(m+1);M>=56320&&M<=57343&&(p=(y-55296<<10)+(M-56320)+65536,b=2)}const w=lb(p);(w==="R"||w==="AL"||w==="AN")&&(c=!0);for(let M=0;M<b;M++)s[m+M]=w;m+=b}if(!c)return null;let d=0;for(let m=0;m<r;m++){const y=s[m];if(y==="L"){d=0;break}if(y==="R"||y==="AL"){d=1;break}}const x=new Int8Array(r);for(let m=0;m<r;m++)x[m]=d;const g=d&1?"R":"L",v=g;let N=v;for(let m=0;m<r;m++)s[m]==="NSM"?s[m]=N:N=s[m];N=v;for(let m=0;m<r;m++){const y=s[m];y==="EN"?s[m]=N==="AL"?"AN":"EN":(y==="R"||y==="L"||y==="AL")&&(N=y)}for(let m=0;m<r;m++)s[m]==="AL"&&(s[m]="R");for(let m=1;m<r-1;m++)s[m]==="ES"&&s[m-1]==="EN"&&s[m+1]==="EN"&&(s[m]="EN"),s[m]==="CS"&&(s[m-1]==="EN"||s[m-1]==="AN")&&s[m+1]===s[m-1]&&(s[m]=s[m-1]);for(let m=0;m<r;m++){if(s[m]!=="EN")continue;let y;for(y=m-1;y>=0&&s[y]==="ET";y--)s[y]="EN";for(y=m+1;y<r&&s[y]==="ET";y++)s[y]="EN"}for(let m=0;m<r;m++){const y=s[m];(y==="WS"||y==="ES"||y==="ET"||y==="CS")&&(s[m]="ON")}N=v;for(let m=0;m<r;m++){const y=s[m];y==="EN"?s[m]=N==="L"?"L":"EN":(y==="R"||y==="L")&&(N=y)}for(let m=0;m<r;m++){if(s[m]!=="ON")continue;let y=m+1;for(;y<r&&s[y]==="ON";)y++;const p=m>0?s[m-1]:v,b=y<r?s[y]:v,w=p!=="L"?"R":"L";if(w===(b!=="L"?"R":"L"))for(let Q=m;Q<y;Q++)s[Q]=w;m=y-1}for(let m=0;m<r;m++)s[m]==="ON"&&(s[m]=g);for(let m=0;m<r;m++){const y=s[m];(x[m]&1)===0?y==="R"?x[m]++:(y==="AN"||y==="EN")&&(x[m]+=2):(y==="L"||y==="AN"||y==="EN")&&x[m]++}return x}function ab(u,r){const s=nb(u);if(s===null)return null;const c=new Int8Array(r.length);for(let d=0;d<r.length;d++)c[d]=s[r[d]];return c}const ib=/[ \t\n\r\f]+/g,ub=/[\t\n\r\f]| {2,}|^ | $/;function rb(u){const r=u??"normal";return r==="pre-wrap"?{mode:r,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:r,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function cb(u){if(!ub.test(u))return u;let r=u.replace(ib," ");return r.charCodeAt(0)===32&&(r=r.slice(1)),r.length>0&&r.charCodeAt(r.length-1)===32&&(r=r.slice(0,-1)),r}function sb(u){return/[\r\f]/.test(u)?u.replace(/\r\n/g,`
|
|
293
|
+
`).replace(/[\r\f]/g,`
|
|
294
|
+
`):u}let br=null,ob;function fb(){return br===null&&(br=new Intl.Segmenter(ob,{granularity:"word"})),br}function db(){br=null}const xb=/\p{Script=Arabic}/u,cn=/\p{M}/u,Do=/\p{Nd}/u;function Sx(u){return xb.test(u)}function Ex(u){return u>=19968&&u<=40959||u>=13312&&u<=19903||u>=131072&&u<=173791||u>=173824&&u<=177983||u>=177984&&u<=178207||u>=178208&&u<=183983||u>=183984&&u<=191471||u>=191472&&u<=192093||u>=194560&&u<=195103||u>=196608&&u<=201551||u>=201552&&u<=205743||u>=205744&&u<=210041||u>=63744&&u<=64255||u>=12288&&u<=12351||u>=12352&&u<=12447||u>=12448&&u<=12543||u>=12592&&u<=12687||u>=44032&&u<=55215||u>=65280&&u<=65519}function dl(u){for(let r=0;r<u.length;r++){const s=u.charCodeAt(r);if(!(s<12288)){if(s>=55296&&s<=56319&&r+1<u.length){const c=u.charCodeAt(r+1);if(c>=56320&&c<=57343){const d=(s-55296<<10)+(c-56320)+65536;if(Ex(d))return!0;r++;continue}}if(Ex(s))return!0}}return!1}function hb(u){const r=Ri(u);return r!==null&&(Oo.has(r)||Rn.has(r))}const mb=new Set([" "," ","","\uFEFF"]),gb=new Set(["-","‐","–","—"]);function pb(u){const r=Ri(u);return r!==null&&mb.has(r)}function bb(u){const r=Ri(u);return r!==null&&gb.has(r)}function Oh(u,r){return pb(u)?!1:r?!(hb(u)||bb(u)):!0}const Oo=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Mr=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Bo=new Set(["'","’"]),Rn=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),vb=new Set([":",".","،","؛"]),yb=new Set(["၏"]),Nb=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Sb(u){if(zo(u))return!0;let r=!1;for(const s of u){if(Rn.has(s)||kr(s)){r=!0;continue}if(!(r&&cn.test(s)))return!1}return r}function Eb(u){for(const r of u)if(!Oo.has(r)&&!Rn.has(r))return!1;return u.length>0}function Ab(u){if(zo(u))return!0;for(const r of u)if(!Mr.has(r)&&!Bo.has(r)&&!cn.test(r)&&!kr(r))return!1;return u.length>0}function zo(u){let r=!1;for(const s of u)if(!(s==="\\"||cn.test(s))){if(Mr.has(s)||Rn.has(s)||Bo.has(s)){r=!0;continue}return!1}return r}function wr(u,r){const s=r-1;if(s<=0)return Math.max(s,0);const c=u.charCodeAt(s);if(c<56320||c>57343)return s;const d=s-1;if(d<0)return s;const x=u.charCodeAt(d);return x>=55296&&x<=56319?d:s}function Ri(u){if(u.length===0)return null;const r=wr(u,u.length);return u.slice(r)}function Cb(u){for(const r of u)if(!cn.test(r))return r;return null}function Mb(u){for(let r=u.length;r>0;){const s=wr(u,r),c=u.slice(s,r);if(!cn.test(c))return c;r=s}return null}const wb=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function kb(u,r){for(let s=0;s<r.length;s+=2)if(u>=r[s]&&u<=r[s+1])return!0;return!1}function kr(u){const r=u.codePointAt(0);return r!==void 0&&kb(r,wb)}function Tb(u){const r=Mb(u);return r!==null&&kr(r)}function Fb(u){const r=Cb(u);return r!==null&&Do.test(r)}function jb(u){const r=Array.from(u);let s=r.length;for(;s>0;){const c=r[s-1];if(cn.test(c)){s--;continue}if(Mr.has(c)||Bo.has(c)){s--;continue}break}return s<=0||s===r.length?null:{head:r.slice(0,s).join(""),tail:r.slice(s).join("")}}function Db(u,r,s){return s==="text"&&!r&&u.length===1&&u!=="-"&&u!=="—"?u:null}function Ax(u,r,s,c){const d=r[c],x=u[c];if(d==null)return x;const g=s[c];if(x.length===g)return x;const v=d.repeat(g);return u[c]=v,v}function Cx(u,r){return u&&r!==null&&vb.has(r)}function Ob(u){const r=Ri(u);return r!==null&&yb.has(r)}function Bb(u){if(u.length<2||u[0]!==" ")return null;const r=u.slice(1);return/^\p{M}+$/u.test(r)?{space:" ",marks:r}:null}function Eo(u){let r=u.length;for(;r>0;){const s=wr(u,r),c=u.slice(s,r);if(Nb.has(c))return!0;if(!Rn.has(c))return!1;r=s}return!1}function zb(u,r){if(r.preserveOrdinarySpaces||r.preserveHardBreaks){if(u===" ")return"preserved-space";if(u===" ")return"tab";if(r.preserveHardBreaks&&u===`
|
|
295
|
+
`)return"hard-break"}return u===" "?"space":u===" "||u===" "||u===""||u==="\uFEFF"?"glue":u===""?"zero-width-break":u===""?"soft-hyphen":"text"}const _b=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function $t(u){return u.length===1?u[0]:u.join("")}function Rb(u,r){const s=[];for(let c=u.length-1;c>=0;c--)s.push(u[c]);return s.push(r),$t(s)}function Lb(u,r,s,c){if(!_b.test(u))return[{text:u,isWordLike:r,kind:"text",start:s}];const d=[];let x=null,g=[],v=s,N=!1,m=0;for(const y of u){const p=zb(y,c),b=p==="text"&&r;if(x!==null&&p===x&&b===N){g.push(y),m+=y.length;continue}x!==null&&d.push({text:$t(g),isWordLike:N,kind:x,start:v}),x=p,g=[y],v=s+m,N=b,m+=y.length}return x!==null&&d.push({text:$t(g),isWordLike:N,kind:x,start:v}),d}function Ao(u){return u==="space"||u==="preserved-space"||u==="zero-width-break"||u==="hard-break"}const Hb=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Ub(u,r){const s=u.texts[r];return s.startsWith("www.")?!0:Hb.test(s)&&r+1<u.len&&u.kinds[r+1]==="text"&&u.texts[r+1]==="//"}function Gb(u){return u.includes("?")&&(u.includes("://")||u.startsWith("www."))}function qb(u){const r=u.texts.slice(),s=u.isWordLike.slice(),c=u.kinds.slice(),d=u.starts.slice();for(let g=0;g<u.len;g++){if(c[g]!=="text"||!Ub(u,g))continue;const v=[r[g]];let N=g+1;for(;N<u.len&&!Ao(c[N]);){v.push(r[N]),s[g]=!0;const m=r[N].includes("?");if(c[N]="text",r[N]="",N++,m)break}r[g]=$t(v)}let x=0;for(let g=0;g<r.length;g++){const v=r[g];v.length!==0&&(x!==g&&(r[x]=v,s[x]=s[g],c[x]=c[g],d[x]=d[g]),x++)}return r.length=x,s.length=x,c.length=x,d.length=x,{len:x,texts:r,isWordLike:s,kinds:c,starts:d}}function Yb(u){const r=[],s=[],c=[],d=[];for(let x=0;x<u.len;x++){const g=u.texts[x];if(r.push(g),s.push(u.isWordLike[x]),c.push(u.kinds[x]),d.push(u.starts[x]),!Gb(g))continue;const v=x+1;if(v>=u.len||Ao(u.kinds[v]))continue;const N=[],m=u.starts[v];let y=v;for(;y<u.len&&!Ao(u.kinds[y]);)N.push(u.texts[y]),y++;N.length>0&&(r.push($t(N)),s.push(!0),c.push("text"),d.push(m),x=y-1)}return{len:r.length,texts:r,isWordLike:s,kinds:c,starts:d}}const Xb=new Set([":","-","/","×",",",".","+","–","—"]),Qb=/[\p{P}\p{S}\p{Co}]/u,Vb=/\p{Emoji_Presentation}/u,Zb=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function Kb(u){return u>=33&&u<=47&&u!==45||u>=58&&u<=64&&u!==63||u>=91&&u<=96||u>=123&&u<=126}function Bh(u){const r=u.charCodeAt(0);return r<128?Kb(r):!Zb.has(u)&&!Vb.test(u)&&Qb.test(u)}function Mx(u){let r=!1;for(const s of u)if(!cn.test(s)){if(!Bh(s))return!1;r=!0}return r}function Jb(u){for(let r=u.length;r>0;){const s=wr(u,r),c=u.slice(s,r);if(cn.test(c)){r=s;continue}return Bh(c)||kr(c)}return!1}function Ib(u,r,s,c){const d=!r&&Mx(u),x=!c&&Mx(s),g=Tb(u),v=(r||g)&&Jb(u);return!d&&!x&&!v||dl(u)||dl(s)?!1:(r||d||g)&&(c||x)}function zh(u){for(const r of u)if(Do.test(r))return!0;return!1}function Sr(u){if(u.length===0)return!1;for(const r of u)if(!(Do.test(r)||Xb.has(r)))return!1;return!0}function Wb(u){const r=[],s=[],c=[],d=[];for(let x=0;x<u.len;x++){const g=u.texts[x],v=u.kinds[x];if(v==="text"&&Sr(g)&&zh(g)){const N=[g];let m=x+1;for(;m<u.len&&u.kinds[m]==="text"&&Sr(u.texts[m]);)N.push(u.texts[m]),m++;r.push($t(N)),s.push(!0),c.push("text"),d.push(u.starts[x]),x=m-1;continue}r.push(g),s.push(u.isWordLike[x]),c.push(v),d.push(u.starts[x])}return{len:r.length,texts:r,isWordLike:s,kinds:c,starts:d}}function $b(u){const r=[],s=[],c=[],d=[];let x=0;for(;x<u.len;){const g=u.texts[x],v=u.kinds[x],N=u.isWordLike[x];if(v==="text"){const m=[g];let y=x+1,p=N;for(;y<u.len&&u.kinds[y]==="text"&&Ib(u.texts[y-1],u.isWordLike[y-1],u.texts[y],u.isWordLike[y]);){const b=u.texts[y];m.push(b),p=p||u.isWordLike[y],y++}if(y>x+1){r.push($t(m)),s.push(p),c.push("text"),d.push(u.starts[x]),x=y;continue}}r.push(g),s.push(N),c.push(v),d.push(u.starts[x]),x++}return{len:r.length,texts:r,isWordLike:s,kinds:c,starts:d}}function Pb(u){const r=[],s=[],c=[],d=[];for(let x=0;x<u.len;x++){const g=u.texts[x];if(u.kinds[x]==="text"&&g.includes("-")){const v=g.split("-");let N=v.length>1;for(let m=0;m<v.length;m++){const y=v[m];if(!N)break;(y.length===0||!zh(y)||!Sr(y))&&(N=!1)}if(N){let m=0;for(let y=0;y<v.length;y++){const p=v[y],b=y<v.length-1?`${p}-`:p;r.push(b),s.push(!0),c.push("text"),d.push(u.starts[x]+m),m+=b.length}continue}}r.push(g),s.push(u.isWordLike[x]),c.push(u.kinds[x]),d.push(u.starts[x])}return{len:r.length,texts:r,isWordLike:s,kinds:c,starts:d}}function ev(u){const r=[],s=[],c=[],d=[];let x=0;for(;x<u.len;){const g=[u.texts[x]];let v=u.isWordLike[x],N=u.kinds[x],m=u.starts[x];if(N==="glue"){const y=[g[0]],p=m;for(x++;x<u.len&&u.kinds[x]==="glue";)y.push(u.texts[x]),x++;const b=$t(y);if(x<u.len&&u.kinds[x]==="text")g[0]=b,g.push(u.texts[x]),v=u.isWordLike[x],N="text",m=p,x++;else{r.push(b),s.push(!1),c.push("glue"),d.push(p);continue}}else x++;if(N==="text")for(;x<u.len&&u.kinds[x]==="glue";){const y=[];for(;x<u.len&&u.kinds[x]==="glue";)y.push(u.texts[x]),x++;const p=$t(y);if(x<u.len&&u.kinds[x]==="text"){g.push(p,u.texts[x]),v=v||u.isWordLike[x],x++;continue}g.push(p)}r.push($t(g)),s.push(v),c.push(N),d.push(m)}return{len:r.length,texts:r,isWordLike:s,kinds:c,starts:d}}function tv(u){const r=u.texts.slice(),s=u.isWordLike.slice(),c=u.kinds.slice(),d=u.starts.slice();for(let x=0;x<r.length-1;x++){if(c[x]!=="text"||c[x+1]!=="text"||!dl(r[x])||!dl(r[x+1]))continue;const g=jb(r[x]);g!==null&&(r[x]=g.head,r[x+1]=g.tail+r[x+1],d[x+1]=d[x]+g.head.length)}return{len:r.length,texts:r,isWordLike:s,kinds:c,starts:d}}function lv(u,r,s){const c=fb();let d=0;const x=[],g=[],v=[],N=[],m=[],y=[],p=[],b=[],w=[],M=[],Q=[],B=[];for(const H of c.segment(u))for(const V of Lb(H.segment,H.isWordLike??!1,H.index,s)){let O=function(){y[Y]!==null&&(g[Y]=[Ax(x,y,p,Y)],y[Y]=null),g[Y].push(V.text),v[Y]=v[Y]||V.isWordLike,b[Y]=b[Y]||q,w[Y]=w[Y]||_,M[Y]=ne,Q[Y]=he,B[Y]=Cx(w[Y],te)};const G=V.kind==="text",S=Db(V.text,V.isWordLike,V.kind),q=dl(V.text),_=Sx(V.text),te=Ri(V.text),ne=Eo(V.text),he=Ob(V.text),Y=d-1;r.carryCJKAfterClosingQuote&&G&&d>0&&N[Y]==="text"&&q&&b[Y]&&M[Y]||G&&d>0&&N[Y]==="text"&&Eb(V.text)&&b[Y]||G&&d>0&&N[Y]==="text"&&Q[Y]?O():G&&d>0&&N[Y]==="text"&&V.isWordLike&&_&&B[Y]?(O(),v[Y]=!0):S!==null&&d>0&&N[Y]==="text"&&y[Y]===S?p[Y]=(p[Y]??1)+1:G&&!V.isWordLike&&d>0&&N[Y]==="text"&&!b[Y]&&(Sb(V.text)||V.text==="-"&&v[Y])?O():(x[d]=V.text,g[d]=[V.text],v[d]=V.isWordLike,N[d]=V.kind,m[d]=V.start,y[d]=S,p[d]=S===null?0:1,b[d]=q,w[d]=_,M[d]=ne,Q[d]=he,B[d]=Cx(_,te),d++)}for(let H=0;H<d;H++){if(y[H]!==null){x[H]=Ax(x,y,p,H);continue}x[H]=$t(g[H])}for(let H=1;H<d;H++)N[H]==="text"&&!v[H]&&zo(x[H])&&N[H-1]==="text"&&!b[H-1]&&(x[H-1]+=x[H],v[H-1]=v[H-1]||v[H],x[H]="");const L=Array.from({length:d},()=>null);let $=-1;for(let H=d-1;H>=0;H--){const V=x[H];if(V.length!==0){if(N[H]==="text"&&!v[H]&&$>=0&&N[$]==="text"&&(Ab(V)||V==="-"&&Fb(x[$]))){const G=L[$]??[];G.push(V),L[$]=G,m[$]=m[H],x[H]="";continue}$=H}}for(let H=0;H<d;H++){const V=L[H];V!=null&&(x[H]=Rb(V,x[H]))}let ee=0;for(let H=0;H<d;H++){const V=x[H];V.length!==0&&(ee!==H&&(x[ee]=V,v[ee]=v[H],N[ee]=N[H],m[ee]=m[H]),ee++)}x.length=ee,v.length=ee,N.length=ee,m.length=ee;const ce=ev({len:ee,texts:x,isWordLike:v,kinds:N,starts:m}),ue=tv($b(Pb(Wb(Yb(qb(ce))))));for(let H=0;H<ue.len-1;H++){const V=Bb(ue.texts[H]);V!==null&&(ue.kinds[H]!=="space"&&ue.kinds[H]!=="preserved-space"||ue.kinds[H+1]!=="text"||!Sx(ue.texts[H+1])||(ue.texts[H]=V.space,ue.isWordLike[H]=!1,ue.kinds[H]=ue.kinds[H]==="preserved-space"?"preserved-space":"space",ue.texts[H+1]=V.marks+ue.texts[H+1],ue.starts[H+1]=ue.starts[H]+V.space.length))}return ue}function nv(u,r){if(u.len===0)return[];if(!r.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:u.len,consumedEndSegmentIndex:u.len}];const s=[];let c=0;for(let d=0;d<u.len;d++)u.kinds[d]==="hard-break"&&(s.push({startSegmentIndex:c,endSegmentIndex:d,consumedEndSegmentIndex:d+1}),c=d+1);return c<u.len&&s.push({startSegmentIndex:c,endSegmentIndex:u.len,consumedEndSegmentIndex:u.len}),s}function av(u,r,s){if(r.len<=1)return r;const c=[],d=[],x=[],g=[];let v=-1,N=!1;function m(b){c.push(r.texts[b]),d.push(r.isWordLike[b]),x.push("text"),g.push(r.starts[b])}function y(b,w){let M=!1;for(let L=b;L<w;L++)M=M||r.isWordLike[L];const Q=r.starts[b],B=w<r.len?r.starts[w]:u.length;c.push(u.slice(Q,B)),d.push(M),x.push("text"),g.push(Q)}function p(b){if(!(v<0)){if(N)v+1===b?m(v):y(v,b);else for(let w=v;w<b;w++)m(w);v=-1,N=!1}}for(let b=0;b<r.len;b++){const w=r.texts[b],M=r.kinds[b];if(M==="text"){v>=0&&!Oh(r.texts[b-1],s)&&p(b),v<0&&(v=b),N=N||dl(w);continue}p(b),c.push(w),d.push(r.isWordLike[b]),x.push(M),g.push(r.starts[b])}return p(r.len),{len:c.length,texts:c,isWordLike:d,kinds:x,starts:g}}function iv(u,r,s="normal",c="normal"){const d=rb(s),x=d.mode==="pre-wrap"?sb(u):cb(u);if(x.length===0)return{normalized:x,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const g=lv(x,r,d),v=c==="keep-all"?av(x,g,r.breakKeepAllAfterPunctuation):g;return{normalized:x,chunks:nv(v,d),...v}}let Da=null;const Co=new Map;let Oa=null;const uv=96,rv=/\p{Emoji_Presentation}/u,cv=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let vr=null;const Mo=new Map;function _o(){if(Da!==null)return Da;if(typeof OffscreenCanvas<"u")return Da=new OffscreenCanvas(1,1).getContext("2d"),Da;if(typeof document<"u")return Da=document.createElement("canvas").getContext("2d"),Da;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function sv(u){let r=Co.get(u);return r||(r=new Map,Co.set(u,r)),r}function rn(u,r){let s=r.get(u);return s===void 0&&(s={width:_o().measureText(u).width,containsCJK:dl(u)},r.set(u,s)),s}function La(){if(Oa!==null)return Oa;if(typeof navigator>"u")return Oa={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Oa;const u=navigator.userAgent,s=navigator.vendor==="Apple Computer, Inc."&&u.includes("Safari/")&&!u.includes("Chrome/")&&!u.includes("Chromium/")&&!u.includes("CriOS/")&&!u.includes("FxiOS/")&&!u.includes("EdgiOS/"),c=u.includes("Chrome/")||u.includes("Chromium/")||u.includes("CriOS/")||u.includes("Edg/");return Oa={lineFitEpsilon:s?1/64:.005,carryCJKAfterClosingQuote:c,breakKeepAllAfterPunctuation:!s,preferPrefixWidthsForBreakableRuns:s,preferEarlySoftHyphenBreak:s},Oa}function ov(u){const r=u.match(/(\d+(?:\.\d+)?)\s*px/);return r?parseFloat(r[1]):16}function _h(){return vr===null&&(vr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),vr}function fv(u){return rv.test(u)||u.includes("️")}function dv(u){return cv.test(u)}function xv(u,r){let s=Mo.get(u);if(s!==void 0)return s;const c=_o();c.font=u;const d=c.measureText("😀").width;if(s=0,d>r+.5&&typeof document<"u"&&document.body!==null){const x=document.createElement("span");x.style.font=u,x.style.display="inline-block",x.style.visibility="hidden",x.style.position="absolute",x.textContent="😀",document.body.appendChild(x);const g=x.getBoundingClientRect().width;document.body.removeChild(x),d-g>.5&&(s=d-g)}return Mo.set(u,s),s}function hv(u){let r=0;const s=_h();for(const c of s.segment(u))fv(c.segment)&&r++;return r}function mv(u,r){return r.emojiCount===void 0&&(r.emojiCount=hv(u)),r.emojiCount}function _n(u,r,s){return s===0?r.width:r.width-mv(u,r)*s}function gv(u,r,s,c,d){if(r.breakableFitAdvances!==void 0&&r.breakableFitMode===d)return r.breakableFitAdvances;r.breakableFitMode=d;const x=_h(),g=[];for(const y of x.segment(u))g.push(y.segment);if(g.length<=1)return r.breakableFitAdvances=null,r.breakableFitAdvances;if(d==="sum-graphemes"){const y=[];for(const p of g){const b=rn(p,s);y.push(_n(p,b,c))}return r.breakableFitAdvances=y,r.breakableFitAdvances}if(d==="pair-context"||g.length>uv){const y=[];let p=null,b=0;for(const w of g){const M=rn(w,s),Q=_n(w,M,c);if(p===null)y.push(Q);else{const B=p+w,L=rn(B,s);y.push(_n(B,L,c)-b)}p=w,b=Q}return r.breakableFitAdvances=y,r.breakableFitAdvances}const v=[];let N="",m=0;for(const y of g){N+=y;const p=rn(N,s),b=_n(N,p,c);v.push(b-m),m=b}return r.breakableFitAdvances=v,r.breakableFitAdvances}function pv(u,r){const s=_o();s.font=u;const c=sv(u),d=ov(u),x=r?xv(u,d):0;return{cache:c,fontSize:d,emojiCorrection:x}}function bv(){Co.clear(),Mo.clear(),vr=null}function vv(u){return u==="space"||u==="zero-width-break"||u==="soft-hyphen"}function Tr(u){return u==="space"||u==="preserved-space"||u==="tab"||u==="zero-width-break"||u==="soft-hyphen"}function Ro(u,r,s=u.widths.length){for(;r<s;){const c=u.kinds[r];if(!vv(c))break;r++}return r}function Rh(u,r){if(r<=0)return 0;const s=u%r;return Math.abs(s)<=1e-6?r:r-s}function Lh(u,r,s){return u.letterSpacing!==0&&r&&u.spacingGraphemeCounts[s]>0?u.letterSpacing:0}function Lo(u,r){return r===0?0:u+r}function yv(u,r){return u.letterSpacing!==0&&u.spacingGraphemeCounts[r]>0?u.letterSpacing:0}function Hh(u,r,s,c,d){const x=r==="tab"?d+yv(u,s):u.lineEndFitAdvances[s];return Lo(c,x)}function Er(u,r,s,c){const d=r==="tab"?0:u.lineEndFitAdvances[s];return Lo(c,d)}function Ar(u,r,s,c,d){const x=r==="tab"?d:u.lineEndPaintAdvances[s];return Lo(c,x)}function Uh(u,r,s){return u.letterSpacing!==0&&r?s+u.letterSpacing:s}function Gh(u,r){return u.letterSpacing===0?r:r+u.letterSpacing}function Ra(u,r,s){let c=r;for(;c<u.length&&u[c]<s;)c++;return c}function Nv(u,r,s,c,d){if(u.letterSpacing===0)return 0;if(d>0)return u.spacingGraphemeCounts[c]>0?u.letterSpacing:0;for(let x=c-1;x>=r;x--){const g=u.kinds[x];if(!(g==="space"||g==="zero-width-break"||g==="hard-break")){if(g==="soft-hyphen"){if(x===c-1)return 0;continue}return x===r&&s>0||u.spacingGraphemeCounts[x]>0?u.letterSpacing:0}}return 0}function qh(u,r,s,c,d,x){return r+Nv(u,s,c,d,x)}function Sv(u,r){let s=0,c=u.chunks.length;for(;s<c;){const d=Math.floor((s+c)/2);r<u.chunks[d].consumedEndSegmentIndex?c=d:s=d+1}return s<u.chunks.length?s:-1}function Ev(u,r,s){let c=s.segmentIndex;if(s.graphemeIndex>0)return r;const d=u.chunks[r];return d.startSegmentIndex===d.endSegmentIndex&&c===d.startSegmentIndex||(c<d.startSegmentIndex&&(c=d.startSegmentIndex),c=Ro(u,c,d.endSegmentIndex),c<d.endSegmentIndex)?(s.segmentIndex=c,s.graphemeIndex=0,r):d.consumedEndSegmentIndex>=u.widths.length?-1:(s.segmentIndex=d.consumedEndSegmentIndex,s.graphemeIndex=0,r+1)}function Av(u,r){if(r.segmentIndex>=u.widths.length)return-1;const s=Sv(u,r.segmentIndex);return s<0?-1:Ev(u,s,r)}function Cv(u,r,s){const{widths:c,kinds:d,breakableFitAdvances:x,breakablePreferredBreaks:g}=u;if(c.length===0)return 0;const N=La().lineFitEpsilon,m=r+N;let y=0,p=0,b=!1,w=0,M=0,Q=0,B=0,L=-1,$=0;function ee(){L=-1,$=0}function ce(q=Q,_=B,te=p){y++,s?.(te,w,M,q,_),p=0,b=!1,ee()}function ue(q,_){b=!0,w=q,M=0,Q=q+1,B=0,p=_}function H(q,_,te){b=!0,w=q,M=_,Q=q,B=_+1,p=te}function V(q,_){if(!b){ue(q,_);return}p+=_,Q=q+1,B=0}function G(q,_){const te=x[q],ne=g[q]??null;let he=ne===null?-1:Ra(ne,0,_+1),Y=-1,O=0,k=_;for(;k<te.length;){const D=te[k];if(!b)H(q,k,D);else if(p+D>m){if(ne!==null&&Y>_){ce(q,Y,O),k=Y,he=Ra(ne,he,k+1),Y=-1,O=0;continue}ce(),H(q,k,D)}else p+=D,Q=q,B=k+1;const K=k+1;ne!==null&&ne[he]===K&&(Y=K,O=p,he++),k++}b&&Q===q&&B===te.length&&(Q=q+1,B=0)}let S=0;for(;S<c.length&&!(!b&&(S=Ro(u,S),S>=c.length));){const q=c[S],_=d[S],te=Tr(_);if(!b){q>m&&x[S]!==null?G(S,0):ue(S,q),te&&(L=S+1,$=p-q),S++;continue}if(p+q>m){if(te){V(S,q),ce(S+1,0,p-q),S++;continue}if(L>=0){if(Q>L||Q===L&&B>0){ce();continue}ce(L,0,$);continue}if(q>m&&x[S]!==null){ce(),G(S,0),S++;continue}ce();continue}V(S,q),te&&(L=S+1,$=p-q),S++}return b&&ce(),y}function Mv(u,r,s){if(u.simpleLineWalkFastPath)return Cv(u,r,s);const{widths:c,kinds:d,breakableFitAdvances:x,breakablePreferredBreaks:g,discretionaryHyphenWidth:v,chunks:N}=u;if(c.length===0||N.length===0)return 0;const m=La(),y=m.lineFitEpsilon,p=r+y;let b=0,w=0,M=!1,Q=0,B=0,L=0,$=0,ee=-1,ce=0,ue=0,H=null;function V(){ee=-1,ce=0,ue=0,H=null}function G(){return H==="soft-hyphen"&&ee===L&&$===0?ue:w}function S(O=L,k=$,D){b++,s!==void 0&&s(qh(u,D??G(),Q,B,O,k),Q,B,O,k),w=0,M=!1,V()}function q(O,k){M=!0,Q=O,B=0,L=O+1,$=0,w=k}function _(O,k,D){M=!0,Q=O,B=k,L=O,$=k+1,w=D}function te(O,k){if(!M){q(O,k);return}w+=k,L=O+1,$=0}function ne(O,k,D,K,P,re){if(!k)return;const le=Er(u,O,D,P),ae=Ar(u,O,D,P,K);ee=D+1,ce=w-re+le,ue=w-re+ae,H=O}function he(O,k){const D=x[O],K=g[O]??null;let P=K===null?-1:Ra(K,0,k+1),re=-1,le=0,ae=k;for(;ae<D.length;){const A=D[ae];if(!M)_(O,ae,A);else{const Z=Uh(u,!0,A),W=w+Z;if(Gh(u,W)>p){if(K!==null&&re>k){S(O,re,le),ae=re,P=Ra(K,P,ae+1),re=-1,le=0;continue}S(),_(O,ae,A)}else w=W,L=O,$=ae+1}const X=ae+1;K!==null&&K[P]===X&&(re=X,le=w,P++),ae++}M&&L===O&&$===D.length&&(L=O+1,$=0)}function Y(O){b++,s?.(0,O.startSegmentIndex,0,O.consumedEndSegmentIndex,0),V()}for(let O=0;O<N.length;O++){const k=N[O];if(k.startSegmentIndex===k.endSegmentIndex){Y(k);continue}M=!1,w=0,Q=k.startSegmentIndex,B=0,L=k.startSegmentIndex,$=0,V();let D=k.startSegmentIndex;for(;D<k.endSegmentIndex&&!(!M&&(D=Ro(u,D,k.endSegmentIndex),D>=k.endSegmentIndex));){const K=d[D],P=Tr(K),re=Lh(u,M,D),le=K==="tab"?Rh(w+re,u.tabStopAdvance):c[D],ae=re+le,A=Hh(u,K,D,re,le);if(K==="soft-hyphen"){M&&(L=D+1,$=0,ee=D+1,ce=w+v,ue=w+v,H=K),D++;continue}if(!M){A>p&&x[D]!==null?he(D,0):q(D,le),ne(K,P,D,le,re,ae),D++;continue}if(w+A>p){const Z=w+Er(u,K,D,re),W=w+Ar(u,K,D,re,le);if(H==="soft-hyphen"&&m.preferEarlySoftHyphenBreak&&ce<=p){S(ee,0,ue);continue}if(P&&Z<=p){te(D,ae),S(D+1,0,W),D++;continue}if(ee>=0&&ce<=p){if(L>ee||L===ee&&$>0){S();continue}const me=ee;S(me,0,ue),D=me;continue}if(A>p&&x[D]!==null){S(),he(D,0),D++;continue}S();continue}te(D,ae),ne(K,P,D,le,re,ae),D++}if(M){const K=ee===k.consumedEndSegmentIndex?ue:w;S(k.consumedEndSegmentIndex,0,K)}}return b}function wv(u,r,s,c){const d=u.chunks[s];if(d.startSegmentIndex===d.endSegmentIndex)return r.segmentIndex=d.consumedEndSegmentIndex,r.graphemeIndex=0,0;const{widths:x,kinds:g,breakableFitAdvances:v,breakablePreferredBreaks:N,discretionaryHyphenWidth:m}=u,y=La(),p=y.lineFitEpsilon,b=c+p,w=r.segmentIndex,M=r.graphemeIndex;let Q=0,B=!1,L=r.segmentIndex,$=r.graphemeIndex,ee=-1,ce=0,ue=0,H=null;function V(){return H==="soft-hyphen"&&ee===L&&$===0?ue:Q}function G(Y=L,O=$,k=V()){return B?(r.segmentIndex=Y,r.graphemeIndex=O,qh(u,k,w,M,Y,O)):null}function S(Y,O){B=!0,L=Y+1,$=0,Q=O}function q(Y,O,k){B=!0,L=Y,$=O+1,Q=k}function _(Y,O){if(!B){S(Y,O);return}Q+=O,L=Y+1,$=0}function te(Y,O,k,D,K,P){if(!O)return;const re=Er(u,Y,k,K),le=Ar(u,Y,k,K,D);ee=k+1,ce=Q-P+re,ue=Q-P+le,H=Y}function ne(Y,O){const k=v[Y],D=N[Y]??null;let K=D===null?-1:Ra(D,0,O+1),P=-1,re=0;for(let le=O;le<k.length;le++){const ae=k[le];if(!B)q(Y,le,ae);else{const X=Uh(u,!0,ae),Z=Q+X;if(Gh(u,Z)>b)return D!==null&&P>O?G(Y,P,re):G();Q=Z,L=Y,$=le+1}const A=le+1;D!==null&&D[K]===A&&(P=A,re=Q,K++)}return B&&L===Y&&$===k.length&&(L=Y+1,$=0),null}function he(){return H!=="soft-hyphen"||ee<0?null:ce<=b?G(ee,0,ue):null}for(let Y=r.segmentIndex;Y<d.endSegmentIndex;Y++){const O=g[Y],k=Tr(O),D=Y===r.segmentIndex?r.graphemeIndex:0,K=Lh(u,B,Y),P=O==="tab"?Rh(Q+K,u.tabStopAdvance):x[Y],re=K+P,le=Hh(u,O,Y,K,P);if(O==="soft-hyphen"&&D===0){B&&(L=Y+1,$=0,ee=Y+1,ce=Q+m,ue=Q+m,H=O);continue}if(!B){if(D>0){const A=ne(Y,D);if(A!==null)return A}else if(le>b&&v[Y]!==null){const A=ne(Y,0);if(A!==null)return A}else S(Y,P);te(O,k,Y,P,K,re);continue}if(Q+le>b){const A=Q+Er(u,O,Y,K),X=Q+Ar(u,O,Y,K,P);if(H==="soft-hyphen"&&y.preferEarlySoftHyphenBreak&&ce<=b)return G(ee,0,ue);const Z=he();if(Z!==null)return Z;if(k&&A<=b)return _(Y,re),G(Y+1,0,X);if(ee>=0&&ce<=b)return L>ee||L===ee&&$>0?G():G(ee,0,ue);if(le>b&&v[Y]!==null){const W=G();if(W!==null)return W;const me=ne(Y,0);if(me!==null)return me}return G()}_(Y,re),te(O,k,Y,P,K,re)}return ee===d.consumedEndSegmentIndex&&$===0?G(d.consumedEndSegmentIndex,0,ue):G(d.consumedEndSegmentIndex,0,Q)}function kv(u,r,s){const{widths:c,kinds:d,breakableFitAdvances:x,breakablePreferredBreaks:g}=u,N=La().lineFitEpsilon,m=s+N;let y=0,p=!1,b=r.segmentIndex,w=r.graphemeIndex,M=-1,Q=0;for(let B=r.segmentIndex;B<c.length;B++){const L=d[B],$=Tr(L),ee=B===r.segmentIndex?r.graphemeIndex:0,ce=x[B],ue=c[B];if(!p){if(ee>0||ue>m&&ce!==null){const H=ce,V=g[B]??null;let G=V===null?-1:Ra(V,0,ee+1),S=-1,q=0;const _=H[ee];p=!0,y=_,b=B,w=ee+1,V!==null&&V[G]===w&&(S=w,q=y,G++);for(let te=ee+1;te<H.length;te++){const ne=H[te];if(y+ne>m)return V!==null&&S>ee?(r.segmentIndex=B,r.graphemeIndex=S,q):(r.segmentIndex=b,r.graphemeIndex=w,y);y+=ne,b=B,w=te+1,V!==null&&V[G]===w&&(S=w,q=y,G++)}b===B&&w===H.length&&(b=B+1,w=0)}else p=!0,y=ue,b=B+1,w=0;$&&(M=B+1,Q=y-ue);continue}if(y+ue>m)return $?(r.segmentIndex=B+1,r.graphemeIndex=0,y):M>=0?b>M||b===M&&w>0?(r.segmentIndex=b,r.graphemeIndex=w,y):(r.segmentIndex=M,r.graphemeIndex=0,Q):(r.segmentIndex=b,r.graphemeIndex=w,y);y+=ue,b=B+1,w=0,$&&(M=B+1,Q=y-ue)}return p?(r.segmentIndex=b,r.graphemeIndex=w,y):null}function Tv(u,r,s,c){return u.simpleLineWalkFastPath?kv(u,r,c):wv(u,r,s,c)}function wo(u,r,s){const c=Av(u,r);return c<0?null:Tv(u,r,c,s)}let yr=null,ko=new WeakMap;function Fv(){return yr===null&&(yr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),yr}function wx(u,r,s){let c=s.get(u);if(c!==void 0)return c;c=[];const d=Fv();for(const x of d.segment(r[u]))c.push(x.segment);return s.set(u,c),c}function jv(u,r,s){return s>r&&u[s-1]==="soft-hyphen"}function kx(u,r,s,c){for(let d=s;d<c;d++)u+=r[d];return u}function Dv(u){let r=ko.get(u);return r!==void 0||(r=new Map,ko.set(u,r)),r}function Ov(u,r,s,c,d,x){let g="";const v=jv(u.kinds,s,d);for(let N=s;N<d;N++)if(!(u.kinds[N]==="soft-hyphen"||u.kinds[N]==="hard-break"))if(N===s&&c>0){const m=wx(N,u.segments,r);g=kx(g,m,c,m.length)}else g+=u.segments[N];if(x>0){v&&(g+="-");const N=wx(d,u.segments,r);g=kx(g,N,s===d?c:0,x)}else v&&(g+="-");return g}function Bv(){yr=null,ko=new WeakMap}let Nr=null;function Ho(){return Nr===null&&(Nr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Nr}function zv(u){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function _v(u,r){const s=[];let c=[],d=0,x=!1,g=!1,v=!1;function N(){c.length!==0&&(s.push({text:c.length===1?c[0]:c.join(""),start:d}),c=[],x=!1,g=!1,v=!1)}function m(p,b,w){c=[p],d=b,x=w,g=Eo(p),v=Mr.has(p)}function y(p,b){c.push(p),x=x||b;const w=Eo(p);p.length===1&&Rn.has(p)?g=g||w:g=w,v=!1}for(const p of Ho().segment(u)){const b=p.segment,w=dl(b);if(c.length===0){m(b,p.index,w);continue}if(v||Oo.has(b)||Rn.has(b)||r.carryCJKAfterClosingQuote&&w&&g){y(b,w);continue}if(!x&&!w){y(b,w);continue}N(),m(b,p.index,w)}return N(),s}function Rv(u,r,s){if(r.length<=1)return r;const c=[];let d=-1,x=!1;function g(N,m){const y=r[N].start,p=m<r.length?r[m].start:u.length;c.push({text:u.slice(y,p),start:y})}function v(N){if(!(d<0)){if(x)d+1===N?c.push(r[d]):g(d,N);else for(let m=d;m<N;m++)c.push(r[m]);d=-1,x=!1}}for(let N=0;N<r.length;N++){const m=r[N];d>=0&&!Oh(r[N-1].text,s)&&v(N),d<0&&(d=N),x=x||dl(m.text)}return v(r.length),c}function Tx(u,r){if(r==="zero-width-break"||r==="soft-hyphen"||r==="hard-break")return 0;if(r==="tab")return 1;let s=0;const c=Ho();for(const d of c.segment(u))s++;return s}function Lv(u){return u==="-"||u==="֊"||u==="‐"||u==="‒"||u==="–"||u==="—"}function Hv(u){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(u))return null;const r=[];let s=0;for(const c of Ho().segment(u))s++,Lv(c.segment)&&r.push(s);return r.length===0?null:r}function Uv(u,r,s){return r>1?u+(r-1)*s:u}function Gv(u,r,s,c,d){const x=La(),{cache:g,emojiCorrection:v}=pv(r,dv(u.normalized)),N=_n("-",rn("-",g),v)+(d===0?0:d*2),y=_n(" ",rn(" ",g),v)*8,p=d!==0;if(u.len===0)return zv();const b=[],w=[],M=[],Q=[];let B=u.chunks.length<=1&&!p;const L=s?[]:null,$=[],ee=[],ce=[],ue=s?[]:null,H=Array.from({length:u.len});function V(_,te,ne,he,Y,O,k,D,K){Y!=="text"&&Y!=="space"&&Y!=="zero-width-break"&&(B=!1),b.push(te),w.push(ne),M.push(he),Q.push(Y),L?.push(O),$.push(k),ee.push(D),p&&ce.push(K),ue!==null&&ue.push(_)}function G(_,te,ne,he,Y){const O=rn(_,g),k=p?Tx(_,te):0,D=Uv(_n(_,O,v),k,d),K=te==="space"||te==="preserved-space"||te==="zero-width-break"?0:D,P=K===0?0:K+(k>0?d:0),re=te==="space"||te==="zero-width-break"?0:D;if(Y&&he&&_.length>1){let le="sum-graphemes";d!==0?le="segment-prefixes":Sr(_)?le="pair-context":x.preferPrefixWidthsForBreakableRuns&&(le="segment-prefixes");const ae=gv(_,O,g,v,le),A=ae===null||c==="keep-all"?null:Hv(_);V(_,D,P,re,te,ne,ae,A,k);return}V(_,D,P,re,te,ne,null,null,k)}for(let _=0;_<u.len;_++){H[_]=b.length;const te=u.texts[_],ne=u.isWordLike[_],he=u.kinds[_],Y=u.starts[_];if(he==="soft-hyphen"){V(te,0,N,N,he,Y,null,null,0);continue}if(he==="hard-break"){V(te,0,0,0,he,Y,null,null,0);continue}if(he==="tab"){V(te,0,0,0,he,Y,null,null,p?Tx(te,he):0);continue}const O=rn(te,g);if(he==="text"&&O.containsCJK){const k=_v(te,x),D=c==="keep-all"?Rv(te,k,x.breakKeepAllAfterPunctuation):k;for(let K=0;K<D.length;K++){const P=D[K];G(P.text,"text",Y+P.start,ne,c==="keep-all"||!dl(P.text))}continue}G(te,he,Y,ne,!0)}const S=qv(u.chunks,H,b.length),q=L===null?null:ab(u.normalized,L);return ue!==null?{widths:b,lineEndFitAdvances:w,lineEndPaintAdvances:M,kinds:Q,simpleLineWalkFastPath:B,segLevels:q,breakableFitAdvances:$,breakablePreferredBreaks:ee,letterSpacing:d,spacingGraphemeCounts:ce,discretionaryHyphenWidth:N,tabStopAdvance:y,chunks:S,segments:ue}:{widths:b,lineEndFitAdvances:w,lineEndPaintAdvances:M,kinds:Q,simpleLineWalkFastPath:B,segLevels:q,breakableFitAdvances:$,breakablePreferredBreaks:ee,letterSpacing:d,spacingGraphemeCounts:ce,discretionaryHyphenWidth:N,tabStopAdvance:y,chunks:S}}function qv(u,r,s){const c=[];for(let d=0;d<u.length;d++){const x=u[d],g=x.startSegmentIndex<r.length?r[x.startSegmentIndex]:s,v=x.endSegmentIndex<r.length?r[x.endSegmentIndex]:s,N=x.consumedEndSegmentIndex<r.length?r[x.consumedEndSegmentIndex]:s;c.push({startSegmentIndex:g,endSegmentIndex:v,consumedEndSegmentIndex:N})}return c}function Yv(u,r,s,c){const d=c?.wordBreak??"normal",x=c?.letterSpacing??0,g=iv(u,La(),c?.whiteSpace,d);return Gv(g,r,s,d,x)}function To(u,r,s){return Yv(u,r,!0,s)}function Fx(u){let r=0;return Mv(u,Number.POSITIVE_INFINITY,s=>{s>r&&(r=s)}),r}function Xv(){db(),Nr=null,Bv(),bv()}function dr(u){return u.replace(/[ \t]+/g," ")}function Qv(u,r=[]){const s=[],c=r.filter(m=>m.length>0).map(m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),d=c.length?new RegExp(`(${c.join("|")})`,"g"):null,x=/(\*\*[^*]+\*\*|\*[^*]+\*|==[^=]+==)/g;let g=0,v;function N(m,y={}){if(!m)return;if(!d){s.push({text:m,...y});return}d.lastIndex=0;let p=0,b;for(;(b=d.exec(m))!==null;)b.index>p&&s.push({text:m.slice(p,b.index),...y}),s.push({text:b[0],...y,highlight:!0}),p=b.index+b[0].length;p<m.length&&s.push({text:m.slice(p),...y})}for(;(v=x.exec(u))!==null;){v.index>g&&N(u.slice(g,v.index));const m=v[0];m.startsWith("**")&&m.endsWith("**")?N(m.slice(2,-2),{bold:!0}):m.startsWith("*")&&m.endsWith("*")?N(m.slice(1,-1),{italic:!0}):m.startsWith("==")&&m.endsWith("==")&&s.push({text:m.slice(2,-2),highlight:!0,bold:!0}),g=v.index+m.length}return g<u.length&&N(u.slice(g)),s.length>0?s:[{text:u}]}function Vv(u){const r=u.replaceAll(`\r
|
|
296
|
+
`,`
|
|
297
|
+
`).split(`
|
|
298
|
+
`),s=[];let c=[];function d(){const x=dr(c.join(" ").trim());x.length>0&&s.push({kind:"paragraph",text:x}),c=[]}for(const x of r){const g=x.trim();if(g.length===0){d();continue}if(Yh(g)){d();continue}const v=g.match(/^(#{1,6})\s+(.+)$/);if(v){d();const m=v[1].length;s.push({kind:m===1?"heading":m===2?"subheading":"minor-heading",text:dr(v[2])});continue}if(g.startsWith(">")){d(),s.push({kind:"quote",text:dr(g.replace(/^>\s?/,"").trim())});continue}const N=g.match(/^(\d+[.)]|[-*+])\s+(.+)$/);if(N){d(),s.push({kind:"list-item",text:dr(N[2]),bullet:/^\d/.test(N[1])?N[1]:"•"});continue}c.push(g)}return d(),s}function Yh(u){const r=u.trim();return/^【第([一二三四五六七八九十百两\d]+)页】$/.test(r)||/^【Page\s*(\d+)】$/i.test(r)||/^(?:-{3,}|\*{3,}|_{3,})$/.test(r)||/^<!--\s*(?:pagebreak|page-break|next-page|page(?::\s*\d+)?)\s*-->$/i.test(r)}function Zv(u){const r=u.replaceAll(`\r
|
|
299
|
+
`,`
|
|
300
|
+
`).split(`
|
|
301
|
+
`),s=[[]];let c=!1;for(const d of r){if(Yh(d)){if(c=!0,s.length===1&&s[0].length===0)continue;s.push([]);continue}s[s.length-1].push(d)}return c?s.map(d=>d.join(`
|
|
302
|
+
`).trim()):[u]}const Kv="modulepreload",Jv=function(u){return"/"+u},jx={},Iv=function(r,s,c){let d=Promise.resolve();if(s&&s.length>0){let g=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const v=document.querySelector("meta[property=csp-nonce]"),N=v?.nonce||v?.getAttribute("nonce");d=g(s.map(m=>{if(m=Jv(m),m in jx)return;jx[m]=!0;const y=m.endsWith(".css"),p=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${p}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":Kv,y||(b.as="script"),b.crossOrigin="",b.href=m,N&&b.setAttribute("nonce",N),document.head.appendChild(b),y)return new Promise((w,M)=>{b.addEventListener("load",w),b.addEventListener("error",()=>M(new Error(`Unable to preload CSS for ${m}`)))})}))}function x(g){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=g,window.dispatchEvent(v),!v.defaultPrevented)throw g}return d.then(g=>{for(const v of g||[])v.status==="rejected"&&x(v.reason);return r().catch(x)})},Wv=/[ \t\n\f\r]+/,Dx=/^[ \t\n\f\r]+/,Ox=/[ \t\n\f\r]+$/,Bx={segmentIndex:0,graphemeIndex:0},$v={itemIndex:0,segmentIndex:0,graphemeIndex:0};function po(u){return{segmentIndex:u.segmentIndex,graphemeIndex:u.graphemeIndex}}function zx(u){return u.segmentIndex===0&&u.graphemeIndex===0}function xr(u,r,s){const c=`${u}\0${r}`,d=s.get(c);if(d!==void 0)return d;const x=r===0?void 0:{letterSpacing:r},g=Fx(To("A A",u,x)),v=Fx(To("AA",u,x)),N=Math.max(0,g-v);return s.set(c,N),N}function Pv(u){const r={segmentIndex:0,graphemeIndex:0},s=wo(u,r,Number.POSITIVE_INFINITY);return s===null?null:{endGraphemeIndex:r.graphemeIndex,endSegmentIndex:r.segmentIndex,width:s}}function ey(u,r){return u===0&&r>0}function ty(u){const r=[],s=Array.from({length:u.length}),c=new Map;let d=0;for(let x=0;x<u.length;x++){const g=u[x],v=g.letterSpacing??0,N=Dx.test(g.text),m=Ox.test(g.text),y=g.text.replace(Dx,"").replace(Ox,"");if(y.length===0){Wv.test(g.text)&&d===0&&(d=xr(g.font,v,c));continue}const p=d>0?d:N?xr(g.font,v,c):0,b=To(y,g.font,v===0?void 0:{letterSpacing:v}),w=Pv(b);if(w===null){d=m?xr(g.font,v,c):0;continue}const M={break:g.break??"normal",endGraphemeIndex:w.endGraphemeIndex,endSegmentIndex:w.endSegmentIndex,extraWidth:g.extraWidth??0,gapBefore:p,naturalWidth:w.width,prepared:b,sourceItemIndex:x};r.push(M),s[x]=M,d=m?xr(g.font,v,c):0}return{items:r,itemsBySourceItemIndex:s}}function ly(u,r,s,c){if(u.items.length===0||s.itemIndex>=u.items.length)return null;const d=Math.max(1,r);let x=0,g=d,v=s.itemIndex;e:for(;v<u.items.length;){const N=u.items[v];if(!zx(s)&&s.segmentIndex===N.endSegmentIndex&&s.graphemeIndex===N.endGraphemeIndex){v++,s.segmentIndex=0,s.graphemeIndex=0;continue}const m=x===0?0:N.gapBefore,y=zx(s);if(N.break==="never"){if(!y){v++,s.segmentIndex=0,s.graphemeIndex=0;continue}const L=N.naturalWidth+N.extraWidth,$=m+L;if(x>0&&$>g)break e;c?.(N,m,L,po(Bx),{segmentIndex:N.endSegmentIndex,graphemeIndex:N.endGraphemeIndex}),x+=$,g=Math.max(0,d-x),v++,s.segmentIndex=0,s.graphemeIndex=0;continue}const p=m+N.extraWidth;if(x>0&&p>=g)break e;if(y){const L=p+N.naturalWidth;if(L<=g){c?.(N,m,N.naturalWidth+N.extraWidth,po(Bx),{segmentIndex:N.endSegmentIndex,graphemeIndex:N.endGraphemeIndex}),x+=L,g=Math.max(0,d-x),v++,s.segmentIndex=0,s.graphemeIndex=0;continue}}const b=Math.max(1,g-p),w={segmentIndex:s.segmentIndex,graphemeIndex:s.graphemeIndex},M=wo(N.prepared,w,b);if(M===null){v++,s.segmentIndex=0,s.graphemeIndex=0;continue}if(s.segmentIndex===w.segmentIndex&&s.graphemeIndex===w.graphemeIndex){v++,s.segmentIndex=0,s.graphemeIndex=0;continue}const Q=M+N.extraWidth,B=m+Q;if(x>0&&y&&B>g)break e;if(x>0&&y&&m>0&&ey(w.segmentIndex,w.graphemeIndex)){const L={segmentIndex:0,graphemeIndex:0};if(wo(N.prepared,L,Math.max(1,d-N.extraWidth))!==null&&(L.segmentIndex>w.segmentIndex||L.segmentIndex===w.segmentIndex&&L.graphemeIndex>w.graphemeIndex))break e}if(c?.(N,m,Q,po(s),{segmentIndex:w.segmentIndex,graphemeIndex:w.graphemeIndex}),x+=B,g=Math.max(0,d-x),w.segmentIndex===N.endSegmentIndex&&w.graphemeIndex===N.endGraphemeIndex){v++,s.segmentIndex=0,s.graphemeIndex=0;continue}s.segmentIndex=w.segmentIndex,s.graphemeIndex=w.graphemeIndex;break}return x===0?null:(s.itemIndex=v,x)}function bo(u,r,s=$v){const c=u,d={itemIndex:s.itemIndex,segmentIndex:s.segmentIndex,graphemeIndex:s.graphemeIndex},x=[],g=ly(c,r,d,(v,N,m,y,p)=>{x.push({itemIndex:v.sourceItemIndex,gapBefore:N,occupiedWidth:m,start:y,end:p})});return g===null?null:{fragments:x,width:g,end:d}}function ny(u,r){return Ov(u.prepared,Dv(u.prepared),r.start.segmentIndex,r.start.graphemeIndex,r.end.segmentIndex,r.end.graphemeIndex)}function ay(u,r){const s=u,c=[];for(let d=0;d<r.fragments.length;d++){const x=r.fragments[d],g=s.itemsBySourceItemIndex[x.itemIndex];if(g===void 0)throw new Error("Missing rich-text inline item for fragment");c.push({itemIndex:x.itemIndex,text:ny(g,x),gapBefore:x.gapBefore,occupiedWidth:x.occupiedWidth,start:x.start,end:x.end})}return{fragments:c,width:r.width,end:r.end}}const iy=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),_x=typeof process<"u"&&process.versions?.node?(await Iv(async()=>{const{createRequire:u}=await Promise.resolve().then(()=>iy);return{createRequire:u}},void 0)).createRequire(import.meta.url):void 0;let hr=!1;function uy(){if(!hr){if(typeof globalThis.OffscreenCanvas<"u"){hr=!0;return}if(typeof document<"u"){const u=document.createElement("canvas");class r{width=1e3;height=1e3;getContext(c){return u.getContext(c)}}globalThis.OffscreenCanvas=r,hr=!0;return}try{if(_x){const{createCanvas:u}=_x("@napi-rs/canvas");class r{width;height;#e;constructor(c,d){this.width=c,this.height=d,this.#e=u(c,d)}getContext(c){return c!=="2d"?null:this.#e.getContext("2d")}}globalThis.OffscreenCanvas=r,hr=!0}}catch{console.warn("Pretext requires OffscreenCanvas or @napi-rs/canvas for text measurement.")}}}function ry(u,r,s,c){const x=Math.min(260,Math.round(c*.22))+u*(r+32),g=Math.max(60,c-r-s-16);return Math.min(x,g)}function Fr(u,r,s,c){if(u.templateAssetKey&&u.x!=null&&u.y!=null&&u.width!=null&&u.height!=null)return{...u,x:u.x,y:u.y,width:u.width,height:u.height};const d=u.layoutPreset||"auto",x=16,g=u.captionHeight??36;if(u.isAbsolute)return{...u,x:u.x??x,y:u.y??100,width:u.width??420,height:u.height??280};if(d==="custom")return{...u,x:u.x??x,y:u.y??260,width:u.width??420,height:u.height??280};if(d==="fill"){const B=s,L=u.height||Math.round(c*.28),$=Math.max(160,c-L-g-x);return{...u,x:0,y:$,width:B,height:L}}if(d==="corner-soft"){const B=Math.min(u.width||380,Math.round(s*.48)),L=u.height||260,$=Math.max(0,s-B-x),ee=Math.max(160,c-L-g-24);return{...u,x:$,y:ee,width:B,height:L}}const v=420,N=280,m=Math.round(s*.52),y=Math.min(u.width||v,m),p=u.height||N,b=ry(r,p,g,c);if(d==="center"){const B=Math.min(u.width||560,s-x*2),L=Math.max(0,Math.round((s-B)/2));return{...u,x:L,y:b,width:B,height:p}}if(d==="staggered"){const L=r%2===1?Math.max(0,s-y-x):x;return{...u,x:L,y:b,width:y,height:p}}if(d==="mid-right"){const B=Math.max(0,s-y-x);return{...u,x:B,y:b,width:y,height:p}}if(d==="mid-left")return{...u,x,y:b,width:y,height:p};if((u.width||v)>=s*.75){const B=Math.min(u.width||v,s-x*2);return{...u,x:Math.max(0,Math.round((s-B)/2)),y:b,width:B,height:p}}const Q=r%2===1?Math.max(0,s-y-x):x;return{...u,x:Q,y:b,width:y,height:p}}const Ba={itemIndex:0,segmentIndex:0,graphemeIndex:0};function cy(u,r){const s=r.bold?u.replace(/^\d+\s+/,"700 "):u;return r.italic?"italic "+s:s}function za(u,r){return u.itemIndex-r.itemIndex||u.segmentIndex-r.segmentIndex||u.graphemeIndex-r.graphemeIndex}function mr(u,r,s,c,d={}){uy();let x=s;const g=d.obstacleGap??24,v=d.pageImageLimit??2,N=u.map(S=>{const q=S.runs.map(_=>({..._,font:cy(S.font,_)}));return{...S,runs:q,prepared:ty(q)}});function m(S,q,_,te,ne=1/0){const he=[];let Y=_;for(;Y+S.lineHeight<=x&&he.length<ne;){if(!bo(S.prepared,r,q))return{lines:he,cursor:q,y:Y,done:!0};const O=S.textIndent??0;let k=[{left:0,right:r}];const D=te.filter(Z=>!Z.isAbsolute&&Y+S.lineHeight>Z.y-g&&Y<Z.y+Z.height+(Z.captionHeight??0)+g);for(const Z of D)k=k.flatMap(W=>Z.x-g>=W.right||Z.x+Z.width+g<=W.left?[W]:[{left:W.left,right:Math.min(W.right,Z.x-g)},{left:Math.max(W.left,Z.x+Z.width+g),right:W.right}]).filter(W=>W.right>W.left);const K=Number(S.font.match(/(\d+(?:\.\d+)?)px/)?.[1]??36);let P=null;for(const Z of k){const W=Z.right-Z.left-O;if(W<K*(D.length?2.5:1))continue;const me=bo(S.prepared,W,q);!me||me.width>W+.5||(!P||za(me.end,P.line.end)>0)&&(P={line:me,left:Z.left+O,width:W})}if(!P){if(!D.length)break;Y=Math.min(...D.map(Z=>Z.y+Z.height+(Z.captionHeight??0)+g));continue}if(za(P.line.end,q)<=0)break;const le=ay(S.prepared,P.line).fragments.map(Z=>{const W=S.runs[Z.itemIndex];return{text:Z.text,font:W.font??S.font,bold:W.bold,italic:W.italic,highlight:W.highlight,gapBefore:Z.gapBefore,occupiedWidth:Z.occupiedWidth,letterSpacing:W.letterSpacing}});let ae=P.left,A=za(q,Ba)===0&&S.bullet?P.left-O:void 0;const X=P.line.width;if(d.textAlign==="center"){const Z=Math.max(0,P.width-X),W=Math.round(Z/2);ae+=W,A!==void 0&&(A+=W)}else if(d.textAlign==="right"){const Z=Math.max(0,P.width-X);ae+=Z,A!==void 0&&(A+=Z)}he.push({text:le.map(Z=>Z.text).join(""),fragments:le,x:ae,y:Y,className:S.className,font:S.font,lineHeight:S.lineHeight,maxWidth:P.width,start:q,end:P.line.end,bullet:za(q,Ba)===0?S.bullet:void 0,bulletX:A}),q=P.line.end,Y+=S.lineHeight}return{lines:he,cursor:q,y:Y,done:bo(S.prepared,r,q)===null}}const y=[];let p=0,b=Ba;const w=d.initialPageNumber??1,M=d.initialPageNumber!==void 0;let Q=0;const B=c.filter(S=>!S.pageIndex);let L=!1;const $=d.maxPages||50,ee=d.templateImages||[],ce=Math.max(0,...ee.filter(S=>!S.repeatEveryPage).map(S=>S.pageIndex||1)),ue=Math.max(d.lastPageNumber||0,M?0:ce),H=S=>ee.filter(q=>q.repeatEveryPage||(q.pageIndex||1)===S),V=M?0:Math.max(0,...c.map(S=>S.pageIndex||0)),G=()=>p<N.length||!M&&(Q<B.length||w+y.length<=V)||M&&!L&&(c.length>0||H(w).length>0)||w+y.length<=ue;for(;y.length<$&&G();){const S=w+y.length,q=d.pageFillRatios?.[S]??d.targetFillRatio??1;if(!Number.isFinite(q)||q<=0||q>1)throw new RangeError("targetFillRatio must be greater than 0 and at most 1");x=s*q;let _=[];if(M)L||(_=c,L=!0);else{const le=c.filter(ae=>ae.pageIndex===S);le.length>0?_=le:(_=B.slice(Q,Q+v),Q+=Math.max(_.length,1))}const te=[..._,...H(S)].map((le,ae)=>Fr(le,ae,r,s)),ne=[];let he=0;const Y=p,O=b;for(;p<N.length;){const le=N[p],ae=za(b,Ba)===0,A=he+(ae&&ne.length?le.gapBefore??0:0);if(ae&&le.keepWithNext&&ne.length){let Z=A,W=!0;for(let me=p;me<N.length;me++){const ge=N[me];me>p&&(Z+=ge.gapBefore??0);const Ae=m(ge,Ba,Z,te,ge.keepWithNext?1/0:2);if((ge.keepWithNext||Ae.lines.length<2)&&!Ae.done){W=!1;break}if(!ge.keepWithNext)break;Z=Ae.y+(ge.gapAfter??0)}if(!W)break}const X=m(le,b,A,te);if(!X.done&&X.lines.length){const Z=m(le,X.cursor,0,[],2);if(Z.done&&Z.lines.length===1&&X.lines.length>=2){const W=X.lines.pop();X.cursor=W.start,X.y=W.y}if(ae&&X.lines.length<2&&ne.length)break}if(ne.push(...X.lines),b=X.cursor,he=X.y,!X.done)break;p++,b=Ba,he+=le.gapAfter??0}if(p===Y&&za(b,O)===0&&!_.length&&!te.some(le=>!le.isAbsolute&&!le.repeatEveryPage)&&p<N.length)throw new RangeError("Text cannot fit in the available page area; reduce font size or enlarge the safe area");const k=ne.reduce((le,ae)=>Math.max(le,ae.y+ae.lineHeight),0),D=te.filter(le=>!le.isAbsolute),K=D.reduce((le,ae)=>Math.max(le,ae.y+ae.height+(ae.captionHeight??0)),0),P=Math.max(k,K),re=s>0?Math.min(1,P/s):0;if(ne.length>0&&d.verticalAlign&&d.verticalAlign!=="top"){const le=ne.reduce((Z,W)=>Math.min(Z,W.y),1/0),ae=D.reduce((Z,W)=>Math.min(Z,W.y),1/0),A=Math.min(le,ae===1/0?le:ae),X=P-A;if(s>X){let Z=0;if(d.verticalAlign==="center"?Z=Math.round((s-X)/2)-A:d.verticalAlign==="bottom"&&(Z=s-X-A),Z!==0){for(const W of ne)W.y+=Z;for(const W of D)W.layoutPreset!=="custom"&&(W.y+=Z)}}}y.push({pageNumber:S,lines:ne,images:te,textBottom:k,fillRatio:re})}if(G())throw new RangeError(`Content exceeds maxPages=${$}; no content was discarded`);return y}function vo(u,r,s){return Math.round(u*Math.pow(r,s))}function _a(u,r=1.45){if(u<=0)return 24;const c=1.65-Math.log(Math.max(8,u)/8)/Math.log(160/8)*(1.65-1.15),d=Math.max(1.1,Math.min(1.8,c*(r/1.45)));return Math.round(u*d)}function Rx(u,r=!1){const s=(u||"").trim();switch(s){case"PingFang SC":return'"PingFang SC", -apple-system, BlinkMacSystemFont, "Noto Sans SC", "Microsoft YaHei", sans-serif';case"Noto Sans SC":return'"Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif';case"Songti SC":return'"Songti SC", "Noto Serif SC", "STSong", "SimSun", serif';case"Noto Serif SC":return'"Noto Serif SC", "Songti SC", "SimSun", serif';case"Kaiti SC":return'"Kaiti SC", "LXGW WenKai Screen", "STKaiti", "KaiTi", serif';case"Yuanti SC":return'"Yuanti SC", "STYuanti", "PingFang SC", sans-serif';case"Inter":return'Inter, "PingFang SC", system-ui, sans-serif';case"Georgia":return'Georgia, "Songti SC", serif';default:return s?s.includes(",")?s:`"${s}", ${r?"serif":"sans-serif"}`:r?'"Songti SC", serif':'"PingFang SC", sans-serif'}}function sy(u){const{baseFontSize:r,scaleRatio:s,lineHeightMultiplier:c,headingFont:d,bodyFont:x}=u,g=Rx(d,!1),v=Rx(x,!0),N=r,m=vo(r,s,1),y=vo(r,s,2),p=vo(r,s,3),b=r,w=r;return{heading:{font:`700 ${p}px ${g}`,fontSize:p,lineHeight:_a(p,c*.95),gapBefore:Math.round(p*.8),gapAfter:Math.round(p*.4),className:"body-heading"},subheading:{font:`700 ${y}px ${g}`,fontSize:y,lineHeight:_a(y,c*.98),gapBefore:Math.round(y*.7),gapAfter:Math.round(y*.35),className:"body-subheading"},"minor-heading":{font:`700 ${m}px ${g}`,fontSize:m,lineHeight:_a(m,c),gapBefore:Math.round(m*.6),gapAfter:Math.round(m*.3),className:"body-minor-heading"},paragraph:{font:`400 ${N}px ${v}`,fontSize:N,lineHeight:_a(N,c),gapBefore:0,gapAfter:Math.round(N*.6),className:"body-line"},quote:{font:`400 ${b}px ${v}`,fontSize:b,lineHeight:_a(b,c*1.05),gapBefore:Math.round(b*.5),gapAfter:Math.round(b*.5),className:"body-quote"},"list-item":{font:`400 ${w}px ${v}`,fontSize:w,lineHeight:_a(w,c),gapBefore:0,gapAfter:Math.round(w*.3),className:"body-line"}}}function Lx(u="longform-3-4"){const r=Tl(u),s=u==="wechat-cover-2.35",c=u==="square-1-1";return{name:"默认样式",aspectRatio:u,algorithm:{baseFontSize:u==="wechat-cover-2.35"?56:u==="wide-16-9"?44:u==="square-1-1"?48:40,scaleRatio:s?1.35:1.25,lineHeightMultiplier:1.45,obstacleGap:24,targetFillRatio:.8,contentBottomGap:s?0:20,textAlign:s||c?"center":"left",verticalAlign:s||c?"center":"top",safeArea:s?{top:40,right:60,bottom:40,left:60}:r.defaultSafeArea},theme:{bgColor:"#ffffff",textColor:"#171717",headingColor:"#171717",accentColor:"#059669",quoteColor:"#525252",captionColor:"#737373",watermarkColor:"#a3a3a3",cardBg:"#f5f5f5",borderSubtle:"#e5e5e5"},typography:{headingFont:"PingFang SC",bodyFont:"Songti SC"},footerText:s?"":"Typeset Studio · 纯算法排版",watermarkText:s?"":"@Antigravity",chrome:{showHeader:!s,showWatermark:!s,showPageNumber:!s&&!c,showFooter:!s,showFooterDivider:!s,showFooterText:!s,showFillRatio:!1}}}function oy(u){const{markdown:r,images:s=[],config:c,highlightWords:d=[],minPages:x=1,maxPages:g=0,pageFillRatios:v}=u;if(!Number.isInteger(x)||x<1||!Number.isInteger(g)||g<0||g>0&&g<x)throw new RangeError("Invalid page constraints: maxPages must be 0 or at least minPages");if(Cr(s),Dh(c.canvasStyle),s.some(L=>!L.repeatEveryPage&&L.pageIndex!=null&&(!Number.isInteger(L.pageIndex)||L.pageIndex<1||L.pageIndex>50)))throw new RangeError("Image pageIndex must be an integer between 1 and 50");const N=Tl(c.aspectRatio),{stageWidth:m,stageHeight:y}=zn(N,c.algorithm.safeArea,c.algorithm.contentBottomGap),p=sy({baseFontSize:c.algorithm.baseFontSize,scaleRatio:c.algorithm.scaleRatio,lineHeightMultiplier:c.algorithm.lineHeightMultiplier,headingFont:c.typography.headingFont,bodyFont:c.typography.bodyFont});if(c.coverTheme){const L=c.coverTheme.typography;for(const[$,ee]of Object.entries(p)){const ce=$.includes("heading")?L.title:L.subtitle;Object.assign(ee,{font:`${ce.fontWeight} ${ce.fontSize}px "${ce.fontFamily}"`,lineHeight:Math.round(ce.fontSize*ce.lineHeight)})}}const b=L=>Vv(L).map($=>({...p[$.kind],kind:$.kind,text:$.text,runs:Qv($.text,d).map(ee=>({...ee,letterSpacing:c.coverTheme?.typography[$.kind.includes("heading")?"title":"subtitle"].letterSpacing})),bullet:$.kind==="list-item"?$.bullet??"•":void 0,textIndent:$.kind==="list-item"?28:$.kind==="quote"?20:0,keepWithNext:["heading","subheading","minor-heading"].includes($.kind)})),w=s.filter(L=>L.templateAssetKey),M=s.filter(L=>!L.templateAssetKey),Q=Zv(r);let B=[];if(Q.length>1){const L=Math.max(Q.length,...M.map(ee=>ee.pageIndex||1));if(L>50)throw new RangeError("Content exceeds engine limit of 50 pages");for(let ee=0;ee<L;ee++){const ce=M.filter(H=>(H.pageIndex||1)===ee+1),ue=mr(b(Q[ee]||""),m,y,ce,{obstacleGap:c.algorithm.obstacleGap,pageImageLimit:2,textAlign:c.algorithm.textAlign,verticalAlign:c.algorithm.verticalAlign,initialPageNumber:B.length+1,templateImages:w,targetFillRatio:v?.[ee+1]??c.algorithm.targetFillRatio});B.push(...ue.length?ue:[{pageNumber:B.length+1,lines:[],images:[],textBottom:0,fillRatio:0}])}const $=Math.max(0,...w.filter(ee=>!ee.repeatEveryPage).map(ee=>ee.pageIndex||1));B.length<$&&B.push(...mr([],m,y,[],{initialPageNumber:B.length+1,lastPageNumber:$,templateImages:w}))}else{const L=b(r);B=mr(L,m,y,M,{obstacleGap:c.algorithm.obstacleGap,pageImageLimit:c.aspectRatio==="longform-3-4"?2:1,textAlign:c.algorithm.textAlign,verticalAlign:c.algorithm.verticalAlign,targetFillRatio:c.algorithm.targetFillRatio,pageFillRatios:v,templateImages:w})}if(Q.length===1&&B.length<x&&r.trim())for(let L=1;L<=8&&B.length<x;L++){const $=c.algorithm.targetFillRatio*Math.pow(.75,L);try{B=mr(b(r),m,y,M,{obstacleGap:c.algorithm.obstacleGap,pageImageLimit:c.aspectRatio==="longform-3-4"?2:1,textAlign:c.algorithm.textAlign,verticalAlign:c.algorithm.verticalAlign,targetFillRatio:$,templateImages:w,pageFillRatios:v&&Object.fromEntries(Object.entries(v).map(([ee,ce])=>[ee,Math.min(ce,$)]))})}catch{break}}if(B.length<x&&x>1)throw new RangeError(`Content cannot satisfy minPages=${x}; lower the minimum page count`);if(B.length>50)throw new RangeError("Content exceeds engine limit of 50 pages");if(g>0&&B.length>g)throw new RangeError(`Content exceeds maxPages=${g}; no content was discarded`);return B.length===0&&(B=[{pageNumber:1,lines:[],images:s.filter(L=>!L.templateAssetKey||L.repeatEveryPage||(L.pageIndex||1)===1).map((L,$)=>Fr(L,$,m,y)),textBottom:0,fillRatio:0}]),{pages:B,pageCount:B.length,canvasSpec:N,config:c}}function gr(u){return{x:u.x,y:u.y,width:u.width,height:u.height,isAbsolute:u.isAbsolute,layoutPreset:u.layoutPreset,pageIndex:u.pageIndex,zIndex:u.zIndex,rotate:u.rotate,opacity:u.opacity,borderRadius:u.borderRadius,captionHeight:u.captionHeight}}function yo(u,r){const s={...u,...r};return(!s.isAbsolute||!s.templateAssetKey)&&(s.repeatEveryPage=!1),s}function fy(u){const r=Tl(u.aspectRatio);return{isAbsolute:!0,layoutPreset:"custom",zIndex:0,rotate:0,borderRadius:0,captionHeight:0,x:-u.algorithm.safeArea.left,y:-u.algorithm.safeArea.top,width:r.width,height:r.height}}const dy=`# 大模型纯算法排版深度剖析
|
|
303
|
+
|
|
304
|
+
这是一篇利用纯几何计算与字符分词度量排版的示例文章。无论是字号、行距、还是图片避让,均由算法自动寻优。
|
|
305
|
+
|
|
306
|
+
> 排版的美感在于克制与韵律,让机器承担繁琐的对齐与换行,让人专注思想的表达。
|
|
307
|
+
|
|
308
|
+
### 为什么选择纯算法绕排?
|
|
309
|
+
|
|
310
|
+
传统排版依赖 DOM 回流与重绘,无法在无头环境中进行确定性的页面切割。而结合 Canvas 字符测距与空间网格,我们可以在微秒级求解最优文字流向。
|
|
311
|
+
|
|
312
|
+
- 零 DOM 依赖,多端极速运行
|
|
313
|
+
- 亚像素级字宽计算与平滑孤行控制
|
|
314
|
+
- 任意画板比例智能自适应
|
|
315
|
+
`;function pr(u,r,s,c){if(u.isAbsolute||!u.layoutPreset||u.layoutPreset==="custom")return u;const d=u.pageIndex||1,x=r.filter(g=>!!g.templateAssetKey==!!u.templateAssetKey&&(g.pageIndex||1)===d).findIndex(g=>g.id===u.id);return Fr(u,x,s,c)}function xy(u,r){const[s,c]=fe.useState(null),[d,x]=fe.useState(0),[g,v]=fe.useState(()=>Lx("longform-3-4")),N=g.aspectRatio,[m,y]=fe.useState(dy),[p,b]=fe.useState([{id:"img_demo_1",src:"https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800&auto=format&fit=crop&q=80",alt:"抽象建筑线条",caption:"图 1:建筑结构中的空间秩序感",x:16,y:420,width:420,height:280,captionHeight:40,layoutPreset:"mid-left"}]),[w,M]=fe.useState(["算法排版","确定性","空间秩序"]),Q=fe.useRef(new Map(p.map(k=>[k.id,gr(k)]))),[B,L]=fe.useState({}),{result:$,layoutError:ee}=fe.useMemo(()=>{try{return{result:oy({markdown:m,images:p,config:g,highlightWords:w}),layoutError:null}}catch(k){return{result:{pages:[],pageCount:0,canvasSpec:Tl(g.aspectRatio),config:g},layoutError:k instanceof Error?k.message:"排版失败"}}},[m,p,g,w,d]);fe.useEffect(()=>{let k=!0,D;const K=()=>{k&&(clearTimeout(D),D=setTimeout(()=>{Xv(),x(P=>P+1)},0))};return document.fonts.ready.then(K),document.fonts.addEventListener("loadingdone",K),window.addEventListener("typeset-fonts-loaded",K),()=>{k=!1,clearTimeout(D),document.fonts.removeEventListener("loadingdone",K),window.removeEventListener("typeset-fonts-loaded",K)}},[]),fe.useEffect(()=>{if(!r)return;let k=!0;const D={"x-admin-key":u},K=async re=>{const le=await fetch(re,{headers:D}),ae=await le.json();if(!le.ok||!ae.ok)throw new Error(ae.message||ae.error||"加载模板失败");return ae},P=async()=>{try{const re=new URLSearchParams(window.location.search),le=re.get("template")||re.get("templateId")||re.get("templateKey"),ae=re.get("slot"),A=re.get("account")||"default",X=re.get("title"),Z=re.get("markdown")||re.get("text");if(Z?y(Z):X&&y(`# ${X}
|
|
316
|
+
|
|
317
|
+
在此输入正文内容...`),le){const ge=await K(`/api/templates/resolve/${encodeURIComponent(le)}`);if(ge.ok&&ge.template){k&&Y(ge.template);return}}if(ae){const ge=await K(`/api/templates/slots?account=${encodeURIComponent(A)}`);if(ge.ok&&ge.slots?.[ae]?.template){k&&Y(ge.slots[ae].template);return}}const W=await K(`/api/templates/slots?account=${encodeURIComponent(A)}`);if(W.ok&&W.slots?.newspic_content?.template){k&&Y(W.slots.newspic_content.template);return}const me=await K("/api/templates/default");me.ok&&me.template&&k&&Y(me.template)}catch(re){k&&c(re instanceof Error?re.message:"加载模板失败")}};return c(null),P(),()=>{k=!1}},[u,r]);const ce=k=>{const D=Tl(k),K=Lx(k),{stageWidth:P,stageHeight:re}=zn(D,K.algorithm.safeArea,K.algorithm.contentBottomGap);b(le=>le.map(ae=>pr(ae,le,P,re))),v(le=>({...le,aspectRatio:k,algorithm:{...le.algorithm,baseFontSize:K.algorithm.baseFontSize,scaleRatio:K.algorithm.scaleRatio,safeArea:K.algorithm.safeArea,textAlign:K.algorithm.textAlign,verticalAlign:K.algorithm.verticalAlign,contentBottomGap:K.algorithm.contentBottomGap},chrome:{...K.chrome},watermarkText:K.watermarkText,footerText:K.footerText}))},ue=k=>{v(D=>({...D,algorithm:{...D.algorithm,...k}}))},H=k=>{v(D=>({...D,theme:{...D.theme,...k},...k.bgColor?{canvasStyle:{...D.canvasStyle,fill:{type:"solid",color:k.bgColor}}}:{}}))},V=k=>{v(D=>({...D,algorithm:{...D.algorithm,safeArea:{...D.algorithm.safeArea,...k}}}))},G=k=>{const D=Tl(N),{stageWidth:K,stageHeight:P}=zn(D,g.algorithm.safeArea,g.algorithm.contentBottomGap),re=k.pageIndex||1,ae=p.filter(W=>!W.templateAssetKey&&(W.pageIndex||1)===re).length,A={...k,id:`img_${Date.now()}_${Math.random().toString(36).substring(2,6)}`},X=Fr(A,ae,K,P),Z={...A,x:X.x,y:X.y,width:X.width,height:X.height};Q.current.set(Z.id,gr(Z)),b(W=>[...W,Z])},S=(k,D)=>{const K=D.isAbsolute===!1?B[k]:void 0;K&&q(k),b(P=>{const re=P.map(ae=>{if(ae.id!==k)return ae;const A=yo(ae,{...K,...D});return D.layoutPreset&&D.layoutPreset!=="custom"&&(delete A.x,delete A.y,delete A.width,delete A.height),A}),le=re.find(ae=>ae.id===k);if(!le)return P;if(!le.isAbsolute&&le.layoutPreset&&le.layoutPreset!=="custom"){const ae=Tl(N),{stageWidth:A,stageHeight:X}=zn(ae,g.algorithm.safeArea,g.algorithm.contentBottomGap);return re.map(Z=>Z.id===k?pr(Z,re,A,X):Z)}return re})},q=k=>L(D=>{const K={...D};return delete K[k],K}),_=(k,D)=>{const K=p.find(P=>P.id===k);if(K)if(D){if(B[k])return;L(P=>({...P,[k]:gr(K)})),S(k,fy(g))}else{const P=B[k];if(!P)return;q(k),b(re=>re.map(le=>le.id===k?yo(le,P):le))}},te=k=>{const D=Q.current.get(k);D&&(q(k),b(K=>K.map(P=>P.id===k?yo(P,D):P)))},ne=k=>{Q.current.delete(k),q(k),b(D=>{const K=D.filter(ae=>ae.id!==k),P=Tl(N),{stageWidth:re,stageHeight:le}=zn(P,g.algorithm.safeArea,g.algorithm.contentBottomGap);return K.map(ae=>pr(ae,K,re,le))})},he=(k,D)=>{b(K=>{const P=K.findIndex(W=>W.id===k);if(P===-1)return K;const re=D==="up"?P-1:P+1;if(re<0||re>=K.length)return K;const le=[...K],ae=le[P];le[P]=le[re],le[re]=ae;const A=Tl(N),{stageWidth:X,stageHeight:Z}=zn(A,g.algorithm.safeArea,g.algorithm.contentBottomGap);return le.map(W=>pr(W,le,X,Z))})},Y=k=>{try{Cr(k.images),v({...k,name:`${k.name||"未命名模板"}-副本`}),L({}),b(D=>{const K=$p(D,k.images);return Q.current=new Map(K.map(P=>[P.id,gr(P)])),K}),c(null)}catch(D){c(D instanceof Error?D.message:"模板素材无效")}},O=k=>{v(D=>({...D,typography:{...D.typography,...k}}))};return{error:ee||s,aspectRatio:N,switchAspectRatio:ce,config:g,setConfig:v,markdown:m,setMarkdown:y,images:p,addImage:G,updateImage:S,toggleImageBackground:_,resetImageLayout:te,backgroundImageIds:Object.keys(B),removeImage:ne,moveImage:he,highlightWords:w,setHighlightWords:M,result:$,updateAlgorithm:ue,updateTheme:H,updateTypography:O,updateSafeArea:V,loadTemplate:Y}}const hy=()=>{const{adminKey:u,setAdminKey:r,isVerified:s}=eb(),{error:c,aspectRatio:d,switchAspectRatio:x,config:g,markdown:v,setMarkdown:N,images:m,addImage:y,updateImage:p,toggleImageBackground:b,resetImageLayout:w,backgroundImageIds:M,removeImage:Q,moveImage:B,highlightWords:L,setHighlightWords:$,result:ee,updateAlgorithm:ce,updateTheme:ue,updateTypography:H,updateSafeArea:V,loadTemplate:G,setConfig:S}=xy(u,s),[q,_]=fe.useState(()=>localStorage.getItem("typeset_studio_theme_mode")||"light");fe.useEffect(()=>{q==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("typeset_studio_theme_mode",q)},[q]);const te=()=>{_(pe=>pe==="light"?"dark":"light")},[ne,he]=fe.useState("grid"),[Y,O]=fe.useState(.45),[k,D]=fe.useState(!0),[K,P]=fe.useState(!1),[re,le]=fe.useState(!1),[ae,A]=fe.useState(0),[X,Z]=fe.useState(!1),[W,me]=fe.useState(!1),ge=fe.useRef(null),Ae=(pe=ne)=>{if(!ge.current)return .45;const{clientWidth:ye,clientHeight:Ce}=ge.current;if(ye<=0||Ce<=0)return .45;const Ge=ee.canvasSpec,Je=ee.pages.length;if(Je<=1||pe==="stack"){const Ga=Math.max(200,ye-64),Hn=Math.max(200,Ce-120),on=Math.min(Ga/Ge.width,Hn/Ge.height);return Math.max(.2,Math.min(1.2,Math.round(on*100)/100))}const At=48,Pt=96,Qt=28,jl=36,Ua=Math.max(200,ye-At),Ln=Math.max(200,Ce-Pt);let sn=.2;const Li=Math.min(Je,4);for(let el=1;el<=Li;el++){const Dl=Math.ceil(Je/el),Ga=(el-1)*Qt,Hn=(Dl-1)*Qt,on=Dl*jl,Un=Ua-Ga,Gn=Ln-Hn-on;if(Un>60&&Gn>60){const jr=Un/(el*Ge.width),Dr=Gn/(Dl*Ge.height),dt=Math.min(jr,Dr);dt>sn&&(sn=dt)}}return Math.max(.22,Math.min(.9,Math.round(sn*100)/100))},de=()=>{D(!0);const pe=Ae(ne);O(pe)},ve=pe=>{D(!1),O(pe)},Xt=pe=>{he(pe),D(!0);const ye=Ae(pe);O(ye)},Ha=pe=>{if(D(!1),!ge.current)return;const{clientWidth:ye,clientHeight:Ce}=ge.current,Ge=ee.canvasSpec,Je=Math.max(.2,Math.min(1.2,Math.round(Math.min((ye-64)/Ge.width,(Ce-120)/Ge.height)*100)/100));O(Je),setTimeout(()=>{document.getElementById(`typeset-page-${pe}`)?.scrollIntoView({behavior:"smooth",block:"center"})},60)};fe.useEffect(()=>{const pe=setTimeout(()=>{if(k){const ye=Ae(ne);O(ye)}},60);return()=>clearTimeout(pe)},[d,ee.canvasSpec.width,ee.canvasSpec.height,ee.pages.length,ne]),fe.useEffect(()=>{if(!ge.current)return;const pe=new ResizeObserver(()=>{if(k){const ye=Ae(ne);O(ye)}});return pe.observe(ge.current),()=>pe.disconnect()},[k,ee.canvasSpec.width,ee.canvasSpec.height,ee.pages.length,ne]);const Fl=async()=>{me(!0);try{const pe=document.querySelectorAll("canvas.typeset-page");if([...pe].some(Ge=>Ge.dataset.renderState!=="ready"))throw new Error("画布尚未完成绘制,请检查素材或稍后再导出");if(pe.length>0){let Ge=!0;for(let Je=0;Je<pe.length;Je++){const At=pe[Je];try{const Pt=At.toDataURL("image/png"),Qt=document.createElement("a");Qt.download=`typeset-${d}-p${Je+1}-${Date.now()}.png`,Qt.href=Pt,Qt.click()}catch(Pt){console.warn("Canvas is tainted by external non-CORS image, falling back to server export:",Pt),Ge=!1;break}}if(Ge)return}const ye=await fetch("/api/render/export",{method:"POST",headers:{"Content-Type":"application/json",...u?{"X-Admin-Key":u}:{}},body:JSON.stringify({result:ee})});if(!ye.ok)throw new Error(`Server returned status ${ye.status}`);const Ce=await ye.json();if(!Ce.ok||!Ce.pages?.length)throw new Error(Ce.error||"No pages returned from server-side render");for(const Ge of Ce.pages){const Je=document.createElement("a");Je.download=`typeset-${d}-p${Ge.pageNumber}-${Date.now()}.png`,Je.href=Ge.dataUrl,Je.click()}}catch(pe){console.error("Export failed:",pe),alert(pe instanceof Error?pe.message:"导出失败,请检查网络或后端服务连接")}finally{me(!1)}};return f.jsxs("div",{className:"flex flex-col h-screen w-screen overflow-hidden bg-[#fafafa] dark:bg-[#000000] text-[#171717] dark:text-[#ededed] transition-colors",children:[f.jsx(Zp,{currentRatio:d,onSelectRatio:x,zoom:Y,onZoomChange:ve,onAutoFit:de,isAutoFit:k,onOpenTemplates:()=>P(pe=>!pe),isTemplateDrawerOpen:K,templateName:g.name,onSaveTemplate:()=>le(!0),onOpenAuth:()=>Z(!0),onExport:Fl,isExporting:W,isAuthed:!!s,pageCount:ee.pageCount,themeMode:q,onToggleThemeMode:te}),c&&f.jsx("div",{role:"alert",className:"px-4 py-2 text-sm text-red-600",children:c}),f.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden relative",children:[f.jsx(Qp,{markdown:v,onMarkdownChange:N,images:m,onAddImage:y,onToggleBackground:b,onResetImageLayout:w,backgroundImageIds:M,onUpdateImage:p,onRemoveImage:Q,onMoveImage:B,pageCount:ee.pageCount,highlightWords:L,onHighlightWordsChange:$,adminKey:u}),f.jsx(Xp,{result:ee,zoom:Y,viewportRef:ge,onAutoFit:de,isAutoFit:k,viewMode:ne,onToggleViewMode:Xt,onFocusPage:Ha}),f.jsx(Ip,{config:g,onUpdateAlgorithm:ce,onUpdateTheme:ue,onUpdateCanvasStyle:pe=>S(ye=>({...ye,canvasStyle:pe,theme:{...ye.theme,bgColor:pe.fill?.type==="solid"?pe.fill.color:pe.fill?.stops[0].color||ye.theme.bgColor}})),onUpdateTypography:H,onUpdateSafeArea:V,onUpdateBranding:(pe,ye)=>{S(Ce=>({...Ce,footerText:pe,watermarkText:ye}))},onUpdateChrome:pe=>{S(ye=>({...ye,chrome:{...ye.chrome,...pe}}))}}),f.jsx(Wp,{isOpen:K,onClose:()=>P(!1),refreshKey:ae,onApplyTemplate:G,adminKey:u})]}),f.jsx(Pp,{isOpen:re,onClose:()=>le(!1),currentConfig:{...g,images:m},onSaved:pe=>{S(ye=>({...ye,id:pe.id,name:pe.name,slot:pe.slot})),A(ye=>ye+1)},adminKey:u}),f.jsx(zp,{isOpen:X,onClose:()=>Z(!1),currentKey:u,onSaveKey:r,isVerified:s})]})},Xh=document.getElementById("root");if(!Xh)throw new Error("Failed to find root element");J2.createRoot(Xh).render(f.jsx(G2.StrictMode,{children:f.jsx(hy,{})}));
|