starry-slides 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +10 -0
- package/README.md +131 -0
- package/dist/assets/index---ub3Dty.css +1 -0
- package/dist/assets/index-7Xs_Dyp0.js +354 -0
- package/dist/assets/index-8ul7coaw.js +451 -0
- package/dist/assets/index-B4_bJa9t.js +412 -0
- package/dist/assets/index-B9p6L9Wx.js +324 -0
- package/dist/assets/index-BF-Vi1Nh.js +413 -0
- package/dist/assets/index-BKvVbgXz.css +1 -0
- package/dist/assets/index-BNZJ_Wz-.js +417 -0
- package/dist/assets/index-BO2gtiKn.js +413 -0
- package/dist/assets/index-BYpD8kgo.js +456 -0
- package/dist/assets/index-BaZRfz_9.css +1 -0
- package/dist/assets/index-BlsWm4PI.js +412 -0
- package/dist/assets/index-BnUIBFtw.js +393 -0
- package/dist/assets/index-BvhCbfCi.js +412 -0
- package/dist/assets/index-BxEkxfy1.js +412 -0
- package/dist/assets/index-BzrA7O0L.js +422 -0
- package/dist/assets/index-C0xGkdRg.js +413 -0
- package/dist/assets/index-C1Rjncf1.js +456 -0
- package/dist/assets/index-CCgb2gqc.js +413 -0
- package/dist/assets/index-CDFJQRFx.js +413 -0
- package/dist/assets/index-CEOai0RW.js +456 -0
- package/dist/assets/index-CG2uWTey.css +1 -0
- package/dist/assets/index-CLe3_iTu.js +412 -0
- package/dist/assets/index-CS_optob.js +324 -0
- package/dist/assets/index-CXgwXOZH.css +1 -0
- package/dist/assets/index-CcBvAcE2.js +408 -0
- package/dist/assets/index-CllmR_MT.js +408 -0
- package/dist/assets/index-CnMy6wxq.js +412 -0
- package/dist/assets/index-CoWNjYgb.js +422 -0
- package/dist/assets/index-CtfA3BPy.css +1 -0
- package/dist/assets/index-D-JiuJIv.js +324 -0
- package/dist/assets/index-D2uEYXyQ.css +1 -0
- package/dist/assets/index-D70beOHW.js +456 -0
- package/dist/assets/index-D8xuxnF1.js +456 -0
- package/dist/assets/index-DKAtkRd8.css +1 -0
- package/dist/assets/index-DU3l9_k0.css +1 -0
- package/dist/assets/index-DaLY98jk.js +456 -0
- package/dist/assets/index-DkNHJHQl.js +412 -0
- package/dist/assets/index-DmFnifK8.js +456 -0
- package/dist/assets/index-DndZR7Ds.css +1 -0
- package/dist/assets/index-DuRa7Y6g.js +324 -0
- package/dist/assets/index-EnDjTeHF.js +451 -0
- package/dist/assets/index-J3nQgjqJ.js +451 -0
- package/dist/assets/index-wD_iWTBn.js +413 -0
- package/dist/chunk-AK5J4CXH.js +1671 -0
- package/dist/chunk-ARFDESSF.js +1583 -0
- package/dist/chunk-DHWTBXGS.js +985 -0
- package/dist/chunk-FCRRFL7N.js +1571 -0
- package/dist/chunk-J7W4Y7WJ.js +1620 -0
- package/dist/chunk-OCJULB7Z.js +1140 -0
- package/dist/chunk-WCJWV5SO.js +36 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +1119 -0
- package/dist/cli/index.test.d.ts +1 -0
- package/dist/core/deck-slide-operations.d.ts +5 -0
- package/dist/core/generated-deck.d.ts +8 -0
- package/dist/core/generated-deck.test.d.ts +1 -0
- package/dist/core/group-operations.d.ts +24 -0
- package/dist/core/history.d.ts +20 -0
- package/dist/core/history.test.d.ts +1 -0
- package/dist/core/html-export.d.ts +20 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/core/layout.d.ts +36 -0
- package/dist/core/layout.test.d.ts +1 -0
- package/dist/core/pdf-export.d.ts +20 -0
- package/dist/core/presentation.d.ts +7 -0
- package/dist/core/slide-contract.d.ts +41 -0
- package/dist/core/slide-document.d.ts +5 -0
- package/dist/core/slide-document.test.d.ts +1 -0
- package/dist/core/slide-html-document.d.ts +3 -0
- package/dist/core/slide-operation-reducer.d.ts +4 -0
- package/dist/core/slide-operation-reducer.test.d.ts +1 -0
- package/dist/core/slide-operation-types.d.ts +123 -0
- package/dist/core/slide-operations-helpers.d.ts +14 -0
- package/dist/core/slide-operations.d.ts +5 -0
- package/dist/core/slide-operations.test.d.ts +1 -0
- package/dist/core/verify-deck.d.ts +48 -0
- package/dist/core/verify-deck.test.d.ts +1 -0
- package/dist/editor/app/App.d.ts +2 -0
- package/dist/editor/app/main.d.ts +1 -0
- package/dist/editor/app/use-slides-data.d.ts +14 -0
- package/dist/editor/components/block-manipulation-overlay.d.ts +32 -0
- package/dist/editor/components/color-picker.d.ts +10 -0
- package/dist/editor/components/context-menu.d.ts +26 -0
- package/dist/editor/components/editor-header.d.ts +18 -0
- package/dist/editor/components/floating-toolbar-feature.d.ts +8 -0
- package/dist/editor/components/floating-toolbar-parts.d.ts +46 -0
- package/dist/editor/components/floating-toolbar.d.ts +27 -0
- package/dist/editor/components/presenter-view.d.ts +13 -0
- package/dist/editor/components/slide-sidebar.d.ts +18 -0
- package/dist/editor/components/stage-canvas.d.ts +77 -0
- package/dist/editor/components/ui/accordion.d.ts +7 -0
- package/dist/editor/components/ui/button.d.ts +10 -0
- package/dist/editor/components/ui/context-menu.d.ts +25 -0
- package/dist/editor/components/ui/dialog.d.ts +10 -0
- package/dist/editor/components/ui/input.d.ts +3 -0
- package/dist/editor/components/ui/popover.d.ts +10 -0
- package/dist/editor/components/ui/scroll-area.d.ts +5 -0
- package/dist/editor/components/ui/select.d.ts +15 -0
- package/dist/editor/components/ui/separator.d.ts +4 -0
- package/dist/editor/components/ui/tabs.d.ts +11 -0
- package/dist/editor/components/ui/textarea.d.ts +3 -0
- package/dist/editor/components/ui/toggle-group.d.ts +9 -0
- package/dist/editor/components/ui/toggle.d.ts +9 -0
- package/dist/editor/components/ui/tooltip.d.ts +7 -0
- package/dist/editor/editor-operations.d.ts +15 -0
- package/dist/editor/hooks/block-manipulation-geometry.d.ts +16 -0
- package/dist/editor/hooks/block-manipulation-operations.d.ts +10 -0
- package/dist/editor/hooks/block-manipulation-overlay.d.ts +11 -0
- package/dist/editor/hooks/block-manipulation-types.d.ts +73 -0
- package/dist/editor/hooks/editor-keyboard-geometry.d.ts +22 -0
- package/dist/editor/hooks/editor-keyboard-operations.d.ts +10 -0
- package/dist/editor/hooks/editor-keyboard-types.d.ts +35 -0
- package/dist/editor/hooks/iframe-editing-session.d.ts +10 -0
- package/dist/editor/hooks/iframe-text-editing-dom.d.ts +6 -0
- package/dist/editor/hooks/iframe-text-editing-types.d.ts +38 -0
- package/dist/editor/hooks/object-clipboard-commands.d.ts +28 -0
- package/dist/editor/hooks/use-block-manipulation.d.ts +3 -0
- package/dist/editor/hooks/use-editor-keyboard-shortcuts.d.ts +3 -0
- package/dist/editor/hooks/use-iframe-text-editing.d.ts +3 -0
- package/dist/editor/hooks/use-slide-history.d.ts +17 -0
- package/dist/editor/hooks/use-slide-inspector.d.ts +24 -0
- package/dist/editor/hooks/use-slide-thumbnails.d.ts +2 -0
- package/dist/editor/hooks/use-stage-viewport.d.ts +13 -0
- package/dist/editor/index.d.ts +13 -0
- package/dist/editor/index.js +8260 -0
- package/dist/editor/lib/block-snap-constants.d.ts +8 -0
- package/dist/editor/lib/block-snap-guides.d.ts +6 -0
- package/dist/editor/lib/block-snap-targets.d.ts +13 -0
- package/dist/editor/lib/block-snap-types.d.ts +30 -0
- package/dist/editor/lib/block-snapping.d.ts +17 -0
- package/dist/editor/lib/collect-css-properties.d.ts +5 -0
- package/dist/editor/lib/element-tool-commit.d.ts +18 -0
- package/dist/editor/lib/element-tool-model.d.ts +16 -0
- package/dist/editor/lib/element-tool-types.d.ts +35 -0
- package/dist/editor/lib/element-tool-values.d.ts +23 -0
- package/dist/editor/lib/motion.d.ts +8 -0
- package/dist/editor/lib/selection-overlay.d.ts +4 -0
- package/dist/editor/lib/style-controls.d.ts +17 -0
- package/dist/editor/lib/thumbnail-renderer.d.ts +2 -0
- package/dist/editor/lib/utils.d.ts +3 -0
- package/dist/index.html +13 -0
- package/dist/node/deck-runtime-middleware.d.ts +8 -0
- package/dist/node/deck-source.d.ts +1 -0
- package/dist/node/html-export.d.ts +16 -0
- package/dist/node/open-browser.d.ts +1 -0
- package/dist/node/pdf-export.d.ts +20 -0
- package/dist/node/ports.d.ts +1 -0
- package/dist/node/view-renderer.d.ts +31 -0
- package/dist/runtime/deck-source.d.ts +1 -0
- package/dist/runtime/html-export.d.ts +16 -0
- package/dist/runtime/open-browser.d.ts +1 -0
- package/dist/runtime/pdf-export.d.ts +20 -0
- package/dist/runtime/ports.d.ts +1 -0
- package/dist/runtime/view-renderer.d.ts +31 -0
- package/dist/runtime/view-renderer.test.d.ts +1 -0
- package/dist/test/deck-fixtures.d.ts +14 -0
- package/package.json +94 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
function A2(n,r){for(var o=0;o<r.length;o++){const i=r[o];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=o(s);fetch(s.href,u)}})();function hm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Jf={exports:{}},Wl={};/**
|
|
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 $y;function M2(){if($y)return Wl;$y=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(i,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var m in s)m!=="key"&&(u[m]=s[m])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:d,ref:s!==void 0?s:null,props:u}}return Wl.Fragment=r,Wl.jsx=o,Wl.jsxs=o,Wl}var Gy;function _2(){return Gy||(Gy=1,Jf.exports=M2()),Jf.exports}var p=_2(),ed={exports:{}},je={};/**
|
|
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 Yy;function N2(){if(Yy)return je;Yy=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),w=Symbol.iterator;function T(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,M={};function R(N,j,B){this.props=N,this.context=j,this.refs=M,this.updater=B||C}R.prototype.isReactComponent={},R.prototype.setState=function(N,j){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,j,"setState")},R.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function z(){}z.prototype=R.prototype;function H(N,j,B){this.props=N,this.context=j,this.refs=M,this.updater=B||C}var Y=H.prototype=new z;Y.constructor=H,A(Y,R.prototype),Y.isPureReactComponent=!0;var J=Array.isArray;function $(){}var V={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function K(N,j,B){var P=B.ref;return{$$typeof:n,type:N,key:j,ref:P!==void 0?P:null,props:B}}function ie(N,j){return K(N.type,j,N.props)}function se(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function q(N){var j={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(B){return j[B]})}var ue=/\/+/g;function de(N,j){return typeof N=="object"&&N!==null&&N.key!=null?q(""+N.key):j.toString(36)}function he(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(j){N.status==="pending"&&(N.status="fulfilled",N.value=j)},function(j){N.status==="pending"&&(N.status="rejected",N.reason=j)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function S(N,j,B,P,te){var ne=typeof N;(ne==="undefined"||ne==="boolean")&&(N=null);var ae=!1;if(N===null)ae=!0;else switch(ne){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(N.$$typeof){case n:case r:ae=!0;break;case x:return ae=N._init,S(ae(N._payload),j,B,P,te)}}if(ae)return te=te(N),ae=P===""?"."+de(N,0):P,J(te)?(B="",ae!=null&&(B=ae.replace(ue,"$&/")+"/"),S(te,j,B,"",function(Se){return Se})):te!=null&&(se(te)&&(te=ie(te,B+(te.key==null||N&&N.key===te.key?"":(""+te.key).replace(ue,"$&/")+"/")+ae)),j.push(te)),1;ae=0;var Z=P===""?".":P+":";if(J(N))for(var oe=0;oe<N.length;oe++)P=N[oe],ne=Z+de(P,oe),ae+=S(P,j,B,ne,te);else if(oe=T(N),typeof oe=="function")for(N=oe.call(N),oe=0;!(P=N.next()).done;)P=P.value,ne=Z+de(P,oe++),ae+=S(P,j,B,ne,te);else if(ne==="object"){if(typeof N.then=="function")return S(he(N),j,B,P,te);throw j=String(N),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return ae}function _(N,j,B){if(N==null)return N;var P=[],te=0;return S(N,P,"","",function(ne){return j.call(B,ne,te++)}),P}function D(N){if(N._status===-1){var j=N._result;j=j(),j.then(function(B){(N._status===0||N._status===-1)&&(N._status=1,N._result=B)},function(B){(N._status===0||N._status===-1)&&(N._status=2,N._result=B)}),N._status===-1&&(N._status=0,N._result=j)}if(N._status===1)return N._result.default;throw N._result}var O=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},I={map:_,forEach:function(N,j,B){_(N,function(){j.apply(this,arguments)},B)},count:function(N){var j=0;return _(N,function(){j++}),j},toArray:function(N){return _(N,function(j){return j})||[]},only:function(N){if(!se(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return je.Activity=y,je.Children=I,je.Component=R,je.Fragment=o,je.Profiler=s,je.PureComponent=H,je.StrictMode=i,je.Suspense=h,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,je.__COMPILER_RUNTIME={__proto__:null,c:function(N){return V.H.useMemoCache(N)}},je.cache=function(N){return function(){return N.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(N,j,B){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=A({},N.props),te=N.key;if(j!=null)for(ne in j.key!==void 0&&(te=""+j.key),j)!k.call(j,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&j.ref===void 0||(P[ne]=j[ne]);var ne=arguments.length-2;if(ne===1)P.children=B;else if(1<ne){for(var ae=Array(ne),Z=0;Z<ne;Z++)ae[Z]=arguments[Z+2];P.children=ae}return K(N.type,te,P)},je.createContext=function(N){return N={$$typeof:d,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:u,_context:N},N},je.createElement=function(N,j,B){var P,te={},ne=null;if(j!=null)for(P in j.key!==void 0&&(ne=""+j.key),j)k.call(j,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(te[P]=j[P]);var ae=arguments.length-2;if(ae===1)te.children=B;else if(1<ae){for(var Z=Array(ae),oe=0;oe<ae;oe++)Z[oe]=arguments[oe+2];te.children=Z}if(N&&N.defaultProps)for(P in ae=N.defaultProps,ae)te[P]===void 0&&(te[P]=ae[P]);return K(N,ne,te)},je.createRef=function(){return{current:null}},je.forwardRef=function(N){return{$$typeof:m,render:N}},je.isValidElement=se,je.lazy=function(N){return{$$typeof:x,_payload:{_status:-1,_result:N},_init:D}},je.memo=function(N,j){return{$$typeof:g,type:N,compare:j===void 0?null:j}},je.startTransition=function(N){var j=V.T,B={};V.T=B;try{var P=N(),te=V.S;te!==null&&te(B,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then($,O)}catch(ne){O(ne)}finally{j!==null&&B.types!==null&&(j.types=B.types),V.T=j}},je.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},je.use=function(N){return V.H.use(N)},je.useActionState=function(N,j,B){return V.H.useActionState(N,j,B)},je.useCallback=function(N,j){return V.H.useCallback(N,j)},je.useContext=function(N){return V.H.useContext(N)},je.useDebugValue=function(){},je.useDeferredValue=function(N,j){return V.H.useDeferredValue(N,j)},je.useEffect=function(N,j){return V.H.useEffect(N,j)},je.useEffectEvent=function(N){return V.H.useEffectEvent(N)},je.useId=function(){return V.H.useId()},je.useImperativeHandle=function(N,j,B){return V.H.useImperativeHandle(N,j,B)},je.useInsertionEffect=function(N,j){return V.H.useInsertionEffect(N,j)},je.useLayoutEffect=function(N,j){return V.H.useLayoutEffect(N,j)},je.useMemo=function(N,j){return V.H.useMemo(N,j)},je.useOptimistic=function(N,j){return V.H.useOptimistic(N,j)},je.useReducer=function(N,j,B){return V.H.useReducer(N,j,B)},je.useRef=function(N){return V.H.useRef(N)},je.useState=function(N){return V.H.useState(N)},je.useSyncExternalStore=function(N,j,B){return V.H.useSyncExternalStore(N,j,B)},je.useTransition=function(){return V.H.useTransition()},je.version="19.2.5",je}var qy;function pm(){return qy||(qy=1,ed.exports=N2()),ed.exports}var v=pm();const pe=hm(v),wv=A2({__proto__:null,default:pe},[v]);var td={exports:{}},Jl={},nd={exports:{}},ad={};/**
|
|
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 Vy;function R2(){return Vy||(Vy=1,(function(n){function r(S,_){var D=S.length;S.push(_);e:for(;0<D;){var O=D-1>>>1,I=S[O];if(0<s(I,_))S[O]=_,S[D]=I,D=O;else break e}}function o(S){return S.length===0?null:S[0]}function i(S){if(S.length===0)return null;var _=S[0],D=S.pop();if(D!==_){S[0]=D;e:for(var O=0,I=S.length,N=I>>>1;O<N;){var j=2*(O+1)-1,B=S[j],P=j+1,te=S[P];if(0>s(B,D))P<I&&0>s(te,B)?(S[O]=te,S[P]=D,O=P):(S[O]=B,S[j]=D,O=j);else if(P<I&&0>s(te,D))S[O]=te,S[P]=D,O=P;else break e}}return _}function s(S,_){var D=S.sortIndex-_.sortIndex;return D!==0?D:S.id-_.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var h=[],g=[],x=1,y=null,w=3,T=!1,C=!1,A=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function Y(S){for(var _=o(g);_!==null;){if(_.callback===null)i(g);else if(_.startTime<=S)i(g),_.sortIndex=_.expirationTime,r(h,_);else break;_=o(g)}}function J(S){if(A=!1,Y(S),!C)if(o(h)!==null)C=!0,$||($=!0,q());else{var _=o(g);_!==null&&he(J,_.startTime-S)}}var $=!1,V=-1,k=5,K=-1;function ie(){return M?!0:!(n.unstable_now()-K<k)}function se(){if(M=!1,$){var S=n.unstable_now();K=S;var _=!0;try{e:{C=!1,A&&(A=!1,z(V),V=-1),T=!0;var D=w;try{t:{for(Y(S),y=o(h);y!==null&&!(y.expirationTime>S&&ie());){var O=y.callback;if(typeof O=="function"){y.callback=null,w=y.priorityLevel;var I=O(y.expirationTime<=S);if(S=n.unstable_now(),typeof I=="function"){y.callback=I,Y(S),_=!0;break t}y===o(h)&&i(h),Y(S)}else i(h);y=o(h)}if(y!==null)_=!0;else{var N=o(g);N!==null&&he(J,N.startTime-S),_=!1}}break e}finally{y=null,w=D,T=!1}_=void 0}}finally{_?q():$=!1}}}var q;if(typeof H=="function")q=function(){H(se)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,de=ue.port2;ue.port1.onmessage=se,q=function(){de.postMessage(null)}}else q=function(){R(se,0)};function he(S,_){V=R(function(){S(n.unstable_now())},_)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(S){S.callback=null},n.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<S?Math.floor(1e3/S):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(S){switch(w){case 1:case 2:case 3:var _=3;break;default:_=w}var D=w;w=_;try{return S()}finally{w=D}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(S,_){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var D=w;w=S;try{return _()}finally{w=D}},n.unstable_scheduleCallback=function(S,_,D){var O=n.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?O+D:O):D=O,S){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=D+I,S={id:x++,callback:_,priorityLevel:S,startTime:D,expirationTime:I,sortIndex:-1},D>O?(S.sortIndex=D,r(g,S),o(h)===null&&S===o(g)&&(A?(z(V),V=-1):A=!0,he(J,D-O))):(S.sortIndex=I,r(h,S),C||T||(C=!0,$||($=!0,q()))),S},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(S){var _=w;return function(){var D=w;w=_;try{return S.apply(this,arguments)}finally{w=D}}}})(ad)),ad}var Xy;function O2(){return Xy||(Xy=1,nd.exports=R2()),nd.exports}var rd={exports:{}},Zt={};/**
|
|
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 Fy;function D2(){if(Fy)return Zt;Fy=1;var n=pm();function r(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,g,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:h,containerInfo:g,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Zt.createPortal=function(h,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return u(h,g,null,x)},Zt.flushSync=function(h){var g=d.T,x=i.p;try{if(d.T=null,i.p=2,h)return h()}finally{d.T=g,i.p=x,i.d.f()}},Zt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(h,g))},Zt.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Zt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var x=g.as,y=m(x,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?i.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:w,fetchPriority:T}):x==="script"&&i.d.X(h,{crossOrigin:y,integrity:w,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Zt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);i.d.M(h,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(h)},Zt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,y=m(x,g.crossOrigin);i.d.L(h,x,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Zt.preloadModule=function(h,g){if(typeof h=="string")if(g){var x=m(g.as,g.crossOrigin);i.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(h)},Zt.requestFormReset=function(h){i.d.r(h)},Zt.unstable_batchedUpdates=function(h,g){return h(g)},Zt.useFormState=function(h,g,x){return d.H.useFormState(h,g,x)},Zt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Zt.version="19.2.5",Zt}var Ky;function Ev(){if(Ky)return rd.exports;Ky=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),rd.exports=D2(),rd.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 Qy;function j2(){if(Qy)return Jl;Qy=1;var n=O2(),r=pm(),o=Ev();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(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 m(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 h(e){if(u(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return h(c),e;if(f===l)return h(c),t;f=f.sibling}throw Error(i(188))}if(a.return!==l.return)a=c,l=f;else{for(var b=!1,E=c.child;E;){if(E===a){b=!0,a=c,l=f;break}if(E===l){b=!0,l=c,a=f;break}E=E.sibling}if(!b){for(E=f.child;E;){if(E===a){b=!0,a=f,l=c;break}if(E===l){b=!0,l=f,a=c;break}E=E.sibling}if(!b)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,w=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),H=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function de(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case R:return"Profiler";case M:return"StrictMode";case J:return"Suspense";case $:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case H:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:de(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var he=Array.isArray,S=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D={pending:!1,data:null,method:null,action:null},O=[],I=-1;function N(e){return{current:e}}function j(e){0>I||(e.current=O[I],O[I]=null,I--)}function B(e,t){I++,O[I]=e.current,e.current=t}var P=N(null),te=N(null),ne=N(null),ae=N(null);function Z(e,t){switch(B(ne,t),B(te,e),B(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fy(t),e=dy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(P),B(P,e)}function oe(){j(P),j(te),j(ne)}function Se(e){e.memoizedState!==null&&B(ae,e);var t=P.current,a=dy(t,e.type);t!==a&&(B(te,e),B(P,a))}function Te(e){te.current===e&&(j(P),j(te)),ae.current===e&&(j(ae),Fl._currentValue=D)}var we,ke;function ge(e){if(we===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||"",ke=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+we+e+ke}var ct=!1;function ht(e,t){if(!e||ct)return"";ct=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ee){var W=ee}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ee){W=ee}e.call(ce.prototype)}}else{try{throw Error()}catch(ee){W=ee}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],E=f[1];if(b&&E){var L=b.split(`
|
|
44
|
+
`),F=E.split(`
|
|
45
|
+
`);for(c=l=0;l<L.length&&!L[l].includes("DetermineComponentFrameRoot");)l++;for(;c<F.length&&!F[c].includes("DetermineComponentFrameRoot");)c++;if(l===L.length||c===F.length)for(l=L.length-1,c=F.length-1;1<=l&&0<=c&&L[l]!==F[c];)c--;for(;1<=l&&0<=c;l--,c--)if(L[l]!==F[c]){if(l!==1||c!==1)do if(l--,c--,0>c||L[l]!==F[c]){var re=`
|
|
46
|
+
`+L[l].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=l&&0<=c);break}}}finally{ct=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ge(a):""}function vt(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge("Lazy");case 13:return e.child!==t&&t!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return ht(e.type,!1);case 11:return ht(e.type.render,!1);case 1:return ht(e.type,!0);case 31:return ge("Activity");default:return""}}function Xt(e){try{var t="",a=null;do t+=vt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var Me=Object.prototype.hasOwnProperty,Ne=n.unstable_scheduleCallback,tn=n.unstable_cancelCallback,pt=n.unstable_shouldYield,Ht=n.unstable_requestPaint,jt=n.unstable_now,jr=n.unstable_getCurrentPriorityLevel,At=n.unstable_ImmediatePriority,Mt=n.unstable_UserBlockingPriority,$n=n.unstable_NormalPriority,ea=n.unstable_LowPriority,nn=n.unstable_IdlePriority,da=n.log,Bt=n.unstable_setDisableYieldValue,pn=null,Pt=null;function gn(e){if(typeof da=="function"&&Bt(e),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(pn,e)}catch{}}var zt=Math.clz32?Math.clz32:Mn,so=Math.log,ma=Math.LN2;function Mn(e){return e>>>=0,e===0?32:31-(so(e)/ma|0)|0}var Pa=256,$a=262144,ha=4194304;function _n(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&261888;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 De(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var E=l&134217727;return E!==0?(l=E&~f,l!==0?c=_n(l):(b&=E,b!==0?c=_n(b):a||(a=E&~e,a!==0&&(c=_n(a))))):(E=l&~f,E!==0?c=_n(E):b!==0?c=_n(b):a||(a=l&~e,a!==0&&(c=_n(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _t(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 Ut(){var e=ha;return ha<<=1,(ha&62914560)===0&&(ha=4194304),e}function Gn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ft(e,t,a,l,c,f){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,L=e.expirationTimes,F=e.hiddenUpdates;for(a=b&~a;0<a;){var re=31-zt(a),ce=1<<re;E[re]=0,L[re]=-1;var W=F[re];if(W!==null)for(F[re]=null,re=0;re<W.length;re++){var ee=W[re];ee!==null&&(ee.lane&=-536870913)}a&=~ce}l!==0&&pa(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function pa(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-zt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Kt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-zt(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function Q(e,t){var a=t&-t;return a=(a&42)!==0?1:fe(a),(a&(e.suspendedLanes|t))!==0?0:a}function fe(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 me(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ce(){var e=_.p;return e!==0?e:(e=window.event,e===void 0?32:ky(e.type))}function Xe(e,t){var a=_.p;try{return _.p=e,t()}finally{_.p=a}}var Be=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Be,He="__reactProps$"+Be,We="__reactContainer$"+Be,Qt="__reactEvents$"+Be,st="__reactListeners$"+Be,an="__reactHandles$"+Be,rn="__reactResources$"+Be,gt="__reactMarker$"+Be;function Yn(e){delete e[Ue],delete e[He],delete e[Qt],delete e[st],delete e[an]}function yt(e){var t=e[Ue];if(t)return t;for(var a=e.parentNode;a;){if(t=a[We]||a[Ue]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=by(e);e!==null;){if(a=e[Ue])return a;e=by(e)}return t}e=a,a=e.parentNode}return null}function on(e){if(e=e[Ue]||e[We]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ga(e){var t=e[rn];return t||(t=e[rn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[gt]=!0}var zr=new Set,co={};function ga(e,t){uo(e,t),uo(e+"Capture",t)}function uo(e,t){for(co[e]=t,e=0;e<t.length;e++)zr.add(t[e])}var yS=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]*$"),th={},nh={};function vS(e){return Me.call(nh,e)?!0:Me.call(th,e)?!1:yS.test(e)?nh[e]=!0:(th[e]=!0,!1)}function Ti(e,t,a){if(vS(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ai(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ya(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Rn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ah(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bS(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){a=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qc(e){if(!e._valueTracker){var t=ah(e)?"checked":"value";e._valueTracker=bS(e,t,""+e[t])}}function rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=ah(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Mi(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}}var xS=/[\n"\\]/g;function On(e){return e.replace(xS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Vc(e,t,a,l,c,f,b,E){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Rn(t)):e.value!==""+Rn(t)&&(e.value=""+Rn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?Xc(e,b,Rn(t)):a!=null?Xc(e,b,Rn(a)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Rn(E):e.removeAttribute("name")}function oh(e,t,a,l,c,f,b,E){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){qc(e);return}a=a!=null?""+Rn(a):"",t=t!=null?""+Rn(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=E?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),qc(e)}function Xc(e,t,a){t==="number"&&Mi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function fo(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Rn(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function lh(e,t,a){if(t!=null&&(t=""+Rn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Rn(a):""}function ih(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(i(92));if(he(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Rn(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),qc(e)}function mo(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var SS=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 sh(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||SS.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function ch(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&sh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&sh(e,f,t[f])}function Fc(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 wS=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"],["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"]]),ES=/^[\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 _i(e){return ES.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function va(){}var Kc=null;function Qc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ho=null,po=null;function uh(e){var t=on(e);if(t&&(e=t.stateNode)){var a=e[He]||null;e:switch(e=t.stateNode,t.type){case"input":if(Vc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+On(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[He]||null;if(!c)throw Error(i(90));Vc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&rh(l)}break e;case"textarea":lh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&fo(e,!!a.multiple,t,!1)}}}var Zc=!1;function fh(e,t,a){if(Zc)return e(t,a);Zc=!0;try{var l=e(t);return l}finally{if(Zc=!1,(ho!==null||po!==null)&&(ps(),ho&&(t=ho,e=po,po=ho=null,uh(t),e)))for(t=0;t<e.length;t++)uh(e[t])}}function fl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[He]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var ba=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wc=!1;if(ba)try{var dl={};Object.defineProperty(dl,"passive",{get:function(){Wc=!0}}),window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{Wc=!1}var Ya=null,Jc=null,Ni=null;function dh(){if(Ni)return Ni;var e,t=Jc,a=t.length,l,c="value"in Ya?Ya.value:Ya.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var b=a-e;for(l=1;l<=b&&t[a-l]===c[f-l];l++);return Ni=c.slice(e,1<l?1-l:void 0)}function Ri(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 Oi(){return!0}function mh(){return!1}function ln(e){function t(a,l,c,f,b){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(f):f[E]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Oi:mh,this.isPropagationStopped=mh,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Oi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Oi)},persist:function(){},isPersistent:Oi}),t}var kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Di=ln(kr),ml=y({},kr,{view:0,detail:0}),CS=ln(ml),eu,tu,hl,ji=y({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:au,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!==hl&&(hl&&e.type==="mousemove"?(eu=e.screenX-hl.screenX,tu=e.screenY-hl.screenY):tu=eu=0,hl=e),eu)},movementY:function(e){return"movementY"in e?e.movementY:tu}}),hh=ln(ji),TS=y({},ji,{dataTransfer:0}),AS=ln(TS),MS=y({},ml,{relatedTarget:0}),nu=ln(MS),_S=y({},kr,{animationName:0,elapsedTime:0,pseudoElement:0}),NS=ln(_S),RS=y({},kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),OS=ln(RS),DS=y({},kr,{data:0}),ph=ln(DS),jS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zS={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"},kS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kS[e])?!!t[e]:!1}function au(){return LS}var HS=y({},ml,{key:function(e){if(e.key){var t=jS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ri(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:au,charCode:function(e){return e.type==="keypress"?Ri(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ri(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),BS=ln(HS),US=y({},ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gh=ln(US),IS=y({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:au}),PS=ln(IS),$S=y({},kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),GS=ln($S),YS=y({},ji,{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}),qS=ln(YS),VS=y({},kr,{newState:0,oldState:0}),XS=ln(VS),FS=[9,13,27,32],ru=ba&&"CompositionEvent"in window,pl=null;ba&&"documentMode"in document&&(pl=document.documentMode);var KS=ba&&"TextEvent"in window&&!pl,yh=ba&&(!ru||pl&&8<pl&&11>=pl),vh=" ",bh=!1;function xh(e,t){switch(e){case"keyup":return FS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var go=!1;function QS(e,t){switch(e){case"compositionend":return Sh(t);case"keypress":return t.which!==32?null:(bh=!0,vh);case"textInput":return e=t.data,e===vh&&bh?null:e;default:return null}}function ZS(e,t){if(go)return e==="compositionend"||!ru&&xh(e,t)?(e=dh(),Ni=Jc=Ya=null,go=!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 yh&&t.locale!=="ko"?null:t.data;default:return null}}var WS={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 wh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!WS[e.type]:t==="textarea"}function Eh(e,t,a,l){ho?po?po.push(l):po=[l]:ho=l,t=ws(t,"onChange"),0<t.length&&(a=new Di("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var gl=null,yl=null;function JS(e){oy(e,0)}function zi(e){var t=Nn(e);if(rh(t))return e}function Ch(e,t){if(e==="change")return t}var Th=!1;if(ba){var ou;if(ba){var lu="oninput"in document;if(!lu){var Ah=document.createElement("div");Ah.setAttribute("oninput","return;"),lu=typeof Ah.oninput=="function"}ou=lu}else ou=!1;Th=ou&&(!document.documentMode||9<document.documentMode)}function Mh(){gl&&(gl.detachEvent("onpropertychange",_h),yl=gl=null)}function _h(e){if(e.propertyName==="value"&&zi(yl)){var t=[];Eh(t,yl,e,Qc(e)),fh(JS,t)}}function ew(e,t,a){e==="focusin"?(Mh(),gl=t,yl=a,gl.attachEvent("onpropertychange",_h)):e==="focusout"&&Mh()}function tw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zi(yl)}function nw(e,t){if(e==="click")return zi(t)}function aw(e,t){if(e==="input"||e==="change")return zi(t)}function rw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yn=typeof Object.is=="function"?Object.is:rw;function vl(e,t){if(yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!Me.call(t,c)||!yn(e[c],t[c]))return!1}return!0}function Nh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rh(e,t){var a=Nh(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Nh(a)}}function Oh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Oh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mi(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Mi(e.document)}return t}function iu(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 ow=ba&&"documentMode"in document&&11>=document.documentMode,yo=null,su=null,bl=null,cu=!1;function jh(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;cu||yo==null||yo!==Mi(l)||(l=yo,"selectionStart"in l&&iu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),bl&&vl(bl,l)||(bl=l,l=ws(su,"onSelect"),0<l.length&&(t=new Di("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=yo)))}function Lr(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var vo={animationend:Lr("Animation","AnimationEnd"),animationiteration:Lr("Animation","AnimationIteration"),animationstart:Lr("Animation","AnimationStart"),transitionrun:Lr("Transition","TransitionRun"),transitionstart:Lr("Transition","TransitionStart"),transitioncancel:Lr("Transition","TransitionCancel"),transitionend:Lr("Transition","TransitionEnd")},uu={},zh={};ba&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function Hr(e){if(uu[e])return uu[e];if(!vo[e])return e;var t=vo[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in zh)return uu[e]=t[a];return e}var kh=Hr("animationend"),Lh=Hr("animationiteration"),Hh=Hr("animationstart"),lw=Hr("transitionrun"),iw=Hr("transitionstart"),sw=Hr("transitioncancel"),Bh=Hr("transitionend"),Uh=new Map,fu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");fu.push("scrollEnd");function qn(e,t){Uh.set(e,t),ga(t,[e])}var ki=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)},Dn=[],bo=0,du=0;function Li(){for(var e=bo,t=du=bo=0;t<e;){var a=Dn[t];Dn[t++]=null;var l=Dn[t];Dn[t++]=null;var c=Dn[t];Dn[t++]=null;var f=Dn[t];if(Dn[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&Ih(a,c,f)}}function Hi(e,t,a,l){Dn[bo++]=e,Dn[bo++]=t,Dn[bo++]=a,Dn[bo++]=l,du|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function mu(e,t,a,l){return Hi(e,t,a,l),Bi(e)}function Br(e,t){return Hi(e,null,null,t),Bi(e)}function Ih(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-zt(a),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),f):null}function Bi(e){if(50<Pl)throw Pl=0,Ef=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xo={};function cw(e,t,a,l){this.tag=e,this.key=a,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,a,l){return new cw(e,t,a,l)}function hu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xa(e,t){var a=e.alternate;return a===null?(a=vn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ph(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ui(e,t,a,l,c,f){var b=0;if(l=e,typeof e=="function")hu(e)&&(b=1);else if(typeof e=="string")b=h2(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=vn(31,a,t,c),e.elementType=K,e.lanes=f,e;case A:return Ur(a.children,c,f,t);case M:b=8,c|=24;break;case R:return e=vn(12,a,t,c|2),e.elementType=R,e.lanes=f,e;case J:return e=vn(13,a,t,c),e.elementType=J,e.lanes=f,e;case $:return e=vn(19,a,t,c),e.elementType=$,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:b=10;break e;case z:b=9;break e;case Y:b=11;break e;case V:b=14;break e;case k:b=16,l=null;break e}b=29,a=Error(i(130,e===null?"null":typeof e,"")),l=null}return t=vn(b,a,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function Ur(e,t,a,l){return e=vn(7,e,l,t),e.lanes=a,e}function pu(e,t,a){return e=vn(6,e,null,t),e.lanes=a,e}function $h(e){var t=vn(18,null,null,0);return t.stateNode=e,t}function gu(e,t,a){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gh=new WeakMap;function jn(e,t){if(typeof e=="object"&&e!==null){var a=Gh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Xt(t)},Gh.set(e,t),t)}return{value:e,source:t,stack:Xt(t)}}var So=[],wo=0,Ii=null,xl=0,zn=[],kn=0,qa=null,ta=1,na="";function Sa(e,t){So[wo++]=xl,So[wo++]=Ii,Ii=e,xl=t}function Yh(e,t,a){zn[kn++]=ta,zn[kn++]=na,zn[kn++]=qa,qa=e;var l=ta;e=na;var c=32-zt(l)-1;l&=~(1<<c),a+=1;var f=32-zt(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,ta=1<<32-zt(t)+c|a<<c|l,na=f+e}else ta=1<<f|a<<c|l,na=e}function yu(e){e.return!==null&&(Sa(e,1),Yh(e,1,0))}function vu(e){for(;e===Ii;)Ii=So[--wo],So[wo]=null,xl=So[--wo],So[wo]=null;for(;e===qa;)qa=zn[--kn],zn[kn]=null,na=zn[--kn],zn[kn]=null,ta=zn[--kn],zn[kn]=null}function qh(e,t){zn[kn++]=ta,zn[kn++]=na,zn[kn++]=qa,ta=t.id,na=t.overflow,qa=e}var $t=null,ft=null,Fe=!1,Va=null,Ln=!1,bu=Error(i(519));function Xa(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Sl(jn(t,e)),bu}function Vh(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Ue]=e,t[He]=l,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<Gl.length;a++)Ye(Gl[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),oh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),ih(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||cy(t.textContent,a)?(l.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),l.onScroll!=null&&Ye("scroll",t),l.onScrollEnd!=null&&Ye("scrollend",t),l.onClick!=null&&(t.onclick=va),t=!0):t=!1,t||Xa(e,!0)}function Xh(e){for($t=e.return;$t;)switch($t.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:$t=$t.return}}function Eo(e){if(e!==$t)return!1;if(!Fe)return Xh(e),Fe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Bf(e.type,e.memoizedProps)),a=!a),a&&ft&&Xa(e),Xh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ft=vy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ft=vy(e)}else t===27?(t=ft,ir(e.type)?(e=Gf,Gf=null,ft=e):ft=t):ft=$t?Bn(e.stateNode.nextSibling):null;return!0}function Ir(){ft=$t=null,Fe=!1}function xu(){var e=Va;return e!==null&&(fn===null?fn=e:fn.push.apply(fn,e),Va=null),e}function Sl(e){Va===null?Va=[e]:Va.push(e)}var Su=N(null),Pr=null,wa=null;function Fa(e,t,a){B(Su,t._currentValue),t._currentValue=a}function Ea(e){e._currentValue=Su.current,j(Su)}function wu(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Eu(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;e:for(;f!==null;){var E=f;f=c;for(var L=0;L<t.length;L++)if(E.context===t[L]){f.lanes|=a,E=f.alternate,E!==null&&(E.lanes|=a),wu(f.return,a,e),l||(b=null);break e}f=E.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(i(341));b.lanes|=a,f=b.alternate,f!==null&&(f.lanes|=a),wu(b,a,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Co(e,t,a,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var E=c.type;yn(c.pendingProps.value,b.value)||(e!==null?e.push(E):e=[E])}}else if(c===ae.current){if(b=c.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Fl):e=[Fl])}c=c.return}e!==null&&Eu(t,e,a,l),t.flags|=262144}function Pi(e){for(e=e.firstContext;e!==null;){if(!yn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $r(e){Pr=e,wa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return Fh(Pr,e)}function $i(e,t){return Pr===null&&$r(e),Fh(e,t)}function Fh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},wa===null){if(e===null)throw Error(i(308));wa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wa=wa.next=t;return a}var uw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},fw=n.unstable_scheduleCallback,dw=n.unstable_NormalPriority,Nt={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new uw,data:new Map,refCount:0}}function wl(e){e.refCount--,e.refCount===0&&fw(dw,function(){e.controller.abort()})}var El=null,Tu=0,To=0,Ao=null;function mw(e,t){if(El===null){var a=El=[];Tu=0,To=Nf(),Ao={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Tu++,t.then(Kh,Kh),t}function Kh(){if(--Tu===0&&El!==null){Ao!==null&&(Ao.status="fulfilled");var e=El;El=null,To=0,Ao=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hw(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var Qh=S.S;S.S=function(e,t){jg=jt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&mw(e,t),Qh!==null&&Qh(e,t)};var Gr=N(null);function Au(){var e=Gr.current;return e!==null?e:lt.pooledCache}function Gi(e,t){t===null?B(Gr,Gr.current):B(Gr,t.pool)}function Zh(){var e=Au();return e===null?null:{parent:Nt._currentValue,pool:e}}var Mo=Error(i(460)),Mu=Error(i(474)),Yi=Error(i(542)),qi={then:function(){}};function Wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(va,va),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tp(e),e;default:if(typeof t.status=="string")t.then(va,va);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tp(e),e}throw qr=t,Mo}}function Yr(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(qr=a,Mo):a}}var qr=null;function ep(){if(qr===null)throw Error(i(459));var e=qr;return qr=null,e}function tp(e){if(e===Mo||e===Yi)throw Error(i(483))}var _o=null,Cl=0;function Vi(e){var t=Cl;return Cl+=1,_o===null&&(_o=[]),Jh(_o,e,t)}function Tl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xi(e,t){throw t.$$typeof===w?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function np(e){function t(G,U){if(e){var X=G.deletions;X===null?(G.deletions=[U],G.flags|=16):X.push(U)}}function a(G,U){if(!e)return null;for(;U!==null;)t(G,U),U=U.sibling;return null}function l(G){for(var U=new Map;G!==null;)G.key!==null?U.set(G.key,G):U.set(G.index,G),G=G.sibling;return U}function c(G,U){return G=xa(G,U),G.index=0,G.sibling=null,G}function f(G,U,X){return G.index=X,e?(X=G.alternate,X!==null?(X=X.index,X<U?(G.flags|=67108866,U):X):(G.flags|=67108866,U)):(G.flags|=1048576,U)}function b(G){return e&&G.alternate===null&&(G.flags|=67108866),G}function E(G,U,X,le){return U===null||U.tag!==6?(U=pu(X,G.mode,le),U.return=G,U):(U=c(U,X),U.return=G,U)}function L(G,U,X,le){var _e=X.type;return _e===A?re(G,U,X.props.children,le,X.key):U!==null&&(U.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===k&&Yr(_e)===U.type)?(U=c(U,X.props),Tl(U,X),U.return=G,U):(U=Ui(X.type,X.key,X.props,null,G.mode,le),Tl(U,X),U.return=G,U)}function F(G,U,X,le){return U===null||U.tag!==4||U.stateNode.containerInfo!==X.containerInfo||U.stateNode.implementation!==X.implementation?(U=gu(X,G.mode,le),U.return=G,U):(U=c(U,X.children||[]),U.return=G,U)}function re(G,U,X,le,_e){return U===null||U.tag!==7?(U=Ur(X,G.mode,le,_e),U.return=G,U):(U=c(U,X),U.return=G,U)}function ce(G,U,X){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=pu(""+U,G.mode,X),U.return=G,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case T:return X=Ui(U.type,U.key,U.props,null,G.mode,X),Tl(X,U),X.return=G,X;case C:return U=gu(U,G.mode,X),U.return=G,U;case k:return U=Yr(U),ce(G,U,X)}if(he(U)||q(U))return U=Ur(U,G.mode,X,null),U.return=G,U;if(typeof U.then=="function")return ce(G,Vi(U),X);if(U.$$typeof===H)return ce(G,$i(G,U),X);Xi(G,U)}return null}function W(G,U,X,le){var _e=U!==null?U.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return _e!==null?null:E(G,U,""+X,le);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case T:return X.key===_e?L(G,U,X,le):null;case C:return X.key===_e?F(G,U,X,le):null;case k:return X=Yr(X),W(G,U,X,le)}if(he(X)||q(X))return _e!==null?null:re(G,U,X,le,null);if(typeof X.then=="function")return W(G,U,Vi(X),le);if(X.$$typeof===H)return W(G,U,$i(G,X),le);Xi(G,X)}return null}function ee(G,U,X,le,_e){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return G=G.get(X)||null,E(U,G,""+le,_e);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case T:return G=G.get(le.key===null?X:le.key)||null,L(U,G,le,_e);case C:return G=G.get(le.key===null?X:le.key)||null,F(U,G,le,_e);case k:return le=Yr(le),ee(G,U,X,le,_e)}if(he(le)||q(le))return G=G.get(X)||null,re(U,G,le,_e,null);if(typeof le.then=="function")return ee(G,U,X,Vi(le),_e);if(le.$$typeof===H)return ee(G,U,X,$i(U,le),_e);Xi(U,le)}return null}function ve(G,U,X,le){for(var _e=null,Qe=null,Ae=U,Le=U=0,Ve=null;Ae!==null&&Le<X.length;Le++){Ae.index>Le?(Ve=Ae,Ae=null):Ve=Ae.sibling;var Ze=W(G,Ae,X[Le],le);if(Ze===null){Ae===null&&(Ae=Ve);break}e&&Ae&&Ze.alternate===null&&t(G,Ae),U=f(Ze,U,Le),Qe===null?_e=Ze:Qe.sibling=Ze,Qe=Ze,Ae=Ve}if(Le===X.length)return a(G,Ae),Fe&&Sa(G,Le),_e;if(Ae===null){for(;Le<X.length;Le++)Ae=ce(G,X[Le],le),Ae!==null&&(U=f(Ae,U,Le),Qe===null?_e=Ae:Qe.sibling=Ae,Qe=Ae);return Fe&&Sa(G,Le),_e}for(Ae=l(Ae);Le<X.length;Le++)Ve=ee(Ae,G,Le,X[Le],le),Ve!==null&&(e&&Ve.alternate!==null&&Ae.delete(Ve.key===null?Le:Ve.key),U=f(Ve,U,Le),Qe===null?_e=Ve:Qe.sibling=Ve,Qe=Ve);return e&&Ae.forEach(function(dr){return t(G,dr)}),Fe&&Sa(G,Le),_e}function Oe(G,U,X,le){if(X==null)throw Error(i(151));for(var _e=null,Qe=null,Ae=U,Le=U=0,Ve=null,Ze=X.next();Ae!==null&&!Ze.done;Le++,Ze=X.next()){Ae.index>Le?(Ve=Ae,Ae=null):Ve=Ae.sibling;var dr=W(G,Ae,Ze.value,le);if(dr===null){Ae===null&&(Ae=Ve);break}e&&Ae&&dr.alternate===null&&t(G,Ae),U=f(dr,U,Le),Qe===null?_e=dr:Qe.sibling=dr,Qe=dr,Ae=Ve}if(Ze.done)return a(G,Ae),Fe&&Sa(G,Le),_e;if(Ae===null){for(;!Ze.done;Le++,Ze=X.next())Ze=ce(G,Ze.value,le),Ze!==null&&(U=f(Ze,U,Le),Qe===null?_e=Ze:Qe.sibling=Ze,Qe=Ze);return Fe&&Sa(G,Le),_e}for(Ae=l(Ae);!Ze.done;Le++,Ze=X.next())Ze=ee(Ae,G,Le,Ze.value,le),Ze!==null&&(e&&Ze.alternate!==null&&Ae.delete(Ze.key===null?Le:Ze.key),U=f(Ze,U,Le),Qe===null?_e=Ze:Qe.sibling=Ze,Qe=Ze);return e&&Ae.forEach(function(T2){return t(G,T2)}),Fe&&Sa(G,Le),_e}function ot(G,U,X,le){if(typeof X=="object"&&X!==null&&X.type===A&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case T:e:{for(var _e=X.key;U!==null;){if(U.key===_e){if(_e=X.type,_e===A){if(U.tag===7){a(G,U.sibling),le=c(U,X.props.children),le.return=G,G=le;break e}}else if(U.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===k&&Yr(_e)===U.type){a(G,U.sibling),le=c(U,X.props),Tl(le,X),le.return=G,G=le;break e}a(G,U);break}else t(G,U);U=U.sibling}X.type===A?(le=Ur(X.props.children,G.mode,le,X.key),le.return=G,G=le):(le=Ui(X.type,X.key,X.props,null,G.mode,le),Tl(le,X),le.return=G,G=le)}return b(G);case C:e:{for(_e=X.key;U!==null;){if(U.key===_e)if(U.tag===4&&U.stateNode.containerInfo===X.containerInfo&&U.stateNode.implementation===X.implementation){a(G,U.sibling),le=c(U,X.children||[]),le.return=G,G=le;break e}else{a(G,U);break}else t(G,U);U=U.sibling}le=gu(X,G.mode,le),le.return=G,G=le}return b(G);case k:return X=Yr(X),ot(G,U,X,le)}if(he(X))return ve(G,U,X,le);if(q(X)){if(_e=q(X),typeof _e!="function")throw Error(i(150));return X=_e.call(X),Oe(G,U,X,le)}if(typeof X.then=="function")return ot(G,U,Vi(X),le);if(X.$$typeof===H)return ot(G,U,$i(G,X),le);Xi(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,U!==null&&U.tag===6?(a(G,U.sibling),le=c(U,X),le.return=G,G=le):(a(G,U),le=pu(X,G.mode,le),le.return=G,G=le),b(G)):a(G,U)}return function(G,U,X,le){try{Cl=0;var _e=ot(G,U,X,le);return _o=null,_e}catch(Ae){if(Ae===Mo||Ae===Yi)throw Ae;var Qe=vn(29,Ae,null,G.mode);return Qe.lanes=le,Qe.return=G,Qe}finally{}}}var Vr=np(!0),ap=np(!1),Ka=!1;function _u(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nu(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 Qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Je&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Bi(e),Ih(e,null,a),t}return Hi(e,l,t,a),Bi(e)}function Al(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Kt(e,a)}}function Ru(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ou=!1;function Ml(){if(Ou){var e=Ao;if(e!==null)throw e}}function _l(e,t,a,l){Ou=!1;var c=e.updateQueue;Ka=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var L=E,F=L.next;L.next=null,b===null?f=F:b.next=F,b=L;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==b&&(E===null?re.firstBaseUpdate=F:E.next=F,re.lastBaseUpdate=L))}if(f!==null){var ce=c.baseState;b=0,re=F=L=null,E=f;do{var W=E.lane&-536870913,ee=W!==E.lane;if(ee?(qe&W)===W:(l&W)===W){W!==0&&W===To&&(Ou=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ve=e,Oe=E;W=t;var ot=a;switch(Oe.tag){case 1:if(ve=Oe.payload,typeof ve=="function"){ce=ve.call(ot,ce,W);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Oe.payload,W=typeof ve=="function"?ve.call(ot,ce,W):ve,W==null)break e;ce=y({},ce,W);break e;case 2:Ka=!0}}W=E.callback,W!==null&&(e.flags|=64,ee&&(e.flags|=8192),ee=c.callbacks,ee===null?c.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(F=re=ee,L=ce):re=re.next=ee,b|=W;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;ee=E,E=ee.next,ee.next=null,c.lastBaseUpdate=ee,c.shared.pending=null}}while(!0);re===null&&(L=ce),c.baseState=L,c.firstBaseUpdate=F,c.lastBaseUpdate=re,f===null&&(c.shared.lanes=0),nr|=b,e.lanes=b,e.memoizedState=ce}}function rp(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function op(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)rp(a[e],t)}var No=N(null),Fi=N(0);function lp(e,t){e=Da,B(Fi,e),B(No,t),Da=e|t.baseLanes}function Du(){B(Fi,Da),B(No,No.current)}function ju(){Da=Fi.current,j(No),j(Fi)}var bn=N(null),Hn=null;function Wa(e){var t=e.alternate;B(Et,Et.current&1),B(bn,e),Hn===null&&(t===null||No.current!==null||t.memoizedState!==null)&&(Hn=e)}function zu(e){B(Et,Et.current),B(bn,e),Hn===null&&(Hn=e)}function ip(e){e.tag===22?(B(Et,Et.current),B(bn,e),Hn===null&&(Hn=e)):Ja()}function Ja(){B(Et,Et.current),B(bn,bn.current)}function xn(e){j(bn),Hn===e&&(Hn=null),j(Et)}var Et=N(0);function Ki(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Pf(a)||$f(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){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 Ca=0,ze=null,at=null,Rt=null,Qi=!1,Ro=!1,Xr=!1,Zi=0,Nl=0,Oo=null,pw=0;function xt(){throw Error(i(321))}function ku(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!yn(e[a],t[a]))return!1;return!0}function Lu(e,t,a,l,c,f){return Ca=f,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S.H=e===null||e.memoizedState===null?Yp:Zu,Xr=!1,f=a(l,c),Xr=!1,Ro&&(f=cp(t,a,l,c)),sp(e),f}function sp(e){S.H=Dl;var t=at!==null&&at.next!==null;if(Ca=0,Rt=at=ze=null,Qi=!1,Nl=0,Oo=null,t)throw Error(i(300));e===null||Ot||(e=e.dependencies,e!==null&&Pi(e)&&(Ot=!0))}function cp(e,t,a,l){ze=e;var c=0;do{if(Ro&&(Oo=null),Nl=0,Ro=!1,25<=c)throw Error(i(301));if(c+=1,Rt=at=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}S.H=qp,f=t(a,l)}while(Ro);return f}function gw(){var e=S.H,t=e.useState()[0];return t=typeof t.then=="function"?Rl(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(ze.flags|=1024),t}function Hu(){var e=Zi!==0;return Zi=0,e}function Bu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Uu(e){if(Qi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qi=!1}Ca=0,Rt=at=ze=null,Ro=!1,Nl=Zi=0,Oo=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?ze.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function Ct(){if(at===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Rt===null?ze.memoizedState:Rt.next;if(t!==null)Rt=t,at=e;else{if(e===null)throw ze.alternate===null?Error(i(467)):Error(i(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Rt===null?ze.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function Wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rl(e){var t=Nl;return Nl+=1,Oo===null&&(Oo=[]),e=Jh(Oo,e,t),t=ze,(Rt===null?t.memoizedState:Rt.next)===null&&(t=t.alternate,S.H=t===null||t.memoizedState===null?Yp:Zu),e}function Ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rl(e);if(e.$$typeof===H)return Gt(e)}throw Error(i(438,String(e)))}function Iu(e){var t=null,a=ze.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Wi(),ze.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ie;return t.index++,a}function Ta(e,t){return typeof t=="function"?t(e):t}function es(e){var t=Ct();return Pu(t,at,e)}function Pu(e,t,a){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var E=b=null,L=null,F=t,re=!1;do{var ce=F.lane&-536870913;if(ce!==F.lane?(qe&ce)===ce:(Ca&ce)===ce){var W=F.revertLane;if(W===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ce===To&&(re=!0);else if((Ca&W)===W){F=F.next,W===To&&(re=!0);continue}else ce={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},L===null?(E=L=ce,b=f):L=L.next=ce,ze.lanes|=W,nr|=W;ce=F.action,Xr&&a(f,ce),f=F.hasEagerState?F.eagerState:a(f,ce)}else W={lane:ce,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},L===null?(E=L=W,b=f):L=L.next=W,ze.lanes|=ce,nr|=ce;F=F.next}while(F!==null&&F!==t);if(L===null?b=f:L.next=E,!yn(f,e.memoizedState)&&(Ot=!0,re&&(a=Ao,a!==null)))throw a;e.memoizedState=f,e.baseState=b,e.baseQueue=L,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function $u(e){var t=Ct(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var b=c=c.next;do f=e(f,b.action),b=b.next;while(b!==c);yn(f,t.memoizedState)||(Ot=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,l]}function up(e,t,a){var l=ze,c=Ct(),f=Fe;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var b=!yn((at||c).memoizedState,a);if(b&&(c.memoizedState=a,Ot=!0),c=c.queue,qu(mp.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||Rt!==null&&Rt.memoizedState.tag&1){if(l.flags|=2048,Do(9,{destroy:void 0},dp.bind(null,l,c,a,t),null),lt===null)throw Error(i(349));f||(Ca&127)!==0||fp(l,t,a)}return a}function fp(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ze.updateQueue,t===null?(t=Wi(),ze.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function dp(e,t,a,l){t.value=a,t.getSnapshot=l,hp(t)&&pp(e)}function mp(e,t,a){return a(function(){hp(t)&&pp(e)})}function hp(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!yn(e,a)}catch{return!0}}function pp(e){var t=Br(e,2);t!==null&&dn(t,e,2)}function Gu(e){var t=en();if(typeof e=="function"){var a=e;if(e=a(),Xr){gn(!0);try{a()}finally{gn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t}function gp(e,t,a,l){return e.baseState=a,Pu(e,at,typeof l=="function"?l:Ta)}function yw(e,t,a,l,c){if(as(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};S.T!==null?a(!0):f.isTransition=!1,l(f),a=t.pending,a===null?(f.next=t.pending=f,yp(t,f)):(f.next=a.next,t.pending=a.next=f)}}function yp(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=S.T,b={};S.T=b;try{var E=a(c,l),L=S.S;L!==null&&L(b,E),vp(e,t,E)}catch(F){Yu(e,t,F)}finally{f!==null&&b.types!==null&&(f.types=b.types),S.T=f}}else try{f=a(c,l),vp(e,t,f)}catch(F){Yu(e,t,F)}}function vp(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){bp(e,t,l)},function(l){return Yu(e,t,l)}):bp(e,t,a)}function bp(e,t,a){t.status="fulfilled",t.value=a,xp(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,yp(e,a)))}function Yu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,xp(t),t=t.next;while(t!==l)}e.action=null}function xp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sp(e,t){return t}function wp(e,t){if(Fe){var a=lt.formState;if(a!==null){e:{var l=ze;if(Fe){if(ft){t:{for(var c=ft,f=Ln;c.nodeType!==8;){if(!f){c=null;break t}if(c=Bn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ft=Bn(c.nextSibling),l=c.data==="F!";break e}}Xa(l)}l=!1}l&&(t=a[0])}}return a=en(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sp,lastRenderedState:t},a.queue=l,a=Pp.bind(null,ze,l),l.dispatch=a,l=Gu(!1),f=Qu.bind(null,ze,!1,l.queue),l=en(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=yw.bind(null,ze,c,f,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function Ep(e){var t=Ct();return Cp(t,at,e)}function Cp(e,t,a){if(t=Pu(e,t,Sp)[0],e=es(Ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Rl(t)}catch(b){throw b===Mo?Yi:b}else l=t;t=Ct();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(ze.flags|=2048,Do(9,{destroy:void 0},vw.bind(null,c,a),null)),[l,f,e]}function vw(e,t){e.action=t}function Tp(e){var t=Ct(),a=at;if(a!==null)return Cp(t,a,e);Ct(),t=t.memoizedState,a=Ct();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Do(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=Wi(),ze.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Ap(){return Ct().memoizedState}function ts(e,t,a,l){var c=en();ze.flags|=e,c.memoizedState=Do(1|t,{destroy:void 0},a,l===void 0?null:l)}function ns(e,t,a,l){var c=Ct();l=l===void 0?null:l;var f=c.memoizedState.inst;at!==null&&l!==null&&ku(l,at.memoizedState.deps)?c.memoizedState=Do(t,f,a,l):(ze.flags|=e,c.memoizedState=Do(1|t,f,a,l))}function Mp(e,t){ts(8390656,8,e,t)}function qu(e,t){ns(2048,8,e,t)}function bw(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=Wi(),ze.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function _p(e){var t=Ct().memoizedState;return bw({ref:t,nextImpl:e}),function(){if((Je&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Np(e,t){return ns(4,2,e,t)}function Rp(e,t){return ns(4,4,e,t)}function Op(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Dp(e,t,a){a=a!=null?a.concat([e]):null,ns(4,4,Op.bind(null,t,e),a)}function Vu(){}function jp(e,t){var a=Ct();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&ku(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function zp(e,t){var a=Ct();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&ku(t,l[1]))return l[0];if(l=e(),Xr){gn(!0);try{e()}finally{gn(!1)}}return a.memoizedState=[l,t],l}function Xu(e,t,a){return a===void 0||(Ca&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=kg(),ze.lanes|=e,nr|=e,a)}function kp(e,t,a,l){return yn(a,t)?a:No.current!==null?(e=Xu(e,a,l),yn(e,t)||(Ot=!0),e):(Ca&42)===0||(Ca&1073741824)!==0&&(qe&261930)===0?(Ot=!0,e.memoizedState=a):(e=kg(),ze.lanes|=e,nr|=e,t)}function Lp(e,t,a,l,c){var f=_.p;_.p=f!==0&&8>f?f:8;var b=S.T,E={};S.T=E,Qu(e,!1,t,a);try{var L=c(),F=S.S;if(F!==null&&F(E,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=hw(L,l);Ol(e,t,re,En(e))}else Ol(e,t,l,En(e))}catch(ce){Ol(e,t,{then:function(){},status:"rejected",reason:ce},En())}finally{_.p=f,b!==null&&E.types!==null&&(b.types=E.types),S.T=b}}function xw(){}function Fu(e,t,a,l){if(e.tag!==5)throw Error(i(476));var c=Hp(e).queue;Lp(e,c,t,D,a===null?xw:function(){return Bp(e),a(l)})}function Hp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:D,baseState:D,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:D},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bp(e){var t=Hp(e);t.next===null&&(t=e.alternate.memoizedState),Ol(e,t.next.queue,{},En())}function Ku(){return Gt(Fl)}function Up(){return Ct().memoizedState}function Ip(){return Ct().memoizedState}function Sw(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=En();e=Qa(a);var l=Za(t,e,a);l!==null&&(dn(l,t,a),Al(l,t,a)),t={cache:Cu()},e.payload=t;return}t=t.return}}function ww(e,t,a){var l=En();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},as(e)?$p(t,a):(a=mu(e,t,a,l),a!==null&&(dn(a,e,l),Gp(a,t,l)))}function Pp(e,t,a){var l=En();Ol(e,t,a,l)}function Ol(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(as(e))$p(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,E=f(b,a);if(c.hasEagerState=!0,c.eagerState=E,yn(E,b))return Hi(e,t,c,0),lt===null&&Li(),!1}catch{}finally{}if(a=mu(e,t,c,l),a!==null)return dn(a,e,l),Gp(a,t,l),!0}return!1}function Qu(e,t,a,l){if(l={lane:2,revertLane:Nf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},as(e)){if(t)throw Error(i(479))}else t=mu(e,a,l,2),t!==null&&dn(t,e,2)}function as(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function $p(e,t){Ro=Qi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Gp(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Kt(e,a)}}var Dl={readContext:Gt,use:Ji,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};Dl.useEffectEvent=xt;var Yp={readContext:Gt,use:Ji,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:Mp,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ts(4194308,4,Op.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var a=en();t=t===void 0?null:t;var l=e();if(Xr){gn(!0);try{e()}finally{gn(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=en();if(a!==void 0){var c=a(t);if(Xr){gn(!0);try{a(t)}finally{gn(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=ww.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=Gu(e);var t=e.queue,a=Pp.bind(null,ze,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Vu,useDeferredValue:function(e,t){var a=en();return Xu(a,e,t)},useTransition:function(){var e=Gu(!1);return e=Lp.bind(null,ze,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ze,c=en();if(Fe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),lt===null)throw Error(i(349));(qe&127)!==0||fp(l,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Mp(mp.bind(null,l,f,e),[e]),l.flags|=2048,Do(9,{destroy:void 0},dp.bind(null,l,f,a,t),null),a},useId:function(){var e=en(),t=lt.identifierPrefix;if(Fe){var a=na,l=ta;a=(l&~(1<<32-zt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Zi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=pw++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ku,useFormState:wp,useActionState:wp,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Qu.bind(null,ze,!0,a),a.dispatch=t,[e,t]},useMemoCache:Iu,useCacheRefresh:function(){return en().memoizedState=Sw.bind(null,ze)},useEffectEvent:function(e){var t=en(),a={impl:e};return t.memoizedState=a,function(){if((Je&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Zu={readContext:Gt,use:Ji,useCallback:jp,useContext:Gt,useEffect:qu,useImperativeHandle:Dp,useInsertionEffect:Np,useLayoutEffect:Rp,useMemo:zp,useReducer:es,useRef:Ap,useState:function(){return es(Ta)},useDebugValue:Vu,useDeferredValue:function(e,t){var a=Ct();return kp(a,at.memoizedState,e,t)},useTransition:function(){var e=es(Ta)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Rl(e),t]},useSyncExternalStore:up,useId:Up,useHostTransitionStatus:Ku,useFormState:Ep,useActionState:Ep,useOptimistic:function(e,t){var a=Ct();return gp(a,at,e,t)},useMemoCache:Iu,useCacheRefresh:Ip};Zu.useEffectEvent=_p;var qp={readContext:Gt,use:Ji,useCallback:jp,useContext:Gt,useEffect:qu,useImperativeHandle:Dp,useInsertionEffect:Np,useLayoutEffect:Rp,useMemo:zp,useReducer:$u,useRef:Ap,useState:function(){return $u(Ta)},useDebugValue:Vu,useDeferredValue:function(e,t){var a=Ct();return at===null?Xu(a,e,t):kp(a,at.memoizedState,e,t)},useTransition:function(){var e=$u(Ta)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Rl(e),t]},useSyncExternalStore:up,useId:Up,useHostTransitionStatus:Ku,useFormState:Tp,useActionState:Tp,useOptimistic:function(e,t){var a=Ct();return at!==null?gp(a,at,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Iu,useCacheRefresh:Ip};qp.useEffectEvent=_p;function Wu(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ju={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=En(),c=Qa(l);c.payload=t,a!=null&&(c.callback=a),t=Za(e,c,l),t!==null&&(dn(t,e,l),Al(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=En(),c=Qa(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Za(e,c,l),t!==null&&(dn(t,e,l),Al(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=En(),l=Qa(a);l.tag=2,t!=null&&(l.callback=t),t=Za(e,l,a),t!==null&&(dn(t,e,a),Al(t,e,a))}};function Vp(e,t,a,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!vl(a,l)||!vl(c,f):!0}function Xp(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Ju.enqueueReplaceState(t,t.state,null)}function Fr(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Fp(e){ki(e)}function Kp(e){console.error(e)}function Qp(e){ki(e)}function rs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Zp(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function ef(e,t,a){return a=Qa(a),a.tag=3,a.payload={element:null},a.callback=function(){rs(e,t)},a}function Wp(e){return e=Qa(e),e.tag=3,e}function Jp(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){Zp(t,a,l)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Zp(t,a,l),typeof c!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var E=l.stack;this.componentDidCatch(l.value,{componentStack:E!==null?E:""})})}function Ew(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Co(t,a,c,!0),a=bn.current,a!==null){switch(a.tag){case 31:case 13:return Hn===null?gs():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===qi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Af(e,l,c)),!1;case 22:return a.flags|=65536,l===qi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Af(e,l,c)),!1}throw Error(i(435,a.tag))}return Af(e,l,c),gs(),!1}if(Fe)return t=bn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==bu&&(e=Error(i(422),{cause:l}),Sl(jn(e,a)))):(l!==bu&&(t=Error(i(423),{cause:l}),Sl(jn(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=jn(l,a),c=ef(e.stateNode,l,c),Ru(e,c),St!==4&&(St=2)),!1;var f=Error(i(520),{cause:l});if(f=jn(f,a),Il===null?Il=[f]:Il.push(f),St!==4&&(St=2),t===null)return!0;l=jn(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=ef(a.stateNode,l,e),Ru(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ar===null||!ar.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Wp(c),Jp(c,e,a,l),Ru(a,c),!1}a=a.return}while(a!==null);return!1}var tf=Error(i(461)),Ot=!1;function Yt(e,t,a,l){t.child=e===null?ap(t,null,a,l):Vr(t,e.child,a,l)}function eg(e,t,a,l,c){a=a.render;var f=t.ref;if("ref"in l){var b={};for(var E in l)E!=="ref"&&(b[E]=l[E])}else b=l;return $r(t),l=Lu(e,t,a,b,f,c),E=Hu(),e!==null&&!Ot?(Bu(e,t,c),Aa(e,t,c)):(Fe&&E&&yu(t),t.flags|=1,Yt(e,t,l,c),t.child)}function tg(e,t,a,l,c){if(e===null){var f=a.type;return typeof f=="function"&&!hu(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,ng(e,t,f,l,c)):(e=Ui(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!uf(e,c)){var b=f.memoizedProps;if(a=a.compare,a=a!==null?a:vl,a(b,l)&&e.ref===t.ref)return Aa(e,t,c)}return t.flags|=1,e=xa(f,l),e.ref=t.ref,e.return=t,t.child=e}function ng(e,t,a,l,c){if(e!==null){var f=e.memoizedProps;if(vl(f,l)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=l=f,uf(e,c))(e.flags&131072)!==0&&(Ot=!0);else return t.lanes=e.lanes,Aa(e,t,c)}return nf(e,t,a,l,c)}function ag(e,t,a,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return rg(e,t,f,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gi(t,f!==null?f.cachePool:null),f!==null?lp(t,f):Du(),ip(t);else return l=t.lanes=536870912,rg(e,t,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(Gi(t,f.cachePool),lp(t,f),Ja(),t.memoizedState=null):(e!==null&&Gi(t,null),Du(),Ja());return Yt(e,t,c,a),t.child}function jl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rg(e,t,a,l,c){var f=Au();return f=f===null?null:{parent:Nt._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&Gi(t,null),Du(),ip(t),e!==null&&Co(e,t,l,!0),t.childLanes=c,null}function os(e,t){return t=is({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function og(e,t,a){return Vr(t,e.child,null,a),e=os(t,t.pendingProps),e.flags|=2,xn(t),t.memoizedState=null,e}function Cw(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(l.mode==="hidden")return e=os(t,l),t.lanes=536870912,jl(null,e);if(zu(t),(e=ft)?(e=yy(e,Ln),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qa!==null?{id:ta,overflow:na}:null,retryLane:536870912,hydrationErrors:null},a=$h(e),a.return=t,t.child=a,$t=t,ft=null)):e=null,e===null)throw Xa(t);return t.lanes=536870912,null}return os(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(zu(t),c)if(t.flags&256)t.flags&=-257,t=og(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Ot||Co(e,t,a,!1),c=(a&e.childLanes)!==0,Ot||c){if(l=lt,l!==null&&(b=Q(l,a),b!==0&&b!==f.retryLane))throw f.retryLane=b,Br(e,b),dn(l,e,b),tf;gs(),t=og(e,t,a)}else e=f.treeContext,ft=Bn(b.nextSibling),$t=t,Fe=!0,Va=null,Ln=!1,e!==null&&qh(t,e),t=os(t,l),t.flags|=4096;return t}return e=xa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ls(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function nf(e,t,a,l,c){return $r(t),a=Lu(e,t,a,l,void 0,c),l=Hu(),e!==null&&!Ot?(Bu(e,t,c),Aa(e,t,c)):(Fe&&l&&yu(t),t.flags|=1,Yt(e,t,a,c),t.child)}function lg(e,t,a,l,c,f){return $r(t),t.updateQueue=null,a=cp(t,l,a,c),sp(e),l=Hu(),e!==null&&!Ot?(Bu(e,t,f),Aa(e,t,f)):(Fe&&l&&yu(t),t.flags|=1,Yt(e,t,a,f),t.child)}function ig(e,t,a,l,c){if($r(t),t.stateNode===null){var f=xo,b=a.contextType;typeof b=="object"&&b!==null&&(f=Gt(b)),f=new a(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Ju,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},_u(t),b=a.contextType,f.context=typeof b=="object"&&b!==null?Gt(b):xo,f.state=t.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(Wu(t,a,b,l),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&Ju.enqueueReplaceState(f,f.state,null),_l(t,l,f,c),Ml(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var E=t.memoizedProps,L=Fr(a,E);f.props=L;var F=f.context,re=a.contextType;b=xo,typeof re=="object"&&re!==null&&(b=Gt(re));var ce=a.getDerivedStateFromProps;re=typeof ce=="function"||typeof f.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(E||F!==b)&&Xp(t,f,l,b),Ka=!1;var W=t.memoizedState;f.state=W,_l(t,l,f,c),Ml(),F=t.memoizedState,E||W!==F||Ka?(typeof ce=="function"&&(Wu(t,a,ce,l),F=t.memoizedState),(L=Ka||Vp(t,a,L,l,W,F,b))?(re||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=F),f.props=l,f.state=F,f.context=b,l=L):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Nu(e,t),b=t.memoizedProps,re=Fr(a,b),f.props=re,ce=t.pendingProps,W=f.context,F=a.contextType,L=xo,typeof F=="object"&&F!==null&&(L=Gt(F)),E=a.getDerivedStateFromProps,(F=typeof E=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==ce||W!==L)&&Xp(t,f,l,L),Ka=!1,W=t.memoizedState,f.state=W,_l(t,l,f,c),Ml();var ee=t.memoizedState;b!==ce||W!==ee||Ka||e!==null&&e.dependencies!==null&&Pi(e.dependencies)?(typeof E=="function"&&(Wu(t,a,E,l),ee=t.memoizedState),(re=Ka||Vp(t,a,re,l,W,ee,L)||e!==null&&e.dependencies!==null&&Pi(e.dependencies))?(F||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,ee,L),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,ee,L)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ee),f.props=l,f.state=ee,f.context=L,l=re):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,ls(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=Vr(t,e.child,null,c),t.child=Vr(t,null,a,c)):Yt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=Aa(e,t,c),e}function sg(e,t,a,l){return Ir(),t.flags|=256,Yt(e,t,a,l),t.child}var af={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rf(e){return{baseLanes:e,cachePool:Zh()}}function of(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=wn),e}function cg(e,t,a){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(c?Wa(t):Ja(),(e=ft)?(e=yy(e,Ln),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qa!==null?{id:ta,overflow:na}:null,retryLane:536870912,hydrationErrors:null},a=$h(e),a.return=t,t.child=a,$t=t,ft=null)):e=null,e===null)throw Xa(t);return $f(e)?t.lanes=32:t.lanes=536870912,null}var E=l.children;return l=l.fallback,c?(Ja(),c=t.mode,E=is({mode:"hidden",children:E},c),l=Ur(l,c,a,null),E.return=t,l.return=t,E.sibling=l,t.child=E,l=t.child,l.memoizedState=rf(a),l.childLanes=of(e,b,a),t.memoizedState=af,jl(null,l)):(Wa(t),lf(t,E))}var L=e.memoizedState;if(L!==null&&(E=L.dehydrated,E!==null)){if(f)t.flags&256?(Wa(t),t.flags&=-257,t=sf(e,t,a)):t.memoizedState!==null?(Ja(),t.child=e.child,t.flags|=128,t=null):(Ja(),E=l.fallback,c=t.mode,l=is({mode:"visible",children:l.children},c),E=Ur(E,c,a,null),E.flags|=2,l.return=t,E.return=t,l.sibling=E,t.child=l,Vr(t,e.child,null,a),l=t.child,l.memoizedState=rf(a),l.childLanes=of(e,b,a),t.memoizedState=af,t=jl(null,l));else if(Wa(t),$f(E)){if(b=E.nextSibling&&E.nextSibling.dataset,b)var F=b.dgst;b=F,l=Error(i(419)),l.stack="",l.digest=b,Sl({value:l,source:null,stack:null}),t=sf(e,t,a)}else if(Ot||Co(e,t,a,!1),b=(a&e.childLanes)!==0,Ot||b){if(b=lt,b!==null&&(l=Q(b,a),l!==0&&l!==L.retryLane))throw L.retryLane=l,Br(e,l),dn(b,e,l),tf;Pf(E)||gs(),t=sf(e,t,a)}else Pf(E)?(t.flags|=192,t.child=e.child,t=null):(e=L.treeContext,ft=Bn(E.nextSibling),$t=t,Fe=!0,Va=null,Ln=!1,e!==null&&qh(t,e),t=lf(t,l.children),t.flags|=4096);return t}return c?(Ja(),E=l.fallback,c=t.mode,L=e.child,F=L.sibling,l=xa(L,{mode:"hidden",children:l.children}),l.subtreeFlags=L.subtreeFlags&65011712,F!==null?E=xa(F,E):(E=Ur(E,c,a,null),E.flags|=2),E.return=t,l.return=t,l.sibling=E,t.child=l,jl(null,l),l=t.child,E=e.child.memoizedState,E===null?E=rf(a):(c=E.cachePool,c!==null?(L=Nt._currentValue,c=c.parent!==L?{parent:L,pool:L}:c):c=Zh(),E={baseLanes:E.baseLanes|a,cachePool:c}),l.memoizedState=E,l.childLanes=of(e,b,a),t.memoizedState=af,jl(e.child,l)):(Wa(t),a=e.child,e=a.sibling,a=xa(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=a,t.memoizedState=null,a)}function lf(e,t){return t=is({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function is(e,t){return e=vn(22,e,null,t),e.lanes=0,e}function sf(e,t,a){return Vr(t,e.child,null,a),e=lf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ug(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),wu(e.return,t,a)}function cf(e,t,a,l,c,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=a,b.tailMode=c,b.treeForkCount=f)}function fg(e,t,a){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=Et.current,E=(b&2)!==0;if(E?(b=b&1|2,t.flags|=128):b&=1,B(Et,b),Yt(e,t,l,a),l=Fe?xl:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ug(e,a,t);else if(e.tag===19)ug(e,a,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(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&Ki(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),cf(t,!1,c,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ki(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}cf(t,!0,a,null,f,l);break;case"together":cf(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),nr|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Co(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=xa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=xa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function uf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pi(e)))}function Tw(e,t,a){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),Fa(t,Nt,e.memoizedState.cache),Ir();break;case 27:case 5:Se(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:Fa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,zu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Wa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?cg(e,t,a):(Wa(t),e=Aa(e,t,a),e!==null?e.sibling:null);Wa(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Co(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return fg(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),B(Et,Et.current),l)break;return null;case 22:return t.lanes=0,ag(e,t,a,t.pendingProps);case 24:Fa(t,Nt,e.memoizedState.cache)}return Aa(e,t,a)}function dg(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ot=!0;else{if(!uf(e,a)&&(t.flags&128)===0)return Ot=!1,Tw(e,t,a);Ot=(e.flags&131072)!==0}else Ot=!1,Fe&&(t.flags&1048576)!==0&&Yh(t,xl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Yr(t.elementType),t.type=e,typeof e=="function")hu(e)?(l=Fr(e,l),t.tag=1,t=ig(null,t,e,l,a)):(t.tag=0,t=nf(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===Y){t.tag=11,t=eg(null,t,e,l,a);break e}else if(c===V){t.tag=14,t=tg(null,t,e,l,a);break e}}throw t=de(e)||e,Error(i(306,t,""))}}return t;case 0:return nf(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=Fr(l,t.pendingProps),ig(e,t,l,c,a);case 3:e:{if(Z(t,t.stateNode.containerInfo),e===null)throw Error(i(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Nu(e,t),_l(t,l,null,a);var b=t.memoizedState;if(l=b.cache,Fa(t,Nt,l),l!==f.cache&&Eu(t,[Nt],a,!0),Ml(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=sg(e,t,l,a);break e}else if(l!==c){c=jn(Error(i(424)),t),Sl(c),t=sg(e,t,l,a);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(ft=Bn(e.firstChild),$t=t,Fe=!0,Va=null,Ln=!0,a=ap(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ir(),l===c){t=Aa(e,t,a);break e}Yt(e,t,l,a)}t=t.child}return t;case 26:return ls(e,t),e===null?(a=Ey(t.type,null,t.pendingProps,null))?t.memoizedState=a:Fe||(a=t.type,e=t.pendingProps,l=Es(ne.current).createElement(a),l[Ue]=t,l[He]=e,qt(l,a,e),bt(l),t.stateNode=l):t.memoizedState=Ey(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Se(t),e===null&&Fe&&(l=t.stateNode=xy(t.type,t.pendingProps,ne.current),$t=t,Ln=!0,c=ft,ir(t.type)?(Gf=c,ft=Bn(l.firstChild)):ft=c),Yt(e,t,t.pendingProps.children,a),ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fe&&((c=l=ft)&&(l=t2(l,t.type,t.pendingProps,Ln),l!==null?(t.stateNode=l,$t=t,ft=Bn(l.firstChild),Ln=!1,c=!0):c=!1),c||Xa(t)),Se(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,Bf(c,f)?l=null:b!==null&&Bf(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=Lu(e,t,gw,null,null,a),Fl._currentValue=c),ls(e,t),Yt(e,t,l,a),t.child;case 6:return e===null&&Fe&&((e=a=ft)&&(a=n2(a,t.pendingProps,Ln),a!==null?(t.stateNode=a,$t=t,ft=null,e=!0):e=!1),e||Xa(t)),null;case 13:return cg(e,t,a);case 4:return Z(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Vr(t,null,l,a):Yt(e,t,l,a),t.child;case 11:return eg(e,t,t.type,t.pendingProps,a);case 7:return Yt(e,t,t.pendingProps,a),t.child;case 8:return Yt(e,t,t.pendingProps.children,a),t.child;case 12:return Yt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Fa(t,t.type,l.value),Yt(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,$r(t),c=Gt(c),l=l(c),t.flags|=1,Yt(e,t,l,a),t.child;case 14:return tg(e,t,t.type,t.pendingProps,a);case 15:return ng(e,t,t.type,t.pendingProps,a);case 19:return fg(e,t,a);case 31:return Cw(e,t,a);case 22:return ag(e,t,a,t.pendingProps);case 24:return $r(t),l=Gt(Nt),e===null?(c=Au(),c===null&&(c=lt,f=Cu(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:l,cache:c},_u(t),Fa(t,Nt,c)):((e.lanes&a)!==0&&(Nu(e,t),_l(t,null,null,a),Ml()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Fa(t,Nt,l)):(l=f.cache,Fa(t,Nt,l),l!==c.cache&&Eu(t,[Nt],a,!0))),Yt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ma(e){e.flags|=4}function ff(e,t,a,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Ug())e.flags|=8192;else throw qr=qi,Mu}else e.flags&=-16777217}function mg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_y(t))if(Ug())e.flags|=8192;else throw qr=qi,Mu}function ss(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ut():536870912,e.lanes|=t,Lo|=t)}function zl(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Aw(e,t,a){var l=t.pendingProps;switch(vu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ea(Nt),oe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Eo(t)?Ma(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xu())),dt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Ma(t),f!==null?(dt(t),mg(t,f)):(dt(t),ff(t,c,null,l,a))):f?f!==e.memoizedState?(Ma(t),dt(t),mg(t,f)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ma(t),dt(t),ff(t,c,e,l,a)),null;case 27:if(Te(t),a=ne.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ma(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return dt(t),null}e=P.current,Eo(t)?Vh(t):(e=xy(c,l,a),t.stateNode=e,Ma(t))}return dt(t),null;case 5:if(Te(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ma(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return dt(t),null}if(f=P.current,Eo(t))Vh(t);else{var b=Es(ne.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[Ue]=t,f[He]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(qt(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ma(t)}}return dt(t),ff(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ma(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(e=ne.current,Eo(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=$t,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Ue]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||cy(e.nodeValue,a)),e||Xa(t,!0)}else e=Es(e).createTextNode(l),e[Ue]=t,t.stateNode=e}return dt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Eo(t),a!==null){if(e===null){if(!l)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Ue]=t}else Ir(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else a=xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(xn(t),t):(xn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return dt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Eo(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[Ue]=t}else Ir(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),c=!1}else c=xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(xn(t),t):(xn(t),null)}return xn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ss(t,t.updateQueue),dt(t),null);case 4:return oe(),e===null&&jf(t.stateNode.containerInfo),dt(t),null;case 10:return Ea(t.type),dt(t),null;case 19:if(j(Et),l=t.memoizedState,l===null)return dt(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)zl(l,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ki(e),f!==null){for(t.flags|=128,zl(l,!1),e=f.updateQueue,t.updateQueue=e,ss(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ph(a,e),a=a.sibling;return B(Et,Et.current&1|2),Fe&&Sa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&jt()>ms&&(t.flags|=128,c=!0,zl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Ki(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,ss(t,e),zl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Fe)return dt(t),null}else 2*jt()-l.renderingStartTime>ms&&a!==536870912&&(t.flags|=128,c=!0,zl(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=jt(),e.sibling=null,a=Et.current,B(Et,c?a&1|2:a&1),Fe&&Sa(t,l.treeForkCount),e):(dt(t),null);case 22:case 23:return xn(t),ju(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),a=t.updateQueue,a!==null&&ss(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&j(Gr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ea(Nt),dt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Mw(e,t){switch(vu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ea(Nt),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Te(t),null;case 31:if(t.memoizedState!==null){if(xn(t),t.alternate===null)throw Error(i(340));Ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(Et),null;case 4:return oe(),null;case 10:return Ea(t.type),null;case 22:case 23:return xn(t),ju(),e!==null&&j(Gr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ea(Nt),null;case 25:return null;default:return null}}function hg(e,t){switch(vu(t),t.tag){case 3:Ea(Nt),oe();break;case 26:case 27:case 5:Te(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&xn(t);break;case 13:xn(t);break;case 19:j(Et);break;case 10:Ea(t.type);break;case 22:case 23:xn(t),ju(),e!==null&&j(Gr);break;case 24:Ea(Nt)}}function kl(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var f=a.create,b=a.inst;l=f(),b.destroy=l}a=a.next}while(a!==c)}}catch(E){nt(t,t.return,E)}}function er(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,E=b.destroy;if(E!==void 0){b.destroy=void 0,c=t;var L=a,F=E;try{F()}catch(re){nt(c,L,re)}}}l=l.next}while(l!==f)}}catch(re){nt(t,t.return,re)}}function pg(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{op(t,a)}catch(l){nt(e,e.return,l)}}}function gg(e,t,a){a.props=Fr(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){nt(e,t,l)}}function Ll(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){nt(e,t,c)}}function aa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){nt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){nt(e,t,c)}else a.current=null}function yg(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){nt(e,e.return,c)}}function df(e,t,a){try{var l=e.stateNode;Kw(l,e.type,a,t),l[He]=t}catch(c){nt(e,e.return,c)}}function vg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ir(e.type)||e.tag===4}function mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vg(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&&ir(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 hf(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=va));else if(l!==4&&(l===27&&ir(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(hf(e,t,a),e=e.sibling;e!==null;)hf(e,t,a),e=e.sibling}function cs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&ir(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(cs(e,t,a),e=e.sibling;e!==null;)cs(e,t,a),e=e.sibling}function bg(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);qt(t,l,a),t[Ue]=e,t[He]=a}catch(f){nt(e,e.return,f)}}var _a=!1,Dt=!1,pf=!1,xg=typeof WeakSet=="function"?WeakSet:Set,It=null;function _w(e,t){if(e=e.containerInfo,Lf=Rs,e=Dh(e),iu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var b=0,E=-1,L=-1,F=0,re=0,ce=e,W=null;t:for(;;){for(var ee;ce!==a||c!==0&&ce.nodeType!==3||(E=b+c),ce!==f||l!==0&&ce.nodeType!==3||(L=b+l),ce.nodeType===3&&(b+=ce.nodeValue.length),(ee=ce.firstChild)!==null;)W=ce,ce=ee;for(;;){if(ce===e)break t;if(W===a&&++F===c&&(E=b),W===f&&++re===l&&(L=b),(ee=ce.nextSibling)!==null)break;ce=W,W=ce.parentNode}ce=ee}a=E===-1||L===-1?null:{start:E,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(Hf={focusedElem:e,selectionRange:a},Rs=!1,It=t;It!==null;)if(t=It,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,It=e;else for(;It!==null;){switch(t=It,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,l=a.stateNode;try{var ve=Fr(a.type,c);e=l.getSnapshotBeforeUpdate(ve,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){nt(a,a.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)If(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":If(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,It=e;break}It=t.return}}function Sg(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ra(e,a),l&4&&kl(5,a);break;case 1:if(Ra(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(b){nt(a,a.return,b)}else{var c=Fr(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){nt(a,a.return,b)}}l&64&&pg(a),l&512&&Ll(a,a.return);break;case 3:if(Ra(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{op(e,t)}catch(b){nt(a,a.return,b)}}break;case 27:t===null&&l&4&&bg(a);case 26:case 5:Ra(e,a),t===null&&l&4&&yg(a),l&512&&Ll(a,a.return);break;case 12:Ra(e,a);break;case 31:Ra(e,a),l&4&&Cg(e,a);break;case 13:Ra(e,a),l&4&&Tg(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Hw.bind(null,a),a2(e,a))));break;case 22:if(l=a.memoizedState!==null||_a,!l){t=t!==null&&t.memoizedState!==null||Dt,c=_a;var f=Dt;_a=l,(Dt=t)&&!f?Oa(e,a,(a.subtreeFlags&8772)!==0):Ra(e,a),_a=c,Dt=f}break;case 30:break;default:Ra(e,a)}}function wg(e){var t=e.alternate;t!==null&&(e.alternate=null,wg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yn(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 mt=null,sn=!1;function Na(e,t,a){for(a=a.child;a!==null;)Eg(e,t,a),a=a.sibling}function Eg(e,t,a){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(pn,a)}catch{}switch(a.tag){case 26:Dt||aa(a,t),Na(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Dt||aa(a,t);var l=mt,c=sn;ir(a.type)&&(mt=a.stateNode,sn=!1),Na(e,t,a),ql(a.stateNode),mt=l,sn=c;break;case 5:Dt||aa(a,t);case 6:if(l=mt,c=sn,mt=null,Na(e,t,a),mt=l,sn=c,mt!==null)if(sn)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(f){nt(a,t,f)}else try{mt.removeChild(a.stateNode)}catch(f){nt(a,t,f)}break;case 18:mt!==null&&(sn?(e=mt,py(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yo(e)):py(mt,a.stateNode));break;case 4:l=mt,c=sn,mt=a.stateNode.containerInfo,sn=!0,Na(e,t,a),mt=l,sn=c;break;case 0:case 11:case 14:case 15:er(2,a,t),Dt||er(4,a,t),Na(e,t,a);break;case 1:Dt||(aa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&gg(a,t,l)),Na(e,t,a);break;case 21:Na(e,t,a);break;case 22:Dt=(l=Dt)||a.memoizedState!==null,Na(e,t,a),Dt=l;break;default:Na(e,t,a)}}function Cg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yo(e)}catch(a){nt(t,t.return,a)}}}function Tg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yo(e)}catch(a){nt(t,t.return,a)}}function Nw(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xg),t;default:throw Error(i(435,e.tag))}}function us(e,t){var a=Nw(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=Bw.bind(null,e,l);l.then(c,c)}})}function cn(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],f=e,b=t,E=b;e:for(;E!==null;){switch(E.tag){case 27:if(ir(E.type)){mt=E.stateNode,sn=!1;break e}break;case 5:mt=E.stateNode,sn=!1;break e;case 3:case 4:mt=E.stateNode.containerInfo,sn=!0;break e}E=E.return}if(mt===null)throw Error(i(160));Eg(f,b,c),mt=null,sn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ag(t,e),t=t.sibling}var Vn=null;function Ag(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cn(t,e),un(e),l&4&&(er(3,e,e.return),kl(3,e),er(5,e,e.return));break;case 1:cn(t,e),un(e),l&512&&(Dt||a===null||aa(a,a.return)),l&64&&_a&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=Vn;if(cn(t,e),un(e),l&512&&(Dt||a===null||aa(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[gt]||f[Ue]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),qt(f,l,a),f[Ue]=e,bt(f),l=f;break e;case"link":var b=Ay("link","href",c).get(l+(a.href||""));if(b){for(var E=0;E<b.length;E++)if(f=b[E],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(E,1);break t}}f=c.createElement(l),qt(f,l,a),c.head.appendChild(f);break;case"meta":if(b=Ay("meta","content",c).get(l+(a.content||""))){for(E=0;E<b.length;E++)if(f=b[E],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(E,1);break t}}f=c.createElement(l),qt(f,l,a),c.head.appendChild(f);break;default:throw Error(i(468,l))}f[Ue]=e,bt(f),l=f}e.stateNode=l}else My(c,e.type,e.stateNode);else e.stateNode=Ty(c,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?My(c,e.type,e.stateNode):Ty(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&df(e,e.memoizedProps,a.memoizedProps)}break;case 27:cn(t,e),un(e),l&512&&(Dt||a===null||aa(a,a.return)),a!==null&&l&4&&df(e,e.memoizedProps,a.memoizedProps);break;case 5:if(cn(t,e),un(e),l&512&&(Dt||a===null||aa(a,a.return)),e.flags&32){c=e.stateNode;try{mo(c,"")}catch(ve){nt(e,e.return,ve)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,df(e,c,a!==null?a.memoizedProps:c)),l&1024&&(pf=!0);break;case 6:if(cn(t,e),un(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ve){nt(e,e.return,ve)}}break;case 3:if(As=null,c=Vn,Vn=Cs(t.containerInfo),cn(t,e),Vn=c,un(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Yo(t.containerInfo)}catch(ve){nt(e,e.return,ve)}pf&&(pf=!1,Mg(e));break;case 4:l=Vn,Vn=Cs(e.stateNode.containerInfo),cn(t,e),un(e),Vn=l;break;case 12:cn(t,e),un(e);break;case 31:cn(t,e),un(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,us(e,l)));break;case 13:cn(t,e),un(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ds=jt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,us(e,l)));break;case 22:c=e.memoizedState!==null;var L=a!==null&&a.memoizedState!==null,F=_a,re=Dt;if(_a=F||c,Dt=re||L,cn(t,e),Dt=re,_a=F,un(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||L||_a||Dt||Kr(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){L=a=t;try{if(f=L.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=L.stateNode;var ce=L.memoizedProps.style,W=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;E.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(ve){nt(L,L.return,ve)}}}else if(t.tag===6){if(a===null){L=t;try{L.stateNode.nodeValue=c?"":L.memoizedProps}catch(ve){nt(L,L.return,ve)}}}else if(t.tag===18){if(a===null){L=t;try{var ee=L.stateNode;c?gy(ee,!0):gy(L.stateNode,!1)}catch(ve){nt(L,L.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,us(e,a))));break;case 19:cn(t,e),un(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,us(e,l)));break;case 30:break;case 21:break;default:cn(t,e),un(e)}}function un(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(vg(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,f=mf(e);cs(e,f,c);break;case 5:var b=a.stateNode;a.flags&32&&(mo(b,""),a.flags&=-33);var E=mf(e);cs(e,E,b);break;case 3:case 4:var L=a.stateNode.containerInfo,F=mf(e);hf(e,F,L);break;default:throw Error(i(161))}}catch(re){nt(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ra(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sg(e,t.alternate,t),t=t.sibling}function Kr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:er(4,t,t.return),Kr(t);break;case 1:aa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&gg(t,t.return,a),Kr(t);break;case 27:ql(t.stateNode);case 26:case 5:aa(t,t.return),Kr(t);break;case 22:t.memoizedState===null&&Kr(t);break;case 30:Kr(t);break;default:Kr(t)}e=e.sibling}}function Oa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:Oa(c,f,a),kl(4,f);break;case 1:if(Oa(c,f,a),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(F){nt(l,l.return,F)}if(l=f,c=l.updateQueue,c!==null){var E=l.stateNode;try{var L=c.shared.hiddenCallbacks;if(L!==null)for(c.shared.hiddenCallbacks=null,c=0;c<L.length;c++)rp(L[c],E)}catch(F){nt(l,l.return,F)}}a&&b&64&&pg(f),Ll(f,f.return);break;case 27:bg(f);case 26:case 5:Oa(c,f,a),a&&l===null&&b&4&&yg(f),Ll(f,f.return);break;case 12:Oa(c,f,a);break;case 31:Oa(c,f,a),a&&b&4&&Cg(c,f);break;case 13:Oa(c,f,a),a&&b&4&&Tg(c,f);break;case 22:f.memoizedState===null&&Oa(c,f,a),Ll(f,f.return);break;case 30:break;default:Oa(c,f,a)}t=t.sibling}}function gf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&wl(a))}function yf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wl(e))}function Xn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)_g(e,t,a,l),t=t.sibling}function _g(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,a,l),c&2048&&kl(9,t);break;case 1:Xn(e,t,a,l);break;case 3:Xn(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wl(e)));break;case 12:if(c&2048){Xn(e,t,a,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,E=f.onPostCommit;typeof E=="function"&&E(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){nt(t,t.return,L)}}else Xn(e,t,a,l);break;case 31:Xn(e,t,a,l);break;case 13:Xn(e,t,a,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?Xn(e,t,a,l):Hl(e,t):f._visibility&2?Xn(e,t,a,l):(f._visibility|=2,jo(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&gf(b,t);break;case 24:Xn(e,t,a,l),c&2048&&yf(t.alternate,t);break;default:Xn(e,t,a,l)}}function jo(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,E=a,L=l,F=b.flags;switch(b.tag){case 0:case 11:case 15:jo(f,b,E,L,c),kl(8,b);break;case 23:break;case 22:var re=b.stateNode;b.memoizedState!==null?re._visibility&2?jo(f,b,E,L,c):Hl(f,b):(re._visibility|=2,jo(f,b,E,L,c)),c&&F&2048&&gf(b.alternate,b);break;case 24:jo(f,b,E,L,c),c&&F&2048&&yf(b.alternate,b);break;default:jo(f,b,E,L,c)}t=t.sibling}}function Hl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:Hl(a,l),c&2048&&gf(l.alternate,l);break;case 24:Hl(a,l),c&2048&&yf(l.alternate,l);break;default:Hl(a,l)}t=t.sibling}}var Bl=8192;function zo(e,t,a){if(e.subtreeFlags&Bl)for(e=e.child;e!==null;)Ng(e,t,a),e=e.sibling}function Ng(e,t,a){switch(e.tag){case 26:zo(e,t,a),e.flags&Bl&&e.memoizedState!==null&&p2(a,Vn,e.memoizedState,e.memoizedProps);break;case 5:zo(e,t,a);break;case 3:case 4:var l=Vn;Vn=Cs(e.stateNode.containerInfo),zo(e,t,a),Vn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Bl,Bl=16777216,zo(e,t,a),Bl=l):zo(e,t,a));break;default:zo(e,t,a)}}function Rg(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 Ul(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];It=l,Dg(l,e)}Rg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Og(e),e=e.sibling}function Og(e){switch(e.tag){case 0:case 11:case 15:Ul(e),e.flags&2048&&er(9,e,e.return);break;case 3:Ul(e);break;case 12:Ul(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fs(e)):Ul(e);break;default:Ul(e)}}function fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];It=l,Dg(l,e)}Rg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:er(8,t,t.return),fs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,fs(t));break;default:fs(t)}e=e.sibling}}function Dg(e,t){for(;It!==null;){var a=It;switch(a.tag){case 0:case 11:case 15:er(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:wl(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,It=l;else e:for(a=e;It!==null;){l=It;var c=l.sibling,f=l.return;if(wg(l),l===a){It=null;break e}if(c!==null){c.return=f,It=c;break e}It=f}}}var Rw={getCacheForType:function(e){var t=Gt(Nt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Gt(Nt).controller.signal}},Ow=typeof WeakMap=="function"?WeakMap:Map,Je=0,lt=null,Ge=null,qe=0,tt=0,Sn=null,tr=!1,ko=!1,vf=!1,Da=0,St=0,nr=0,Qr=0,bf=0,wn=0,Lo=0,Il=null,fn=null,xf=!1,ds=0,jg=0,ms=1/0,hs=null,ar=null,kt=0,rr=null,Ho=null,ja=0,Sf=0,wf=null,zg=null,Pl=0,Ef=null;function En(){return(Je&2)!==0&&qe!==0?qe&-qe:S.T!==null?Nf():Ce()}function kg(){if(wn===0)if((qe&536870912)===0||Fe){var e=$a;$a<<=1,($a&3932160)===0&&($a=262144),wn=e}else wn=536870912;return e=bn.current,e!==null&&(e.flags|=32),wn}function dn(e,t,a){(e===lt&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Bo(e,0),or(e,qe,wn,!1)),ut(e,a),((Je&2)===0||e!==lt)&&(e===lt&&((Je&2)===0&&(Qr|=a),St===4&&or(e,qe,wn,!1)),ra(e))}function Lg(e,t,a){if((Je&6)!==0)throw Error(i(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||it(e,t),c=l?zw(e,t):Tf(e,t,!0),f=l;do{if(c===0){ko&&!l&&or(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Dw(a)){c=Tf(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var E=e;c=Il;var L=E.current.memoizedState.isDehydrated;if(L&&(Bo(E,b).flags|=256),b=Tf(E,b,!1),b!==2){if(vf&&!L){E.errorRecoveryDisabledLanes|=f,Qr|=f,c=4;break e}f=fn,fn=c,f!==null&&(fn===null?fn=f:fn.push.apply(fn,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){Bo(e,0),or(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:or(l,t,wn,!tr);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=ds+300-jt(),10<c)){if(or(l,t,wn,!tr),De(l,0,!0)!==0)break e;ja=t,l.timeoutHandle=my(Hg.bind(null,l,a,fn,hs,xf,t,wn,Qr,Lo,tr,f,"Throttled",-0,0),c);break e}Hg(l,a,fn,hs,xf,t,wn,Qr,Lo,tr,f,null,-0,0)}}break}while(!0);ra(e)}function Hg(e,t,a,l,c,f,b,E,L,F,re,ce,W,ee){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:va},Ng(t,f,ce);var ve=(f&62914560)===f?ds-jt():(f&4194048)===f?jg-jt():0;if(ve=g2(ce,ve),ve!==null){ja=f,e.cancelPendingCommit=ve(qg.bind(null,e,t,f,a,l,c,b,E,L,re,ce,null,W,ee)),or(e,f,b,!F);return}}qg(e,t,f,a,l,c,b,E,L)}function Dw(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],f=c.getSnapshot;c=c.value;try{if(!yn(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 or(e,t,a,l){t&=~bf,t&=~Qr,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-zt(c),b=1<<f;l[f]=-1,c&=~b}a!==0&&pa(e,a,t)}function ps(){return(Je&6)===0?($l(0),!1):!0}function Cf(){if(Ge!==null){if(tt===0)var e=Ge.return;else e=Ge,wa=Pr=null,Uu(e),_o=null,Cl=0,e=Ge;for(;e!==null;)hg(e.alternate,e),e=e.return;Ge=null}}function Bo(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Ww(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ja=0,Cf(),lt=e,Ge=a=xa(e.current,null),qe=t,tt=0,Sn=null,tr=!1,ko=it(e,t),vf=!1,Lo=wn=bf=Qr=nr=St=0,fn=Il=null,xf=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-zt(l),f=1<<c;t|=e[c],l&=~f}return Da=t,Li(),a}function Bg(e,t){ze=null,S.H=Dl,t===Mo||t===Yi?(t=ep(),tt=3):t===Mu?(t=ep(),tt=4):tt=t===tf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Sn=t,Ge===null&&(St=1,rs(e,jn(t,e.current)))}function Ug(){var e=bn.current;return e===null?!0:(qe&4194048)===qe?Hn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===Hn:!1}function Ig(){var e=S.H;return S.H=Dl,e===null?Dl:e}function Pg(){var e=S.A;return S.A=Rw,e}function gs(){St=4,tr||(qe&4194048)!==qe&&bn.current!==null||(ko=!0),(nr&134217727)===0&&(Qr&134217727)===0||lt===null||or(lt,qe,wn,!1)}function Tf(e,t,a){var l=Je;Je|=2;var c=Ig(),f=Pg();(lt!==e||qe!==t)&&(hs=null,Bo(e,t)),t=!1;var b=St;e:do try{if(tt!==0&&Ge!==null){var E=Ge,L=Sn;switch(tt){case 8:Cf(),b=6;break e;case 3:case 2:case 9:case 6:bn.current===null&&(t=!0);var F=tt;if(tt=0,Sn=null,Uo(e,E,L,F),a&&ko){b=0;break e}break;default:F=tt,tt=0,Sn=null,Uo(e,E,L,F)}}jw(),b=St;break}catch(re){Bg(e,re)}while(!0);return t&&e.shellSuspendCounter++,wa=Pr=null,Je=l,S.H=c,S.A=f,Ge===null&&(lt=null,qe=0,Li()),b}function jw(){for(;Ge!==null;)$g(Ge)}function zw(e,t){var a=Je;Je|=2;var l=Ig(),c=Pg();lt!==e||qe!==t?(hs=null,ms=jt()+500,Bo(e,t)):ko=it(e,t);e:do try{if(tt!==0&&Ge!==null){t=Ge;var f=Sn;t:switch(tt){case 1:tt=0,Sn=null,Uo(e,t,f,1);break;case 2:case 9:if(Wh(f)){tt=0,Sn=null,Gg(t);break}t=function(){tt!==2&&tt!==9||lt!==e||(tt=7),ra(e)},f.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:Wh(f)?(tt=0,Sn=null,Gg(t)):(tt=0,Sn=null,Uo(e,t,f,7));break;case 5:var b=null;switch(Ge.tag){case 26:b=Ge.memoizedState;case 5:case 27:var E=Ge;if(b?_y(b):E.stateNode.complete){tt=0,Sn=null;var L=E.sibling;if(L!==null)Ge=L;else{var F=E.return;F!==null?(Ge=F,ys(F)):Ge=null}break t}}tt=0,Sn=null,Uo(e,t,f,5);break;case 6:tt=0,Sn=null,Uo(e,t,f,6);break;case 8:Cf(),St=6;break e;default:throw Error(i(462))}}kw();break}catch(re){Bg(e,re)}while(!0);return wa=Pr=null,S.H=l,S.A=c,Je=a,Ge!==null?0:(lt=null,qe=0,Li(),St)}function kw(){for(;Ge!==null&&!pt();)$g(Ge)}function $g(e){var t=dg(e.alternate,e,Da);e.memoizedProps=e.pendingProps,t===null?ys(e):Ge=t}function Gg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=lg(a,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=lg(a,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:Uu(t);default:hg(a,t),t=Ge=Ph(t,Da),t=dg(a,t,Da)}e.memoizedProps=e.pendingProps,t===null?ys(e):Ge=t}function Uo(e,t,a,l){wa=Pr=null,Uu(t),_o=null,Cl=0;var c=t.return;try{if(Ew(e,c,t,a,qe)){St=1,rs(e,jn(a,e.current)),Ge=null;return}}catch(f){if(c!==null)throw Ge=c,f;St=1,rs(e,jn(a,e.current)),Ge=null;return}t.flags&32768?(Fe||l===1?e=!0:ko||(qe&536870912)!==0?e=!1:(tr=e=!0,(l===2||l===9||l===3||l===6)&&(l=bn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Yg(t,e)):ys(t)}function ys(e){var t=e;do{if((t.flags&32768)!==0){Yg(t,tr);return}e=t.return;var a=Aw(t.alternate,t,Da);if(a!==null){Ge=a;return}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);St===0&&(St=5)}function Yg(e,t){do{var a=Mw(e.alternate,e);if(a!==null){a.flags&=32767,Ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ge=e;return}Ge=e=a}while(e!==null);St=6,Ge=null}function qg(e,t,a,l,c,f,b,E,L){e.cancelPendingCommit=null;do vs();while(kt!==0);if((Je&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=du,Ft(e,a,f,b,E,L),e===lt&&(Ge=lt=null,qe=0),Ho=t,rr=e,ja=a,Sf=f,wf=c,zg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Uw($n,function(){return Qg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=S.T,S.T=null,c=_.p,_.p=2,b=Je,Je|=4;try{_w(e,t,a)}finally{Je=b,_.p=c,S.T=l}}kt=1,Vg(),Xg(),Fg()}}function Vg(){if(kt===1){kt=0;var e=rr,t=Ho,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=S.T,S.T=null;var l=_.p;_.p=2;var c=Je;Je|=4;try{Ag(t,e);var f=Hf,b=Dh(e.containerInfo),E=f.focusedElem,L=f.selectionRange;if(b!==E&&E&&E.ownerDocument&&Oh(E.ownerDocument.documentElement,E)){if(L!==null&&iu(E)){var F=L.start,re=L.end;if(re===void 0&&(re=F),"selectionStart"in E)E.selectionStart=F,E.selectionEnd=Math.min(re,E.value.length);else{var ce=E.ownerDocument||document,W=ce&&ce.defaultView||window;if(W.getSelection){var ee=W.getSelection(),ve=E.textContent.length,Oe=Math.min(L.start,ve),ot=L.end===void 0?Oe:Math.min(L.end,ve);!ee.extend&&Oe>ot&&(b=ot,ot=Oe,Oe=b);var G=Rh(E,Oe),U=Rh(E,ot);if(G&&U&&(ee.rangeCount!==1||ee.anchorNode!==G.node||ee.anchorOffset!==G.offset||ee.focusNode!==U.node||ee.focusOffset!==U.offset)){var X=ce.createRange();X.setStart(G.node,G.offset),ee.removeAllRanges(),Oe>ot?(ee.addRange(X),ee.extend(U.node,U.offset)):(X.setEnd(U.node,U.offset),ee.addRange(X))}}}}for(ce=[],ee=E;ee=ee.parentNode;)ee.nodeType===1&&ce.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ce.length;E++){var le=ce[E];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Rs=!!Lf,Hf=Lf=null}finally{Je=c,_.p=l,S.T=a}}e.current=t,kt=2}}function Xg(){if(kt===2){kt=0;var e=rr,t=Ho,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=S.T,S.T=null;var l=_.p;_.p=2;var c=Je;Je|=4;try{Sg(e,t.alternate,t)}finally{Je=c,_.p=l,S.T=a}}kt=3}}function Fg(){if(kt===4||kt===3){kt=0,Ht();var e=rr,t=Ho,a=ja,l=zg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?kt=5:(kt=0,Ho=rr=null,Kg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(ar=null),me(a),t=t.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(pn,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=S.T,c=_.p,_.p=2,S.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var E=l[b];f(E.value,{componentStack:E.stack})}}finally{S.T=t,_.p=c}}(ja&3)!==0&&vs(),ra(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Ef?Pl++:(Pl=0,Ef=e):Pl=0,$l(0)}}function Kg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wl(t)))}function vs(){return Vg(),Xg(),Fg(),Qg()}function Qg(){if(kt!==5)return!1;var e=rr,t=Sf;Sf=0;var a=me(ja),l=S.T,c=_.p;try{_.p=32>a?32:a,S.T=null,a=wf,wf=null;var f=rr,b=ja;if(kt=0,Ho=rr=null,ja=0,(Je&6)!==0)throw Error(i(331));var E=Je;if(Je|=4,Og(f.current),_g(f,f.current,b,a),Je=E,$l(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(pn,f)}catch{}return!0}finally{_.p=c,S.T=l,Kg(e,t)}}function Zg(e,t,a){t=jn(a,t),t=ef(e.stateNode,t,2),e=Za(e,t,2),e!==null&&(ut(e,2),ra(e))}function nt(e,t,a){if(e.tag===3)Zg(e,e,a);else for(;t!==null;){if(t.tag===3){Zg(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ar===null||!ar.has(l))){e=jn(a,e),a=Wp(2),l=Za(t,a,2),l!==null&&(Jp(a,l,t,e),ut(l,2),ra(l));break}}t=t.return}}function Af(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ow;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(vf=!0,c.add(a),e=Lw.bind(null,e,t,a),t.then(e,e))}function Lw(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,lt===e&&(qe&a)===a&&(St===4||St===3&&(qe&62914560)===qe&&300>jt()-ds?(Je&2)===0&&Bo(e,0):bf|=a,Lo===qe&&(Lo=0)),ra(e)}function Wg(e,t){t===0&&(t=Ut()),e=Br(e,t),e!==null&&(ut(e,t),ra(e))}function Hw(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Wg(e,a)}function Bw(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(t),Wg(e,a)}function Uw(e,t){return Ne(e,t)}var bs=null,Io=null,Mf=!1,xs=!1,_f=!1,lr=0;function ra(e){e!==Io&&e.next===null&&(Io===null?bs=Io=e:Io=Io.next=e),xs=!0,Mf||(Mf=!0,Pw())}function $l(e,t){if(!_f&&xs){_f=!0;do for(var a=!1,l=bs;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,E=l.pingedLanes;f=(1<<31-zt(42|e)+1)-1,f&=c&~(b&~E),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,ny(l,f))}else f=qe,f=De(l,l===lt?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||it(l,f)||(a=!0,ny(l,f));l=l.next}while(a);_f=!1}}function Iw(){Jg()}function Jg(){xs=Mf=!1;var e=0;lr!==0&&Zw()&&(e=lr);for(var t=jt(),a=null,l=bs;l!==null;){var c=l.next,f=ey(l,t);f===0?(l.next=null,a===null?bs=c:a.next=c,c===null&&(Io=a)):(a=l,(e!==0||(f&3)!==0)&&(xs=!0)),l=c}kt!==0&&kt!==5||$l(e),lr!==0&&(lr=0)}function ey(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-zt(f),E=1<<b,L=c[b];L===-1?((E&a)===0||(E&l)!==0)&&(c[b]=_t(E,t)):L<=t&&(e.expiredLanes|=E),f&=~E}if(t=lt,a=qe,a=De(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&tn(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||it(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&tn(l),me(a)){case 2:case 8:a=Mt;break;case 32:a=$n;break;case 268435456:a=nn;break;default:a=$n}return l=ty.bind(null,e),a=Ne(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&tn(l),e.callbackPriority=2,e.callbackNode=null,2}function ty(e,t){if(kt!==0&&kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(vs()&&e.callbackNode!==a)return null;var l=qe;return l=De(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Lg(e,l,t),ey(e,jt()),e.callbackNode!=null&&e.callbackNode===a?ty.bind(null,e):null)}function ny(e,t){if(vs())return null;Lg(e,t,!0)}function Pw(){Jw(function(){(Je&6)!==0?Ne(At,Iw):Jg()})}function Nf(){if(lr===0){var e=To;e===0&&(e=Pa,Pa<<=1,(Pa&261888)===0&&(Pa=256)),lr=e}return lr}function ay(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_i(""+e)}function ry(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function $w(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var f=ay((c[He]||null).action),b=l.submitter;b&&(t=(t=b[He]||null)?ay(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var E=new Di("action","action",null,l,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(lr!==0){var L=b?ry(c,b):new FormData(c);Fu(a,{pending:!0,data:L,method:c.method,action:f},null,L)}}else typeof f=="function"&&(E.preventDefault(),L=b?ry(c,b):new FormData(c),Fu(a,{pending:!0,data:L,method:c.method,action:f},f,L))},currentTarget:c}]})}}for(var Rf=0;Rf<fu.length;Rf++){var Of=fu[Rf],Gw=Of.toLowerCase(),Yw=Of[0].toUpperCase()+Of.slice(1);qn(Gw,"on"+Yw)}qn(kh,"onAnimationEnd"),qn(Lh,"onAnimationIteration"),qn(Hh,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn(lw,"onTransitionRun"),qn(iw,"onTransitionStart"),qn(sw,"onTransitionCancel"),qn(Bh,"onTransitionEnd"),uo("onMouseEnter",["mouseout","mouseover"]),uo("onMouseLeave",["mouseout","mouseover"]),uo("onPointerEnter",["pointerout","pointerover"]),uo("onPointerLeave",["pointerout","pointerover"]),ga("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ga("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ga("onBeforeInput",["compositionend","keypress","textInput","paste"]),ga("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ga("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ga("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gl="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(" "),qw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gl));function oy(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var b=l.length-1;0<=b;b--){var E=l[b],L=E.instance,F=E.currentTarget;if(E=E.listener,L!==f&&c.isPropagationStopped())break e;f=E,c.currentTarget=F;try{f(c)}catch(re){ki(re)}c.currentTarget=null,f=L}else for(b=0;b<l.length;b++){if(E=l[b],L=E.instance,F=E.currentTarget,E=E.listener,L!==f&&c.isPropagationStopped())break e;f=E,c.currentTarget=F;try{f(c)}catch(re){ki(re)}c.currentTarget=null,f=L}}}}function Ye(e,t){var a=t[Qt];a===void 0&&(a=t[Qt]=new Set);var l=e+"__bubble";a.has(l)||(ly(t,e,2,!1),a.add(l))}function Df(e,t,a){var l=0;t&&(l|=4),ly(a,e,l,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function jf(e){if(!e[Ss]){e[Ss]=!0,zr.forEach(function(a){a!=="selectionchange"&&(qw.has(a)||Df(a,!1,e),Df(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,Df("selectionchange",!1,t))}}function ly(e,t,a,l){switch(ky(t)){case 2:var c=b2;break;case 8:c=x2;break;default:c=Ff}a=c.bind(null,t,a,e),c=void 0,!Wc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function zf(e,t,a,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var E=l.stateNode.containerInfo;if(E===c)break;if(b===4)for(b=l.return;b!==null;){var L=b.tag;if((L===3||L===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;E!==null;){if(b=yt(E),b===null)return;if(L=b.tag,L===5||L===6||L===26||L===27){l=f=b;continue e}E=E.parentNode}}l=l.return}fh(function(){var F=f,re=Qc(a),ce=[];e:{var W=Uh.get(e);if(W!==void 0){var ee=Di,ve=e;switch(e){case"keypress":if(Ri(a)===0)break e;case"keydown":case"keyup":ee=BS;break;case"focusin":ve="focus",ee=nu;break;case"focusout":ve="blur",ee=nu;break;case"beforeblur":case"afterblur":ee=nu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=AS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=PS;break;case kh:case Lh:case Hh:ee=NS;break;case Bh:ee=GS;break;case"scroll":case"scrollend":ee=CS;break;case"wheel":ee=qS;break;case"copy":case"cut":case"paste":ee=OS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=gh;break;case"toggle":case"beforetoggle":ee=XS}var Oe=(t&4)!==0,ot=!Oe&&(e==="scroll"||e==="scrollend"),G=Oe?W!==null?W+"Capture":null:W;Oe=[];for(var U=F,X;U!==null;){var le=U;if(X=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||X===null||G===null||(le=fl(U,G),le!=null&&Oe.push(Yl(U,le,X))),ot)break;U=U.return}0<Oe.length&&(W=new ee(W,ve,null,a,re),ce.push({event:W,listeners:Oe}))}}if((t&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",W&&a!==Kc&&(ve=a.relatedTarget||a.fromElement)&&(yt(ve)||ve[We]))break e;if((ee||W)&&(W=re.window===re?re:(W=re.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(ve=a.relatedTarget||a.toElement,ee=F,ve=ve?yt(ve):null,ve!==null&&(ot=u(ve),Oe=ve.tag,ve!==ot||Oe!==5&&Oe!==27&&Oe!==6)&&(ve=null)):(ee=null,ve=F),ee!==ve)){if(Oe=hh,le="onMouseLeave",G="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=gh,le="onPointerLeave",G="onPointerEnter",U="pointer"),ot=ee==null?W:Nn(ee),X=ve==null?W:Nn(ve),W=new Oe(le,U+"leave",ee,a,re),W.target=ot,W.relatedTarget=X,le=null,yt(re)===F&&(Oe=new Oe(G,U+"enter",ve,a,re),Oe.target=X,Oe.relatedTarget=ot,le=Oe),ot=le,ee&&ve)t:{for(Oe=Vw,G=ee,U=ve,X=0,le=G;le;le=Oe(le))X++;le=0;for(var _e=U;_e;_e=Oe(_e))le++;for(;0<X-le;)G=Oe(G),X--;for(;0<le-X;)U=Oe(U),le--;for(;X--;){if(G===U||U!==null&&G===U.alternate){Oe=G;break t}G=Oe(G),U=Oe(U)}Oe=null}else Oe=null;ee!==null&&iy(ce,W,ee,Oe,!1),ve!==null&&ot!==null&&iy(ce,ot,ve,Oe,!0)}}e:{if(W=F?Nn(F):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var Qe=Ch;else if(wh(W))if(Th)Qe=aw;else{Qe=tw;var Ae=ew}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?F&&Fc(F.elementType)&&(Qe=Ch):Qe=nw;if(Qe&&(Qe=Qe(e,F))){Eh(ce,Qe,a,re);break e}Ae&&Ae(e,W,F),e==="focusout"&&F&&W.type==="number"&&F.memoizedProps.value!=null&&Xc(W,"number",W.value)}switch(Ae=F?Nn(F):window,e){case"focusin":(wh(Ae)||Ae.contentEditable==="true")&&(yo=Ae,su=F,bl=null);break;case"focusout":bl=su=yo=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,jh(ce,a,re);break;case"selectionchange":if(ow)break;case"keydown":case"keyup":jh(ce,a,re)}var Le;if(ru)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else go?xh(e,a)&&(Ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ve="onCompositionStart");Ve&&(yh&&a.locale!=="ko"&&(go||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&go&&(Le=dh()):(Ya=re,Jc="value"in Ya?Ya.value:Ya.textContent,go=!0)),Ae=ws(F,Ve),0<Ae.length&&(Ve=new ph(Ve,e,null,a,re),ce.push({event:Ve,listeners:Ae}),Le?Ve.data=Le:(Le=Sh(a),Le!==null&&(Ve.data=Le)))),(Le=KS?QS(e,a):ZS(e,a))&&(Ve=ws(F,"onBeforeInput"),0<Ve.length&&(Ae=new ph("onBeforeInput","beforeinput",null,a,re),ce.push({event:Ae,listeners:Ve}),Ae.data=Le)),$w(ce,e,F,a,re)}oy(ce,t)})}function Yl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ws(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=fl(e,a),c!=null&&l.unshift(Yl(e,c,f)),c=fl(e,t),c!=null&&l.push(Yl(e,c,f))),e.tag===3)return l;e=e.return}return[]}function Vw(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function iy(e,t,a,l,c){for(var f=t._reactName,b=[];a!==null&&a!==l;){var E=a,L=E.alternate,F=E.stateNode;if(E=E.tag,L!==null&&L===l)break;E!==5&&E!==26&&E!==27||F===null||(L=F,c?(F=fl(a,f),F!=null&&b.unshift(Yl(a,F,L))):c||(F=fl(a,f),F!=null&&b.push(Yl(a,F,L)))),a=a.return}b.length!==0&&e.push({event:t,listeners:b})}var Xw=/\r\n?/g,Fw=/\u0000|\uFFFD/g;function sy(e){return(typeof e=="string"?e:""+e).replace(Xw,`
|
|
49
|
+
`).replace(Fw,"")}function cy(e,t){return t=sy(t),sy(e)===t}function rt(e,t,a,l,c,f){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||mo(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&mo(e,""+l);break;case"className":Ai(e,"class",l);break;case"tabIndex":Ai(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ai(e,a,l);break;case"style":ch(e,l,f);break;case"data":if(t!=="object"){Ai(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=_i(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(t!=="input"&&rt(e,t,"name",c.name,c,null),rt(e,t,"formEncType",c.formEncType,c,null),rt(e,t,"formMethod",c.formMethod,c,null),rt(e,t,"formTarget",c.formTarget,c,null)):(rt(e,t,"encType",c.encType,c,null),rt(e,t,"method",c.method,c,null),rt(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=_i(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=va);break;case"onScroll":l!=null&&Ye("scroll",e);break;case"onScrollEnd":l!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=_i(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),Ti(e,"popover",l);break;case"xlinkActuate":ya(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ya(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ya(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ya(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ya(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ya(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ya(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ya(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ya(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ti(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=wS.get(a)||a,Ti(e,a,l))}}function kf(e,t,a,l,c,f){switch(a){case"style":ch(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof l=="string"?mo(e,l):(typeof l=="number"||typeof l=="bigint")&&mo(e,""+l);break;case"onScroll":l!=null&&Ye("scroll",e);break;case"onScrollEnd":l!=null&&Ye("scrollend",e);break;case"onClick":l!=null&&(e.onclick=va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!co.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[He]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Ti(e,a,l)}}}function qt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var l=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var b=a[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:rt(e,t,f,b,a,null)}}c&&rt(e,t,"srcSet",a.srcSet,a,null),l&&rt(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var E=f=b=c=null,L=null,F=null;for(l in a)if(a.hasOwnProperty(l)){var re=a[l];if(re!=null)switch(l){case"name":c=re;break;case"type":b=re;break;case"checked":L=re;break;case"defaultChecked":F=re;break;case"value":f=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,t));break;default:rt(e,t,l,re,a,null)}}oh(e,f,E,L,F,b,c,!1);return;case"select":Ye("invalid",e),l=b=f=null;for(c in a)if(a.hasOwnProperty(c)&&(E=a[c],E!=null))switch(c){case"value":f=E;break;case"defaultValue":b=E;break;case"multiple":l=E;default:rt(e,t,c,E,a,null)}t=f,a=b,e.multiple=!!l,t!=null?fo(e,!!l,t,!1):a!=null&&fo(e,!!l,a,!0);return;case"textarea":Ye("invalid",e),f=c=l=null;for(b in a)if(a.hasOwnProperty(b)&&(E=a[b],E!=null))switch(b){case"value":l=E;break;case"defaultValue":c=E;break;case"children":f=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:rt(e,t,b,E,a,null)}ih(e,l,c,f);return;case"option":for(L in a)if(a.hasOwnProperty(L)&&(l=a[L],l!=null))switch(L){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:rt(e,t,L,l,a,null)}return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(l=0;l<Gl.length;l++)Ye(Gl[l],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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(F in a)if(a.hasOwnProperty(F)&&(l=a[F],l!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:rt(e,t,F,l,a,null)}return;default:if(Fc(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&kf(e,t,re,l,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null&&rt(e,t,E,l,a,null))}function Kw(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,E=null,L=null,F=null,re=null;for(ee in a){var ce=a[ee];if(a.hasOwnProperty(ee)&&ce!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":L=ce;default:l.hasOwnProperty(ee)||rt(e,t,ee,null,l,ce)}}for(var W in l){var ee=l[W];if(ce=a[W],l.hasOwnProperty(W)&&(ee!=null||ce!=null))switch(W){case"type":f=ee;break;case"name":c=ee;break;case"checked":F=ee;break;case"defaultChecked":re=ee;break;case"value":b=ee;break;case"defaultValue":E=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,t));break;default:ee!==ce&&rt(e,t,W,ee,l,ce)}}Vc(e,b,E,L,F,re,f,c);return;case"select":ee=b=E=W=null;for(f in a)if(L=a[f],a.hasOwnProperty(f)&&L!=null)switch(f){case"value":break;case"multiple":ee=L;default:l.hasOwnProperty(f)||rt(e,t,f,null,l,L)}for(c in l)if(f=l[c],L=a[c],l.hasOwnProperty(c)&&(f!=null||L!=null))switch(c){case"value":W=f;break;case"defaultValue":E=f;break;case"multiple":b=f;default:f!==L&&rt(e,t,c,f,l,L)}t=E,a=b,l=ee,W!=null?fo(e,!!a,W,!1):!!l!=!!a&&(t!=null?fo(e,!!a,t,!0):fo(e,!!a,a?[]:"",!1));return;case"textarea":ee=W=null;for(E in a)if(c=a[E],a.hasOwnProperty(E)&&c!=null&&!l.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:rt(e,t,E,null,l,c)}for(b in l)if(c=l[b],f=a[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":W=c;break;case"defaultValue":ee=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==f&&rt(e,t,b,c,l,f)}lh(e,W,ee);return;case"option":for(var ve in a)if(W=a[ve],a.hasOwnProperty(ve)&&W!=null&&!l.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:rt(e,t,ve,null,l,W)}for(L in l)if(W=l[L],ee=a[L],l.hasOwnProperty(L)&&W!==ee&&(W!=null||ee!=null))switch(L){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:rt(e,t,L,W,l,ee)}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 a)W=a[Oe],a.hasOwnProperty(Oe)&&W!=null&&!l.hasOwnProperty(Oe)&&rt(e,t,Oe,null,l,W);for(F in l)if(W=l[F],ee=a[F],l.hasOwnProperty(F)&&W!==ee&&(W!=null||ee!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(137,t));break;default:rt(e,t,F,W,l,ee)}return;default:if(Fc(t)){for(var ot in a)W=a[ot],a.hasOwnProperty(ot)&&W!==void 0&&!l.hasOwnProperty(ot)&&kf(e,t,ot,void 0,l,W);for(re in l)W=l[re],ee=a[re],!l.hasOwnProperty(re)||W===ee||W===void 0&&ee===void 0||kf(e,t,re,W,l,ee);return}}for(var G in a)W=a[G],a.hasOwnProperty(G)&&W!=null&&!l.hasOwnProperty(G)&&rt(e,t,G,null,l,W);for(ce in l)W=l[ce],ee=a[ce],!l.hasOwnProperty(ce)||W===ee||W==null&&ee==null||rt(e,t,ce,W,l,ee)}function uy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Qw(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],f=c.transferSize,b=c.initiatorType,E=c.duration;if(f&&E&&uy(b)){for(b=0,E=c.responseEnd,l+=1;l<a.length;l++){var L=a[l],F=L.startTime;if(F>E)break;var re=L.transferSize,ce=L.initiatorType;re&&uy(ce)&&(L=L.responseEnd,b+=re*(L<E?1:(E-F)/(L-F)))}if(--l,t+=8*(f+b)/(c.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 Lf=null,Hf=null;function Es(e){return e.nodeType===9?e:e.ownerDocument}function fy(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 dy(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 Bf(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 Uf=null;function Zw(){var e=window.event;return e&&e.type==="popstate"?e===Uf?!1:(Uf=e,!0):(Uf=null,!1)}var my=typeof setTimeout=="function"?setTimeout:void 0,Ww=typeof clearTimeout=="function"?clearTimeout:void 0,hy=typeof Promise=="function"?Promise:void 0,Jw=typeof queueMicrotask=="function"?queueMicrotask:typeof hy<"u"?function(e){return hy.resolve(null).then(e).catch(e2)}:my;function e2(e){setTimeout(function(){throw e})}function ir(e){return e==="head"}function py(e,t){var a=t,l=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(c),Yo(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ql(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ql(a);for(var f=a.firstChild;f;){var b=f.nextSibling,E=f.nodeName;f[gt]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=b}}else a==="body"&&ql(e.ownerDocument.body);a=c}while(a);Yo(t)}function gy(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function If(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":If(a),Yn(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function t2(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[gt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Bn(e.nextSibling),e===null)break}return null}function n2(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Bn(e.nextSibling),e===null))return null;return e}function yy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Bn(e.nextSibling),e===null))return null;return e}function Pf(e){return e.data==="$?"||e.data==="$~"}function $f(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function a2(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Bn(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 Gf=null;function vy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Bn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function by(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function xy(e,t,a){switch(t=Es(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ql(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yn(e)}var Un=new Map,Sy=new Set;function Cs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var za=_.d;_.d={f:r2,r:o2,D:l2,C:i2,L:s2,m:c2,X:f2,S:u2,M:d2};function r2(){var e=za.f(),t=ps();return e||t}function o2(e){var t=on(e);t!==null&&t.tag===5&&t.type==="form"?Bp(t):za.r(e)}var Po=typeof document>"u"?null:document;function wy(e,t,a){var l=Po;if(l&&typeof t=="string"&&t){var c=On(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Sy.has(c)||(Sy.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),qt(t,"link",e),bt(t),l.head.appendChild(t)))}}function l2(e){za.D(e),wy("dns-prefetch",e,null)}function i2(e,t){za.C(e,t),wy("preconnect",e,t)}function s2(e,t,a){za.L(e,t,a);var l=Po;if(l&&e&&t){var c='link[rel="preload"][as="'+On(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+On(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+On(a.imageSizes)+'"]')):c+='[href="'+On(e)+'"]';var f=c;switch(t){case"style":f=$o(e);break;case"script":f=Go(e)}Un.has(f)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Un.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Vl(f))||t==="script"&&l.querySelector(Xl(f))||(t=l.createElement("link"),qt(t,"link",e),bt(t),l.head.appendChild(t)))}}function c2(e,t){za.m(e,t);var a=Po;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+On(l)+'"][href="'+On(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Go(e)}if(!Un.has(f)&&(e=y({rel:"modulepreload",href:e},t),Un.set(f,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Xl(f)))return}l=a.createElement("link"),qt(l,"link",e),bt(l),a.head.appendChild(l)}}}function u2(e,t,a){za.S(e,t,a);var l=Po;if(l&&e){var c=Ga(l).hoistableStyles,f=$o(e);t=t||"default";var b=c.get(f);if(!b){var E={loading:0,preload:null};if(b=l.querySelector(Vl(f)))E.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Un.get(f))&&Yf(e,a);var L=b=l.createElement("link");bt(L),qt(L,"link",e),L._p=new Promise(function(F,re){L.onload=F,L.onerror=re}),L.addEventListener("load",function(){E.loading|=1}),L.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ts(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:E},c.set(f,b)}}}function f2(e,t){za.X(e,t);var a=Po;if(a&&e){var l=Ga(a).hoistableScripts,c=Go(e),f=l.get(c);f||(f=a.querySelector(Xl(c)),f||(e=y({src:e,async:!0},t),(t=Un.get(c))&&qf(e,t),f=a.createElement("script"),bt(f),qt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function d2(e,t){za.M(e,t);var a=Po;if(a&&e){var l=Ga(a).hoistableScripts,c=Go(e),f=l.get(c);f||(f=a.querySelector(Xl(c)),f||(e=y({src:e,async:!0,type:"module"},t),(t=Un.get(c))&&qf(e,t),f=a.createElement("script"),bt(f),qt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Ey(e,t,a,l){var c=(c=ne.current)?Cs(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=$o(a.href),a=Ga(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=$o(a.href);var f=Ga(c).hoistableStyles,b=f.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=c.querySelector(Vl(e)))&&!f._p&&(b.instance=f,b.state.loading=5),Un.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Un.set(e,a),f||m2(c,e,a,b.state))),t&&l===null)throw Error(i(528,""));return b}if(t&&l!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Go(a),a=Ga(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function $o(e){return'href="'+On(e)+'"'}function Vl(e){return'link[rel="stylesheet"]['+e+"]"}function Cy(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function m2(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),qt(t,"link",a),bt(t),e.head.appendChild(t))}function Go(e){return'[src="'+On(e)+'"]'}function Xl(e){return"script[async]"+e}function Ty(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+On(a.href)+'"]');if(l)return t.instance=l,bt(l),l;var c=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),bt(l),qt(l,"style",c),Ts(l,a.precedence,e),t.instance=l;case"stylesheet":c=$o(a.href);var f=e.querySelector(Vl(c));if(f)return t.state.loading|=4,t.instance=f,bt(f),f;l=Cy(a),(c=Un.get(c))&&Yf(l,c),f=(e.ownerDocument||e).createElement("link"),bt(f);var b=f;return b._p=new Promise(function(E,L){b.onload=E,b.onerror=L}),qt(f,"link",l),t.state.loading|=4,Ts(f,a.precedence,e),t.instance=f;case"script":return f=Go(a.src),(c=e.querySelector(Xl(f)))?(t.instance=c,bt(c),c):(l=a,(c=Un.get(f))&&(l=y({},a),qf(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),bt(c),qt(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ts(l,a.precedence,e));return t.instance}function Ts(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var E=l[b];if(E.dataset.precedence===t)f=E;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Yf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var As=null;function Ay(e,t,a){if(As===null){var l=new Map,c=As=new Map;c.set(a,l)}else c=As,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[gt]||f[Ue]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var E=l.get(b);E?E.push(f):l.set(b,[f])}}return l}function My(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function h2(e,t,a){if(a===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 _y(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function p2(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=$o(l.href),f=t.querySelector(Vl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ms.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,bt(f);return}f=t.ownerDocument||t,l=Cy(l),(c=Un.get(c))&&Yf(l,c),f=f.createElement("link"),bt(f);var b=f;b._p=new Promise(function(E,L){b.onload=E,b.onerror=L}),qt(f,"link",l),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ms.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Vf=0;function g2(e,t){return e.stylesheets&&e.count===0&&Ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ns(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Vf===0&&(Vf=62500*Qw());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ns(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Vf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Ms(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _s=null;function Ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_s=new Map,t.forEach(y2,e),_s=null,Ms.call(e))}function y2(e,t){if(!(t.state.loading&4)){var a=_s.get(e);if(a)var l=a.get(null);else{a=new Map,_s.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),l=b)}l&&a.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),f=a.get(b)||l,f===l&&a.set(null,c),a.set(b,c),this.count++,l=Ms.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Fl={$$typeof:H,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function v2(e,t,a,l,c,f,b,E,L){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=Gn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gn(0),this.hiddenUpdates=Gn(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function Ny(e,t,a,l,c,f,b,E,L,F,re,ce){return e=new v2(e,t,a,b,L,F,re,ce,E),t=1,f===!0&&(t|=24),f=vn(3,null,null,t),e.current=f,f.stateNode=e,t=Cu(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:t},_u(f),e}function Ry(e){return e?(e=xo,e):xo}function Oy(e,t,a,l,c,f){c=Ry(c),l.context===null?l.context=c:l.pendingContext=c,l=Qa(t),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=Za(e,l,t),a!==null&&(dn(a,e,t),Al(a,e,t))}function Dy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Xf(e,t){Dy(e,t),(e=e.alternate)&&Dy(e,t)}function jy(e){if(e.tag===13||e.tag===31){var t=Br(e,67108864);t!==null&&dn(t,e,67108864),Xf(e,67108864)}}function zy(e){if(e.tag===13||e.tag===31){var t=En();t=fe(t);var a=Br(e,t);a!==null&&dn(a,e,t),Xf(e,t)}}var Rs=!0;function b2(e,t,a,l){var c=S.T;S.T=null;var f=_.p;try{_.p=2,Ff(e,t,a,l)}finally{_.p=f,S.T=c}}function x2(e,t,a,l){var c=S.T;S.T=null;var f=_.p;try{_.p=8,Ff(e,t,a,l)}finally{_.p=f,S.T=c}}function Ff(e,t,a,l){if(Rs){var c=Kf(l);if(c===null)zf(e,t,l,Os,a),Ly(e,l);else if(w2(c,e,t,a,l))l.stopPropagation();else if(Ly(e,l),t&4&&-1<S2.indexOf(e)){for(;c!==null;){var f=on(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=_n(f.pendingLanes);if(b!==0){var E=f;for(E.pendingLanes|=2,E.entangledLanes|=2;b;){var L=1<<31-zt(b);E.entanglements[1]|=L,b&=~L}ra(f),(Je&6)===0&&(ms=jt()+500,$l(0))}}break;case 31:case 13:E=Br(f,2),E!==null&&dn(E,f,2),ps(),Xf(f,2)}if(f=Kf(l),f===null&&zf(e,t,l,Os,a),f===c)break;c=f}c!==null&&l.stopPropagation()}else zf(e,t,l,null,a)}}function Kf(e){return e=Qc(e),Qf(e)}var Os=null;function Qf(e){if(Os=null,e=yt(e),e!==null){var t=u(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Os=e,null}function ky(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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(jr()){case At:return 2;case Mt:return 8;case $n:case ea:return 32;case nn:return 268435456;default:return 32}default:return 32}}var Zf=!1,sr=null,cr=null,ur=null,Kl=new Map,Ql=new Map,fr=[],S2="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 Ly(e,t){switch(e){case"focusin":case"focusout":sr=null;break;case"dragenter":case"dragleave":cr=null;break;case"mouseover":case"mouseout":ur=null;break;case"pointerover":case"pointerout":Kl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ql.delete(t.pointerId)}}function Zl(e,t,a,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=on(t),t!==null&&jy(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function w2(e,t,a,l,c){switch(t){case"focusin":return sr=Zl(sr,e,t,a,l,c),!0;case"dragenter":return cr=Zl(cr,e,t,a,l,c),!0;case"mouseover":return ur=Zl(ur,e,t,a,l,c),!0;case"pointerover":var f=c.pointerId;return Kl.set(f,Zl(Kl.get(f)||null,e,t,a,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Ql.set(f,Zl(Ql.get(f)||null,e,t,a,l,c)),!0}return!1}function Hy(e){var t=yt(e.target);if(t!==null){var a=u(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,Xe(e.priority,function(){zy(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,Xe(e.priority,function(){zy(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ds(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Kf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Kc=l,a.target.dispatchEvent(l),Kc=null}else return t=on(a),t!==null&&jy(t),e.blockedOn=a,!1;t.shift()}return!0}function By(e,t,a){Ds(e)&&a.delete(t)}function E2(){Zf=!1,sr!==null&&Ds(sr)&&(sr=null),cr!==null&&Ds(cr)&&(cr=null),ur!==null&&Ds(ur)&&(ur=null),Kl.forEach(By),Ql.forEach(By)}function js(e,t){e.blockedOn===t&&(e.blockedOn=null,Zf||(Zf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,E2)))}var zs=null;function Uy(e){zs!==e&&(zs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){zs===e&&(zs=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(Qf(l||a)===null)continue;break}var f=on(a);f!==null&&(e.splice(t,3),t-=3,Fu(f,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Yo(e){function t(L){return js(L,e)}sr!==null&&js(sr,e),cr!==null&&js(cr,e),ur!==null&&js(ur,e),Kl.forEach(t),Ql.forEach(t);for(var a=0;a<fr.length;a++){var l=fr[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<fr.length&&(a=fr[0],a.blockedOn===null);)Hy(a),a.blockedOn===null&&fr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],f=a[l+1],b=c[He]||null;if(typeof f=="function")b||Uy(a);else if(b){var E=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[He]||null)E=b.formAction;else if(Qf(c)!==null)continue}else E=b.action;typeof E=="function"?a[l+1]=E:(a.splice(l,3),l-=3),Uy(a)}}}function Iy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Wf(e){this._internalRoot=e}ks.prototype.render=Wf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,l=En();Oy(a,l,e,t,null,null)},ks.prototype.unmount=Wf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Oy(e.current,2,null,e,null,null),ps(),t[We]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ce();e={blockedOn:null,target:e,priority:t};for(var a=0;a<fr.length&&t!==0&&t<fr[a].priority;a++);fr.splice(a,0,e),a===0&&Hy(e)}};var Py=r.version;if(Py!=="19.2.5")throw Error(i(527,Py,"19.2.5"));_.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var C2={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:S,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ls.isDisabled&&Ls.supportsFiber)try{pn=Ls.inject(C2),Pt=Ls}catch{}}return Jl.createRoot=function(e,t){if(!s(e))throw Error(i(299));var a=!1,l="",c=Fp,f=Kp,b=Qp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=Ny(e,1,!1,null,null,a,l,null,c,f,b,Iy),e[We]=t.current,jf(e),new Wf(t)},Jl.hydrateRoot=function(e,t,a){if(!s(e))throw Error(i(299));var l=!1,c="",f=Fp,b=Kp,E=Qp,L=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(L=a.formState)),t=Ny(e,1,!0,t,a??null,l,c,L,f,b,E,Iy),t.context=Ry(null),a=t.current,l=En(),l=fe(l),c=Qa(l),c.callback=null,Za(a,c,l),a=l,t.current.lanes=a,ut(t,a),ra(t),e[We]=t.current,jf(e),new ks(t)},Jl.version="19.2.5",Jl}var Zy;function z2(){if(Zy)return td.exports;Zy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),td.exports=j2(),td.exports}var k2=z2();const L2=hm(k2);var mi=Ev();const Cv=hm(mi);function H2(n){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}const B2=n=>{switch(n){case"success":return P2;case"info":return G2;case"warning":return $2;case"error":return Y2;default:return null}},U2=Array(12).fill(0),I2=({visible:n,className:r})=>pe.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},pe.createElement("div",{className:"sonner-spinner"},U2.map((o,i)=>pe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),P2=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),$2=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),G2=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Y2=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),q2=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},pe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),pe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),V2=()=>{const[n,r]=pe.useState(document.hidden);return pe.useEffect(()=>{const o=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),n};let kd=1;class X2{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const o=this.subscribers.indexOf(r);this.subscribers.splice(o,1)}),this.publish=r=>{this.subscribers.forEach(o=>o(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var o;const{message:i,...s}=r,u=typeof(r==null?void 0:r.id)=="number"||((o=r.id)==null?void 0:o.length)>0?r.id:kd++,d=this.toasts.find(h=>h.id===u),m=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),d?this.toasts=this.toasts.map(h=>h.id===u?(this.publish({...h,...r,id:u,title:i}),{...h,...r,id:u,dismissible:m,title:i}):h):this.addToast({title:i,...s,dismissible:m,id:u}),u},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:r,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(i=>i({id:o.id,dismiss:!0}))}),r),this.message=(r,o)=>this.create({...o,message:r}),this.error=(r,o)=>this.create({...o,message:r,type:"error"}),this.success=(r,o)=>this.create({...o,type:"success",message:r}),this.info=(r,o)=>this.create({...o,type:"info",message:r}),this.warning=(r,o)=>this.create({...o,type:"warning",message:r}),this.loading=(r,o)=>this.create({...o,type:"loading",message:r}),this.promise=(r,o)=>{if(!o)return;let i;o.loading!==void 0&&(i=this.create({...o,promise:r,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const s=Promise.resolve(r instanceof Function?r():r);let u=i!==void 0,d;const m=s.then(async g=>{if(d=["resolve",g],pe.isValidElement(g))u=!1,this.create({id:i,type:"default",message:g});else if(K2(g)&&!g.ok){u=!1;const y=typeof o.error=="function"?await o.error(`HTTP error! status: ${g.status}`):o.error,w=typeof o.description=="function"?await o.description(`HTTP error! status: ${g.status}`):o.description,C=typeof y=="object"&&!pe.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:w,...C})}else if(g instanceof Error){u=!1;const y=typeof o.error=="function"?await o.error(g):o.error,w=typeof o.description=="function"?await o.description(g):o.description,C=typeof y=="object"&&!pe.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:w,...C})}else if(o.success!==void 0){u=!1;const y=typeof o.success=="function"?await o.success(g):o.success,w=typeof o.description=="function"?await o.description(g):o.description,C=typeof y=="object"&&!pe.isValidElement(y)?y:{message:y};this.create({id:i,type:"success",description:w,...C})}}).catch(async g=>{if(d=["reject",g],o.error!==void 0){u=!1;const x=typeof o.error=="function"?await o.error(g):o.error,y=typeof o.description=="function"?await o.description(g):o.description,T=typeof x=="object"&&!pe.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:y,...T})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),o.finally==null||o.finally.call(o)}),h=()=>new Promise((g,x)=>m.then(()=>d[0]==="reject"?x(d[1]):g(d[1])).catch(x));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(r,o)=>{const i=(o==null?void 0:o.id)||kd++;return this.create({jsx:r(i),id:i,...o}),i},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const mn=new X2,F2=(n,r)=>{const o=(r==null?void 0:r.id)||kd++;return mn.addToast({title:n,...r,id:o}),o},K2=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Q2=F2,Z2=()=>mn.toasts,W2=()=>mn.getActiveToasts(),vr=Object.assign(Q2,{success:mn.success,info:mn.info,warning:mn.warning,error:mn.error,custom:mn.custom,message:mn.message,promise:mn.promise,dismiss:mn.dismiss,loading:mn.loading},{getHistory:Z2,getToasts:W2});H2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Hs(n){return n.label!==void 0}const J2=3,eE="24px",tE="16px",Wy=4e3,nE=356,aE=14,rE=45,oE=200;function oa(...n){return n.filter(Boolean).join(" ")}function lE(n){const[r,o]=n.split("-"),i=[];return r&&i.push(r),o&&i.push(o),i}const iE=n=>{var r,o,i,s,u,d,m,h,g;const{invert:x,toast:y,unstyled:w,interacting:T,setHeights:C,visibleToasts:A,heights:M,index:R,toasts:z,expanded:H,removeToast:Y,defaultRichColors:J,closeButton:$,style:V,cancelButtonStyle:k,actionButtonStyle:K,className:ie="",descriptionClassName:se="",duration:q,position:ue,gap:de,expandByDefault:he,classNames:S,icons:_,closeButtonAriaLabel:D="Close toast"}=n,[O,I]=pe.useState(null),[N,j]=pe.useState(null),[B,P]=pe.useState(!1),[te,ne]=pe.useState(!1),[ae,Z]=pe.useState(!1),[oe,Se]=pe.useState(!1),[Te,we]=pe.useState(!1),[ke,ge]=pe.useState(0),[ct,ht]=pe.useState(0),vt=pe.useRef(y.duration||q||Wy),Xt=pe.useRef(null),Me=pe.useRef(null),Ne=R===0,tn=R+1<=A,pt=y.type,Ht=y.dismissible!==!1,jt=y.className||"",jr=y.descriptionClassName||"",At=pe.useMemo(()=>M.findIndex(De=>De.toastId===y.id)||0,[M,y.id]),Mt=pe.useMemo(()=>{var De;return(De=y.closeButton)!=null?De:$},[y.closeButton,$]),$n=pe.useMemo(()=>y.duration||q||Wy,[y.duration,q]),ea=pe.useRef(0),nn=pe.useRef(0),da=pe.useRef(0),Bt=pe.useRef(null),[pn,Pt]=ue.split("-"),gn=pe.useMemo(()=>M.reduce((De,it,_t)=>_t>=At?De:De+it.height,0),[M,At]),zt=V2(),so=y.invert||x,ma=pt==="loading";nn.current=pe.useMemo(()=>At*de+gn,[At,gn]),pe.useEffect(()=>{vt.current=$n},[$n]),pe.useEffect(()=>{P(!0)},[]),pe.useEffect(()=>{const De=Me.current;if(De){const it=De.getBoundingClientRect().height;return ht(it),C(_t=>[{toastId:y.id,height:it,position:y.position},..._t]),()=>C(_t=>_t.filter(Ut=>Ut.toastId!==y.id))}},[C,y.id]),pe.useLayoutEffect(()=>{if(!B)return;const De=Me.current,it=De.style.height;De.style.height="auto";const _t=De.getBoundingClientRect().height;De.style.height=it,ht(_t),C(Ut=>Ut.find(ut=>ut.toastId===y.id)?Ut.map(ut=>ut.toastId===y.id?{...ut,height:_t}:ut):[{toastId:y.id,height:_t,position:y.position},...Ut])},[B,y.title,y.description,C,y.id,y.jsx,y.action,y.cancel]);const Mn=pe.useCallback(()=>{ne(!0),ge(nn.current),C(De=>De.filter(it=>it.toastId!==y.id)),setTimeout(()=>{Y(y)},oE)},[y,Y,C,nn]);pe.useEffect(()=>{if(y.promise&&pt==="loading"||y.duration===1/0||y.type==="loading")return;let De;return H||T||zt?(()=>{if(da.current<ea.current){const Ut=new Date().getTime()-ea.current;vt.current=vt.current-Ut}da.current=new Date().getTime()})():(()=>{vt.current!==1/0&&(ea.current=new Date().getTime(),De=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),Mn()},vt.current))})(),()=>clearTimeout(De)},[H,T,y,pt,zt,Mn]),pe.useEffect(()=>{y.delete&&(Mn(),y.onDismiss==null||y.onDismiss.call(y,y))},[Mn,y.delete]);function Pa(){var De;if(_!=null&&_.loading){var it;return pe.createElement("div",{className:oa(S==null?void 0:S.loader,y==null||(it=y.classNames)==null?void 0:it.loader,"sonner-loader"),"data-visible":pt==="loading"},_.loading)}return pe.createElement(I2,{className:oa(S==null?void 0:S.loader,y==null||(De=y.classNames)==null?void 0:De.loader),visible:pt==="loading"})}const $a=y.icon||(_==null?void 0:_[pt])||B2(pt);var ha,_n;return pe.createElement("li",{tabIndex:0,ref:Me,className:oa(ie,jt,S==null?void 0:S.toast,y==null||(r=y.classNames)==null?void 0:r.toast,S==null?void 0:S.default,S==null?void 0:S[pt],y==null||(o=y.classNames)==null?void 0:o[pt]),"data-sonner-toast":"","data-rich-colors":(ha=y.richColors)!=null?ha:J,"data-styled":!(y.jsx||y.unstyled||w),"data-mounted":B,"data-promise":!!y.promise,"data-swiped":Te,"data-removed":te,"data-visible":tn,"data-y-position":pn,"data-x-position":Pt,"data-index":R,"data-front":Ne,"data-swiping":ae,"data-dismissible":Ht,"data-type":pt,"data-invert":so,"data-swipe-out":oe,"data-swipe-direction":N,"data-expanded":!!(H||he&&B),"data-testid":y.testId,style:{"--index":R,"--toasts-before":R,"--z-index":z.length-R,"--offset":`${te?ke:nn.current}px`,"--initial-height":he?"auto":`${ct}px`,...V,...y.style},onDragEnd:()=>{Z(!1),I(null),Bt.current=null},onPointerDown:De=>{De.button!==2&&(ma||!Ht||(Xt.current=new Date,ge(nn.current),De.target.setPointerCapture(De.pointerId),De.target.tagName!=="BUTTON"&&(Z(!0),Bt.current={x:De.clientX,y:De.clientY})))},onPointerUp:()=>{var De,it,_t;if(oe||!Ht)return;Bt.current=null;const Ut=Number(((De=Me.current)==null?void 0:De.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Gn=Number(((it=Me.current)==null?void 0:it.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ut=new Date().getTime()-((_t=Xt.current)==null?void 0:_t.getTime()),Ft=O==="x"?Ut:Gn,pa=Math.abs(Ft)/ut;if(Math.abs(Ft)>=rE||pa>.11){ge(nn.current),y.onDismiss==null||y.onDismiss.call(y,y),j(O==="x"?Ut>0?"right":"left":Gn>0?"down":"up"),Mn(),Se(!0);return}else{var Kt,Q;(Kt=Me.current)==null||Kt.style.setProperty("--swipe-amount-x","0px"),(Q=Me.current)==null||Q.style.setProperty("--swipe-amount-y","0px")}we(!1),Z(!1),I(null)},onPointerMove:De=>{var it,_t,Ut;if(!Bt.current||!Ht||((it=window.getSelection())==null?void 0:it.toString().length)>0)return;const ut=De.clientY-Bt.current.y,Ft=De.clientX-Bt.current.x;var pa;const Kt=(pa=n.swipeDirections)!=null?pa:lE(ue);!O&&(Math.abs(Ft)>1||Math.abs(ut)>1)&&I(Math.abs(Ft)>Math.abs(ut)?"x":"y");let Q={x:0,y:0};const fe=me=>1/(1.5+Math.abs(me)/20);if(O==="y"){if(Kt.includes("top")||Kt.includes("bottom"))if(Kt.includes("top")&&ut<0||Kt.includes("bottom")&&ut>0)Q.y=ut;else{const me=ut*fe(ut);Q.y=Math.abs(me)<Math.abs(ut)?me:ut}}else if(O==="x"&&(Kt.includes("left")||Kt.includes("right")))if(Kt.includes("left")&&Ft<0||Kt.includes("right")&&Ft>0)Q.x=Ft;else{const me=Ft*fe(Ft);Q.x=Math.abs(me)<Math.abs(Ft)?me:Ft}(Math.abs(Q.x)>0||Math.abs(Q.y)>0)&&we(!0),(_t=Me.current)==null||_t.style.setProperty("--swipe-amount-x",`${Q.x}px`),(Ut=Me.current)==null||Ut.style.setProperty("--swipe-amount-y",`${Q.y}px`)}},Mt&&!y.jsx&&pt!=="loading"?pe.createElement("button",{"aria-label":D,"data-disabled":ma,"data-close-button":!0,onClick:ma||!Ht?()=>{}:()=>{Mn(),y.onDismiss==null||y.onDismiss.call(y,y)},className:oa(S==null?void 0:S.closeButton,y==null||(i=y.classNames)==null?void 0:i.closeButton)},(_n=_==null?void 0:_.close)!=null?_n:q2):null,(pt||y.icon||y.promise)&&y.icon!==null&&((_==null?void 0:_[pt])!==null||y.icon)?pe.createElement("div",{"data-icon":"",className:oa(S==null?void 0:S.icon,y==null||(s=y.classNames)==null?void 0:s.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||Pa():null,y.type!=="loading"?$a:null):null,pe.createElement("div",{"data-content":"",className:oa(S==null?void 0:S.content,y==null||(u=y.classNames)==null?void 0:u.content)},pe.createElement("div",{"data-title":"",className:oa(S==null?void 0:S.title,y==null||(d=y.classNames)==null?void 0:d.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?pe.createElement("div",{"data-description":"",className:oa(se,jr,S==null?void 0:S.description,y==null||(m=y.classNames)==null?void 0:m.description)},typeof y.description=="function"?y.description():y.description):null),pe.isValidElement(y.cancel)?y.cancel:y.cancel&&Hs(y.cancel)?pe.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||k,onClick:De=>{Hs(y.cancel)&&Ht&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,De),Mn())},className:oa(S==null?void 0:S.cancelButton,y==null||(h=y.classNames)==null?void 0:h.cancelButton)},y.cancel.label):null,pe.isValidElement(y.action)?y.action:y.action&&Hs(y.action)?pe.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||K,onClick:De=>{Hs(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,De),!De.defaultPrevented&&Mn())},className:oa(S==null?void 0:S.actionButton,y==null||(g=y.classNames)==null?void 0:g.actionButton)},y.action.label):null)};function Jy(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function sE(n,r){const o={};return[n,r].forEach((i,s)=>{const u=s===1,d=u?"--mobile-offset":"--offset",m=u?tE:eE;function h(g){["top","right","bottom","left"].forEach(x=>{o[`${d}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?o[`${d}-${g}`]=m:o[`${d}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):h(m)}),o}const cE=pe.forwardRef(function(r,o){const{id:i,invert:s,position:u="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:h,className:g,offset:x,mobileOffset:y,theme:w="light",richColors:T,duration:C,style:A,visibleToasts:M=J2,toastOptions:R,dir:z=Jy(),gap:H=aE,icons:Y,containerAriaLabel:J="Notifications"}=r,[$,V]=pe.useState([]),k=pe.useMemo(()=>i?$.filter(B=>B.toasterId===i):$.filter(B=>!B.toasterId),[$,i]),K=pe.useMemo(()=>Array.from(new Set([u].concat(k.filter(B=>B.position).map(B=>B.position)))),[k,u]),[ie,se]=pe.useState([]),[q,ue]=pe.useState(!1),[de,he]=pe.useState(!1),[S,_]=pe.useState(w!=="system"?w:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=pe.useRef(null),O=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=pe.useRef(null),N=pe.useRef(!1),j=pe.useCallback(B=>{V(P=>{var te;return(te=P.find(ne=>ne.id===B.id))!=null&&te.delete||mn.dismiss(B.id),P.filter(({id:ne})=>ne!==B.id)})},[]);return pe.useEffect(()=>mn.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{V(P=>P.map(te=>te.id===B.id?{...te,delete:!0}:te))});return}setTimeout(()=>{Cv.flushSync(()=>{V(P=>{const te=P.findIndex(ne=>ne.id===B.id);return te!==-1?[...P.slice(0,te),{...P[te],...B},...P.slice(te+1)]:[B,...P]})})})}),[$]),pe.useEffect(()=>{if(w!=="system"){_(w);return}if(w==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:P})=>{_(P?"dark":"light")})}catch{B.addListener(({matches:te})=>{try{_(te?"dark":"light")}catch(ne){console.error(ne)}})}},[w]),pe.useEffect(()=>{$.length<=1&&ue(!1)},[$]),pe.useEffect(()=>{const B=P=>{var te;if(d.every(Z=>P[Z]||P.code===Z)){var ae;ue(!0),(ae=D.current)==null||ae.focus()}P.code==="Escape"&&(document.activeElement===D.current||(te=D.current)!=null&&te.contains(document.activeElement))&&ue(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[d]),pe.useEffect(()=>{if(D.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,N.current=!1)}},[D.current]),pe.createElement("section",{ref:o,"aria-label":`${J} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},K.map((B,P)=>{var te;const[ne,ae]=B.split("-");return k.length?pe.createElement("ol",{key:B,dir:z==="auto"?Jy():z,tabIndex:-1,ref:D,className:g,"data-sonner-toaster":!0,"data-sonner-theme":S,"data-y-position":ne,"data-x-position":ae,style:{"--front-toast-height":`${((te=ie[0])==null?void 0:te.height)||0}px`,"--width":`${nE}px`,"--gap":`${H}px`,...A,...sE(x,y)},onBlur:Z=>{N.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(N.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||N.current||(N.current=!0,I.current=Z.relatedTarget)},onMouseEnter:()=>ue(!0),onMouseMove:()=>ue(!0),onMouseLeave:()=>{de||ue(!1)},onDragEnd:()=>ue(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||he(!0)},onPointerUp:()=>he(!1)},k.filter(Z=>!Z.position&&P===0||Z.position===B).map((Z,oe)=>{var Se,Te;return pe.createElement(iE,{key:Z.id,icons:Y,index:oe,toast:Z,defaultRichColors:T,duration:(Se=R==null?void 0:R.duration)!=null?Se:C,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:M,closeButton:(Te=R==null?void 0:R.closeButton)!=null?Te:h,interacting:de,position:B,style:R==null?void 0:R.style,unstyled:R==null?void 0:R.unstyled,classNames:R==null?void 0:R.classNames,cancelButtonStyle:R==null?void 0:R.cancelButtonStyle,actionButtonStyle:R==null?void 0:R.actionButtonStyle,closeButtonAriaLabel:R==null?void 0:R.closeButtonAriaLabel,removeToast:j,toasts:k.filter(we=>we.position==Z.position),heights:ie.filter(we=>we.position==Z.position),setHeights:se,expandByDefault:m,gap:H,expanded:q,swipeDirections:r.swipeDirections})})):null}))}),be="data-editor-id",to="data-slide-root",xr=1920,Sr=1080;function gm(n){return`[${be}="${n}"]`}function uE(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function Tv(n,r){return`${r}-${n+1}`}function e0(n,r){const o=Number.parseInt(n||"",10);return Number.isFinite(o)&&o>0?o:r}function fE(n){return uE(n)}function oc(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Av(n){const r=n.querySelector(`[${to}]`);if(r)return r.getAttribute("data-slide-width")||r.setAttribute("data-slide-width",String(xr)),r.getAttribute("data-slide-height")||r.setAttribute("data-slide-height",String(Sr)),r;const o=n.querySelector(".slide-container");return o?(o.setAttribute(to,"true"),o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(xr)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(Sr)),o):null}function dE(n){return`<!DOCTYPE html>
|
|
50
|
+
${n.documentElement.outerHTML}`}function mE(n){const r=oc(n);if(!r)return n;const o=Av(r),i=Array.from(r.querySelectorAll("[data-editable]"));return o&&!o.getAttribute(be)&&o.setAttribute(be,"slide-root"),i.forEach((s,u)=>{if(!s.getAttribute(be)){const d=s.getAttribute("data-editable")||"block";s.setAttribute(be,Tv(u,d))}}),dE(r)}function la(n,r="slide-1"){var T;if(!oc(n))return{id:r,title:"Untitled Slide",htmlSource:n,rootSelector:`[${to}]`,width:xr,height:Sr,elements:[]};const i=mE(n),s=oc(i);if(!s)return{id:r,title:"Untitled Slide",htmlSource:i,rootSelector:`[${to}]`,width:xr,height:Sr,elements:[]};const u=Av(s),d=Array.from(s.querySelectorAll("[data-editable]")),m=u!=null&&u.getAttribute(be)?`[${be}="${u.getAttribute(be)}"]`:`[${to}]`,h=e0((u==null?void 0:u.getAttribute("data-slide-width"))??null,xr),g=e0((u==null?void 0:u.getAttribute("data-slide-height"))??null,Sr),x=d.map((C,A)=>{const M=C.getAttribute("data-editable")||"block",R=C.getAttribute(be)||Tv(A,M);return{id:R,selector:gm(R),type:M==="block"&&C.getAttribute("data-group")==="true"?"group":M,content:C instanceof HTMLImageElement?C.src:C.textContent||"",tagName:C.tagName.toLowerCase()}}),y=s.querySelector("h1, h2, title"),w=((T=y==null?void 0:y.textContent)==null?void 0:T.trim())||`Slide ${r}`;return{id:fE(r),title:w,htmlSource:i,rootSelector:m,width:h,height:g,elements:x}}function Ke(n,r){return n.querySelector(gm(r))}function hE(n,r,o){const i=oc(n.htmlSource);if(!i)return"";const s=Ke(i,r);return(s==null?void 0:s.style.getPropertyValue(o).trim())||""}function Ar(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function ym(n){return`<!DOCTYPE html>
|
|
51
|
+
${n.documentElement.outerHTML}`}function ll(n,r){const o=Ar(n);return o?(r(o),ym(o)):n}const vm=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function Mv(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function ci(n){const r=Mv();for(const o of vm){const i=n.style[o];r[o]=i||null}return r}function Ld(n){return{...Mv(),...n}}function Kn(n){const r=n||"",o=r.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=r.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:o&&Number.parseFloat(o[1]||"0")||0,translateY:o&&Number.parseFloat(o[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function od(n){return Math.round(n*100)/100}function La(n,r,o){const i=[];return(Math.abs(n)>.01||Math.abs(r)>.01)&&i.push(`translate(${od(n)}px, ${od(r)}px)`),Math.abs(o)>.01&&i.push(`rotate(${od(o)}deg)`),i.length?i.join(" "):null}function Zo(n,r,o){return{x:o.offsetX+(n.left-r.left)*o.scale,y:o.offsetY+(n.top-r.top)*o.scale,width:n.width*o.scale,height:n.height*o.scale}}function Bs(n){const r=Number.parseFloat(n||"");return Number.isFinite(r)?r:0}function t0(n){const r=Kn(n.style.transform);return{x:Bs(n.style.left)+r.translateX,y:Bs(n.style.top)+r.translateY,width:Bs(n.style.width)||xr,height:Bs(n.style.height)||Sr}}function lc(n,r={}){let o=n,i=0,s=0;const u=n.getAttribute(be)??"",d=r[u]??t0(n),m=d.width,h=d.height;for(;o;){const g=o.getAttribute(be)??"",x=r[g]??t0(o);i+=x.x,s+=x.y;const y=o.parentElement;if(!y||!y.hasAttribute("data-editable"))break;o=y}return{x:i,y:s,width:m,height:h}}function _v(n,r={}){const o=n.parentElement;if(!o||!o.hasAttribute("data-editable"))return{x:0,y:0};const i=lc(o,r);return{x:i.x,y:i.y}}function Hd(n,r){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(r.x*100)/100}px`,n.style.top=`${Math.round(r.y*100)/100}px`,n.style.width=`${Math.round(r.width*100)/100}px`,n.style.height=`${Math.round(r.height*100)/100}px`;const o=Kn(n.style.transform),i=La(0,0,o.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function n0(n,r){r&&(r.color&&(n.style.color=r.color),r.fontSize&&(n.style.fontSize=r.fontSize),r.fontWeight&&(n.style.fontWeight=r.fontWeight),r.fontStyle&&(n.style.fontStyle=r.fontStyle),r.lineHeight&&(n.style.lineHeight=r.lineHeight),r.textAlign&&(n.style.textAlign=r.textAlign),r.paddingTop&&(n.style.paddingTop=r.paddingTop),r.paddingRight&&(n.style.paddingRight=r.paddingRight),r.paddingBottom&&(n.style.paddingBottom=r.paddingBottom),r.paddingLeft&&(n.style.paddingLeft=r.paddingLeft),r.listStylePosition&&(n.style.listStylePosition=r.listStylePosition),r.listStyleType&&(n.style.listStyleType=r.listStyleType))}function ld(n){const r=n.parentElement;return r&&(r.hasAttribute(to)||r.hasAttribute("data-editable"))?r:null}function Bd(n){return Array.from(n.children).filter(r=>r instanceof HTMLElement&&r.hasAttribute("data-editable"))}function Nv(n){const r=n.tagName.toLowerCase();return r!=="ul"&&r!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}function pE(n,r){const o=new Set(Array.from(n.querySelectorAll(`[${be}]`)).map(d=>d.getAttribute(be)).filter(d=>!!d));if(!o.has(r))return r;const i=r.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||r;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function gE(n,r){return Array.from(n.children).filter(o=>o instanceof HTMLElement?o.hasAttribute("data-editable")?!0:Nv(o)?(o.setAttribute("data-editable","block"),o.getAttribute(be)||o.setAttribute(be,pE(r,"block-1")),!0):!1:!1)}function yE({html:n,slideId:r,groupElementId:o,elementIds:i,elementRects:s={},timestamp:u=Date.now()}){const d=Ar(n);if(!d||!i.length)return null;const m=i.map($=>Ke(d,$)).filter($=>!!$);if(m.length!==i.length)return null;const g=m.flatMap($=>$.getAttribute("data-group")==="true"?Bd($):[$]).filter(($,V,k)=>k.findIndex(K=>K===$)===V);if(g.length<2)return null;const x=ld(m[0]);if(!x||m.some($=>ld($)!==x)||Ke(d,o))return null;const y=m.filter($=>$.getAttribute("data-group")==="true"),w=g.map($=>lc($,s)),T=Math.min(...w.map($=>$.x)),C=Math.min(...w.map($=>$.y)),A=Math.max(...w.map($=>$.x+$.width)),M=Math.max(...w.map($=>$.y+$.height)),R=_v(m[0],s),z=d.createElement("div");z.setAttribute("data-editable","block"),z.setAttribute("data-group","true"),z.setAttribute(be,o),Hd(z,{x:T-R.x,y:C-R.y,width:A-T,height:M-C});const H=Array.from(x.children).flatMap($=>$ instanceof HTMLElement?y.includes($)?Bd($).filter(V=>g.includes(V)):g.includes($)?[$]:[]:[]),Y=m.find($=>ld($)===x)??null;(Y==null?void 0:Y.parentElement)===x?x.insertBefore(z,Y):x.appendChild(z);for(const $ of H){const V=lc($,s);Hd($,{x:V.x-T,y:V.y-C,width:V.width,height:V.height}),z.appendChild($)}for(const $ of y)$.children.length||$.remove();const J=ym(d);return J===n?null:{type:"group.create",slideId:r,groupElementId:o,elementIds:H.map($=>$.getAttribute(be)).filter($=>!!$),previousHtmlSource:n,nextHtmlSource:J,timestamp:u}}function vE({html:n,slideId:r,groupElementId:o,elementRects:i={},elementPresentationStyles:s={},timestamp:u=Date.now()}){const d=Ar(n);if(!d)return null;const m=Ke(d,o);if(!m||!m.parentElement)return null;const h=m.parentElement,g=_v(m,i),x=m.getAttribute("data-group")==="true",y=x?Bd(m):gE(m,d);if(!y.length)return null;const w=m.getAttribute(be),T=x?m:m.nextSibling,C=y.map(M=>M.getAttribute(be)).filter(M=>!!M);for(const M of y){const R=lc(M,i);if(Hd(M,{x:R.x-g.x,y:R.y-g.y,width:R.width,height:R.height}),!x){const z=M.getAttribute(be)??"";n0(M,s[z]),Nv(M)&&(M.style.margin="0px");for(const H of Array.from(M.querySelectorAll(`[data-editable][${be}]`))){const Y=H.getAttribute(be)??"";n0(H,s[Y])}}h.insertBefore(M,T)}x&&m.remove();const A=ym(d);return A===n?null:{type:"group.ungroup",slideId:r,groupElementId:o,childElementIds:x||!w?C:[w,...C],previousHtmlSource:n,nextHtmlSource:A,timestamp:u}}function bE(n,r,o){return ll(n,i=>{const s=Ke(i,r);s&&(s.textContent=o)})}function xE(n,r,o,i){return ll(n,s=>{var d;const u=Ke(s,r);u&&(i.trim().length===0?u.style.removeProperty(o):u.style.setProperty(o,i),(d=u.getAttribute("style"))!=null&&d.trim()||u.removeAttribute("style"))})}function SE(n,r,o,i){return ll(n,s=>{const u=Ke(s,r);u&&(i.trim().length===0?u.removeAttribute(o):u.setAttribute(o,i))})}function wE(n,r){var o;for(const i of vm){const s=r[i];if(s===null){n.style[i]="";continue}n.style[i]=s}(o=n.getAttribute("style"))!=null&&o.trim()||n.removeAttribute("style")}function EE(n,r,o){return ll(n,i=>{const s=Ke(i,r);s&&wE(s,o)})}function ic(n,r){const o=Ar(n);if(!o)return null;const i=Ke(o,r);if(!i||!(i.parentElement instanceof HTMLElement))return null;const s=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(be):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(be):null;return{parentElementId:i.parentElement.getAttribute(be),previousSiblingElementId:s,nextSiblingElementId:u}}function sc(n,r){var i;const o=Ar(n);return o?((i=Ke(o,r))==null?void 0:i.outerHTML)??null:null}function Rv(n,r){var u;const o=Ar(`<template>${n}</template>`),i=(u=o==null?void 0:o.querySelector("template"))==null?void 0:u.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const s=[i,...Array.from(i.querySelectorAll(`[${be}]`))];for(const d of s){const m=d.getAttribute(be);m&&r[m]&&d.setAttribute(be,r[m])}return i.outerHTML}function CE(n,r){const o=new Set(Array.from(n.querySelectorAll(`[${be}]`)).map(d=>d.getAttribute(be)).filter(d=>!!d));if(!o.has(r))return r;const i=r.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||r;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function Ud(n,r){const o=Ar(n);return o?CE(o,r):r}function Ov(n,r){return ll(n,o=>{var h;if(Ke(o,r.elementId))return;const i=Ar(`<template>${r.html}</template>`),s=(h=i==null?void 0:i.querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(s instanceof HTMLElement))return;const u=(r.parentElementId?Ke(o,r.parentElementId):null)??o.querySelector(`[${to}]`)??o.body,d=r.nextSiblingElementId?Ke(o,r.nextSiblingElementId):null,m=r.previousSiblingElementId?Ke(o,r.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===u?u.insertBefore(o.importNode(s,!0),d):(m==null?void 0:m.parentElement)===u?m.after(o.importNode(s,!0)):u.appendChild(o.importNode(s,!0))})}function TE(n,r){return ll(n,o=>{var i;(i=Ke(o,r))==null||i.remove()})}function Zr(n,r){return{...r,hidden:n.hidden,sourceFile:n.sourceFile}}function Dv(n,r){if(r.type==="slide.visibility.update")return n.id!==r.slideId?n:{...n,hidden:r.nextHidden};if(r.type==="slide.title.update")return n.id!==r.slideId?n:{...n,title:r.nextTitle};if(!("slideId"in r)||r.type==="slide.reorder"||n.id!==r.slideId)return n;switch(r.type){case"operation.batch":return r.operations.reduce((o,i)=>Dv(o,i),n);case"text.update":return Zr(n,la(bE(n.htmlSource,r.elementId,r.nextText),n.id));case"style.update":return Zr(n,la(xE(n.htmlSource,r.elementId,r.propertyName,r.nextValue),n.id));case"attribute.update":return Zr(n,la(SE(n.htmlSource,r.elementId,r.attributeName,r.nextValue),n.id));case"element.layout.update":return Zr(n,la(EE(n.htmlSource,r.elementId,r.nextStyle),n.id));case"element.insert":return Zr(n,la(Ov(n.htmlSource,r),n.id));case"element.remove":return Zr(n,la(TE(n.htmlSource,r.elementId),n.id));case"group.create":case"group.ungroup":return Zr(n,la(r.nextHtmlSource,n.id))}}function jv(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(r=>jv(r)).reverse(),timestamp:n.timestamp};case"text.update":return{...n,previousText:n.nextText,nextText:n.previousText};case"style.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"attribute.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"element.layout.update":return{...n,previousStyle:n.nextStyle,nextStyle:n.previousStyle};case"element.insert":return{type:"element.remove",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"element.remove":return{type:"element.insert",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"group.create":return{type:"group.ungroup",slideId:n.slideId,groupElementId:n.groupElementId,childElementIds:n.elementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"group.ungroup":return{type:"group.create",slideId:n.slideId,groupElementId:n.groupElementId,elementIds:n.childElementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"slide.create":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.delete":return{type:"slide.create",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.duplicate":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.reorder":return{...n,fromIndex:n.toIndex,toIndex:n.fromIndex};case"slide.visibility.update":return{...n,previousHidden:n.nextHidden,nextHidden:n.previousHidden};case"slide.title.update":return{...n,previousTitle:n.nextTitle,nextTitle:n.previousTitle}}}const AE=`<!DOCTYPE html>
|
|
52
|
+
<html lang="en">
|
|
53
|
+
<head>
|
|
54
|
+
<meta charset="utf-8" />
|
|
55
|
+
<title>Untitled Slide</title>
|
|
56
|
+
</head>
|
|
57
|
+
<body>
|
|
58
|
+
<main
|
|
59
|
+
data-slide-root="true"
|
|
60
|
+
data-slide-width="1920"
|
|
61
|
+
data-slide-height="1080"
|
|
62
|
+
data-editor-id="slide-root"
|
|
63
|
+
style="position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #ffffff;"
|
|
64
|
+
>
|
|
65
|
+
<h1 data-editable="text" data-editor-id="text-1" style="position: absolute; left: 160px; top: 160px; width: 1200px; margin: 0; font-size: 96px; line-height: 1.05;">
|
|
66
|
+
Untitled Slide
|
|
67
|
+
</h1>
|
|
68
|
+
</main>
|
|
69
|
+
</body>
|
|
70
|
+
</html>`;function zv(n,r){const o=new Set(n.map(s=>s.id));if(!o.has(r))return r;let i=2;for(;o.has(`${r}-${i}`);)i+=1;return`${r}-${i}`}function kv(n,r){const o=new Set(n.map(m=>m.sourceFile).filter(Boolean));if(!o.has(r))return r;const i=r.lastIndexOf("."),s=i>=0?r.slice(0,i):r,u=i>=0?r.slice(i):"";let d=2;for(;o.has(`${s}-${d}${u}`);)d+=1;return`${s}-${d}${u}`}function ME(n,r){const o=Math.max(r+1,1),i=zv(n,`generated-slide-${o}`),s=kv(n,`${String(o).padStart(2,"0")}-untitled.html`);return{...la(AE,i),hidden:!1,sourceFile:s,title:"Untitled Slide"}}function _E(n,r){const o=zv(n,`${r.id}-copy`),i=kv(n,r.sourceFile?NE(r.sourceFile,"copy"):`${o}.html`);return{...la(r.htmlSource,o),hidden:r.hidden===!0,sourceFile:i,title:r.title}}function NE(n,r){const o=n.lastIndexOf(".");return o<0?`${n}-${r}`:`${n.slice(0,o)}-${r}${n.slice(o)}`}function a0(n,r){return Math.min(Math.max(n,0),r)}function id(n,r){switch(r.type){case"slide.create":case"slide.duplicate":{const o=a0(r.index,n.length);return[...n.slice(0,o),r.slide,...n.slice(o)]}case"slide.delete":return n.filter(o=>o.id!==r.slide.id);case"slide.reorder":{const o=n.findIndex(u=>u.id===r.slideId);if(o<0)return n;const i=[...n],[s]=i.splice(o,1);return s?(i.splice(a0(r.toIndex,i.length),0,s),i):n}default:return n.map(o=>Dv(o,r))}}function Lv(n){return{slides:n,undoStack:[],redoStack:[]}}function Us(n,r){switch(r.type){case"history.reset":return Lv(r.slides);case"history.commit":return{slides:id(n.slides,r.operation),undoStack:[...n.undoStack,r.operation],redoStack:[]};case"history.undo":{const o=n.undoStack[n.undoStack.length-1];return o?{slides:id(n.slides,jv(o)),undoStack:n.undoStack.slice(0,-1),redoStack:[...n.redoStack,o]}:n}case"history.redo":{const o=n.redoStack[n.redoStack.length-1];return o?{slides:id(n.slides,o),undoStack:[...n.undoStack,o],redoStack:n.redoStack.slice(0,-1)}:n}}}async function RE({manifestUrl:n,fetchImpl:r,requestInit:o,slideIdPrefix:i="generated-slide-"}){var y;const s=r??globalThis.fetch;if(!s)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...o},d=await s(n,u);if(!d.ok)return null;const m=await d.json();if(!((y=m.slides)!=null&&y.length))return null;const h=d.url||n,g=new URL(h),x=await Promise.all(m.slides.map(async(w,T)=>{const C=new URL(w.file,h);for(const[z,H]of g.searchParams)C.searchParams.has(z)||C.searchParams.set(z,H);const A=await s(C.toString(),u);if(!A.ok)throw new Error(`Failed to load slide HTML: ${w.file}`);const M=await A.text(),R=la(M,`${i}${T+1}`);return{...R,hidden:w.hidden===!0,sourceFile:w.file,title:w.title||R.title}}));return{manifest:m,slides:x}}const OE=["#F59E0B","#EF4444","#10B981","#3B82F6","#8B5CF6","#FFFFFF","#0F172A"];function DE(n){const r=n.filter(o=>o.hidden!==!0);return r.length>0?r:n}function jE(n,r){return Math.min(Math.max(n,0),Math.max(r-1,0))}/**
|
|
71
|
+
* @license lucide-react v1.14.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Hv=(...n)=>n.filter((r,o,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===o).join(" ").trim();/**
|
|
76
|
+
* @license lucide-react v1.14.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const zE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
81
|
+
* @license lucide-react v1.14.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const kE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,i)=>i?i.toUpperCase():o.toLowerCase());/**
|
|
86
|
+
* @license lucide-react v1.14.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const r0=n=>{const r=kE(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
91
|
+
* @license lucide-react v1.14.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/var sd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
96
|
+
* @license lucide-react v1.14.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const LE=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},HE=v.createContext({}),BE=()=>v.useContext(HE),UE=v.forwardRef(({color:n,size:r,strokeWidth:o,absoluteStrokeWidth:i,className:s="",children:u,iconNode:d,...m},h)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:y=!1,color:w="currentColor",className:T=""}=BE()??{},C=i??y?Number(o??x)*24/Number(r??g):o??x;return v.createElement("svg",{ref:h,...sd,width:r??g??sd.width,height:r??g??sd.height,stroke:n??w,strokeWidth:C,className:Hv("lucide",T,s),...!u&&!LE(m)&&{"aria-hidden":"true"},...m},[...d.map(([A,M])=>v.createElement(A,M)),...Array.isArray(u)?u:[u]])});/**
|
|
101
|
+
* @license lucide-react v1.14.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Re=(n,r)=>{const o=v.forwardRef(({className:i,...s},u)=>v.createElement(UE,{ref:u,iconNode:r,className:Hv(`lucide-${zE(r0(n))}`,`lucide-${n}`,i),...s}));return o.displayName=r0(n),o};/**
|
|
106
|
+
* @license lucide-react v1.14.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const IE=[["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",key:"11f1s0"}],["path",{d:"M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",key:"t14dx9"}],["path",{d:"M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",key:"1w07xs"}],["path",{d:"M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",key:"1apec2"}]],Id=Re("align-center-horizontal",IE);/**
|
|
111
|
+
* @license lucide-react v1.14.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const PE=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]],Bv=Re("align-center-vertical",PE);/**
|
|
116
|
+
* @license lucide-react v1.14.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const $E=[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]],Uv=Re("align-end-horizontal",$E);/**
|
|
121
|
+
* @license lucide-react v1.14.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const GE=[["rect",{width:"16",height:"6",x:"2",y:"4",rx:"2",key:"10wcwx"}],["rect",{width:"9",height:"6",x:"9",y:"14",rx:"2",key:"4p5bwg"}],["path",{d:"M22 22V2",key:"12ipfv"}]],Iv=Re("align-end-vertical",GE);/**
|
|
126
|
+
* @license lucide-react v1.14.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const YE=[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]],Pv=Re("align-start-horizontal",YE);/**
|
|
131
|
+
* @license lucide-react v1.14.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const qE=[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]],$v=Re("align-start-vertical",qE);/**
|
|
136
|
+
* @license lucide-react v1.14.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const VE=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],Gv=Re("arrow-down-to-line",VE);/**
|
|
141
|
+
* @license lucide-react v1.14.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const XE=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],Pd=Re("arrow-up-to-line",XE);/**
|
|
146
|
+
* @license lucide-react v1.14.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const FE=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],KE=Re("bold",FE);/**
|
|
151
|
+
* @license lucide-react v1.14.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const QE=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],ZE=Re("box",QE);/**
|
|
156
|
+
* @license lucide-react v1.14.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const WE=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],li=Re("case-sensitive",WE);/**
|
|
161
|
+
* @license lucide-react v1.14.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const JE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Yv=Re("check",JE);/**
|
|
166
|
+
* @license lucide-react v1.14.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const eC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hi=Re("chevron-down",eC);/**
|
|
171
|
+
* @license lucide-react v1.14.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const tC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],nC=Re("chevron-right",tC);/**
|
|
176
|
+
* @license lucide-react v1.14.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const aC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],bm=Re("chevron-up",aC);/**
|
|
181
|
+
* @license lucide-react v1.14.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const rC=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],oC=Re("circle-dashed",rC);/**
|
|
186
|
+
* @license lucide-react v1.14.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const lC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],iC=Re("circle",lC);/**
|
|
191
|
+
* @license lucide-react v1.14.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const sC=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],cC=Re("cloud",sC);/**
|
|
196
|
+
* @license lucide-react v1.14.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const uC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],$d=Re("columns-3",uC);/**
|
|
201
|
+
* @license lucide-react v1.14.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const fC=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],qv=Re("copy",fC);/**
|
|
206
|
+
* @license lucide-react v1.14.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const dC=[["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"}]],mC=Re("download",dC);/**
|
|
211
|
+
* @license lucide-react v1.14.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const hC=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],pC=Re("ellipsis",hC);/**
|
|
216
|
+
* @license lucide-react v1.14.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const gC=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],o0=Re("eye-off",gC);/**
|
|
221
|
+
* @license lucide-react v1.14.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const yC=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Vv=Re("eye",yC);/**
|
|
226
|
+
* @license lucide-react v1.14.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const vC=[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],bC=Re("file-check-corner",vC);/**
|
|
231
|
+
* @license lucide-react v1.14.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const xC=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],SC=Re("file-code-corner",xC);/**
|
|
236
|
+
* @license lucide-react v1.14.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const wC=[["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"}]],Xv=Re("file-text",wC);/**
|
|
241
|
+
* @license lucide-react v1.14.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const EC=[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]],cc=Re("group",EC);/**
|
|
246
|
+
* @license lucide-react v1.14.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const CC=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],TC=Re("italic",CC);/**
|
|
251
|
+
* @license lucide-react v1.14.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const AC=[["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"}]],xm=Re("layers",AC);/**
|
|
256
|
+
* @license lucide-react v1.14.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const MC=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Fv=Re("link-2",MC);/**
|
|
261
|
+
* @license lucide-react v1.14.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const _C=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Gd=Re("lock",_C);/**
|
|
266
|
+
* @license lucide-react v1.14.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const NC=[["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"}]],RC=Re("maximize-2",NC);/**
|
|
271
|
+
* @license lucide-react v1.14.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const OC=[["path",{d:"M5 12h14",key:"1ays0h"}]],DC=Re("minus",OC);/**
|
|
276
|
+
* @license lucide-react v1.14.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const jC=[["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"}]],Yd=Re("palette",jC);/**
|
|
281
|
+
* @license lucide-react v1.14.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const zC=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],kC=Re("pen",zC);/**
|
|
286
|
+
* @license lucide-react v1.14.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const LC=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],HC=Re("pencil",LC);/**
|
|
291
|
+
* @license lucide-react v1.14.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const BC=[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]],UC=Re("pilcrow",BC);/**
|
|
296
|
+
* @license lucide-react v1.14.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const IC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],PC=Re("play",IC);/**
|
|
301
|
+
* @license lucide-react v1.14.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const $C=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ii=Re("plus",$C);/**
|
|
306
|
+
* @license lucide-react v1.14.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const GC=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],YC=Re("presentation",GC);/**
|
|
311
|
+
* @license lucide-react v1.14.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const qC=[["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"}]],VC=Re("rotate-cw",qC);/**
|
|
316
|
+
* @license lucide-react v1.14.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const XC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],uc=Re("rows-3",XC);/**
|
|
321
|
+
* @license lucide-react v1.14.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const FC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],fc=Re("square",FC);/**
|
|
326
|
+
* @license lucide-react v1.14.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const KC=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],QC=Re("strikethrough",KC);/**
|
|
331
|
+
* @license lucide-react v1.14.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const ZC=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],qd=Re("text-align-center",ZC);/**
|
|
336
|
+
* @license lucide-react v1.14.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const WC=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],JC=Re("text-align-end",WC);/**
|
|
341
|
+
* @license lucide-react v1.14.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const eT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],tT=Re("text-align-start",eT);/**
|
|
346
|
+
* @license lucide-react v1.14.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const nT=[["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"}]],Kv=Re("trash-2",nT);/**
|
|
351
|
+
* @license lucide-react v1.14.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const aT=[["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"}]],Vd=Re("type",aT);/**
|
|
356
|
+
* @license lucide-react v1.14.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const rT=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],oT=Re("underline",rT);/**
|
|
361
|
+
* @license lucide-react v1.14.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const lT=[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]],Sm=Re("ungroup",lT);/**
|
|
366
|
+
* @license lucide-react v1.14.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const iT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],wm=Re("x",iT);/**
|
|
371
|
+
* @license lucide-react v1.14.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const sT=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],cT=Re("zap",sT);function Qv(n){var r,o,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(r=0;r<s;r++)n[r]&&(o=Qv(n[r]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function Zv(){for(var n,r,o=0,i="",s=arguments.length;o<s;o++)(n=arguments[o])&&(r=Qv(n))&&(i&&(i+=" "),i+=r);return i}const uT=(n,r)=>{const o=new Array(n.length+r.length);for(let i=0;i<n.length;i++)o[i]=n[i];for(let i=0;i<r.length;i++)o[n.length+i]=r[i];return o},fT=(n,r)=>({classGroupId:n,validator:r}),Wv=(n=new Map,r=null,o)=>({nextPart:n,validators:r,classGroupId:o}),dc="-",l0=[],dT="arbitrary..",mT=n=>{const r=pT(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return hT(d);const m=d.split(dc),h=m[0]===""&&m.length>1?1:0;return Jv(m,h,r)},getConflictingClassGroupIds:(d,m)=>{if(m){const h=i[d],g=o[d];return h?g?uT(g,h):h:g||l0}return o[d]||l0}}},Jv=(n,r,o)=>{if(n.length-r===0)return o.classGroupId;const s=n[r],u=o.nextPart.get(s);if(u){const g=Jv(n,r+1,u);if(g)return g}const d=o.validators;if(d===null)return;const m=r===0?n.join(dc):n.slice(r).join(dc),h=d.length;for(let g=0;g<h;g++){const x=d[g];if(x.validator(m))return x.classGroupId}},hT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),o=r.indexOf(":"),i=r.slice(0,o);return i?dT+i:void 0})(),pT=n=>{const{theme:r,classGroups:o}=n;return gT(o,r)},gT=(n,r)=>{const o=Wv();for(const i in n){const s=n[i];Em(s,o,i,r)}return o},Em=(n,r,o,i)=>{const s=n.length;for(let u=0;u<s;u++){const d=n[u];yT(d,r,o,i)}},yT=(n,r,o,i)=>{if(typeof n=="string"){vT(n,r,o);return}if(typeof n=="function"){bT(n,r,o,i);return}xT(n,r,o,i)},vT=(n,r,o)=>{const i=n===""?r:eb(r,n);i.classGroupId=o},bT=(n,r,o,i)=>{if(ST(n)){Em(n(i),r,o,i);return}r.validators===null&&(r.validators=[]),r.validators.push(fT(o,n))},xT=(n,r,o,i)=>{const s=Object.entries(n),u=s.length;for(let d=0;d<u;d++){const[m,h]=s[d];Em(h,eb(r,m),o,i)}},eb=(n,r)=>{let o=n;const i=r.split(dc),s=i.length;for(let u=0;u<s;u++){const d=i[u];let m=o.nextPart.get(d);m||(m=Wv(),o.nextPart.set(d,m)),o=m}return o},ST=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,wT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),i=Object.create(null);const s=(u,d)=>{o[u]=d,r++,r>n&&(r=0,i=o,o=Object.create(null))};return{get(u){let d=o[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return s(u,d),d},set(u,d){u in o?o[u]=d:s(u,d)}}},Xd="!",i0=":",ET=[],s0=(n,r,o,i,s)=>({modifiers:n,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:i,isExternal:s}),CT=n=>{const{prefix:r,experimentalParseClassName:o}=n;let i=s=>{const u=[];let d=0,m=0,h=0,g;const x=s.length;for(let A=0;A<x;A++){const M=s[A];if(d===0&&m===0){if(M===i0){u.push(s.slice(h,A)),h=A+1;continue}if(M==="/"){g=A;continue}}M==="["?d++:M==="]"?d--:M==="("?m++:M===")"&&m--}const y=u.length===0?s:s.slice(h);let w=y,T=!1;y.endsWith(Xd)?(w=y.slice(0,-1),T=!0):y.startsWith(Xd)&&(w=y.slice(1),T=!0);const C=g&&g>h?g-h:void 0;return s0(u,T,w,C)};if(r){const s=r+i0,u=i;i=d=>d.startsWith(s)?u(d.slice(s.length)):s0(ET,!1,d,void 0,!0)}if(o){const s=i;i=u=>o({className:u,parseClassName:s})}return i},TT=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((o,i)=>{r.set(o,1e6+i)}),o=>{const i=[];let s=[];for(let u=0;u<o.length;u++){const d=o[u],m=d[0]==="[",h=r.has(d);m||h?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(d)):s.push(d)}return s.length>0&&(s.sort(),i.push(...s)),i}},AT=n=>({cache:wT(n.cacheSize),parseClassName:CT(n),sortModifiers:TT(n),...mT(n)}),MT=/\s+/,_T=(n,r)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=r,d=[],m=n.trim().split(MT);let h="";for(let g=m.length-1;g>=0;g-=1){const x=m[g],{isExternal:y,modifiers:w,hasImportantModifier:T,baseClassName:C,maybePostfixModifierPosition:A}=o(x);if(y){h=x+(h.length>0?" "+h:h);continue}let M=!!A,R=i(M?C.substring(0,A):C);if(!R){if(!M){h=x+(h.length>0?" "+h:h);continue}if(R=i(C),!R){h=x+(h.length>0?" "+h:h);continue}M=!1}const z=w.length===0?"":w.length===1?w[0]:u(w).join(":"),H=T?z+Xd:z,Y=H+R;if(d.indexOf(Y)>-1)continue;d.push(Y);const J=s(R,M);for(let $=0;$<J.length;++$){const V=J[$];d.push(H+V)}h=x+(h.length>0?" "+h:h)}return h},NT=(...n)=>{let r=0,o,i,s="";for(;r<n.length;)(o=n[r++])&&(i=tb(o))&&(s&&(s+=" "),s+=i);return s},tb=n=>{if(typeof n=="string")return n;let r,o="";for(let i=0;i<n.length;i++)n[i]&&(r=tb(n[i]))&&(o&&(o+=" "),o+=r);return o},RT=(n,...r)=>{let o,i,s,u;const d=h=>{const g=r.reduce((x,y)=>y(x),n());return o=AT(g),i=o.cache.get,s=o.cache.set,u=m,m(h)},m=h=>{const g=i(h);if(g)return g;const x=_T(h,o);return s(h,x),x};return u=d,(...h)=>u(NT(...h))},OT=[],Lt=n=>{const r=o=>o[n]||OT;return r.isThemeGetter=!0,r},nb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ab=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,jT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mr=n=>DT.test(n),Ie=n=>!!n&&!Number.isNaN(Number(n)),hr=n=>!!n&&Number.isInteger(Number(n)),cd=n=>n.endsWith("%")&&Ie(n.slice(0,-1)),ka=n=>jT.test(n),rb=()=>!0,BT=n=>zT.test(n)&&!kT.test(n),Cm=()=>!1,UT=n=>LT.test(n),IT=n=>HT.test(n),PT=n=>!xe(n)&&!Ee(n),$T=n=>Mr(n,ib,Cm),xe=n=>nb.test(n),Wr=n=>Mr(n,sb,BT),c0=n=>Mr(n,QT,Ie),GT=n=>Mr(n,ub,rb),YT=n=>Mr(n,cb,Cm),u0=n=>Mr(n,ob,Cm),qT=n=>Mr(n,lb,IT),Is=n=>Mr(n,fb,UT),Ee=n=>ab.test(n),ei=n=>lo(n,sb),VT=n=>lo(n,cb),f0=n=>lo(n,ob),XT=n=>lo(n,ib),FT=n=>lo(n,lb),Ps=n=>lo(n,fb,!0),KT=n=>lo(n,ub,!0),Mr=(n,r,o)=>{const i=nb.exec(n);return i?i[1]?r(i[1]):o(i[2]):!1},lo=(n,r,o=!1)=>{const i=ab.exec(n);return i?i[1]?r(i[1]):o:!1},ob=n=>n==="position"||n==="percentage",lb=n=>n==="image"||n==="url",ib=n=>n==="length"||n==="size"||n==="bg-size",sb=n=>n==="length",QT=n=>n==="number",cb=n=>n==="family-name",ub=n=>n==="number"||n==="weight",fb=n=>n==="shadow",ZT=()=>{const n=Lt("color"),r=Lt("font"),o=Lt("text"),i=Lt("font-weight"),s=Lt("tracking"),u=Lt("leading"),d=Lt("breakpoint"),m=Lt("container"),h=Lt("spacing"),g=Lt("radius"),x=Lt("shadow"),y=Lt("inset-shadow"),w=Lt("text-shadow"),T=Lt("drop-shadow"),C=Lt("blur"),A=Lt("perspective"),M=Lt("aspect"),R=Lt("ease"),z=Lt("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...Y(),Ee,xe],$=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],k=()=>[Ee,xe,h],K=()=>[mr,"full","auto",...k()],ie=()=>[hr,"none","subgrid",Ee,xe],se=()=>["auto",{span:["full",hr,Ee,xe]},hr,Ee,xe],q=()=>[hr,"auto",Ee,xe],ue=()=>["auto","min","max","fr",Ee,xe],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],S=()=>["auto",...k()],_=()=>[mr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],D=()=>[mr,"screen","full","dvw","lvw","svw","min","max","fit",...k()],O=()=>[mr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],I=()=>[n,Ee,xe],N=()=>[...Y(),f0,u0,{position:[Ee,xe]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",XT,$T,{size:[Ee,xe]}],P=()=>[cd,ei,Wr],te=()=>["","none","full",g,Ee,xe],ne=()=>["",Ie,ei,Wr],ae=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Ie,cd,f0,u0],Se=()=>["","none",C,Ee,xe],Te=()=>["none",Ie,Ee,xe],we=()=>["none",Ie,Ee,xe],ke=()=>[Ie,Ee,xe],ge=()=>[mr,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ka],breakpoint:[ka],color:[rb],container:[ka],"drop-shadow":[ka],ease:["in","out","in-out"],font:[PT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ka],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ka],shadow:[ka],spacing:["px",Ie],text:[ka],"text-shadow":[ka],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mr,xe,Ee,M]}],container:["container"],columns:[{columns:[Ie,xe,Ee,m]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:J()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[hr,"auto",Ee,xe]}],basis:[{basis:[mr,"full","auto",m,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,mr,"auto","initial","none",xe]}],grow:[{grow:["",Ie,Ee,xe]}],shrink:[{shrink:["",Ie,Ee,xe]}],order:[{order:[hr,"first","last","none",Ee,xe]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:se()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:se()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mbs:[{mbs:S()}],mbe:[{mbe:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],"inline-size":[{inline:["auto",...D()]}],"min-inline-size":[{"min-inline":["auto",...D()]}],"max-inline-size":[{"max-inline":["none",...D()]}],"block-size":[{block:["auto",...O()]}],"min-block-size":[{"min-block":["auto",...O()]}],"max-block-size":[{"max-block":["none",...O()]}],w:[{w:[m,"screen",..._()]}],"min-w":[{"min-w":[m,"screen","none",..._()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",o,ei,Wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,KT,GT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",cd,xe]}],"font-family":[{font:[VT,YT,r]}],"font-features":[{"font-features":[xe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Ee,xe]}],"line-clamp":[{"line-clamp":[Ie,"none",Ee,c0]}],leading:[{leading:[u,...k()]}],"list-image":[{"list-image":["none",Ee,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ee,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",Ee,Wr]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ie,"auto",Ee,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hr,Ee,xe],radial:["",Ee,xe],conic:[hr,Ee,xe]},FT,qT]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,Ee,xe]}],"outline-w":[{outline:["",Ie,ei,Wr]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",x,Ps,Is]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",y,Ps,Is]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ie,Wr]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",w,Ps,Is]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ie,Ee,xe]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Ee,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":Y()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ee,xe]}],filter:[{filter:["","none",Ee,xe]}],blur:[{blur:Se()}],brightness:[{brightness:[Ie,Ee,xe]}],contrast:[{contrast:[Ie,Ee,xe]}],"drop-shadow":[{"drop-shadow":["","none",T,Ps,Is]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Ie,Ee,xe]}],"hue-rotate":[{"hue-rotate":[Ie,Ee,xe]}],invert:[{invert:["",Ie,Ee,xe]}],saturate:[{saturate:[Ie,Ee,xe]}],sepia:[{sepia:["",Ie,Ee,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ee,xe]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,Ee,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,Ee,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,Ee,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,Ee,xe]}],"backdrop-invert":[{"backdrop-invert":["",Ie,Ee,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,Ee,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,Ee,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,Ee,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ee,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",Ee,xe]}],ease:[{ease:["linear","initial",R,Ee,xe]}],delay:[{delay:[Ie,Ee,xe]}],animate:[{animate:["none",z,Ee,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,Ee,xe]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:Te()}],"rotate-x":[{"rotate-x":Te()}],"rotate-y":[{"rotate-y":Te()}],"rotate-z":[{"rotate-z":Te()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[Ee,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee,xe]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Ie,ei,Wr,c0]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},WT=RT(ZT);function Pe(...n){return WT(Zv(n))}const JT=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:SC},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:Xv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:YC,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:cC,soon:!0}];function eA({title:n,onTitleChange:r,onPresent:o,onExportPdf:i,onExportHtml:s,pdfSlides:u=[],pdfThumbnails:d={},isSaving:m}){const[h,g]=v.useState(!1),[x,y]=v.useState(!1),[w,T]=v.useState(0),C=v.useRef(null),A=n||"Untitled presentation";v.useEffect(()=>{const z=H=>{C.current&&!C.current.contains(H.target)&&g(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]);const M=v.useCallback(z=>{if(!z)return;const H=z.getBoundingClientRect().width;T(Math.ceil(H))},[]),R=z=>{if(g(!1),z.soon){vr(`${z.label} is not available yet.`,{description:"We are still building this export option."});return}if(z.id==="pdf"){y(!0);return}if(z.id==="html"){s==null||s();return}vr(`Exporting as ${z.label}...`)};return p.jsxs("header",{className:"px-6 h-14 flex items-center justify-between bg-white border-b border-foreground/[0.06]",children:[p.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[p.jsx("div",{className:"w-8 h-8 rounded-lg bg-foreground flex items-center justify-center shrink-0",children:p.jsx("span",{className:"text-background font-bold text-sm font-display",children:"P"})}),p.jsx("div",{className:"w-px h-5 bg-foreground/10"}),p.jsxs("div",{className:"relative min-w-0 flex-1",children:[p.jsx("input",{value:n,onChange:z=>r==null?void 0:r(z.target.value),"aria-label":"Deck title",className:"max-w-full min-w-0 flex-none rounded-md bg-transparent px-2 py-1 text-[18px] font-semibold text-foreground outline-none focus:bg-foreground/[0.04]",style:w?{width:`${w}px`}:void 0,placeholder:"Untitled presentation"}),p.jsx("span",{ref:M,"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 whitespace-pre rounded-md px-2 py-1 text-[18px] font-semibold",children:A},A)]}),m?p.jsx("span",{className:"inline-flex h-5 shrink-0 items-center rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-[10px] font-medium uppercase leading-none tracking-wider text-foreground/45","aria-live":"polite",children:"saving..."}):null]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"relative",ref:C,children:[p.jsxs("button",{type:"button",onClick:()=>g(z=>!z),className:"h-8 px-3 rounded-md flex items-center gap-1.5 text-[13px] text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground transition-colors",children:[p.jsx(mC,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Export"}),p.jsx(hi,{className:Pe("w-3 h-3 transition-transform",h&&"rotate-180")})]}),h&&p.jsxs("div",{className:"absolute right-0 mt-1.5 w-[280px] bg-white rounded-xl border border-foreground/[0.08] shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] p-1.5 animate-fade-in z-50",children:[p.jsx("div",{className:"text-[10px] uppercase tracking-wider text-foreground/40 px-2.5 py-1.5 font-medium",children:"Export formats"}),JT.map(z=>{const H=z.icon;return p.jsxs("button",{type:"button",onClick:()=>R(z),className:Pe("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",z.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[p.jsx("div",{className:"w-7 h-7 rounded-md bg-foreground/[0.04] flex items-center justify-center shrink-0 mt-0.5",children:p.jsx(H,{className:"w-3.5 h-3.5 text-foreground/70"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"text-[13px] font-medium text-foreground",children:z.label}),z.soon&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-foreground/[0.06] text-foreground/50 uppercase tracking-wider",children:"Soon"})]}),p.jsx("div",{className:"text-[11px] text-foreground/50 mt-0.5 leading-snug",children:z.desc})]}),!z.soon&&p.jsx(Yv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},z.id)})]})]}),p.jsxs("button",{type:"button",onClick:o,className:"h-8 px-3.5 rounded-md flex items-center gap-1.5 text-[13px] font-medium bg-foreground text-background hover:bg-foreground/90 transition-colors",children:[p.jsx(PC,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Present"})]})]}),x?p.jsx(tA,{slides:u,thumbnails:d,onClose:()=>y(!1),onExport:z=>{y(!1),i==null||i(z)}}):null]})}function tA({slides:n,thumbnails:r,onClose:o,onExport:i}){const s=n.filter(C=>C.file),[u,d]=v.useState("all"),[m,h]=v.useState([]),g=new Set(m),x=m.length,y=u==="all"||u==="selected"&&x>0;v.useEffect(()=>{const C=A=>{A.key==="Escape"&&o()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[o]);const w=(C,A)=>{h(M=>A?M.includes(C)?M:[...M,C]:M.filter(R=>R!==C))},T=()=>{if(u==="selected"){m.length>0&&i({mode:"slides",slideFiles:m});return}i({mode:"all"})};return p.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:C=>{C.target===C.currentTarget&&o()},children:p.jsxs("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"pdf-export-title",className:"relative m-0 flex max-h-[86vh] w-full max-w-[680px] flex-col overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]",children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-foreground/[0.08] px-4 py-3",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[p.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:p.jsx(Xv,{className:"h-4 w-4 text-foreground/70"})}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{id:"pdf-export-title",className:"text-[14px] font-semibold text-foreground",children:"Export PDF"}),p.jsx("p",{className:"mt-0.5 text-[11px] text-foreground/50",children:"Choose which slides to include."})]})]}),p.jsx("button",{type:"button","aria-label":"Close PDF export dialog",onClick:o,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-foreground/55 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:p.jsx(wm,{className:"h-4 w-4"})})]}),p.jsxs("div",{className:"min-h-0 flex-1 overflow-auto px-4 py-4",children:[p.jsxs("fieldset",{className:"space-y-2",children:[p.jsx("legend",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-foreground/45",children:"PDF range"}),p.jsx(d0,{checked:u==="all",icon:xm,label:"All slides",detail:`${s.length} slides`,onChange:()=>d("all")}),p.jsx(d0,{checked:u==="selected",icon:bC,label:"Selected slides",detail:x===1?"1 slide selected":`${x} slides selected`,onChange:()=>d("selected")})]}),u==="selected"?p.jsxs("div",{className:"mt-4 rounded-md border border-foreground/[0.08]",children:[p.jsx("div",{className:"border-b border-foreground/[0.08] px-3 py-2 text-[11px] font-medium text-foreground/55",children:"Slides"}),p.jsx("div",{className:"grid max-h-[360px] grid-cols-2 gap-2 overflow-auto p-2 max-[620px]:grid-cols-1","data-testid":"pdf-slide-picker",children:s.map((C,A)=>{const M=C.file;return M?p.jsxs("label",{"data-testid":"pdf-slide-option",className:Pe("grid cursor-pointer grid-cols-[104px_1fr] gap-2 rounded-md border border-foreground/[0.08] bg-white p-2 text-[12px] transition-colors hover:border-foreground/20 hover:bg-foreground/[0.025]",g.has(M)&&"border-foreground/35 bg-foreground/[0.035]"),children:[p.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded border border-foreground/[0.08] bg-white",children:r[C.id]?p.jsx("img",{alt:`Slide ${A+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:r[C.id]}):p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",A+1]})}),p.jsx("div",{className:"flex min-w-0 flex-col justify-between gap-2",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("input",{type:"checkbox","aria-label":`Select slide ${A+1}`,checked:g.has(M),onChange:R=>w(M,R.target.checked),className:"mt-0.5 h-3.5 w-3.5 shrink-0 accent-foreground"}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"font-mono text-[11px] text-foreground/45",children:A+1}),p.jsx("div",{className:"mt-0.5 line-clamp-2 text-[12px] font-medium leading-snug text-foreground/75",children:C.title})]})]})})]},C.id):null})})]}):null]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[p.jsx("button",{type:"button",onClick:o,className:"h-8 rounded-md px-3 text-[12px] font-medium text-foreground/60 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:"Cancel"}),p.jsx("button",{type:"button",onClick:T,disabled:!y,className:"h-8 rounded-md bg-foreground px-3.5 text-[12px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:cursor-not-allowed disabled:opacity-40",children:"Export PDF"})]})]})})}function d0({checked:n,disabled:r,icon:o,label:i,detail:s,onChange:u}){return p.jsxs("label",{className:Pe("flex cursor-pointer items-center gap-3 rounded-md border border-foreground/[0.08] px-3 py-2.5 transition-colors",n&&"border-foreground/30 bg-foreground/[0.035]",r?"cursor-not-allowed opacity-45":"hover:border-foreground/20 hover:bg-foreground/[0.03]"),children:[p.jsx("input",{type:"radio",name:"pdf-export-scope",checked:n,disabled:r,onChange:u,className:"h-3.5 w-3.5 accent-foreground"}),p.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:p.jsx(o,{className:"h-4 w-4 text-foreground/65"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-[13px] font-medium text-foreground",children:i}),p.jsx("div",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:s})]})]})}const m0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,h0=Zv,nA=(n,r)=>o=>{var i;if((r==null?void 0:r.variants)==null)return h0(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:s,defaultVariants:u}=r,d=Object.keys(s).map(g=>{const x=o==null?void 0:o[g],y=u==null?void 0:u[g];if(x===null)return null;const w=m0(x)||m0(y);return s[g][w]}),m=o&&Object.entries(o).reduce((g,x)=>{let[y,w]=x;return w===void 0||(g[y]=w),g},{}),h=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((g,x)=>{let{class:y,className:w,...T}=x;return Object.entries(T).every(C=>{let[A,M]=C;return Array.isArray(M)?M.includes({...u,...m}[A]):{...u,...m}[A]===M})?[...g,y,w]:g},[]);return h0(n,d,h,o==null?void 0:o.class,o==null?void 0:o.className)};function p0(n,r){if(typeof n=="function")return n(r);n!=null&&(n.current=r)}function Tm(...n){return r=>{let o=!1;const i=n.map(s=>{const u=p0(s,r);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():p0(n[s],null)}}}}function et(...n){return v.useCallback(Tm(...n),n)}function Er(n){const r=rA(n),o=v.forwardRef((i,s)=>{const{children:u,...d}=i,m=v.Children.toArray(u),h=m.find(lA);if(h){const g=h.props.children,x=m.map(y=>y===h?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:y);return p.jsx(r,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,x):null})}return p.jsx(r,{...d,ref:s,children:u})});return o.displayName=`${n}.Slot`,o}var aA=Er("Slot");function rA(n){const r=v.forwardRef((o,i)=>{const{children:s,...u}=o;if(v.isValidElement(s)){const d=sA(s),m=iA(u,s.props);return s.type!==v.Fragment&&(m.ref=i?Tm(i,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var db=Symbol("radix.slottable");function oA(n){const r=({children:o})=>p.jsx(p.Fragment,{children:o});return r.displayName=`${n}.Slottable`,r.__radixId=db,r}function lA(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===db}function iA(n,r){const o={...r};for(const i in r){const s=n[i],u=r[i];/^on[A-Z]/.test(i)?s&&u?o[i]=(...m)=>{const h=u(...m);return s(...m),h}:s&&(o[i]=s):i==="style"?o[i]={...s,...u}:i==="className"&&(o[i]=[s,u].filter(Boolean).join(" "))}return{...n,...o}}function sA(n){var i,s;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var cA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=cA.reduce((n,r)=>{const o=Er(`Primitive.${r}`),i=v.forwardRef((s,u)=>{const{asChild:d,...m}=s,h=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(h,{...m,ref:u})});return i.displayName=`Primitive.${r}`,{...n,[r]:i}},{});function mb(n,r){n&&mi.flushSync(()=>n.dispatchEvent(r))}var hb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),uA="VisuallyHidden",pb=v.forwardRef((n,r)=>p.jsx($e.span,{...n,ref:r,style:{...hb,...n.style}}));pb.displayName=uA;var fA=pb;function dA(n,r){const o=v.createContext(r),i=u=>{const{children:d,...m}=u,h=v.useMemo(()=>m,Object.values(m));return p.jsx(o.Provider,{value:h,children:d})};i.displayName=n+"Provider";function s(u){const d=v.useContext(o);if(d)return d;if(r!==void 0)return r;throw new Error(`\`${u}\` must be used within \`${n}\``)}return[i,s]}function Ua(n,r=[]){let o=[];function i(u,d){const m=v.createContext(d),h=o.length;o=[...o,d];const g=y=>{var R;const{scope:w,children:T,...C}=y,A=((R=w==null?void 0:w[n])==null?void 0:R[h])||m,M=v.useMemo(()=>C,Object.values(C));return p.jsx(A.Provider,{value:M,children:T})};g.displayName=u+"Provider";function x(y,w){var A;const T=((A=w==null?void 0:w[n])==null?void 0:A[h])||m,C=v.useContext(T);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${y}\` must be used within \`${u}\``)}return[g,x]}const s=()=>{const u=o.map(d=>v.createContext(d));return function(m){const h=(m==null?void 0:m[n])||u;return v.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return s.scopeName=n,[i,mA(s,...r)]}function mA(...n){const r=n[0];if(n.length===1)return r;const o=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const d=i.reduce((m,{useScope:h,scopeName:g})=>{const y=h(u)[`__scope${g}`];return{...m,...y}},{});return v.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}function Am(n){const r=n+"CollectionProvider",[o,i]=Ua(r),[s,u]=o(r,{collectionRef:{current:null},itemMap:new Map}),d=A=>{const{scope:M,children:R}=A,z=pe.useRef(null),H=pe.useRef(new Map).current;return p.jsx(s,{scope:M,itemMap:H,collectionRef:z,children:R})};d.displayName=r;const m=n+"CollectionSlot",h=Er(m),g=pe.forwardRef((A,M)=>{const{scope:R,children:z}=A,H=u(m,R),Y=et(M,H.collectionRef);return p.jsx(h,{ref:Y,children:z})});g.displayName=m;const x=n+"CollectionItemSlot",y="data-radix-collection-item",w=Er(x),T=pe.forwardRef((A,M)=>{const{scope:R,children:z,...H}=A,Y=pe.useRef(null),J=et(M,Y),$=u(x,R);return pe.useEffect(()=>($.itemMap.set(Y,{ref:Y,...H}),()=>void $.itemMap.delete(Y))),p.jsx(w,{[y]:"",ref:J,children:z})});T.displayName=x;function C(A){const M=u(n+"CollectionConsumer",A);return pe.useCallback(()=>{const z=M.collectionRef.current;if(!z)return[];const H=Array.from(z.querySelectorAll(`[${y}]`));return Array.from(M.itemMap.values()).sort(($,V)=>H.indexOf($.ref.current)-H.indexOf(V.ref.current))},[M.collectionRef,M.itemMap])}return[{Provider:d,Slot:g,ItemSlot:T},C,i]}function ye(n,r,{checkForDefaultPrevented:o=!0}={}){return function(s){if(n==null||n(s),o===!1||!s.defaultPrevented)return r==null?void 0:r(s)}}var Wt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},hA=wv[" useInsertionEffect ".trim().toString()]||Wt;function tl({prop:n,defaultProp:r,onChange:o=()=>{},caller:i}){const[s,u,d]=pA({defaultProp:r,onChange:o}),m=n!==void 0,h=m?n:s;{const x=v.useRef(n!==void 0);v.useEffect(()=>{const y=x.current;y!==m&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=m},[m,i])}const g=v.useCallback(x=>{var y;if(m){const w=gA(x)?x(n):x;w!==n&&((y=d.current)==null||y.call(d,w))}else u(x)},[m,n,u,d]);return[h,g]}function pA({defaultProp:n,onChange:r}){const[o,i]=v.useState(n),s=v.useRef(o),u=v.useRef(r);return hA(()=>{u.current=r},[r]),v.useEffect(()=>{var d;s.current!==o&&((d=u.current)==null||d.call(u,o),s.current=o)},[o,s]),[o,i,u]}function gA(n){return typeof n=="function"}function yA(n,r){return v.useReducer((o,i)=>r[o][i]??o,n)}var Wn=n=>{const{present:r,children:o}=n,i=vA(r),s=typeof o=="function"?o({present:i.isPresent}):v.Children.only(o),u=et(i.ref,bA(s));return typeof o=="function"||i.isPresent?v.cloneElement(s,{ref:u}):null};Wn.displayName="Presence";function vA(n){const[r,o]=v.useState(),i=v.useRef(null),s=v.useRef(n),u=v.useRef("none"),d=n?"mounted":"unmounted",[m,h]=yA(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const g=$s(i.current);u.current=m==="mounted"?g:"none"},[m]),Wt(()=>{const g=i.current,x=s.current;if(x!==n){const w=u.current,T=$s(g);n?h("MOUNT"):T==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(x&&w!==T?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,h]),Wt(()=>{if(r){let g;const x=r.ownerDocument.defaultView??window,y=T=>{const A=$s(i.current).includes(CSS.escape(T.animationName));if(T.target===r&&A&&(h("ANIMATION_END"),!s.current)){const M=r.style.animationFillMode;r.style.animationFillMode="forwards",g=x.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=M)})}},w=T=>{T.target===r&&(u.current=$s(i.current))};return r.addEventListener("animationstart",w),r.addEventListener("animationcancel",y),r.addEventListener("animationend",y),()=>{x.clearTimeout(g),r.removeEventListener("animationstart",w),r.removeEventListener("animationcancel",y),r.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[r,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:v.useCallback(g=>{i.current=g?getComputedStyle(g):null,o(g)},[])}}function $s(n){return(n==null?void 0:n.animationName)||"none"}function bA(n){var i,s;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var xA=wv[" useId ".trim().toString()]||(()=>{}),SA=0;function ca(n){const[r,o]=v.useState(xA());return Wt(()=>{o(i=>i??String(SA++))},[n]),n||(r?`radix-${r}`:"")}var wA=v.createContext(void 0);function Mm(n){const r=v.useContext(wA);return n||r||"ltr"}function Pn(n){const r=v.useRef(n);return v.useEffect(()=>{r.current=n}),v.useMemo(()=>(...o)=>{var i;return(i=r.current)==null?void 0:i.call(r,...o)},[])}function EA(n,r=globalThis==null?void 0:globalThis.document){const o=Pn(n);v.useEffect(()=>{const i=s=>{s.key==="Escape"&&o(s)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[o,r])}var CA="DismissableLayer",Fd="dismissableLayer.update",TA="dismissableLayer.pointerDownOutside",AA="dismissableLayer.focusOutside",g0,gb=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),il=v.forwardRef((n,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...h}=n,g=v.useContext(gb),[x,y]=v.useState(null),w=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,T]=v.useState({}),C=et(r,V=>y(V)),A=Array.from(g.layers),[M]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),R=A.indexOf(M),z=x?A.indexOf(x):-1,H=g.layersWithOutsidePointerEventsDisabled.size>0,Y=z>=R,J=NA(V=>{const k=V.target,K=[...g.branches].some(ie=>ie.contains(k));!Y||K||(s==null||s(V),d==null||d(V),V.defaultPrevented||m==null||m())},w),$=RA(V=>{const k=V.target;[...g.branches].some(ie=>ie.contains(k))||(u==null||u(V),d==null||d(V),V.defaultPrevented||m==null||m())},w);return EA(V=>{z===g.layers.size-1&&(i==null||i(V),!V.defaultPrevented&&m&&(V.preventDefault(),m()))},w),v.useEffect(()=>{if(x)return o&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(g0=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),y0(),()=>{o&&g.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=g0)}},[x,w,o,g]),v.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),y0())},[x,g]),v.useEffect(()=>{const V=()=>T({});return document.addEventListener(Fd,V),()=>document.removeEventListener(Fd,V)},[]),p.jsx($e.div,{...h,ref:C,style:{pointerEvents:H?Y?"auto":"none":void 0,...n.style},onFocusCapture:ye(n.onFocusCapture,$.onFocusCapture),onBlurCapture:ye(n.onBlurCapture,$.onBlurCapture),onPointerDownCapture:ye(n.onPointerDownCapture,J.onPointerDownCapture)})});il.displayName=CA;var MA="DismissableLayerBranch",_A=v.forwardRef((n,r)=>{const o=v.useContext(gb),i=v.useRef(null),s=et(r,i);return v.useEffect(()=>{const u=i.current;if(u)return o.branches.add(u),()=>{o.branches.delete(u)}},[o.branches]),p.jsx($e.div,{...n,ref:s})});_A.displayName=MA;function NA(n,r=globalThis==null?void 0:globalThis.document){const o=Pn(n),i=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const u=m=>{if(m.target&&!i.current){let h=function(){yb(TA,o,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(r.removeEventListener("click",s.current),s.current=h,r.addEventListener("click",s.current,{once:!0})):h()}else r.removeEventListener("click",s.current);i.current=!1},d=window.setTimeout(()=>{r.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),r.removeEventListener("pointerdown",u),r.removeEventListener("click",s.current)}},[r,o]),{onPointerDownCapture:()=>i.current=!0}}function RA(n,r=globalThis==null?void 0:globalThis.document){const o=Pn(n),i=v.useRef(!1);return v.useEffect(()=>{const s=u=>{u.target&&!i.current&&yb(AA,o,{originalEvent:u},{discrete:!1})};return r.addEventListener("focusin",s),()=>r.removeEventListener("focusin",s)},[r,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function y0(){const n=new CustomEvent(Fd);document.dispatchEvent(n)}function yb(n,r,o,{discrete:i}){const s=o.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});r&&s.addEventListener(n,r,{once:!0}),i?mb(s,u):s.dispatchEvent(u)}var ud="focusScope.autoFocusOnMount",fd="focusScope.autoFocusOnUnmount",v0={bubbles:!1,cancelable:!0},OA="FocusScope",pi=v.forwardRef((n,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...d}=n,[m,h]=v.useState(null),g=Pn(s),x=Pn(u),y=v.useRef(null),w=et(r,A=>h(A)),T=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let A=function(H){if(T.paused||!m)return;const Y=H.target;m.contains(Y)?y.current=Y:yr(y.current,{select:!0})},M=function(H){if(T.paused||!m)return;const Y=H.relatedTarget;Y!==null&&(m.contains(Y)||yr(y.current,{select:!0}))},R=function(H){if(document.activeElement===document.body)for(const J of H)J.removedNodes.length>0&&yr(m)};document.addEventListener("focusin",A),document.addEventListener("focusout",M);const z=new MutationObserver(R);return m&&z.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",M),z.disconnect()}}},[i,m,T.paused]),v.useEffect(()=>{if(m){x0.add(T);const A=document.activeElement;if(!m.contains(A)){const R=new CustomEvent(ud,v0);m.addEventListener(ud,g),m.dispatchEvent(R),R.defaultPrevented||(DA(HA(vb(m)),{select:!0}),document.activeElement===A&&yr(m))}return()=>{m.removeEventListener(ud,g),setTimeout(()=>{const R=new CustomEvent(fd,v0);m.addEventListener(fd,x),m.dispatchEvent(R),R.defaultPrevented||yr(A??document.body,{select:!0}),m.removeEventListener(fd,x),x0.remove(T)},0)}}},[m,g,x,T]);const C=v.useCallback(A=>{if(!o&&!i||T.paused)return;const M=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,R=document.activeElement;if(M&&R){const z=A.currentTarget,[H,Y]=jA(z);H&&Y?!A.shiftKey&&R===Y?(A.preventDefault(),o&&yr(H,{select:!0})):A.shiftKey&&R===H&&(A.preventDefault(),o&&yr(Y,{select:!0})):R===z&&A.preventDefault()}},[o,i,T.paused]);return p.jsx($e.div,{tabIndex:-1,...d,ref:w,onKeyDown:C})});pi.displayName=OA;function DA(n,{select:r=!1}={}){const o=document.activeElement;for(const i of n)if(yr(i,{select:r}),document.activeElement!==o)return}function jA(n){const r=vb(n),o=b0(r,n),i=b0(r.reverse(),n);return[o,i]}function vb(n){const r=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function b0(n,r){for(const o of n)if(!zA(o,{upTo:r}))return o}function zA(n,{upTo:r}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(r!==void 0&&n===r)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function kA(n){return n instanceof HTMLInputElement&&"select"in n}function yr(n,{select:r=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&kA(n)&&r&&n.select()}}var x0=LA();function LA(){let n=[];return{add(r){const o=n[0];r!==o&&(o==null||o.pause()),n=S0(n,r),n.unshift(r)},remove(r){var o;n=S0(n,r),(o=n[0])==null||o.resume()}}}function S0(n,r){const o=[...n],i=o.indexOf(r);return i!==-1&&o.splice(i,1),o}function HA(n){return n.filter(r=>r.tagName!=="A")}var BA="Portal",gi=v.forwardRef((n,r)=>{var m;const{container:o,...i}=n,[s,u]=v.useState(!1);Wt(()=>u(!0),[]);const d=o||s&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return d?Cv.createPortal(p.jsx($e.div,{...i,ref:r}),d):null});gi.displayName=BA;var dd=0;function Ac(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??w0()),document.body.insertAdjacentElement("beforeend",n[1]??w0()),dd++,()=>{dd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),dd--}},[])}function w0(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var ia=function(){return ia=Object.assign||function(r){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(r[u]=o[u])}return r},ia.apply(this,arguments)};function bb(n,r){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)r.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(o[i[s]]=n[i[s]]);return o}function UA(n,r,o){if(o||arguments.length===2)for(var i=0,s=r.length,u;i<s;i++)(u||!(i in r))&&(u||(u=Array.prototype.slice.call(r,0,i)),u[i]=r[i]);return n.concat(u||Array.prototype.slice.call(r))}var tc="right-scroll-bar-position",nc="width-before-scroll-bar",IA="with-scroll-bars-hidden",PA="--removed-body-scroll-bar-size";function md(n,r){return typeof n=="function"?n(r):n&&(n.current=r),n}function $A(n,r){var o=v.useState(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(i){var s=o.value;s!==i&&(o.value=i,o.callback(i,s))}}}})[0];return o.callback=r,o.facade}var GA=typeof window<"u"?v.useLayoutEffect:v.useEffect,E0=new WeakMap;function YA(n,r){var o=$A(null,function(i){return n.forEach(function(s){return md(s,i)})});return GA(function(){var i=E0.get(o);if(i){var s=new Set(i),u=new Set(n),d=o.current;s.forEach(function(m){u.has(m)||md(m,null)}),u.forEach(function(m){s.has(m)||md(m,d)})}E0.set(o,n)},[n]),o}function qA(n){return n}function VA(n,r){r===void 0&&(r=qA);var o=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(u){var d=r(u,i);return o.push(d),function(){o=o.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(i=!0;o.length;){var d=o;o=[],d.forEach(u)}o={push:function(m){return u(m)},filter:function(){return o}}},assignMedium:function(u){i=!0;var d=[];if(o.length){var m=o;o=[],m.forEach(u),d=o}var h=function(){var x=d;d=[],x.forEach(u)},g=function(){return Promise.resolve().then(h)};g(),o={push:function(x){d.push(x),g()},filter:function(x){return d=d.filter(x),o}}}};return s}function XA(n){n===void 0&&(n={});var r=VA(null);return r.options=ia({async:!0,ssr:!1},n),r}var xb=function(n){var r=n.sideCar,o=bb(n,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return v.createElement(i,ia({},o))};xb.isSideCarExport=!0;function FA(n,r){return n.useMedium(r),xb}var Sb=XA(),hd=function(){},Mc=v.forwardRef(function(n,r){var o=v.useRef(null),i=v.useState({onScrollCapture:hd,onWheelCapture:hd,onTouchMoveCapture:hd}),s=i[0],u=i[1],d=n.forwardProps,m=n.children,h=n.className,g=n.removeScrollBar,x=n.enabled,y=n.shards,w=n.sideCar,T=n.noRelative,C=n.noIsolation,A=n.inert,M=n.allowPinchZoom,R=n.as,z=R===void 0?"div":R,H=n.gapMode,Y=bb(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),J=w,$=YA([o,r]),V=ia(ia({},Y),s);return v.createElement(v.Fragment,null,x&&v.createElement(J,{sideCar:Sb,removeScrollBar:g,shards:y,noRelative:T,noIsolation:C,inert:A,setCallbacks:u,allowPinchZoom:!!M,lockRef:o,gapMode:H}),d?v.cloneElement(v.Children.only(m),ia(ia({},V),{ref:$})):v.createElement(z,ia({},V,{className:h,ref:$}),m))});Mc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mc.classNames={fullWidth:nc,zeroRight:tc};var KA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function QA(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var r=KA();return r&&n.setAttribute("nonce",r),n}function ZA(n,r){n.styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r))}function WA(n){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(n)}var JA=function(){var n=0,r=null;return{add:function(o){n==0&&(r=QA())&&(ZA(r,o),WA(r)),n++},remove:function(){n--,!n&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},eM=function(){var n=JA();return function(r,o){v.useEffect(function(){return n.add(r),function(){n.remove()}},[r&&o])}},wb=function(){var n=eM(),r=function(o){var i=o.styles,s=o.dynamic;return n(i,s),null};return r},tM={left:0,top:0,right:0,gap:0},pd=function(n){return parseInt(n||"",10)||0},nM=function(n){var r=window.getComputedStyle(document.body),o=r[n==="padding"?"paddingLeft":"marginLeft"],i=r[n==="padding"?"paddingTop":"marginTop"],s=r[n==="padding"?"paddingRight":"marginRight"];return[pd(o),pd(i),pd(s)]},aM=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return tM;var r=nM(n),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-o+r[2]-r[0])}},rM=wb(),Wo="data-scroll-locked",oM=function(n,r,o,i){var s=n.left,u=n.top,d=n.right,m=n.gap;return o===void 0&&(o="margin"),`
|
|
376
|
+
.`.concat(IA,` {
|
|
377
|
+
overflow: hidden `).concat(i,`;
|
|
378
|
+
padding-right: `).concat(m,"px ").concat(i,`;
|
|
379
|
+
}
|
|
380
|
+
body[`).concat(Wo,`] {
|
|
381
|
+
overflow: hidden `).concat(i,`;
|
|
382
|
+
overscroll-behavior: contain;
|
|
383
|
+
`).concat([r&&"position: relative ".concat(i,";"),o==="margin"&&`
|
|
384
|
+
padding-left: `.concat(s,`px;
|
|
385
|
+
padding-top: `).concat(u,`px;
|
|
386
|
+
padding-right: `).concat(d,`px;
|
|
387
|
+
margin-left:0;
|
|
388
|
+
margin-top:0;
|
|
389
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
390
|
+
`),o==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.`).concat(tc,` {
|
|
394
|
+
right: `).concat(m,"px ").concat(i,`;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.`).concat(nc,` {
|
|
398
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.`).concat(tc," .").concat(tc,` {
|
|
402
|
+
right: 0 `).concat(i,`;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.`).concat(nc," .").concat(nc,` {
|
|
406
|
+
margin-right: 0 `).concat(i,`;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
body[`).concat(Wo,`] {
|
|
410
|
+
`).concat(PA,": ").concat(m,`px;
|
|
411
|
+
}
|
|
412
|
+
`)},C0=function(){var n=parseInt(document.body.getAttribute(Wo)||"0",10);return isFinite(n)?n:0},lM=function(){v.useEffect(function(){return document.body.setAttribute(Wo,(C0()+1).toString()),function(){var n=C0()-1;n<=0?document.body.removeAttribute(Wo):document.body.setAttribute(Wo,n.toString())}},[])},iM=function(n){var r=n.noRelative,o=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;lM();var u=v.useMemo(function(){return aM(s)},[s]);return v.createElement(rM,{styles:oM(u,!r,s,o?"":"!important")})},Kd=!1;if(typeof window<"u")try{var Gs=Object.defineProperty({},"passive",{get:function(){return Kd=!0,!0}});window.addEventListener("test",Gs,Gs),window.removeEventListener("test",Gs,Gs)}catch{Kd=!1}var qo=Kd?{passive:!1}:!1,sM=function(n){return n.tagName==="TEXTAREA"},Eb=function(n,r){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!sM(n)&&o[r]==="visible")},cM=function(n){return Eb(n,"overflowY")},uM=function(n){return Eb(n,"overflowX")},T0=function(n,r){var o=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Cb(n,i);if(s){var u=Tb(n,i),d=u[1],m=u[2];if(d>m)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},fM=function(n){var r=n.scrollTop,o=n.scrollHeight,i=n.clientHeight;return[r,o,i]},dM=function(n){var r=n.scrollLeft,o=n.scrollWidth,i=n.clientWidth;return[r,o,i]},Cb=function(n,r){return n==="v"?cM(r):uM(r)},Tb=function(n,r){return n==="v"?fM(r):dM(r)},mM=function(n,r){return n==="h"&&r==="rtl"?-1:1},hM=function(n,r,o,i,s){var u=mM(n,window.getComputedStyle(r).direction),d=u*i,m=o.target,h=r.contains(m),g=!1,x=d>0,y=0,w=0;do{if(!m)break;var T=Tb(n,m),C=T[0],A=T[1],M=T[2],R=A-M-u*C;(C||R)&&Cb(n,m)&&(y+=R,w+=C);var z=m.parentNode;m=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!h&&m!==document.body||h&&(r.contains(m)||r===m));return(x&&Math.abs(y)<1||!x&&Math.abs(w)<1)&&(g=!0),g},Ys=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},A0=function(n){return[n.deltaX,n.deltaY]},M0=function(n){return n&&"current"in n?n.current:n},pM=function(n,r){return n[0]===r[0]&&n[1]===r[1]},gM=function(n){return`
|
|
413
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
414
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
415
|
+
`)},yM=0,Vo=[];function vM(n){var r=v.useRef([]),o=v.useRef([0,0]),i=v.useRef(),s=v.useState(yM++)[0],u=v.useState(wb)[0],d=v.useRef(n);v.useEffect(function(){d.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var A=UA([n.lockRef.current],(n.shards||[]).map(M0),!0).filter(Boolean);return A.forEach(function(M){return M.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),A.forEach(function(M){return M.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var m=v.useCallback(function(A,M){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!d.current.allowPinchZoom;var R=Ys(A),z=o.current,H="deltaX"in A?A.deltaX:z[0]-R[0],Y="deltaY"in A?A.deltaY:z[1]-R[1],J,$=A.target,V=Math.abs(H)>Math.abs(Y)?"h":"v";if("touches"in A&&V==="h"&&$.type==="range")return!1;var k=window.getSelection(),K=k&&k.anchorNode,ie=K?K===$||K.contains($):!1;if(ie)return!1;var se=T0(V,$);if(!se)return!0;if(se?J=V:(J=V==="v"?"h":"v",se=T0(V,$)),!se)return!1;if(!i.current&&"changedTouches"in A&&(H||Y)&&(i.current=J),!J)return!0;var q=i.current||J;return hM(q,M,A,q==="h"?H:Y)},[]),h=v.useCallback(function(A){var M=A;if(!(!Vo.length||Vo[Vo.length-1]!==u)){var R="deltaY"in M?A0(M):Ys(M),z=r.current.filter(function(J){return J.name===M.type&&(J.target===M.target||M.target===J.shadowParent)&&pM(J.delta,R)})[0];if(z&&z.should){M.cancelable&&M.preventDefault();return}if(!z){var H=(d.current.shards||[]).map(M0).filter(Boolean).filter(function(J){return J.contains(M.target)}),Y=H.length>0?m(M,H[0]):!d.current.noIsolation;Y&&M.cancelable&&M.preventDefault()}}},[]),g=v.useCallback(function(A,M,R,z){var H={name:A,delta:M,target:R,should:z,shadowParent:bM(R)};r.current.push(H),setTimeout(function(){r.current=r.current.filter(function(Y){return Y!==H})},1)},[]),x=v.useCallback(function(A){o.current=Ys(A),i.current=void 0},[]),y=v.useCallback(function(A){g(A.type,A0(A),A.target,m(A,n.lockRef.current))},[]),w=v.useCallback(function(A){g(A.type,Ys(A),A.target,m(A,n.lockRef.current))},[]);v.useEffect(function(){return Vo.push(u),n.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:w}),document.addEventListener("wheel",h,qo),document.addEventListener("touchmove",h,qo),document.addEventListener("touchstart",x,qo),function(){Vo=Vo.filter(function(A){return A!==u}),document.removeEventListener("wheel",h,qo),document.removeEventListener("touchmove",h,qo),document.removeEventListener("touchstart",x,qo)}},[]);var T=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(u,{styles:gM(s)}):null,T?v.createElement(iM,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function bM(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const xM=FA(Sb,vM);var yi=v.forwardRef(function(n,r){return v.createElement(Mc,ia({},n,{ref:r,sideCar:xM}))});yi.classNames=Mc.classNames;var SM=function(n){if(typeof document>"u")return null;var r=Array.isArray(n)?n[0]:n;return r.ownerDocument.body},Xo=new WeakMap,qs=new WeakMap,Vs={},gd=0,Ab=function(n){return n&&(n.host||Ab(n.parentNode))},wM=function(n,r){return r.map(function(o){if(n.contains(o))return o;var i=Ab(o);return i&&n.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},EM=function(n,r,o,i){var s=wM(r,Array.isArray(n)?n:[n]);Vs[o]||(Vs[o]=new WeakMap);var u=Vs[o],d=[],m=new Set,h=new Set(s),g=function(y){!y||m.has(y)||(m.add(y),g(y.parentNode))};s.forEach(g);var x=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(w){if(m.has(w))x(w);else try{var T=w.getAttribute(i),C=T!==null&&T!=="false",A=(Xo.get(w)||0)+1,M=(u.get(w)||0)+1;Xo.set(w,A),u.set(w,M),d.push(w),A===1&&C&&qs.set(w,!0),M===1&&w.setAttribute(o,"true"),C||w.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",w,R)}})};return x(r),m.clear(),gd++,function(){d.forEach(function(y){var w=Xo.get(y)-1,T=u.get(y)-1;Xo.set(y,w),u.set(y,T),w||(qs.has(y)||y.removeAttribute(i),qs.delete(y)),T||y.removeAttribute(o)}),gd--,gd||(Xo=new WeakMap,Xo=new WeakMap,qs=new WeakMap,Vs={})}},_c=function(n,r,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=SM(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),EM(i,s,o,"aria-hidden")):function(){return null}},Nc="Dialog",[Mb]=Ua(Nc),[CM,Jn]=Mb(Nc),_b=n=>{const{__scopeDialog:r,children:o,open:i,defaultOpen:s,onOpenChange:u,modal:d=!0}=n,m=v.useRef(null),h=v.useRef(null),[g,x]=tl({prop:i,defaultProp:s??!1,onChange:u,caller:Nc});return p.jsx(CM,{scope:r,triggerRef:m,contentRef:h,contentId:ca(),titleId:ca(),descriptionId:ca(),open:g,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(y=>!y),[x]),modal:d,children:o})};_b.displayName=Nc;var Nb="DialogTrigger",TM=v.forwardRef((n,r)=>{const{__scopeDialog:o,...i}=n,s=Jn(Nb,o),u=et(r,s.triggerRef);return p.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Rm(s.open),...i,ref:u,onClick:ye(n.onClick,s.onOpenToggle)})});TM.displayName=Nb;var _m="DialogPortal",[AM,Rb]=Mb(_m,{forceMount:void 0}),Ob=n=>{const{__scopeDialog:r,forceMount:o,children:i,container:s}=n,u=Jn(_m,r);return p.jsx(AM,{scope:r,forceMount:o,children:v.Children.map(i,d=>p.jsx(Wn,{present:o||u.open,children:p.jsx(gi,{asChild:!0,container:s,children:d})}))})};Ob.displayName=_m;var mc="DialogOverlay",Db=v.forwardRef((n,r)=>{const o=Rb(mc,n.__scopeDialog),{forceMount:i=o.forceMount,...s}=n,u=Jn(mc,n.__scopeDialog);return u.modal?p.jsx(Wn,{present:i||u.open,children:p.jsx(_M,{...s,ref:r})}):null});Db.displayName=mc;var MM=Er("DialogOverlay.RemoveScroll"),_M=v.forwardRef((n,r)=>{const{__scopeDialog:o,...i}=n,s=Jn(mc,o);return p.jsx(yi,{as:MM,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsx($e.div,{"data-state":Rm(s.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),no="DialogContent",jb=v.forwardRef((n,r)=>{const o=Rb(no,n.__scopeDialog),{forceMount:i=o.forceMount,...s}=n,u=Jn(no,n.__scopeDialog);return p.jsx(Wn,{present:i||u.open,children:u.modal?p.jsx(NM,{...s,ref:r}):p.jsx(RM,{...s,ref:r})})});jb.displayName=no;var NM=v.forwardRef((n,r)=>{const o=Jn(no,n.__scopeDialog),i=v.useRef(null),s=et(r,o.contentRef,i);return v.useEffect(()=>{const u=i.current;if(u)return _c(u)},[]),p.jsx(zb,{...n,ref:s,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(n.onCloseAutoFocus,u=>{var d;u.preventDefault(),(d=o.triggerRef.current)==null||d.focus()}),onPointerDownOutside:ye(n.onPointerDownOutside,u=>{const d=u.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&u.preventDefault()}),onFocusOutside:ye(n.onFocusOutside,u=>u.preventDefault())})}),RM=v.forwardRef((n,r)=>{const o=Jn(no,n.__scopeDialog),i=v.useRef(!1),s=v.useRef(!1);return p.jsx(zb,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var d,m;(d=n.onCloseAutoFocus)==null||d.call(n,u),u.defaultPrevented||(i.current||(m=o.triggerRef.current)==null||m.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var h,g;(h=n.onInteractOutside)==null||h.call(n,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=u.target;((g=o.triggerRef.current)==null?void 0:g.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),zb=v.forwardRef((n,r)=>{const{__scopeDialog:o,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...d}=n,m=Jn(no,o),h=v.useRef(null),g=et(r,h);return Ac(),p.jsxs(p.Fragment,{children:[p.jsx(pi,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:p.jsx(il,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Rm(m.open),...d,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(OM,{titleId:m.titleId}),p.jsx(jM,{contentRef:h,descriptionId:m.descriptionId})]})]})}),Nm="DialogTitle",kb=v.forwardRef((n,r)=>{const{__scopeDialog:o,...i}=n,s=Jn(Nm,o);return p.jsx($e.h2,{id:s.titleId,...i,ref:r})});kb.displayName=Nm;var Lb="DialogDescription",Hb=v.forwardRef((n,r)=>{const{__scopeDialog:o,...i}=n,s=Jn(Lb,o);return p.jsx($e.p,{id:s.descriptionId,...i,ref:r})});Hb.displayName=Lb;var Bb="DialogClose",Ub=v.forwardRef((n,r)=>{const{__scopeDialog:o,...i}=n,s=Jn(Bb,o);return p.jsx($e.button,{type:"button",...i,ref:r,onClick:ye(n.onClick,()=>s.onOpenChange(!1))})});Ub.displayName=Bb;function Rm(n){return n?"open":"closed"}var Ib="DialogTitleWarning",[mj,Pb]=dA(Ib,{contentName:no,titleName:Nm,docsSlug:"dialog"}),OM=({titleId:n})=>{const r=Pb(Ib),o=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
416
|
+
|
|
417
|
+
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
418
|
+
|
|
419
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return v.useEffect(()=>{n&&(document.getElementById(n)||console.error(o))},[o,n]),null},DM="DialogDescriptionWarning",jM=({contentRef:n,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pb(DM).contentName}}.`;return v.useEffect(()=>{var u;const s=(u=n.current)==null?void 0:u.getAttribute("aria-describedby");r&&s&&(document.getElementById(r)||console.warn(i))},[i,n,r]),null},zM=_b,kM=Ob,LM=Db,HM=jb,BM=kb,UM=Hb,IM=Ub;function PM(n){const r=v.useRef({value:n,previous:n});return v.useMemo(()=>(r.current.value!==n&&(r.current.previous=r.current.value,r.current.value=n),r.current.previous),[n])}function $M(n){const[r,o]=v.useState(void 0);return Wt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let d,m;if("borderBoxSize"in u){const h=u.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;o({width:d,height:m})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else o(void 0)},[n]),r}const GM=["top","right","bottom","left"],Cr=Math.min,Tn=Math.max,hc=Math.round,Xs=Math.floor,ua=n=>({x:n,y:n}),YM={left:"right",right:"left",bottom:"top",top:"bottom"};function Qd(n,r,o){return Tn(n,Cr(r,o))}function Ha(n,r){return typeof n=="function"?n(r):n}function Ba(n){return n.split("-")[0]}function sl(n){return n.split("-")[1]}function Om(n){return n==="x"?"y":"x"}function Dm(n){return n==="y"?"height":"width"}function sa(n){const r=n[0];return r==="t"||r==="b"?"y":"x"}function jm(n){return Om(sa(n))}function qM(n,r,o){o===void 0&&(o=!1);const i=sl(n),s=jm(n),u=Dm(s);let d=s==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(d=pc(d)),[d,pc(d)]}function VM(n){const r=pc(n);return[Zd(n),r,Zd(r)]}function Zd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const _0=["left","right"],N0=["right","left"],XM=["top","bottom"],FM=["bottom","top"];function KM(n,r,o){switch(n){case"top":case"bottom":return o?r?N0:_0:r?_0:N0;case"left":case"right":return r?XM:FM;default:return[]}}function QM(n,r,o,i){const s=sl(n);let u=KM(Ba(n),o==="start",i);return s&&(u=u.map(d=>d+"-"+s),r&&(u=u.concat(u.map(Zd)))),u}function pc(n){const r=Ba(n);return YM[r]+n.slice(r.length)}function ZM(n){return{top:0,right:0,bottom:0,left:0,...n}}function $b(n){return typeof n!="number"?ZM(n):{top:n,right:n,bottom:n,left:n}}function gc(n){const{x:r,y:o,width:i,height:s}=n;return{width:i,height:s,top:o,left:r,right:r+i,bottom:o+s,x:r,y:o}}function R0(n,r,o){let{reference:i,floating:s}=n;const u=sa(r),d=jm(r),m=Dm(d),h=Ba(r),g=u==="y",x=i.x+i.width/2-s.width/2,y=i.y+i.height/2-s.height/2,w=i[m]/2-s[m]/2;let T;switch(h){case"top":T={x,y:i.y-s.height};break;case"bottom":T={x,y:i.y+i.height};break;case"right":T={x:i.x+i.width,y};break;case"left":T={x:i.x-s.width,y};break;default:T={x:i.x,y:i.y}}switch(sl(r)){case"start":T[d]-=w*(o&&g?-1:1);break;case"end":T[d]+=w*(o&&g?-1:1);break}return T}async function WM(n,r){var o;r===void 0&&(r={});const{x:i,y:s,platform:u,rects:d,elements:m,strategy:h}=n,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:y="floating",altBoundary:w=!1,padding:T=0}=Ha(r,n),C=$b(T),M=m[w?y==="floating"?"reference":"floating":y],R=gc(await u.getClippingRect({element:(o=await(u.isElement==null?void 0:u.isElement(M)))==null||o?M:M.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(m.floating)),boundary:g,rootBoundary:x,strategy:h})),z=y==="floating"?{x:i,y:s,width:d.floating.width,height:d.floating.height}:d.reference,H=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),Y=await(u.isElement==null?void 0:u.isElement(H))?await(u.getScale==null?void 0:u.getScale(H))||{x:1,y:1}:{x:1,y:1},J=gc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:z,offsetParent:H,strategy:h}):z);return{top:(R.top-J.top+C.top)/Y.y,bottom:(J.bottom-R.bottom+C.bottom)/Y.y,left:(R.left-J.left+C.left)/Y.x,right:(J.right-R.right+C.right)/Y.x}}const JM=50,e_=async(n,r,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:d}=o,m=d.detectOverflow?d:{...d,detectOverflow:WM},h=await(d.isRTL==null?void 0:d.isRTL(r));let g=await d.getElementRects({reference:n,floating:r,strategy:s}),{x,y}=R0(g,i,h),w=i,T=0;const C={};for(let A=0;A<u.length;A++){const M=u[A];if(!M)continue;const{name:R,fn:z}=M,{x:H,y:Y,data:J,reset:$}=await z({x,y,initialPlacement:i,placement:w,strategy:s,middlewareData:C,rects:g,platform:m,elements:{reference:n,floating:r}});x=H??x,y=Y??y,C[R]={...C[R],...J},$&&T<JM&&(T++,typeof $=="object"&&($.placement&&(w=$.placement),$.rects&&(g=$.rects===!0?await d.getElementRects({reference:n,floating:r,strategy:s}):$.rects),{x,y}=R0(g,w,h)),A=-1)}return{x,y,placement:w,strategy:s,middlewareData:C}},t_=n=>({name:"arrow",options:n,async fn(r){const{x:o,y:i,placement:s,rects:u,platform:d,elements:m,middlewareData:h}=r,{element:g,padding:x=0}=Ha(n,r)||{};if(g==null)return{};const y=$b(x),w={x:o,y:i},T=jm(s),C=Dm(T),A=await d.getDimensions(g),M=T==="y",R=M?"top":"left",z=M?"bottom":"right",H=M?"clientHeight":"clientWidth",Y=u.reference[C]+u.reference[T]-w[T]-u.floating[C],J=w[T]-u.reference[T],$=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let V=$?$[H]:0;(!V||!await(d.isElement==null?void 0:d.isElement($)))&&(V=m.floating[H]||u.floating[C]);const k=Y/2-J/2,K=V/2-A[C]/2-1,ie=Cr(y[R],K),se=Cr(y[z],K),q=ie,ue=V-A[C]-se,de=V/2-A[C]/2+k,he=Qd(q,de,ue),S=!h.arrow&&sl(s)!=null&&de!==he&&u.reference[C]/2-(de<q?ie:se)-A[C]/2<0,_=S?de<q?de-q:de-ue:0;return{[T]:w[T]+_,data:{[T]:he,centerOffset:de-he-_,...S&&{alignmentOffset:_}},reset:S}}}),n_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var o,i;const{placement:s,middlewareData:u,rects:d,initialPlacement:m,platform:h,elements:g}=r,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:A=!0,...M}=Ha(n,r);if((o=u.arrow)!=null&&o.alignmentOffset)return{};const R=Ba(s),z=sa(m),H=Ba(m)===m,Y=await(h.isRTL==null?void 0:h.isRTL(g.floating)),J=w||(H||!A?[pc(m)]:VM(m)),$=C!=="none";!w&&$&&J.push(...QM(m,A,C,Y));const V=[m,...J],k=await h.detectOverflow(r,M),K=[];let ie=((i=u.flip)==null?void 0:i.overflows)||[];if(x&&K.push(k[R]),y){const de=qM(s,d,Y);K.push(k[de[0]],k[de[1]])}if(ie=[...ie,{placement:s,overflows:K}],!K.every(de=>de<=0)){var se,q;const de=(((se=u.flip)==null?void 0:se.index)||0)+1,he=V[de];if(he&&(!(y==="alignment"?z!==sa(he):!1)||ie.every(D=>sa(D.placement)===z?D.overflows[0]>0:!0)))return{data:{index:de,overflows:ie},reset:{placement:he}};let S=(q=ie.filter(_=>_.overflows[0]<=0).sort((_,D)=>_.overflows[1]-D.overflows[1])[0])==null?void 0:q.placement;if(!S)switch(T){case"bestFit":{var ue;const _=(ue=ie.filter(D=>{if($){const O=sa(D.placement);return O===z||O==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(O=>O>0).reduce((O,I)=>O+I,0)]).sort((D,O)=>D[1]-O[1])[0])==null?void 0:ue[0];_&&(S=_);break}case"initialPlacement":S=m;break}if(s!==S)return{reset:{placement:S}}}return{}}}};function O0(n,r){return{top:n.top-r.height,right:n.right-r.width,bottom:n.bottom-r.height,left:n.left-r.width}}function D0(n){return GM.some(r=>n[r]>=0)}const a_=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(r){const{rects:o,platform:i}=r,{strategy:s="referenceHidden",...u}=Ha(n,r);switch(s){case"referenceHidden":{const d=await i.detectOverflow(r,{...u,elementContext:"reference"}),m=O0(d,o.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:D0(m)}}}case"escaped":{const d=await i.detectOverflow(r,{...u,altBoundary:!0}),m=O0(d,o.floating);return{data:{escapedOffsets:m,escaped:D0(m)}}}default:return{}}}}},Gb=new Set(["left","top"]);async function r_(n,r){const{placement:o,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),d=Ba(o),m=sl(o),h=sa(o)==="y",g=Gb.has(d)?-1:1,x=u&&h?-1:1,y=Ha(r,n);let{mainAxis:w,crossAxis:T,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return m&&typeof C=="number"&&(T=m==="end"?C*-1:C),h?{x:T*x,y:w*g}:{x:w*g,y:T*x}}const o_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var o,i;const{x:s,y:u,placement:d,middlewareData:m}=r,h=await r_(r,n);return d===((o=m.offset)==null?void 0:o.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:s+h.x,y:u+h.y,data:{...h,placement:d}}}}},l_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:o,y:i,placement:s,platform:u}=r,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:R=>{let{x:z,y:H}=R;return{x:z,y:H}}},...g}=Ha(n,r),x={x:o,y:i},y=await u.detectOverflow(r,g),w=sa(Ba(s)),T=Om(w);let C=x[T],A=x[w];if(d){const R=T==="y"?"top":"left",z=T==="y"?"bottom":"right",H=C+y[R],Y=C-y[z];C=Qd(H,C,Y)}if(m){const R=w==="y"?"top":"left",z=w==="y"?"bottom":"right",H=A+y[R],Y=A-y[z];A=Qd(H,A,Y)}const M=h.fn({...r,[T]:C,[w]:A});return{...M,data:{x:M.x-o,y:M.y-i,enabled:{[T]:d,[w]:m}}}}}},i_=function(n){return n===void 0&&(n={}),{options:n,fn(r){const{x:o,y:i,placement:s,rects:u,middlewareData:d}=r,{offset:m=0,mainAxis:h=!0,crossAxis:g=!0}=Ha(n,r),x={x:o,y:i},y=sa(s),w=Om(y);let T=x[w],C=x[y];const A=Ha(m,r),M=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:0,crossAxis:0,...A};if(h){const H=w==="y"?"height":"width",Y=u.reference[w]-u.floating[H]+M.mainAxis,J=u.reference[w]+u.reference[H]-M.mainAxis;T<Y?T=Y:T>J&&(T=J)}if(g){var R,z;const H=w==="y"?"width":"height",Y=Gb.has(Ba(s)),J=u.reference[y]-u.floating[H]+(Y&&((R=d.offset)==null?void 0:R[y])||0)+(Y?0:M.crossAxis),$=u.reference[y]+u.reference[H]+(Y?0:((z=d.offset)==null?void 0:z[y])||0)-(Y?M.crossAxis:0);C<J?C=J:C>$&&(C=$)}return{[w]:T,[y]:C}}}},s_=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var o,i;const{placement:s,rects:u,platform:d,elements:m}=r,{apply:h=()=>{},...g}=Ha(n,r),x=await d.detectOverflow(r,g),y=Ba(s),w=sl(s),T=sa(s)==="y",{width:C,height:A}=u.floating;let M,R;y==="top"||y==="bottom"?(M=y,R=w===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(R=y,M=w==="end"?"top":"bottom");const z=A-x.top-x.bottom,H=C-x.left-x.right,Y=Cr(A-x[M],z),J=Cr(C-x[R],H),$=!r.middlewareData.shift;let V=Y,k=J;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(k=H),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(V=z),$&&!w){const ie=Tn(x.left,0),se=Tn(x.right,0),q=Tn(x.top,0),ue=Tn(x.bottom,0);T?k=C-2*(ie!==0||se!==0?ie+se:Tn(x.left,x.right)):V=A-2*(q!==0||ue!==0?q+ue:Tn(x.top,x.bottom))}await h({...r,availableWidth:k,availableHeight:V});const K=await d.getDimensions(m.floating);return C!==K.width||A!==K.height?{reset:{rects:!0}}:{}}}};function Rc(){return typeof window<"u"}function cl(n){return Yb(n)?(n.nodeName||"").toLowerCase():"#document"}function An(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function fa(n){var r;return(r=(Yb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Yb(n){return Rc()?n instanceof Node||n instanceof An(n).Node:!1}function Qn(n){return Rc()?n instanceof Element||n instanceof An(n).Element:!1}function Ia(n){return Rc()?n instanceof HTMLElement||n instanceof An(n).HTMLElement:!1}function j0(n){return!Rc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof An(n).ShadowRoot}function vi(n){const{overflow:r,overflowX:o,overflowY:i,display:s}=Zn(n);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&s!=="inline"&&s!=="contents"}function c_(n){return/^(table|td|th)$/.test(cl(n))}function Oc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const u_=/transform|translate|scale|rotate|perspective|filter/,f_=/paint|layout|strict|content/,Jr=n=>!!n&&n!=="none";let yd;function zm(n){const r=Qn(n)?Zn(n):n;return Jr(r.transform)||Jr(r.translate)||Jr(r.scale)||Jr(r.rotate)||Jr(r.perspective)||!km()&&(Jr(r.backdropFilter)||Jr(r.filter))||u_.test(r.willChange||"")||f_.test(r.contain||"")}function d_(n){let r=Tr(n);for(;Ia(r)&&!nl(r);){if(zm(r))return r;if(Oc(r))return null;r=Tr(r)}return null}function km(){return yd==null&&(yd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yd}function nl(n){return/^(html|body|#document)$/.test(cl(n))}function Zn(n){return An(n).getComputedStyle(n)}function Dc(n){return Qn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Tr(n){if(cl(n)==="html")return n;const r=n.assignedSlot||n.parentNode||j0(n)&&n.host||fa(n);return j0(r)?r.host:r}function qb(n){const r=Tr(n);return nl(r)?n.ownerDocument?n.ownerDocument.body:n.body:Ia(r)&&vi(r)?r:qb(r)}function ui(n,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const s=qb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),d=An(s);if(u){const m=Wd(d);return r.concat(d,d.visualViewport||[],vi(s)?s:[],m&&o?ui(m):[])}else return r.concat(s,ui(s,[],o))}function Wd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Vb(n){const r=Zn(n);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const s=Ia(n),u=s?n.offsetWidth:o,d=s?n.offsetHeight:i,m=hc(o)!==u||hc(i)!==d;return m&&(o=u,i=d),{width:o,height:i,$:m}}function Lm(n){return Qn(n)?n:n.contextElement}function Jo(n){const r=Lm(n);if(!Ia(r))return ua(1);const o=r.getBoundingClientRect(),{width:i,height:s,$:u}=Vb(r);let d=(u?hc(o.width):o.width)/i,m=(u?hc(o.height):o.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const m_=ua(0);function Xb(n){const r=An(n);return!km()||!r.visualViewport?m_:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function h_(n,r,o){return r===void 0&&(r=!1),!o||r&&o!==An(n)?!1:r}function ao(n,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const s=n.getBoundingClientRect(),u=Lm(n);let d=ua(1);r&&(i?Qn(i)&&(d=Jo(i)):d=Jo(n));const m=h_(u,o,i)?Xb(u):ua(0);let h=(s.left+m.x)/d.x,g=(s.top+m.y)/d.y,x=s.width/d.x,y=s.height/d.y;if(u){const w=An(u),T=i&&Qn(i)?An(i):i;let C=w,A=Wd(C);for(;A&&i&&T!==C;){const M=Jo(A),R=A.getBoundingClientRect(),z=Zn(A),H=R.left+(A.clientLeft+parseFloat(z.paddingLeft))*M.x,Y=R.top+(A.clientTop+parseFloat(z.paddingTop))*M.y;h*=M.x,g*=M.y,x*=M.x,y*=M.y,h+=H,g+=Y,C=An(A),A=Wd(C)}}return gc({width:x,height:y,x:h,y:g})}function jc(n,r){const o=Dc(n).scrollLeft;return r?r.left+o:ao(fa(n)).left+o}function Fb(n,r){const o=n.getBoundingClientRect(),i=o.left+r.scrollLeft-jc(n,o),s=o.top+r.scrollTop;return{x:i,y:s}}function p_(n){let{elements:r,rect:o,offsetParent:i,strategy:s}=n;const u=s==="fixed",d=fa(i),m=r?Oc(r.floating):!1;if(i===d||m&&u)return o;let h={scrollLeft:0,scrollTop:0},g=ua(1);const x=ua(0),y=Ia(i);if((y||!y&&!u)&&((cl(i)!=="body"||vi(d))&&(h=Dc(i)),y)){const T=ao(i);g=Jo(i),x.x=T.x+i.clientLeft,x.y=T.y+i.clientTop}const w=d&&!y&&!u?Fb(d,h):ua(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-h.scrollLeft*g.x+x.x+w.x,y:o.y*g.y-h.scrollTop*g.y+x.y+w.y}}function g_(n){return Array.from(n.getClientRects())}function y_(n){const r=fa(n),o=Dc(n),i=n.ownerDocument.body,s=Tn(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=Tn(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+jc(n);const m=-o.scrollTop;return Zn(i).direction==="rtl"&&(d+=Tn(r.clientWidth,i.clientWidth)-s),{width:s,height:u,x:d,y:m}}const z0=25;function v_(n,r){const o=An(n),i=fa(n),s=o.visualViewport;let u=i.clientWidth,d=i.clientHeight,m=0,h=0;if(s){u=s.width,d=s.height;const x=km();(!x||x&&r==="fixed")&&(m=s.offsetLeft,h=s.offsetTop)}const g=jc(i);if(g<=0){const x=i.ownerDocument,y=x.body,w=getComputedStyle(y),T=x.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,C=Math.abs(i.clientWidth-y.clientWidth-T);C<=z0&&(u-=C)}else g<=z0&&(u+=g);return{width:u,height:d,x:m,y:h}}function b_(n,r){const o=ao(n,!0,r==="fixed"),i=o.top+n.clientTop,s=o.left+n.clientLeft,u=Ia(n)?Jo(n):ua(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,h=s*u.x,g=i*u.y;return{width:d,height:m,x:h,y:g}}function k0(n,r,o){let i;if(r==="viewport")i=v_(n,o);else if(r==="document")i=y_(fa(n));else if(Qn(r))i=b_(r,o);else{const s=Xb(n);i={x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}}return gc(i)}function Kb(n,r){const o=Tr(n);return o===r||!Qn(o)||nl(o)?!1:Zn(o).position==="fixed"||Kb(o,r)}function x_(n,r){const o=r.get(n);if(o)return o;let i=ui(n,[],!1).filter(m=>Qn(m)&&cl(m)!=="body"),s=null;const u=Zn(n).position==="fixed";let d=u?Tr(n):n;for(;Qn(d)&&!nl(d);){const m=Zn(d),h=zm(d);!h&&m.position==="fixed"&&(s=null),(u?!h&&!s:!h&&m.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||vi(d)&&!h&&Kb(n,d))?i=i.filter(x=>x!==d):s=m,d=Tr(d)}return r.set(n,i),i}function S_(n){let{element:r,boundary:o,rootBoundary:i,strategy:s}=n;const d=[...o==="clippingAncestors"?Oc(r)?[]:x_(r,this._c):[].concat(o),i],m=k0(r,d[0],s);let h=m.top,g=m.right,x=m.bottom,y=m.left;for(let w=1;w<d.length;w++){const T=k0(r,d[w],s);h=Tn(T.top,h),g=Cr(T.right,g),x=Cr(T.bottom,x),y=Tn(T.left,y)}return{width:g-y,height:x-h,x:y,y:h}}function w_(n){const{width:r,height:o}=Vb(n);return{width:r,height:o}}function E_(n,r,o){const i=Ia(r),s=fa(r),u=o==="fixed",d=ao(n,!0,u,r);let m={scrollLeft:0,scrollTop:0};const h=ua(0);function g(){h.x=jc(s)}if(i||!i&&!u)if((cl(r)!=="body"||vi(s))&&(m=Dc(r)),i){const T=ao(r,!0,u,r);h.x=T.x+r.clientLeft,h.y=T.y+r.clientTop}else s&&g();u&&!i&&s&&g();const x=s&&!i&&!u?Fb(s,m):ua(0),y=d.left+m.scrollLeft-h.x-x.x,w=d.top+m.scrollTop-h.y-x.y;return{x:y,y:w,width:d.width,height:d.height}}function vd(n){return Zn(n).position==="static"}function L0(n,r){if(!Ia(n)||Zn(n).position==="fixed")return null;if(r)return r(n);let o=n.offsetParent;return fa(n)===o&&(o=o.ownerDocument.body),o}function Qb(n,r){const o=An(n);if(Oc(n))return o;if(!Ia(n)){let s=Tr(n);for(;s&&!nl(s);){if(Qn(s)&&!vd(s))return s;s=Tr(s)}return o}let i=L0(n,r);for(;i&&c_(i)&&vd(i);)i=L0(i,r);return i&&nl(i)&&vd(i)&&!zm(i)?o:i||d_(n)||o}const C_=async function(n){const r=this.getOffsetParent||Qb,o=this.getDimensions,i=await o(n.floating);return{reference:E_(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function T_(n){return Zn(n).direction==="rtl"}const A_={convertOffsetParentRelativeRectToViewportRelativeRect:p_,getDocumentElement:fa,getClippingRect:S_,getOffsetParent:Qb,getElementRects:C_,getClientRects:g_,getDimensions:w_,getScale:Jo,isElement:Qn,isRTL:T_};function Zb(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function M_(n,r){let o=null,i;const s=fa(n);function u(){var m;clearTimeout(i),(m=o)==null||m.disconnect(),o=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),u();const g=n.getBoundingClientRect(),{left:x,top:y,width:w,height:T}=g;if(m||r(),!w||!T)return;const C=Xs(y),A=Xs(s.clientWidth-(x+w)),M=Xs(s.clientHeight-(y+T)),R=Xs(x),H={rootMargin:-C+"px "+-A+"px "+-M+"px "+-R+"px",threshold:Tn(0,Cr(1,h))||1};let Y=!0;function J($){const V=$[0].intersectionRatio;if(V!==h){if(!Y)return d();V?d(!1,V):i=setTimeout(()=>{d(!1,1e-7)},1e3)}V===1&&!Zb(g,n.getBoundingClientRect())&&d(),Y=!1}try{o=new IntersectionObserver(J,{...H,root:s.ownerDocument})}catch{o=new IntersectionObserver(J,H)}o.observe(n)}return d(!0),u}function __(n,r,o,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=Lm(n),x=s||u?[...g?ui(g):[],...r?ui(r):[]]:[];x.forEach(R=>{s&&R.addEventListener("scroll",o,{passive:!0}),u&&R.addEventListener("resize",o)});const y=g&&m?M_(g,o):null;let w=-1,T=null;d&&(T=new ResizeObserver(R=>{let[z]=R;z&&z.target===g&&T&&r&&(T.unobserve(r),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var H;(H=T)==null||H.observe(r)})),o()}),g&&!h&&T.observe(g),r&&T.observe(r));let C,A=h?ao(n):null;h&&M();function M(){const R=ao(n);A&&!Zb(A,R)&&o(),A=R,C=requestAnimationFrame(M)}return o(),()=>{var R;x.forEach(z=>{s&&z.removeEventListener("scroll",o),u&&z.removeEventListener("resize",o)}),y==null||y(),(R=T)==null||R.disconnect(),T=null,h&&cancelAnimationFrame(C)}}const N_=o_,R_=l_,O_=n_,D_=s_,j_=a_,H0=t_,z_=i_,k_=(n,r,o)=>{const i=new Map,s={platform:A_,...o},u={...s.platform,_c:i};return e_(n,r,{...s,platform:u})};var L_=typeof document<"u",H_=function(){},ac=L_?v.useLayoutEffect:H_;function yc(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let o,i,s;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!yc(n[i],r[i]))return!1;return!0}if(s=Object.keys(n),o=s.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,s[i]))return!1;for(i=o;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!yc(n[u],r[u]))return!1}return!0}return n!==n&&r!==r}function Wb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function B0(n,r){const o=Wb(n);return Math.round(r*o)/o}function bd(n){const r=v.useRef(n);return ac(()=>{r.current=n}),r}function B_(n){n===void 0&&(n={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:d}={},transform:m=!0,whileElementsMounted:h,open:g}=n,[x,y]=v.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[w,T]=v.useState(i);yc(w,i)||T(i);const[C,A]=v.useState(null),[M,R]=v.useState(null),z=v.useCallback(D=>{D!==$.current&&($.current=D,A(D))},[]),H=v.useCallback(D=>{D!==V.current&&(V.current=D,R(D))},[]),Y=u||C,J=d||M,$=v.useRef(null),V=v.useRef(null),k=v.useRef(x),K=h!=null,ie=bd(h),se=bd(s),q=bd(g),ue=v.useCallback(()=>{if(!$.current||!V.current)return;const D={placement:r,strategy:o,middleware:w};se.current&&(D.platform=se.current),k_($.current,V.current,D).then(O=>{const I={...O,isPositioned:q.current!==!1};de.current&&!yc(k.current,I)&&(k.current=I,mi.flushSync(()=>{y(I)}))})},[w,r,o,se,q]);ac(()=>{g===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,y(D=>({...D,isPositioned:!1})))},[g]);const de=v.useRef(!1);ac(()=>(de.current=!0,()=>{de.current=!1}),[]),ac(()=>{if(Y&&($.current=Y),J&&(V.current=J),Y&&J){if(ie.current)return ie.current(Y,J,ue);ue()}},[Y,J,ue,ie,K]);const he=v.useMemo(()=>({reference:$,floating:V,setReference:z,setFloating:H}),[z,H]),S=v.useMemo(()=>({reference:Y,floating:J}),[Y,J]),_=v.useMemo(()=>{const D={position:o,left:0,top:0};if(!S.floating)return D;const O=B0(S.floating,x.x),I=B0(S.floating,x.y);return m?{...D,transform:"translate("+O+"px, "+I+"px)",...Wb(S.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:O,top:I}},[o,m,S.floating,x.x,x.y]);return v.useMemo(()=>({...x,update:ue,refs:he,elements:S,floatingStyles:_}),[x,ue,he,S,_])}const U_=n=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:i,padding:s}=typeof n=="function"?n(o):n;return i&&r(i)?i.current!=null?H0({element:i.current,padding:s}).fn(o):{}:i?H0({element:i,padding:s}).fn(o):{}}}},I_=(n,r)=>{const o=N_(n);return{name:o.name,fn:o.fn,options:[n,r]}},P_=(n,r)=>{const o=R_(n);return{name:o.name,fn:o.fn,options:[n,r]}},$_=(n,r)=>({fn:z_(n).fn,options:[n,r]}),G_=(n,r)=>{const o=O_(n);return{name:o.name,fn:o.fn,options:[n,r]}},Y_=(n,r)=>{const o=D_(n);return{name:o.name,fn:o.fn,options:[n,r]}},q_=(n,r)=>{const o=j_(n);return{name:o.name,fn:o.fn,options:[n,r]}},V_=(n,r)=>{const o=U_(n);return{name:o.name,fn:o.fn,options:[n,r]}};var X_="Arrow",Jb=v.forwardRef((n,r)=>{const{children:o,width:i=10,height:s=5,...u}=n;return p.jsx($e.svg,{...u,ref:r,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jb.displayName=X_;var F_=Jb,Hm="Popper",[ex,_r]=Ua(Hm),[K_,tx]=ex(Hm),nx=n=>{const{__scopePopper:r,children:o}=n,[i,s]=v.useState(null);return p.jsx(K_,{scope:r,anchor:i,onAnchorChange:s,children:o})};nx.displayName=Hm;var ax="PopperAnchor",rx=v.forwardRef((n,r)=>{const{__scopePopper:o,virtualRef:i,...s}=n,u=tx(ax,o),d=v.useRef(null),m=et(r,d),h=v.useRef(null);return v.useEffect(()=>{const g=h.current;h.current=(i==null?void 0:i.current)||d.current,g!==h.current&&u.onAnchorChange(h.current)}),i?null:p.jsx($e.div,{...s,ref:m})});rx.displayName=ax;var Bm="PopperContent",[Q_,Z_]=ex(Bm),ox=v.forwardRef((n,r)=>{var ae,Z,oe,Se,Te,we;const{__scopePopper:o,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:y="partial",hideWhenDetached:w=!1,updatePositionStrategy:T="optimized",onPlaced:C,...A}=n,M=tx(Bm,o),[R,z]=v.useState(null),H=et(r,ke=>z(ke)),[Y,J]=v.useState(null),$=$M(Y),V=($==null?void 0:$.width)??0,k=($==null?void 0:$.height)??0,K=i+(u!=="center"?"-"+u:""),ie=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},se=Array.isArray(g)?g:[g],q=se.length>0,ue={padding:ie,boundary:se.filter(J_),altBoundary:q},{refs:de,floatingStyles:he,placement:S,isPositioned:_,middlewareData:D}=B_({strategy:"fixed",placement:K,whileElementsMounted:(...ke)=>__(...ke,{animationFrame:T==="always"}),elements:{reference:M.anchor},middleware:[I_({mainAxis:s+k,alignmentAxis:d}),h&&P_({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?$_():void 0,...ue}),h&&G_({...ue}),Y_({...ue,apply:({elements:ke,rects:ge,availableWidth:ct,availableHeight:ht})=>{const{width:vt,height:Xt}=ge.reference,Me=ke.floating.style;Me.setProperty("--radix-popper-available-width",`${ct}px`),Me.setProperty("--radix-popper-available-height",`${ht}px`),Me.setProperty("--radix-popper-anchor-width",`${vt}px`),Me.setProperty("--radix-popper-anchor-height",`${Xt}px`)}}),Y&&V_({element:Y,padding:m}),eN({arrowWidth:V,arrowHeight:k}),w&&q_({strategy:"referenceHidden",...ue})]}),[O,I]=sx(S),N=Pn(C);Wt(()=>{_&&(N==null||N())},[_,N]);const j=(ae=D.arrow)==null?void 0:ae.x,B=(Z=D.arrow)==null?void 0:Z.y,P=((oe=D.arrow)==null?void 0:oe.centerOffset)!==0,[te,ne]=v.useState();return Wt(()=>{R&&ne(window.getComputedStyle(R).zIndex)},[R]),p.jsx("div",{ref:de.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:_?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(Se=D.transformOrigin)==null?void 0:Se.x,(Te=D.transformOrigin)==null?void 0:Te.y].join(" "),...((we=D.hide)==null?void 0:we.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:p.jsx(Q_,{scope:o,placedSide:O,onArrowChange:J,arrowX:j,arrowY:B,shouldHideArrow:P,children:p.jsx($e.div,{"data-side":O,"data-align":I,...A,ref:H,style:{...A.style,animation:_?void 0:"none"}})})})});ox.displayName=Bm;var lx="PopperArrow",W_={top:"bottom",right:"left",bottom:"top",left:"right"},ix=v.forwardRef(function(r,o){const{__scopePopper:i,...s}=r,u=Z_(lx,i),d=W_[u.placedSide];return p.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:p.jsx(F_,{...s,ref:o,style:{...s.style,display:"block"}})})});ix.displayName=lx;function J_(n){return n!==null}var eN=n=>({name:"transformOrigin",options:n,fn(r){var M,R,z;const{placement:o,rects:i,middlewareData:s}=r,d=((M=s.arrow)==null?void 0:M.centerOffset)!==0,m=d?0:n.arrowWidth,h=d?0:n.arrowHeight,[g,x]=sx(o),y={start:"0%",center:"50%",end:"100%"}[x],w=(((R=s.arrow)==null?void 0:R.x)??0)+m/2,T=(((z=s.arrow)==null?void 0:z.y)??0)+h/2;let C="",A="";return g==="bottom"?(C=d?y:`${w}px`,A=`${-h}px`):g==="top"?(C=d?y:`${w}px`,A=`${i.floating.height+h}px`):g==="right"?(C=`${-h}px`,A=d?y:`${T}px`):g==="left"&&(C=`${i.floating.width+h}px`,A=d?y:`${T}px`),{data:{x:C,y:A}}}});function sx(n){const[r,o="center"]=n.split("-");return[r,o]}var zc=nx,bi=rx,kc=ox,Lc=ix,xd="rovingFocusGroup.onEntryFocus",tN={bubbles:!1,cancelable:!0},xi="RovingFocusGroup",[Jd,cx,nN]=Am(xi),[aN,ux]=Ua(xi,[nN]),[rN,oN]=aN(xi),fx=v.forwardRef((n,r)=>p.jsx(Jd.Provider,{scope:n.__scopeRovingFocusGroup,children:p.jsx(Jd.Slot,{scope:n.__scopeRovingFocusGroup,children:p.jsx(lN,{...n,ref:r})})}));fx.displayName=xi;var lN=v.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:s=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:x=!1,...y}=n,w=v.useRef(null),T=et(r,w),C=Mm(u),[A,M]=tl({prop:d,defaultProp:m??null,onChange:h,caller:xi}),[R,z]=v.useState(!1),H=Pn(g),Y=cx(o),J=v.useRef(!1),[$,V]=v.useState(0);return v.useEffect(()=>{const k=w.current;if(k)return k.addEventListener(xd,H),()=>k.removeEventListener(xd,H)},[H]),p.jsx(rN,{scope:o,orientation:i,dir:C,loop:s,currentTabStopId:A,onItemFocus:v.useCallback(k=>M(k),[M]),onItemShiftTab:v.useCallback(()=>z(!0),[]),onFocusableItemAdd:v.useCallback(()=>V(k=>k+1),[]),onFocusableItemRemove:v.useCallback(()=>V(k=>k-1),[]),children:p.jsx($e.div,{tabIndex:R||$===0?-1:0,"data-orientation":i,...y,ref:T,style:{outline:"none",...n.style},onMouseDown:ye(n.onMouseDown,()=>{J.current=!0}),onFocus:ye(n.onFocus,k=>{const K=!J.current;if(k.target===k.currentTarget&&K&&!R){const ie=new CustomEvent(xd,tN);if(k.currentTarget.dispatchEvent(ie),!ie.defaultPrevented){const se=Y().filter(S=>S.focusable),q=se.find(S=>S.active),ue=se.find(S=>S.id===A),he=[q,ue,...se].filter(Boolean).map(S=>S.ref.current);hx(he,x)}}J.current=!1}),onBlur:ye(n.onBlur,()=>z(!1))})})}),dx="RovingFocusGroupItem",mx=v.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:s=!1,tabStopId:u,children:d,...m}=n,h=ca(),g=u||h,x=oN(dx,o),y=x.currentTabStopId===g,w=cx(o),{onFocusableItemAdd:T,onFocusableItemRemove:C,currentTabStopId:A}=x;return v.useEffect(()=>{if(i)return T(),()=>C()},[i,T,C]),p.jsx(Jd.ItemSlot,{scope:o,id:g,focusable:i,active:s,children:p.jsx($e.span,{tabIndex:y?0:-1,"data-orientation":x.orientation,...m,ref:r,onMouseDown:ye(n.onMouseDown,M=>{i?x.onItemFocus(g):M.preventDefault()}),onFocus:ye(n.onFocus,()=>x.onItemFocus(g)),onKeyDown:ye(n.onKeyDown,M=>{if(M.key==="Tab"&&M.shiftKey){x.onItemShiftTab();return}if(M.target!==M.currentTarget)return;const R=cN(M,x.orientation,x.dir);if(R!==void 0){if(M.metaKey||M.ctrlKey||M.altKey||M.shiftKey)return;M.preventDefault();let H=w().filter(Y=>Y.focusable).map(Y=>Y.ref.current);if(R==="last")H.reverse();else if(R==="prev"||R==="next"){R==="prev"&&H.reverse();const Y=H.indexOf(M.currentTarget);H=x.loop?uN(H,Y+1):H.slice(Y+1)}setTimeout(()=>hx(H))}}),children:typeof d=="function"?d({isCurrentTabStop:y,hasTabStop:A!=null}):d})})});mx.displayName=dx;var iN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sN(n,r){return r!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function cN(n,r,o){const i=sN(n.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return iN[i]}function hx(n,r=!1){const o=document.activeElement;for(const i of n)if(i===o||(i.focus({preventScroll:r}),document.activeElement!==o))return}function uN(n,r){return n.map((o,i)=>n[(r+i)%n.length])}var fN=fx,dN=mx,em=["Enter"," "],mN=["ArrowDown","PageUp","Home"],px=["ArrowUp","PageDown","End"],hN=[...mN,...px],pN={ltr:[...em,"ArrowRight"],rtl:[...em,"ArrowLeft"]},gN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Si="Menu",[fi,yN,vN]=Am(Si),[io,gx]=Ua(Si,[vN,_r,ux]),wi=_r(),yx=ux(),[vx,Nr]=io(Si),[bN,Ei]=io(Si),bx=n=>{const{__scopeMenu:r,open:o=!1,children:i,dir:s,onOpenChange:u,modal:d=!0}=n,m=wi(r),[h,g]=v.useState(null),x=v.useRef(!1),y=Pn(u),w=Mm(s);return v.useEffect(()=>{const T=()=>{x.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>x.current=!1;return document.addEventListener("keydown",T,{capture:!0}),()=>{document.removeEventListener("keydown",T,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),p.jsx(zc,{...m,children:p.jsx(vx,{scope:r,open:o,onOpenChange:y,content:h,onContentChange:g,children:p.jsx(bN,{scope:r,onClose:v.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:x,dir:w,modal:d,children:i})})})};bx.displayName=Si;var xN="MenuAnchor",Um=v.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n,s=wi(o);return p.jsx(bi,{...s,...i,ref:r})});Um.displayName=xN;var Im="MenuPortal",[SN,xx]=io(Im,{forceMount:void 0}),Sx=n=>{const{__scopeMenu:r,forceMount:o,children:i,container:s}=n,u=Nr(Im,r);return p.jsx(SN,{scope:r,forceMount:o,children:p.jsx(Wn,{present:o||u.open,children:p.jsx(gi,{asChild:!0,container:s,children:i})})})};Sx.displayName=Im;var In="MenuContent",[wN,Pm]=io(In),wx=v.forwardRef((n,r)=>{const o=xx(In,n.__scopeMenu),{forceMount:i=o.forceMount,...s}=n,u=Nr(In,n.__scopeMenu),d=Ei(In,n.__scopeMenu);return p.jsx(fi.Provider,{scope:n.__scopeMenu,children:p.jsx(Wn,{present:i||u.open,children:p.jsx(fi.Slot,{scope:n.__scopeMenu,children:d.modal?p.jsx(EN,{...s,ref:r}):p.jsx(CN,{...s,ref:r})})})})}),EN=v.forwardRef((n,r)=>{const o=Nr(In,n.__scopeMenu),i=v.useRef(null),s=et(r,i);return v.useEffect(()=>{const u=i.current;if(u)return _c(u)},[]),p.jsx($m,{...n,ref:s,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:ye(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),CN=v.forwardRef((n,r)=>{const o=Nr(In,n.__scopeMenu);return p.jsx($m,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),TN=Er("MenuContent.ScrollLock"),$m=v.forwardRef((n,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:w,onDismiss:T,disableOutsideScroll:C,...A}=n,M=Nr(In,o),R=Ei(In,o),z=wi(o),H=yx(o),Y=yN(o),[J,$]=v.useState(null),V=v.useRef(null),k=et(r,V,M.onContentChange),K=v.useRef(0),ie=v.useRef(""),se=v.useRef(0),q=v.useRef(null),ue=v.useRef("right"),de=v.useRef(0),he=C?yi:v.Fragment,S=C?{as:TN,allowPinchZoom:!0}:void 0,_=O=>{var ae,Z;const I=ie.current+O,N=Y().filter(oe=>!oe.disabled),j=document.activeElement,B=(ae=N.find(oe=>oe.ref.current===j))==null?void 0:ae.textValue,P=N.map(oe=>oe.textValue),te=HN(P,I,B),ne=(Z=N.find(oe=>oe.textValue===te))==null?void 0:Z.ref.current;(function oe(Se){ie.current=Se,window.clearTimeout(K.current),Se!==""&&(K.current=window.setTimeout(()=>oe(""),1e3))})(I),ne&&setTimeout(()=>ne.focus())};v.useEffect(()=>()=>window.clearTimeout(K.current),[]),Ac();const D=v.useCallback(O=>{var N,j;return ue.current===((N=q.current)==null?void 0:N.side)&&UN(O,(j=q.current)==null?void 0:j.area)},[]);return p.jsx(wN,{scope:o,searchRef:ie,onItemEnter:v.useCallback(O=>{D(O)&&O.preventDefault()},[D]),onItemLeave:v.useCallback(O=>{var I;D(O)||((I=V.current)==null||I.focus(),$(null))},[D]),onTriggerLeave:v.useCallback(O=>{D(O)&&O.preventDefault()},[D]),pointerGraceTimerRef:se,onPointerGraceIntentChange:v.useCallback(O=>{q.current=O},[]),children:p.jsx(he,{...S,children:p.jsx(pi,{asChild:!0,trapped:s,onMountAutoFocus:ye(u,O=>{var I;O.preventDefault(),(I=V.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:p.jsx(il,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:w,onDismiss:T,children:p.jsx(fN,{asChild:!0,...H,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:J,onCurrentTabStopIdChange:$,onEntryFocus:ye(h,O=>{R.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(kc,{role:"menu","aria-orientation":"vertical","data-state":Ux(M.open),"data-radix-menu-content":"",dir:R.dir,...z,...A,ref:k,style:{outline:"none",...A.style},onKeyDown:ye(A.onKeyDown,O=>{const N=O.target.closest("[data-radix-menu-content]")===O.currentTarget,j=O.ctrlKey||O.altKey||O.metaKey,B=O.key.length===1;N&&(O.key==="Tab"&&O.preventDefault(),!j&&B&&_(O.key));const P=V.current;if(O.target!==P||!hN.includes(O.key))return;O.preventDefault();const ne=Y().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);px.includes(O.key)&&ne.reverse(),kN(ne)}),onBlur:ye(n.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(K.current),ie.current="")}),onPointerMove:ye(n.onPointerMove,di(O=>{const I=O.target,N=de.current!==O.clientX;if(O.currentTarget.contains(I)&&N){const j=O.clientX>de.current?"right":"left";ue.current=j,de.current=O.clientX}}))})})})})})})});wx.displayName=In;var AN="MenuGroup",Gm=v.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return p.jsx($e.div,{role:"group",...i,ref:r})});Gm.displayName=AN;var MN="MenuLabel",Ex=v.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return p.jsx($e.div,{...i,ref:r})});Ex.displayName=MN;var vc="MenuItem",U0="menu.itemSelect",Hc=v.forwardRef((n,r)=>{const{disabled:o=!1,onSelect:i,...s}=n,u=v.useRef(null),d=Ei(vc,n.__scopeMenu),m=Pm(vc,n.__scopeMenu),h=et(r,u),g=v.useRef(!1),x=()=>{const y=u.current;if(!o&&y){const w=new CustomEvent(U0,{bubbles:!0,cancelable:!0});y.addEventListener(U0,T=>i==null?void 0:i(T),{once:!0}),mb(y,w),w.defaultPrevented?g.current=!1:d.onClose()}};return p.jsx(Cx,{...s,ref:h,disabled:o,onClick:ye(n.onClick,x),onPointerDown:y=>{var w;(w=n.onPointerDown)==null||w.call(n,y),g.current=!0},onPointerUp:ye(n.onPointerUp,y=>{var w;g.current||(w=y.currentTarget)==null||w.click()}),onKeyDown:ye(n.onKeyDown,y=>{const w=m.searchRef.current!=="";o||w&&y.key===" "||em.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});Hc.displayName=vc;var Cx=v.forwardRef((n,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:s,...u}=n,d=Pm(vc,o),m=yx(o),h=v.useRef(null),g=et(r,h),[x,y]=v.useState(!1),[w,T]=v.useState("");return v.useEffect(()=>{const C=h.current;C&&T((C.textContent??"").trim())},[u.children]),p.jsx(fi.ItemSlot,{scope:o,disabled:i,textValue:s??w,children:p.jsx(dN,{asChild:!0,...m,focusable:!i,children:p.jsx($e.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:ye(n.onPointerMove,di(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ye(n.onPointerLeave,di(C=>d.onItemLeave(C))),onFocus:ye(n.onFocus,()=>y(!0)),onBlur:ye(n.onBlur,()=>y(!1))})})})}),_N="MenuCheckboxItem",Tx=v.forwardRef((n,r)=>{const{checked:o=!1,onCheckedChange:i,...s}=n;return p.jsx(Rx,{scope:n.__scopeMenu,checked:o,children:p.jsx(Hc,{role:"menuitemcheckbox","aria-checked":bc(o)?"mixed":o,...s,ref:r,"data-state":Vm(o),onSelect:ye(s.onSelect,()=>i==null?void 0:i(bc(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Tx.displayName=_N;var Ax="MenuRadioGroup",[NN,RN]=io(Ax,{value:void 0,onValueChange:()=>{}}),Mx=v.forwardRef((n,r)=>{const{value:o,onValueChange:i,...s}=n,u=Pn(i);return p.jsx(NN,{scope:n.__scopeMenu,value:o,onValueChange:u,children:p.jsx(Gm,{...s,ref:r})})});Mx.displayName=Ax;var _x="MenuRadioItem",Nx=v.forwardRef((n,r)=>{const{value:o,...i}=n,s=RN(_x,n.__scopeMenu),u=o===s.value;return p.jsx(Rx,{scope:n.__scopeMenu,checked:u,children:p.jsx(Hc,{role:"menuitemradio","aria-checked":u,...i,ref:r,"data-state":Vm(u),onSelect:ye(i.onSelect,()=>{var d;return(d=s.onValueChange)==null?void 0:d.call(s,o)},{checkForDefaultPrevented:!1})})})});Nx.displayName=_x;var Ym="MenuItemIndicator",[Rx,ON]=io(Ym,{checked:!1}),Ox=v.forwardRef((n,r)=>{const{__scopeMenu:o,forceMount:i,...s}=n,u=ON(Ym,o);return p.jsx(Wn,{present:i||bc(u.checked)||u.checked===!0,children:p.jsx($e.span,{...s,ref:r,"data-state":Vm(u.checked)})})});Ox.displayName=Ym;var DN="MenuSeparator",Dx=v.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return p.jsx($e.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});Dx.displayName=DN;var jN="MenuArrow",jx=v.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n,s=wi(o);return p.jsx(Lc,{...s,...i,ref:r})});jx.displayName=jN;var qm="MenuSub",[zN,zx]=io(qm),kx=n=>{const{__scopeMenu:r,children:o,open:i=!1,onOpenChange:s}=n,u=Nr(qm,r),d=wi(r),[m,h]=v.useState(null),[g,x]=v.useState(null),y=Pn(s);return v.useEffect(()=>(u.open===!1&&y(!1),()=>y(!1)),[u.open,y]),p.jsx(zc,{...d,children:p.jsx(vx,{scope:r,open:i,onOpenChange:y,content:g,onContentChange:x,children:p.jsx(zN,{scope:r,contentId:ca(),triggerId:ca(),trigger:m,onTriggerChange:h,children:o})})})};kx.displayName=qm;var ni="MenuSubTrigger",Lx=v.forwardRef((n,r)=>{const o=Nr(ni,n.__scopeMenu),i=Ei(ni,n.__scopeMenu),s=zx(ni,n.__scopeMenu),u=Pm(ni,n.__scopeMenu),d=v.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=u,g={__scopeMenu:n.__scopeMenu},x=v.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return v.useEffect(()=>x,[x]),v.useEffect(()=>{const y=m.current;return()=>{window.clearTimeout(y),h(null)}},[m,h]),p.jsx(Um,{asChild:!0,...g,children:p.jsx(Cx,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":s.contentId,"data-state":Ux(o.open),...n,ref:Tm(r,s.onTriggerChange),onClick:y=>{var w;(w=n.onClick)==null||w.call(n,y),!(n.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:ye(n.onPointerMove,di(y=>{u.onItemEnter(y),!y.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),x()},100))})),onPointerLeave:ye(n.onPointerLeave,di(y=>{var T,C;x();const w=(T=o.content)==null?void 0:T.getBoundingClientRect();if(w){const A=(C=o.content)==null?void 0:C.dataset.side,M=A==="right",R=M?-5:5,z=w[M?"left":"right"],H=w[M?"right":"left"];u.onPointerGraceIntentChange({area:[{x:y.clientX+R,y:y.clientY},{x:z,y:w.top},{x:H,y:w.top},{x:H,y:w.bottom},{x:z,y:w.bottom}],side:A}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(y),y.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:ye(n.onKeyDown,y=>{var T;const w=u.searchRef.current!=="";n.disabled||w&&y.key===" "||pN[i.dir].includes(y.key)&&(o.onOpenChange(!0),(T=o.content)==null||T.focus(),y.preventDefault())})})})});Lx.displayName=ni;var Hx="MenuSubContent",Bx=v.forwardRef((n,r)=>{const o=xx(In,n.__scopeMenu),{forceMount:i=o.forceMount,...s}=n,u=Nr(In,n.__scopeMenu),d=Ei(In,n.__scopeMenu),m=zx(Hx,n.__scopeMenu),h=v.useRef(null),g=et(r,h);return p.jsx(fi.Provider,{scope:n.__scopeMenu,children:p.jsx(Wn,{present:i||u.open,children:p.jsx(fi.Slot,{scope:n.__scopeMenu,children:p.jsx($m,{id:m.contentId,"aria-labelledby":m.triggerId,...s,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var y;d.isUsingKeyboardRef.current&&((y=h.current)==null||y.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:ye(n.onFocusOutside,x=>{x.target!==m.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:ye(n.onEscapeKeyDown,x=>{d.onClose(),x.preventDefault()}),onKeyDown:ye(n.onKeyDown,x=>{var T;const y=x.currentTarget.contains(x.target),w=gN[d.dir].includes(x.key);y&&w&&(u.onOpenChange(!1),(T=m.trigger)==null||T.focus(),x.preventDefault())})})})})})});Bx.displayName=Hx;function Ux(n){return n?"open":"closed"}function bc(n){return n==="indeterminate"}function Vm(n){return bc(n)?"indeterminate":n?"checked":"unchecked"}function kN(n){const r=document.activeElement;for(const o of n)if(o===r||(o.focus(),document.activeElement!==r))return}function LN(n,r){return n.map((o,i)=>n[(r+i)%n.length])}function HN(n,r,o){const s=r.length>1&&Array.from(r).every(g=>g===r[0])?r[0]:r,u=o?n.indexOf(o):-1;let d=LN(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.toLowerCase().startsWith(s.toLowerCase()));return h!==o?h:void 0}function BN(n,r){const{x:o,y:i}=n;let s=!1;for(let u=0,d=r.length-1;u<r.length;d=u++){const m=r[u],h=r[d],g=m.x,x=m.y,y=h.x,w=h.y;x>i!=w>i&&o<(y-g)*(i-x)/(w-x)+g&&(s=!s)}return s}function UN(n,r){if(!r)return!1;const o={x:n.clientX,y:n.clientY};return BN(o,r)}function di(n){return r=>r.pointerType==="mouse"?n(r):void 0}var IN=bx,PN=Um,$N=Sx,GN=wx,YN=Gm,qN=Ex,VN=Hc,XN=Tx,FN=Mx,KN=Nx,QN=Ox,ZN=Dx,WN=jx,JN=kx,eR=Lx,tR=Bx,Xm="ContextMenu",[nR]=Ua(Xm,[gx]),Jt=gx(),[aR,Ix]=nR(Xm),Px=n=>{const{__scopeContextMenu:r,children:o,onOpenChange:i,dir:s,modal:u=!0}=n,[d,m]=v.useState(!1),h=Jt(r),g=Pn(i),x=v.useCallback(y=>{m(y),g(y)},[g]);return p.jsx(aR,{scope:r,open:d,onOpenChange:x,modal:u,children:p.jsx(IN,{...h,dir:s,open:d,onOpenChange:x,modal:u,children:o})})};Px.displayName=Xm;var $x="ContextMenuTrigger",Gx=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,disabled:i=!1,...s}=n,u=Ix($x,o),d=Jt(o),m=v.useRef({x:0,y:0}),h=v.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),g=v.useRef(0),x=v.useCallback(()=>window.clearTimeout(g.current),[]),y=w=>{m.current={x:w.clientX,y:w.clientY},u.onOpenChange(!0)};return v.useEffect(()=>x,[x]),v.useEffect(()=>void(i&&x()),[i,x]),p.jsxs(p.Fragment,{children:[p.jsx(PN,{...d,virtualRef:h}),p.jsx($e.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...s,ref:r,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:ye(n.onContextMenu,w=>{x(),y(w),w.preventDefault()}),onPointerDown:i?n.onPointerDown:ye(n.onPointerDown,Fs(w=>{x(),g.current=window.setTimeout(()=>y(w),700)})),onPointerMove:i?n.onPointerMove:ye(n.onPointerMove,Fs(x)),onPointerCancel:i?n.onPointerCancel:ye(n.onPointerCancel,Fs(x)),onPointerUp:i?n.onPointerUp:ye(n.onPointerUp,Fs(x))})]})});Gx.displayName=$x;var rR="ContextMenuPortal",Yx=n=>{const{__scopeContextMenu:r,...o}=n,i=Jt(r);return p.jsx($N,{...i,...o})};Yx.displayName=rR;var qx="ContextMenuContent",Vx=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Ix(qx,o),u=Jt(o),d=v.useRef(!1);return p.jsx(GN,{...u,...i,ref:r,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=n.onCloseAutoFocus)==null||h.call(n,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=n.onInteractOutside)==null||h.call(n,m),!m.defaultPrevented&&!s.modal&&(d.current=!0)},style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Vx.displayName=qx;var oR="ContextMenuGroup",lR=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(YN,{...s,...i,ref:r})});lR.displayName=oR;var iR="ContextMenuLabel",sR=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(qN,{...s,...i,ref:r})});sR.displayName=iR;var cR="ContextMenuItem",Xx=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(VN,{...s,...i,ref:r})});Xx.displayName=cR;var uR="ContextMenuCheckboxItem",fR=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(XN,{...s,...i,ref:r})});fR.displayName=uR;var dR="ContextMenuRadioGroup",mR=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(FN,{...s,...i,ref:r})});mR.displayName=dR;var hR="ContextMenuRadioItem",pR=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(KN,{...s,...i,ref:r})});pR.displayName=hR;var gR="ContextMenuItemIndicator",yR=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(QN,{...s,...i,ref:r})});yR.displayName=gR;var vR="ContextMenuSeparator",Fx=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(ZN,{...s,...i,ref:r})});Fx.displayName=vR;var bR="ContextMenuArrow",xR=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(WN,{...s,...i,ref:r})});xR.displayName=bR;var Kx="ContextMenuSub",Qx=n=>{const{__scopeContextMenu:r,children:o,onOpenChange:i,open:s,defaultOpen:u}=n,d=Jt(r),[m,h]=tl({prop:s,defaultProp:u??!1,onChange:i,caller:Kx});return p.jsx(JN,{...d,open:m,onOpenChange:h,children:o})};Qx.displayName=Kx;var SR="ContextMenuSubTrigger",Zx=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(eR,{...s,...i,ref:r})});Zx.displayName=SR;var wR="ContextMenuSubContent",Wx=v.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,s=Jt(o);return p.jsx(tR,{...s,...i,ref:r,style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wx.displayName=wR;function Fs(n){return r=>r.pointerType!=="mouse"?n(r):void 0}var ER=Px,CR=Gx,TR=Yx,AR=Vx,MR=Xx,_R=Fx,NR=Qx,RR=Zx,OR=Wx;function I0(n,[r,o]){return Math.min(o,Math.max(r,n))}var Bc="Popover",[Jx]=Ua(Bc,[_r]),Ci=_r(),[DR,Rr]=Jx(Bc),e1=n=>{const{__scopePopover:r,children:o,open:i,defaultOpen:s,onOpenChange:u,modal:d=!1}=n,m=Ci(r),h=v.useRef(null),[g,x]=v.useState(!1),[y,w]=tl({prop:i,defaultProp:s??!1,onChange:u,caller:Bc});return p.jsx(zc,{...m,children:p.jsx(DR,{scope:r,contentId:ca(),triggerRef:h,open:y,onOpenChange:w,onOpenToggle:v.useCallback(()=>w(T=>!T),[w]),hasCustomAnchor:g,onCustomAnchorAdd:v.useCallback(()=>x(!0),[]),onCustomAnchorRemove:v.useCallback(()=>x(!1),[]),modal:d,children:o})})};e1.displayName=Bc;var t1="PopoverAnchor",jR=v.forwardRef((n,r)=>{const{__scopePopover:o,...i}=n,s=Rr(t1,o),u=Ci(o),{onCustomAnchorAdd:d,onCustomAnchorRemove:m}=s;return v.useEffect(()=>(d(),()=>m()),[d,m]),p.jsx(bi,{...u,...i,ref:r})});jR.displayName=t1;var n1="PopoverTrigger",a1=v.forwardRef((n,r)=>{const{__scopePopover:o,...i}=n,s=Rr(n1,o),u=Ci(o),d=et(r,s.triggerRef),m=p.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":s1(s.open),...i,ref:d,onClick:ye(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?m:p.jsx(bi,{asChild:!0,...u,children:m})});a1.displayName=n1;var Fm="PopoverPortal",[zR,kR]=Jx(Fm,{forceMount:void 0}),r1=n=>{const{__scopePopover:r,forceMount:o,children:i,container:s}=n,u=Rr(Fm,r);return p.jsx(zR,{scope:r,forceMount:o,children:p.jsx(Wn,{present:o||u.open,children:p.jsx(gi,{asChild:!0,container:s,children:i})})})};r1.displayName=Fm;var al="PopoverContent",o1=v.forwardRef((n,r)=>{const o=kR(al,n.__scopePopover),{forceMount:i=o.forceMount,...s}=n,u=Rr(al,n.__scopePopover);return p.jsx(Wn,{present:i||u.open,children:u.modal?p.jsx(HR,{...s,ref:r}):p.jsx(BR,{...s,ref:r})})});o1.displayName=al;var LR=Er("PopoverContent.RemoveScroll"),HR=v.forwardRef((n,r)=>{const o=Rr(al,n.__scopePopover),i=v.useRef(null),s=et(r,i),u=v.useRef(!1);return v.useEffect(()=>{const d=i.current;if(d)return _c(d)},[]),p.jsx(yi,{as:LR,allowPinchZoom:!0,children:p.jsx(l1,{...n,ref:s,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(n.onCloseAutoFocus,d=>{var m;d.preventDefault(),u.current||(m=o.triggerRef.current)==null||m.focus()}),onPointerDownOutside:ye(n.onPointerDownOutside,d=>{const m=d.detail.originalEvent,h=m.button===0&&m.ctrlKey===!0,g=m.button===2||h;u.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:ye(n.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})}),BR=v.forwardRef((n,r)=>{const o=Rr(al,n.__scopePopover),i=v.useRef(!1),s=v.useRef(!1);return p.jsx(l1,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var d,m;(d=n.onCloseAutoFocus)==null||d.call(n,u),u.defaultPrevented||(i.current||(m=o.triggerRef.current)==null||m.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var h,g;(h=n.onInteractOutside)==null||h.call(n,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=u.target;((g=o.triggerRef.current)==null?void 0:g.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),l1=v.forwardRef((n,r)=>{const{__scopePopover:o,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:h,onFocusOutside:g,onInteractOutside:x,...y}=n,w=Rr(al,o),T=Ci(o);return Ac(),p.jsx(pi,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:p.jsx(il,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:x,onEscapeKeyDown:m,onPointerDownOutside:h,onFocusOutside:g,onDismiss:()=>w.onOpenChange(!1),children:p.jsx(kc,{"data-state":s1(w.open),role:"dialog",id:w.contentId,...T,...y,ref:r,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),i1="PopoverClose",UR=v.forwardRef((n,r)=>{const{__scopePopover:o,...i}=n,s=Rr(i1,o);return p.jsx($e.button,{type:"button",...i,ref:r,onClick:ye(n.onClick,()=>s.onOpenChange(!1))})});UR.displayName=i1;var IR="PopoverArrow",PR=v.forwardRef((n,r)=>{const{__scopePopover:o,...i}=n,s=Ci(o);return p.jsx(Lc,{...s,...i,ref:r})});PR.displayName=IR;function s1(n){return n?"open":"closed"}var $R=e1,GR=a1,YR=r1,qR=o1,VR=[" ","Enter","ArrowUp","ArrowDown"],XR=[" ","Enter"],ro="Select",[Uc,Ic,FR]=Am(ro),[ul]=Ua(ro,[FR,_r]),Pc=_r(),[KR,Or]=ul(ro),[QR,ZR]=ul(ro),c1=n=>{const{__scopeSelect:r,children:o,open:i,defaultOpen:s,onOpenChange:u,value:d,defaultValue:m,onValueChange:h,dir:g,name:x,autoComplete:y,disabled:w,required:T,form:C}=n,A=Pc(r),[M,R]=v.useState(null),[z,H]=v.useState(null),[Y,J]=v.useState(!1),$=Mm(g),[V,k]=tl({prop:i,defaultProp:s??!1,onChange:u,caller:ro}),[K,ie]=tl({prop:d,defaultProp:m,onChange:h,caller:ro}),se=v.useRef(null),q=M?C||!!M.closest("form"):!0,[ue,de]=v.useState(new Set),he=Array.from(ue).map(S=>S.props.value).join(";");return p.jsx(zc,{...A,children:p.jsxs(KR,{required:T,scope:r,trigger:M,onTriggerChange:R,valueNode:z,onValueNodeChange:H,valueNodeHasChildren:Y,onValueNodeHasChildrenChange:J,contentId:ca(),value:K,onValueChange:ie,open:V,onOpenChange:k,dir:$,triggerPointerDownPosRef:se,disabled:w,children:[p.jsx(Uc.Provider,{scope:r,children:p.jsx(QR,{scope:n.__scopeSelect,onNativeOptionAdd:v.useCallback(S=>{de(_=>new Set(_).add(S))},[]),onNativeOptionRemove:v.useCallback(S=>{de(_=>{const D=new Set(_);return D.delete(S),D})},[]),children:o})}),q?p.jsxs(D1,{"aria-hidden":!0,required:T,tabIndex:-1,name:x,autoComplete:y,value:K,onChange:S=>ie(S.target.value),disabled:w,form:C,children:[K===void 0?p.jsx("option",{value:""}):null,Array.from(ue)]},he):null]})})};c1.displayName=ro;var u1="SelectTrigger",f1=v.forwardRef((n,r)=>{const{__scopeSelect:o,disabled:i=!1,...s}=n,u=Pc(o),d=Or(u1,o),m=d.disabled||i,h=et(r,d.onTriggerChange),g=Ic(o),x=v.useRef("touch"),[y,w,T]=z1(A=>{const M=g().filter(H=>!H.disabled),R=M.find(H=>H.value===d.value),z=k1(M,A,R);z!==void 0&&d.onValueChange(z.value)}),C=A=>{m||(d.onOpenChange(!0),T()),A&&(d.triggerPointerDownPosRef.current={x:Math.round(A.pageX),y:Math.round(A.pageY)})};return p.jsx(bi,{asChild:!0,...u,children:p.jsx($e.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":j1(d.value)?"":void 0,...s,ref:h,onClick:ye(s.onClick,A=>{A.currentTarget.focus(),x.current!=="mouse"&&C(A)}),onPointerDown:ye(s.onPointerDown,A=>{x.current=A.pointerType;const M=A.target;M.hasPointerCapture(A.pointerId)&&M.releasePointerCapture(A.pointerId),A.button===0&&A.ctrlKey===!1&&A.pointerType==="mouse"&&(C(A),A.preventDefault())}),onKeyDown:ye(s.onKeyDown,A=>{const M=y.current!=="";!(A.ctrlKey||A.altKey||A.metaKey)&&A.key.length===1&&w(A.key),!(M&&A.key===" ")&&VR.includes(A.key)&&(C(),A.preventDefault())})})})});f1.displayName=u1;var d1="SelectValue",m1=v.forwardRef((n,r)=>{const{__scopeSelect:o,className:i,style:s,children:u,placeholder:d="",...m}=n,h=Or(d1,o),{onValueNodeHasChildrenChange:g}=h,x=u!==void 0,y=et(r,h.onValueNodeChange);return Wt(()=>{g(x)},[g,x]),p.jsx($e.span,{...m,ref:y,style:{pointerEvents:"none"},children:j1(h.value)?p.jsx(p.Fragment,{children:d}):u})});m1.displayName=d1;var WR="SelectIcon",h1=v.forwardRef((n,r)=>{const{__scopeSelect:o,children:i,...s}=n;return p.jsx($e.span,{"aria-hidden":!0,...s,ref:r,children:i||"▼"})});h1.displayName=WR;var JR="SelectPortal",p1=n=>p.jsx(gi,{asChild:!0,...n});p1.displayName=JR;var oo="SelectContent",g1=v.forwardRef((n,r)=>{const o=Or(oo,n.__scopeSelect),[i,s]=v.useState();if(Wt(()=>{s(new DocumentFragment)},[]),!o.open){const u=i;return u?mi.createPortal(p.jsx(y1,{scope:n.__scopeSelect,children:p.jsx(Uc.Slot,{scope:n.__scopeSelect,children:p.jsx("div",{children:n.children})})}),u):null}return p.jsx(v1,{...n,ref:r})});g1.displayName=oo;var Fn=10,[y1,Dr]=ul(oo),e5="SelectContentImpl",t5=Er("SelectContent.RemoveScroll"),v1=v.forwardRef((n,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:d,side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:y,collisionBoundary:w,collisionPadding:T,sticky:C,hideWhenDetached:A,avoidCollisions:M,...R}=n,z=Or(oo,o),[H,Y]=v.useState(null),[J,$]=v.useState(null),V=et(r,ae=>Y(ae)),[k,K]=v.useState(null),[ie,se]=v.useState(null),q=Ic(o),[ue,de]=v.useState(!1),he=v.useRef(!1);v.useEffect(()=>{if(H)return _c(H)},[H]),Ac();const S=v.useCallback(ae=>{const[Z,...oe]=q().map(we=>we.ref.current),[Se]=oe.slice(-1),Te=document.activeElement;for(const we of ae)if(we===Te||(we==null||we.scrollIntoView({block:"nearest"}),we===Z&&J&&(J.scrollTop=0),we===Se&&J&&(J.scrollTop=J.scrollHeight),we==null||we.focus(),document.activeElement!==Te))return},[q,J]),_=v.useCallback(()=>S([k,H]),[S,k,H]);v.useEffect(()=>{ue&&_()},[ue,_]);const{onOpenChange:D,triggerPointerDownPosRef:O}=z;v.useEffect(()=>{if(H){let ae={x:0,y:0};const Z=Se=>{var Te,we;ae={x:Math.abs(Math.round(Se.pageX)-(((Te=O.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Se.pageY)-(((we=O.current)==null?void 0:we.y)??0))}},oe=Se=>{ae.x<=10&&ae.y<=10?Se.preventDefault():H.contains(Se.target)||D(!1),document.removeEventListener("pointermove",Z),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",oe,{capture:!0})}}},[H,D,O]),v.useEffect(()=>{const ae=()=>D(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[D]);const[I,N]=z1(ae=>{const Z=q().filter(Te=>!Te.disabled),oe=Z.find(Te=>Te.ref.current===document.activeElement),Se=k1(Z,ae,oe);Se&&setTimeout(()=>Se.ref.current.focus())}),j=v.useCallback((ae,Z,oe)=>{const Se=!he.current&&!oe;(z.value!==void 0&&z.value===Z||Se)&&(K(ae),Se&&(he.current=!0))},[z.value]),B=v.useCallback(()=>H==null?void 0:H.focus(),[H]),P=v.useCallback((ae,Z,oe)=>{const Se=!he.current&&!oe;(z.value!==void 0&&z.value===Z||Se)&&se(ae)},[z.value]),te=i==="popper"?tm:b1,ne=te===tm?{side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:y,collisionBoundary:w,collisionPadding:T,sticky:C,hideWhenDetached:A,avoidCollisions:M}:{};return p.jsx(y1,{scope:o,content:H,viewport:J,onViewportChange:$,itemRefCallback:j,selectedItem:k,onItemLeave:B,itemTextRefCallback:P,focusSelectedItem:_,selectedItemText:ie,position:i,isPositioned:ue,searchRef:I,children:p.jsx(yi,{as:t5,allowPinchZoom:!0,children:p.jsx(pi,{asChild:!0,trapped:z.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:ye(s,ae=>{var Z;(Z=z.trigger)==null||Z.focus({preventScroll:!0}),ae.preventDefault()}),children:p.jsx(il,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>z.onOpenChange(!1),children:p.jsx(te,{role:"listbox",id:z.contentId,"data-state":z.open?"open":"closed",dir:z.dir,onContextMenu:ae=>ae.preventDefault(),...R,...ne,onPlaced:()=>de(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:ye(R.onKeyDown,ae=>{const Z=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!Z&&ae.key.length===1&&N(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let Se=q().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Te=ae.target,we=Se.indexOf(Te);Se=Se.slice(we+1)}setTimeout(()=>S(Se)),ae.preventDefault()}})})})})})})});v1.displayName=e5;var n5="SelectItemAlignedPosition",b1=v.forwardRef((n,r)=>{const{__scopeSelect:o,onPlaced:i,...s}=n,u=Or(oo,o),d=Dr(oo,o),[m,h]=v.useState(null),[g,x]=v.useState(null),y=et(r,V=>x(V)),w=Ic(o),T=v.useRef(!1),C=v.useRef(!0),{viewport:A,selectedItem:M,selectedItemText:R,focusSelectedItem:z}=d,H=v.useCallback(()=>{if(u.trigger&&u.valueNode&&m&&g&&A&&M&&R){const V=u.trigger.getBoundingClientRect(),k=g.getBoundingClientRect(),K=u.valueNode.getBoundingClientRect(),ie=R.getBoundingClientRect();if(u.dir!=="rtl"){const Te=ie.left-k.left,we=K.left-Te,ke=V.left-we,ge=V.width+ke,ct=Math.max(ge,k.width),ht=window.innerWidth-Fn,vt=I0(we,[Fn,Math.max(Fn,ht-ct)]);m.style.minWidth=ge+"px",m.style.left=vt+"px"}else{const Te=k.right-ie.right,we=window.innerWidth-K.right-Te,ke=window.innerWidth-V.right-we,ge=V.width+ke,ct=Math.max(ge,k.width),ht=window.innerWidth-Fn,vt=I0(we,[Fn,Math.max(Fn,ht-ct)]);m.style.minWidth=ge+"px",m.style.right=vt+"px"}const se=w(),q=window.innerHeight-Fn*2,ue=A.scrollHeight,de=window.getComputedStyle(g),he=parseInt(de.borderTopWidth,10),S=parseInt(de.paddingTop,10),_=parseInt(de.borderBottomWidth,10),D=parseInt(de.paddingBottom,10),O=he+S+ue+D+_,I=Math.min(M.offsetHeight*5,O),N=window.getComputedStyle(A),j=parseInt(N.paddingTop,10),B=parseInt(N.paddingBottom,10),P=V.top+V.height/2-Fn,te=q-P,ne=M.offsetHeight/2,ae=M.offsetTop+ne,Z=he+S+ae,oe=O-Z;if(Z<=P){const Te=se.length>0&&M===se[se.length-1].ref.current;m.style.bottom="0px";const we=g.clientHeight-A.offsetTop-A.offsetHeight,ke=Math.max(te,ne+(Te?B:0)+we+_),ge=Z+ke;m.style.height=ge+"px"}else{const Te=se.length>0&&M===se[0].ref.current;m.style.top="0px";const ke=Math.max(P,he+A.offsetTop+(Te?j:0)+ne)+oe;m.style.height=ke+"px",A.scrollTop=Z-P+A.offsetTop}m.style.margin=`${Fn}px 0`,m.style.minHeight=I+"px",m.style.maxHeight=q+"px",i==null||i(),requestAnimationFrame(()=>T.current=!0)}},[w,u.trigger,u.valueNode,m,g,A,M,R,u.dir,i]);Wt(()=>H(),[H]);const[Y,J]=v.useState();Wt(()=>{g&&J(window.getComputedStyle(g).zIndex)},[g]);const $=v.useCallback(V=>{V&&C.current===!0&&(H(),z==null||z(),C.current=!1)},[H,z]);return p.jsx(r5,{scope:o,contentWrapper:m,shouldExpandOnScrollRef:T,onScrollButtonChange:$,children:p.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:Y},children:p.jsx($e.div,{...s,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});b1.displayName=n5;var a5="SelectPopperPosition",tm=v.forwardRef((n,r)=>{const{__scopeSelect:o,align:i="start",collisionPadding:s=Fn,...u}=n,d=Pc(o);return p.jsx(kc,{...d,...u,ref:r,align:i,collisionPadding:s,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});tm.displayName=a5;var[r5,Km]=ul(oo,{}),nm="SelectViewport",x1=v.forwardRef((n,r)=>{const{__scopeSelect:o,nonce:i,...s}=n,u=Dr(nm,o),d=Km(nm,o),m=et(r,u.onViewportChange),h=v.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(Uc.Slot,{scope:o,children:p.jsx($e.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ye(s.onScroll,g=>{const x=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:w}=d;if(w!=null&&w.current&&y){const T=Math.abs(h.current-x.scrollTop);if(T>0){const C=window.innerHeight-Fn*2,A=parseFloat(y.style.minHeight),M=parseFloat(y.style.height),R=Math.max(A,M);if(R<C){const z=R+T,H=Math.min(C,z),Y=z-H;y.style.height=H+"px",y.style.bottom==="0px"&&(x.scrollTop=Y>0?Y:0,y.style.justifyContent="flex-end")}}}h.current=x.scrollTop})})})]})});x1.displayName=nm;var S1="SelectGroup",[o5,l5]=ul(S1),w1=v.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,s=ca();return p.jsx(o5,{scope:o,id:s,children:p.jsx($e.div,{role:"group","aria-labelledby":s,...i,ref:r})})});w1.displayName=S1;var E1="SelectLabel",i5=v.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,s=l5(E1,o);return p.jsx($e.div,{id:s.id,...i,ref:r})});i5.displayName=E1;var xc="SelectItem",[s5,C1]=ul(xc),T1=v.forwardRef((n,r)=>{const{__scopeSelect:o,value:i,disabled:s=!1,textValue:u,...d}=n,m=Or(xc,o),h=Dr(xc,o),g=m.value===i,[x,y]=v.useState(u??""),[w,T]=v.useState(!1),C=et(r,z=>{var H;return(H=h.itemRefCallback)==null?void 0:H.call(h,z,i,s)}),A=ca(),M=v.useRef("touch"),R=()=>{s||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(s5,{scope:o,value:i,disabled:s,textId:A,isSelected:g,onItemTextChange:v.useCallback(z=>{y(H=>H||((z==null?void 0:z.textContent)??"").trim())},[]),children:p.jsx(Uc.ItemSlot,{scope:o,value:i,disabled:s,textValue:x,children:p.jsx($e.div,{role:"option","aria-labelledby":A,"data-highlighted":w?"":void 0,"aria-selected":g&&w,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:C,onFocus:ye(d.onFocus,()=>T(!0)),onBlur:ye(d.onBlur,()=>T(!1)),onClick:ye(d.onClick,()=>{M.current!=="mouse"&&R()}),onPointerUp:ye(d.onPointerUp,()=>{M.current==="mouse"&&R()}),onPointerDown:ye(d.onPointerDown,z=>{M.current=z.pointerType}),onPointerMove:ye(d.onPointerMove,z=>{var H;M.current=z.pointerType,s?(H=h.onItemLeave)==null||H.call(h):M.current==="mouse"&&z.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(d.onPointerLeave,z=>{var H;z.currentTarget===document.activeElement&&((H=h.onItemLeave)==null||H.call(h))}),onKeyDown:ye(d.onKeyDown,z=>{var Y;((Y=h.searchRef)==null?void 0:Y.current)!==""&&z.key===" "||(XR.includes(z.key)&&R(),z.key===" "&&z.preventDefault())})})})})});T1.displayName=xc;var ai="SelectItemText",A1=v.forwardRef((n,r)=>{const{__scopeSelect:o,className:i,style:s,...u}=n,d=Or(ai,o),m=Dr(ai,o),h=C1(ai,o),g=ZR(ai,o),[x,y]=v.useState(null),w=et(r,R=>y(R),h.onItemTextChange,R=>{var z;return(z=m.itemTextRefCallback)==null?void 0:z.call(m,R,h.value,h.disabled)}),T=x==null?void 0:x.textContent,C=v.useMemo(()=>p.jsx("option",{value:h.value,disabled:h.disabled,children:T},h.value),[h.disabled,h.value,T]),{onNativeOptionAdd:A,onNativeOptionRemove:M}=g;return Wt(()=>(A(C),()=>M(C)),[A,M,C]),p.jsxs(p.Fragment,{children:[p.jsx($e.span,{id:h.textId,...u,ref:w}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?mi.createPortal(u.children,d.valueNode):null]})});A1.displayName=ai;var M1="SelectItemIndicator",_1=v.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n;return C1(M1,o).isSelected?p.jsx($e.span,{"aria-hidden":!0,...i,ref:r}):null});_1.displayName=M1;var am="SelectScrollUpButton",N1=v.forwardRef((n,r)=>{const o=Dr(am,n.__scopeSelect),i=Km(am,n.__scopeSelect),[s,u]=v.useState(!1),d=et(r,i.onScrollButtonChange);return Wt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollTop>0;u(g)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?p.jsx(O1,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});N1.displayName=am;var rm="SelectScrollDownButton",R1=v.forwardRef((n,r)=>{const o=Dr(rm,n.__scopeSelect),i=Km(rm,n.__scopeSelect),[s,u]=v.useState(!1),d=et(r,i.onScrollButtonChange);return Wt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollHeight-h.clientHeight,x=Math.ceil(h.scrollTop)<g;u(x)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?p.jsx(O1,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});R1.displayName=rm;var O1=v.forwardRef((n,r)=>{const{__scopeSelect:o,onAutoScroll:i,...s}=n,u=Dr("SelectScrollButton",o),d=v.useRef(null),m=Ic(o),h=v.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return v.useEffect(()=>()=>h(),[h]),Wt(()=>{var x;const g=m().find(y=>y.ref.current===document.activeElement);(x=g==null?void 0:g.ref.current)==null||x.scrollIntoView({block:"nearest"})},[m]),p.jsx($e.div,{"aria-hidden":!0,...s,ref:r,style:{flexShrink:0,...s.style},onPointerDown:ye(s.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:ye(s.onPointerMove,()=>{var g;(g=u.onItemLeave)==null||g.call(u),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:ye(s.onPointerLeave,()=>{h()})})}),c5="SelectSeparator",u5=v.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n;return p.jsx($e.div,{"aria-hidden":!0,...i,ref:r})});u5.displayName=c5;var om="SelectArrow",f5=v.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,s=Pc(o),u=Or(om,o),d=Dr(om,o);return u.open&&d.position==="popper"?p.jsx(Lc,{...s,...i,ref:r}):null});f5.displayName=om;var d5="SelectBubbleInput",D1=v.forwardRef(({__scopeSelect:n,value:r,...o},i)=>{const s=v.useRef(null),u=et(i,s),d=PM(r);return v.useEffect(()=>{const m=s.current;if(!m)return;const h=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==r&&x){const y=new Event("change",{bubbles:!0});x.call(m,r),m.dispatchEvent(y)}},[d,r]),p.jsx($e.select,{...o,style:{...hb,...o.style},ref:u,defaultValue:r})});D1.displayName=d5;function j1(n){return n===""||n===void 0}function z1(n){const r=Pn(n),o=v.useRef(""),i=v.useRef(0),s=v.useCallback(d=>{const m=o.current+d;r(m),(function h(g){o.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(m)},[r]),u=v.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,s,u]}function k1(n,r,o){const s=r.length>1&&Array.from(r).every(g=>g===r[0])?r[0]:r,u=o?n.indexOf(o):-1;let d=m5(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.textValue.toLowerCase().startsWith(s.toLowerCase()));return h!==o?h:void 0}function m5(n,r){return n.map((o,i)=>n[(r+i)%n.length])}var h5=c1,p5=f1,g5=m1,y5=h1,v5=p1,b5=g1,x5=x1,S5=w1,w5=T1,E5=A1,C5=_1,T5=N1,A5=R1,M5="Separator",P0="horizontal",_5=["horizontal","vertical"],L1=v.forwardRef((n,r)=>{const{decorative:o,orientation:i=P0,...s}=n,u=N5(i)?i:P0,m=o?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return p.jsx($e.div,{"data-orientation":u,...m,...s,ref:r})});L1.displayName=M5;function N5(n){return _5.includes(n)}var R5=L1,[$c]=Ua("Tooltip",[_r]),Qm=_r(),H1="TooltipProvider",O5=700,$0="tooltip.open",[D5,B1]=$c(H1),U1=n=>{const{__scopeTooltip:r,delayDuration:o=O5,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:u}=n,d=v.useRef(!0),m=v.useRef(!1),h=v.useRef(0);return v.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),p.jsx(D5,{scope:r,isOpenDelayedRef:d,delayDuration:o,onOpen:v.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:m,onPointerInTransitChange:v.useCallback(g=>{m.current=g},[]),disableHoverableContent:s,children:u})};U1.displayName=H1;var I1="Tooltip",[hj,Gc]=$c(I1),lm="TooltipTrigger",j5=v.forwardRef((n,r)=>{const{__scopeTooltip:o,...i}=n,s=Gc(lm,o),u=B1(lm,o),d=Qm(o),m=v.useRef(null),h=et(r,m,s.onTriggerChange),g=v.useRef(!1),x=v.useRef(!1),y=v.useCallback(()=>g.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),p.jsx(bi,{asChild:!0,...d,children:p.jsx($e.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...i,ref:h,onPointerMove:ye(n.onPointerMove,w=>{w.pointerType!=="touch"&&!x.current&&!u.isPointerInTransitRef.current&&(s.onTriggerEnter(),x.current=!0)}),onPointerLeave:ye(n.onPointerLeave,()=>{s.onTriggerLeave(),x.current=!1}),onPointerDown:ye(n.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:ye(n.onFocus,()=>{g.current||s.onOpen()}),onBlur:ye(n.onBlur,s.onClose),onClick:ye(n.onClick,s.onClose)})})});j5.displayName=lm;var z5="TooltipPortal",[pj,k5]=$c(z5,{forceMount:void 0}),rl="TooltipContent",L5=v.forwardRef((n,r)=>{const o=k5(rl,n.__scopeTooltip),{forceMount:i=o.forceMount,side:s="top",...u}=n,d=Gc(rl,n.__scopeTooltip);return p.jsx(Wn,{present:i||d.open,children:d.disableHoverableContent?p.jsx(P1,{side:s,...u,ref:r}):p.jsx(H5,{side:s,...u,ref:r})})}),H5=v.forwardRef((n,r)=>{const o=Gc(rl,n.__scopeTooltip),i=B1(rl,n.__scopeTooltip),s=v.useRef(null),u=et(r,s),[d,m]=v.useState(null),{trigger:h,onClose:g}=o,x=s.current,{onPointerInTransitChange:y}=i,w=v.useCallback(()=>{m(null),y(!1)},[y]),T=v.useCallback((C,A)=>{const M=C.currentTarget,R={x:C.clientX,y:C.clientY},z=$5(R,M.getBoundingClientRect()),H=G5(R,z),Y=Y5(A.getBoundingClientRect()),J=V5([...H,...Y]);m(J),y(!0)},[y]);return v.useEffect(()=>()=>w(),[w]),v.useEffect(()=>{if(h&&x){const C=M=>T(M,x),A=M=>T(M,h);return h.addEventListener("pointerleave",C),x.addEventListener("pointerleave",A),()=>{h.removeEventListener("pointerleave",C),x.removeEventListener("pointerleave",A)}}},[h,x,T,w]),v.useEffect(()=>{if(d){const C=A=>{const M=A.target,R={x:A.clientX,y:A.clientY},z=(h==null?void 0:h.contains(M))||(x==null?void 0:x.contains(M)),H=!q5(R,d);z?w():H&&(w(),g())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[h,x,d,g,w]),p.jsx(P1,{...n,ref:u})}),[B5,U5]=$c(I1,{isInside:!1}),I5=oA("TooltipContent"),P1=v.forwardRef((n,r)=>{const{__scopeTooltip:o,children:i,"aria-label":s,onEscapeKeyDown:u,onPointerDownOutside:d,...m}=n,h=Gc(rl,o),g=Qm(o),{onClose:x}=h;return v.useEffect(()=>(document.addEventListener($0,x),()=>document.removeEventListener($0,x)),[x]),v.useEffect(()=>{if(h.trigger){const y=w=>{const T=w.target;T!=null&&T.contains(h.trigger)&&x()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[h.trigger,x]),p.jsx(il,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:y=>y.preventDefault(),onDismiss:x,children:p.jsxs(kc,{"data-state":h.stateAttribute,...g,...m,ref:r,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(I5,{children:i}),p.jsx(B5,{scope:o,isInside:!0,children:p.jsx(fA,{id:h.contentId,role:"tooltip",children:s||i})})]})})});L5.displayName=rl;var $1="TooltipArrow",P5=v.forwardRef((n,r)=>{const{__scopeTooltip:o,...i}=n,s=Qm(o);return U5($1,o).isInside?null:p.jsx(Lc,{...s,...i,ref:r})});P5.displayName=$1;function $5(n,r){const o=Math.abs(r.top-n.y),i=Math.abs(r.bottom-n.y),s=Math.abs(r.right-n.x),u=Math.abs(r.left-n.x);switch(Math.min(o,i,s,u)){case u:return"left";case s:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function G5(n,r,o=5){const i=[];switch(r){case"top":i.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":i.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":i.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":i.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return i}function Y5(n){const{top:r,right:o,bottom:i,left:s}=n;return[{x:s,y:r},{x:o,y:r},{x:o,y:i},{x:s,y:i}]}function q5(n,r){const{x:o,y:i}=n;let s=!1;for(let u=0,d=r.length-1;u<r.length;d=u++){const m=r[u],h=r[d],g=m.x,x=m.y,y=h.x,w=h.y;x>i!=w>i&&o<(y-g)*(i-x)/(w-x)+g&&(s=!s)}return s}function V5(n){const r=n.slice();return r.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),X5(r)}function X5(n){if(n.length<=1)return n.slice();const r=[];for(let i=0;i<n.length;i++){const s=n[i];for(;r.length>=2;){const u=r[r.length-1],d=r[r.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))r.pop();else break}r.push(s)}r.pop();const o=[];for(let i=n.length-1;i>=0;i--){const s=n[i];for(;o.length>=2;){const u=o[o.length-1],d=o[o.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))o.pop();else break}o.push(s)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var F5=U1;const K5=nA("inline-flex shrink-0 items-center justify-center gap-1.5 rounded-md text-[13px] font-medium whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/85",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20",outline:"border border-foreground/[0.08] bg-white text-foreground/70 shadow-none hover:bg-foreground/[0.04] hover:text-foreground",secondary:"bg-foreground/[0.06] text-foreground hover:bg-foreground/[0.08]",ghost:"text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground",link:"text-foreground underline-offset-4 hover:underline"},size:{default:"h-8 px-3 py-1.5 has-[>svg]:px-2.5",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-md px-2 has-[>svg]:px-2",lg:"h-10 rounded-md px-4 has-[>svg]:px-3",icon:"size-8","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Vt({className:n,variant:r="default",size:o="default",asChild:i=!1,...s}){const u=i?aA:"button";return p.jsx(u,{"data-slot":"button","data-variant":r,"data-size":o,className:Pe(K5({variant:r,size:o,className:n})),...s})}function Q5({slides:n,startSlideId:r,onExit:o}){const i=v.useMemo(()=>{const Z=n.findIndex(oe=>oe.id===r);return Z>=0?Z:0},[n,r]),[s,u]=v.useState(i),[d,m]=v.useState("none"),[h,g]=v.useState("#F59E0B"),[x,y]=v.useState(!1),[w,T]=v.useState([]),[C,A]=v.useState({x:-100,y:-100}),[M,R]=v.useState(!!document.fullscreenElement),[z,H]=v.useState(()=>({height:window.innerHeight,width:window.innerWidth})),Y=v.useRef(null),J=v.useRef(null),$=v.useRef(null),V=v.useRef(0),k=v.useRef(s),K=v.useMemo(()=>DE(n),[n]),ie=K[Math.min(s,K.length-1)]??null;v.useEffect(()=>{const Z=K.findIndex(oe=>oe.id===r);u(Z>=0?Z:0)},[K,r]),v.useEffect(()=>{const Z=K.findIndex(oe=>oe.id===(ie==null?void 0:ie.id));Z>=0&&Z!==s&&u(Z)},[s,ie==null?void 0:ie.id,K]),v.useEffect(()=>()=>{$.current&&window.clearTimeout($.current)},[]),v.useEffect(()=>{const Z=()=>{R(!!document.fullscreenElement),H({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",Z),document.addEventListener("fullscreenchange",Z),()=>{window.removeEventListener("resize",Z),document.removeEventListener("fullscreenchange",Z)}},[]);const se=v.useCallback(()=>{y(!0),$.current&&window.clearTimeout($.current),$.current=window.setTimeout(()=>{y(!1)},1500)},[]);function q(Z){m(oe=>oe===Z?"none":Z)}const ue=v.useCallback(()=>{T([]),J.current=null},[]);function de(Z){m("none"),u(jE(Z,K.length)),ue()}function he(){de(s+1)}function S(){var oe;const Z=document.documentElement;if(document.fullscreenElement){(oe=document.exitFullscreen)==null||oe.call(document);return}Z.requestFullscreen&&Z.requestFullscreen()}function _(Z){return Z.clientY>=window.innerHeight-96}function D(Z){if(_(Z)&&se(),d==="laser"&&A({x:Z.clientX,y:Z.clientY}),d==="pen"&&J.current){const oe=Y.current,Se=oe==null?void 0:oe.getBoundingClientRect();if(oe&&Se){const Te=Math.min(Math.max(Z.clientX-Se.left,0),Se.width)/B,we=Math.min(Math.max(Z.clientY-Se.top,0),Se.height)/B,ke={...J.current,points:`${J.current.points} L ${Te.toFixed(1)} ${we.toFixed(1)}`};J.current=ke,T(ge=>[...ge.slice(0,-1),ke])}}}function O(Z){j(),!(d!=="none"||!Y.current||!(Z.target instanceof Node))&&Y.current.contains(Z.target)&&he()}function I(Z){if(d!=="none"||Math.abs(Z.deltaY)<Math.abs(Z.deltaX)||Z.deltaY<=8)return;const oe=Date.now();oe-V.current<360||(V.current=oe,Z.preventDefault(),he())}function N(Z){if(d!=="pen"||!Y.current||!(Z.target instanceof Node)||!Y.current.contains(Z.target))return;const oe=Y.current.getBoundingClientRect();if(!(Z.clientX>=oe.left&&Z.clientX<=oe.right&&Z.clientY>=oe.top&&Z.clientY<=oe.bottom))return;const Te=Math.min(Math.max(Z.clientX-oe.left,0),oe.width)/B,we=Math.min(Math.max(Z.clientY-oe.top,0),oe.height)/B,ke={color:h,points:`M ${Te.toFixed(1)} ${we.toFixed(1)}`};J.current=ke,T(ge=>[...ge,ke])}function j(){J.current=null}if(v.useEffect(()=>{k.current!==s&&(k.current=s,ue())},[s,ue]),v.useEffect(()=>{const Z=oe=>{if(oe.key==="Escape"){if(d==="pen"){m("none"),ue(),se();return}o();return}(oe.key==="ArrowRight"||oe.key==="ArrowDown"||oe.key==="PageDown")&&(m("none"),u(Se=>Math.min(Se+1,K.length-1))),(oe.key==="ArrowLeft"||oe.key==="ArrowUp"||oe.key==="PageUp")&&(m("none"),u(Se=>Math.max(Se-1,0)))};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[ue,o,K.length,se,d]),v.useEffect(()=>{var oe;if(!ie)return;const Z=(oe=Y.current)==null?void 0:oe.querySelector("[data-testid='presenter-slide-iframe']");Z&&(Z.srcdoc=ie.htmlSource)},[ie]),!ie)return null;const B=Math.min(z.width/ie.width,z.height/ie.height),P=Math.max(320,Math.floor(ie.width*B)),te=Math.max(240,Math.floor(ie.height*B)),ne=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='${encodeURIComponent(h)}' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto`,ae=d==="laser"?"none":d==="pen"?ne:"default";return p.jsxs("main",{className:"fixed inset-0 z-50 overflow-hidden bg-[#111]","data-testid":"presenter-view",style:{cursor:ae},onPointerMove:D,onPointerDown:N,onPointerUp:O,onPointerLeave:j,onWheel:I,children:[p.jsxs("div",{ref:Y,className:"absolute left-1/2 top-1/2 overflow-hidden bg-white shadow-[0_18px_70px_rgba(0,0,0,0.42)]","data-testid":"presenter-slide-frame",style:{width:`${P}px`,height:`${te}px`,transform:"translate(-50%, -50%)"},children:[p.jsx("iframe",{title:"Presented slide",className:"pointer-events-none block border-0 bg-white","data-testid":"presenter-slide-iframe",style:{width:`${ie.width}px`,height:`${ie.height}px`,transform:`scale(${B})`,transformOrigin:"top left"}}),p.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full overflow-visible","data-testid":"presenter-ink-layer","aria-hidden":"true",viewBox:`0 0 ${ie.width} ${ie.height}`,children:w.map((Z,oe)=>p.jsx("path",{d:Z.points,fill:"none",stroke:Z.color,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},`${Z.color}-${oe}`))})]}),p.jsx("div",{className:"pointer-events-none fixed left-0 top-0 size-4 rounded-full bg-[#f7ff2a] shadow-[0_0_0_1px_rgba(17,24,39,0.85),0_0_14px_rgba(247,255,42,0.9),0_0_24px_rgba(34,211,238,0.65)]","data-testid":"presenter-laser-cursor",style:{opacity:d==="laser"?1:0,transform:`translate(${C.x}px, ${C.y}px) translate(-50%, -50%)`}}),d==="pen"?p.jsx("div",{className:"absolute bottom-[78px] left-1/2 z-20 flex -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-2 shadow-[0_14px_44px_rgba(0,0,0,0.32)] backdrop-blur-lg","data-testid":"presenter-pen-colors","aria-label":"Pen colors",children:OE.map(Z=>p.jsx("button",{type:"button","aria-label":`Use pen color ${Z}`,className:"size-7 rounded-full border border-white/25 shadow-[0_0_0_1px_rgba(0,0,0,0.25)] transition-transform hover:scale-105",style:{background:Z,outline:h===Z?"2px solid rgba(255,255,255,0.9)":"none",outlineOffset:"2px"},onClick:()=>g(Z)},Z))}):null,p.jsxs("nav",{className:"absolute bottom-6 left-1/2 z-20 flex h-11 -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-1.5 text-white shadow-[0_18px_52px_rgba(0,0,0,0.38)] backdrop-blur-lg transition-[opacity,transform] duration-150 data-[visible=false]:translate-y-3 data-[visible=false]:opacity-0 data-[visible=false]:pointer-events-none","data-testid":"presenter-toolbar","data-visible":x?"true":"false",onPointerEnter:se,onPointerMove:se,children:[p.jsx(Vt,{variant:"ghost",size:"sm","aria-label":"Previous slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>de(s-1),disabled:s===0,children:"Prev"}),p.jsxs("span",{className:"min-w-14 text-center text-[12px] font-semibold text-white/80",children:[s+1," / ",K.length]}),p.jsx(Vt,{variant:"ghost",size:"sm","aria-label":"Next slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>de(s+1),disabled:s>=K.length-1,children:"Next"}),p.jsx("span",{className:"h-5 w-px bg-white/15"}),p.jsxs(Vt,{variant:d==="laser"?"secondary":"ghost",size:"sm","aria-label":"Laser pointer",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>q("laser"),"aria-pressed":d==="laser",children:[p.jsx(cT,{className:"size-3.5"}),"Laser"]}),p.jsxs(Vt,{variant:d==="pen"?"secondary":"ghost",size:"sm","aria-label":"Pen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>q("pen"),"aria-pressed":d==="pen",children:[p.jsx(kC,{className:"size-3.5"}),"Pen"]}),p.jsxs(Vt,{variant:"ghost",size:"sm","aria-label":M?"Exit fullscreen":"Enter fullscreen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:S,children:[p.jsx(RC,{className:"size-3.5"}),M?"Window":"Fullscreen"]}),p.jsx("span",{className:"h-5 w-px bg-white/15"}),p.jsxs(Vt,{variant:"ghost",size:"sm","aria-label":"Exit presentation",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:o,children:[p.jsx(wm,{className:"size-3.5"}),"Exit"]})]})]})}function G1({...n}){return p.jsx(ER,{"data-slot":"context-menu",...n})}function Y1({...n}){return p.jsx(CR,{"data-slot":"context-menu-trigger",...n})}function Sd({...n}){return p.jsx(NR,{"data-slot":"context-menu-sub",...n})}function wd({className:n,inset:r,children:o,...i}){return p.jsxs(RR,{"data-slot":"context-menu-sub-trigger","data-inset":r,className:Pe("flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] outline-hidden focus:bg-foreground/[0.04] data-[state=open]:bg-foreground/[0.04] data-[inset=true]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i,children:[o,p.jsx(nC,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Ed({className:n,...r}){return p.jsx(OR,{"data-slot":"context-menu-sub-content",className:Pe("z-50 min-w-44 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...r})}function q1({className:n,...r}){return p.jsx(TR,{children:p.jsx(AR,{"data-slot":"context-menu-content",className:Pe("z-50 min-w-48 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...r})})}function wt({className:n,inset:r,variant:o="default",...i}){return p.jsx(MR,{"data-slot":"context-menu-item","data-inset":r,"data-variant":o,className:Pe("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] text-foreground/75 outline-hidden transition-colors focus:bg-foreground/[0.04] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-45 data-[inset=true]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i})}function Sc({className:n,...r}){return p.jsx(_R,{"data-slot":"context-menu-separator",className:Pe("-mx-1 my-1 h-px bg-foreground/10",n),...r})}function G0({className:n,...r}){return p.jsx("span",{"data-slot":"context-menu-shortcut",className:Pe("ml-auto text-[11px] tracking-normal text-foreground/40",n),...r})}function el({className:n,type:r,...o}){return p.jsx("input",{type:r,"data-slot":"input",className:Pe("h-8 w-full min-w-0 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 py-1 text-sm shadow-none transition-colors outline-none selection:bg-foreground selection:text-background file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-foreground/35 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","hover:bg-foreground/[0.04] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35","aria-invalid:border-destructive aria-invalid:ring-destructive/20",n),...o})}function Z5({slides:n,activeSlideId:r,slideCount:o,thumbnails:i,onSelectSlide:s,onAdd:u,onAddSlideAbove:d,onAddSlideBelow:m,onDuplicate:h,onDelete:g,onToggleHidden:x,onRename:y,onReorder:w}){const[T,C]=v.useState(null),[A,M]=v.useState(null),[R,z]=v.useState(null),[H,Y]=v.useState(""),J=T?n.findIndex(q=>q.id===T):-1,$=R?n.find(q=>q.id===R):null,V=v.useCallback(q=>{q==null||q.scrollIntoView({block:"nearest",inline:"nearest"})},[]),k=v.useCallback((q,ue)=>{if(!q||ue===null){C(null),M(null);return}const de=n.findIndex(he=>he.id===q);de>=0&&de!==ue&&(w==null||w(q,ue)),C(null),M(null)},[w,n]),K=v.useCallback(q=>{z(q.id),Y(q.title||"Untitled Slide"),s(q.id)},[s]),ie=v.useCallback(()=>{z(null),Y("")},[]),se=v.useCallback(()=>{R&&(y==null||y(R,H),ie())},[ie,y,R,H]);return p.jsxs(p.Fragment,{children:[p.jsx("aside",{className:"flex h-[calc(100vh-3.5rem)] w-[212px] shrink-0 flex-col border-r border-foreground/[0.06] bg-white","data-testid":"slide-sidebar",children:p.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col","data-testid":"slide-sidebar-panel",children:[p.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-foreground/[0.06] px-3",children:[p.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground/50","data-testid":"slide-count",children:[p.jsx("span",{className:"tabular-nums",children:o})," slides"]}),p.jsx("button",{onClick:u,className:"flex size-7 items-center justify-center rounded-md text-foreground/50 transition-colors hover:bg-foreground/[0.06] hover:text-foreground",type:"button",title:"Add slide","aria-label":"Add slide",children:p.jsx(ii,{className:"size-3.5"})})]}),p.jsx("div",{className:"min-h-0 flex-1 space-y-2.5 overflow-y-auto px-2 py-2.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","data-testid":"slide-list",children:n.map((q,ue)=>{const de=q.id===r,he=q.hidden===!0,S=q.id===T,_=J>=0&&A===ue&&ue<J&&T!==q.id,D=J>=0&&A===ue&&ue>J&&T!==q.id;return p.jsxs(G1,{children:[p.jsx(Y1,{asChild:!0,children:p.jsxs("div",{draggable:!0,onDragStart:O=>{C(q.id),M(ue),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",q.id)},onDragOver:O=>{O.preventDefault(),O.dataTransfer.dropEffect="move",M(ue)},onDrop:O=>{O.preventDefault(),O.stopPropagation();const I=O.dataTransfer.getData("text/plain")||T;k(I,ue)},onDragEnd:()=>{C(null),M(null)},className:Pe("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",S&&"opacity-60"),"data-testid":"slide-card",children:[_?p.jsx(Y0,{}):null,p.jsx("div",{className:Pe("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",de?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:ue+1}),p.jsxs("div",{className:Pe("relative flex-1 overflow-hidden rounded-lg ring-1 ring-inset transition-all",de?"shadow-[0_0_0_2px_var(--background),0_0_0_3px_var(--foreground)] ring-foreground":"ring-foreground/30 shadow-[0_0_0_1px_rgba(0,0,0,0.05),0_1px_3px_rgba(0,0,0,0.04)] hover:ring-foreground/45",he&&"opacity-40"),children:[p.jsx("button",{ref:de?V:null,className:"block w-full text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onClick:()=>s(q.id),type:"button","aria-label":`Slide ${ue+1}`,"aria-current":de?"true":void 0,children:p.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[q.id]?p.jsx("img",{alt:`Slide ${ue+1}`,className:"absolute inset-0 block size-full object-cover",src:i[q.id]}):p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",ue+1]}),he?p.jsx("div",{className:"absolute left-1 top-1 flex size-4 items-center justify-center rounded bg-foreground/80 text-background","data-testid":"slide-hidden-indicator",children:p.jsx(o0,{className:"size-2.5"})}):null]})}),p.jsx("div",{className:"h-6 border-t border-foreground/[0.04] bg-white",children:p.jsx("button",{className:"h-full w-full truncate rounded-b-lg px-2 text-left text-[11px] text-foreground/60 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring",type:"button",onClick:()=>s(q.id),onDoubleClick:()=>K(q),"aria-label":`Slide title: ${q.title||"Untitled Slide"}`,children:q.title||"Untitled Slide"})})]}),D?p.jsx(Y0,{position:"after"}):null]})}),p.jsxs(q1,{"aria-label":"Slide actions",className:"min-w-36",children:[p.jsxs(wt,{onSelect:()=>d==null?void 0:d(q.id),children:[p.jsx(ii,{className:"size-3.5"}),"Add Slide Above"]}),p.jsxs(wt,{onSelect:()=>m==null?void 0:m(q.id),children:[p.jsx(ii,{className:"size-3.5"}),"Add Slide Below"]}),p.jsx(Sc,{}),p.jsxs(wt,{onSelect:()=>h==null?void 0:h(q.id),children:[p.jsx(qv,{className:"size-3.5"}),"Duplicate"]}),p.jsxs(wt,{onSelect:()=>K(q),children:[p.jsx(HC,{className:"size-3.5"}),"Rename"]}),p.jsxs(wt,{onSelect:()=>x==null?void 0:x(q.id),children:[he?p.jsx(Vv,{className:"size-3.5"}):p.jsx(o0,{className:"size-3.5"}),he?"Show":"Hide"]}),p.jsx(Sc,{}),p.jsxs(wt,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(q.id),children:[p.jsx(Kv,{className:"size-3.5"}),"Delete"]})]})]},q.id)})})]})}),$?p.jsx(W5,{draft:H,slideTitle:$.title||"Untitled Slide",onCancel:ie,onChange:Y,onSave:se}):null]})}function W5({draft:n,slideTitle:r,onCancel:o,onChange:i,onSave:s}){const u=v.useRef(null);return v.useEffect(()=>{const d=window.requestAnimationFrame(()=>{var h,g;(h=u.current)==null||h.focus(),(g=u.current)==null||g.select()}),m=h=>{h.key==="Escape"&&o()};return document.addEventListener("keydown",m),()=>{window.cancelAnimationFrame(d),document.removeEventListener("keydown",m)}},[o]),p.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:d=>{d.target===d.currentTarget&&o()},children:p.jsx("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"rename-slide-title",className:"relative m-0 w-full max-w-[420px] overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]","data-testid":"rename-slide-dialog",children:p.jsxs("form",{onSubmit:d=>{d.preventDefault(),s()},children:[p.jsxs("div",{className:"border-b border-foreground/[0.08] px-4 py-3",children:[p.jsx("h2",{id:"rename-slide-title",className:"text-[14px] font-semibold text-foreground",children:"Rename slide"}),p.jsx("p",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:r})]}),p.jsxs("div",{className:"space-y-2 px-4 py-4",children:[p.jsx("label",{htmlFor:"rename-slide-input",className:"text-[12px] font-medium text-foreground",children:"Slide name"}),p.jsx(el,{ref:u,id:"rename-slide-input",value:n,onChange:d=>i(d.target.value)})]}),p.jsxs("div",{className:"flex justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[p.jsx(Vt,{type:"button",variant:"outline",onClick:o,children:"Cancel"}),p.jsx(Vt,{type:"submit",children:"Save"})]})]})})})}function Y0({position:n="before"}){return p.jsxs("div",{className:Pe("pointer-events-none absolute left-6 right-1 z-10 flex h-3 items-center",n==="before"?"-top-[11px]":"-bottom-[11px]"),"data-testid":"slide-insertion-marker",children:[p.jsx("span",{className:"size-2 rounded-full bg-foreground/55"}),p.jsx("span",{className:"h-0.5 flex-1 rounded-full bg-foreground/55"})]})}const J5=18,eO=6,Ks=24,Qs="#ef4444",wc=40,q0=12,V0=360;function Qo(n,r,o,i,s){return Math.max(n,o)-Math.min(r,i)<=s}function tO({selectionBounds:n,snapGuides:r,resizeHandles:o,rotationHandle:i,onResizeHandleMouseDown:s,onRotateHandleMouseDown:u}){const d="absolute z-[5] size-[13px] -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full border border-white bg-foreground shadow-[0_2px_8px_rgba(0,0,0,0.16)] transition-colors before:absolute before:inset-[3px] before:rounded-full before:bg-white/90 hover:bg-foreground/80";return p.jsxs(p.Fragment,{children:[r.map((m,h)=>{const g=m.variant==="spacing"?"2px":"1px",x=14,y=m.variant==="spacing"?2:1,w=m.orientation==="vertical",T=w?{left:`${m.start.x}px`,top:`${Math.min(m.start.y,m.end.y)}px`,width:"0",height:`${Math.max(Math.abs(m.end.y-m.start.y),32)}px`,borderLeftWidth:g,borderLeftStyle:"solid",borderLeftColor:Qs,opacity:m.variant==="spacing"?.9:.82}:{left:`${Math.min(m.start.x,m.end.x)}px`,top:`${m.start.y}px`,width:`${Math.max(Math.abs(m.end.x-m.start.x),32)}px`,height:"0",borderTopWidth:g,borderTopStyle:"solid",borderTopColor:Qs,opacity:m.variant==="spacing"?.9:.82},C=w?{width:`${x}px`,height:`${y}px`,left:`${-x/2}px`,backgroundColor:Qs}:{width:`${y}px`,height:`${x}px`,top:`${-x/2}px`,backgroundColor:Qs};return p.jsx("div",{className:"pointer-events-none absolute z-[4]","data-testid":`snap-guide-${m.orientation}`,"data-variant":m.variant,style:T,children:m.variant==="spacing"?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:w?{...C,top:"0"}:{...C,left:"0"}}),p.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:w?{...C,bottom:"0"}:{...C,right:"0"}})]}):null},`${m.orientation}-${m.start.x}-${m.start.y}-${m.end.x}-${m.end.y}-${m.variant}-${h}`)}),p.jsx("button",{type:"button",className:`${d} cursor-alias`,"data-testid":"block-rotate-handle","aria-label":"Rotate selected element",style:{left:`${i.x}px`,top:`${i.y}px`},onMouseDown:u}),o.map(m=>p.jsx("button",{type:"button",className:`${d} cursor-nwse-resize`,"data-testid":`block-resize-handle-${m.corner}`,"aria-label":`Resize selected element from ${m.corner}`,style:{left:`${m.x}px`,top:`${m.y}px`},onMouseDown:h=>{s(m.corner,h)}},m.corner))]})}function nO({selectionCommandAvailability:n,onAlignToSlide:r,onDelete:o,onDistribute:i,onDuplicate:s,onGroup:u,onLayerOrder:d,onUngroup:m}){return p.jsxs(q1,{"aria-label":"Selection actions",children:[p.jsxs(wt,{disabled:!n.group,onSelect:u,children:[p.jsx(cc,{className:"size-3.5"}),"Group"]}),p.jsxs(wt,{disabled:!n.ungroup,onSelect:m,children:[p.jsx(Sm,{className:"size-3.5"}),"Ungroup"]}),p.jsx(Sc,{}),p.jsxs(Sd,{children:[p.jsxs(wd,{children:[p.jsx(Pd,{className:"size-3.5"}),"Layer"]}),p.jsxs(Ed,{children:[p.jsxs(wt,{onSelect:()=>d("front"),children:[p.jsx(Pd,{className:"size-3.5"}),"Bring to front"]}),p.jsxs(wt,{onSelect:()=>d("forward"),children:[p.jsx(bm,{className:"size-3.5"}),"Bring forward"]}),p.jsxs(wt,{onSelect:()=>d("backward"),children:[p.jsx(hi,{className:"size-3.5"}),"Send backward"]}),p.jsxs(wt,{onSelect:()=>d("back"),children:[p.jsx(Gv,{className:"size-3.5"}),"Send to back"]})]})]}),p.jsxs(Sd,{children:[p.jsxs(wd,{children:[p.jsx(Id,{className:"size-3.5"}),"Align"]}),p.jsxs(Ed,{children:[p.jsxs(wt,{onSelect:()=>r("left"),children:[p.jsx(Pv,{className:"size-3.5"}),"Align left"]}),p.jsxs(wt,{onSelect:()=>r("hcenter"),children:[p.jsx(Id,{className:"size-3.5"}),"Align horizontal center"]}),p.jsxs(wt,{onSelect:()=>r("right"),children:[p.jsx(Uv,{className:"size-3.5"}),"Align right"]}),p.jsxs(wt,{onSelect:()=>r("top"),children:[p.jsx($v,{className:"size-3.5"}),"Align top"]}),p.jsxs(wt,{onSelect:()=>r("vcenter"),children:[p.jsx(Bv,{className:"size-3.5"}),"Align vertical center"]}),p.jsxs(wt,{onSelect:()=>r("bottom"),children:[p.jsx(Iv,{className:"size-3.5"}),"Align bottom"]})]})]}),p.jsxs(Sd,{children:[p.jsxs(wd,{children:[p.jsx($d,{className:"size-3.5"}),"Distribute"]}),p.jsxs(Ed,{children:[p.jsxs(wt,{onSelect:()=>i("horizontal"),children:[p.jsx($d,{className:"size-3.5"}),"Horizontally"]}),p.jsxs(wt,{onSelect:()=>i("vertical"),children:[p.jsx(uc,{className:"size-3.5"}),"Vertically"]})]})]}),p.jsx(Sc,{}),p.jsxs(wt,{onSelect:s,children:[p.jsx(qv,{className:"size-3.5"}),"Duplicate",p.jsx(G0,{children:"⌘D"})]}),p.jsxs(wt,{variant:"destructive",onSelect:o,children:[p.jsx(Kv,{className:"size-3.5"}),"Delete",p.jsx(G0,{children:"Del"})]})]})}const Zm=[{label:"Inter",value:'"Inter", "IBM Plex Sans", "Segoe UI", sans-serif'},{label:"Aptos",value:'"Aptos", "Segoe UI", Arial, sans-serif'},{label:"Avenir Next",value:'"Avenir Next", "Montserrat", "Segoe UI", sans-serif'},{label:"Optima",value:'"Optima", "Candara", "Segoe UI", sans-serif'},{label:"Arial Narrow",value:'"Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif'},{label:"Georgia",value:'Georgia, "Times New Roman", serif'},{label:"Times New Roman",value:'"Times New Roman", Times, serif'},{label:"Didot",value:'"Didot", "Bodoni 72", Georgia, serif'},{label:"SF Mono",value:'"SFMono-Regular", Menlo, Consolas, monospace'},{label:"IBM Plex Mono",value:'"IBM Plex Mono", "SFMono-Regular", Consolas, monospace'},{label:"System UI",value:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},{label:"Nunito",value:'"Nunito", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif'}];function aO(n){return`${Math.round(n*100)/100}px`}function rO(n){const r=sO(n);return r?r.label:sm(n)||"Font"}function V1(n,r){const o=X0(n),i=X0(r);return!o||!i?!1:o===i||F0(sm(n))===F0(sm(r))}function oO(n){const r=n.trim().toLowerCase();if(r==="bold"||r==="bolder")return!0;const o=Number.parseInt(r,10);return Number.isFinite(o)&&o>=600}function im(n){const r=new Set,o=n.toLowerCase();if(!o||o==="none")return r;for(const i of o.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&r.add(i);return r}function lO(n){return iO(n)?n.trim():cO(n)??"#000000"}function iO(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function sO(n){return Zm.find(r=>V1(n,r.value))}function sm(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function X0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function F0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Cd(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function cO(n){const r=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return r?`#${Cd(r[1]||"0")}${Cd(r[2]||"0")}${Cd(r[3]||"0")}`:null}function X1({feature:n,inspectedStyles:r,attributeValues:o}){var s,u;if(n.target==="attribute")return n.id==="other-link"?o.linkUrl:n.id==="other-alt-text"?o.altText:n.id==="other-aria-label"?o.ariaLabel:n.attributeName==="data-editor-locked"?o.locked:n.attributeName==="alt"?o.altText:n.attributeName==="aria-label"?o.ariaLabel:n.attributeName==="data-link-url"?o.linkUrl:"";if(!n.propertyName)return"";const i=fO(r,n.propertyName);return n.id==="font-family"?((u=(s=n.options)==null?void 0:s.find(d=>V1(i,d.value)))==null?void 0:u.value)??i:n.id==="font-size"&&i.endsWith("px")?i.slice(0,-2):n.id==="line-height"||n.id==="opacity"?i||(n.id==="opacity"?"1":""):n.id==="rotation"?String(Kn(i).rotate):n.controlType==="color"?lO(i):n.id==="text-align"&&i==="start"?"left":i}function K0(n,r){if(n.id==="font-size"&&r.trim()){const o=Number.parseFloat(r);return`${Math.min(200,Math.max(8,Number.isFinite(o)?o:8))}px`}return(n.id==="width"||n.id==="height")&&r?dO(n.id,r):n.id==="font-bold"?r?"700":"400":n.id==="font-italic"?r?"italic":"normal":n.id==="font-underline"?r?"underline":"none":n.id==="font-strikethrough"?r?"line-through":"none":n.id==="locked"?r?"true":"":r.trim()}function Q0(n,r,o){const i=im(n);return o?i.delete(r):i.add(r),i.size?Array.from(i).join(" "):"none"}function uO(n,r){return n.id==="font-bold"?oO(r):n.id==="font-italic"?r.trim().toLowerCase()==="italic":n.id==="font-underline"?im(r).has("underline"):n.id==="font-strikethrough"?im(r).has("line-through"):n.id==="locked"?r==="true":!!r}function fO(n,r){var o;return((o=n.find(i=>i.name===r))==null?void 0:o.value)??""}function dO(n,r){if(r==="auto")return"";const o=n==="width"?xr:Sr,i=mO(r);return aO(o*i)}function mO(n){return n==="compact"?.18:n==="wide"?.42:n==="full"?.82:.42}function hO({attributeValues:n,feature:r,inspectedStyles:o,nextValue:i,onAlignToSlide:s,onAttributeChange:u,onLayerOrder:d,onStyleChange:m}){if(r.target==="style"&&r.propertyName){const h=X1({feature:r,inspectedStyles:o,attributeValues:n});if(r.id==="rotation"){const g=pO(o),x=Kn(g),y=Number.parseFloat(i);m(r.propertyName,La(x.translateX,x.translateY,Number.isFinite(y)?y:0)??"");return}if(r.id==="font-underline"){m(r.propertyName,Q0(h,"underline",i===""));return}if(r.id==="font-strikethrough"){m(r.propertyName,Q0(h,"line-through",i===""));return}m(r.propertyName,K0(r,i));return}if(r.target==="attribute"&&r.attributeName){u(r.attributeName,K0(r,i));return}if(r.id==="other-link"){u("data-link-url",i.trim());return}if(r.id==="other-alt-text"){u("alt",i.trim());return}if(r.id==="other-aria-label"){u("aria-label",i.trim());return}r.id==="align-to-slide"&&s(i),r.id==="layer-order"&&d(i)}function pO(n){var r;return((r=n.find(o=>o.name==="transform"))==null?void 0:r.value)??""}const F1=[{value:"left",label:"Left",icon:tT},{value:"center",label:"Center",icon:qd},{value:"right",label:"Right",icon:JC}],K1=[{value:"left",icon:Pv,label:"Align left"},{value:"hcenter",icon:Id,label:"Align horizontal center"},{value:"right",icon:Uv,label:"Align right"},{value:"top",icon:$v,label:"Align top"},{value:"vcenter",icon:Bv,label:"Align vertical center"},{value:"bottom",icon:Iv,label:"Align bottom"}],Q1=[{value:"front",icon:Pd,label:"Bring to front"},{value:"forward",icon:bm,label:"Bring forward"},{value:"backward",icon:hi,label:"Send backward"},{value:"back",icon:Gv,label:"Send to back"}],Z1=[{value:"horizontal",icon:$d,label:"Distribute horizontally"},{value:"vertical",icon:uc,label:"Distribute vertically"}],gO=[{value:"decrease",icon:DC,label:"Decrease font size"},{value:"increase",icon:ii,label:"Increase font size"}],W1=[{value:"1",label:"Tight",description:"Compact text blocks"},{value:"1.2",label:"Normal",description:"Balanced paragraph spacing"},{value:"1.45",label:"Relaxed",description:"Readable body copy"},{value:"1.7",label:"Airy",description:"Open editorial spacing"}],Z0=[{value:"compact",label:"Compact",description:"Small supporting element"},{value:"wide",label:"Wide",description:"Primary text or media area"},{value:"full",label:"Full width",description:"Span most of the slide"},{value:"auto",label:"Auto fit",description:"Let content define the size"}],yO=[{value:"1",label:"100%"},{value:"0.75",label:"75%"},{value:"0.5",label:"50%"},{value:"0.25",label:"25%"}],vO=[{value:"-15",label:"-15"},{value:"0",label:"0"},{value:"15",label:"15"},{value:"45",label:"45"}],J1=[{value:"none",label:"None"},{value:"1px solid rgba(15, 23, 42, 0.16)",label:"Hairline"},{value:"2px solid rgba(15, 23, 42, 0.22)",label:"Strong"},{value:"1px dashed rgba(15, 23, 42, 0.3)",label:"Dashed"}],eS=[{value:"0px",label:"Sharp"},{value:"8px",label:"Soft"},{value:"18px",label:"Round"},{value:"999px",label:"Pill"}],tS=[{value:"none",label:"None"},{value:"0 8px 22px rgba(15, 23, 42, 0.12)",label:"Soft"},{value:"0 18px 42px rgba(15, 23, 42, 0.18)",label:"Lifted"},{value:"0 28px 70px rgba(15, 23, 42, 0.24)",label:"Dramatic"}],bO=[{id:"typography",label:"Typography",icon:Vd,subgroups:[{id:"font",label:"Font",icon:Vd,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:Zm.map(n=>({label:n.label,value:n.value}))},{id:"font-size",label:"Font size",controlType:"action-group",target:"style",propertyName:"font-size",options:gO,min:8,max:200,step:2,unit:"px"},{id:"font-bold",label:"Bold",controlType:"toggle",target:"style",propertyName:"font-weight"},{id:"font-italic",label:"Italic",controlType:"toggle",target:"style",propertyName:"font-style"},{id:"font-underline",label:"Underline",controlType:"toggle",target:"style",propertyName:"text-decoration-line"},{id:"font-strikethrough",label:"Strikethrough",controlType:"toggle",target:"style",propertyName:"text-decoration-line"}]},{id:"paragraph",label:"Paragraph",icon:UC,features:[{id:"line-height",label:"Line height",controlType:"action-group",target:"style",propertyName:"line-height",options:W1},{id:"text-align",label:"Text align",controlType:"action-group",target:"style",propertyName:"text-align",options:F1}]}]},{id:"appearance",label:"Appearance",icon:Yd,subgroups:[{id:"fill",label:"Fill",icon:Yd,features:[{id:"text-color",label:"Text color",controlType:"color",target:"style",propertyName:"color"},{id:"background-color",label:"Background color",controlType:"color",target:"style",propertyName:"background-color"}]},{id:"border",label:"Border",icon:ZE,features:[{id:"border",label:"Border",controlType:"action-group",target:"style",propertyName:"border",options:J1},{id:"border-radius",label:"Border radius",controlType:"action-group",target:"style",propertyName:"border-radius",options:eS},{id:"box-shadow",label:"Shadow",controlType:"action-group",target:"style",propertyName:"box-shadow",options:tS}]}]},{id:"layout",label:"Layout",icon:fc,subgroups:[{id:"size",label:"Size",icon:fc,features:[{id:"width",label:"Width",controlType:"action-group",target:"style",propertyName:"width",options:Z0},{id:"height",label:"Height",controlType:"action-group",target:"style",propertyName:"height",options:Z0}]},{id:"visibility",label:"Visibility",icon:Vv,features:[{id:"opacity",label:"Opacity",controlType:"action-group",target:"style",propertyName:"opacity",options:yO}]},{id:"rotation",label:"Rotation",icon:VC,features:[{id:"rotation",label:"Rotation",controlType:"action-group",target:"style",propertyName:"transform",options:vO,min:-360,max:360,step:15,unit:"deg"}]},{id:"layer-alignment",label:"Layer, Align, Distribute",icon:xm,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:K1},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:Q1},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:Z1}]},{id:"grouping",label:"Group",icon:cc,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:cc,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:Sm,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:Gd,subgroups:[{id:"state",label:"State",icon:Gd,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:Fv,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:li,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:li,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:li,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]}]}],xO=200,SO="motion-safe:duration-200 motion-safe:ease-out",wO="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",EO="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none",CO=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],TO=["linear-gradient(135deg,#a855f7,#ec4899)","linear-gradient(135deg,#06b6d4,#8b5cf6)","linear-gradient(135deg,#f59e0b,#ec4899)","linear-gradient(135deg,#10b981,#06b6d4)","linear-gradient(135deg,#f97316,#ef4444)","linear-gradient(135deg,#8b5cf6,#3b82f6)"];function AO({ariaLabelPrefix:n,value:r,includeGradients:o=!0,includeOpacity:i=!0,onChange:s,onCommit:u}){const d=v.useRef(null),m=v.useRef(null),h=v.useMemo(()=>MO(r),[r]),g=v.useMemo(()=>NO(h.hex),[h.hex]),x=Ad(g),[y,w]=v.useState(x.replace("#","")),[T,C]=v.useState("#06B6D4"),[A,M]=v.useState("#8B5CF6"),[R,z]=v.useState(135),H=`hsl(${g.h}, 100%, 50%)`;v.useEffect(()=>{w(x.replace("#",""))},[x]);function Y(k,K=h.alpha){s(Td(k,K))}function J(k){const K=Number.parseInt(k.target.value,10)/100;Y(x,K)}function $(k){var q;const K=(q=d.current)==null?void 0:q.getBoundingClientRect();if(!K)return;k.currentTarget.setPointerCapture(k.pointerId);const ie=si((k.clientX-K.left)/K.width,0,1),se=si(1-(k.clientY-K.top)/K.height,0,1);Y(Ad({...g,s:ie,v:se}))}function V(k){var se;const K=(se=m.current)==null?void 0:se.getBoundingClientRect();if(!K)return;k.currentTarget.setPointerCapture(k.pointerId);const ie=Math.round(si((k.clientX-K.left)/K.width,0,1)*360);Y(Ad({...g,h:ie===360?0:ie}))}return p.jsxs("div",{className:"grid gap-3",children:[p.jsx("div",{className:"relative h-36 w-full touch-none select-none overflow-hidden rounded-xl border-0 before:pointer-events-none before:absolute before:inset-0 before:bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:d,role:"slider","aria-label":"Color saturation and brightness","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(g.v*100),"aria-valuetext":Td(x,h.alpha),tabIndex:0,style:{backgroundColor:H},onPointerDown:$,onPointerMove:k=>{k.buttons===1&&$(k)},children:p.jsx("span",{className:"pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.22)]","aria-hidden":"true",style:{color:x,left:`calc(${g.s*100}% + ${(.5-g.s)*22}px)`,top:`calc(${(1-g.v)*100}% + ${(g.v-.5)*22}px)`}})}),p.jsx("div",{className:"relative h-3 touch-none select-none rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:m,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":g.h,tabIndex:0,onPointerDown:V,onPointerMove:k=>{k.buttons===1&&V(k)},children:p.jsx("span",{className:"pointer-events-none absolute -top-0.5 size-4 -translate-x-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.2)]","aria-hidden":"true",style:{color:H,left:`${g.h/360*100}%`}})}),p.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[p.jsx("span",{className:"size-10 rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)]",style:{background:Td(x,h.alpha)},"aria-hidden":"true"}),p.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),p.jsx(el,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:y,spellCheck:!1,onChange:k=>{const K=k.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);w(K),K.length===6&&Y(`#${K}`)},onBlur:()=>{w(x.replace("#",""))}})]}),i?p.jsxs("section",{className:"grid gap-1.5","aria-label":"Opacity",children:[p.jsxs("div",{className:"flex items-center justify-between text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:[p.jsx("span",{children:"Opacity"}),p.jsxs("span",{children:[Math.round(h.alpha*100),"%"]})]}),p.jsx("input",{type:"range",min:0,max:100,value:Math.round(h.alpha*100),"aria-label":"Opacity",onChange:J,className:"h-2 w-full cursor-pointer appearance-none rounded-full bg-foreground/10 accent-foreground"})]}):null,p.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),p.jsx("div",{className:"grid grid-cols-12 gap-1",children:CO.map(k=>p.jsx("button",{className:Pe("aspect-square min-w-0 cursor-pointer rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)] transition-[box-shadow,outline-color,border-color] duration-150 hover:border-foreground/25 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",k.toLowerCase()===r.toLowerCase()&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:k},"aria-label":n?`Use ${n} ${k}`:`Use ${k}`,onClick:()=>{Y(k),u==null||u()}},k))})]}),o?p.jsxs("section",{className:"grid gap-2","aria-label":"Preset gradients",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),p.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:TO.map((k,K)=>p.jsx("button",{className:Pe("h-8 cursor-pointer rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)] transition-[box-shadow,outline-color,border-color] duration-150 hover:border-foreground/25 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",k===r&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:k},"aria-label":n?`Use ${n} gradient ${K+1}`:`Use gradient ${K+1}`,onClick:()=>{s(k),u==null||u()}},k))}),p.jsxs("div",{className:"grid gap-2 rounded-md bg-foreground/[0.03] p-2",children:[p.jsx("div",{className:"h-8 rounded-md border border-foreground/10",style:{background:W0(R,T,A)},"aria-hidden":"true"}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsx(el,{className:"h-8 rounded-md bg-white px-2 font-mono text-xs uppercase","aria-label":"Gradient start",value:T.replace("#",""),onChange:k=>C(`#${k.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6)}`),onBlur:()=>C(ol(T))}),p.jsx(el,{className:"h-8 rounded-md bg-white px-2 font-mono text-xs uppercase","aria-label":"Gradient end",value:A.replace("#",""),onChange:k=>M(`#${k.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6)}`),onBlur:()=>M(ol(A))})]}),p.jsxs("div",{className:"grid gap-1",children:[p.jsxs("div",{className:"flex items-center justify-between text-[10px] font-medium uppercase tracking-wider text-foreground/40",children:[p.jsx("span",{children:"Angle"}),p.jsxs("span",{children:[R,"deg"]})]}),p.jsx("input",{type:"range",min:0,max:360,value:R,"aria-label":"Gradient angle",onChange:k=>z(Number.parseInt(k.target.value,10)),className:"h-2 w-full cursor-pointer appearance-none rounded-full bg-foreground/10 accent-foreground"})]}),p.jsx(Vt,{type:"button",variant:"outline",size:"sm",onClick:()=>{s(W0(R,T,A)),u==null||u()},children:"Apply gradient"})]})]}):null]})}function si(n,r,o){return Math.min(Math.max(n,r),o)}function MO(n){const r=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+([\d.]+))?\s*\)$/i);return r?{alpha:si(Number.parseFloat(r[4]??"1"),0,1),hex:`#${_d(r[1]||"0")}${_d(r[2]||"0")}${_d(r[3]||"0")}`}:{alpha:1,hex:_O(n)?n.trim():"#0F172A"}}function Td(n,r){if(r>=.995)return n.toUpperCase();const o=ol(n).replace("#",""),i=Number.parseInt(o.slice(0,2),16),s=Number.parseInt(o.slice(2,4),16),u=Number.parseInt(o.slice(4,6),16);return`rgba(${i}, ${s}, ${u}, ${Math.round(r*100)/100})`}function W0(n,r,o){return`linear-gradient(${n}deg, ${ol(r)}, ${ol(o)})`}function _O(n){return/^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function ol(n){const r=n.trim().replace("#","");return r.length===3?`#${r.split("").map(o=>o+o).join("")}`.toUpperCase():r.length===6?`#${r}`.toUpperCase():"#0F172A"}function NO(n){const r={h:220,s:.54,v:.5},o=/^#?([0-9a-f]{6})$/i.exec(ol(n));if(!o)return r;const i=o[1],s=Number.parseInt(i.slice(0,2),16)/255,u=Number.parseInt(i.slice(2,4),16)/255,d=Number.parseInt(i.slice(4,6),16)/255,m=Math.max(s,u,d),h=Math.min(s,u,d),g=m-h;let x=0;g!==0&&(m===s?x=(u-d)/g%6:m===u?x=(d-s)/g+2:x=(s-u)/g+4);const y=Math.round(x*60);return{h:y<0?y+360:y,s:m===0?0:g/m,v:m}}function Ad({h:n,s:r,v:o}){const i=o*r,s=i*(1-Math.abs(n/60%2-1)),u=o-i;let d=0,m=0,h=0;return n<60?(d=i,m=s):n<120?(d=s,m=i):n<180?(m=i,h=s):n<240?(m=s,h=i):n<300?(d=s,h=i):(d=i,h=s),`#${Md(d+u)}${Md(m+u)}${Md(h+u)}`.toUpperCase()}function Md(n){return Math.round(si(n,0,1)*255).toString(16).padStart(2,"0")}function _d(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function RO({className:n,orientation:r="horizontal",decorative:o=!0,...i}){return p.jsx(R5,{"data-slot":"separator",decorative:o,orientation:r,className:Pe("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),...i})}function Zs({children:n,active:r=!1,className:o,label:i,onClick:s}){return p.jsx(Vt,{variant:r?"secondary":"ghost",size:"icon-sm",className:Pe("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",r&&"bg-foreground/[0.06] text-foreground",o),type:"button","aria-label":i,title:i,onClick:s,children:n})}function OO(n,r){return Math.abs(n-r)>=.5}function eo(){return p.jsx(RO,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function DO({icon:n}){return p.jsx(n,{className:"size-3.5"})}function jO({...n}){return p.jsx(zM,{"data-slot":"dialog",...n})}function zO({...n}){return p.jsx(kM,{"data-slot":"dialog-portal",...n})}function kO({className:n,...r}){return p.jsx(LM,{"data-slot":"dialog-overlay",className:Pe("fixed inset-0 z-50 bg-black/20 backdrop-blur-[1px]",n),...r})}function LO({children:n,className:r,...o}){return p.jsxs(zO,{children:[p.jsx(kO,{}),p.jsxs(HM,{"data-slot":"dialog-content",className:Pe("fixed left-1/2 top-1/2 z-50 grid w-[min(420px,calc(100vw-32px))] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-md border border-foreground/[0.08] bg-white p-4 shadow-[0_20px_70px_rgba(15,23,42,0.18)] outline-none",r),...o,children:[n,p.jsxs(IM,{className:"absolute right-3 top-3 inline-flex size-7 items-center justify-center rounded-md text-foreground/45 hover:bg-foreground/[0.05] hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[p.jsx(wm,{className:"size-3.5"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function HO({className:n,...r}){return p.jsx("div",{className:Pe("grid gap-1 pr-8",n),...r})}function BO({className:n,...r}){return p.jsx(BM,{"data-slot":"dialog-title",className:Pe("text-sm font-semibold text-foreground",n),...r})}function UO({className:n,...r}){return p.jsx(UM,{"data-slot":"dialog-description",className:Pe("text-xs leading-normal text-foreground/55",n),...r})}function IO({className:n,...r}){return p.jsx("div",{className:Pe("flex justify-end gap-2",n),...r})}function Nd({...n}){return p.jsx($R,{"data-slot":"popover",...n})}function Rd({...n}){return p.jsx(GR,{"data-slot":"popover-trigger",...n})}function Od({className:n,align:r="center",sideOffset:o=4,...i}){return p.jsx(YR,{children:p.jsx(qR,{"data-slot":"popover-content",align:r,sideOffset:o,className:Pe("z-50 w-72 rounded-xl border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...i})})}function PO({...n}){return p.jsx(h5,{"data-slot":"select",...n})}function $O({...n}){return p.jsx(S5,{"data-slot":"select-group",...n})}function GO({...n}){return p.jsx(g5,{"data-slot":"select-value",...n})}function YO({className:n,size:r="default",children:o,...i}){return p.jsxs(p5,{"data-slot":"select-trigger","data-size":r,className:Pe("flex w-fit items-center justify-between gap-2 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-sm whitespace-nowrap shadow-none transition-colors outline-none hover:bg-foreground/[0.05] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-foreground/35 data-[size=default]:h-8 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/45",n),...i,children:[o,p.jsx(y5,{asChild:!0,children:p.jsx(hi,{className:"size-4 opacity-50"})})]})}function qO({className:n,children:r,position:o="item-aligned",align:i="center",...s}){return p.jsx(v5,{children:p.jsxs(b5,{"data-slot":"select-content",className:Pe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-xl border border-foreground/[0.08] bg-white text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:o,align:i,...s,children:[p.jsx(XO,{}),p.jsx(x5,{className:Pe("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),p.jsx(FO,{})]})})}function VO({className:n,children:r,...o}){return p.jsxs(w5,{"data-slot":"select-item",className:Pe("relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-[13px] text-foreground/70 outline-hidden select-none focus:bg-foreground/[0.04] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...o,children:[p.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(C5,{children:p.jsx(Yv,{className:"size-4"})})}),p.jsx(E5,{children:r})]})}function XO({className:n,...r}){return p.jsx(T5,{"data-slot":"select-scroll-up-button",className:Pe("flex cursor-default items-center justify-center py-1",n),...r,children:p.jsx(bm,{className:"size-4"})})}function FO({className:n,...r}){return p.jsx(A5,{"data-slot":"select-scroll-down-button",className:Pe("flex cursor-default items-center justify-center py-1",n),...r,children:p.jsx(hi,{className:"size-4"})})}function nS({className:n,...r}){return p.jsx("textarea",{"data-slot":"textarea",className:Pe("flex field-sizing-content min-h-16 w-full rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 py-2 text-sm shadow-none transition-colors outline-none placeholder:text-foreground/35 hover:bg-foreground/[0.04] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20",n),...r})}const KO=new Map(bO.flatMap(n=>n.subgroups.flatMap(r=>r.features.map(o=>[o.id,o])))),QO={"other-aria-label":{id:"other-aria-label",label:"ARIA label",controlType:"text",target:"operation"},"other-alt-text":{id:"other-alt-text",label:"Alt text",controlType:"text",target:"operation"},"other-link":{id:"other-link",label:"Link",controlType:"text",target:"operation"}};function ZO({inspectedStyles:n,selectedElementType:r,selectionCommandAvailability:o,attributeValues:i,onStyleChange:s,onAttributeChange:u,onAlignToSlide:d,onDistribute:m,onGroup:h,onLayerOrder:g,onUngroup:x}){const y=v.useRef(null),[w,T]=v.useState(0),C=v.useRef(0),[A,M]=v.useState(null),[R,z]=v.useState(null),H=r==="multi",Y=H||o.ungroup;v.useEffect(()=>{if(y.current)return()=>{const D=y.current,O=D==null?void 0:D.closest('[data-testid="stage-panel"]');if(!(D instanceof HTMLElement)||!(O instanceof HTMLElement))return;const I=D.getBoundingClientRect(),N=O.getBoundingClientRect(),j=D.cloneNode(!0);j instanceof HTMLElement&&(j.className=Pe(j.className,"absolute z-40 m-0 pointer-events-none"),j.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),j.className=Pe(j.className,EO),j.setAttribute("aria-hidden","true"),j.style.left=`${I.left-N.left}px`,j.style.top=`${I.top-N.top}px`,j.style.width=`${I.width}px`,j.style.height=`${I.height}px`,O.appendChild(j),j.addEventListener("animationend",()=>j.remove()),window.setTimeout(()=>j.remove(),xO+50))}},[]),v.useLayoutEffect(()=>{const _=y.current;if(!_)return;const D=_.getBoundingClientRect(),O=D.left-C.current,I=D.right-C.current,N=16;let j=0;O<N&&(j=N-O),I+j>window.innerWidth-N&&(j+=window.innerWidth-N-(I+j)),OO(C.current,j)&&(C.current=j,T(j))},[]),v.useEffect(()=>{function _(D){var I;const O=D.target;(I=y.current)!=null&&I.contains(D.target)||O instanceof Element&&O.closest('[data-slot="select-content"]')||z(null)}return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),v.useEffect(()=>{function _(D){D.key==="Escape"&&z(null)}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[]);function J(_,D){if(_.id==="distribute"){m(D);return}if(_.id==="group"){h();return}if(_.id==="ungroup"){x();return}if(_.id==="other-link"){u("data-link-url",D.trim());return}if(_.id==="other-alt-text"){u("alt",D.trim());return}if(_.id==="other-aria-label"){u("aria-label",D.trim());return}if(_.id==="background-color"&&D.startsWith("linear-gradient")){s("background-image",D);return}hO({attributeValues:i,feature:_,inspectedStyles:n,nextValue:D,onAlignToSlide:d,onAttributeChange:u,onLayerOrder:g,onStyleChange:s})}return p.jsxs("div",{className:Pe("relative grid w-max min-w-max max-w-[min(1120px,calc(100vw-280px))] gap-2 text-foreground pointer-events-auto max-[1200px]:w-full max-[1200px]:min-w-0",SO,wO),ref:y,style:{marginLeft:w},children:[p.jsxs("div",{className:"flex w-max items-center gap-0.5 overflow-x-auto overflow-y-hidden rounded-md border border-foreground/[0.08] bg-white px-1.5 py-1.5 shadow-[0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:min-w-[1120px]","aria-label":"Full editing toolbar",children:[$(),p.jsx(eo,{}),V(),p.jsx(eo,{}),k(),p.jsx(eo,{}),K(),p.jsx(eo,{}),ie(),H?p.jsxs(p.Fragment,{children:[p.jsx(eo,{}),se()]}):null,Y?p.jsxs(p.Fragment,{children:[p.jsx(eo,{}),q()]}):null,p.jsx(eo,{}),ue()]}),p.jsx(WO,{attributeValues:i,dialogId:A,onCommitFeature:J,onOpenChange:_=>{_||M(null)}})]});function $(){const _=Tt("font-family"),D=Tt("font-size"),O=S(_),I=Number.parseFloat(S(D))||32;return p.jsxs(pr,{children:[p.jsxs(PO,{value:O||"__empty__",onValueChange:N=>J(_,N==="__empty__"?"":N),children:[p.jsxs(YO,{"aria-label":"Font",size:"sm",className:"h-8 w-[150px] rounded-md border-transparent bg-foreground/[0.03] px-2 text-xs shadow-none hover:bg-foreground/[0.06]","data-value":O,children:[p.jsx(Vd,{className:"size-3.5 text-foreground/45"}),p.jsx(GO,{placeholder:rO(O)})]}),p.jsx(qO,{children:p.jsx($O,{children:Zm.map(N=>p.jsx(VO,{value:N.value,"data-value":N.value,style:{fontFamily:N.value},children:N.label},N.value))})})]}),p.jsxs("div",{className:"flex items-center rounded-md border border-foreground/[0.08] bg-white",children:[p.jsx(Zs,{className:"h-8 w-7 rounded-r-none border-0",label:"Decrease font size",onClick:()=>J(D,String(ev(I-2,8,200))),children:p.jsx(t3,{})}),p.jsx("span",{className:"h-8 min-w-9 border-x border-foreground/[0.08] px-2 py-2 text-center text-[12px] font-medium leading-none tabular-nums text-foreground/70",children:I}),p.jsx(Zs,{className:"h-8 w-7 rounded-l-none border-0",label:"Increase font size",onClick:()=>J(D,String(ev(I+2,8,200))),children:p.jsx(ii,{className:"size-3.5"})})]})]})}function V(){return p.jsx(pr,{children:[{feature:Tt("font-bold"),icon:KE},{feature:Tt("font-italic"),icon:TC},{feature:Tt("font-underline"),icon:oT},{feature:Tt("font-strikethrough"),icon:QC}].map(({feature:_,icon:D})=>{const O=uO(_,S(_));return p.jsx(Zs,{label:_.label,active:O,onClick:()=>J(_,O?"":"true"),children:p.jsx(D,{className:"size-3.5"})},_.id)})})}function k(){return p.jsxs(pr,{children:[de({feature:Tt("text-color"),icon:p.jsx(Yd,{className:"size-3.5"}),includeGradients:!0,label:"Text color",popoverId:"text-color"}),de({feature:Tt("background-color"),icon:p.jsx(fc,{className:"size-3.5"}),includeGradients:!0,label:"Background color",popoverId:"background-color"})]})}function K(){return p.jsxs(pr,{children:[he({custom:p.jsx(J0,{feature:Tt("line-height"),label:"Custom line height",onCommitFeature:J}),feature:Tt("line-height"),icon:p.jsx(uc,{className:"size-3.5"}),label:"Line height",options:W1,popoverId:"line-height"}),he({feature:Tt("text-align"),icon:p.jsx(qd,{className:"size-3.5"}),label:"Text align",options:F1,popoverId:"text-align"})]})}function ie(){return p.jsxs(pr,{children:[he({feature:Tt("border"),icon:p.jsx(oC,{className:"size-3.5"}),label:"Border style",options:J1,popoverId:"border"}),he({custom:p.jsx(J0,{feature:Tt("border-radius"),label:"Custom radius",onCommitFeature:J,unit:"px"}),feature:Tt("border-radius"),icon:p.jsx(iC,{className:"size-3.5"}),label:"Border radius",options:eS,popoverId:"border-radius"}),he({custom:p.jsx(JO,{feature:Tt("box-shadow"),label:"Custom shadow",onCommitFeature:J}),feature:Tt("box-shadow"),icon:p.jsx(fc,{className:"size-3.5 drop-shadow"}),label:"Shadow",options:tS,popoverId:"box-shadow"})]})}function se(){return p.jsxs(pr,{children:[he({feature:Tt("align-to-slide"),icon:p.jsx(qd,{className:"size-3.5"}),label:"Align",options:K1,popoverId:"align"}),he({feature:Tt("layer-order"),icon:p.jsx(xm,{className:"size-3.5"}),label:"Layer",options:Q1,popoverId:"layer"}),he({feature:Tt("distribute"),icon:p.jsx(uc,{className:"size-3.5"}),label:"Distribute",options:Z1,popoverId:"distribute"})]})}function q(){const _=o.ungroup,D=Tt(_?"ungroup":"group");return p.jsx(pr,{children:p.jsx(Zs,{label:_?"Ungroup":"Group",onClick:()=>J(D,_?"ungroup":"group"),children:_?p.jsx(Sm,{className:"size-3.5"}):p.jsx(cc,{className:"size-3.5"})})})}function ue(){return p.jsx(pr,{children:p.jsxs(Nd,{open:R==="other",onOpenChange:_=>z(_?"other":null),children:[p.jsx(Rd,{asChild:!0,children:p.jsx(Vt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Other",title:"Other",className:"h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",children:p.jsx(pC,{className:"size-4"})})}),p.jsxs(Od,{align:"end",className:"w-56 p-1.5",children:[p.jsxs("button",{type:"button",className:ti,onClick:()=>{z(null),M("other-link")},children:[p.jsx(Fv,{className:"size-3.5"}),"Link"]}),p.jsxs("button",{type:"button",className:ti,onClick:()=>{z(null),M("other-alt-text")},children:[p.jsx(li,{className:"size-3.5"}),"Alt text"]}),p.jsxs("button",{type:"button",className:ti,onClick:()=>{z(null),M("other-aria-label")},children:[p.jsx(li,{className:"size-3.5"}),"ARIA label"]}),p.jsxs("button",{type:"button",className:ti,onClick:()=>{J(Tt("locked"),i.locked?"":"true"),z(null)},children:[p.jsx(Gd,{className:"size-3.5"}),i.locked?"Unlock":"Lock"]})]})]})})}function de({feature:_,icon:D,includeGradients:O,label:I,popoverId:N}){return p.jsxs(Nd,{open:R===N,onOpenChange:j=>z(j?N:null),children:[p.jsx(Rd,{asChild:!0,children:p.jsx(Vt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":I,title:I,className:"h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",children:D})}),p.jsx(Od,{className:"w-80 max-h-[calc(100vh-40px)] overflow-y-auto p-2",children:p.jsx(AO,{value:S(_),ariaLabelPrefix:I,includeGradients:O,onChange:j=>J(_,j),onCommit:()=>z(null)})})]})}function he({custom:_,feature:D,icon:O,label:I,options:N,popoverId:j}){const B=S(D);return p.jsxs(Nd,{open:R===j,onOpenChange:P=>z(P?j:null),children:[p.jsx(Rd,{asChild:!0,children:p.jsx(Vt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":I,title:I,className:"h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",children:O})}),p.jsxs(Od,{className:"w-64 p-1.5",children:[p.jsx("div",{className:"grid gap-1",children:N.map(P=>{const te=P.icon,ne=D.target==="operation"&&D.id==="distribute"&&!o.group;return p.jsxs("button",{type:"button",className:Pe(ti,B===P.value&&"bg-foreground/[0.06]"),disabled:ne,onClick:()=>{J(D,P.value),z(null)},children:[te?p.jsx(DO,{icon:te}):p.jsx(e3,{feature:D,option:P}),p.jsx("span",{className:"truncate",children:P.label})]},P.value)})}),_?p.jsx("div",{className:"mt-2 border-t border-foreground/[0.08] pt-2",children:_}):null]})]})}function S(_){return X1({attributeValues:i,feature:_,inspectedStyles:n})}}function WO({attributeValues:n,dialogId:r,onCommitFeature:o,onOpenChange:i}){const s=r?a3[r]:null,[u,d]=v.useState("");return v.useEffect(()=>{r&&d(n3(r,n))},[n,r]),p.jsx(jO,{open:!!r,onOpenChange:i,children:p.jsxs(LO,{children:[p.jsxs(HO,{children:[p.jsx(BO,{children:s==null?void 0:s.title}),p.jsx(UO,{children:s==null?void 0:s.description})]}),s!=null&&s.multiline?p.jsx(nS,{value:u,onChange:m=>d(m.target.value)}):p.jsx(el,{value:u,onChange:m=>d(m.target.value)}),p.jsxs(IO,{children:[p.jsx(Vt,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),p.jsx(Vt,{type:"button",onClick:()=>{r&&(o(QO[r],u),i(!1))},children:"Save"})]})]})})}function J0({feature:n,label:r,onCommitFeature:o,unit:i=""}){const[s,u]=v.useState(""),d=`floating-${n.id}-custom`;return p.jsxs("div",{className:"grid gap-1.5",children:[p.jsx("label",{className:"text-[10px] font-medium uppercase tracking-wider text-foreground/45",htmlFor:d,children:r}),p.jsxs("div",{className:"flex gap-1",children:[p.jsx(el,{className:"h-8 min-w-0",id:d,inputMode:"decimal",value:s,onChange:m=>u(m.target.value)}),p.jsx(Vt,{type:"button",variant:"outline",size:"sm",disabled:!s.trim(),onClick:()=>{o(n,`${s.trim()}${i}`),u("")},children:"Apply"})]})]})}function JO({feature:n,label:r,onCommitFeature:o}){const[i,s]=v.useState(""),u=`floating-${n.id}-custom`;return p.jsxs("div",{className:"grid gap-1.5",children:[p.jsx("label",{className:"text-[10px] font-medium uppercase tracking-wider text-foreground/45",htmlFor:u,children:r}),p.jsx(nS,{id:u,value:i,onChange:d=>s(d.target.value)}),p.jsx(Vt,{type:"button",variant:"outline",size:"sm",disabled:!i.trim(),onClick:()=>{o(n,i.trim()),s("")},children:"Apply"})]})}function pr({children:n}){return p.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:n})}function e3({feature:n,option:r}){return n.id==="border"?p.jsx("span",{className:"size-4 rounded bg-white",style:{border:r.value==="none"?"1px solid rgba(15,23,42,.12)":r.value}}):n.id==="border-radius"?p.jsx("span",{className:"size-4 border border-foreground/15 bg-foreground/[0.04]",style:{borderRadius:r.value}}):n.id==="box-shadow"?p.jsx("span",{className:"size-4 rounded border border-foreground/10 bg-white",style:{boxShadow:r.value==="none"?void 0:r.value}}):p.jsx("span",{className:"size-1.5 rounded-full bg-foreground/35"})}function Tt(n){const r=KO.get(n);if(!r)throw new Error(`Missing floating toolbar feature: ${n}`);return r}function t3(){return p.jsx("span",{className:"text-base leading-none",children:"-"})}function ev(n,r,o){return Math.min(o,Math.max(r,n))}function n3(n,r){return n==="other-link"?r.linkUrl:n==="other-alt-text"?r.altText:r.ariaLabel}const a3={"other-aria-label":{description:"Set the ARIA label used by assistive technologies.",title:"ARIA label"},"other-alt-text":{description:"Describe the selected visual element.",multiline:!0,title:"Alt text"},"other-link":{description:"Attach a URL to the selected element.",title:"Link"}},ti="flex min-h-8 w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground disabled:pointer-events-none disabled:opacity-40",tv={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function r3({slideWidth:n,slideHeight:r,offsetX:o,offsetY:i,scale:s,preselectionOverlay:u,selectionOverlay:d,toolbarKey:m,inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,groupScopeOverlayPassive:y,isEditingText:w,manipulationOverlay:T,attributeValues:C,iframeRef:A,stageViewportRef:M,selectionOverlayRef:R,selectionContextMenuTriggerRef:z,isManipulating:H,isToolbarSuppressed:Y,onSelectionOverlayMouseDown:J,onSelectionOverlayMouseUp:$,onSelectionOverlayMouseMove:V,onSelectionOverlayContextMenu:k,onStageMouseLeave:K,onResizeHandleMouseDown:ie,onRotateHandleMouseDown:se,onSelectionOverlayDoubleClick:q,onBackgroundClick:ue,onStageWheel:de,onStyleChange:he,onAttributeChange:S,onAlignToSlide:_,onDistribute:D,onGroup:O,onLayerOrder:I,onUngroup:N,onDuplicate:j,onDelete:B}){const P=(ne,ae)=>{ne===ae&&ue()},te=d?o3({selectionOverlay:d,offsetX:o,scale:s,slideWidth:n}):void 0;return p.jsxs("section",{className:"relative z-[5] min-h-0 min-w-0 flex-auto overflow-visible p-10 pb-6 max-[1200px]:px-5 max-[1200px]:py-4","data-testid":"stage-panel",ref:M,onClick:ne=>{P(ne.target,ne.currentTarget)},onKeyDown:ne=>{(ne.key==="Enter"||ne.key===" ")&&P(ne.target,ne.currentTarget)},onMouseLeave:K,onWheel:ne=>{de(ne.nativeEvent)},children:[d&&!H&&!Y&&!w?p.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:te,"data-testid":"floating-toolbar-anchor",children:p.jsx(ZO,{inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,attributeValues:C,onStyleChange:he,onAttributeChange:S,onAlignToSlide:_,onDistribute:D,onGroup:O,onLayerOrder:I,onUngroup:N},m)}):null,p.jsx("div",{className:"absolute origin-top-left overflow-hidden rounded-xl bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:max-w-full","data-testid":"stage-frame",style:{width:`${n}px`,height:`${r}px`,left:`${o}px`,top:`${i}px`,transform:`scale(${s})`},children:p.jsx("iframe",{ref:A,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!w&&!H?p.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...tv,left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`}}):null,w?null:p.jsxs(G1,{children:[p.jsx(Y1,{asChild:!0,children:p.jsx("span",{ref:z,"data-testid":"selection-context-menu-trigger",className:"pointer-events-none absolute size-0","aria-hidden":"true"})}),p.jsx(nO,{selectionCommandAvailability:x,onAlignToSlide:_,onDelete:B,onDistribute:D,onDuplicate:j,onGroup:O,onLayerOrder:I,onUngroup:N})]}),d&&!w?p.jsx("div",{ref:R,"data-testid":"selection-overlay",className:Pe("absolute z-[3] border border-dashed",y?"pointer-events-none":"pointer-events-auto"),style:{...tv,left:`${d.x}px`,top:`${d.y}px`,width:`${d.width}px`,height:`${d.height}px`},onMouseDown:J,onMouseMove:V,onMouseUp:$,onContextMenu:k,onDoubleClick:ne=>{q(ne)}}):null,T?p.jsx(tO,{selectionBounds:T.selectionBounds,snapGuides:T.snapGuides,resizeHandles:T.resizeHandles,rotationHandle:T.rotationHandle,onResizeHandleMouseDown:ie,onRotateHandleMouseDown:se}):null]})}function o3({selectionOverlay:n,offsetX:r,scale:o,slideWidth:i}){const u=r,d=r+i*o,m=Math.max((d-u)/2,0),h=Math.min(288,m),g=u+h,x=d-h,y=n.x+n.width/2;return{left:`${Math.min(Math.max(y,g),Math.max(g,x))}px`,top:n.y<84?`${n.y+n.height+18}px`:`${n.y-18}px`,transform:n.y<84?"translate(-50%, 0)":"translate(-50%, -100%)"}}function l3({delayDuration:n=0,...r}){return p.jsx(F5,{"data-slot":"tooltip-provider",delayDuration:n,...r})}function cm(n,r,o){return hE(n,r,o)}function ri(n,r,o){var u;if(typeof DOMParser>"u")return"";const s=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${be}="${r}"]`);return((u=s==null?void 0:s.getAttribute(o))==null?void 0:u.trim())??""}function i3({elementId:n,nextValue:r,propertyName:o,slide:i}){const s=cm(i,n,o),u=r.trim();return s===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:o,previousValue:s,nextValue:u,timestamp:Date.now()}}function s3({attributeName:n,elementId:r,nextValue:o,slide:i}){const s=ri(i,r,n),u=o.trim();return s===u?null:{type:"attribute.update",slideId:i.id,elementId:r,attributeName:n,previousValue:s,nextValue:u,timestamp:Date.now()}}function br(n){return Math.round(n*100)/100}function aS(n,r){var m;if(typeof DOMParser>"u")return n;const s=(m=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(s instanceof HTMLElement))return n;const u=Kn(s.style.transform),d=La(0,0,u.rotate);return s.style.position="absolute",s.style.left=`${br(r.x)}px`,s.style.top=`${br(r.y)}px`,s.style.width=`${br(r.width)}px`,s.style.height=`${br(r.height)}px`,s.style.margin="0px",s.style.boxSizing="border-box",d?s.style.transform=d:s.style.removeProperty("transform"),s.style.transformOrigin||(s.style.transformOrigin="center center"),s.outerHTML}function rS(n,r){return{x:n.left-r.left,y:n.top-r.top,width:n.width,height:n.height}}function c3(n,r,o){var d;const i=(d=n.current)==null?void 0:d.contentDocument,s=i==null?void 0:i.querySelector(r.rootSelector),u=s==null?void 0:s.getBoundingClientRect();return{width:(u==null?void 0:u.width)||o.width,height:(u==null?void 0:u.height)||o.height}}function um(n,r,o){return{x:br(n.x+r),y:br(n.y+o),width:n.width,height:n.height}}function u3(n){return n.length?n.reduce((r,o)=>{const i=Math.min(r.x,o.x),s=Math.min(r.y,o.y),u=Math.max(r.x+r.width,o.x+o.width),d=Math.max(r.y+r.height,o.y+o.height);return{x:i,y:s,width:u-i,height:d-s}}):null}function f3(n,r,o){const i=Math.max(0,o.width-n.width),s=Math.max(0,o.height-n.height),u=Math.min(i,Math.max(0,n.x+r)),d=Math.min(s,Math.max(0,n.y+r));return{x:br(u-n.x),y:br(d-n.y)}}function oS(n,r){const o=[];return r.vertical&&o.push(...nv(n,r.vertical,"vertical")),r.horizontal&&o.push(...nv(n,r.horizontal,"horizontal")),o}function nv(n,r,o){return r.target.kind==="spacing"?m3(n,r,o):[d3(n,r,o)]}function d3(n,r,o){const i=r.target;if(n.x+n.width/2,n.y+n.height/2,i.rect.x+i.rect.width/2,i.rect.y+i.rect.height/2,o==="vertical"){const m=av(n,r.anchor,"vertical");if(i.kind==="slide")return{orientation:o,start:{x:i.position,y:n.y},end:{x:i.position,y:n.y+n.height},...i.role==="center"?{start:{x:i.position,y:i.rect.y},end:{x:i.position,y:i.rect.y+i.rect.height}}:{},variant:"alignment"};const h=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:o,start:{x:m,y:h-Ks},end:{x:m,y:g+Ks},variant:"alignment"}}const s=av(n,r.anchor,"horizontal");if(i.kind==="slide")return{orientation:o,start:{x:n.x,y:i.position},end:{x:n.x+n.width,y:i.position},...i.role==="center"?{start:{x:i.rect.x,y:i.position},end:{x:i.rect.x+i.rect.width,y:i.position}}:{},variant:"alignment"};const u=Math.min(n.x,i.rect.x),d=Math.max(n.x+n.width,i.rect.x+i.rect.width);return{orientation:o,start:{x:u-Ks,y:s},end:{x:d+Ks,y:s},variant:"alignment"}}function m3(n,r,o){const i=r.target.relatedRects;if(i.length<2)return[];const[s,u]=i;if(!s||!u)return[];if(o==="vertical"){const T=s.x<=u.x?s:u,C=T===s?u:s,A=T.x+T.width,M=C.x,R=r.anchor==="start"?n.x:n.x+n.width,z={orientation:"horizontal",start:{x:A,y:T.y+T.height/2},end:{x:M,y:C.y+C.height/2},variant:"spacing"},H={orientation:"horizontal",start:r.anchor==="start"?{x:C.x+C.width,y:C.y+C.height/2}:{x:T.x,y:T.y+T.height/2},end:{x:R,y:n.y+n.height/2},variant:"spacing"};return[z,H]}const d=s.y<=u.y?s:u,m=d===s?u:s,h=d.y+d.height,g=m.y,x=r.anchor==="start"?n.y:n.y+n.height,y={orientation:"vertical",start:{x:d.x+d.width/2,y:h},end:{x:m.x+m.width/2,y:g},variant:"spacing"},w={orientation:"vertical",start:r.anchor==="start"?{x:m.x+m.width/2,y:m.y+m.height}:{x:d.x+d.width/2,y:d.y},end:{x:n.x+n.width/2,y:x},variant:"spacing"};return[y,w]}function av(n,r,o){return o==="vertical"?r==="start"?n.x:r==="end"?n.x+n.width:n.x+n.width/2:r==="start"?n.y:r==="end"?n.y+n.height:n.y+n.height/2}function h3({activeSlide:n,doc:r,rootRect:o,selectedElementId:i,slideStageRect:s,stageGeometry:u}){var w;const d=(T,C)=>({position:T,rect:s,kind:"slide",role:C,anchor:null,priority:C==="center"?0:2,elementId:null,relatedRects:[]}),m=[d(s.x,"start"),d(s.x+s.width/2,"center"),d(s.x+s.width,"end")],h=[d(s.y,"start"),d(s.y+s.height/2,"center"),d(s.y+s.height,"end")],g=r.querySelector(`[data-editor-id="${i}"]`),x=[];for(const T of n.elements){if(T.id===i)continue;const C=r.querySelector(`[data-editor-id="${T.id}"]`);if(!C||g&&(g.contains(C)||C.contains(g)))continue;const A=(w=r.defaultView)==null?void 0:w.getComputedStyle(C);if((A==null?void 0:A.display)==="none"||(A==null?void 0:A.visibility)==="hidden")continue;const M=C.getBoundingClientRect();if(M.width<=0||M.height<=0)continue;const R=Zo(M,o,u);(T.type==="block"||T.type==="image")&&x.push({elementId:T.id,rect:R});const z=R.x,H=R.x+R.width/2,Y=R.x+R.width,J=R.y,$=R.y+R.height/2,V=R.y+R.height,k=(K,ie)=>({position:K,rect:R,kind:"element",role:ie,anchor:null,priority:ie==="center"?3:4,elementId:T.id,relatedRects:[]});m.push(k(z,"start"),k(H,"center"),k(Y,"end")),h.push(k(J,"start"),k($,"center"),k(V,"end"))}const y=p3(x);return m.push(...y.vertical),h.push(...y.horizontal),{vertical:m,horizontal:h}}function p3(n){const r=[],o=[],i=n.slice().sort((u,d)=>u.rect.x-d.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),s=n.slice().sort((u,d)=>u.rect.y-d.rect.y).filter(u=>u.rect.width>0&&u.rect.height>0);for(let u=0;u<i.length-1;u+=1){const d=i[u],m=i[u+1];if(!d||!m)continue;if(!Qo(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,0)){const g=m.rect.x-(d.rect.x+d.rect.width);g>=q0&&g<=V0&&Qo(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,wc)&&r.push(Ws({position:m.rect.x+m.rect.width+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Ws({position:d.rect.x-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}for(let u=0;u<s.length-1;u+=1){const d=s[u],m=s[u+1];if(!d||!m)continue;if(!Qo(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,0)){const g=m.rect.y-(d.rect.y+d.rect.height);g>=q0&&g<=V0&&Qo(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,wc)&&o.push(Ws({position:m.rect.y+m.rect.height+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Ws({position:d.rect.y-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}return{vertical:r,horizontal:o}}function Ws({position:n,rect:r,anchor:o,relatedRects:i}){return{position:n,rect:r,kind:"spacing",role:"end",anchor:o,priority:1,elementId:null,relatedRects:i}}function g3(n,r){const o=Ec([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],r.vertical,n,"vertical"),i=Ec([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],r.horizontal,n,"horizontal"),s={...n,x:n.x+((o==null?void 0:o.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:s,guides:oS(s,{vertical:o,horizontal:i})}}function y3(n,r,o){const i={...n},s=r==="top-left"||r==="bottom-left"?"start":"end",u=r==="top-left"||r==="top-right"?"start":"end",d=Ec([{anchor:s,position:s==="start"?n.x:n.x+n.width}],o.vertical,n,"vertical"),m=Ec([{anchor:u,position:u==="start"?n.y:n.y+n.height}],o.horizontal,n,"horizontal");if(d)if(s==="start"){const h=i.width-d.delta;h>=48&&(i.x+=d.delta,i.width=h)}else{const h=i.width+d.delta;h>=48&&(i.width=h)}if(m)if(u==="start"){const h=i.height-m.delta;h>=48&&(i.y+=m.delta,i.height=h)}else{const h=i.height+m.delta;h>=48&&(i.height=h)}return{rect:i,guides:oS(i,{vertical:m,horizontal:d})}}function Ec(n,r,o,i){const s=E3(r);let u=null;for(const d of n)for(const m of s){if(!S3(o,m,i)||m.anchor&&m.anchor!==d.anchor)continue;const h=m.position-d.position;if(Math.abs(h)>J5)continue;const x=rv({anchor:d.anchor,delta:h,target:m},o,i),y=u?rv(u,o,i):Number.POSITIVE_INFINITY;x>=y||(u={anchor:d.anchor,delta:h,target:m})}return u}function rv(n,r,o){const i=Math.abs(n.delta),s=n.target.kind==="spacing"?Math.max(0,i-eO):i,u=v3(n.target);return s*1e3+u+n.target.priority+b3(n.anchor,n.target)+x3(r,n.target,o)/100}function v3(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function b3(n,r){return r.kind==="slide"&&r.role==="center"&&n!=="center"?25:0}function x3(n,r,o){return r.kind==="slide"?0:o==="vertical"?ov(n.y,n.y+n.height,r.rect.y,r.rect.y+r.rect.height):ov(n.x,n.x+n.width,r.rect.x,r.rect.x+r.rect.width)}function ov(n,r,o,i){return r<o?o-r:i<n?n-i:0}function S3(n,r,o){return r.kind==="slide"?!0:r.kind==="spacing"?w3(n,r,o):!0}function w3(n,r,o){if(r.relatedRects.length<2)return!1;if(o==="vertical"){const u=Math.min(...r.relatedRects.map(m=>m.y)),d=Math.max(...r.relatedRects.map(m=>m.y+m.height));return Qo(n.y,n.y+n.height,u,d,wc)}const i=Math.min(...r.relatedRects.map(u=>u.x)),s=Math.max(...r.relatedRects.map(u=>u.x+u.width));return Qo(n.x,n.x+n.width,i,s,wc)}function E3(n){const r=new Set;return n.filter(o=>{const i=`${o.kind}:${o.elementId??"slide"}:${o.position.toFixed(2)}`;return r.has(i)?!1:(r.add(i),!0)})}function Js(n){return`${Math.round(n*100)/100}px`}function gr(n,r){return Math.max(n,48*r)}function fm(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function C3(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function T3(n){const[r,...o]=n;return r?o.reduce((i,s)=>{const u=Math.min(i.x,s.x),d=Math.min(i.y,s.y),m=Math.max(i.x+i.width,s.x+s.width),h=Math.max(i.y+i.height,s.y+s.height);return{x:u,y:d,width:m-u,height:h-d}},r):{x:0,y:0,width:0,height:0}}function lv(n,r,o,i){return Math.atan2(r-i,n-o)*180/Math.PI}function A3({resizeCorner:n,scale:r,stageDeltaX:o,stageDeltaY:i,startStageRect:s}){let u=s.x,d=s.y,m=s.width,h=s.height;switch(n){case"top-left":{m=gr(s.width-o,r),h=gr(s.height-i,r),u=s.x+(s.width-m),d=s.y+(s.height-h);break}case"top-right":{m=gr(s.width+o,r),h=gr(s.height-i,r),d=s.y+(s.height-h);break}case"bottom-left":{m=gr(s.width-o,r),h=gr(s.height+i,r),u=s.x+(s.width-m);break}default:{m=gr(s.width+o,r),h=gr(s.height+i,r);break}}return{x:u,y:d,width:m,height:h}}function rc(n,r){for(const o of vm)n.style[o]=r[o]??""}function M3(n){return n.elementIds.map(r=>{const o=n.targetNodes[r],i=n.previousStyles[r];if(!o||!i)return null;const s=ci(o);return JSON.stringify(s)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:r,previousStyle:i,nextStyle:s,timestamp:Date.now()}}).filter(r=>!!r)}function _3(n,r){return r.length===1?r[0]:{type:"operation.batch",slideId:n.slideId,operations:r,timestamp:Date.now()}}function N3({isEditingText:n,isManipulating:r,selectedElement:o,selectedElementId:i,snapGuides:s,stageRect:u}){return!u||!i||!C3(o)||n?null:{selectionBounds:u,snapGuides:r?s:[],resizeHandles:[{corner:"top-left",x:u.x,y:u.y},{corner:"top-right",x:u.x+u.width,y:u.y},{corner:"bottom-right",x:u.x+u.width,y:u.y+u.height},{corner:"bottom-left",x:u.x,y:u.y+u.height}],rotationHandle:{x:u.x+u.width/2,y:u.y+u.height+20}}}function R3({activeSlide:n,selectedElement:r,selectedElementId:o,selectedElementIds:i,selectedStageRect:s,iframeRef:u,stageGeometry:d,isEditingText:m,onCommitOperation:h}){const{offsetX:g,offsetY:x,scale:y,slideHeight:w,slideWidth:T}=d,C=v.useRef(null),A=v.useRef(!1),M=v.useRef(null),[R,z]=v.useState(!1),[H,Y]=v.useState(!1),[J,$]=v.useState(null),[V,k]=v.useState([]),ie=N3({isEditingText:m,isManipulating:R,selectedElement:r,selectedElementId:o,snapGuides:V,stageRect:J??s});v.useEffect(()=>()=>{C.current=null,M.current&&window.clearTimeout(M.current)},[]),v.useEffect(()=>{(!n||!o||!fm(r)||m)&&(C.current=null,z(!1),$(null))},[n,m,r,o]),v.useEffect(()=>{R||($(null),k([]))},[R]);const se=v.useCallback(()=>{Y(!0),M.current&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>{Y(!1),M.current=null},0)},[]),q=v.useCallback((ue,de,he=null)=>{var Xt;if(!n||!o||!s||!fm(r)||m)return;const S=(Xt=u.current)==null?void 0:Xt.contentDocument;if(!S)return;const _=S.querySelector(n.rootSelector),D=Ke(S,o);if(!_||!D)return;const O=O3({activeSlide:n,doc:S,mode:ue,selectedElementId:o,selectedElementIds:i}),I=Object.fromEntries(O.map(Me=>[Me,Ke(S,Me)]).filter(Me=>!!Me[1]));if(!Object.keys(I).length)return;const N=Object.fromEntries(Object.entries(I).map(([Me,Ne])=>[Me,ci(Ne)])),j=Object.fromEntries(Object.entries(I).map(([Me,Ne])=>[Me,D3(Ne,I)])),B=u.current,P=(B==null?void 0:B.style.pointerEvents)||"";de.preventDefault(),de.stopPropagation();const te=D.getBoundingClientRect(),ne=_.getBoundingClientRect(),ae={x:g,y:x,width:T*y,height:w*y},Z={scale:y,offsetX:g,offsetY:x},oe=h3({activeSlide:n,doc:S,rootRect:ne,selectedElementId:o,slideStageRect:ae,stageGeometry:Z}),Se=Object.values(I).map(Me=>Zo(Me.getBoundingClientRect(),ne,Z)),Te=Object.fromEntries(Object.entries(I).map(([Me,Ne])=>[Me,Zo(Ne.getBoundingClientRect(),ne,Z)])),we=Object.fromEntries(Object.values(I).map(Me=>Me.parentElement).filter(Me=>!!Me).map(Me=>[lS(Me),Zo(Me.getBoundingClientRect(),ne,Z)])),ke=Se.length?T3(Se):s;C.current={slideId:n.id,elementId:o,elementIds:Object.keys(I),mode:ue,resizeCorner:he,startPointer:{x:de.clientX,y:de.clientY},startStageRect:ke,centerPoint:{x:te.left+te.width/2,y:te.top+te.height/2},previousStyle:N[o],previousStyles:N,startElementStageRects:Te,resizeParentElementIds:j,startParentStageRects:we,targetNodes:I,snapTargets:oe},A.current=!0,z(!0),k([]),B&&(B.style.pointerEvents="none");const ge=Me=>{const Ne=C.current;if(!Ne)return;Me.preventDefault();const tn=Me.clientX-Ne.startPointer.x,pt=Me.clientY-Ne.startPointer.y;if(Ne.mode==="move"){const At={x:Ne.startStageRect.x+tn,y:Ne.startStageRect.y+pt,width:Ne.startStageRect.width,height:Ne.startStageRect.height},Mt=Me.altKey?{rect:At,guides:[]}:g3(At,Ne.snapTargets);$(Mt.rect),k(Mt.guides);const $n=(Mt.rect.x-Ne.startStageRect.x)/y,ea=(Mt.rect.y-Ne.startStageRect.y)/y;for(const nn of Ne.elementIds){const da=Ne.targetNodes[nn],Bt=Ne.previousStyles[nn];if(!da||!Bt)continue;const pn=Kn(Bt.transform);rc(da,{...Bt,transform:La(pn.translateX+$n,pn.translateY+ea,pn.rotate),transformOrigin:Bt.transformOrigin||"center center"})}return}if(Ne.mode==="resize"){const At=A3({resizeCorner:Ne.resizeCorner,scale:y,stageDeltaX:tn,stageDeltaY:pt,startStageRect:Ne.startStageRect}),Mt=Me.altKey||!Ne.resizeCorner?{rect:At,guides:[]}:y3(At,Ne.resizeCorner,Ne.snapTargets);$(Mt.rect),k(Mt.guides),j3(Ne,Mt.rect,{offsetX:g,offsetY:x,scale:y});return}const Ht=Kn(Ne.previousStyle.transform),jt=lv(Ne.startPointer.x,Ne.startPointer.y,Ne.centerPoint.x,Ne.centerPoint.y),jr=lv(Me.clientX,Me.clientY,Ne.centerPoint.x,Ne.centerPoint.y);rc(D,{...Ne.previousStyle,transform:La(Ht.translateX,Ht.translateY,Ht.rotate+(jr-jt)),transformOrigin:"center center"}),k([])},ct=()=>{window.removeEventListener("mousemove",ge),window.removeEventListener("mouseup",ht),window.removeEventListener("keydown",vt),B&&(B.style.pointerEvents=P)},ht=()=>{const Me=C.current;if(ct(),A.current=!1,z(!1),se(),C.current=null,k([]),!Me)return;const Ne=M3(Me);if(!Ne.length){$(null);return}h(_3(Me,Ne))},vt=Me=>{if(Me.key!=="Escape")return;const Ne=C.current;if(ct(),z(!1),se(),C.current=null,k([]),!!Ne){for(const tn of Ne.elementIds){const pt=Ne.targetNodes[tn],Ht=Ne.previousStyles[tn];pt&&Ht&&rc(pt,Ht)}$(null)}};window.addEventListener("mousemove",ge),window.addEventListener("mouseup",ht),window.addEventListener("keydown",vt)},[n,u,m,h,r,o,i,s,y,g,x,T,w,se]);return{manipulationOverlay:ie,isManipulating:R||A.current,suppressBackgroundClear:H,beginMove:ue=>{q("move",ue)},beginResize:(ue,de)=>{q("resize",de,ue)},beginRotate:ue=>{q("rotate",ue)}}}function O3({activeSlide:n,doc:r,mode:o,selectedElementId:i,selectedElementIds:s}){const u=s.filter(m=>{const h=n.elements.find(g=>g.id===m);return fm(h)});if(o==="move")return u;if(o==="rotate")return[i];const d=new Set;for(const m of u.length?u:[i]){const h=Ke(r,m);if(h&&(d.add(m),h.getAttribute("data-group")==="true"))for(const g of h.querySelectorAll(`[data-editable][${be}]`)){const x=g.getAttribute(be);x&&d.add(x)}}return[...d]}function D3(n,r){const o=Object.entries(r);let i=n.parentElement;for(;i;){const s=o.find(([,u])=>u===i);if(s)return s[0];i=i.parentElement}return null}function j3(n,r,o){const i=n.startStageRect.width>0?r.width/n.startStageRect.width:1,s=n.startStageRect.height>0?r.height/n.startStageRect.height:1,u={x:o.offsetX,y:o.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([m,h])=>[m,{x:r.x+(h.x-n.startStageRect.x)*i,y:r.y+(h.y-n.startStageRect.y)*s,width:h.width*i,height:h.height*s}]));for(const m of n.elementIds){const h=n.targetNodes[m],g=n.previousStyles[m],x=d[m];if(!h||!g||!x)continue;const y=n.resizeParentElementIds[m]?d[n.resizeParentElementIds[m]]:n.startParentStageRects[lS(h.parentElement)]??u;if(!y)continue;const w=Kn(g.transform);rc(h,{...g,position:g.position||"absolute",left:Js((x.x-y.x)/o.scale),top:Js((x.y-y.y)/o.scale),width:Js(x.width/o.scale),height:Js(x.height/o.scale),transform:La(0,0,w.rotate),transformOrigin:g.transformOrigin||"center center"})}}function lS(n){return n!=null&&n.getAttribute(be)?`editable:${n.getAttribute(be)}`:"slide"}const iv={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function z3(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function k3(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function L3(n){return n.altKey?1:n.shiftKey?10:5}function H3(n,r,o){var d;const i={[r]:o};if(typeof DOMParser>"u")return i;const u=(d=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:d.content.firstElementChild;if(!(u instanceof HTMLElement))return i;for(const m of u.querySelectorAll("[data-editor-id]")){const h=m.getAttribute("data-editor-id");h&&(i[h]=`${o}-${h}`)}return i}function dm(n,r,o){return r.length?(o(r.length===1?r[0]:{type:"operation.batch",slideId:n,operations:r,timestamp:Date.now()}),!0):!1}function B3({slide:n,selectedElementIds:r,iframeRef:o}){var h;if(!n||!r.length)return null;const i=(h=o.current)==null?void 0:h.contentDocument,s=i==null?void 0:i.querySelector(n.rootSelector),u=s==null?void 0:s.getBoundingClientRect();if(!u)return null;const d=r.map(g=>{const x=sc(n.htmlSource,g),y=ic(n.htmlSource,g),w=i?Ke(i,g):null;return!x||!y||!w?null:{sourceElementId:g,html:x,rect:rS(w.getBoundingClientRect(),u),...y}}).filter(g=>!!g),m=u3(d.map(g=>g.rect));return m?{elements:d,unionRect:m}:null}function U3({slide:n,selectedElementIds:r}){return!n||!r.length?[]:r.map(o=>{const i=sc(n.htmlSource,o),s=ic(n.htmlSource,o);return!i||!s?null:{type:"element.remove",slideId:n.id,elementId:o,...s,html:i,timestamp:Date.now()}}).filter(o=>!!o)}function I3({slide:n,payload:r,iframeRef:o,slideSize:i}){if(!n||!r)return null;let s=n.htmlSource;const u=[],d=c3(o,n,i),m=f3(r.unionRect,24,d),h=[];return{operations:r.elements.map(x=>{const y=Ud(s,`${x.sourceElementId}-copy`),w=Rv(x.html,H3(x.html,x.sourceElementId,y)),T=um(x.rect,m.x,m.y),C=aS(w,T),A={type:"element.insert",slideId:n.id,elementId:y,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:C,timestamp:Date.now()};return s=Ov(s,A),u.push(y),h.push({...x,rect:T}),A}),selectedElementIds:u,nextHtmlSource:s,nextClipboard:{elements:h,unionRect:um(r.unionRect,m.x,m.y)}}}function sv(n,r,o){return dm(n,r,o)}function P3({activeSlide:n,selectedElementIds:r,iframeRef:o,slideWidth:i,slideHeight:s,isEditingText:u,canUndo:d,canRedo:m,onEscapeSelection:h,onNavigateSlide:g,onCommitOperation:x,onSelectElementIds:y,onUndo:w,onRedo:T}){const C=v.useRef(null),A=v.useRef(n),M=v.useRef(r),R=v.useRef(d),z=v.useRef(m),H=v.useRef(u),Y=v.useRef(h),J=(n==null?void 0:n.htmlSource)??"",$=v.useRef(g);A.current=n,M.current=r,R.current=d,z.current=m,H.current=u,Y.current=h,$.current=g,v.useEffect(()=>{var he;const V=()=>{const S=B3({slide:A.current,selectedElementIds:M.current,iframeRef:o});return S&&(C.current=S),!!S},k=()=>{const S=A.current;if(!S)return!1;const _=U3({slide:S,selectedElementIds:M.current});return _.length?(sv(S.id,_,x),y([]),!0):!1},K=(S=C.current)=>{const _=A.current,D=I3({slide:_,payload:S,iframeRef:o,slideSize:{width:i,height:s}});return!_||!D?!1:(sv(_.id,D.operations,x),A.current={..._,htmlSource:D.nextHtmlSource},y(D.selectedElementIds),C.current=D.nextClipboard,!0)},ie=S=>{var B;const _=iv[S.key],D=A.current,O=M.current;if(!D||!O.length||!_)return!1;const I=(B=o.current)==null?void 0:B.contentDocument,N=L3(S),j=O.map(P=>{const te=D.elements.find(Se=>Se.id===P);if(!k3(te))return null;const ne=I?Ke(I,P):null;if(!ne)return null;const ae=ci(ne),Z=Kn(ae.transform),oe=Ld({...ae,transform:La(Z.translateX+_.x*N,Z.translateY+_.y*N,Z.rotate),transformOrigin:ae.transformOrigin||"center center"});return{type:"element.layout.update",slideId:D.id,elementId:P,previousStyle:ae,nextStyle:oe,timestamp:Date.now()}}).filter(P=>!!P);return dm(D.id,j,x),!0},se=S=>{var N;const _=A.current,D=M.current;if(!_||!D.length)return!1;const O=(N=o.current)==null?void 0:N.contentDocument,I=D.map(j=>{const B=O?Ke(O,j):null;if(!B)return null;const P=ci(B),te=Number.parseInt(P.zIndex||"",10),ne=Number.isFinite(te)?te:0,ae=S==="front"?999:S==="back"?0:Math.max(0,ne+(S==="forward"?1:-1)),Z=Ld({...P,zIndex:String(ae)});return Z.zIndex===P.zIndex?null:{type:"element.layout.update",slideId:_.id,elementId:j,previousStyle:P,nextStyle:Z,timestamp:Date.now()}}).filter(j=>!!j);return dm(_.id,I,x)},q=S=>{if(S.defaultPrevented||H.current)return;const _=S.key.toLowerCase(),D=S.metaKey||S.ctrlKey,O=D&&!S.shiftKey&&_==="z",I=D&&(S.shiftKey&&_==="z"||_==="y"),N=z3(S.target);let j=!1;if(O&&R.current)w(),j=!0;else if(I&&z.current)T(),j=!0;else{if(N)return;D&&!S.shiftKey&&_==="c"?j=V():D&&!S.shiftKey&&_==="x"?j=V()&&k():D&&!S.shiftKey&&_==="v"?j=K():D&&!S.shiftKey&&_==="d"?j=V()&&K():S.key==="Backspace"||S.key==="Delete"?j=k():S.key==="Escape"?j=Y.current():S.key in iv?M.current.length>0?j=ie(S):!S.altKey&&!S.shiftKey&&!D&&(j=$.current(S.key==="ArrowUp"||S.key==="ArrowLeft"?"previous":"next")):D&&S.key==="]"?j=se(S.shiftKey?"front":"forward"):D&&S.key==="["&&(j=se(S.shiftKey?"back":"backward"))}j&&(S.preventDefault(),S.stopPropagation())},ue=$3(J,o),de=(he=o.current)==null?void 0:he.contentWindow;return window.addEventListener("keydown",q),de==null||de.addEventListener("keydown",q),ue==null||ue.addEventListener("keydown",q),()=>{window.removeEventListener("keydown",q),de==null||de.removeEventListener("keydown",q),ue==null||ue.removeEventListener("keydown",q)}},[J,o,x,T,y,w,s,i])}function $3(n,r){var o;return(o=r.current)==null?void 0:o.contentDocument}function G3(n){return n?[n]:[]}function ec(n,r){return n.includes(r)?n:[...n,r]}function Y3({selectedElementIds:n,activeGroupScopeId:r}){return r?{handled:!0,nextSelection:[r],exitGroupScope:!0}:n.length?{handled:!0,nextSelection:[],exitGroupScope:!1}:{handled:!1,nextSelection:n,exitGroupScope:!1}}const cv="hse-editing-text-style",q3=`
|
|
420
|
+
[data-hse-editing="true"] {
|
|
421
|
+
outline: none !important;
|
|
422
|
+
box-shadow: none !important;
|
|
423
|
+
overflow: visible;
|
|
424
|
+
caret-color: currentColor;
|
|
425
|
+
white-space: pre-wrap;
|
|
426
|
+
user-select: text;
|
|
427
|
+
-webkit-user-select: text;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
[data-hse-editing="true"]:focus,
|
|
431
|
+
[data-hse-editing="true"]:focus-visible {
|
|
432
|
+
outline: none !important;
|
|
433
|
+
box-shadow: none !important;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
body[data-hse-group-scope] [data-editable] {
|
|
437
|
+
transition: opacity 120ms ease, filter 120ms ease;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
|
|
441
|
+
opacity: 0.28;
|
|
442
|
+
filter: blur(1.5px);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
|
|
446
|
+
outline: 1px solid rgba(15, 23, 42, 0.22);
|
|
447
|
+
outline-offset: 4px;
|
|
448
|
+
}
|
|
449
|
+
`;function V3(n){return n.closest(`[data-editable][${be}]`)}function uv(n,r,o,i){const s=n.elementFromPoint(r,o);return s?oi(s,i):null}function fv(n,r){const o=Array.from(n.querySelectorAll("[data-editable]"));for(const s of o)s.removeAttribute("data-hse-active-group-scope"),s.removeAttribute("data-hse-outside-group-scope");if(!r){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",r);const i=n.querySelector(`[data-editable="block"][data-group="true"][${be}="${r}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const s of o)s!==i&&!i.contains(s)&&s.setAttribute("data-hse-outside-group-scope","true")}function oi(n,r){const o=V3(n);return o?r?o.closest(`[data-editable="block"][data-group="true"][${be}="${r}"]`)?o:null:o.closest(`[data-editable="block"][data-group="true"][${be}]`)??o:null}function X3(n){if(n.getElementById(cv))return;const r=n.createElement("style");r.id=cv,r.textContent=q3,n.head.appendChild(r)}function F3(n){const r=n.ownerDocument.getSelection(),o=n.ownerDocument.createRange();o.selectNodeContents(n),o.collapse(!1),r==null||r.removeAllRanges(),r==null||r.addRange(o)}function K3({activeSlide:n,iframeRef:r,onCommitOperation:o,onOpenSelectionContextMenu:i,onStageWheel:s}){const[u,d]=v.useState([]),[m,h]=v.useState(null),[g,x]=v.useState(null),[y,w]=v.useState(null),T=v.useRef(null),C=v.useRef(null),A=v.useRef(()=>{}),M=v.useRef(()=>{}),R=v.useRef(s),z=u[u.length-1]??null;R.current=s;const H=v.useCallback(()=>{h(S=>S===null?S:null)},[]);function Y(S){d(_=>{const D=typeof S=="function"?S(_[_.length-1]??null):S;return G3(D)})}const J=v.useCallback((S,_)=>{const D=r.current,O=D==null?void 0:D.contentDocument;if(!D||!O||T.current)return null;const I=D.getBoundingClientRect(),N=I.width>0?D.clientWidth/I.width:1,j=I.height>0?D.clientHeight/I.height:1,B=uv(O,(S-I.left)*N,(_-I.top)*j,C.current);return(B==null?void 0:B.getAttribute(be))??null},[r]),$=v.useCallback((S,_)=>{const D=J(S,_);return h(O=>O===D?O:D),D},[J]),V=v.useCallback((S,_,D)=>{const O=J(S,_);return O?(d(D?I=>ec(I,O):[O]),O):null},[J]),k=v.useCallback((S,_)=>{const D=J(S,_);return D?(d(O=>ec(O,D)),h(D),i==null||i(S,_),!0):!1},[J,i]),K=v.useCallback(S=>{var I;if(!n)return;const _=(I=r.current)==null?void 0:I.contentDocument,D=_?Ke(_,S):null;if(!D||D.getAttribute("data-editable")!=="text")return;const O={slideId:n.id,elementId:S,initialText:D.textContent||""};d([S]),T.current=O,w(O)},[n,r]),ie=v.useCallback(S=>{x(S),C.current=S,d([S])},[]),se=v.useCallback(()=>{const S=C.current;C.current=null,x(null),d(S?[S]:[])},[]),q=v.useCallback(()=>{if(T.current)return!1;const S=Y3({selectedElementIds:u,activeGroupScopeId:C.current});return S.handled&&(S.exitGroupScope&&(C.current=null,x(null)),d(S.nextSelection)),S.handled},[u]);function ue(S,_){const D=y;if(!n||!D||D.slideId!==n.id||D.elementId!==S){T.current=null,w(null);return}const O=D.initialText;T.current=null,w(null),_!==O&&o({type:"text.update",slideId:n.id,elementId:S,previousText:O,nextText:_,timestamp:Date.now()})}function de(){var D;const S=(D=r.current)==null?void 0:D.contentDocument,_=T.current;if(_&&S){const O=Ke(S,_.elementId);O&&(O.textContent=_.initialText)}T.current=null,w(null)}v.useEffect(()=>{T.current=y},[y]),v.useEffect(()=>{C.current=g},[g]),v.useEffect(()=>{!n||!y||y.slideId===n.id||w(null)},[n,y]),A.current=ue,M.current=de,v.useEffect(()=>{if(!n)return;const S=r.current;if(!S)return;const _=S.contentDocument;if(!_)return;_.open(),_.write(n.htmlSource),_.close(),X3(_),fv(_,C.current);const D=j=>{const B=j.getAttribute(be);B&&A.current(B,j.textContent||"")};_.onclick=j=>{const B=j.target;if(!(B instanceof Element)){if(T.current){const ae=Ke(_,T.current.elementId);if(ae){D(ae);return}}d([]);return}const P=T.current;if(P){H();const ae=Ke(_,P.elementId);if(ae&&!ae.contains(B)){D(ae);return}return}const te=oi(B,C.current);if(!te){C.current||d([]);return}const ne=te.getAttribute(be);ne&&(j.shiftKey||j.metaKey||j.ctrlKey?d(ae=>ec(ae,ne)):d([ne]))},_.onmousemove=j=>{if(T.current){H();return}const B=uv(_,j.clientX,j.clientY,C.current),P=(B==null?void 0:B.getAttribute(be))??null;h(te=>te===P?te:P)},_.oncontextmenu=j=>{if(T.current)return;const B=S.getBoundingClientRect(),P=B.width>0?S.clientWidth/B.width:1,te=B.height>0?S.clientHeight/B.height:1,ne=B.left+j.clientX/P,ae=B.top+j.clientY/te;k(ne,ae)&&(j.preventDefault(),j.stopPropagation())},_.onmouseleave=()=>{H()};const O=j=>{var B;(B=R.current)==null||B.call(R,j)};_.addEventListener("wheel",O,{passive:!1});const I=j=>{var te;const B=he(j,C.current),P=B==null?void 0:B.getAttribute(be);if(P){if(((te=T.current)==null?void 0:te.elementId)===P){j.stopPropagation();return}j.preventDefault(),j.stopPropagation(),K(P)}};_.addEventListener("dblclick",I,!0);const N=Array.from(_.querySelectorAll(`[data-editable][${be}]`));for(const j of N)j.style.cursor="default",j.ondblclick=null,j.onblur=null,j.onkeydown=null,j.onclick=B=>{var ne;B.stopPropagation();const P=oi(B.target,C.current);if(C.current&&!P)return;const te=(P==null?void 0:P.getAttribute(be))??j.getAttribute(be);((ne=T.current)==null?void 0:ne.elementId)!==te&&te&&(B.shiftKey||B.metaKey||B.ctrlKey?d(ae=>ec(ae,te)):d([te]))},j.ondblclick=B=>{const P=he(B,C.current)??oi(B.target,C.current);if((P==null?void 0:P.getAttribute("data-editable"))==="text"){const ae=P.getAttribute(be);if(ae){B.preventDefault(),B.stopPropagation(),K(ae);return}}const te=j.getAttribute(be),ne=T.current;if(te&&j.getAttribute("data-group")==="true"){B.preventDefault(),B.stopPropagation(),ie(te);return}if(j.getAttribute("data-editable")==="text"){if(te&&ne&&ne.slideId===n.id&&ne.elementId===te){B.stopPropagation();return}B.preventDefault(),B.stopPropagation(),te&&K(te)}};return()=>{_.removeEventListener("wheel",O),_.removeEventListener("dblclick",I,!0)}},[n,ie,K,H,r,k]);function he(S,_){var j;const D=(j=r.current)==null?void 0:j.contentDocument;if(!D)return null;const O=Array.from(D.querySelectorAll(`[data-editable="text"][${be}]`)).filter(B=>oi(B,_)===B),I=O.find(B=>{const P=B.getBoundingClientRect();return S.clientX>=P.left&&S.clientX<=P.right&&S.clientY>=P.top&&S.clientY<=P.bottom});if(I)return I;const N=O.map(B=>{const P=B.getBoundingClientRect(),te=Math.min(Math.max(S.clientX,P.left),P.right),ne=Math.min(Math.max(S.clientY,P.top),P.bottom);return{candidate:B,distance:Math.hypot(S.clientX-te,S.clientY-ne)}}).sort((B,P)=>B.distance-P.distance)[0];return N&&N.distance<=24?N.candidate:null}return v.useEffect(()=>{var _;const S=(_=r.current)==null?void 0:_.contentDocument;S&&fv(S,g)},[g,r]),v.useEffect(()=>{var ke;const S=y;if(!S||!n||S.slideId!==n.id)return;const _=r.current,D=_==null?void 0:_.contentDocument;if(!_||!D)return;const O=D.querySelector(gm(S.elementId));if(!O)return;const I=()=>{A.current(S.elementId,O.textContent||"")};let N=!1;const j=O.style.display,B=O.style.alignItems,P=O.style.overflow,te=O.style.cursor,ne=O.onblur,ae=O.onclick,Z=O.onkeydown,oe=O.onmousedown,Se=O.onmouseup,Te=(ke=O.ownerDocument.defaultView)==null?void 0:ke.getComputedStyle(O),we=(Te==null?void 0:Te.display)??"";return O.setAttribute("contenteditable","plaintext-only"),O.setAttribute("spellcheck","false"),O.setAttribute("data-hse-editing","true"),O.style.cursor="text",O.style.overflow="visible",we==="inline-flex"?(O.style.display="inline-block",O.style.alignItems="normal"):(we==="flex"||we==="grid"||we==="inline-grid")&&(O.style.display="block",O.style.alignItems="normal"),O.focus(),F3(O),O.onkeydown=ge=>{if(ge.key==="Enter"&&!ge.shiftKey){ge.preventDefault(),I();return}ge.key==="Escape"&&(ge.preventDefault(),M.current())},O.onmousedown=()=>{N=!1},O.onmouseup=()=>{const ge=O.ownerDocument.getSelection(),ct=ge==null?void 0:ge.anchorNode,ht=ge==null?void 0:ge.focusNode,vt=ct?O.contains(ct):!1,Xt=ht?O.contains(ht):!1;N=!!(ge&&!ge.isCollapsed&&vt&&Xt)},O.onclick=ge=>{ge.stopPropagation(),N&&(ge.preventDefault(),N=!1)},O.onblur=()=>{window.setTimeout(()=>{var Me;if(((Me=T.current)==null?void 0:Me.elementId)!==S.elementId)return;const ge=O.ownerDocument.getSelection(),ct=ge==null?void 0:ge.anchorNode,ht=ge==null?void 0:ge.focusNode,vt=O.ownerDocument.activeElement,Xt=!!(ge&&!ge.isCollapsed)&&!!(ct&&O.contains(ct))&&!!(ht&&O.contains(ht));vt===O||Xt||I()},0)},()=>{var ge;(ge=O.ownerDocument.getSelection())==null||ge.removeAllRanges(),O.ownerDocument.activeElement===O&&O.blur(),O.removeAttribute("contenteditable"),O.removeAttribute("spellcheck"),O.removeAttribute("data-hse-editing"),O.style.cursor=te,O.style.display=j,O.style.alignItems=B,O.style.overflow=P,O.onblur=ne,O.onclick=ae,O.onkeydown=Z,O.onmousedown=oe,O.onmouseup=Se}},[n,r,y]),{selectedElementId:z,selectedElementIds:u,preselectedElementId:m,activeGroupScopeId:g,isEditingText:!!(n&&(y==null?void 0:y.slideId)===n.id),setSelectedElementId:Y,setSelectedElementIds:d,beginTextEditing:K,beginGroupEditingScope:ie,exitGroupEditingScope:se,clearSelection:q,clearPreselection:H,updatePointerPreselection:$,retargetPointerSelection:V,openPointerSelectionContextMenu:k}}function Q3(n,r={}){var x;const{onSlidesChange:o}=r,[i,s]=v.useReducer(Us,n,Lv),[u,d]=v.useState(((x=n[0])==null?void 0:x.id)??"");v.useEffect(()=>{var y;s({type:"history.reset",slides:n}),d(((y=n[0])==null?void 0:y.id)??"")},[n]);const m=v.useMemo(()=>i.slides.find(y=>y.id===u)??i.slides[0],[u,i.slides]),h=(m==null?void 0:m.id)??"";function g(y){var w;return y.some(T=>T.id===u)||d(((w=y[0])==null?void 0:w.id)??""),o==null||o(y),y}return{slides:i.slides,activeSlide:m,activeSlideId:h,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:y=>{const w=Us(i,{type:"history.commit",operation:y});return s({type:"history.commit",operation:y}),g(w.slides)},runUndo:()=>{const y=Us(i,{type:"history.undo"});s({type:"history.undo"}),g(y.slides)},runRedo:()=>{const y=Us(i,{type:"history.redo"});s({type:"history.redo"}),g(y.slides)}}}const Z3=["-webkit-","-moz-","-ms-"],W3=new Set(["appearance","caret-color","color-interpolation","color-rendering","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","math-depth","math-shift","print-color-adjust","ruby-align","ruby-position","speak","text-size-adjust"]);function J3(n){return Z3.some(r=>n.startsWith(r))?!1:!W3.has(n)}function eD(n){const r=window.getComputedStyle(n),o=[];for(const i of Array.from(r)){if(!J3(i))continue;const s=i==="transform"&&n.style.transform?n.style.transform.trim():r.getPropertyValue(i).trim();s.length!==0&&o.push({name:i,value:s})}return o.sort((i,s)=>i.name.localeCompare(s.name))}function tD({iframeRef:n,activeSlide:r,selectedElement:o,selectedElementIds:i,preselectedElementId:s,scale:u,offsetX:d,offsetY:m,slideWidth:h,slideHeight:g}){const x=i.join("\0"),y=s??"",[w,T]=v.useState({key:"",rect:null}),[C,A]=v.useState({key:"",rect:null}),[M,R]=v.useState({key:"",rect:null}),[z,H]=v.useState([]),Y=w.key===x?w.rect:null,J=C.key===y?C.rect:null,$=M.key===x?M.rect:null;return v.useEffect(()=>{const V=n.current,k=V==null?void 0:V.contentDocument;if(!V||!k||!r){T({key:x,rect:null}),A({key:y,rect:null}),R({key:x,rect:null}),H([]);return}const K=k.querySelector(r.rootSelector),ie=i[0]?Ke(k,i[0]):K;if(!ie){T({key:x,rect:null}),A({key:y,rect:null}),R({key:x,rect:null}),H([]);return}const se=eD(ie);H(S=>aD(S,se)?S:se);const q=K==null?void 0:K.getBoundingClientRect();let ue=null;if(!i.length||!K||!q)ue=null;else{const S=i.map(_=>Ke(k,_)).filter(_=>!!_).map(_=>Zo(_.getBoundingClientRect(),q,{scale:u,offsetX:d,offsetY:m}));S.length&&(ue=S.reduce((_,D)=>{const O=Math.min(_.x,D.x),I=Math.min(_.y,D.y),N=Math.max(_.x+_.width,D.x+D.width),j=Math.max(_.y+_.height,D.y+D.height);return{x:O,y:I,width:N-O,height:j-I}}))}T(S=>Dd(S,x,ue)?S:{key:x,rect:ue}),R(S=>Dd(S,x,ue)?S:{key:x,rect:ue});const de=s?Ke(k,s):null,he=de&&q?Zo(de.getBoundingClientRect(),q,{scale:u,offsetX:d,offsetY:m}):null;A(S=>Dd(S,y,he)?S:{key:y,rect:he})},[r,n,d,m,s,y,u,i,x,g,h]),{selectedStageRect:Y,preselectionOverlay:J,selectionOverlay:$,selectionLabel:(o==null?void 0:o.type)||"element",inspectedStyles:z}}function Dd(n,r,o){return n.key===r&&nD(n.rect,o)}function nD(n,r){return n===r?!0:!n||!r?!1:n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function aD(n,r){return n.length!==r.length?!1:n.every((o,i)=>{const s=r[i];return(s==null?void 0:s.name)===o.name&&s.value===o.value})}function rD(n,r){if(n.match(/^[a-z]+:\/\//i))return n;if(n.match(/^\/\//))return window.location.protocol+n;if(n.match(/^[a-z]+:/i))return n;const o=document.implementation.createHTMLDocument(),i=o.createElement("base"),s=o.createElement("a");return o.head.appendChild(i),o.body.appendChild(s),r&&(i.href=r),s.href=n,s.href}const oD=(()=>{let n=0;const r=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${r()}${n}`)})();function wr(n){const r=[];for(let o=0,i=n.length;o<i;o++)r.push(n[o]);return r}let Fo=null;function iS(n={}){return Fo||(n.includeStyleProperties?(Fo=n.includeStyleProperties,Fo):(Fo=wr(window.getComputedStyle(document.documentElement)),Fo))}function Cc(n,r){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(r);return i?parseFloat(i.replace("px","")):0}function lD(n){const r=Cc(n,"border-left-width"),o=Cc(n,"border-right-width");return n.clientWidth+r+o}function iD(n){const r=Cc(n,"border-top-width"),o=Cc(n,"border-bottom-width");return n.clientHeight+r+o}function sS(n,r={}){const o=r.width||lD(n),i=r.height||iD(n);return{width:o,height:i}}function sD(){let n,r;try{r=process}catch{}const o=r&&r.env?r.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const Cn=16384;function cD(n){(n.width>Cn||n.height>Cn)&&(n.width>Cn&&n.height>Cn?n.width>n.height?(n.height*=Cn/n.width,n.width=Cn):(n.width*=Cn/n.height,n.height=Cn):n.width>Cn?(n.height*=Cn/n.width,n.width=Cn):(n.width*=Cn/n.height,n.height=Cn))}function Tc(n){return new Promise((r,o)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>r(i))})},i.onerror=o,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function uD(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(r=>`data:image/svg+xml;charset=utf-8,${r}`)}async function fD(n,r,o){const i="http://www.w3.org/2000/svg",s=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return s.setAttribute("width",`${r}`),s.setAttribute("height",`${o}`),s.setAttribute("viewBox",`0 0 ${r} ${o}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),s.appendChild(u),u.appendChild(n),uD(s)}const hn=(n,r)=>{if(n instanceof r)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===r.name||hn(o,r)};function dD(n){const r=n.getPropertyValue("content");return`${n.cssText} content: '${r.replace(/'|"/g,"")}';`}function mD(n,r){return iS(r).map(o=>{const i=n.getPropertyValue(o),s=n.getPropertyPriority(o);return`${o}: ${i}${s?" !important":""};`}).join(" ")}function hD(n,r,o,i){const s=`.${n}:${r}`,u=o.cssText?dD(o):mD(o,i);return document.createTextNode(`${s}{${u}}`)}function dv(n,r,o,i){const s=window.getComputedStyle(n,o),u=s.getPropertyValue("content");if(u===""||u==="none")return;const d=oD();try{r.className=`${r.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(hD(d,o,s,i)),r.appendChild(m)}function pD(n,r,o){dv(n,r,":before",o),dv(n,r,":after",o)}const mv="application/font-woff",hv="image/jpeg",gD={woff:mv,woff2:mv,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:hv,jpeg:hv,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function yD(n){const r=/\.([^./]*?)$/g.exec(n);return r?r[1]:""}function Wm(n){const r=yD(n).toLowerCase();return gD[r]||""}function vD(n){return n.split(/,/)[1]}function mm(n){return n.search(/^(data:)/)!==-1}function bD(n,r){return`data:${r};base64,${n}`}async function cS(n,r,o){const i=await fetch(n,r);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const s=await i.blob();return new Promise((u,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{u(o({res:i,result:m.result}))}catch(h){d(h)}},m.readAsDataURL(s)})}const jd={};function xD(n,r,o){let i=n.replace(/\?.*/,"");return o&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),r?`[${r}]${i}`:i}async function Jm(n,r,o){const i=xD(n,r,o.includeQueryParams);if(jd[i]!=null)return jd[i];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let s;try{const u=await cS(n,o.fetchRequestInit,({res:d,result:m})=>(r||(r=d.headers.get("Content-Type")||""),vD(m)));s=bD(u,r)}catch(u){s=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return jd[i]=s,s}async function SD(n){const r=n.toDataURL();return r==="data:,"?n.cloneNode(!1):Tc(r)}async function wD(n,r){if(n.currentSrc){const u=document.createElement("canvas"),d=u.getContext("2d");u.width=n.clientWidth,u.height=n.clientHeight,d==null||d.drawImage(n,0,0,u.width,u.height);const m=u.toDataURL();return Tc(m)}const o=n.poster,i=Wm(o),s=await Jm(o,i,r);return Tc(s)}async function ED(n,r){var o;try{if(!((o=n==null?void 0:n.contentDocument)===null||o===void 0)&&o.body)return await Yc(n.contentDocument.body,r,!0)}catch{}return n.cloneNode(!1)}async function CD(n,r){return hn(n,HTMLCanvasElement)?SD(n):hn(n,HTMLVideoElement)?wD(n,r):hn(n,HTMLIFrameElement)?ED(n,r):n.cloneNode(uS(n))}const TD=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",uS=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function AD(n,r,o){var i,s;if(uS(r))return r;let u=[];return TD(n)&&n.assignedNodes?u=wr(n.assignedNodes()):hn(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=wr(n.contentDocument.body.childNodes):u=wr(((s=n.shadowRoot)!==null&&s!==void 0?s:n).childNodes),u.length===0||hn(n,HTMLVideoElement)||await u.reduce((d,m)=>d.then(()=>Yc(m,o)).then(h=>{h&&r.appendChild(h)}),Promise.resolve()),r}function MD(n,r,o){const i=r.style;if(!i)return;const s=window.getComputedStyle(n);s.cssText?(i.cssText=s.cssText,i.transformOrigin=s.transformOrigin):iS(o).forEach(u=>{let d=s.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),hn(n,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&r.getAttribute("d")&&(d=`path(${r.getAttribute("d")})`),i.setProperty(u,d,s.getPropertyPriority(u))})}function _D(n,r){hn(n,HTMLTextAreaElement)&&(r.innerHTML=n.value),hn(n,HTMLInputElement)&&r.setAttribute("value",n.value)}function ND(n,r){if(hn(n,HTMLSelectElement)){const i=Array.from(r.children).find(s=>n.value===s.getAttribute("value"));i&&i.setAttribute("selected","")}}function RD(n,r,o){return hn(r,Element)&&(MD(n,r,o),pD(n,r,o),_D(n,r),ND(n,r)),r}async function OD(n,r){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const i={};for(let u=0;u<o.length;u++){const m=o[u].getAttribute("xlink:href");if(m){const h=n.querySelector(m),g=document.querySelector(m);!h&&g&&!i[m]&&(i[m]=await Yc(g,r,!0))}}const s=Object.values(i);if(s.length){const u="http://www.w3.org/1999/xhtml",d=document.createElementNS(u,"svg");d.setAttribute("xmlns",u),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const m=document.createElementNS(u,"defs");d.appendChild(m);for(let h=0;h<s.length;h++)m.appendChild(s[h]);n.appendChild(d)}return n}async function Yc(n,r,o){return!o&&r.filter&&!r.filter(n)?null:Promise.resolve(n).then(i=>CD(i,r)).then(i=>AD(n,i,r)).then(i=>RD(n,i,r)).then(i=>OD(i,r))}const fS=/url\((['"]?)([^'"]+?)\1\)/g,DD=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,jD=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function zD(n){const r=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${r})(['"]?\\))`,"g")}function kD(n){const r=[];return n.replace(fS,(o,i,s)=>(r.push(s),o)),r.filter(o=>!mm(o))}async function LD(n,r,o,i,s){try{const u=o?rD(r,o):r,d=Wm(r);let m;return s||(m=await Jm(u,d,i)),n.replace(zD(r),`$1${m}$3`)}catch{}return n}function HD(n,{preferredFontFormat:r}){return r?n.replace(jD,o=>{for(;;){const[i,,s]=DD.exec(o)||[];if(!s)return"";if(s===r)return`src: ${i};`}}):n}function dS(n){return n.search(fS)!==-1}async function mS(n,r,o){if(!dS(n))return n;const i=HD(n,o);return kD(i).reduce((u,d)=>u.then(m=>LD(m,d,r,o)),Promise.resolve(i))}async function Ko(n,r,o){var i;const s=(i=r.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(s){const u=await mS(s,null,o);return r.style.setProperty(n,u,r.style.getPropertyPriority(n)),!0}return!1}async function BD(n,r){await Ko("background",n,r)||await Ko("background-image",n,r),await Ko("mask",n,r)||await Ko("-webkit-mask",n,r)||await Ko("mask-image",n,r)||await Ko("-webkit-mask-image",n,r)}async function UD(n,r){const o=hn(n,HTMLImageElement);if(!(o&&!mm(n.src))&&!(hn(n,SVGImageElement)&&!mm(n.href.baseVal)))return;const i=o?n.src:n.href.baseVal,s=await Jm(i,Wm(i),r);await new Promise((u,d)=>{n.onload=u,n.onerror=r.onImageErrorHandler?(...h)=>{try{u(r.onImageErrorHandler(...h))}catch(g){d(g)}}:d;const m=n;m.decode&&(m.decode=u),m.loading==="lazy"&&(m.loading="eager"),o?(n.srcset="",n.src=s):n.href.baseVal=s})}async function ID(n,r){const i=wr(n.childNodes).map(s=>hS(s,r));await Promise.all(i).then(()=>n)}async function hS(n,r){hn(n,Element)&&(await BD(n,r),await UD(n,r),await ID(n,r))}function PD(n,r){const{style:o}=n;r.backgroundColor&&(o.backgroundColor=r.backgroundColor),r.width&&(o.width=`${r.width}px`),r.height&&(o.height=`${r.height}px`);const i=r.style;return i!=null&&Object.keys(i).forEach(s=>{o[s]=i[s]}),n}const pv={};async function gv(n){let r=pv[n];if(r!=null)return r;const i=await(await fetch(n)).text();return r={url:n,cssText:i},pv[n]=r,r}async function yv(n,r){let o=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(i,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),cS(m,r.fetchRequestInit,({result:h})=>(o=o.replace(d,`url(${h})`),[d,h]))});return Promise.all(u).then(()=>o)}function vv(n){if(n==null)return[];const r=[],o=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(o,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const h=s.exec(i);if(h===null)break;r.push(h[0])}i=i.replace(s,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",m=new RegExp(d,"gi");for(;;){let h=u.exec(i);if(h===null){if(h=m.exec(i),h===null)break;u.lastIndex=m.lastIndex}else m.lastIndex=u.lastIndex;r.push(h[0])}return r}async function $D(n,r){const o=[],i=[];return n.forEach(s=>{if("cssRules"in s)try{wr(s.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let m=d+1;const h=u.href,g=gv(h).then(x=>yv(x,r)).then(x=>vv(x).forEach(y=>{try{s.insertRule(y,y.startsWith("@import")?m+=1:s.cssRules.length)}catch(w){console.error("Error inserting rule from remote css",{rule:y,error:w})}})).catch(x=>{console.error("Error loading remote css",x.toString())});i.push(g)}})}catch(u){const d=n.find(m=>m.href==null)||document.styleSheets[0];s.href!=null&&i.push(gv(s.href).then(m=>yv(m,r)).then(m=>vv(m).forEach(h=>{d.insertRule(h,d.cssRules.length)})).catch(m=>{console.error("Error loading remote stylesheet",m)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(n.forEach(s=>{if("cssRules"in s)try{wr(s.cssRules||[]).forEach(u=>{o.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${s.href}`,u)}}),o))}function GD(n){return n.filter(r=>r.type===CSSRule.FONT_FACE_RULE).filter(r=>dS(r.style.getPropertyValue("src")))}async function YD(n,r){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=wr(n.ownerDocument.styleSheets),i=await $D(o,r);return GD(i)}function pS(n){return n.trim().replace(/["']/g,"")}function qD(n){const r=new Set;function o(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{r.add(pS(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&o(u)})}return o(n),r}async function VD(n,r){const o=await YD(n,r),i=qD(n);return(await Promise.all(o.filter(u=>i.has(pS(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return mS(u.cssText,d,r)}))).join(`
|
|
450
|
+
`)}async function XD(n,r){const o=r.fontEmbedCSS!=null?r.fontEmbedCSS:r.skipFonts?null:await VD(n,r);if(o){const i=document.createElement("style"),s=document.createTextNode(o);i.appendChild(s),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function FD(n,r={}){const{width:o,height:i}=sS(n,r),s=await Yc(n,r,!0);return await XD(s,r),await hS(s,r),PD(s,r),await fD(s,o,i)}async function KD(n,r={}){const{width:o,height:i}=sS(n,r),s=await FD(n,r),u=await Tc(s),d=document.createElement("canvas"),m=d.getContext("2d"),h=r.pixelRatio||sD(),g=r.canvasWidth||o,x=r.canvasHeight||i;return d.width=g*h,d.height=x*h,r.skipAutoScale||cD(d),d.style.width=`${g}`,d.style.height=`${x}`,r.backgroundColor&&(m.fillStyle=r.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(u,0,0,d.width,d.height),d}async function QD(n,r={}){return(await KD(n,r)).toDataURL()}const bv=224,ZD=2;function WD(n){return new Promise(r=>{window.setTimeout(r,n)})}async function JD(n){var r;if((r=n.fonts)!=null&&r.ready)try{await n.fonts.ready}catch{}}async function ej(n){const r=document.createElement("iframe");r.setAttribute("aria-hidden","true"),r.tabIndex=-1,r.style.position="fixed",r.style.left="-10000px",r.style.top="0",r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.opacity="0",r.style.pointerEvents="none",r.style.border="0",document.body.appendChild(r);try{const o=r.contentDocument;if(!o)throw new Error("Unable to access thumbnail iframe document.");o.open(),o.write(n.htmlSource),o.close(),await JD(o),await WD(50);const i=o.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const s=o.body??i;return await QD(s,{cacheBust:!0,pixelRatio:ZD,canvasWidth:bv,canvasHeight:Math.round(n.height/n.width*bv),backgroundColor:"white",skipFonts:!1})}finally{r.remove()}}const tj=300;function nj(n){const[r,o]=v.useState({}),i=v.useRef(new Map),s=v.useMemo(()=>n.map(u=>({id:u.id,key:`${u.id}:${u.htmlSource}`})),[n]);return v.useEffect(()=>{let u=!1;const d=window.setTimeout(async()=>{const m={};for(const h of n){const g=`${h.id}:${h.htmlSource}`,x=i.current.get(g);if(x){m[h.id]=x;continue}try{const y=await ej(h);i.current.set(g,y),m[h.id]=y}catch{}if(u)return}u||o(h=>({...h,...m}))},tj);return()=>{u=!0,window.clearTimeout(d)}},[n]),v.useEffect(()=>{const u=new Set(s.map(d=>d.key));for(const d of i.current.keys())u.has(d)||i.current.delete(d)},[s]),r}function aj({stageViewportRef:n,slideWidth:r,slideHeight:o}){const[i,s]=v.useState({width:0,height:0});v.useEffect(()=>{const g=n.current;if(!g)return;const x=()=>{const w=g.getBoundingClientRect();s(T=>T.width===w.width&&T.height===w.height?T:{width:w.width,height:w.height})};x();const y=new ResizeObserver(()=>{x()});return y.observe(g),()=>{y.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/r:1,i.height>0?i.height/o:1),d=Number.isFinite(u)&&u>0?u:1,m=r*d,h=o*d;return{scale:d,offsetX:Math.max((i.width-m)/2,0),offsetY:Math.max((i.height-h)/2,0)}}function rj({slides:n,deckTitle:r,isSaving:o=!1,onSlidesChange:i,onDeckTitleChange:s,onExportPdf:u,onExportHtml:d}){const{slides:m,activeSlide:h,activeSlideId:g,undoDepth:x,redoDepth:y,setActiveSlideId:w,commitOperation:T,runUndo:C,runRedo:A}=Q3(n,{onSlidesChange:i}),M=v.useRef(null),R=v.useRef(null),z=v.useRef(null),H=v.useRef(null),Y=v.useRef(null),[J,$]=v.useState(!1),[V,k]=v.useState(!1),K=nj(m),ie=v.useCallback((Q,fe)=>{const me=H.current;me&&me.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Q,clientY:fe,button:2,buttons:2}))},[]),{selectedElementId:se,selectedElementIds:q,preselectedElementId:ue,isEditingText:de,activeGroupScopeId:he,setSelectedElementId:S,setSelectedElementIds:_,beginTextEditing:D,beginGroupEditingScope:O,clearSelection:I,clearPreselection:N,updatePointerPreselection:j,retargetPointerSelection:B}=K3({activeSlide:h,iframeRef:M,onCommitOperation:T,onOpenSelectionContextMenu:ie,onStageWheel:so}),P=h==null?void 0:h.elements.find(Q=>Q.id===se),te=h==null?void 0:h.elements.find(Q=>Q.id===he),ne=q.length>1?"multi":(P==null?void 0:P.type)??(te==null?void 0:te.type)??"block",ae=h?q.map(Q=>h.elements.find(fe=>fe.id===Q)).filter(Q=>!!Q):[],Z={group:q.length>=2&&ae.length===q.length,ungroup:q.length===1&&!!((P==null?void 0:P.type)==="group"||h&&se&&oj(h.htmlSource,se))},oe=!!he&&q.length===1&&se===he,Se=r??"",Te=(h==null?void 0:h.width)||xr,we=(h==null?void 0:h.height)||Sr,{scale:ke,offsetX:ge,offsetY:ct}=aj({stageViewportRef:R,slideWidth:Te,slideHeight:we}),{selectedStageRect:ht,preselectionOverlay:vt,selectionOverlay:Xt,inspectedStyles:Me}=tD({iframeRef:M,activeSlide:h,selectedElement:P,selectedElementIds:q,preselectedElementId:ue,scale:ke,offsetX:ge,offsetY:ct,slideWidth:Te,slideHeight:we}),{manipulationOverlay:Ne,isManipulating:tn,suppressBackgroundClear:pt,beginMove:Ht,beginResize:jt,beginRotate:jr}=R3({activeSlide:h,selectedElement:P,selectedElementId:se,selectedElementIds:q,selectedStageRect:ht,iframeRef:M,stageGeometry:{scale:ke,offsetX:ge,offsetY:ct,slideWidth:Te,slideHeight:we},isEditingText:de,onCommitOperation:T}),At=(Ne==null?void 0:Ne.selectionBounds)??Xt,Mt=se??"slide-root",$n={locked:h?ri(h,Mt,"data-editor-locked"):"",altText:h?ri(h,Mt,"alt"):"",ariaLabel:h?ri(h,Mt,"aria-label"):"",linkUrl:h?ri(h,Mt,"data-link-url"):""};function ea(Q,fe){if(!h)return;const me=i3({elementId:Mt,nextValue:fe,propertyName:Q,slide:h});me&&T(me)}function nn(Q,fe){if(!h)return;const me=s3({attributeName:Q,elementId:Mt,nextValue:fe,slide:h});me&&T(me)}function da(Q){if(!h||q.length===0)return;const fe=q.map(me=>{const Ce=cm(h,me,"z-index"),Xe=Number.parseInt(Ce,10),Be=Number.isFinite(Xe)?Xe:0,Ue=Q==="front"?"999":Q==="back"?"0":String(Math.max(0,Be+(Q==="forward"?1:-1)));return Ce===Ue?null:{type:"style.update",slideId:h.id,elementId:me,propertyName:"z-index",previousValue:Ce,nextValue:Ue,timestamp:Date.now()}}).filter(me=>!!me);Bt(fe)}function Bt(Q){!h||Q.length===0||T(Q.length===1?Q[0]:{type:"operation.batch",slideId:h.id,operations:Q,timestamp:Date.now()})}function pn(Q,fe,me){var Ue;const Ce={[fe]:me},Be=(Ue=new DOMParser().parseFromString(`<template>${Q}</template>`,"text/html").querySelector("template"))==null?void 0:Ue.content.firstElementChild;if(!(Be instanceof HTMLElement))return Ce;for(const He of Be.querySelectorAll(`[${be}]`)){const We=He.getAttribute(be);We&&(Ce[We]=`${me}-${We}`)}return Ce}function Pt(){var Ue;if(!h||q.length===0)return;const Q=(Ue=M.current)==null?void 0:Ue.contentDocument,fe=Q==null?void 0:Q.querySelector(h.rootSelector),me=fe==null?void 0:fe.getBoundingClientRect();let Ce=h.htmlSource;const Xe=[],Be=q.map(He=>{const We=sc(h.htmlSource,He),Qt=ic(h.htmlSource,He),st=Q?Ke(Q,He):null;if(!We||!Qt||!st||!me)return null;const an=Ud(Ce,`${He}-copy`),rn=Rv(We,pn(We,He,an)),gt=um(rS(st.getBoundingClientRect(),me),24,24),Yn=aS(rn,gt);return Ce=`${Ce}
|
|
451
|
+
<!-- ${an} reserved -->`,Xe.push(an),{type:"element.insert",slideId:h.id,elementId:an,...Qt,html:Yn,timestamp:Date.now()}}).filter(He=>!!He);Bt(Be),Xe.length&&_(Xe)}function gn(){if(!h||q.length===0)return;const Q=q.map(fe=>{const me=sc(h.htmlSource,fe),Ce=ic(h.htmlSource,fe);return!me||!Ce?null:{type:"element.remove",slideId:h.id,elementId:fe,...Ce,html:me,timestamp:Date.now()}}).filter(fe=>!!fe);Bt(Q),Q.length&&_([])}function zt(Q){if(!h||m.length<=1)return!1;const fe=m.findIndex(Xe=>Xe.id===h.id);if(fe<0)return!1;const me=Q==="previous"?Math.max(0,fe-1):Math.min(m.length-1,fe+1),Ce=m[me];return!Ce||Ce.id===h.id?!1:(w(Ce.id),S(null),!0)}function so(Q){if(q.length||de||tn)return;const fe=Math.abs(Q.deltaY)>=Math.abs(Q.deltaX)?Q.deltaY:Q.deltaX;Math.abs(fe)<24||zt(fe>0?"next":"previous")&&(Q.preventDefault(),Q.stopPropagation())}function ma(Q){if(!h||m.length===0)return;const fe=ME(m,Q);T({type:"slide.create",slide:fe,index:Q,timestamp:Date.now()}),w(fe.id),I()}function Mn(){if(!h)return;const Q=m.findIndex(me=>me.id===h.id),fe=Q>=0?Q+1:m.length;ma(fe)}function Pa(Q){const fe=m.findIndex(me=>me.id===Q);fe<0||ma(fe)}function $a(Q){const fe=m.findIndex(me=>me.id===Q);fe<0||ma(fe+1)}function ha(Q){const fe=m.find(Be=>Be.id===Q);if(!fe)return;const me=m.findIndex(Be=>Be.id===Q),Ce=me>=0?me+1:m.length,Xe=_E(m,fe);T({type:"slide.duplicate",sourceSlideId:Q,slide:Xe,index:Ce,timestamp:Date.now()}),w(Xe.id),I()}function _n(Q){if(m.length<=1)return;const fe=m.findIndex(Xe=>Xe.id===Q),me=m[fe];if(!me)return;const Ce=m[fe+1]??m[fe-1]??m[0];T({type:"slide.delete",slide:me,index:fe,timestamp:Date.now()}),g===Q&&w((Ce==null?void 0:Ce.id)??""),I()}function De(Q){const fe=m.find(me=>me.id===Q);fe&&T({type:"slide.visibility.update",slideId:Q,previousHidden:fe.hidden===!0,nextHidden:fe.hidden!==!0,timestamp:Date.now()})}function it(Q,fe){const me=m.find(Xe=>Xe.id===Q),Ce=fe.trim()||"Untitled Slide";!me||me.title===Ce||T({type:"slide.title.update",slideId:Q,previousTitle:me.title,nextTitle:Ce,timestamp:Date.now()})}function _t(Q,fe){const me=m.findIndex(Ce=>Ce.id===Q);me<0||me===fe||(T({type:"slide.reorder",slideId:Q,fromIndex:me,toIndex:fe,timestamp:Date.now()}),w(Q))}function Ut(){if(!h||q.length<2)return;const Q=Gn(),fe=Ud(h.htmlSource,"group-1"),me=yE({html:h.htmlSource,slideId:h.id,groupElementId:fe,elementRects:Q,elementIds:q});me&&(T(me),_([fe]))}function Gn(Q){var Qt;const fe=(Qt=M.current)==null?void 0:Qt.contentDocument,me=fe==null?void 0:fe.querySelector((h==null?void 0:h.rootSelector)??"");if(!fe||!me)return{};const Ce=me.getBoundingClientRect(),Xe=h?h.width/Ce.width:1,Be=h?h.height/Ce.height:1,Ue={},He=xv(fe,Q),We=[...Array.from(fe.querySelectorAll(`[data-editable][${be}]`)),...Array.from(He.keys())];for(const st of We){const an=st.getAttribute(be)||He.get(st);if(!an)continue;const rn=st.getBoundingClientRect(),gt=st.parentElement,Yn=gt!=null&>.hasAttribute("data-editable")&>.getAttribute(be)?gt.getAttribute(be):null,yt=Yn?Ue[Yn]??{x:0,y:0,width:Ce.width,height:Ce.height}:{x:0,y:0,width:Ce.width,height:Ce.height};Ue[an]={x:(rn.left-Ce.left)*Xe-yt.x,y:(rn.top-Ce.top)*Be-yt.y,width:rn.width*Xe,height:rn.height*Be}}return Ue}function ut(){if(!h||q.length!==1||!se)return;const Q=vE({html:h.htmlSource,slideId:h.id,groupElementId:se,elementRects:Gn(se),elementPresentationStyles:Ft(se)});Q&&(T(Q),_(Q.childElementIds))}function Ft(Q){var Be,Ue,He;const fe=(Be=M.current)==null?void 0:Be.contentDocument;if(!fe)return{};const me=Ke(fe,Q);if(!me||me.getAttribute("data-group")==="true")return{};const Ce={},Xe=xv(fe,Q);for(const We of Array.from(me.children)){if(!We.hasAttribute("data-editable")&&!eh(We))continue;const Qt=We.getAttribute(be)||Xe.get(We),st=(Ue=We.ownerDocument.defaultView)==null?void 0:Ue.getComputedStyle(We);if(!(!Qt||!st)){Ce[Qt]={color:st.color,fontSize:st.fontSize,fontWeight:st.fontWeight,fontStyle:st.fontStyle,lineHeight:st.lineHeight,textAlign:st.textAlign,paddingTop:st.paddingTop,paddingRight:st.paddingRight,paddingBottom:st.paddingBottom,paddingLeft:st.paddingLeft,listStylePosition:st.listStylePosition,listStyleType:st.listStyleType};for(const an of Array.from(We.querySelectorAll(`[data-editable][${be}]`))){const rn=an.getAttribute(be),gt=(He=an.ownerDocument.defaultView)==null?void 0:He.getComputedStyle(an);!rn||!gt||(Ce[rn]={color:gt.color,fontSize:gt.fontSize,fontWeight:gt.fontWeight,fontStyle:gt.fontStyle,lineHeight:gt.lineHeight,textAlign:gt.textAlign})}}}return Ce}function pa(Q){if(!h||!se||!At)return;const fe=cm(h,se,"transform"),me={x:(At.x-ge)/ke,y:(At.y-ct)/ke,width:At.width/ke,height:At.height/ke};let Ce=0,Xe=0;if(Q==="left"?Ce=-me.x:Q==="hcenter"?Ce=Te/2-(me.x+me.width/2):Q==="right"?Ce=Te-(me.x+me.width):Q==="top"?Xe=-me.y:Q==="vcenter"?Xe=we/2-(me.y+me.height/2):Q==="bottom"&&(Xe=we-(me.y+me.height)),Math.abs(Ce)<.01&&Math.abs(Xe)<.01)return;const Be=Kn(fe);ea("transform",La(Be.translateX+Ce,Be.translateY+Xe,Be.rotate)??"")}function Kt(Q){var Yn;if(!h||q.length<3)return;const fe=(Yn=M.current)==null?void 0:Yn.contentDocument,me=fe==null?void 0:fe.querySelector(h.rootSelector),Ce=me==null?void 0:me.getBoundingClientRect();if(!fe||!Ce)return;const Xe=q.map(yt=>{const on=Ke(fe,yt);if(!on)return null;const Nn=on.getBoundingClientRect();return{elementId:yt,node:on,rect:{x:Nn.left-Ce.left,y:Nn.top-Ce.top,width:Nn.width,height:Nn.height}}}).filter(yt=>!!yt);if(Xe.length<3)return;const Be=Q==="vertical"?"y":"x",Ue=Q==="vertical"?"height":"width",He=[...Xe].sort((yt,on)=>yt.rect[Be]-on.rect[Be]),We=He[0],Qt=He[He.length-1];if(!We||!Qt)return;const st=We.rect[Be]+We.rect[Ue]/2,rn=(Qt.rect[Be]+Qt.rect[Ue]/2-st)/(He.length-1),gt=He.map((yt,on)=>{const Nn=st+rn*on,Ga=yt.rect[Be]+yt.rect[Ue]/2,bt=Nn-Ga;if(Math.abs(bt)<.01)return null;const zr=ci(yt.node),co=Kn(zr.transform),ga=Ld({...zr,transform:La(co.translateX+(Be==="x"?bt:0),co.translateY+(Be==="y"?bt:0),co.rotate),transformOrigin:zr.transformOrigin||"center center"});return{type:"element.layout.update",slideId:h.id,elementId:yt.elementId,previousStyle:zr,nextStyle:ga,timestamp:Date.now()}}).filter(yt=>!!yt);Bt(gt)}return P3({activeSlide:h,selectedElementIds:q,iframeRef:M,slideWidth:Te,slideHeight:we,isEditingText:de,canUndo:x>0,canRedo:y>0,onCommitOperation:T,onSelectElementIds:_,onEscapeSelection:I,onNavigateSlide:zt,onUndo:C,onRedo:A}),h?p.jsx(l3,{children:p.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[p.jsxs("div",{className:`flex min-h-0 flex-auto flex-col ${J?"invisible pointer-events-none absolute inset-0":""}`,children:[p.jsx(eA,{title:Se,onTitleChange:s,isSaving:o,onPresent:()=>{I(),$(!0)},onExportHtml:d,pdfSlides:m.map(Q=>({id:Q.id,title:Q.title,file:Q.sourceFile})),pdfThumbnails:K,onExportPdf:u}),p.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[p.jsx(Z5,{slides:m,activeSlideId:h.id,slideCount:m.length,thumbnails:K,onSelectSlide:Q=>{w(Q),S(null)},onAdd:Mn,onAddSlideAbove:Pa,onAddSlideBelow:$a,onDuplicate:ha,onDelete:_n,onToggleHidden:De,onRename:it,onReorder:_t}),p.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:p.jsx(r3,{slideWidth:Te,slideHeight:we,offsetX:ge,offsetY:ct,scale:ke,preselectionOverlay:vt,selectionOverlay:At,toolbarKey:q.length?`${h.id}:${q.join(",")}`:null,inspectedStyles:Me,selectedElementType:ne,selectionCommandAvailability:Z,groupScopeOverlayPassive:oe,isEditingText:de,manipulationOverlay:Ne,iframeRef:M,stageViewportRef:R,selectionOverlayRef:z,selectionContextMenuTriggerRef:H,isManipulating:tn,isToolbarSuppressed:V,onSelectionOverlayMouseDown:Q=>{if(Q.button!==0||!q.length)return;k(!0);const fe=Q.shiftKey||Q.metaKey||Q.ctrlKey,me=j(Q.clientX,Q.clientY);if(Y.current={clientX:Q.clientX,clientY:Q.clientY,additive:fe,targetElementId:me},me&&me!==se){Q.stopPropagation();return}me&&me===se&&Q.stopPropagation(),Ht({clientX:Q.clientX,clientY:Q.clientY,preventDefault:()=>Q.preventDefault(),stopPropagation:()=>Q.stopPropagation()})},onSelectionOverlayMouseMove:Q=>{const fe=Y.current;if(j(Q.clientX,Q.clientY),!fe||fe.targetElementId===se)return;const me=Q.clientX-fe.clientX,Ce=Q.clientY-fe.clientY;Math.hypot(me,Ce)<=4||(Y.current=null,Ht({clientX:fe.clientX,clientY:fe.clientY,preventDefault:()=>Q.preventDefault(),stopPropagation:()=>Q.stopPropagation()}))},onSelectionOverlayContextMenu:Q=>{Q.preventDefault(),Q.stopPropagation(),ie(Q.clientX,Q.clientY)},onSelectionOverlayMouseUp:Q=>{const fe=Y.current;if(Y.current=null,k(!1),!fe)return;const me=Q.clientX-fe.clientX,Ce=Q.clientY-fe.clientY;Math.hypot(me,Ce)>4||B(Q.clientX,Q.clientY,fe.additive)},onStageMouseLeave:N,onResizeHandleMouseDown:(Q,fe)=>{q.length&&jt(Q,{clientX:fe.clientX,clientY:fe.clientY,preventDefault:()=>fe.preventDefault(),stopPropagation:()=>fe.stopPropagation()})},onRotateHandleMouseDown:Q=>{q.length===1&&jr({clientX:Q.clientX,clientY:Q.clientY,preventDefault:()=>Q.preventDefault(),stopPropagation:()=>Q.stopPropagation()})},onSelectionOverlayDoubleClick:Q=>{var fe;if(he&&((fe=M.current)!=null&&fe.contentDocument)){const me=M.current.getBoundingClientRect(),Ce=M.current.contentDocument,Xe=me.width/M.current.clientWidth||1,Be=me.height/M.current.clientHeight||1,Ue={x:(Q.clientX-me.left)/Xe,y:(Q.clientY-me.top)/Be},He=lj(Ce,he,Ue),We=He==null?void 0:He.getAttribute(be);if(We){D(We);return}}if(q.length===1&&(P==null?void 0:P.type)==="text"&&se){D(se);return}q.length===1&&(P==null?void 0:P.type)==="group"&&se&&O(se)},onBackgroundClick:()=>{pt||I()},onStageWheel:so,onStyleChange:ea,onAttributeChange:nn,onAlignToSlide:pa,onDistribute:Kt,onGroup:Ut,onLayerOrder:da,onUngroup:ut,onDuplicate:Pt,onDelete:gn,attributeValues:$n})})]})]}),J?p.jsx(Q5,{slides:m,startSlideId:h.id,onExit:()=>$(!1)}):null]})}):p.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}function oj(n,r){if(typeof DOMParser>"u")return!1;const o=new DOMParser().parseFromString(n,"text/html"),i=Ke(o,r);return!i||i.getAttribute("data-editable")!=="block"?!1:Array.from(i.children).some(s=>s instanceof HTMLElement&&(s.hasAttribute("data-editable")||eh(s)))}function xv(n,r){const o=new Map;if(!r)return o;const i=Ke(n,r);if(!i||i.getAttribute("data-group")==="true")return o;const s=new Set(Array.from(n.querySelectorAll(`[${be}]`)).map(d=>d.getAttribute(be)).filter(d=>!!d)),u=d=>{if(!s.has(d))return s.add(d),d;const m=d.match(/^(.*?)(?:-(\d+))?$/),h=(m==null?void 0:m[1])||d;let g=Number.parseInt((m==null?void 0:m[2])||"1",10)+1;for(;s.has(`${h}-${g}`);)g+=1;const x=`${h}-${g}`;return s.add(x),x};for(const d of Array.from(i.children))eh(d)&&o.set(d,d.getAttribute(be)||u("block-1"));return o}function eh(n){const r=n.tagName.toLowerCase();return r!=="ul"&&r!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}function lj(n,r,o){const i=Ke(n,r);if(!i)return null;const s=n.elementFromPoint(o.x,o.y),u=s==null?void 0:s.closest(`[data-editable="text"][${be}]`);if(u&&i.contains(u))return u;const d=Array.from(i.querySelectorAll(`[data-editable="text"][${be}]`)),m=d.find(g=>{const x=g.getBoundingClientRect();return o.x>=x.left&&o.x<=x.right&&o.y>=x.top&&o.y<=x.bottom});if(m)return m;const h=d.map(g=>{const x=g.getBoundingClientRect(),y=Math.min(Math.max(o.x,x.left),x.right),w=Math.min(Math.max(o.y,x.top),x.bottom);return{candidate:g,distance:Math.hypot(o.x-y,o.y-w)}}).sort((g,x)=>g.distance-x.distance)[0];return h&&h.distance<=24?h.candidate:null}const ij="/deck/manifest.json",sj="/__editor/save-generated-deck",cj="/__editor/export-pdf",uj="/__editor/export-html",zd=800;function fj(){const[n,r]=v.useState("Generated deck"),[o,i]=v.useState([]),[s,u]=v.useState(null),[d,m]=v.useState(!0),[h,g]=v.useState(!1),x=v.useRef(null),y=v.useRef([]),w=v.useRef(null),T=v.useRef(null),C=v.useRef(null),A=v.useRef(0),M=v.useRef(!1),R=v.useRef(null),z=v.useRef(Date.now());v.useEffect(()=>{let k=!1;return RE({manifestUrl:`${ij}?v=${Date.now()}`}).then(K=>{if(k)return;if(!K){r("Generated deck"),i([]),u("No slides were found at /deck/manifest.json."),m(!1);return}x.current=K.manifest;const ie=K.manifest.topic||"Generated deck";T.current=ie,r(ie),i(K.slides),y.current=K.slides,u(null),m(!1)}).catch(()=>{k||(r("Generated deck"),i([]),u("The app could not load the generated deck."),m(!1))}),()=>{k=!0,C.current&&window.clearTimeout(C.current)}},[]);const H=async()=>{var he;const k=x.current,K=w.current??y.current,ie=T.current??n,se=A.current;if(!((he=k==null?void 0:k.slides)!=null&&he.length)||!(K!=null&&K.length))return;if(M.current){await R.current,A.current!==se&&await H();return}M.current=!0;const q=new Map(y.current.map((S,_)=>{var D,O;return[S.id,S.sourceFile??((O=(D=k.slides)==null?void 0:D[_])==null?void 0:O.file)]})),ue=K.flatMap(S=>{const _=S.sourceFile??q.get(S.id);return _?[{file:_,title:S.title,hidden:S.hidden===!0?!0:void 0}]:[]}),de=fetch(sj,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:z.current,manifest:{...k,topic:ie,slides:ue},slides:K.map(S=>({file:S.sourceFile??q.get(S.id),htmlSource:S.htmlSource,title:S.title,hidden:S.hidden===!0}))})}).then(S=>{if(!S.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(S=>{throw u("The app could not write generated slides back to disk."),S}).finally(()=>{if(M.current=!1,R.current=null,A.current!==se){C.current||(C.current=window.setTimeout(()=>{C.current=null,H()},zd));return}g(!1)});R.current=de,await de};return{deckTitle:n,slides:o,errorMessage:s,isLoading:d,isSaving:h,saveSlides:k=>{var ie;if(y.current===k)return;const K=x.current;(ie=K==null?void 0:K.slides)!=null&&ie.length&&(y.current=k,w.current=k,A.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,H()},zd))},saveDeckTitle:k=>{const K=k.trim()||"Untitled deck";r(k),T.current=K,A.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,H()},zd)},exportPdf:async k=>{C.current&&(window.clearTimeout(C.current),C.current=null),await H();const K=await fetch(cj,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:k})});if(!K.ok)throw new Error(await K.text());const ie=await K.blob(),se=URL.createObjectURL(ie),q=document.createElement("a"),ue=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";q.href=se,q.download=`${ue}.pdf`,document.body.appendChild(q),q.click(),q.remove(),URL.revokeObjectURL(se)},exportHtml:async()=>{C.current&&(window.clearTimeout(C.current),C.current=null),await H();const k=await fetch(uj,{method:"POST"});if(!k.ok)throw new Error(await k.text());const K=await k.blob(),ie=URL.createObjectURL(K),se=document.createElement("a"),q=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";se.href=ie,se.download=`${q}.html`,document.body.appendChild(se),se.click(),se.remove(),URL.revokeObjectURL(ie)}}}function Sv({title:n,body:r}){return p.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:p.jsxs("section",{style:{maxWidth:"720px",padding:"32px",borderRadius:"24px",background:"rgba(255, 255, 255, 0.82)",boxShadow:"0 24px 80px rgba(74, 53, 31, 0.12)"},children:[p.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),p.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:r})]})})}function dj(){const{deckTitle:n,slides:r,errorMessage:o,isLoading:i,isSaving:s,saveSlides:u,saveDeckTitle:d,exportPdf:m,exportHtml:h}=fj();return i?p.jsx(Sv,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):o?p.jsx(Sv,{title:"Generated deck required",body:o}):p.jsxs(p.Fragment,{children:[p.jsx(cE,{position:"top-center",richColors:!0,closeButton:!0}),p.jsx(rj,{slides:r,deckTitle:n,isSaving:s,onSlidesChange:u,onDeckTitleChange:d,onExportPdf:g=>{const x=vr.loading("Exporting PDF...");m(g).then(()=>{vr.success("PDF export is ready.",{id:x})}).catch(y=>{vr.error("PDF export failed.",{id:x,description:y instanceof Error?y.message:String(y)})})},onExportHtml:()=>{const g=vr.loading("Exporting HTML...");h().then(()=>{vr.success("HTML export is ready.",{id:g})}).catch(x=>{vr.error("HTML export failed.",{id:g,description:x instanceof Error?x.message:String(x)})})}})]})}const gS=document.getElementById("root");if(!gS)throw new Error("Root element #root was not found.");L2.createRoot(gS).render(p.jsx(pe.StrictMode,{children:p.jsx(dj,{})}));
|