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.
Files changed (160) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +131 -0
  3. package/dist/assets/index---ub3Dty.css +1 -0
  4. package/dist/assets/index-7Xs_Dyp0.js +354 -0
  5. package/dist/assets/index-8ul7coaw.js +451 -0
  6. package/dist/assets/index-B4_bJa9t.js +412 -0
  7. package/dist/assets/index-B9p6L9Wx.js +324 -0
  8. package/dist/assets/index-BF-Vi1Nh.js +413 -0
  9. package/dist/assets/index-BKvVbgXz.css +1 -0
  10. package/dist/assets/index-BNZJ_Wz-.js +417 -0
  11. package/dist/assets/index-BO2gtiKn.js +413 -0
  12. package/dist/assets/index-BYpD8kgo.js +456 -0
  13. package/dist/assets/index-BaZRfz_9.css +1 -0
  14. package/dist/assets/index-BlsWm4PI.js +412 -0
  15. package/dist/assets/index-BnUIBFtw.js +393 -0
  16. package/dist/assets/index-BvhCbfCi.js +412 -0
  17. package/dist/assets/index-BxEkxfy1.js +412 -0
  18. package/dist/assets/index-BzrA7O0L.js +422 -0
  19. package/dist/assets/index-C0xGkdRg.js +413 -0
  20. package/dist/assets/index-C1Rjncf1.js +456 -0
  21. package/dist/assets/index-CCgb2gqc.js +413 -0
  22. package/dist/assets/index-CDFJQRFx.js +413 -0
  23. package/dist/assets/index-CEOai0RW.js +456 -0
  24. package/dist/assets/index-CG2uWTey.css +1 -0
  25. package/dist/assets/index-CLe3_iTu.js +412 -0
  26. package/dist/assets/index-CS_optob.js +324 -0
  27. package/dist/assets/index-CXgwXOZH.css +1 -0
  28. package/dist/assets/index-CcBvAcE2.js +408 -0
  29. package/dist/assets/index-CllmR_MT.js +408 -0
  30. package/dist/assets/index-CnMy6wxq.js +412 -0
  31. package/dist/assets/index-CoWNjYgb.js +422 -0
  32. package/dist/assets/index-CtfA3BPy.css +1 -0
  33. package/dist/assets/index-D-JiuJIv.js +324 -0
  34. package/dist/assets/index-D2uEYXyQ.css +1 -0
  35. package/dist/assets/index-D70beOHW.js +456 -0
  36. package/dist/assets/index-D8xuxnF1.js +456 -0
  37. package/dist/assets/index-DKAtkRd8.css +1 -0
  38. package/dist/assets/index-DU3l9_k0.css +1 -0
  39. package/dist/assets/index-DaLY98jk.js +456 -0
  40. package/dist/assets/index-DkNHJHQl.js +412 -0
  41. package/dist/assets/index-DmFnifK8.js +456 -0
  42. package/dist/assets/index-DndZR7Ds.css +1 -0
  43. package/dist/assets/index-DuRa7Y6g.js +324 -0
  44. package/dist/assets/index-EnDjTeHF.js +451 -0
  45. package/dist/assets/index-J3nQgjqJ.js +451 -0
  46. package/dist/assets/index-wD_iWTBn.js +413 -0
  47. package/dist/chunk-AK5J4CXH.js +1671 -0
  48. package/dist/chunk-ARFDESSF.js +1583 -0
  49. package/dist/chunk-DHWTBXGS.js +985 -0
  50. package/dist/chunk-FCRRFL7N.js +1571 -0
  51. package/dist/chunk-J7W4Y7WJ.js +1620 -0
  52. package/dist/chunk-OCJULB7Z.js +1140 -0
  53. package/dist/chunk-WCJWV5SO.js +36 -0
  54. package/dist/cli/index.d.ts +2 -0
  55. package/dist/cli/index.js +1119 -0
  56. package/dist/cli/index.test.d.ts +1 -0
  57. package/dist/core/deck-slide-operations.d.ts +5 -0
  58. package/dist/core/generated-deck.d.ts +8 -0
  59. package/dist/core/generated-deck.test.d.ts +1 -0
  60. package/dist/core/group-operations.d.ts +24 -0
  61. package/dist/core/history.d.ts +20 -0
  62. package/dist/core/history.test.d.ts +1 -0
  63. package/dist/core/html-export.d.ts +20 -0
  64. package/dist/core/index.d.ts +11 -0
  65. package/dist/core/layout.d.ts +36 -0
  66. package/dist/core/layout.test.d.ts +1 -0
  67. package/dist/core/pdf-export.d.ts +20 -0
  68. package/dist/core/presentation.d.ts +7 -0
  69. package/dist/core/slide-contract.d.ts +41 -0
  70. package/dist/core/slide-document.d.ts +5 -0
  71. package/dist/core/slide-document.test.d.ts +1 -0
  72. package/dist/core/slide-html-document.d.ts +3 -0
  73. package/dist/core/slide-operation-reducer.d.ts +4 -0
  74. package/dist/core/slide-operation-reducer.test.d.ts +1 -0
  75. package/dist/core/slide-operation-types.d.ts +123 -0
  76. package/dist/core/slide-operations-helpers.d.ts +14 -0
  77. package/dist/core/slide-operations.d.ts +5 -0
  78. package/dist/core/slide-operations.test.d.ts +1 -0
  79. package/dist/core/verify-deck.d.ts +48 -0
  80. package/dist/core/verify-deck.test.d.ts +1 -0
  81. package/dist/editor/app/App.d.ts +2 -0
  82. package/dist/editor/app/main.d.ts +1 -0
  83. package/dist/editor/app/use-slides-data.d.ts +14 -0
  84. package/dist/editor/components/block-manipulation-overlay.d.ts +32 -0
  85. package/dist/editor/components/color-picker.d.ts +10 -0
  86. package/dist/editor/components/context-menu.d.ts +26 -0
  87. package/dist/editor/components/editor-header.d.ts +18 -0
  88. package/dist/editor/components/floating-toolbar-feature.d.ts +8 -0
  89. package/dist/editor/components/floating-toolbar-parts.d.ts +46 -0
  90. package/dist/editor/components/floating-toolbar.d.ts +27 -0
  91. package/dist/editor/components/presenter-view.d.ts +13 -0
  92. package/dist/editor/components/slide-sidebar.d.ts +18 -0
  93. package/dist/editor/components/stage-canvas.d.ts +77 -0
  94. package/dist/editor/components/ui/accordion.d.ts +7 -0
  95. package/dist/editor/components/ui/button.d.ts +10 -0
  96. package/dist/editor/components/ui/context-menu.d.ts +25 -0
  97. package/dist/editor/components/ui/dialog.d.ts +10 -0
  98. package/dist/editor/components/ui/input.d.ts +3 -0
  99. package/dist/editor/components/ui/popover.d.ts +10 -0
  100. package/dist/editor/components/ui/scroll-area.d.ts +5 -0
  101. package/dist/editor/components/ui/select.d.ts +15 -0
  102. package/dist/editor/components/ui/separator.d.ts +4 -0
  103. package/dist/editor/components/ui/tabs.d.ts +11 -0
  104. package/dist/editor/components/ui/textarea.d.ts +3 -0
  105. package/dist/editor/components/ui/toggle-group.d.ts +9 -0
  106. package/dist/editor/components/ui/toggle.d.ts +9 -0
  107. package/dist/editor/components/ui/tooltip.d.ts +7 -0
  108. package/dist/editor/editor-operations.d.ts +15 -0
  109. package/dist/editor/hooks/block-manipulation-geometry.d.ts +16 -0
  110. package/dist/editor/hooks/block-manipulation-operations.d.ts +10 -0
  111. package/dist/editor/hooks/block-manipulation-overlay.d.ts +11 -0
  112. package/dist/editor/hooks/block-manipulation-types.d.ts +73 -0
  113. package/dist/editor/hooks/editor-keyboard-geometry.d.ts +22 -0
  114. package/dist/editor/hooks/editor-keyboard-operations.d.ts +10 -0
  115. package/dist/editor/hooks/editor-keyboard-types.d.ts +35 -0
  116. package/dist/editor/hooks/iframe-editing-session.d.ts +10 -0
  117. package/dist/editor/hooks/iframe-text-editing-dom.d.ts +6 -0
  118. package/dist/editor/hooks/iframe-text-editing-types.d.ts +38 -0
  119. package/dist/editor/hooks/object-clipboard-commands.d.ts +28 -0
  120. package/dist/editor/hooks/use-block-manipulation.d.ts +3 -0
  121. package/dist/editor/hooks/use-editor-keyboard-shortcuts.d.ts +3 -0
  122. package/dist/editor/hooks/use-iframe-text-editing.d.ts +3 -0
  123. package/dist/editor/hooks/use-slide-history.d.ts +17 -0
  124. package/dist/editor/hooks/use-slide-inspector.d.ts +24 -0
  125. package/dist/editor/hooks/use-slide-thumbnails.d.ts +2 -0
  126. package/dist/editor/hooks/use-stage-viewport.d.ts +13 -0
  127. package/dist/editor/index.d.ts +13 -0
  128. package/dist/editor/index.js +8260 -0
  129. package/dist/editor/lib/block-snap-constants.d.ts +8 -0
  130. package/dist/editor/lib/block-snap-guides.d.ts +6 -0
  131. package/dist/editor/lib/block-snap-targets.d.ts +13 -0
  132. package/dist/editor/lib/block-snap-types.d.ts +30 -0
  133. package/dist/editor/lib/block-snapping.d.ts +17 -0
  134. package/dist/editor/lib/collect-css-properties.d.ts +5 -0
  135. package/dist/editor/lib/element-tool-commit.d.ts +18 -0
  136. package/dist/editor/lib/element-tool-model.d.ts +16 -0
  137. package/dist/editor/lib/element-tool-types.d.ts +35 -0
  138. package/dist/editor/lib/element-tool-values.d.ts +23 -0
  139. package/dist/editor/lib/motion.d.ts +8 -0
  140. package/dist/editor/lib/selection-overlay.d.ts +4 -0
  141. package/dist/editor/lib/style-controls.d.ts +17 -0
  142. package/dist/editor/lib/thumbnail-renderer.d.ts +2 -0
  143. package/dist/editor/lib/utils.d.ts +3 -0
  144. package/dist/index.html +13 -0
  145. package/dist/node/deck-runtime-middleware.d.ts +8 -0
  146. package/dist/node/deck-source.d.ts +1 -0
  147. package/dist/node/html-export.d.ts +16 -0
  148. package/dist/node/open-browser.d.ts +1 -0
  149. package/dist/node/pdf-export.d.ts +20 -0
  150. package/dist/node/ports.d.ts +1 -0
  151. package/dist/node/view-renderer.d.ts +31 -0
  152. package/dist/runtime/deck-source.d.ts +1 -0
  153. package/dist/runtime/html-export.d.ts +16 -0
  154. package/dist/runtime/open-browser.d.ts +1 -0
  155. package/dist/runtime/pdf-export.d.ts +20 -0
  156. package/dist/runtime/ports.d.ts +1 -0
  157. package/dist/runtime/view-renderer.d.ts +31 -0
  158. package/dist/runtime/view-renderer.test.d.ts +1 -0
  159. package/dist/test/deck-fixtures.d.ts +14 -0
  160. package/package.json +94 -0
@@ -0,0 +1,393 @@
1
+ function pw(n,l){for(var r=0;r<l.length;r++){const i=l[r];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in n)){const u=Object.getOwnPropertyDescriptor(i,c);u&&Object.defineProperty(n,c,u.get?u:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const u of c)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 r(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(c){if(c.ep)return;c.ep=!0;const u=r(c);fetch(c.href,u)}})();function Dd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var wf={exports:{}},jr={};/**
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 iy;function gw(){if(iy)return jr;iy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(i,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var m in c)m!=="key"&&(u[m]=c[m])}else u=c;return c=u.ref,{$$typeof:n,type:i,key:d,ref:c!==void 0?c:null,props:u}}return jr.Fragment=l,jr.jsx=r,jr.jsxs=r,jr}var sy;function yw(){return sy||(sy=1,wf.exports=gw()),wf.exports}var v=yw(),Ef={exports:{}},De={};/**
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 cy;function vw(){if(cy)return De;cy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),S=Symbol.iterator;function E(R){return R===null||typeof R!="object"?null:(R=S&&R[S]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,A={};function _(R,B,Z){this.props=R,this.context=B,this.refs=A,this.updater=Z||C}_.prototype.isReactComponent={},_.prototype.setState=function(R,B){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,B,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function z(){}z.prototype=_.prototype;function N(R,B,Z){this.props=R,this.context=B,this.refs=A,this.updater=Z||C}var L=N.prototype=new z;L.constructor=N,T(L,_.prototype),L.isPureReactComponent=!0;var J=Array.isArray;function H(){}var I={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function te(R,B,Z){var ne=Z.ref;return{$$typeof:n,type:R,key:B,ref:ne!==void 0?ne:null,props:Z}}function re(R,B){return te(R.type,B,R.props)}function ue(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function X(R){var B={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(Z){return B[Z]})}var Q=/\/+/g;function K(R,B){return typeof R=="object"&&R!==null&&R.key!=null?X(""+R.key):B.toString(36)}function G(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(H,H):(R.status="pending",R.then(function(B){R.status==="pending"&&(R.status="fulfilled",R.value=B)},function(B){R.status==="pending"&&(R.status="rejected",R.reason=B)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function M(R,B,Z,ne,W){var ce=typeof R;(ce==="undefined"||ce==="boolean")&&(R=null);var se=!1;if(R===null)se=!0;else switch(ce){case"bigint":case"string":case"number":se=!0;break;case"object":switch(R.$$typeof){case n:case l:se=!0;break;case b:return se=R._init,M(se(R._payload),B,Z,ne,W)}}if(se)return W=W(R),se=ne===""?"."+K(R,0):ne,J(W)?(Z="",se!=null&&(Z=se.replace(Q,"$&/")+"/"),M(W,B,Z,"",function(Ae){return Ae})):W!=null&&(ue(W)&&(W=re(W,Z+(W.key==null||R&&R.key===W.key?"":(""+W.key).replace(Q,"$&/")+"/")+se)),B.push(W)),1;se=0;var ge=ne===""?".":ne+":";if(J(R))for(var pe=0;pe<R.length;pe++)ne=R[pe],ce=ge+K(ne,pe),se+=M(ne,B,Z,ce,W);else if(pe=E(R),typeof pe=="function")for(R=pe.call(R),pe=0;!(ne=R.next()).done;)ne=ne.value,ce=ge+K(ne,pe++),se+=M(ne,B,Z,ce,W);else if(ce==="object"){if(typeof R.then=="function")return M(G(R),B,Z,ne,W);throw B=String(R),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return se}function D(R,B,Z){if(R==null)return R;var ne=[],W=0;return M(R,ne,"","",function(ce){return B.call(Z,ce,W++)}),ne}function V(R){if(R._status===-1){var B=R._result;B=B(),B.then(function(Z){(R._status===0||R._status===-1)&&(R._status=1,R._result=Z)},function(Z){(R._status===0||R._status===-1)&&(R._status=2,R._result=Z)}),R._status===-1&&(R._status=0,R._result=B)}if(R._status===1)return R._result.default;throw R._result}var Y=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},q={map:D,forEach:function(R,B,Z){D(R,function(){B.apply(this,arguments)},Z)},count:function(R){var B=0;return D(R,function(){B++}),B},toArray:function(R){return D(R,function(B){return B})||[]},only:function(R){if(!ue(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return De.Activity=h,De.Children=q,De.Component=_,De.Fragment=r,De.Profiler=c,De.PureComponent=N,De.StrictMode=i,De.Suspense=p,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,De.__COMPILER_RUNTIME={__proto__:null,c:function(R){return I.H.useMemoCache(R)}},De.cache=function(R){return function(){return R.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(R,B,Z){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ne=T({},R.props),W=R.key;if(B!=null)for(ce in B.key!==void 0&&(W=""+B.key),B)!k.call(B,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&B.ref===void 0||(ne[ce]=B[ce]);var ce=arguments.length-2;if(ce===1)ne.children=Z;else if(1<ce){for(var se=Array(ce),ge=0;ge<ce;ge++)se[ge]=arguments[ge+2];ne.children=se}return te(R.type,W,ne)},De.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:u,_context:R},R},De.createElement=function(R,B,Z){var ne,W={},ce=null;if(B!=null)for(ne in B.key!==void 0&&(ce=""+B.key),B)k.call(B,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(W[ne]=B[ne]);var se=arguments.length-2;if(se===1)W.children=Z;else if(1<se){for(var ge=Array(se),pe=0;pe<se;pe++)ge[pe]=arguments[pe+2];W.children=ge}if(R&&R.defaultProps)for(ne in se=R.defaultProps,se)W[ne]===void 0&&(W[ne]=se[ne]);return te(R,ce,W)},De.createRef=function(){return{current:null}},De.forwardRef=function(R){return{$$typeof:m,render:R}},De.isValidElement=ue,De.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:V}},De.memo=function(R,B){return{$$typeof:g,type:R,compare:B===void 0?null:B}},De.startTransition=function(R){var B=I.T,Z={};I.T=Z;try{var ne=R(),W=I.S;W!==null&&W(Z,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(H,Y)}catch(ce){Y(ce)}finally{B!==null&&Z.types!==null&&(B.types=Z.types),I.T=B}},De.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},De.use=function(R){return I.H.use(R)},De.useActionState=function(R,B,Z){return I.H.useActionState(R,B,Z)},De.useCallback=function(R,B){return I.H.useCallback(R,B)},De.useContext=function(R){return I.H.useContext(R)},De.useDebugValue=function(){},De.useDeferredValue=function(R,B){return I.H.useDeferredValue(R,B)},De.useEffect=function(R,B){return I.H.useEffect(R,B)},De.useEffectEvent=function(R){return I.H.useEffectEvent(R)},De.useId=function(){return I.H.useId()},De.useImperativeHandle=function(R,B,Z){return I.H.useImperativeHandle(R,B,Z)},De.useInsertionEffect=function(R,B){return I.H.useInsertionEffect(R,B)},De.useLayoutEffect=function(R,B){return I.H.useLayoutEffect(R,B)},De.useMemo=function(R,B){return I.H.useMemo(R,B)},De.useOptimistic=function(R,B){return I.H.useOptimistic(R,B)},De.useReducer=function(R,B,Z){return I.H.useReducer(R,B,Z)},De.useRef=function(R){return I.H.useRef(R)},De.useState=function(R){return I.H.useState(R)},De.useSyncExternalStore=function(R,B,Z){return I.H.useSyncExternalStore(R,B,Z)},De.useTransition=function(){return I.H.useTransition()},De.version="19.2.5",De}var uy;function zd(){return uy||(uy=1,Ef.exports=vw()),Ef.exports}var x=zd();const fe=Dd(x),G0=pw({__proto__:null,default:fe},[x]);var Tf={exports:{}},kr={},Cf={exports:{}},Mf={};/**
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 fy;function bw(){return fy||(fy=1,(function(n){function l(M,D){var V=M.length;M.push(D);e:for(;0<V;){var Y=V-1>>>1,q=M[Y];if(0<c(q,D))M[Y]=D,M[V]=q,V=Y;else break e}}function r(M){return M.length===0?null:M[0]}function i(M){if(M.length===0)return null;var D=M[0],V=M.pop();if(V!==D){M[0]=V;e:for(var Y=0,q=M.length,R=q>>>1;Y<R;){var B=2*(Y+1)-1,Z=M[B],ne=B+1,W=M[ne];if(0>c(Z,V))ne<q&&0>c(W,Z)?(M[Y]=W,M[ne]=V,Y=ne):(M[Y]=Z,M[B]=V,Y=B);else if(ne<q&&0>c(W,V))M[Y]=W,M[ne]=V,Y=ne;else break e}}return D}function c(M,D){var V=M.sortIndex-D.sortIndex;return V!==0?V:M.id-D.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 p=[],g=[],b=1,h=null,S=3,E=!1,C=!1,T=!1,A=!1,_=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function L(M){for(var D=r(g);D!==null;){if(D.callback===null)i(g);else if(D.startTime<=M)i(g),D.sortIndex=D.expirationTime,l(p,D);else break;D=r(g)}}function J(M){if(T=!1,L(M),!C)if(r(p)!==null)C=!0,H||(H=!0,X());else{var D=r(g);D!==null&&G(J,D.startTime-M)}}var H=!1,I=-1,k=5,te=-1;function re(){return A?!0:!(n.unstable_now()-te<k)}function ue(){if(A=!1,H){var M=n.unstable_now();te=M;var D=!0;try{e:{C=!1,T&&(T=!1,z(I),I=-1),E=!0;var V=S;try{t:{for(L(M),h=r(p);h!==null&&!(h.expirationTime>M&&re());){var Y=h.callback;if(typeof Y=="function"){h.callback=null,S=h.priorityLevel;var q=Y(h.expirationTime<=M);if(M=n.unstable_now(),typeof q=="function"){h.callback=q,L(M),D=!0;break t}h===r(p)&&i(p),L(M)}else i(p);h=r(p)}if(h!==null)D=!0;else{var R=r(g);R!==null&&G(J,R.startTime-M),D=!1}}break e}finally{h=null,S=V,E=!1}D=void 0}}finally{D?X():H=!1}}}var X;if(typeof N=="function")X=function(){N(ue)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,K=Q.port2;Q.port1.onmessage=ue,X=function(){K.postMessage(null)}}else X=function(){_(ue,0)};function G(M,D){I=_(function(){M(n.unstable_now())},D)}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(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(M){switch(S){case 1:case 2:case 3:var D=3;break;default:D=S}var V=S;S=D;try{return M()}finally{S=V}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(M,D){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var V=S;S=M;try{return D()}finally{S=V}},n.unstable_scheduleCallback=function(M,D,V){var Y=n.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Y+V:Y):V=Y,M){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=V+q,M={id:b++,callback:D,priorityLevel:M,startTime:V,expirationTime:q,sortIndex:-1},V>Y?(M.sortIndex=V,l(g,M),r(p)===null&&M===r(g)&&(T?(z(I),I=-1):T=!0,G(J,V-Y))):(M.sortIndex=q,l(p,M),C||E||(C=!0,H||(H=!0,X()))),M},n.unstable_shouldYield=re,n.unstable_wrapCallback=function(M){var D=S;return function(){var V=S;S=D;try{return M.apply(this,arguments)}finally{S=V}}}})(Mf)),Mf}var dy;function xw(){return dy||(dy=1,Cf.exports=bw()),Cf.exports}var Af={exports:{}},Yt={};/**
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 my;function Sw(){if(my)return Yt;my=1;var n=zd();function l(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(l(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(p,g,b){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:h==null?null:""+h,children:p,containerInfo:g,implementation:b}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Yt.createPortal=function(p,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return u(p,g,null,b)},Yt.flushSync=function(p){var g=d.T,b=i.p;try{if(d.T=null,i.p=2,p)return p()}finally{d.T=g,i.p=b,i.d.f()}},Yt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(p,g))},Yt.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Yt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var b=g.as,h=m(b,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,E=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?i.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:h,integrity:S,fetchPriority:E}):b==="script"&&i.d.X(p,{crossOrigin:h,integrity:S,fetchPriority:E,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Yt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);i.d.M(p,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(p)},Yt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,h=m(b,g.crossOrigin);i.d.L(p,b,{crossOrigin:h,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})}},Yt.preloadModule=function(p,g){if(typeof p=="string")if(g){var b=m(g.as,g.crossOrigin);i.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(p)},Yt.requestFormReset=function(p){i.d.r(p)},Yt.unstable_batchedUpdates=function(p,g){return p(g)},Yt.useFormState=function(p,g,b){return d.H.useFormState(p,g,b)},Yt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Yt.version="19.2.5",Yt}var hy;function Y0(){if(hy)return Af.exports;hy=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(l){console.error(l)}}return n(),Af.exports=Sw(),Af.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 py;function ww(){if(py)return kr;py=1;var n=xw(),l=zd(),r=Y0();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 c(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 p(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,o=t;;){var s=a.return;if(s===null)break;var f=s.alternate;if(f===null){if(o=s.return,o!==null){a=o;continue}break}if(s.child===f.child){for(f=s.child;f;){if(f===a)return p(s),e;if(f===o)return p(s),t;f=f.sibling}throw Error(i(188))}if(a.return!==o.return)a=s,o=f;else{for(var y=!1,w=s.child;w;){if(w===a){y=!0,a=s,o=f;break}if(w===o){y=!0,o=s,a=f;break}w=w.sibling}if(!y){for(w=f.child;w;){if(w===a){y=!0,a=f,o=s;break}if(w===o){y=!0,o=f,a=s;break}w=w.sibling}if(!y)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),ue=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=ue&&e[ue]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Symbol.for("react.client.reference");function K(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case _:return"Profiler";case A:return"StrictMode";case J:return"Suspense";case H:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case N:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case L:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:K(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var G=Array.isArray,M=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},Y=[],q=-1;function R(e){return{current:e}}function B(e){0>q||(e.current=Y[q],Y[q]=null,q--)}function Z(e,t){q++,Y[q]=e.current,e.current=t}var ne=R(null),W=R(null),ce=R(null),se=R(null);function ge(e,t){switch(Z(ce,t),Z(W,e),Z(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ng(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ng(t),e=Og(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(ne),Z(ne,e)}function pe(){B(ne),B(W),B(ce)}function Ae(e){e.memoizedState!==null&&Z(se,e);var t=ne.current,a=Og(t,e.type);t!==a&&(Z(W,e),Z(ne,a))}function Ne(e){W.current===e&&(B(ne),B(W)),se.current===e&&(B(se),Nr._currentValue=V)}var Ce,at;function qe(e){if(Ce===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||"",at=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Ce+e+at}var zt=!1;function jt(e,t){if(!e||zt)return"";zt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(ee){var F=ee}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(ee){F=ee}e.call(ie.prototype)}}else{try{throw Error()}catch(ee){F=ee}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(ee){if(ee&&F&&typeof ee.stack=="string")return[ee.stack,F.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),y=f[0],w=f[1];if(y&&w){var O=y.split(`
44
+ `),P=w.split(`
45
+ `);for(s=o=0;o<O.length&&!O[o].includes("DetermineComponentFrameRoot");)o++;for(;s<P.length&&!P[s].includes("DetermineComponentFrameRoot");)s++;if(o===O.length||s===P.length)for(o=O.length-1,s=P.length-1;1<=o&&0<=s&&O[o]!==P[s];)s--;for(;1<=o&&0<=s;o--,s--)if(O[o]!==P[s]){if(o!==1||s!==1)do if(o--,s--,0>s||O[o]!==P[s]){var le=`
46
+ `+O[o].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=o&&0<=s);break}}}finally{zt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?qe(a):""}function At(e,t){switch(e.tag){case 26:case 27:case 5:return qe(e.type);case 16:return qe("Lazy");case 13:return e.child!==t&&t!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return jt(e.type,!1);case 11:return jt(e.type.render,!1);case 1:return jt(e.type,!0);case 31:return qe("Activity");default:return""}}function Re(e){try{var t="",a=null;do t+=At(e,a),a=e,e=e.return;while(e);return t}catch(o){return`
47
+ Error generating stack: `+o.message+`
48
+ `+o.stack}}var ye=Object.prototype.hasOwnProperty,ln=n.unstable_scheduleCallback,Pt=n.unstable_cancelCallback,ct=n.unstable_shouldYield,vn=n.unstable_requestPaint,dt=n.unstable_now,Dn=n.unstable_getCurrentPriorityLevel,_t=n.unstable_ImmediatePriority,Ca=n.unstable_UserBlockingPriority,on=n.unstable_NormalPriority,Yn=n.unstable_LowPriority,Kt=n.unstable_IdlePriority,zn=n.log,Ft=n.unstable_setDisableYieldValue,ta=null,kt=null;function rn(e){if(typeof zn=="function"&&Ft(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(ta,e)}catch{}}var Rt=Math.clz32?Math.clz32:bn,Gl=Math.log,cl=Math.LN2;function bn(e){return e>>>=0,e===0?32:31-(Gl(e)/cl|0)|0}var Ma=256,ae=262144,de=4194304;function me(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 he(e,t,a){var o=e.pendingLanes;if(o===0)return 0;var s=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var w=o&134217727;return w!==0?(o=w&~f,o!==0?s=me(o):(y&=w,y!==0?s=me(y):a||(a=w&~e,a!==0&&(s=me(a))))):(w=o&~f,w!==0?s=me(w):y!==0?s=me(y):a||(a=o&~e,a!==0&&(s=me(a)))),s===0?0:t!==0&&t!==s&&(t&f)===0&&(f=s&-s,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:s}function Te(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _e(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 Ye(){var e=de;return de<<=1,(de&62914560)===0&&(de=4194304),e}function We(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ot(e,t,a,o,s,f){var y=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 w=e.entanglements,O=e.expirationTimes,P=e.hiddenUpdates;for(a=y&~a;0<a;){var le=31-Rt(a),ie=1<<le;w[le]=0,O[le]=-1;var F=P[le];if(F!==null)for(P[le]=null,le=0;le<F.length;le++){var ee=F[le];ee!==null&&(ee.lane&=-536870913)}a&=~ie}o!==0&&Et(e,o,0),f!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~t))}function Et(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Rt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function ft(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var o=31-Rt(a),s=1<<o;s&t|e[o]&t&&(e[o]|=t),a&=~s}}function pt(e,t){var a=t&-t;return a=(a&42)!==0?1:Vn(a),(a&(e.suspendedLanes|t))!==0?0:a}function Vn(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 Gt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Lt(){var e=D.p;return e!==0?e:(e=window.event,e===void 0?32:ey(e.type))}function qn(e,t){var a=D.p;try{return D.p=e,t()}finally{D.p=a}}var Xt=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Xt,Nt="__reactProps$"+Xt,jn="__reactContainer$"+Xt,ul="__reactEvents$"+Xt,dc="__reactListeners$"+Xt,o1="__reactHandles$"+Xt,ym="__reactResources$"+Xt,Xo="__reactMarker$"+Xt;function mc(e){delete e[Tt],delete e[Nt],delete e[ul],delete e[dc],delete e[o1]}function Yl(e){var t=e[Tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[jn]||a[Tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Bg(e);e!==null;){if(a=e[Tt])return a;e=Bg(e)}return t}e=a,a=e.parentNode}return null}function Vl(e){if(e=e[Tt]||e[jn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function $o(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ql(e){var t=e[ym];return t||(t=e[ym]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Xo]=!0}var vm=new Set,bm={};function fl(e,t){Xl(e,t),Xl(e+"Capture",t)}function Xl(e,t){for(bm[e]=t,e=0;e<t.length;e++)vm.add(t[e])}var r1=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]*$"),xm={},Sm={};function i1(e){return ye.call(Sm,e)?!0:ye.call(xm,e)?!1:r1.test(e)?Sm[e]=!0:(xm[e]=!0,!1)}function ei(e,t,a){if(i1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ti(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 na(e,t,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+o)}}function xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function s1(e,t,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var s=o.get,f=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hc(e){if(!e._valueTracker){var t=wm(e)?"checked":"value";e._valueTracker=s1(e,t,""+e[t])}}function Em(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),o="";return e&&(o=wm(e)?e.checked?"true":"false":e.value),e=o,e!==a?(t.setValue(e),!0):!1}function ni(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 c1=/[\n"\\]/g;function Sn(e){return e.replace(c1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pc(e,t,a,o,s,f,y,w){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?gc(e,y,xn(t)):a!=null?gc(e,y,xn(a)):o!=null&&e.removeAttribute("value"),s==null&&f!=null&&(e.defaultChecked=!!f),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+xn(w):e.removeAttribute("name")}function Tm(e,t,a,o,s,f,y,w){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)){hc(e);return}a=a!=null?""+xn(a):"",t=t!=null?""+xn(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}o=o??s,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=w?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),hc(e)}function gc(e,t,a){t==="number"&&ni(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $l(e,t,a,o){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&o&&(e[a].defaultSelected=!0)}else{for(a=""+xn(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,o&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Cm(e,t,a){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+xn(a):""}function Mm(e,t,a,o){if(t==null){if(o!=null){if(a!=null)throw Error(i(92));if(G(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),t=a}a=xn(t),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),hc(e)}function Pl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var u1=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 Am(e,t,a){var o=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,a):typeof a!="number"||a===0||u1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function _m(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var s in t)o=t[s],t.hasOwnProperty(s)&&a[s]!==o&&Am(e,s,o)}else for(var f in t)t.hasOwnProperty(f)&&Am(e,f,t[f])}function yc(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 f1=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"]]),d1=/^[\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 ai(e){return d1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function aa(){}var vc=null;function bc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,Fl=null;function Rm(e){var t=Vl(e);if(t&&(e=t.stateNode)){var a=e[Nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(pc(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="'+Sn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var o=a[t];if(o!==e&&o.form===e.form){var s=o[Nt]||null;if(!s)throw Error(i(90));pc(o,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)o=a[t],o.form===e.form&&Em(o)}break e;case"textarea":Cm(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$l(e,!!a.multiple,t,!1)}}}var xc=!1;function Nm(e,t,a){if(xc)return e(t,a);xc=!0;try{var o=e(t);return o}finally{if(xc=!1,(Kl!==null||Fl!==null)&&(qi(),Kl&&(t=Kl,e=Fl,Fl=Kl=null,Rm(t),e)))for(t=0;t<e.length;t++)Rm(e[t])}}function Po(e,t){var a=e.stateNode;if(a===null)return null;var o=a[Nt]||null;if(o===null)return null;a=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sc=!1;if(la)try{var Ko={};Object.defineProperty(Ko,"passive",{get:function(){Sc=!0}}),window.addEventListener("test",Ko,Ko),window.removeEventListener("test",Ko,Ko)}catch{Sc=!1}var Aa=null,wc=null,li=null;function Om(){if(li)return li;var e,t=wc,a=t.length,o,s="value"in Aa?Aa.value:Aa.textContent,f=s.length;for(e=0;e<a&&t[e]===s[e];e++);var y=a-e;for(o=1;o<=y&&t[a-o]===s[f-o];o++);return li=s.slice(e,1<o?1-o:void 0)}function oi(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 ri(){return!0}function Dm(){return!1}function Qt(e){function t(a,o,s,f,y){this._reactName=a,this._targetInst=s,this.type=o,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ri:Dm,this.isPropagationStopped=Dm,this}return h(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=ri)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ri)},persist:function(){},isPersistent:ri}),t}var dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ii=Qt(dl),Fo=h({},dl,{view:0,detail:0}),m1=Qt(Fo),Ec,Tc,Qo,si=h({},Fo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mc,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!==Qo&&(Qo&&e.type==="mousemove"?(Ec=e.screenX-Qo.screenX,Tc=e.screenY-Qo.screenY):Tc=Ec=0,Qo=e),Ec)},movementY:function(e){return"movementY"in e?e.movementY:Tc}}),zm=Qt(si),h1=h({},si,{dataTransfer:0}),p1=Qt(h1),g1=h({},Fo,{relatedTarget:0}),Cc=Qt(g1),y1=h({},dl,{animationName:0,elapsedTime:0,pseudoElement:0}),v1=Qt(y1),b1=h({},dl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),x1=Qt(b1),S1=h({},dl,{data:0}),jm=Qt(S1),w1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E1={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"},T1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=T1[e])?!!t[e]:!1}function Mc(){return C1}var M1=h({},Fo,{key:function(e){if(e.key){var t=w1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mc,charCode:function(e){return e.type==="keypress"?oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),A1=Qt(M1),_1=h({},si,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),km=Qt(_1),R1=h({},Fo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mc}),N1=Qt(R1),O1=h({},dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),D1=Qt(O1),z1=h({},si,{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}),j1=Qt(z1),k1=h({},dl,{newState:0,oldState:0}),L1=Qt(k1),H1=[9,13,27,32],Ac=la&&"CompositionEvent"in window,Zo=null;la&&"documentMode"in document&&(Zo=document.documentMode);var B1=la&&"TextEvent"in window&&!Zo,Lm=la&&(!Ac||Zo&&8<Zo&&11>=Zo),Hm=" ",Bm=!1;function Um(e,t){switch(e){case"keyup":return H1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Im(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ql=!1;function U1(e,t){switch(e){case"compositionend":return Im(t);case"keypress":return t.which!==32?null:(Bm=!0,Hm);case"textInput":return e=t.data,e===Hm&&Bm?null:e;default:return null}}function I1(e,t){if(Ql)return e==="compositionend"||!Ac&&Um(e,t)?(e=Om(),li=wc=Aa=null,Ql=!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 Lm&&t.locale!=="ko"?null:t.data;default:return null}}var G1={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 Gm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G1[e.type]:t==="textarea"}function Ym(e,t,a,o){Kl?Fl?Fl.push(o):Fl=[o]:Kl=o,t=Zi(t,"onChange"),0<t.length&&(a=new ii("onChange","change",null,a,o),e.push({event:a,listeners:t}))}var Jo=null,Wo=null;function Y1(e){Tg(e,0)}function ci(e){var t=$o(e);if(Em(t))return e}function Vm(e,t){if(e==="change")return t}var qm=!1;if(la){var _c;if(la){var Rc="oninput"in document;if(!Rc){var Xm=document.createElement("div");Xm.setAttribute("oninput","return;"),Rc=typeof Xm.oninput=="function"}_c=Rc}else _c=!1;qm=_c&&(!document.documentMode||9<document.documentMode)}function $m(){Jo&&(Jo.detachEvent("onpropertychange",Pm),Wo=Jo=null)}function Pm(e){if(e.propertyName==="value"&&ci(Wo)){var t=[];Ym(t,Wo,e,bc(e)),Nm(Y1,t)}}function V1(e,t,a){e==="focusin"?($m(),Jo=t,Wo=a,Jo.attachEvent("onpropertychange",Pm)):e==="focusout"&&$m()}function q1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ci(Wo)}function X1(e,t){if(e==="click")return ci(t)}function $1(e,t){if(e==="input"||e==="change")return ci(t)}function P1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sn=typeof Object.is=="function"?Object.is:P1;function er(e,t){if(sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var s=a[o];if(!ye.call(t,s)||!sn(e[s],t[s]))return!1}return!0}function Km(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fm(e,t){var a=Km(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=t&&o>=t)return{node:a,offset:t-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Km(a)}}function Qm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ni(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=ni(e.document)}return t}function Nc(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 K1=la&&"documentMode"in document&&11>=document.documentMode,Zl=null,Oc=null,tr=null,Dc=!1;function Jm(e,t,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Dc||Zl==null||Zl!==ni(o)||(o=Zl,"selectionStart"in o&&Nc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),tr&&er(tr,o)||(tr=o,o=Zi(Oc,"onSelect"),0<o.length&&(t=new ii("onSelect","select",null,t,a),e.push({event:t,listeners:o}),t.target=Zl)))}function ml(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Jl={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionrun:ml("Transition","TransitionRun"),transitionstart:ml("Transition","TransitionStart"),transitioncancel:ml("Transition","TransitionCancel"),transitionend:ml("Transition","TransitionEnd")},zc={},Wm={};la&&(Wm=document.createElement("div").style,"AnimationEvent"in window||(delete Jl.animationend.animation,delete Jl.animationiteration.animation,delete Jl.animationstart.animation),"TransitionEvent"in window||delete Jl.transitionend.transition);function hl(e){if(zc[e])return zc[e];if(!Jl[e])return e;var t=Jl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Wm)return zc[e]=t[a];return e}var eh=hl("animationend"),th=hl("animationiteration"),nh=hl("animationstart"),F1=hl("transitionrun"),Q1=hl("transitionstart"),Z1=hl("transitioncancel"),ah=hl("transitionend"),lh=new Map,jc="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(" ");jc.push("scrollEnd");function kn(e,t){lh.set(e,t),fl(t,[e])}var ui=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)},wn=[],Wl=0,kc=0;function fi(){for(var e=Wl,t=kc=Wl=0;t<e;){var a=wn[t];wn[t++]=null;var o=wn[t];wn[t++]=null;var s=wn[t];wn[t++]=null;var f=wn[t];if(wn[t++]=null,o!==null&&s!==null){var y=o.pending;y===null?s.next=s:(s.next=y.next,y.next=s),o.pending=s}f!==0&&oh(a,s,f)}}function di(e,t,a,o){wn[Wl++]=e,wn[Wl++]=t,wn[Wl++]=a,wn[Wl++]=o,kc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Lc(e,t,a,o){return di(e,t,a,o),mi(e)}function pl(e,t){return di(e,null,null,t),mi(e)}function oh(e,t,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var s=!1,f=e.return;f!==null;)f.childLanes|=a,o=f.alternate,o!==null&&(o.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(s=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,s&&t!==null&&(s=31-Rt(a),e=f.hiddenUpdates,o=e[s],o===null?e[s]=[t]:o.push(t),t.lane=a|536870912),f):null}function mi(e){if(50<Er)throw Er=0,Xu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var eo={};function J1(e,t,a,o){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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(e,t,a,o){return new J1(e,t,a,o)}function Hc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oa(e,t){var a=e.alternate;return a===null?(a=cn(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 rh(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 hi(e,t,a,o,s,f){var y=0;if(o=e,typeof e=="function")Hc(e)&&(y=1);else if(typeof e=="string")y=aw(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=cn(31,a,t,s),e.elementType=te,e.lanes=f,e;case T:return gl(a.children,s,f,t);case A:y=8,s|=24;break;case _:return e=cn(12,a,t,s|2),e.elementType=_,e.lanes=f,e;case J:return e=cn(13,a,t,s),e.elementType=J,e.lanes=f,e;case H:return e=cn(19,a,t,s),e.elementType=H,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:y=10;break e;case z:y=9;break e;case L:y=11;break e;case I:y=14;break e;case k:y=16,o=null;break e}y=29,a=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=cn(y,a,t,s),t.elementType=e,t.type=o,t.lanes=f,t}function gl(e,t,a,o){return e=cn(7,e,o,t),e.lanes=a,e}function Bc(e,t,a){return e=cn(6,e,null,t),e.lanes=a,e}function ih(e){var t=cn(18,null,null,0);return t.stateNode=e,t}function Uc(e,t,a){return t=cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var sh=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var a=sh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Re(t)},sh.set(e,t),t)}return{value:e,source:t,stack:Re(t)}}var to=[],no=0,pi=null,nr=0,Tn=[],Cn=0,_a=null,Xn=1,$n="";function ra(e,t){to[no++]=nr,to[no++]=pi,pi=e,nr=t}function ch(e,t,a){Tn[Cn++]=Xn,Tn[Cn++]=$n,Tn[Cn++]=_a,_a=e;var o=Xn;e=$n;var s=32-Rt(o)-1;o&=~(1<<s),a+=1;var f=32-Rt(t)+s;if(30<f){var y=s-s%5;f=(o&(1<<y)-1).toString(32),o>>=y,s-=y,Xn=1<<32-Rt(t)+s|a<<s|o,$n=f+e}else Xn=1<<f|a<<s|o,$n=e}function Ic(e){e.return!==null&&(ra(e,1),ch(e,1,0))}function Gc(e){for(;e===pi;)pi=to[--no],to[no]=null,nr=to[--no],to[no]=null;for(;e===_a;)_a=Tn[--Cn],Tn[Cn]=null,$n=Tn[--Cn],Tn[Cn]=null,Xn=Tn[--Cn],Tn[Cn]=null}function uh(e,t){Tn[Cn++]=Xn,Tn[Cn++]=$n,Tn[Cn++]=_a,Xn=t.id,$n=t.overflow,_a=e}var Ht=null,it=null,Ve=!1,Ra=null,Mn=!1,Yc=Error(i(519));function Na(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ar(En(t,e)),Yc}function fh(e){var t=e.stateNode,a=e.type,o=e.memoizedProps;switch(t[Tt]=e,t[Nt]=o,a){case"dialog":Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":case"embed":Ue("load",t);break;case"video":case"audio":for(a=0;a<Cr.length;a++)Ue(Cr[a],t);break;case"source":Ue("error",t);break;case"img":case"image":case"link":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"input":Ue("invalid",t),Tm(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ue("invalid",t);break;case"textarea":Ue("invalid",t),Mm(t,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||o.suppressHydrationWarning===!0||_g(t.textContent,a)?(o.popover!=null&&(Ue("beforetoggle",t),Ue("toggle",t)),o.onScroll!=null&&Ue("scroll",t),o.onScrollEnd!=null&&Ue("scrollend",t),o.onClick!=null&&(t.onclick=aa),t=!0):t=!1,t||Na(e,!0)}function dh(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:Mn=!1;return;case 27:case 3:Mn=!0;return;default:Ht=Ht.return}}function ao(e){if(e!==Ht)return!1;if(!Ve)return dh(e),Ve=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||rf(e.type,e.memoizedProps)),a=!a),a&&it&&Na(e),dh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));it=Hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));it=Hg(e)}else t===27?(t=it,qa(e.type)?(e=df,df=null,it=e):it=t):it=Ht?_n(e.stateNode.nextSibling):null;return!0}function yl(){it=Ht=null,Ve=!1}function Vc(){var e=Ra;return e!==null&&(en===null?en=e:en.push.apply(en,e),Ra=null),e}function ar(e){Ra===null?Ra=[e]:Ra.push(e)}var qc=R(null),vl=null,ia=null;function Oa(e,t,a){Z(qc,t._currentValue),t._currentValue=a}function sa(e){e._currentValue=qc.current,B(qc)}function Xc(e,t,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===a)break;e=e.return}}function $c(e,t,a,o){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var f=s.dependencies;if(f!==null){var y=s.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=s;for(var O=0;O<t.length;O++)if(w.context===t[O]){f.lanes|=a,w=f.alternate,w!==null&&(w.lanes|=a),Xc(f.return,a,e),o||(y=null);break e}f=w.next}}else if(s.tag===18){if(y=s.return,y===null)throw Error(i(341));y.lanes|=a,f=y.alternate,f!==null&&(f.lanes|=a),Xc(y,a,e),y=null}else y=s.child;if(y!==null)y.return=s;else for(y=s;y!==null;){if(y===e){y=null;break}if(s=y.sibling,s!==null){s.return=y.return,y=s;break}y=y.return}s=y}}function lo(e,t,a,o){e=null;for(var s=t,f=!1;s!==null;){if(!f){if((s.flags&524288)!==0)f=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var y=s.alternate;if(y===null)throw Error(i(387));if(y=y.memoizedProps,y!==null){var w=s.type;sn(s.pendingProps.value,y.value)||(e!==null?e.push(w):e=[w])}}else if(s===se.current){if(y=s.alternate,y===null)throw Error(i(387));y.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Nr):e=[Nr])}s=s.return}e!==null&&$c(t,e,a,o),t.flags|=262144}function gi(e){for(e=e.firstContext;e!==null;){if(!sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bl(e){vl=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Bt(e){return mh(vl,e)}function yi(e,t){return vl===null&&bl(e),mh(e,t)}function mh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ia===null){if(e===null)throw Error(i(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return a}var W1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},eS=n.unstable_scheduleCallback,tS=n.unstable_NormalPriority,bt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pc(){return{controller:new W1,data:new Map,refCount:0}}function lr(e){e.refCount--,e.refCount===0&&eS(tS,function(){e.controller.abort()})}var or=null,Kc=0,oo=0,ro=null;function nS(e,t){if(or===null){var a=or=[];Kc=0,oo=Zu(),ro={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Kc++,t.then(hh,hh),t}function hh(){if(--Kc===0&&or!==null){ro!==null&&(ro.status="fulfilled");var e=or;or=null,oo=0,ro=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function aS(e,t){var a=[],o={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(o.status="rejected",o.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),o}var ph=M.S;M.S=function(e,t){Jp=dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&nS(e,t),ph!==null&&ph(e,t)};var xl=R(null);function Fc(){var e=xl.current;return e!==null?e:lt.pooledCache}function vi(e,t){t===null?Z(xl,xl.current):Z(xl,t.pool)}function gh(){var e=Fc();return e===null?null:{parent:bt._currentValue,pool:e}}var io=Error(i(460)),Qc=Error(i(474)),bi=Error(i(542)),xi={then:function(){}};function yh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(aa,aa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xh(e),e;default:if(typeof t.status=="string")t.then(aa,aa);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=o}},function(o){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xh(e),e}throw wl=t,io}}function Sl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(wl=a,io):a}}var wl=null;function bh(){if(wl===null)throw Error(i(459));var e=wl;return wl=null,e}function xh(e){if(e===io||e===bi)throw Error(i(483))}var so=null,rr=0;function Si(e){var t=rr;return rr+=1,so===null&&(so=[]),vh(so,e,t)}function ir(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function wi(e,t){throw t.$$typeof===S?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Sh(e){function t(U,j){if(e){var $=U.deletions;$===null?(U.deletions=[j],U.flags|=16):$.push(j)}}function a(U,j){if(!e)return null;for(;j!==null;)t(U,j),j=j.sibling;return null}function o(U){for(var j=new Map;U!==null;)U.key!==null?j.set(U.key,U):j.set(U.index,U),U=U.sibling;return j}function s(U,j){return U=oa(U,j),U.index=0,U.sibling=null,U}function f(U,j,$){return U.index=$,e?($=U.alternate,$!==null?($=$.index,$<j?(U.flags|=67108866,j):$):(U.flags|=67108866,j)):(U.flags|=1048576,j)}function y(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function w(U,j,$,oe){return j===null||j.tag!==6?(j=Bc($,U.mode,oe),j.return=U,j):(j=s(j,$),j.return=U,j)}function O(U,j,$,oe){var Ee=$.type;return Ee===T?le(U,j,$.props.children,oe,$.key):j!==null&&(j.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===k&&Sl(Ee)===j.type)?(j=s(j,$.props),ir(j,$),j.return=U,j):(j=hi($.type,$.key,$.props,null,U.mode,oe),ir(j,$),j.return=U,j)}function P(U,j,$,oe){return j===null||j.tag!==4||j.stateNode.containerInfo!==$.containerInfo||j.stateNode.implementation!==$.implementation?(j=Uc($,U.mode,oe),j.return=U,j):(j=s(j,$.children||[]),j.return=U,j)}function le(U,j,$,oe,Ee){return j===null||j.tag!==7?(j=gl($,U.mode,oe,Ee),j.return=U,j):(j=s(j,$),j.return=U,j)}function ie(U,j,$){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Bc(""+j,U.mode,$),j.return=U,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case E:return $=hi(j.type,j.key,j.props,null,U.mode,$),ir($,j),$.return=U,$;case C:return j=Uc(j,U.mode,$),j.return=U,j;case k:return j=Sl(j),ie(U,j,$)}if(G(j)||X(j))return j=gl(j,U.mode,$,null),j.return=U,j;if(typeof j.then=="function")return ie(U,Si(j),$);if(j.$$typeof===N)return ie(U,yi(U,j),$);wi(U,j)}return null}function F(U,j,$,oe){var Ee=j!==null?j.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return Ee!==null?null:w(U,j,""+$,oe);if(typeof $=="object"&&$!==null){switch($.$$typeof){case E:return $.key===Ee?O(U,j,$,oe):null;case C:return $.key===Ee?P(U,j,$,oe):null;case k:return $=Sl($),F(U,j,$,oe)}if(G($)||X($))return Ee!==null?null:le(U,j,$,oe,null);if(typeof $.then=="function")return F(U,j,Si($),oe);if($.$$typeof===N)return F(U,j,yi(U,$),oe);wi(U,$)}return null}function ee(U,j,$,oe,Ee){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return U=U.get($)||null,w(j,U,""+oe,Ee);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case E:return U=U.get(oe.key===null?$:oe.key)||null,O(j,U,oe,Ee);case C:return U=U.get(oe.key===null?$:oe.key)||null,P(j,U,oe,Ee);case k:return oe=Sl(oe),ee(U,j,$,oe,Ee)}if(G(oe)||X(oe))return U=U.get($)||null,le(j,U,oe,Ee,null);if(typeof oe.then=="function")return ee(U,j,$,Si(oe),Ee);if(oe.$$typeof===N)return ee(U,j,$,yi(j,oe),Ee);wi(j,oe)}return null}function ve(U,j,$,oe){for(var Ee=null,Xe=null,Se=j,ke=j=0,Ge=null;Se!==null&&ke<$.length;ke++){Se.index>ke?(Ge=Se,Se=null):Ge=Se.sibling;var $e=F(U,Se,$[ke],oe);if($e===null){Se===null&&(Se=Ge);break}e&&Se&&$e.alternate===null&&t(U,Se),j=f($e,j,ke),Xe===null?Ee=$e:Xe.sibling=$e,Xe=$e,Se=Ge}if(ke===$.length)return a(U,Se),Ve&&ra(U,ke),Ee;if(Se===null){for(;ke<$.length;ke++)Se=ie(U,$[ke],oe),Se!==null&&(j=f(Se,j,ke),Xe===null?Ee=Se:Xe.sibling=Se,Xe=Se);return Ve&&ra(U,ke),Ee}for(Se=o(Se);ke<$.length;ke++)Ge=ee(Se,U,ke,$[ke],oe),Ge!==null&&(e&&Ge.alternate!==null&&Se.delete(Ge.key===null?ke:Ge.key),j=f(Ge,j,ke),Xe===null?Ee=Ge:Xe.sibling=Ge,Xe=Ge);return e&&Se.forEach(function(Fa){return t(U,Fa)}),Ve&&ra(U,ke),Ee}function Me(U,j,$,oe){if($==null)throw Error(i(151));for(var Ee=null,Xe=null,Se=j,ke=j=0,Ge=null,$e=$.next();Se!==null&&!$e.done;ke++,$e=$.next()){Se.index>ke?(Ge=Se,Se=null):Ge=Se.sibling;var Fa=F(U,Se,$e.value,oe);if(Fa===null){Se===null&&(Se=Ge);break}e&&Se&&Fa.alternate===null&&t(U,Se),j=f(Fa,j,ke),Xe===null?Ee=Fa:Xe.sibling=Fa,Xe=Fa,Se=Ge}if($e.done)return a(U,Se),Ve&&ra(U,ke),Ee;if(Se===null){for(;!$e.done;ke++,$e=$.next())$e=ie(U,$e.value,oe),$e!==null&&(j=f($e,j,ke),Xe===null?Ee=$e:Xe.sibling=$e,Xe=$e);return Ve&&ra(U,ke),Ee}for(Se=o(Se);!$e.done;ke++,$e=$.next())$e=ee(Se,U,ke,$e.value,oe),$e!==null&&(e&&$e.alternate!==null&&Se.delete($e.key===null?ke:$e.key),j=f($e,j,ke),Xe===null?Ee=$e:Xe.sibling=$e,Xe=$e);return e&&Se.forEach(function(hw){return t(U,hw)}),Ve&&ra(U,ke),Ee}function nt(U,j,$,oe){if(typeof $=="object"&&$!==null&&$.type===T&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case E:e:{for(var Ee=$.key;j!==null;){if(j.key===Ee){if(Ee=$.type,Ee===T){if(j.tag===7){a(U,j.sibling),oe=s(j,$.props.children),oe.return=U,U=oe;break e}}else if(j.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===k&&Sl(Ee)===j.type){a(U,j.sibling),oe=s(j,$.props),ir(oe,$),oe.return=U,U=oe;break e}a(U,j);break}else t(U,j);j=j.sibling}$.type===T?(oe=gl($.props.children,U.mode,oe,$.key),oe.return=U,U=oe):(oe=hi($.type,$.key,$.props,null,U.mode,oe),ir(oe,$),oe.return=U,U=oe)}return y(U);case C:e:{for(Ee=$.key;j!==null;){if(j.key===Ee)if(j.tag===4&&j.stateNode.containerInfo===$.containerInfo&&j.stateNode.implementation===$.implementation){a(U,j.sibling),oe=s(j,$.children||[]),oe.return=U,U=oe;break e}else{a(U,j);break}else t(U,j);j=j.sibling}oe=Uc($,U.mode,oe),oe.return=U,U=oe}return y(U);case k:return $=Sl($),nt(U,j,$,oe)}if(G($))return ve(U,j,$,oe);if(X($)){if(Ee=X($),typeof Ee!="function")throw Error(i(150));return $=Ee.call($),Me(U,j,$,oe)}if(typeof $.then=="function")return nt(U,j,Si($),oe);if($.$$typeof===N)return nt(U,j,yi(U,$),oe);wi(U,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,j!==null&&j.tag===6?(a(U,j.sibling),oe=s(j,$),oe.return=U,U=oe):(a(U,j),oe=Bc($,U.mode,oe),oe.return=U,U=oe),y(U)):a(U,j)}return function(U,j,$,oe){try{rr=0;var Ee=nt(U,j,$,oe);return so=null,Ee}catch(Se){if(Se===io||Se===bi)throw Se;var Xe=cn(29,Se,null,U.mode);return Xe.lanes=oe,Xe.return=U,Xe}finally{}}}var El=Sh(!0),wh=Sh(!1),Da=!1;function Zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jc(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 za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ke&2)!==0){var s=o.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),o.pending=t,t=mi(e),oh(e,null,a),t}return di(e,o,t,a),mi(e)}function sr(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,a|=o,t.lanes=a,ft(e,a)}}function Wc(e,t){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var s=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?s=f=y:f=f.next=y,a=a.next}while(a!==null);f===null?s=f=t:f=f.next=t}else s=f=t;a={baseState:o.baseState,firstBaseUpdate:s,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var eu=!1;function cr(){if(eu){var e=ro;if(e!==null)throw e}}function ur(e,t,a,o){eu=!1;var s=e.updateQueue;Da=!1;var f=s.firstBaseUpdate,y=s.lastBaseUpdate,w=s.shared.pending;if(w!==null){s.shared.pending=null;var O=w,P=O.next;O.next=null,y===null?f=P:y.next=P,y=O;var le=e.alternate;le!==null&&(le=le.updateQueue,w=le.lastBaseUpdate,w!==y&&(w===null?le.firstBaseUpdate=P:w.next=P,le.lastBaseUpdate=O))}if(f!==null){var ie=s.baseState;y=0,le=P=O=null,w=f;do{var F=w.lane&-536870913,ee=F!==w.lane;if(ee?(Ie&F)===F:(o&F)===F){F!==0&&F===oo&&(eu=!0),le!==null&&(le=le.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ve=e,Me=w;F=t;var nt=a;switch(Me.tag){case 1:if(ve=Me.payload,typeof ve=="function"){ie=ve.call(nt,ie,F);break e}ie=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Me.payload,F=typeof ve=="function"?ve.call(nt,ie,F):ve,F==null)break e;ie=h({},ie,F);break e;case 2:Da=!0}}F=w.callback,F!==null&&(e.flags|=64,ee&&(e.flags|=8192),ee=s.callbacks,ee===null?s.callbacks=[F]:ee.push(F))}else ee={lane:F,tag:w.tag,payload:w.payload,callback:w.callback,next:null},le===null?(P=le=ee,O=ie):le=le.next=ee,y|=F;if(w=w.next,w===null){if(w=s.shared.pending,w===null)break;ee=w,w=ee.next,ee.next=null,s.lastBaseUpdate=ee,s.shared.pending=null}}while(!0);le===null&&(O=ie),s.baseState=O,s.firstBaseUpdate=P,s.lastBaseUpdate=le,f===null&&(s.shared.lanes=0),Ua|=y,e.lanes=y,e.memoizedState=ie}}function Eh(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Th(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Eh(a[e],t)}var co=R(null),Ei=R(0);function Ch(e,t){e=ya,Z(Ei,e),Z(co,t),ya=e|t.baseLanes}function tu(){Z(Ei,ya),Z(co,co.current)}function nu(){ya=Ei.current,B(co),B(Ei)}var un=R(null),An=null;function ka(e){var t=e.alternate;Z(gt,gt.current&1),Z(un,e),An===null&&(t===null||co.current!==null||t.memoizedState!==null)&&(An=e)}function au(e){Z(gt,gt.current),Z(un,e),An===null&&(An=e)}function Mh(e){e.tag===22?(Z(gt,gt.current),Z(un,e),An===null&&(An=e)):La()}function La(){Z(gt,gt.current),Z(un,un.current)}function fn(e){B(un),An===e&&(An=null),B(gt)}var gt=R(0);function Ti(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||uf(a)||ff(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,je=null,et=null,xt=null,Ci=!1,uo=!1,Tl=!1,Mi=0,fr=0,fo=null,lS=0;function mt(){throw Error(i(321))}function lu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!sn(e[a],t[a]))return!1;return!0}function ou(e,t,a,o,s,f){return ca=f,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?cp:xu,Tl=!1,f=a(o,s),Tl=!1,uo&&(f=_h(t,a,o,s)),Ah(e),f}function Ah(e){M.H=hr;var t=et!==null&&et.next!==null;if(ca=0,xt=et=je=null,Ci=!1,fr=0,fo=null,t)throw Error(i(300));e===null||St||(e=e.dependencies,e!==null&&gi(e)&&(St=!0))}function _h(e,t,a,o){je=e;var s=0;do{if(uo&&(fo=null),fr=0,uo=!1,25<=s)throw Error(i(301));if(s+=1,xt=et=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}M.H=up,f=t(a,o)}while(uo);return f}function oS(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?dr(t):t,e=e.useState()[0],(et!==null?et.memoizedState:null)!==e&&(je.flags|=1024),t}function ru(){var e=Mi!==0;return Mi=0,e}function iu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function su(e){if(Ci){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ci=!1}ca=0,xt=et=je=null,uo=!1,fr=Mi=0,fo=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?je.memoizedState=xt=e:xt=xt.next=e,xt}function yt(){if(et===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=xt===null?je.memoizedState:xt.next;if(t!==null)xt=t,et=e;else{if(e===null)throw je.alternate===null?Error(i(467)):Error(i(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},xt===null?je.memoizedState=xt=e:xt=xt.next=e}return xt}function Ai(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dr(e){var t=fr;return fr+=1,fo===null&&(fo=[]),e=vh(fo,e,t),t=je,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?cp:xu),e}function _i(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return dr(e);if(e.$$typeof===N)return Bt(e)}throw Error(i(438,String(e)))}function cu(e){var t=null,a=je.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var o=je.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ai(),je.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),o=0;o<e;o++)a[o]=re;return t.index++,a}function ua(e,t){return typeof t=="function"?t(e):t}function Ri(e){var t=yt();return uu(t,et,e)}function uu(e,t,a){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var s=e.baseQueue,f=o.pending;if(f!==null){if(s!==null){var y=s.next;s.next=f.next,f.next=y}t.baseQueue=s=f,o.pending=null}if(f=e.baseState,s===null)e.memoizedState=f;else{t=s.next;var w=y=null,O=null,P=t,le=!1;do{var ie=P.lane&-536870913;if(ie!==P.lane?(Ie&ie)===ie:(ca&ie)===ie){var F=P.revertLane;if(F===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),ie===oo&&(le=!0);else if((ca&F)===F){P=P.next,F===oo&&(le=!0);continue}else ie={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(w=O=ie,y=f):O=O.next=ie,je.lanes|=F,Ua|=F;ie=P.action,Tl&&a(f,ie),f=P.hasEagerState?P.eagerState:a(f,ie)}else F={lane:ie,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(w=O=F,y=f):O=O.next=F,je.lanes|=ie,Ua|=ie;P=P.next}while(P!==null&&P!==t);if(O===null?y=f:O.next=w,!sn(f,e.memoizedState)&&(St=!0,le&&(a=ro,a!==null)))throw a;e.memoizedState=f,e.baseState=y,e.baseQueue=O,o.lastRenderedState=f}return s===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function fu(e){var t=yt(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var o=a.dispatch,s=a.pending,f=t.memoizedState;if(s!==null){a.pending=null;var y=s=s.next;do f=e(f,y.action),y=y.next;while(y!==s);sn(f,t.memoizedState)||(St=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,o]}function Rh(e,t,a){var o=je,s=yt(),f=Ve;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var y=!sn((et||s).memoizedState,a);if(y&&(s.memoizedState=a,St=!0),s=s.queue,hu(Dh.bind(null,o,s,e),[e]),s.getSnapshot!==t||y||xt!==null&&xt.memoizedState.tag&1){if(o.flags|=2048,mo(9,{destroy:void 0},Oh.bind(null,o,s,a,t),null),lt===null)throw Error(i(349));f||(ca&127)!==0||Nh(o,t,a)}return a}function Nh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=je.updateQueue,t===null?(t=Ai(),je.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Oh(e,t,a,o){t.value=a,t.getSnapshot=o,zh(t)&&jh(e)}function Dh(e,t,a){return a(function(){zh(t)&&jh(e)})}function zh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!sn(e,a)}catch{return!0}}function jh(e){var t=pl(e,2);t!==null&&tn(t,e,2)}function du(e){var t=$t();if(typeof e=="function"){var a=e;if(e=a(),Tl){rn(!0);try{a()}finally{rn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:e},t}function kh(e,t,a,o){return e.baseState=a,uu(e,et,typeof o=="function"?o:ua)}function rS(e,t,a,o,s){if(Di(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};M.T!==null?a(!0):f.isTransition=!1,o(f),a=t.pending,a===null?(f.next=t.pending=f,Lh(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Lh(e,t){var a=t.action,o=t.payload,s=e.state;if(t.isTransition){var f=M.T,y={};M.T=y;try{var w=a(s,o),O=M.S;O!==null&&O(y,w),Hh(e,t,w)}catch(P){mu(e,t,P)}finally{f!==null&&y.types!==null&&(f.types=y.types),M.T=f}}else try{f=a(s,o),Hh(e,t,f)}catch(P){mu(e,t,P)}}function Hh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){Bh(e,t,o)},function(o){return mu(e,t,o)}):Bh(e,t,a)}function Bh(e,t,a){t.status="fulfilled",t.value=a,Uh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Lh(e,a)))}function mu(e,t,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=a,Uh(t),t=t.next;while(t!==o)}e.action=null}function Uh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ih(e,t){return t}function Gh(e,t){if(Ve){var a=lt.formState;if(a!==null){e:{var o=je;if(Ve){if(it){t:{for(var s=it,f=Mn;s.nodeType!==8;){if(!f){s=null;break t}if(s=_n(s.nextSibling),s===null){s=null;break t}}f=s.data,s=f==="F!"||f==="F"?s:null}if(s){it=_n(s.nextSibling),o=s.data==="F!";break e}}Na(o)}o=!1}o&&(t=a[0])}}return a=$t(),a.memoizedState=a.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ih,lastRenderedState:t},a.queue=o,a=rp.bind(null,je,o),o.dispatch=a,o=du(!1),f=bu.bind(null,je,!1,o.queue),o=$t(),s={state:t,dispatch:null,action:e,pending:null},o.queue=s,a=rS.bind(null,je,s,f,a),s.dispatch=a,o.memoizedState=e,[t,a,!1]}function Yh(e){var t=yt();return Vh(t,et,e)}function Vh(e,t,a){if(t=uu(e,t,Ih)[0],e=Ri(ua)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=dr(t)}catch(y){throw y===io?bi:y}else o=t;t=yt();var s=t.queue,f=s.dispatch;return a!==t.memoizedState&&(je.flags|=2048,mo(9,{destroy:void 0},iS.bind(null,s,a),null)),[o,f,e]}function iS(e,t){e.action=t}function qh(e){var t=yt(),a=et;if(a!==null)return Vh(t,a,e);yt(),t=t.memoizedState,a=yt();var o=a.queue.dispatch;return a.memoizedState=e,[t,o,!1]}function mo(e,t,a,o){return e={tag:e,create:a,deps:o,inst:t,next:null},t=je.updateQueue,t===null&&(t=Ai(),je.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,t.lastEffect=e),e}function Xh(){return yt().memoizedState}function Ni(e,t,a,o){var s=$t();je.flags|=e,s.memoizedState=mo(1|t,{destroy:void 0},a,o===void 0?null:o)}function Oi(e,t,a,o){var s=yt();o=o===void 0?null:o;var f=s.memoizedState.inst;et!==null&&o!==null&&lu(o,et.memoizedState.deps)?s.memoizedState=mo(t,f,a,o):(je.flags|=e,s.memoizedState=mo(1|t,f,a,o))}function $h(e,t){Ni(8390656,8,e,t)}function hu(e,t){Oi(2048,8,e,t)}function sS(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Ai(),je.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Ph(e){var t=yt().memoizedState;return sS({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Kh(e,t){return Oi(4,2,e,t)}function Fh(e,t){return Oi(4,4,e,t)}function Qh(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 Zh(e,t,a){a=a!=null?a.concat([e]):null,Oi(4,4,Qh.bind(null,t,e),a)}function pu(){}function Jh(e,t){var a=yt();t=t===void 0?null:t;var o=a.memoizedState;return t!==null&&lu(t,o[1])?o[0]:(a.memoizedState=[e,t],e)}function Wh(e,t){var a=yt();t=t===void 0?null:t;var o=a.memoizedState;if(t!==null&&lu(t,o[1]))return o[0];if(o=e(),Tl){rn(!0);try{e()}finally{rn(!1)}}return a.memoizedState=[o,t],o}function gu(e,t,a){return a===void 0||(ca&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=eg(),je.lanes|=e,Ua|=e,a)}function ep(e,t,a,o){return sn(a,t)?a:co.current!==null?(e=gu(e,a,o),sn(e,t)||(St=!0),e):(ca&42)===0||(ca&1073741824)!==0&&(Ie&261930)===0?(St=!0,e.memoizedState=a):(e=eg(),je.lanes|=e,Ua|=e,t)}function tp(e,t,a,o,s){var f=D.p;D.p=f!==0&&8>f?f:8;var y=M.T,w={};M.T=w,bu(e,!1,t,a);try{var O=s(),P=M.S;if(P!==null&&P(w,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var le=aS(O,o);mr(e,t,le,hn(e))}else mr(e,t,o,hn(e))}catch(ie){mr(e,t,{then:function(){},status:"rejected",reason:ie},hn())}finally{D.p=f,y!==null&&w.types!==null&&(y.types=w.types),M.T=y}}function cS(){}function yu(e,t,a,o){if(e.tag!==5)throw Error(i(476));var s=np(e).queue;tp(e,s,t,V,a===null?cS:function(){return ap(e),a(o)})}function np(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:V},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ap(e){var t=np(e);t.next===null&&(t=e.alternate.memoizedState),mr(e,t.next.queue,{},hn())}function vu(){return Bt(Nr)}function lp(){return yt().memoizedState}function op(){return yt().memoizedState}function uS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=hn();e=za(a);var o=ja(t,e,a);o!==null&&(tn(o,t,a),sr(o,t,a)),t={cache:Pc()},e.payload=t;return}t=t.return}}function fS(e,t,a){var o=hn();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Di(e)?ip(t,a):(a=Lc(e,t,a,o),a!==null&&(tn(a,e,o),sp(a,t,o)))}function rp(e,t,a){var o=hn();mr(e,t,a,o)}function mr(e,t,a,o){var s={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Di(e))ip(t,s);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var y=t.lastRenderedState,w=f(y,a);if(s.hasEagerState=!0,s.eagerState=w,sn(w,y))return di(e,t,s,0),lt===null&&fi(),!1}catch{}finally{}if(a=Lc(e,t,s,o),a!==null)return tn(a,e,o),sp(a,t,o),!0}return!1}function bu(e,t,a,o){if(o={lane:2,revertLane:Zu(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Di(e)){if(t)throw Error(i(479))}else t=Lc(e,a,o,2),t!==null&&tn(t,e,2)}function Di(e){var t=e.alternate;return e===je||t!==null&&t===je}function ip(e,t){uo=Ci=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function sp(e,t,a){if((a&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,a|=o,t.lanes=a,ft(e,a)}}var hr={readContext:Bt,use:_i,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};hr.useEffectEvent=mt;var cp={readContext:Bt,use:_i,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:$h,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ni(4194308,4,Qh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ni(4194308,4,e,t)},useInsertionEffect:function(e,t){Ni(4,2,e,t)},useMemo:function(e,t){var a=$t();t=t===void 0?null:t;var o=e();if(Tl){rn(!0);try{e()}finally{rn(!1)}}return a.memoizedState=[o,t],o},useReducer:function(e,t,a){var o=$t();if(a!==void 0){var s=a(t);if(Tl){rn(!0);try{a(t)}finally{rn(!1)}}}else s=t;return o.memoizedState=o.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},o.queue=e,e=e.dispatch=fS.bind(null,je,e),[o.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=du(e);var t=e.queue,a=rp.bind(null,je,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:pu,useDeferredValue:function(e,t){var a=$t();return gu(a,e,t)},useTransition:function(){var e=du(!1);return e=tp.bind(null,je,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var o=je,s=$t();if(Ve){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),lt===null)throw Error(i(349));(Ie&127)!==0||Nh(o,t,a)}s.memoizedState=a;var f={value:a,getSnapshot:t};return s.queue=f,$h(Dh.bind(null,o,f,e),[e]),o.flags|=2048,mo(9,{destroy:void 0},Oh.bind(null,o,f,a,t),null),a},useId:function(){var e=$t(),t=lt.identifierPrefix;if(Ve){var a=$n,o=Xn;a=(o&~(1<<32-Rt(o)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Mi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=lS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vu,useFormState:Gh,useActionState:Gh,useOptimistic:function(e){var t=$t();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=bu.bind(null,je,!0,a),a.dispatch=t,[e,t]},useMemoCache:cu,useCacheRefresh:function(){return $t().memoizedState=uS.bind(null,je)},useEffectEvent:function(e){var t=$t(),a={impl:e};return t.memoizedState=a,function(){if((Ke&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},xu={readContext:Bt,use:_i,useCallback:Jh,useContext:Bt,useEffect:hu,useImperativeHandle:Zh,useInsertionEffect:Kh,useLayoutEffect:Fh,useMemo:Wh,useReducer:Ri,useRef:Xh,useState:function(){return Ri(ua)},useDebugValue:pu,useDeferredValue:function(e,t){var a=yt();return ep(a,et.memoizedState,e,t)},useTransition:function(){var e=Ri(ua)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:dr(e),t]},useSyncExternalStore:Rh,useId:lp,useHostTransitionStatus:vu,useFormState:Yh,useActionState:Yh,useOptimistic:function(e,t){var a=yt();return kh(a,et,e,t)},useMemoCache:cu,useCacheRefresh:op};xu.useEffectEvent=Ph;var up={readContext:Bt,use:_i,useCallback:Jh,useContext:Bt,useEffect:hu,useImperativeHandle:Zh,useInsertionEffect:Kh,useLayoutEffect:Fh,useMemo:Wh,useReducer:fu,useRef:Xh,useState:function(){return fu(ua)},useDebugValue:pu,useDeferredValue:function(e,t){var a=yt();return et===null?gu(a,e,t):ep(a,et.memoizedState,e,t)},useTransition:function(){var e=fu(ua)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:dr(e),t]},useSyncExternalStore:Rh,useId:lp,useHostTransitionStatus:vu,useFormState:qh,useActionState:qh,useOptimistic:function(e,t){var a=yt();return et!==null?kh(a,et,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:cu,useCacheRefresh:op};up.useEffectEvent=Ph;function Su(e,t,a,o){t=e.memoizedState,a=a(o,t),a=a==null?t:h({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var wu={enqueueSetState:function(e,t,a){e=e._reactInternals;var o=hn(),s=za(o);s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,o),t!==null&&(tn(t,e,o),sr(t,e,o))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var o=hn(),s=za(o);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,o),t!==null&&(tn(t,e,o),sr(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=hn(),o=za(a);o.tag=2,t!=null&&(o.callback=t),t=ja(e,o,a),t!==null&&(tn(t,e,a),sr(t,e,a))}};function fp(e,t,a,o,s,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,y):t.prototype&&t.prototype.isPureReactComponent?!er(a,o)||!er(s,f):!0}function dp(e,t,a,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,o),t.state!==e&&wu.enqueueReplaceState(t,t.state,null)}function Cl(e,t){var a=t;if("ref"in t){a={};for(var o in t)o!=="ref"&&(a[o]=t[o])}if(e=e.defaultProps){a===t&&(a=h({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function mp(e){ui(e)}function hp(e){console.error(e)}function pp(e){ui(e)}function zi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function gp(e,t,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Eu(e,t,a){return a=za(a),a.tag=3,a.payload={element:null},a.callback=function(){zi(e,t)},a}function yp(e){return e=za(e),e.tag=3,e}function vp(e,t,a,o){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var f=o.value;e.payload=function(){return s(f)},e.callback=function(){gp(t,a,o)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){gp(t,a,o),typeof s!="function"&&(Ia===null?Ia=new Set([this]):Ia.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function dS(e,t,a,o,s){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=a.alternate,t!==null&&lo(t,a,s,!0),a=un.current,a!==null){switch(a.tag){case 31:case 13:return An===null?Xi():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=s,o===xi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([o]):t.add(o),Ku(e,o,s)),!1;case 22:return a.flags|=65536,o===xi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([o]):a.add(o)),Ku(e,o,s)),!1}throw Error(i(435,a.tag))}return Ku(e,o,s),Xi(),!1}if(Ve)return t=un.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,o!==Yc&&(e=Error(i(422),{cause:o}),ar(En(e,a)))):(o!==Yc&&(t=Error(i(423),{cause:o}),ar(En(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,o=En(o,a),s=Eu(e.stateNode,o,s),Wc(e,s),ht!==4&&(ht=2)),!1;var f=Error(i(520),{cause:o});if(f=En(f,a),wr===null?wr=[f]:wr.push(f),ht!==4&&(ht=2),t===null)return!0;o=En(o,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Eu(a.stateNode,o,e),Wc(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"&&(Ia===null||!Ia.has(f))))return a.flags|=65536,s&=-s,a.lanes|=s,s=yp(s),vp(s,e,a,o),Wc(a,s),!1}a=a.return}while(a!==null);return!1}var Tu=Error(i(461)),St=!1;function Ut(e,t,a,o){t.child=e===null?wh(t,null,a,o):El(t,e.child,a,o)}function bp(e,t,a,o,s){a=a.render;var f=t.ref;if("ref"in o){var y={};for(var w in o)w!=="ref"&&(y[w]=o[w])}else y=o;return bl(t),o=ou(e,t,a,y,f,s),w=ru(),e!==null&&!St?(iu(e,t,s),fa(e,t,s)):(Ve&&w&&Ic(t),t.flags|=1,Ut(e,t,o,s),t.child)}function xp(e,t,a,o,s){if(e===null){var f=a.type;return typeof f=="function"&&!Hc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Sp(e,t,f,o,s)):(e=hi(a.type,null,o,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Du(e,s)){var y=f.memoizedProps;if(a=a.compare,a=a!==null?a:er,a(y,o)&&e.ref===t.ref)return fa(e,t,s)}return t.flags|=1,e=oa(f,o),e.ref=t.ref,e.return=t,t.child=e}function Sp(e,t,a,o,s){if(e!==null){var f=e.memoizedProps;if(er(f,o)&&e.ref===t.ref)if(St=!1,t.pendingProps=o=f,Du(e,s))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,fa(e,t,s)}return Cu(e,t,a,o,s)}function wp(e,t,a,o){var s=o.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(o=t.child=e.child,s=0;o!==null;)s=s|o.lanes|o.childLanes,o=o.sibling;o=s&~f}else o=0,t.child=null;return Ep(e,t,f,a,o)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vi(t,f!==null?f.cachePool:null),f!==null?Ch(t,f):tu(),Mh(t);else return o=t.lanes=536870912,Ep(e,t,f!==null?f.baseLanes|a:a,a,o)}else f!==null?(vi(t,f.cachePool),Ch(t,f),La(),t.memoizedState=null):(e!==null&&vi(t,null),tu(),La());return Ut(e,t,s,a),t.child}function pr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ep(e,t,a,o,s){var f=Fc();return f=f===null?null:{parent:bt._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&vi(t,null),tu(),Mh(t),e!==null&&lo(e,t,o,!0),t.childLanes=s,null}function ji(e,t){return t=Li({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tp(e,t,a){return El(t,e.child,null,a),e=ji(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function mS(e,t,a){var o=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(o.mode==="hidden")return e=ji(t,o),t.lanes=536870912,pr(null,e);if(au(t),(e=it)?(e=Lg(e,Mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_a!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},a=ih(e),a.return=t,t.child=a,Ht=t,it=null)):e=null,e===null)throw Na(t);return t.lanes=536870912,null}return ji(t,o)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(au(t),s)if(t.flags&256)t.flags&=-257,t=Tp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(St||lo(e,t,a,!1),s=(a&e.childLanes)!==0,St||s){if(o=lt,o!==null&&(y=pt(o,a),y!==0&&y!==f.retryLane))throw f.retryLane=y,pl(e,y),tn(o,e,y),Tu;Xi(),t=Tp(e,t,a)}else e=f.treeContext,it=_n(y.nextSibling),Ht=t,Ve=!0,Ra=null,Mn=!1,e!==null&&uh(t,e),t=ji(t,o),t.flags|=4096;return t}return e=oa(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ki(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 Cu(e,t,a,o,s){return bl(t),a=ou(e,t,a,o,void 0,s),o=ru(),e!==null&&!St?(iu(e,t,s),fa(e,t,s)):(Ve&&o&&Ic(t),t.flags|=1,Ut(e,t,a,s),t.child)}function Cp(e,t,a,o,s,f){return bl(t),t.updateQueue=null,a=_h(t,o,a,s),Ah(e),o=ru(),e!==null&&!St?(iu(e,t,f),fa(e,t,f)):(Ve&&o&&Ic(t),t.flags|=1,Ut(e,t,a,f),t.child)}function Mp(e,t,a,o,s){if(bl(t),t.stateNode===null){var f=eo,y=a.contextType;typeof y=="object"&&y!==null&&(f=Bt(y)),f=new a(o,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=wu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=o,f.state=t.memoizedState,f.refs={},Zc(t),y=a.contextType,f.context=typeof y=="object"&&y!==null?Bt(y):eo,f.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Su(t,a,y,o),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&wu.enqueueReplaceState(f,f.state,null),ur(t,o,f,s),cr(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){f=t.stateNode;var w=t.memoizedProps,O=Cl(a,w);f.props=O;var P=f.context,le=a.contextType;y=eo,typeof le=="object"&&le!==null&&(y=Bt(le));var ie=a.getDerivedStateFromProps;le=typeof ie=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,le||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||P!==y)&&dp(t,f,o,y),Da=!1;var F=t.memoizedState;f.state=F,ur(t,o,f,s),cr(),P=t.memoizedState,w||F!==P||Da?(typeof ie=="function"&&(Su(t,a,ie,o),P=t.memoizedState),(O=Da||fp(t,a,O,o,F,P,y))?(le||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=o,t.memoizedState=P),f.props=o,f.state=P,f.context=y,o=O):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{f=t.stateNode,Jc(e,t),y=t.memoizedProps,le=Cl(a,y),f.props=le,ie=t.pendingProps,F=f.context,P=a.contextType,O=eo,typeof P=="object"&&P!==null&&(O=Bt(P)),w=a.getDerivedStateFromProps,(P=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==ie||F!==O)&&dp(t,f,o,O),Da=!1,F=t.memoizedState,f.state=F,ur(t,o,f,s),cr();var ee=t.memoizedState;y!==ie||F!==ee||Da||e!==null&&e.dependencies!==null&&gi(e.dependencies)?(typeof w=="function"&&(Su(t,a,w,o),ee=t.memoizedState),(le=Da||fp(t,a,le,o,F,ee,O)||e!==null&&e.dependencies!==null&&gi(e.dependencies))?(P||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,ee,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,ee,O)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=ee),f.props=o,f.state=ee,f.context=O,o=le):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),o=!1)}return f=o,ki(e,t),o=(t.flags&128)!==0,f||o?(f=t.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&o?(t.child=El(t,e.child,null,s),t.child=El(t,null,a,s)):Ut(e,t,a,s),t.memoizedState=f.state,e=t.child):e=fa(e,t,s),e}function Ap(e,t,a,o){return yl(),t.flags|=256,Ut(e,t,a,o),t.child}var Mu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Au(e){return{baseLanes:e,cachePool:gh()}}function _u(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=mn),e}function _p(e,t,a){var o=t.pendingProps,s=!1,f=(t.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),y&&(s=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(s?ka(t):La(),(e=it)?(e=Lg(e,Mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_a!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},a=ih(e),a.return=t,t.child=a,Ht=t,it=null)):e=null,e===null)throw Na(t);return ff(e)?t.lanes=32:t.lanes=536870912,null}var w=o.children;return o=o.fallback,s?(La(),s=t.mode,w=Li({mode:"hidden",children:w},s),o=gl(o,s,a,null),w.return=t,o.return=t,w.sibling=o,t.child=w,o=t.child,o.memoizedState=Au(a),o.childLanes=_u(e,y,a),t.memoizedState=Mu,pr(null,o)):(ka(t),Ru(t,w))}var O=e.memoizedState;if(O!==null&&(w=O.dehydrated,w!==null)){if(f)t.flags&256?(ka(t),t.flags&=-257,t=Nu(e,t,a)):t.memoizedState!==null?(La(),t.child=e.child,t.flags|=128,t=null):(La(),w=o.fallback,s=t.mode,o=Li({mode:"visible",children:o.children},s),w=gl(w,s,a,null),w.flags|=2,o.return=t,w.return=t,o.sibling=w,t.child=o,El(t,e.child,null,a),o=t.child,o.memoizedState=Au(a),o.childLanes=_u(e,y,a),t.memoizedState=Mu,t=pr(null,o));else if(ka(t),ff(w)){if(y=w.nextSibling&&w.nextSibling.dataset,y)var P=y.dgst;y=P,o=Error(i(419)),o.stack="",o.digest=y,ar({value:o,source:null,stack:null}),t=Nu(e,t,a)}else if(St||lo(e,t,a,!1),y=(a&e.childLanes)!==0,St||y){if(y=lt,y!==null&&(o=pt(y,a),o!==0&&o!==O.retryLane))throw O.retryLane=o,pl(e,o),tn(y,e,o),Tu;uf(w)||Xi(),t=Nu(e,t,a)}else uf(w)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,it=_n(w.nextSibling),Ht=t,Ve=!0,Ra=null,Mn=!1,e!==null&&uh(t,e),t=Ru(t,o.children),t.flags|=4096);return t}return s?(La(),w=o.fallback,s=t.mode,O=e.child,P=O.sibling,o=oa(O,{mode:"hidden",children:o.children}),o.subtreeFlags=O.subtreeFlags&65011712,P!==null?w=oa(P,w):(w=gl(w,s,a,null),w.flags|=2),w.return=t,o.return=t,o.sibling=w,t.child=o,pr(null,o),o=t.child,w=e.child.memoizedState,w===null?w=Au(a):(s=w.cachePool,s!==null?(O=bt._currentValue,s=s.parent!==O?{parent:O,pool:O}:s):s=gh(),w={baseLanes:w.baseLanes|a,cachePool:s}),o.memoizedState=w,o.childLanes=_u(e,y,a),t.memoizedState=Mu,pr(e.child,o)):(ka(t),a=e.child,e=a.sibling,a=oa(a,{mode:"visible",children:o.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function Ru(e,t){return t=Li({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Li(e,t){return e=cn(22,e,null,t),e.lanes=0,e}function Nu(e,t,a){return El(t,e.child,null,a),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rp(e,t,a){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Xc(e.return,t,a)}function Ou(e,t,a,o,s,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:s,treeForkCount:f}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=a,y.tailMode=s,y.treeForkCount=f)}function Np(e,t,a){var o=t.pendingProps,s=o.revealOrder,f=o.tail;o=o.children;var y=gt.current,w=(y&2)!==0;if(w?(y=y&1|2,t.flags|=128):y&=1,Z(gt,y),Ut(e,t,o,a),o=Ve?nr:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rp(e,a,t);else if(e.tag===19)Rp(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(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&Ti(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Ou(t,!1,s,a,f,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ti(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Ou(t,!0,a,null,f,o);break;case"together":Ou(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function fa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ua|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(lo(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=oa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=oa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Du(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&gi(e)))}function hS(e,t,a){switch(t.tag){case 3:ge(t,t.stateNode.containerInfo),Oa(t,bt,e.memoizedState.cache),yl();break;case 27:case 5:Ae(t);break;case 4:ge(t,t.stateNode.containerInfo);break;case 10:Oa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,au(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(ka(t),t.flags|=128,null):(a&t.child.childLanes)!==0?_p(e,t,a):(ka(t),e=fa(e,t,a),e!==null?e.sibling:null);ka(t);break;case 19:var s=(e.flags&128)!==0;if(o=(a&t.childLanes)!==0,o||(lo(e,t,a,!1),o=(a&t.childLanes)!==0),s){if(o)return Np(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Z(gt,gt.current),o)break;return null;case 22:return t.lanes=0,wp(e,t,a,t.pendingProps);case 24:Oa(t,bt,e.memoizedState.cache)}return fa(e,t,a)}function Op(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!Du(e,a)&&(t.flags&128)===0)return St=!1,hS(e,t,a);St=(e.flags&131072)!==0}else St=!1,Ve&&(t.flags&1048576)!==0&&ch(t,nr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Sl(t.elementType),t.type=e,typeof e=="function")Hc(e)?(o=Cl(e,o),t.tag=1,t=Mp(null,t,e,o,a)):(t.tag=0,t=Cu(null,t,e,o,a));else{if(e!=null){var s=e.$$typeof;if(s===L){t.tag=11,t=bp(null,t,e,o,a);break e}else if(s===I){t.tag=14,t=xp(null,t,e,o,a);break e}}throw t=K(e)||e,Error(i(306,t,""))}}return t;case 0:return Cu(e,t,t.type,t.pendingProps,a);case 1:return o=t.type,s=Cl(o,t.pendingProps),Mp(e,t,o,s,a);case 3:e:{if(ge(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var f=t.memoizedState;s=f.element,Jc(e,t),ur(t,o,null,a);var y=t.memoizedState;if(o=y.cache,Oa(t,bt,o),o!==f.cache&&$c(t,[bt],a,!0),cr(),o=y.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Ap(e,t,o,a);break e}else if(o!==s){s=En(Error(i(424)),t),ar(s),t=Ap(e,t,o,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(it=_n(e.firstChild),Ht=t,Ve=!0,Ra=null,Mn=!0,a=wh(t,null,o,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(yl(),o===s){t=fa(e,t,a);break e}Ut(e,t,o,a)}t=t.child}return t;case 26:return ki(e,t),e===null?(a=Yg(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ve||(a=t.type,e=t.pendingProps,o=Ji(ce.current).createElement(a),o[Tt]=t,o[Nt]=e,It(o,a,e),Ot(o),t.stateNode=o):t.memoizedState=Yg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ae(t),e===null&&Ve&&(o=t.stateNode=Ug(t.type,t.pendingProps,ce.current),Ht=t,Mn=!0,s=it,qa(t.type)?(df=s,it=_n(o.firstChild)):it=s),Ut(e,t,t.pendingProps.children,a),ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((s=o=it)&&(o=qS(o,t.type,t.pendingProps,Mn),o!==null?(t.stateNode=o,Ht=t,it=_n(o.firstChild),Mn=!1,s=!0):s=!1),s||Na(t)),Ae(t),s=t.type,f=t.pendingProps,y=e!==null?e.memoizedProps:null,o=f.children,rf(s,f)?o=null:y!==null&&rf(s,y)&&(t.flags|=32),t.memoizedState!==null&&(s=ou(e,t,oS,null,null,a),Nr._currentValue=s),ki(e,t),Ut(e,t,o,a),t.child;case 6:return e===null&&Ve&&((e=a=it)&&(a=XS(a,t.pendingProps,Mn),a!==null?(t.stateNode=a,Ht=t,it=null,e=!0):e=!1),e||Na(t)),null;case 13:return _p(e,t,a);case 4:return ge(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=El(t,null,o,a):Ut(e,t,o,a),t.child;case 11:return bp(e,t,t.type,t.pendingProps,a);case 7:return Ut(e,t,t.pendingProps,a),t.child;case 8:return Ut(e,t,t.pendingProps.children,a),t.child;case 12:return Ut(e,t,t.pendingProps.children,a),t.child;case 10:return o=t.pendingProps,Oa(t,t.type,o.value),Ut(e,t,o.children,a),t.child;case 9:return s=t.type._context,o=t.pendingProps.children,bl(t),s=Bt(s),o=o(s),t.flags|=1,Ut(e,t,o,a),t.child;case 14:return xp(e,t,t.type,t.pendingProps,a);case 15:return Sp(e,t,t.type,t.pendingProps,a);case 19:return Np(e,t,a);case 31:return mS(e,t,a);case 22:return wp(e,t,a,t.pendingProps);case 24:return bl(t),o=Bt(bt),e===null?(s=Fc(),s===null&&(s=lt,f=Pc(),s.pooledCache=f,f.refCount++,f!==null&&(s.pooledCacheLanes|=a),s=f),t.memoizedState={parent:o,cache:s},Zc(t),Oa(t,bt,s)):((e.lanes&a)!==0&&(Jc(e,t),ur(t,null,null,a),cr()),s=e.memoizedState,f=t.memoizedState,s.parent!==o?(s={parent:o,cache:o},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Oa(t,bt,o)):(o=f.cache,Oa(t,bt,o),o!==s.cache&&$c(t,[bt],a,!0))),Ut(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function da(e){e.flags|=4}function zu(e,t,a,o,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(lg())e.flags|=8192;else throw wl=xi,Qc}else e.flags&=-16777217}function Dp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t))if(lg())e.flags|=8192;else throw wl=xi,Qc}function Hi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ye():536870912,e.lanes|=t,yo|=t)}function gr(e,t){if(!Ve)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 o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,o|=s.subtreeFlags&65011712,o|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,o|=s.subtreeFlags,o|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=o,e.childLanes=a,t}function pS(e,t,a){var o=t.pendingProps;switch(Gc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return a=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),sa(bt),pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ao(t)?da(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vc())),st(t),null;case 26:var s=t.type,f=t.memoizedState;return e===null?(da(t),f!==null?(st(t),Dp(t,f)):(st(t),zu(t,s,null,o,a))):f?f!==e.memoizedState?(da(t),st(t),Dp(t,f)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&da(t),st(t),zu(t,s,e,o,a)),null;case 27:if(Ne(t),a=ce.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&da(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return st(t),null}e=ne.current,ao(t)?fh(t):(e=Ug(s,o,a),t.stateNode=e,da(t))}return st(t),null;case 5:if(Ne(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&da(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return st(t),null}if(f=ne.current,ao(t))fh(t);else{var y=Ji(ce.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?y.createElement(s,{is:o.is}):y.createElement(s)}}f[Tt]=t,f[Nt]=o;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=f;e:switch(It(f,s,o),s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&da(t)}}return st(t),zu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&da(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=ce.current,ao(t)){if(e=t.stateNode,a=t.memoizedProps,o=null,s=Ht,s!==null)switch(s.tag){case 27:case 5:o=s.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||_g(e.nodeValue,a)),e||Na(t,!0)}else e=Ji(e).createTextNode(o),e[Tt]=t,t.stateNode=e}return st(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(o=ao(t),a!==null){if(e===null){if(!o)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Tt]=t}else yl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else a=Vc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return st(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=ao(t),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(i(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));s[Tt]=t}else yl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),s=!1}else s=Vc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=t.child,s=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(s=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==s&&(o.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Hi(t,t.updateQueue),st(t),null);case 4:return pe(),e===null&&tf(t.stateNode.containerInfo),st(t),null;case 10:return sa(t.type),st(t),null;case 19:if(B(gt),o=t.memoizedState,o===null)return st(t),null;if(s=(t.flags&128)!==0,f=o.rendering,f===null)if(s)gr(o,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ti(e),f!==null){for(t.flags|=128,gr(o,!1),e=f.updateQueue,t.updateQueue=e,Hi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)rh(a,e),a=a.sibling;return Z(gt,gt.current&1|2),Ve&&ra(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&dt()>Yi&&(t.flags|=128,s=!0,gr(o,!1),t.lanes=4194304)}else{if(!s)if(e=Ti(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Hi(t,e),gr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!Ve)return st(t),null}else 2*dt()-o.renderingStartTime>Yi&&a!==536870912&&(t.flags|=128,s=!0,gr(o,!1),t.lanes=4194304);o.isBackwards?(f.sibling=t.child,t.child=f):(e=o.last,e!==null?e.sibling=f:t.child=f,o.last=f)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=dt(),e.sibling=null,a=gt.current,Z(gt,s?a&1|2:a&1),Ve&&ra(t,o.treeForkCount),e):(st(t),null);case 22:case 23:return fn(t),nu(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(a&536870912)!==0&&(t.flags&128)===0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),a=t.updateQueue,a!==null&&Hi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==a&&(t.flags|=2048),e!==null&&B(xl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),sa(bt),st(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function gS(e,t){switch(Gc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sa(bt),pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(i(340));yl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));yl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(gt),null;case 4:return pe(),null;case 10:return sa(t.type),null;case 22:case 23:return fn(t),nu(),e!==null&&B(xl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return sa(bt),null;case 25:return null;default:return null}}function zp(e,t){switch(Gc(t),t.tag){case 3:sa(bt),pe();break;case 26:case 27:case 5:Ne(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:B(gt);break;case 10:sa(t.type);break;case 22:case 23:fn(t),nu(),e!==null&&B(xl);break;case 24:sa(bt)}}function yr(e,t){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var s=o.next;a=s;do{if((a.tag&e)===e){o=void 0;var f=a.create,y=a.inst;o=f(),y.destroy=o}a=a.next}while(a!==s)}}catch(w){Je(t,t.return,w)}}function Ha(e,t,a){try{var o=t.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var f=s.next;o=f;do{if((o.tag&e)===e){var y=o.inst,w=y.destroy;if(w!==void 0){y.destroy=void 0,s=t;var O=a,P=w;try{P()}catch(le){Je(s,O,le)}}}o=o.next}while(o!==f)}}catch(le){Je(t,t.return,le)}}function jp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Th(t,a)}catch(o){Je(e,e.return,o)}}}function kp(e,t,a){a.props=Cl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){Je(e,t,o)}}function vr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(s){Je(e,t,s)}}function Pn(e,t){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(s){Je(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Je(e,t,s)}else a.current=null}function Lp(e){var t=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(s){Je(e,e.return,s)}}function ju(e,t,a){try{var o=e.stateNode;BS(o,e.type,a,t),o[Nt]=t}catch(s){Je(e,e.return,s)}}function Hp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qa(e.type)||e.tag===4}function ku(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hp(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&&qa(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 Lu(e,t,a){var o=e.tag;if(o===5||o===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=aa));else if(o!==4&&(o===27&&qa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Lu(e,t,a),e=e.sibling;e!==null;)Lu(e,t,a),e=e.sibling}function Bi(e,t,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(o!==4&&(o===27&&qa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Bi(e,t,a),e=e.sibling;e!==null;)Bi(e,t,a),e=e.sibling}function Bp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);It(t,o,a),t[Tt]=e,t[Nt]=a}catch(f){Je(e,e.return,f)}}var ma=!1,wt=!1,Hu=!1,Up=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function yS(e,t){if(e=e.containerInfo,lf=os,e=Zm(e),Nc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var s=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var y=0,w=-1,O=-1,P=0,le=0,ie=e,F=null;t:for(;;){for(var ee;ie!==a||s!==0&&ie.nodeType!==3||(w=y+s),ie!==f||o!==0&&ie.nodeType!==3||(O=y+o),ie.nodeType===3&&(y+=ie.nodeValue.length),(ee=ie.firstChild)!==null;)F=ie,ie=ee;for(;;){if(ie===e)break t;if(F===a&&++P===s&&(w=y),F===f&&++le===o&&(O=y),(ee=ie.nextSibling)!==null)break;ie=F,F=ie.parentNode}ie=ee}a=w===-1||O===-1?null:{start:w,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(of={focusedElem:e,selectionRange:a},os=!1,Dt=t;Dt!==null;)if(t=Dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Dt=e;else for(;Dt!==null;){switch(t=Dt,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++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,s=f.memoizedProps,f=f.memoizedState,o=a.stateNode;try{var ve=Cl(a.type,s);e=o.getSnapshotBeforeUpdate(ve,f),o.__reactInternalSnapshotBeforeUpdate=e}catch(Me){Je(a,a.return,Me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)cf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cf(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,Dt=e;break}Dt=t.return}}function Ip(e,t,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:pa(e,a),o&4&&yr(5,a);break;case 1:if(pa(e,a),o&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Je(a,a.return,y)}else{var s=Cl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Je(a,a.return,y)}}o&64&&jp(a),o&512&&vr(a,a.return);break;case 3:if(pa(e,a),o&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{Th(e,t)}catch(y){Je(a,a.return,y)}}break;case 27:t===null&&o&4&&Bp(a);case 26:case 5:pa(e,a),t===null&&o&4&&Lp(a),o&512&&vr(a,a.return);break;case 12:pa(e,a);break;case 31:pa(e,a),o&4&&Vp(e,a);break;case 13:pa(e,a),o&4&&qp(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=MS.bind(null,a),$S(e,a))));break;case 22:if(o=a.memoizedState!==null||ma,!o){t=t!==null&&t.memoizedState!==null||wt,s=ma;var f=wt;ma=o,(wt=t)&&!f?ga(e,a,(a.subtreeFlags&8772)!==0):pa(e,a),ma=s,wt=f}break;case 30:break;default:pa(e,a)}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mc(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 ut=null,Zt=!1;function ha(e,t,a){for(a=a.child;a!==null;)Yp(e,t,a),a=a.sibling}function Yp(e,t,a){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(ta,a)}catch{}switch(a.tag){case 26:wt||Pn(a,t),ha(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:wt||Pn(a,t);var o=ut,s=Zt;qa(a.type)&&(ut=a.stateNode,Zt=!1),ha(e,t,a),Ar(a.stateNode),ut=o,Zt=s;break;case 5:wt||Pn(a,t);case 6:if(o=ut,s=Zt,ut=null,ha(e,t,a),ut=o,Zt=s,ut!==null)if(Zt)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(a.stateNode)}catch(f){Je(a,t,f)}else try{ut.removeChild(a.stateNode)}catch(f){Je(a,t,f)}break;case 18:ut!==null&&(Zt?(e=ut,jg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Co(e)):jg(ut,a.stateNode));break;case 4:o=ut,s=Zt,ut=a.stateNode.containerInfo,Zt=!0,ha(e,t,a),ut=o,Zt=s;break;case 0:case 11:case 14:case 15:Ha(2,a,t),wt||Ha(4,a,t),ha(e,t,a);break;case 1:wt||(Pn(a,t),o=a.stateNode,typeof o.componentWillUnmount=="function"&&kp(a,t,o)),ha(e,t,a);break;case 21:ha(e,t,a);break;case 22:wt=(o=wt)||a.memoizedState!==null,ha(e,t,a),wt=o;break;default:ha(e,t,a)}}function Vp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Co(e)}catch(a){Je(t,t.return,a)}}}function qp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Co(e)}catch(a){Je(t,t.return,a)}}function vS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(i(435,e.tag))}}function Ui(e,t){var a=vS(e);t.forEach(function(o){if(!a.has(o)){a.add(o);var s=AS.bind(null,e,o);o.then(s,s)}})}function Jt(e,t){var a=t.deletions;if(a!==null)for(var o=0;o<a.length;o++){var s=a[o],f=e,y=t,w=y;e:for(;w!==null;){switch(w.tag){case 27:if(qa(w.type)){ut=w.stateNode,Zt=!1;break e}break;case 5:ut=w.stateNode,Zt=!1;break e;case 3:case 4:ut=w.stateNode.containerInfo,Zt=!0;break e}w=w.return}if(ut===null)throw Error(i(160));Yp(f,y,s),ut=null,Zt=!1,f=s.alternate,f!==null&&(f.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xp(t,e),t=t.sibling}var Ln=null;function Xp(e,t){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),Wt(e),o&4&&(Ha(3,e,e.return),yr(3,e),Ha(5,e,e.return));break;case 1:Jt(t,e),Wt(e),o&512&&(wt||a===null||Pn(a,a.return)),o&64&&ma&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var s=Ln;if(Jt(t,e),Wt(e),o&512&&(wt||a===null||Pn(a,a.return)),o&4){var f=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(o){case"title":f=s.getElementsByTagName("title")[0],(!f||f[Xo]||f[Tt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=s.createElement(o),s.head.insertBefore(f,s.querySelector("head > title"))),It(f,o,a),f[Tt]=e,Ot(f),o=f;break e;case"link":var y=Xg("link","href",s).get(o+(a.href||""));if(y){for(var w=0;w<y.length;w++)if(f=y[w],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)){y.splice(w,1);break t}}f=s.createElement(o),It(f,o,a),s.head.appendChild(f);break;case"meta":if(y=Xg("meta","content",s).get(o+(a.content||""))){for(w=0;w<y.length;w++)if(f=y[w],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)){y.splice(w,1);break t}}f=s.createElement(o),It(f,o,a),s.head.appendChild(f);break;default:throw Error(i(468,o))}f[Tt]=e,Ot(f),o=f}e.stateNode=o}else $g(s,e.type,e.stateNode);else e.stateNode=qg(s,o,e.memoizedProps);else f!==o?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,o===null?$g(s,e.type,e.stateNode):qg(s,o,e.memoizedProps)):o===null&&e.stateNode!==null&&ju(e,e.memoizedProps,a.memoizedProps)}break;case 27:Jt(t,e),Wt(e),o&512&&(wt||a===null||Pn(a,a.return)),a!==null&&o&4&&ju(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Jt(t,e),Wt(e),o&512&&(wt||a===null||Pn(a,a.return)),e.flags&32){s=e.stateNode;try{Pl(s,"")}catch(ve){Je(e,e.return,ve)}}o&4&&e.stateNode!=null&&(s=e.memoizedProps,ju(e,s,a!==null?a.memoizedProps:s)),o&1024&&(Hu=!0);break;case 6:if(Jt(t,e),Wt(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(ve){Je(e,e.return,ve)}}break;case 3:if(ts=null,s=Ln,Ln=Wi(t.containerInfo),Jt(t,e),Ln=s,Wt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{Co(t.containerInfo)}catch(ve){Je(e,e.return,ve)}Hu&&(Hu=!1,$p(e));break;case 4:o=Ln,Ln=Wi(e.stateNode.containerInfo),Jt(t,e),Wt(e),Ln=o;break;case 12:Jt(t,e),Wt(e);break;case 31:Jt(t,e),Wt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ui(e,o)));break;case 13:Jt(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Gi=dt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ui(e,o)));break;case 22:s=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,P=ma,le=wt;if(ma=P||s,wt=le||O,Jt(t,e),wt=le,ma=P,Wt(e),o&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||O||ma||wt||Ml(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){O=a=t;try{if(f=O.stateNode,s)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{w=O.stateNode;var ie=O.memoizedProps.style,F=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;w.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(ve){Je(O,O.return,ve)}}}else if(t.tag===6){if(a===null){O=t;try{O.stateNode.nodeValue=s?"":O.memoizedProps}catch(ve){Je(O,O.return,ve)}}}else if(t.tag===18){if(a===null){O=t;try{var ee=O.stateNode;s?kg(ee,!0):kg(O.stateNode,!1)}catch(ve){Je(O,O.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}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Ui(e,a))));break;case 19:Jt(t,e),Wt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ui(e,o)));break;case 30:break;case 21:break;default:Jt(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{for(var a,o=e.return;o!==null;){if(Hp(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var s=a.stateNode,f=ku(e);Bi(e,f,s);break;case 5:var y=a.stateNode;a.flags&32&&(Pl(y,""),a.flags&=-33);var w=ku(e);Bi(e,w,y);break;case 3:case 4:var O=a.stateNode.containerInfo,P=ku(e);Lu(e,P,O);break;default:throw Error(i(161))}}catch(le){Je(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $p(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$p(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ip(e,t.alternate,t),t=t.sibling}function Ml(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ha(4,t,t.return),Ml(t);break;case 1:Pn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&kp(t,t.return,a),Ml(t);break;case 27:Ar(t.stateNode);case 26:case 5:Pn(t,t.return),Ml(t);break;case 22:t.memoizedState===null&&Ml(t);break;case 30:Ml(t);break;default:Ml(t)}e=e.sibling}}function ga(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,s=e,f=t,y=f.flags;switch(f.tag){case 0:case 11:case 15:ga(s,f,a),yr(4,f);break;case 1:if(ga(s,f,a),o=f,s=o.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(P){Je(o,o.return,P)}if(o=f,s=o.updateQueue,s!==null){var w=o.stateNode;try{var O=s.shared.hiddenCallbacks;if(O!==null)for(s.shared.hiddenCallbacks=null,s=0;s<O.length;s++)Eh(O[s],w)}catch(P){Je(o,o.return,P)}}a&&y&64&&jp(f),vr(f,f.return);break;case 27:Bp(f);case 26:case 5:ga(s,f,a),a&&o===null&&y&4&&Lp(f),vr(f,f.return);break;case 12:ga(s,f,a);break;case 31:ga(s,f,a),a&&y&4&&Vp(s,f);break;case 13:ga(s,f,a),a&&y&4&&qp(s,f);break;case 22:f.memoizedState===null&&ga(s,f,a),vr(f,f.return);break;case 30:break;default:ga(s,f,a)}t=t.sibling}}function Bu(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&&lr(a))}function Uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&lr(e))}function Hn(e,t,a,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pp(e,t,a,o),t=t.sibling}function Pp(e,t,a,o){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Hn(e,t,a,o),s&2048&&yr(9,t);break;case 1:Hn(e,t,a,o);break;case 3:Hn(e,t,a,o),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&lr(e)));break;case 12:if(s&2048){Hn(e,t,a,o),e=t.stateNode;try{var f=t.memoizedProps,y=f.id,w=f.onPostCommit;typeof w=="function"&&w(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Je(t,t.return,O)}}else Hn(e,t,a,o);break;case 31:Hn(e,t,a,o);break;case 13:Hn(e,t,a,o);break;case 23:break;case 22:f=t.stateNode,y=t.alternate,t.memoizedState!==null?f._visibility&2?Hn(e,t,a,o):br(e,t):f._visibility&2?Hn(e,t,a,o):(f._visibility|=2,ho(e,t,a,o,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Bu(y,t);break;case 24:Hn(e,t,a,o),s&2048&&Uu(t.alternate,t);break;default:Hn(e,t,a,o)}}function ho(e,t,a,o,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,y=t,w=a,O=o,P=y.flags;switch(y.tag){case 0:case 11:case 15:ho(f,y,w,O,s),yr(8,y);break;case 23:break;case 22:var le=y.stateNode;y.memoizedState!==null?le._visibility&2?ho(f,y,w,O,s):br(f,y):(le._visibility|=2,ho(f,y,w,O,s)),s&&P&2048&&Bu(y.alternate,y);break;case 24:ho(f,y,w,O,s),s&&P&2048&&Uu(y.alternate,y);break;default:ho(f,y,w,O,s)}t=t.sibling}}function br(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,o=t,s=o.flags;switch(o.tag){case 22:br(a,o),s&2048&&Bu(o.alternate,o);break;case 24:br(a,o),s&2048&&Uu(o.alternate,o);break;default:br(a,o)}t=t.sibling}}var xr=8192;function po(e,t,a){if(e.subtreeFlags&xr)for(e=e.child;e!==null;)Kp(e,t,a),e=e.sibling}function Kp(e,t,a){switch(e.tag){case 26:po(e,t,a),e.flags&xr&&e.memoizedState!==null&&lw(a,Ln,e.memoizedState,e.memoizedProps);break;case 5:po(e,t,a);break;case 3:case 4:var o=Ln;Ln=Wi(e.stateNode.containerInfo),po(e,t,a),Ln=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=xr,xr=16777216,po(e,t,a),xr=o):po(e,t,a));break;default:po(e,t,a)}}function Fp(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 Sr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var o=t[a];Dt=o,Zp(o,e)}Fp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qp(e),e=e.sibling}function Qp(e){switch(e.tag){case 0:case 11:case 15:Sr(e),e.flags&2048&&Ha(9,e,e.return);break;case 3:Sr(e);break;case 12:Sr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ii(e)):Sr(e);break;default:Sr(e)}}function Ii(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var o=t[a];Dt=o,Zp(o,e)}Fp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ha(8,t,t.return),Ii(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Ii(t));break;default:Ii(t)}e=e.sibling}}function Zp(e,t){for(;Dt!==null;){var a=Dt;switch(a.tag){case 0:case 11:case 15:Ha(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:lr(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,Dt=o;else e:for(a=e;Dt!==null;){o=Dt;var s=o.sibling,f=o.return;if(Gp(o),o===a){Dt=null;break e}if(s!==null){s.return=f,Dt=s;break e}Dt=f}}}var bS={getCacheForType:function(e){var t=Bt(bt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Bt(bt).controller.signal}},xS=typeof WeakMap=="function"?WeakMap:Map,Ke=0,lt=null,Be=null,Ie=0,Ze=0,dn=null,Ba=!1,go=!1,Iu=!1,ya=0,ht=0,Ua=0,Al=0,Gu=0,mn=0,yo=0,wr=null,en=null,Yu=!1,Gi=0,Jp=0,Yi=1/0,Vi=null,Ia=null,Ct=0,Ga=null,vo=null,va=0,Vu=0,qu=null,Wp=null,Er=0,Xu=null;function hn(){return(Ke&2)!==0&&Ie!==0?Ie&-Ie:M.T!==null?Zu():Lt()}function eg(){if(mn===0)if((Ie&536870912)===0||Ve){var e=ae;ae<<=1,(ae&3932160)===0&&(ae=262144),mn=e}else mn=536870912;return e=un.current,e!==null&&(e.flags|=32),mn}function tn(e,t,a){(e===lt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(bo(e,0),Ya(e,Ie,mn,!1)),He(e,a),((Ke&2)===0||e!==lt)&&(e===lt&&((Ke&2)===0&&(Al|=a),ht===4&&Ya(e,Ie,mn,!1)),Kn(e))}function tg(e,t,a){if((Ke&6)!==0)throw Error(i(327));var o=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Te(e,t),s=o?ES(e,t):Pu(e,t,!0),f=o;do{if(s===0){go&&!o&&Ya(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!SS(a)){s=Pu(e,t,!1),f=!1;continue}if(s===2){if(f=t,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var w=e;s=wr;var O=w.current.memoizedState.isDehydrated;if(O&&(bo(w,y).flags|=256),y=Pu(w,y,!1),y!==2){if(Iu&&!O){w.errorRecoveryDisabledLanes|=f,Al|=f,s=4;break e}f=en,en=s,f!==null&&(en===null?en=f:en.push.apply(en,f))}s=y}if(f=!1,s!==2)continue}}if(s===1){bo(e,0),Ya(e,t,0,!0);break}e:{switch(o=e,f=s,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ya(o,t,mn,!Ba);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(s=Gi+300-dt(),10<s)){if(Ya(o,t,mn,!Ba),he(o,0,!0)!==0)break e;va=t,o.timeoutHandle=Dg(ng.bind(null,o,a,en,Vi,Yu,t,mn,Al,yo,Ba,f,"Throttled",-0,0),s);break e}ng(o,a,en,Vi,Yu,t,mn,Al,yo,Ba,f,null,-0,0)}}break}while(!0);Kn(e)}function ng(e,t,a,o,s,f,y,w,O,P,le,ie,F,ee){if(e.timeoutHandle=-1,ie=t.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:aa},Kp(t,f,ie);var ve=(f&62914560)===f?Gi-dt():(f&4194048)===f?Jp-dt():0;if(ve=ow(ie,ve),ve!==null){va=f,e.cancelPendingCommit=ve(ug.bind(null,e,t,f,a,o,s,y,w,O,le,ie,null,F,ee)),Ya(e,f,y,!P);return}}ug(e,t,f,a,o,s,y,w,O)}function SS(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 o=0;o<a.length;o++){var s=a[o],f=s.getSnapshot;s=s.value;try{if(!sn(f(),s))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 Ya(e,t,a,o){t&=~Gu,t&=~Al,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var s=t;0<s;){var f=31-Rt(s),y=1<<f;o[f]=-1,s&=~y}a!==0&&Et(e,a,t)}function qi(){return(Ke&6)===0?(Tr(0),!1):!0}function $u(){if(Be!==null){if(Ze===0)var e=Be.return;else e=Be,ia=vl=null,su(e),so=null,rr=0,e=Be;for(;e!==null;)zp(e.alternate,e),e=e.return;Be=null}}function bo(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,GS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),va=0,$u(),lt=e,Be=a=oa(e.current,null),Ie=t,Ze=0,dn=null,Ba=!1,go=Te(e,t),Iu=!1,yo=mn=Gu=Al=Ua=ht=0,en=wr=null,Yu=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var s=31-Rt(o),f=1<<s;t|=e[s],o&=~f}return ya=t,fi(),a}function ag(e,t){je=null,M.H=hr,t===io||t===bi?(t=bh(),Ze=3):t===Qc?(t=bh(),Ze=4):Ze=t===Tu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Be===null&&(ht=1,zi(e,En(t,e.current)))}function lg(){var e=un.current;return e===null?!0:(Ie&4194048)===Ie?An===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===An:!1}function og(){var e=M.H;return M.H=hr,e===null?hr:e}function rg(){var e=M.A;return M.A=bS,e}function Xi(){ht=4,Ba||(Ie&4194048)!==Ie&&un.current!==null||(go=!0),(Ua&134217727)===0&&(Al&134217727)===0||lt===null||Ya(lt,Ie,mn,!1)}function Pu(e,t,a){var o=Ke;Ke|=2;var s=og(),f=rg();(lt!==e||Ie!==t)&&(Vi=null,bo(e,t)),t=!1;var y=ht;e:do try{if(Ze!==0&&Be!==null){var w=Be,O=dn;switch(Ze){case 8:$u(),y=6;break e;case 3:case 2:case 9:case 6:un.current===null&&(t=!0);var P=Ze;if(Ze=0,dn=null,xo(e,w,O,P),a&&go){y=0;break e}break;default:P=Ze,Ze=0,dn=null,xo(e,w,O,P)}}wS(),y=ht;break}catch(le){ag(e,le)}while(!0);return t&&e.shellSuspendCounter++,ia=vl=null,Ke=o,M.H=s,M.A=f,Be===null&&(lt=null,Ie=0,fi()),y}function wS(){for(;Be!==null;)ig(Be)}function ES(e,t){var a=Ke;Ke|=2;var o=og(),s=rg();lt!==e||Ie!==t?(Vi=null,Yi=dt()+500,bo(e,t)):go=Te(e,t);e:do try{if(Ze!==0&&Be!==null){t=Be;var f=dn;t:switch(Ze){case 1:Ze=0,dn=null,xo(e,t,f,1);break;case 2:case 9:if(yh(f)){Ze=0,dn=null,sg(t);break}t=function(){Ze!==2&&Ze!==9||lt!==e||(Ze=7),Kn(e)},f.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:yh(f)?(Ze=0,dn=null,sg(t)):(Ze=0,dn=null,xo(e,t,f,7));break;case 5:var y=null;switch(Be.tag){case 26:y=Be.memoizedState;case 5:case 27:var w=Be;if(y?Pg(y):w.stateNode.complete){Ze=0,dn=null;var O=w.sibling;if(O!==null)Be=O;else{var P=w.return;P!==null?(Be=P,$i(P)):Be=null}break t}}Ze=0,dn=null,xo(e,t,f,5);break;case 6:Ze=0,dn=null,xo(e,t,f,6);break;case 8:$u(),ht=6;break e;default:throw Error(i(462))}}TS();break}catch(le){ag(e,le)}while(!0);return ia=vl=null,M.H=o,M.A=s,Ke=a,Be!==null?0:(lt=null,Ie=0,fi(),ht)}function TS(){for(;Be!==null&&!ct();)ig(Be)}function ig(e){var t=Op(e.alternate,e,ya);e.memoizedProps=e.pendingProps,t===null?$i(e):Be=t}function sg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Cp(a,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=Cp(a,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:su(t);default:zp(a,t),t=Be=rh(t,ya),t=Op(a,t,ya)}e.memoizedProps=e.pendingProps,t===null?$i(e):Be=t}function xo(e,t,a,o){ia=vl=null,su(t),so=null,rr=0;var s=t.return;try{if(dS(e,s,t,a,Ie)){ht=1,zi(e,En(a,e.current)),Be=null;return}}catch(f){if(s!==null)throw Be=s,f;ht=1,zi(e,En(a,e.current)),Be=null;return}t.flags&32768?(Ve||o===1?e=!0:go||(Ie&536870912)!==0?e=!1:(Ba=e=!0,(o===2||o===9||o===3||o===6)&&(o=un.current,o!==null&&o.tag===13&&(o.flags|=16384))),cg(t,e)):$i(t)}function $i(e){var t=e;do{if((t.flags&32768)!==0){cg(t,Ba);return}e=t.return;var a=pS(t.alternate,t,ya);if(a!==null){Be=a;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);ht===0&&(ht=5)}function cg(e,t){do{var a=gS(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);ht=6,Be=null}function ug(e,t,a,o,s,f,y,w,O){e.cancelPendingCommit=null;do Pi();while(Ct!==0);if((Ke&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=kc,ot(e,a,f,y,w,O),e===lt&&(Be=lt=null,Ie=0),vo=t,Ga=e,va=a,Vu=f,qu=s,Wp=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_S(on,function(){return pg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,s=D.p,D.p=2,y=Ke,Ke|=4;try{yS(e,t,a)}finally{Ke=y,D.p=s,M.T=o}}Ct=1,fg(),dg(),mg()}}function fg(){if(Ct===1){Ct=0;var e=Ga,t=vo,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var o=D.p;D.p=2;var s=Ke;Ke|=4;try{Xp(t,e);var f=of,y=Zm(e.containerInfo),w=f.focusedElem,O=f.selectionRange;if(y!==w&&w&&w.ownerDocument&&Qm(w.ownerDocument.documentElement,w)){if(O!==null&&Nc(w)){var P=O.start,le=O.end;if(le===void 0&&(le=P),"selectionStart"in w)w.selectionStart=P,w.selectionEnd=Math.min(le,w.value.length);else{var ie=w.ownerDocument||document,F=ie&&ie.defaultView||window;if(F.getSelection){var ee=F.getSelection(),ve=w.textContent.length,Me=Math.min(O.start,ve),nt=O.end===void 0?Me:Math.min(O.end,ve);!ee.extend&&Me>nt&&(y=nt,nt=Me,Me=y);var U=Fm(w,Me),j=Fm(w,nt);if(U&&j&&(ee.rangeCount!==1||ee.anchorNode!==U.node||ee.anchorOffset!==U.offset||ee.focusNode!==j.node||ee.focusOffset!==j.offset)){var $=ie.createRange();$.setStart(U.node,U.offset),ee.removeAllRanges(),Me>nt?(ee.addRange($),ee.extend(j.node,j.offset)):($.setEnd(j.node,j.offset),ee.addRange($))}}}}for(ie=[],ee=w;ee=ee.parentNode;)ee.nodeType===1&&ie.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ie.length;w++){var oe=ie[w];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}os=!!lf,of=lf=null}finally{Ke=s,D.p=o,M.T=a}}e.current=t,Ct=2}}function dg(){if(Ct===2){Ct=0;var e=Ga,t=vo,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var o=D.p;D.p=2;var s=Ke;Ke|=4;try{Ip(e,t.alternate,t)}finally{Ke=s,D.p=o,M.T=a}}Ct=3}}function mg(){if(Ct===4||Ct===3){Ct=0,vn();var e=Ga,t=vo,a=va,o=Wp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ct=5:(Ct=0,vo=Ga=null,hg(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ia=null),Gt(a),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(ta,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=M.T,s=D.p,D.p=2,M.T=null;try{for(var f=e.onRecoverableError,y=0;y<o.length;y++){var w=o[y];f(w.value,{componentStack:w.stack})}}finally{M.T=t,D.p=s}}(va&3)!==0&&Pi(),Kn(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===Xu?Er++:(Er=0,Xu=e):Er=0,Tr(0)}}function hg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,lr(t)))}function Pi(){return fg(),dg(),mg(),pg()}function pg(){if(Ct!==5)return!1;var e=Ga,t=Vu;Vu=0;var a=Gt(va),o=M.T,s=D.p;try{D.p=32>a?32:a,M.T=null,a=qu,qu=null;var f=Ga,y=va;if(Ct=0,vo=Ga=null,va=0,(Ke&6)!==0)throw Error(i(331));var w=Ke;if(Ke|=4,Qp(f.current),Pp(f,f.current,y,a),Ke=w,Tr(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(ta,f)}catch{}return!0}finally{D.p=s,M.T=o,hg(e,t)}}function gg(e,t,a){t=En(a,t),t=Eu(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(He(e,2),Kn(e))}function Je(e,t,a){if(e.tag===3)gg(e,e,a);else for(;t!==null;){if(t.tag===3){gg(t,e,a);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ia===null||!Ia.has(o))){e=En(a,e),a=yp(2),o=ja(t,a,2),o!==null&&(vp(a,o,t,e),He(o,2),Kn(o));break}}t=t.return}}function Ku(e,t,a){var o=e.pingCache;if(o===null){o=e.pingCache=new xS;var s=new Set;o.set(t,s)}else s=o.get(t),s===void 0&&(s=new Set,o.set(t,s));s.has(a)||(Iu=!0,s.add(a),e=CS.bind(null,e,t,a),t.then(e,e))}function CS(e,t,a){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,lt===e&&(Ie&a)===a&&(ht===4||ht===3&&(Ie&62914560)===Ie&&300>dt()-Gi?(Ke&2)===0&&bo(e,0):Gu|=a,yo===Ie&&(yo=0)),Kn(e)}function yg(e,t){t===0&&(t=Ye()),e=pl(e,t),e!==null&&(He(e,t),Kn(e))}function MS(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),yg(e,a)}function AS(e,t){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(t),yg(e,a)}function _S(e,t){return ln(e,t)}var Ki=null,So=null,Fu=!1,Fi=!1,Qu=!1,Va=0;function Kn(e){e!==So&&e.next===null&&(So===null?Ki=So=e:So=So.next=e),Fi=!0,Fu||(Fu=!0,NS())}function Tr(e,t){if(!Qu&&Fi){Qu=!0;do for(var a=!1,o=Ki;o!==null;){if(e!==0){var s=o.pendingLanes;if(s===0)var f=0;else{var y=o.suspendedLanes,w=o.pingedLanes;f=(1<<31-Rt(42|e)+1)-1,f&=s&~(y&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Sg(o,f))}else f=Ie,f=he(o,o===lt?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Te(o,f)||(a=!0,Sg(o,f));o=o.next}while(a);Qu=!1}}function RS(){vg()}function vg(){Fi=Fu=!1;var e=0;Va!==0&&IS()&&(e=Va);for(var t=dt(),a=null,o=Ki;o!==null;){var s=o.next,f=bg(o,t);f===0?(o.next=null,a===null?Ki=s:a.next=s,s===null&&(So=a)):(a=o,(e!==0||(f&3)!==0)&&(Fi=!0)),o=s}Ct!==0&&Ct!==5||Tr(e),Va!==0&&(Va=0)}function bg(e,t){for(var a=e.suspendedLanes,o=e.pingedLanes,s=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Rt(f),w=1<<y,O=s[y];O===-1?((w&a)===0||(w&o)!==0)&&(s[y]=_e(w,t)):O<=t&&(e.expiredLanes|=w),f&=~w}if(t=lt,a=Ie,a=he(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Pt(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Te(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(o!==null&&Pt(o),Gt(a)){case 2:case 8:a=Ca;break;case 32:a=on;break;case 268435456:a=Kt;break;default:a=on}return o=xg.bind(null,e),a=ln(a,o),e.callbackPriority=t,e.callbackNode=a,t}return o!==null&&o!==null&&Pt(o),e.callbackPriority=2,e.callbackNode=null,2}function xg(e,t){if(Ct!==0&&Ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Pi()&&e.callbackNode!==a)return null;var o=Ie;return o=he(e,e===lt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(tg(e,o,t),bg(e,dt()),e.callbackNode!=null&&e.callbackNode===a?xg.bind(null,e):null)}function Sg(e,t){if(Pi())return null;tg(e,t,!0)}function NS(){YS(function(){(Ke&6)!==0?ln(_t,RS):vg()})}function Zu(){if(Va===0){var e=oo;e===0&&(e=Ma,Ma<<=1,(Ma&261888)===0&&(Ma=256)),Va=e}return Va}function wg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ai(""+e)}function Eg(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 OS(e,t,a,o,s){if(t==="submit"&&a&&a.stateNode===s){var f=wg((s[Nt]||null).action),y=o.submitter;y&&(t=(t=y[Nt]||null)?wg(t.formAction):y.getAttribute("formAction"),t!==null&&(f=t,y=null));var w=new ii("action","action",null,o,s);e.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Va!==0){var O=y?Eg(s,y):new FormData(s);yu(a,{pending:!0,data:O,method:s.method,action:f},null,O)}}else typeof f=="function"&&(w.preventDefault(),O=y?Eg(s,y):new FormData(s),yu(a,{pending:!0,data:O,method:s.method,action:f},f,O))},currentTarget:s}]})}}for(var Ju=0;Ju<jc.length;Ju++){var Wu=jc[Ju],DS=Wu.toLowerCase(),zS=Wu[0].toUpperCase()+Wu.slice(1);kn(DS,"on"+zS)}kn(eh,"onAnimationEnd"),kn(th,"onAnimationIteration"),kn(nh,"onAnimationStart"),kn("dblclick","onDoubleClick"),kn("focusin","onFocus"),kn("focusout","onBlur"),kn(F1,"onTransitionRun"),kn(Q1,"onTransitionStart"),kn(Z1,"onTransitionCancel"),kn(ah,"onTransitionEnd"),Xl("onMouseEnter",["mouseout","mouseover"]),Xl("onMouseLeave",["mouseout","mouseover"]),Xl("onPointerEnter",["pointerout","pointerover"]),Xl("onPointerLeave",["pointerout","pointerover"]),fl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fl("onBeforeInput",["compositionend","keypress","textInput","paste"]),fl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="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(" "),jS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cr));function Tg(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],s=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var y=o.length-1;0<=y;y--){var w=o[y],O=w.instance,P=w.currentTarget;if(w=w.listener,O!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=P;try{f(s)}catch(le){ui(le)}s.currentTarget=null,f=O}else for(y=0;y<o.length;y++){if(w=o[y],O=w.instance,P=w.currentTarget,w=w.listener,O!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=P;try{f(s)}catch(le){ui(le)}s.currentTarget=null,f=O}}}}function Ue(e,t){var a=t[ul];a===void 0&&(a=t[ul]=new Set);var o=e+"__bubble";a.has(o)||(Cg(t,e,2,!1),a.add(o))}function ef(e,t,a){var o=0;t&&(o|=4),Cg(a,e,o,t)}var Qi="_reactListening"+Math.random().toString(36).slice(2);function tf(e){if(!e[Qi]){e[Qi]=!0,vm.forEach(function(a){a!=="selectionchange"&&(jS.has(a)||ef(a,!1,e),ef(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qi]||(t[Qi]=!0,ef("selectionchange",!1,t))}}function Cg(e,t,a,o){switch(ey(t)){case 2:var s=sw;break;case 8:s=cw;break;default:s=yf}a=s.bind(null,t,a,e),s=void 0,!Sc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),o?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function nf(e,t,a,o,s){var f=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var w=o.stateNode.containerInfo;if(w===s)break;if(y===4)for(y=o.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===s)return;y=y.return}for(;w!==null;){if(y=Yl(w),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){o=f=y;continue e}w=w.parentNode}}o=o.return}Nm(function(){var P=f,le=bc(a),ie=[];e:{var F=lh.get(e);if(F!==void 0){var ee=ii,ve=e;switch(e){case"keypress":if(oi(a)===0)break e;case"keydown":case"keyup":ee=A1;break;case"focusin":ve="focus",ee=Cc;break;case"focusout":ve="blur",ee=Cc;break;case"beforeblur":case"afterblur":ee=Cc;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=zm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=p1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=N1;break;case eh:case th:case nh:ee=v1;break;case ah:ee=D1;break;case"scroll":case"scrollend":ee=m1;break;case"wheel":ee=j1;break;case"copy":case"cut":case"paste":ee=x1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=km;break;case"toggle":case"beforetoggle":ee=L1}var Me=(t&4)!==0,nt=!Me&&(e==="scroll"||e==="scrollend"),U=Me?F!==null?F+"Capture":null:F;Me=[];for(var j=P,$;j!==null;){var oe=j;if($=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||$===null||U===null||(oe=Po(j,U),oe!=null&&Me.push(Mr(j,oe,$))),nt)break;j=j.return}0<Me.length&&(F=new ee(F,ve,null,a,le),ie.push({event:F,listeners:Me}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",F&&a!==vc&&(ve=a.relatedTarget||a.fromElement)&&(Yl(ve)||ve[jn]))break e;if((ee||F)&&(F=le.window===le?le:(F=le.ownerDocument)?F.defaultView||F.parentWindow:window,ee?(ve=a.relatedTarget||a.toElement,ee=P,ve=ve?Yl(ve):null,ve!==null&&(nt=u(ve),Me=ve.tag,ve!==nt||Me!==5&&Me!==27&&Me!==6)&&(ve=null)):(ee=null,ve=P),ee!==ve)){if(Me=zm,oe="onMouseLeave",U="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(Me=km,oe="onPointerLeave",U="onPointerEnter",j="pointer"),nt=ee==null?F:$o(ee),$=ve==null?F:$o(ve),F=new Me(oe,j+"leave",ee,a,le),F.target=nt,F.relatedTarget=$,oe=null,Yl(le)===P&&(Me=new Me(U,j+"enter",ve,a,le),Me.target=$,Me.relatedTarget=nt,oe=Me),nt=oe,ee&&ve)t:{for(Me=kS,U=ee,j=ve,$=0,oe=U;oe;oe=Me(oe))$++;oe=0;for(var Ee=j;Ee;Ee=Me(Ee))oe++;for(;0<$-oe;)U=Me(U),$--;for(;0<oe-$;)j=Me(j),oe--;for(;$--;){if(U===j||j!==null&&U===j.alternate){Me=U;break t}U=Me(U),j=Me(j)}Me=null}else Me=null;ee!==null&&Mg(ie,F,ee,Me,!1),ve!==null&&nt!==null&&Mg(ie,nt,ve,Me,!0)}}e:{if(F=P?$o(P):window,ee=F.nodeName&&F.nodeName.toLowerCase(),ee==="select"||ee==="input"&&F.type==="file")var Xe=Vm;else if(Gm(F))if(qm)Xe=$1;else{Xe=q1;var Se=V1}else ee=F.nodeName,!ee||ee.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?P&&yc(P.elementType)&&(Xe=Vm):Xe=X1;if(Xe&&(Xe=Xe(e,P))){Ym(ie,Xe,a,le);break e}Se&&Se(e,F,P),e==="focusout"&&P&&F.type==="number"&&P.memoizedProps.value!=null&&gc(F,"number",F.value)}switch(Se=P?$o(P):window,e){case"focusin":(Gm(Se)||Se.contentEditable==="true")&&(Zl=Se,Oc=P,tr=null);break;case"focusout":tr=Oc=Zl=null;break;case"mousedown":Dc=!0;break;case"contextmenu":case"mouseup":case"dragend":Dc=!1,Jm(ie,a,le);break;case"selectionchange":if(K1)break;case"keydown":case"keyup":Jm(ie,a,le)}var ke;if(Ac)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else Ql?Um(e,a)&&(Ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ge="onCompositionStart");Ge&&(Lm&&a.locale!=="ko"&&(Ql||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&Ql&&(ke=Om()):(Aa=le,wc="value"in Aa?Aa.value:Aa.textContent,Ql=!0)),Se=Zi(P,Ge),0<Se.length&&(Ge=new jm(Ge,e,null,a,le),ie.push({event:Ge,listeners:Se}),ke?Ge.data=ke:(ke=Im(a),ke!==null&&(Ge.data=ke)))),(ke=B1?U1(e,a):I1(e,a))&&(Ge=Zi(P,"onBeforeInput"),0<Ge.length&&(Se=new jm("onBeforeInput","beforeinput",null,a,le),ie.push({event:Se,listeners:Ge}),Se.data=ke)),OS(ie,e,P,a,le)}Tg(ie,t)})}function Mr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Zi(e,t){for(var a=t+"Capture",o=[];e!==null;){var s=e,f=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||f===null||(s=Po(e,a),s!=null&&o.unshift(Mr(e,s,f)),s=Po(e,t),s!=null&&o.push(Mr(e,s,f))),e.tag===3)return o;e=e.return}return[]}function kS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mg(e,t,a,o,s){for(var f=t._reactName,y=[];a!==null&&a!==o;){var w=a,O=w.alternate,P=w.stateNode;if(w=w.tag,O!==null&&O===o)break;w!==5&&w!==26&&w!==27||P===null||(O=P,s?(P=Po(a,f),P!=null&&y.unshift(Mr(a,P,O))):s||(P=Po(a,f),P!=null&&y.push(Mr(a,P,O)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var LS=/\r\n?/g,HS=/\u0000|\uFFFD/g;function Ag(e){return(typeof e=="string"?e:""+e).replace(LS,`
49
+ `).replace(HS,"")}function _g(e,t){return t=Ag(t),Ag(e)===t}function tt(e,t,a,o,s,f){switch(a){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Pl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Pl(e,""+o);break;case"className":ti(e,"class",o);break;case"tabIndex":ti(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ti(e,a,o);break;case"style":_m(e,o,f);break;case"data":if(t!=="object"){ti(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=ai(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="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"&&tt(e,t,"name",s.name,s,null),tt(e,t,"formEncType",s.formEncType,s,null),tt(e,t,"formMethod",s.formMethod,s,null),tt(e,t,"formTarget",s.formTarget,s,null)):(tt(e,t,"encType",s.encType,s,null),tt(e,t,"method",s.method,s,null),tt(e,t,"target",s.target,s,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=ai(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=aa);break;case"onScroll":o!=null&&Ue("scroll",e);break;case"onScrollEnd":o!=null&&Ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=ai(""+o),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":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":Ue("beforetoggle",e),Ue("toggle",e),ei(e,"popover",o);break;case"xlinkActuate":na(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":na(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":na(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":na(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":na(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":na(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":na(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":na(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":na(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ei(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=f1.get(a)||a,ei(e,a,o))}}function af(e,t,a,o,s,f){switch(a){case"style":_m(e,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof o=="string"?Pl(e,o):(typeof o=="number"||typeof o=="bigint")&&Pl(e,""+o);break;case"onScroll":o!=null&&Ue("scroll",e);break;case"onScrollEnd":o!=null&&Ue("scrollend",e);break;case"onClick":o!=null&&(e.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bm.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),f=e[Nt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,s),typeof o=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,o,s);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):ei(e,a,o)}}}function It(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",e),Ue("load",e);var o=!1,s=!1,f;for(f in a)if(a.hasOwnProperty(f)){var y=a[f];if(y!=null)switch(f){case"src":o=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:tt(e,t,f,y,a,null)}}s&&tt(e,t,"srcSet",a.srcSet,a,null),o&&tt(e,t,"src",a.src,a,null);return;case"input":Ue("invalid",e);var w=f=y=s=null,O=null,P=null;for(o in a)if(a.hasOwnProperty(o)){var le=a[o];if(le!=null)switch(o){case"name":s=le;break;case"type":y=le;break;case"checked":O=le;break;case"defaultChecked":P=le;break;case"value":f=le;break;case"defaultValue":w=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,t));break;default:tt(e,t,o,le,a,null)}}Tm(e,f,w,O,P,y,s,!1);return;case"select":Ue("invalid",e),o=y=f=null;for(s in a)if(a.hasOwnProperty(s)&&(w=a[s],w!=null))switch(s){case"value":f=w;break;case"defaultValue":y=w;break;case"multiple":o=w;default:tt(e,t,s,w,a,null)}t=f,a=y,e.multiple=!!o,t!=null?$l(e,!!o,t,!1):a!=null&&$l(e,!!o,a,!0);return;case"textarea":Ue("invalid",e),f=s=o=null;for(y in a)if(a.hasOwnProperty(y)&&(w=a[y],w!=null))switch(y){case"value":o=w;break;case"defaultValue":s=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:tt(e,t,y,w,a,null)}Mm(e,o,s,f);return;case"option":for(O in a)if(a.hasOwnProperty(O)&&(o=a[O],o!=null))switch(O){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:tt(e,t,O,o,a,null)}return;case"dialog":Ue("beforetoggle",e),Ue("toggle",e),Ue("cancel",e),Ue("close",e);break;case"iframe":case"object":Ue("load",e);break;case"video":case"audio":for(o=0;o<Cr.length;o++)Ue(Cr[o],e);break;case"image":Ue("error",e),Ue("load",e);break;case"details":Ue("toggle",e);break;case"embed":case"source":case"link":Ue("error",e),Ue("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(P in a)if(a.hasOwnProperty(P)&&(o=a[P],o!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:tt(e,t,P,o,a,null)}return;default:if(yc(t)){for(le in a)a.hasOwnProperty(le)&&(o=a[le],o!==void 0&&af(e,t,le,o,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(o=a[w],o!=null&&tt(e,t,w,o,a,null))}function BS(e,t,a,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,f=null,y=null,w=null,O=null,P=null,le=null;for(ee in a){var ie=a[ee];if(a.hasOwnProperty(ee)&&ie!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":O=ie;default:o.hasOwnProperty(ee)||tt(e,t,ee,null,o,ie)}}for(var F in o){var ee=o[F];if(ie=a[F],o.hasOwnProperty(F)&&(ee!=null||ie!=null))switch(F){case"type":f=ee;break;case"name":s=ee;break;case"checked":P=ee;break;case"defaultChecked":le=ee;break;case"value":y=ee;break;case"defaultValue":w=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,t));break;default:ee!==ie&&tt(e,t,F,ee,o,ie)}}pc(e,y,w,O,P,le,f,s);return;case"select":ee=y=w=F=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":ee=O;default:o.hasOwnProperty(f)||tt(e,t,f,null,o,O)}for(s in o)if(f=o[s],O=a[s],o.hasOwnProperty(s)&&(f!=null||O!=null))switch(s){case"value":F=f;break;case"defaultValue":w=f;break;case"multiple":y=f;default:f!==O&&tt(e,t,s,f,o,O)}t=w,a=y,o=ee,F!=null?$l(e,!!a,F,!1):!!o!=!!a&&(t!=null?$l(e,!!a,t,!0):$l(e,!!a,a?[]:"",!1));return;case"textarea":ee=F=null;for(w in a)if(s=a[w],a.hasOwnProperty(w)&&s!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:tt(e,t,w,null,o,s)}for(y in o)if(s=o[y],f=a[y],o.hasOwnProperty(y)&&(s!=null||f!=null))switch(y){case"value":F=s;break;case"defaultValue":ee=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(i(91));break;default:s!==f&&tt(e,t,y,s,o,f)}Cm(e,F,ee);return;case"option":for(var ve in a)if(F=a[ve],a.hasOwnProperty(ve)&&F!=null&&!o.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:tt(e,t,ve,null,o,F)}for(O in o)if(F=o[O],ee=a[O],o.hasOwnProperty(O)&&F!==ee&&(F!=null||ee!=null))switch(O){case"selected":e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:tt(e,t,O,F,o,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 Me in a)F=a[Me],a.hasOwnProperty(Me)&&F!=null&&!o.hasOwnProperty(Me)&&tt(e,t,Me,null,o,F);for(P in o)if(F=o[P],ee=a[P],o.hasOwnProperty(P)&&F!==ee&&(F!=null||ee!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,t));break;default:tt(e,t,P,F,o,ee)}return;default:if(yc(t)){for(var nt in a)F=a[nt],a.hasOwnProperty(nt)&&F!==void 0&&!o.hasOwnProperty(nt)&&af(e,t,nt,void 0,o,F);for(le in o)F=o[le],ee=a[le],!o.hasOwnProperty(le)||F===ee||F===void 0&&ee===void 0||af(e,t,le,F,o,ee);return}}for(var U in a)F=a[U],a.hasOwnProperty(U)&&F!=null&&!o.hasOwnProperty(U)&&tt(e,t,U,null,o,F);for(ie in o)F=o[ie],ee=a[ie],!o.hasOwnProperty(ie)||F===ee||F==null&&ee==null||tt(e,t,ie,F,o,ee)}function Rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function US(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var s=a[o],f=s.transferSize,y=s.initiatorType,w=s.duration;if(f&&w&&Rg(y)){for(y=0,w=s.responseEnd,o+=1;o<a.length;o++){var O=a[o],P=O.startTime;if(P>w)break;var le=O.transferSize,ie=O.initiatorType;le&&Rg(ie)&&(O=O.responseEnd,y+=le*(O<w?1:(w-P)/(O-P)))}if(--o,t+=8*(f+y)/(s.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,of=null;function Ji(e){return e.nodeType===9?e:e.ownerDocument}function Ng(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 Og(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 rf(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 sf=null;function IS(){var e=window.event;return e&&e.type==="popstate"?e===sf?!1:(sf=e,!0):(sf=null,!1)}var Dg=typeof setTimeout=="function"?setTimeout:void 0,GS=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,YS=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(VS)}:Dg;function VS(e){setTimeout(function(){throw e})}function qa(e){return e==="head"}function jg(e,t){var a=t,o=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(s),Co(t);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")Ar(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ar(a);for(var f=a.firstChild;f;){var y=f.nextSibling,w=f.nodeName;f[Xo]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=y}}else a==="body"&&Ar(e.ownerDocument.body);a=s}while(a);Co(t)}function kg(e,t){var a=e;e=0;do{var o=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||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function cf(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":cf(a),mc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function qS(e,t,a,o){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Xo])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!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function XS(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=_n(e.nextSibling),e===null))return null;return e}function Lg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function uf(e){return e.data==="$?"||e.data==="$~"}function ff(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $S(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var o=function(){t(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function _n(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 df=null;function Hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return _n(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Bg(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 Ug(e,t,a){switch(t=Ji(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 Ar(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mc(e)}var Rn=new Map,Ig=new Set;function Wi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ba=D.d;D.d={f:PS,r:KS,D:FS,C:QS,L:ZS,m:JS,X:ew,S:WS,M:tw};function PS(){var e=ba.f(),t=qi();return e||t}function KS(e){var t=Vl(e);t!==null&&t.tag===5&&t.type==="form"?ap(t):ba.r(e)}var wo=typeof document>"u"?null:document;function Gg(e,t,a){var o=wo;if(o&&typeof t=="string"&&t){var s=Sn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),Ig.has(s)||(Ig.add(s),e={rel:e,crossOrigin:a,href:t},o.querySelector(s)===null&&(t=o.createElement("link"),It(t,"link",e),Ot(t),o.head.appendChild(t)))}}function FS(e){ba.D(e),Gg("dns-prefetch",e,null)}function QS(e,t){ba.C(e,t),Gg("preconnect",e,t)}function ZS(e,t,a){ba.L(e,t,a);var o=wo;if(o&&e&&t){var s='link[rel="preload"][as="'+Sn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Sn(a.imageSizes)+'"]')):s+='[href="'+Sn(e)+'"]';var f=s;switch(t){case"style":f=Eo(e);break;case"script":f=To(e)}Rn.has(f)||(e=h({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Rn.set(f,e),o.querySelector(s)!==null||t==="style"&&o.querySelector(_r(f))||t==="script"&&o.querySelector(Rr(f))||(t=o.createElement("link"),It(t,"link",e),Ot(t),o.head.appendChild(t)))}}function JS(e,t){ba.m(e,t);var a=wo;if(a&&e){var o=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Sn(o)+'"][href="'+Sn(e)+'"]',f=s;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=To(e)}if(!Rn.has(f)&&(e=h({rel:"modulepreload",href:e},t),Rn.set(f,e),a.querySelector(s)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Rr(f)))return}o=a.createElement("link"),It(o,"link",e),Ot(o),a.head.appendChild(o)}}}function WS(e,t,a){ba.S(e,t,a);var o=wo;if(o&&e){var s=ql(o).hoistableStyles,f=Eo(e);t=t||"default";var y=s.get(f);if(!y){var w={loading:0,preload:null};if(y=o.querySelector(_r(f)))w.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Rn.get(f))&&mf(e,a);var O=y=o.createElement("link");Ot(O),It(O,"link",e),O._p=new Promise(function(P,le){O.onload=P,O.onerror=le}),O.addEventListener("load",function(){w.loading|=1}),O.addEventListener("error",function(){w.loading|=2}),w.loading|=4,es(y,t,o)}y={type:"stylesheet",instance:y,count:1,state:w},s.set(f,y)}}}function ew(e,t){ba.X(e,t);var a=wo;if(a&&e){var o=ql(a).hoistableScripts,s=To(e),f=o.get(s);f||(f=a.querySelector(Rr(s)),f||(e=h({src:e,async:!0},t),(t=Rn.get(s))&&hf(e,t),f=a.createElement("script"),Ot(f),It(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(s,f))}}function tw(e,t){ba.M(e,t);var a=wo;if(a&&e){var o=ql(a).hoistableScripts,s=To(e),f=o.get(s);f||(f=a.querySelector(Rr(s)),f||(e=h({src:e,async:!0,type:"module"},t),(t=Rn.get(s))&&hf(e,t),f=a.createElement("script"),Ot(f),It(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(s,f))}}function Yg(e,t,a,o){var s=(s=ce.current)?Wi(s):null;if(!s)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Eo(a.href),a=ql(s).hoistableStyles,o=a.get(t),o||(o={type:"style",instance:null,count:0,state:null},a.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Eo(a.href);var f=ql(s).hoistableStyles,y=f.get(e);if(y||(s=s.ownerDocument||s,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=s.querySelector(_r(e)))&&!f._p&&(y.instance=f,y.state.loading=5),Rn.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},Rn.set(e,a),f||nw(s,e,a,y.state))),t&&o===null)throw Error(i(528,""));return y}if(t&&o!==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=To(a),a=ql(s).hoistableScripts,o=a.get(t),o||(o={type:"script",instance:null,count:0,state:null},a.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Eo(e){return'href="'+Sn(e)+'"'}function _r(e){return'link[rel="stylesheet"]['+e+"]"}function Vg(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function nw(e,t,a,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),It(t,"link",a),Ot(t),e.head.appendChild(t))}function To(e){return'[src="'+Sn(e)+'"]'}function Rr(e){return"script[async]"+e}function qg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Sn(a.href)+'"]');if(o)return t.instance=o,Ot(o),o;var s=h({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Ot(o),It(o,"style",s),es(o,a.precedence,e),t.instance=o;case"stylesheet":s=Eo(a.href);var f=e.querySelector(_r(s));if(f)return t.state.loading|=4,t.instance=f,Ot(f),f;o=Vg(a),(s=Rn.get(s))&&mf(o,s),f=(e.ownerDocument||e).createElement("link"),Ot(f);var y=f;return y._p=new Promise(function(w,O){y.onload=w,y.onerror=O}),It(f,"link",o),t.state.loading|=4,es(f,a.precedence,e),t.instance=f;case"script":return f=To(a.src),(s=e.querySelector(Rr(f)))?(t.instance=s,Ot(s),s):(o=a,(s=Rn.get(f))&&(o=h({},a),hf(o,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ot(s),It(s,"link",o),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,es(o,a.precedence,e));return t.instance}function es(e,t,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=o.length?o[o.length-1]:null,f=s,y=0;y<o.length;y++){var w=o[y];if(w.dataset.precedence===t)f=w;else if(f!==s)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function mf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function hf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ts=null;function Xg(e,t,a){if(ts===null){var o=new Map,s=ts=new Map;s.set(a,o)}else s=ts,o=s.get(a),o||(o=new Map,s.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var f=a[s];if(!(f[Xo]||f[Tt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(t)||"";y=e+y;var w=o.get(y);w?w.push(f):o.set(y,[f])}}return o}function $g(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function aw(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 Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lw(e,t,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=Eo(o.href),f=t.querySelector(_r(s));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ns.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,Ot(f);return}f=t.ownerDocument||t,o=Vg(o),(s=Rn.get(s))&&mf(o,s),f=f.createElement("link"),Ot(f);var y=f;y._p=new Promise(function(w,O){y.onload=w,y.onerror=O}),It(f,"link",o),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=ns.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var pf=0;function ow(e,t){return e.stylesheets&&e.count===0&&ls(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&ls(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&pf===0&&(pf=62500*US());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ls(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>pf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(s)}}:null}function ns(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ls(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var as=null;function ls(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,as=new Map,t.forEach(rw,e),as=null,ns.call(e))}function rw(e,t){if(!(t.state.loading&4)){var a=as.get(e);if(a)var o=a.get(null);else{a=new Map,as.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<s.length;f++){var y=s[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),o=y)}o&&a.set(null,o)}s=t.instance,y=s.getAttribute("data-precedence"),f=a.get(y)||o,f===o&&a.set(null,s),a.set(y,s),this.count++,o=ns.bind(this),s.addEventListener("load",o),s.addEventListener("error",o),f?f.parentNode.insertBefore(s,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Nr={$$typeof:N,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function iw(e,t,a,o,s,f,y,w,O){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=We(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=We(0),this.hiddenUpdates=We(null),this.identifierPrefix=o,this.onUncaughtError=s,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function Kg(e,t,a,o,s,f,y,w,O,P,le,ie){return e=new iw(e,t,a,y,O,P,le,ie,w),t=1,f===!0&&(t|=24),f=cn(3,null,null,t),e.current=f,f.stateNode=e,t=Pc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:o,isDehydrated:a,cache:t},Zc(f),e}function Fg(e){return e?(e=eo,e):eo}function Qg(e,t,a,o,s,f){s=Fg(s),o.context===null?o.context=s:o.pendingContext=s,o=za(t),o.payload={element:a},f=f===void 0?null:f,f!==null&&(o.callback=f),a=ja(e,o,t),a!==null&&(tn(a,e,t),sr(a,e,t))}function Zg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function gf(e,t){Zg(e,t),(e=e.alternate)&&Zg(e,t)}function Jg(e){if(e.tag===13||e.tag===31){var t=pl(e,67108864);t!==null&&tn(t,e,67108864),gf(e,67108864)}}function Wg(e){if(e.tag===13||e.tag===31){var t=hn();t=Vn(t);var a=pl(e,t);a!==null&&tn(a,e,t),gf(e,t)}}var os=!0;function sw(e,t,a,o){var s=M.T;M.T=null;var f=D.p;try{D.p=2,yf(e,t,a,o)}finally{D.p=f,M.T=s}}function cw(e,t,a,o){var s=M.T;M.T=null;var f=D.p;try{D.p=8,yf(e,t,a,o)}finally{D.p=f,M.T=s}}function yf(e,t,a,o){if(os){var s=vf(o);if(s===null)nf(e,t,o,rs,a),ty(e,o);else if(fw(s,e,t,a,o))o.stopPropagation();else if(ty(e,o),t&4&&-1<uw.indexOf(e)){for(;s!==null;){var f=Vl(s);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=me(f.pendingLanes);if(y!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;y;){var O=1<<31-Rt(y);w.entanglements[1]|=O,y&=~O}Kn(f),(Ke&6)===0&&(Yi=dt()+500,Tr(0))}}break;case 31:case 13:w=pl(f,2),w!==null&&tn(w,f,2),qi(),gf(f,2)}if(f=vf(o),f===null&&nf(e,t,o,rs,a),f===s)break;s=f}s!==null&&o.stopPropagation()}else nf(e,t,o,null,a)}}function vf(e){return e=bc(e),bf(e)}var rs=null;function bf(e){if(rs=null,e=Yl(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 rs=e,null}function ey(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(Dn()){case _t:return 2;case Ca:return 8;case on:case Yn:return 32;case Kt:return 268435456;default:return 32}default:return 32}}var xf=!1,Xa=null,$a=null,Pa=null,Or=new Map,Dr=new Map,Ka=[],uw="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 ty(e,t){switch(e){case"focusin":case"focusout":Xa=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Pa=null;break;case"pointerover":case"pointerout":Or.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dr.delete(t.pointerId)}}function zr(e,t,a,o,s,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:o,nativeEvent:f,targetContainers:[s]},t!==null&&(t=Vl(t),t!==null&&Jg(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function fw(e,t,a,o,s){switch(t){case"focusin":return Xa=zr(Xa,e,t,a,o,s),!0;case"dragenter":return $a=zr($a,e,t,a,o,s),!0;case"mouseover":return Pa=zr(Pa,e,t,a,o,s),!0;case"pointerover":var f=s.pointerId;return Or.set(f,zr(Or.get(f)||null,e,t,a,o,s)),!0;case"gotpointercapture":return f=s.pointerId,Dr.set(f,zr(Dr.get(f)||null,e,t,a,o,s)),!0}return!1}function ny(e){var t=Yl(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,qn(e.priority,function(){Wg(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,qn(e.priority,function(){Wg(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 is(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=vf(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);vc=o,a.target.dispatchEvent(o),vc=null}else return t=Vl(a),t!==null&&Jg(t),e.blockedOn=a,!1;t.shift()}return!0}function ay(e,t,a){is(e)&&a.delete(t)}function dw(){xf=!1,Xa!==null&&is(Xa)&&(Xa=null),$a!==null&&is($a)&&($a=null),Pa!==null&&is(Pa)&&(Pa=null),Or.forEach(ay),Dr.forEach(ay)}function ss(e,t){e.blockedOn===t&&(e.blockedOn=null,xf||(xf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,dw)))}var cs=null;function ly(e){cs!==e&&(cs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){cs===e&&(cs=null);for(var t=0;t<e.length;t+=3){var a=e[t],o=e[t+1],s=e[t+2];if(typeof o!="function"){if(bf(o||a)===null)continue;break}var f=Vl(a);f!==null&&(e.splice(t,3),t-=3,yu(f,{pending:!0,data:s,method:a.method,action:o},o,s))}}))}function Co(e){function t(O){return ss(O,e)}Xa!==null&&ss(Xa,e),$a!==null&&ss($a,e),Pa!==null&&ss(Pa,e),Or.forEach(t),Dr.forEach(t);for(var a=0;a<Ka.length;a++){var o=Ka[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ka.length&&(a=Ka[0],a.blockedOn===null);)ny(a),a.blockedOn===null&&Ka.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var s=a[o],f=a[o+1],y=s[Nt]||null;if(typeof f=="function")y||ly(a);else if(y){var w=null;if(f&&f.hasAttribute("formAction")){if(s=f,y=f[Nt]||null)w=y.formAction;else if(bf(s)!==null)continue}else w=y.action;typeof w=="function"?a[o+1]=w:(a.splice(o,3),o-=3),ly(a)}}}function oy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return s=y})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),o||setTimeout(a,20)}function a(){if(!o&&!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 o=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Sf(e){this._internalRoot=e}us.prototype.render=Sf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,o=hn();Qg(a,o,e,t,null,null)},us.prototype.unmount=Sf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qg(e.current,2,null,e,null,null),qi(),t[jn]=null}};function us(e){this._internalRoot=e}us.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lt();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ka.length&&t!==0&&t<Ka[a].priority;a++);Ka.splice(a,0,e),a===0&&ny(e)}};var ry=l.version;if(ry!=="19.2.5")throw Error(i(527,ry,"19.2.5"));D.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?b(e):null,e=e===null?null:e.stateNode,e};var mw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fs.isDisabled&&fs.supportsFiber)try{ta=fs.inject(mw),kt=fs}catch{}}return kr.createRoot=function(e,t){if(!c(e))throw Error(i(299));var a=!1,o="",s=mp,f=hp,y=pp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Kg(e,1,!1,null,null,a,o,null,s,f,y,oy),e[jn]=t.current,tf(e),new Sf(t)},kr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(i(299));var o=!1,s="",f=mp,y=hp,w=pp,O=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),t=Kg(e,1,!0,t,a??null,o,s,O,f,y,w,oy),t.context=Fg(null),a=t.current,o=hn(),o=Vn(o),s=za(o),s.callback=null,ja(a,s,o),a=o,t.current.lanes=a,He(t,a),Kn(t),e[jn]=t.current,tf(e),new us(t)},kr.version="19.2.5",kr}var gy;function Ew(){if(gy)return Tf.exports;gy=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(l){console.error(l)}}return n(),Tf.exports=ww(),Tf.exports}var Tw=Ew();const Cw=Dd(Tw);var $r=Y0();const V0=Dd($r);function Mw(n){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",l.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const Aw=n=>{switch(n){case"success":return Nw;case"info":return Dw;case"warning":return Ow;case"error":return zw;default:return null}},_w=Array(12).fill(0),Rw=({visible:n,className:l})=>fe.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":n},fe.createElement("div",{className:"sonner-spinner"},_w.map((r,i)=>fe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),Nw=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.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"})),Ow=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},fe.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"})),Dw=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.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"})),zw=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.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"})),jw=fe.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"},fe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kw=()=>{const[n,l]=fe.useState(document.hidden);return fe.useEffect(()=>{const r=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let ed=1;class Lw{constructor(){this.subscribe=l=>(this.subscribers.push(l),()=>{const r=this.subscribers.indexOf(l);this.subscribers.splice(r,1)}),this.publish=l=>{this.subscribers.forEach(r=>r(l))},this.addToast=l=>{this.publish(l),this.toasts=[...this.toasts,l]},this.create=l=>{var r;const{message:i,...c}=l,u=typeof(l==null?void 0:l.id)=="number"||((r=l.id)==null?void 0:r.length)>0?l.id:ed++,d=this.toasts.find(p=>p.id===u),m=l.dismissible===void 0?!0:l.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),d?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...l,id:u,title:i}),{...p,...l,id:u,dismissible:m,title:i}):p):this.addToast({title:i,...c,dismissible:m,id:u}),u},this.dismiss=l=>(l?(this.dismissedToasts.add(l),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:l,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),l),this.message=(l,r)=>this.create({...r,message:l}),this.error=(l,r)=>this.create({...r,message:l,type:"error"}),this.success=(l,r)=>this.create({...r,type:"success",message:l}),this.info=(l,r)=>this.create({...r,type:"info",message:l}),this.warning=(l,r)=>this.create({...r,type:"warning",message:l}),this.loading=(l,r)=>this.create({...r,type:"loading",message:l}),this.promise=(l,r)=>{if(!r)return;let i;r.loading!==void 0&&(i=this.create({...r,promise:l,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const c=Promise.resolve(l instanceof Function?l():l);let u=i!==void 0,d;const m=c.then(async g=>{if(d=["resolve",g],fe.isValidElement(g))u=!1,this.create({id:i,type:"default",message:g});else if(Bw(g)&&!g.ok){u=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${g.status}`):r.error,S=typeof r.description=="function"?await r.description(`HTTP error! status: ${g.status}`):r.description,C=typeof h=="object"&&!fe.isValidElement(h)?h:{message:h};this.create({id:i,type:"error",description:S,...C})}else if(g instanceof Error){u=!1;const h=typeof r.error=="function"?await r.error(g):r.error,S=typeof r.description=="function"?await r.description(g):r.description,C=typeof h=="object"&&!fe.isValidElement(h)?h:{message:h};this.create({id:i,type:"error",description:S,...C})}else if(r.success!==void 0){u=!1;const h=typeof r.success=="function"?await r.success(g):r.success,S=typeof r.description=="function"?await r.description(g):r.description,C=typeof h=="object"&&!fe.isValidElement(h)?h:{message:h};this.create({id:i,type:"success",description:S,...C})}}).catch(async g=>{if(d=["reject",g],r.error!==void 0){u=!1;const b=typeof r.error=="function"?await r.error(g):r.error,h=typeof r.description=="function"?await r.description(g):r.description,E=typeof b=="object"&&!fe.isValidElement(b)?b:{message:b};this.create({id:i,type:"error",description:h,...E})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((g,b)=>m.then(()=>d[0]==="reject"?b(d[1]):g(d[1])).catch(b));return typeof i!="string"&&typeof i!="number"?{unwrap:p}:Object.assign(i,{unwrap:p})},this.custom=(l,r)=>{const i=(r==null?void 0:r.id)||ed++;return this.create({jsx:l(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(l=>!this.dismissedToasts.has(l.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const nn=new Lw,Hw=(n,l)=>{const r=(l==null?void 0:l.id)||ed++;return nn.addToast({title:n,...l,id:r}),r},Bw=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Uw=Hw,Iw=()=>nn.toasts,Gw=()=>nn.getActiveToasts(),Ir=Object.assign(Uw,{success:nn.success,info:nn.info,warning:nn.warning,error:nn.error,custom:nn.custom,message:nn.message,promise:nn.promise,dismiss:nn.dismiss,loading:nn.loading},{getHistory:Iw,getToasts:Gw});Mw("[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 ds(n){return n.label!==void 0}const Yw=3,Vw="24px",qw="16px",yy=4e3,Xw=356,$w=14,Pw=45,Kw=200;function Fn(...n){return n.filter(Boolean).join(" ")}function Fw(n){const[l,r]=n.split("-"),i=[];return l&&i.push(l),r&&i.push(r),i}const Qw=n=>{var l,r,i,c,u,d,m,p,g;const{invert:b,toast:h,unstyled:S,interacting:E,setHeights:C,visibleToasts:T,heights:A,index:_,toasts:z,expanded:N,removeToast:L,defaultRichColors:J,closeButton:H,style:I,cancelButtonStyle:k,actionButtonStyle:te,className:re="",descriptionClassName:ue="",duration:X,position:Q,gap:K,expandByDefault:G,classNames:M,icons:D,closeButtonAriaLabel:V="Close toast"}=n,[Y,q]=fe.useState(null),[R,B]=fe.useState(null),[Z,ne]=fe.useState(!1),[W,ce]=fe.useState(!1),[se,ge]=fe.useState(!1),[pe,Ae]=fe.useState(!1),[Ne,Ce]=fe.useState(!1),[at,qe]=fe.useState(0),[zt,jt]=fe.useState(0),At=fe.useRef(h.duration||X||yy),Re=fe.useRef(null),ye=fe.useRef(null),ln=_===0,Pt=_+1<=T,ct=h.type,vn=h.dismissible!==!1,dt=h.className||"",Dn=h.descriptionClassName||"",_t=fe.useMemo(()=>A.findIndex(he=>he.toastId===h.id)||0,[A,h.id]),Ca=fe.useMemo(()=>{var he;return(he=h.closeButton)!=null?he:H},[h.closeButton,H]),on=fe.useMemo(()=>h.duration||X||yy,[h.duration,X]),Yn=fe.useRef(0),Kt=fe.useRef(0),zn=fe.useRef(0),Ft=fe.useRef(null),[ta,kt]=Q.split("-"),rn=fe.useMemo(()=>A.reduce((he,Te,_e)=>_e>=_t?he:he+Te.height,0),[A,_t]),Rt=kw(),Gl=h.invert||b,cl=ct==="loading";Kt.current=fe.useMemo(()=>_t*K+rn,[_t,rn]),fe.useEffect(()=>{At.current=on},[on]),fe.useEffect(()=>{ne(!0)},[]),fe.useEffect(()=>{const he=ye.current;if(he){const Te=he.getBoundingClientRect().height;return jt(Te),C(_e=>[{toastId:h.id,height:Te,position:h.position},..._e]),()=>C(_e=>_e.filter(Ye=>Ye.toastId!==h.id))}},[C,h.id]),fe.useLayoutEffect(()=>{if(!Z)return;const he=ye.current,Te=he.style.height;he.style.height="auto";const _e=he.getBoundingClientRect().height;he.style.height=Te,jt(_e),C(Ye=>Ye.find(He=>He.toastId===h.id)?Ye.map(He=>He.toastId===h.id?{...He,height:_e}:He):[{toastId:h.id,height:_e,position:h.position},...Ye])},[Z,h.title,h.description,C,h.id,h.jsx,h.action,h.cancel]);const bn=fe.useCallback(()=>{ce(!0),qe(Kt.current),C(he=>he.filter(Te=>Te.toastId!==h.id)),setTimeout(()=>{L(h)},Kw)},[h,L,C,Kt]);fe.useEffect(()=>{if(h.promise&&ct==="loading"||h.duration===1/0||h.type==="loading")return;let he;return N||E||Rt?(()=>{if(zn.current<Yn.current){const Ye=new Date().getTime()-Yn.current;At.current=At.current-Ye}zn.current=new Date().getTime()})():(()=>{At.current!==1/0&&(Yn.current=new Date().getTime(),he=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),bn()},At.current))})(),()=>clearTimeout(he)},[N,E,h,ct,Rt,bn]),fe.useEffect(()=>{h.delete&&(bn(),h.onDismiss==null||h.onDismiss.call(h,h))},[bn,h.delete]);function Ma(){var he;if(D!=null&&D.loading){var Te;return fe.createElement("div",{className:Fn(M==null?void 0:M.loader,h==null||(Te=h.classNames)==null?void 0:Te.loader,"sonner-loader"),"data-visible":ct==="loading"},D.loading)}return fe.createElement(Rw,{className:Fn(M==null?void 0:M.loader,h==null||(he=h.classNames)==null?void 0:he.loader),visible:ct==="loading"})}const ae=h.icon||(D==null?void 0:D[ct])||Aw(ct);var de,me;return fe.createElement("li",{tabIndex:0,ref:ye,className:Fn(re,dt,M==null?void 0:M.toast,h==null||(l=h.classNames)==null?void 0:l.toast,M==null?void 0:M.default,M==null?void 0:M[ct],h==null||(r=h.classNames)==null?void 0:r[ct]),"data-sonner-toast":"","data-rich-colors":(de=h.richColors)!=null?de:J,"data-styled":!(h.jsx||h.unstyled||S),"data-mounted":Z,"data-promise":!!h.promise,"data-swiped":Ne,"data-removed":W,"data-visible":Pt,"data-y-position":ta,"data-x-position":kt,"data-index":_,"data-front":ln,"data-swiping":se,"data-dismissible":vn,"data-type":ct,"data-invert":Gl,"data-swipe-out":pe,"data-swipe-direction":R,"data-expanded":!!(N||G&&Z),"data-testid":h.testId,style:{"--index":_,"--toasts-before":_,"--z-index":z.length-_,"--offset":`${W?at:Kt.current}px`,"--initial-height":G?"auto":`${zt}px`,...I,...h.style},onDragEnd:()=>{ge(!1),q(null),Ft.current=null},onPointerDown:he=>{he.button!==2&&(cl||!vn||(Re.current=new Date,qe(Kt.current),he.target.setPointerCapture(he.pointerId),he.target.tagName!=="BUTTON"&&(ge(!0),Ft.current={x:he.clientX,y:he.clientY})))},onPointerUp:()=>{var he,Te,_e;if(pe||!vn)return;Ft.current=null;const Ye=Number(((he=ye.current)==null?void 0:he.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),We=Number(((Te=ye.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),He=new Date().getTime()-((_e=Re.current)==null?void 0:_e.getTime()),ot=Y==="x"?Ye:We,Et=Math.abs(ot)/He;if(Math.abs(ot)>=Pw||Et>.11){qe(Kt.current),h.onDismiss==null||h.onDismiss.call(h,h),B(Y==="x"?Ye>0?"right":"left":We>0?"down":"up"),bn(),Ae(!0);return}else{var ft,pt;(ft=ye.current)==null||ft.style.setProperty("--swipe-amount-x","0px"),(pt=ye.current)==null||pt.style.setProperty("--swipe-amount-y","0px")}Ce(!1),ge(!1),q(null)},onPointerMove:he=>{var Te,_e,Ye;if(!Ft.current||!vn||((Te=window.getSelection())==null?void 0:Te.toString().length)>0)return;const He=he.clientY-Ft.current.y,ot=he.clientX-Ft.current.x;var Et;const ft=(Et=n.swipeDirections)!=null?Et:Fw(Q);!Y&&(Math.abs(ot)>1||Math.abs(He)>1)&&q(Math.abs(ot)>Math.abs(He)?"x":"y");let pt={x:0,y:0};const Vn=Gt=>1/(1.5+Math.abs(Gt)/20);if(Y==="y"){if(ft.includes("top")||ft.includes("bottom"))if(ft.includes("top")&&He<0||ft.includes("bottom")&&He>0)pt.y=He;else{const Gt=He*Vn(He);pt.y=Math.abs(Gt)<Math.abs(He)?Gt:He}}else if(Y==="x"&&(ft.includes("left")||ft.includes("right")))if(ft.includes("left")&&ot<0||ft.includes("right")&&ot>0)pt.x=ot;else{const Gt=ot*Vn(ot);pt.x=Math.abs(Gt)<Math.abs(ot)?Gt:ot}(Math.abs(pt.x)>0||Math.abs(pt.y)>0)&&Ce(!0),(_e=ye.current)==null||_e.style.setProperty("--swipe-amount-x",`${pt.x}px`),(Ye=ye.current)==null||Ye.style.setProperty("--swipe-amount-y",`${pt.y}px`)}},Ca&&!h.jsx&&ct!=="loading"?fe.createElement("button",{"aria-label":V,"data-disabled":cl,"data-close-button":!0,onClick:cl||!vn?()=>{}:()=>{bn(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Fn(M==null?void 0:M.closeButton,h==null||(i=h.classNames)==null?void 0:i.closeButton)},(me=D==null?void 0:D.close)!=null?me:jw):null,(ct||h.icon||h.promise)&&h.icon!==null&&((D==null?void 0:D[ct])!==null||h.icon)?fe.createElement("div",{"data-icon":"",className:Fn(M==null?void 0:M.icon,h==null||(c=h.classNames)==null?void 0:c.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Ma():null,h.type!=="loading"?ae:null):null,fe.createElement("div",{"data-content":"",className:Fn(M==null?void 0:M.content,h==null||(u=h.classNames)==null?void 0:u.content)},fe.createElement("div",{"data-title":"",className:Fn(M==null?void 0:M.title,h==null||(d=h.classNames)==null?void 0:d.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?fe.createElement("div",{"data-description":"",className:Fn(ue,Dn,M==null?void 0:M.description,h==null||(m=h.classNames)==null?void 0:m.description)},typeof h.description=="function"?h.description():h.description):null),fe.isValidElement(h.cancel)?h.cancel:h.cancel&&ds(h.cancel)?fe.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||k,onClick:he=>{ds(h.cancel)&&vn&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,he),bn())},className:Fn(M==null?void 0:M.cancelButton,h==null||(p=h.classNames)==null?void 0:p.cancelButton)},h.cancel.label):null,fe.isValidElement(h.action)?h.action:h.action&&ds(h.action)?fe.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||te,onClick:he=>{ds(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,he),!he.defaultPrevented&&bn())},className:Fn(M==null?void 0:M.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function vy(){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 Zw(n,l){const r={};return[n,l].forEach((i,c)=>{const u=c===1,d=u?"--mobile-offset":"--offset",m=u?qw:Vw;function p(g){["top","right","bottom","left"].forEach(b=>{r[`${d}-${b}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?p(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?r[`${d}-${g}`]=m:r[`${d}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):p(m)}),r}const Jw=fe.forwardRef(function(l,r){const{id:i,invert:c,position:u="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:p,className:g,offset:b,mobileOffset:h,theme:S="light",richColors:E,duration:C,style:T,visibleToasts:A=Yw,toastOptions:_,dir:z=vy(),gap:N=$w,icons:L,containerAriaLabel:J="Notifications"}=l,[H,I]=fe.useState([]),k=fe.useMemo(()=>i?H.filter(Z=>Z.toasterId===i):H.filter(Z=>!Z.toasterId),[H,i]),te=fe.useMemo(()=>Array.from(new Set([u].concat(k.filter(Z=>Z.position).map(Z=>Z.position)))),[k,u]),[re,ue]=fe.useState([]),[X,Q]=fe.useState(!1),[K,G]=fe.useState(!1),[M,D]=fe.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=fe.useRef(null),Y=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=fe.useRef(null),R=fe.useRef(!1),B=fe.useCallback(Z=>{I(ne=>{var W;return(W=ne.find(ce=>ce.id===Z.id))!=null&&W.delete||nn.dismiss(Z.id),ne.filter(({id:ce})=>ce!==Z.id)})},[]);return fe.useEffect(()=>nn.subscribe(Z=>{if(Z.dismiss){requestAnimationFrame(()=>{I(ne=>ne.map(W=>W.id===Z.id?{...W,delete:!0}:W))});return}setTimeout(()=>{V0.flushSync(()=>{I(ne=>{const W=ne.findIndex(ce=>ce.id===Z.id);return W!==-1?[...ne.slice(0,W),{...ne[W],...Z},...ne.slice(W+1)]:[Z,...ne]})})})}),[H]),fe.useEffect(()=>{if(S!=="system"){D(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;const Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:ne})=>{D(ne?"dark":"light")})}catch{Z.addListener(({matches:W})=>{try{D(W?"dark":"light")}catch(ce){console.error(ce)}})}},[S]),fe.useEffect(()=>{H.length<=1&&Q(!1)},[H]),fe.useEffect(()=>{const Z=ne=>{var W;if(d.every(ge=>ne[ge]||ne.code===ge)){var se;Q(!0),(se=V.current)==null||se.focus()}ne.code==="Escape"&&(document.activeElement===V.current||(W=V.current)!=null&&W.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[d]),fe.useEffect(()=>{if(V.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,R.current=!1)}},[V.current]),fe.createElement("section",{ref:r,"aria-label":`${J} ${Y}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},te.map((Z,ne)=>{var W;const[ce,se]=Z.split("-");return k.length?fe.createElement("ol",{key:Z,dir:z==="auto"?vy():z,tabIndex:-1,ref:V,className:g,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":ce,"data-x-position":se,style:{"--front-toast-height":`${((W=re[0])==null?void 0:W.height)||0}px`,"--width":`${Xw}px`,"--gap":`${N}px`,...T,...Zw(b,h)},onBlur:ge=>{R.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(R.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||R.current||(R.current=!0,q.current=ge.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{K||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},k.filter(ge=>!ge.position&&ne===0||ge.position===Z).map((ge,pe)=>{var Ae,Ne;return fe.createElement(Qw,{key:ge.id,icons:L,index:pe,toast:ge,defaultRichColors:E,duration:(Ae=_==null?void 0:_.duration)!=null?Ae:C,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:c,visibleToasts:A,closeButton:(Ne=_==null?void 0:_.closeButton)!=null?Ne:p,interacting:K,position:Z,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:B,toasts:k.filter(Ce=>Ce.position==ge.position),heights:re.filter(Ce=>Ce.position==ge.position),setHeights:ue,expandByDefault:m,gap:N,expanded:X,swipeDirections:l.swipeDirections})})):null}))}),Oe="data-editor-id",Dl="data-slide-root",zl=1920,jl=1080;function jd(n){return`[${Oe}="${n}"]`}function Ww(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function q0(n,l){return`${l}-${n+1}`}function by(n,l){const r=Number.parseInt(n||"",10);return Number.isFinite(r)&&r>0?r:l}function e2(n){return Ww(n)}function ks(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function X0(n){const l=n.querySelector(`[${Dl}]`);if(l)return l.getAttribute("data-slide-width")||l.setAttribute("data-slide-width",String(zl)),l.getAttribute("data-slide-height")||l.setAttribute("data-slide-height",String(jl)),l;const r=n.querySelector(".slide-container");return r?(r.setAttribute(Dl,"true"),r.getAttribute("data-slide-width")||r.setAttribute("data-slide-width",String(zl)),r.getAttribute("data-slide-height")||r.setAttribute("data-slide-height",String(jl)),r):null}function t2(n){return`<!DOCTYPE html>
50
+ ${n.documentElement.outerHTML}`}function n2(n){const l=ks(n);if(!l)return n;const r=X0(l),i=Array.from(l.querySelectorAll("[data-editable]"));return r&&!r.getAttribute(Oe)&&r.setAttribute(Oe,"slide-root"),i.forEach((c,u)=>{if(!c.getAttribute(Oe)){const d=c.getAttribute("data-editable")||"block";c.setAttribute(Oe,q0(u,d))}}),t2(l)}function Qn(n,l="slide-1"){var E;if(!ks(n))return{id:l,title:"Untitled Slide",htmlSource:n,rootSelector:`[${Dl}]`,width:zl,height:jl,elements:[]};const i=n2(n),c=ks(i);if(!c)return{id:l,title:"Untitled Slide",htmlSource:i,rootSelector:`[${Dl}]`,width:zl,height:jl,elements:[]};const u=X0(c),d=Array.from(c.querySelectorAll("[data-editable]")),m=u!=null&&u.getAttribute(Oe)?`[${Oe}="${u.getAttribute(Oe)}"]`:`[${Dl}]`,p=by((u==null?void 0:u.getAttribute("data-slide-width"))??null,zl),g=by((u==null?void 0:u.getAttribute("data-slide-height"))??null,jl),b=d.map((C,T)=>{const A=C.getAttribute("data-editable")||"block",_=C.getAttribute(Oe)||q0(T,A);return{id:_,selector:jd(_),type:A==="block"&&C.getAttribute("data-group")==="true"?"group":A,content:C instanceof HTMLImageElement?C.src:C.textContent||"",tagName:C.tagName.toLowerCase()}}),h=c.querySelector("h1, h2, title"),S=((E=h==null?void 0:h.textContent)==null?void 0:E.trim())||`Slide ${l}`;return{id:e2(l),title:S,htmlSource:i,rootSelector:m,width:p,height:g,elements:b}}function Qe(n,l){return n.querySelector(jd(l))}function a2(n,l,r){const i=ks(n.htmlSource);if(!i)return"";const c=Qe(i,l);return(c==null?void 0:c.style.getPropertyValue(r).trim())||""}function ll(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function kd(n){return`<!DOCTYPE html>
51
+ ${n.documentElement.outerHTML}`}function Uo(n,l){const r=ll(n);return r?(l(r),kd(r)):n}const Ld=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function $0(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function Gr(n){const l=$0();for(const r of Ld){const i=n.style[r];l[r]=i||null}return l}function td(n){return{...$0(),...n}}function Un(n){const l=n||"",r=l.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=l.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:r&&Number.parseFloat(r[1]||"0")||0,translateY:r&&Number.parseFloat(r[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function _f(n){return Math.round(n*100)/100}function Sa(n,l,r){const i=[];return(Math.abs(n)>.01||Math.abs(l)>.01)&&i.push(`translate(${_f(n)}px, ${_f(l)}px)`),Math.abs(r)>.01&&i.push(`rotate(${_f(r)}deg)`),i.length?i.join(" "):null}function Do(n,l,r){return{x:r.offsetX+(n.left-l.left)*r.scale,y:r.offsetY+(n.top-l.top)*r.scale,width:n.width*r.scale,height:n.height*r.scale}}function _l(n,l){return{...l,hidden:n.hidden,sourceFile:n.sourceFile}}function P0(n,l){if(l.type==="slide.visibility.update")return n.id!==l.slideId?n:{...n,hidden:l.nextHidden};if(!("slideId"in l)||l.type==="slide.reorder"||n.id!==l.slideId)return n;switch(l.type){case"operation.batch":return l.operations.reduce((r,i)=>P0(r,i),n);case"text.update":return _l(n,Qn(l2(n.htmlSource,l.elementId,l.nextText),n.id));case"style.update":return _l(n,Qn(o2(n.htmlSource,l.elementId,l.propertyName,l.nextValue),n.id));case"attribute.update":return _l(n,Qn(r2(n.htmlSource,l.elementId,l.attributeName,l.nextValue),n.id));case"element.layout.update":return _l(n,Qn(s2(n.htmlSource,l.elementId,l.nextStyle),n.id));case"element.insert":return _l(n,Qn(c2(n.htmlSource,l),n.id));case"element.remove":return _l(n,Qn(u2(n.htmlSource,l.elementId),n.id));case"group.create":case"group.ungroup":return _l(n,Qn(l.nextHtmlSource,n.id))}}function K0(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(l=>K0(l)).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}}}function ms(n){const l=Number.parseFloat(n||"");return Number.isFinite(l)?l:0}function xy(n){const l=Un(n.style.transform);return{x:ms(n.style.left)+l.translateX,y:ms(n.style.top)+l.translateY,width:ms(n.style.width)||zl,height:ms(n.style.height)||jl}}function Ls(n,l={}){let r=n,i=0,c=0;const u=n.getAttribute(Oe)??"",d=l[u]??xy(n),m=d.width,p=d.height;for(;r;){const g=r.getAttribute(Oe)??"",b=l[g]??xy(r);i+=b.x,c+=b.y;const h=r.parentElement;if(!h||!h.hasAttribute("data-editable"))break;r=h}return{x:i,y:c,width:m,height:p}}function F0(n,l={}){const r=n.parentElement;if(!r||!r.hasAttribute("data-editable"))return{x:0,y:0};const i=Ls(r,l);return{x:i.x,y:i.y}}function nd(n,l){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(l.x*100)/100}px`,n.style.top=`${Math.round(l.y*100)/100}px`,n.style.width=`${Math.round(l.width*100)/100}px`,n.style.height=`${Math.round(l.height*100)/100}px`;const r=Un(n.style.transform),i=Sa(0,0,r.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function Rf(n){const l=n.parentElement;return l&&(l.hasAttribute(Dl)||l.hasAttribute("data-editable"))?l:null}function ad(n){return Array.from(n.children).filter(l=>l instanceof HTMLElement&&l.hasAttribute("data-editable"))}function l2(n,l,r){return Uo(n,i=>{const c=Qe(i,l);c&&(c.textContent=r)})}function o2(n,l,r,i){return Uo(n,c=>{var d;const u=Qe(c,l);u&&(i.trim().length===0?u.style.removeProperty(r):u.style.setProperty(r,i),(d=u.getAttribute("style"))!=null&&d.trim()||u.removeAttribute("style"))})}function r2(n,l,r,i){return Uo(n,c=>{const u=Qe(c,l);u&&(i.trim().length===0?u.removeAttribute(r):u.setAttribute(r,i))})}function i2(n,l){var r;for(const i of Ld){const c=l[i];if(c===null){n.style[i]="";continue}n.style[i]=c}(r=n.getAttribute("style"))!=null&&r.trim()||n.removeAttribute("style")}function s2(n,l,r){return Uo(n,i=>{const c=Qe(i,l);c&&i2(c,r)})}function Hs(n,l){const r=ll(n);if(!r)return null;const i=Qe(r,l);if(!i||!(i.parentElement instanceof HTMLElement))return null;const c=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(Oe):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(Oe):null;return{parentElementId:i.parentElement.getAttribute(Oe),previousSiblingElementId:c,nextSiblingElementId:u}}function Bs(n,l){var i;const r=ll(n);return r?((i=Qe(r,l))==null?void 0:i.outerHTML)??null:null}function Q0(n,l){var u;const r=ll(`<template>${n}</template>`),i=(u=r==null?void 0:r.querySelector("template"))==null?void 0:u.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const c=[i,...Array.from(i.querySelectorAll(`[${Oe}]`))];for(const d of c){const m=d.getAttribute(Oe);m&&l[m]&&d.setAttribute(Oe,l[m])}return i.outerHTML}function ld(n,l){const r=ll(n);if(!r)return l;const i=new Set(Array.from(r.querySelectorAll(`[${Oe}]`)).map(m=>m.getAttribute(Oe)).filter(m=>!!m));if(!i.has(l))return l;const c=l.match(/^(.*?)(?:-(\d+))?$/),u=(c==null?void 0:c[1])||l;let d=Number.parseInt((c==null?void 0:c[2])||"1",10)+1;for(;i.has(`${u}-${d}`);)d+=1;return`${u}-${d}`}function c2(n,l){return Uo(n,r=>{var p;if(Qe(r,l.elementId))return;const i=ll(`<template>${l.html}</template>`),c=(p=i==null?void 0:i.querySelector("template"))==null?void 0:p.content.firstElementChild;if(!(c instanceof HTMLElement))return;const u=(l.parentElementId?Qe(r,l.parentElementId):null)??r.querySelector(`[${Dl}]`)??r.body,d=l.nextSiblingElementId?Qe(r,l.nextSiblingElementId):null,m=l.previousSiblingElementId?Qe(r,l.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===u?u.insertBefore(r.importNode(c,!0),d):(m==null?void 0:m.parentElement)===u?m.after(r.importNode(c,!0)):u.appendChild(r.importNode(c,!0))})}function u2(n,l){return Uo(n,r=>{var i;(i=Qe(r,l))==null||i.remove()})}function f2({html:n,slideId:l,groupElementId:r,elementIds:i,elementRects:c={},timestamp:u=Date.now()}){const d=ll(n);if(!d||!i.length)return null;const m=i.map(H=>Qe(d,H)).filter(H=>!!H);if(m.length!==i.length)return null;const g=m.flatMap(H=>H.getAttribute("data-group")==="true"?ad(H):[H]).filter((H,I,k)=>k.findIndex(te=>te===H)===I);if(g.length<2)return null;const b=Rf(m[0]);if(!b||m.some(H=>Rf(H)!==b)||Qe(d,r))return null;const h=m.filter(H=>H.getAttribute("data-group")==="true"),S=g.map(H=>Ls(H,c)),E=Math.min(...S.map(H=>H.x)),C=Math.min(...S.map(H=>H.y)),T=Math.max(...S.map(H=>H.x+H.width)),A=Math.max(...S.map(H=>H.y+H.height)),_=F0(m[0],c),z=d.createElement("div");z.setAttribute("data-editable","block"),z.setAttribute("data-group","true"),z.setAttribute(Oe,r),nd(z,{x:E-_.x,y:C-_.y,width:T-E,height:A-C});const N=Array.from(b.children).flatMap(H=>H instanceof HTMLElement?h.includes(H)?ad(H).filter(I=>g.includes(I)):g.includes(H)?[H]:[]:[]),L=m.find(H=>Rf(H)===b)??null;(L==null?void 0:L.parentElement)===b?b.insertBefore(z,L):b.appendChild(z);for(const H of N){const I=Ls(H,c);nd(H,{x:I.x-E,y:I.y-C,width:I.width,height:I.height}),z.appendChild(H)}for(const H of h)H.children.length||H.remove();const J=kd(d);return J===n?null:{type:"group.create",slideId:l,groupElementId:r,elementIds:N.map(H=>H.getAttribute(Oe)).filter(H=>!!H),previousHtmlSource:n,nextHtmlSource:J,timestamp:u}}function d2({html:n,slideId:l,groupElementId:r,elementRects:i={},timestamp:c=Date.now()}){const u=ll(n);if(!u)return null;const d=Qe(u,r);if(!d||d.getAttribute("data-group")!=="true"||!d.parentElement)return null;const m=d.parentElement,p=F0(d,i),g=ad(d);if(!g.length)return null;const b=g.map(S=>S.getAttribute(Oe)).filter(S=>!!S);for(const S of g){const E=Ls(S,i);nd(S,{x:E.x-p.x,y:E.y-p.y,width:E.width,height:E.height}),m.insertBefore(S,d)}d.remove();const h=kd(u);return h===n?null:{type:"group.ungroup",slideId:l,groupElementId:r,childElementIds:b,previousHtmlSource:n,nextHtmlSource:h,timestamp:c}}const m2=`<!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 Z0(n,l){const r=new Set(n.map(c=>c.id));if(!r.has(l))return l;let i=2;for(;r.has(`${l}-${i}`);)i+=1;return`${l}-${i}`}function J0(n,l){const r=new Set(n.map(m=>m.sourceFile).filter(Boolean));if(!r.has(l))return l;const i=l.lastIndexOf("."),c=i>=0?l.slice(0,i):l,u=i>=0?l.slice(i):"";let d=2;for(;r.has(`${c}-${d}${u}`);)d+=1;return`${c}-${d}${u}`}function h2(n,l){const r=Math.max(l+1,1),i=Z0(n,`generated-slide-${r}`),c=J0(n,`${String(r).padStart(2,"0")}-untitled.html`);return{...Qn(m2,i),hidden:!1,sourceFile:c,title:"Untitled Slide"}}function p2(n,l){const r=Z0(n,`${l.id}-copy`),i=J0(n,l.sourceFile?g2(l.sourceFile,"copy"):`${r}.html`);return{...Qn(l.htmlSource,r),hidden:l.hidden===!0,sourceFile:i,title:l.title}}function g2(n,l){const r=n.lastIndexOf(".");return r<0?`${n}-${l}`:`${n.slice(0,r)}-${l}${n.slice(r)}`}function Sy(n,l){return Math.min(Math.max(n,0),l)}function Nf(n,l){switch(l.type){case"slide.create":case"slide.duplicate":{const r=Sy(l.index,n.length);return[...n.slice(0,r),l.slide,...n.slice(r)]}case"slide.delete":return n.filter(r=>r.id!==l.slide.id);case"slide.reorder":{const r=n.findIndex(u=>u.id===l.slideId);if(r<0)return n;const i=[...n],[c]=i.splice(r,1);return c?(i.splice(Sy(l.toIndex,i.length),0,c),i):n}default:return n.map(r=>P0(r,l))}}function W0(n){return{slides:n,undoStack:[],redoStack:[]}}function hs(n,l){switch(l.type){case"history.reset":return W0(l.slides);case"history.commit":return{slides:Nf(n.slides,l.operation),undoStack:[...n.undoStack,l.operation],redoStack:[]};case"history.undo":{const r=n.undoStack[n.undoStack.length-1];return r?{slides:Nf(n.slides,K0(r)),undoStack:n.undoStack.slice(0,-1),redoStack:[...n.redoStack,r]}:n}case"history.redo":{const r=n.redoStack[n.redoStack.length-1];return r?{slides:Nf(n.slides,r),undoStack:[...n.undoStack,r],redoStack:n.redoStack.slice(0,-1)}:n}}}async function y2({manifestUrl:n,fetchImpl:l,requestInit:r,slideIdPrefix:i="generated-slide-"}){var h;const c=l??globalThis.fetch;if(!c)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...r},d=await c(n,u);if(!d.ok)return null;const m=await d.json();if(!((h=m.slides)!=null&&h.length))return null;const p=d.url||n,g=new URL(p),b=await Promise.all(m.slides.map(async(S,E)=>{const C=new URL(S.file,p);for(const[z,N]of g.searchParams)C.searchParams.has(z)||C.searchParams.set(z,N);const T=await c(C.toString(),u);if(!T.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const A=await T.text(),_=Qn(A,`${i}${E+1}`);return{..._,hidden:S.hidden===!0,sourceFile:S.file,title:S.title||_.title}}));return{manifest:m,slides:b}}/**
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 ev=(...n)=>n.filter((l,r,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===r).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 v2=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 b2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,r,i)=>i?i.toUpperCase():r.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 wy=n=>{const l=b2(n);return l.charAt(0).toUpperCase()+l.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 Of={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 x2=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},S2=x.createContext({}),w2=()=>x.useContext(S2),E2=x.forwardRef(({color:n,size:l,strokeWidth:r,absoluteStrokeWidth:i,className:c="",children:u,iconNode:d,...m},p)=>{const{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:h=!1,color:S="currentColor",className:E=""}=w2()??{},C=i??h?Number(r??b)*24/Number(l??g):r??b;return x.createElement("svg",{ref:p,...Of,width:l??g??Of.width,height:l??g??Of.height,stroke:n??S,strokeWidth:C,className:ev("lucide",E,c),...!u&&!x2(m)&&{"aria-hidden":"true"},...m},[...d.map(([T,A])=>x.createElement(T,A)),...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 ze=(n,l)=>{const r=x.forwardRef(({className:i,...c},u)=>x.createElement(E2,{ref:u,iconNode:l,className:ev(`lucide-${v2(wy(n))}`,`lucide-${n}`,i),...c}));return r.displayName=wy(n),r};/**
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 T2=[["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"}]],od=ze("align-center-horizontal",T2);/**
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 C2=[["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"}]],tv=ze("align-center-vertical",C2);/**
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 M2=[["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"}]],nv=ze("align-end-horizontal",M2);/**
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 A2=[["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"}]],av=ze("align-end-vertical",A2);/**
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 _2=[["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"}]],lv=ze("align-start-horizontal",_2);/**
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 R2=[["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"}]],ov=ze("align-start-vertical",R2);/**
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 N2=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],rv=ze("arrow-down-to-line",N2);/**
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 O2=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],rd=ze("arrow-up-to-line",O2);/**
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 D2=[["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"}]],z2=ze("box",D2);/**
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 j2=[["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"}]],Df=ze("case-sensitive",j2);/**
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 k2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],iv=ze("check",k2);/**
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 L2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pr=ze("chevron-down",L2);/**
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 H2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],B2=ze("chevron-right",H2);/**
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 U2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Hd=ze("chevron-up",U2);/**
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 I2=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],G2=ze("cloud",I2);/**
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 Y2=[["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"}]],id=ze("columns-3",Y2);/**
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 V2=[["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"}]],sv=ze("copy",V2);/**
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 q2=[["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"}]],X2=ze("download",q2);/**
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 $2=[["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"}]],Ey=ze("eye-off",$2);/**
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 P2=[["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"}]],cv=ze("eye",P2);/**
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 K2=[["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"}]],F2=ze("file-check-corner",K2);/**
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 Q2=[["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"}]],Z2=ze("file-code-corner",Q2);/**
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 J2=[["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"}]],uv=ze("file-text",J2);/**
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 W2=[["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"}]],sd=ze("group",W2);/**
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 eE=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],tE=ze("hash",eE);/**
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 nE=[["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"}]],fv=ze("layers",nE);/**
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 aE=[["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"}]],lE=ze("link-2",aE);/**
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 oE=[["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"}]],Ty=ze("lock",oE);/**
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 rE=[["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"}]],Cy=ze("palette",rE);/**
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 iE=[["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"}]],sE=ze("pilcrow",iE);/**
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 cE=[["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"}]],uE=ze("play",cE);/**
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 fE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zf=ze("plus",fE);/**
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 dE=[["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"}]],mE=ze("presentation",dE);/**
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 hE=[["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"}]],pE=ze("rotate-cw",hE);/**
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 gE=[["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"}]],dv=ze("rows-3",gE);/**
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 yE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],My=ze("square",yE);/**
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 vE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],bE=ze("text-align-center",vE);/**
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 xE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],SE=ze("text-align-end",xE);/**
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 wE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],EE=ze("text-align-start",wE);/**
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 TE=[["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"}]],mv=ze("trash-2",TE);/**
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 CE=[["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"}]],Ay=ze("type",CE);/**
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 ME=[["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"}]],hv=ze("ungroup",ME);/**
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 AE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_E=ze("x",AE);function pv(n){var l,r,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(l=0;l<c;l++)n[l]&&(r=pv(n[l]))&&(i&&(i+=" "),i+=r)}else for(r in n)n[r]&&(i&&(i+=" "),i+=r);return i}function gv(){for(var n,l,r=0,i="",c=arguments.length;r<c;r++)(n=arguments[r])&&(l=pv(n))&&(i&&(i+=" "),i+=l);return i}const RE=(n,l)=>{const r=new Array(n.length+l.length);for(let i=0;i<n.length;i++)r[i]=n[i];for(let i=0;i<l.length;i++)r[n.length+i]=l[i];return r},NE=(n,l)=>({classGroupId:n,validator:l}),yv=(n=new Map,l=null,r)=>({nextPart:n,validators:l,classGroupId:r}),Us="-",_y=[],OE="arbitrary..",DE=n=>{const l=jE(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return zE(d);const m=d.split(Us),p=m[0]===""&&m.length>1?1:0;return vv(m,p,l)},getConflictingClassGroupIds:(d,m)=>{if(m){const p=i[d],g=r[d];return p?g?RE(g,p):p:g||_y}return r[d]||_y}}},vv=(n,l,r)=>{if(n.length-l===0)return r.classGroupId;const c=n[l],u=r.nextPart.get(c);if(u){const g=vv(n,l+1,u);if(g)return g}const d=r.validators;if(d===null)return;const m=l===0?n.join(Us):n.slice(l).join(Us),p=d.length;for(let g=0;g<p;g++){const b=d[g];if(b.validator(m))return b.classGroupId}},zE=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),r=l.indexOf(":"),i=l.slice(0,r);return i?OE+i:void 0})(),jE=n=>{const{theme:l,classGroups:r}=n;return kE(r,l)},kE=(n,l)=>{const r=yv();for(const i in n){const c=n[i];Bd(c,r,i,l)}return r},Bd=(n,l,r,i)=>{const c=n.length;for(let u=0;u<c;u++){const d=n[u];LE(d,l,r,i)}},LE=(n,l,r,i)=>{if(typeof n=="string"){HE(n,l,r);return}if(typeof n=="function"){BE(n,l,r,i);return}UE(n,l,r,i)},HE=(n,l,r)=>{const i=n===""?l:bv(l,n);i.classGroupId=r},BE=(n,l,r,i)=>{if(IE(n)){Bd(n(i),l,r,i);return}l.validators===null&&(l.validators=[]),l.validators.push(NE(r,n))},UE=(n,l,r,i)=>{const c=Object.entries(n),u=c.length;for(let d=0;d<u;d++){const[m,p]=c[d];Bd(p,bv(l,m),r,i)}},bv=(n,l)=>{let r=n;const i=l.split(Us),c=i.length;for(let u=0;u<c;u++){const d=i[u];let m=r.nextPart.get(d);m||(m=yv(),r.nextPart.set(d,m)),r=m}return r},IE=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,GE=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,r=Object.create(null),i=Object.create(null);const c=(u,d)=>{r[u]=d,l++,l>n&&(l=0,i=r,r=Object.create(null))};return{get(u){let d=r[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return c(u,d),d},set(u,d){u in r?r[u]=d:c(u,d)}}},cd="!",Ry=":",YE=[],Ny=(n,l,r,i,c)=>({modifiers:n,hasImportantModifier:l,baseClassName:r,maybePostfixModifierPosition:i,isExternal:c}),VE=n=>{const{prefix:l,experimentalParseClassName:r}=n;let i=c=>{const u=[];let d=0,m=0,p=0,g;const b=c.length;for(let T=0;T<b;T++){const A=c[T];if(d===0&&m===0){if(A===Ry){u.push(c.slice(p,T)),p=T+1;continue}if(A==="/"){g=T;continue}}A==="["?d++:A==="]"?d--:A==="("?m++:A===")"&&m--}const h=u.length===0?c:c.slice(p);let S=h,E=!1;h.endsWith(cd)?(S=h.slice(0,-1),E=!0):h.startsWith(cd)&&(S=h.slice(1),E=!0);const C=g&&g>p?g-p:void 0;return Ny(u,E,S,C)};if(l){const c=l+Ry,u=i;i=d=>d.startsWith(c)?u(d.slice(c.length)):Ny(YE,!1,d,void 0,!0)}if(r){const c=i;i=u=>r({className:u,parseClassName:c})}return i},qE=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((r,i)=>{l.set(r,1e6+i)}),r=>{const i=[];let c=[];for(let u=0;u<r.length;u++){const d=r[u],m=d[0]==="[",p=l.has(d);m||p?(c.length>0&&(c.sort(),i.push(...c),c=[]),i.push(d)):c.push(d)}return c.length>0&&(c.sort(),i.push(...c)),i}},XE=n=>({cache:GE(n.cacheSize),parseClassName:VE(n),sortModifiers:qE(n),...DE(n)}),$E=/\s+/,PE=(n,l)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:u}=l,d=[],m=n.trim().split($E);let p="";for(let g=m.length-1;g>=0;g-=1){const b=m[g],{isExternal:h,modifiers:S,hasImportantModifier:E,baseClassName:C,maybePostfixModifierPosition:T}=r(b);if(h){p=b+(p.length>0?" "+p:p);continue}let A=!!T,_=i(A?C.substring(0,T):C);if(!_){if(!A){p=b+(p.length>0?" "+p:p);continue}if(_=i(C),!_){p=b+(p.length>0?" "+p:p);continue}A=!1}const z=S.length===0?"":S.length===1?S[0]:u(S).join(":"),N=E?z+cd:z,L=N+_;if(d.indexOf(L)>-1)continue;d.push(L);const J=c(_,A);for(let H=0;H<J.length;++H){const I=J[H];d.push(N+I)}p=b+(p.length>0?" "+p:p)}return p},KE=(...n)=>{let l=0,r,i,c="";for(;l<n.length;)(r=n[l++])&&(i=xv(r))&&(c&&(c+=" "),c+=i);return c},xv=n=>{if(typeof n=="string")return n;let l,r="";for(let i=0;i<n.length;i++)n[i]&&(l=xv(n[i]))&&(r&&(r+=" "),r+=l);return r},FE=(n,...l)=>{let r,i,c,u;const d=p=>{const g=l.reduce((b,h)=>h(b),n());return r=XE(g),i=r.cache.get,c=r.cache.set,u=m,m(p)},m=p=>{const g=i(p);if(g)return g;const b=PE(p,r);return c(p,b),b};return u=d,(...p)=>u(KE(...p))},QE=[],Mt=n=>{const l=r=>r[n]||QE;return l.isThemeGetter=!0,l},Sv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,JE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WE=/\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$/,eT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qa=n=>ZE.test(n),Le=n=>!!n&&!Number.isNaN(Number(n)),Za=n=>!!n&&Number.isInteger(Number(n)),jf=n=>n.endsWith("%")&&Le(n.slice(0,-1)),xa=n=>JE.test(n),Ev=()=>!0,aT=n=>WE.test(n)&&!eT.test(n),Ud=()=>!1,lT=n=>tT.test(n),oT=n=>nT.test(n),rT=n=>!be(n)&&!xe(n),iT=n=>ol(n,Mv,Ud),be=n=>Sv.test(n),Rl=n=>ol(n,Av,aT),Oy=n=>ol(n,pT,Le),sT=n=>ol(n,Rv,Ev),cT=n=>ol(n,_v,Ud),Dy=n=>ol(n,Tv,Ud),uT=n=>ol(n,Cv,oT),ps=n=>ol(n,Nv,lT),xe=n=>wv.test(n),Lr=n=>Bl(n,Av),fT=n=>Bl(n,_v),zy=n=>Bl(n,Tv),dT=n=>Bl(n,Mv),mT=n=>Bl(n,Cv),gs=n=>Bl(n,Nv,!0),hT=n=>Bl(n,Rv,!0),ol=(n,l,r)=>{const i=Sv.exec(n);return i?i[1]?l(i[1]):r(i[2]):!1},Bl=(n,l,r=!1)=>{const i=wv.exec(n);return i?i[1]?l(i[1]):r:!1},Tv=n=>n==="position"||n==="percentage",Cv=n=>n==="image"||n==="url",Mv=n=>n==="length"||n==="size"||n==="bg-size",Av=n=>n==="length",pT=n=>n==="number",_v=n=>n==="family-name",Rv=n=>n==="number"||n==="weight",Nv=n=>n==="shadow",gT=()=>{const n=Mt("color"),l=Mt("font"),r=Mt("text"),i=Mt("font-weight"),c=Mt("tracking"),u=Mt("leading"),d=Mt("breakpoint"),m=Mt("container"),p=Mt("spacing"),g=Mt("radius"),b=Mt("shadow"),h=Mt("inset-shadow"),S=Mt("text-shadow"),E=Mt("drop-shadow"),C=Mt("blur"),T=Mt("perspective"),A=Mt("aspect"),_=Mt("ease"),z=Mt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...L(),xe,be],H=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],k=()=>[xe,be,p],te=()=>[Qa,"full","auto",...k()],re=()=>[Za,"none","subgrid",xe,be],ue=()=>["auto",{span:["full",Za,xe,be]},Za,xe,be],X=()=>[Za,"auto",xe,be],Q=()=>["auto","min","max","fr",xe,be],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...k()],D=()=>[Qa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],V=()=>[Qa,"screen","full","dvw","lvw","svw","min","max","fit",...k()],Y=()=>[Qa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],q=()=>[n,xe,be],R=()=>[...L(),zy,Dy,{position:[xe,be]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",dT,iT,{size:[xe,be]}],ne=()=>[jf,Lr,Rl],W=()=>["","none","full",g,xe,be],ce=()=>["",Le,Lr,Rl],se=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[Le,jf,zy,Dy],Ae=()=>["","none",C,xe,be],Ne=()=>["none",Le,xe,be],Ce=()=>["none",Le,xe,be],at=()=>[Le,xe,be],qe=()=>[Qa,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xa],breakpoint:[xa],color:[Ev],container:[xa],"drop-shadow":[xa],ease:["in","out","in-out"],font:[rT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xa],shadow:[xa],spacing:["px",Le],text:[xa],"text-shadow":[xa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qa,be,xe,A]}],container:["container"],columns:[{columns:[Le,be,xe,m]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:te()}],"inset-x":[{"inset-x":te()}],"inset-y":[{"inset-y":te()}],start:[{"inset-s":te(),start:te()}],end:[{"inset-e":te(),end:te()}],"inset-bs":[{"inset-bs":te()}],"inset-be":[{"inset-be":te()}],top:[{top:te()}],right:[{right:te()}],bottom:[{bottom:te()}],left:[{left:te()}],visibility:["visible","invisible","collapse"],z:[{z:[Za,"auto",xe,be]}],basis:[{basis:[Qa,"full","auto",m,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Qa,"auto","initial","none",be]}],grow:[{grow:["",Le,xe,be]}],shrink:[{shrink:["",Le,xe,be]}],order:[{order:[Za,"first","last","none",xe,be]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],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:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[m,"screen",...D()]}],"min-w":[{"min-w":[m,"screen","none",...D()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,Lr,Rl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,hT,sT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jf,be]}],"font-family":[{font:[fT,cT,l]}],"font-features":[{"font-features":[be]}],"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:[c,xe,be]}],"line-clamp":[{"line-clamp":[Le,"none",xe,Oy]}],leading:[{leading:[u,...k()]}],"list-image":[{"list-image":["none",xe,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",xe,Rl]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Le,"auto",xe,be]}],"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",xe,be]}],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",xe,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Za,xe,be],radial:["",xe,be],conic:[Za,xe,be]},mT,uT]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-bs":[{"border-bs":q()}],"border-color-be":[{"border-be":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,xe,be]}],"outline-w":[{outline:["",Le,Lr,Rl]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",b,gs,ps]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",h,gs,ps]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Le,Rl]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",S,gs,ps]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Le,xe,be]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[xe,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"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":L()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,be]}],filter:[{filter:["","none",xe,be]}],blur:[{blur:Ae()}],brightness:[{brightness:[Le,xe,be]}],contrast:[{contrast:[Le,xe,be]}],"drop-shadow":[{"drop-shadow":["","none",E,gs,ps]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Le,xe,be]}],"hue-rotate":[{"hue-rotate":[Le,xe,be]}],invert:[{invert:["",Le,xe,be]}],saturate:[{saturate:[Le,xe,be]}],sepia:[{sepia:["",Le,xe,be]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,be]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[Le,xe,be]}],"backdrop-contrast":[{"backdrop-contrast":[Le,xe,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,xe,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,xe,be]}],"backdrop-invert":[{"backdrop-invert":["",Le,xe,be]}],"backdrop-opacity":[{"backdrop-opacity":[Le,xe,be]}],"backdrop-saturate":[{"backdrop-saturate":[Le,xe,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,xe,be]}],"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",xe,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",xe,be]}],ease:[{ease:["linear","initial",_,xe,be]}],delay:[{delay:[Le,xe,be]}],animate:[{animate:["none",z,xe,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,xe,be]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:at()}],"skew-x":[{"skew-x":at()}],"skew-y":[{"skew-y":at()}],transform:[{transform:[xe,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qe()}],"translate-x":[{"translate-x":qe()}],"translate-y":[{"translate-y":qe()}],"translate-z":[{"translate-z":qe()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"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",xe,be]}],"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",xe,be]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Le,Lr,Rl,Oy]}],stroke:[{stroke:["none",...q()]}],"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"]}},yT=FE(gT);function Pe(...n){return yT(gv(n))}const vT=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:Z2},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:uv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:mE,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:G2,soon:!0}];function bT({title:n,onTitleChange:l,onPresent:r,onExportPdf:i,pdfSlides:c=[],pdfThumbnails:u={},isSaving:d}){const[m,p]=x.useState(!1),[g,b]=x.useState(!1),[h,S]=x.useState(0),E=x.useRef(null),C=n||"Untitled presentation";x.useEffect(()=>{const _=z=>{E.current&&!E.current.contains(z.target)&&p(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]);const T=x.useCallback(_=>{if(!_)return;const z=_.getBoundingClientRect().width;S(Math.ceil(z))},[]),A=_=>{if(p(!1),_.soon){Ir(`${_.label} is not available yet.`,{description:"We are still building this export option."});return}if(_.id==="pdf"){b(!0);return}Ir(`Exporting as ${_.label}...`)};return v.jsxs("header",{className:"px-6 h-14 flex items-center justify-between bg-white border-b border-foreground/[0.06]",children:[v.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[v.jsx("div",{className:"w-8 h-8 rounded-lg bg-foreground flex items-center justify-center shrink-0",children:v.jsx("span",{className:"text-background font-bold text-sm font-display",children:"P"})}),v.jsx("div",{className:"w-px h-5 bg-foreground/10"}),v.jsxs("div",{className:"relative min-w-0 flex-1",children:[v.jsx("input",{value:n,onChange:_=>l==null?void 0:l(_.target.value),className:"max-w-full min-w-0 flex-none rounded-md bg-transparent px-2 py-1 text-[14px] font-medium text-foreground outline-none focus:bg-foreground/[0.04]",style:h?{width:`${h}px`}:void 0,placeholder:"Untitled presentation"}),v.jsx("span",{ref:T,"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 whitespace-pre rounded-md px-2 py-1 text-[14px] font-medium",children:C},C)]}),d?v.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]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("div",{className:"relative",ref:E,children:[v.jsxs("button",{type:"button",onClick:()=>p(_=>!_),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:[v.jsx(X2,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Export"}),v.jsx(Pr,{className:Pe("w-3 h-3 transition-transform",m&&"rotate-180")})]}),m&&v.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:[v.jsx("div",{className:"text-[10px] uppercase tracking-wider text-foreground/40 px-2.5 py-1.5 font-medium",children:"Export formats"}),vT.map(_=>{const z=_.icon;return v.jsxs("button",{type:"button",onClick:()=>A(_),className:Pe("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",_.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[v.jsx("div",{className:"w-7 h-7 rounded-md bg-foreground/[0.04] flex items-center justify-center shrink-0 mt-0.5",children:v.jsx(z,{className:"w-3.5 h-3.5 text-foreground/70"})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"text-[13px] font-medium text-foreground",children:_.label}),_.soon&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-foreground/[0.06] text-foreground/50 uppercase tracking-wider",children:"Soon"})]}),v.jsx("div",{className:"text-[11px] text-foreground/50 mt-0.5 leading-snug",children:_.desc})]}),!_.soon&&v.jsx(iv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},_.id)})]})]}),v.jsxs("button",{type:"button",onClick:r,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:[v.jsx(uE,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Present"})]})]}),g?v.jsx(xT,{slides:c,thumbnails:u,onClose:()=>b(!1),onExport:_=>{b(!1),i==null||i(_)}}):null]})}function xT({slides:n,thumbnails:l,onClose:r,onExport:i}){const c=n.filter(C=>C.file),[u,d]=x.useState("all"),[m,p]=x.useState([]),g=new Set(m),b=m.length,h=u==="all"||u==="selected"&&b>0;x.useEffect(()=>{const C=T=>{T.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]);const S=(C,T)=>{p(A=>T?A.includes(C)?A:[...A,C]:A.filter(_=>_!==C))},E=()=>{if(u==="selected"){m.length>0&&i({mode:"slides",slideFiles:m});return}i({mode:"all"})};return v.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:C=>{C.target===C.currentTarget&&r()},children:v.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:[v.jsxs("div",{className:"flex items-center justify-between border-b border-foreground/[0.08] px-4 py-3",children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(uv,{className:"h-4 w-4 text-foreground/70"})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{id:"pdf-export-title",className:"text-[14px] font-semibold text-foreground",children:"Export PDF"}),v.jsx("p",{className:"mt-0.5 text-[11px] text-foreground/50",children:"Choose which slides to include."})]})]}),v.jsx("button",{type:"button","aria-label":"Close PDF export dialog",onClick:r,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:v.jsx(_E,{className:"h-4 w-4"})})]}),v.jsxs("div",{className:"min-h-0 flex-1 overflow-auto px-4 py-4",children:[v.jsxs("fieldset",{className:"space-y-2",children:[v.jsx("legend",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-foreground/45",children:"PDF range"}),v.jsx(jy,{checked:u==="all",icon:fv,label:"All slides",detail:`${c.length} slides`,onChange:()=>d("all")}),v.jsx(jy,{checked:u==="selected",icon:F2,label:"Selected slides",detail:b===1?"1 slide selected":`${b} slides selected`,onChange:()=>d("selected")})]}),u==="selected"?v.jsxs("div",{className:"mt-4 rounded-md border border-foreground/[0.08]",children:[v.jsx("div",{className:"border-b border-foreground/[0.08] px-3 py-2 text-[11px] font-medium text-foreground/55",children:"Slides"}),v.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:c.map((C,T)=>{const A=C.file;return A?v.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(A)&&"border-foreground/35 bg-foreground/[0.035]"),children:[v.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded border border-foreground/[0.08] bg-white",children:l[C.id]?v.jsx("img",{alt:`Slide ${T+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:l[C.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",T+1]})}),v.jsx("div",{className:"flex min-w-0 flex-col justify-between gap-2",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx("input",{type:"checkbox","aria-label":`Select slide ${T+1}`,checked:g.has(A),onChange:_=>S(A,_.target.checked),className:"mt-0.5 h-3.5 w-3.5 shrink-0 accent-foreground"}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"font-mono text-[11px] text-foreground/45",children:T+1}),v.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]}),v.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[v.jsx("button",{type:"button",onClick:r,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"}),v.jsx("button",{type:"button",onClick:E,disabled:!h,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 jy({checked:n,disabled:l,icon:r,label:i,detail:c,onChange:u}){return v.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]",l?"cursor-not-allowed opacity-45":"hover:border-foreground/20 hover:bg-foreground/[0.03]"),children:[v.jsx("input",{type:"radio",name:"pdf-export-scope",checked:n,disabled:l,onChange:u,className:"h-3.5 w-3.5 accent-foreground"}),v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(r,{className:"h-4 w-4 text-foreground/65"})}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:i}),v.jsx("div",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:c})]})]})}function ky(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Id(...n){return l=>{let r=!1;const i=n.map(c=>{const u=ky(c,l);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let c=0;c<i.length;c++){const u=i[c];typeof u=="function"?u():ky(n[c],null)}}}}function rt(...n){return x.useCallback(Id(...n),n)}function ko(n){const l=wT(n),r=x.forwardRef((i,c)=>{const{children:u,...d}=i,m=x.Children.toArray(u),p=m.find(TT);if(p){const g=p.props.children,b=m.map(h=>h===p?x.Children.count(g)>1?x.Children.only(null):x.isValidElement(g)?g.props.children:null:h);return v.jsx(l,{...d,ref:c,children:x.isValidElement(g)?x.cloneElement(g,void 0,b):null})}return v.jsx(l,{...d,ref:c,children:u})});return r.displayName=`${n}.Slot`,r}var ST=ko("Slot");function wT(n){const l=x.forwardRef((r,i)=>{const{children:c,...u}=r;if(x.isValidElement(c)){const d=MT(c),m=CT(u,c.props);return c.type!==x.Fragment&&(m.ref=i?Id(i,d):d),x.cloneElement(c,m)}return x.Children.count(c)>1?x.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Ov=Symbol("radix.slottable");function ET(n){const l=({children:r})=>v.jsx(v.Fragment,{children:r});return l.displayName=`${n}.Slottable`,l.__radixId=Ov,l}function TT(n){return x.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ov}function CT(n,l){const r={...l};for(const i in l){const c=n[i],u=l[i];/^on[A-Z]/.test(i)?c&&u?r[i]=(...m)=>{const p=u(...m);return c(...m),p}:c&&(r[i]=c):i==="style"?r[i]={...c,...u}:i==="className"&&(r[i]=[c,u].filter(Boolean).join(" "))}return{...n,...r}}function MT(n){var i,c;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,r=l&&"isReactWarning"in l&&l.isReactWarning;return r?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,r=l&&"isReactWarning"in l&&l.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var AT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fe=AT.reduce((n,l)=>{const r=ko(`Primitive.${l}`),i=x.forwardRef((c,u)=>{const{asChild:d,...m}=c,p=d?r:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(p,{...m,ref:u})});return i.displayName=`Primitive.${l}`,{...n,[l]:i}},{});function Dv(n,l){n&&$r.flushSync(()=>n.dispatchEvent(l))}var zv=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"}),_T="VisuallyHidden",jv=x.forwardRef((n,l)=>v.jsx(Fe.span,{...n,ref:l,style:{...zv,...n.style}}));jv.displayName=_T;var RT=jv;function Ul(n,l=[]){let r=[];function i(u,d){const m=x.createContext(d),p=r.length;r=[...r,d];const g=h=>{var _;const{scope:S,children:E,...C}=h,T=((_=S==null?void 0:S[n])==null?void 0:_[p])||m,A=x.useMemo(()=>C,Object.values(C));return v.jsx(T.Provider,{value:A,children:E})};g.displayName=u+"Provider";function b(h,S){var T;const E=((T=S==null?void 0:S[n])==null?void 0:T[p])||m,C=x.useContext(E);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${h}\` must be used within \`${u}\``)}return[g,b]}const c=()=>{const u=r.map(d=>x.createContext(d));return function(m){const p=(m==null?void 0:m[n])||u;return x.useMemo(()=>({[`__scope${n}`]:{...m,[n]:p}}),[m,p])}};return c.scopeName=n,[i,NT(c,...l)]}function NT(...n){const l=n[0];if(n.length===1)return l;const r=()=>{const i=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(u){const d=i.reduce((m,{useScope:p,scopeName:g})=>{const h=p(u)[`__scope${g}`];return{...m,...h}},{});return x.useMemo(()=>({[`__scope${l.scopeName}`]:d}),[d])}};return r.scopeName=l.scopeName,r}function Gd(n){const l=n+"CollectionProvider",[r,i]=Ul(l),[c,u]=r(l,{collectionRef:{current:null},itemMap:new Map}),d=T=>{const{scope:A,children:_}=T,z=fe.useRef(null),N=fe.useRef(new Map).current;return v.jsx(c,{scope:A,itemMap:N,collectionRef:z,children:_})};d.displayName=l;const m=n+"CollectionSlot",p=ko(m),g=fe.forwardRef((T,A)=>{const{scope:_,children:z}=T,N=u(m,_),L=rt(A,N.collectionRef);return v.jsx(p,{ref:L,children:z})});g.displayName=m;const b=n+"CollectionItemSlot",h="data-radix-collection-item",S=ko(b),E=fe.forwardRef((T,A)=>{const{scope:_,children:z,...N}=T,L=fe.useRef(null),J=rt(A,L),H=u(b,_);return fe.useEffect(()=>(H.itemMap.set(L,{ref:L,...N}),()=>void H.itemMap.delete(L))),v.jsx(S,{[h]:"",ref:J,children:z})});E.displayName=b;function C(T){const A=u(n+"CollectionConsumer",T);return fe.useCallback(()=>{const z=A.collectionRef.current;if(!z)return[];const N=Array.from(z.querySelectorAll(`[${h}]`));return Array.from(A.itemMap.values()).sort((H,I)=>N.indexOf(H.ref.current)-N.indexOf(I.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:d,Slot:g,ItemSlot:E},C,i]}function we(n,l,{checkForDefaultPrevented:r=!0}={}){return function(c){if(n==null||n(c),r===!1||!c.defaultPrevented)return l==null?void 0:l(c)}}var Vt=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},OT=G0[" useInsertionEffect ".trim().toString()]||Vt;function Is({prop:n,defaultProp:l,onChange:r=()=>{},caller:i}){const[c,u,d]=DT({defaultProp:l,onChange:r}),m=n!==void 0,p=m?n:c;{const b=x.useRef(n!==void 0);x.useEffect(()=>{const h=b.current;h!==m&&console.warn(`${i} is changing from ${h?"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.`),b.current=m},[m,i])}const g=x.useCallback(b=>{var h;if(m){const S=zT(b)?b(n):b;S!==n&&((h=d.current)==null||h.call(d,S))}else u(b)},[m,n,u,d]);return[p,g]}function DT({defaultProp:n,onChange:l}){const[r,i]=x.useState(n),c=x.useRef(r),u=x.useRef(l);return OT(()=>{u.current=l},[l]),x.useEffect(()=>{var d;c.current!==r&&((d=u.current)==null||d.call(u,r),c.current=r)},[r,c]),[r,i,u]}function zT(n){return typeof n=="function"}function jT(n,l){return x.useReducer((r,i)=>l[r][i]??r,n)}var Io=n=>{const{present:l,children:r}=n,i=kT(l),c=typeof r=="function"?r({present:i.isPresent}):x.Children.only(r),u=rt(i.ref,LT(c));return typeof r=="function"||i.isPresent?x.cloneElement(c,{ref:u}):null};Io.displayName="Presence";function kT(n){const[l,r]=x.useState(),i=x.useRef(null),c=x.useRef(n),u=x.useRef("none"),d=n?"mounted":"unmounted",[m,p]=jT(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const g=ys(i.current);u.current=m==="mounted"?g:"none"},[m]),Vt(()=>{const g=i.current,b=c.current;if(b!==n){const S=u.current,E=ys(g);n?p("MOUNT"):E==="none"||(g==null?void 0:g.display)==="none"?p("UNMOUNT"):p(b&&S!==E?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,p]),Vt(()=>{if(l){let g;const b=l.ownerDocument.defaultView??window,h=E=>{const T=ys(i.current).includes(CSS.escape(E.animationName));if(E.target===l&&T&&(p("ANIMATION_END"),!c.current)){const A=l.style.animationFillMode;l.style.animationFillMode="forwards",g=b.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=A)})}},S=E=>{E.target===l&&(u.current=ys(i.current))};return l.addEventListener("animationstart",S),l.addEventListener("animationcancel",h),l.addEventListener("animationend",h),()=>{b.clearTimeout(g),l.removeEventListener("animationstart",S),l.removeEventListener("animationcancel",h),l.removeEventListener("animationend",h)}}else p("ANIMATION_END")},[l,p]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:x.useCallback(g=>{i.current=g?getComputedStyle(g):null,r(g)},[])}}function ys(n){return(n==null?void 0:n.animationName)||"none"}function LT(n){var i,c;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,r=l&&"isReactWarning"in l&&l.isReactWarning;return r?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,r=l&&"isReactWarning"in l&&l.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var HT=G0[" useId ".trim().toString()]||(()=>{}),BT=0;function Lo(n){const[l,r]=x.useState(HT());return Vt(()=>{r(i=>i??String(BT++))},[n]),n||(l?`radix-${l}`:"")}var UT=x.createContext(void 0);function Yd(n){const l=x.useContext(UT);return n||l||"ltr"}function On(n){const l=x.useRef(n);return x.useEffect(()=>{l.current=n}),x.useMemo(()=>(...r)=>{var i;return(i=l.current)==null?void 0:i.call(l,...r)},[])}function IT(n,l=globalThis==null?void 0:globalThis.document){const r=On(n);x.useEffect(()=>{const i=c=>{c.key==="Escape"&&r(c)};return l.addEventListener("keydown",i,{capture:!0}),()=>l.removeEventListener("keydown",i,{capture:!0})},[r,l])}var GT="DismissableLayer",ud="dismissableLayer.update",YT="dismissableLayer.pointerDownOutside",VT="dismissableLayer.focusOutside",Ly,kv=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ws=x.forwardRef((n,l)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...p}=n,g=x.useContext(kv),[b,h]=x.useState(null),S=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=x.useState({}),C=rt(l,I=>h(I)),T=Array.from(g.layers),[A]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),_=T.indexOf(A),z=b?T.indexOf(b):-1,N=g.layersWithOutsidePointerEventsDisabled.size>0,L=z>=_,J=$T(I=>{const k=I.target,te=[...g.branches].some(re=>re.contains(k));!L||te||(c==null||c(I),d==null||d(I),I.defaultPrevented||m==null||m())},S),H=PT(I=>{const k=I.target;[...g.branches].some(re=>re.contains(k))||(u==null||u(I),d==null||d(I),I.defaultPrevented||m==null||m())},S);return IT(I=>{z===g.layers.size-1&&(i==null||i(I),!I.defaultPrevented&&m&&(I.preventDefault(),m()))},S),x.useEffect(()=>{if(b)return r&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Ly=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(b)),g.layers.add(b),Hy(),()=>{r&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Ly)}},[b,S,r,g]),x.useEffect(()=>()=>{b&&(g.layers.delete(b),g.layersWithOutsidePointerEventsDisabled.delete(b),Hy())},[b,g]),x.useEffect(()=>{const I=()=>E({});return document.addEventListener(ud,I),()=>document.removeEventListener(ud,I)},[]),v.jsx(Fe.div,{...p,ref:C,style:{pointerEvents:N?L?"auto":"none":void 0,...n.style},onFocusCapture:we(n.onFocusCapture,H.onFocusCapture),onBlurCapture:we(n.onBlurCapture,H.onBlurCapture),onPointerDownCapture:we(n.onPointerDownCapture,J.onPointerDownCapture)})});Ws.displayName=GT;var qT="DismissableLayerBranch",XT=x.forwardRef((n,l)=>{const r=x.useContext(kv),i=x.useRef(null),c=rt(l,i);return x.useEffect(()=>{const u=i.current;if(u)return r.branches.add(u),()=>{r.branches.delete(u)}},[r.branches]),v.jsx(Fe.div,{...n,ref:c})});XT.displayName=qT;function $T(n,l=globalThis==null?void 0:globalThis.document){const r=On(n),i=x.useRef(!1),c=x.useRef(()=>{});return x.useEffect(()=>{const u=m=>{if(m.target&&!i.current){let p=function(){Lv(YT,r,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",c.current),c.current=p,l.addEventListener("click",c.current,{once:!0})):p()}else l.removeEventListener("click",c.current);i.current=!1},d=window.setTimeout(()=>{l.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),l.removeEventListener("pointerdown",u),l.removeEventListener("click",c.current)}},[l,r]),{onPointerDownCapture:()=>i.current=!0}}function PT(n,l=globalThis==null?void 0:globalThis.document){const r=On(n),i=x.useRef(!1);return x.useEffect(()=>{const c=u=>{u.target&&!i.current&&Lv(VT,r,{originalEvent:u},{discrete:!1})};return l.addEventListener("focusin",c),()=>l.removeEventListener("focusin",c)},[l,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Hy(){const n=new CustomEvent(ud);document.dispatchEvent(n)}function Lv(n,l,r,{discrete:i}){const c=r.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:r});l&&c.addEventListener(n,l,{once:!0}),i?Dv(c,u):c.dispatchEvent(u)}var kf="focusScope.autoFocusOnMount",Lf="focusScope.autoFocusOnUnmount",By={bubbles:!1,cancelable:!0},KT="FocusScope",Vd=x.forwardRef((n,l)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:u,...d}=n,[m,p]=x.useState(null),g=On(c),b=On(u),h=x.useRef(null),S=rt(l,T=>p(T)),E=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let T=function(N){if(E.paused||!m)return;const L=N.target;m.contains(L)?h.current=L:Wa(h.current,{select:!0})},A=function(N){if(E.paused||!m)return;const L=N.relatedTarget;L!==null&&(m.contains(L)||Wa(h.current,{select:!0}))},_=function(N){if(document.activeElement===document.body)for(const J of N)J.removedNodes.length>0&&Wa(m)};document.addEventListener("focusin",T),document.addEventListener("focusout",A);const z=new MutationObserver(_);return m&&z.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",A),z.disconnect()}}},[i,m,E.paused]),x.useEffect(()=>{if(m){Iy.add(E);const T=document.activeElement;if(!m.contains(T)){const _=new CustomEvent(kf,By);m.addEventListener(kf,g),m.dispatchEvent(_),_.defaultPrevented||(FT(eC(Hv(m)),{select:!0}),document.activeElement===T&&Wa(m))}return()=>{m.removeEventListener(kf,g),setTimeout(()=>{const _=new CustomEvent(Lf,By);m.addEventListener(Lf,b),m.dispatchEvent(_),_.defaultPrevented||Wa(T??document.body,{select:!0}),m.removeEventListener(Lf,b),Iy.remove(E)},0)}}},[m,g,b,E]);const C=x.useCallback(T=>{if(!r&&!i||E.paused)return;const A=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,_=document.activeElement;if(A&&_){const z=T.currentTarget,[N,L]=QT(z);N&&L?!T.shiftKey&&_===L?(T.preventDefault(),r&&Wa(N,{select:!0})):T.shiftKey&&_===N&&(T.preventDefault(),r&&Wa(L,{select:!0})):_===z&&T.preventDefault()}},[r,i,E.paused]);return v.jsx(Fe.div,{tabIndex:-1,...d,ref:S,onKeyDown:C})});Vd.displayName=KT;function FT(n,{select:l=!1}={}){const r=document.activeElement;for(const i of n)if(Wa(i,{select:l}),document.activeElement!==r)return}function QT(n){const l=Hv(n),r=Uy(l,n),i=Uy(l.reverse(),n);return[r,i]}function Hv(n){const l=[],r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const c=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||c?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)l.push(r.currentNode);return l}function Uy(n,l){for(const r of n)if(!ZT(r,{upTo:l}))return r}function ZT(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function JT(n){return n instanceof HTMLInputElement&&"select"in n}function Wa(n,{select:l=!1}={}){if(n&&n.focus){const r=document.activeElement;n.focus({preventScroll:!0}),n!==r&&JT(n)&&l&&n.select()}}var Iy=WT();function WT(){let n=[];return{add(l){const r=n[0];l!==r&&(r==null||r.pause()),n=Gy(n,l),n.unshift(l)},remove(l){var r;n=Gy(n,l),(r=n[0])==null||r.resume()}}}function Gy(n,l){const r=[...n],i=r.indexOf(l);return i!==-1&&r.splice(i,1),r}function eC(n){return n.filter(l=>l.tagName!=="A")}var tC="Portal",qd=x.forwardRef((n,l)=>{var m;const{container:r,...i}=n,[c,u]=x.useState(!1);Vt(()=>u(!0),[]);const d=r||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return d?V0.createPortal(v.jsx(Fe.div,{...i,ref:l}),d):null});qd.displayName=tC;var Hf=0;function Bv(){x.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Yy()),document.body.insertAdjacentElement("beforeend",n[1]??Yy()),Hf++,()=>{Hf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),Hf--}},[])}function Yy(){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 Zn=function(){return Zn=Object.assign||function(l){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(l[u]=r[u])}return l},Zn.apply(this,arguments)};function Uv(n,l){var r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&l.indexOf(i)<0&&(r[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(n);c<i.length;c++)l.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(r[i[c]]=n[i[c]]);return r}function nC(n,l,r){if(r||arguments.length===2)for(var i=0,c=l.length,u;i<c;i++)(u||!(i in l))&&(u||(u=Array.prototype.slice.call(l,0,i)),u[i]=l[i]);return n.concat(u||Array.prototype.slice.call(l))}var Ns="right-scroll-bar-position",Os="width-before-scroll-bar",aC="with-scroll-bars-hidden",lC="--removed-body-scroll-bar-size";function Bf(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function oC(n,l){var r=x.useState(function(){return{value:n,callback:l,facade:{get current(){return r.value},set current(i){var c=r.value;c!==i&&(r.value=i,r.callback(i,c))}}}})[0];return r.callback=l,r.facade}var rC=typeof window<"u"?x.useLayoutEffect:x.useEffect,Vy=new WeakMap;function iC(n,l){var r=oC(null,function(i){return n.forEach(function(c){return Bf(c,i)})});return rC(function(){var i=Vy.get(r);if(i){var c=new Set(i),u=new Set(n),d=r.current;c.forEach(function(m){u.has(m)||Bf(m,null)}),u.forEach(function(m){c.has(m)||Bf(m,d)})}Vy.set(r,n)},[n]),r}function sC(n){return n}function cC(n,l){l===void 0&&(l=sC);var r=[],i=!1,c={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:n},useMedium:function(u){var d=l(u,i);return r.push(d),function(){r=r.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(i=!0;r.length;){var d=r;r=[],d.forEach(u)}r={push:function(m){return u(m)},filter:function(){return r}}},assignMedium:function(u){i=!0;var d=[];if(r.length){var m=r;r=[],m.forEach(u),d=r}var p=function(){var b=d;d=[],b.forEach(u)},g=function(){return Promise.resolve().then(p)};g(),r={push:function(b){d.push(b),g()},filter:function(b){return d=d.filter(b),r}}}};return c}function uC(n){n===void 0&&(n={});var l=cC(null);return l.options=Zn({async:!0,ssr:!1},n),l}var Iv=function(n){var l=n.sideCar,r=Uv(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=l.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,Zn({},r))};Iv.isSideCarExport=!0;function fC(n,l){return n.useMedium(l),Iv}var Gv=uC(),Uf=function(){},ec=x.forwardRef(function(n,l){var r=x.useRef(null),i=x.useState({onScrollCapture:Uf,onWheelCapture:Uf,onTouchMoveCapture:Uf}),c=i[0],u=i[1],d=n.forwardProps,m=n.children,p=n.className,g=n.removeScrollBar,b=n.enabled,h=n.shards,S=n.sideCar,E=n.noRelative,C=n.noIsolation,T=n.inert,A=n.allowPinchZoom,_=n.as,z=_===void 0?"div":_,N=n.gapMode,L=Uv(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),J=S,H=iC([r,l]),I=Zn(Zn({},L),c);return x.createElement(x.Fragment,null,b&&x.createElement(J,{sideCar:Gv,removeScrollBar:g,shards:h,noRelative:E,noIsolation:C,inert:T,setCallbacks:u,allowPinchZoom:!!A,lockRef:r,gapMode:N}),d?x.cloneElement(x.Children.only(m),Zn(Zn({},I),{ref:H})):x.createElement(z,Zn({},I,{className:p,ref:H}),m))});ec.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ec.classNames={fullWidth:Os,zeroRight:Ns};var dC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=dC();return l&&n.setAttribute("nonce",l),n}function hC(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function pC(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var gC=function(){var n=0,l=null;return{add:function(r){n==0&&(l=mC())&&(hC(l,r),pC(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},yC=function(){var n=gC();return function(l,r){x.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&r])}},Yv=function(){var n=yC(),l=function(r){var i=r.styles,c=r.dynamic;return n(i,c),null};return l},vC={left:0,top:0,right:0,gap:0},If=function(n){return parseInt(n||"",10)||0},bC=function(n){var l=window.getComputedStyle(document.body),r=l[n==="padding"?"paddingLeft":"marginLeft"],i=l[n==="padding"?"paddingTop":"marginTop"],c=l[n==="padding"?"paddingRight":"marginRight"];return[If(r),If(i),If(c)]},xC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return vC;var l=bC(n),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-r+l[2]-l[0])}},SC=Yv(),zo="data-scroll-locked",wC=function(n,l,r,i){var c=n.left,u=n.top,d=n.right,m=n.gap;return r===void 0&&(r="margin"),`
321
+ .`.concat(aC,` {
322
+ overflow: hidden `).concat(i,`;
323
+ padding-right: `).concat(m,"px ").concat(i,`;
324
+ }
325
+ body[`).concat(zo,`] {
326
+ overflow: hidden `).concat(i,`;
327
+ overscroll-behavior: contain;
328
+ `).concat([l&&"position: relative ".concat(i,";"),r==="margin"&&`
329
+ padding-left: `.concat(c,`px;
330
+ padding-top: `).concat(u,`px;
331
+ padding-right: `).concat(d,`px;
332
+ margin-left:0;
333
+ margin-top:0;
334
+ margin-right: `).concat(m,"px ").concat(i,`;
335
+ `),r==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
336
+ }
337
+
338
+ .`).concat(Ns,` {
339
+ right: `).concat(m,"px ").concat(i,`;
340
+ }
341
+
342
+ .`).concat(Os,` {
343
+ margin-right: `).concat(m,"px ").concat(i,`;
344
+ }
345
+
346
+ .`).concat(Ns," .").concat(Ns,` {
347
+ right: 0 `).concat(i,`;
348
+ }
349
+
350
+ .`).concat(Os," .").concat(Os,` {
351
+ margin-right: 0 `).concat(i,`;
352
+ }
353
+
354
+ body[`).concat(zo,`] {
355
+ `).concat(lC,": ").concat(m,`px;
356
+ }
357
+ `)},qy=function(){var n=parseInt(document.body.getAttribute(zo)||"0",10);return isFinite(n)?n:0},EC=function(){x.useEffect(function(){return document.body.setAttribute(zo,(qy()+1).toString()),function(){var n=qy()-1;n<=0?document.body.removeAttribute(zo):document.body.setAttribute(zo,n.toString())}},[])},TC=function(n){var l=n.noRelative,r=n.noImportant,i=n.gapMode,c=i===void 0?"margin":i;EC();var u=x.useMemo(function(){return xC(c)},[c]);return x.createElement(SC,{styles:wC(u,!l,c,r?"":"!important")})},fd=!1;if(typeof window<"u")try{var vs=Object.defineProperty({},"passive",{get:function(){return fd=!0,!0}});window.addEventListener("test",vs,vs),window.removeEventListener("test",vs,vs)}catch{fd=!1}var Mo=fd?{passive:!1}:!1,CC=function(n){return n.tagName==="TEXTAREA"},Vv=function(n,l){if(!(n instanceof Element))return!1;var r=window.getComputedStyle(n);return r[l]!=="hidden"&&!(r.overflowY===r.overflowX&&!CC(n)&&r[l]==="visible")},MC=function(n){return Vv(n,"overflowY")},AC=function(n){return Vv(n,"overflowX")},Xy=function(n,l){var r=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=qv(n,i);if(c){var u=Xv(n,i),d=u[1],m=u[2];if(d>m)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},_C=function(n){var l=n.scrollTop,r=n.scrollHeight,i=n.clientHeight;return[l,r,i]},RC=function(n){var l=n.scrollLeft,r=n.scrollWidth,i=n.clientWidth;return[l,r,i]},qv=function(n,l){return n==="v"?MC(l):AC(l)},Xv=function(n,l){return n==="v"?_C(l):RC(l)},NC=function(n,l){return n==="h"&&l==="rtl"?-1:1},OC=function(n,l,r,i,c){var u=NC(n,window.getComputedStyle(l).direction),d=u*i,m=r.target,p=l.contains(m),g=!1,b=d>0,h=0,S=0;do{if(!m)break;var E=Xv(n,m),C=E[0],T=E[1],A=E[2],_=T-A-u*C;(C||_)&&qv(n,m)&&(h+=_,S+=C);var z=m.parentNode;m=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!p&&m!==document.body||p&&(l.contains(m)||l===m));return(b&&Math.abs(h)<1||!b&&Math.abs(S)<1)&&(g=!0),g},bs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},$y=function(n){return[n.deltaX,n.deltaY]},Py=function(n){return n&&"current"in n?n.current:n},DC=function(n,l){return n[0]===l[0]&&n[1]===l[1]},zC=function(n){return`
358
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
359
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
360
+ `)},jC=0,Ao=[];function kC(n){var l=x.useRef([]),r=x.useRef([0,0]),i=x.useRef(),c=x.useState(jC++)[0],u=x.useState(Yv)[0],d=x.useRef(n);x.useEffect(function(){d.current=n},[n]),x.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var T=nC([n.lockRef.current],(n.shards||[]).map(Py),!0).filter(Boolean);return T.forEach(function(A){return A.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),T.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var m=x.useCallback(function(T,A){if("touches"in T&&T.touches.length===2||T.type==="wheel"&&T.ctrlKey)return!d.current.allowPinchZoom;var _=bs(T),z=r.current,N="deltaX"in T?T.deltaX:z[0]-_[0],L="deltaY"in T?T.deltaY:z[1]-_[1],J,H=T.target,I=Math.abs(N)>Math.abs(L)?"h":"v";if("touches"in T&&I==="h"&&H.type==="range")return!1;var k=window.getSelection(),te=k&&k.anchorNode,re=te?te===H||te.contains(H):!1;if(re)return!1;var ue=Xy(I,H);if(!ue)return!0;if(ue?J=I:(J=I==="v"?"h":"v",ue=Xy(I,H)),!ue)return!1;if(!i.current&&"changedTouches"in T&&(N||L)&&(i.current=J),!J)return!0;var X=i.current||J;return OC(X,A,T,X==="h"?N:L)},[]),p=x.useCallback(function(T){var A=T;if(!(!Ao.length||Ao[Ao.length-1]!==u)){var _="deltaY"in A?$y(A):bs(A),z=l.current.filter(function(J){return J.name===A.type&&(J.target===A.target||A.target===J.shadowParent)&&DC(J.delta,_)})[0];if(z&&z.should){A.cancelable&&A.preventDefault();return}if(!z){var N=(d.current.shards||[]).map(Py).filter(Boolean).filter(function(J){return J.contains(A.target)}),L=N.length>0?m(A,N[0]):!d.current.noIsolation;L&&A.cancelable&&A.preventDefault()}}},[]),g=x.useCallback(function(T,A,_,z){var N={name:T,delta:A,target:_,should:z,shadowParent:LC(_)};l.current.push(N),setTimeout(function(){l.current=l.current.filter(function(L){return L!==N})},1)},[]),b=x.useCallback(function(T){r.current=bs(T),i.current=void 0},[]),h=x.useCallback(function(T){g(T.type,$y(T),T.target,m(T,n.lockRef.current))},[]),S=x.useCallback(function(T){g(T.type,bs(T),T.target,m(T,n.lockRef.current))},[]);x.useEffect(function(){return Ao.push(u),n.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:S}),document.addEventListener("wheel",p,Mo),document.addEventListener("touchmove",p,Mo),document.addEventListener("touchstart",b,Mo),function(){Ao=Ao.filter(function(T){return T!==u}),document.removeEventListener("wheel",p,Mo),document.removeEventListener("touchmove",p,Mo),document.removeEventListener("touchstart",b,Mo)}},[]);var E=n.removeScrollBar,C=n.inert;return x.createElement(x.Fragment,null,C?x.createElement(u,{styles:zC(c)}):null,E?x.createElement(TC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function LC(n){for(var l=null;n!==null;)n instanceof ShadowRoot&&(l=n.host,n=n.host),n=n.parentNode;return l}const HC=fC(Gv,kC);var Xd=x.forwardRef(function(n,l){return x.createElement(ec,Zn({},n,{ref:l,sideCar:HC}))});Xd.classNames=ec.classNames;var BC=function(n){if(typeof document>"u")return null;var l=Array.isArray(n)?n[0]:n;return l.ownerDocument.body},_o=new WeakMap,xs=new WeakMap,Ss={},Gf=0,$v=function(n){return n&&(n.host||$v(n.parentNode))},UC=function(n,l){return l.map(function(r){if(n.contains(r))return r;var i=$v(r);return i&&n.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",n,". Doing nothing"),null)}).filter(function(r){return!!r})},IC=function(n,l,r,i){var c=UC(l,Array.isArray(n)?n:[n]);Ss[r]||(Ss[r]=new WeakMap);var u=Ss[r],d=[],m=new Set,p=new Set(c),g=function(h){!h||m.has(h)||(m.add(h),g(h.parentNode))};c.forEach(g);var b=function(h){!h||p.has(h)||Array.prototype.forEach.call(h.children,function(S){if(m.has(S))b(S);else try{var E=S.getAttribute(i),C=E!==null&&E!=="false",T=(_o.get(S)||0)+1,A=(u.get(S)||0)+1;_o.set(S,T),u.set(S,A),d.push(S),T===1&&C&&xs.set(S,!0),A===1&&S.setAttribute(r,"true"),C||S.setAttribute(i,"true")}catch(_){console.error("aria-hidden: cannot operate on ",S,_)}})};return b(l),m.clear(),Gf++,function(){d.forEach(function(h){var S=_o.get(h)-1,E=u.get(h)-1;_o.set(h,S),u.set(h,E),S||(xs.has(h)||h.removeAttribute(i),xs.delete(h)),E||h.removeAttribute(r)}),Gf--,Gf||(_o=new WeakMap,_o=new WeakMap,xs=new WeakMap,Ss={})}},Pv=function(n,l,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),c=BC(n);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),IC(i,c,r,"aria-hidden")):function(){return null}};function GC(n){const l=x.useRef({value:n,previous:n});return x.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function YC(n){const[l,r]=x.useState(void 0);return Vt(()=>{if(n){r({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const u=c[0];let d,m;if("borderBoxSize"in u){const p=u.borderBoxSize,g=Array.isArray(p)?p[0]:p;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;r({width:d,height:m})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else r(void 0)},[n]),l}const VC=["top","right","bottom","left"],nl=Math.min,gn=Math.max,Gs=Math.round,ws=Math.floor,Wn=n=>({x:n,y:n}),qC={left:"right",right:"left",bottom:"top",top:"bottom"};function dd(n,l,r){return gn(n,nl(l,r))}function wa(n,l){return typeof n=="function"?n(l):n}function Ea(n){return n.split("-")[0]}function Go(n){return n.split("-")[1]}function $d(n){return n==="x"?"y":"x"}function Pd(n){return n==="y"?"height":"width"}function Jn(n){const l=n[0];return l==="t"||l==="b"?"y":"x"}function Kd(n){return $d(Jn(n))}function XC(n,l,r){r===void 0&&(r=!1);const i=Go(n),c=Kd(n),u=Pd(c);let d=c==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[u]>l.floating[u]&&(d=Ys(d)),[d,Ys(d)]}function $C(n){const l=Ys(n);return[md(n),l,md(l)]}function md(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Ky=["left","right"],Fy=["right","left"],PC=["top","bottom"],KC=["bottom","top"];function FC(n,l,r){switch(n){case"top":case"bottom":return r?l?Fy:Ky:l?Ky:Fy;case"left":case"right":return l?PC:KC;default:return[]}}function QC(n,l,r,i){const c=Go(n);let u=FC(Ea(n),r==="start",i);return c&&(u=u.map(d=>d+"-"+c),l&&(u=u.concat(u.map(md)))),u}function Ys(n){const l=Ea(n);return qC[l]+n.slice(l.length)}function ZC(n){return{top:0,right:0,bottom:0,left:0,...n}}function Kv(n){return typeof n!="number"?ZC(n):{top:n,right:n,bottom:n,left:n}}function Vs(n){const{x:l,y:r,width:i,height:c}=n;return{width:i,height:c,top:r,left:l,right:l+i,bottom:r+c,x:l,y:r}}function Qy(n,l,r){let{reference:i,floating:c}=n;const u=Jn(l),d=Kd(l),m=Pd(d),p=Ea(l),g=u==="y",b=i.x+i.width/2-c.width/2,h=i.y+i.height/2-c.height/2,S=i[m]/2-c[m]/2;let E;switch(p){case"top":E={x:b,y:i.y-c.height};break;case"bottom":E={x:b,y:i.y+i.height};break;case"right":E={x:i.x+i.width,y:h};break;case"left":E={x:i.x-c.width,y:h};break;default:E={x:i.x,y:i.y}}switch(Go(l)){case"start":E[d]-=S*(r&&g?-1:1);break;case"end":E[d]+=S*(r&&g?-1:1);break}return E}async function JC(n,l){var r;l===void 0&&(l={});const{x:i,y:c,platform:u,rects:d,elements:m,strategy:p}=n,{boundary:g="clippingAncestors",rootBoundary:b="viewport",elementContext:h="floating",altBoundary:S=!1,padding:E=0}=wa(l,n),C=Kv(E),A=m[S?h==="floating"?"reference":"floating":h],_=Vs(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(A)))==null||r?A:A.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(m.floating)),boundary:g,rootBoundary:b,strategy:p})),z=h==="floating"?{x:i,y:c,width:d.floating.width,height:d.floating.height}:d.reference,N=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),L=await(u.isElement==null?void 0:u.isElement(N))?await(u.getScale==null?void 0:u.getScale(N))||{x:1,y:1}:{x:1,y:1},J=Vs(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:z,offsetParent:N,strategy:p}):z);return{top:(_.top-J.top+C.top)/L.y,bottom:(J.bottom-_.bottom+C.bottom)/L.y,left:(_.left-J.left+C.left)/L.x,right:(J.right-_.right+C.right)/L.x}}const WC=50,eM=async(n,l,r)=>{const{placement:i="bottom",strategy:c="absolute",middleware:u=[],platform:d}=r,m=d.detectOverflow?d:{...d,detectOverflow:JC},p=await(d.isRTL==null?void 0:d.isRTL(l));let g=await d.getElementRects({reference:n,floating:l,strategy:c}),{x:b,y:h}=Qy(g,i,p),S=i,E=0;const C={};for(let T=0;T<u.length;T++){const A=u[T];if(!A)continue;const{name:_,fn:z}=A,{x:N,y:L,data:J,reset:H}=await z({x:b,y:h,initialPlacement:i,placement:S,strategy:c,middlewareData:C,rects:g,platform:m,elements:{reference:n,floating:l}});b=N??b,h=L??h,C[_]={...C[_],...J},H&&E<WC&&(E++,typeof H=="object"&&(H.placement&&(S=H.placement),H.rects&&(g=H.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:c}):H.rects),{x:b,y:h}=Qy(g,S,p)),T=-1)}return{x:b,y:h,placement:S,strategy:c,middlewareData:C}},tM=n=>({name:"arrow",options:n,async fn(l){const{x:r,y:i,placement:c,rects:u,platform:d,elements:m,middlewareData:p}=l,{element:g,padding:b=0}=wa(n,l)||{};if(g==null)return{};const h=Kv(b),S={x:r,y:i},E=Kd(c),C=Pd(E),T=await d.getDimensions(g),A=E==="y",_=A?"top":"left",z=A?"bottom":"right",N=A?"clientHeight":"clientWidth",L=u.reference[C]+u.reference[E]-S[E]-u.floating[C],J=S[E]-u.reference[E],H=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let I=H?H[N]:0;(!I||!await(d.isElement==null?void 0:d.isElement(H)))&&(I=m.floating[N]||u.floating[C]);const k=L/2-J/2,te=I/2-T[C]/2-1,re=nl(h[_],te),ue=nl(h[z],te),X=re,Q=I-T[C]-ue,K=I/2-T[C]/2+k,G=dd(X,K,Q),M=!p.arrow&&Go(c)!=null&&K!==G&&u.reference[C]/2-(K<X?re:ue)-T[C]/2<0,D=M?K<X?K-X:K-Q:0;return{[E]:S[E]+D,data:{[E]:G,centerOffset:K-G-D,...M&&{alignmentOffset:D}},reset:M}}}),nM=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var r,i;const{placement:c,middlewareData:u,rects:d,initialPlacement:m,platform:p,elements:g}=l,{mainAxis:b=!0,crossAxis:h=!0,fallbackPlacements:S,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:T=!0,...A}=wa(n,l);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const _=Ea(c),z=Jn(m),N=Ea(m)===m,L=await(p.isRTL==null?void 0:p.isRTL(g.floating)),J=S||(N||!T?[Ys(m)]:$C(m)),H=C!=="none";!S&&H&&J.push(...QC(m,T,C,L));const I=[m,...J],k=await p.detectOverflow(l,A),te=[];let re=((i=u.flip)==null?void 0:i.overflows)||[];if(b&&te.push(k[_]),h){const K=XC(c,d,L);te.push(k[K[0]],k[K[1]])}if(re=[...re,{placement:c,overflows:te}],!te.every(K=>K<=0)){var ue,X;const K=(((ue=u.flip)==null?void 0:ue.index)||0)+1,G=I[K];if(G&&(!(h==="alignment"?z!==Jn(G):!1)||re.every(V=>Jn(V.placement)===z?V.overflows[0]>0:!0)))return{data:{index:K,overflows:re},reset:{placement:G}};let M=(X=re.filter(D=>D.overflows[0]<=0).sort((D,V)=>D.overflows[1]-V.overflows[1])[0])==null?void 0:X.placement;if(!M)switch(E){case"bestFit":{var Q;const D=(Q=re.filter(V=>{if(H){const Y=Jn(V.placement);return Y===z||Y==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Y=>Y>0).reduce((Y,q)=>Y+q,0)]).sort((V,Y)=>V[1]-Y[1])[0])==null?void 0:Q[0];D&&(M=D);break}case"initialPlacement":M=m;break}if(c!==M)return{reset:{placement:M}}}return{}}}};function Zy(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function Jy(n){return VC.some(l=>n[l]>=0)}const aM=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:r,platform:i}=l,{strategy:c="referenceHidden",...u}=wa(n,l);switch(c){case"referenceHidden":{const d=await i.detectOverflow(l,{...u,elementContext:"reference"}),m=Zy(d,r.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Jy(m)}}}case"escaped":{const d=await i.detectOverflow(l,{...u,altBoundary:!0}),m=Zy(d,r.floating);return{data:{escapedOffsets:m,escaped:Jy(m)}}}default:return{}}}}},Fv=new Set(["left","top"]);async function lM(n,l){const{placement:r,platform:i,elements:c}=n,u=await(i.isRTL==null?void 0:i.isRTL(c.floating)),d=Ea(r),m=Go(r),p=Jn(r)==="y",g=Fv.has(d)?-1:1,b=u&&p?-1:1,h=wa(l,n);let{mainAxis:S,crossAxis:E,alignmentAxis:C}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return m&&typeof C=="number"&&(E=m==="end"?C*-1:C),p?{x:E*b,y:S*g}:{x:S*g,y:E*b}}const oM=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var r,i;const{x:c,y:u,placement:d,middlewareData:m}=l,p=await lM(l,n);return d===((r=m.offset)==null?void 0:r.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:c+p.x,y:u+p.y,data:{...p,placement:d}}}}},rM=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:r,y:i,placement:c,platform:u}=l,{mainAxis:d=!0,crossAxis:m=!1,limiter:p={fn:_=>{let{x:z,y:N}=_;return{x:z,y:N}}},...g}=wa(n,l),b={x:r,y:i},h=await u.detectOverflow(l,g),S=Jn(Ea(c)),E=$d(S);let C=b[E],T=b[S];if(d){const _=E==="y"?"top":"left",z=E==="y"?"bottom":"right",N=C+h[_],L=C-h[z];C=dd(N,C,L)}if(m){const _=S==="y"?"top":"left",z=S==="y"?"bottom":"right",N=T+h[_],L=T-h[z];T=dd(N,T,L)}const A=p.fn({...l,[E]:C,[S]:T});return{...A,data:{x:A.x-r,y:A.y-i,enabled:{[E]:d,[S]:m}}}}}},iM=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:r,y:i,placement:c,rects:u,middlewareData:d}=l,{offset:m=0,mainAxis:p=!0,crossAxis:g=!0}=wa(n,l),b={x:r,y:i},h=Jn(c),S=$d(h);let E=b[S],C=b[h];const T=wa(m,l),A=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(p){const N=S==="y"?"height":"width",L=u.reference[S]-u.floating[N]+A.mainAxis,J=u.reference[S]+u.reference[N]-A.mainAxis;E<L?E=L:E>J&&(E=J)}if(g){var _,z;const N=S==="y"?"width":"height",L=Fv.has(Ea(c)),J=u.reference[h]-u.floating[N]+(L&&((_=d.offset)==null?void 0:_[h])||0)+(L?0:A.crossAxis),H=u.reference[h]+u.reference[N]+(L?0:((z=d.offset)==null?void 0:z[h])||0)-(L?A.crossAxis:0);C<J?C=J:C>H&&(C=H)}return{[S]:E,[h]:C}}}},sM=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var r,i;const{placement:c,rects:u,platform:d,elements:m}=l,{apply:p=()=>{},...g}=wa(n,l),b=await d.detectOverflow(l,g),h=Ea(c),S=Go(c),E=Jn(c)==="y",{width:C,height:T}=u.floating;let A,_;h==="top"||h==="bottom"?(A=h,_=S===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(_=h,A=S==="end"?"top":"bottom");const z=T-b.top-b.bottom,N=C-b.left-b.right,L=nl(T-b[A],z),J=nl(C-b[_],N),H=!l.middlewareData.shift;let I=L,k=J;if((r=l.middlewareData.shift)!=null&&r.enabled.x&&(k=N),(i=l.middlewareData.shift)!=null&&i.enabled.y&&(I=z),H&&!S){const re=gn(b.left,0),ue=gn(b.right,0),X=gn(b.top,0),Q=gn(b.bottom,0);E?k=C-2*(re!==0||ue!==0?re+ue:gn(b.left,b.right)):I=T-2*(X!==0||Q!==0?X+Q:gn(b.top,b.bottom))}await p({...l,availableWidth:k,availableHeight:I});const te=await d.getDimensions(m.floating);return C!==te.width||T!==te.height?{reset:{rects:!0}}:{}}}};function tc(){return typeof window<"u"}function Yo(n){return Qv(n)?(n.nodeName||"").toLowerCase():"#document"}function yn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function ea(n){var l;return(l=(Qv(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function Qv(n){return tc()?n instanceof Node||n instanceof yn(n).Node:!1}function In(n){return tc()?n instanceof Element||n instanceof yn(n).Element:!1}function Ta(n){return tc()?n instanceof HTMLElement||n instanceof yn(n).HTMLElement:!1}function Wy(n){return!tc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof yn(n).ShadowRoot}function Kr(n){const{overflow:l,overflowX:r,overflowY:i,display:c}=Gn(n);return/auto|scroll|overlay|hidden|clip/.test(l+i+r)&&c!=="inline"&&c!=="contents"}function cM(n){return/^(table|td|th)$/.test(Yo(n))}function nc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const uM=/transform|translate|scale|rotate|perspective|filter/,fM=/paint|layout|strict|content/,Nl=n=>!!n&&n!=="none";let Yf;function Fd(n){const l=In(n)?Gn(n):n;return Nl(l.transform)||Nl(l.translate)||Nl(l.scale)||Nl(l.rotate)||Nl(l.perspective)||!Qd()&&(Nl(l.backdropFilter)||Nl(l.filter))||uM.test(l.willChange||"")||fM.test(l.contain||"")}function dM(n){let l=al(n);for(;Ta(l)&&!Ho(l);){if(Fd(l))return l;if(nc(l))return null;l=al(l)}return null}function Qd(){return Yf==null&&(Yf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yf}function Ho(n){return/^(html|body|#document)$/.test(Yo(n))}function Gn(n){return yn(n).getComputedStyle(n)}function ac(n){return In(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function al(n){if(Yo(n)==="html")return n;const l=n.assignedSlot||n.parentNode||Wy(n)&&n.host||ea(n);return Wy(l)?l.host:l}function Zv(n){const l=al(n);return Ho(l)?n.ownerDocument?n.ownerDocument.body:n.body:Ta(l)&&Kr(l)?l:Zv(l)}function Yr(n,l,r){var i;l===void 0&&(l=[]),r===void 0&&(r=!0);const c=Zv(n),u=c===((i=n.ownerDocument)==null?void 0:i.body),d=yn(c);if(u){const m=hd(d);return l.concat(d,d.visualViewport||[],Kr(c)?c:[],m&&r?Yr(m):[])}else return l.concat(c,Yr(c,[],r))}function hd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Jv(n){const l=Gn(n);let r=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const c=Ta(n),u=c?n.offsetWidth:r,d=c?n.offsetHeight:i,m=Gs(r)!==u||Gs(i)!==d;return m&&(r=u,i=d),{width:r,height:i,$:m}}function Zd(n){return In(n)?n:n.contextElement}function jo(n){const l=Zd(n);if(!Ta(l))return Wn(1);const r=l.getBoundingClientRect(),{width:i,height:c,$:u}=Jv(l);let d=(u?Gs(r.width):r.width)/i,m=(u?Gs(r.height):r.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const mM=Wn(0);function Wv(n){const l=yn(n);return!Qd()||!l.visualViewport?mM:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function hM(n,l,r){return l===void 0&&(l=!1),!r||l&&r!==yn(n)?!1:l}function kl(n,l,r,i){l===void 0&&(l=!1),r===void 0&&(r=!1);const c=n.getBoundingClientRect(),u=Zd(n);let d=Wn(1);l&&(i?In(i)&&(d=jo(i)):d=jo(n));const m=hM(u,r,i)?Wv(u):Wn(0);let p=(c.left+m.x)/d.x,g=(c.top+m.y)/d.y,b=c.width/d.x,h=c.height/d.y;if(u){const S=yn(u),E=i&&In(i)?yn(i):i;let C=S,T=hd(C);for(;T&&i&&E!==C;){const A=jo(T),_=T.getBoundingClientRect(),z=Gn(T),N=_.left+(T.clientLeft+parseFloat(z.paddingLeft))*A.x,L=_.top+(T.clientTop+parseFloat(z.paddingTop))*A.y;p*=A.x,g*=A.y,b*=A.x,h*=A.y,p+=N,g+=L,C=yn(T),T=hd(C)}}return Vs({width:b,height:h,x:p,y:g})}function lc(n,l){const r=ac(n).scrollLeft;return l?l.left+r:kl(ea(n)).left+r}function eb(n,l){const r=n.getBoundingClientRect(),i=r.left+l.scrollLeft-lc(n,r),c=r.top+l.scrollTop;return{x:i,y:c}}function pM(n){let{elements:l,rect:r,offsetParent:i,strategy:c}=n;const u=c==="fixed",d=ea(i),m=l?nc(l.floating):!1;if(i===d||m&&u)return r;let p={scrollLeft:0,scrollTop:0},g=Wn(1);const b=Wn(0),h=Ta(i);if((h||!h&&!u)&&((Yo(i)!=="body"||Kr(d))&&(p=ac(i)),h)){const E=kl(i);g=jo(i),b.x=E.x+i.clientLeft,b.y=E.y+i.clientTop}const S=d&&!h&&!u?eb(d,p):Wn(0);return{width:r.width*g.x,height:r.height*g.y,x:r.x*g.x-p.scrollLeft*g.x+b.x+S.x,y:r.y*g.y-p.scrollTop*g.y+b.y+S.y}}function gM(n){return Array.from(n.getClientRects())}function yM(n){const l=ea(n),r=ac(n),i=n.ownerDocument.body,c=gn(l.scrollWidth,l.clientWidth,i.scrollWidth,i.clientWidth),u=gn(l.scrollHeight,l.clientHeight,i.scrollHeight,i.clientHeight);let d=-r.scrollLeft+lc(n);const m=-r.scrollTop;return Gn(i).direction==="rtl"&&(d+=gn(l.clientWidth,i.clientWidth)-c),{width:c,height:u,x:d,y:m}}const e0=25;function vM(n,l){const r=yn(n),i=ea(n),c=r.visualViewport;let u=i.clientWidth,d=i.clientHeight,m=0,p=0;if(c){u=c.width,d=c.height;const b=Qd();(!b||b&&l==="fixed")&&(m=c.offsetLeft,p=c.offsetTop)}const g=lc(i);if(g<=0){const b=i.ownerDocument,h=b.body,S=getComputedStyle(h),E=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(i.clientWidth-h.clientWidth-E);C<=e0&&(u-=C)}else g<=e0&&(u+=g);return{width:u,height:d,x:m,y:p}}function bM(n,l){const r=kl(n,!0,l==="fixed"),i=r.top+n.clientTop,c=r.left+n.clientLeft,u=Ta(n)?jo(n):Wn(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,p=c*u.x,g=i*u.y;return{width:d,height:m,x:p,y:g}}function t0(n,l,r){let i;if(l==="viewport")i=vM(n,r);else if(l==="document")i=yM(ea(n));else if(In(l))i=bM(l,r);else{const c=Wv(n);i={x:l.x-c.x,y:l.y-c.y,width:l.width,height:l.height}}return Vs(i)}function tb(n,l){const r=al(n);return r===l||!In(r)||Ho(r)?!1:Gn(r).position==="fixed"||tb(r,l)}function xM(n,l){const r=l.get(n);if(r)return r;let i=Yr(n,[],!1).filter(m=>In(m)&&Yo(m)!=="body"),c=null;const u=Gn(n).position==="fixed";let d=u?al(n):n;for(;In(d)&&!Ho(d);){const m=Gn(d),p=Fd(d);!p&&m.position==="fixed"&&(c=null),(u?!p&&!c:!p&&m.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||Kr(d)&&!p&&tb(n,d))?i=i.filter(b=>b!==d):c=m,d=al(d)}return l.set(n,i),i}function SM(n){let{element:l,boundary:r,rootBoundary:i,strategy:c}=n;const d=[...r==="clippingAncestors"?nc(l)?[]:xM(l,this._c):[].concat(r),i],m=t0(l,d[0],c);let p=m.top,g=m.right,b=m.bottom,h=m.left;for(let S=1;S<d.length;S++){const E=t0(l,d[S],c);p=gn(E.top,p),g=nl(E.right,g),b=nl(E.bottom,b),h=gn(E.left,h)}return{width:g-h,height:b-p,x:h,y:p}}function wM(n){const{width:l,height:r}=Jv(n);return{width:l,height:r}}function EM(n,l,r){const i=Ta(l),c=ea(l),u=r==="fixed",d=kl(n,!0,u,l);let m={scrollLeft:0,scrollTop:0};const p=Wn(0);function g(){p.x=lc(c)}if(i||!i&&!u)if((Yo(l)!=="body"||Kr(c))&&(m=ac(l)),i){const E=kl(l,!0,u,l);p.x=E.x+l.clientLeft,p.y=E.y+l.clientTop}else c&&g();u&&!i&&c&&g();const b=c&&!i&&!u?eb(c,m):Wn(0),h=d.left+m.scrollLeft-p.x-b.x,S=d.top+m.scrollTop-p.y-b.y;return{x:h,y:S,width:d.width,height:d.height}}function Vf(n){return Gn(n).position==="static"}function n0(n,l){if(!Ta(n)||Gn(n).position==="fixed")return null;if(l)return l(n);let r=n.offsetParent;return ea(n)===r&&(r=r.ownerDocument.body),r}function nb(n,l){const r=yn(n);if(nc(n))return r;if(!Ta(n)){let c=al(n);for(;c&&!Ho(c);){if(In(c)&&!Vf(c))return c;c=al(c)}return r}let i=n0(n,l);for(;i&&cM(i)&&Vf(i);)i=n0(i,l);return i&&Ho(i)&&Vf(i)&&!Fd(i)?r:i||dM(n)||r}const TM=async function(n){const l=this.getOffsetParent||nb,r=this.getDimensions,i=await r(n.floating);return{reference:EM(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function CM(n){return Gn(n).direction==="rtl"}const MM={convertOffsetParentRelativeRectToViewportRelativeRect:pM,getDocumentElement:ea,getClippingRect:SM,getOffsetParent:nb,getElementRects:TM,getClientRects:gM,getDimensions:wM,getScale:jo,isElement:In,isRTL:CM};function ab(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function AM(n,l){let r=null,i;const c=ea(n);function u(){var m;clearTimeout(i),(m=r)==null||m.disconnect(),r=null}function d(m,p){m===void 0&&(m=!1),p===void 0&&(p=1),u();const g=n.getBoundingClientRect(),{left:b,top:h,width:S,height:E}=g;if(m||l(),!S||!E)return;const C=ws(h),T=ws(c.clientWidth-(b+S)),A=ws(c.clientHeight-(h+E)),_=ws(b),N={rootMargin:-C+"px "+-T+"px "+-A+"px "+-_+"px",threshold:gn(0,nl(1,p))||1};let L=!0;function J(H){const I=H[0].intersectionRatio;if(I!==p){if(!L)return d();I?d(!1,I):i=setTimeout(()=>{d(!1,1e-7)},1e3)}I===1&&!ab(g,n.getBoundingClientRect())&&d(),L=!1}try{r=new IntersectionObserver(J,{...N,root:c.ownerDocument})}catch{r=new IntersectionObserver(J,N)}r.observe(n)}return d(!0),u}function _M(n,l,r,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,g=Zd(n),b=c||u?[...g?Yr(g):[],...l?Yr(l):[]]:[];b.forEach(_=>{c&&_.addEventListener("scroll",r,{passive:!0}),u&&_.addEventListener("resize",r)});const h=g&&m?AM(g,r):null;let S=-1,E=null;d&&(E=new ResizeObserver(_=>{let[z]=_;z&&z.target===g&&E&&l&&(E.unobserve(l),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var N;(N=E)==null||N.observe(l)})),r()}),g&&!p&&E.observe(g),l&&E.observe(l));let C,T=p?kl(n):null;p&&A();function A(){const _=kl(n);T&&!ab(T,_)&&r(),T=_,C=requestAnimationFrame(A)}return r(),()=>{var _;b.forEach(z=>{c&&z.removeEventListener("scroll",r),u&&z.removeEventListener("resize",r)}),h==null||h(),(_=E)==null||_.disconnect(),E=null,p&&cancelAnimationFrame(C)}}const RM=oM,NM=rM,OM=nM,DM=sM,zM=aM,a0=tM,jM=iM,kM=(n,l,r)=>{const i=new Map,c={platform:MM,...r},u={...c.platform,_c:i};return eM(n,l,{...c,platform:u})};var LM=typeof document<"u",HM=function(){},Ds=LM?x.useLayoutEffect:HM;function qs(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let r,i,c;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==l.length)return!1;for(i=r;i--!==0;)if(!qs(n[i],l[i]))return!1;return!0}if(c=Object.keys(n),r=c.length,r!==Object.keys(l).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(l,c[i]))return!1;for(i=r;i--!==0;){const u=c[i];if(!(u==="_owner"&&n.$$typeof)&&!qs(n[u],l[u]))return!1}return!0}return n!==n&&l!==l}function lb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function l0(n,l){const r=lb(n);return Math.round(l*r)/r}function qf(n){const l=x.useRef(n);return Ds(()=>{l.current=n}),l}function BM(n){n===void 0&&(n={});const{placement:l="bottom",strategy:r="absolute",middleware:i=[],platform:c,elements:{reference:u,floating:d}={},transform:m=!0,whileElementsMounted:p,open:g}=n,[b,h]=x.useState({x:0,y:0,strategy:r,placement:l,middlewareData:{},isPositioned:!1}),[S,E]=x.useState(i);qs(S,i)||E(i);const[C,T]=x.useState(null),[A,_]=x.useState(null),z=x.useCallback(V=>{V!==H.current&&(H.current=V,T(V))},[]),N=x.useCallback(V=>{V!==I.current&&(I.current=V,_(V))},[]),L=u||C,J=d||A,H=x.useRef(null),I=x.useRef(null),k=x.useRef(b),te=p!=null,re=qf(p),ue=qf(c),X=qf(g),Q=x.useCallback(()=>{if(!H.current||!I.current)return;const V={placement:l,strategy:r,middleware:S};ue.current&&(V.platform=ue.current),kM(H.current,I.current,V).then(Y=>{const q={...Y,isPositioned:X.current!==!1};K.current&&!qs(k.current,q)&&(k.current=q,$r.flushSync(()=>{h(q)}))})},[S,l,r,ue,X]);Ds(()=>{g===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,h(V=>({...V,isPositioned:!1})))},[g]);const K=x.useRef(!1);Ds(()=>(K.current=!0,()=>{K.current=!1}),[]),Ds(()=>{if(L&&(H.current=L),J&&(I.current=J),L&&J){if(re.current)return re.current(L,J,Q);Q()}},[L,J,Q,re,te]);const G=x.useMemo(()=>({reference:H,floating:I,setReference:z,setFloating:N}),[z,N]),M=x.useMemo(()=>({reference:L,floating:J}),[L,J]),D=x.useMemo(()=>{const V={position:r,left:0,top:0};if(!M.floating)return V;const Y=l0(M.floating,b.x),q=l0(M.floating,b.y);return m?{...V,transform:"translate("+Y+"px, "+q+"px)",...lb(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Y,top:q}},[r,m,M.floating,b.x,b.y]);return x.useMemo(()=>({...b,update:Q,refs:G,elements:M,floatingStyles:D}),[b,Q,G,M,D])}const UM=n=>{function l(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:n,fn(r){const{element:i,padding:c}=typeof n=="function"?n(r):n;return i&&l(i)?i.current!=null?a0({element:i.current,padding:c}).fn(r):{}:i?a0({element:i,padding:c}).fn(r):{}}}},IM=(n,l)=>{const r=RM(n);return{name:r.name,fn:r.fn,options:[n,l]}},GM=(n,l)=>{const r=NM(n);return{name:r.name,fn:r.fn,options:[n,l]}},YM=(n,l)=>({fn:jM(n).fn,options:[n,l]}),VM=(n,l)=>{const r=OM(n);return{name:r.name,fn:r.fn,options:[n,l]}},qM=(n,l)=>{const r=DM(n);return{name:r.name,fn:r.fn,options:[n,l]}},XM=(n,l)=>{const r=zM(n);return{name:r.name,fn:r.fn,options:[n,l]}},$M=(n,l)=>{const r=UM(n);return{name:r.name,fn:r.fn,options:[n,l]}};var PM="Arrow",ob=x.forwardRef((n,l)=>{const{children:r,width:i=10,height:c=5,...u}=n;return v.jsx(Fe.svg,{...u,ref:l,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?r:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});ob.displayName=PM;var KM=ob,Jd="Popper",[rb,Vo]=Ul(Jd),[FM,ib]=rb(Jd),sb=n=>{const{__scopePopper:l,children:r}=n,[i,c]=x.useState(null);return v.jsx(FM,{scope:l,anchor:i,onAnchorChange:c,children:r})};sb.displayName=Jd;var cb="PopperAnchor",ub=x.forwardRef((n,l)=>{const{__scopePopper:r,virtualRef:i,...c}=n,u=ib(cb,r),d=x.useRef(null),m=rt(l,d),p=x.useRef(null);return x.useEffect(()=>{const g=p.current;p.current=(i==null?void 0:i.current)||d.current,g!==p.current&&u.onAnchorChange(p.current)}),i?null:v.jsx(Fe.div,{...c,ref:m})});ub.displayName=cb;var Wd="PopperContent",[QM,ZM]=rb(Wd),fb=x.forwardRef((n,l)=>{var se,ge,pe,Ae,Ne,Ce;const{__scopePopper:r,side:i="bottom",sideOffset:c=0,align:u="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:p=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:h="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:C,...T}=n,A=ib(Wd,r),[_,z]=x.useState(null),N=rt(l,at=>z(at)),[L,J]=x.useState(null),H=YC(L),I=(H==null?void 0:H.width)??0,k=(H==null?void 0:H.height)??0,te=i+(u!=="center"?"-"+u:""),re=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},ue=Array.isArray(g)?g:[g],X=ue.length>0,Q={padding:re,boundary:ue.filter(WM),altBoundary:X},{refs:K,floatingStyles:G,placement:M,isPositioned:D,middlewareData:V}=BM({strategy:"fixed",placement:te,whileElementsMounted:(...at)=>_M(...at,{animationFrame:E==="always"}),elements:{reference:A.anchor},middleware:[IM({mainAxis:c+k,alignmentAxis:d}),p&&GM({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?YM():void 0,...Q}),p&&VM({...Q}),qM({...Q,apply:({elements:at,rects:qe,availableWidth:zt,availableHeight:jt})=>{const{width:At,height:Re}=qe.reference,ye=at.floating.style;ye.setProperty("--radix-popper-available-width",`${zt}px`),ye.setProperty("--radix-popper-available-height",`${jt}px`),ye.setProperty("--radix-popper-anchor-width",`${At}px`),ye.setProperty("--radix-popper-anchor-height",`${Re}px`)}}),L&&$M({element:L,padding:m}),eA({arrowWidth:I,arrowHeight:k}),S&&XM({strategy:"referenceHidden",...Q})]}),[Y,q]=hb(M),R=On(C);Vt(()=>{D&&(R==null||R())},[D,R]);const B=(se=V.arrow)==null?void 0:se.x,Z=(ge=V.arrow)==null?void 0:ge.y,ne=((pe=V.arrow)==null?void 0:pe.centerOffset)!==0,[W,ce]=x.useState();return Vt(()=>{_&&ce(window.getComputedStyle(_).zIndex)},[_]),v.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:D?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(Ae=V.transformOrigin)==null?void 0:Ae.x,(Ne=V.transformOrigin)==null?void 0:Ne.y].join(" "),...((Ce=V.hide)==null?void 0:Ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:v.jsx(QM,{scope:r,placedSide:Y,onArrowChange:J,arrowX:B,arrowY:Z,shouldHideArrow:ne,children:v.jsx(Fe.div,{"data-side":Y,"data-align":q,...T,ref:N,style:{...T.style,animation:D?void 0:"none"}})})})});fb.displayName=Wd;var db="PopperArrow",JM={top:"bottom",right:"left",bottom:"top",left:"right"},mb=x.forwardRef(function(l,r){const{__scopePopper:i,...c}=l,u=ZM(db,i),d=JM[u.placedSide];return v.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:v.jsx(KM,{...c,ref:r,style:{...c.style,display:"block"}})})});mb.displayName=db;function WM(n){return n!==null}var eA=n=>({name:"transformOrigin",options:n,fn(l){var A,_,z;const{placement:r,rects:i,middlewareData:c}=l,d=((A=c.arrow)==null?void 0:A.centerOffset)!==0,m=d?0:n.arrowWidth,p=d?0:n.arrowHeight,[g,b]=hb(r),h={start:"0%",center:"50%",end:"100%"}[b],S=(((_=c.arrow)==null?void 0:_.x)??0)+m/2,E=(((z=c.arrow)==null?void 0:z.y)??0)+p/2;let C="",T="";return g==="bottom"?(C=d?h:`${S}px`,T=`${-p}px`):g==="top"?(C=d?h:`${S}px`,T=`${i.floating.height+p}px`):g==="right"?(C=`${-p}px`,T=d?h:`${E}px`):g==="left"&&(C=`${i.floating.width+p}px`,T=d?h:`${E}px`),{data:{x:C,y:T}}}});function hb(n){const[l,r="center"]=n.split("-");return[l,r]}var em=sb,tm=ub,nm=fb,am=mb,Xf="rovingFocusGroup.onEntryFocus",tA={bubbles:!1,cancelable:!0},Fr="RovingFocusGroup",[pd,pb,nA]=Gd(Fr),[aA,gb]=Ul(Fr,[nA]),[lA,oA]=aA(Fr),yb=x.forwardRef((n,l)=>v.jsx(pd.Provider,{scope:n.__scopeRovingFocusGroup,children:v.jsx(pd.Slot,{scope:n.__scopeRovingFocusGroup,children:v.jsx(rA,{...n,ref:l})})}));yb.displayName=Fr;var rA=x.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:c=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:p,onEntryFocus:g,preventScrollOnEntryFocus:b=!1,...h}=n,S=x.useRef(null),E=rt(l,S),C=Yd(u),[T,A]=Is({prop:d,defaultProp:m??null,onChange:p,caller:Fr}),[_,z]=x.useState(!1),N=On(g),L=pb(r),J=x.useRef(!1),[H,I]=x.useState(0);return x.useEffect(()=>{const k=S.current;if(k)return k.addEventListener(Xf,N),()=>k.removeEventListener(Xf,N)},[N]),v.jsx(lA,{scope:r,orientation:i,dir:C,loop:c,currentTabStopId:T,onItemFocus:x.useCallback(k=>A(k),[A]),onItemShiftTab:x.useCallback(()=>z(!0),[]),onFocusableItemAdd:x.useCallback(()=>I(k=>k+1),[]),onFocusableItemRemove:x.useCallback(()=>I(k=>k-1),[]),children:v.jsx(Fe.div,{tabIndex:_||H===0?-1:0,"data-orientation":i,...h,ref:E,style:{outline:"none",...n.style},onMouseDown:we(n.onMouseDown,()=>{J.current=!0}),onFocus:we(n.onFocus,k=>{const te=!J.current;if(k.target===k.currentTarget&&te&&!_){const re=new CustomEvent(Xf,tA);if(k.currentTarget.dispatchEvent(re),!re.defaultPrevented){const ue=L().filter(M=>M.focusable),X=ue.find(M=>M.active),Q=ue.find(M=>M.id===T),G=[X,Q,...ue].filter(Boolean).map(M=>M.ref.current);xb(G,b)}}J.current=!1}),onBlur:we(n.onBlur,()=>z(!1))})})}),vb="RovingFocusGroupItem",bb=x.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:c=!1,tabStopId:u,children:d,...m}=n,p=Lo(),g=u||p,b=oA(vb,r),h=b.currentTabStopId===g,S=pb(r),{onFocusableItemAdd:E,onFocusableItemRemove:C,currentTabStopId:T}=b;return x.useEffect(()=>{if(i)return E(),()=>C()},[i,E,C]),v.jsx(pd.ItemSlot,{scope:r,id:g,focusable:i,active:c,children:v.jsx(Fe.span,{tabIndex:h?0:-1,"data-orientation":b.orientation,...m,ref:l,onMouseDown:we(n.onMouseDown,A=>{i?b.onItemFocus(g):A.preventDefault()}),onFocus:we(n.onFocus,()=>b.onItemFocus(g)),onKeyDown:we(n.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){b.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const _=cA(A,b.orientation,b.dir);if(_!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let N=S().filter(L=>L.focusable).map(L=>L.ref.current);if(_==="last")N.reverse();else if(_==="prev"||_==="next"){_==="prev"&&N.reverse();const L=N.indexOf(A.currentTarget);N=b.loop?uA(N,L+1):N.slice(L+1)}setTimeout(()=>xb(N))}}),children:typeof d=="function"?d({isCurrentTabStop:h,hasTabStop:T!=null}):d})})});bb.displayName=vb;var iA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sA(n,l){return l!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function cA(n,l,r){const i=sA(n.key,r);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return iA[i]}function xb(n,l=!1){const r=document.activeElement;for(const i of n)if(i===r||(i.focus({preventScroll:l}),document.activeElement!==r))return}function uA(n,l){return n.map((r,i)=>n[(l+i)%n.length])}var fA=yb,dA=bb,gd=["Enter"," "],mA=["ArrowDown","PageUp","Home"],Sb=["ArrowUp","PageDown","End"],hA=[...mA,...Sb],pA={ltr:[...gd,"ArrowRight"],rtl:[...gd,"ArrowLeft"]},gA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Qr="Menu",[Vr,yA,vA]=Gd(Qr),[Il,wb]=Ul(Qr,[vA,Vo,gb]),Zr=Vo(),Eb=gb(),[Tb,rl]=Il(Qr),[bA,Jr]=Il(Qr),Cb=n=>{const{__scopeMenu:l,open:r=!1,children:i,dir:c,onOpenChange:u,modal:d=!0}=n,m=Zr(l),[p,g]=x.useState(null),b=x.useRef(!1),h=On(u),S=Yd(c);return x.useEffect(()=>{const E=()=>{b.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>b.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),v.jsx(em,{...m,children:v.jsx(Tb,{scope:l,open:r,onOpenChange:h,content:p,onContentChange:g,children:v.jsx(bA,{scope:l,onClose:x.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:b,dir:S,modal:d,children:i})})})};Cb.displayName=Qr;var xA="MenuAnchor",lm=x.forwardRef((n,l)=>{const{__scopeMenu:r,...i}=n,c=Zr(r);return v.jsx(tm,{...c,...i,ref:l})});lm.displayName=xA;var om="MenuPortal",[SA,Mb]=Il(om,{forceMount:void 0}),Ab=n=>{const{__scopeMenu:l,forceMount:r,children:i,container:c}=n,u=rl(om,l);return v.jsx(SA,{scope:l,forceMount:r,children:v.jsx(Io,{present:r||u.open,children:v.jsx(qd,{asChild:!0,container:c,children:i})})})};Ab.displayName=om;var Nn="MenuContent",[wA,rm]=Il(Nn),_b=x.forwardRef((n,l)=>{const r=Mb(Nn,n.__scopeMenu),{forceMount:i=r.forceMount,...c}=n,u=rl(Nn,n.__scopeMenu),d=Jr(Nn,n.__scopeMenu);return v.jsx(Vr.Provider,{scope:n.__scopeMenu,children:v.jsx(Io,{present:i||u.open,children:v.jsx(Vr.Slot,{scope:n.__scopeMenu,children:d.modal?v.jsx(EA,{...c,ref:l}):v.jsx(TA,{...c,ref:l})})})})}),EA=x.forwardRef((n,l)=>{const r=rl(Nn,n.__scopeMenu),i=x.useRef(null),c=rt(l,i);return x.useEffect(()=>{const u=i.current;if(u)return Pv(u)},[]),v.jsx(im,{...n,ref:c,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:we(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),TA=x.forwardRef((n,l)=>{const r=rl(Nn,n.__scopeMenu);return v.jsx(im,{...n,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),CA=ko("MenuContent.ScrollLock"),im=x.forwardRef((n,l)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:p,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:h,onInteractOutside:S,onDismiss:E,disableOutsideScroll:C,...T}=n,A=rl(Nn,r),_=Jr(Nn,r),z=Zr(r),N=Eb(r),L=yA(r),[J,H]=x.useState(null),I=x.useRef(null),k=rt(l,I,A.onContentChange),te=x.useRef(0),re=x.useRef(""),ue=x.useRef(0),X=x.useRef(null),Q=x.useRef("right"),K=x.useRef(0),G=C?Xd:x.Fragment,M=C?{as:CA,allowPinchZoom:!0}:void 0,D=Y=>{var se,ge;const q=re.current+Y,R=L().filter(pe=>!pe.disabled),B=document.activeElement,Z=(se=R.find(pe=>pe.ref.current===B))==null?void 0:se.textValue,ne=R.map(pe=>pe.textValue),W=HA(ne,q,Z),ce=(ge=R.find(pe=>pe.textValue===W))==null?void 0:ge.ref.current;(function pe(Ae){re.current=Ae,window.clearTimeout(te.current),Ae!==""&&(te.current=window.setTimeout(()=>pe(""),1e3))})(q),ce&&setTimeout(()=>ce.focus())};x.useEffect(()=>()=>window.clearTimeout(te.current),[]),Bv();const V=x.useCallback(Y=>{var R,B;return Q.current===((R=X.current)==null?void 0:R.side)&&UA(Y,(B=X.current)==null?void 0:B.area)},[]);return v.jsx(wA,{scope:r,searchRef:re,onItemEnter:x.useCallback(Y=>{V(Y)&&Y.preventDefault()},[V]),onItemLeave:x.useCallback(Y=>{var q;V(Y)||((q=I.current)==null||q.focus(),H(null))},[V]),onTriggerLeave:x.useCallback(Y=>{V(Y)&&Y.preventDefault()},[V]),pointerGraceTimerRef:ue,onPointerGraceIntentChange:x.useCallback(Y=>{X.current=Y},[]),children:v.jsx(G,{...M,children:v.jsx(Vd,{asChild:!0,trapped:c,onMountAutoFocus:we(u,Y=>{var q;Y.preventDefault(),(q=I.current)==null||q.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:v.jsx(Ws,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:h,onInteractOutside:S,onDismiss:E,children:v.jsx(fA,{asChild:!0,...N,dir:_.dir,orientation:"vertical",loop:i,currentTabStopId:J,onCurrentTabStopIdChange:H,onEntryFocus:we(p,Y=>{_.isUsingKeyboardRef.current||Y.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(nm,{role:"menu","aria-orientation":"vertical","data-state":Xb(A.open),"data-radix-menu-content":"",dir:_.dir,...z,...T,ref:k,style:{outline:"none",...T.style},onKeyDown:we(T.onKeyDown,Y=>{const R=Y.target.closest("[data-radix-menu-content]")===Y.currentTarget,B=Y.ctrlKey||Y.altKey||Y.metaKey,Z=Y.key.length===1;R&&(Y.key==="Tab"&&Y.preventDefault(),!B&&Z&&D(Y.key));const ne=I.current;if(Y.target!==ne||!hA.includes(Y.key))return;Y.preventDefault();const ce=L().filter(se=>!se.disabled).map(se=>se.ref.current);Sb.includes(Y.key)&&ce.reverse(),kA(ce)}),onBlur:we(n.onBlur,Y=>{Y.currentTarget.contains(Y.target)||(window.clearTimeout(te.current),re.current="")}),onPointerMove:we(n.onPointerMove,qr(Y=>{const q=Y.target,R=K.current!==Y.clientX;if(Y.currentTarget.contains(q)&&R){const B=Y.clientX>K.current?"right":"left";Q.current=B,K.current=Y.clientX}}))})})})})})})});_b.displayName=Nn;var MA="MenuGroup",sm=x.forwardRef((n,l)=>{const{__scopeMenu:r,...i}=n;return v.jsx(Fe.div,{role:"group",...i,ref:l})});sm.displayName=MA;var AA="MenuLabel",Rb=x.forwardRef((n,l)=>{const{__scopeMenu:r,...i}=n;return v.jsx(Fe.div,{...i,ref:l})});Rb.displayName=AA;var Xs="MenuItem",o0="menu.itemSelect",oc=x.forwardRef((n,l)=>{const{disabled:r=!1,onSelect:i,...c}=n,u=x.useRef(null),d=Jr(Xs,n.__scopeMenu),m=rm(Xs,n.__scopeMenu),p=rt(l,u),g=x.useRef(!1),b=()=>{const h=u.current;if(!r&&h){const S=new CustomEvent(o0,{bubbles:!0,cancelable:!0});h.addEventListener(o0,E=>i==null?void 0:i(E),{once:!0}),Dv(h,S),S.defaultPrevented?g.current=!1:d.onClose()}};return v.jsx(Nb,{...c,ref:p,disabled:r,onClick:we(n.onClick,b),onPointerDown:h=>{var S;(S=n.onPointerDown)==null||S.call(n,h),g.current=!0},onPointerUp:we(n.onPointerUp,h=>{var S;g.current||(S=h.currentTarget)==null||S.click()}),onKeyDown:we(n.onKeyDown,h=>{const S=m.searchRef.current!=="";r||S&&h.key===" "||gd.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});oc.displayName=Xs;var Nb=x.forwardRef((n,l)=>{const{__scopeMenu:r,disabled:i=!1,textValue:c,...u}=n,d=rm(Xs,r),m=Eb(r),p=x.useRef(null),g=rt(l,p),[b,h]=x.useState(!1),[S,E]=x.useState("");return x.useEffect(()=>{const C=p.current;C&&E((C.textContent??"").trim())},[u.children]),v.jsx(Vr.ItemSlot,{scope:r,disabled:i,textValue:c??S,children:v.jsx(dA,{asChild:!0,...m,focusable:!i,children:v.jsx(Fe.div,{role:"menuitem","data-highlighted":b?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:we(n.onPointerMove,qr(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:we(n.onPointerLeave,qr(C=>d.onItemLeave(C))),onFocus:we(n.onFocus,()=>h(!0)),onBlur:we(n.onBlur,()=>h(!1))})})})}),_A="MenuCheckboxItem",Ob=x.forwardRef((n,l)=>{const{checked:r=!1,onCheckedChange:i,...c}=n;return v.jsx(Lb,{scope:n.__scopeMenu,checked:r,children:v.jsx(oc,{role:"menuitemcheckbox","aria-checked":$s(r)?"mixed":r,...c,ref:l,"data-state":fm(r),onSelect:we(c.onSelect,()=>i==null?void 0:i($s(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Ob.displayName=_A;var Db="MenuRadioGroup",[RA,NA]=Il(Db,{value:void 0,onValueChange:()=>{}}),zb=x.forwardRef((n,l)=>{const{value:r,onValueChange:i,...c}=n,u=On(i);return v.jsx(RA,{scope:n.__scopeMenu,value:r,onValueChange:u,children:v.jsx(sm,{...c,ref:l})})});zb.displayName=Db;var jb="MenuRadioItem",kb=x.forwardRef((n,l)=>{const{value:r,...i}=n,c=NA(jb,n.__scopeMenu),u=r===c.value;return v.jsx(Lb,{scope:n.__scopeMenu,checked:u,children:v.jsx(oc,{role:"menuitemradio","aria-checked":u,...i,ref:l,"data-state":fm(u),onSelect:we(i.onSelect,()=>{var d;return(d=c.onValueChange)==null?void 0:d.call(c,r)},{checkForDefaultPrevented:!1})})})});kb.displayName=jb;var cm="MenuItemIndicator",[Lb,OA]=Il(cm,{checked:!1}),Hb=x.forwardRef((n,l)=>{const{__scopeMenu:r,forceMount:i,...c}=n,u=OA(cm,r);return v.jsx(Io,{present:i||$s(u.checked)||u.checked===!0,children:v.jsx(Fe.span,{...c,ref:l,"data-state":fm(u.checked)})})});Hb.displayName=cm;var DA="MenuSeparator",Bb=x.forwardRef((n,l)=>{const{__scopeMenu:r,...i}=n;return v.jsx(Fe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:l})});Bb.displayName=DA;var zA="MenuArrow",Ub=x.forwardRef((n,l)=>{const{__scopeMenu:r,...i}=n,c=Zr(r);return v.jsx(am,{...c,...i,ref:l})});Ub.displayName=zA;var um="MenuSub",[jA,Ib]=Il(um),Gb=n=>{const{__scopeMenu:l,children:r,open:i=!1,onOpenChange:c}=n,u=rl(um,l),d=Zr(l),[m,p]=x.useState(null),[g,b]=x.useState(null),h=On(c);return x.useEffect(()=>(u.open===!1&&h(!1),()=>h(!1)),[u.open,h]),v.jsx(em,{...d,children:v.jsx(Tb,{scope:l,open:i,onOpenChange:h,content:g,onContentChange:b,children:v.jsx(jA,{scope:l,contentId:Lo(),triggerId:Lo(),trigger:m,onTriggerChange:p,children:r})})})};Gb.displayName=um;var Hr="MenuSubTrigger",Yb=x.forwardRef((n,l)=>{const r=rl(Hr,n.__scopeMenu),i=Jr(Hr,n.__scopeMenu),c=Ib(Hr,n.__scopeMenu),u=rm(Hr,n.__scopeMenu),d=x.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:p}=u,g={__scopeMenu:n.__scopeMenu},b=x.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return x.useEffect(()=>b,[b]),x.useEffect(()=>{const h=m.current;return()=>{window.clearTimeout(h),p(null)}},[m,p]),v.jsx(lm,{asChild:!0,...g,children:v.jsx(Nb,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":c.contentId,"data-state":Xb(r.open),...n,ref:Id(l,c.onTriggerChange),onClick:h=>{var S;(S=n.onClick)==null||S.call(n,h),!(n.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:we(n.onPointerMove,qr(h=>{u.onItemEnter(h),!h.defaultPrevented&&!n.disabled&&!r.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{r.onOpenChange(!0),b()},100))})),onPointerLeave:we(n.onPointerLeave,qr(h=>{var E,C;b();const S=(E=r.content)==null?void 0:E.getBoundingClientRect();if(S){const T=(C=r.content)==null?void 0:C.dataset.side,A=T==="right",_=A?-5:5,z=S[A?"left":"right"],N=S[A?"right":"left"];u.onPointerGraceIntentChange({area:[{x:h.clientX+_,y:h.clientY},{x:z,y:S.top},{x:N,y:S.top},{x:N,y:S.bottom},{x:z,y:S.bottom}],side:T}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(h),h.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:we(n.onKeyDown,h=>{var E;const S=u.searchRef.current!=="";n.disabled||S&&h.key===" "||pA[i.dir].includes(h.key)&&(r.onOpenChange(!0),(E=r.content)==null||E.focus(),h.preventDefault())})})})});Yb.displayName=Hr;var Vb="MenuSubContent",qb=x.forwardRef((n,l)=>{const r=Mb(Nn,n.__scopeMenu),{forceMount:i=r.forceMount,...c}=n,u=rl(Nn,n.__scopeMenu),d=Jr(Nn,n.__scopeMenu),m=Ib(Vb,n.__scopeMenu),p=x.useRef(null),g=rt(l,p);return v.jsx(Vr.Provider,{scope:n.__scopeMenu,children:v.jsx(Io,{present:i||u.open,children:v.jsx(Vr.Slot,{scope:n.__scopeMenu,children:v.jsx(im,{id:m.contentId,"aria-labelledby":m.triggerId,...c,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:b=>{var h;d.isUsingKeyboardRef.current&&((h=p.current)==null||h.focus()),b.preventDefault()},onCloseAutoFocus:b=>b.preventDefault(),onFocusOutside:we(n.onFocusOutside,b=>{b.target!==m.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:we(n.onEscapeKeyDown,b=>{d.onClose(),b.preventDefault()}),onKeyDown:we(n.onKeyDown,b=>{var E;const h=b.currentTarget.contains(b.target),S=gA[d.dir].includes(b.key);h&&S&&(u.onOpenChange(!1),(E=m.trigger)==null||E.focus(),b.preventDefault())})})})})})});qb.displayName=Vb;function Xb(n){return n?"open":"closed"}function $s(n){return n==="indeterminate"}function fm(n){return $s(n)?"indeterminate":n?"checked":"unchecked"}function kA(n){const l=document.activeElement;for(const r of n)if(r===l||(r.focus(),document.activeElement!==l))return}function LA(n,l){return n.map((r,i)=>n[(l+i)%n.length])}function HA(n,l,r){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,u=r?n.indexOf(r):-1;let d=LA(n,Math.max(u,0));c.length===1&&(d=d.filter(g=>g!==r));const p=d.find(g=>g.toLowerCase().startsWith(c.toLowerCase()));return p!==r?p:void 0}function BA(n,l){const{x:r,y:i}=n;let c=!1;for(let u=0,d=l.length-1;u<l.length;d=u++){const m=l[u],p=l[d],g=m.x,b=m.y,h=p.x,S=p.y;b>i!=S>i&&r<(h-g)*(i-b)/(S-b)+g&&(c=!c)}return c}function UA(n,l){if(!l)return!1;const r={x:n.clientX,y:n.clientY};return BA(r,l)}function qr(n){return l=>l.pointerType==="mouse"?n(l):void 0}var IA=Cb,GA=lm,YA=Ab,VA=_b,qA=sm,XA=Rb,$A=oc,PA=Ob,KA=zb,FA=kb,QA=Hb,ZA=Bb,JA=Ub,WA=Gb,e_=Yb,t_=qb,dm="ContextMenu",[n_]=Ul(dm,[wb]),qt=wb(),[a_,$b]=n_(dm),Pb=n=>{const{__scopeContextMenu:l,children:r,onOpenChange:i,dir:c,modal:u=!0}=n,[d,m]=x.useState(!1),p=qt(l),g=On(i),b=x.useCallback(h=>{m(h),g(h)},[g]);return v.jsx(a_,{scope:l,open:d,onOpenChange:b,modal:u,children:v.jsx(IA,{...p,dir:c,open:d,onOpenChange:b,modal:u,children:r})})};Pb.displayName=dm;var Kb="ContextMenuTrigger",Fb=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,disabled:i=!1,...c}=n,u=$b(Kb,r),d=qt(r),m=x.useRef({x:0,y:0}),p=x.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),g=x.useRef(0),b=x.useCallback(()=>window.clearTimeout(g.current),[]),h=S=>{m.current={x:S.clientX,y:S.clientY},u.onOpenChange(!0)};return x.useEffect(()=>b,[b]),x.useEffect(()=>void(i&&b()),[i,b]),v.jsxs(v.Fragment,{children:[v.jsx(GA,{...d,virtualRef:p}),v.jsx(Fe.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:l,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:we(n.onContextMenu,S=>{b(),h(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:we(n.onPointerDown,Es(S=>{b(),g.current=window.setTimeout(()=>h(S),700)})),onPointerMove:i?n.onPointerMove:we(n.onPointerMove,Es(b)),onPointerCancel:i?n.onPointerCancel:we(n.onPointerCancel,Es(b)),onPointerUp:i?n.onPointerUp:we(n.onPointerUp,Es(b))})]})});Fb.displayName=Kb;var l_="ContextMenuPortal",Qb=n=>{const{__scopeContextMenu:l,...r}=n,i=qt(l);return v.jsx(YA,{...i,...r})};Qb.displayName=l_;var Zb="ContextMenuContent",Jb=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=$b(Zb,r),u=qt(r),d=x.useRef(!1);return v.jsx(VA,{...u,...i,ref:l,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var p;(p=n.onCloseAutoFocus)==null||p.call(n,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var p;(p=n.onInteractOutside)==null||p.call(n,m),!m.defaultPrevented&&!c.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)"}})});Jb.displayName=Zb;var o_="ContextMenuGroup",r_=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(qA,{...c,...i,ref:l})});r_.displayName=o_;var i_="ContextMenuLabel",s_=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(XA,{...c,...i,ref:l})});s_.displayName=i_;var c_="ContextMenuItem",Wb=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx($A,{...c,...i,ref:l})});Wb.displayName=c_;var u_="ContextMenuCheckboxItem",f_=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(PA,{...c,...i,ref:l})});f_.displayName=u_;var d_="ContextMenuRadioGroup",m_=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(KA,{...c,...i,ref:l})});m_.displayName=d_;var h_="ContextMenuRadioItem",p_=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(FA,{...c,...i,ref:l})});p_.displayName=h_;var g_="ContextMenuItemIndicator",y_=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(QA,{...c,...i,ref:l})});y_.displayName=g_;var v_="ContextMenuSeparator",ex=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(ZA,{...c,...i,ref:l})});ex.displayName=v_;var b_="ContextMenuArrow",x_=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(JA,{...c,...i,ref:l})});x_.displayName=b_;var tx="ContextMenuSub",nx=n=>{const{__scopeContextMenu:l,children:r,onOpenChange:i,open:c,defaultOpen:u}=n,d=qt(l),[m,p]=Is({prop:c,defaultProp:u??!1,onChange:i,caller:tx});return v.jsx(WA,{...d,open:m,onOpenChange:p,children:r})};nx.displayName=tx;var S_="ContextMenuSubTrigger",ax=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(e_,{...c,...i,ref:l})});ax.displayName=S_;var w_="ContextMenuSubContent",lx=x.forwardRef((n,l)=>{const{__scopeContextMenu:r,...i}=n,c=qt(r);return v.jsx(t_,{...c,...i,ref:l,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)"}})});lx.displayName=w_;function Es(n){return l=>l.pointerType!=="mouse"?n(l):void 0}var E_=Pb,T_=Fb,C_=Qb,M_=Jb,A_=Wb,__=ex,R_=nx,N_=ax,O_=lx;function r0(n,[l,r]){return Math.min(r,Math.max(l,n))}var D_=[" ","Enter","ArrowUp","ArrowDown"],z_=[" ","Enter"],Ll="Select",[rc,ic,j_]=Gd(Ll),[qo]=Ul(Ll,[j_,Vo]),sc=Vo(),[k_,il]=qo(Ll),[L_,H_]=qo(Ll),ox=n=>{const{__scopeSelect:l,children:r,open:i,defaultOpen:c,onOpenChange:u,value:d,defaultValue:m,onValueChange:p,dir:g,name:b,autoComplete:h,disabled:S,required:E,form:C}=n,T=sc(l),[A,_]=x.useState(null),[z,N]=x.useState(null),[L,J]=x.useState(!1),H=Yd(g),[I,k]=Is({prop:i,defaultProp:c??!1,onChange:u,caller:Ll}),[te,re]=Is({prop:d,defaultProp:m,onChange:p,caller:Ll}),ue=x.useRef(null),X=A?C||!!A.closest("form"):!0,[Q,K]=x.useState(new Set),G=Array.from(Q).map(M=>M.props.value).join(";");return v.jsx(em,{...T,children:v.jsxs(k_,{required:E,scope:l,trigger:A,onTriggerChange:_,valueNode:z,onValueNodeChange:N,valueNodeHasChildren:L,onValueNodeHasChildrenChange:J,contentId:Lo(),value:te,onValueChange:re,open:I,onOpenChange:k,dir:H,triggerPointerDownPosRef:ue,disabled:S,children:[v.jsx(rc.Provider,{scope:l,children:v.jsx(L_,{scope:n.__scopeSelect,onNativeOptionAdd:x.useCallback(M=>{K(D=>new Set(D).add(M))},[]),onNativeOptionRemove:x.useCallback(M=>{K(D=>{const V=new Set(D);return V.delete(M),V})},[]),children:r})}),X?v.jsxs(_x,{"aria-hidden":!0,required:E,tabIndex:-1,name:b,autoComplete:h,value:te,onChange:M=>re(M.target.value),disabled:S,form:C,children:[te===void 0?v.jsx("option",{value:""}):null,Array.from(Q)]},G):null]})})};ox.displayName=Ll;var rx="SelectTrigger",ix=x.forwardRef((n,l)=>{const{__scopeSelect:r,disabled:i=!1,...c}=n,u=sc(r),d=il(rx,r),m=d.disabled||i,p=rt(l,d.onTriggerChange),g=ic(r),b=x.useRef("touch"),[h,S,E]=Nx(T=>{const A=g().filter(N=>!N.disabled),_=A.find(N=>N.value===d.value),z=Ox(A,T,_);z!==void 0&&d.onValueChange(z.value)}),C=T=>{m||(d.onOpenChange(!0),E()),T&&(d.triggerPointerDownPosRef.current={x:Math.round(T.pageX),y:Math.round(T.pageY)})};return v.jsx(tm,{asChild:!0,...u,children:v.jsx(Fe.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":Rx(d.value)?"":void 0,...c,ref:p,onClick:we(c.onClick,T=>{T.currentTarget.focus(),b.current!=="mouse"&&C(T)}),onPointerDown:we(c.onPointerDown,T=>{b.current=T.pointerType;const A=T.target;A.hasPointerCapture(T.pointerId)&&A.releasePointerCapture(T.pointerId),T.button===0&&T.ctrlKey===!1&&T.pointerType==="mouse"&&(C(T),T.preventDefault())}),onKeyDown:we(c.onKeyDown,T=>{const A=h.current!=="";!(T.ctrlKey||T.altKey||T.metaKey)&&T.key.length===1&&S(T.key),!(A&&T.key===" ")&&D_.includes(T.key)&&(C(),T.preventDefault())})})})});ix.displayName=rx;var sx="SelectValue",cx=x.forwardRef((n,l)=>{const{__scopeSelect:r,className:i,style:c,children:u,placeholder:d="",...m}=n,p=il(sx,r),{onValueNodeHasChildrenChange:g}=p,b=u!==void 0,h=rt(l,p.onValueNodeChange);return Vt(()=>{g(b)},[g,b]),v.jsx(Fe.span,{...m,ref:h,style:{pointerEvents:"none"},children:Rx(p.value)?v.jsx(v.Fragment,{children:d}):u})});cx.displayName=sx;var B_="SelectIcon",ux=x.forwardRef((n,l)=>{const{__scopeSelect:r,children:i,...c}=n;return v.jsx(Fe.span,{"aria-hidden":!0,...c,ref:l,children:i||"▼"})});ux.displayName=B_;var U_="SelectPortal",fx=n=>v.jsx(qd,{asChild:!0,...n});fx.displayName=U_;var Hl="SelectContent",dx=x.forwardRef((n,l)=>{const r=il(Hl,n.__scopeSelect),[i,c]=x.useState();if(Vt(()=>{c(new DocumentFragment)},[]),!r.open){const u=i;return u?$r.createPortal(v.jsx(mx,{scope:n.__scopeSelect,children:v.jsx(rc.Slot,{scope:n.__scopeSelect,children:v.jsx("div",{children:n.children})})}),u):null}return v.jsx(hx,{...n,ref:l})});dx.displayName=Hl;var Bn=10,[mx,sl]=qo(Hl),I_="SelectContentImpl",G_=ko("SelectContent.RemoveScroll"),hx=x.forwardRef((n,l)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,side:m,sideOffset:p,align:g,alignOffset:b,arrowPadding:h,collisionBoundary:S,collisionPadding:E,sticky:C,hideWhenDetached:T,avoidCollisions:A,..._}=n,z=il(Hl,r),[N,L]=x.useState(null),[J,H]=x.useState(null),I=rt(l,se=>L(se)),[k,te]=x.useState(null),[re,ue]=x.useState(null),X=ic(r),[Q,K]=x.useState(!1),G=x.useRef(!1);x.useEffect(()=>{if(N)return Pv(N)},[N]),Bv();const M=x.useCallback(se=>{const[ge,...pe]=X().map(Ce=>Ce.ref.current),[Ae]=pe.slice(-1),Ne=document.activeElement;for(const Ce of se)if(Ce===Ne||(Ce==null||Ce.scrollIntoView({block:"nearest"}),Ce===ge&&J&&(J.scrollTop=0),Ce===Ae&&J&&(J.scrollTop=J.scrollHeight),Ce==null||Ce.focus(),document.activeElement!==Ne))return},[X,J]),D=x.useCallback(()=>M([k,N]),[M,k,N]);x.useEffect(()=>{Q&&D()},[Q,D]);const{onOpenChange:V,triggerPointerDownPosRef:Y}=z;x.useEffect(()=>{if(N){let se={x:0,y:0};const ge=Ae=>{var Ne,Ce;se={x:Math.abs(Math.round(Ae.pageX)-(((Ne=Y.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(Ae.pageY)-(((Ce=Y.current)==null?void 0:Ce.y)??0))}},pe=Ae=>{se.x<=10&&se.y<=10?Ae.preventDefault():N.contains(Ae.target)||V(!1),document.removeEventListener("pointermove",ge),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",pe,{capture:!0})}}},[N,V,Y]),x.useEffect(()=>{const se=()=>V(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[V]);const[q,R]=Nx(se=>{const ge=X().filter(Ne=>!Ne.disabled),pe=ge.find(Ne=>Ne.ref.current===document.activeElement),Ae=Ox(ge,se,pe);Ae&&setTimeout(()=>Ae.ref.current.focus())}),B=x.useCallback((se,ge,pe)=>{const Ae=!G.current&&!pe;(z.value!==void 0&&z.value===ge||Ae)&&(te(se),Ae&&(G.current=!0))},[z.value]),Z=x.useCallback(()=>N==null?void 0:N.focus(),[N]),ne=x.useCallback((se,ge,pe)=>{const Ae=!G.current&&!pe;(z.value!==void 0&&z.value===ge||Ae)&&ue(se)},[z.value]),W=i==="popper"?yd:px,ce=W===yd?{side:m,sideOffset:p,align:g,alignOffset:b,arrowPadding:h,collisionBoundary:S,collisionPadding:E,sticky:C,hideWhenDetached:T,avoidCollisions:A}:{};return v.jsx(mx,{scope:r,content:N,viewport:J,onViewportChange:H,itemRefCallback:B,selectedItem:k,onItemLeave:Z,itemTextRefCallback:ne,focusSelectedItem:D,selectedItemText:re,position:i,isPositioned:Q,searchRef:q,children:v.jsx(Xd,{as:G_,allowPinchZoom:!0,children:v.jsx(Vd,{asChild:!0,trapped:z.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:we(c,se=>{var ge;(ge=z.trigger)==null||ge.focus({preventScroll:!0}),se.preventDefault()}),children:v.jsx(Ws,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>z.onOpenChange(!1),children:v.jsx(W,{role:"listbox",id:z.contentId,"data-state":z.open?"open":"closed",dir:z.dir,onContextMenu:se=>se.preventDefault(),..._,...ce,onPlaced:()=>K(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:we(_.onKeyDown,se=>{const ge=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!ge&&se.key.length===1&&R(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let Ae=X().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(se.key)&&(Ae=Ae.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Ne=se.target,Ce=Ae.indexOf(Ne);Ae=Ae.slice(Ce+1)}setTimeout(()=>M(Ae)),se.preventDefault()}})})})})})})});hx.displayName=I_;var Y_="SelectItemAlignedPosition",px=x.forwardRef((n,l)=>{const{__scopeSelect:r,onPlaced:i,...c}=n,u=il(Hl,r),d=sl(Hl,r),[m,p]=x.useState(null),[g,b]=x.useState(null),h=rt(l,I=>b(I)),S=ic(r),E=x.useRef(!1),C=x.useRef(!0),{viewport:T,selectedItem:A,selectedItemText:_,focusSelectedItem:z}=d,N=x.useCallback(()=>{if(u.trigger&&u.valueNode&&m&&g&&T&&A&&_){const I=u.trigger.getBoundingClientRect(),k=g.getBoundingClientRect(),te=u.valueNode.getBoundingClientRect(),re=_.getBoundingClientRect();if(u.dir!=="rtl"){const Ne=re.left-k.left,Ce=te.left-Ne,at=I.left-Ce,qe=I.width+at,zt=Math.max(qe,k.width),jt=window.innerWidth-Bn,At=r0(Ce,[Bn,Math.max(Bn,jt-zt)]);m.style.minWidth=qe+"px",m.style.left=At+"px"}else{const Ne=k.right-re.right,Ce=window.innerWidth-te.right-Ne,at=window.innerWidth-I.right-Ce,qe=I.width+at,zt=Math.max(qe,k.width),jt=window.innerWidth-Bn,At=r0(Ce,[Bn,Math.max(Bn,jt-zt)]);m.style.minWidth=qe+"px",m.style.right=At+"px"}const ue=S(),X=window.innerHeight-Bn*2,Q=T.scrollHeight,K=window.getComputedStyle(g),G=parseInt(K.borderTopWidth,10),M=parseInt(K.paddingTop,10),D=parseInt(K.borderBottomWidth,10),V=parseInt(K.paddingBottom,10),Y=G+M+Q+V+D,q=Math.min(A.offsetHeight*5,Y),R=window.getComputedStyle(T),B=parseInt(R.paddingTop,10),Z=parseInt(R.paddingBottom,10),ne=I.top+I.height/2-Bn,W=X-ne,ce=A.offsetHeight/2,se=A.offsetTop+ce,ge=G+M+se,pe=Y-ge;if(ge<=ne){const Ne=ue.length>0&&A===ue[ue.length-1].ref.current;m.style.bottom="0px";const Ce=g.clientHeight-T.offsetTop-T.offsetHeight,at=Math.max(W,ce+(Ne?Z:0)+Ce+D),qe=ge+at;m.style.height=qe+"px"}else{const Ne=ue.length>0&&A===ue[0].ref.current;m.style.top="0px";const at=Math.max(ne,G+T.offsetTop+(Ne?B:0)+ce)+pe;m.style.height=at+"px",T.scrollTop=ge-ne+T.offsetTop}m.style.margin=`${Bn}px 0`,m.style.minHeight=q+"px",m.style.maxHeight=X+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[S,u.trigger,u.valueNode,m,g,T,A,_,u.dir,i]);Vt(()=>N(),[N]);const[L,J]=x.useState();Vt(()=>{g&&J(window.getComputedStyle(g).zIndex)},[g]);const H=x.useCallback(I=>{I&&C.current===!0&&(N(),z==null||z(),C.current=!1)},[N,z]);return v.jsx(q_,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:E,onScrollButtonChange:H,children:v.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:v.jsx(Fe.div,{...c,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});px.displayName=Y_;var V_="SelectPopperPosition",yd=x.forwardRef((n,l)=>{const{__scopeSelect:r,align:i="start",collisionPadding:c=Bn,...u}=n,d=sc(r);return v.jsx(nm,{...d,...u,ref:l,align:i,collisionPadding:c,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)"}})});yd.displayName=V_;var[q_,mm]=qo(Hl,{}),vd="SelectViewport",gx=x.forwardRef((n,l)=>{const{__scopeSelect:r,nonce:i,...c}=n,u=sl(vd,r),d=mm(vd,r),m=rt(l,u.onViewportChange),p=x.useRef(0);return v.jsxs(v.Fragment,{children:[v.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}),v.jsx(rc.Slot,{scope:r,children:v.jsx(Fe.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:we(c.onScroll,g=>{const b=g.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&h){const E=Math.abs(p.current-b.scrollTop);if(E>0){const C=window.innerHeight-Bn*2,T=parseFloat(h.style.minHeight),A=parseFloat(h.style.height),_=Math.max(T,A);if(_<C){const z=_+E,N=Math.min(C,z),L=z-N;h.style.height=N+"px",h.style.bottom==="0px"&&(b.scrollTop=L>0?L:0,h.style.justifyContent="flex-end")}}}p.current=b.scrollTop})})})]})});gx.displayName=vd;var yx="SelectGroup",[X_,$_]=qo(yx),vx=x.forwardRef((n,l)=>{const{__scopeSelect:r,...i}=n,c=Lo();return v.jsx(X_,{scope:r,id:c,children:v.jsx(Fe.div,{role:"group","aria-labelledby":c,...i,ref:l})})});vx.displayName=yx;var bx="SelectLabel",P_=x.forwardRef((n,l)=>{const{__scopeSelect:r,...i}=n,c=$_(bx,r);return v.jsx(Fe.div,{id:c.id,...i,ref:l})});P_.displayName=bx;var Ps="SelectItem",[K_,xx]=qo(Ps),Sx=x.forwardRef((n,l)=>{const{__scopeSelect:r,value:i,disabled:c=!1,textValue:u,...d}=n,m=il(Ps,r),p=sl(Ps,r),g=m.value===i,[b,h]=x.useState(u??""),[S,E]=x.useState(!1),C=rt(l,z=>{var N;return(N=p.itemRefCallback)==null?void 0:N.call(p,z,i,c)}),T=Lo(),A=x.useRef("touch"),_=()=>{c||(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 v.jsx(K_,{scope:r,value:i,disabled:c,textId:T,isSelected:g,onItemTextChange:x.useCallback(z=>{h(N=>N||((z==null?void 0:z.textContent)??"").trim())},[]),children:v.jsx(rc.ItemSlot,{scope:r,value:i,disabled:c,textValue:b,children:v.jsx(Fe.div,{role:"option","aria-labelledby":T,"data-highlighted":S?"":void 0,"aria-selected":g&&S,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:C,onFocus:we(d.onFocus,()=>E(!0)),onBlur:we(d.onBlur,()=>E(!1)),onClick:we(d.onClick,()=>{A.current!=="mouse"&&_()}),onPointerUp:we(d.onPointerUp,()=>{A.current==="mouse"&&_()}),onPointerDown:we(d.onPointerDown,z=>{A.current=z.pointerType}),onPointerMove:we(d.onPointerMove,z=>{var N;A.current=z.pointerType,c?(N=p.onItemLeave)==null||N.call(p):A.current==="mouse"&&z.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(d.onPointerLeave,z=>{var N;z.currentTarget===document.activeElement&&((N=p.onItemLeave)==null||N.call(p))}),onKeyDown:we(d.onKeyDown,z=>{var L;((L=p.searchRef)==null?void 0:L.current)!==""&&z.key===" "||(z_.includes(z.key)&&_(),z.key===" "&&z.preventDefault())})})})})});Sx.displayName=Ps;var Br="SelectItemText",wx=x.forwardRef((n,l)=>{const{__scopeSelect:r,className:i,style:c,...u}=n,d=il(Br,r),m=sl(Br,r),p=xx(Br,r),g=H_(Br,r),[b,h]=x.useState(null),S=rt(l,_=>h(_),p.onItemTextChange,_=>{var z;return(z=m.itemTextRefCallback)==null?void 0:z.call(m,_,p.value,p.disabled)}),E=b==null?void 0:b.textContent,C=x.useMemo(()=>v.jsx("option",{value:p.value,disabled:p.disabled,children:E},p.value),[p.disabled,p.value,E]),{onNativeOptionAdd:T,onNativeOptionRemove:A}=g;return Vt(()=>(T(C),()=>A(C)),[T,A,C]),v.jsxs(v.Fragment,{children:[v.jsx(Fe.span,{id:p.textId,...u,ref:S}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?$r.createPortal(u.children,d.valueNode):null]})});wx.displayName=Br;var Ex="SelectItemIndicator",Tx=x.forwardRef((n,l)=>{const{__scopeSelect:r,...i}=n;return xx(Ex,r).isSelected?v.jsx(Fe.span,{"aria-hidden":!0,...i,ref:l}):null});Tx.displayName=Ex;var bd="SelectScrollUpButton",Cx=x.forwardRef((n,l)=>{const r=sl(bd,n.__scopeSelect),i=mm(bd,n.__scopeSelect),[c,u]=x.useState(!1),d=rt(l,i.onScrollButtonChange);return Vt(()=>{if(r.viewport&&r.isPositioned){let m=function(){const g=p.scrollTop>0;u(g)};const p=r.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),c?v.jsx(Ax,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=r;m&&p&&(m.scrollTop=m.scrollTop-p.offsetHeight)}}):null});Cx.displayName=bd;var xd="SelectScrollDownButton",Mx=x.forwardRef((n,l)=>{const r=sl(xd,n.__scopeSelect),i=mm(xd,n.__scopeSelect),[c,u]=x.useState(!1),d=rt(l,i.onScrollButtonChange);return Vt(()=>{if(r.viewport&&r.isPositioned){let m=function(){const g=p.scrollHeight-p.clientHeight,b=Math.ceil(p.scrollTop)<g;u(b)};const p=r.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),c?v.jsx(Ax,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=r;m&&p&&(m.scrollTop=m.scrollTop+p.offsetHeight)}}):null});Mx.displayName=xd;var Ax=x.forwardRef((n,l)=>{const{__scopeSelect:r,onAutoScroll:i,...c}=n,u=sl("SelectScrollButton",r),d=x.useRef(null),m=ic(r),p=x.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return x.useEffect(()=>()=>p(),[p]),Vt(()=>{var b;const g=m().find(h=>h.ref.current===document.activeElement);(b=g==null?void 0:g.ref.current)==null||b.scrollIntoView({block:"nearest"})},[m]),v.jsx(Fe.div,{"aria-hidden":!0,...c,ref:l,style:{flexShrink:0,...c.style},onPointerDown:we(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:we(c.onPointerMove,()=>{var g;(g=u.onItemLeave)==null||g.call(u),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:we(c.onPointerLeave,()=>{p()})})}),F_="SelectSeparator",Q_=x.forwardRef((n,l)=>{const{__scopeSelect:r,...i}=n;return v.jsx(Fe.div,{"aria-hidden":!0,...i,ref:l})});Q_.displayName=F_;var Sd="SelectArrow",Z_=x.forwardRef((n,l)=>{const{__scopeSelect:r,...i}=n,c=sc(r),u=il(Sd,r),d=sl(Sd,r);return u.open&&d.position==="popper"?v.jsx(am,{...c,...i,ref:l}):null});Z_.displayName=Sd;var J_="SelectBubbleInput",_x=x.forwardRef(({__scopeSelect:n,value:l,...r},i)=>{const c=x.useRef(null),u=rt(i,c),d=GC(l);return x.useEffect(()=>{const m=c.current;if(!m)return;const p=window.HTMLSelectElement.prototype,b=Object.getOwnPropertyDescriptor(p,"value").set;if(d!==l&&b){const h=new Event("change",{bubbles:!0});b.call(m,l),m.dispatchEvent(h)}},[d,l]),v.jsx(Fe.select,{...r,style:{...zv,...r.style},ref:u,defaultValue:l})});_x.displayName=J_;function Rx(n){return n===""||n===void 0}function Nx(n){const l=On(n),r=x.useRef(""),i=x.useRef(0),c=x.useCallback(d=>{const m=r.current+d;l(m),(function p(g){r.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>p(""),1e3))})(m)},[l]),u=x.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,c,u]}function Ox(n,l,r){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,u=r?n.indexOf(r):-1;let d=W_(n,Math.max(u,0));c.length===1&&(d=d.filter(g=>g!==r));const p=d.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return p!==r?p:void 0}function W_(n,l){return n.map((r,i)=>n[(l+i)%n.length])}var eR=ox,tR=ix,nR=cx,aR=ux,lR=fx,oR=dx,rR=gx,iR=vx,sR=Sx,cR=wx,uR=Tx,fR=Cx,dR=Mx,mR="Separator",i0="horizontal",hR=["horizontal","vertical"],Dx=x.forwardRef((n,l)=>{const{decorative:r,orientation:i=i0,...c}=n,u=pR(i)?i:i0,m=r?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return v.jsx(Fe.div,{"data-orientation":u,...m,...c,ref:l})});Dx.displayName=mR;function pR(n){return hR.includes(n)}var gR=Dx,[cc]=Ul("Tooltip",[Vo]),hm=Vo(),zx="TooltipProvider",yR=700,s0="tooltip.open",[vR,jx]=cc(zx),kx=n=>{const{__scopeTooltip:l,delayDuration:r=yR,skipDelayDuration:i=300,disableHoverableContent:c=!1,children:u}=n,d=x.useRef(!0),m=x.useRef(!1),p=x.useRef(0);return x.useEffect(()=>{const g=p.current;return()=>window.clearTimeout(g)},[]),v.jsx(vR,{scope:l,isOpenDelayedRef:d,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(p.current),d.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:m,onPointerInTransitChange:x.useCallback(g=>{m.current=g},[]),disableHoverableContent:c,children:u})};kx.displayName=zx;var Lx="Tooltip",[_5,uc]=cc(Lx),wd="TooltipTrigger",bR=x.forwardRef((n,l)=>{const{__scopeTooltip:r,...i}=n,c=uc(wd,r),u=jx(wd,r),d=hm(r),m=x.useRef(null),p=rt(l,m,c.onTriggerChange),g=x.useRef(!1),b=x.useRef(!1),h=x.useCallback(()=>g.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),v.jsx(tm,{asChild:!0,...d,children:v.jsx(Fe.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...i,ref:p,onPointerMove:we(n.onPointerMove,S=>{S.pointerType!=="touch"&&!b.current&&!u.isPointerInTransitRef.current&&(c.onTriggerEnter(),b.current=!0)}),onPointerLeave:we(n.onPointerLeave,()=>{c.onTriggerLeave(),b.current=!1}),onPointerDown:we(n.onPointerDown,()=>{c.open&&c.onClose(),g.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:we(n.onFocus,()=>{g.current||c.onOpen()}),onBlur:we(n.onBlur,c.onClose),onClick:we(n.onClick,c.onClose)})})});bR.displayName=wd;var xR="TooltipPortal",[R5,SR]=cc(xR,{forceMount:void 0}),Bo="TooltipContent",wR=x.forwardRef((n,l)=>{const r=SR(Bo,n.__scopeTooltip),{forceMount:i=r.forceMount,side:c="top",...u}=n,d=uc(Bo,n.__scopeTooltip);return v.jsx(Io,{present:i||d.open,children:d.disableHoverableContent?v.jsx(Hx,{side:c,...u,ref:l}):v.jsx(ER,{side:c,...u,ref:l})})}),ER=x.forwardRef((n,l)=>{const r=uc(Bo,n.__scopeTooltip),i=jx(Bo,n.__scopeTooltip),c=x.useRef(null),u=rt(l,c),[d,m]=x.useState(null),{trigger:p,onClose:g}=r,b=c.current,{onPointerInTransitChange:h}=i,S=x.useCallback(()=>{m(null),h(!1)},[h]),E=x.useCallback((C,T)=>{const A=C.currentTarget,_={x:C.clientX,y:C.clientY},z=_R(_,A.getBoundingClientRect()),N=RR(_,z),L=NR(T.getBoundingClientRect()),J=DR([...N,...L]);m(J),h(!0)},[h]);return x.useEffect(()=>()=>S(),[S]),x.useEffect(()=>{if(p&&b){const C=A=>E(A,b),T=A=>E(A,p);return p.addEventListener("pointerleave",C),b.addEventListener("pointerleave",T),()=>{p.removeEventListener("pointerleave",C),b.removeEventListener("pointerleave",T)}}},[p,b,E,S]),x.useEffect(()=>{if(d){const C=T=>{const A=T.target,_={x:T.clientX,y:T.clientY},z=(p==null?void 0:p.contains(A))||(b==null?void 0:b.contains(A)),N=!OR(_,d);z?S():N&&(S(),g())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[p,b,d,g,S]),v.jsx(Hx,{...n,ref:u})}),[TR,CR]=cc(Lx,{isInside:!1}),MR=ET("TooltipContent"),Hx=x.forwardRef((n,l)=>{const{__scopeTooltip:r,children:i,"aria-label":c,onEscapeKeyDown:u,onPointerDownOutside:d,...m}=n,p=uc(Bo,r),g=hm(r),{onClose:b}=p;return x.useEffect(()=>(document.addEventListener(s0,b),()=>document.removeEventListener(s0,b)),[b]),x.useEffect(()=>{if(p.trigger){const h=S=>{const E=S.target;E!=null&&E.contains(p.trigger)&&b()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[p.trigger,b]),v.jsx(Ws,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h=>h.preventDefault(),onDismiss:b,children:v.jsxs(nm,{"data-state":p.stateAttribute,...g,...m,ref:l,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:[v.jsx(MR,{children:i}),v.jsx(TR,{scope:r,isInside:!0,children:v.jsx(RT,{id:p.contentId,role:"tooltip",children:c||i})})]})})});wR.displayName=Bo;var Bx="TooltipArrow",AR=x.forwardRef((n,l)=>{const{__scopeTooltip:r,...i}=n,c=hm(r);return CR(Bx,r).isInside?null:v.jsx(am,{...c,...i,ref:l})});AR.displayName=Bx;function _R(n,l){const r=Math.abs(l.top-n.y),i=Math.abs(l.bottom-n.y),c=Math.abs(l.right-n.x),u=Math.abs(l.left-n.x);switch(Math.min(r,i,c,u)){case u:return"left";case c:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function RR(n,l,r=5){const i=[];switch(l){case"top":i.push({x:n.x-r,y:n.y+r},{x:n.x+r,y:n.y+r});break;case"bottom":i.push({x:n.x-r,y:n.y-r},{x:n.x+r,y:n.y-r});break;case"left":i.push({x:n.x+r,y:n.y-r},{x:n.x+r,y:n.y+r});break;case"right":i.push({x:n.x-r,y:n.y-r},{x:n.x-r,y:n.y+r});break}return i}function NR(n){const{top:l,right:r,bottom:i,left:c}=n;return[{x:c,y:l},{x:r,y:l},{x:r,y:i},{x:c,y:i}]}function OR(n,l){const{x:r,y:i}=n;let c=!1;for(let u=0,d=l.length-1;u<l.length;d=u++){const m=l[u],p=l[d],g=m.x,b=m.y,h=p.x,S=p.y;b>i!=S>i&&r<(h-g)*(i-b)/(S-b)+g&&(c=!c)}return c}function DR(n){const l=n.slice();return l.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),zR(l)}function zR(n){if(n.length<=1)return n.slice();const l=[];for(let i=0;i<n.length;i++){const c=n[i];for(;l.length>=2;){const u=l[l.length-1],d=l[l.length-2];if((u.x-d.x)*(c.y-d.y)>=(u.y-d.y)*(c.x-d.x))l.pop();else break}l.push(c)}l.pop();const r=[];for(let i=n.length-1;i>=0;i--){const c=n[i];for(;r.length>=2;){const u=r[r.length-1],d=r[r.length-2];if((u.x-d.x)*(c.y-d.y)>=(u.y-d.y)*(c.x-d.x))r.pop();else break}r.push(c)}return r.pop(),l.length===1&&r.length===1&&l[0].x===r[0].x&&l[0].y===r[0].y?l:l.concat(r)}var jR=kx;function Ux({...n}){return v.jsx(E_,{"data-slot":"context-menu",...n})}function Ix({...n}){return v.jsx(T_,{"data-slot":"context-menu-trigger",...n})}function $f({...n}){return v.jsx(R_,{"data-slot":"context-menu-sub",...n})}function Pf({className:n,inset:l,children:r,...i}){return v.jsxs(N_,{"data-slot":"context-menu-sub-trigger","data-inset":l,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:[r,v.jsx(B2,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Kf({className:n,...l}){return v.jsx(O_,{"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),...l})}function Gx({className:n,...l}){return v.jsx(C_,{children:v.jsx(M_,{"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),...l})})}function vt({className:n,inset:l,variant:r="default",...i}){return v.jsx(A_,{"data-slot":"context-menu-item","data-inset":l,"data-variant":r,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 Ks({className:n,...l}){return v.jsx(__,{"data-slot":"context-menu-separator",className:Pe("-mx-1 my-1 h-px bg-foreground/10",n),...l})}function c0({className:n,...l}){return v.jsx("span",{"data-slot":"context-menu-shortcut",className:Pe("ml-auto text-[11px] tracking-normal text-foreground/40",n),...l})}function kR({slides:n,activeSlideId:l,slideCount:r,thumbnails:i,onSelectSlide:c,onAdd:u,onAddSlideAbove:d,onAddSlideBelow:m,onDuplicate:p,onDelete:g,onToggleHidden:b,onReorder:h}){const[S,E]=x.useState(null),[C,T]=x.useState(null),A=S?n.findIndex(N=>N.id===S):-1,_=x.useCallback(N=>{N==null||N.scrollIntoView({block:"nearest",inline:"nearest"})},[]),z=x.useCallback((N,L)=>{if(!N||L===null){E(null),T(null);return}const J=n.findIndex(H=>H.id===N);J>=0&&J!==L&&(h==null||h(N,L)),E(null),T(null)},[h,n]);return v.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:v.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col","data-testid":"slide-sidebar-panel",children:[v.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-foreground/[0.06] px-3",children:[v.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground/50","data-testid":"slide-count",children:[v.jsx("span",{className:"tabular-nums",children:r})," slides"]}),v.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:v.jsx(zf,{className:"size-3.5"})})]}),v.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((N,L)=>{const J=N.id===l,H=N.hidden===!0,I=N.id===S,k=A>=0&&C===L&&L<A&&S!==N.id,te=A>=0&&C===L&&L>A&&S!==N.id;return v.jsxs(Ux,{children:[v.jsx(Ix,{asChild:!0,children:v.jsxs("div",{draggable:!0,onDragStart:re=>{E(N.id),T(L),re.dataTransfer.effectAllowed="move",re.dataTransfer.setData("text/plain",N.id)},onDragOver:re=>{re.preventDefault(),re.dataTransfer.dropEffect="move",T(L)},onDrop:re=>{re.preventDefault(),re.stopPropagation();const ue=re.dataTransfer.getData("text/plain")||S;z(ue,L)},onDragEnd:()=>{E(null),T(null)},className:Pe("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",I&&"opacity-60"),"data-testid":"slide-card",children:[k?v.jsx(u0,{}):null,v.jsx("div",{className:Pe("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",J?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:L+1}),v.jsxs("button",{ref:J?_:null,className:Pe("relative flex-1 overflow-hidden rounded-lg text-left ring-1 ring-inset transition-all focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",J?"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",H&&"opacity-40"),onClick:()=>c(N.id),type:"button","aria-label":`Slide ${L+1}`,"aria-current":J?"true":void 0,children:[v.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[N.id]?v.jsx("img",{alt:`Slide ${L+1}`,className:"absolute inset-0 block size-full object-cover",src:i[N.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",L+1]}),H?v.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:v.jsx(Ey,{className:"size-2.5"})}):null]}),N.title?v.jsx("div",{className:"truncate border-t border-foreground/[0.04] bg-white px-2 py-1 text-[11px] text-foreground/60",children:N.title}):null]}),te?v.jsx(u0,{position:"after"}):null]})}),v.jsxs(Gx,{"aria-label":"Slide actions",className:"min-w-36",children:[v.jsxs(vt,{onSelect:()=>d==null?void 0:d(N.id),children:[v.jsx(zf,{className:"size-3.5"}),"Add Slide Above"]}),v.jsxs(vt,{onSelect:()=>m==null?void 0:m(N.id),children:[v.jsx(zf,{className:"size-3.5"}),"Add Slide Below"]}),v.jsx(Ks,{}),v.jsxs(vt,{onSelect:()=>p==null?void 0:p(N.id),children:[v.jsx(sv,{className:"size-3.5"}),"Duplicate"]}),v.jsxs(vt,{onSelect:()=>b==null?void 0:b(N.id),children:[H?v.jsx(cv,{className:"size-3.5"}):v.jsx(Ey,{className:"size-3.5"}),H?"Show":"Hide"]}),v.jsx(Ks,{}),v.jsxs(vt,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(N.id),children:[v.jsx(mv,{className:"size-3.5"}),"Delete"]})]})]},N.id)})})]})})}function u0({position:n="before"}){return v.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:[v.jsx("span",{className:"size-2 rounded-full bg-foreground/55"}),v.jsx("span",{className:"h-0.5 flex-1 rounded-full bg-foreground/55"})]})}const LR=18,HR=6,Ts=24,Cs="#ef4444",Fs=40,f0=12,d0=360;function Oo(n,l,r,i,c){return Math.max(n,r)-Math.min(l,i)<=c}function BR({selectionBounds:n,snapGuides:l,resizeHandles:r,rotationHandle:i,onResizeHandleMouseDown:c,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 v.jsxs(v.Fragment,{children:[l.map((m,p)=>{const g=m.variant==="spacing"?"2px":"1px",b=14,h=m.variant==="spacing"?2:1,S=m.orientation==="vertical",E=S?{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:Cs,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:Cs,opacity:m.variant==="spacing"?.9:.82},C=S?{width:`${b}px`,height:`${h}px`,left:`${-b/2}px`,backgroundColor:Cs}:{width:`${h}px`,height:`${b}px`,top:`${-b/2}px`,backgroundColor:Cs};return v.jsx("div",{className:"pointer-events-none absolute z-[4]","data-testid":`snap-guide-${m.orientation}`,"data-variant":m.variant,style:E,children:m.variant==="spacing"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,top:"0"}:{...C,left:"0"}}),v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,bottom:"0"}:{...C,right:"0"}})]}):null},`${m.orientation}-${m.start.x}-${m.start.y}-${m.end.x}-${m.end.y}-${m.variant}-${p}`)}),v.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}),r.map(m=>v.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:p=>{c(m.corner,p)}},m.corner))]})}function UR({children:n,selectionCommandAvailability:l,onAlignToSlide:r,onDelete:i,onDistribute:c,onDuplicate:u,onGroup:d,onLayerOrder:m,onUngroup:p}){return v.jsxs(Ux,{children:[v.jsx(Ix,{asChild:!0,children:n}),v.jsxs(Gx,{"aria-label":"Selection actions",children:[v.jsxs(vt,{disabled:!l.group,onSelect:d,children:[v.jsx(sd,{className:"size-3.5"}),"Group"]}),v.jsxs(vt,{disabled:!l.ungroup,onSelect:p,children:[v.jsx(hv,{className:"size-3.5"}),"Ungroup"]}),v.jsx(Ks,{}),v.jsxs($f,{children:[v.jsxs(Pf,{children:[v.jsx(rd,{className:"size-3.5"}),"Layer"]}),v.jsxs(Kf,{children:[v.jsxs(vt,{onSelect:()=>m("front"),children:[v.jsx(rd,{className:"size-3.5"}),"Bring to front"]}),v.jsxs(vt,{onSelect:()=>m("forward"),children:[v.jsx(Hd,{className:"size-3.5"}),"Bring forward"]}),v.jsxs(vt,{onSelect:()=>m("backward"),children:[v.jsx(Pr,{className:"size-3.5"}),"Send backward"]}),v.jsxs(vt,{onSelect:()=>m("back"),children:[v.jsx(rv,{className:"size-3.5"}),"Send to back"]})]})]}),v.jsxs($f,{children:[v.jsxs(Pf,{children:[v.jsx(od,{className:"size-3.5"}),"Align"]}),v.jsxs(Kf,{children:[v.jsxs(vt,{onSelect:()=>r("left"),children:[v.jsx(lv,{className:"size-3.5"}),"Align left"]}),v.jsxs(vt,{onSelect:()=>r("hcenter"),children:[v.jsx(od,{className:"size-3.5"}),"Align horizontal center"]}),v.jsxs(vt,{onSelect:()=>r("right"),children:[v.jsx(nv,{className:"size-3.5"}),"Align right"]}),v.jsxs(vt,{onSelect:()=>r("top"),children:[v.jsx(ov,{className:"size-3.5"}),"Align top"]}),v.jsxs(vt,{onSelect:()=>r("vcenter"),children:[v.jsx(tv,{className:"size-3.5"}),"Align vertical center"]}),v.jsxs(vt,{onSelect:()=>r("bottom"),children:[v.jsx(av,{className:"size-3.5"}),"Align bottom"]})]})]}),v.jsxs($f,{children:[v.jsxs(Pf,{children:[v.jsx(id,{className:"size-3.5"}),"Distribute"]}),v.jsxs(Kf,{children:[v.jsxs(vt,{onSelect:()=>c("horizontal"),children:[v.jsx(id,{className:"size-3.5"}),"Horizontally"]}),v.jsxs(vt,{onSelect:()=>c("vertical"),children:[v.jsx(dv,{className:"size-3.5"}),"Vertically"]})]})]}),v.jsx(Ks,{}),v.jsxs(vt,{onSelect:u,children:[v.jsx(sv,{className:"size-3.5"}),"Duplicate",v.jsx(c0,{children:"⌘D"})]}),v.jsxs(vt,{variant:"destructive",onSelect:i,children:[v.jsx(mv,{className:"size-3.5"}),"Delete",v.jsx(c0,{children:"Del"})]})]})]})}const IR=[{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 GR(n,l){const r=h0(n),i=h0(l);return!r||!i?!1:r===i||p0(m0(n))===p0(m0(l))}function YR(n){const l=n.trim().toLowerCase();if(l==="bold"||l==="bolder")return!0;const r=Number.parseInt(l,10);return Number.isFinite(r)&&r>=600}function Ed(n){const l=new Set,r=n.toLowerCase();if(!r||r==="none")return l;for(const i of r.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&l.add(i);return l}function VR(n){return qR(n)?n.trim():XR(n)??"#000000"}function qR(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function m0(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function h0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function p0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Ff(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function XR(n){const l=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return l?`#${Ff(l[1]||"0")}${Ff(l[2]||"0")}${Ff(l[3]||"0")}`:null}function Td({feature:n,inspectedStyles:l,attributeValues:r}){var c,u;if(n.target==="attribute")return n.attributeName==="data-editor-locked"?r.locked:n.attributeName==="alt"?r.altText:n.attributeName==="aria-label"?r.ariaLabel:n.attributeName==="data-link-url"?r.linkUrl:"";if(!n.propertyName)return"";const i=PR(l,n.propertyName);return n.id==="font-family"?((u=(c=n.options)==null?void 0:c.find(d=>GR(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(Un(i).rotate):n.controlType==="color"?VR(i):n.id==="text-align"&&i==="start"?"left":i}function g0(n,l){return n.id==="font-size"&&l.trim()?`${Math.min(200,Math.max(8,Number.parseFloat(l)||8))}px`:n.id==="font-bold"?l?"700":"400":n.id==="font-italic"?l?"italic":"normal":n.id==="font-underline"?l?"underline":"none":n.id==="font-strikethrough"?l?"line-through":"none":n.id==="locked"?l?"true":"":l.trim()}function y0(n,l,r){const i=Ed(n);return r?i.delete(l):i.add(l),i.size?Array.from(i).join(" "):"none"}function Yx(n,l){return n.id==="font-bold"?YR(l):n.id==="font-italic"?l.trim().toLowerCase()==="italic":n.id==="font-underline"?Ed(l).has("underline"):n.id==="font-strikethrough"?Ed(l).has("line-through"):n.id==="locked"?l==="true":!!l}function $R(n,l){const r=n.options??[{label:"unset",value:""}];return!l||r.some(i=>i.value===l)?r:[{label:l,value:l},...r]}function PR(n,l){var r;return((r=n.find(i=>i.name===l))==null?void 0:r.value)??""}function KR({attributeValues:n,feature:l,inspectedStyles:r,nextValue:i,onAlignToSlide:c,onAttributeChange:u,onLayerOrder:d,onStyleChange:m}){if(l.target==="style"&&l.propertyName){const p=Td({feature:l,inspectedStyles:r,attributeValues:n});if(l.id==="rotation"){const g=FR(r),b=Un(g),h=Number.parseFloat(i);m(l.propertyName,Sa(b.translateX,b.translateY,Number.isFinite(h)?h:0)??"");return}if(l.id==="font-underline"){m(l.propertyName,y0(p,"underline",i===""));return}if(l.id==="font-strikethrough"){m(l.propertyName,y0(p,"line-through",i===""));return}m(l.propertyName,g0(l,i));return}if(l.target==="attribute"&&l.attributeName){u(l.attributeName,g0(l,i));return}l.id==="align-to-slide"&&c(i),l.id==="layer-order"&&d(i)}function FR(n){var l;return((l=n.find(r=>r.name==="transform"))==null?void 0:l.value)??""}const QR=[{value:"left",label:"Left",icon:EE},{value:"center",label:"Center",icon:bE},{value:"right",label:"Right",icon:SE}],ZR=[{value:"left",icon:lv,label:"Align left"},{value:"hcenter",icon:od,label:"Align horizontal center"},{value:"right",icon:nv,label:"Align right"},{value:"top",icon:ov,label:"Align top"},{value:"vcenter",icon:tv,label:"Align vertical center"},{value:"bottom",icon:av,label:"Align bottom"}],JR=[{value:"front",icon:rd,label:"Bring to front"},{value:"forward",icon:Hd,label:"Bring forward"},{value:"backward",icon:Pr,label:"Send backward"},{value:"back",icon:rv,label:"Send to back"}],WR=[{value:"horizontal",icon:id,label:"Distribute horizontally"},{value:"vertical",icon:dv,label:"Distribute vertically"}],v0=[{id:"typography",label:"Typography",icon:Ay,subgroups:[{id:"font",label:"Font",icon:Ay,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:IR.map(n=>({label:n.label,value:n.value}))},{id:"font-size",label:"Font size",controlType:"slider",target:"style",propertyName:"font-size",min:8,max:200,step:1,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:sE,features:[{id:"line-height",label:"Line height",controlType:"slider",target:"style",propertyName:"line-height",min:.8,max:3,step:.05},{id:"text-align",label:"Text align",controlType:"action-group",target:"style",propertyName:"text-align",options:QR}]}]},{id:"appearance",label:"Appearance",icon:Cy,subgroups:[{id:"fill",label:"Fill",icon:Cy,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:z2,features:[{id:"border",label:"Border",controlType:"text",target:"style",propertyName:"border",placeholder:"1px solid #d1c1ae"},{id:"border-radius",label:"Border radius",controlType:"text",target:"style",propertyName:"border-radius",placeholder:"16px"},{id:"box-shadow",label:"Shadow",controlType:"text",target:"style",propertyName:"box-shadow",placeholder:"0 12px 30px rgba(...)"}]}]},{id:"layout",label:"Layout",icon:My,subgroups:[{id:"size",label:"Size",icon:My,features:[{id:"width",label:"Width",controlType:"text",target:"style",propertyName:"width",placeholder:"320px or auto"},{id:"height",label:"Height",controlType:"text",target:"style",propertyName:"height",placeholder:"240px or auto"}]},{id:"visibility",label:"Visibility",icon:cv,features:[{id:"opacity",label:"Opacity",controlType:"slider",target:"style",propertyName:"opacity",min:0,max:1,step:.01}]},{id:"rotation",label:"Rotation",icon:pE,features:[{id:"rotation",label:"Rotation",controlType:"number",target:"style",propertyName:"transform",min:-360,max:360,step:1,unit:"deg"}]},{id:"layer-alignment",label:"Layer, Align, Distribute",icon:fv,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:ZR},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:JR},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:WR}]},{id:"grouping",label:"Group",icon:sd,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:sd,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:hv,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:Ty,subgroups:[{id:"state",label:"State",icon:Ty,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:lE,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:Df,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:Df,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:Df,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]},{id:"css",label:"CSS",icon:tE,features:[{id:"custom-css",label:"Custom CSS property",controlType:"custom-css",target:"style"}]}]}],eN=200,Vx="motion-safe:duration-200 motion-safe:ease-out",qx="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",tN="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none";function Xr({className:n,type:l,...r}){return v.jsx("input",{type:l,"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),...r})}const nN=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],aN=["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 lN({value:n,includeGradients:l=!0,onChange:r}){const i=x.useRef(null),c=x.useRef(null),u=x.useMemo(()=>oN(n),[n]),d=Qf(u),[m,p]=x.useState(d.replace("#","")),g=`hsl(${u.h}, 100%, 50%)`;x.useEffect(()=>{p(d.replace("#",""))},[d]);function b(S){var A;const E=(A=i.current)==null?void 0:A.getBoundingClientRect();if(!E)return;S.currentTarget.setPointerCapture(S.pointerId);const C=zs((S.clientX-E.left)/E.width,0,1),T=zs(1-(S.clientY-E.top)/E.height,0,1);r(Qf({...u,s:C,v:T}))}function h(S){var T;const E=(T=c.current)==null?void 0:T.getBoundingClientRect();if(!E)return;S.currentTarget.setPointerCapture(S.pointerId);const C=Math.round(zs((S.clientX-E.left)/E.width,0,1)*360);r(Qf({...u,h:C===360?0:C}))}return v.jsxs("div",{className:"grid gap-3",children:[v.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:i,role:"slider","aria-label":"Color saturation and brightness","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(u.v*100),"aria-valuetext":d,tabIndex:0,style:{backgroundColor:g},onPointerDown:b,onPointerMove:S=>{S.buttons===1&&b(S)},children:v.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:d,left:`calc(${u.s*100}% + ${(.5-u.s)*22}px)`,top:`calc(${(1-u.v)*100}% + ${(u.v-.5)*22}px)`}})}),v.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:c,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":u.h,tabIndex:0,onPointerDown:h,onPointerMove:S=>{S.buttons===1&&h(S)},children:v.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:g,left:`${u.h/360*100}%`}})}),v.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[v.jsx("span",{className:"size-10 rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)]",style:{background:d},"aria-hidden":"true"}),v.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),v.jsx(Xr,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:m,spellCheck:!1,onChange:S=>{const E=S.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);p(E),E.length===6&&r(`#${E}`)},onBlur:()=>{p(d.replace("#",""))}})]}),v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),v.jsx("div",{className:"grid grid-cols-12 gap-1",children:nN.map(S=>v.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",S.toLowerCase()===n.toLowerCase()&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:S},"aria-label":`Use ${S}`,onClick:()=>{r(S)}},S))})]}),l?v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset gradients",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),v.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:aN.map(S=>v.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",S===n&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:S},"aria-label":"Use gradient",onClick:()=>{r(S)}},S))})]}):null]})}function zs(n,l,r){return Math.min(Math.max(n,l),r)}function oN(n){const l={h:220,s:.54,v:.5},r=/^#?([0-9a-f]{6})$/i.exec(n.trim());if(!r)return l;const i=r[1],c=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(c,u,d),p=Math.min(c,u,d),g=m-p;let b=0;g!==0&&(m===c?b=(u-d)/g%6:m===u?b=(d-c)/g+2:b=(c-u)/g+4);const h=Math.round(b*60);return{h:h<0?h+360:h,s:m===0?0:g/m,v:m}}function Qf({h:n,s:l,v:r}){const i=r*l,c=i*(1-Math.abs(n/60%2-1)),u=r-i;let d=0,m=0,p=0;return n<60?(d=i,m=c):n<120?(d=c,m=i):n<180?(m=i,p=c):n<240?(m=c,p=i):n<300?(d=c,p=i):(d=i,p=c),`#${Zf(d+u)}${Zf(m+u)}${Zf(p+u)}`.toUpperCase()}function Zf(n){return Math.round(zs(n,0,1)*255).toString(16).padStart(2,"0")}const b0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,x0=gv,rN=(n,l)=>r=>{var i;if((l==null?void 0:l.variants)==null)return x0(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:c,defaultVariants:u}=l,d=Object.keys(c).map(g=>{const b=r==null?void 0:r[g],h=u==null?void 0:u[g];if(b===null)return null;const S=b0(b)||b0(h);return c[g][S]}),m=r&&Object.entries(r).reduce((g,b)=>{let[h,S]=b;return S===void 0||(g[h]=S),g},{}),p=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((g,b)=>{let{class:h,className:S,...E}=b;return Object.entries(E).every(C=>{let[T,A]=C;return Array.isArray(A)?A.includes({...u,...m}[T]):{...u,...m}[T]===A})?[...g,h,S]:g},[]);return x0(n,d,p,r==null?void 0:r.class,r==null?void 0:r.className)},iN=rN("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 Wr({className:n,variant:l="default",size:r="default",asChild:i=!1,...c}){const u=i?ST:"button";return v.jsx(u,{"data-slot":"button","data-variant":l,"data-size":r,className:Pe(iN({variant:l,size:r,className:n})),...c})}function sN({className:n,orientation:l="horizontal",decorative:r=!0,...i}){return v.jsx(gR,{"data-slot":"separator",decorative:r,orientation:l,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 cN({children:n,active:l=!1,label:r,onClick:i}){return v.jsx(Wr,{variant:l?"secondary":"ghost",size:"icon-sm",className:Pe("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":r,title:r,onClick:i,children:n})}function uN({children:n,active:l=!1,label:r,onClick:i}){return v.jsx(Wr,{variant:l?"secondary":"ghost",size:"icon-sm",className:Pe("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":r,title:r,onClick:i,children:n})}function fN({children:n,left:l,width:r="default"}){const i=x.useRef(null),[c,u]=x.useState({x:0,y:0});x.useLayoutEffect(()=>{const m=i.current;if(!m)return;const p=m.getBoundingClientRect(),g=m.closest('[data-testid="floating-toolbar-anchor"]'),b=g instanceof HTMLElement?g.getBoundingClientRect():null,h=b?b.left+l:p.left-c.x,S=b?b.bottom+8:p.top-c.y,E={bottom:S+p.height,left:h,right:h+p.width,top:S},C=16;let T=0,A=0;E.right>window.innerWidth-C&&(T=window.innerWidth-C-E.right),E.left+T<C&&(T+=C-(E.left+T)),E.bottom>window.innerHeight-C&&(A=window.innerHeight-C-E.bottom),E.top+A<C&&(A+=C-(E.top+A)),(Cd(c.x,T)||Cd(c.y,A))&&u({x:T,y:A})},[l,c.x,c.y]);const d=r==="wide"?"w-80 max-w-[min(320px,calc(100vw-40px))] max-h-[calc(100vh-36px)] overflow-y-auto":r==="medium"?"w-[272px]":"w-64";return v.jsx("div",{className:Pe("absolute z-50 grid gap-1.5 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)] max-[1200px]:max-w-[calc(100vw-40px)]",Vx,qx,d),ref:i,style:{left:l+c.x,top:`calc(100% + 8px + ${c.y}px)`},role:"menu",children:n})}function dN(n){return n.features.some(l=>l.controlType==="color")?"wide":n.features.some(l=>l.controlType==="action-group")?"medium":"default"}function Cd(n,l){return Math.abs(n-l)>=.5}function mN(){return v.jsx(sN,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function hN({children:n}){return v.jsx("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:n})}function Ol({children:n,htmlFor:l}){return v.jsx("label",{htmlFor:l,className:"text-[10px] font-medium uppercase tracking-wider text-foreground/50",children:n})}function Md({icon:n}){return v.jsx(n,{className:"size-3.5"})}function pN({children:n,disabled:l=!1,onClick:r,title:i}){return v.jsx(Wr,{variant:"ghost",className:"min-h-8 w-full justify-start gap-2 rounded-md px-2 py-1.5 text-left text-[13px] font-normal text-foreground/70 hover:text-foreground",type:"button",disabled:l,title:i,onClick:r,children:n})}function gN({...n}){return v.jsx(eR,{"data-slot":"select",...n})}function yN({...n}){return v.jsx(iR,{"data-slot":"select-group",...n})}function vN({...n}){return v.jsx(nR,{"data-slot":"select-value",...n})}function bN({className:n,size:l="default",children:r,...i}){return v.jsxs(tR,{"data-slot":"select-trigger","data-size":l,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:[r,v.jsx(aR,{asChild:!0,children:v.jsx(Pr,{className:"size-4 opacity-50"})})]})}function xN({className:n,children:l,position:r="item-aligned",align:i="center",...c}){return v.jsx(lR,{children:v.jsxs(oR,{"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",r==="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:r,align:i,...c,children:[v.jsx(wN,{}),v.jsx(rR,{className:Pe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:l}),v.jsx(EN,{})]})})}function SN({className:n,children:l,...r}){return v.jsxs(sR,{"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),...r,children:[v.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsx(uR,{children:v.jsx(iv,{className:"size-4"})})}),v.jsx(cR,{children:l})]})}function wN({className:n,...l}){return v.jsx(fR,{"data-slot":"select-scroll-up-button",className:Pe("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Hd,{className:"size-4"})})}function EN({className:n,...l}){return v.jsx(dR,{"data-slot":"select-scroll-down-button",className:Pe("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Pr,{className:"size-4"})})}const Ms="__empty__";function TN({currentValue:n,feature:l,onClosePanel:r,onCommitFeature:i,operationAvailability:c,onStyleChange:u}){const d=`floating-${l.id}`;if(l.controlType==="select")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ol,{htmlFor:d,children:l.label}),v.jsxs(gN,{value:n||Ms,onValueChange:m=>i(l,m===Ms?"":m),children:[v.jsx(bN,{id:d,"aria-label":l.label,size:"sm",className:"h-8 rounded-md border-transparent bg-foreground/[0.03] px-2 text-xs shadow-none hover:bg-foreground/[0.06]","data-value":n,children:v.jsx(vN,{})}),v.jsx(xN,{children:v.jsx(yN,{children:$R(l,n).map(m=>v.jsx(SN,{value:m.value||Ms,"data-value":m.value,style:l.id==="font-family"&&m.value?{fontFamily:m.value}:void 0,children:m.label},m.value||Ms))})})]})]},l.id);if(l.controlType==="color")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ol,{children:l.label}),v.jsx(lN,{value:n,includeGradients:l.id==="background-color",onChange:m=>i(l,m)})]},l.id);if(l.controlType==="toggle"){const m=Yx(l,n);return v.jsx(Wr,{type:"button",variant:m?"secondary":"outline","aria-pressed":m,onClick:()=>i(l,m?"":"true"),children:l.label},l.id)}return l.controlType==="slider"||l.controlType==="number"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ol,{htmlFor:d,children:l.label}),v.jsx(Xr,{id:d,type:"number",min:l.min,max:l.max,step:l.step,value:n,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px] tabular-nums"})]},l.id):l.controlType==="action-group"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ol,{children:l.label}),v.jsx("div",{className:"grid gap-1",children:(l.options??[]).map(m=>{const p=m.icon,g=l.target==="operation"&&c?c[l.id]===!1:!1;return v.jsxs(pN,{disabled:g,title:m.label,onClick:()=>{g||(i(l,m.value),r())},children:[p?v.jsx(Md,{icon:p}):null,v.jsx("span",{children:m.label})]},m.value)})})]},l.id):l.controlType==="custom-css"?v.jsx(CN,{onCommit:u},l.id):v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ol,{htmlFor:d,children:l.label}),v.jsx(Xr,{id:d,type:"text",value:n,placeholder:l.placeholder,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px]"})]},l.id)}function CN({onCommit:n}){const l=x.useId(),r=x.useId(),[i,c]=x.useState(""),[u,d]=x.useState("");function m(){const p=i.trim();p&&(n(p,u.trim()),d(""))}return v.jsxs("div",{className:"grid gap-2",children:[v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ol,{htmlFor:l,children:"Property name"}),v.jsx(Xr,{id:l,type:"text",value:i,placeholder:"e.g. justify-content",onChange:p=>c(p.target.value)})]}),v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ol,{htmlFor:r,children:"Property value"}),v.jsx(Xr,{id:r,type:"text",value:u,placeholder:"e.g. space-between",onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),m())}})]}),v.jsx(Wr,{type:"button",variant:"outline",disabled:!i.trim(),onClick:m,children:"Apply property"})]})}function MN({inspectedStyles:n,selectedElementType:l,selectionCommandAvailability:r,attributeValues:i,onStyleChange:c,onAttributeChange:u,onAlignToSlide:d,onDistribute:m,onGroup:p,onLayerOrder:g,onUngroup:b}){const h=x.useRef(null),[S,E]=x.useState(null),[C,T]=x.useState(0),[A,_]=x.useState(0),z=x.useRef(0);x.useEffect(()=>{if(h.current)return()=>{const te=h.current,re=te==null?void 0:te.closest('[data-testid="stage-panel"]');if(!(te instanceof HTMLElement)||!(re instanceof HTMLElement))return;const ue=te.getBoundingClientRect(),X=re.getBoundingClientRect(),Q=te.cloneNode(!0);Q instanceof HTMLElement&&(Q.className=Pe(Q.className,"absolute z-40 m-0 pointer-events-none"),Q.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),Q.className=Pe(Q.className,tN),Q.setAttribute("aria-hidden","true"),Q.style.left=`${ue.left-X.left}px`,Q.style.top=`${ue.top-X.top}px`,Q.style.width=`${ue.width}px`,Q.style.height=`${ue.height}px`,re.appendChild(Q),Q.addEventListener("animationend",()=>{Q.remove()}),window.setTimeout(()=>{Q.remove()},eN+50))}},[]),x.useLayoutEffect(()=>{const k=h.current;if(!k)return;const te=k.getBoundingClientRect(),re=te.left-z.current,ue=te.right-z.current,X=16;let Q=0;re<X&&(Q=X-re),ue+Q>window.innerWidth-X&&(Q+=window.innerWidth-X-(ue+Q)),Cd(z.current,Q)&&(z.current=Q,_(Q))},[]),x.useEffect(()=>{function k(te){var re;(re=h.current)!=null&&re.contains(te.target)||E(null)}return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]),x.useEffect(()=>{function k(te){te.key==="Escape"&&E(null)}return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[]);function N(k,te){T(te),E(re=>re===k?null:k)}function L(k,te){if(k.id==="distribute"){m(te);return}if(k.id==="group"){p();return}if(k.id==="ungroup"){b();return}KR({attributeValues:i,feature:k,inspectedStyles:n,nextValue:te,onAlignToSlide:d,onAttributeChange:u,onLayerOrder:g,onStyleChange:c})}const J=AN(l);return v.jsxs("div",{className:Pe("relative grid w-max min-w-max max-w-[min(980px,calc(100vw-280px))] gap-2 text-foreground pointer-events-auto max-[1200px]:w-full max-[1200px]:min-w-0",Vx,qx),ref:h,style:{marginLeft:A},children:[v.jsx("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-[760px]","aria-label":"Formatting toolbar",children:J.map((k,te)=>v.jsxs("div",{className:"contents",children:[te>0?v.jsx(mN,{}):null,v.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:k.subgroups.map(re=>{const ue=re.features.length===1?re.features[0]:null;return(ue==null?void 0:ue.controlType)==="toggle"?H(re,ue):v.jsx(cN,{active:S===re.id,label:re.label,onClick:X=>N(re.id,X.currentTarget.offsetLeft),children:v.jsx(Md,{icon:re.icon})},re.id)})})]},k.id))}),J.flatMap(k=>k.subgroups).map(k=>S===k.id?v.jsxs(fN,{left:C,width:dN(k),children:[v.jsx(hN,{children:k.label}),v.jsx("div",{className:"grid gap-2",children:k.features.map(I)})]},k.id):null)]});function H(k,te){const re=Td({feature:te,inspectedStyles:n,attributeValues:i}),ue=Yx(te,re);return v.jsx(uN,{label:te.label,active:ue,onClick:()=>L(te,ue?"":"true"),children:v.jsx(Md,{icon:k.icon})},k.id)}function I(k){return TN({currentValue:Td({feature:k,inspectedStyles:n,attributeValues:i}),feature:k,onClosePanel:()=>E(null),onCommitFeature:L,operationAvailability:r,onStyleChange:c})}}function AN(n){return n!=="group"?v0:v0.flatMap(l=>l.id!=="layout"?[]:[{...l,subgroups:l.subgroups.filter(r=>["size","rotation","layer-alignment","grouping"].includes(r.id))}])}const S0={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function _N({slideWidth:n,slideHeight:l,offsetX:r,offsetY:i,scale:c,preselectionOverlay:u,selectionOverlay:d,toolbarKey:m,inspectedStyles:p,selectedElementType:g,selectionCommandAvailability:b,groupScopeOverlayPassive:h,isEditingText:S,manipulationOverlay:E,attributeValues:C,iframeRef:T,stageViewportRef:A,selectionOverlayRef:_,isManipulating:z,onSelectionOverlayMouseDown:N,onSelectionOverlayMouseUp:L,onSelectionOverlayMouseMove:J,onStageMouseLeave:H,onResizeHandleMouseDown:I,onRotateHandleMouseDown:k,onSelectionOverlayDoubleClick:te,onBackgroundClick:re,onStyleChange:ue,onAttributeChange:X,onAlignToSlide:Q,onDistribute:K,onGroup:G,onLayerOrder:M,onUngroup:D,onDuplicate:V,onDelete:Y}){const q=(B,Z)=>{B===Z&&re()},R=d?RN({selectionOverlay:d,offsetX:r,scale:c,slideWidth:n}):void 0;return v.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:A,onClick:B=>{q(B.target,B.currentTarget)},onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&q(B.target,B.currentTarget)},onMouseLeave:H,children:[d&&!z&&!S?v.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:R,"data-testid":"floating-toolbar-anchor",children:v.jsx(MN,{inspectedStyles:p,selectedElementType:g,selectionCommandAvailability:b,attributeValues:C,onStyleChange:ue,onAttributeChange:X,onAlignToSlide:Q,onDistribute:K,onGroup:G,onLayerOrder:M,onUngroup:D},m)}):null,S?v.jsx("p",{className:"absolute left-10 top-4 z-40 rounded-md border border-foreground/[0.06] bg-white px-3 py-2 text-[12px] leading-normal text-foreground/65 shadow-sm",children:"Editing text. Press Enter to save or Escape to cancel."}):null,v.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:`${l}px`,left:`${r}px`,top:`${i}px`,transform:`scale(${c})`},children:v.jsx("iframe",{ref:T,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!S&&!z?v.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...S0,left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`}}):null,d&&!S?v.jsx(UR,{selectionCommandAvailability:b,onAlignToSlide:Q,onDelete:Y,onDistribute:K,onDuplicate:V,onGroup:G,onLayerOrder:M,onUngroup:D,children:v.jsx("div",{ref:_,"data-testid":"selection-overlay",className:Pe("absolute z-[3] border border-dashed",h?"pointer-events-none":"pointer-events-auto"),style:{...S0,left:`${d.x}px`,top:`${d.y}px`,width:`${d.width}px`,height:`${d.height}px`},onMouseDown:N,onMouseMove:J,onMouseUp:L,onDoubleClick:B=>{te(B)}})}):null,E?v.jsx(BR,{selectionBounds:E.selectionBounds,snapGuides:E.snapGuides,resizeHandles:E.resizeHandles,rotationHandle:E.rotationHandle,onResizeHandleMouseDown:I,onRotateHandleMouseDown:k}):null]})}function RN({selectionOverlay:n,offsetX:l,scale:r,slideWidth:i}){const u=l,d=l+i*r,m=Math.max((d-u)/2,0),p=Math.min(288,m),g=u+p,b=d-p,h=n.x+n.width/2;return{left:`${Math.min(Math.max(h,g),Math.max(g,b))}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 NN({delayDuration:n=0,...l}){return v.jsx(jR,{"data-slot":"tooltip-provider",delayDuration:n,...l})}function Ad(n,l,r){return a2(n,l,r)}function Ur(n,l,r){var u;if(typeof DOMParser>"u")return"";const c=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${Oe}="${l}"]`);return((u=c==null?void 0:c.getAttribute(r))==null?void 0:u.trim())??""}function ON({elementId:n,nextValue:l,propertyName:r,slide:i}){const c=Ad(i,n,r),u=l.trim();return c===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:r,previousValue:c,nextValue:u,timestamp:Date.now()}}function DN({attributeName:n,elementId:l,nextValue:r,slide:i}){const c=Ur(i,l,n),u=r.trim();return c===u?null:{type:"attribute.update",slideId:i.id,elementId:l,attributeName:n,previousValue:c,nextValue:u,timestamp:Date.now()}}function el(n){return Math.round(n*100)/100}function Xx(n,l){var m;if(typeof DOMParser>"u")return n;const c=(m=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(c instanceof HTMLElement))return n;const u=Un(c.style.transform),d=Sa(0,0,u.rotate);return c.style.position="absolute",c.style.left=`${el(l.x)}px`,c.style.top=`${el(l.y)}px`,c.style.width=`${el(l.width)}px`,c.style.height=`${el(l.height)}px`,c.style.margin="0px",c.style.boxSizing="border-box",d?c.style.transform=d:c.style.removeProperty("transform"),c.style.transformOrigin||(c.style.transformOrigin="center center"),c.outerHTML}function $x(n,l){return{x:n.left-l.left,y:n.top-l.top,width:n.width,height:n.height}}function zN(n,l,r){var d;const i=(d=n.current)==null?void 0:d.contentDocument,c=i==null?void 0:i.querySelector(l.rootSelector),u=c==null?void 0:c.getBoundingClientRect();return{width:(u==null?void 0:u.width)||r.width,height:(u==null?void 0:u.height)||r.height}}function _d(n,l,r){return{x:el(n.x+l),y:el(n.y+r),width:n.width,height:n.height}}function jN(n){return n.length?n.reduce((l,r)=>{const i=Math.min(l.x,r.x),c=Math.min(l.y,r.y),u=Math.max(l.x+l.width,r.x+r.width),d=Math.max(l.y+l.height,r.y+r.height);return{x:i,y:c,width:u-i,height:d-c}}):null}function kN(n,l,r){const i=Math.max(0,r.width-n.width),c=Math.max(0,r.height-n.height),u=Math.min(i,Math.max(0,n.x+l)),d=Math.min(c,Math.max(0,n.y+l));return{x:el(u-n.x),y:el(d-n.y)}}function Px(n,l){const r=[];return l.vertical&&r.push(...w0(n,l.vertical,"vertical")),l.horizontal&&r.push(...w0(n,l.horizontal,"horizontal")),r}function w0(n,l,r){return l.target.kind==="spacing"?HN(n,l,r):[LN(n,l,r)]}function LN(n,l,r){const i=l.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,r==="vertical"){const m=E0(n,l.anchor,"vertical");if(i.kind==="slide")return{orientation:r,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 p=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:r,start:{x:m,y:p-Ts},end:{x:m,y:g+Ts},variant:"alignment"}}const c=E0(n,l.anchor,"horizontal");if(i.kind==="slide")return{orientation:r,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:r,start:{x:u-Ts,y:c},end:{x:d+Ts,y:c},variant:"alignment"}}function HN(n,l,r){const i=l.target.relatedRects;if(i.length<2)return[];const[c,u]=i;if(!c||!u)return[];if(r==="vertical"){const E=c.x<=u.x?c:u,C=E===c?u:c,T=E.x+E.width,A=C.x,_=l.anchor==="start"?n.x:n.x+n.width,z={orientation:"horizontal",start:{x:T,y:E.y+E.height/2},end:{x:A,y:C.y+C.height/2},variant:"spacing"},N={orientation:"horizontal",start:l.anchor==="start"?{x:C.x+C.width,y:C.y+C.height/2}:{x:E.x,y:E.y+E.height/2},end:{x:_,y:n.y+n.height/2},variant:"spacing"};return[z,N]}const d=c.y<=u.y?c:u,m=d===c?u:c,p=d.y+d.height,g=m.y,b=l.anchor==="start"?n.y:n.y+n.height,h={orientation:"vertical",start:{x:d.x+d.width/2,y:p},end:{x:m.x+m.width/2,y:g},variant:"spacing"},S={orientation:"vertical",start:l.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:b},variant:"spacing"};return[h,S]}function E0(n,l,r){return r==="vertical"?l==="start"?n.x:l==="end"?n.x+n.width:n.x+n.width/2:l==="start"?n.y:l==="end"?n.y+n.height:n.y+n.height/2}function BN({activeSlide:n,doc:l,rootRect:r,selectedElementId:i,slideStageRect:c,stageGeometry:u}){var S;const d=(E,C)=>({position:E,rect:c,kind:"slide",role:C,anchor:null,priority:C==="center"?0:2,elementId:null,relatedRects:[]}),m=[d(c.x,"start"),d(c.x+c.width/2,"center"),d(c.x+c.width,"end")],p=[d(c.y,"start"),d(c.y+c.height/2,"center"),d(c.y+c.height,"end")],g=l.querySelector(`[data-editor-id="${i}"]`),b=[];for(const E of n.elements){if(E.id===i)continue;const C=l.querySelector(`[data-editor-id="${E.id}"]`);if(!C||g&&(g.contains(C)||C.contains(g)))continue;const T=(S=l.defaultView)==null?void 0:S.getComputedStyle(C);if((T==null?void 0:T.display)==="none"||(T==null?void 0:T.visibility)==="hidden")continue;const A=C.getBoundingClientRect();if(A.width<=0||A.height<=0)continue;const _=Do(A,r,u);(E.type==="block"||E.type==="image")&&b.push({elementId:E.id,rect:_});const z=_.x,N=_.x+_.width/2,L=_.x+_.width,J=_.y,H=_.y+_.height/2,I=_.y+_.height,k=(te,re)=>({position:te,rect:_,kind:"element",role:re,anchor:null,priority:re==="center"?3:4,elementId:E.id,relatedRects:[]});m.push(k(z,"start"),k(N,"center"),k(L,"end")),p.push(k(J,"start"),k(H,"center"),k(I,"end"))}const h=UN(b);return m.push(...h.vertical),p.push(...h.horizontal),{vertical:m,horizontal:p}}function UN(n){const l=[],r=[],i=n.slice().sort((u,d)=>u.rect.x-d.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),c=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(!Oo(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>=f0&&g<=d0&&Oo(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,Fs)&&l.push(As({position:m.rect.x+m.rect.width+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),As({position:d.rect.x-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}for(let u=0;u<c.length-1;u+=1){const d=c[u],m=c[u+1];if(!d||!m)continue;if(!Oo(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>=f0&&g<=d0&&Oo(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,Fs)&&r.push(As({position:m.rect.y+m.rect.height+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),As({position:d.rect.y-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}return{vertical:l,horizontal:r}}function As({position:n,rect:l,anchor:r,relatedRects:i}){return{position:n,rect:l,kind:"spacing",role:"end",anchor:r,priority:1,elementId:null,relatedRects:i}}function IN(n,l){const r=Qs([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],l.vertical,n,"vertical"),i=Qs([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],l.horizontal,n,"horizontal"),c={...n,x:n.x+((r==null?void 0:r.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:c,guides:Px(c,{vertical:r,horizontal:i})}}function GN(n,l,r){const i={...n},c=l==="top-left"||l==="bottom-left"?"start":"end",u=l==="top-left"||l==="top-right"?"start":"end",d=Qs([{anchor:c,position:c==="start"?n.x:n.x+n.width}],r.vertical,n,"vertical"),m=Qs([{anchor:u,position:u==="start"?n.y:n.y+n.height}],r.horizontal,n,"horizontal");if(d)if(c==="start"){const p=i.width-d.delta;p>=48&&(i.x+=d.delta,i.width=p)}else{const p=i.width+d.delta;p>=48&&(i.width=p)}if(m)if(u==="start"){const p=i.height-m.delta;p>=48&&(i.y+=m.delta,i.height=p)}else{const p=i.height+m.delta;p>=48&&(i.height=p)}return{rect:i,guides:Px(i,{vertical:m,horizontal:d})}}function Qs(n,l,r,i){const c=PN(l);let u=null;for(const d of n)for(const m of c){if(!XN(r,m,i)||m.anchor&&m.anchor!==d.anchor)continue;const p=m.position-d.position;if(Math.abs(p)>LR)continue;const b=T0({anchor:d.anchor,delta:p,target:m},r,i),h=u?T0(u,r,i):Number.POSITIVE_INFINITY;b>=h||(u={anchor:d.anchor,delta:p,target:m})}return u}function T0(n,l,r){const i=Math.abs(n.delta),c=n.target.kind==="spacing"?Math.max(0,i-HR):i,u=YN(n.target);return c*1e3+u+n.target.priority+VN(n.anchor,n.target)+qN(l,n.target,r)/100}function YN(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function VN(n,l){return l.kind==="slide"&&l.role==="center"&&n!=="center"?25:0}function qN(n,l,r){return l.kind==="slide"?0:r==="vertical"?C0(n.y,n.y+n.height,l.rect.y,l.rect.y+l.rect.height):C0(n.x,n.x+n.width,l.rect.x,l.rect.x+l.rect.width)}function C0(n,l,r,i){return l<r?r-l:i<n?n-i:0}function XN(n,l,r){return l.kind==="slide"?!0:l.kind==="spacing"?$N(n,l,r):!0}function $N(n,l,r){if(l.relatedRects.length<2)return!1;if(r==="vertical"){const u=Math.min(...l.relatedRects.map(m=>m.y)),d=Math.max(...l.relatedRects.map(m=>m.y+m.height));return Oo(n.y,n.y+n.height,u,d,Fs)}const i=Math.min(...l.relatedRects.map(u=>u.x)),c=Math.max(...l.relatedRects.map(u=>u.x+u.width));return Oo(n.x,n.x+n.width,i,c,Fs)}function PN(n){const l=new Set;return n.filter(r=>{const i=`${r.kind}:${r.elementId??"slide"}:${r.position.toFixed(2)}`;return l.has(i)?!1:(l.add(i),!0)})}function _s(n){return`${Math.round(n*100)/100}px`}function Ja(n,l){return Math.max(n,48*l)}function Rd(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function KN(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function FN(n){const[l,...r]=n;return l?r.reduce((i,c)=>{const u=Math.min(i.x,c.x),d=Math.min(i.y,c.y),m=Math.max(i.x+i.width,c.x+c.width),p=Math.max(i.y+i.height,c.y+c.height);return{x:u,y:d,width:m-u,height:p-d}},l):{x:0,y:0,width:0,height:0}}function M0(n,l,r,i){return Math.atan2(l-i,n-r)*180/Math.PI}function QN({resizeCorner:n,scale:l,stageDeltaX:r,stageDeltaY:i,startStageRect:c}){let u=c.x,d=c.y,m=c.width,p=c.height;switch(n){case"top-left":{m=Ja(c.width-r,l),p=Ja(c.height-i,l),u=c.x+(c.width-m),d=c.y+(c.height-p);break}case"top-right":{m=Ja(c.width+r,l),p=Ja(c.height-i,l),d=c.y+(c.height-p);break}case"bottom-left":{m=Ja(c.width-r,l),p=Ja(c.height+i,l),u=c.x+(c.width-m);break}default:{m=Ja(c.width+r,l),p=Ja(c.height+i,l);break}}return{x:u,y:d,width:m,height:p}}function js(n,l){for(const r of Ld)n.style[r]=l[r]??""}function ZN(n){return n.elementIds.map(l=>{const r=n.targetNodes[l],i=n.previousStyles[l];if(!r||!i)return null;const c=Gr(r);return JSON.stringify(c)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:l,previousStyle:i,nextStyle:c,timestamp:Date.now()}}).filter(l=>!!l)}function JN(n,l){return l.length===1?l[0]:{type:"operation.batch",slideId:n.slideId,operations:l,timestamp:Date.now()}}function WN({isEditingText:n,isManipulating:l,selectedElement:r,selectedElementId:i,snapGuides:c,stageRect:u}){return!u||!i||!KN(r)||n?null:{selectionBounds:u,snapGuides:l?c:[],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 eO({activeSlide:n,selectedElement:l,selectedElementId:r,selectedElementIds:i,selectedStageRect:c,iframeRef:u,stageGeometry:d,isEditingText:m,onCommitOperation:p}){const{offsetX:g,offsetY:b,scale:h,slideHeight:S,slideWidth:E}=d,C=x.useRef(null),T=x.useRef(null),[A,_]=x.useState(!1),[z,N]=x.useState(!1),[L,J]=x.useState(null),[H,I]=x.useState([]),te=WN({isEditingText:m,isManipulating:A,selectedElement:l,selectedElementId:r,snapGuides:H,stageRect:L??c});x.useEffect(()=>()=>{C.current=null,T.current&&window.clearTimeout(T.current)},[]),x.useEffect(()=>{(!n||!r||!Rd(l)||m)&&(C.current=null,_(!1),J(null))},[n,m,l,r]),x.useEffect(()=>{A||(J(null),I([]))},[A]);const re=x.useCallback(()=>{N(!0),T.current&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{N(!1),T.current=null},0)},[]),ue=x.useCallback((X,Q,K=null)=>{var At;if(!n||!r||!c||!Rd(l)||m)return;const G=(At=u.current)==null?void 0:At.contentDocument;if(!G)return;const M=G.querySelector(n.rootSelector),D=Qe(G,r);if(!M||!D)return;const V=tO({activeSlide:n,doc:G,mode:X,selectedElementId:r,selectedElementIds:i}),Y=Object.fromEntries(V.map(Re=>[Re,Qe(G,Re)]).filter(Re=>!!Re[1]));if(!Object.keys(Y).length)return;const q=Object.fromEntries(Object.entries(Y).map(([Re,ye])=>[Re,Gr(ye)])),R=Object.fromEntries(Object.entries(Y).map(([Re,ye])=>[Re,nO(ye,Y)])),B=u.current,Z=(B==null?void 0:B.style.pointerEvents)||"";Q.preventDefault(),Q.stopPropagation();const ne=D.getBoundingClientRect(),W=M.getBoundingClientRect(),ce={x:g,y:b,width:E*h,height:S*h},se={scale:h,offsetX:g,offsetY:b},ge=BN({activeSlide:n,doc:G,rootRect:W,selectedElementId:r,slideStageRect:ce,stageGeometry:se}),pe=Object.values(Y).map(Re=>Do(Re.getBoundingClientRect(),W,se)),Ae=Object.fromEntries(Object.entries(Y).map(([Re,ye])=>[Re,Do(ye.getBoundingClientRect(),W,se)])),Ne=Object.fromEntries(Object.values(Y).map(Re=>Re.parentElement).filter(Re=>!!Re).map(Re=>[Kx(Re),Do(Re.getBoundingClientRect(),W,se)])),Ce=pe.length?FN(pe):c;C.current={slideId:n.id,elementId:r,elementIds:Object.keys(Y),mode:X,resizeCorner:K,startPointer:{x:Q.clientX,y:Q.clientY},startStageRect:Ce,centerPoint:{x:ne.left+ne.width/2,y:ne.top+ne.height/2},previousStyle:q[r],previousStyles:q,startElementStageRects:Ae,resizeParentElementIds:R,startParentStageRects:Ne,targetNodes:Y,snapTargets:ge},_(!0),I([]),B&&(B.style.pointerEvents="none");const at=Re=>{const ye=C.current;if(!ye)return;Re.preventDefault();const ln=Re.clientX-ye.startPointer.x,Pt=Re.clientY-ye.startPointer.y;if(ye.mode==="move"){const Dn={x:ye.startStageRect.x+ln,y:ye.startStageRect.y+Pt,width:ye.startStageRect.width,height:ye.startStageRect.height},_t=Re.altKey?{rect:Dn,guides:[]}:IN(Dn,ye.snapTargets);J(_t.rect),I(_t.guides);const Ca=(_t.rect.x-ye.startStageRect.x)/h,on=(_t.rect.y-ye.startStageRect.y)/h;for(const Yn of ye.elementIds){const Kt=ye.targetNodes[Yn],zn=ye.previousStyles[Yn];if(!Kt||!zn)continue;const Ft=Un(zn.transform);js(Kt,{...zn,transform:Sa(Ft.translateX+Ca,Ft.translateY+on,Ft.rotate),transformOrigin:zn.transformOrigin||"center center"})}return}if(ye.mode==="resize"){const Dn=QN({resizeCorner:ye.resizeCorner,scale:h,stageDeltaX:ln,stageDeltaY:Pt,startStageRect:ye.startStageRect}),_t=Re.altKey||!ye.resizeCorner?{rect:Dn,guides:[]}:GN(Dn,ye.resizeCorner,ye.snapTargets);J(_t.rect),I(_t.guides),aO(ye,_t.rect,{offsetX:g,offsetY:b,scale:h});return}const ct=Un(ye.previousStyle.transform),vn=M0(ye.startPointer.x,ye.startPointer.y,ye.centerPoint.x,ye.centerPoint.y),dt=M0(Re.clientX,Re.clientY,ye.centerPoint.x,ye.centerPoint.y);js(D,{...ye.previousStyle,transform:Sa(ct.translateX,ct.translateY,ct.rotate+(dt-vn)),transformOrigin:"center center"}),I([])},qe=()=>{window.removeEventListener("mousemove",at),window.removeEventListener("mouseup",zt),window.removeEventListener("keydown",jt),B&&(B.style.pointerEvents=Z)},zt=()=>{const Re=C.current;if(qe(),_(!1),re(),C.current=null,I([]),!Re)return;const ye=ZN(Re);if(!ye.length){J(null);return}p(JN(Re,ye))},jt=Re=>{if(Re.key!=="Escape")return;const ye=C.current;if(qe(),_(!1),re(),C.current=null,I([]),!!ye){for(const ln of ye.elementIds){const Pt=ye.targetNodes[ln],ct=ye.previousStyles[ln];Pt&&ct&&js(Pt,ct)}J(null)}};window.addEventListener("mousemove",at),window.addEventListener("mouseup",zt),window.addEventListener("keydown",jt)},[n,u,m,p,l,r,i,c,h,g,b,E,S,re]);return{manipulationOverlay:te,isManipulating:A,suppressBackgroundClear:z,beginMove:X=>{ue("move",X)},beginResize:(X,Q)=>{ue("resize",Q,X)},beginRotate:X=>{ue("rotate",X)}}}function tO({activeSlide:n,doc:l,mode:r,selectedElementId:i,selectedElementIds:c}){const u=c.filter(m=>{const p=n.elements.find(g=>g.id===m);return Rd(p)});if(r==="move")return u;if(r==="rotate")return[i];const d=new Set;for(const m of u.length?u:[i]){const p=Qe(l,m);if(p&&(d.add(m),p.getAttribute("data-group")==="true"))for(const g of p.querySelectorAll(`[data-editable][${Oe}]`)){const b=g.getAttribute(Oe);b&&d.add(b)}}return[...d]}function nO(n,l){const r=Object.entries(l);let i=n.parentElement;for(;i;){const c=r.find(([,u])=>u===i);if(c)return c[0];i=i.parentElement}return null}function aO(n,l,r){const i=n.startStageRect.width>0?l.width/n.startStageRect.width:1,c=n.startStageRect.height>0?l.height/n.startStageRect.height:1,u={x:r.offsetX,y:r.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([m,p])=>[m,{x:l.x+(p.x-n.startStageRect.x)*i,y:l.y+(p.y-n.startStageRect.y)*c,width:p.width*i,height:p.height*c}]));for(const m of n.elementIds){const p=n.targetNodes[m],g=n.previousStyles[m],b=d[m];if(!p||!g||!b)continue;const h=n.resizeParentElementIds[m]?d[n.resizeParentElementIds[m]]:n.startParentStageRects[Kx(p.parentElement)]??u;if(!h)continue;const S=Un(g.transform);js(p,{...g,position:g.position||"absolute",left:_s((b.x-h.x)/r.scale),top:_s((b.y-h.y)/r.scale),width:_s(b.width/r.scale),height:_s(b.height/r.scale),transform:Sa(0,0,S.rotate),transformOrigin:g.transformOrigin||"center center"})}}function Kx(n){return n!=null&&n.getAttribute(Oe)?`editable:${n.getAttribute(Oe)}`:"slide"}const A0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function lO(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function oO(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function rO(n){return n.altKey?1:n.shiftKey?10:5}function iO(n,l,r){var d;const i={[l]:r};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 p=m.getAttribute("data-editor-id");p&&(i[p]=`${r}-${p}`)}return i}function Rs(n,l,r){return l.length?(r(l.length===1?l[0]:{type:"operation.batch",slideId:n,operations:l,timestamp:Date.now()}),!0):!1}function sO({activeSlide:n,selectedElementIds:l,iframeRef:r,slideWidth:i,slideHeight:c,isEditingText:u,canUndo:d,canRedo:m,onEscapeSelection:p,onCommitOperation:g,onSelectElementIds:b,onUndo:h,onRedo:S}){const E=x.useRef(null),C=x.useRef(n),T=x.useRef(l),A=x.useRef(d),_=x.useRef(m),z=x.useRef(u),N=x.useRef(p);C.current=n,T.current=l,A.current=d,_.current=m,z.current=u,N.current=p,x.useEffect(()=>{var X,Q;const L=()=>{var R;const K=C.current,G=T.current;if(!K||!G.length)return!1;const M=(R=r.current)==null?void 0:R.contentDocument,D=M==null?void 0:M.querySelector(K.rootSelector),V=D==null?void 0:D.getBoundingClientRect();if(!V)return!1;const Y=G.map(B=>{const Z=Bs(K.htmlSource,B),ne=Hs(K.htmlSource,B),W=M?Qe(M,B):null;return!Z||!ne||!W?null:{sourceElementId:B,html:Z,rect:$x(W.getBoundingClientRect(),V),...ne}}).filter(B=>!!B);if(!Y.length)return!1;const q=jN(Y.map(B=>B.rect));return q?(E.current={elements:Y,unionRect:q},!0):!1},J=()=>{const K=C.current,G=T.current;if(!K||!G.length)return!1;const M=G.map(D=>{const V=Bs(K.htmlSource,D),Y=Hs(K.htmlSource,D);return!V||!Y?null:{type:"element.remove",slideId:K.id,elementId:D,...Y,html:V,timestamp:Date.now()}}).filter(D=>!!D);return M.length?(Rs(K.id,M,g),b([]),!0):!1},H=(K=E.current)=>{const G=C.current;if(!G||!K)return!1;let M=G.htmlSource;const D=[],V=zN(r,G,{width:i,height:c}),Y=kN(K.unionRect,24,{width:V.width,height:V.height}),q=[],R=K.elements.map(B=>{const Z=ld(M,`${B.sourceElementId}-copy`),ne=Q0(B.html,iO(B.html,B.sourceElementId,Z)),W=_d(B.rect,Y.x,Y.y),ce=Xx(ne,W);return M=`${M}
361
+ <!-- ${Z} reserved -->`,D.push(Z),q.push({...B,rect:W}),{type:"element.insert",slideId:G.id,elementId:Z,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:ce,timestamp:Date.now()}});return Rs(G.id,R,g),b(D),E.current={elements:q,unionRect:_d(K.unionRect,Y.x,Y.y)},!0},I=K=>{var R;const G=A0[K.key],M=C.current,D=T.current;if(!M||!D.length||!G)return!1;const V=(R=r.current)==null?void 0:R.contentDocument,Y=rO(K),q=D.map(B=>{const Z=M.elements.find(ge=>ge.id===B);if(!oO(Z))return null;const ne=V?Qe(V,B):null;if(!ne)return null;const W=Gr(ne),ce=Un(W.transform),se=td({...W,transform:Sa(ce.translateX+G.x*Y,ce.translateY+G.y*Y,ce.rotate),transformOrigin:W.transformOrigin||"center center"});return{type:"element.layout.update",slideId:M.id,elementId:B,previousStyle:W,nextStyle:se,timestamp:Date.now()}}).filter(B=>!!B);return Rs(M.id,q,g),!0},k=K=>{var Y;const G=C.current,M=T.current;if(!G||!M.length)return!1;const D=(Y=r.current)==null?void 0:Y.contentDocument,V=M.map(q=>{const R=D?Qe(D,q):null;if(!R)return null;const B=Gr(R),Z=Number.parseInt(B.zIndex||"",10),ne=Number.isFinite(Z)?Z:0,W=K==="front"?999:K==="back"?0:Math.max(0,ne+(K==="forward"?1:-1)),ce=td({...B,zIndex:String(W)});return ce.zIndex===B.zIndex?null:{type:"element.layout.update",slideId:G.id,elementId:q,previousStyle:B,nextStyle:ce,timestamp:Date.now()}}).filter(q=>!!q);return Rs(G.id,V,g)},te=K=>{if(K.defaultPrevented||z.current)return;const G=K.key.toLowerCase(),M=K.metaKey||K.ctrlKey,D=M&&!K.shiftKey&&G==="z",V=M&&(K.shiftKey&&G==="z"||G==="y"),Y=lO(K.target);let q=!1;if(D&&A.current)h(),q=!0;else if(V&&_.current)S(),q=!0;else{if(Y)return;M&&!K.shiftKey&&G==="c"?q=L():M&&!K.shiftKey&&G==="x"?q=L()&&J():M&&!K.shiftKey&&G==="v"?q=H():M&&!K.shiftKey&&G==="d"?q=L()&&H():K.key==="Backspace"||K.key==="Delete"?q=J():K.key==="Escape"?q=N.current():K.key in A0?q=I(K):M&&K.key==="]"?q=k(K.shiftKey?"front":"forward"):M&&K.key==="["&&(q=k(K.shiftKey?"back":"backward"))}q&&(K.preventDefault(),K.stopPropagation())},re=(X=r.current)==null?void 0:X.contentDocument,ue=(Q=r.current)==null?void 0:Q.contentWindow;return window.addEventListener("keydown",te),ue==null||ue.addEventListener("keydown",te),re==null||re.addEventListener("keydown",te),()=>{window.removeEventListener("keydown",te),ue==null||ue.removeEventListener("keydown",te),re==null||re.removeEventListener("keydown",te)}},[r,g,S,b,h,c,i])}const _0="hse-editing-text-style",cO=`
362
+ [data-hse-editing="true"] {
363
+ outline: none !important;
364
+ box-shadow: none !important;
365
+ overflow: visible;
366
+ caret-color: currentColor;
367
+ white-space: pre-wrap;
368
+ user-select: text;
369
+ -webkit-user-select: text;
370
+ }
371
+
372
+ [data-hse-editing="true"]:focus,
373
+ [data-hse-editing="true"]:focus-visible {
374
+ outline: none !important;
375
+ box-shadow: none !important;
376
+ }
377
+
378
+ body[data-hse-group-scope] [data-editable] {
379
+ transition: opacity 120ms ease, filter 120ms ease;
380
+ }
381
+
382
+ body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
383
+ opacity: 0.28;
384
+ filter: blur(1.5px);
385
+ }
386
+
387
+ body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
388
+ outline: 1px solid rgba(15, 23, 42, 0.22);
389
+ outline-offset: 4px;
390
+ }
391
+ `;function uO(n){return n.closest(`[data-editable][${Oe}]`)}function R0(n,l,r,i){const c=n.elementFromPoint(l,r);return c?Nd(c,i):null}function N0(n,l){const r=Array.from(n.querySelectorAll("[data-editable]"));for(const c of r)c.removeAttribute("data-hse-active-group-scope"),c.removeAttribute("data-hse-outside-group-scope");if(!l){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",l);const i=n.querySelector(`[data-editable="block"][data-group="true"][${Oe}="${l}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const c of r)c!==i&&!i.contains(c)&&c.setAttribute("data-hse-outside-group-scope","true")}function Nd(n,l){const r=uO(n);return r?l?r.closest(`[data-editable="block"][data-group="true"][${Oe}="${l}"]`)?r:null:r.closest(`[data-editable="block"][data-group="true"][${Oe}]`)??r:null}function fO(n){if(n.getElementById(_0))return;const l=n.createElement("style");l.id=_0,l.textContent=cO,n.head.appendChild(l)}function dO(n){const l=n.ownerDocument.getSelection(),r=n.ownerDocument.createRange();r.selectNodeContents(n),r.collapse(!1),l==null||l.removeAllRanges(),l==null||l.addRange(r)}function mO({activeSlide:n,iframeRef:l,onCommitOperation:r}){const[i,c]=x.useState([]),[u,d]=x.useState(null),[m,p]=x.useState(null),[g,b]=x.useState(null),h=x.useRef(null),S=x.useRef(null),E=x.useRef(()=>{}),C=x.useRef(()=>{}),T=i[i.length-1]??null,A=x.useCallback(()=>{d(X=>X===null?X:null)},[]);function _(X){c(Q=>{const K=typeof X=="function"?X(Q[Q.length-1]??null):X;return K?[K]:[]})}const z=x.useCallback(X=>{c(Q=>Q.includes(X)?Q.filter(K=>K!==X):[...Q,X])},[]),N=x.useCallback((X,Q)=>{const K=l.current,G=K==null?void 0:K.contentDocument;if(!K||!G||h.current)return null;const M=K.getBoundingClientRect(),D=M.width>0?K.clientWidth/M.width:1,V=M.height>0?K.clientHeight/M.height:1,Y=R0(G,(X-M.left)*D,(Q-M.top)*V,S.current);return(Y==null?void 0:Y.getAttribute(Oe))??null},[l]),L=x.useCallback((X,Q)=>{const K=N(X,Q);return d(G=>G===K?G:K),K},[N]),J=x.useCallback((X,Q,K)=>{const G=N(X,Q);return G?(K?z(G):c([G]),G):null},[N,z]),H=x.useCallback(X=>{var M;if(!n)return;const Q=(M=l.current)==null?void 0:M.contentDocument,K=Q?Qe(Q,X):null;if(!K||K.getAttribute("data-editable")!=="text")return;const G={slideId:n.id,elementId:X,initialText:K.textContent||""};c([X]),h.current=G,b(G)},[n,l]),I=x.useCallback(X=>{p(X),S.current=X,c([X])},[]),k=x.useCallback(()=>{const X=S.current;S.current=null,p(null),c(X?[X]:[])},[]),te=x.useCallback(()=>h.current?!1:S.current?(k(),!0):i.length?(c([]),!0):!1,[k,i.length]);function re(X,Q){const K=g;if(!n||!K||K.slideId!==n.id||K.elementId!==X){h.current=null,b(null);return}const G=K.initialText;h.current=null,b(null),Q!==G&&r({type:"text.update",slideId:n.id,elementId:X,previousText:G,nextText:Q,timestamp:Date.now()})}function ue(){var K;const X=(K=l.current)==null?void 0:K.contentDocument,Q=h.current;if(Q&&X){const G=Qe(X,Q.elementId);G&&(G.textContent=Q.initialText)}h.current=null,b(null)}return x.useEffect(()=>{h.current=g},[g]),x.useEffect(()=>{S.current=m},[m]),x.useEffect(()=>{!n||!g||g.slideId===n.id||b(null)},[n,g]),E.current=re,C.current=ue,x.useEffect(()=>{if(!n)return;const X=l.current;if(!X)return;const Q=X.contentDocument;if(!Q)return;Q.open(),Q.write(n.htmlSource),Q.close(),fO(Q),N0(Q,S.current);const K=M=>{const D=M.getAttribute(Oe);D&&E.current(D,M.textContent||"")};Q.onclick=M=>{const D=M.target;if(!(D instanceof Element)){if(h.current){const R=Qe(Q,h.current.elementId);if(R){K(R);return}}c([]);return}const V=h.current;if(V){A();const R=Qe(Q,V.elementId);if(R&&!R.contains(D)){K(R);return}return}const Y=Nd(D,S.current);if(!Y){S.current||c([]);return}const q=Y.getAttribute(Oe);q&&(M.shiftKey||M.metaKey||M.ctrlKey?z(q):c([q]))},Q.onmousemove=M=>{if(h.current){A();return}const D=R0(Q,M.clientX,M.clientY,S.current),V=(D==null?void 0:D.getAttribute(Oe))??null;d(Y=>Y===V?Y:V)},Q.onmouseleave=()=>{A()};const G=Array.from(Q.querySelectorAll(`[data-editable][${Oe}]`));for(const M of G)M.style.cursor="default",M.ondblclick=null,M.onblur=null,M.onkeydown=null,M.onclick=D=>{var q;D.stopPropagation();const V=Nd(D.target,S.current);if(S.current&&!V)return;const Y=(V==null?void 0:V.getAttribute(Oe))??M.getAttribute(Oe);((q=h.current)==null?void 0:q.elementId)!==Y&&Y&&(D.shiftKey||D.metaKey||D.ctrlKey?z(Y):c([Y]))},M.ondblclick=D=>{const V=M.getAttribute(Oe),Y=h.current;if(V&&M.getAttribute("data-group")==="true"){D.preventDefault(),D.stopPropagation(),I(V);return}if(M.getAttribute("data-editable")==="text"){if(V&&Y&&Y.slideId===n.id&&Y.elementId===V){D.stopPropagation();return}D.preventDefault(),D.stopPropagation(),V&&H(V)}}},[n,I,H,A,l,z]),x.useEffect(()=>{var Q;const X=(Q=l.current)==null?void 0:Q.contentDocument;X&&N0(X,m)},[m,l]),x.useEffect(()=>{var ne;const X=g;if(!X||!n||X.slideId!==n.id)return;const Q=l.current,K=Q==null?void 0:Q.contentDocument;if(!Q||!K)return;const G=K.querySelector(jd(X.elementId));if(!G)return;const M=()=>{E.current(X.elementId,G.textContent||"")};let D=!1;const V=G.style.display,Y=G.style.alignItems,q=G.style.overflow,R=G.style.cursor,B=(ne=G.ownerDocument.defaultView)==null?void 0:ne.getComputedStyle(G),Z=(B==null?void 0:B.display)??"";return G.setAttribute("contenteditable","plaintext-only"),G.setAttribute("spellcheck","false"),G.setAttribute("data-hse-editing","true"),G.style.cursor="text",G.style.overflow="visible",Z==="inline-flex"?(G.style.display="inline-block",G.style.alignItems="normal"):(Z==="flex"||Z==="grid"||Z==="inline-grid")&&(G.style.display="block",G.style.alignItems="normal"),G.focus(),dO(G),G.onkeydown=W=>{if(W.key==="Enter"&&!W.shiftKey){W.preventDefault(),M();return}W.key==="Escape"&&(W.preventDefault(),C.current())},G.onmousedown=()=>{D=!1},G.onmouseup=()=>{const W=G.ownerDocument.getSelection(),ce=W==null?void 0:W.anchorNode,se=W==null?void 0:W.focusNode,ge=ce?G.contains(ce):!1,pe=se?G.contains(se):!1;D=!!(W&&!W.isCollapsed&&ge&&pe)},G.onclick=W=>{W.stopPropagation(),D&&(W.preventDefault(),D=!1)},G.onblur=()=>{window.setTimeout(()=>{var Ae;if(((Ae=h.current)==null?void 0:Ae.elementId)!==X.elementId)return;const W=G.ownerDocument.getSelection(),ce=W==null?void 0:W.anchorNode,se=W==null?void 0:W.focusNode,ge=G.ownerDocument.activeElement,pe=!!(W&&!W.isCollapsed)&&!!(ce&&G.contains(ce))&&!!(se&&G.contains(se));ge===G||pe||M()},0)},()=>{G.removeAttribute("contenteditable"),G.removeAttribute("spellcheck"),G.removeAttribute("data-hse-editing"),G.style.cursor=R,G.style.display=V,G.style.alignItems=Y,G.style.overflow=q,G.onblur=null,G.onclick=null,G.onkeydown=null,G.onmousedown=null,G.onmouseup=null}},[n,l,g]),{selectedElementId:T,selectedElementIds:i,preselectedElementId:u,activeGroupScopeId:m,isEditingText:!!(n&&(g==null?void 0:g.slideId)===n.id),setSelectedElementId:_,setSelectedElementIds:c,beginTextEditing:H,beginGroupEditingScope:I,exitGroupEditingScope:k,clearSelection:te,clearPreselection:A,updatePointerPreselection:L,retargetPointerSelection:J}}function hO(n,l={}){var b;const{onSlidesChange:r}=l,[i,c]=x.useReducer(hs,n,W0),[u,d]=x.useState(((b=n[0])==null?void 0:b.id)??"");x.useEffect(()=>{var h;c({type:"history.reset",slides:n}),d(((h=n[0])==null?void 0:h.id)??"")},[n]);const m=x.useMemo(()=>i.slides.find(h=>h.id===u)??i.slides[0],[u,i.slides]),p=(m==null?void 0:m.id)??"";function g(h){var S;return h.some(E=>E.id===u)||d(((S=h[0])==null?void 0:S.id)??""),r==null||r(h),h}return{slides:i.slides,activeSlide:m,activeSlideId:p,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:h=>{const S=hs(i,{type:"history.commit",operation:h});return c({type:"history.commit",operation:h}),g(S.slides)},runUndo:()=>{const h=hs(i,{type:"history.undo"});c({type:"history.undo"}),g(h.slides)},runRedo:()=>{const h=hs(i,{type:"history.redo"});c({type:"history.redo"}),g(h.slides)}}}const pO=["-webkit-","-moz-","-ms-"],gO=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 yO(n){return pO.some(l=>n.startsWith(l))?!1:!gO.has(n)}function vO(n){const l=window.getComputedStyle(n),r=[];for(const i of Array.from(l)){if(!yO(i))continue;const c=i==="transform"&&n.style.transform?n.style.transform.trim():l.getPropertyValue(i).trim();c.length!==0&&r.push({name:i,value:c})}return r.sort((i,c)=>i.name.localeCompare(c.name))}function bO({iframeRef:n,activeSlide:l,selectedElement:r,selectedElementIds:i,preselectedElementId:c,scale:u,offsetX:d,offsetY:m,slideWidth:p,slideHeight:g}){const b=i.join("\0"),h=c??"",[S,E]=x.useState({key:"",rect:null}),[C,T]=x.useState({key:"",rect:null}),[A,_]=x.useState({key:"",rect:null}),[z,N]=x.useState([]),L=S.key===b?S.rect:null,J=C.key===h?C.rect:null,H=A.key===b?A.rect:null;return x.useEffect(()=>{const I=n.current,k=I==null?void 0:I.contentDocument;if(!I||!k||!l){E({key:b,rect:null}),T({key:h,rect:null}),_({key:b,rect:null}),N([]);return}const te=k.querySelector(l.rootSelector),re=i[0]?Qe(k,i[0]):te;if(!re){E({key:b,rect:null}),T({key:h,rect:null}),_({key:b,rect:null}),N([]);return}const ue=vO(re);N(M=>SO(M,ue)?M:ue);const X=te==null?void 0:te.getBoundingClientRect();let Q=null;if(!i.length||!te||!X)Q=null;else{const M=i.map(D=>Qe(k,D)).filter(D=>!!D).map(D=>Do(D.getBoundingClientRect(),X,{scale:u,offsetX:d,offsetY:m}));M.length&&(Q=M.reduce((D,V)=>{const Y=Math.min(D.x,V.x),q=Math.min(D.y,V.y),R=Math.max(D.x+D.width,V.x+V.width),B=Math.max(D.y+D.height,V.y+V.height);return{x:Y,y:q,width:R-Y,height:B-q}}))}E(M=>Jf(M,b,Q)?M:{key:b,rect:Q}),_(M=>Jf(M,b,Q)?M:{key:b,rect:Q});const K=c?Qe(k,c):null,G=K&&X?Do(K.getBoundingClientRect(),X,{scale:u,offsetX:d,offsetY:m}):null;T(M=>Jf(M,h,G)?M:{key:h,rect:G})},[l,n,d,m,c,h,u,i,b,g,p]),{selectedStageRect:L,preselectionOverlay:J,selectionOverlay:H,selectionLabel:(r==null?void 0:r.type)||"element",inspectedStyles:z}}function Jf(n,l,r){return n.key===l&&xO(n.rect,r)}function xO(n,l){return n===l?!0:!n||!l?!1:n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function SO(n,l){return n.length!==l.length?!1:n.every((r,i)=>{const c=l[i];return(c==null?void 0:c.name)===r.name&&c.value===r.value})}function wO(n,l){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 r=document.implementation.createHTMLDocument(),i=r.createElement("base"),c=r.createElement("a");return r.head.appendChild(i),r.body.appendChild(c),l&&(i.href=l),c.href=n,c.href}const EO=(()=>{let n=0;const l=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${l()}${n}`)})();function tl(n){const l=[];for(let r=0,i=n.length;r<i;r++)l.push(n[r]);return l}let Ro=null;function Fx(n={}){return Ro||(n.includeStyleProperties?(Ro=n.includeStyleProperties,Ro):(Ro=tl(window.getComputedStyle(document.documentElement)),Ro))}function Zs(n,l){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(l);return i?parseFloat(i.replace("px","")):0}function TO(n){const l=Zs(n,"border-left-width"),r=Zs(n,"border-right-width");return n.clientWidth+l+r}function CO(n){const l=Zs(n,"border-top-width"),r=Zs(n,"border-bottom-width");return n.clientHeight+l+r}function Qx(n,l={}){const r=l.width||TO(n),i=l.height||CO(n);return{width:r,height:i}}function MO(){let n,l;try{l=process}catch{}const r=l&&l.env?l.env.devicePixelRatio:null;return r&&(n=parseInt(r,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const pn=16384;function AO(n){(n.width>pn||n.height>pn)&&(n.width>pn&&n.height>pn?n.width>n.height?(n.height*=pn/n.width,n.width=pn):(n.width*=pn/n.height,n.height=pn):n.width>pn?(n.height*=pn/n.width,n.width=pn):(n.width*=pn/n.height,n.height=pn))}function Js(n){return new Promise((l,r)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>l(i))})},i.onerror=r,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function _O(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(l=>`data:image/svg+xml;charset=utf-8,${l}`)}async function RO(n,l,r){const i="http://www.w3.org/2000/svg",c=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return c.setAttribute("width",`${l}`),c.setAttribute("height",`${r}`),c.setAttribute("viewBox",`0 0 ${l} ${r}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),c.appendChild(u),u.appendChild(n),_O(c)}const an=(n,l)=>{if(n instanceof l)return!0;const r=Object.getPrototypeOf(n);return r===null?!1:r.constructor.name===l.name||an(r,l)};function NO(n){const l=n.getPropertyValue("content");return`${n.cssText} content: '${l.replace(/'|"/g,"")}';`}function OO(n,l){return Fx(l).map(r=>{const i=n.getPropertyValue(r),c=n.getPropertyPriority(r);return`${r}: ${i}${c?" !important":""};`}).join(" ")}function DO(n,l,r,i){const c=`.${n}:${l}`,u=r.cssText?NO(r):OO(r,i);return document.createTextNode(`${c}{${u}}`)}function O0(n,l,r,i){const c=window.getComputedStyle(n,r),u=c.getPropertyValue("content");if(u===""||u==="none")return;const d=EO();try{l.className=`${l.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(DO(d,r,c,i)),l.appendChild(m)}function zO(n,l,r){O0(n,l,":before",r),O0(n,l,":after",r)}const D0="application/font-woff",z0="image/jpeg",jO={woff:D0,woff2:D0,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:z0,jpeg:z0,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function kO(n){const l=/\.([^./]*?)$/g.exec(n);return l?l[1]:""}function pm(n){const l=kO(n).toLowerCase();return jO[l]||""}function LO(n){return n.split(/,/)[1]}function Od(n){return n.search(/^(data:)/)!==-1}function HO(n,l){return`data:${l};base64,${n}`}async function Zx(n,l,r){const i=await fetch(n,l);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const c=await i.blob();return new Promise((u,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{u(r({res:i,result:m.result}))}catch(p){d(p)}},m.readAsDataURL(c)})}const Wf={};function BO(n,l,r){let i=n.replace(/\?.*/,"");return r&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),l?`[${l}]${i}`:i}async function gm(n,l,r){const i=BO(n,l,r.includeQueryParams);if(Wf[i]!=null)return Wf[i];r.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let c;try{const u=await Zx(n,r.fetchRequestInit,({res:d,result:m})=>(l||(l=d.headers.get("Content-Type")||""),LO(m)));c=HO(u,l)}catch(u){c=r.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return Wf[i]=c,c}async function UO(n){const l=n.toDataURL();return l==="data:,"?n.cloneNode(!1):Js(l)}async function IO(n,l){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 Js(m)}const r=n.poster,i=pm(r),c=await gm(r,i,l);return Js(c)}async function GO(n,l){var r;try{if(!((r=n==null?void 0:n.contentDocument)===null||r===void 0)&&r.body)return await fc(n.contentDocument.body,l,!0)}catch{}return n.cloneNode(!1)}async function YO(n,l){return an(n,HTMLCanvasElement)?UO(n):an(n,HTMLVideoElement)?IO(n,l):an(n,HTMLIFrameElement)?GO(n,l):n.cloneNode(Jx(n))}const VO=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",Jx=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function qO(n,l,r){var i,c;if(Jx(l))return l;let u=[];return VO(n)&&n.assignedNodes?u=tl(n.assignedNodes()):an(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=tl(n.contentDocument.body.childNodes):u=tl(((c=n.shadowRoot)!==null&&c!==void 0?c:n).childNodes),u.length===0||an(n,HTMLVideoElement)||await u.reduce((d,m)=>d.then(()=>fc(m,r)).then(p=>{p&&l.appendChild(p)}),Promise.resolve()),l}function XO(n,l,r){const i=l.style;if(!i)return;const c=window.getComputedStyle(n);c.cssText?(i.cssText=c.cssText,i.transformOrigin=c.transformOrigin):Fx(r).forEach(u=>{let d=c.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),an(n,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&l.getAttribute("d")&&(d=`path(${l.getAttribute("d")})`),i.setProperty(u,d,c.getPropertyPriority(u))})}function $O(n,l){an(n,HTMLTextAreaElement)&&(l.innerHTML=n.value),an(n,HTMLInputElement)&&l.setAttribute("value",n.value)}function PO(n,l){if(an(n,HTMLSelectElement)){const i=Array.from(l.children).find(c=>n.value===c.getAttribute("value"));i&&i.setAttribute("selected","")}}function KO(n,l,r){return an(l,Element)&&(XO(n,l,r),zO(n,l,r),$O(n,l),PO(n,l)),l}async function FO(n,l){const r=n.querySelectorAll?n.querySelectorAll("use"):[];if(r.length===0)return n;const i={};for(let u=0;u<r.length;u++){const m=r[u].getAttribute("xlink:href");if(m){const p=n.querySelector(m),g=document.querySelector(m);!p&&g&&!i[m]&&(i[m]=await fc(g,l,!0))}}const c=Object.values(i);if(c.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 p=0;p<c.length;p++)m.appendChild(c[p]);n.appendChild(d)}return n}async function fc(n,l,r){return!r&&l.filter&&!l.filter(n)?null:Promise.resolve(n).then(i=>YO(i,l)).then(i=>qO(n,i,l)).then(i=>KO(n,i,l)).then(i=>FO(i,l))}const Wx=/url\((['"]?)([^'"]+?)\1\)/g,QO=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ZO=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function JO(n){const l=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${l})(['"]?\\))`,"g")}function WO(n){const l=[];return n.replace(Wx,(r,i,c)=>(l.push(c),r)),l.filter(r=>!Od(r))}async function e5(n,l,r,i,c){try{const u=r?wO(l,r):l,d=pm(l);let m;return c||(m=await gm(u,d,i)),n.replace(JO(l),`$1${m}$3`)}catch{}return n}function t5(n,{preferredFontFormat:l}){return l?n.replace(ZO,r=>{for(;;){const[i,,c]=QO.exec(r)||[];if(!c)return"";if(c===l)return`src: ${i};`}}):n}function e1(n){return n.search(Wx)!==-1}async function t1(n,l,r){if(!e1(n))return n;const i=t5(n,r);return WO(i).reduce((u,d)=>u.then(m=>e5(m,d,l,r)),Promise.resolve(i))}async function No(n,l,r){var i;const c=(i=l.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(c){const u=await t1(c,null,r);return l.style.setProperty(n,u,l.style.getPropertyPriority(n)),!0}return!1}async function n5(n,l){await No("background",n,l)||await No("background-image",n,l),await No("mask",n,l)||await No("-webkit-mask",n,l)||await No("mask-image",n,l)||await No("-webkit-mask-image",n,l)}async function a5(n,l){const r=an(n,HTMLImageElement);if(!(r&&!Od(n.src))&&!(an(n,SVGImageElement)&&!Od(n.href.baseVal)))return;const i=r?n.src:n.href.baseVal,c=await gm(i,pm(i),l);await new Promise((u,d)=>{n.onload=u,n.onerror=l.onImageErrorHandler?(...p)=>{try{u(l.onImageErrorHandler(...p))}catch(g){d(g)}}:d;const m=n;m.decode&&(m.decode=u),m.loading==="lazy"&&(m.loading="eager"),r?(n.srcset="",n.src=c):n.href.baseVal=c})}async function l5(n,l){const i=tl(n.childNodes).map(c=>n1(c,l));await Promise.all(i).then(()=>n)}async function n1(n,l){an(n,Element)&&(await n5(n,l),await a5(n,l),await l5(n,l))}function o5(n,l){const{style:r}=n;l.backgroundColor&&(r.backgroundColor=l.backgroundColor),l.width&&(r.width=`${l.width}px`),l.height&&(r.height=`${l.height}px`);const i=l.style;return i!=null&&Object.keys(i).forEach(c=>{r[c]=i[c]}),n}const j0={};async function k0(n){let l=j0[n];if(l!=null)return l;const i=await(await fetch(n)).text();return l={url:n,cssText:i},j0[n]=l,l}async function L0(n,l){let r=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(r.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(i,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),Zx(m,l.fetchRequestInit,({result:p})=>(r=r.replace(d,`url(${p})`),[d,p]))});return Promise.all(u).then(()=>r)}function H0(n){if(n==null)return[];const l=[],r=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(r,"");const c=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=c.exec(i);if(p===null)break;l.push(p[0])}i=i.replace(c,"");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 p=u.exec(i);if(p===null){if(p=m.exec(i),p===null)break;u.lastIndex=m.lastIndex}else m.lastIndex=u.lastIndex;l.push(p[0])}return l}async function r5(n,l){const r=[],i=[];return n.forEach(c=>{if("cssRules"in c)try{tl(c.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let m=d+1;const p=u.href,g=k0(p).then(b=>L0(b,l)).then(b=>H0(b).forEach(h=>{try{c.insertRule(h,h.startsWith("@import")?m+=1:c.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:h,error:S})}})).catch(b=>{console.error("Error loading remote css",b.toString())});i.push(g)}})}catch(u){const d=n.find(m=>m.href==null)||document.styleSheets[0];c.href!=null&&i.push(k0(c.href).then(m=>L0(m,l)).then(m=>H0(m).forEach(p=>{d.insertRule(p,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(c=>{if("cssRules"in c)try{tl(c.cssRules||[]).forEach(u=>{r.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${c.href}`,u)}}),r))}function i5(n){return n.filter(l=>l.type===CSSRule.FONT_FACE_RULE).filter(l=>e1(l.style.getPropertyValue("src")))}async function s5(n,l){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=tl(n.ownerDocument.styleSheets),i=await r5(r,l);return i5(i)}function a1(n){return n.trim().replace(/["']/g,"")}function c5(n){const l=new Set;function r(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{l.add(a1(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&r(u)})}return r(n),l}async function u5(n,l){const r=await s5(n,l),i=c5(n);return(await Promise.all(r.filter(u=>i.has(a1(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return t1(u.cssText,d,l)}))).join(`
392
+ `)}async function f5(n,l){const r=l.fontEmbedCSS!=null?l.fontEmbedCSS:l.skipFonts?null:await u5(n,l);if(r){const i=document.createElement("style"),c=document.createTextNode(r);i.appendChild(c),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function d5(n,l={}){const{width:r,height:i}=Qx(n,l),c=await fc(n,l,!0);return await f5(c,l),await n1(c,l),o5(c,l),await RO(c,r,i)}async function m5(n,l={}){const{width:r,height:i}=Qx(n,l),c=await d5(n,l),u=await Js(c),d=document.createElement("canvas"),m=d.getContext("2d"),p=l.pixelRatio||MO(),g=l.canvasWidth||r,b=l.canvasHeight||i;return d.width=g*p,d.height=b*p,l.skipAutoScale||AO(d),d.style.width=`${g}`,d.style.height=`${b}`,l.backgroundColor&&(m.fillStyle=l.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(u,0,0,d.width,d.height),d}async function h5(n,l={}){return(await m5(n,l)).toDataURL()}const B0=224,p5=2;function g5(n){return new Promise(l=>{window.setTimeout(l,n)})}async function y5(n){var l;if((l=n.fonts)!=null&&l.ready)try{await n.fonts.ready}catch{}}async function v5(n){const l=document.createElement("iframe");l.setAttribute("aria-hidden","true"),l.tabIndex=-1,l.style.position="fixed",l.style.left="-10000px",l.style.top="0",l.style.width=`${n.width}px`,l.style.height=`${n.height}px`,l.style.opacity="0",l.style.pointerEvents="none",l.style.border="0",document.body.appendChild(l);try{const r=l.contentDocument;if(!r)throw new Error("Unable to access thumbnail iframe document.");r.open(),r.write(n.htmlSource),r.close(),await y5(r),await g5(50);const i=r.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const c=r.body??i;return await h5(c,{cacheBust:!0,pixelRatio:p5,canvasWidth:B0,canvasHeight:Math.round(n.height/n.width*B0),backgroundColor:"white",skipFonts:!1})}finally{l.remove()}}const b5=300;function x5(n){const[l,r]=x.useState({}),i=x.useRef(new Map),c=x.useMemo(()=>n.map(u=>({id:u.id,key:`${u.id}:${u.htmlSource}`})),[n]);return x.useEffect(()=>{let u=!1;const d=window.setTimeout(async()=>{const m={};for(const p of n){const g=`${p.id}:${p.htmlSource}`,b=i.current.get(g);if(b){m[p.id]=b;continue}try{const h=await v5(p);i.current.set(g,h),m[p.id]=h}catch{}if(u)return}u||r(p=>({...p,...m}))},b5);return()=>{u=!0,window.clearTimeout(d)}},[n]),x.useEffect(()=>{const u=new Set(c.map(d=>d.key));for(const d of i.current.keys())u.has(d)||i.current.delete(d)},[c]),l}function S5({stageViewportRef:n,slideWidth:l,slideHeight:r}){const[i,c]=x.useState({width:0,height:0});x.useEffect(()=>{const g=n.current;if(!g)return;const b=()=>{const S=g.getBoundingClientRect();c(E=>E.width===S.width&&E.height===S.height?E:{width:S.width,height:S.height})};b();const h=new ResizeObserver(()=>{b()});return h.observe(g),()=>{h.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/l:1,i.height>0?i.height/r:1),d=Number.isFinite(u)&&u>0?u:1,m=l*d,p=r*d;return{scale:d,offsetX:Math.max((i.width-m)/2,0),offsetY:Math.max((i.height-p)/2,0)}}function w5({slides:n,deckTitle:l,isSaving:r=!1,onSlidesChange:i,onExportPdf:c}){const{slides:u,activeSlide:d,activeSlideId:m,undoDepth:p,redoDepth:g,setActiveSlideId:b,commitOperation:h,runUndo:S,runRedo:E}=hO(n,{onSlidesChange:i}),C=x.useRef(null),T=x.useRef(null),A=x.useRef(null),_=x.useRef(null),z=x5(u),{selectedElementId:N,selectedElementIds:L,preselectedElementId:J,isEditingText:H,activeGroupScopeId:I,setSelectedElementId:k,setSelectedElementIds:te,beginTextEditing:re,beginGroupEditingScope:ue,clearSelection:X,clearPreselection:Q,updatePointerPreselection:K,retargetPointerSelection:G}=mO({activeSlide:d,iframeRef:C,onCommitOperation:h}),M=d==null?void 0:d.elements.find(ae=>ae.id===N),D=d==null?void 0:d.elements.find(ae=>ae.id===I),V=L.length>1?"multi":(M==null?void 0:M.type)??(D==null?void 0:D.type)??"block",Y=d?L.map(ae=>d.elements.find(de=>de.id===ae)).filter(ae=>!!ae):[],q={group:L.length>=2&&Y.length===L.length,ungroup:L.length===1&&(M==null?void 0:M.type)==="group"},R=!!I&&L.length===1&&N===I,B=(l==null?void 0:l.trim())||"Untitled deck",Z=(d==null?void 0:d.width)||zl,ne=(d==null?void 0:d.height)||jl,{scale:W,offsetX:ce,offsetY:se}=S5({stageViewportRef:T,slideWidth:Z,slideHeight:ne}),{selectedStageRect:ge,preselectionOverlay:pe,selectionOverlay:Ae,inspectedStyles:Ne}=bO({iframeRef:C,activeSlide:d,selectedElement:M,selectedElementIds:L,preselectedElementId:J,scale:W,offsetX:ce,offsetY:se,slideWidth:Z,slideHeight:ne}),{manipulationOverlay:Ce,isManipulating:at,suppressBackgroundClear:qe,beginMove:zt,beginResize:jt,beginRotate:At}=eO({activeSlide:d,selectedElement:M,selectedElementId:N,selectedElementIds:L,selectedStageRect:ge,iframeRef:C,stageGeometry:{scale:W,offsetX:ce,offsetY:se,slideWidth:Z,slideHeight:ne},isEditingText:H,onCommitOperation:h}),Re=(Ce==null?void 0:Ce.selectionBounds)??Ae,ye=N??"slide-root",ln={locked:d?Ur(d,ye,"data-editor-locked"):"",altText:d?Ur(d,ye,"alt"):"",ariaLabel:d?Ur(d,ye,"aria-label"):"",linkUrl:d?Ur(d,ye,"data-link-url"):""};function Pt(ae,de){if(!d)return;const me=ON({elementId:ye,nextValue:de,propertyName:ae,slide:d});me&&h(me)}function ct(ae,de){if(!d)return;const me=DN({attributeName:ae,elementId:ye,nextValue:de,slide:d});me&&h(me)}function vn(ae){if(!d||L.length===0)return;const de=L.map(me=>{const he=Ad(d,me,"z-index"),Te=Number.parseInt(he,10),_e=Number.isFinite(Te)?Te:0,Ye=ae==="front"?"999":ae==="back"?"0":String(Math.max(0,_e+(ae==="forward"?1:-1)));return he===Ye?null:{type:"style.update",slideId:d.id,elementId:me,propertyName:"z-index",previousValue:he,nextValue:Ye,timestamp:Date.now()}}).filter(me=>!!me);dt(de)}function dt(ae){!d||ae.length===0||h(ae.length===1?ae[0]:{type:"operation.batch",slideId:d.id,operations:ae,timestamp:Date.now()})}function Dn(ae,de,me){var Ye;const he={[de]:me},_e=(Ye=new DOMParser().parseFromString(`<template>${ae}</template>`,"text/html").querySelector("template"))==null?void 0:Ye.content.firstElementChild;if(!(_e instanceof HTMLElement))return he;for(const We of _e.querySelectorAll(`[${Oe}]`)){const He=We.getAttribute(Oe);He&&(he[He]=`${me}-${He}`)}return he}function _t(){var Ye;if(!d||L.length===0)return;const ae=(Ye=C.current)==null?void 0:Ye.contentDocument,de=ae==null?void 0:ae.querySelector(d.rootSelector),me=de==null?void 0:de.getBoundingClientRect();let he=d.htmlSource;const Te=[],_e=L.map(We=>{const He=Bs(d.htmlSource,We),ot=Hs(d.htmlSource,We),Et=ae?Qe(ae,We):null;if(!He||!ot||!Et||!me)return null;const ft=ld(he,`${We}-copy`),pt=Q0(He,Dn(He,We,ft)),Vn=_d($x(Et.getBoundingClientRect(),me),24,24),Gt=Xx(pt,Vn);return he=`${he}
393
+ <!-- ${ft} reserved -->`,Te.push(ft),{type:"element.insert",slideId:d.id,elementId:ft,...ot,html:Gt,timestamp:Date.now()}}).filter(We=>!!We);dt(_e),Te.length&&te(Te)}function Ca(){if(!d||L.length===0)return;const ae=L.map(de=>{const me=Bs(d.htmlSource,de),he=Hs(d.htmlSource,de);return!me||!he?null:{type:"element.remove",slideId:d.id,elementId:de,...he,html:me,timestamp:Date.now()}}).filter(de=>!!de);dt(ae),ae.length&&te([])}function on(ae){if(!d||u.length===0)return;const de=h2(u,ae);h({type:"slide.create",slide:de,index:ae,timestamp:Date.now()}),b(de.id),X()}function Yn(){if(!d)return;const ae=u.findIndex(me=>me.id===d.id),de=ae>=0?ae+1:u.length;on(de)}function Kt(ae){const de=u.findIndex(me=>me.id===ae);de<0||on(de)}function zn(ae){const de=u.findIndex(me=>me.id===ae);de<0||on(de+1)}function Ft(ae){const de=u.find(_e=>_e.id===ae);if(!de)return;const me=u.findIndex(_e=>_e.id===ae),he=me>=0?me+1:u.length,Te=p2(u,de);h({type:"slide.duplicate",sourceSlideId:ae,slide:Te,index:he,timestamp:Date.now()}),b(Te.id),X()}function ta(ae){if(u.length<=1)return;const de=u.findIndex(Te=>Te.id===ae),me=u[de];if(!me)return;const he=u[de+1]??u[de-1]??u[0];h({type:"slide.delete",slide:me,index:de,timestamp:Date.now()}),m===ae&&b((he==null?void 0:he.id)??""),X()}function kt(ae){const de=u.find(me=>me.id===ae);de&&h({type:"slide.visibility.update",slideId:ae,previousHidden:de.hidden===!0,nextHidden:de.hidden!==!0,timestamp:Date.now()})}function rn(ae,de){const me=u.findIndex(he=>he.id===ae);me<0||me===de||(h({type:"slide.reorder",slideId:ae,fromIndex:me,toIndex:de,timestamp:Date.now()}),b(ae))}function Rt(){if(!d||L.length<2)return;const ae=Gl(),de=ld(d.htmlSource,"group-1"),me=f2({html:d.htmlSource,slideId:d.id,groupElementId:de,elementRects:ae,elementIds:L});me&&(h(me),te([de]))}function Gl(){var Ye;const ae=(Ye=C.current)==null?void 0:Ye.contentDocument,de=ae==null?void 0:ae.querySelector((d==null?void 0:d.rootSelector)??"");if(!ae||!de)return{};const me=de.getBoundingClientRect(),he=d?d.width/me.width:1,Te=d?d.height/me.height:1,_e={};for(const We of ae.querySelectorAll(`[data-editable][${Oe}]`)){const He=We.getAttribute(Oe);if(!He)continue;const ot=We.getBoundingClientRect(),Et=We.parentElement,ft=Et!=null&&Et.hasAttribute("data-editable")&&Et.getAttribute(Oe)?Et.getAttribute(Oe):null,pt=ft?_e[ft]??{x:0,y:0,width:me.width,height:me.height}:{x:0,y:0,width:me.width,height:me.height};_e[He]={x:(ot.left-me.left)*he-pt.x,y:(ot.top-me.top)*Te-pt.y,width:ot.width*he,height:ot.height*Te}}return _e}function cl(){if(!d||L.length!==1||!N)return;const ae=d2({html:d.htmlSource,slideId:d.id,groupElementId:N,elementRects:Gl()});ae&&(h(ae),te(ae.childElementIds))}function bn(ae){if(!d||!N||!Re)return;const de=Ad(d,N,"transform"),me={x:(Re.x-ce)/W,y:(Re.y-se)/W,width:Re.width/W,height:Re.height/W};let he=0,Te=0;if(ae==="left"?he=-me.x:ae==="hcenter"?he=Z/2-(me.x+me.width/2):ae==="right"?he=Z-(me.x+me.width):ae==="top"?Te=-me.y:ae==="vcenter"?Te=ne/2-(me.y+me.height/2):ae==="bottom"&&(Te=ne-(me.y+me.height)),Math.abs(he)<.01&&Math.abs(Te)<.01)return;const _e=Un(de);Pt("transform",Sa(_e.translateX+he,_e.translateY+Te,_e.rotate)??"")}function Ma(ae){var Gt;if(!d||L.length<3)return;const de=(Gt=C.current)==null?void 0:Gt.contentDocument,me=de==null?void 0:de.querySelector(d.rootSelector),he=me==null?void 0:me.getBoundingClientRect();if(!de||!he)return;const Te=L.map(Lt=>{const qn=Qe(de,Lt);if(!qn)return null;const Xt=qn.getBoundingClientRect();return{elementId:Lt,node:qn,rect:{x:Xt.left-he.left,y:Xt.top-he.top,width:Xt.width,height:Xt.height}}}).filter(Lt=>!!Lt);if(Te.length<3)return;const _e=ae==="vertical"?"y":"x",Ye=ae==="vertical"?"height":"width",We=[...Te].sort((Lt,qn)=>Lt.rect[_e]-qn.rect[_e]),He=We[0],ot=We[We.length-1];if(!He||!ot)return;const Et=He.rect[_e]+He.rect[Ye]/2,pt=(ot.rect[_e]+ot.rect[Ye]/2-Et)/(We.length-1),Vn=We.map((Lt,qn)=>{const Xt=Et+pt*qn,Tt=Lt.rect[_e]+Lt.rect[Ye]/2,Nt=Xt-Tt;if(Math.abs(Nt)<.01)return null;const jn=Gr(Lt.node),ul=Un(jn.transform),dc=td({...jn,transform:Sa(ul.translateX+(_e==="x"?Nt:0),ul.translateY+(_e==="y"?Nt:0),ul.rotate),transformOrigin:jn.transformOrigin||"center center"});return{type:"element.layout.update",slideId:d.id,elementId:Lt.elementId,previousStyle:jn,nextStyle:dc,timestamp:Date.now()}}).filter(Lt=>!!Lt);dt(Vn)}return sO({activeSlide:d,selectedElementIds:L,iframeRef:C,slideWidth:Z,slideHeight:ne,isEditingText:H,canUndo:p>0,canRedo:g>0,onCommitOperation:h,onSelectElementIds:te,onEscapeSelection:X,onUndo:S,onRedo:E}),d?v.jsx(NN,{children:v.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[v.jsx(bT,{title:B,isSaving:r,pdfSlides:u.map(ae=>({id:ae.id,title:ae.title,file:ae.sourceFile})),pdfThumbnails:z,onExportPdf:c}),v.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[v.jsx(kR,{slides:u,activeSlideId:d.id,slideCount:u.length,thumbnails:z,onSelectSlide:ae=>{b(ae),k(null)},onAdd:Yn,onAddSlideAbove:Kt,onAddSlideBelow:zn,onDuplicate:Ft,onDelete:ta,onToggleHidden:kt,onReorder:rn}),v.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:v.jsx(_N,{slideWidth:Z,slideHeight:ne,offsetX:ce,offsetY:se,scale:W,preselectionOverlay:pe,selectionOverlay:Re,toolbarKey:L.length?`${d.id}:${L.join(",")}`:null,inspectedStyles:Ne,selectedElementType:V,selectionCommandAvailability:q,groupScopeOverlayPassive:R,isEditingText:H,manipulationOverlay:Ce,iframeRef:C,stageViewportRef:T,selectionOverlayRef:A,isManipulating:at,onSelectionOverlayMouseDown:ae=>{if(!L.length)return;const de=ae.shiftKey||ae.metaKey||ae.ctrlKey,me=K(ae.clientX,ae.clientY);if(_.current={clientX:ae.clientX,clientY:ae.clientY,additive:de,targetElementId:me},me&&me!==N){ae.stopPropagation();return}me&&me===N&&ae.stopPropagation(),zt({clientX:ae.clientX,clientY:ae.clientY,preventDefault:()=>ae.preventDefault(),stopPropagation:()=>ae.stopPropagation()})},onSelectionOverlayMouseMove:ae=>{const de=_.current;if(K(ae.clientX,ae.clientY),!de||de.targetElementId===N)return;const me=ae.clientX-de.clientX,he=ae.clientY-de.clientY;Math.hypot(me,he)<=4||(_.current=null,zt({clientX:de.clientX,clientY:de.clientY,preventDefault:()=>ae.preventDefault(),stopPropagation:()=>ae.stopPropagation()}))},onSelectionOverlayMouseUp:ae=>{const de=_.current;if(_.current=null,!de)return;const me=ae.clientX-de.clientX,he=ae.clientY-de.clientY;Math.hypot(me,he)>4||G(ae.clientX,ae.clientY,de.additive)},onStageMouseLeave:Q,onResizeHandleMouseDown:(ae,de)=>{L.length&&jt(ae,{clientX:de.clientX,clientY:de.clientY,preventDefault:()=>de.preventDefault(),stopPropagation:()=>de.stopPropagation()})},onRotateHandleMouseDown:ae=>{L.length===1&&At({clientX:ae.clientX,clientY:ae.clientY,preventDefault:()=>ae.preventDefault(),stopPropagation:()=>ae.stopPropagation()})},onSelectionOverlayDoubleClick:ae=>{var de;if(I&&((de=C.current)!=null&&de.contentDocument)){const me=C.current.getBoundingClientRect(),Te=C.current.contentDocument.elementFromPoint(ae.clientX-me.left,ae.clientY-me.top),_e=Te==null?void 0:Te.closest(`[data-editable][${Oe}]`);if((_e==null?void 0:_e.getAttribute("data-editable"))==="text"){const Ye=_e.getAttribute(Oe);if(Ye){re(Ye);return}}}if(L.length===1&&(M==null?void 0:M.type)==="text"&&N){re(N);return}L.length===1&&(M==null?void 0:M.type)==="group"&&N&&ue(N)},onBackgroundClick:()=>{qe||X()},onStyleChange:Pt,onAttributeChange:ct,onAlignToSlide:bn,onDistribute:Ma,onGroup:Rt,onLayerOrder:vn,onUngroup:cl,onDuplicate:_t,onDelete:Ca,attributeValues:ln})})]})]})}):v.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}const E5="/deck/manifest.json",T5="/__editor/save-generated-deck",C5="/__editor/export-pdf",U0=800;function M5(){const[n,l]=x.useState("Generated deck"),[r,i]=x.useState([]),[c,u]=x.useState(null),[d,m]=x.useState(!0),[p,g]=x.useState(!1),b=x.useRef(null),h=x.useRef([]),S=x.useRef(null),E=x.useRef(null),C=x.useRef(0),T=x.useRef(!1),A=x.useRef(null),_=x.useRef(Date.now());x.useEffect(()=>{let J=!1;return y2({manifestUrl:`${E5}?v=${Date.now()}`}).then(H=>{if(!J){if(!H){l("Generated deck"),i([]),u("No slides were found at /deck/manifest.json."),m(!1);return}b.current=H.manifest,l(H.manifest.topic||"Generated deck"),i(H.slides),h.current=H.slides,u(null),m(!1)}}).catch(()=>{J||(l("Generated deck"),i([]),u("The app could not load the generated deck."),m(!1))}),()=>{J=!0,E.current&&window.clearTimeout(E.current)}},[]);const z=async()=>{var ue;const J=b.current,H=S.current,I=C.current;if(!((ue=J==null?void 0:J.slides)!=null&&ue.length)||!(H!=null&&H.length))return;if(T.current){await A.current,C.current!==I&&await z();return}T.current=!0;const k=new Map(h.current.map((X,Q)=>{var K,G;return[X.id,X.sourceFile??((G=(K=J.slides)==null?void 0:K[Q])==null?void 0:G.file)]})),te=H.flatMap(X=>{const Q=X.sourceFile??k.get(X.id);return Q?[{file:Q,title:X.title,hidden:X.hidden===!0?!0:void 0}]:[]}),re=fetch(T5,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:_.current,manifest:{...J,slides:te},slides:H.map(X=>({file:X.sourceFile??k.get(X.id),htmlSource:X.htmlSource,title:X.title,hidden:X.hidden===!0}))})}).then(X=>{if(!X.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(X=>{throw u("The app could not write generated slides back to disk."),X}).finally(()=>{if(T.current=!1,A.current=null,C.current!==I){E.current||(E.current=window.setTimeout(()=>{E.current=null,z()},U0));return}g(!1)});A.current=re,await re};return{deckTitle:n,slides:r,errorMessage:c,isLoading:d,isSaving:p,saveSlides:J=>{var I;if(h.current===J)return;const H=b.current;(I=H==null?void 0:H.slides)!=null&&I.length&&(h.current=J,S.current=J,C.current+=1,g(!0),E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{E.current=null,z()},U0))},exportPdf:async J=>{E.current&&(window.clearTimeout(E.current),E.current=null),await z();const H=await fetch(C5,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:J})});if(!H.ok)throw new Error(await H.text());const I=await H.blob(),k=URL.createObjectURL(I),te=document.createElement("a"),re=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";te.href=k,te.download=`${re}.pdf`,document.body.appendChild(te),te.click(),te.remove(),URL.revokeObjectURL(k)}}}function I0({title:n,body:l}){return v.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:v.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:[v.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),v.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:l})]})})}function A5(){const{deckTitle:n,slides:l,errorMessage:r,isLoading:i,isSaving:c,saveSlides:u,exportPdf:d}=M5();return i?v.jsx(I0,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):r?v.jsx(I0,{title:"Generated deck required",body:r}):v.jsxs(v.Fragment,{children:[v.jsx(Jw,{position:"top-center",richColors:!0,closeButton:!0}),v.jsx(w5,{slides:l,deckTitle:n,isSaving:c,onSlidesChange:u,onExportPdf:m=>{const p=Ir.loading("Exporting PDF...");d(m).then(()=>{Ir.success("PDF export is ready.",{id:p})}).catch(g=>{Ir.error("PDF export failed.",{id:p,description:g instanceof Error?g.message:String(g)})})}})]})}const l1=document.getElementById("root");if(!l1)throw new Error("Root element #root was not found.");Cw.createRoot(l1).render(v.jsx(fe.StrictMode,{children:v.jsx(A5,{})}));