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,413 @@
1
+ function Sw(n,l){for(var o=0;o<l.length;o++){const i=l[o];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=o(s);fetch(s.href,u)}})();function kd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ef={exports:{}},Go={};/**
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 uy;function ww(){if(uy)return Go;uy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function o(i,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var m in s)m!=="key"&&(u[m]=s[m])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:d,ref:s!==void 0?s:null,props:u}}return Go.Fragment=l,Go.jsx=o,Go.jsxs=o,Go}var fy;function Ew(){return fy||(fy=1,Ef.exports=ww()),Ef.exports}var v=Ew(),Tf={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 dy;function Tw(){if(dy)return De;dy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),S=Symbol.iterator;function E(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function R(_,L,Z){this.props=_,this.context=L,this.refs=A,this.updater=Z||T}R.prototype.isReactComponent={},R.prototype.setState=function(_,L){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,L,"setState")},R.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function z(){}z.prototype=R.prototype;function D(_,L,Z){this.props=_,this.context=L,this.refs=A,this.updater=Z||T}var Y=D.prototype=new z;Y.constructor=D,C(Y,R.prototype),Y.isPureReactComponent=!0;var ne=Array.isArray;function q(){}var P={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function I(_,L,Z){var oe=Z.ref;return{$$typeof:n,type:_,key:L,ref:oe!==void 0?oe:null,props:Z}}function $(_,L){return I(_.type,L,_.props)}function fe(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function ee(_){var L={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Z){return L[Z]})}var re=/\/+/g;function V(_,L){return typeof _=="object"&&_!==null&&_.key!=null?ee(""+_.key):L.toString(36)}function F(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(q,q):(_.status="pending",_.then(function(L){_.status==="pending"&&(_.status="fulfilled",_.value=L)},function(L){_.status==="pending"&&(_.status="rejected",_.reason=L)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,L,Z,oe,ue){var me=typeof _;(me==="undefined"||me==="boolean")&&(_=null);var ae=!1;if(_===null)ae=!0;else switch(me){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(_.$$typeof){case n:case l:ae=!0;break;case b:return ae=_._init,M(ae(_._payload),L,Z,oe,ue)}}if(ae)return ue=ue(_),ae=oe===""?"."+V(_,0):oe,ne(ue)?(Z="",ae!=null&&(Z=ae.replace(re,"$&/")+"/"),M(ue,L,Z,"",function(ge){return ge})):ue!=null&&(fe(ue)&&(ue=$(ue,Z+(ue.key==null||_&&_.key===ue.key?"":(""+ue.key).replace(re,"$&/")+"/")+ae)),L.push(ue)),1;ae=0;var W=oe===""?".":oe+":";if(ne(_))for(var le=0;le<_.length;le++)oe=_[le],me=W+V(oe,le),ae+=M(oe,L,Z,me,ue);else if(le=E(_),typeof le=="function")for(_=le.call(_),le=0;!(oe=_.next()).done;)oe=oe.value,me=W+V(oe,le++),ae+=M(oe,L,Z,me,ue);else if(me==="object"){if(typeof _.then=="function")return M(F(_),L,Z,oe,ue);throw L=String(_),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ae}function N(_,L,Z){if(_==null)return _;var oe=[],ue=0;return M(_,oe,"","",function(me){return L.call(Z,me,ue++)}),oe}function H(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(Z){(_._status===0||_._status===-1)&&(_._status=1,_._result=Z)},function(Z){(_._status===0||_._status===-1)&&(_._status=2,_._result=Z)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var B=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},G={map:N,forEach:function(_,L,Z){N(_,function(){L.apply(this,arguments)},Z)},count:function(_){var L=0;return N(_,function(){L++}),L},toArray:function(_){return N(_,function(L){return L})||[]},only:function(_){if(!fe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return De.Activity=p,De.Children=G,De.Component=R,De.Fragment=o,De.Profiler=s,De.PureComponent=D,De.StrictMode=i,De.Suspense=h,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,De.__COMPILER_RUNTIME={__proto__:null,c:function(_){return P.H.useMemoCache(_)}},De.cache=function(_){return function(){return _.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(_,L,Z){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var oe=C({},_.props),ue=_.key;if(L!=null)for(me in L.key!==void 0&&(ue=""+L.key),L)!j.call(L,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&L.ref===void 0||(oe[me]=L[me]);var me=arguments.length-2;if(me===1)oe.children=Z;else if(1<me){for(var ae=Array(me),W=0;W<me;W++)ae[W]=arguments[W+2];oe.children=ae}return I(_.type,ue,oe)},De.createContext=function(_){return _={$$typeof:d,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:u,_context:_},_},De.createElement=function(_,L,Z){var oe,ue={},me=null;if(L!=null)for(oe in L.key!==void 0&&(me=""+L.key),L)j.call(L,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ue[oe]=L[oe]);var ae=arguments.length-2;if(ae===1)ue.children=Z;else if(1<ae){for(var W=Array(ae),le=0;le<ae;le++)W[le]=arguments[le+2];ue.children=W}if(_&&_.defaultProps)for(oe in ae=_.defaultProps,ae)ue[oe]===void 0&&(ue[oe]=ae[oe]);return I(_,me,ue)},De.createRef=function(){return{current:null}},De.forwardRef=function(_){return{$$typeof:m,render:_}},De.isValidElement=fe,De.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:H}},De.memo=function(_,L){return{$$typeof:g,type:_,compare:L===void 0?null:L}},De.startTransition=function(_){var L=P.T,Z={};P.T=Z;try{var oe=_(),ue=P.S;ue!==null&&ue(Z,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(q,B)}catch(me){B(me)}finally{L!==null&&Z.types!==null&&(L.types=Z.types),P.T=L}},De.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},De.use=function(_){return P.H.use(_)},De.useActionState=function(_,L,Z){return P.H.useActionState(_,L,Z)},De.useCallback=function(_,L){return P.H.useCallback(_,L)},De.useContext=function(_){return P.H.useContext(_)},De.useDebugValue=function(){},De.useDeferredValue=function(_,L){return P.H.useDeferredValue(_,L)},De.useEffect=function(_,L){return P.H.useEffect(_,L)},De.useEffectEvent=function(_){return P.H.useEffectEvent(_)},De.useId=function(){return P.H.useId()},De.useImperativeHandle=function(_,L,Z){return P.H.useImperativeHandle(_,L,Z)},De.useInsertionEffect=function(_,L){return P.H.useInsertionEffect(_,L)},De.useLayoutEffect=function(_,L){return P.H.useLayoutEffect(_,L)},De.useMemo=function(_,L){return P.H.useMemo(_,L)},De.useOptimistic=function(_,L){return P.H.useOptimistic(_,L)},De.useReducer=function(_,L,Z){return P.H.useReducer(_,L,Z)},De.useRef=function(_){return P.H.useRef(_)},De.useState=function(_){return P.H.useState(_)},De.useSyncExternalStore=function(_,L,Z){return P.H.useSyncExternalStore(_,L,Z)},De.useTransition=function(){return P.H.useTransition()},De.version="19.2.5",De}var my;function Ld(){return my||(my=1,Tf.exports=Tw()),Tf.exports}var x=Ld();const pe=kd(x),$0=Sw({__proto__:null,default:pe},[x]);var Cf={exports:{}},Yo={},Mf={exports:{}},Af={};/**
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 hy;function Cw(){return hy||(hy=1,(function(n){function l(M,N){var H=M.length;M.push(N);e:for(;0<H;){var B=H-1>>>1,G=M[B];if(0<s(G,N))M[B]=N,M[H]=G,H=B;else break e}}function o(M){return M.length===0?null:M[0]}function i(M){if(M.length===0)return null;var N=M[0],H=M.pop();if(H!==N){M[0]=H;e:for(var B=0,G=M.length,_=G>>>1;B<_;){var L=2*(B+1)-1,Z=M[L],oe=L+1,ue=M[oe];if(0>s(Z,H))oe<G&&0>s(ue,Z)?(M[B]=ue,M[oe]=H,B=oe):(M[B]=Z,M[L]=H,B=L);else if(oe<G&&0>s(ue,H))M[B]=ue,M[oe]=H,B=oe;else break e}}return N}function s(M,N){var H=M.sortIndex-N.sortIndex;return H!==0?H:M.id-N.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var h=[],g=[],b=1,p=null,S=3,E=!1,T=!1,C=!1,A=!1,R=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function Y(M){for(var N=o(g);N!==null;){if(N.callback===null)i(g);else if(N.startTime<=M)i(g),N.sortIndex=N.expirationTime,l(h,N);else break;N=o(g)}}function ne(M){if(C=!1,Y(M),!T)if(o(h)!==null)T=!0,q||(q=!0,ee());else{var N=o(g);N!==null&&F(ne,N.startTime-M)}}var q=!1,P=-1,j=5,I=-1;function $(){return A?!0:!(n.unstable_now()-I<j)}function fe(){if(A=!1,q){var M=n.unstable_now();I=M;var N=!0;try{e:{T=!1,C&&(C=!1,z(P),P=-1),E=!0;var H=S;try{t:{for(Y(M),p=o(h);p!==null&&!(p.expirationTime>M&&$());){var B=p.callback;if(typeof B=="function"){p.callback=null,S=p.priorityLevel;var G=B(p.expirationTime<=M);if(M=n.unstable_now(),typeof G=="function"){p.callback=G,Y(M),N=!0;break t}p===o(h)&&i(h),Y(M)}else i(h);p=o(h)}if(p!==null)N=!0;else{var _=o(g);_!==null&&F(ne,_.startTime-M),N=!1}}break e}finally{p=null,S=H,E=!1}N=void 0}}finally{N?ee():q=!1}}}var ee;if(typeof D=="function")ee=function(){D(fe)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,V=re.port2;re.port1.onmessage=fe,ee=function(){V.postMessage(null)}}else ee=function(){R(fe,0)};function F(M,N){P=R(function(){M(n.unstable_now())},N)}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"):j=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 N=3;break;default:N=S}var H=S;S=N;try{return M()}finally{S=H}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(M,N){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var H=S;S=M;try{return N()}finally{S=H}},n.unstable_scheduleCallback=function(M,N,H){var B=n.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?B+H:B):H=B,M){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=H+G,M={id:b++,callback:N,priorityLevel:M,startTime:H,expirationTime:G,sortIndex:-1},H>B?(M.sortIndex=H,l(g,M),o(h)===null&&M===o(g)&&(C?(z(P),P=-1):C=!0,F(ne,H-B))):(M.sortIndex=G,l(h,M),T||E||(T=!0,q||(q=!0,ee()))),M},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(M){var N=S;return function(){var H=S;S=N;try{return M.apply(this,arguments)}finally{S=H}}}})(Af)),Af}var py;function Mw(){return py||(py=1,Mf.exports=Cw()),Mf.exports}var _f={exports:{}},$t={};/**
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 gy;function Aw(){if(gy)return $t;gy=1;var n=Ld();function l(h){var g="https://react.dev/errors/"+h;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 #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(l(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,g,b){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:h,containerInfo:g,implementation:b}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,$t.createPortal=function(h,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(h,g,null,b)},$t.flushSync=function(h){var g=d.T,b=i.p;try{if(d.T=null,i.p=2,h)return h()}finally{d.T=g,i.p=b,i.d.f()}},$t.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(h,g))},$t.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},$t.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var b=g.as,p=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(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:S,fetchPriority:E}):b==="script"&&i.d.X(h,{crossOrigin:p,integrity:S,fetchPriority:E,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},$t.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);i.d.M(h,{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(h)},$t.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,p=m(b,g.crossOrigin);i.d.L(h,b,{crossOrigin:p,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})}},$t.preloadModule=function(h,g){if(typeof h=="string")if(g){var b=m(g.as,g.crossOrigin);i.d.m(h,{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(h)},$t.requestFormReset=function(h){i.d.r(h)},$t.unstable_batchedUpdates=function(h,g){return h(g)},$t.useFormState=function(h,g,b){return d.H.useFormState(h,g,b)},$t.useFormStatus=function(){return d.H.useHostTransitionStatus()},$t.version="19.2.5",$t}var yy;function X0(){if(yy)return _f.exports;yy=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(),_f.exports=Aw(),_f.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 vy;function _w(){if(vy)return Yo;vy=1;var n=Mw(),l=Ld(),o=X0();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(u(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,r=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(r=c.return,r!==null){a=r;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return h(c),e;if(f===r)return h(c),t;f=f.sibling}throw Error(i(188))}if(a.return!==r.return)a=c,r=f;else{for(var y=!1,w=c.child;w;){if(w===a){y=!0,a=c,r=f;break}if(w===r){y=!0,r=c,a=f;break}w=w.sibling}if(!y){for(w=f.child;w;){if(w===a){y=!0,a=f,r=c;break}if(w===r){y=!0,r=f,a=c;break}w=w.sibling}if(!y)throw Error(i(189))}}if(a.alternate!==r)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 p=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),D=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function V(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case R:return"Profiler";case A:return"StrictMode";case ne:return"Suspense";case q:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case D:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:V(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return V(e(t))}catch{}}return null}var F=Array.isArray,M=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},B=[],G=-1;function _(e){return{current:e}}function L(e){0>G||(e.current=B[G],B[G]=null,G--)}function Z(e,t){G++,B[G]=e.current,e.current=t}var oe=_(null),ue=_(null),me=_(null),ae=_(null);function W(e,t){switch(Z(me,t),Z(ue,e),Z(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dg(t),e=jg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(oe),Z(oe,e)}function le(){L(oe),L(ue),L(me)}function ge(e){e.memoizedState!==null&&Z(ae,e);var t=oe.current,a=jg(t,e.type);t!==a&&(Z(ue,e),Z(oe,a))}function we(e){ue.current===e&&(L(oe),L(ue)),ae.current===e&&(L(ae),Ho._currentValue=H)}var Ce,Ge;function Ye(e){if(Ce===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||"",Ge=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Ce+e+Ge}var qt=!1;function Bt(e,t){if(!e||qt)return"";qt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(te){var J=te}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(te){J=te}e.call(ce.prototype)}}else{try{throw Error()}catch(te){J=te}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),y=f[0],w=f[1];if(y&&w){var O=y.split(`
44
+ `),K=w.split(`
45
+ `);for(c=r=0;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;for(;c<K.length&&!K[c].includes("DetermineComponentFrameRoot");)c++;if(r===O.length||c===K.length)for(r=O.length-1,c=K.length-1;1<=r&&0<=c&&O[r]!==K[c];)c--;for(;1<=r&&0<=c;r--,c--)if(O[r]!==K[c]){if(r!==1||c!==1)do if(r--,c--,0>c||O[r]!==K[c]){var ie=`
46
+ `+O[r].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=r&&0<=c);break}}}finally{qt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ye(a):""}function Nt(e,t){switch(e.tag){case 26:case 27:case 5:return Ye(e.type);case 16:return Ye("Lazy");case 13:return e.child!==t&&t!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return Bt(e.type,!1);case 11:return Bt(e.type.render,!1);case 1:return Bt(e.type,!0);case 31:return Ye("Activity");default:return""}}function ze(e){try{var t="",a=null;do t+=Nt(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
47
+ Error generating stack: `+r.message+`
48
+ `+r.stack}}var be=Object.prototype.hasOwnProperty,on=n.unstable_scheduleCallback,Qt=n.unstable_cancelCallback,ft=n.unstable_shouldYield,xn=n.unstable_requestPaint,dt=n.unstable_now,Pt=n.unstable_getCurrentPriorityLevel,Ot=n.unstable_ImmediatePriority,oa=n.unstable_UserBlockingPriority,Ln=n.unstable_NormalPriority,$n=n.unstable_LowPriority,Ut=n.unstable_IdlePriority,Hn=n.log,Zt=n.unstable_setDisableYieldValue,ia=null,At=null;function sn(e){if(typeof Hn=="function"&&Zt(e),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(ia,e)}catch{}}var zt=Math.clz32?Math.clz32:Sn,Zr=Math.log,xl=Math.LN2;function Sn(e){return e>>>=0,e===0?32:31-(Zr(e)/xl|0)|0}var ja=256,ka=262144,sa=4194304;function wn(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 Re(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var c=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var w=r&134217727;return w!==0?(r=w&~f,r!==0?c=wn(r):(y&=w,y!==0?c=wn(y):a||(a=w&~e,a!==0&&(c=wn(a))))):(w=r&~f,w!==0?c=wn(w):y!==0?c=wn(y):a||(a=r&~e,a!==0&&(c=wn(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wt(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 Dt(){var e=sa;return sa<<=1,(sa&62914560)===0&&(sa=4194304),e}function Xn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Q(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function de(e,t,a,r,c,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,K=e.hiddenUpdates;for(a=y&~a;0<a;){var ie=31-zt(a),ce=1<<ie;w[ie]=0,O[ie]=-1;var J=K[ie];if(J!==null)for(K[ie]=null,ie=0;ie<J.length;ie++){var te=J[ie];te!==null&&(te.lane&=-536870913)}a&=~ce}r!==0&&he(e,r,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~t))}function he(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-zt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function ye(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-zt(a),c=1<<r;c&t|e[r]&t&&(e[r]|=t),a&=~c}}function Ne(e,t){var a=t&-t;return a=(a&42)!==0?1:He(a),(a&(e.suspendedLanes|t))!==0?0:a}function He(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 $e(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function st(){var e=N.p;return e!==0?e:(e=window.event,e===void 0?32:ay(e.type))}function mt(e,t){var a=N.p;try{return N.p=e,t()}finally{N.p=a}}var vt=Math.random().toString(36).slice(2),je="__reactFiber$"+vt,lt="__reactProps$"+vt,jt="__reactContainer$"+vt,bt="__reactEvents$"+vt,ca="__reactListeners$"+vt,kt="__reactHandles$"+vt,Kn="__reactResources$"+vt,En="__reactMarker$"+vt;function Jr(e){delete e[je],delete e[lt],delete e[bt],delete e[ca],delete e[kt]}function Fn(e){var t=e[je];if(t)return t;for(var a=e.parentNode;a;){if(t=a[jt]||a[je]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Gg(e);e!==null;){if(a=e[je])return a;e=Gg(e)}return t}e=a,a=e.parentNode}return null}function Bn(e){if(e=e[je]||e[jt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ua(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function La(e){var t=e[Kn];return t||(t=e[Kn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Lt(e){e[En]=!0}var Sm=new Set,wm={};function Sl(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(wm[e]=t,e=0;e<t.length;e++)Sm.add(t[e])}var d1=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]*$"),Em={},Tm={};function m1(e){return be.call(Tm,e)?!0:be.call(Em,e)?!1:d1.test(e)?Tm[e]=!0:(Em[e]=!0,!1)}function li(e,t,a){if(m1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ri(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 fa(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function Tn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function h1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pc(e){if(!e._valueTracker){var t=Cm(e)?"checked":"value";e._valueTracker=h1(e,t,""+e[t])}}function Mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Cm(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function oi(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 p1=/[\n"\\]/g;function Cn(e){return e.replace(p1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function gc(e,t,a,r,c,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=""+Tn(t)):e.value!==""+Tn(t)&&(e.value=""+Tn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?yc(e,y,Tn(t)):a!=null?yc(e,y,Tn(a)):r!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Tn(w):e.removeAttribute("name")}function Am(e,t,a,r,c,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)){pc(e);return}a=a!=null?""+Tn(a):"",t=t!=null?""+Tn(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=w?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),pc(e)}function yc(e,t,a){t==="number"&&oi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Jl(e,t,a,r){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&r&&(e[a].defaultSelected=!0)}else{for(a=""+Tn(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function _m(e,t,a){if(t!=null&&(t=""+Tn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Tn(a):""}function Rm(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=Tn(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),pc(e)}function Wl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var g1=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 Nm(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||g1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Om(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&a[c]!==r&&Nm(e,c,r)}else for(var f in t)t.hasOwnProperty(f)&&Nm(e,f,t[f])}function vc(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 y1=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"]]),v1=/^[\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 ii(e){return v1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function da(){}var bc=null;function xc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var er=null,tr=null;function zm(e){var t=Bn(e);if(t&&(e=t.stateNode)){var a=e[lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(gc(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="'+Cn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var c=r[lt]||null;if(!c)throw Error(i(90));gc(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&Mm(r)}break e;case"textarea":_m(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Jl(e,!!a.multiple,t,!1)}}}var Sc=!1;function Dm(e,t,a){if(Sc)return e(t,a);Sc=!0;try{var r=e(t);return r}finally{if(Sc=!1,(er!==null||tr!==null)&&(Ki(),er&&(t=er,e=tr,tr=er=null,zm(t),e)))for(t=0;t<e.length;t++)zm(e[t])}}function Wr(e,t){var a=e.stateNode;if(a===null)return null;var r=a[lt]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wc=!1;if(ma)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){wc=!0}}),window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{wc=!1}var Ha=null,Ec=null,si=null;function jm(){if(si)return si;var e,t=Ec,a=t.length,r,c="value"in Ha?Ha.value:Ha.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var y=a-e;for(r=1;r<=y&&t[a-r]===c[f-r];r++);return si=c.slice(e,1<r?1-r:void 0)}function ci(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 ui(){return!0}function km(){return!1}function Jt(e){function t(a,r,c,f,y){this._reactName=a,this._targetInst=c,this.type=r,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)?ui:km,this.isPropagationStopped=km,this}return p(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=ui)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ui)},persist:function(){},isPersistent:ui}),t}var wl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fi=Jt(wl),to=p({},wl,{view:0,detail:0}),b1=Jt(to),Tc,Cc,no,di=p({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ac,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!==no&&(no&&e.type==="mousemove"?(Tc=e.screenX-no.screenX,Cc=e.screenY-no.screenY):Cc=Tc=0,no=e),Tc)},movementY:function(e){return"movementY"in e?e.movementY:Cc}}),Lm=Jt(di),x1=p({},di,{dataTransfer:0}),S1=Jt(x1),w1=p({},to,{relatedTarget:0}),Mc=Jt(w1),E1=p({},wl,{animationName:0,elapsedTime:0,pseudoElement:0}),T1=Jt(E1),C1=p({},wl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),M1=Jt(C1),A1=p({},wl,{data:0}),Hm=Jt(A1),_1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R1={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"},N1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N1[e])?!!t[e]:!1}function Ac(){return O1}var z1=p({},to,{key:function(e){if(e.key){var t=_1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ci(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ac,charCode:function(e){return e.type==="keypress"?ci(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ci(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),D1=Jt(z1),j1=p({},di,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bm=Jt(j1),k1=p({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ac}),L1=Jt(k1),H1=p({},wl,{propertyName:0,elapsedTime:0,pseudoElement:0}),B1=Jt(H1),U1=p({},di,{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}),I1=Jt(U1),G1=p({},wl,{newState:0,oldState:0}),Y1=Jt(G1),V1=[9,13,27,32],_c=ma&&"CompositionEvent"in window,ao=null;ma&&"documentMode"in document&&(ao=document.documentMode);var q1=ma&&"TextEvent"in window&&!ao,Um=ma&&(!_c||ao&&8<ao&&11>=ao),Im=" ",Gm=!1;function Ym(e,t){switch(e){case"keyup":return V1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nr=!1;function P1(e,t){switch(e){case"compositionend":return Vm(t);case"keypress":return t.which!==32?null:(Gm=!0,Im);case"textInput":return e=t.data,e===Im&&Gm?null:e;default:return null}}function $1(e,t){if(nr)return e==="compositionend"||!_c&&Ym(e,t)?(e=jm(),si=Ec=Ha=null,nr=!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 Um&&t.locale!=="ko"?null:t.data;default:return null}}var X1={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 qm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!X1[e.type]:t==="textarea"}function Pm(e,t,a,r){er?tr?tr.push(r):tr=[r]:er=r,t=ts(t,"onChange"),0<t.length&&(a=new fi("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var lo=null,ro=null;function K1(e){Ag(e,0)}function mi(e){var t=ua(e);if(Mm(t))return e}function $m(e,t){if(e==="change")return t}var Xm=!1;if(ma){var Rc;if(ma){var Nc="oninput"in document;if(!Nc){var Km=document.createElement("div");Km.setAttribute("oninput","return;"),Nc=typeof Km.oninput=="function"}Rc=Nc}else Rc=!1;Xm=Rc&&(!document.documentMode||9<document.documentMode)}function Fm(){lo&&(lo.detachEvent("onpropertychange",Qm),ro=lo=null)}function Qm(e){if(e.propertyName==="value"&&mi(ro)){var t=[];Pm(t,ro,e,xc(e)),Dm(K1,t)}}function F1(e,t,a){e==="focusin"?(Fm(),lo=t,ro=a,lo.attachEvent("onpropertychange",Qm)):e==="focusout"&&Fm()}function Q1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mi(ro)}function Z1(e,t){if(e==="click")return mi(t)}function J1(e,t){if(e==="input"||e==="change")return mi(t)}function W1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:W1;function oo(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var c=a[r];if(!be.call(t,c)||!cn(e[c],t[c]))return!1}return!0}function Zm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jm(e,t){var a=Zm(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zm(a)}}function Wm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=oi(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=oi(e.document)}return t}function Oc(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 eS=ma&&"documentMode"in document&&11>=document.documentMode,ar=null,zc=null,io=null,Dc=!1;function th(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Dc||ar==null||ar!==oi(r)||(r=ar,"selectionStart"in r&&Oc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),io&&oo(io,r)||(io=r,r=ts(zc,"onSelect"),0<r.length&&(t=new fi("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=ar)))}function El(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var lr={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionrun:El("Transition","TransitionRun"),transitionstart:El("Transition","TransitionStart"),transitioncancel:El("Transition","TransitionCancel"),transitionend:El("Transition","TransitionEnd")},jc={},nh={};ma&&(nh=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function Tl(e){if(jc[e])return jc[e];if(!lr[e])return e;var t=lr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in nh)return jc[e]=t[a];return e}var ah=Tl("animationend"),lh=Tl("animationiteration"),rh=Tl("animationstart"),tS=Tl("transitionrun"),nS=Tl("transitionstart"),aS=Tl("transitioncancel"),oh=Tl("transitionend"),ih=new Map,kc="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(" ");kc.push("scrollEnd");function Un(e,t){ih.set(e,t),Sl(t,[e])}var hi=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)},Mn=[],rr=0,Lc=0;function pi(){for(var e=rr,t=Lc=rr=0;t<e;){var a=Mn[t];Mn[t++]=null;var r=Mn[t];Mn[t++]=null;var c=Mn[t];Mn[t++]=null;var f=Mn[t];if(Mn[t++]=null,r!==null&&c!==null){var y=r.pending;y===null?c.next=c:(c.next=y.next,y.next=c),r.pending=c}f!==0&&sh(a,c,f)}}function gi(e,t,a,r){Mn[rr++]=e,Mn[rr++]=t,Mn[rr++]=a,Mn[rr++]=r,Lc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Hc(e,t,a,r){return gi(e,t,a,r),yi(e)}function Cl(e,t){return gi(e,null,null,t),yi(e)}function sh(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,r=f.alternate,r!==null&&(r.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-zt(a),e=f.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=a|536870912),f):null}function yi(e){if(50<No)throw No=0,$u=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var or={};function lS(e,t,a,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,a,r){return new lS(e,t,a,r)}function Bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ha(e,t){var a=e.alternate;return a===null?(a=un(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 ch(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 vi(e,t,a,r,c,f){var y=0;if(r=e,typeof e=="function")Bc(e)&&(y=1);else if(typeof e=="string")y=cw(e,a,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case I:return e=un(31,a,t,c),e.elementType=I,e.lanes=f,e;case C:return Ml(a.children,c,f,t);case A:y=8,c|=24;break;case R:return e=un(12,a,t,c|2),e.elementType=R,e.lanes=f,e;case ne:return e=un(13,a,t,c),e.elementType=ne,e.lanes=f,e;case q:return e=un(19,a,t,c),e.elementType=q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:y=10;break e;case z:y=9;break e;case Y:y=11;break e;case P:y=14;break e;case j:y=16,r=null;break e}y=29,a=Error(i(130,e===null?"null":typeof e,"")),r=null}return t=un(y,a,t,c),t.elementType=e,t.type=r,t.lanes=f,t}function Ml(e,t,a,r){return e=un(7,e,r,t),e.lanes=a,e}function Uc(e,t,a){return e=un(6,e,null,t),e.lanes=a,e}function uh(e){var t=un(18,null,null,0);return t.stateNode=e,t}function Ic(e,t,a){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fh=new WeakMap;function An(e,t){if(typeof e=="object"&&e!==null){var a=fh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ze(t)},fh.set(e,t),t)}return{value:e,source:t,stack:ze(t)}}var ir=[],sr=0,bi=null,so=0,_n=[],Rn=0,Ba=null,Qn=1,Zn="";function pa(e,t){ir[sr++]=so,ir[sr++]=bi,bi=e,so=t}function dh(e,t,a){_n[Rn++]=Qn,_n[Rn++]=Zn,_n[Rn++]=Ba,Ba=e;var r=Qn;e=Zn;var c=32-zt(r)-1;r&=~(1<<c),a+=1;var f=32-zt(t)+c;if(30<f){var y=c-c%5;f=(r&(1<<y)-1).toString(32),r>>=y,c-=y,Qn=1<<32-zt(t)+c|a<<c|r,Zn=f+e}else Qn=1<<f|a<<c|r,Zn=e}function Gc(e){e.return!==null&&(pa(e,1),dh(e,1,0))}function Yc(e){for(;e===bi;)bi=ir[--sr],ir[sr]=null,so=ir[--sr],ir[sr]=null;for(;e===Ba;)Ba=_n[--Rn],_n[Rn]=null,Zn=_n[--Rn],_n[Rn]=null,Qn=_n[--Rn],_n[Rn]=null}function mh(e,t){_n[Rn++]=Qn,_n[Rn++]=Zn,_n[Rn++]=Ba,Qn=t.id,Zn=t.overflow,Ba=e}var It=null,ct=null,Pe=!1,Ua=null,Nn=!1,Vc=Error(i(519));function Ia(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw co(An(t,e)),Vc}function hh(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[je]=e,t[lt]=r,a){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(a=0;a<zo.length;a++)Ie(zo[a],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),Am(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),Rm(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||Og(t.textContent,a)?(r.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),r.onScroll!=null&&Ie("scroll",t),r.onScrollEnd!=null&&Ie("scrollend",t),r.onClick!=null&&(t.onclick=da),t=!0):t=!1,t||Ia(e,!0)}function ph(e){for(It=e.return;It;)switch(It.tag){case 5:case 31:case 13:Nn=!1;return;case 27:case 3:Nn=!0;return;default:It=It.return}}function cr(e){if(e!==It)return!1;if(!Pe)return ph(e),Pe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||sf(e.type,e.memoizedProps)),a=!a),a&&ct&&Ia(e),ph(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=Ig(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=Ig(e)}else t===27?(t=ct,el(e.type)?(e=mf,mf=null,ct=e):ct=t):ct=It?zn(e.stateNode.nextSibling):null;return!0}function Al(){ct=It=null,Pe=!1}function qc(){var e=Ua;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),Ua=null),e}function co(e){Ua===null?Ua=[e]:Ua.push(e)}var Pc=_(null),_l=null,ga=null;function Ga(e,t,a){Z(Pc,t._currentValue),t._currentValue=a}function ya(e){e._currentValue=Pc.current,L(Pc)}function $c(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Xc(e,t,a,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var y=c.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=c;for(var O=0;O<t.length;O++)if(w.context===t[O]){f.lanes|=a,w=f.alternate,w!==null&&(w.lanes|=a),$c(f.return,a,e),r||(y=null);break e}f=w.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(i(341));y.lanes|=a,f=y.alternate,f!==null&&(f.lanes|=a),$c(y,a,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function ur(e,t,a,r){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(i(387));if(y=y.memoizedProps,y!==null){var w=c.type;cn(c.pendingProps.value,y.value)||(e!==null?e.push(w):e=[w])}}else if(c===ae.current){if(y=c.alternate,y===null)throw Error(i(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ho):e=[Ho])}c=c.return}e!==null&&Xc(t,e,a,r),t.flags|=262144}function xi(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rl(e){_l=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return gh(_l,e)}function Si(e,t){return _l===null&&Rl(e),gh(e,t)}function gh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ga===null){if(e===null)throw Error(i(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return a}var rS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},oS=n.unstable_scheduleCallback,iS=n.unstable_NormalPriority,Et={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kc(){return{controller:new rS,data:new Map,refCount:0}}function uo(e){e.refCount--,e.refCount===0&&oS(iS,function(){e.controller.abort()})}var fo=null,Fc=0,fr=0,dr=null;function sS(e,t){if(fo===null){var a=fo=[];Fc=0,fr=Ju(),dr={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Fc++,t.then(yh,yh),t}function yh(){if(--Fc===0&&fo!==null){dr!==null&&(dr.status="fulfilled");var e=fo;fo=null,fr=0,dr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cS(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),r}var vh=M.S;M.S=function(e,t){tg=dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sS(e,t),vh!==null&&vh(e,t)};var Nl=_(null);function Qc(){var e=Nl.current;return e!==null?e:rt.pooledCache}function wi(e,t){t===null?Z(Nl,Nl.current):Z(Nl,t.pool)}function bh(){var e=Qc();return e===null?null:{parent:Et._currentValue,pool:e}}var mr=Error(i(460)),Zc=Error(i(474)),Ei=Error(i(542)),Ti={then:function(){}};function xh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(da,da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eh(e),e;default:if(typeof t.status=="string")t.then(da,da);else{if(e=rt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eh(e),e}throw zl=t,mr}}function Ol(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(zl=a,mr):a}}var zl=null;function wh(){if(zl===null)throw Error(i(459));var e=zl;return zl=null,e}function Eh(e){if(e===mr||e===Ei)throw Error(i(483))}var hr=null,mo=0;function Ci(e){var t=mo;return mo+=1,hr===null&&(hr=[]),Sh(hr,e,t)}function ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Mi(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 Th(e){function t(U,k){if(e){var X=U.deletions;X===null?(U.deletions=[k],U.flags|=16):X.push(k)}}function a(U,k){if(!e)return null;for(;k!==null;)t(U,k),k=k.sibling;return null}function r(U){for(var k=new Map;U!==null;)U.key!==null?k.set(U.key,U):k.set(U.index,U),U=U.sibling;return k}function c(U,k){return U=ha(U,k),U.index=0,U.sibling=null,U}function f(U,k,X){return U.index=X,e?(X=U.alternate,X!==null?(X=X.index,X<k?(U.flags|=67108866,k):X):(U.flags|=67108866,k)):(U.flags|=1048576,k)}function y(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function w(U,k,X,se){return k===null||k.tag!==6?(k=Uc(X,U.mode,se),k.return=U,k):(k=c(k,X),k.return=U,k)}function O(U,k,X,se){var Ae=X.type;return Ae===C?ie(U,k,X.props.children,se,X.key):k!==null&&(k.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===j&&Ol(Ae)===k.type)?(k=c(k,X.props),ho(k,X),k.return=U,k):(k=vi(X.type,X.key,X.props,null,U.mode,se),ho(k,X),k.return=U,k)}function K(U,k,X,se){return k===null||k.tag!==4||k.stateNode.containerInfo!==X.containerInfo||k.stateNode.implementation!==X.implementation?(k=Ic(X,U.mode,se),k.return=U,k):(k=c(k,X.children||[]),k.return=U,k)}function ie(U,k,X,se,Ae){return k===null||k.tag!==7?(k=Ml(X,U.mode,se,Ae),k.return=U,k):(k=c(k,X),k.return=U,k)}function ce(U,k,X){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Uc(""+k,U.mode,X),k.return=U,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case E:return X=vi(k.type,k.key,k.props,null,U.mode,X),ho(X,k),X.return=U,X;case T:return k=Ic(k,U.mode,X),k.return=U,k;case j:return k=Ol(k),ce(U,k,X)}if(F(k)||ee(k))return k=Ml(k,U.mode,X,null),k.return=U,k;if(typeof k.then=="function")return ce(U,Ci(k),X);if(k.$$typeof===D)return ce(U,Si(U,k),X);Mi(U,k)}return null}function J(U,k,X,se){var Ae=k!==null?k.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Ae!==null?null:w(U,k,""+X,se);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case E:return X.key===Ae?O(U,k,X,se):null;case T:return X.key===Ae?K(U,k,X,se):null;case j:return X=Ol(X),J(U,k,X,se)}if(F(X)||ee(X))return Ae!==null?null:ie(U,k,X,se,null);if(typeof X.then=="function")return J(U,k,Ci(X),se);if(X.$$typeof===D)return J(U,k,Si(U,X),se);Mi(U,X)}return null}function te(U,k,X,se,Ae){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return U=U.get(X)||null,w(k,U,""+se,Ae);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case E:return U=U.get(se.key===null?X:se.key)||null,O(k,U,se,Ae);case T:return U=U.get(se.key===null?X:se.key)||null,K(k,U,se,Ae);case j:return se=Ol(se),te(U,k,X,se,Ae)}if(F(se)||ee(se))return U=U.get(X)||null,ie(k,U,se,Ae,null);if(typeof se.then=="function")return te(U,k,X,Ci(se),Ae);if(se.$$typeof===D)return te(U,k,X,Si(k,se),Ae);Mi(k,se)}return null}function ve(U,k,X,se){for(var Ae=null,Ke=null,Ee=k,Le=k=0,qe=null;Ee!==null&&Le<X.length;Le++){Ee.index>Le?(qe=Ee,Ee=null):qe=Ee.sibling;var Fe=J(U,Ee,X[Le],se);if(Fe===null){Ee===null&&(Ee=qe);break}e&&Ee&&Fe.alternate===null&&t(U,Ee),k=f(Fe,k,Le),Ke===null?Ae=Fe:Ke.sibling=Fe,Ke=Fe,Ee=qe}if(Le===X.length)return a(U,Ee),Pe&&pa(U,Le),Ae;if(Ee===null){for(;Le<X.length;Le++)Ee=ce(U,X[Le],se),Ee!==null&&(k=f(Ee,k,Le),Ke===null?Ae=Ee:Ke.sibling=Ee,Ke=Ee);return Pe&&pa(U,Le),Ae}for(Ee=r(Ee);Le<X.length;Le++)qe=te(Ee,U,Le,X[Le],se),qe!==null&&(e&&qe.alternate!==null&&Ee.delete(qe.key===null?Le:qe.key),k=f(qe,k,Le),Ke===null?Ae=qe:Ke.sibling=qe,Ke=qe);return e&&Ee.forEach(function(rl){return t(U,rl)}),Pe&&pa(U,Le),Ae}function _e(U,k,X,se){if(X==null)throw Error(i(151));for(var Ae=null,Ke=null,Ee=k,Le=k=0,qe=null,Fe=X.next();Ee!==null&&!Fe.done;Le++,Fe=X.next()){Ee.index>Le?(qe=Ee,Ee=null):qe=Ee.sibling;var rl=J(U,Ee,Fe.value,se);if(rl===null){Ee===null&&(Ee=qe);break}e&&Ee&&rl.alternate===null&&t(U,Ee),k=f(rl,k,Le),Ke===null?Ae=rl:Ke.sibling=rl,Ke=rl,Ee=qe}if(Fe.done)return a(U,Ee),Pe&&pa(U,Le),Ae;if(Ee===null){for(;!Fe.done;Le++,Fe=X.next())Fe=ce(U,Fe.value,se),Fe!==null&&(k=f(Fe,k,Le),Ke===null?Ae=Fe:Ke.sibling=Fe,Ke=Fe);return Pe&&pa(U,Le),Ae}for(Ee=r(Ee);!Fe.done;Le++,Fe=X.next())Fe=te(Ee,U,Le,Fe.value,se),Fe!==null&&(e&&Fe.alternate!==null&&Ee.delete(Fe.key===null?Le:Fe.key),k=f(Fe,k,Le),Ke===null?Ae=Fe:Ke.sibling=Fe,Ke=Fe);return e&&Ee.forEach(function(xw){return t(U,xw)}),Pe&&pa(U,Le),Ae}function at(U,k,X,se){if(typeof X=="object"&&X!==null&&X.type===C&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case E:e:{for(var Ae=X.key;k!==null;){if(k.key===Ae){if(Ae=X.type,Ae===C){if(k.tag===7){a(U,k.sibling),se=c(k,X.props.children),se.return=U,U=se;break e}}else if(k.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===j&&Ol(Ae)===k.type){a(U,k.sibling),se=c(k,X.props),ho(se,X),se.return=U,U=se;break e}a(U,k);break}else t(U,k);k=k.sibling}X.type===C?(se=Ml(X.props.children,U.mode,se,X.key),se.return=U,U=se):(se=vi(X.type,X.key,X.props,null,U.mode,se),ho(se,X),se.return=U,U=se)}return y(U);case T:e:{for(Ae=X.key;k!==null;){if(k.key===Ae)if(k.tag===4&&k.stateNode.containerInfo===X.containerInfo&&k.stateNode.implementation===X.implementation){a(U,k.sibling),se=c(k,X.children||[]),se.return=U,U=se;break e}else{a(U,k);break}else t(U,k);k=k.sibling}se=Ic(X,U.mode,se),se.return=U,U=se}return y(U);case j:return X=Ol(X),at(U,k,X,se)}if(F(X))return ve(U,k,X,se);if(ee(X)){if(Ae=ee(X),typeof Ae!="function")throw Error(i(150));return X=Ae.call(X),_e(U,k,X,se)}if(typeof X.then=="function")return at(U,k,Ci(X),se);if(X.$$typeof===D)return at(U,k,Si(U,X),se);Mi(U,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,k!==null&&k.tag===6?(a(U,k.sibling),se=c(k,X),se.return=U,U=se):(a(U,k),se=Uc(X,U.mode,se),se.return=U,U=se),y(U)):a(U,k)}return function(U,k,X,se){try{mo=0;var Ae=at(U,k,X,se);return hr=null,Ae}catch(Ee){if(Ee===mr||Ee===Ei)throw Ee;var Ke=un(29,Ee,null,U.mode);return Ke.lanes=se,Ke.return=U,Ke}finally{}}}var Dl=Th(!0),Ch=Th(!1),Ya=!1;function Jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wc(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ze&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=yi(e),sh(e,null,a),t}return gi(e,r,t,a),yi(e)}function po(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ye(e,a)}}function eu(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var c=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?c=f=y:f=f.next=y,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var tu=!1;function go(){if(tu){var e=dr;if(e!==null)throw e}}function yo(e,t,a,r){tu=!1;var c=e.updateQueue;Ya=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var O=w,K=O.next;O.next=null,y===null?f=K:y.next=K,y=O;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,w=ie.lastBaseUpdate,w!==y&&(w===null?ie.firstBaseUpdate=K:w.next=K,ie.lastBaseUpdate=O))}if(f!==null){var ce=c.baseState;y=0,ie=K=O=null,w=f;do{var J=w.lane&-536870913,te=J!==w.lane;if(te?(Ve&J)===J:(r&J)===J){J!==0&&J===fr&&(tu=!0),ie!==null&&(ie=ie.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ve=e,_e=w;J=t;var at=a;switch(_e.tag){case 1:if(ve=_e.payload,typeof ve=="function"){ce=ve.call(at,ce,J);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=_e.payload,J=typeof ve=="function"?ve.call(at,ce,J):ve,J==null)break e;ce=p({},ce,J);break e;case 2:Ya=!0}}J=w.callback,J!==null&&(e.flags|=64,te&&(e.flags|=8192),te=c.callbacks,te===null?c.callbacks=[J]:te.push(J))}else te={lane:J,tag:w.tag,payload:w.payload,callback:w.callback,next:null},ie===null?(K=ie=te,O=ce):ie=ie.next=te,y|=J;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;te=w,w=te.next,te.next=null,c.lastBaseUpdate=te,c.shared.pending=null}}while(!0);ie===null&&(O=ce),c.baseState=O,c.firstBaseUpdate=K,c.lastBaseUpdate=ie,f===null&&(c.shared.lanes=0),Fa|=y,e.lanes=y,e.memoizedState=ce}}function Mh(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Ah(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mh(a[e],t)}var pr=_(null),Ai=_(0);function _h(e,t){e=Ma,Z(Ai,e),Z(pr,t),Ma=e|t.baseLanes}function nu(){Z(Ai,Ma),Z(pr,pr.current)}function au(){Ma=Ai.current,L(pr),L(Ai)}var fn=_(null),On=null;function Pa(e){var t=e.alternate;Z(xt,xt.current&1),Z(fn,e),On===null&&(t===null||pr.current!==null||t.memoizedState!==null)&&(On=e)}function lu(e){Z(xt,xt.current),Z(fn,e),On===null&&(On=e)}function Rh(e){e.tag===22?(Z(xt,xt.current),Z(fn,e),On===null&&(On=e)):$a()}function $a(){Z(xt,xt.current),Z(fn,fn.current)}function dn(e){L(fn),On===e&&(On=null),L(xt)}var xt=_(0);function _i(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ff(a)||df(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 va=0,ke=null,tt=null,Tt=null,Ri=!1,gr=!1,jl=!1,Ni=0,vo=0,yr=null,uS=0;function pt(){throw Error(i(321))}function ru(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!cn(e[a],t[a]))return!1;return!0}function ou(e,t,a,r,c,f){return va=f,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?dp:Su,jl=!1,f=a(r,c),jl=!1,gr&&(f=Oh(t,a,r,c)),Nh(e),f}function Nh(e){M.H=So;var t=tt!==null&&tt.next!==null;if(va=0,Tt=tt=ke=null,Ri=!1,vo=0,yr=null,t)throw Error(i(300));e===null||Ct||(e=e.dependencies,e!==null&&xi(e)&&(Ct=!0))}function Oh(e,t,a,r){ke=e;var c=0;do{if(gr&&(yr=null),vo=0,gr=!1,25<=c)throw Error(i(301));if(c+=1,Tt=tt=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=mp,f=t(a,r)}while(gr);return f}function fS(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?bo(t):t,e=e.useState()[0],(tt!==null?tt.memoizedState:null)!==e&&(ke.flags|=1024),t}function iu(){var e=Ni!==0;return Ni=0,e}function su(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function cu(e){if(Ri){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ri=!1}va=0,Tt=tt=ke=null,gr=!1,vo=Ni=0,yr=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?ke.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function St(){if(tt===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=Tt===null?ke.memoizedState:Tt.next;if(t!==null)Tt=t,tt=e;else{if(e===null)throw ke.alternate===null?Error(i(467)):Error(i(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},Tt===null?ke.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bo(e){var t=vo;return vo+=1,yr===null&&(yr=[]),e=Sh(yr,e,t),t=ke,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?dp:Su),e}function zi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bo(e);if(e.$$typeof===D)return Gt(e)}throw Error(i(438,String(e)))}function uu(e){var t=null,a=ke.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=ke.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Oi(),ke.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=$;return t.index++,a}function ba(e,t){return typeof t=="function"?t(e):t}function Di(e){var t=St();return fu(t,tt,e)}function fu(e,t,a){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=a;var c=e.baseQueue,f=r.pending;if(f!==null){if(c!==null){var y=c.next;c.next=f.next,f.next=y}t.baseQueue=c=f,r.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var w=y=null,O=null,K=t,ie=!1;do{var ce=K.lane&-536870913;if(ce!==K.lane?(Ve&ce)===ce:(va&ce)===ce){var J=K.revertLane;if(J===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),ce===fr&&(ie=!0);else if((va&J)===J){K=K.next,J===fr&&(ie=!0);continue}else ce={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},O===null?(w=O=ce,y=f):O=O.next=ce,ke.lanes|=J,Fa|=J;ce=K.action,jl&&a(f,ce),f=K.hasEagerState?K.eagerState:a(f,ce)}else J={lane:ce,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},O===null?(w=O=J,y=f):O=O.next=J,ke.lanes|=ce,Fa|=ce;K=K.next}while(K!==null&&K!==t);if(O===null?y=f:O.next=w,!cn(f,e.memoizedState)&&(Ct=!0,ie&&(a=dr,a!==null)))throw a;e.memoizedState=f,e.baseState=y,e.baseQueue=O,r.lastRenderedState=f}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function du(e){var t=St(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var r=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var y=c=c.next;do f=e(f,y.action),y=y.next;while(y!==c);cn(f,t.memoizedState)||(Ct=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,r]}function zh(e,t,a){var r=ke,c=St(),f=Pe;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var y=!cn((tt||c).memoizedState,a);if(y&&(c.memoizedState=a,Ct=!0),c=c.queue,pu(kh.bind(null,r,c,e),[e]),c.getSnapshot!==t||y||Tt!==null&&Tt.memoizedState.tag&1){if(r.flags|=2048,vr(9,{destroy:void 0},jh.bind(null,r,c,a,t),null),rt===null)throw Error(i(349));f||(va&127)!==0||Dh(r,t,a)}return a}function Dh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ke.updateQueue,t===null?(t=Oi(),ke.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function jh(e,t,a,r){t.value=a,t.getSnapshot=r,Lh(t)&&Hh(e)}function kh(e,t,a){return a(function(){Lh(t)&&Hh(e)})}function Lh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!cn(e,a)}catch{return!0}}function Hh(e){var t=Cl(e,2);t!==null&&an(t,e,2)}function mu(e){var t=Ft();if(typeof e=="function"){var a=e;if(e=a(),jl){sn(!0);try{a()}finally{sn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t}function Bh(e,t,a,r){return e.baseState=a,fu(e,tt,typeof r=="function"?r:ba)}function dS(e,t,a,r,c){if(Li(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};M.T!==null?a(!0):f.isTransition=!1,r(f),a=t.pending,a===null?(f.next=t.pending=f,Uh(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Uh(e,t){var a=t.action,r=t.payload,c=e.state;if(t.isTransition){var f=M.T,y={};M.T=y;try{var w=a(c,r),O=M.S;O!==null&&O(y,w),Ih(e,t,w)}catch(K){hu(e,t,K)}finally{f!==null&&y.types!==null&&(f.types=y.types),M.T=f}}else try{f=a(c,r),Ih(e,t,f)}catch(K){hu(e,t,K)}}function Ih(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Gh(e,t,r)},function(r){return hu(e,t,r)}):Gh(e,t,a)}function Gh(e,t,a){t.status="fulfilled",t.value=a,Yh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Uh(e,a)))}function hu(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Yh(t),t=t.next;while(t!==r)}e.action=null}function Yh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vh(e,t){return t}function qh(e,t){if(Pe){var a=rt.formState;if(a!==null){e:{var r=ke;if(Pe){if(ct){t:{for(var c=ct,f=Nn;c.nodeType!==8;){if(!f){c=null;break t}if(c=zn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ct=zn(c.nextSibling),r=c.data==="F!";break e}}Ia(r)}r=!1}r&&(t=a[0])}}return a=Ft(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:t},a.queue=r,a=cp.bind(null,ke,r),r.dispatch=a,r=mu(!1),f=xu.bind(null,ke,!1,r.queue),r=Ft(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,a=dS.bind(null,ke,c,f,a),c.dispatch=a,r.memoizedState=e,[t,a,!1]}function Ph(e){var t=St();return $h(t,tt,e)}function $h(e,t,a){if(t=fu(e,t,Vh)[0],e=Di(ba)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=bo(t)}catch(y){throw y===mr?Ei:y}else r=t;t=St();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(ke.flags|=2048,vr(9,{destroy:void 0},mS.bind(null,c,a),null)),[r,f,e]}function mS(e,t){e.action=t}function Xh(e){var t=St(),a=tt;if(a!==null)return $h(t,a,e);St(),t=t.memoizedState,a=St();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function vr(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=ke.updateQueue,t===null&&(t=Oi(),ke.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Kh(){return St().memoizedState}function ji(e,t,a,r){var c=Ft();ke.flags|=e,c.memoizedState=vr(1|t,{destroy:void 0},a,r===void 0?null:r)}function ki(e,t,a,r){var c=St();r=r===void 0?null:r;var f=c.memoizedState.inst;tt!==null&&r!==null&&ru(r,tt.memoizedState.deps)?c.memoizedState=vr(t,f,a,r):(ke.flags|=e,c.memoizedState=vr(1|t,f,a,r))}function Fh(e,t){ji(8390656,8,e,t)}function pu(e,t){ki(2048,8,e,t)}function hS(e){ke.flags|=4;var t=ke.updateQueue;if(t===null)t=Oi(),ke.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Qh(e){var t=St().memoizedState;return hS({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Zh(e,t){return ki(4,2,e,t)}function Jh(e,t){return ki(4,4,e,t)}function Wh(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 ep(e,t,a){a=a!=null?a.concat([e]):null,ki(4,4,Wh.bind(null,t,e),a)}function gu(){}function tp(e,t){var a=St();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&ru(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function np(e,t){var a=St();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&ru(t,r[1]))return r[0];if(r=e(),jl){sn(!0);try{e()}finally{sn(!1)}}return a.memoizedState=[r,t],r}function yu(e,t,a){return a===void 0||(va&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=ag(),ke.lanes|=e,Fa|=e,a)}function ap(e,t,a,r){return cn(a,t)?a:pr.current!==null?(e=yu(e,a,r),cn(e,t)||(Ct=!0),e):(va&42)===0||(va&1073741824)!==0&&(Ve&261930)===0?(Ct=!0,e.memoizedState=a):(e=ag(),ke.lanes|=e,Fa|=e,t)}function lp(e,t,a,r,c){var f=N.p;N.p=f!==0&&8>f?f:8;var y=M.T,w={};M.T=w,xu(e,!1,t,a);try{var O=c(),K=M.S;if(K!==null&&K(w,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var ie=cS(O,r);xo(e,t,ie,pn(e))}else xo(e,t,r,pn(e))}catch(ce){xo(e,t,{then:function(){},status:"rejected",reason:ce},pn())}finally{N.p=f,y!==null&&w.types!==null&&(y.types=w.types),M.T=y}}function pS(){}function vu(e,t,a,r){if(e.tag!==5)throw Error(i(476));var c=rp(e).queue;lp(e,c,t,H,a===null?pS:function(){return op(e),a(r)})}function rp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:H},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function op(e){var t=rp(e);t.next===null&&(t=e.alternate.memoizedState),xo(e,t.next.queue,{},pn())}function bu(){return Gt(Ho)}function ip(){return St().memoizedState}function sp(){return St().memoizedState}function gS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=pn();e=Va(a);var r=qa(t,e,a);r!==null&&(an(r,t,a),po(r,t,a)),t={cache:Kc()},e.payload=t;return}t=t.return}}function yS(e,t,a){var r=pn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Li(e)?up(t,a):(a=Hc(e,t,a,r),a!==null&&(an(a,e,r),fp(a,t,r)))}function cp(e,t,a){var r=pn();xo(e,t,a,r)}function xo(e,t,a,r){var c={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Li(e))up(t,c);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(c.hasEagerState=!0,c.eagerState=w,cn(w,y))return gi(e,t,c,0),rt===null&&pi(),!1}catch{}finally{}if(a=Hc(e,t,c,r),a!==null)return an(a,e,r),fp(a,t,r),!0}return!1}function xu(e,t,a,r){if(r={lane:2,revertLane:Ju(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Li(e)){if(t)throw Error(i(479))}else t=Hc(e,a,r,2),t!==null&&an(t,e,2)}function Li(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function up(e,t){gr=Ri=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function fp(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ye(e,a)}}var So={readContext:Gt,use:zi,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};So.useEffectEvent=pt;var dp={readContext:Gt,use:zi,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:Fh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ji(4194308,4,Wh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ji(4194308,4,e,t)},useInsertionEffect:function(e,t){ji(4,2,e,t)},useMemo:function(e,t){var a=Ft();t=t===void 0?null:t;var r=e();if(jl){sn(!0);try{e()}finally{sn(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=Ft();if(a!==void 0){var c=a(t);if(jl){sn(!0);try{a(t)}finally{sn(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=yS.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=mu(e);var t=e.queue,a=cp.bind(null,ke,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:gu,useDeferredValue:function(e,t){var a=Ft();return yu(a,e,t)},useTransition:function(){var e=mu(!1);return e=lp.bind(null,ke,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=ke,c=Ft();if(Pe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),rt===null)throw Error(i(349));(Ve&127)!==0||Dh(r,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Fh(kh.bind(null,r,f,e),[e]),r.flags|=2048,vr(9,{destroy:void 0},jh.bind(null,r,f,a,t),null),a},useId:function(){var e=Ft(),t=rt.identifierPrefix;if(Pe){var a=Zn,r=Qn;a=(r&~(1<<32-zt(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ni++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=uS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bu,useFormState:qh,useActionState:qh,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=xu.bind(null,ke,!0,a),a.dispatch=t,[e,t]},useMemoCache:uu,useCacheRefresh:function(){return Ft().memoizedState=gS.bind(null,ke)},useEffectEvent:function(e){var t=Ft(),a={impl:e};return t.memoizedState=a,function(){if((Ze&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Su={readContext:Gt,use:zi,useCallback:tp,useContext:Gt,useEffect:pu,useImperativeHandle:ep,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:np,useReducer:Di,useRef:Kh,useState:function(){return Di(ba)},useDebugValue:gu,useDeferredValue:function(e,t){var a=St();return ap(a,tt.memoizedState,e,t)},useTransition:function(){var e=Di(ba)[0],t=St().memoizedState;return[typeof e=="boolean"?e:bo(e),t]},useSyncExternalStore:zh,useId:ip,useHostTransitionStatus:bu,useFormState:Ph,useActionState:Ph,useOptimistic:function(e,t){var a=St();return Bh(a,tt,e,t)},useMemoCache:uu,useCacheRefresh:sp};Su.useEffectEvent=Qh;var mp={readContext:Gt,use:zi,useCallback:tp,useContext:Gt,useEffect:pu,useImperativeHandle:ep,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:np,useReducer:du,useRef:Kh,useState:function(){return du(ba)},useDebugValue:gu,useDeferredValue:function(e,t){var a=St();return tt===null?yu(a,e,t):ap(a,tt.memoizedState,e,t)},useTransition:function(){var e=du(ba)[0],t=St().memoizedState;return[typeof e=="boolean"?e:bo(e),t]},useSyncExternalStore:zh,useId:ip,useHostTransitionStatus:bu,useFormState:Xh,useActionState:Xh,useOptimistic:function(e,t){var a=St();return tt!==null?Bh(a,tt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:uu,useCacheRefresh:sp};mp.useEffectEvent=Qh;function wu(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Eu={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=pn(),c=Va(r);c.payload=t,a!=null&&(c.callback=a),t=qa(e,c,r),t!==null&&(an(t,e,r),po(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=pn(),c=Va(r);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=qa(e,c,r),t!==null&&(an(t,e,r),po(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=pn(),r=Va(a);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,a),t!==null&&(an(t,e,a),po(t,e,a))}};function hp(e,t,a,r,c,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,f,y):t.prototype&&t.prototype.isPureReactComponent?!oo(a,r)||!oo(c,f):!0}function pp(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Eu.enqueueReplaceState(t,t.state,null)}function kl(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function gp(e){hi(e)}function yp(e){console.error(e)}function vp(e){hi(e)}function Hi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function bp(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Tu(e,t,a){return a=Va(a),a.tag=3,a.payload={element:null},a.callback=function(){Hi(e,t)},a}function xp(e){return e=Va(e),e.tag=3,e}function Sp(e,t,a,r){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=r.value;e.payload=function(){return c(f)},e.callback=function(){bp(t,a,r)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){bp(t,a,r),typeof c!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})})}function vS(e,t,a,r,c){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&ur(t,a,c,!0),a=fn.current,a!==null){switch(a.tag){case 31:case 13:return On===null?Fi():a.alternate===null&&gt===0&&(gt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,r===Ti?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),Fu(e,r,c)),!1;case 22:return a.flags|=65536,r===Ti?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),Fu(e,r,c)),!1}throw Error(i(435,a.tag))}return Fu(e,r,c),Fi(),!1}if(Pe)return t=fn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==Vc&&(e=Error(i(422),{cause:r}),co(An(e,a)))):(r!==Vc&&(t=Error(i(423),{cause:r}),co(An(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=An(r,a),c=Tu(e.stateNode,r,c),eu(e,c),gt!==4&&(gt=2)),!1;var f=Error(i(520),{cause:r});if(f=An(f,a),Ro===null?Ro=[f]:Ro.push(f),gt!==4&&(gt=2),t===null)return!0;r=An(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Tu(a.stateNode,r,e),eu(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"&&(Qa===null||!Qa.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=xp(c),Sp(c,e,a,r),eu(a,c),!1}a=a.return}while(a!==null);return!1}var Cu=Error(i(461)),Ct=!1;function Yt(e,t,a,r){t.child=e===null?Ch(t,null,a,r):Dl(t,e.child,a,r)}function wp(e,t,a,r,c){a=a.render;var f=t.ref;if("ref"in r){var y={};for(var w in r)w!=="ref"&&(y[w]=r[w])}else y=r;return Rl(t),r=ou(e,t,a,y,f,c),w=iu(),e!==null&&!Ct?(su(e,t,c),xa(e,t,c)):(Pe&&w&&Gc(t),t.flags|=1,Yt(e,t,r,c),t.child)}function Ep(e,t,a,r,c){if(e===null){var f=a.type;return typeof f=="function"&&!Bc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Tp(e,t,f,r,c)):(e=vi(a.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Du(e,c)){var y=f.memoizedProps;if(a=a.compare,a=a!==null?a:oo,a(y,r)&&e.ref===t.ref)return xa(e,t,c)}return t.flags|=1,e=ha(f,r),e.ref=t.ref,e.return=t,t.child=e}function Tp(e,t,a,r,c){if(e!==null){var f=e.memoizedProps;if(oo(f,r)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=r=f,Du(e,c))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,xa(e,t,c)}return Mu(e,t,a,r,c)}function Cp(e,t,a,r){var c=r.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~f}else r=0,t.child=null;return Mp(e,t,f,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wi(t,f!==null?f.cachePool:null),f!==null?_h(t,f):nu(),Rh(t);else return r=t.lanes=536870912,Mp(e,t,f!==null?f.baseLanes|a:a,a,r)}else f!==null?(wi(t,f.cachePool),_h(t,f),$a(),t.memoizedState=null):(e!==null&&wi(t,null),nu(),$a());return Yt(e,t,c,a),t.child}function wo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mp(e,t,a,r,c){var f=Qc();return f=f===null?null:{parent:Et._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&wi(t,null),nu(),Rh(t),e!==null&&ur(e,t,r,!0),t.childLanes=c,null}function Bi(e,t){return t=Ii({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,a){return Dl(t,e.child,null,a),e=Bi(t,t.pendingProps),e.flags|=2,dn(t),t.memoizedState=null,e}function bS(e,t,a){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(r.mode==="hidden")return e=Bi(t,r),t.lanes=536870912,wo(null,e);if(lu(t),(e=ct)?(e=Ug(e,Nn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Qn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},a=uh(e),a.return=t,t.child=a,It=t,ct=null)):e=null,e===null)throw Ia(t);return t.lanes=536870912,null}return Bi(t,r)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(lu(t),c)if(t.flags&256)t.flags&=-257,t=Ap(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Ct||ur(e,t,a,!1),c=(a&e.childLanes)!==0,Ct||c){if(r=rt,r!==null&&(y=Ne(r,a),y!==0&&y!==f.retryLane))throw f.retryLane=y,Cl(e,y),an(r,e,y),Cu;Fi(),t=Ap(e,t,a)}else e=f.treeContext,ct=zn(y.nextSibling),It=t,Pe=!0,Ua=null,Nn=!1,e!==null&&mh(t,e),t=Bi(t,r),t.flags|=4096;return t}return e=ha(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ui(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 Mu(e,t,a,r,c){return Rl(t),a=ou(e,t,a,r,void 0,c),r=iu(),e!==null&&!Ct?(su(e,t,c),xa(e,t,c)):(Pe&&r&&Gc(t),t.flags|=1,Yt(e,t,a,c),t.child)}function _p(e,t,a,r,c,f){return Rl(t),t.updateQueue=null,a=Oh(t,r,a,c),Nh(e),r=iu(),e!==null&&!Ct?(su(e,t,f),xa(e,t,f)):(Pe&&r&&Gc(t),t.flags|=1,Yt(e,t,a,f),t.child)}function Rp(e,t,a,r,c){if(Rl(t),t.stateNode===null){var f=or,y=a.contextType;typeof y=="object"&&y!==null&&(f=Gt(y)),f=new a(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Eu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},Jc(t),y=a.contextType,f.context=typeof y=="object"&&y!==null?Gt(y):or,f.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(wu(t,a,y,r),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&&Eu.enqueueReplaceState(f,f.state,null),yo(t,r,f,c),go(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){f=t.stateNode;var w=t.memoizedProps,O=kl(a,w);f.props=O;var K=f.context,ie=a.contextType;y=or,typeof ie=="object"&&ie!==null&&(y=Gt(ie));var ce=a.getDerivedStateFromProps;ie=typeof ce=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,ie||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||K!==y)&&pp(t,f,r,y),Ya=!1;var J=t.memoizedState;f.state=J,yo(t,r,f,c),go(),K=t.memoizedState,w||J!==K||Ya?(typeof ce=="function"&&(wu(t,a,ce,r),K=t.memoizedState),(O=Ya||hp(t,a,O,r,J,K,y))?(ie||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=r,t.memoizedState=K),f.props=r,f.state=K,f.context=y,r=O):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{f=t.stateNode,Wc(e,t),y=t.memoizedProps,ie=kl(a,y),f.props=ie,ce=t.pendingProps,J=f.context,K=a.contextType,O=or,typeof K=="object"&&K!==null&&(O=Gt(K)),w=a.getDerivedStateFromProps,(K=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==ce||J!==O)&&pp(t,f,r,O),Ya=!1,J=t.memoizedState,f.state=J,yo(t,r,f,c),go();var te=t.memoizedState;y!==ce||J!==te||Ya||e!==null&&e.dependencies!==null&&xi(e.dependencies)?(typeof w=="function"&&(wu(t,a,w,r),te=t.memoizedState),(ie=Ya||hp(t,a,ie,r,J,te,O)||e!==null&&e.dependencies!==null&&xi(e.dependencies))?(K||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,te,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,te,O)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=te),f.props=r,f.state=te,f.context=O,r=ie):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),r=!1)}return f=r,Ui(e,t),r=(t.flags&128)!==0,f||r?(f=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&r?(t.child=Dl(t,e.child,null,c),t.child=Dl(t,null,a,c)):Yt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=xa(e,t,c),e}function Np(e,t,a,r){return Al(),t.flags|=256,Yt(e,t,a,r),t.child}var Au={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _u(e){return{baseLanes:e,cachePool:bh()}}function Ru(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=hn),e}function Op(e,t,a){var r=t.pendingProps,c=!1,f=(t.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(c?Pa(t):$a(),(e=ct)?(e=Ug(e,Nn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Qn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},a=uh(e),a.return=t,t.child=a,It=t,ct=null)):e=null,e===null)throw Ia(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var w=r.children;return r=r.fallback,c?($a(),c=t.mode,w=Ii({mode:"hidden",children:w},c),r=Ml(r,c,a,null),w.return=t,r.return=t,w.sibling=r,t.child=w,r=t.child,r.memoizedState=_u(a),r.childLanes=Ru(e,y,a),t.memoizedState=Au,wo(null,r)):(Pa(t),Nu(t,w))}var O=e.memoizedState;if(O!==null&&(w=O.dehydrated,w!==null)){if(f)t.flags&256?(Pa(t),t.flags&=-257,t=Ou(e,t,a)):t.memoizedState!==null?($a(),t.child=e.child,t.flags|=128,t=null):($a(),w=r.fallback,c=t.mode,r=Ii({mode:"visible",children:r.children},c),w=Ml(w,c,a,null),w.flags|=2,r.return=t,w.return=t,r.sibling=w,t.child=r,Dl(t,e.child,null,a),r=t.child,r.memoizedState=_u(a),r.childLanes=Ru(e,y,a),t.memoizedState=Au,t=wo(null,r));else if(Pa(t),df(w)){if(y=w.nextSibling&&w.nextSibling.dataset,y)var K=y.dgst;y=K,r=Error(i(419)),r.stack="",r.digest=y,co({value:r,source:null,stack:null}),t=Ou(e,t,a)}else if(Ct||ur(e,t,a,!1),y=(a&e.childLanes)!==0,Ct||y){if(y=rt,y!==null&&(r=Ne(y,a),r!==0&&r!==O.retryLane))throw O.retryLane=r,Cl(e,r),an(y,e,r),Cu;ff(w)||Fi(),t=Ou(e,t,a)}else ff(w)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,ct=zn(w.nextSibling),It=t,Pe=!0,Ua=null,Nn=!1,e!==null&&mh(t,e),t=Nu(t,r.children),t.flags|=4096);return t}return c?($a(),w=r.fallback,c=t.mode,O=e.child,K=O.sibling,r=ha(O,{mode:"hidden",children:r.children}),r.subtreeFlags=O.subtreeFlags&65011712,K!==null?w=ha(K,w):(w=Ml(w,c,a,null),w.flags|=2),w.return=t,r.return=t,r.sibling=w,t.child=r,wo(null,r),r=t.child,w=e.child.memoizedState,w===null?w=_u(a):(c=w.cachePool,c!==null?(O=Et._currentValue,c=c.parent!==O?{parent:O,pool:O}:c):c=bh(),w={baseLanes:w.baseLanes|a,cachePool:c}),r.memoizedState=w,r.childLanes=Ru(e,y,a),t.memoizedState=Au,wo(e.child,r)):(Pa(t),a=e.child,e=a.sibling,a=ha(a,{mode:"visible",children:r.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 Nu(e,t){return t=Ii({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ii(e,t){return e=un(22,e,null,t),e.lanes=0,e}function Ou(e,t,a){return Dl(t,e.child,null,a),e=Nu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zp(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$c(e.return,t,a)}function zu(e,t,a,r,c,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:c,treeForkCount:f}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=a,y.tailMode=c,y.treeForkCount=f)}function Dp(e,t,a){var r=t.pendingProps,c=r.revealOrder,f=r.tail;r=r.children;var y=xt.current,w=(y&2)!==0;if(w?(y=y&1|2,t.flags|=128):y&=1,Z(xt,y),Yt(e,t,r,a),r=Pe?so:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zp(e,a,t);else if(e.tag===19)zp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&_i(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),zu(t,!1,c,a,f,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&_i(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}zu(t,!0,a,null,f,r);break;case"together":zu(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function xa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Fa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ur(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=ha(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ha(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&&xi(e)))}function xS(e,t,a){switch(t.tag){case 3:W(t,t.stateNode.containerInfo),Ga(t,Et,e.memoizedState.cache),Al();break;case 27:case 5:ge(t);break;case 4:W(t,t.stateNode.containerInfo);break;case 10:Ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lu(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Pa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Op(e,t,a):(Pa(t),e=xa(e,t,a),e!==null?e.sibling:null);Pa(t);break;case 19:var c=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(ur(e,t,a,!1),r=(a&t.childLanes)!==0),c){if(r)return Dp(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Z(xt,xt.current),r)break;return null;case 22:return t.lanes=0,Cp(e,t,a,t.pendingProps);case 24:Ga(t,Et,e.memoizedState.cache)}return xa(e,t,a)}function jp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!Du(e,a)&&(t.flags&128)===0)return Ct=!1,xS(e,t,a);Ct=(e.flags&131072)!==0}else Ct=!1,Pe&&(t.flags&1048576)!==0&&dh(t,so,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ol(t.elementType),t.type=e,typeof e=="function")Bc(e)?(r=kl(e,r),t.tag=1,t=Rp(null,t,e,r,a)):(t.tag=0,t=Mu(null,t,e,r,a));else{if(e!=null){var c=e.$$typeof;if(c===Y){t.tag=11,t=wp(null,t,e,r,a);break e}else if(c===P){t.tag=14,t=Ep(null,t,e,r,a);break e}}throw t=V(e)||e,Error(i(306,t,""))}}return t;case 0:return Mu(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,c=kl(r,t.pendingProps),Rp(e,t,r,c,a);case 3:e:{if(W(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var f=t.memoizedState;c=f.element,Wc(e,t),yo(t,r,null,a);var y=t.memoizedState;if(r=y.cache,Ga(t,Et,r),r!==f.cache&&Xc(t,[Et],a,!0),go(),r=y.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Np(e,t,r,a);break e}else if(r!==c){c=An(Error(i(424)),t),co(c),t=Np(e,t,r,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(ct=zn(e.firstChild),It=t,Pe=!0,Ua=null,Nn=!0,a=Ch(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Al(),r===c){t=xa(e,t,a);break e}Yt(e,t,r,a)}t=t.child}return t;case 26:return Ui(e,t),e===null?(a=Pg(t.type,null,t.pendingProps,null))?t.memoizedState=a:Pe||(a=t.type,e=t.pendingProps,r=ns(me.current).createElement(a),r[je]=t,r[lt]=e,Vt(r,a,e),Lt(r),t.stateNode=r):t.memoizedState=Pg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&Pe&&(r=t.stateNode=Yg(t.type,t.pendingProps,me.current),It=t,Nn=!0,c=ct,el(t.type)?(mf=c,ct=zn(r.firstChild)):ct=c),Yt(e,t,t.pendingProps.children,a),Ui(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((c=r=ct)&&(r=QS(r,t.type,t.pendingProps,Nn),r!==null?(t.stateNode=r,It=t,ct=zn(r.firstChild),Nn=!1,c=!0):c=!1),c||Ia(t)),ge(t),c=t.type,f=t.pendingProps,y=e!==null?e.memoizedProps:null,r=f.children,sf(c,f)?r=null:y!==null&&sf(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=ou(e,t,fS,null,null,a),Ho._currentValue=c),Ui(e,t),Yt(e,t,r,a),t.child;case 6:return e===null&&Pe&&((e=a=ct)&&(a=ZS(a,t.pendingProps,Nn),a!==null?(t.stateNode=a,It=t,ct=null,e=!0):e=!1),e||Ia(t)),null;case 13:return Op(e,t,a);case 4:return W(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Dl(t,null,r,a):Yt(e,t,r,a),t.child;case 11:return wp(e,t,t.type,t.pendingProps,a);case 7:return Yt(e,t,t.pendingProps,a),t.child;case 8:return Yt(e,t,t.pendingProps.children,a),t.child;case 12:return Yt(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Ga(t,t.type,r.value),Yt(e,t,r.children,a),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,Rl(t),c=Gt(c),r=r(c),t.flags|=1,Yt(e,t,r,a),t.child;case 14:return Ep(e,t,t.type,t.pendingProps,a);case 15:return Tp(e,t,t.type,t.pendingProps,a);case 19:return Dp(e,t,a);case 31:return bS(e,t,a);case 22:return Cp(e,t,a,t.pendingProps);case 24:return Rl(t),r=Gt(Et),e===null?(c=Qc(),c===null&&(c=rt,f=Kc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:r,cache:c},Jc(t),Ga(t,Et,c)):((e.lanes&a)!==0&&(Wc(e,t),yo(t,null,null,a),go()),c=e.memoizedState,f=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ga(t,Et,r)):(r=f.cache,Ga(t,Et,r),r!==c.cache&&Xc(t,[Et],a,!0))),Yt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Sa(e){e.flags|=4}function ju(e,t,a,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(ig())e.flags|=8192;else throw zl=Ti,Zc}else e.flags&=-16777217}function kp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qg(t))if(ig())e.flags|=8192;else throw zl=Ti,Zc}function Gi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Dt():536870912,e.lanes|=t,wr|=t)}function Eo(e,t){if(!Pe)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 r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function SS(e,t,a){var r=t.pendingProps;switch(Yc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ya(Et),le(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(cr(t)?Sa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,qc())),ut(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Sa(t),f!==null?(ut(t),kp(t,f)):(ut(t),ju(t,c,null,r,a))):f?f!==e.memoizedState?(Sa(t),ut(t),kp(t,f)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Sa(t),ut(t),ju(t,c,e,r,a)),null;case 27:if(we(t),a=me.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Sa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ut(t),null}e=oe.current,cr(t)?hh(t):(e=Yg(c,r,a),t.stateNode=e,Sa(t))}return ut(t),null;case 5:if(we(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Sa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ut(t),null}if(f=oe.current,cr(t))hh(t);else{var y=ns(me.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?y.createElement(c,{is:r.is}):y.createElement(c)}}f[je]=t,f[lt]=r;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(Vt(f,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Sa(t)}}return ut(t),ju(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Sa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(e=me.current,cr(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,c=It,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[je]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||Og(e.nodeValue,a)),e||Ia(t,!0)}else e=ns(e).createTextNode(r),e[je]=t,t.stateNode=e}return ut(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=cr(t),a!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[je]=t}else Al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else a=qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(dn(t),t):(dn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return ut(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=cr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[je]=t}else Al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),c=!1}else c=qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(dn(t),t):(dn(t),null)}return dn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==c&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Gi(t,t.updateQueue),ut(t),null);case 4:return le(),e===null&&nf(t.stateNode.containerInfo),ut(t),null;case 10:return ya(t.type),ut(t),null;case 19:if(L(xt),r=t.memoizedState,r===null)return ut(t),null;if(c=(t.flags&128)!==0,f=r.rendering,f===null)if(c)Eo(r,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=_i(e),f!==null){for(t.flags|=128,Eo(r,!1),e=f.updateQueue,t.updateQueue=e,Gi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ch(a,e),a=a.sibling;return Z(xt,xt.current&1|2),Pe&&pa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&dt()>$i&&(t.flags|=128,c=!0,Eo(r,!1),t.lanes=4194304)}else{if(!c)if(e=_i(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Gi(t,e),Eo(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!Pe)return ut(t),null}else 2*dt()-r.renderingStartTime>$i&&a!==536870912&&(t.flags|=128,c=!0,Eo(r,!1),t.lanes=4194304);r.isBackwards?(f.sibling=t.child,t.child=f):(e=r.last,e!==null?e.sibling=f:t.child=f,r.last=f)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=dt(),e.sibling=null,a=xt.current,Z(xt,c?a&1|2:a&1),Pe&&pa(t,r.treeForkCount),e):(ut(t),null);case 22:case 23:return dn(t),au(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),a=t.updateQueue,a!==null&&Gi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&L(Nl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ya(Et),ut(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function wS(e,t){switch(Yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(Et),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(dn(t),t.alternate===null)throw Error(i(340));Al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(xt),null;case 4:return le(),null;case 10:return ya(t.type),null;case 22:case 23:return dn(t),au(),e!==null&&L(Nl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(Et),null;case 25:return null;default:return null}}function Lp(e,t){switch(Yc(t),t.tag){case 3:ya(Et),le();break;case 26:case 27:case 5:we(t);break;case 4:le();break;case 31:t.memoizedState!==null&&dn(t);break;case 13:dn(t);break;case 19:L(xt);break;case 10:ya(t.type);break;case 22:case 23:dn(t),au(),e!==null&&L(Nl);break;case 24:ya(Et)}}function To(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var c=r.next;a=c;do{if((a.tag&e)===e){r=void 0;var f=a.create,y=a.inst;r=f(),y.destroy=r}a=a.next}while(a!==c)}}catch(w){et(t,t.return,w)}}function Xa(e,t,a){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var f=c.next;r=f;do{if((r.tag&e)===e){var y=r.inst,w=y.destroy;if(w!==void 0){y.destroy=void 0,c=t;var O=a,K=w;try{K()}catch(ie){et(c,O,ie)}}}r=r.next}while(r!==f)}}catch(ie){et(t,t.return,ie)}}function Hp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ah(t,a)}catch(r){et(e,e.return,r)}}}function Bp(e,t,a){a.props=kl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){et(e,t,r)}}function Co(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(c){et(e,t,c)}}function Jn(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(c){et(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){et(e,t,c)}else a.current=null}function Up(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(c){et(e,e.return,c)}}function ku(e,t,a){try{var r=e.stateNode;qS(r,e.type,a,t),r[lt]=t}catch(c){et(e,e.return,c)}}function Ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&el(e.type)||e.tag===4}function Lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ip(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&&el(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 Hu(e,t,a){var r=e.tag;if(r===5||r===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=da));else if(r!==4&&(r===27&&el(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Hu(e,t,a),e=e.sibling;e!==null;)Hu(e,t,a),e=e.sibling}function Yi(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&el(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Yi(e,t,a),e=e.sibling;e!==null;)Yi(e,t,a),e=e.sibling}function Gp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Vt(t,r,a),t[je]=e,t[lt]=a}catch(f){et(e,e.return,f)}}var wa=!1,Mt=!1,Bu=!1,Yp=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function ES(e,t){if(e=e.containerInfo,rf=cs,e=eh(e),Oc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var c=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var y=0,w=-1,O=-1,K=0,ie=0,ce=e,J=null;t:for(;;){for(var te;ce!==a||c!==0&&ce.nodeType!==3||(w=y+c),ce!==f||r!==0&&ce.nodeType!==3||(O=y+r),ce.nodeType===3&&(y+=ce.nodeValue.length),(te=ce.firstChild)!==null;)J=ce,ce=te;for(;;){if(ce===e)break t;if(J===a&&++K===c&&(w=y),J===f&&++ie===r&&(O=y),(te=ce.nextSibling)!==null)break;ce=J,J=ce.parentNode}ce=te}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},cs=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,r=a.stateNode;try{var ve=kl(a.type,c);e=r.getSnapshotBeforeUpdate(ve,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(_e){et(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)uf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uf(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,Ht=e;break}Ht=t.return}}function Vp(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:Ta(e,a),r&4&&To(5,a);break;case 1:if(Ta(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){et(a,a.return,y)}else{var c=kl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){et(a,a.return,y)}}r&64&&Hp(a),r&512&&Co(a,a.return);break;case 3:if(Ta(e,a),r&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{Ah(e,t)}catch(y){et(a,a.return,y)}}break;case 27:t===null&&r&4&&Gp(a);case 26:case 5:Ta(e,a),t===null&&r&4&&Up(a),r&512&&Co(a,a.return);break;case 12:Ta(e,a);break;case 31:Ta(e,a),r&4&&$p(e,a);break;case 13:Ta(e,a),r&4&&Xp(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=zS.bind(null,a),JS(e,a))));break;case 22:if(r=a.memoizedState!==null||wa,!r){t=t!==null&&t.memoizedState!==null||Mt,c=wa;var f=Mt;wa=r,(Mt=t)&&!f?Ca(e,a,(a.subtreeFlags&8772)!==0):Ta(e,a),wa=c,Mt=f}break;case 30:break;default:Ta(e,a)}}function qp(e){var t=e.alternate;t!==null&&(e.alternate=null,qp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Jr(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 ht=null,Wt=!1;function Ea(e,t,a){for(a=a.child;a!==null;)Pp(e,t,a),a=a.sibling}function Pp(e,t,a){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(ia,a)}catch{}switch(a.tag){case 26:Mt||Jn(a,t),Ea(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Mt||Jn(a,t);var r=ht,c=Wt;el(a.type)&&(ht=a.stateNode,Wt=!1),Ea(e,t,a),jo(a.stateNode),ht=r,Wt=c;break;case 5:Mt||Jn(a,t);case 6:if(r=ht,c=Wt,ht=null,Ea(e,t,a),ht=r,Wt=c,ht!==null)if(Wt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(f){et(a,t,f)}else try{ht.removeChild(a.stateNode)}catch(f){et(a,t,f)}break;case 18:ht!==null&&(Wt?(e=ht,Hg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Nr(e)):Hg(ht,a.stateNode));break;case 4:r=ht,c=Wt,ht=a.stateNode.containerInfo,Wt=!0,Ea(e,t,a),ht=r,Wt=c;break;case 0:case 11:case 14:case 15:Xa(2,a,t),Mt||Xa(4,a,t),Ea(e,t,a);break;case 1:Mt||(Jn(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Bp(a,t,r)),Ea(e,t,a);break;case 21:Ea(e,t,a);break;case 22:Mt=(r=Mt)||a.memoizedState!==null,Ea(e,t,a),Mt=r;break;default:Ea(e,t,a)}}function $p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nr(e)}catch(a){et(t,t.return,a)}}}function Xp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nr(e)}catch(a){et(t,t.return,a)}}function TS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yp),t;default:throw Error(i(435,e.tag))}}function Vi(e,t){var a=TS(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var c=DS.bind(null,e,r);r.then(c,c)}})}function en(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var c=a[r],f=e,y=t,w=y;e:for(;w!==null;){switch(w.tag){case 27:if(el(w.type)){ht=w.stateNode,Wt=!1;break e}break;case 5:ht=w.stateNode,Wt=!1;break e;case 3:case 4:ht=w.stateNode.containerInfo,Wt=!0;break e}w=w.return}if(ht===null)throw Error(i(160));Pp(f,y,c),ht=null,Wt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Kp(t,e),t=t.sibling}var In=null;function Kp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(t,e),tn(e),r&4&&(Xa(3,e,e.return),To(3,e),Xa(5,e,e.return));break;case 1:en(t,e),tn(e),r&512&&(Mt||a===null||Jn(a,a.return)),r&64&&wa&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var c=In;if(en(t,e),tn(e),r&512&&(Mt||a===null||Jn(a,a.return)),r&4){var f=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":f=c.getElementsByTagName("title")[0],(!f||f[En]||f[je]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(r),c.head.insertBefore(f,c.querySelector("head > title"))),Vt(f,r,a),f[je]=e,Lt(f),r=f;break e;case"link":var y=Kg("link","href",c).get(r+(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=c.createElement(r),Vt(f,r,a),c.head.appendChild(f);break;case"meta":if(y=Kg("meta","content",c).get(r+(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=c.createElement(r),Vt(f,r,a),c.head.appendChild(f);break;default:throw Error(i(468,r))}f[je]=e,Lt(f),r=f}e.stateNode=r}else Fg(c,e.type,e.stateNode);else e.stateNode=Xg(c,r,e.memoizedProps);else f!==r?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,r===null?Fg(c,e.type,e.stateNode):Xg(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&ku(e,e.memoizedProps,a.memoizedProps)}break;case 27:en(t,e),tn(e),r&512&&(Mt||a===null||Jn(a,a.return)),a!==null&&r&4&&ku(e,e.memoizedProps,a.memoizedProps);break;case 5:if(en(t,e),tn(e),r&512&&(Mt||a===null||Jn(a,a.return)),e.flags&32){c=e.stateNode;try{Wl(c,"")}catch(ve){et(e,e.return,ve)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,ku(e,c,a!==null?a.memoizedProps:c)),r&1024&&(Bu=!0);break;case 6:if(en(t,e),tn(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(ve){et(e,e.return,ve)}}break;case 3:if(rs=null,c=In,In=as(t.containerInfo),en(t,e),In=c,tn(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Nr(t.containerInfo)}catch(ve){et(e,e.return,ve)}Bu&&(Bu=!1,Fp(e));break;case 4:r=In,In=as(e.stateNode.containerInfo),en(t,e),tn(e),In=r;break;case 12:en(t,e),tn(e);break;case 31:en(t,e),tn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Vi(e,r)));break;case 13:en(t,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Pi=dt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Vi(e,r)));break;case 22:c=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,K=wa,ie=Mt;if(wa=K||c,Mt=ie||O,en(t,e),Mt=ie,wa=K,tn(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||O||wa||Mt||Ll(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){O=a=t;try{if(f=O.stateNode,c)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{w=O.stateNode;var ce=O.memoizedProps.style,J=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;w.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(ve){et(O,O.return,ve)}}}else if(t.tag===6){if(a===null){O=t;try{O.stateNode.nodeValue=c?"":O.memoizedProps}catch(ve){et(O,O.return,ve)}}}else if(t.tag===18){if(a===null){O=t;try{var te=O.stateNode;c?Bg(te,!0):Bg(O.stateNode,!1)}catch(ve){et(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}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Vi(e,a))));break;case 19:en(t,e),tn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Vi(e,r)));break;case 30:break;case 21:break;default:en(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Ip(r)){a=r;break}r=r.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,f=Lu(e);Yi(e,f,c);break;case 5:var y=a.stateNode;a.flags&32&&(Wl(y,""),a.flags&=-33);var w=Lu(e);Yi(e,w,y);break;case 3:case 4:var O=a.stateNode.containerInfo,K=Lu(e);Hu(e,K,O);break;default:throw Error(i(161))}}catch(ie){et(e,e.return,ie)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vp(e,t.alternate,t),t=t.sibling}function Ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Xa(4,t,t.return),Ll(t);break;case 1:Jn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Bp(t,t.return,a),Ll(t);break;case 27:jo(t.stateNode);case 26:case 5:Jn(t,t.return),Ll(t);break;case 22:t.memoizedState===null&&Ll(t);break;case 30:Ll(t);break;default:Ll(t)}e=e.sibling}}function Ca(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,f=t,y=f.flags;switch(f.tag){case 0:case 11:case 15:Ca(c,f,a),To(4,f);break;case 1:if(Ca(c,f,a),r=f,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(K){et(r,r.return,K)}if(r=f,c=r.updateQueue,c!==null){var w=r.stateNode;try{var O=c.shared.hiddenCallbacks;if(O!==null)for(c.shared.hiddenCallbacks=null,c=0;c<O.length;c++)Mh(O[c],w)}catch(K){et(r,r.return,K)}}a&&y&64&&Hp(f),Co(f,f.return);break;case 27:Gp(f);case 26:case 5:Ca(c,f,a),a&&r===null&&y&4&&Up(f),Co(f,f.return);break;case 12:Ca(c,f,a);break;case 31:Ca(c,f,a),a&&y&4&&$p(c,f);break;case 13:Ca(c,f,a),a&&y&4&&Xp(c,f);break;case 22:f.memoizedState===null&&Ca(c,f,a),Co(f,f.return);break;case 30:break;default:Ca(c,f,a)}t=t.sibling}}function Uu(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&&uo(a))}function Iu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&uo(e))}function Gn(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qp(e,t,a,r),t=t.sibling}function Qp(e,t,a,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Gn(e,t,a,r),c&2048&&To(9,t);break;case 1:Gn(e,t,a,r);break;case 3:Gn(e,t,a,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&uo(e)));break;case 12:if(c&2048){Gn(e,t,a,r),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){et(t,t.return,O)}}else Gn(e,t,a,r);break;case 31:Gn(e,t,a,r);break;case 13:Gn(e,t,a,r);break;case 23:break;case 22:f=t.stateNode,y=t.alternate,t.memoizedState!==null?f._visibility&2?Gn(e,t,a,r):Mo(e,t):f._visibility&2?Gn(e,t,a,r):(f._visibility|=2,br(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Uu(y,t);break;case 24:Gn(e,t,a,r),c&2048&&Iu(t.alternate,t);break;default:Gn(e,t,a,r)}}function br(e,t,a,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,y=t,w=a,O=r,K=y.flags;switch(y.tag){case 0:case 11:case 15:br(f,y,w,O,c),To(8,y);break;case 23:break;case 22:var ie=y.stateNode;y.memoizedState!==null?ie._visibility&2?br(f,y,w,O,c):Mo(f,y):(ie._visibility|=2,br(f,y,w,O,c)),c&&K&2048&&Uu(y.alternate,y);break;case 24:br(f,y,w,O,c),c&&K&2048&&Iu(y.alternate,y);break;default:br(f,y,w,O,c)}t=t.sibling}}function Mo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,c=r.flags;switch(r.tag){case 22:Mo(a,r),c&2048&&Uu(r.alternate,r);break;case 24:Mo(a,r),c&2048&&Iu(r.alternate,r);break;default:Mo(a,r)}t=t.sibling}}var Ao=8192;function xr(e,t,a){if(e.subtreeFlags&Ao)for(e=e.child;e!==null;)Zp(e,t,a),e=e.sibling}function Zp(e,t,a){switch(e.tag){case 26:xr(e,t,a),e.flags&Ao&&e.memoizedState!==null&&uw(a,In,e.memoizedState,e.memoizedProps);break;case 5:xr(e,t,a);break;case 3:case 4:var r=In;In=as(e.stateNode.containerInfo),xr(e,t,a),In=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ao,Ao=16777216,xr(e,t,a),Ao=r):xr(e,t,a));break;default:xr(e,t,a)}}function Jp(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 _o(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Ht=r,eg(r,e)}Jp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wp(e),e=e.sibling}function Wp(e){switch(e.tag){case 0:case 11:case 15:_o(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:_o(e);break;case 12:_o(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qi(e)):_o(e);break;default:_o(e)}}function qi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Ht=r,eg(r,e)}Jp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xa(8,t,t.return),qi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,qi(t));break;default:qi(t)}e=e.sibling}}function eg(e,t){for(;Ht!==null;){var a=Ht;switch(a.tag){case 0:case 11:case 15:Xa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:uo(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Ht=r;else e:for(a=e;Ht!==null;){r=Ht;var c=r.sibling,f=r.return;if(qp(r),r===a){Ht=null;break e}if(c!==null){c.return=f,Ht=c;break e}Ht=f}}}var CS={getCacheForType:function(e){var t=Gt(Et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Gt(Et).controller.signal}},MS=typeof WeakMap=="function"?WeakMap:Map,Ze=0,rt=null,Ue=null,Ve=0,We=0,mn=null,Ka=!1,Sr=!1,Gu=!1,Ma=0,gt=0,Fa=0,Hl=0,Yu=0,hn=0,wr=0,Ro=null,nn=null,Vu=!1,Pi=0,tg=0,$i=1/0,Xi=null,Qa=null,_t=0,Za=null,Er=null,Aa=0,qu=0,Pu=null,ng=null,No=0,$u=null;function pn(){return(Ze&2)!==0&&Ve!==0?Ve&-Ve:M.T!==null?Ju():st()}function ag(){if(hn===0)if((Ve&536870912)===0||Pe){var e=ka;ka<<=1,(ka&3932160)===0&&(ka=262144),hn=e}else hn=536870912;return e=fn.current,e!==null&&(e.flags|=32),hn}function an(e,t,a){(e===rt&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Tr(e,0),Ja(e,Ve,hn,!1)),Q(e,a),((Ze&2)===0||e!==rt)&&(e===rt&&((Ze&2)===0&&(Hl|=a),gt===4&&Ja(e,Ve,hn,!1)),Wn(e))}function lg(e,t,a){if((Ze&6)!==0)throw Error(i(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ot(e,t),c=r?RS(e,t):Ku(e,t,!0),f=r;do{if(c===0){Sr&&!r&&Ja(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!AS(a)){c=Ku(e,t,!1),f=!1;continue}if(c===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;c=Ro;var O=w.current.memoizedState.isDehydrated;if(O&&(Tr(w,y).flags|=256),y=Ku(w,y,!1),y!==2){if(Gu&&!O){w.errorRecoveryDisabledLanes|=f,Hl|=f,c=4;break e}f=nn,nn=c,f!==null&&(nn===null?nn=f:nn.push.apply(nn,f))}c=y}if(f=!1,c!==2)continue}}if(c===1){Tr(e,0),Ja(e,t,0,!0);break}e:{switch(r=e,f=c,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ja(r,t,hn,!Ka);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=Pi+300-dt(),10<c)){if(Ja(r,t,hn,!Ka),Re(r,0,!0)!==0)break e;Aa=t,r.timeoutHandle=kg(rg.bind(null,r,a,nn,Xi,Vu,t,hn,Hl,wr,Ka,f,"Throttled",-0,0),c);break e}rg(r,a,nn,Xi,Vu,t,hn,Hl,wr,Ka,f,null,-0,0)}}break}while(!0);Wn(e)}function rg(e,t,a,r,c,f,y,w,O,K,ie,ce,J,te){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:da},Zp(t,f,ce);var ve=(f&62914560)===f?Pi-dt():(f&4194048)===f?tg-dt():0;if(ve=fw(ce,ve),ve!==null){Aa=f,e.cancelPendingCommit=ve(mg.bind(null,e,t,f,a,r,c,y,w,O,ie,ce,null,J,te)),Ja(e,f,y,!K);return}}mg(e,t,f,a,r,c,y,w,O)}function AS(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 r=0;r<a.length;r++){var c=a[r],f=c.getSnapshot;c=c.value;try{if(!cn(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ja(e,t,a,r){t&=~Yu,t&=~Hl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var f=31-zt(c),y=1<<f;r[f]=-1,c&=~y}a!==0&&he(e,a,t)}function Ki(){return(Ze&6)===0?(Oo(0),!1):!0}function Xu(){if(Ue!==null){if(We===0)var e=Ue.return;else e=Ue,ga=_l=null,cu(e),hr=null,mo=0,e=Ue;for(;e!==null;)Lp(e.alternate,e),e=e.return;Ue=null}}function Tr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,XS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Aa=0,Xu(),rt=e,Ue=a=ha(e.current,null),Ve=t,We=0,mn=null,Ka=!1,Sr=ot(e,t),Gu=!1,wr=hn=Yu=Hl=Fa=gt=0,nn=Ro=null,Vu=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-zt(r),f=1<<c;t|=e[c],r&=~f}return Ma=t,pi(),a}function og(e,t){ke=null,M.H=So,t===mr||t===Ei?(t=wh(),We=3):t===Zc?(t=wh(),We=4):We=t===Cu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,Ue===null&&(gt=1,Hi(e,An(t,e.current)))}function ig(){var e=fn.current;return e===null?!0:(Ve&4194048)===Ve?On===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===On:!1}function sg(){var e=M.H;return M.H=So,e===null?So:e}function cg(){var e=M.A;return M.A=CS,e}function Fi(){gt=4,Ka||(Ve&4194048)!==Ve&&fn.current!==null||(Sr=!0),(Fa&134217727)===0&&(Hl&134217727)===0||rt===null||Ja(rt,Ve,hn,!1)}function Ku(e,t,a){var r=Ze;Ze|=2;var c=sg(),f=cg();(rt!==e||Ve!==t)&&(Xi=null,Tr(e,t)),t=!1;var y=gt;e:do try{if(We!==0&&Ue!==null){var w=Ue,O=mn;switch(We){case 8:Xu(),y=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(t=!0);var K=We;if(We=0,mn=null,Cr(e,w,O,K),a&&Sr){y=0;break e}break;default:K=We,We=0,mn=null,Cr(e,w,O,K)}}_S(),y=gt;break}catch(ie){og(e,ie)}while(!0);return t&&e.shellSuspendCounter++,ga=_l=null,Ze=r,M.H=c,M.A=f,Ue===null&&(rt=null,Ve=0,pi()),y}function _S(){for(;Ue!==null;)ug(Ue)}function RS(e,t){var a=Ze;Ze|=2;var r=sg(),c=cg();rt!==e||Ve!==t?(Xi=null,$i=dt()+500,Tr(e,t)):Sr=ot(e,t);e:do try{if(We!==0&&Ue!==null){t=Ue;var f=mn;t:switch(We){case 1:We=0,mn=null,Cr(e,t,f,1);break;case 2:case 9:if(xh(f)){We=0,mn=null,fg(t);break}t=function(){We!==2&&We!==9||rt!==e||(We=7),Wn(e)},f.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:xh(f)?(We=0,mn=null,fg(t)):(We=0,mn=null,Cr(e,t,f,7));break;case 5:var y=null;switch(Ue.tag){case 26:y=Ue.memoizedState;case 5:case 27:var w=Ue;if(y?Qg(y):w.stateNode.complete){We=0,mn=null;var O=w.sibling;if(O!==null)Ue=O;else{var K=w.return;K!==null?(Ue=K,Qi(K)):Ue=null}break t}}We=0,mn=null,Cr(e,t,f,5);break;case 6:We=0,mn=null,Cr(e,t,f,6);break;case 8:Xu(),gt=6;break e;default:throw Error(i(462))}}NS();break}catch(ie){og(e,ie)}while(!0);return ga=_l=null,M.H=r,M.A=c,Ze=a,Ue!==null?0:(rt=null,Ve=0,pi(),gt)}function NS(){for(;Ue!==null&&!ft();)ug(Ue)}function ug(e){var t=jp(e.alternate,e,Ma);e.memoizedProps=e.pendingProps,t===null?Qi(e):Ue=t}function fg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=_p(a,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=_p(a,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:cu(t);default:Lp(a,t),t=Ue=ch(t,Ma),t=jp(a,t,Ma)}e.memoizedProps=e.pendingProps,t===null?Qi(e):Ue=t}function Cr(e,t,a,r){ga=_l=null,cu(t),hr=null,mo=0;var c=t.return;try{if(vS(e,c,t,a,Ve)){gt=1,Hi(e,An(a,e.current)),Ue=null;return}}catch(f){if(c!==null)throw Ue=c,f;gt=1,Hi(e,An(a,e.current)),Ue=null;return}t.flags&32768?(Pe||r===1?e=!0:Sr||(Ve&536870912)!==0?e=!1:(Ka=e=!0,(r===2||r===9||r===3||r===6)&&(r=fn.current,r!==null&&r.tag===13&&(r.flags|=16384))),dg(t,e)):Qi(t)}function Qi(e){var t=e;do{if((t.flags&32768)!==0){dg(t,Ka);return}e=t.return;var a=SS(t.alternate,t,Ma);if(a!==null){Ue=a;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);gt===0&&(gt=5)}function dg(e,t){do{var a=wS(e.alternate,e);if(a!==null){a.flags&=32767,Ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=a}while(e!==null);gt=6,Ue=null}function mg(e,t,a,r,c,f,y,w,O){e.cancelPendingCommit=null;do Zi();while(_t!==0);if((Ze&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=Lc,de(e,a,f,y,w,O),e===rt&&(Ue=rt=null,Ve=0),Er=t,Za=e,Aa=a,qu=f,Pu=c,ng=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,jS(Ln,function(){return vg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=M.T,M.T=null,c=N.p,N.p=2,y=Ze,Ze|=4;try{ES(e,t,a)}finally{Ze=y,N.p=c,M.T=r}}_t=1,hg(),pg(),gg()}}function hg(){if(_t===1){_t=0;var e=Za,t=Er,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var r=N.p;N.p=2;var c=Ze;Ze|=4;try{Kp(t,e);var f=of,y=eh(e.containerInfo),w=f.focusedElem,O=f.selectionRange;if(y!==w&&w&&w.ownerDocument&&Wm(w.ownerDocument.documentElement,w)){if(O!==null&&Oc(w)){var K=O.start,ie=O.end;if(ie===void 0&&(ie=K),"selectionStart"in w)w.selectionStart=K,w.selectionEnd=Math.min(ie,w.value.length);else{var ce=w.ownerDocument||document,J=ce&&ce.defaultView||window;if(J.getSelection){var te=J.getSelection(),ve=w.textContent.length,_e=Math.min(O.start,ve),at=O.end===void 0?_e:Math.min(O.end,ve);!te.extend&&_e>at&&(y=at,at=_e,_e=y);var U=Jm(w,_e),k=Jm(w,at);if(U&&k&&(te.rangeCount!==1||te.anchorNode!==U.node||te.anchorOffset!==U.offset||te.focusNode!==k.node||te.focusOffset!==k.offset)){var X=ce.createRange();X.setStart(U.node,U.offset),te.removeAllRanges(),_e>at?(te.addRange(X),te.extend(k.node,k.offset)):(X.setEnd(k.node,k.offset),te.addRange(X))}}}}for(ce=[],te=w;te=te.parentNode;)te.nodeType===1&&ce.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ce.length;w++){var se=ce[w];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}cs=!!rf,of=rf=null}finally{Ze=c,N.p=r,M.T=a}}e.current=t,_t=2}}function pg(){if(_t===2){_t=0;var e=Za,t=Er,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var r=N.p;N.p=2;var c=Ze;Ze|=4;try{Vp(e,t.alternate,t)}finally{Ze=c,N.p=r,M.T=a}}_t=3}}function gg(){if(_t===4||_t===3){_t=0,xn();var e=Za,t=Er,a=Aa,r=ng;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?_t=5:(_t=0,Er=Za=null,yg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Qa=null),$e(a),t=t.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(ia,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=M.T,c=N.p,N.p=2,M.T=null;try{for(var f=e.onRecoverableError,y=0;y<r.length;y++){var w=r[y];f(w.value,{componentStack:w.stack})}}finally{M.T=t,N.p=c}}(Aa&3)!==0&&Zi(),Wn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===$u?No++:(No=0,$u=e):No=0,Oo(0)}}function yg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,uo(t)))}function Zi(){return hg(),pg(),gg(),vg()}function vg(){if(_t!==5)return!1;var e=Za,t=qu;qu=0;var a=$e(Aa),r=M.T,c=N.p;try{N.p=32>a?32:a,M.T=null,a=Pu,Pu=null;var f=Za,y=Aa;if(_t=0,Er=Za=null,Aa=0,(Ze&6)!==0)throw Error(i(331));var w=Ze;if(Ze|=4,Wp(f.current),Qp(f,f.current,y,a),Ze=w,Oo(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(ia,f)}catch{}return!0}finally{N.p=c,M.T=r,yg(e,t)}}function bg(e,t,a){t=An(a,t),t=Tu(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(Q(e,2),Wn(e))}function et(e,t,a){if(e.tag===3)bg(e,e,a);else for(;t!==null;){if(t.tag===3){bg(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qa===null||!Qa.has(r))){e=An(a,e),a=xp(2),r=qa(t,a,2),r!==null&&(Sp(a,r,t,e),Q(r,2),Wn(r));break}}t=t.return}}function Fu(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new MS;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(a)||(Gu=!0,c.add(a),e=OS.bind(null,e,t,a),t.then(e,e))}function OS(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,rt===e&&(Ve&a)===a&&(gt===4||gt===3&&(Ve&62914560)===Ve&&300>dt()-Pi?(Ze&2)===0&&Tr(e,0):Yu|=a,wr===Ve&&(wr=0)),Wn(e)}function xg(e,t){t===0&&(t=Dt()),e=Cl(e,t),e!==null&&(Q(e,t),Wn(e))}function zS(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),xg(e,a)}function DS(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),xg(e,a)}function jS(e,t){return on(e,t)}var Ji=null,Mr=null,Qu=!1,Wi=!1,Zu=!1,Wa=0;function Wn(e){e!==Mr&&e.next===null&&(Mr===null?Ji=Mr=e:Mr=Mr.next=e),Wi=!0,Qu||(Qu=!0,LS())}function Oo(e,t){if(!Zu&&Wi){Zu=!0;do for(var a=!1,r=Ji;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var f=0;else{var y=r.suspendedLanes,w=r.pingedLanes;f=(1<<31-zt(42|e)+1)-1,f&=c&~(y&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Tg(r,f))}else f=Ve,f=Re(r,r===rt?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||ot(r,f)||(a=!0,Tg(r,f));r=r.next}while(a);Zu=!1}}function kS(){Sg()}function Sg(){Wi=Qu=!1;var e=0;Wa!==0&&$S()&&(e=Wa);for(var t=dt(),a=null,r=Ji;r!==null;){var c=r.next,f=wg(r,t);f===0?(r.next=null,a===null?Ji=c:a.next=c,c===null&&(Mr=a)):(a=r,(e!==0||(f&3)!==0)&&(Wi=!0)),r=c}_t!==0&&_t!==5||Oo(e),Wa!==0&&(Wa=0)}function wg(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-zt(f),w=1<<y,O=c[y];O===-1?((w&a)===0||(w&r)!==0)&&(c[y]=wt(w,t)):O<=t&&(e.expiredLanes|=w),f&=~w}if(t=rt,a=Ve,a=Re(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Qt(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ot(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&Qt(r),$e(a)){case 2:case 8:a=oa;break;case 32:a=Ln;break;case 268435456:a=Ut;break;default:a=Ln}return r=Eg.bind(null,e),a=on(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&Qt(r),e.callbackPriority=2,e.callbackNode=null,2}function Eg(e,t){if(_t!==0&&_t!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Zi()&&e.callbackNode!==a)return null;var r=Ve;return r=Re(e,e===rt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(lg(e,r,t),wg(e,dt()),e.callbackNode!=null&&e.callbackNode===a?Eg.bind(null,e):null)}function Tg(e,t){if(Zi())return null;lg(e,t,!0)}function LS(){KS(function(){(Ze&6)!==0?on(Ot,kS):Sg()})}function Ju(){if(Wa===0){var e=fr;e===0&&(e=ja,ja<<=1,(ja&261888)===0&&(ja=256)),Wa=e}return Wa}function Cg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ii(""+e)}function Mg(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 HS(e,t,a,r,c){if(t==="submit"&&a&&a.stateNode===c){var f=Cg((c[lt]||null).action),y=r.submitter;y&&(t=(t=y[lt]||null)?Cg(t.formAction):y.getAttribute("formAction"),t!==null&&(f=t,y=null));var w=new fi("action","action",null,r,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Wa!==0){var O=y?Mg(c,y):new FormData(c);vu(a,{pending:!0,data:O,method:c.method,action:f},null,O)}}else typeof f=="function"&&(w.preventDefault(),O=y?Mg(c,y):new FormData(c),vu(a,{pending:!0,data:O,method:c.method,action:f},f,O))},currentTarget:c}]})}}for(var Wu=0;Wu<kc.length;Wu++){var ef=kc[Wu],BS=ef.toLowerCase(),US=ef[0].toUpperCase()+ef.slice(1);Un(BS,"on"+US)}Un(ah,"onAnimationEnd"),Un(lh,"onAnimationIteration"),Un(rh,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(tS,"onTransitionRun"),Un(nS,"onTransitionStart"),Un(aS,"onTransitionCancel"),Un(oh,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),Sl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="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(" "),IS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zo));function Ag(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],c=r.event;r=r.listeners;e:{var f=void 0;if(t)for(var y=r.length-1;0<=y;y--){var w=r[y],O=w.instance,K=w.currentTarget;if(w=w.listener,O!==f&&c.isPropagationStopped())break e;f=w,c.currentTarget=K;try{f(c)}catch(ie){hi(ie)}c.currentTarget=null,f=O}else for(y=0;y<r.length;y++){if(w=r[y],O=w.instance,K=w.currentTarget,w=w.listener,O!==f&&c.isPropagationStopped())break e;f=w,c.currentTarget=K;try{f(c)}catch(ie){hi(ie)}c.currentTarget=null,f=O}}}}function Ie(e,t){var a=t[bt];a===void 0&&(a=t[bt]=new Set);var r=e+"__bubble";a.has(r)||(_g(t,e,2,!1),a.add(r))}function tf(e,t,a){var r=0;t&&(r|=4),_g(a,e,r,t)}var es="_reactListening"+Math.random().toString(36).slice(2);function nf(e){if(!e[es]){e[es]=!0,Sm.forEach(function(a){a!=="selectionchange"&&(IS.has(a)||tf(a,!1,e),tf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[es]||(t[es]=!0,tf("selectionchange",!1,t))}}function _g(e,t,a,r){switch(ay(t)){case 2:var c=hw;break;case 8:c=pw;break;default:c=vf}a=c.bind(null,t,a,e),c=void 0,!wc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function af(e,t,a,r,c){var f=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var w=r.stateNode.containerInfo;if(w===c)break;if(y===4)for(y=r.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;w!==null;){if(y=Fn(w),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){r=f=y;continue e}w=w.parentNode}}r=r.return}Dm(function(){var K=f,ie=xc(a),ce=[];e:{var J=ih.get(e);if(J!==void 0){var te=fi,ve=e;switch(e){case"keypress":if(ci(a)===0)break e;case"keydown":case"keyup":te=D1;break;case"focusin":ve="focus",te=Mc;break;case"focusout":ve="blur",te=Mc;break;case"beforeblur":case"afterblur":te=Mc;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":te=Lm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=S1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=L1;break;case ah:case lh:case rh:te=T1;break;case oh:te=B1;break;case"scroll":case"scrollend":te=b1;break;case"wheel":te=I1;break;case"copy":case"cut":case"paste":te=M1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Bm;break;case"toggle":case"beforetoggle":te=Y1}var _e=(t&4)!==0,at=!_e&&(e==="scroll"||e==="scrollend"),U=_e?J!==null?J+"Capture":null:J;_e=[];for(var k=K,X;k!==null;){var se=k;if(X=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||X===null||U===null||(se=Wr(k,U),se!=null&&_e.push(Do(k,se,X))),at)break;k=k.return}0<_e.length&&(J=new te(J,ve,null,a,ie),ce.push({event:J,listeners:_e}))}}if((t&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",J&&a!==bc&&(ve=a.relatedTarget||a.fromElement)&&(Fn(ve)||ve[jt]))break e;if((te||J)&&(J=ie.window===ie?ie:(J=ie.ownerDocument)?J.defaultView||J.parentWindow:window,te?(ve=a.relatedTarget||a.toElement,te=K,ve=ve?Fn(ve):null,ve!==null&&(at=u(ve),_e=ve.tag,ve!==at||_e!==5&&_e!==27&&_e!==6)&&(ve=null)):(te=null,ve=K),te!==ve)){if(_e=Lm,se="onMouseLeave",U="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(_e=Bm,se="onPointerLeave",U="onPointerEnter",k="pointer"),at=te==null?J:ua(te),X=ve==null?J:ua(ve),J=new _e(se,k+"leave",te,a,ie),J.target=at,J.relatedTarget=X,se=null,Fn(ie)===K&&(_e=new _e(U,k+"enter",ve,a,ie),_e.target=X,_e.relatedTarget=at,se=_e),at=se,te&&ve)t:{for(_e=GS,U=te,k=ve,X=0,se=U;se;se=_e(se))X++;se=0;for(var Ae=k;Ae;Ae=_e(Ae))se++;for(;0<X-se;)U=_e(U),X--;for(;0<se-X;)k=_e(k),se--;for(;X--;){if(U===k||k!==null&&U===k.alternate){_e=U;break t}U=_e(U),k=_e(k)}_e=null}else _e=null;te!==null&&Rg(ce,J,te,_e,!1),ve!==null&&at!==null&&Rg(ce,at,ve,_e,!0)}}e:{if(J=K?ua(K):window,te=J.nodeName&&J.nodeName.toLowerCase(),te==="select"||te==="input"&&J.type==="file")var Ke=$m;else if(qm(J))if(Xm)Ke=J1;else{Ke=Q1;var Ee=F1}else te=J.nodeName,!te||te.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?K&&vc(K.elementType)&&(Ke=$m):Ke=Z1;if(Ke&&(Ke=Ke(e,K))){Pm(ce,Ke,a,ie);break e}Ee&&Ee(e,J,K),e==="focusout"&&K&&J.type==="number"&&K.memoizedProps.value!=null&&yc(J,"number",J.value)}switch(Ee=K?ua(K):window,e){case"focusin":(qm(Ee)||Ee.contentEditable==="true")&&(ar=Ee,zc=K,io=null);break;case"focusout":io=zc=ar=null;break;case"mousedown":Dc=!0;break;case"contextmenu":case"mouseup":case"dragend":Dc=!1,th(ce,a,ie);break;case"selectionchange":if(eS)break;case"keydown":case"keyup":th(ce,a,ie)}var Le;if(_c)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else nr?Ym(e,a)&&(qe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(qe="onCompositionStart");qe&&(Um&&a.locale!=="ko"&&(nr||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&nr&&(Le=jm()):(Ha=ie,Ec="value"in Ha?Ha.value:Ha.textContent,nr=!0)),Ee=ts(K,qe),0<Ee.length&&(qe=new Hm(qe,e,null,a,ie),ce.push({event:qe,listeners:Ee}),Le?qe.data=Le:(Le=Vm(a),Le!==null&&(qe.data=Le)))),(Le=q1?P1(e,a):$1(e,a))&&(qe=ts(K,"onBeforeInput"),0<qe.length&&(Ee=new Hm("onBeforeInput","beforeinput",null,a,ie),ce.push({event:Ee,listeners:qe}),Ee.data=Le)),HS(ce,e,K,a,ie)}Ag(ce,t)})}function Do(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ts(e,t){for(var a=t+"Capture",r=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=Wr(e,a),c!=null&&r.unshift(Do(e,c,f)),c=Wr(e,t),c!=null&&r.push(Do(e,c,f))),e.tag===3)return r;e=e.return}return[]}function GS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rg(e,t,a,r,c){for(var f=t._reactName,y=[];a!==null&&a!==r;){var w=a,O=w.alternate,K=w.stateNode;if(w=w.tag,O!==null&&O===r)break;w!==5&&w!==26&&w!==27||K===null||(O=K,c?(K=Wr(a,f),K!=null&&y.unshift(Do(a,K,O))):c||(K=Wr(a,f),K!=null&&y.push(Do(a,K,O)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var YS=/\r\n?/g,VS=/\u0000|\uFFFD/g;function Ng(e){return(typeof e=="string"?e:""+e).replace(YS,`
49
+ `).replace(VS,"")}function Og(e,t){return t=Ng(t),Ng(e)===t}function nt(e,t,a,r,c,f){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Wl(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Wl(e,""+r);break;case"className":ri(e,"class",r);break;case"tabIndex":ri(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ri(e,a,r);break;case"style":Om(e,r,f);break;case"data":if(t!=="object"){ri(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=ii(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="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"&&nt(e,t,"name",c.name,c,null),nt(e,t,"formEncType",c.formEncType,c,null),nt(e,t,"formMethod",c.formMethod,c,null),nt(e,t,"formTarget",c.formTarget,c,null)):(nt(e,t,"encType",c.encType,c,null),nt(e,t,"method",c.method,c,null),nt(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=ii(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=da);break;case"onScroll":r!=null&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=ii(""+r),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":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),li(e,"popover",r);break;case"xlinkActuate":fa(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":fa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":fa(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":fa(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":fa(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":fa(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":fa(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":fa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":fa(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":li(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=y1.get(a)||a,li(e,a,r))}}function lf(e,t,a,r,c,f){switch(a){case"style":Om(e,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof r=="string"?Wl(e,r):(typeof r=="number"||typeof r=="bigint")&&Wl(e,""+r);break;case"onScroll":r!=null&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("scrollend",e);break;case"onClick":r!=null&&(e.onclick=da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wm.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[lt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof r=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,c);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):li(e,a,r)}}}function Vt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var r=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var y=a[f];if(y!=null)switch(f){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:nt(e,t,f,y,a,null)}}c&&nt(e,t,"srcSet",a.srcSet,a,null),r&&nt(e,t,"src",a.src,a,null);return;case"input":Ie("invalid",e);var w=f=y=c=null,O=null,K=null;for(r in a)if(a.hasOwnProperty(r)){var ie=a[r];if(ie!=null)switch(r){case"name":c=ie;break;case"type":y=ie;break;case"checked":O=ie;break;case"defaultChecked":K=ie;break;case"value":f=ie;break;case"defaultValue":w=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,t));break;default:nt(e,t,r,ie,a,null)}}Am(e,f,w,O,K,y,c,!1);return;case"select":Ie("invalid",e),r=y=f=null;for(c in a)if(a.hasOwnProperty(c)&&(w=a[c],w!=null))switch(c){case"value":f=w;break;case"defaultValue":y=w;break;case"multiple":r=w;default:nt(e,t,c,w,a,null)}t=f,a=y,e.multiple=!!r,t!=null?Jl(e,!!r,t,!1):a!=null&&Jl(e,!!r,a,!0);return;case"textarea":Ie("invalid",e),f=c=r=null;for(y in a)if(a.hasOwnProperty(y)&&(w=a[y],w!=null))switch(y){case"value":r=w;break;case"defaultValue":c=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:nt(e,t,y,w,a,null)}Rm(e,r,c,f);return;case"option":for(O in a)if(a.hasOwnProperty(O)&&(r=a[O],r!=null))switch(O){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:nt(e,t,O,r,a,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(r=0;r<zo.length;r++)Ie(zo[r],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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(K in a)if(a.hasOwnProperty(K)&&(r=a[K],r!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:nt(e,t,K,r,a,null)}return;default:if(vc(t)){for(ie in a)a.hasOwnProperty(ie)&&(r=a[ie],r!==void 0&&lf(e,t,ie,r,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(r=a[w],r!=null&&nt(e,t,w,r,a,null))}function qS(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,y=null,w=null,O=null,K=null,ie=null;for(te in a){var ce=a[te];if(a.hasOwnProperty(te)&&ce!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":O=ce;default:r.hasOwnProperty(te)||nt(e,t,te,null,r,ce)}}for(var J in r){var te=r[J];if(ce=a[J],r.hasOwnProperty(J)&&(te!=null||ce!=null))switch(J){case"type":f=te;break;case"name":c=te;break;case"checked":K=te;break;case"defaultChecked":ie=te;break;case"value":y=te;break;case"defaultValue":w=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,t));break;default:te!==ce&&nt(e,t,J,te,r,ce)}}gc(e,y,w,O,K,ie,f,c);return;case"select":te=y=w=J=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":te=O;default:r.hasOwnProperty(f)||nt(e,t,f,null,r,O)}for(c in r)if(f=r[c],O=a[c],r.hasOwnProperty(c)&&(f!=null||O!=null))switch(c){case"value":J=f;break;case"defaultValue":w=f;break;case"multiple":y=f;default:f!==O&&nt(e,t,c,f,r,O)}t=w,a=y,r=te,J!=null?Jl(e,!!a,J,!1):!!r!=!!a&&(t!=null?Jl(e,!!a,t,!0):Jl(e,!!a,a?[]:"",!1));return;case"textarea":te=J=null;for(w in a)if(c=a[w],a.hasOwnProperty(w)&&c!=null&&!r.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:nt(e,t,w,null,r,c)}for(y in r)if(c=r[y],f=a[y],r.hasOwnProperty(y)&&(c!=null||f!=null))switch(y){case"value":J=c;break;case"defaultValue":te=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==f&&nt(e,t,y,c,r,f)}_m(e,J,te);return;case"option":for(var ve in a)if(J=a[ve],a.hasOwnProperty(ve)&&J!=null&&!r.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:nt(e,t,ve,null,r,J)}for(O in r)if(J=r[O],te=a[O],r.hasOwnProperty(O)&&J!==te&&(J!=null||te!=null))switch(O){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:nt(e,t,O,J,r,te)}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 _e in a)J=a[_e],a.hasOwnProperty(_e)&&J!=null&&!r.hasOwnProperty(_e)&&nt(e,t,_e,null,r,J);for(K in r)if(J=r[K],te=a[K],r.hasOwnProperty(K)&&J!==te&&(J!=null||te!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(i(137,t));break;default:nt(e,t,K,J,r,te)}return;default:if(vc(t)){for(var at in a)J=a[at],a.hasOwnProperty(at)&&J!==void 0&&!r.hasOwnProperty(at)&&lf(e,t,at,void 0,r,J);for(ie in r)J=r[ie],te=a[ie],!r.hasOwnProperty(ie)||J===te||J===void 0&&te===void 0||lf(e,t,ie,J,r,te);return}}for(var U in a)J=a[U],a.hasOwnProperty(U)&&J!=null&&!r.hasOwnProperty(U)&&nt(e,t,U,null,r,J);for(ce in r)J=r[ce],te=a[ce],!r.hasOwnProperty(ce)||J===te||J==null&&te==null||nt(e,t,ce,J,r,te)}function zg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var c=a[r],f=c.transferSize,y=c.initiatorType,w=c.duration;if(f&&w&&zg(y)){for(y=0,w=c.responseEnd,r+=1;r<a.length;r++){var O=a[r],K=O.startTime;if(K>w)break;var ie=O.transferSize,ce=O.initiatorType;ie&&zg(ce)&&(O=O.responseEnd,y+=ie*(O<w?1:(w-K)/(O-K)))}if(--r,t+=8*(f+y)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var rf=null,of=null;function ns(e){return e.nodeType===9?e:e.ownerDocument}function Dg(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 jg(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 sf(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 cf=null;function $S(){var e=window.event;return e&&e.type==="popstate"?e===cf?!1:(cf=e,!0):(cf=null,!1)}var kg=typeof setTimeout=="function"?setTimeout:void 0,XS=typeof clearTimeout=="function"?clearTimeout:void 0,Lg=typeof Promise=="function"?Promise:void 0,KS=typeof queueMicrotask=="function"?queueMicrotask:typeof Lg<"u"?function(e){return Lg.resolve(null).then(e).catch(FS)}:kg;function FS(e){setTimeout(function(){throw e})}function el(e){return e==="head"}function Hg(e,t){var a=t,r=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(c),Nr(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")jo(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,jo(a);for(var f=a.firstChild;f;){var y=f.nextSibling,w=f.nodeName;f[En]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=y}}else a==="body"&&jo(e.ownerDocument.body);a=c}while(a);Nr(t)}function Bg(e,t){var a=e;e=0;do{var r=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||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function uf(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":uf(a),Jr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function QS(e,t,a,r){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[En])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function ZS(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=zn(e.nextSibling),e===null))return null;return e}function Ug(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=zn(e.nextSibling),e===null))return null;return e}function ff(e){return e.data==="$?"||e.data==="$~"}function df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function JS(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function zn(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 mf=null;function Ig(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return zn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Gg(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 Yg(e,t,a){switch(t=ns(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 jo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Jr(e)}var Dn=new Map,Vg=new Set;function as(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _a=N.d;N.d={f:WS,r:ew,D:tw,C:nw,L:aw,m:lw,X:ow,S:rw,M:iw};function WS(){var e=_a.f(),t=Ki();return e||t}function ew(e){var t=Bn(e);t!==null&&t.tag===5&&t.type==="form"?op(t):_a.r(e)}var Ar=typeof document>"u"?null:document;function qg(e,t,a){var r=Ar;if(r&&typeof t=="string"&&t){var c=Cn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Vg.has(c)||(Vg.add(c),e={rel:e,crossOrigin:a,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),Vt(t,"link",e),Lt(t),r.head.appendChild(t)))}}function tw(e){_a.D(e),qg("dns-prefetch",e,null)}function nw(e,t){_a.C(e,t),qg("preconnect",e,t)}function aw(e,t,a){_a.L(e,t,a);var r=Ar;if(r&&e&&t){var c='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Cn(a.imageSizes)+'"]')):c+='[href="'+Cn(e)+'"]';var f=c;switch(t){case"style":f=_r(e);break;case"script":f=Rr(e)}Dn.has(f)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Dn.set(f,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(ko(f))||t==="script"&&r.querySelector(Lo(f))||(t=r.createElement("link"),Vt(t,"link",e),Lt(t),r.head.appendChild(t)))}}function lw(e,t){_a.m(e,t);var a=Ar;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Cn(r)+'"][href="'+Cn(e)+'"]',f=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Rr(e)}if(!Dn.has(f)&&(e=p({rel:"modulepreload",href:e},t),Dn.set(f,e),a.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Lo(f)))return}r=a.createElement("link"),Vt(r,"link",e),Lt(r),a.head.appendChild(r)}}}function rw(e,t,a){_a.S(e,t,a);var r=Ar;if(r&&e){var c=La(r).hoistableStyles,f=_r(e);t=t||"default";var y=c.get(f);if(!y){var w={loading:0,preload:null};if(y=r.querySelector(ko(f)))w.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Dn.get(f))&&hf(e,a);var O=y=r.createElement("link");Lt(O),Vt(O,"link",e),O._p=new Promise(function(K,ie){O.onload=K,O.onerror=ie}),O.addEventListener("load",function(){w.loading|=1}),O.addEventListener("error",function(){w.loading|=2}),w.loading|=4,ls(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:w},c.set(f,y)}}}function ow(e,t){_a.X(e,t);var a=Ar;if(a&&e){var r=La(a).hoistableScripts,c=Rr(e),f=r.get(c);f||(f=a.querySelector(Lo(c)),f||(e=p({src:e,async:!0},t),(t=Dn.get(c))&&pf(e,t),f=a.createElement("script"),Lt(f),Vt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function iw(e,t){_a.M(e,t);var a=Ar;if(a&&e){var r=La(a).hoistableScripts,c=Rr(e),f=r.get(c);f||(f=a.querySelector(Lo(c)),f||(e=p({src:e,async:!0,type:"module"},t),(t=Dn.get(c))&&pf(e,t),f=a.createElement("script"),Lt(f),Vt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function Pg(e,t,a,r){var c=(c=me.current)?as(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=_r(a.href),a=La(c).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=_r(a.href);var f=La(c).hoistableStyles,y=f.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=c.querySelector(ko(e)))&&!f._p&&(y.instance=f,y.state.loading=5),Dn.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},Dn.set(e,a),f||sw(c,e,a,y.state))),t&&r===null)throw Error(i(528,""));return y}if(t&&r!==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=Rr(a),a=La(c).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function _r(e){return'href="'+Cn(e)+'"'}function ko(e){return'link[rel="stylesheet"]['+e+"]"}function $g(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function sw(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Vt(t,"link",a),Lt(t),e.head.appendChild(t))}function Rr(e){return'[src="'+Cn(e)+'"]'}function Lo(e){return"script[async]"+e}function Xg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Cn(a.href)+'"]');if(r)return t.instance=r,Lt(r),r;var c=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Lt(r),Vt(r,"style",c),ls(r,a.precedence,e),t.instance=r;case"stylesheet":c=_r(a.href);var f=e.querySelector(ko(c));if(f)return t.state.loading|=4,t.instance=f,Lt(f),f;r=$g(a),(c=Dn.get(c))&&hf(r,c),f=(e.ownerDocument||e).createElement("link"),Lt(f);var y=f;return y._p=new Promise(function(w,O){y.onload=w,y.onerror=O}),Vt(f,"link",r),t.state.loading|=4,ls(f,a.precedence,e),t.instance=f;case"script":return f=Rr(a.src),(c=e.querySelector(Lo(f)))?(t.instance=c,Lt(c),c):(r=a,(c=Dn.get(f))&&(r=p({},a),pf(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),Lt(c),Vt(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,ls(r,a.precedence,e));return t.instance}function ls(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,f=c,y=0;y<r.length;y++){var w=r[y];if(w.dataset.precedence===t)f=w;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function hf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var rs=null;function Kg(e,t,a){if(rs===null){var r=new Map,c=rs=new Map;c.set(a,r)}else c=rs,r=c.get(a),r||(r=new Map,c.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[En]||f[je]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(t)||"";y=e+y;var w=r.get(y);w?w.push(f):r.set(y,[f])}}return r}function Fg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function cw(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 Qg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uw(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=_r(r.href),f=t.querySelector(ko(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=os.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,Lt(f);return}f=t.ownerDocument||t,r=$g(r),(c=Dn.get(c))&&hf(r,c),f=f.createElement("link"),Lt(f);var y=f;y._p=new Promise(function(w,O){y.onload=w,y.onerror=O}),Vt(f,"link",r),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=os.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var gf=0;function fw(e,t){return e.stylesheets&&e.count===0&&ss(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&ss(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&gf===0&&(gf=62500*PS());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ss(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>gf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function os(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ss(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var is=null;function ss(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,is=new Map,t.forEach(dw,e),is=null,os.call(e))}function dw(e,t){if(!(t.state.loading&4)){var a=is.get(e);if(a)var r=a.get(null);else{a=new Map,is.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var y=c[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),r=y)}r&&a.set(null,r)}c=t.instance,y=c.getAttribute("data-precedence"),f=a.get(y)||r,f===r&&a.set(null,c),a.set(y,c),this.count++,r=os.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ho={$$typeof:D,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function mw(e,t,a,r,c,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=Xn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xn(0),this.hiddenUpdates=Xn(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function Zg(e,t,a,r,c,f,y,w,O,K,ie,ce){return e=new mw(e,t,a,y,O,K,ie,ce,w),t=1,f===!0&&(t|=24),f=un(3,null,null,t),e.current=f,f.stateNode=e,t=Kc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:t},Jc(f),e}function Jg(e){return e?(e=or,e):or}function Wg(e,t,a,r,c,f){c=Jg(c),r.context===null?r.context=c:r.pendingContext=c,r=Va(t),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=qa(e,r,t),a!==null&&(an(a,e,t),po(a,e,t))}function ey(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function yf(e,t){ey(e,t),(e=e.alternate)&&ey(e,t)}function ty(e){if(e.tag===13||e.tag===31){var t=Cl(e,67108864);t!==null&&an(t,e,67108864),yf(e,67108864)}}function ny(e){if(e.tag===13||e.tag===31){var t=pn();t=He(t);var a=Cl(e,t);a!==null&&an(a,e,t),yf(e,t)}}var cs=!0;function hw(e,t,a,r){var c=M.T;M.T=null;var f=N.p;try{N.p=2,vf(e,t,a,r)}finally{N.p=f,M.T=c}}function pw(e,t,a,r){var c=M.T;M.T=null;var f=N.p;try{N.p=8,vf(e,t,a,r)}finally{N.p=f,M.T=c}}function vf(e,t,a,r){if(cs){var c=bf(r);if(c===null)af(e,t,r,us,a),ly(e,r);else if(yw(c,e,t,a,r))r.stopPropagation();else if(ly(e,r),t&4&&-1<gw.indexOf(e)){for(;c!==null;){var f=Bn(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=wn(f.pendingLanes);if(y!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;y;){var O=1<<31-zt(y);w.entanglements[1]|=O,y&=~O}Wn(f),(Ze&6)===0&&($i=dt()+500,Oo(0))}}break;case 31:case 13:w=Cl(f,2),w!==null&&an(w,f,2),Ki(),yf(f,2)}if(f=bf(r),f===null&&af(e,t,r,us,a),f===c)break;c=f}c!==null&&r.stopPropagation()}else af(e,t,r,null,a)}}function bf(e){return e=xc(e),xf(e)}var us=null;function xf(e){if(us=null,e=Fn(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 us=e,null}function ay(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(Pt()){case Ot:return 2;case oa:return 8;case Ln:case $n:return 32;case Ut:return 268435456;default:return 32}default:return 32}}var Sf=!1,tl=null,nl=null,al=null,Bo=new Map,Uo=new Map,ll=[],gw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ly(e,t){switch(e){case"focusin":case"focusout":tl=null;break;case"dragenter":case"dragleave":nl=null;break;case"mouseover":case"mouseout":al=null;break;case"pointerover":case"pointerout":Bo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(t.pointerId)}}function Io(e,t,a,r,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Bn(t),t!==null&&ty(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function yw(e,t,a,r,c){switch(t){case"focusin":return tl=Io(tl,e,t,a,r,c),!0;case"dragenter":return nl=Io(nl,e,t,a,r,c),!0;case"mouseover":return al=Io(al,e,t,a,r,c),!0;case"pointerover":var f=c.pointerId;return Bo.set(f,Io(Bo.get(f)||null,e,t,a,r,c)),!0;case"gotpointercapture":return f=c.pointerId,Uo.set(f,Io(Uo.get(f)||null,e,t,a,r,c)),!0}return!1}function ry(e){var t=Fn(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,mt(e.priority,function(){ny(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,mt(e.priority,function(){ny(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 fs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bf(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);bc=r,a.target.dispatchEvent(r),bc=null}else return t=Bn(a),t!==null&&ty(t),e.blockedOn=a,!1;t.shift()}return!0}function oy(e,t,a){fs(e)&&a.delete(t)}function vw(){Sf=!1,tl!==null&&fs(tl)&&(tl=null),nl!==null&&fs(nl)&&(nl=null),al!==null&&fs(al)&&(al=null),Bo.forEach(oy),Uo.forEach(oy)}function ds(e,t){e.blockedOn===t&&(e.blockedOn=null,Sf||(Sf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vw)))}var ms=null;function iy(e){ms!==e&&(ms=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ms===e&&(ms=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(xf(r||a)===null)continue;break}var f=Bn(a);f!==null&&(e.splice(t,3),t-=3,vu(f,{pending:!0,data:c,method:a.method,action:r},r,c))}}))}function Nr(e){function t(O){return ds(O,e)}tl!==null&&ds(tl,e),nl!==null&&ds(nl,e),al!==null&&ds(al,e),Bo.forEach(t),Uo.forEach(t);for(var a=0;a<ll.length;a++){var r=ll[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ll.length&&(a=ll[0],a.blockedOn===null);)ry(a),a.blockedOn===null&&ll.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var c=a[r],f=a[r+1],y=c[lt]||null;if(typeof f=="function")y||iy(a);else if(y){var w=null;if(f&&f.hasAttribute("formAction")){if(c=f,y=f[lt]||null)w=y.formAction;else if(xf(c)!==null)continue}else w=y.action;typeof w=="function"?a[r+1]=w:(a.splice(r,3),r-=3),iy(a)}}}function sy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(a,20)}function a(){if(!r&&!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 r=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function wf(e){this._internalRoot=e}hs.prototype.render=wf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,r=pn();Wg(a,r,e,t,null,null)},hs.prototype.unmount=wf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wg(e.current,2,null,e,null,null),Ki(),t[jt]=null}};function hs(e){this._internalRoot=e}hs.prototype.unstable_scheduleHydration=function(e){if(e){var t=st();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ll.length&&t!==0&&t<ll[a].priority;a++);ll.splice(a,0,e),a===0&&ry(e)}};var cy=l.version;if(cy!=="19.2.5")throw Error(i(527,cy,"19.2.5"));N.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 bw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ps=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ps.isDisabled&&ps.supportsFiber)try{ia=ps.inject(bw),At=ps}catch{}}return Yo.createRoot=function(e,t){if(!s(e))throw Error(i(299));var a=!1,r="",c=gp,f=yp,y=vp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Zg(e,1,!1,null,null,a,r,null,c,f,y,sy),e[jt]=t.current,nf(e),new wf(t)},Yo.hydrateRoot=function(e,t,a){if(!s(e))throw Error(i(299));var r=!1,c="",f=gp,y=yp,w=vp,O=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(c=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=Zg(e,1,!0,t,a??null,r,c,O,f,y,w,sy),t.context=Jg(null),a=t.current,r=pn(),r=He(r),c=Va(r),c.callback=null,qa(a,c,r),a=r,t.current.lanes=a,Q(t,a),Wn(t),e[jt]=t.current,nf(e),new hs(t)},Yo.version="19.2.5",Yo}var by;function Rw(){if(by)return Cf.exports;by=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(),Cf.exports=_w(),Cf.exports}var Nw=Rw();const Ow=kd(Nw);var Zo=X0();const K0=kd(Zo);function zw(n){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",l.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}const Dw=n=>{switch(n){case"success":return Lw;case"info":return Bw;case"warning":return Hw;case"error":return Uw;default:return null}},jw=Array(12).fill(0),kw=({visible:n,className:l})=>pe.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":n},pe.createElement("div",{className:"sonner-spinner"},jw.map((o,i)=>pe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),Lw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Hw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Bw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Uw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Iw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},pe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),pe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Gw=()=>{const[n,l]=pe.useState(document.hidden);return pe.useEffect(()=>{const o=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),n};let nd=1;class Yw{constructor(){this.subscribe=l=>(this.subscribers.push(l),()=>{const o=this.subscribers.indexOf(l);this.subscribers.splice(o,1)}),this.publish=l=>{this.subscribers.forEach(o=>o(l))},this.addToast=l=>{this.publish(l),this.toasts=[...this.toasts,l]},this.create=l=>{var o;const{message:i,...s}=l,u=typeof(l==null?void 0:l.id)=="number"||((o=l.id)==null?void 0:o.length)>0?l.id:nd++,d=this.toasts.find(h=>h.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(h=>h.id===u?(this.publish({...h,...l,id:u,title:i}),{...h,...l,id:u,dismissible:m,title:i}):h):this.addToast({title:i,...s,dismissible:m,id:u}),u},this.dismiss=l=>(l?(this.dismissedToasts.add(l),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:l,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(i=>i({id:o.id,dismiss:!0}))}),l),this.message=(l,o)=>this.create({...o,message:l}),this.error=(l,o)=>this.create({...o,message:l,type:"error"}),this.success=(l,o)=>this.create({...o,type:"success",message:l}),this.info=(l,o)=>this.create({...o,type:"info",message:l}),this.warning=(l,o)=>this.create({...o,type:"warning",message:l}),this.loading=(l,o)=>this.create({...o,type:"loading",message:l}),this.promise=(l,o)=>{if(!o)return;let i;o.loading!==void 0&&(i=this.create({...o,promise:l,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const s=Promise.resolve(l instanceof Function?l():l);let u=i!==void 0,d;const m=s.then(async g=>{if(d=["resolve",g],pe.isValidElement(g))u=!1,this.create({id:i,type:"default",message:g});else if(qw(g)&&!g.ok){u=!1;const p=typeof o.error=="function"?await o.error(`HTTP error! status: ${g.status}`):o.error,S=typeof o.description=="function"?await o.description(`HTTP error! status: ${g.status}`):o.description,T=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...T})}else if(g instanceof Error){u=!1;const p=typeof o.error=="function"?await o.error(g):o.error,S=typeof o.description=="function"?await o.description(g):o.description,T=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...T})}else if(o.success!==void 0){u=!1;const p=typeof o.success=="function"?await o.success(g):o.success,S=typeof o.description=="function"?await o.description(g):o.description,T=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:S,...T})}}).catch(async g=>{if(d=["reject",g],o.error!==void 0){u=!1;const b=typeof o.error=="function"?await o.error(g):o.error,p=typeof o.description=="function"?await o.description(g):o.description,E=typeof b=="object"&&!pe.isValidElement(b)?b:{message:b};this.create({id:i,type:"error",description:p,...E})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),o.finally==null||o.finally.call(o)}),h=()=>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:h}:Object.assign(i,{unwrap:h})},this.custom=(l,o)=>{const i=(o==null?void 0:o.id)||nd++;return this.create({jsx:l(i),id:i,...o}),i},this.getActiveToasts=()=>this.toasts.filter(l=>!this.dismissedToasts.has(l.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ln=new Yw,Vw=(n,l)=>{const o=(l==null?void 0:l.id)||nd++;return ln.addToast({title:n,...l,id:o}),o},qw=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Pw=Vw,$w=()=>ln.toasts,Xw=()=>ln.getActiveToasts(),ul=Object.assign(Pw,{success:ln.success,info:ln.info,warning:ln.warning,error:ln.error,custom:ln.custom,message:ln.message,promise:ln.promise,dismiss:ln.dismiss,loading:ln.loading},{getHistory:$w,getToasts:Xw});zw("[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 gs(n){return n.label!==void 0}const Kw=3,Fw="24px",Qw="16px",xy=4e3,Zw=356,Jw=14,Ww=45,e2=200;function ea(...n){return n.filter(Boolean).join(" ")}function t2(n){const[l,o]=n.split("-"),i=[];return l&&i.push(l),o&&i.push(o),i}const n2=n=>{var l,o,i,s,u,d,m,h,g;const{invert:b,toast:p,unstyled:S,interacting:E,setHeights:T,visibleToasts:C,heights:A,index:R,toasts:z,expanded:D,removeToast:Y,defaultRichColors:ne,closeButton:q,style:P,cancelButtonStyle:j,actionButtonStyle:I,className:$="",descriptionClassName:fe="",duration:ee,position:re,gap:V,expandByDefault:F,classNames:M,icons:N,closeButtonAriaLabel:H="Close toast"}=n,[B,G]=pe.useState(null),[_,L]=pe.useState(null),[Z,oe]=pe.useState(!1),[ue,me]=pe.useState(!1),[ae,W]=pe.useState(!1),[le,ge]=pe.useState(!1),[we,Ce]=pe.useState(!1),[Ge,Ye]=pe.useState(0),[qt,Bt]=pe.useState(0),Nt=pe.useRef(p.duration||ee||xy),ze=pe.useRef(null),be=pe.useRef(null),on=R===0,Qt=R+1<=C,ft=p.type,xn=p.dismissible!==!1,dt=p.className||"",Pt=p.descriptionClassName||"",Ot=pe.useMemo(()=>A.findIndex(Re=>Re.toastId===p.id)||0,[A,p.id]),oa=pe.useMemo(()=>{var Re;return(Re=p.closeButton)!=null?Re:q},[p.closeButton,q]),Ln=pe.useMemo(()=>p.duration||ee||xy,[p.duration,ee]),$n=pe.useRef(0),Ut=pe.useRef(0),Hn=pe.useRef(0),Zt=pe.useRef(null),[ia,At]=re.split("-"),sn=pe.useMemo(()=>A.reduce((Re,ot,wt)=>wt>=Ot?Re:Re+ot.height,0),[A,Ot]),zt=Gw(),Zr=p.invert||b,xl=ft==="loading";Ut.current=pe.useMemo(()=>Ot*V+sn,[Ot,sn]),pe.useEffect(()=>{Nt.current=Ln},[Ln]),pe.useEffect(()=>{oe(!0)},[]),pe.useEffect(()=>{const Re=be.current;if(Re){const ot=Re.getBoundingClientRect().height;return Bt(ot),T(wt=>[{toastId:p.id,height:ot,position:p.position},...wt]),()=>T(wt=>wt.filter(Dt=>Dt.toastId!==p.id))}},[T,p.id]),pe.useLayoutEffect(()=>{if(!Z)return;const Re=be.current,ot=Re.style.height;Re.style.height="auto";const wt=Re.getBoundingClientRect().height;Re.style.height=ot,Bt(wt),T(Dt=>Dt.find(Q=>Q.toastId===p.id)?Dt.map(Q=>Q.toastId===p.id?{...Q,height:wt}:Q):[{toastId:p.id,height:wt,position:p.position},...Dt])},[Z,p.title,p.description,T,p.id,p.jsx,p.action,p.cancel]);const Sn=pe.useCallback(()=>{me(!0),Ye(Ut.current),T(Re=>Re.filter(ot=>ot.toastId!==p.id)),setTimeout(()=>{Y(p)},e2)},[p,Y,T,Ut]);pe.useEffect(()=>{if(p.promise&&ft==="loading"||p.duration===1/0||p.type==="loading")return;let Re;return D||E||zt?(()=>{if(Hn.current<$n.current){const Dt=new Date().getTime()-$n.current;Nt.current=Nt.current-Dt}Hn.current=new Date().getTime()})():(()=>{Nt.current!==1/0&&($n.current=new Date().getTime(),Re=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Sn()},Nt.current))})(),()=>clearTimeout(Re)},[D,E,p,ft,zt,Sn]),pe.useEffect(()=>{p.delete&&(Sn(),p.onDismiss==null||p.onDismiss.call(p,p))},[Sn,p.delete]);function ja(){var Re;if(N!=null&&N.loading){var ot;return pe.createElement("div",{className:ea(M==null?void 0:M.loader,p==null||(ot=p.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":ft==="loading"},N.loading)}return pe.createElement(kw,{className:ea(M==null?void 0:M.loader,p==null||(Re=p.classNames)==null?void 0:Re.loader),visible:ft==="loading"})}const ka=p.icon||(N==null?void 0:N[ft])||Dw(ft);var sa,wn;return pe.createElement("li",{tabIndex:0,ref:be,className:ea($,dt,M==null?void 0:M.toast,p==null||(l=p.classNames)==null?void 0:l.toast,M==null?void 0:M.default,M==null?void 0:M[ft],p==null||(o=p.classNames)==null?void 0:o[ft]),"data-sonner-toast":"","data-rich-colors":(sa=p.richColors)!=null?sa:ne,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":Z,"data-promise":!!p.promise,"data-swiped":we,"data-removed":ue,"data-visible":Qt,"data-y-position":ia,"data-x-position":At,"data-index":R,"data-front":on,"data-swiping":ae,"data-dismissible":xn,"data-type":ft,"data-invert":Zr,"data-swipe-out":le,"data-swipe-direction":_,"data-expanded":!!(D||F&&Z),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":z.length-R,"--offset":`${ue?Ge:Ut.current}px`,"--initial-height":F?"auto":`${qt}px`,...P,...p.style},onDragEnd:()=>{W(!1),G(null),Zt.current=null},onPointerDown:Re=>{Re.button!==2&&(xl||!xn||(ze.current=new Date,Ye(Ut.current),Re.target.setPointerCapture(Re.pointerId),Re.target.tagName!=="BUTTON"&&(W(!0),Zt.current={x:Re.clientX,y:Re.clientY})))},onPointerUp:()=>{var Re,ot,wt;if(le||!xn)return;Zt.current=null;const Dt=Number(((Re=be.current)==null?void 0:Re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Xn=Number(((ot=be.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Q=new Date().getTime()-((wt=ze.current)==null?void 0:wt.getTime()),de=B==="x"?Dt:Xn,he=Math.abs(de)/Q;if(Math.abs(de)>=Ww||he>.11){Ye(Ut.current),p.onDismiss==null||p.onDismiss.call(p,p),L(B==="x"?Dt>0?"right":"left":Xn>0?"down":"up"),Sn(),ge(!0);return}else{var ye,Ne;(ye=be.current)==null||ye.style.setProperty("--swipe-amount-x","0px"),(Ne=be.current)==null||Ne.style.setProperty("--swipe-amount-y","0px")}Ce(!1),W(!1),G(null)},onPointerMove:Re=>{var ot,wt,Dt;if(!Zt.current||!xn||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const Q=Re.clientY-Zt.current.y,de=Re.clientX-Zt.current.x;var he;const ye=(he=n.swipeDirections)!=null?he:t2(re);!B&&(Math.abs(de)>1||Math.abs(Q)>1)&&G(Math.abs(de)>Math.abs(Q)?"x":"y");let Ne={x:0,y:0};const He=$e=>1/(1.5+Math.abs($e)/20);if(B==="y"){if(ye.includes("top")||ye.includes("bottom"))if(ye.includes("top")&&Q<0||ye.includes("bottom")&&Q>0)Ne.y=Q;else{const $e=Q*He(Q);Ne.y=Math.abs($e)<Math.abs(Q)?$e:Q}}else if(B==="x"&&(ye.includes("left")||ye.includes("right")))if(ye.includes("left")&&de<0||ye.includes("right")&&de>0)Ne.x=de;else{const $e=de*He(de);Ne.x=Math.abs($e)<Math.abs(de)?$e:de}(Math.abs(Ne.x)>0||Math.abs(Ne.y)>0)&&Ce(!0),(wt=be.current)==null||wt.style.setProperty("--swipe-amount-x",`${Ne.x}px`),(Dt=be.current)==null||Dt.style.setProperty("--swipe-amount-y",`${Ne.y}px`)}},oa&&!p.jsx&&ft!=="loading"?pe.createElement("button",{"aria-label":H,"data-disabled":xl,"data-close-button":!0,onClick:xl||!xn?()=>{}:()=>{Sn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ea(M==null?void 0:M.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(wn=N==null?void 0:N.close)!=null?wn:Iw):null,(ft||p.icon||p.promise)&&p.icon!==null&&((N==null?void 0:N[ft])!==null||p.icon)?pe.createElement("div",{"data-icon":"",className:ea(M==null?void 0:M.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ja():null,p.type!=="loading"?ka:null):null,pe.createElement("div",{"data-content":"",className:ea(M==null?void 0:M.content,p==null||(u=p.classNames)==null?void 0:u.content)},pe.createElement("div",{"data-title":"",className:ea(M==null?void 0:M.title,p==null||(d=p.classNames)==null?void 0:d.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?pe.createElement("div",{"data-description":"",className:ea(fe,Pt,M==null?void 0:M.description,p==null||(m=p.classNames)==null?void 0:m.description)},typeof p.description=="function"?p.description():p.description):null),pe.isValidElement(p.cancel)?p.cancel:p.cancel&&gs(p.cancel)?pe.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||j,onClick:Re=>{gs(p.cancel)&&xn&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Re),Sn())},className:ea(M==null?void 0:M.cancelButton,p==null||(h=p.classNames)==null?void 0:h.cancelButton)},p.cancel.label):null,pe.isValidElement(p.action)?p.action:p.action&&gs(p.action)?pe.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||I,onClick:Re=>{gs(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Re),!Re.defaultPrevented&&Sn())},className:ea(M==null?void 0:M.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function Sy(){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 a2(n,l){const o={};return[n,l].forEach((i,s)=>{const u=s===1,d=u?"--mobile-offset":"--offset",m=u?Qw:Fw;function h(g){["top","right","bottom","left"].forEach(b=>{o[`${d}-${b}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?o[`${d}-${g}`]=m:o[`${d}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):h(m)}),o}const l2=pe.forwardRef(function(l,o){const{id:i,invert:s,position:u="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:h,className:g,offset:b,mobileOffset:p,theme:S="light",richColors:E,duration:T,style:C,visibleToasts:A=Kw,toastOptions:R,dir:z=Sy(),gap:D=Jw,icons:Y,containerAriaLabel:ne="Notifications"}=l,[q,P]=pe.useState([]),j=pe.useMemo(()=>i?q.filter(Z=>Z.toasterId===i):q.filter(Z=>!Z.toasterId),[q,i]),I=pe.useMemo(()=>Array.from(new Set([u].concat(j.filter(Z=>Z.position).map(Z=>Z.position)))),[j,u]),[$,fe]=pe.useState([]),[ee,re]=pe.useState(!1),[V,F]=pe.useState(!1),[M,N]=pe.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=pe.useRef(null),B=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=pe.useRef(null),_=pe.useRef(!1),L=pe.useCallback(Z=>{P(oe=>{var ue;return(ue=oe.find(me=>me.id===Z.id))!=null&&ue.delete||ln.dismiss(Z.id),oe.filter(({id:me})=>me!==Z.id)})},[]);return pe.useEffect(()=>ln.subscribe(Z=>{if(Z.dismiss){requestAnimationFrame(()=>{P(oe=>oe.map(ue=>ue.id===Z.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{K0.flushSync(()=>{P(oe=>{const ue=oe.findIndex(me=>me.id===Z.id);return ue!==-1?[...oe.slice(0,ue),{...oe[ue],...Z},...oe.slice(ue+1)]:[Z,...oe]})})})}),[q]),pe.useEffect(()=>{if(S!=="system"){N(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?N("dark"):N("light")),typeof window>"u")return;const Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:oe})=>{N(oe?"dark":"light")})}catch{Z.addListener(({matches:ue})=>{try{N(ue?"dark":"light")}catch(me){console.error(me)}})}},[S]),pe.useEffect(()=>{q.length<=1&&re(!1)},[q]),pe.useEffect(()=>{const Z=oe=>{var ue;if(d.every(W=>oe[W]||oe.code===W)){var ae;re(!0),(ae=H.current)==null||ae.focus()}oe.code==="Escape"&&(document.activeElement===H.current||(ue=H.current)!=null&&ue.contains(document.activeElement))&&re(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[d]),pe.useEffect(()=>{if(H.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,_.current=!1)}},[H.current]),pe.createElement("section",{ref:o,"aria-label":`${ne} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((Z,oe)=>{var ue;const[me,ae]=Z.split("-");return j.length?pe.createElement("ol",{key:Z,dir:z==="auto"?Sy():z,tabIndex:-1,ref:H,className:g,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":me,"data-x-position":ae,style:{"--front-toast-height":`${((ue=$[0])==null?void 0:ue.height)||0}px`,"--width":`${Zw}px`,"--gap":`${D}px`,...C,...a2(b,p)},onBlur:W=>{_.current&&!W.currentTarget.contains(W.relatedTarget)&&(_.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||_.current||(_.current=!0,G.current=W.relatedTarget)},onMouseEnter:()=>re(!0),onMouseMove:()=>re(!0),onMouseLeave:()=>{V||re(!1)},onDragEnd:()=>re(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},j.filter(W=>!W.position&&oe===0||W.position===Z).map((W,le)=>{var ge,we;return pe.createElement(n2,{key:W.id,icons:Y,index:le,toast:W,defaultRichColors:E,duration:(ge=R==null?void 0:R.duration)!=null?ge:T,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:A,closeButton:(we=R==null?void 0:R.closeButton)!=null?we:h,interacting:V,position:Z,style:R==null?void 0:R.style,unstyled:R==null?void 0:R.unstyled,classNames:R==null?void 0:R.classNames,cancelButtonStyle:R==null?void 0:R.cancelButtonStyle,actionButtonStyle:R==null?void 0:R.actionButtonStyle,closeButtonAriaLabel:R==null?void 0:R.closeButtonAriaLabel,removeToast:L,toasts:j.filter(Ce=>Ce.position==W.position),heights:$.filter(Ce=>Ce.position==W.position),setHeights:fe,expandByDefault:m,gap:D,expanded:ee,swipeDirections:l.swipeDirections})})):null}))}),Te="data-editor-id",Yl="data-slide-root",Vl=1920,ql=1080;function Hd(n){return`[${Te}="${n}"]`}function r2(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function F0(n,l){return`${l}-${n+1}`}function wy(n,l){const o=Number.parseInt(n||"",10);return Number.isFinite(o)&&o>0?o:l}function o2(n){return r2(n)}function Bs(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Q0(n){const l=n.querySelector(`[${Yl}]`);if(l)return l.getAttribute("data-slide-width")||l.setAttribute("data-slide-width",String(Vl)),l.getAttribute("data-slide-height")||l.setAttribute("data-slide-height",String(ql)),l;const o=n.querySelector(".slide-container");return o?(o.setAttribute(Yl,"true"),o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(Vl)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(ql)),o):null}function i2(n){return`<!DOCTYPE html>
50
+ ${n.documentElement.outerHTML}`}function s2(n){const l=Bs(n);if(!l)return n;const o=Q0(l),i=Array.from(l.querySelectorAll("[data-editable]"));return o&&!o.getAttribute(Te)&&o.setAttribute(Te,"slide-root"),i.forEach((s,u)=>{if(!s.getAttribute(Te)){const d=s.getAttribute("data-editable")||"block";s.setAttribute(Te,F0(u,d))}}),i2(l)}function ta(n,l="slide-1"){var E;if(!Bs(n))return{id:l,title:"Untitled Slide",htmlSource:n,rootSelector:`[${Yl}]`,width:Vl,height:ql,elements:[]};const i=s2(n),s=Bs(i);if(!s)return{id:l,title:"Untitled Slide",htmlSource:i,rootSelector:`[${Yl}]`,width:Vl,height:ql,elements:[]};const u=Q0(s),d=Array.from(s.querySelectorAll("[data-editable]")),m=u!=null&&u.getAttribute(Te)?`[${Te}="${u.getAttribute(Te)}"]`:`[${Yl}]`,h=wy((u==null?void 0:u.getAttribute("data-slide-width"))??null,Vl),g=wy((u==null?void 0:u.getAttribute("data-slide-height"))??null,ql),b=d.map((T,C)=>{const A=T.getAttribute("data-editable")||"block",R=T.getAttribute(Te)||F0(C,A);return{id:R,selector:Hd(R),type:A==="block"&&T.getAttribute("data-group")==="true"?"group":A,content:T instanceof HTMLImageElement?T.src:T.textContent||"",tagName:T.tagName.toLowerCase()}}),p=s.querySelector("h1, h2, title"),S=((E=p==null?void 0:p.textContent)==null?void 0:E.trim())||`Slide ${l}`;return{id:o2(l),title:S,htmlSource:i,rootSelector:m,width:h,height:g,elements:b}}function Xe(n,l){return n.querySelector(Hd(l))}function c2(n,l,o){const i=Bs(n.htmlSource);if(!i)return"";const s=Xe(i,l);return(s==null?void 0:s.style.getPropertyValue(o).trim())||""}function pl(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Bd(n){return`<!DOCTYPE html>
51
+ ${n.documentElement.outerHTML}`}function Pr(n,l){const o=pl(n);return o?(l(o),Bd(o)):n}const Ud=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function Z0(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function Xo(n){const l=Z0();for(const o of Ud){const i=n.style[o];l[o]=i||null}return l}function ad(n){return{...Z0(),...n}}function Vn(n){const l=n||"",o=l.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=l.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:o&&Number.parseFloat(o[1]||"0")||0,translateY:o&&Number.parseFloat(o[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function Rf(n){return Math.round(n*100)/100}function Na(n,l,o){const i=[];return(Math.abs(n)>.01||Math.abs(l)>.01)&&i.push(`translate(${Rf(n)}px, ${Rf(l)}px)`),Math.abs(o)>.01&&i.push(`rotate(${Rf(o)}deg)`),i.length?i.join(" "):null}function Hr(n,l,o){return{x:o.offsetX+(n.left-l.left)*o.scale,y:o.offsetY+(n.top-l.top)*o.scale,width:n.width*o.scale,height:n.height*o.scale}}function ys(n){const l=Number.parseFloat(n||"");return Number.isFinite(l)?l:0}function Ey(n){const l=Vn(n.style.transform);return{x:ys(n.style.left)+l.translateX,y:ys(n.style.top)+l.translateY,width:ys(n.style.width)||Vl,height:ys(n.style.height)||ql}}function Us(n,l={}){let o=n,i=0,s=0;const u=n.getAttribute(Te)??"",d=l[u]??Ey(n),m=d.width,h=d.height;for(;o;){const g=o.getAttribute(Te)??"",b=l[g]??Ey(o);i+=b.x,s+=b.y;const p=o.parentElement;if(!p||!p.hasAttribute("data-editable"))break;o=p}return{x:i,y:s,width:m,height:h}}function J0(n,l={}){const o=n.parentElement;if(!o||!o.hasAttribute("data-editable"))return{x:0,y:0};const i=Us(o,l);return{x:i.x,y:i.y}}function ld(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 o=Vn(n.style.transform),i=Na(0,0,o.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function Ty(n,l){l&&(l.color&&(n.style.color=l.color),l.fontSize&&(n.style.fontSize=l.fontSize),l.fontWeight&&(n.style.fontWeight=l.fontWeight),l.fontStyle&&(n.style.fontStyle=l.fontStyle),l.lineHeight&&(n.style.lineHeight=l.lineHeight),l.textAlign&&(n.style.textAlign=l.textAlign),l.paddingTop&&(n.style.paddingTop=l.paddingTop),l.paddingRight&&(n.style.paddingRight=l.paddingRight),l.paddingBottom&&(n.style.paddingBottom=l.paddingBottom),l.paddingLeft&&(n.style.paddingLeft=l.paddingLeft),l.listStylePosition&&(n.style.listStylePosition=l.listStylePosition),l.listStyleType&&(n.style.listStyleType=l.listStyleType))}function Nf(n){const l=n.parentElement;return l&&(l.hasAttribute(Yl)||l.hasAttribute("data-editable"))?l:null}function rd(n){return Array.from(n.children).filter(l=>l instanceof HTMLElement&&l.hasAttribute("data-editable"))}function W0(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}function u2(n,l){const o=new Set(Array.from(n.querySelectorAll(`[${Te}]`)).map(d=>d.getAttribute(Te)).filter(d=>!!d));if(!o.has(l))return l;const i=l.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||l;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function f2(n,l){return Array.from(n.children).filter(o=>o instanceof HTMLElement?o.hasAttribute("data-editable")?!0:W0(o)?(o.setAttribute("data-editable","block"),o.getAttribute(Te)||o.setAttribute(Te,u2(l,"block-1")),!0):!1:!1)}function d2({html:n,slideId:l,groupElementId:o,elementIds:i,elementRects:s={},timestamp:u=Date.now()}){const d=pl(n);if(!d||!i.length)return null;const m=i.map(q=>Xe(d,q)).filter(q=>!!q);if(m.length!==i.length)return null;const g=m.flatMap(q=>q.getAttribute("data-group")==="true"?rd(q):[q]).filter((q,P,j)=>j.findIndex(I=>I===q)===P);if(g.length<2)return null;const b=Nf(m[0]);if(!b||m.some(q=>Nf(q)!==b)||Xe(d,o))return null;const p=m.filter(q=>q.getAttribute("data-group")==="true"),S=g.map(q=>Us(q,s)),E=Math.min(...S.map(q=>q.x)),T=Math.min(...S.map(q=>q.y)),C=Math.max(...S.map(q=>q.x+q.width)),A=Math.max(...S.map(q=>q.y+q.height)),R=J0(m[0],s),z=d.createElement("div");z.setAttribute("data-editable","block"),z.setAttribute("data-group","true"),z.setAttribute(Te,o),ld(z,{x:E-R.x,y:T-R.y,width:C-E,height:A-T});const D=Array.from(b.children).flatMap(q=>q instanceof HTMLElement?p.includes(q)?rd(q).filter(P=>g.includes(P)):g.includes(q)?[q]:[]:[]),Y=m.find(q=>Nf(q)===b)??null;(Y==null?void 0:Y.parentElement)===b?b.insertBefore(z,Y):b.appendChild(z);for(const q of D){const P=Us(q,s);ld(q,{x:P.x-E,y:P.y-T,width:P.width,height:P.height}),z.appendChild(q)}for(const q of p)q.children.length||q.remove();const ne=Bd(d);return ne===n?null:{type:"group.create",slideId:l,groupElementId:o,elementIds:D.map(q=>q.getAttribute(Te)).filter(q=>!!q),previousHtmlSource:n,nextHtmlSource:ne,timestamp:u}}function m2({html:n,slideId:l,groupElementId:o,elementRects:i={},elementPresentationStyles:s={},timestamp:u=Date.now()}){const d=pl(n);if(!d)return null;const m=Xe(d,o);if(!m||!m.parentElement)return null;const h=m.parentElement,g=J0(m,i),b=m.getAttribute("data-group")==="true",p=b?rd(m):f2(m,d);if(!p.length)return null;const S=m.getAttribute(Te),E=b?m:m.nextSibling,T=p.map(A=>A.getAttribute(Te)).filter(A=>!!A);for(const A of p){const R=Us(A,i);if(ld(A,{x:R.x-g.x,y:R.y-g.y,width:R.width,height:R.height}),!b){const z=A.getAttribute(Te)??"";Ty(A,s[z]),W0(A)&&(A.style.margin="0px");for(const D of Array.from(A.querySelectorAll(`[data-editable][${Te}]`))){const Y=D.getAttribute(Te)??"";Ty(D,s[Y])}}h.insertBefore(A,E)}b&&m.remove();const C=Bd(d);return C===n?null:{type:"group.ungroup",slideId:l,groupElementId:o,childElementIds:b||!S?T:[S,...T],previousHtmlSource:n,nextHtmlSource:C,timestamp:u}}function h2(n,l,o){return Pr(n,i=>{const s=Xe(i,l);s&&(s.textContent=o)})}function p2(n,l,o,i){return Pr(n,s=>{var d;const u=Xe(s,l);u&&(i.trim().length===0?u.style.removeProperty(o):u.style.setProperty(o,i),(d=u.getAttribute("style"))!=null&&d.trim()||u.removeAttribute("style"))})}function g2(n,l,o,i){return Pr(n,s=>{const u=Xe(s,l);u&&(i.trim().length===0?u.removeAttribute(o):u.setAttribute(o,i))})}function y2(n,l){var o;for(const i of Ud){const s=l[i];if(s===null){n.style[i]="";continue}n.style[i]=s}(o=n.getAttribute("style"))!=null&&o.trim()||n.removeAttribute("style")}function v2(n,l,o){return Pr(n,i=>{const s=Xe(i,l);s&&y2(s,o)})}function Is(n,l){const o=pl(n);if(!o)return null;const i=Xe(o,l);if(!i||!(i.parentElement instanceof HTMLElement))return null;const s=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(Te):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(Te):null;return{parentElementId:i.parentElement.getAttribute(Te),previousSiblingElementId:s,nextSiblingElementId:u}}function Gs(n,l){var i;const o=pl(n);return o?((i=Xe(o,l))==null?void 0:i.outerHTML)??null:null}function ev(n,l){var u;const o=pl(`<template>${n}</template>`),i=(u=o==null?void 0:o.querySelector("template"))==null?void 0:u.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const s=[i,...Array.from(i.querySelectorAll(`[${Te}]`))];for(const d of s){const m=d.getAttribute(Te);m&&l[m]&&d.setAttribute(Te,l[m])}return i.outerHTML}function b2(n,l){const o=new Set(Array.from(n.querySelectorAll(`[${Te}]`)).map(d=>d.getAttribute(Te)).filter(d=>!!d));if(!o.has(l))return l;const i=l.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||l;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function od(n,l){const o=pl(n);return o?b2(o,l):l}function x2(n,l){return Pr(n,o=>{var h;if(Xe(o,l.elementId))return;const i=pl(`<template>${l.html}</template>`),s=(h=i==null?void 0:i.querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(s instanceof HTMLElement))return;const u=(l.parentElementId?Xe(o,l.parentElementId):null)??o.querySelector(`[${Yl}]`)??o.body,d=l.nextSiblingElementId?Xe(o,l.nextSiblingElementId):null,m=l.previousSiblingElementId?Xe(o,l.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===u?u.insertBefore(o.importNode(s,!0),d):(m==null?void 0:m.parentElement)===u?m.after(o.importNode(s,!0)):u.appendChild(o.importNode(s,!0))})}function S2(n,l){return Pr(n,o=>{var i;(i=Xe(o,l))==null||i.remove()})}function Bl(n,l){return{...l,hidden:n.hidden,sourceFile:n.sourceFile}}function tv(n,l){if(l.type==="slide.visibility.update")return n.id!==l.slideId?n:{...n,hidden:l.nextHidden};if(l.type==="slide.title.update")return n.id!==l.slideId?n:{...n,title:l.nextTitle};if(!("slideId"in l)||l.type==="slide.reorder"||n.id!==l.slideId)return n;switch(l.type){case"operation.batch":return l.operations.reduce((o,i)=>tv(o,i),n);case"text.update":return Bl(n,ta(h2(n.htmlSource,l.elementId,l.nextText),n.id));case"style.update":return Bl(n,ta(p2(n.htmlSource,l.elementId,l.propertyName,l.nextValue),n.id));case"attribute.update":return Bl(n,ta(g2(n.htmlSource,l.elementId,l.attributeName,l.nextValue),n.id));case"element.layout.update":return Bl(n,ta(v2(n.htmlSource,l.elementId,l.nextStyle),n.id));case"element.insert":return Bl(n,ta(x2(n.htmlSource,l),n.id));case"element.remove":return Bl(n,ta(S2(n.htmlSource,l.elementId),n.id));case"group.create":case"group.ungroup":return Bl(n,ta(l.nextHtmlSource,n.id))}}function nv(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(l=>nv(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};case"slide.title.update":return{...n,previousTitle:n.nextTitle,nextTitle:n.previousTitle}}}const w2=`<!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 av(n,l){const o=new Set(n.map(s=>s.id));if(!o.has(l))return l;let i=2;for(;o.has(`${l}-${i}`);)i+=1;return`${l}-${i}`}function lv(n,l){const o=new Set(n.map(m=>m.sourceFile).filter(Boolean));if(!o.has(l))return l;const i=l.lastIndexOf("."),s=i>=0?l.slice(0,i):l,u=i>=0?l.slice(i):"";let d=2;for(;o.has(`${s}-${d}${u}`);)d+=1;return`${s}-${d}${u}`}function E2(n,l){const o=Math.max(l+1,1),i=av(n,`generated-slide-${o}`),s=lv(n,`${String(o).padStart(2,"0")}-untitled.html`);return{...ta(w2,i),hidden:!1,sourceFile:s,title:"Untitled Slide"}}function T2(n,l){const o=av(n,`${l.id}-copy`),i=lv(n,l.sourceFile?C2(l.sourceFile,"copy"):`${o}.html`);return{...ta(l.htmlSource,o),hidden:l.hidden===!0,sourceFile:i,title:l.title}}function C2(n,l){const o=n.lastIndexOf(".");return o<0?`${n}-${l}`:`${n.slice(0,o)}-${l}${n.slice(o)}`}function Cy(n,l){return Math.min(Math.max(n,0),l)}function Of(n,l){switch(l.type){case"slide.create":case"slide.duplicate":{const o=Cy(l.index,n.length);return[...n.slice(0,o),l.slide,...n.slice(o)]}case"slide.delete":return n.filter(o=>o.id!==l.slide.id);case"slide.reorder":{const o=n.findIndex(u=>u.id===l.slideId);if(o<0)return n;const i=[...n],[s]=i.splice(o,1);return s?(i.splice(Cy(l.toIndex,i.length),0,s),i):n}default:return n.map(o=>tv(o,l))}}function rv(n){return{slides:n,undoStack:[],redoStack:[]}}function vs(n,l){switch(l.type){case"history.reset":return rv(l.slides);case"history.commit":return{slides:Of(n.slides,l.operation),undoStack:[...n.undoStack,l.operation],redoStack:[]};case"history.undo":{const o=n.undoStack[n.undoStack.length-1];return o?{slides:Of(n.slides,nv(o)),undoStack:n.undoStack.slice(0,-1),redoStack:[...n.redoStack,o]}:n}case"history.redo":{const o=n.redoStack[n.redoStack.length-1];return o?{slides:Of(n.slides,o),undoStack:[...n.undoStack,o],redoStack:n.redoStack.slice(0,-1)}:n}}}async function M2({manifestUrl:n,fetchImpl:l,requestInit:o,slideIdPrefix:i="generated-slide-"}){var p;const s=l??globalThis.fetch;if(!s)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...o},d=await s(n,u);if(!d.ok)return null;const m=await d.json();if(!((p=m.slides)!=null&&p.length))return null;const h=d.url||n,g=new URL(h),b=await Promise.all(m.slides.map(async(S,E)=>{const T=new URL(S.file,h);for(const[z,D]of g.searchParams)T.searchParams.has(z)||T.searchParams.set(z,D);const C=await s(T.toString(),u);if(!C.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const A=await C.text(),R=ta(A,`${i}${E+1}`);return{...R,hidden:S.hidden===!0,sourceFile:S.file,title:S.title||R.title}}));return{manifest:m,slides:b}}const A2=["#F59E0B","#EF4444","#10B981","#3B82F6","#8B5CF6","#FFFFFF","#0F172A"];function _2(n){const l=n.filter(o=>o.hidden!==!0);return l.length>0?l:n}function R2(n,l){return Math.min(Math.max(n,0),Math.max(l-1,0))}/**
71
+ * @license lucide-react v1.14.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const ov=(...n)=>n.filter((l,o,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===o).join(" ").trim();/**
76
+ * @license lucide-react v1.14.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const N2=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 O2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,o,i)=>i?i.toUpperCase():o.toLowerCase());/**
86
+ * @license lucide-react v1.14.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const My=n=>{const l=O2(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 zf={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 z2=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},D2=x.createContext({}),j2=()=>x.useContext(D2),k2=x.forwardRef(({color:n,size:l,strokeWidth:o,absoluteStrokeWidth:i,className:s="",children:u,iconNode:d,...m},h)=>{const{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:p=!1,color:S="currentColor",className:E=""}=j2()??{},T=i??p?Number(o??b)*24/Number(l??g):o??b;return x.createElement("svg",{ref:h,...zf,width:l??g??zf.width,height:l??g??zf.height,stroke:n??S,strokeWidth:T,className:ov("lucide",E,s),...!u&&!z2(m)&&{"aria-hidden":"true"},...m},[...d.map(([C,A])=>x.createElement(C,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 Oe=(n,l)=>{const o=x.forwardRef(({className:i,...s},u)=>x.createElement(k2,{ref:u,iconNode:l,className:ov(`lucide-${N2(My(n))}`,`lucide-${n}`,i),...s}));return o.displayName=My(n),o};/**
106
+ * @license lucide-react v1.14.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const L2=[["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",key:"11f1s0"}],["path",{d:"M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",key:"t14dx9"}],["path",{d:"M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",key:"1w07xs"}],["path",{d:"M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",key:"1apec2"}]],id=Oe("align-center-horizontal",L2);/**
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 H2=[["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"}]],iv=Oe("align-center-vertical",H2);/**
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 B2=[["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"}]],sv=Oe("align-end-horizontal",B2);/**
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 U2=[["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"}]],cv=Oe("align-end-vertical",U2);/**
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 I2=[["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"}]],uv=Oe("align-start-horizontal",I2);/**
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 G2=[["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"}]],fv=Oe("align-start-vertical",G2);/**
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 Y2=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],dv=Oe("arrow-down-to-line",Y2);/**
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 V2=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],sd=Oe("arrow-up-to-line",V2);/**
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 q2=[["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"}]],P2=Oe("box",q2);/**
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 $2=[["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=Oe("case-sensitive",$2);/**
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 X2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],mv=Oe("check",X2);/**
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 K2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jo=Oe("chevron-down",K2);/**
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 F2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Q2=Oe("chevron-right",F2);/**
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 Z2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Id=Oe("chevron-up",Z2);/**
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 J2=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],W2=Oe("cloud",J2);/**
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 eE=[["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"}]],cd=Oe("columns-3",eE);/**
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 tE=[["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"}]],hv=Oe("copy",tE);/**
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 nE=[["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"}]],aE=Oe("download",nE);/**
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 lE=[["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"}]],Ay=Oe("eye-off",lE);/**
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 rE=[["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"}]],pv=Oe("eye",rE);/**
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 oE=[["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"}]],iE=Oe("file-check-corner",oE);/**
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 sE=[["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"}]],cE=Oe("file-code-corner",sE);/**
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 uE=[["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"}]],gv=Oe("file-text",uE);/**
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 fE=[["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"}]],ud=Oe("group",fE);/**
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 dE=[["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"}]],mE=Oe("hash",dE);/**
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 hE=[["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"}]],yv=Oe("layers",hE);/**
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 pE=[["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"}]],gE=Oe("link-2",pE);/**
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 yE=[["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"}]],_y=Oe("lock",yE);/**
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 vE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],bE=Oe("maximize-2",vE);/**
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 xE=[["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"}]],Ry=Oe("palette",xE);/**
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 SE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],wE=Oe("pen",SE);/**
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 EE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],TE=Oe("pencil",EE);/**
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 CE=[["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"}]],ME=Oe("pilcrow",CE);/**
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 AE=[["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"}]],_E=Oe("play",AE);/**
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 RE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],jf=Oe("plus",RE);/**
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 NE=[["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"}]],OE=Oe("presentation",NE);/**
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 zE=[["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"}]],DE=Oe("rotate-cw",zE);/**
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 jE=[["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"}]],vv=Oe("rows-3",jE);/**
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 kE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ny=Oe("square",kE);/**
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 LE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],HE=Oe("text-align-center",LE);/**
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 BE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],UE=Oe("text-align-end",BE);/**
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 IE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],GE=Oe("text-align-start",IE);/**
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 YE=[["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"}]],bv=Oe("trash-2",YE);/**
321
+ * @license lucide-react v1.14.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const VE=[["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"}]],Oy=Oe("type",VE);/**
326
+ * @license lucide-react v1.14.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const qE=[["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"}]],xv=Oe("ungroup",qE);/**
331
+ * @license lucide-react v1.14.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const PE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sv=Oe("x",PE);/**
336
+ * @license lucide-react v1.14.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const $E=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],XE=Oe("zap",$E);function wv(n){var l,o,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(l=0;l<s;l++)n[l]&&(o=wv(n[l]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function Ev(){for(var n,l,o=0,i="",s=arguments.length;o<s;o++)(n=arguments[o])&&(l=wv(n))&&(i&&(i+=" "),i+=l);return i}const KE=(n,l)=>{const o=new Array(n.length+l.length);for(let i=0;i<n.length;i++)o[i]=n[i];for(let i=0;i<l.length;i++)o[n.length+i]=l[i];return o},FE=(n,l)=>({classGroupId:n,validator:l}),Tv=(n=new Map,l=null,o)=>({nextPart:n,validators:l,classGroupId:o}),Ys="-",zy=[],QE="arbitrary..",ZE=n=>{const l=WE(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return JE(d);const m=d.split(Ys),h=m[0]===""&&m.length>1?1:0;return Cv(m,h,l)},getConflictingClassGroupIds:(d,m)=>{if(m){const h=i[d],g=o[d];return h?g?KE(g,h):h:g||zy}return o[d]||zy}}},Cv=(n,l,o)=>{if(n.length-l===0)return o.classGroupId;const s=n[l],u=o.nextPart.get(s);if(u){const g=Cv(n,l+1,u);if(g)return g}const d=o.validators;if(d===null)return;const m=l===0?n.join(Ys):n.slice(l).join(Ys),h=d.length;for(let g=0;g<h;g++){const b=d[g];if(b.validator(m))return b.classGroupId}},JE=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),o=l.indexOf(":"),i=l.slice(0,o);return i?QE+i:void 0})(),WE=n=>{const{theme:l,classGroups:o}=n;return eT(o,l)},eT=(n,l)=>{const o=Tv();for(const i in n){const s=n[i];Gd(s,o,i,l)}return o},Gd=(n,l,o,i)=>{const s=n.length;for(let u=0;u<s;u++){const d=n[u];tT(d,l,o,i)}},tT=(n,l,o,i)=>{if(typeof n=="string"){nT(n,l,o);return}if(typeof n=="function"){aT(n,l,o,i);return}lT(n,l,o,i)},nT=(n,l,o)=>{const i=n===""?l:Mv(l,n);i.classGroupId=o},aT=(n,l,o,i)=>{if(rT(n)){Gd(n(i),l,o,i);return}l.validators===null&&(l.validators=[]),l.validators.push(FE(o,n))},lT=(n,l,o,i)=>{const s=Object.entries(n),u=s.length;for(let d=0;d<u;d++){const[m,h]=s[d];Gd(h,Mv(l,m),o,i)}},Mv=(n,l)=>{let o=n;const i=l.split(Ys),s=i.length;for(let u=0;u<s;u++){const d=i[u];let m=o.nextPart.get(d);m||(m=Tv(),o.nextPart.set(d,m)),o=m}return o},rT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,oT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,o=Object.create(null),i=Object.create(null);const s=(u,d)=>{o[u]=d,l++,l>n&&(l=0,i=o,o=Object.create(null))};return{get(u){let d=o[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return s(u,d),d},set(u,d){u in o?o[u]=d:s(u,d)}}},fd="!",Dy=":",iT=[],jy=(n,l,o,i,s)=>({modifiers:n,hasImportantModifier:l,baseClassName:o,maybePostfixModifierPosition:i,isExternal:s}),sT=n=>{const{prefix:l,experimentalParseClassName:o}=n;let i=s=>{const u=[];let d=0,m=0,h=0,g;const b=s.length;for(let C=0;C<b;C++){const A=s[C];if(d===0&&m===0){if(A===Dy){u.push(s.slice(h,C)),h=C+1;continue}if(A==="/"){g=C;continue}}A==="["?d++:A==="]"?d--:A==="("?m++:A===")"&&m--}const p=u.length===0?s:s.slice(h);let S=p,E=!1;p.endsWith(fd)?(S=p.slice(0,-1),E=!0):p.startsWith(fd)&&(S=p.slice(1),E=!0);const T=g&&g>h?g-h:void 0;return jy(u,E,S,T)};if(l){const s=l+Dy,u=i;i=d=>d.startsWith(s)?u(d.slice(s.length)):jy(iT,!1,d,void 0,!0)}if(o){const s=i;i=u=>o({className:u,parseClassName:s})}return i},cT=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((o,i)=>{l.set(o,1e6+i)}),o=>{const i=[];let s=[];for(let u=0;u<o.length;u++){const d=o[u],m=d[0]==="[",h=l.has(d);m||h?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(d)):s.push(d)}return s.length>0&&(s.sort(),i.push(...s)),i}},uT=n=>({cache:oT(n.cacheSize),parseClassName:sT(n),sortModifiers:cT(n),...ZE(n)}),fT=/\s+/,dT=(n,l)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=l,d=[],m=n.trim().split(fT);let h="";for(let g=m.length-1;g>=0;g-=1){const b=m[g],{isExternal:p,modifiers:S,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:C}=o(b);if(p){h=b+(h.length>0?" "+h:h);continue}let A=!!C,R=i(A?T.substring(0,C):T);if(!R){if(!A){h=b+(h.length>0?" "+h:h);continue}if(R=i(T),!R){h=b+(h.length>0?" "+h:h);continue}A=!1}const z=S.length===0?"":S.length===1?S[0]:u(S).join(":"),D=E?z+fd:z,Y=D+R;if(d.indexOf(Y)>-1)continue;d.push(Y);const ne=s(R,A);for(let q=0;q<ne.length;++q){const P=ne[q];d.push(D+P)}h=b+(h.length>0?" "+h:h)}return h},mT=(...n)=>{let l=0,o,i,s="";for(;l<n.length;)(o=n[l++])&&(i=Av(o))&&(s&&(s+=" "),s+=i);return s},Av=n=>{if(typeof n=="string")return n;let l,o="";for(let i=0;i<n.length;i++)n[i]&&(l=Av(n[i]))&&(o&&(o+=" "),o+=l);return o},hT=(n,...l)=>{let o,i,s,u;const d=h=>{const g=l.reduce((b,p)=>p(b),n());return o=uT(g),i=o.cache.get,s=o.cache.set,u=m,m(h)},m=h=>{const g=i(h);if(g)return g;const b=dT(h,o);return s(h,b),b};return u=d,(...h)=>u(mT(...h))},pT=[],Rt=n=>{const l=o=>o[n]||pT;return l.isThemeGetter=!0,l},_v=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vT=/\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$/,bT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ST=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ol=n=>gT.test(n),Be=n=>!!n&&!Number.isNaN(Number(n)),il=n=>!!n&&Number.isInteger(Number(n)),kf=n=>n.endsWith("%")&&Be(n.slice(0,-1)),Ra=n=>yT.test(n),Nv=()=>!0,wT=n=>vT.test(n)&&!bT.test(n),Yd=()=>!1,ET=n=>xT.test(n),TT=n=>ST.test(n),CT=n=>!xe(n)&&!Se(n),MT=n=>gl(n,Dv,Yd),xe=n=>_v.test(n),Ul=n=>gl(n,jv,wT),ky=n=>gl(n,jT,Be),AT=n=>gl(n,Lv,Nv),_T=n=>gl(n,kv,Yd),Ly=n=>gl(n,Ov,Yd),RT=n=>gl(n,zv,TT),bs=n=>gl(n,Hv,ET),Se=n=>Rv.test(n),Vo=n=>Kl(n,jv),NT=n=>Kl(n,kv),Hy=n=>Kl(n,Ov),OT=n=>Kl(n,Dv),zT=n=>Kl(n,zv),xs=n=>Kl(n,Hv,!0),DT=n=>Kl(n,Lv,!0),gl=(n,l,o)=>{const i=_v.exec(n);return i?i[1]?l(i[1]):o(i[2]):!1},Kl=(n,l,o=!1)=>{const i=Rv.exec(n);return i?i[1]?l(i[1]):o:!1},Ov=n=>n==="position"||n==="percentage",zv=n=>n==="image"||n==="url",Dv=n=>n==="length"||n==="size"||n==="bg-size",jv=n=>n==="length",jT=n=>n==="number",kv=n=>n==="family-name",Lv=n=>n==="number"||n==="weight",Hv=n=>n==="shadow",kT=()=>{const n=Rt("color"),l=Rt("font"),o=Rt("text"),i=Rt("font-weight"),s=Rt("tracking"),u=Rt("leading"),d=Rt("breakpoint"),m=Rt("container"),h=Rt("spacing"),g=Rt("radius"),b=Rt("shadow"),p=Rt("inset-shadow"),S=Rt("text-shadow"),E=Rt("drop-shadow"),T=Rt("blur"),C=Rt("perspective"),A=Rt("aspect"),R=Rt("ease"),z=Rt("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ne=()=>[...Y(),Se,xe],q=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],j=()=>[Se,xe,h],I=()=>[ol,"full","auto",...j()],$=()=>[il,"none","subgrid",Se,xe],fe=()=>["auto",{span:["full",il,Se,xe]},il,Se,xe],ee=()=>[il,"auto",Se,xe],re=()=>["auto","min","max","fr",Se,xe],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...j()],N=()=>[ol,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],H=()=>[ol,"screen","full","dvw","lvw","svw","min","max","fit",...j()],B=()=>[ol,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],G=()=>[n,Se,xe],_=()=>[...Y(),Hy,Ly,{position:[Se,xe]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",OT,MT,{size:[Se,xe]}],oe=()=>[kf,Vo,Ul],ue=()=>["","none","full",g,Se,xe],me=()=>["",Be,Vo,Ul],ae=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[Be,kf,Hy,Ly],ge=()=>["","none",T,Se,xe],we=()=>["none",Be,Se,xe],Ce=()=>["none",Be,Se,xe],Ge=()=>[Be,Se,xe],Ye=()=>[ol,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ra],breakpoint:[Ra],color:[Nv],container:[Ra],"drop-shadow":[Ra],ease:["in","out","in-out"],font:[CT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ra],shadow:[Ra],spacing:["px",Be],text:[Ra],"text-shadow":[Ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ol,xe,Se,A]}],container:["container"],columns:[{columns:[Be,xe,Se,m]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:ne()}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[il,"auto",Se,xe]}],basis:[{basis:[ol,"full","auto",m,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,ol,"auto","initial","none",xe]}],grow:[{grow:["",Be,Se,xe]}],shrink:[{shrink:["",Be,Se,xe]}],order:[{order:[il,"first","last","none",Se,xe]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],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":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],"inline-size":[{inline:["auto",...H()]}],"min-inline-size":[{"min-inline":["auto",...H()]}],"max-inline-size":[{"max-inline":["none",...H()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[m,"screen",...N()]}],"min-w":[{"min-w":[m,"screen","none",...N()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",o,Vo,Ul]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,DT,AT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kf,xe]}],"font-family":[{font:[NT,_T,l]}],"font-features":[{"font-features":[xe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Se,xe]}],"line-clamp":[{"line-clamp":[Be,"none",Se,ky]}],leading:[{leading:[u,...j()]}],"list-image":[{"list-image":["none",Se,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",Se,Ul]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Be,"auto",Se,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},il,Se,xe],radial:["",Se,xe],conic:[il,Se,xe]},zT,RT]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,Se,xe]}],"outline-w":[{outline:["",Be,Vo,Ul]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",b,xs,bs]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,xs,bs]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Be,Ul]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",S,xs,bs]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Be,Se,xe]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"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":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Se,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":Y()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,xe]}],filter:[{filter:["","none",Se,xe]}],blur:[{blur:ge()}],brightness:[{brightness:[Be,Se,xe]}],contrast:[{contrast:[Be,Se,xe]}],"drop-shadow":[{"drop-shadow":["","none",E,xs,bs]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Be,Se,xe]}],"hue-rotate":[{"hue-rotate":[Be,Se,xe]}],invert:[{invert:["",Be,Se,xe]}],saturate:[{saturate:[Be,Se,xe]}],sepia:[{sepia:["",Be,Se,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,xe]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[Be,Se,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Be,Se,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,Se,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,Se,xe]}],"backdrop-invert":[{"backdrop-invert":["",Be,Se,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Be,Se,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Be,Se,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,Se,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",Se,xe]}],ease:[{ease:["linear","initial",R,Se,xe]}],delay:[{delay:[Be,Se,xe]}],animate:[{animate:["none",z,Se,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Se,xe]}],"perspective-origin":[{"perspective-origin":ne()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:Ge()}],"skew-x":[{"skew-x":Ge()}],"skew-y":[{"skew-y":Ge()}],transform:[{transform:[Se,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:ne()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",Se,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",Se,xe]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Be,Vo,Ul,ky]}],stroke:[{stroke:["none",...G()]}],"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"]}},LT=hT(kT);function Qe(...n){return LT(Ev(n))}const HT=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:cE},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:gv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:OE,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:W2,soon:!0}];function BT({title:n,onTitleChange:l,onPresent:o,onExportPdf:i,onExportHtml:s,pdfSlides:u=[],pdfThumbnails:d={},isSaving:m}){const[h,g]=x.useState(!1),[b,p]=x.useState(!1),[S,E]=x.useState(0),T=x.useRef(null),C=n||"Untitled presentation";x.useEffect(()=>{const z=D=>{T.current&&!T.current.contains(D.target)&&g(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]);const A=x.useCallback(z=>{if(!z)return;const D=z.getBoundingClientRect().width;E(Math.ceil(D))},[]),R=z=>{if(g(!1),z.soon){ul(`${z.label} is not available yet.`,{description:"We are still building this export option."});return}if(z.id==="pdf"){p(!0);return}if(z.id==="html"){s==null||s();return}ul(`Exporting as ${z.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:z=>l==null?void 0:l(z.target.value),"aria-label":"Deck title",className:"max-w-full min-w-0 flex-none rounded-md bg-transparent px-2 py-1 text-[18px] font-semibold text-foreground outline-none focus:bg-foreground/[0.04]",style:S?{width:`${S}px`}:void 0,placeholder:"Untitled presentation"}),v.jsx("span",{ref:A,"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 whitespace-pre rounded-md px-2 py-1 text-[18px] font-semibold",children:C},C)]}),m?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:T,children:[v.jsxs("button",{type:"button",onClick:()=>g(z=>!z),className:"h-8 px-3 rounded-md flex items-center gap-1.5 text-[13px] text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground transition-colors",children:[v.jsx(aE,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Export"}),v.jsx(Jo,{className:Qe("w-3 h-3 transition-transform",h&&"rotate-180")})]}),h&&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"}),HT.map(z=>{const D=z.icon;return v.jsxs("button",{type:"button",onClick:()=>R(z),className:Qe("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",z.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[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(D,{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:z.label}),z.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:z.desc})]}),!z.soon&&v.jsx(mv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},z.id)})]})]}),v.jsxs("button",{type:"button",onClick:o,className:"h-8 px-3.5 rounded-md flex items-center gap-1.5 text-[13px] font-medium bg-foreground text-background hover:bg-foreground/90 transition-colors",children:[v.jsx(_E,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Present"})]})]}),b?v.jsx(UT,{slides:u,thumbnails:d,onClose:()=>p(!1),onExport:z=>{p(!1),i==null||i(z)}}):null]})}function UT({slides:n,thumbnails:l,onClose:o,onExport:i}){const s=n.filter(T=>T.file),[u,d]=x.useState("all"),[m,h]=x.useState([]),g=new Set(m),b=m.length,p=u==="all"||u==="selected"&&b>0;x.useEffect(()=>{const T=C=>{C.key==="Escape"&&o()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[o]);const S=(T,C)=>{h(A=>C?A.includes(T)?A:[...A,T]:A.filter(R=>R!==T))},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:T=>{T.target===T.currentTarget&&o()},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(gv,{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:o,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-foreground/55 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:v.jsx(Sv,{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(By,{checked:u==="all",icon:yv,label:"All slides",detail:`${s.length} slides`,onChange:()=>d("all")}),v.jsx(By,{checked:u==="selected",icon:iE,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:s.map((T,C)=>{const A=T.file;return A?v.jsxs("label",{"data-testid":"pdf-slide-option",className:Qe("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[T.id]?v.jsx("img",{alt:`Slide ${C+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:l[T.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",C+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 ${C+1}`,checked:g.has(A),onChange:R=>S(A,R.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:C+1}),v.jsx("div",{className:"mt-0.5 line-clamp-2 text-[12px] font-medium leading-snug text-foreground/75",children:T.title})]})]})})]},T.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:o,className:"h-8 rounded-md px-3 text-[12px] font-medium text-foreground/60 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:"Cancel"}),v.jsx("button",{type:"button",onClick:E,disabled:!p,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 By({checked:n,disabled:l,icon:o,label:i,detail:s,onChange:u}){return v.jsxs("label",{className:Qe("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(o,{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:s})]})]})}const Uy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Iy=Ev,IT=(n,l)=>o=>{var i;if((l==null?void 0:l.variants)==null)return Iy(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:s,defaultVariants:u}=l,d=Object.keys(s).map(g=>{const b=o==null?void 0:o[g],p=u==null?void 0:u[g];if(b===null)return null;const S=Uy(b)||Uy(p);return s[g][S]}),m=o&&Object.entries(o).reduce((g,b)=>{let[p,S]=b;return S===void 0||(g[p]=S),g},{}),h=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((g,b)=>{let{class:p,className:S,...E}=b;return Object.entries(E).every(T=>{let[C,A]=T;return Array.isArray(A)?A.includes({...u,...m}[C]):{...u,...m}[C]===A})?[...g,p,S]:g},[]);return Iy(n,d,h,o==null?void 0:o.class,o==null?void 0:o.className)};function Gy(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Vd(...n){return l=>{let o=!1;const i=n.map(s=>{const u=Gy(s,l);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():Gy(n[s],null)}}}}function it(...n){return x.useCallback(Vd(...n),n)}function Ir(n){const l=YT(n),o=x.forwardRef((i,s)=>{const{children:u,...d}=i,m=x.Children.toArray(u),h=m.find(qT);if(h){const g=h.props.children,b=m.map(p=>p===h?x.Children.count(g)>1?x.Children.only(null):x.isValidElement(g)?g.props.children:null:p);return v.jsx(l,{...d,ref:s,children:x.isValidElement(g)?x.cloneElement(g,void 0,b):null})}return v.jsx(l,{...d,ref:s,children:u})});return o.displayName=`${n}.Slot`,o}var GT=Ir("Slot");function YT(n){const l=x.forwardRef((o,i)=>{const{children:s,...u}=o;if(x.isValidElement(s)){const d=$T(s),m=PT(u,s.props);return s.type!==x.Fragment&&(m.ref=i?Vd(i,d):d),x.cloneElement(s,m)}return x.Children.count(s)>1?x.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Bv=Symbol("radix.slottable");function VT(n){const l=({children:o})=>v.jsx(v.Fragment,{children:o});return l.displayName=`${n}.Slottable`,l.__radixId=Bv,l}function qT(n){return x.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Bv}function PT(n,l){const o={...l};for(const i in l){const s=n[i],u=l[i];/^on[A-Z]/.test(i)?s&&u?o[i]=(...m)=>{const h=u(...m);return s(...m),h}:s&&(o[i]=s):i==="style"?o[i]={...s,...u}:i==="className"&&(o[i]=[s,u].filter(Boolean).join(" "))}return{...n,...o}}function $T(n){var i,s;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var XT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Je=XT.reduce((n,l)=>{const o=Ir(`Primitive.${l}`),i=x.forwardRef((s,u)=>{const{asChild:d,...m}=s,h=d?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(h,{...m,ref:u})});return i.displayName=`Primitive.${l}`,{...n,[l]:i}},{});function Uv(n,l){n&&Zo.flushSync(()=>n.dispatchEvent(l))}var Iv=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"}),KT="VisuallyHidden",Gv=x.forwardRef((n,l)=>v.jsx(Je.span,{...n,ref:l,style:{...Iv,...n.style}}));Gv.displayName=KT;var FT=Gv;function Fl(n,l=[]){let o=[];function i(u,d){const m=x.createContext(d),h=o.length;o=[...o,d];const g=p=>{var R;const{scope:S,children:E,...T}=p,C=((R=S==null?void 0:S[n])==null?void 0:R[h])||m,A=x.useMemo(()=>T,Object.values(T));return v.jsx(C.Provider,{value:A,children:E})};g.displayName=u+"Provider";function b(p,S){var C;const E=((C=S==null?void 0:S[n])==null?void 0:C[h])||m,T=x.useContext(E);if(T)return T;if(d!==void 0)return d;throw new Error(`\`${p}\` must be used within \`${u}\``)}return[g,b]}const s=()=>{const u=o.map(d=>x.createContext(d));return function(m){const h=(m==null?void 0:m[n])||u;return x.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return s.scopeName=n,[i,QT(s,...l)]}function QT(...n){const l=n[0];if(n.length===1)return l;const o=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const d=i.reduce((m,{useScope:h,scopeName:g})=>{const p=h(u)[`__scope${g}`];return{...m,...p}},{});return x.useMemo(()=>({[`__scope${l.scopeName}`]:d}),[d])}};return o.scopeName=l.scopeName,o}function qd(n){const l=n+"CollectionProvider",[o,i]=Fl(l),[s,u]=o(l,{collectionRef:{current:null},itemMap:new Map}),d=C=>{const{scope:A,children:R}=C,z=pe.useRef(null),D=pe.useRef(new Map).current;return v.jsx(s,{scope:A,itemMap:D,collectionRef:z,children:R})};d.displayName=l;const m=n+"CollectionSlot",h=Ir(m),g=pe.forwardRef((C,A)=>{const{scope:R,children:z}=C,D=u(m,R),Y=it(A,D.collectionRef);return v.jsx(h,{ref:Y,children:z})});g.displayName=m;const b=n+"CollectionItemSlot",p="data-radix-collection-item",S=Ir(b),E=pe.forwardRef((C,A)=>{const{scope:R,children:z,...D}=C,Y=pe.useRef(null),ne=it(A,Y),q=u(b,R);return pe.useEffect(()=>(q.itemMap.set(Y,{ref:Y,...D}),()=>void q.itemMap.delete(Y))),v.jsx(S,{[p]:"",ref:ne,children:z})});E.displayName=b;function T(C){const A=u(n+"CollectionConsumer",C);return pe.useCallback(()=>{const z=A.collectionRef.current;if(!z)return[];const D=Array.from(z.querySelectorAll(`[${p}]`));return Array.from(A.itemMap.values()).sort((q,P)=>D.indexOf(q.ref.current)-D.indexOf(P.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:d,Slot:g,ItemSlot:E},T,i]}function Me(n,l,{checkForDefaultPrevented:o=!0}={}){return function(s){if(n==null||n(s),o===!1||!s.defaultPrevented)return l==null?void 0:l(s)}}var Xt=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},ZT=$0[" useInsertionEffect ".trim().toString()]||Xt;function Vs({prop:n,defaultProp:l,onChange:o=()=>{},caller:i}){const[s,u,d]=JT({defaultProp:l,onChange:o}),m=n!==void 0,h=m?n:s;{const b=x.useRef(n!==void 0);x.useEffect(()=>{const p=b.current;p!==m&&console.warn(`${i} is changing from ${p?"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 p;if(m){const S=WT(b)?b(n):b;S!==n&&((p=d.current)==null||p.call(d,S))}else u(b)},[m,n,u,d]);return[h,g]}function JT({defaultProp:n,onChange:l}){const[o,i]=x.useState(n),s=x.useRef(o),u=x.useRef(l);return ZT(()=>{u.current=l},[l]),x.useEffect(()=>{var d;s.current!==o&&((d=u.current)==null||d.call(u,o),s.current=o)},[o,s]),[o,i,u]}function WT(n){return typeof n=="function"}function eC(n,l){return x.useReducer((o,i)=>l[o][i]??o,n)}var $r=n=>{const{present:l,children:o}=n,i=tC(l),s=typeof o=="function"?o({present:i.isPresent}):x.Children.only(o),u=it(i.ref,nC(s));return typeof o=="function"||i.isPresent?x.cloneElement(s,{ref:u}):null};$r.displayName="Presence";function tC(n){const[l,o]=x.useState(),i=x.useRef(null),s=x.useRef(n),u=x.useRef("none"),d=n?"mounted":"unmounted",[m,h]=eC(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const g=Ss(i.current);u.current=m==="mounted"?g:"none"},[m]),Xt(()=>{const g=i.current,b=s.current;if(b!==n){const S=u.current,E=Ss(g);n?h("MOUNT"):E==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(b&&S!==E?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,h]),Xt(()=>{if(l){let g;const b=l.ownerDocument.defaultView??window,p=E=>{const C=Ss(i.current).includes(CSS.escape(E.animationName));if(E.target===l&&C&&(h("ANIMATION_END"),!s.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=Ss(i.current))};return l.addEventListener("animationstart",S),l.addEventListener("animationcancel",p),l.addEventListener("animationend",p),()=>{b.clearTimeout(g),l.removeEventListener("animationstart",S),l.removeEventListener("animationcancel",p),l.removeEventListener("animationend",p)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:x.useCallback(g=>{i.current=g?getComputedStyle(g):null,o(g)},[])}}function Ss(n){return(n==null?void 0:n.animationName)||"none"}function nC(n){var i,s;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var aC=$0[" useId ".trim().toString()]||(()=>{}),lC=0;function Gr(n){const[l,o]=x.useState(aC());return Xt(()=>{o(i=>i??String(lC++))},[n]),n||(l?`radix-${l}`:"")}var rC=x.createContext(void 0);function Pd(n){const l=x.useContext(rC);return n||l||"ltr"}function kn(n){const l=x.useRef(n);return x.useEffect(()=>{l.current=n}),x.useMemo(()=>(...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)},[])}function oC(n,l=globalThis==null?void 0:globalThis.document){const o=kn(n);x.useEffect(()=>{const i=s=>{s.key==="Escape"&&o(s)};return l.addEventListener("keydown",i,{capture:!0}),()=>l.removeEventListener("keydown",i,{capture:!0})},[o,l])}var iC="DismissableLayer",dd="dismissableLayer.update",sC="dismissableLayer.pointerDownOutside",cC="dismissableLayer.focusOutside",Yy,Yv=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nc=x.forwardRef((n,l)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...h}=n,g=x.useContext(Yv),[b,p]=x.useState(null),S=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=x.useState({}),T=it(l,P=>p(P)),C=Array.from(g.layers),[A]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),R=C.indexOf(A),z=b?C.indexOf(b):-1,D=g.layersWithOutsidePointerEventsDisabled.size>0,Y=z>=R,ne=dC(P=>{const j=P.target,I=[...g.branches].some($=>$.contains(j));!Y||I||(s==null||s(P),d==null||d(P),P.defaultPrevented||m==null||m())},S),q=mC(P=>{const j=P.target;[...g.branches].some($=>$.contains(j))||(u==null||u(P),d==null||d(P),P.defaultPrevented||m==null||m())},S);return oC(P=>{z===g.layers.size-1&&(i==null||i(P),!P.defaultPrevented&&m&&(P.preventDefault(),m()))},S),x.useEffect(()=>{if(b)return o&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Yy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(b)),g.layers.add(b),Vy(),()=>{o&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Yy)}},[b,S,o,g]),x.useEffect(()=>()=>{b&&(g.layers.delete(b),g.layersWithOutsidePointerEventsDisabled.delete(b),Vy())},[b,g]),x.useEffect(()=>{const P=()=>E({});return document.addEventListener(dd,P),()=>document.removeEventListener(dd,P)},[]),v.jsx(Je.div,{...h,ref:T,style:{pointerEvents:D?Y?"auto":"none":void 0,...n.style},onFocusCapture:Me(n.onFocusCapture,q.onFocusCapture),onBlurCapture:Me(n.onBlurCapture,q.onBlurCapture),onPointerDownCapture:Me(n.onPointerDownCapture,ne.onPointerDownCapture)})});nc.displayName=iC;var uC="DismissableLayerBranch",fC=x.forwardRef((n,l)=>{const o=x.useContext(Yv),i=x.useRef(null),s=it(l,i);return x.useEffect(()=>{const u=i.current;if(u)return o.branches.add(u),()=>{o.branches.delete(u)}},[o.branches]),v.jsx(Je.div,{...n,ref:s})});fC.displayName=uC;function dC(n,l=globalThis==null?void 0:globalThis.document){const o=kn(n),i=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const u=m=>{if(m.target&&!i.current){let h=function(){Vv(sC,o,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",s.current),s.current=h,l.addEventListener("click",s.current,{once:!0})):h()}else l.removeEventListener("click",s.current);i.current=!1},d=window.setTimeout(()=>{l.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),l.removeEventListener("pointerdown",u),l.removeEventListener("click",s.current)}},[l,o]),{onPointerDownCapture:()=>i.current=!0}}function mC(n,l=globalThis==null?void 0:globalThis.document){const o=kn(n),i=x.useRef(!1);return x.useEffect(()=>{const s=u=>{u.target&&!i.current&&Vv(cC,o,{originalEvent:u},{discrete:!1})};return l.addEventListener("focusin",s),()=>l.removeEventListener("focusin",s)},[l,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Vy(){const n=new CustomEvent(dd);document.dispatchEvent(n)}function Vv(n,l,o,{discrete:i}){const s=o.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});l&&s.addEventListener(n,l,{once:!0}),i?Uv(s,u):s.dispatchEvent(u)}var Lf="focusScope.autoFocusOnMount",Hf="focusScope.autoFocusOnUnmount",qy={bubbles:!1,cancelable:!0},hC="FocusScope",$d=x.forwardRef((n,l)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...d}=n,[m,h]=x.useState(null),g=kn(s),b=kn(u),p=x.useRef(null),S=it(l,C=>h(C)),E=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let C=function(D){if(E.paused||!m)return;const Y=D.target;m.contains(Y)?p.current=Y:cl(p.current,{select:!0})},A=function(D){if(E.paused||!m)return;const Y=D.relatedTarget;Y!==null&&(m.contains(Y)||cl(p.current,{select:!0}))},R=function(D){if(document.activeElement===document.body)for(const ne of D)ne.removedNodes.length>0&&cl(m)};document.addEventListener("focusin",C),document.addEventListener("focusout",A);const z=new MutationObserver(R);return m&&z.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",A),z.disconnect()}}},[i,m,E.paused]),x.useEffect(()=>{if(m){$y.add(E);const C=document.activeElement;if(!m.contains(C)){const R=new CustomEvent(Lf,qy);m.addEventListener(Lf,g),m.dispatchEvent(R),R.defaultPrevented||(pC(xC(qv(m)),{select:!0}),document.activeElement===C&&cl(m))}return()=>{m.removeEventListener(Lf,g),setTimeout(()=>{const R=new CustomEvent(Hf,qy);m.addEventListener(Hf,b),m.dispatchEvent(R),R.defaultPrevented||cl(C??document.body,{select:!0}),m.removeEventListener(Hf,b),$y.remove(E)},0)}}},[m,g,b,E]);const T=x.useCallback(C=>{if(!o&&!i||E.paused)return;const A=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,R=document.activeElement;if(A&&R){const z=C.currentTarget,[D,Y]=gC(z);D&&Y?!C.shiftKey&&R===Y?(C.preventDefault(),o&&cl(D,{select:!0})):C.shiftKey&&R===D&&(C.preventDefault(),o&&cl(Y,{select:!0})):R===z&&C.preventDefault()}},[o,i,E.paused]);return v.jsx(Je.div,{tabIndex:-1,...d,ref:S,onKeyDown:T})});$d.displayName=hC;function pC(n,{select:l=!1}={}){const o=document.activeElement;for(const i of n)if(cl(i,{select:l}),document.activeElement!==o)return}function gC(n){const l=qv(n),o=Py(l,n),i=Py(l.reverse(),n);return[o,i]}function qv(n){const l=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)l.push(o.currentNode);return l}function Py(n,l){for(const o of n)if(!yC(o,{upTo:l}))return o}function yC(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 vC(n){return n instanceof HTMLInputElement&&"select"in n}function cl(n,{select:l=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&vC(n)&&l&&n.select()}}var $y=bC();function bC(){let n=[];return{add(l){const o=n[0];l!==o&&(o==null||o.pause()),n=Xy(n,l),n.unshift(l)},remove(l){var o;n=Xy(n,l),(o=n[0])==null||o.resume()}}}function Xy(n,l){const o=[...n],i=o.indexOf(l);return i!==-1&&o.splice(i,1),o}function xC(n){return n.filter(l=>l.tagName!=="A")}var SC="Portal",Xd=x.forwardRef((n,l)=>{var m;const{container:o,...i}=n,[s,u]=x.useState(!1);Xt(()=>u(!0),[]);const d=o||s&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return d?K0.createPortal(v.jsx(Je.div,{...i,ref:l}),d):null});Xd.displayName=SC;var Bf=0;function Pv(){x.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ky()),document.body.insertAdjacentElement("beforeend",n[1]??Ky()),Bf++,()=>{Bf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),Bf--}},[])}function Ky(){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 na=function(){return na=Object.assign||function(l){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(l[u]=o[u])}return l},na.apply(this,arguments)};function $v(n,l){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&l.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)l.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(o[i[s]]=n[i[s]]);return o}function wC(n,l,o){if(o||arguments.length===2)for(var i=0,s=l.length,u;i<s;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 Ds="right-scroll-bar-position",js="width-before-scroll-bar",EC="with-scroll-bars-hidden",TC="--removed-body-scroll-bar-size";function Uf(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function CC(n,l){var o=x.useState(function(){return{value:n,callback:l,facade:{get current(){return o.value},set current(i){var s=o.value;s!==i&&(o.value=i,o.callback(i,s))}}}})[0];return o.callback=l,o.facade}var MC=typeof window<"u"?x.useLayoutEffect:x.useEffect,Fy=new WeakMap;function AC(n,l){var o=CC(null,function(i){return n.forEach(function(s){return Uf(s,i)})});return MC(function(){var i=Fy.get(o);if(i){var s=new Set(i),u=new Set(n),d=o.current;s.forEach(function(m){u.has(m)||Uf(m,null)}),u.forEach(function(m){s.has(m)||Uf(m,d)})}Fy.set(o,n)},[n]),o}function _C(n){return n}function RC(n,l){l===void 0&&(l=_C);var o=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(u){var d=l(u,i);return o.push(d),function(){o=o.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(i=!0;o.length;){var d=o;o=[],d.forEach(u)}o={push:function(m){return u(m)},filter:function(){return o}}},assignMedium:function(u){i=!0;var d=[];if(o.length){var m=o;o=[],m.forEach(u),d=o}var h=function(){var b=d;d=[],b.forEach(u)},g=function(){return Promise.resolve().then(h)};g(),o={push:function(b){d.push(b),g()},filter:function(b){return d=d.filter(b),o}}}};return s}function NC(n){n===void 0&&(n={});var l=RC(null);return l.options=na({async:!0,ssr:!1},n),l}var Xv=function(n){var l=n.sideCar,o=$v(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,na({},o))};Xv.isSideCarExport=!0;function OC(n,l){return n.useMedium(l),Xv}var Kv=NC(),If=function(){},ac=x.forwardRef(function(n,l){var o=x.useRef(null),i=x.useState({onScrollCapture:If,onWheelCapture:If,onTouchMoveCapture:If}),s=i[0],u=i[1],d=n.forwardProps,m=n.children,h=n.className,g=n.removeScrollBar,b=n.enabled,p=n.shards,S=n.sideCar,E=n.noRelative,T=n.noIsolation,C=n.inert,A=n.allowPinchZoom,R=n.as,z=R===void 0?"div":R,D=n.gapMode,Y=$v(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),ne=S,q=AC([o,l]),P=na(na({},Y),s);return x.createElement(x.Fragment,null,b&&x.createElement(ne,{sideCar:Kv,removeScrollBar:g,shards:p,noRelative:E,noIsolation:T,inert:C,setCallbacks:u,allowPinchZoom:!!A,lockRef:o,gapMode:D}),d?x.cloneElement(x.Children.only(m),na(na({},P),{ref:q})):x.createElement(z,na({},P,{className:h,ref:q}),m))});ac.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ac.classNames={fullWidth:js,zeroRight:Ds};var zC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=zC();return l&&n.setAttribute("nonce",l),n}function jC(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function kC(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var LC=function(){var n=0,l=null;return{add:function(o){n==0&&(l=DC())&&(jC(l,o),kC(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},HC=function(){var n=LC();return function(l,o){x.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&o])}},Fv=function(){var n=HC(),l=function(o){var i=o.styles,s=o.dynamic;return n(i,s),null};return l},BC={left:0,top:0,right:0,gap:0},Gf=function(n){return parseInt(n||"",10)||0},UC=function(n){var l=window.getComputedStyle(document.body),o=l[n==="padding"?"paddingLeft":"marginLeft"],i=l[n==="padding"?"paddingTop":"marginTop"],s=l[n==="padding"?"paddingRight":"marginRight"];return[Gf(o),Gf(i),Gf(s)]},IC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return BC;var l=UC(n),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-o+l[2]-l[0])}},GC=Fv(),Br="data-scroll-locked",YC=function(n,l,o,i){var s=n.left,u=n.top,d=n.right,m=n.gap;return o===void 0&&(o="margin"),`
341
+ .`.concat(EC,` {
342
+ overflow: hidden `).concat(i,`;
343
+ padding-right: `).concat(m,"px ").concat(i,`;
344
+ }
345
+ body[`).concat(Br,`] {
346
+ overflow: hidden `).concat(i,`;
347
+ overscroll-behavior: contain;
348
+ `).concat([l&&"position: relative ".concat(i,";"),o==="margin"&&`
349
+ padding-left: `.concat(s,`px;
350
+ padding-top: `).concat(u,`px;
351
+ padding-right: `).concat(d,`px;
352
+ margin-left:0;
353
+ margin-top:0;
354
+ margin-right: `).concat(m,"px ").concat(i,`;
355
+ `),o==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
356
+ }
357
+
358
+ .`).concat(Ds,` {
359
+ right: `).concat(m,"px ").concat(i,`;
360
+ }
361
+
362
+ .`).concat(js,` {
363
+ margin-right: `).concat(m,"px ").concat(i,`;
364
+ }
365
+
366
+ .`).concat(Ds," .").concat(Ds,` {
367
+ right: 0 `).concat(i,`;
368
+ }
369
+
370
+ .`).concat(js," .").concat(js,` {
371
+ margin-right: 0 `).concat(i,`;
372
+ }
373
+
374
+ body[`).concat(Br,`] {
375
+ `).concat(TC,": ").concat(m,`px;
376
+ }
377
+ `)},Qy=function(){var n=parseInt(document.body.getAttribute(Br)||"0",10);return isFinite(n)?n:0},VC=function(){x.useEffect(function(){return document.body.setAttribute(Br,(Qy()+1).toString()),function(){var n=Qy()-1;n<=0?document.body.removeAttribute(Br):document.body.setAttribute(Br,n.toString())}},[])},qC=function(n){var l=n.noRelative,o=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;VC();var u=x.useMemo(function(){return IC(s)},[s]);return x.createElement(GC,{styles:YC(u,!l,s,o?"":"!important")})},md=!1;if(typeof window<"u")try{var ws=Object.defineProperty({},"passive",{get:function(){return md=!0,!0}});window.addEventListener("test",ws,ws),window.removeEventListener("test",ws,ws)}catch{md=!1}var Or=md?{passive:!1}:!1,PC=function(n){return n.tagName==="TEXTAREA"},Qv=function(n,l){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[l]!=="hidden"&&!(o.overflowY===o.overflowX&&!PC(n)&&o[l]==="visible")},$C=function(n){return Qv(n,"overflowY")},XC=function(n){return Qv(n,"overflowX")},Zy=function(n,l){var o=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Zv(n,i);if(s){var u=Jv(n,i),d=u[1],m=u[2];if(d>m)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},KC=function(n){var l=n.scrollTop,o=n.scrollHeight,i=n.clientHeight;return[l,o,i]},FC=function(n){var l=n.scrollLeft,o=n.scrollWidth,i=n.clientWidth;return[l,o,i]},Zv=function(n,l){return n==="v"?$C(l):XC(l)},Jv=function(n,l){return n==="v"?KC(l):FC(l)},QC=function(n,l){return n==="h"&&l==="rtl"?-1:1},ZC=function(n,l,o,i,s){var u=QC(n,window.getComputedStyle(l).direction),d=u*i,m=o.target,h=l.contains(m),g=!1,b=d>0,p=0,S=0;do{if(!m)break;var E=Jv(n,m),T=E[0],C=E[1],A=E[2],R=C-A-u*T;(T||R)&&Zv(n,m)&&(p+=R,S+=T);var z=m.parentNode;m=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!h&&m!==document.body||h&&(l.contains(m)||l===m));return(b&&Math.abs(p)<1||!b&&Math.abs(S)<1)&&(g=!0),g},Es=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Jy=function(n){return[n.deltaX,n.deltaY]},Wy=function(n){return n&&"current"in n?n.current:n},JC=function(n,l){return n[0]===l[0]&&n[1]===l[1]},WC=function(n){return`
378
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
379
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
380
+ `)},eM=0,zr=[];function tM(n){var l=x.useRef([]),o=x.useRef([0,0]),i=x.useRef(),s=x.useState(eM++)[0],u=x.useState(Fv)[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(s));var C=wC([n.lockRef.current],(n.shards||[]).map(Wy),!0).filter(Boolean);return C.forEach(function(A){return A.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var m=x.useCallback(function(C,A){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!d.current.allowPinchZoom;var R=Es(C),z=o.current,D="deltaX"in C?C.deltaX:z[0]-R[0],Y="deltaY"in C?C.deltaY:z[1]-R[1],ne,q=C.target,P=Math.abs(D)>Math.abs(Y)?"h":"v";if("touches"in C&&P==="h"&&q.type==="range")return!1;var j=window.getSelection(),I=j&&j.anchorNode,$=I?I===q||I.contains(q):!1;if($)return!1;var fe=Zy(P,q);if(!fe)return!0;if(fe?ne=P:(ne=P==="v"?"h":"v",fe=Zy(P,q)),!fe)return!1;if(!i.current&&"changedTouches"in C&&(D||Y)&&(i.current=ne),!ne)return!0;var ee=i.current||ne;return ZC(ee,A,C,ee==="h"?D:Y)},[]),h=x.useCallback(function(C){var A=C;if(!(!zr.length||zr[zr.length-1]!==u)){var R="deltaY"in A?Jy(A):Es(A),z=l.current.filter(function(ne){return ne.name===A.type&&(ne.target===A.target||A.target===ne.shadowParent)&&JC(ne.delta,R)})[0];if(z&&z.should){A.cancelable&&A.preventDefault();return}if(!z){var D=(d.current.shards||[]).map(Wy).filter(Boolean).filter(function(ne){return ne.contains(A.target)}),Y=D.length>0?m(A,D[0]):!d.current.noIsolation;Y&&A.cancelable&&A.preventDefault()}}},[]),g=x.useCallback(function(C,A,R,z){var D={name:C,delta:A,target:R,should:z,shadowParent:nM(R)};l.current.push(D),setTimeout(function(){l.current=l.current.filter(function(Y){return Y!==D})},1)},[]),b=x.useCallback(function(C){o.current=Es(C),i.current=void 0},[]),p=x.useCallback(function(C){g(C.type,Jy(C),C.target,m(C,n.lockRef.current))},[]),S=x.useCallback(function(C){g(C.type,Es(C),C.target,m(C,n.lockRef.current))},[]);x.useEffect(function(){return zr.push(u),n.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:S}),document.addEventListener("wheel",h,Or),document.addEventListener("touchmove",h,Or),document.addEventListener("touchstart",b,Or),function(){zr=zr.filter(function(C){return C!==u}),document.removeEventListener("wheel",h,Or),document.removeEventListener("touchmove",h,Or),document.removeEventListener("touchstart",b,Or)}},[]);var E=n.removeScrollBar,T=n.inert;return x.createElement(x.Fragment,null,T?x.createElement(u,{styles:WC(s)}):null,E?x.createElement(qC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function nM(n){for(var l=null;n!==null;)n instanceof ShadowRoot&&(l=n.host,n=n.host),n=n.parentNode;return l}const aM=OC(Kv,tM);var Kd=x.forwardRef(function(n,l){return x.createElement(ac,na({},n,{ref:l,sideCar:aM}))});Kd.classNames=ac.classNames;var lM=function(n){if(typeof document>"u")return null;var l=Array.isArray(n)?n[0]:n;return l.ownerDocument.body},Dr=new WeakMap,Ts=new WeakMap,Cs={},Yf=0,Wv=function(n){return n&&(n.host||Wv(n.parentNode))},rM=function(n,l){return l.map(function(o){if(n.contains(o))return o;var i=Wv(o);return i&&n.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},oM=function(n,l,o,i){var s=rM(l,Array.isArray(n)?n:[n]);Cs[o]||(Cs[o]=new WeakMap);var u=Cs[o],d=[],m=new Set,h=new Set(s),g=function(p){!p||m.has(p)||(m.add(p),g(p.parentNode))};s.forEach(g);var b=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(S){if(m.has(S))b(S);else try{var E=S.getAttribute(i),T=E!==null&&E!=="false",C=(Dr.get(S)||0)+1,A=(u.get(S)||0)+1;Dr.set(S,C),u.set(S,A),d.push(S),C===1&&T&&Ts.set(S,!0),A===1&&S.setAttribute(o,"true"),T||S.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",S,R)}})};return b(l),m.clear(),Yf++,function(){d.forEach(function(p){var S=Dr.get(p)-1,E=u.get(p)-1;Dr.set(p,S),u.set(p,E),S||(Ts.has(p)||p.removeAttribute(i),Ts.delete(p)),E||p.removeAttribute(o)}),Yf--,Yf||(Dr=new WeakMap,Dr=new WeakMap,Ts=new WeakMap,Cs={})}},eb=function(n,l,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=lM(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),oM(i,s,o,"aria-hidden")):function(){return null}};function iM(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 sM(n){const[l,o]=x.useState(void 0);return Xt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let d,m;if("borderBoxSize"in u){const h=u.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;o({width:d,height:m})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else o(void 0)},[n]),l}const cM=["top","right","bottom","left"],ml=Math.min,yn=Math.max,qs=Math.round,Ms=Math.floor,la=n=>({x:n,y:n}),uM={left:"right",right:"left",bottom:"top",top:"bottom"};function hd(n,l,o){return yn(n,ml(l,o))}function Oa(n,l){return typeof n=="function"?n(l):n}function za(n){return n.split("-")[0]}function Xr(n){return n.split("-")[1]}function Fd(n){return n==="x"?"y":"x"}function Qd(n){return n==="y"?"height":"width"}function aa(n){const l=n[0];return l==="t"||l==="b"?"y":"x"}function Zd(n){return Fd(aa(n))}function fM(n,l,o){o===void 0&&(o=!1);const i=Xr(n),s=Zd(n),u=Qd(s);let d=s==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[u]>l.floating[u]&&(d=Ps(d)),[d,Ps(d)]}function dM(n){const l=Ps(n);return[pd(n),l,pd(l)]}function pd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const e0=["left","right"],t0=["right","left"],mM=["top","bottom"],hM=["bottom","top"];function pM(n,l,o){switch(n){case"top":case"bottom":return o?l?t0:e0:l?e0:t0;case"left":case"right":return l?mM:hM;default:return[]}}function gM(n,l,o,i){const s=Xr(n);let u=pM(za(n),o==="start",i);return s&&(u=u.map(d=>d+"-"+s),l&&(u=u.concat(u.map(pd)))),u}function Ps(n){const l=za(n);return uM[l]+n.slice(l.length)}function yM(n){return{top:0,right:0,bottom:0,left:0,...n}}function tb(n){return typeof n!="number"?yM(n):{top:n,right:n,bottom:n,left:n}}function $s(n){const{x:l,y:o,width:i,height:s}=n;return{width:i,height:s,top:o,left:l,right:l+i,bottom:o+s,x:l,y:o}}function n0(n,l,o){let{reference:i,floating:s}=n;const u=aa(l),d=Zd(l),m=Qd(d),h=za(l),g=u==="y",b=i.x+i.width/2-s.width/2,p=i.y+i.height/2-s.height/2,S=i[m]/2-s[m]/2;let E;switch(h){case"top":E={x:b,y:i.y-s.height};break;case"bottom":E={x:b,y:i.y+i.height};break;case"right":E={x:i.x+i.width,y:p};break;case"left":E={x:i.x-s.width,y:p};break;default:E={x:i.x,y:i.y}}switch(Xr(l)){case"start":E[d]-=S*(o&&g?-1:1);break;case"end":E[d]+=S*(o&&g?-1:1);break}return E}async function vM(n,l){var o;l===void 0&&(l={});const{x:i,y:s,platform:u,rects:d,elements:m,strategy:h}=n,{boundary:g="clippingAncestors",rootBoundary:b="viewport",elementContext:p="floating",altBoundary:S=!1,padding:E=0}=Oa(l,n),T=tb(E),A=m[S?p==="floating"?"reference":"floating":p],R=$s(await u.getClippingRect({element:(o=await(u.isElement==null?void 0:u.isElement(A)))==null||o?A:A.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(m.floating)),boundary:g,rootBoundary:b,strategy:h})),z=p==="floating"?{x:i,y:s,width:d.floating.width,height:d.floating.height}:d.reference,D=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),Y=await(u.isElement==null?void 0:u.isElement(D))?await(u.getScale==null?void 0:u.getScale(D))||{x:1,y:1}:{x:1,y:1},ne=$s(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:z,offsetParent:D,strategy:h}):z);return{top:(R.top-ne.top+T.top)/Y.y,bottom:(ne.bottom-R.bottom+T.bottom)/Y.y,left:(R.left-ne.left+T.left)/Y.x,right:(ne.right-R.right+T.right)/Y.x}}const bM=50,xM=async(n,l,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:d}=o,m=d.detectOverflow?d:{...d,detectOverflow:vM},h=await(d.isRTL==null?void 0:d.isRTL(l));let g=await d.getElementRects({reference:n,floating:l,strategy:s}),{x:b,y:p}=n0(g,i,h),S=i,E=0;const T={};for(let C=0;C<u.length;C++){const A=u[C];if(!A)continue;const{name:R,fn:z}=A,{x:D,y:Y,data:ne,reset:q}=await z({x:b,y:p,initialPlacement:i,placement:S,strategy:s,middlewareData:T,rects:g,platform:m,elements:{reference:n,floating:l}});b=D??b,p=Y??p,T[R]={...T[R],...ne},q&&E<bM&&(E++,typeof q=="object"&&(q.placement&&(S=q.placement),q.rects&&(g=q.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:s}):q.rects),{x:b,y:p}=n0(g,S,h)),C=-1)}return{x:b,y:p,placement:S,strategy:s,middlewareData:T}},SM=n=>({name:"arrow",options:n,async fn(l){const{x:o,y:i,placement:s,rects:u,platform:d,elements:m,middlewareData:h}=l,{element:g,padding:b=0}=Oa(n,l)||{};if(g==null)return{};const p=tb(b),S={x:o,y:i},E=Zd(s),T=Qd(E),C=await d.getDimensions(g),A=E==="y",R=A?"top":"left",z=A?"bottom":"right",D=A?"clientHeight":"clientWidth",Y=u.reference[T]+u.reference[E]-S[E]-u.floating[T],ne=S[E]-u.reference[E],q=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let P=q?q[D]:0;(!P||!await(d.isElement==null?void 0:d.isElement(q)))&&(P=m.floating[D]||u.floating[T]);const j=Y/2-ne/2,I=P/2-C[T]/2-1,$=ml(p[R],I),fe=ml(p[z],I),ee=$,re=P-C[T]-fe,V=P/2-C[T]/2+j,F=hd(ee,V,re),M=!h.arrow&&Xr(s)!=null&&V!==F&&u.reference[T]/2-(V<ee?$:fe)-C[T]/2<0,N=M?V<ee?V-ee:V-re:0;return{[E]:S[E]+N,data:{[E]:F,centerOffset:V-F-N,...M&&{alignmentOffset:N}},reset:M}}}),wM=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var o,i;const{placement:s,middlewareData:u,rects:d,initialPlacement:m,platform:h,elements:g}=l,{mainAxis:b=!0,crossAxis:p=!0,fallbackPlacements:S,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:C=!0,...A}=Oa(n,l);if((o=u.arrow)!=null&&o.alignmentOffset)return{};const R=za(s),z=aa(m),D=za(m)===m,Y=await(h.isRTL==null?void 0:h.isRTL(g.floating)),ne=S||(D||!C?[Ps(m)]:dM(m)),q=T!=="none";!S&&q&&ne.push(...gM(m,C,T,Y));const P=[m,...ne],j=await h.detectOverflow(l,A),I=[];let $=((i=u.flip)==null?void 0:i.overflows)||[];if(b&&I.push(j[R]),p){const V=fM(s,d,Y);I.push(j[V[0]],j[V[1]])}if($=[...$,{placement:s,overflows:I}],!I.every(V=>V<=0)){var fe,ee;const V=(((fe=u.flip)==null?void 0:fe.index)||0)+1,F=P[V];if(F&&(!(p==="alignment"?z!==aa(F):!1)||$.every(H=>aa(H.placement)===z?H.overflows[0]>0:!0)))return{data:{index:V,overflows:$},reset:{placement:F}};let M=(ee=$.filter(N=>N.overflows[0]<=0).sort((N,H)=>N.overflows[1]-H.overflows[1])[0])==null?void 0:ee.placement;if(!M)switch(E){case"bestFit":{var re;const N=(re=$.filter(H=>{if(q){const B=aa(H.placement);return B===z||B==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(B=>B>0).reduce((B,G)=>B+G,0)]).sort((H,B)=>H[1]-B[1])[0])==null?void 0:re[0];N&&(M=N);break}case"initialPlacement":M=m;break}if(s!==M)return{reset:{placement:M}}}return{}}}};function a0(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function l0(n){return cM.some(l=>n[l]>=0)}const EM=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:o,platform:i}=l,{strategy:s="referenceHidden",...u}=Oa(n,l);switch(s){case"referenceHidden":{const d=await i.detectOverflow(l,{...u,elementContext:"reference"}),m=a0(d,o.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:l0(m)}}}case"escaped":{const d=await i.detectOverflow(l,{...u,altBoundary:!0}),m=a0(d,o.floating);return{data:{escapedOffsets:m,escaped:l0(m)}}}default:return{}}}}},nb=new Set(["left","top"]);async function TM(n,l){const{placement:o,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),d=za(o),m=Xr(o),h=aa(o)==="y",g=nb.has(d)?-1:1,b=u&&h?-1:1,p=Oa(l,n);let{mainAxis:S,crossAxis:E,alignmentAxis:T}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return m&&typeof T=="number"&&(E=m==="end"?T*-1:T),h?{x:E*b,y:S*g}:{x:S*g,y:E*b}}const CM=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var o,i;const{x:s,y:u,placement:d,middlewareData:m}=l,h=await TM(l,n);return d===((o=m.offset)==null?void 0:o.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:s+h.x,y:u+h.y,data:{...h,placement:d}}}}},MM=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:o,y:i,placement:s,platform:u}=l,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:R=>{let{x:z,y:D}=R;return{x:z,y:D}}},...g}=Oa(n,l),b={x:o,y:i},p=await u.detectOverflow(l,g),S=aa(za(s)),E=Fd(S);let T=b[E],C=b[S];if(d){const R=E==="y"?"top":"left",z=E==="y"?"bottom":"right",D=T+p[R],Y=T-p[z];T=hd(D,T,Y)}if(m){const R=S==="y"?"top":"left",z=S==="y"?"bottom":"right",D=C+p[R],Y=C-p[z];C=hd(D,C,Y)}const A=h.fn({...l,[E]:T,[S]:C});return{...A,data:{x:A.x-o,y:A.y-i,enabled:{[E]:d,[S]:m}}}}}},AM=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:o,y:i,placement:s,rects:u,middlewareData:d}=l,{offset:m=0,mainAxis:h=!0,crossAxis:g=!0}=Oa(n,l),b={x:o,y:i},p=aa(s),S=Fd(p);let E=b[S],T=b[p];const C=Oa(m,l),A=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(h){const D=S==="y"?"height":"width",Y=u.reference[S]-u.floating[D]+A.mainAxis,ne=u.reference[S]+u.reference[D]-A.mainAxis;E<Y?E=Y:E>ne&&(E=ne)}if(g){var R,z;const D=S==="y"?"width":"height",Y=nb.has(za(s)),ne=u.reference[p]-u.floating[D]+(Y&&((R=d.offset)==null?void 0:R[p])||0)+(Y?0:A.crossAxis),q=u.reference[p]+u.reference[D]+(Y?0:((z=d.offset)==null?void 0:z[p])||0)-(Y?A.crossAxis:0);T<ne?T=ne:T>q&&(T=q)}return{[S]:E,[p]:T}}}},_M=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var o,i;const{placement:s,rects:u,platform:d,elements:m}=l,{apply:h=()=>{},...g}=Oa(n,l),b=await d.detectOverflow(l,g),p=za(s),S=Xr(s),E=aa(s)==="y",{width:T,height:C}=u.floating;let A,R;p==="top"||p==="bottom"?(A=p,R=S===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(R=p,A=S==="end"?"top":"bottom");const z=C-b.top-b.bottom,D=T-b.left-b.right,Y=ml(C-b[A],z),ne=ml(T-b[R],D),q=!l.middlewareData.shift;let P=Y,j=ne;if((o=l.middlewareData.shift)!=null&&o.enabled.x&&(j=D),(i=l.middlewareData.shift)!=null&&i.enabled.y&&(P=z),q&&!S){const $=yn(b.left,0),fe=yn(b.right,0),ee=yn(b.top,0),re=yn(b.bottom,0);E?j=T-2*($!==0||fe!==0?$+fe:yn(b.left,b.right)):P=C-2*(ee!==0||re!==0?ee+re:yn(b.top,b.bottom))}await h({...l,availableWidth:j,availableHeight:P});const I=await d.getDimensions(m.floating);return T!==I.width||C!==I.height?{reset:{rects:!0}}:{}}}};function lc(){return typeof window<"u"}function Kr(n){return ab(n)?(n.nodeName||"").toLowerCase():"#document"}function bn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function ra(n){var l;return(l=(ab(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function ab(n){return lc()?n instanceof Node||n instanceof bn(n).Node:!1}function qn(n){return lc()?n instanceof Element||n instanceof bn(n).Element:!1}function Da(n){return lc()?n instanceof HTMLElement||n instanceof bn(n).HTMLElement:!1}function r0(n){return!lc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof bn(n).ShadowRoot}function Wo(n){const{overflow:l,overflowX:o,overflowY:i,display:s}=Pn(n);return/auto|scroll|overlay|hidden|clip/.test(l+i+o)&&s!=="inline"&&s!=="contents"}function RM(n){return/^(table|td|th)$/.test(Kr(n))}function rc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const NM=/transform|translate|scale|rotate|perspective|filter/,OM=/paint|layout|strict|content/,Il=n=>!!n&&n!=="none";let Vf;function Jd(n){const l=qn(n)?Pn(n):n;return Il(l.transform)||Il(l.translate)||Il(l.scale)||Il(l.rotate)||Il(l.perspective)||!Wd()&&(Il(l.backdropFilter)||Il(l.filter))||NM.test(l.willChange||"")||OM.test(l.contain||"")}function zM(n){let l=hl(n);for(;Da(l)&&!Yr(l);){if(Jd(l))return l;if(rc(l))return null;l=hl(l)}return null}function Wd(){return Vf==null&&(Vf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vf}function Yr(n){return/^(html|body|#document)$/.test(Kr(n))}function Pn(n){return bn(n).getComputedStyle(n)}function oc(n){return qn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function hl(n){if(Kr(n)==="html")return n;const l=n.assignedSlot||n.parentNode||r0(n)&&n.host||ra(n);return r0(l)?l.host:l}function lb(n){const l=hl(n);return Yr(l)?n.ownerDocument?n.ownerDocument.body:n.body:Da(l)&&Wo(l)?l:lb(l)}function Ko(n,l,o){var i;l===void 0&&(l=[]),o===void 0&&(o=!0);const s=lb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),d=bn(s);if(u){const m=gd(d);return l.concat(d,d.visualViewport||[],Wo(s)?s:[],m&&o?Ko(m):[])}else return l.concat(s,Ko(s,[],o))}function gd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function rb(n){const l=Pn(n);let o=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const s=Da(n),u=s?n.offsetWidth:o,d=s?n.offsetHeight:i,m=qs(o)!==u||qs(i)!==d;return m&&(o=u,i=d),{width:o,height:i,$:m}}function em(n){return qn(n)?n:n.contextElement}function Ur(n){const l=em(n);if(!Da(l))return la(1);const o=l.getBoundingClientRect(),{width:i,height:s,$:u}=rb(l);let d=(u?qs(o.width):o.width)/i,m=(u?qs(o.height):o.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const DM=la(0);function ob(n){const l=bn(n);return!Wd()||!l.visualViewport?DM:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function jM(n,l,o){return l===void 0&&(l=!1),!o||l&&o!==bn(n)?!1:l}function Pl(n,l,o,i){l===void 0&&(l=!1),o===void 0&&(o=!1);const s=n.getBoundingClientRect(),u=em(n);let d=la(1);l&&(i?qn(i)&&(d=Ur(i)):d=Ur(n));const m=jM(u,o,i)?ob(u):la(0);let h=(s.left+m.x)/d.x,g=(s.top+m.y)/d.y,b=s.width/d.x,p=s.height/d.y;if(u){const S=bn(u),E=i&&qn(i)?bn(i):i;let T=S,C=gd(T);for(;C&&i&&E!==T;){const A=Ur(C),R=C.getBoundingClientRect(),z=Pn(C),D=R.left+(C.clientLeft+parseFloat(z.paddingLeft))*A.x,Y=R.top+(C.clientTop+parseFloat(z.paddingTop))*A.y;h*=A.x,g*=A.y,b*=A.x,p*=A.y,h+=D,g+=Y,T=bn(C),C=gd(T)}}return $s({width:b,height:p,x:h,y:g})}function ic(n,l){const o=oc(n).scrollLeft;return l?l.left+o:Pl(ra(n)).left+o}function ib(n,l){const o=n.getBoundingClientRect(),i=o.left+l.scrollLeft-ic(n,o),s=o.top+l.scrollTop;return{x:i,y:s}}function kM(n){let{elements:l,rect:o,offsetParent:i,strategy:s}=n;const u=s==="fixed",d=ra(i),m=l?rc(l.floating):!1;if(i===d||m&&u)return o;let h={scrollLeft:0,scrollTop:0},g=la(1);const b=la(0),p=Da(i);if((p||!p&&!u)&&((Kr(i)!=="body"||Wo(d))&&(h=oc(i)),p)){const E=Pl(i);g=Ur(i),b.x=E.x+i.clientLeft,b.y=E.y+i.clientTop}const S=d&&!p&&!u?ib(d,h):la(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-h.scrollLeft*g.x+b.x+S.x,y:o.y*g.y-h.scrollTop*g.y+b.y+S.y}}function LM(n){return Array.from(n.getClientRects())}function HM(n){const l=ra(n),o=oc(n),i=n.ownerDocument.body,s=yn(l.scrollWidth,l.clientWidth,i.scrollWidth,i.clientWidth),u=yn(l.scrollHeight,l.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+ic(n);const m=-o.scrollTop;return Pn(i).direction==="rtl"&&(d+=yn(l.clientWidth,i.clientWidth)-s),{width:s,height:u,x:d,y:m}}const o0=25;function BM(n,l){const o=bn(n),i=ra(n),s=o.visualViewport;let u=i.clientWidth,d=i.clientHeight,m=0,h=0;if(s){u=s.width,d=s.height;const b=Wd();(!b||b&&l==="fixed")&&(m=s.offsetLeft,h=s.offsetTop)}const g=ic(i);if(g<=0){const b=i.ownerDocument,p=b.body,S=getComputedStyle(p),E=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,T=Math.abs(i.clientWidth-p.clientWidth-E);T<=o0&&(u-=T)}else g<=o0&&(u+=g);return{width:u,height:d,x:m,y:h}}function UM(n,l){const o=Pl(n,!0,l==="fixed"),i=o.top+n.clientTop,s=o.left+n.clientLeft,u=Da(n)?Ur(n):la(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,h=s*u.x,g=i*u.y;return{width:d,height:m,x:h,y:g}}function i0(n,l,o){let i;if(l==="viewport")i=BM(n,o);else if(l==="document")i=HM(ra(n));else if(qn(l))i=UM(l,o);else{const s=ob(n);i={x:l.x-s.x,y:l.y-s.y,width:l.width,height:l.height}}return $s(i)}function sb(n,l){const o=hl(n);return o===l||!qn(o)||Yr(o)?!1:Pn(o).position==="fixed"||sb(o,l)}function IM(n,l){const o=l.get(n);if(o)return o;let i=Ko(n,[],!1).filter(m=>qn(m)&&Kr(m)!=="body"),s=null;const u=Pn(n).position==="fixed";let d=u?hl(n):n;for(;qn(d)&&!Yr(d);){const m=Pn(d),h=Jd(d);!h&&m.position==="fixed"&&(s=null),(u?!h&&!s:!h&&m.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Wo(d)&&!h&&sb(n,d))?i=i.filter(b=>b!==d):s=m,d=hl(d)}return l.set(n,i),i}function GM(n){let{element:l,boundary:o,rootBoundary:i,strategy:s}=n;const d=[...o==="clippingAncestors"?rc(l)?[]:IM(l,this._c):[].concat(o),i],m=i0(l,d[0],s);let h=m.top,g=m.right,b=m.bottom,p=m.left;for(let S=1;S<d.length;S++){const E=i0(l,d[S],s);h=yn(E.top,h),g=ml(E.right,g),b=ml(E.bottom,b),p=yn(E.left,p)}return{width:g-p,height:b-h,x:p,y:h}}function YM(n){const{width:l,height:o}=rb(n);return{width:l,height:o}}function VM(n,l,o){const i=Da(l),s=ra(l),u=o==="fixed",d=Pl(n,!0,u,l);let m={scrollLeft:0,scrollTop:0};const h=la(0);function g(){h.x=ic(s)}if(i||!i&&!u)if((Kr(l)!=="body"||Wo(s))&&(m=oc(l)),i){const E=Pl(l,!0,u,l);h.x=E.x+l.clientLeft,h.y=E.y+l.clientTop}else s&&g();u&&!i&&s&&g();const b=s&&!i&&!u?ib(s,m):la(0),p=d.left+m.scrollLeft-h.x-b.x,S=d.top+m.scrollTop-h.y-b.y;return{x:p,y:S,width:d.width,height:d.height}}function qf(n){return Pn(n).position==="static"}function s0(n,l){if(!Da(n)||Pn(n).position==="fixed")return null;if(l)return l(n);let o=n.offsetParent;return ra(n)===o&&(o=o.ownerDocument.body),o}function cb(n,l){const o=bn(n);if(rc(n))return o;if(!Da(n)){let s=hl(n);for(;s&&!Yr(s);){if(qn(s)&&!qf(s))return s;s=hl(s)}return o}let i=s0(n,l);for(;i&&RM(i)&&qf(i);)i=s0(i,l);return i&&Yr(i)&&qf(i)&&!Jd(i)?o:i||zM(n)||o}const qM=async function(n){const l=this.getOffsetParent||cb,o=this.getDimensions,i=await o(n.floating);return{reference:VM(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function PM(n){return Pn(n).direction==="rtl"}const $M={convertOffsetParentRelativeRectToViewportRelativeRect:kM,getDocumentElement:ra,getClippingRect:GM,getOffsetParent:cb,getElementRects:qM,getClientRects:LM,getDimensions:YM,getScale:Ur,isElement:qn,isRTL:PM};function ub(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function XM(n,l){let o=null,i;const s=ra(n);function u(){var m;clearTimeout(i),(m=o)==null||m.disconnect(),o=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),u();const g=n.getBoundingClientRect(),{left:b,top:p,width:S,height:E}=g;if(m||l(),!S||!E)return;const T=Ms(p),C=Ms(s.clientWidth-(b+S)),A=Ms(s.clientHeight-(p+E)),R=Ms(b),D={rootMargin:-T+"px "+-C+"px "+-A+"px "+-R+"px",threshold:yn(0,ml(1,h))||1};let Y=!0;function ne(q){const P=q[0].intersectionRatio;if(P!==h){if(!Y)return d();P?d(!1,P):i=setTimeout(()=>{d(!1,1e-7)},1e3)}P===1&&!ub(g,n.getBoundingClientRect())&&d(),Y=!1}try{o=new IntersectionObserver(ne,{...D,root:s.ownerDocument})}catch{o=new IntersectionObserver(ne,D)}o.observe(n)}return d(!0),u}function KM(n,l,o,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=em(n),b=s||u?[...g?Ko(g):[],...l?Ko(l):[]]:[];b.forEach(R=>{s&&R.addEventListener("scroll",o,{passive:!0}),u&&R.addEventListener("resize",o)});const p=g&&m?XM(g,o):null;let S=-1,E=null;d&&(E=new ResizeObserver(R=>{let[z]=R;z&&z.target===g&&E&&l&&(E.unobserve(l),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var D;(D=E)==null||D.observe(l)})),o()}),g&&!h&&E.observe(g),l&&E.observe(l));let T,C=h?Pl(n):null;h&&A();function A(){const R=Pl(n);C&&!ub(C,R)&&o(),C=R,T=requestAnimationFrame(A)}return o(),()=>{var R;b.forEach(z=>{s&&z.removeEventListener("scroll",o),u&&z.removeEventListener("resize",o)}),p==null||p(),(R=E)==null||R.disconnect(),E=null,h&&cancelAnimationFrame(T)}}const FM=CM,QM=MM,ZM=wM,JM=_M,WM=EM,c0=SM,eA=AM,tA=(n,l,o)=>{const i=new Map,s={platform:$M,...o},u={...s.platform,_c:i};return xM(n,l,{...s,platform:u})};var nA=typeof document<"u",aA=function(){},ks=nA?x.useLayoutEffect:aA;function Xs(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 o,i,s;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==l.length)return!1;for(i=o;i--!==0;)if(!Xs(n[i],l[i]))return!1;return!0}if(s=Object.keys(n),o=s.length,o!==Object.keys(l).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(l,s[i]))return!1;for(i=o;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!Xs(n[u],l[u]))return!1}return!0}return n!==n&&l!==l}function fb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function u0(n,l){const o=fb(n);return Math.round(l*o)/o}function Pf(n){const l=x.useRef(n);return ks(()=>{l.current=n}),l}function lA(n){n===void 0&&(n={});const{placement:l="bottom",strategy:o="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:d}={},transform:m=!0,whileElementsMounted:h,open:g}=n,[b,p]=x.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[S,E]=x.useState(i);Xs(S,i)||E(i);const[T,C]=x.useState(null),[A,R]=x.useState(null),z=x.useCallback(H=>{H!==q.current&&(q.current=H,C(H))},[]),D=x.useCallback(H=>{H!==P.current&&(P.current=H,R(H))},[]),Y=u||T,ne=d||A,q=x.useRef(null),P=x.useRef(null),j=x.useRef(b),I=h!=null,$=Pf(h),fe=Pf(s),ee=Pf(g),re=x.useCallback(()=>{if(!q.current||!P.current)return;const H={placement:l,strategy:o,middleware:S};fe.current&&(H.platform=fe.current),tA(q.current,P.current,H).then(B=>{const G={...B,isPositioned:ee.current!==!1};V.current&&!Xs(j.current,G)&&(j.current=G,Zo.flushSync(()=>{p(G)}))})},[S,l,o,fe,ee]);ks(()=>{g===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[g]);const V=x.useRef(!1);ks(()=>(V.current=!0,()=>{V.current=!1}),[]),ks(()=>{if(Y&&(q.current=Y),ne&&(P.current=ne),Y&&ne){if($.current)return $.current(Y,ne,re);re()}},[Y,ne,re,$,I]);const F=x.useMemo(()=>({reference:q,floating:P,setReference:z,setFloating:D}),[z,D]),M=x.useMemo(()=>({reference:Y,floating:ne}),[Y,ne]),N=x.useMemo(()=>{const H={position:o,left:0,top:0};if(!M.floating)return H;const B=u0(M.floating,b.x),G=u0(M.floating,b.y);return m?{...H,transform:"translate("+B+"px, "+G+"px)",...fb(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:B,top:G}},[o,m,M.floating,b.x,b.y]);return x.useMemo(()=>({...b,update:re,refs:F,elements:M,floatingStyles:N}),[b,re,F,M,N])}const rA=n=>{function l(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:i,padding:s}=typeof n=="function"?n(o):n;return i&&l(i)?i.current!=null?c0({element:i.current,padding:s}).fn(o):{}:i?c0({element:i,padding:s}).fn(o):{}}}},oA=(n,l)=>{const o=FM(n);return{name:o.name,fn:o.fn,options:[n,l]}},iA=(n,l)=>{const o=QM(n);return{name:o.name,fn:o.fn,options:[n,l]}},sA=(n,l)=>({fn:eA(n).fn,options:[n,l]}),cA=(n,l)=>{const o=ZM(n);return{name:o.name,fn:o.fn,options:[n,l]}},uA=(n,l)=>{const o=JM(n);return{name:o.name,fn:o.fn,options:[n,l]}},fA=(n,l)=>{const o=WM(n);return{name:o.name,fn:o.fn,options:[n,l]}},dA=(n,l)=>{const o=rA(n);return{name:o.name,fn:o.fn,options:[n,l]}};var mA="Arrow",db=x.forwardRef((n,l)=>{const{children:o,width:i=10,height:s=5,...u}=n;return v.jsx(Je.svg,{...u,ref:l,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});db.displayName=mA;var hA=db,tm="Popper",[mb,Fr]=Fl(tm),[pA,hb]=mb(tm),pb=n=>{const{__scopePopper:l,children:o}=n,[i,s]=x.useState(null);return v.jsx(pA,{scope:l,anchor:i,onAnchorChange:s,children:o})};pb.displayName=tm;var gb="PopperAnchor",yb=x.forwardRef((n,l)=>{const{__scopePopper:o,virtualRef:i,...s}=n,u=hb(gb,o),d=x.useRef(null),m=it(l,d),h=x.useRef(null);return x.useEffect(()=>{const g=h.current;h.current=(i==null?void 0:i.current)||d.current,g!==h.current&&u.onAnchorChange(h.current)}),i?null:v.jsx(Je.div,{...s,ref:m})});yb.displayName=gb;var nm="PopperContent",[gA,yA]=mb(nm),vb=x.forwardRef((n,l)=>{var ae,W,le,ge,we,Ce;const{__scopePopper:o,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:T,...C}=n,A=hb(nm,o),[R,z]=x.useState(null),D=it(l,Ge=>z(Ge)),[Y,ne]=x.useState(null),q=sM(Y),P=(q==null?void 0:q.width)??0,j=(q==null?void 0:q.height)??0,I=i+(u!=="center"?"-"+u:""),$=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},fe=Array.isArray(g)?g:[g],ee=fe.length>0,re={padding:$,boundary:fe.filter(bA),altBoundary:ee},{refs:V,floatingStyles:F,placement:M,isPositioned:N,middlewareData:H}=lA({strategy:"fixed",placement:I,whileElementsMounted:(...Ge)=>KM(...Ge,{animationFrame:E==="always"}),elements:{reference:A.anchor},middleware:[oA({mainAxis:s+j,alignmentAxis:d}),h&&iA({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?sA():void 0,...re}),h&&cA({...re}),uA({...re,apply:({elements:Ge,rects:Ye,availableWidth:qt,availableHeight:Bt})=>{const{width:Nt,height:ze}=Ye.reference,be=Ge.floating.style;be.setProperty("--radix-popper-available-width",`${qt}px`),be.setProperty("--radix-popper-available-height",`${Bt}px`),be.setProperty("--radix-popper-anchor-width",`${Nt}px`),be.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),Y&&dA({element:Y,padding:m}),xA({arrowWidth:P,arrowHeight:j}),S&&fA({strategy:"referenceHidden",...re})]}),[B,G]=Sb(M),_=kn(T);Xt(()=>{N&&(_==null||_())},[N,_]);const L=(ae=H.arrow)==null?void 0:ae.x,Z=(W=H.arrow)==null?void 0:W.y,oe=((le=H.arrow)==null?void 0:le.centerOffset)!==0,[ue,me]=x.useState();return Xt(()=>{R&&me(window.getComputedStyle(R).zIndex)},[R]),v.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:N?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(ge=H.transformOrigin)==null?void 0:ge.x,(we=H.transformOrigin)==null?void 0:we.y].join(" "),...((Ce=H.hide)==null?void 0:Ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:v.jsx(gA,{scope:o,placedSide:B,onArrowChange:ne,arrowX:L,arrowY:Z,shouldHideArrow:oe,children:v.jsx(Je.div,{"data-side":B,"data-align":G,...C,ref:D,style:{...C.style,animation:N?void 0:"none"}})})})});vb.displayName=nm;var bb="PopperArrow",vA={top:"bottom",right:"left",bottom:"top",left:"right"},xb=x.forwardRef(function(l,o){const{__scopePopper:i,...s}=l,u=yA(bb,i),d=vA[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(hA,{...s,ref:o,style:{...s.style,display:"block"}})})});xb.displayName=bb;function bA(n){return n!==null}var xA=n=>({name:"transformOrigin",options:n,fn(l){var A,R,z;const{placement:o,rects:i,middlewareData:s}=l,d=((A=s.arrow)==null?void 0:A.centerOffset)!==0,m=d?0:n.arrowWidth,h=d?0:n.arrowHeight,[g,b]=Sb(o),p={start:"0%",center:"50%",end:"100%"}[b],S=(((R=s.arrow)==null?void 0:R.x)??0)+m/2,E=(((z=s.arrow)==null?void 0:z.y)??0)+h/2;let T="",C="";return g==="bottom"?(T=d?p:`${S}px`,C=`${-h}px`):g==="top"?(T=d?p:`${S}px`,C=`${i.floating.height+h}px`):g==="right"?(T=`${-h}px`,C=d?p:`${E}px`):g==="left"&&(T=`${i.floating.width+h}px`,C=d?p:`${E}px`),{data:{x:T,y:C}}}});function Sb(n){const[l,o="center"]=n.split("-");return[l,o]}var am=pb,lm=yb,rm=vb,om=xb,$f="rovingFocusGroup.onEntryFocus",SA={bubbles:!1,cancelable:!0},ei="RovingFocusGroup",[yd,wb,wA]=qd(ei),[EA,Eb]=Fl(ei,[wA]),[TA,CA]=EA(ei),Tb=x.forwardRef((n,l)=>v.jsx(yd.Provider,{scope:n.__scopeRovingFocusGroup,children:v.jsx(yd.Slot,{scope:n.__scopeRovingFocusGroup,children:v.jsx(MA,{...n,ref:l})})}));Tb.displayName=ei;var MA=x.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:s=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:b=!1,...p}=n,S=x.useRef(null),E=it(l,S),T=Pd(u),[C,A]=Vs({prop:d,defaultProp:m??null,onChange:h,caller:ei}),[R,z]=x.useState(!1),D=kn(g),Y=wb(o),ne=x.useRef(!1),[q,P]=x.useState(0);return x.useEffect(()=>{const j=S.current;if(j)return j.addEventListener($f,D),()=>j.removeEventListener($f,D)},[D]),v.jsx(TA,{scope:o,orientation:i,dir:T,loop:s,currentTabStopId:C,onItemFocus:x.useCallback(j=>A(j),[A]),onItemShiftTab:x.useCallback(()=>z(!0),[]),onFocusableItemAdd:x.useCallback(()=>P(j=>j+1),[]),onFocusableItemRemove:x.useCallback(()=>P(j=>j-1),[]),children:v.jsx(Je.div,{tabIndex:R||q===0?-1:0,"data-orientation":i,...p,ref:E,style:{outline:"none",...n.style},onMouseDown:Me(n.onMouseDown,()=>{ne.current=!0}),onFocus:Me(n.onFocus,j=>{const I=!ne.current;if(j.target===j.currentTarget&&I&&!R){const $=new CustomEvent($f,SA);if(j.currentTarget.dispatchEvent($),!$.defaultPrevented){const fe=Y().filter(M=>M.focusable),ee=fe.find(M=>M.active),re=fe.find(M=>M.id===C),F=[ee,re,...fe].filter(Boolean).map(M=>M.ref.current);Ab(F,b)}}ne.current=!1}),onBlur:Me(n.onBlur,()=>z(!1))})})}),Cb="RovingFocusGroupItem",Mb=x.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:s=!1,tabStopId:u,children:d,...m}=n,h=Gr(),g=u||h,b=CA(Cb,o),p=b.currentTabStopId===g,S=wb(o),{onFocusableItemAdd:E,onFocusableItemRemove:T,currentTabStopId:C}=b;return x.useEffect(()=>{if(i)return E(),()=>T()},[i,E,T]),v.jsx(yd.ItemSlot,{scope:o,id:g,focusable:i,active:s,children:v.jsx(Je.span,{tabIndex:p?0:-1,"data-orientation":b.orientation,...m,ref:l,onMouseDown:Me(n.onMouseDown,A=>{i?b.onItemFocus(g):A.preventDefault()}),onFocus:Me(n.onFocus,()=>b.onItemFocus(g)),onKeyDown:Me(n.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){b.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const R=RA(A,b.orientation,b.dir);if(R!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let D=S().filter(Y=>Y.focusable).map(Y=>Y.ref.current);if(R==="last")D.reverse();else if(R==="prev"||R==="next"){R==="prev"&&D.reverse();const Y=D.indexOf(A.currentTarget);D=b.loop?NA(D,Y+1):D.slice(Y+1)}setTimeout(()=>Ab(D))}}),children:typeof d=="function"?d({isCurrentTabStop:p,hasTabStop:C!=null}):d})})});Mb.displayName=Cb;var AA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _A(n,l){return l!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function RA(n,l,o){const i=_A(n.key,o);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return AA[i]}function Ab(n,l=!1){const o=document.activeElement;for(const i of n)if(i===o||(i.focus({preventScroll:l}),document.activeElement!==o))return}function NA(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var OA=Tb,zA=Mb,vd=["Enter"," "],DA=["ArrowDown","PageUp","Home"],_b=["ArrowUp","PageDown","End"],jA=[...DA,..._b],kA={ltr:[...vd,"ArrowRight"],rtl:[...vd,"ArrowLeft"]},LA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ti="Menu",[Fo,HA,BA]=qd(ti),[Ql,Rb]=Fl(ti,[BA,Fr,Eb]),ni=Fr(),Nb=Eb(),[Ob,yl]=Ql(ti),[UA,ai]=Ql(ti),zb=n=>{const{__scopeMenu:l,open:o=!1,children:i,dir:s,onOpenChange:u,modal:d=!0}=n,m=ni(l),[h,g]=x.useState(null),b=x.useRef(!1),p=kn(u),S=Pd(s);return x.useEffect(()=>{const E=()=>{b.current=!0,document.addEventListener("pointerdown",T,{capture:!0,once:!0}),document.addEventListener("pointermove",T,{capture:!0,once:!0})},T=()=>b.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",T,{capture:!0}),document.removeEventListener("pointermove",T,{capture:!0})}},[]),v.jsx(am,{...m,children:v.jsx(Ob,{scope:l,open:o,onOpenChange:p,content:h,onContentChange:g,children:v.jsx(UA,{scope:l,onClose:x.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:b,dir:S,modal:d,children:i})})})};zb.displayName=ti;var IA="MenuAnchor",im=x.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,s=ni(o);return v.jsx(lm,{...s,...i,ref:l})});im.displayName=IA;var sm="MenuPortal",[GA,Db]=Ql(sm,{forceMount:void 0}),jb=n=>{const{__scopeMenu:l,forceMount:o,children:i,container:s}=n,u=yl(sm,l);return v.jsx(GA,{scope:l,forceMount:o,children:v.jsx($r,{present:o||u.open,children:v.jsx(Xd,{asChild:!0,container:s,children:i})})})};jb.displayName=sm;var jn="MenuContent",[YA,cm]=Ql(jn),kb=x.forwardRef((n,l)=>{const o=Db(jn,n.__scopeMenu),{forceMount:i=o.forceMount,...s}=n,u=yl(jn,n.__scopeMenu),d=ai(jn,n.__scopeMenu);return v.jsx(Fo.Provider,{scope:n.__scopeMenu,children:v.jsx($r,{present:i||u.open,children:v.jsx(Fo.Slot,{scope:n.__scopeMenu,children:d.modal?v.jsx(VA,{...s,ref:l}):v.jsx(qA,{...s,ref:l})})})})}),VA=x.forwardRef((n,l)=>{const o=yl(jn,n.__scopeMenu),i=x.useRef(null),s=it(l,i);return x.useEffect(()=>{const u=i.current;if(u)return eb(u)},[]),v.jsx(um,{...n,ref:s,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:Me(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),qA=x.forwardRef((n,l)=>{const o=yl(jn,n.__scopeMenu);return v.jsx(um,{...n,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),PA=Ir("MenuContent.ScrollLock"),um=x.forwardRef((n,l)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:p,onInteractOutside:S,onDismiss:E,disableOutsideScroll:T,...C}=n,A=yl(jn,o),R=ai(jn,o),z=ni(o),D=Nb(o),Y=HA(o),[ne,q]=x.useState(null),P=x.useRef(null),j=it(l,P,A.onContentChange),I=x.useRef(0),$=x.useRef(""),fe=x.useRef(0),ee=x.useRef(null),re=x.useRef("right"),V=x.useRef(0),F=T?Kd:x.Fragment,M=T?{as:PA,allowPinchZoom:!0}:void 0,N=B=>{var ae,W;const G=$.current+B,_=Y().filter(le=>!le.disabled),L=document.activeElement,Z=(ae=_.find(le=>le.ref.current===L))==null?void 0:ae.textValue,oe=_.map(le=>le.textValue),ue=a_(oe,G,Z),me=(W=_.find(le=>le.textValue===ue))==null?void 0:W.ref.current;(function le(ge){$.current=ge,window.clearTimeout(I.current),ge!==""&&(I.current=window.setTimeout(()=>le(""),1e3))})(G),me&&setTimeout(()=>me.focus())};x.useEffect(()=>()=>window.clearTimeout(I.current),[]),Pv();const H=x.useCallback(B=>{var _,L;return re.current===((_=ee.current)==null?void 0:_.side)&&r_(B,(L=ee.current)==null?void 0:L.area)},[]);return v.jsx(YA,{scope:o,searchRef:$,onItemEnter:x.useCallback(B=>{H(B)&&B.preventDefault()},[H]),onItemLeave:x.useCallback(B=>{var G;H(B)||((G=P.current)==null||G.focus(),q(null))},[H]),onTriggerLeave:x.useCallback(B=>{H(B)&&B.preventDefault()},[H]),pointerGraceTimerRef:fe,onPointerGraceIntentChange:x.useCallback(B=>{ee.current=B},[]),children:v.jsx(F,{...M,children:v.jsx($d,{asChild:!0,trapped:s,onMountAutoFocus:Me(u,B=>{var G;B.preventDefault(),(G=P.current)==null||G.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:v.jsx(nc,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:p,onInteractOutside:S,onDismiss:E,children:v.jsx(OA,{asChild:!0,...D,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:ne,onCurrentTabStopIdChange:q,onEntryFocus:Me(h,B=>{R.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(rm,{role:"menu","aria-orientation":"vertical","data-state":Jb(A.open),"data-radix-menu-content":"",dir:R.dir,...z,...C,ref:j,style:{outline:"none",...C.style},onKeyDown:Me(C.onKeyDown,B=>{const _=B.target.closest("[data-radix-menu-content]")===B.currentTarget,L=B.ctrlKey||B.altKey||B.metaKey,Z=B.key.length===1;_&&(B.key==="Tab"&&B.preventDefault(),!L&&Z&&N(B.key));const oe=P.current;if(B.target!==oe||!jA.includes(B.key))return;B.preventDefault();const me=Y().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);_b.includes(B.key)&&me.reverse(),t_(me)}),onBlur:Me(n.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(I.current),$.current="")}),onPointerMove:Me(n.onPointerMove,Qo(B=>{const G=B.target,_=V.current!==B.clientX;if(B.currentTarget.contains(G)&&_){const L=B.clientX>V.current?"right":"left";re.current=L,V.current=B.clientX}}))})})})})})})});kb.displayName=jn;var $A="MenuGroup",fm=x.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(Je.div,{role:"group",...i,ref:l})});fm.displayName=$A;var XA="MenuLabel",Lb=x.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(Je.div,{...i,ref:l})});Lb.displayName=XA;var Ks="MenuItem",f0="menu.itemSelect",sc=x.forwardRef((n,l)=>{const{disabled:o=!1,onSelect:i,...s}=n,u=x.useRef(null),d=ai(Ks,n.__scopeMenu),m=cm(Ks,n.__scopeMenu),h=it(l,u),g=x.useRef(!1),b=()=>{const p=u.current;if(!o&&p){const S=new CustomEvent(f0,{bubbles:!0,cancelable:!0});p.addEventListener(f0,E=>i==null?void 0:i(E),{once:!0}),Uv(p,S),S.defaultPrevented?g.current=!1:d.onClose()}};return v.jsx(Hb,{...s,ref:h,disabled:o,onClick:Me(n.onClick,b),onPointerDown:p=>{var S;(S=n.onPointerDown)==null||S.call(n,p),g.current=!0},onPointerUp:Me(n.onPointerUp,p=>{var S;g.current||(S=p.currentTarget)==null||S.click()}),onKeyDown:Me(n.onKeyDown,p=>{const S=m.searchRef.current!=="";o||S&&p.key===" "||vd.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});sc.displayName=Ks;var Hb=x.forwardRef((n,l)=>{const{__scopeMenu:o,disabled:i=!1,textValue:s,...u}=n,d=cm(Ks,o),m=Nb(o),h=x.useRef(null),g=it(l,h),[b,p]=x.useState(!1),[S,E]=x.useState("");return x.useEffect(()=>{const T=h.current;T&&E((T.textContent??"").trim())},[u.children]),v.jsx(Fo.ItemSlot,{scope:o,disabled:i,textValue:s??S,children:v.jsx(zA,{asChild:!0,...m,focusable:!i,children:v.jsx(Je.div,{role:"menuitem","data-highlighted":b?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:Me(n.onPointerMove,Qo(T=>{i?d.onItemLeave(T):(d.onItemEnter(T),T.defaultPrevented||T.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Me(n.onPointerLeave,Qo(T=>d.onItemLeave(T))),onFocus:Me(n.onFocus,()=>p(!0)),onBlur:Me(n.onBlur,()=>p(!1))})})})}),KA="MenuCheckboxItem",Bb=x.forwardRef((n,l)=>{const{checked:o=!1,onCheckedChange:i,...s}=n;return v.jsx(Vb,{scope:n.__scopeMenu,checked:o,children:v.jsx(sc,{role:"menuitemcheckbox","aria-checked":Fs(o)?"mixed":o,...s,ref:l,"data-state":hm(o),onSelect:Me(s.onSelect,()=>i==null?void 0:i(Fs(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Bb.displayName=KA;var Ub="MenuRadioGroup",[FA,QA]=Ql(Ub,{value:void 0,onValueChange:()=>{}}),Ib=x.forwardRef((n,l)=>{const{value:o,onValueChange:i,...s}=n,u=kn(i);return v.jsx(FA,{scope:n.__scopeMenu,value:o,onValueChange:u,children:v.jsx(fm,{...s,ref:l})})});Ib.displayName=Ub;var Gb="MenuRadioItem",Yb=x.forwardRef((n,l)=>{const{value:o,...i}=n,s=QA(Gb,n.__scopeMenu),u=o===s.value;return v.jsx(Vb,{scope:n.__scopeMenu,checked:u,children:v.jsx(sc,{role:"menuitemradio","aria-checked":u,...i,ref:l,"data-state":hm(u),onSelect:Me(i.onSelect,()=>{var d;return(d=s.onValueChange)==null?void 0:d.call(s,o)},{checkForDefaultPrevented:!1})})})});Yb.displayName=Gb;var dm="MenuItemIndicator",[Vb,ZA]=Ql(dm,{checked:!1}),qb=x.forwardRef((n,l)=>{const{__scopeMenu:o,forceMount:i,...s}=n,u=ZA(dm,o);return v.jsx($r,{present:i||Fs(u.checked)||u.checked===!0,children:v.jsx(Je.span,{...s,ref:l,"data-state":hm(u.checked)})})});qb.displayName=dm;var JA="MenuSeparator",Pb=x.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(Je.div,{role:"separator","aria-orientation":"horizontal",...i,ref:l})});Pb.displayName=JA;var WA="MenuArrow",$b=x.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,s=ni(o);return v.jsx(om,{...s,...i,ref:l})});$b.displayName=WA;var mm="MenuSub",[e_,Xb]=Ql(mm),Kb=n=>{const{__scopeMenu:l,children:o,open:i=!1,onOpenChange:s}=n,u=yl(mm,l),d=ni(l),[m,h]=x.useState(null),[g,b]=x.useState(null),p=kn(s);return x.useEffect(()=>(u.open===!1&&p(!1),()=>p(!1)),[u.open,p]),v.jsx(am,{...d,children:v.jsx(Ob,{scope:l,open:i,onOpenChange:p,content:g,onContentChange:b,children:v.jsx(e_,{scope:l,contentId:Gr(),triggerId:Gr(),trigger:m,onTriggerChange:h,children:o})})})};Kb.displayName=mm;var qo="MenuSubTrigger",Fb=x.forwardRef((n,l)=>{const o=yl(qo,n.__scopeMenu),i=ai(qo,n.__scopeMenu),s=Xb(qo,n.__scopeMenu),u=cm(qo,n.__scopeMenu),d=x.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=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 p=m.current;return()=>{window.clearTimeout(p),h(null)}},[m,h]),v.jsx(im,{asChild:!0,...g,children:v.jsx(Hb,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":s.contentId,"data-state":Jb(o.open),...n,ref:Vd(l,s.onTriggerChange),onClick:p=>{var S;(S=n.onClick)==null||S.call(n,p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:Me(n.onPointerMove,Qo(p=>{u.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),b()},100))})),onPointerLeave:Me(n.onPointerLeave,Qo(p=>{var E,T;b();const S=(E=o.content)==null?void 0:E.getBoundingClientRect();if(S){const C=(T=o.content)==null?void 0:T.dataset.side,A=C==="right",R=A?-5:5,z=S[A?"left":"right"],D=S[A?"right":"left"];u.onPointerGraceIntentChange({area:[{x:p.clientX+R,y:p.clientY},{x:z,y:S.top},{x:D,y:S.top},{x:D,y:S.bottom},{x:z,y:S.bottom}],side:C}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(p),p.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:Me(n.onKeyDown,p=>{var E;const S=u.searchRef.current!=="";n.disabled||S&&p.key===" "||kA[i.dir].includes(p.key)&&(o.onOpenChange(!0),(E=o.content)==null||E.focus(),p.preventDefault())})})})});Fb.displayName=qo;var Qb="MenuSubContent",Zb=x.forwardRef((n,l)=>{const o=Db(jn,n.__scopeMenu),{forceMount:i=o.forceMount,...s}=n,u=yl(jn,n.__scopeMenu),d=ai(jn,n.__scopeMenu),m=Xb(Qb,n.__scopeMenu),h=x.useRef(null),g=it(l,h);return v.jsx(Fo.Provider,{scope:n.__scopeMenu,children:v.jsx($r,{present:i||u.open,children:v.jsx(Fo.Slot,{scope:n.__scopeMenu,children:v.jsx(um,{id:m.contentId,"aria-labelledby":m.triggerId,...s,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:b=>{var p;d.isUsingKeyboardRef.current&&((p=h.current)==null||p.focus()),b.preventDefault()},onCloseAutoFocus:b=>b.preventDefault(),onFocusOutside:Me(n.onFocusOutside,b=>{b.target!==m.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:Me(n.onEscapeKeyDown,b=>{d.onClose(),b.preventDefault()}),onKeyDown:Me(n.onKeyDown,b=>{var E;const p=b.currentTarget.contains(b.target),S=LA[d.dir].includes(b.key);p&&S&&(u.onOpenChange(!1),(E=m.trigger)==null||E.focus(),b.preventDefault())})})})})})});Zb.displayName=Qb;function Jb(n){return n?"open":"closed"}function Fs(n){return n==="indeterminate"}function hm(n){return Fs(n)?"indeterminate":n?"checked":"unchecked"}function t_(n){const l=document.activeElement;for(const o of n)if(o===l||(o.focus(),document.activeElement!==l))return}function n_(n,l){return n.map((o,i)=>n[(l+i)%n.length])}function a_(n,l,o){const s=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,u=o?n.indexOf(o):-1;let d=n_(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.toLowerCase().startsWith(s.toLowerCase()));return h!==o?h:void 0}function l_(n,l){const{x:o,y:i}=n;let s=!1;for(let u=0,d=l.length-1;u<l.length;d=u++){const m=l[u],h=l[d],g=m.x,b=m.y,p=h.x,S=h.y;b>i!=S>i&&o<(p-g)*(i-b)/(S-b)+g&&(s=!s)}return s}function r_(n,l){if(!l)return!1;const o={x:n.clientX,y:n.clientY};return l_(o,l)}function Qo(n){return l=>l.pointerType==="mouse"?n(l):void 0}var o_=zb,i_=im,s_=jb,c_=kb,u_=fm,f_=Lb,d_=sc,m_=Bb,h_=Ib,p_=Yb,g_=qb,y_=Pb,v_=$b,b_=Kb,x_=Fb,S_=Zb,pm="ContextMenu",[w_]=Fl(pm,[Rb]),Kt=Rb(),[E_,Wb]=w_(pm),ex=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,dir:s,modal:u=!0}=n,[d,m]=x.useState(!1),h=Kt(l),g=kn(i),b=x.useCallback(p=>{m(p),g(p)},[g]);return v.jsx(E_,{scope:l,open:d,onOpenChange:b,modal:u,children:v.jsx(o_,{...h,dir:s,open:d,onOpenChange:b,modal:u,children:o})})};ex.displayName=pm;var tx="ContextMenuTrigger",nx=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,disabled:i=!1,...s}=n,u=Wb(tx,o),d=Kt(o),m=x.useRef({x:0,y:0}),h=x.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),g=x.useRef(0),b=x.useCallback(()=>window.clearTimeout(g.current),[]),p=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(i_,{...d,virtualRef:h}),v.jsx(Je.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...s,ref:l,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:Me(n.onContextMenu,S=>{b(),p(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:Me(n.onPointerDown,As(S=>{b(),g.current=window.setTimeout(()=>p(S),700)})),onPointerMove:i?n.onPointerMove:Me(n.onPointerMove,As(b)),onPointerCancel:i?n.onPointerCancel:Me(n.onPointerCancel,As(b)),onPointerUp:i?n.onPointerUp:Me(n.onPointerUp,As(b))})]})});nx.displayName=tx;var T_="ContextMenuPortal",ax=n=>{const{__scopeContextMenu:l,...o}=n,i=Kt(l);return v.jsx(s_,{...i,...o})};ax.displayName=T_;var lx="ContextMenuContent",rx=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Wb(lx,o),u=Kt(o),d=x.useRef(!1);return v.jsx(c_,{...u,...i,ref:l,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=n.onCloseAutoFocus)==null||h.call(n,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=n.onInteractOutside)==null||h.call(n,m),!m.defaultPrevented&&!s.modal&&(d.current=!0)},style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rx.displayName=lx;var C_="ContextMenuGroup",M_=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(u_,{...s,...i,ref:l})});M_.displayName=C_;var A_="ContextMenuLabel",__=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(f_,{...s,...i,ref:l})});__.displayName=A_;var R_="ContextMenuItem",ox=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(d_,{...s,...i,ref:l})});ox.displayName=R_;var N_="ContextMenuCheckboxItem",O_=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(m_,{...s,...i,ref:l})});O_.displayName=N_;var z_="ContextMenuRadioGroup",D_=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(h_,{...s,...i,ref:l})});D_.displayName=z_;var j_="ContextMenuRadioItem",k_=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(p_,{...s,...i,ref:l})});k_.displayName=j_;var L_="ContextMenuItemIndicator",H_=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(g_,{...s,...i,ref:l})});H_.displayName=L_;var B_="ContextMenuSeparator",ix=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(y_,{...s,...i,ref:l})});ix.displayName=B_;var U_="ContextMenuArrow",I_=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(v_,{...s,...i,ref:l})});I_.displayName=U_;var sx="ContextMenuSub",cx=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,open:s,defaultOpen:u}=n,d=Kt(l),[m,h]=Vs({prop:s,defaultProp:u??!1,onChange:i,caller:sx});return v.jsx(b_,{...d,open:m,onOpenChange:h,children:o})};cx.displayName=sx;var G_="ContextMenuSubTrigger",ux=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(x_,{...s,...i,ref:l})});ux.displayName=G_;var Y_="ContextMenuSubContent",fx=x.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Kt(o);return v.jsx(S_,{...s,...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)"}})});fx.displayName=Y_;function As(n){return l=>l.pointerType!=="mouse"?n(l):void 0}var V_=ex,q_=nx,P_=ax,$_=rx,X_=ox,K_=ix,F_=cx,Q_=ux,Z_=fx;function d0(n,[l,o]){return Math.min(o,Math.max(l,n))}var J_=[" ","Enter","ArrowUp","ArrowDown"],W_=[" ","Enter"],$l="Select",[cc,uc,eR]=qd($l),[Qr]=Fl($l,[eR,Fr]),fc=Fr(),[tR,vl]=Qr($l),[nR,aR]=Qr($l),dx=n=>{const{__scopeSelect:l,children:o,open:i,defaultOpen:s,onOpenChange:u,value:d,defaultValue:m,onValueChange:h,dir:g,name:b,autoComplete:p,disabled:S,required:E,form:T}=n,C=fc(l),[A,R]=x.useState(null),[z,D]=x.useState(null),[Y,ne]=x.useState(!1),q=Pd(g),[P,j]=Vs({prop:i,defaultProp:s??!1,onChange:u,caller:$l}),[I,$]=Vs({prop:d,defaultProp:m,onChange:h,caller:$l}),fe=x.useRef(null),ee=A?T||!!A.closest("form"):!0,[re,V]=x.useState(new Set),F=Array.from(re).map(M=>M.props.value).join(";");return v.jsx(am,{...C,children:v.jsxs(tR,{required:E,scope:l,trigger:A,onTriggerChange:R,valueNode:z,onValueNodeChange:D,valueNodeHasChildren:Y,onValueNodeHasChildrenChange:ne,contentId:Gr(),value:I,onValueChange:$,open:P,onOpenChange:j,dir:q,triggerPointerDownPosRef:fe,disabled:S,children:[v.jsx(cc.Provider,{scope:l,children:v.jsx(nR,{scope:n.__scopeSelect,onNativeOptionAdd:x.useCallback(M=>{V(N=>new Set(N).add(M))},[]),onNativeOptionRemove:x.useCallback(M=>{V(N=>{const H=new Set(N);return H.delete(M),H})},[]),children:o})}),ee?v.jsxs(kx,{"aria-hidden":!0,required:E,tabIndex:-1,name:b,autoComplete:p,value:I,onChange:M=>$(M.target.value),disabled:S,form:T,children:[I===void 0?v.jsx("option",{value:""}):null,Array.from(re)]},F):null]})})};dx.displayName=$l;var mx="SelectTrigger",hx=x.forwardRef((n,l)=>{const{__scopeSelect:o,disabled:i=!1,...s}=n,u=fc(o),d=vl(mx,o),m=d.disabled||i,h=it(l,d.onTriggerChange),g=uc(o),b=x.useRef("touch"),[p,S,E]=Hx(C=>{const A=g().filter(D=>!D.disabled),R=A.find(D=>D.value===d.value),z=Bx(A,C,R);z!==void 0&&d.onValueChange(z.value)}),T=C=>{m||(d.onOpenChange(!0),E()),C&&(d.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return v.jsx(lm,{asChild:!0,...u,children:v.jsx(Je.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":Lx(d.value)?"":void 0,...s,ref:h,onClick:Me(s.onClick,C=>{C.currentTarget.focus(),b.current!=="mouse"&&T(C)}),onPointerDown:Me(s.onPointerDown,C=>{b.current=C.pointerType;const A=C.target;A.hasPointerCapture(C.pointerId)&&A.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(T(C),C.preventDefault())}),onKeyDown:Me(s.onKeyDown,C=>{const A=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&S(C.key),!(A&&C.key===" ")&&J_.includes(C.key)&&(T(),C.preventDefault())})})})});hx.displayName=mx;var px="SelectValue",gx=x.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:s,children:u,placeholder:d="",...m}=n,h=vl(px,o),{onValueNodeHasChildrenChange:g}=h,b=u!==void 0,p=it(l,h.onValueNodeChange);return Xt(()=>{g(b)},[g,b]),v.jsx(Je.span,{...m,ref:p,style:{pointerEvents:"none"},children:Lx(h.value)?v.jsx(v.Fragment,{children:d}):u})});gx.displayName=px;var lR="SelectIcon",yx=x.forwardRef((n,l)=>{const{__scopeSelect:o,children:i,...s}=n;return v.jsx(Je.span,{"aria-hidden":!0,...s,ref:l,children:i||"▼"})});yx.displayName=lR;var rR="SelectPortal",vx=n=>v.jsx(Xd,{asChild:!0,...n});vx.displayName=rR;var Xl="SelectContent",bx=x.forwardRef((n,l)=>{const o=vl(Xl,n.__scopeSelect),[i,s]=x.useState();if(Xt(()=>{s(new DocumentFragment)},[]),!o.open){const u=i;return u?Zo.createPortal(v.jsx(xx,{scope:n.__scopeSelect,children:v.jsx(cc.Slot,{scope:n.__scopeSelect,children:v.jsx("div",{children:n.children})})}),u):null}return v.jsx(Sx,{...n,ref:l})});bx.displayName=Xl;var Yn=10,[xx,bl]=Qr(Xl),oR="SelectContentImpl",iR=Ir("SelectContent.RemoveScroll"),Sx=x.forwardRef((n,l)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:d,side:m,sideOffset:h,align:g,alignOffset:b,arrowPadding:p,collisionBoundary:S,collisionPadding:E,sticky:T,hideWhenDetached:C,avoidCollisions:A,...R}=n,z=vl(Xl,o),[D,Y]=x.useState(null),[ne,q]=x.useState(null),P=it(l,ae=>Y(ae)),[j,I]=x.useState(null),[$,fe]=x.useState(null),ee=uc(o),[re,V]=x.useState(!1),F=x.useRef(!1);x.useEffect(()=>{if(D)return eb(D)},[D]),Pv();const M=x.useCallback(ae=>{const[W,...le]=ee().map(Ce=>Ce.ref.current),[ge]=le.slice(-1),we=document.activeElement;for(const Ce of ae)if(Ce===we||(Ce==null||Ce.scrollIntoView({block:"nearest"}),Ce===W&&ne&&(ne.scrollTop=0),Ce===ge&&ne&&(ne.scrollTop=ne.scrollHeight),Ce==null||Ce.focus(),document.activeElement!==we))return},[ee,ne]),N=x.useCallback(()=>M([j,D]),[M,j,D]);x.useEffect(()=>{re&&N()},[re,N]);const{onOpenChange:H,triggerPointerDownPosRef:B}=z;x.useEffect(()=>{if(D){let ae={x:0,y:0};const W=ge=>{var we,Ce;ae={x:Math.abs(Math.round(ge.pageX)-(((we=B.current)==null?void 0:we.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((Ce=B.current)==null?void 0:Ce.y)??0))}},le=ge=>{ae.x<=10&&ae.y<=10?ge.preventDefault():D.contains(ge.target)||H(!1),document.removeEventListener("pointermove",W),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",le,{capture:!0})}}},[D,H,B]),x.useEffect(()=>{const ae=()=>H(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[H]);const[G,_]=Hx(ae=>{const W=ee().filter(we=>!we.disabled),le=W.find(we=>we.ref.current===document.activeElement),ge=Bx(W,ae,le);ge&&setTimeout(()=>ge.ref.current.focus())}),L=x.useCallback((ae,W,le)=>{const ge=!F.current&&!le;(z.value!==void 0&&z.value===W||ge)&&(I(ae),ge&&(F.current=!0))},[z.value]),Z=x.useCallback(()=>D==null?void 0:D.focus(),[D]),oe=x.useCallback((ae,W,le)=>{const ge=!F.current&&!le;(z.value!==void 0&&z.value===W||ge)&&fe(ae)},[z.value]),ue=i==="popper"?bd:wx,me=ue===bd?{side:m,sideOffset:h,align:g,alignOffset:b,arrowPadding:p,collisionBoundary:S,collisionPadding:E,sticky:T,hideWhenDetached:C,avoidCollisions:A}:{};return v.jsx(xx,{scope:o,content:D,viewport:ne,onViewportChange:q,itemRefCallback:L,selectedItem:j,onItemLeave:Z,itemTextRefCallback:oe,focusSelectedItem:N,selectedItemText:$,position:i,isPositioned:re,searchRef:G,children:v.jsx(Kd,{as:iR,allowPinchZoom:!0,children:v.jsx($d,{asChild:!0,trapped:z.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Me(s,ae=>{var W;(W=z.trigger)==null||W.focus({preventScroll:!0}),ae.preventDefault()}),children:v.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>z.onOpenChange(!1),children:v.jsx(ue,{role:"listbox",id:z.contentId,"data-state":z.open?"open":"closed",dir:z.dir,onContextMenu:ae=>ae.preventDefault(),...R,...me,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:Me(R.onKeyDown,ae=>{const W=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!W&&ae.key.length===1&&_(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let ge=ee().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const we=ae.target,Ce=ge.indexOf(we);ge=ge.slice(Ce+1)}setTimeout(()=>M(ge)),ae.preventDefault()}})})})})})})});Sx.displayName=oR;var sR="SelectItemAlignedPosition",wx=x.forwardRef((n,l)=>{const{__scopeSelect:o,onPlaced:i,...s}=n,u=vl(Xl,o),d=bl(Xl,o),[m,h]=x.useState(null),[g,b]=x.useState(null),p=it(l,P=>b(P)),S=uc(o),E=x.useRef(!1),T=x.useRef(!0),{viewport:C,selectedItem:A,selectedItemText:R,focusSelectedItem:z}=d,D=x.useCallback(()=>{if(u.trigger&&u.valueNode&&m&&g&&C&&A&&R){const P=u.trigger.getBoundingClientRect(),j=g.getBoundingClientRect(),I=u.valueNode.getBoundingClientRect(),$=R.getBoundingClientRect();if(u.dir!=="rtl"){const we=$.left-j.left,Ce=I.left-we,Ge=P.left-Ce,Ye=P.width+Ge,qt=Math.max(Ye,j.width),Bt=window.innerWidth-Yn,Nt=d0(Ce,[Yn,Math.max(Yn,Bt-qt)]);m.style.minWidth=Ye+"px",m.style.left=Nt+"px"}else{const we=j.right-$.right,Ce=window.innerWidth-I.right-we,Ge=window.innerWidth-P.right-Ce,Ye=P.width+Ge,qt=Math.max(Ye,j.width),Bt=window.innerWidth-Yn,Nt=d0(Ce,[Yn,Math.max(Yn,Bt-qt)]);m.style.minWidth=Ye+"px",m.style.right=Nt+"px"}const fe=S(),ee=window.innerHeight-Yn*2,re=C.scrollHeight,V=window.getComputedStyle(g),F=parseInt(V.borderTopWidth,10),M=parseInt(V.paddingTop,10),N=parseInt(V.borderBottomWidth,10),H=parseInt(V.paddingBottom,10),B=F+M+re+H+N,G=Math.min(A.offsetHeight*5,B),_=window.getComputedStyle(C),L=parseInt(_.paddingTop,10),Z=parseInt(_.paddingBottom,10),oe=P.top+P.height/2-Yn,ue=ee-oe,me=A.offsetHeight/2,ae=A.offsetTop+me,W=F+M+ae,le=B-W;if(W<=oe){const we=fe.length>0&&A===fe[fe.length-1].ref.current;m.style.bottom="0px";const Ce=g.clientHeight-C.offsetTop-C.offsetHeight,Ge=Math.max(ue,me+(we?Z:0)+Ce+N),Ye=W+Ge;m.style.height=Ye+"px"}else{const we=fe.length>0&&A===fe[0].ref.current;m.style.top="0px";const Ge=Math.max(oe,F+C.offsetTop+(we?L:0)+me)+le;m.style.height=Ge+"px",C.scrollTop=W-oe+C.offsetTop}m.style.margin=`${Yn}px 0`,m.style.minHeight=G+"px",m.style.maxHeight=ee+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[S,u.trigger,u.valueNode,m,g,C,A,R,u.dir,i]);Xt(()=>D(),[D]);const[Y,ne]=x.useState();Xt(()=>{g&&ne(window.getComputedStyle(g).zIndex)},[g]);const q=x.useCallback(P=>{P&&T.current===!0&&(D(),z==null||z(),T.current=!1)},[D,z]);return v.jsx(uR,{scope:o,contentWrapper:m,shouldExpandOnScrollRef:E,onScrollButtonChange:q,children:v.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:Y},children:v.jsx(Je.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});wx.displayName=sR;var cR="SelectPopperPosition",bd=x.forwardRef((n,l)=>{const{__scopeSelect:o,align:i="start",collisionPadding:s=Yn,...u}=n,d=fc(o);return v.jsx(rm,{...d,...u,ref:l,align:i,collisionPadding:s,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});bd.displayName=cR;var[uR,gm]=Qr(Xl,{}),xd="SelectViewport",Ex=x.forwardRef((n,l)=>{const{__scopeSelect:o,nonce:i,...s}=n,u=bl(xd,o),d=gm(xd,o),m=it(l,u.onViewportChange),h=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(cc.Slot,{scope:o,children:v.jsx(Je.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Me(s.onScroll,g=>{const b=g.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&p){const E=Math.abs(h.current-b.scrollTop);if(E>0){const T=window.innerHeight-Yn*2,C=parseFloat(p.style.minHeight),A=parseFloat(p.style.height),R=Math.max(C,A);if(R<T){const z=R+E,D=Math.min(T,z),Y=z-D;p.style.height=D+"px",p.style.bottom==="0px"&&(b.scrollTop=Y>0?Y:0,p.style.justifyContent="flex-end")}}}h.current=b.scrollTop})})})]})});Ex.displayName=xd;var Tx="SelectGroup",[fR,dR]=Qr(Tx),Cx=x.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,s=Gr();return v.jsx(fR,{scope:o,id:s,children:v.jsx(Je.div,{role:"group","aria-labelledby":s,...i,ref:l})})});Cx.displayName=Tx;var Mx="SelectLabel",mR=x.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,s=dR(Mx,o);return v.jsx(Je.div,{id:s.id,...i,ref:l})});mR.displayName=Mx;var Qs="SelectItem",[hR,Ax]=Qr(Qs),_x=x.forwardRef((n,l)=>{const{__scopeSelect:o,value:i,disabled:s=!1,textValue:u,...d}=n,m=vl(Qs,o),h=bl(Qs,o),g=m.value===i,[b,p]=x.useState(u??""),[S,E]=x.useState(!1),T=it(l,z=>{var D;return(D=h.itemRefCallback)==null?void 0:D.call(h,z,i,s)}),C=Gr(),A=x.useRef("touch"),R=()=>{s||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(hR,{scope:o,value:i,disabled:s,textId:C,isSelected:g,onItemTextChange:x.useCallback(z=>{p(D=>D||((z==null?void 0:z.textContent)??"").trim())},[]),children:v.jsx(cc.ItemSlot,{scope:o,value:i,disabled:s,textValue:b,children:v.jsx(Je.div,{role:"option","aria-labelledby":C,"data-highlighted":S?"":void 0,"aria-selected":g&&S,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:T,onFocus:Me(d.onFocus,()=>E(!0)),onBlur:Me(d.onBlur,()=>E(!1)),onClick:Me(d.onClick,()=>{A.current!=="mouse"&&R()}),onPointerUp:Me(d.onPointerUp,()=>{A.current==="mouse"&&R()}),onPointerDown:Me(d.onPointerDown,z=>{A.current=z.pointerType}),onPointerMove:Me(d.onPointerMove,z=>{var D;A.current=z.pointerType,s?(D=h.onItemLeave)==null||D.call(h):A.current==="mouse"&&z.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Me(d.onPointerLeave,z=>{var D;z.currentTarget===document.activeElement&&((D=h.onItemLeave)==null||D.call(h))}),onKeyDown:Me(d.onKeyDown,z=>{var Y;((Y=h.searchRef)==null?void 0:Y.current)!==""&&z.key===" "||(W_.includes(z.key)&&R(),z.key===" "&&z.preventDefault())})})})})});_x.displayName=Qs;var Po="SelectItemText",Rx=x.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:s,...u}=n,d=vl(Po,o),m=bl(Po,o),h=Ax(Po,o),g=aR(Po,o),[b,p]=x.useState(null),S=it(l,R=>p(R),h.onItemTextChange,R=>{var z;return(z=m.itemTextRefCallback)==null?void 0:z.call(m,R,h.value,h.disabled)}),E=b==null?void 0:b.textContent,T=x.useMemo(()=>v.jsx("option",{value:h.value,disabled:h.disabled,children:E},h.value),[h.disabled,h.value,E]),{onNativeOptionAdd:C,onNativeOptionRemove:A}=g;return Xt(()=>(C(T),()=>A(T)),[C,A,T]),v.jsxs(v.Fragment,{children:[v.jsx(Je.span,{id:h.textId,...u,ref:S}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Zo.createPortal(u.children,d.valueNode):null]})});Rx.displayName=Po;var Nx="SelectItemIndicator",Ox=x.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return Ax(Nx,o).isSelected?v.jsx(Je.span,{"aria-hidden":!0,...i,ref:l}):null});Ox.displayName=Nx;var Sd="SelectScrollUpButton",zx=x.forwardRef((n,l)=>{const o=bl(Sd,n.__scopeSelect),i=gm(Sd,n.__scopeSelect),[s,u]=x.useState(!1),d=it(l,i.onScrollButtonChange);return Xt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollTop>0;u(g)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?v.jsx(jx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});zx.displayName=Sd;var wd="SelectScrollDownButton",Dx=x.forwardRef((n,l)=>{const o=bl(wd,n.__scopeSelect),i=gm(wd,n.__scopeSelect),[s,u]=x.useState(!1),d=it(l,i.onScrollButtonChange);return Xt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollHeight-h.clientHeight,b=Math.ceil(h.scrollTop)<g;u(b)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?v.jsx(jx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});Dx.displayName=wd;var jx=x.forwardRef((n,l)=>{const{__scopeSelect:o,onAutoScroll:i,...s}=n,u=bl("SelectScrollButton",o),d=x.useRef(null),m=uc(o),h=x.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return x.useEffect(()=>()=>h(),[h]),Xt(()=>{var b;const g=m().find(p=>p.ref.current===document.activeElement);(b=g==null?void 0:g.ref.current)==null||b.scrollIntoView({block:"nearest"})},[m]),v.jsx(Je.div,{"aria-hidden":!0,...s,ref:l,style:{flexShrink:0,...s.style},onPointerDown:Me(s.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:Me(s.onPointerMove,()=>{var g;(g=u.onItemLeave)==null||g.call(u),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:Me(s.onPointerLeave,()=>{h()})})}),pR="SelectSeparator",gR=x.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return v.jsx(Je.div,{"aria-hidden":!0,...i,ref:l})});gR.displayName=pR;var Ed="SelectArrow",yR=x.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,s=fc(o),u=vl(Ed,o),d=bl(Ed,o);return u.open&&d.position==="popper"?v.jsx(om,{...s,...i,ref:l}):null});yR.displayName=Ed;var vR="SelectBubbleInput",kx=x.forwardRef(({__scopeSelect:n,value:l,...o},i)=>{const s=x.useRef(null),u=it(i,s),d=iM(l);return x.useEffect(()=>{const m=s.current;if(!m)return;const h=window.HTMLSelectElement.prototype,b=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==l&&b){const p=new Event("change",{bubbles:!0});b.call(m,l),m.dispatchEvent(p)}},[d,l]),v.jsx(Je.select,{...o,style:{...Iv,...o.style},ref:u,defaultValue:l})});kx.displayName=vR;function Lx(n){return n===""||n===void 0}function Hx(n){const l=kn(n),o=x.useRef(""),i=x.useRef(0),s=x.useCallback(d=>{const m=o.current+d;l(m),(function h(g){o.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(m)},[l]),u=x.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,s,u]}function Bx(n,l,o){const s=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,u=o?n.indexOf(o):-1;let d=bR(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.textValue.toLowerCase().startsWith(s.toLowerCase()));return h!==o?h:void 0}function bR(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var xR=dx,SR=hx,wR=gx,ER=yx,TR=vx,CR=bx,MR=Ex,AR=Cx,_R=_x,RR=Rx,NR=Ox,OR=zx,zR=Dx,DR="Separator",m0="horizontal",jR=["horizontal","vertical"],Ux=x.forwardRef((n,l)=>{const{decorative:o,orientation:i=m0,...s}=n,u=kR(i)?i:m0,m=o?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return v.jsx(Je.div,{"data-orientation":u,...m,...s,ref:l})});Ux.displayName=DR;function kR(n){return jR.includes(n)}var LR=Ux,[dc]=Fl("Tooltip",[Fr]),ym=Fr(),Ix="TooltipProvider",HR=700,h0="tooltip.open",[BR,Gx]=dc(Ix),Yx=n=>{const{__scopeTooltip:l,delayDuration:o=HR,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:u}=n,d=x.useRef(!0),m=x.useRef(!1),h=x.useRef(0);return x.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),v.jsx(BR,{scope:l,isOpenDelayedRef:d,delayDuration:o,onOpen:x.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:m,onPointerInTransitChange:x.useCallback(g=>{m.current=g},[]),disableHoverableContent:s,children:u})};Yx.displayName=Ix;var Vx="Tooltip",[lO,mc]=dc(Vx),Td="TooltipTrigger",UR=x.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,s=mc(Td,o),u=Gx(Td,o),d=ym(o),m=x.useRef(null),h=it(l,m,s.onTriggerChange),g=x.useRef(!1),b=x.useRef(!1),p=x.useCallback(()=>g.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(lm,{asChild:!0,...d,children:v.jsx(Je.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...i,ref:h,onPointerMove:Me(n.onPointerMove,S=>{S.pointerType!=="touch"&&!b.current&&!u.isPointerInTransitRef.current&&(s.onTriggerEnter(),b.current=!0)}),onPointerLeave:Me(n.onPointerLeave,()=>{s.onTriggerLeave(),b.current=!1}),onPointerDown:Me(n.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Me(n.onFocus,()=>{g.current||s.onOpen()}),onBlur:Me(n.onBlur,s.onClose),onClick:Me(n.onClick,s.onClose)})})});UR.displayName=Td;var IR="TooltipPortal",[rO,GR]=dc(IR,{forceMount:void 0}),Vr="TooltipContent",YR=x.forwardRef((n,l)=>{const o=GR(Vr,n.__scopeTooltip),{forceMount:i=o.forceMount,side:s="top",...u}=n,d=mc(Vr,n.__scopeTooltip);return v.jsx($r,{present:i||d.open,children:d.disableHoverableContent?v.jsx(qx,{side:s,...u,ref:l}):v.jsx(VR,{side:s,...u,ref:l})})}),VR=x.forwardRef((n,l)=>{const o=mc(Vr,n.__scopeTooltip),i=Gx(Vr,n.__scopeTooltip),s=x.useRef(null),u=it(l,s),[d,m]=x.useState(null),{trigger:h,onClose:g}=o,b=s.current,{onPointerInTransitChange:p}=i,S=x.useCallback(()=>{m(null),p(!1)},[p]),E=x.useCallback((T,C)=>{const A=T.currentTarget,R={x:T.clientX,y:T.clientY},z=KR(R,A.getBoundingClientRect()),D=FR(R,z),Y=QR(C.getBoundingClientRect()),ne=JR([...D,...Y]);m(ne),p(!0)},[p]);return x.useEffect(()=>()=>S(),[S]),x.useEffect(()=>{if(h&&b){const T=A=>E(A,b),C=A=>E(A,h);return h.addEventListener("pointerleave",T),b.addEventListener("pointerleave",C),()=>{h.removeEventListener("pointerleave",T),b.removeEventListener("pointerleave",C)}}},[h,b,E,S]),x.useEffect(()=>{if(d){const T=C=>{const A=C.target,R={x:C.clientX,y:C.clientY},z=(h==null?void 0:h.contains(A))||(b==null?void 0:b.contains(A)),D=!ZR(R,d);z?S():D&&(S(),g())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[h,b,d,g,S]),v.jsx(qx,{...n,ref:u})}),[qR,PR]=dc(Vx,{isInside:!1}),$R=VT("TooltipContent"),qx=x.forwardRef((n,l)=>{const{__scopeTooltip:o,children:i,"aria-label":s,onEscapeKeyDown:u,onPointerDownOutside:d,...m}=n,h=mc(Vr,o),g=ym(o),{onClose:b}=h;return x.useEffect(()=>(document.addEventListener(h0,b),()=>document.removeEventListener(h0,b)),[b]),x.useEffect(()=>{if(h.trigger){const p=S=>{const E=S.target;E!=null&&E.contains(h.trigger)&&b()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,b]),v.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p=>p.preventDefault(),onDismiss:b,children:v.jsxs(rm,{"data-state":h.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($R,{children:i}),v.jsx(qR,{scope:o,isInside:!0,children:v.jsx(FT,{id:h.contentId,role:"tooltip",children:s||i})})]})})});YR.displayName=Vr;var Px="TooltipArrow",XR=x.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,s=ym(o);return PR(Px,o).isInside?null:v.jsx(om,{...s,...i,ref:l})});XR.displayName=Px;function KR(n,l){const o=Math.abs(l.top-n.y),i=Math.abs(l.bottom-n.y),s=Math.abs(l.right-n.x),u=Math.abs(l.left-n.x);switch(Math.min(o,i,s,u)){case u:return"left";case s:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function FR(n,l,o=5){const i=[];switch(l){case"top":i.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":i.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":i.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":i.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return i}function QR(n){const{top:l,right:o,bottom:i,left:s}=n;return[{x:s,y:l},{x:o,y:l},{x:o,y:i},{x:s,y:i}]}function ZR(n,l){const{x:o,y:i}=n;let s=!1;for(let u=0,d=l.length-1;u<l.length;d=u++){const m=l[u],h=l[d],g=m.x,b=m.y,p=h.x,S=h.y;b>i!=S>i&&o<(p-g)*(i-b)/(S-b)+g&&(s=!s)}return s}function JR(n){const l=n.slice();return l.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),WR(l)}function WR(n){if(n.length<=1)return n.slice();const l=[];for(let i=0;i<n.length;i++){const s=n[i];for(;l.length>=2;){const u=l[l.length-1],d=l[l.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))l.pop();else break}l.push(s)}l.pop();const o=[];for(let i=n.length-1;i>=0;i--){const s=n[i];for(;o.length>=2;){const u=o[o.length-1],d=o[o.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))o.pop();else break}o.push(s)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}var eN=Yx;const tN=IT("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 vn({className:n,variant:l="default",size:o="default",asChild:i=!1,...s}){const u=i?GT:"button";return v.jsx(u,{"data-slot":"button","data-variant":l,"data-size":o,className:Qe(tN({variant:l,size:o,className:n})),...s})}function nN({slides:n,startSlideId:l,onExit:o}){const i=x.useMemo(()=>{const W=n.findIndex(le=>le.id===l);return W>=0?W:0},[n,l]),[s,u]=x.useState(i),[d,m]=x.useState("none"),[h,g]=x.useState("#F59E0B"),[b,p]=x.useState(!1),[S,E]=x.useState([]),[T,C]=x.useState({x:-100,y:-100}),[A,R]=x.useState(!!document.fullscreenElement),[z,D]=x.useState(()=>({height:window.innerHeight,width:window.innerWidth})),Y=x.useRef(null),ne=x.useRef(null),q=x.useRef(null),P=x.useRef(0),j=x.useRef(s),I=x.useMemo(()=>_2(n),[n]),$=I[Math.min(s,I.length-1)]??null;x.useEffect(()=>{const W=I.findIndex(le=>le.id===l);u(W>=0?W:0)},[I,l]),x.useEffect(()=>{const W=I.findIndex(le=>le.id===($==null?void 0:$.id));W>=0&&W!==s&&u(W)},[s,$==null?void 0:$.id,I]),x.useEffect(()=>()=>{q.current&&window.clearTimeout(q.current)},[]),x.useEffect(()=>{const W=()=>{R(!!document.fullscreenElement),D({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",W),document.addEventListener("fullscreenchange",W),()=>{window.removeEventListener("resize",W),document.removeEventListener("fullscreenchange",W)}},[]);const fe=x.useCallback(()=>{p(!0),q.current&&window.clearTimeout(q.current),q.current=window.setTimeout(()=>{p(!1)},1500)},[]);function ee(W){m(le=>le===W?"none":W)}const re=x.useCallback(()=>{E([]),ne.current=null},[]);function V(W){m("none"),u(R2(W,I.length)),re()}function F(){V(s+1)}function M(){var le;const W=document.documentElement;if(document.fullscreenElement){(le=document.exitFullscreen)==null||le.call(document);return}W.requestFullscreen&&W.requestFullscreen()}function N(W){return W.clientY>=window.innerHeight-96}function H(W){if(N(W)&&fe(),d==="laser"&&C({x:W.clientX,y:W.clientY}),d==="pen"&&ne.current){const le=Y.current,ge=le==null?void 0:le.getBoundingClientRect();if(le&&ge){const we=Math.min(Math.max(W.clientX-ge.left,0),ge.width)/Z,Ce=Math.min(Math.max(W.clientY-ge.top,0),ge.height)/Z,Ge={...ne.current,points:`${ne.current.points} L ${we.toFixed(1)} ${Ce.toFixed(1)}`};ne.current=Ge,E(Ye=>[...Ye.slice(0,-1),Ge])}}}function B(W){L(),!(d!=="none"||!Y.current||!(W.target instanceof Node))&&Y.current.contains(W.target)&&F()}function G(W){if(d!=="none"||Math.abs(W.deltaY)<Math.abs(W.deltaX)||W.deltaY<=8)return;const le=Date.now();le-P.current<360||(P.current=le,W.preventDefault(),F())}function _(W){if(d!=="pen"||!Y.current||!(W.target instanceof Node)||!Y.current.contains(W.target))return;const le=Y.current.getBoundingClientRect();if(!(W.clientX>=le.left&&W.clientX<=le.right&&W.clientY>=le.top&&W.clientY<=le.bottom))return;const we=Math.min(Math.max(W.clientX-le.left,0),le.width)/Z,Ce=Math.min(Math.max(W.clientY-le.top,0),le.height)/Z,Ge={color:h,points:`M ${we.toFixed(1)} ${Ce.toFixed(1)}`};ne.current=Ge,E(Ye=>[...Ye,Ge])}function L(){ne.current=null}if(x.useEffect(()=>{j.current!==s&&(j.current=s,re())},[s,re]),x.useEffect(()=>{const W=le=>{if(le.key==="Escape"){if(d==="pen"){m("none"),re(),fe();return}o();return}(le.key==="ArrowRight"||le.key==="ArrowDown"||le.key==="PageDown")&&(m("none"),u(ge=>Math.min(ge+1,I.length-1))),(le.key==="ArrowLeft"||le.key==="ArrowUp"||le.key==="PageUp")&&(m("none"),u(ge=>Math.max(ge-1,0)))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[re,o,I.length,fe,d]),x.useEffect(()=>{var le;if(!$)return;const W=(le=Y.current)==null?void 0:le.querySelector("[data-testid='presenter-slide-iframe']");W&&(W.srcdoc=$.htmlSource)},[$]),!$)return null;const Z=Math.min(z.width/$.width,z.height/$.height),oe=Math.max(320,Math.floor($.width*Z)),ue=Math.max(240,Math.floor($.height*Z)),me=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='${encodeURIComponent(h)}' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto`,ae=d==="laser"?"none":d==="pen"?me:"default";return v.jsxs("main",{className:"fixed inset-0 z-50 overflow-hidden bg-[#111]","data-testid":"presenter-view",style:{cursor:ae},onPointerMove:H,onPointerDown:_,onPointerUp:B,onPointerLeave:L,onWheel:G,children:[v.jsxs("div",{ref:Y,className:"absolute left-1/2 top-1/2 overflow-hidden bg-white shadow-[0_18px_70px_rgba(0,0,0,0.42)]","data-testid":"presenter-slide-frame",style:{width:`${oe}px`,height:`${ue}px`,transform:"translate(-50%, -50%)"},children:[v.jsx("iframe",{title:"Presented slide",className:"pointer-events-none block border-0 bg-white","data-testid":"presenter-slide-iframe",style:{width:`${$.width}px`,height:`${$.height}px`,transform:`scale(${Z})`,transformOrigin:"top left"}}),v.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full overflow-visible","data-testid":"presenter-ink-layer","aria-hidden":"true",viewBox:`0 0 ${$.width} ${$.height}`,children:S.map((W,le)=>v.jsx("path",{d:W.points,fill:"none",stroke:W.color,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},`${W.color}-${le}`))})]}),v.jsx("div",{className:"pointer-events-none fixed left-0 top-0 size-4 rounded-full bg-[#f7ff2a] shadow-[0_0_0_1px_rgba(17,24,39,0.85),0_0_14px_rgba(247,255,42,0.9),0_0_24px_rgba(34,211,238,0.65)]","data-testid":"presenter-laser-cursor",style:{opacity:d==="laser"?1:0,transform:`translate(${T.x}px, ${T.y}px) translate(-50%, -50%)`}}),d==="pen"?v.jsx("div",{className:"absolute bottom-[78px] left-1/2 z-20 flex -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-2 shadow-[0_14px_44px_rgba(0,0,0,0.32)] backdrop-blur-lg","data-testid":"presenter-pen-colors","aria-label":"Pen colors",children:A2.map(W=>v.jsx("button",{type:"button","aria-label":`Use pen color ${W}`,className:"size-7 rounded-full border border-white/25 shadow-[0_0_0_1px_rgba(0,0,0,0.25)] transition-transform hover:scale-105",style:{background:W,outline:h===W?"2px solid rgba(255,255,255,0.9)":"none",outlineOffset:"2px"},onClick:()=>g(W)},W))}):null,v.jsxs("nav",{className:"absolute bottom-6 left-1/2 z-20 flex h-11 -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-1.5 text-white shadow-[0_18px_52px_rgba(0,0,0,0.38)] backdrop-blur-lg transition-[opacity,transform] duration-150 data-[visible=false]:translate-y-3 data-[visible=false]:opacity-0 data-[visible=false]:pointer-events-none","data-testid":"presenter-toolbar","data-visible":b?"true":"false",onPointerEnter:fe,onPointerMove:fe,children:[v.jsx(vn,{variant:"ghost",size:"sm","aria-label":"Previous slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>V(s-1),disabled:s===0,children:"Prev"}),v.jsxs("span",{className:"min-w-14 text-center text-[12px] font-semibold text-white/80",children:[s+1," / ",I.length]}),v.jsx(vn,{variant:"ghost",size:"sm","aria-label":"Next slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>V(s+1),disabled:s>=I.length-1,children:"Next"}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(vn,{variant:d==="laser"?"secondary":"ghost",size:"sm","aria-label":"Laser pointer",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>ee("laser"),"aria-pressed":d==="laser",children:[v.jsx(XE,{className:"size-3.5"}),"Laser"]}),v.jsxs(vn,{variant:d==="pen"?"secondary":"ghost",size:"sm","aria-label":"Pen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>ee("pen"),"aria-pressed":d==="pen",children:[v.jsx(wE,{className:"size-3.5"}),"Pen"]}),v.jsxs(vn,{variant:"ghost",size:"sm","aria-label":A?"Exit fullscreen":"Enter fullscreen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:M,children:[v.jsx(bE,{className:"size-3.5"}),A?"Window":"Fullscreen"]}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(vn,{variant:"ghost",size:"sm","aria-label":"Exit presentation",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:o,children:[v.jsx(Sv,{className:"size-3.5"}),"Exit"]})]})]})}function $x({...n}){return v.jsx(V_,{"data-slot":"context-menu",...n})}function Xx({...n}){return v.jsx(q_,{"data-slot":"context-menu-trigger",...n})}function Xf({...n}){return v.jsx(F_,{"data-slot":"context-menu-sub",...n})}function Kf({className:n,inset:l,children:o,...i}){return v.jsxs(Q_,{"data-slot":"context-menu-sub-trigger","data-inset":l,className:Qe("flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] outline-hidden focus:bg-foreground/[0.04] data-[state=open]:bg-foreground/[0.04] data-[inset=true]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i,children:[o,v.jsx(Q2,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Ff({className:n,...l}){return v.jsx(Z_,{"data-slot":"context-menu-sub-content",className:Qe("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 Kx({className:n,...l}){return v.jsx(P_,{children:v.jsx($_,{"data-slot":"context-menu-content",className:Qe("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 yt({className:n,inset:l,variant:o="default",...i}){return v.jsx(X_,{"data-slot":"context-menu-item","data-inset":l,"data-variant":o,className:Qe("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 Zs({className:n,...l}){return v.jsx(K_,{"data-slot":"context-menu-separator",className:Qe("-mx-1 my-1 h-px bg-foreground/10",n),...l})}function p0({className:n,...l}){return v.jsx("span",{"data-slot":"context-menu-shortcut",className:Qe("ml-auto text-[11px] tracking-normal text-foreground/40",n),...l})}function qr({className:n,type:l,...o}){return v.jsx("input",{type:l,"data-slot":"input",className:Qe("h-8 w-full min-w-0 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 py-1 text-sm shadow-none transition-colors outline-none selection:bg-foreground selection:text-background file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-foreground/35 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","hover:bg-foreground/[0.04] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35","aria-invalid:border-destructive aria-invalid:ring-destructive/20",n),...o})}function aN({slides:n,activeSlideId:l,slideCount:o,thumbnails:i,onSelectSlide:s,onAdd:u,onAddSlideAbove:d,onAddSlideBelow:m,onDuplicate:h,onDelete:g,onToggleHidden:b,onRename:p,onReorder:S}){const[E,T]=x.useState(null),[C,A]=x.useState(null),[R,z]=x.useState(null),[D,Y]=x.useState(""),ne=E?n.findIndex(ee=>ee.id===E):-1,q=R?n.find(ee=>ee.id===R):null,P=x.useCallback(ee=>{ee==null||ee.scrollIntoView({block:"nearest",inline:"nearest"})},[]),j=x.useCallback((ee,re)=>{if(!ee||re===null){T(null),A(null);return}const V=n.findIndex(F=>F.id===ee);V>=0&&V!==re&&(S==null||S(ee,re)),T(null),A(null)},[S,n]),I=x.useCallback(ee=>{z(ee.id),Y(ee.title||"Untitled Slide"),s(ee.id)},[s]),$=x.useCallback(()=>{z(null),Y("")},[]),fe=x.useCallback(()=>{R&&(p==null||p(R,D),$())},[$,p,R,D]);return v.jsxs(v.Fragment,{children:[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:o})," 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(jf,{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((ee,re)=>{const V=ee.id===l,F=ee.hidden===!0,M=ee.id===E,N=ne>=0&&C===re&&re<ne&&E!==ee.id,H=ne>=0&&C===re&&re>ne&&E!==ee.id;return v.jsxs($x,{children:[v.jsx(Xx,{asChild:!0,children:v.jsxs("div",{draggable:!0,onDragStart:B=>{T(ee.id),A(re),B.dataTransfer.effectAllowed="move",B.dataTransfer.setData("text/plain",ee.id)},onDragOver:B=>{B.preventDefault(),B.dataTransfer.dropEffect="move",A(re)},onDrop:B=>{B.preventDefault(),B.stopPropagation();const G=B.dataTransfer.getData("text/plain")||E;j(G,re)},onDragEnd:()=>{T(null),A(null)},className:Qe("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",M&&"opacity-60"),"data-testid":"slide-card",children:[N?v.jsx(g0,{}):null,v.jsx("div",{className:Qe("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",V?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:re+1}),v.jsxs("div",{className:Qe("relative flex-1 overflow-hidden rounded-lg ring-1 ring-inset transition-all",V?"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",F&&"opacity-40"),children:[v.jsx("button",{ref:V?P:null,className:"block w-full text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onClick:()=>s(ee.id),type:"button","aria-label":`Slide ${re+1}`,"aria-current":V?"true":void 0,children:v.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[ee.id]?v.jsx("img",{alt:`Slide ${re+1}`,className:"absolute inset-0 block size-full object-cover",src:i[ee.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",re+1]}),F?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(Ay,{className:"size-2.5"})}):null]})}),v.jsx("div",{className:"h-6 border-t border-foreground/[0.04] bg-white",children:v.jsx("button",{className:"h-full w-full truncate rounded-b-lg px-2 text-left text-[11px] text-foreground/60 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring",type:"button",onClick:()=>s(ee.id),onDoubleClick:()=>I(ee),"aria-label":`Slide title: ${ee.title||"Untitled Slide"}`,children:ee.title||"Untitled Slide"})})]}),H?v.jsx(g0,{position:"after"}):null]})}),v.jsxs(Kx,{"aria-label":"Slide actions",className:"min-w-36",children:[v.jsxs(yt,{onSelect:()=>d==null?void 0:d(ee.id),children:[v.jsx(jf,{className:"size-3.5"}),"Add Slide Above"]}),v.jsxs(yt,{onSelect:()=>m==null?void 0:m(ee.id),children:[v.jsx(jf,{className:"size-3.5"}),"Add Slide Below"]}),v.jsx(Zs,{}),v.jsxs(yt,{onSelect:()=>h==null?void 0:h(ee.id),children:[v.jsx(hv,{className:"size-3.5"}),"Duplicate"]}),v.jsxs(yt,{onSelect:()=>I(ee),children:[v.jsx(TE,{className:"size-3.5"}),"Rename"]}),v.jsxs(yt,{onSelect:()=>b==null?void 0:b(ee.id),children:[F?v.jsx(pv,{className:"size-3.5"}):v.jsx(Ay,{className:"size-3.5"}),F?"Show":"Hide"]}),v.jsx(Zs,{}),v.jsxs(yt,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(ee.id),children:[v.jsx(bv,{className:"size-3.5"}),"Delete"]})]})]},ee.id)})})]})}),q?v.jsx(lN,{draft:D,slideTitle:q.title||"Untitled Slide",onCancel:$,onChange:Y,onSave:fe}):null]})}function lN({draft:n,slideTitle:l,onCancel:o,onChange:i,onSave:s}){const u=x.useRef(null);return x.useEffect(()=>{const d=window.requestAnimationFrame(()=>{var h,g;(h=u.current)==null||h.focus(),(g=u.current)==null||g.select()}),m=h=>{h.key==="Escape"&&o()};return document.addEventListener("keydown",m),()=>{window.cancelAnimationFrame(d),document.removeEventListener("keydown",m)}},[o]),v.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:d=>{d.target===d.currentTarget&&o()},children:v.jsx("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"rename-slide-title",className:"relative m-0 w-full max-w-[420px] overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]","data-testid":"rename-slide-dialog",children:v.jsxs("form",{onSubmit:d=>{d.preventDefault(),s()},children:[v.jsxs("div",{className:"border-b border-foreground/[0.08] px-4 py-3",children:[v.jsx("h2",{id:"rename-slide-title",className:"text-[14px] font-semibold text-foreground",children:"Rename slide"}),v.jsx("p",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:l})]}),v.jsxs("div",{className:"space-y-2 px-4 py-4",children:[v.jsx("label",{htmlFor:"rename-slide-input",className:"text-[12px] font-medium text-foreground",children:"Slide name"}),v.jsx(qr,{ref:u,id:"rename-slide-input",value:n,onChange:d=>i(d.target.value)})]}),v.jsxs("div",{className:"flex justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[v.jsx(vn,{type:"button",variant:"outline",onClick:o,children:"Cancel"}),v.jsx(vn,{type:"submit",children:"Save"})]})]})})})}function g0({position:n="before"}){return v.jsxs("div",{className:Qe("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 rN=18,oN=6,_s=24,Rs="#ef4444",Js=40,y0=12,v0=360;function Lr(n,l,o,i,s){return Math.max(n,o)-Math.min(l,i)<=s}function iN({selectionBounds:n,snapGuides:l,resizeHandles:o,rotationHandle:i,onResizeHandleMouseDown:s,onRotateHandleMouseDown:u}){const d="absolute z-[5] size-[13px] -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full border border-white bg-foreground shadow-[0_2px_8px_rgba(0,0,0,0.16)] transition-colors before:absolute before:inset-[3px] before:rounded-full before:bg-white/90 hover:bg-foreground/80";return v.jsxs(v.Fragment,{children:[l.map((m,h)=>{const g=m.variant==="spacing"?"2px":"1px",b=14,p=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:Rs,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:Rs,opacity:m.variant==="spacing"?.9:.82},T=S?{width:`${b}px`,height:`${p}px`,left:`${-b/2}px`,backgroundColor:Rs}:{width:`${p}px`,height:`${b}px`,top:`${-b/2}px`,backgroundColor:Rs};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?{...T,top:"0"}:{...T,left:"0"}}),v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...T,bottom:"0"}:{...T,right:"0"}})]}):null},`${m.orientation}-${m.start.x}-${m.start.y}-${m.end.x}-${m.end.y}-${m.variant}-${h}`)}),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}),o.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:h=>{s(m.corner,h)}},m.corner))]})}function sN({selectionCommandAvailability:n,onAlignToSlide:l,onDelete:o,onDistribute:i,onDuplicate:s,onGroup:u,onLayerOrder:d,onUngroup:m}){return v.jsxs(Kx,{"aria-label":"Selection actions",children:[v.jsxs(yt,{disabled:!n.group,onSelect:u,children:[v.jsx(ud,{className:"size-3.5"}),"Group"]}),v.jsxs(yt,{disabled:!n.ungroup,onSelect:m,children:[v.jsx(xv,{className:"size-3.5"}),"Ungroup"]}),v.jsx(Zs,{}),v.jsxs(Xf,{children:[v.jsxs(Kf,{children:[v.jsx(sd,{className:"size-3.5"}),"Layer"]}),v.jsxs(Ff,{children:[v.jsxs(yt,{onSelect:()=>d("front"),children:[v.jsx(sd,{className:"size-3.5"}),"Bring to front"]}),v.jsxs(yt,{onSelect:()=>d("forward"),children:[v.jsx(Id,{className:"size-3.5"}),"Bring forward"]}),v.jsxs(yt,{onSelect:()=>d("backward"),children:[v.jsx(Jo,{className:"size-3.5"}),"Send backward"]}),v.jsxs(yt,{onSelect:()=>d("back"),children:[v.jsx(dv,{className:"size-3.5"}),"Send to back"]})]})]}),v.jsxs(Xf,{children:[v.jsxs(Kf,{children:[v.jsx(id,{className:"size-3.5"}),"Align"]}),v.jsxs(Ff,{children:[v.jsxs(yt,{onSelect:()=>l("left"),children:[v.jsx(uv,{className:"size-3.5"}),"Align left"]}),v.jsxs(yt,{onSelect:()=>l("hcenter"),children:[v.jsx(id,{className:"size-3.5"}),"Align horizontal center"]}),v.jsxs(yt,{onSelect:()=>l("right"),children:[v.jsx(sv,{className:"size-3.5"}),"Align right"]}),v.jsxs(yt,{onSelect:()=>l("top"),children:[v.jsx(fv,{className:"size-3.5"}),"Align top"]}),v.jsxs(yt,{onSelect:()=>l("vcenter"),children:[v.jsx(iv,{className:"size-3.5"}),"Align vertical center"]}),v.jsxs(yt,{onSelect:()=>l("bottom"),children:[v.jsx(cv,{className:"size-3.5"}),"Align bottom"]})]})]}),v.jsxs(Xf,{children:[v.jsxs(Kf,{children:[v.jsx(cd,{className:"size-3.5"}),"Distribute"]}),v.jsxs(Ff,{children:[v.jsxs(yt,{onSelect:()=>i("horizontal"),children:[v.jsx(cd,{className:"size-3.5"}),"Horizontally"]}),v.jsxs(yt,{onSelect:()=>i("vertical"),children:[v.jsx(vv,{className:"size-3.5"}),"Vertically"]})]})]}),v.jsx(Zs,{}),v.jsxs(yt,{onSelect:s,children:[v.jsx(hv,{className:"size-3.5"}),"Duplicate",v.jsx(p0,{children:"⌘D"})]}),v.jsxs(yt,{variant:"destructive",onSelect:o,children:[v.jsx(bv,{className:"size-3.5"}),"Delete",v.jsx(p0,{children:"Del"})]})]})}const cN=[{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 uN(n,l){const o=x0(n),i=x0(l);return!o||!i?!1:o===i||S0(b0(n))===S0(b0(l))}function fN(n){const l=n.trim().toLowerCase();if(l==="bold"||l==="bolder")return!0;const o=Number.parseInt(l,10);return Number.isFinite(o)&&o>=600}function Cd(n){const l=new Set,o=n.toLowerCase();if(!o||o==="none")return l;for(const i of o.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&l.add(i);return l}function dN(n){return mN(n)?n.trim():hN(n)??"#000000"}function mN(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function b0(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function x0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function S0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Qf(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function hN(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?`#${Qf(l[1]||"0")}${Qf(l[2]||"0")}${Qf(l[3]||"0")}`:null}function Md({feature:n,inspectedStyles:l,attributeValues:o}){var s,u;if(n.target==="attribute")return n.attributeName==="data-editor-locked"?o.locked:n.attributeName==="alt"?o.altText:n.attributeName==="aria-label"?o.ariaLabel:n.attributeName==="data-link-url"?o.linkUrl:"";if(!n.propertyName)return"";const i=gN(l,n.propertyName);return n.id==="font-family"?((u=(s=n.options)==null?void 0:s.find(d=>uN(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(Vn(i).rotate):n.controlType==="color"?dN(i):n.id==="text-align"&&i==="start"?"left":i}function w0(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 E0(n,l,o){const i=Cd(n);return o?i.delete(l):i.add(l),i.size?Array.from(i).join(" "):"none"}function Fx(n,l){return n.id==="font-bold"?fN(l):n.id==="font-italic"?l.trim().toLowerCase()==="italic":n.id==="font-underline"?Cd(l).has("underline"):n.id==="font-strikethrough"?Cd(l).has("line-through"):n.id==="locked"?l==="true":!!l}function pN(n,l){const o=n.options??[{label:"unset",value:""}];return!l||o.some(i=>i.value===l)?o:[{label:l,value:l},...o]}function gN(n,l){var o;return((o=n.find(i=>i.name===l))==null?void 0:o.value)??""}function yN({attributeValues:n,feature:l,inspectedStyles:o,nextValue:i,onAlignToSlide:s,onAttributeChange:u,onLayerOrder:d,onStyleChange:m}){if(l.target==="style"&&l.propertyName){const h=Md({feature:l,inspectedStyles:o,attributeValues:n});if(l.id==="rotation"){const g=vN(o),b=Vn(g),p=Number.parseFloat(i);m(l.propertyName,Na(b.translateX,b.translateY,Number.isFinite(p)?p:0)??"");return}if(l.id==="font-underline"){m(l.propertyName,E0(h,"underline",i===""));return}if(l.id==="font-strikethrough"){m(l.propertyName,E0(h,"line-through",i===""));return}m(l.propertyName,w0(l,i));return}if(l.target==="attribute"&&l.attributeName){u(l.attributeName,w0(l,i));return}l.id==="align-to-slide"&&s(i),l.id==="layer-order"&&d(i)}function vN(n){var l;return((l=n.find(o=>o.name==="transform"))==null?void 0:l.value)??""}const bN=[{value:"left",label:"Left",icon:GE},{value:"center",label:"Center",icon:HE},{value:"right",label:"Right",icon:UE}],xN=[{value:"left",icon:uv,label:"Align left"},{value:"hcenter",icon:id,label:"Align horizontal center"},{value:"right",icon:sv,label:"Align right"},{value:"top",icon:fv,label:"Align top"},{value:"vcenter",icon:iv,label:"Align vertical center"},{value:"bottom",icon:cv,label:"Align bottom"}],SN=[{value:"front",icon:sd,label:"Bring to front"},{value:"forward",icon:Id,label:"Bring forward"},{value:"backward",icon:Jo,label:"Send backward"},{value:"back",icon:dv,label:"Send to back"}],wN=[{value:"horizontal",icon:cd,label:"Distribute horizontally"},{value:"vertical",icon:vv,label:"Distribute vertically"}],T0=[{id:"typography",label:"Typography",icon:Oy,subgroups:[{id:"font",label:"Font",icon:Oy,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:cN.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:ME,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:bN}]}]},{id:"appearance",label:"Appearance",icon:Ry,subgroups:[{id:"fill",label:"Fill",icon:Ry,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:P2,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:Ny,subgroups:[{id:"size",label:"Size",icon:Ny,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:pv,features:[{id:"opacity",label:"Opacity",controlType:"slider",target:"style",propertyName:"opacity",min:0,max:1,step:.01}]},{id:"rotation",label:"Rotation",icon:DE,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:yv,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:xN},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:SN},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:wN}]},{id:"grouping",label:"Group",icon:ud,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:ud,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:xv,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:_y,subgroups:[{id:"state",label:"State",icon:_y,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:gE,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:mE,features:[{id:"custom-css",label:"Custom CSS property",controlType:"custom-css",target:"style"}]}]}],EN=200,Qx="motion-safe:duration-200 motion-safe:ease-out",Zx="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",CN=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],MN=["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 AN({value:n,includeGradients:l=!0,onChange:o}){const i=x.useRef(null),s=x.useRef(null),u=x.useMemo(()=>_N(n),[n]),d=Zf(u),[m,h]=x.useState(d.replace("#","")),g=`hsl(${u.h}, 100%, 50%)`;x.useEffect(()=>{h(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 T=Ls((S.clientX-E.left)/E.width,0,1),C=Ls(1-(S.clientY-E.top)/E.height,0,1);o(Zf({...u,s:T,v:C}))}function p(S){var C;const E=(C=s.current)==null?void 0:C.getBoundingClientRect();if(!E)return;S.currentTarget.setPointerCapture(S.pointerId);const T=Math.round(Ls((S.clientX-E.left)/E.width,0,1)*360);o(Zf({...u,h:T===360?0:T}))}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:s,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":u.h,tabIndex:0,onPointerDown:p,onPointerMove:S=>{S.buttons===1&&p(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(qr,{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);h(E),E.length===6&&o(`#${E}`)},onBlur:()=>{h(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:CN.map(S=>v.jsx("button",{className:Qe("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:()=>{o(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:MN.map(S=>v.jsx("button",{className:Qe("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:()=>{o(S)}},S))})]}):null]})}function Ls(n,l,o){return Math.min(Math.max(n,l),o)}function _N(n){const l={h:220,s:.54,v:.5},o=/^#?([0-9a-f]{6})$/i.exec(n.trim());if(!o)return l;const i=o[1],s=Number.parseInt(i.slice(0,2),16)/255,u=Number.parseInt(i.slice(2,4),16)/255,d=Number.parseInt(i.slice(4,6),16)/255,m=Math.max(s,u,d),h=Math.min(s,u,d),g=m-h;let b=0;g!==0&&(m===s?b=(u-d)/g%6:m===u?b=(d-s)/g+2:b=(s-u)/g+4);const p=Math.round(b*60);return{h:p<0?p+360:p,s:m===0?0:g/m,v:m}}function Zf({h:n,s:l,v:o}){const i=o*l,s=i*(1-Math.abs(n/60%2-1)),u=o-i;let d=0,m=0,h=0;return n<60?(d=i,m=s):n<120?(d=s,m=i):n<180?(m=i,h=s):n<240?(m=s,h=i):n<300?(d=s,h=i):(d=i,h=s),`#${Jf(d+u)}${Jf(m+u)}${Jf(h+u)}`.toUpperCase()}function Jf(n){return Math.round(Ls(n,0,1)*255).toString(16).padStart(2,"0")}function RN({className:n,orientation:l="horizontal",decorative:o=!0,...i}){return v.jsx(LR,{"data-slot":"separator",decorative:o,orientation:l,className:Qe("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 NN({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(vn,{variant:l?"secondary":"ghost",size:"icon-sm",className:Qe("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function ON({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(vn,{variant:l?"secondary":"ghost",size:"icon-sm",className:Qe("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function zN({children:n,left:l,width:o="default"}){const i=x.useRef(null),[s,u]=x.useState({x:0,y:0});x.useLayoutEffect(()=>{const m=i.current;if(!m)return;const h=m.getBoundingClientRect(),g=m.closest('[data-testid="floating-toolbar-anchor"]'),b=g instanceof HTMLElement?g.getBoundingClientRect():null,p=b?b.left+l:h.left-s.x,S=b?b.bottom+8:h.top-s.y,E={bottom:S+h.height,left:p,right:p+h.width,top:S},T=16;let C=0,A=0;E.right>window.innerWidth-T&&(C=window.innerWidth-T-E.right),E.left+C<T&&(C+=T-(E.left+C)),E.bottom>window.innerHeight-T&&(A=window.innerHeight-T-E.bottom),E.top+A<T&&(A+=T-(E.top+A)),(Ad(s.x,C)||Ad(s.y,A))&&u({x:C,y:A})},[l,s.x,s.y]);const d=o==="wide"?"w-80 max-w-[min(320px,calc(100vw-40px))] max-h-[calc(100vh-36px)] overflow-y-auto":o==="medium"?"w-[272px]":"w-64";return v.jsx("div",{className:Qe("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)]",Qx,Zx,d),ref:i,style:{left:l+s.x,top:`calc(100% + 8px + ${s.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 Ad(n,l){return Math.abs(n-l)>=.5}function jN(){return v.jsx(RN,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function kN({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 Gl({children:n,htmlFor:l}){return v.jsx("label",{htmlFor:l,className:"text-[10px] font-medium uppercase tracking-wider text-foreground/50",children:n})}function _d({icon:n}){return v.jsx(n,{className:"size-3.5"})}function LN({children:n,disabled:l=!1,onClick:o,title:i}){return v.jsx(vn,{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:o,children:n})}function HN({...n}){return v.jsx(xR,{"data-slot":"select",...n})}function BN({...n}){return v.jsx(AR,{"data-slot":"select-group",...n})}function UN({...n}){return v.jsx(wR,{"data-slot":"select-value",...n})}function IN({className:n,size:l="default",children:o,...i}){return v.jsxs(SR,{"data-slot":"select-trigger","data-size":l,className:Qe("flex w-fit items-center justify-between gap-2 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-sm whitespace-nowrap shadow-none transition-colors outline-none hover:bg-foreground/[0.05] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-foreground/35 data-[size=default]:h-8 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/45",n),...i,children:[o,v.jsx(ER,{asChild:!0,children:v.jsx(Jo,{className:"size-4 opacity-50"})})]})}function GN({className:n,children:l,position:o="item-aligned",align:i="center",...s}){return v.jsx(TR,{children:v.jsxs(CR,{"data-slot":"select-content",className:Qe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-xl border border-foreground/[0.08] bg-white text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:o,align:i,...s,children:[v.jsx(VN,{}),v.jsx(MR,{className:Qe("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:l}),v.jsx(qN,{})]})})}function YN({className:n,children:l,...o}){return v.jsxs(_R,{"data-slot":"select-item",className:Qe("relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-[13px] text-foreground/70 outline-hidden select-none focus:bg-foreground/[0.04] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...o,children:[v.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsx(NR,{children:v.jsx(mv,{className:"size-4"})})}),v.jsx(RR,{children:l})]})}function VN({className:n,...l}){return v.jsx(OR,{"data-slot":"select-scroll-up-button",className:Qe("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Id,{className:"size-4"})})}function qN({className:n,...l}){return v.jsx(zR,{"data-slot":"select-scroll-down-button",className:Qe("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Jo,{className:"size-4"})})}const Ns="__empty__";function PN({currentValue:n,feature:l,onClosePanel:o,onCommitFeature:i,operationAvailability:s,onStyleChange:u}){const d=`floating-${l.id}`;if(l.controlType==="select")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Gl,{htmlFor:d,children:l.label}),v.jsxs(HN,{value:n||Ns,onValueChange:m=>i(l,m===Ns?"":m),children:[v.jsx(IN,{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(UN,{})}),v.jsx(GN,{children:v.jsx(BN,{children:pN(l,n).map(m=>v.jsx(YN,{value:m.value||Ns,"data-value":m.value,style:l.id==="font-family"&&m.value?{fontFamily:m.value}:void 0,children:m.label},m.value||Ns))})})]})]},l.id);if(l.controlType==="color")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Gl,{children:l.label}),v.jsx(AN,{value:n,includeGradients:l.id==="background-color",onChange:m=>i(l,m)})]},l.id);if(l.controlType==="toggle"){const m=Fx(l,n);return v.jsx(vn,{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(Gl,{htmlFor:d,children:l.label}),v.jsx(qr,{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(Gl,{children:l.label}),v.jsx("div",{className:"grid gap-1",children:(l.options??[]).map(m=>{const h=m.icon,g=l.target==="operation"&&s?s[l.id]===!1:!1;return v.jsxs(LN,{disabled:g,title:m.label,onClick:()=>{g||(i(l,m.value),o())},children:[h?v.jsx(_d,{icon:h}):null,v.jsx("span",{children:m.label})]},m.value)})})]},l.id):l.controlType==="custom-css"?v.jsx($N,{onCommit:u},l.id):v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Gl,{htmlFor:d,children:l.label}),v.jsx(qr,{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 $N({onCommit:n}){const l=x.useId(),o=x.useId(),[i,s]=x.useState(""),[u,d]=x.useState("");function m(){const h=i.trim();h&&(n(h,u.trim()),d(""))}return v.jsxs("div",{className:"grid gap-2",children:[v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Gl,{htmlFor:l,children:"Property name"}),v.jsx(qr,{id:l,type:"text",value:i,placeholder:"e.g. justify-content",onChange:h=>s(h.target.value)})]}),v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Gl,{htmlFor:o,children:"Property value"}),v.jsx(qr,{id:o,type:"text",value:u,placeholder:"e.g. space-between",onChange:h=>d(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),m())}})]}),v.jsx(vn,{type:"button",variant:"outline",disabled:!i.trim(),onClick:m,children:"Apply property"})]})}function XN({inspectedStyles:n,selectedElementType:l,selectionCommandAvailability:o,attributeValues:i,onStyleChange:s,onAttributeChange:u,onAlignToSlide:d,onDistribute:m,onGroup:h,onLayerOrder:g,onUngroup:b}){const p=x.useRef(null),[S,E]=x.useState(null),[T,C]=x.useState(0),[A,R]=x.useState(0),z=x.useRef(0);x.useEffect(()=>{if(p.current)return()=>{const I=p.current,$=I==null?void 0:I.closest('[data-testid="stage-panel"]');if(!(I instanceof HTMLElement)||!($ instanceof HTMLElement))return;const fe=I.getBoundingClientRect(),ee=$.getBoundingClientRect(),re=I.cloneNode(!0);re instanceof HTMLElement&&(re.className=Qe(re.className,"absolute z-40 m-0 pointer-events-none"),re.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),re.className=Qe(re.className,TN),re.setAttribute("aria-hidden","true"),re.style.left=`${fe.left-ee.left}px`,re.style.top=`${fe.top-ee.top}px`,re.style.width=`${fe.width}px`,re.style.height=`${fe.height}px`,$.appendChild(re),re.addEventListener("animationend",()=>{re.remove()}),window.setTimeout(()=>{re.remove()},EN+50))}},[]),x.useLayoutEffect(()=>{const j=p.current;if(!j)return;const I=j.getBoundingClientRect(),$=I.left-z.current,fe=I.right-z.current,ee=16;let re=0;$<ee&&(re=ee-$),fe+re>window.innerWidth-ee&&(re+=window.innerWidth-ee-(fe+re)),Ad(z.current,re)&&(z.current=re,R(re))},[]),x.useEffect(()=>{function j(I){var $;($=p.current)!=null&&$.contains(I.target)||E(null)}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]),x.useEffect(()=>{function j(I){I.key==="Escape"&&E(null)}return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[]);function D(j,I){C(I),E($=>$===j?null:j)}function Y(j,I){if(j.id==="distribute"){m(I);return}if(j.id==="group"){h();return}if(j.id==="ungroup"){b();return}yN({attributeValues:i,feature:j,inspectedStyles:n,nextValue:I,onAlignToSlide:d,onAttributeChange:u,onLayerOrder:g,onStyleChange:s})}const ne=KN(l);return v.jsxs("div",{className:Qe("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",Qx,Zx),ref:p,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:ne.map((j,I)=>v.jsxs("div",{className:"contents",children:[I>0?v.jsx(jN,{}):null,v.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:j.subgroups.map($=>{const fe=$.features.length===1?$.features[0]:null;return(fe==null?void 0:fe.controlType)==="toggle"?q($,fe):v.jsx(NN,{active:S===$.id,label:$.label,onClick:ee=>D($.id,ee.currentTarget.offsetLeft),children:v.jsx(_d,{icon:$.icon})},$.id)})})]},j.id))}),ne.flatMap(j=>j.subgroups).map(j=>S===j.id?v.jsxs(zN,{left:T,width:DN(j),children:[v.jsx(kN,{children:j.label}),v.jsx("div",{className:"grid gap-2",children:j.features.map(P)})]},j.id):null)]});function q(j,I){const $=Md({feature:I,inspectedStyles:n,attributeValues:i}),fe=Fx(I,$);return v.jsx(ON,{label:I.label,active:fe,onClick:()=>Y(I,fe?"":"true"),children:v.jsx(_d,{icon:j.icon})},j.id)}function P(j){return PN({currentValue:Md({feature:j,inspectedStyles:n,attributeValues:i}),feature:j,onClosePanel:()=>E(null),onCommitFeature:Y,operationAvailability:o,onStyleChange:s})}}function KN(n){return n!=="group"?T0:T0.flatMap(l=>l.id!=="layout"?[]:[{...l,subgroups:l.subgroups.filter(o=>["size","rotation","layer-alignment","grouping"].includes(o.id))}])}const C0={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function FN({slideWidth:n,slideHeight:l,offsetX:o,offsetY:i,scale:s,preselectionOverlay:u,selectionOverlay:d,toolbarKey:m,inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:b,groupScopeOverlayPassive:p,isEditingText:S,manipulationOverlay:E,attributeValues:T,iframeRef:C,stageViewportRef:A,selectionOverlayRef:R,selectionContextMenuTriggerRef:z,isManipulating:D,onSelectionOverlayMouseDown:Y,onSelectionOverlayMouseUp:ne,onSelectionOverlayMouseMove:q,onSelectionOverlayContextMenu:P,onStageMouseLeave:j,onResizeHandleMouseDown:I,onRotateHandleMouseDown:$,onSelectionOverlayDoubleClick:fe,onBackgroundClick:ee,onStyleChange:re,onAttributeChange:V,onAlignToSlide:F,onDistribute:M,onGroup:N,onLayerOrder:H,onUngroup:B,onDuplicate:G,onDelete:_}){const L=(oe,ue)=>{oe===ue&&ee()},Z=d?QN({selectionOverlay:d,offsetX:o,scale:s,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:oe=>{L(oe.target,oe.currentTarget)},onKeyDown:oe=>{(oe.key==="Enter"||oe.key===" ")&&L(oe.target,oe.currentTarget)},onMouseLeave:j,children:[d&&!D&&!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:Z,"data-testid":"floating-toolbar-anchor",children:v.jsx(XN,{inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:b,attributeValues:T,onStyleChange:re,onAttributeChange:V,onAlignToSlide:F,onDistribute:M,onGroup:N,onLayerOrder:H,onUngroup:B},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:`${o}px`,top:`${i}px`,transform:`scale(${s})`},children:v.jsx("iframe",{ref:C,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!S&&!D?v.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...C0,left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`}}):null,S?null:v.jsxs($x,{children:[v.jsx(Xx,{asChild:!0,children:v.jsx("span",{ref:z,"data-testid":"selection-context-menu-trigger",className:"pointer-events-none absolute size-0","aria-hidden":"true"})}),v.jsx(sN,{selectionCommandAvailability:b,onAlignToSlide:F,onDelete:_,onDistribute:M,onDuplicate:G,onGroup:N,onLayerOrder:H,onUngroup:B})]}),d&&!S?v.jsx("div",{ref:R,"data-testid":"selection-overlay",className:Qe("absolute z-[3] border border-dashed",p?"pointer-events-none":"pointer-events-auto"),style:{...C0,left:`${d.x}px`,top:`${d.y}px`,width:`${d.width}px`,height:`${d.height}px`},onMouseDown:Y,onMouseMove:q,onMouseUp:ne,onContextMenu:P,onDoubleClick:oe=>{fe(oe)}}):null,E?v.jsx(iN,{selectionBounds:E.selectionBounds,snapGuides:E.snapGuides,resizeHandles:E.resizeHandles,rotationHandle:E.rotationHandle,onResizeHandleMouseDown:I,onRotateHandleMouseDown:$}):null]})}function QN({selectionOverlay:n,offsetX:l,scale:o,slideWidth:i}){const u=l,d=l+i*o,m=Math.max((d-u)/2,0),h=Math.min(288,m),g=u+h,b=d-h,p=n.x+n.width/2;return{left:`${Math.min(Math.max(p,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 ZN({delayDuration:n=0,...l}){return v.jsx(eN,{"data-slot":"tooltip-provider",delayDuration:n,...l})}function Rd(n,l,o){return c2(n,l,o)}function $o(n,l,o){var u;if(typeof DOMParser>"u")return"";const s=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${Te}="${l}"]`);return((u=s==null?void 0:s.getAttribute(o))==null?void 0:u.trim())??""}function JN({elementId:n,nextValue:l,propertyName:o,slide:i}){const s=Rd(i,n,o),u=l.trim();return s===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:o,previousValue:s,nextValue:u,timestamp:Date.now()}}function WN({attributeName:n,elementId:l,nextValue:o,slide:i}){const s=$o(i,l,n),u=o.trim();return s===u?null:{type:"attribute.update",slideId:i.id,elementId:l,attributeName:n,previousValue:s,nextValue:u,timestamp:Date.now()}}function fl(n){return Math.round(n*100)/100}function Jx(n,l){var m;if(typeof DOMParser>"u")return n;const s=(m=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(s instanceof HTMLElement))return n;const u=Vn(s.style.transform),d=Na(0,0,u.rotate);return s.style.position="absolute",s.style.left=`${fl(l.x)}px`,s.style.top=`${fl(l.y)}px`,s.style.width=`${fl(l.width)}px`,s.style.height=`${fl(l.height)}px`,s.style.margin="0px",s.style.boxSizing="border-box",d?s.style.transform=d:s.style.removeProperty("transform"),s.style.transformOrigin||(s.style.transformOrigin="center center"),s.outerHTML}function Wx(n,l){return{x:n.left-l.left,y:n.top-l.top,width:n.width,height:n.height}}function e5(n,l,o){var d;const i=(d=n.current)==null?void 0:d.contentDocument,s=i==null?void 0:i.querySelector(l.rootSelector),u=s==null?void 0:s.getBoundingClientRect();return{width:(u==null?void 0:u.width)||o.width,height:(u==null?void 0:u.height)||o.height}}function Nd(n,l,o){return{x:fl(n.x+l),y:fl(n.y+o),width:n.width,height:n.height}}function t5(n){return n.length?n.reduce((l,o)=>{const i=Math.min(l.x,o.x),s=Math.min(l.y,o.y),u=Math.max(l.x+l.width,o.x+o.width),d=Math.max(l.y+l.height,o.y+o.height);return{x:i,y:s,width:u-i,height:d-s}}):null}function n5(n,l,o){const i=Math.max(0,o.width-n.width),s=Math.max(0,o.height-n.height),u=Math.min(i,Math.max(0,n.x+l)),d=Math.min(s,Math.max(0,n.y+l));return{x:fl(u-n.x),y:fl(d-n.y)}}function e1(n,l){const o=[];return l.vertical&&o.push(...M0(n,l.vertical,"vertical")),l.horizontal&&o.push(...M0(n,l.horizontal,"horizontal")),o}function M0(n,l,o){return l.target.kind==="spacing"?l5(n,l,o):[a5(n,l,o)]}function a5(n,l,o){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,o==="vertical"){const m=A0(n,l.anchor,"vertical");if(i.kind==="slide")return{orientation:o,start:{x:i.position,y:n.y},end:{x:i.position,y:n.y+n.height},...i.role==="center"?{start:{x:i.position,y:i.rect.y},end:{x:i.position,y:i.rect.y+i.rect.height}}:{},variant:"alignment"};const h=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:o,start:{x:m,y:h-_s},end:{x:m,y:g+_s},variant:"alignment"}}const s=A0(n,l.anchor,"horizontal");if(i.kind==="slide")return{orientation:o,start:{x:n.x,y:i.position},end:{x:n.x+n.width,y:i.position},...i.role==="center"?{start:{x:i.rect.x,y:i.position},end:{x:i.rect.x+i.rect.width,y:i.position}}:{},variant:"alignment"};const u=Math.min(n.x,i.rect.x),d=Math.max(n.x+n.width,i.rect.x+i.rect.width);return{orientation:o,start:{x:u-_s,y:s},end:{x:d+_s,y:s},variant:"alignment"}}function l5(n,l,o){const i=l.target.relatedRects;if(i.length<2)return[];const[s,u]=i;if(!s||!u)return[];if(o==="vertical"){const E=s.x<=u.x?s:u,T=E===s?u:s,C=E.x+E.width,A=T.x,R=l.anchor==="start"?n.x:n.x+n.width,z={orientation:"horizontal",start:{x:C,y:E.y+E.height/2},end:{x:A,y:T.y+T.height/2},variant:"spacing"},D={orientation:"horizontal",start:l.anchor==="start"?{x:T.x+T.width,y:T.y+T.height/2}:{x:E.x,y:E.y+E.height/2},end:{x:R,y:n.y+n.height/2},variant:"spacing"};return[z,D]}const d=s.y<=u.y?s:u,m=d===s?u:s,h=d.y+d.height,g=m.y,b=l.anchor==="start"?n.y:n.y+n.height,p={orientation:"vertical",start:{x:d.x+d.width/2,y:h},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[p,S]}function A0(n,l,o){return o==="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 r5({activeSlide:n,doc:l,rootRect:o,selectedElementId:i,slideStageRect:s,stageGeometry:u}){var S;const d=(E,T)=>({position:E,rect:s,kind:"slide",role:T,anchor:null,priority:T==="center"?0:2,elementId:null,relatedRects:[]}),m=[d(s.x,"start"),d(s.x+s.width/2,"center"),d(s.x+s.width,"end")],h=[d(s.y,"start"),d(s.y+s.height/2,"center"),d(s.y+s.height,"end")],g=l.querySelector(`[data-editor-id="${i}"]`),b=[];for(const E of n.elements){if(E.id===i)continue;const T=l.querySelector(`[data-editor-id="${E.id}"]`);if(!T||g&&(g.contains(T)||T.contains(g)))continue;const C=(S=l.defaultView)==null?void 0:S.getComputedStyle(T);if((C==null?void 0:C.display)==="none"||(C==null?void 0:C.visibility)==="hidden")continue;const A=T.getBoundingClientRect();if(A.width<=0||A.height<=0)continue;const R=Hr(A,o,u);(E.type==="block"||E.type==="image")&&b.push({elementId:E.id,rect:R});const z=R.x,D=R.x+R.width/2,Y=R.x+R.width,ne=R.y,q=R.y+R.height/2,P=R.y+R.height,j=(I,$)=>({position:I,rect:R,kind:"element",role:$,anchor:null,priority:$==="center"?3:4,elementId:E.id,relatedRects:[]});m.push(j(z,"start"),j(D,"center"),j(Y,"end")),h.push(j(ne,"start"),j(q,"center"),j(P,"end"))}const p=o5(b);return m.push(...p.vertical),h.push(...p.horizontal),{vertical:m,horizontal:h}}function o5(n){const l=[],o=[],i=n.slice().sort((u,d)=>u.rect.x-d.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),s=n.slice().sort((u,d)=>u.rect.y-d.rect.y).filter(u=>u.rect.width>0&&u.rect.height>0);for(let u=0;u<i.length-1;u+=1){const d=i[u],m=i[u+1];if(!d||!m)continue;if(!Lr(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>=y0&&g<=v0&&Lr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,Js)&&l.push(Os({position:m.rect.x+m.rect.width+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Os({position:d.rect.x-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}for(let u=0;u<s.length-1;u+=1){const d=s[u],m=s[u+1];if(!d||!m)continue;if(!Lr(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>=y0&&g<=v0&&Lr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,Js)&&o.push(Os({position:m.rect.y+m.rect.height+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Os({position:d.rect.y-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}return{vertical:l,horizontal:o}}function Os({position:n,rect:l,anchor:o,relatedRects:i}){return{position:n,rect:l,kind:"spacing",role:"end",anchor:o,priority:1,elementId:null,relatedRects:i}}function i5(n,l){const o=Ws([{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=Ws([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],l.horizontal,n,"horizontal"),s={...n,x:n.x+((o==null?void 0:o.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:s,guides:e1(s,{vertical:o,horizontal:i})}}function s5(n,l,o){const i={...n},s=l==="top-left"||l==="bottom-left"?"start":"end",u=l==="top-left"||l==="top-right"?"start":"end",d=Ws([{anchor:s,position:s==="start"?n.x:n.x+n.width}],o.vertical,n,"vertical"),m=Ws([{anchor:u,position:u==="start"?n.y:n.y+n.height}],o.horizontal,n,"horizontal");if(d)if(s==="start"){const h=i.width-d.delta;h>=48&&(i.x+=d.delta,i.width=h)}else{const h=i.width+d.delta;h>=48&&(i.width=h)}if(m)if(u==="start"){const h=i.height-m.delta;h>=48&&(i.y+=m.delta,i.height=h)}else{const h=i.height+m.delta;h>=48&&(i.height=h)}return{rect:i,guides:e1(i,{vertical:m,horizontal:d})}}function Ws(n,l,o,i){const s=h5(l);let u=null;for(const d of n)for(const m of s){if(!d5(o,m,i)||m.anchor&&m.anchor!==d.anchor)continue;const h=m.position-d.position;if(Math.abs(h)>rN)continue;const b=_0({anchor:d.anchor,delta:h,target:m},o,i),p=u?_0(u,o,i):Number.POSITIVE_INFINITY;b>=p||(u={anchor:d.anchor,delta:h,target:m})}return u}function _0(n,l,o){const i=Math.abs(n.delta),s=n.target.kind==="spacing"?Math.max(0,i-oN):i,u=c5(n.target);return s*1e3+u+n.target.priority+u5(n.anchor,n.target)+f5(l,n.target,o)/100}function c5(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function u5(n,l){return l.kind==="slide"&&l.role==="center"&&n!=="center"?25:0}function f5(n,l,o){return l.kind==="slide"?0:o==="vertical"?R0(n.y,n.y+n.height,l.rect.y,l.rect.y+l.rect.height):R0(n.x,n.x+n.width,l.rect.x,l.rect.x+l.rect.width)}function R0(n,l,o,i){return l<o?o-l:i<n?n-i:0}function d5(n,l,o){return l.kind==="slide"?!0:l.kind==="spacing"?m5(n,l,o):!0}function m5(n,l,o){if(l.relatedRects.length<2)return!1;if(o==="vertical"){const u=Math.min(...l.relatedRects.map(m=>m.y)),d=Math.max(...l.relatedRects.map(m=>m.y+m.height));return Lr(n.y,n.y+n.height,u,d,Js)}const i=Math.min(...l.relatedRects.map(u=>u.x)),s=Math.max(...l.relatedRects.map(u=>u.x+u.width));return Lr(n.x,n.x+n.width,i,s,Js)}function h5(n){const l=new Set;return n.filter(o=>{const i=`${o.kind}:${o.elementId??"slide"}:${o.position.toFixed(2)}`;return l.has(i)?!1:(l.add(i),!0)})}function zs(n){return`${Math.round(n*100)/100}px`}function sl(n,l){return Math.max(n,48*l)}function Od(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function p5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function g5(n){const[l,...o]=n;return l?o.reduce((i,s)=>{const u=Math.min(i.x,s.x),d=Math.min(i.y,s.y),m=Math.max(i.x+i.width,s.x+s.width),h=Math.max(i.y+i.height,s.y+s.height);return{x:u,y:d,width:m-u,height:h-d}},l):{x:0,y:0,width:0,height:0}}function N0(n,l,o,i){return Math.atan2(l-i,n-o)*180/Math.PI}function y5({resizeCorner:n,scale:l,stageDeltaX:o,stageDeltaY:i,startStageRect:s}){let u=s.x,d=s.y,m=s.width,h=s.height;switch(n){case"top-left":{m=sl(s.width-o,l),h=sl(s.height-i,l),u=s.x+(s.width-m),d=s.y+(s.height-h);break}case"top-right":{m=sl(s.width+o,l),h=sl(s.height-i,l),d=s.y+(s.height-h);break}case"bottom-left":{m=sl(s.width-o,l),h=sl(s.height+i,l),u=s.x+(s.width-m);break}default:{m=sl(s.width+o,l),h=sl(s.height+i,l);break}}return{x:u,y:d,width:m,height:h}}function Hs(n,l){for(const o of Ud)n.style[o]=l[o]??""}function v5(n){return n.elementIds.map(l=>{const o=n.targetNodes[l],i=n.previousStyles[l];if(!o||!i)return null;const s=Xo(o);return JSON.stringify(s)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:l,previousStyle:i,nextStyle:s,timestamp:Date.now()}}).filter(l=>!!l)}function b5(n,l){return l.length===1?l[0]:{type:"operation.batch",slideId:n.slideId,operations:l,timestamp:Date.now()}}function x5({isEditingText:n,isManipulating:l,selectedElement:o,selectedElementId:i,snapGuides:s,stageRect:u}){return!u||!i||!p5(o)||n?null:{selectionBounds:u,snapGuides:l?s:[],resizeHandles:[{corner:"top-left",x:u.x,y:u.y},{corner:"top-right",x:u.x+u.width,y:u.y},{corner:"bottom-right",x:u.x+u.width,y:u.y+u.height},{corner:"bottom-left",x:u.x,y:u.y+u.height}],rotationHandle:{x:u.x+u.width/2,y:u.y+u.height+20}}}function S5({activeSlide:n,selectedElement:l,selectedElementId:o,selectedElementIds:i,selectedStageRect:s,iframeRef:u,stageGeometry:d,isEditingText:m,onCommitOperation:h}){const{offsetX:g,offsetY:b,scale:p,slideHeight:S,slideWidth:E}=d,T=x.useRef(null),C=x.useRef(null),[A,R]=x.useState(!1),[z,D]=x.useState(!1),[Y,ne]=x.useState(null),[q,P]=x.useState([]),I=x5({isEditingText:m,isManipulating:A,selectedElement:l,selectedElementId:o,snapGuides:q,stageRect:Y??s});x.useEffect(()=>()=>{T.current=null,C.current&&window.clearTimeout(C.current)},[]),x.useEffect(()=>{(!n||!o||!Od(l)||m)&&(T.current=null,R(!1),ne(null))},[n,m,l,o]),x.useEffect(()=>{A||(ne(null),P([]))},[A]);const $=x.useCallback(()=>{D(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{D(!1),C.current=null},0)},[]),fe=x.useCallback((ee,re,V=null)=>{var Nt;if(!n||!o||!s||!Od(l)||m)return;const F=(Nt=u.current)==null?void 0:Nt.contentDocument;if(!F)return;const M=F.querySelector(n.rootSelector),N=Xe(F,o);if(!M||!N)return;const H=w5({activeSlide:n,doc:F,mode:ee,selectedElementId:o,selectedElementIds:i}),B=Object.fromEntries(H.map(ze=>[ze,Xe(F,ze)]).filter(ze=>!!ze[1]));if(!Object.keys(B).length)return;const G=Object.fromEntries(Object.entries(B).map(([ze,be])=>[ze,Xo(be)])),_=Object.fromEntries(Object.entries(B).map(([ze,be])=>[ze,E5(be,B)])),L=u.current,Z=(L==null?void 0:L.style.pointerEvents)||"";re.preventDefault(),re.stopPropagation();const oe=N.getBoundingClientRect(),ue=M.getBoundingClientRect(),me={x:g,y:b,width:E*p,height:S*p},ae={scale:p,offsetX:g,offsetY:b},W=r5({activeSlide:n,doc:F,rootRect:ue,selectedElementId:o,slideStageRect:me,stageGeometry:ae}),le=Object.values(B).map(ze=>Hr(ze.getBoundingClientRect(),ue,ae)),ge=Object.fromEntries(Object.entries(B).map(([ze,be])=>[ze,Hr(be.getBoundingClientRect(),ue,ae)])),we=Object.fromEntries(Object.values(B).map(ze=>ze.parentElement).filter(ze=>!!ze).map(ze=>[t1(ze),Hr(ze.getBoundingClientRect(),ue,ae)])),Ce=le.length?g5(le):s;T.current={slideId:n.id,elementId:o,elementIds:Object.keys(B),mode:ee,resizeCorner:V,startPointer:{x:re.clientX,y:re.clientY},startStageRect:Ce,centerPoint:{x:oe.left+oe.width/2,y:oe.top+oe.height/2},previousStyle:G[o],previousStyles:G,startElementStageRects:ge,resizeParentElementIds:_,startParentStageRects:we,targetNodes:B,snapTargets:W},R(!0),P([]),L&&(L.style.pointerEvents="none");const Ge=ze=>{const be=T.current;if(!be)return;ze.preventDefault();const on=ze.clientX-be.startPointer.x,Qt=ze.clientY-be.startPointer.y;if(be.mode==="move"){const Pt={x:be.startStageRect.x+on,y:be.startStageRect.y+Qt,width:be.startStageRect.width,height:be.startStageRect.height},Ot=ze.altKey?{rect:Pt,guides:[]}:i5(Pt,be.snapTargets);ne(Ot.rect),P(Ot.guides);const oa=(Ot.rect.x-be.startStageRect.x)/p,Ln=(Ot.rect.y-be.startStageRect.y)/p;for(const $n of be.elementIds){const Ut=be.targetNodes[$n],Hn=be.previousStyles[$n];if(!Ut||!Hn)continue;const Zt=Vn(Hn.transform);Hs(Ut,{...Hn,transform:Na(Zt.translateX+oa,Zt.translateY+Ln,Zt.rotate),transformOrigin:Hn.transformOrigin||"center center"})}return}if(be.mode==="resize"){const Pt=y5({resizeCorner:be.resizeCorner,scale:p,stageDeltaX:on,stageDeltaY:Qt,startStageRect:be.startStageRect}),Ot=ze.altKey||!be.resizeCorner?{rect:Pt,guides:[]}:s5(Pt,be.resizeCorner,be.snapTargets);ne(Ot.rect),P(Ot.guides),T5(be,Ot.rect,{offsetX:g,offsetY:b,scale:p});return}const ft=Vn(be.previousStyle.transform),xn=N0(be.startPointer.x,be.startPointer.y,be.centerPoint.x,be.centerPoint.y),dt=N0(ze.clientX,ze.clientY,be.centerPoint.x,be.centerPoint.y);Hs(N,{...be.previousStyle,transform:Na(ft.translateX,ft.translateY,ft.rotate+(dt-xn)),transformOrigin:"center center"}),P([])},Ye=()=>{window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",qt),window.removeEventListener("keydown",Bt),L&&(L.style.pointerEvents=Z)},qt=()=>{const ze=T.current;if(Ye(),R(!1),$(),T.current=null,P([]),!ze)return;const be=v5(ze);if(!be.length){ne(null);return}h(b5(ze,be))},Bt=ze=>{if(ze.key!=="Escape")return;const be=T.current;if(Ye(),R(!1),$(),T.current=null,P([]),!!be){for(const on of be.elementIds){const Qt=be.targetNodes[on],ft=be.previousStyles[on];Qt&&ft&&Hs(Qt,ft)}ne(null)}};window.addEventListener("mousemove",Ge),window.addEventListener("mouseup",qt),window.addEventListener("keydown",Bt)},[n,u,m,h,l,o,i,s,p,g,b,E,S,$]);return{manipulationOverlay:I,isManipulating:A,suppressBackgroundClear:z,beginMove:ee=>{fe("move",ee)},beginResize:(ee,re)=>{fe("resize",re,ee)},beginRotate:ee=>{fe("rotate",ee)}}}function w5({activeSlide:n,doc:l,mode:o,selectedElementId:i,selectedElementIds:s}){const u=s.filter(m=>{const h=n.elements.find(g=>g.id===m);return Od(h)});if(o==="move")return u;if(o==="rotate")return[i];const d=new Set;for(const m of u.length?u:[i]){const h=Xe(l,m);if(h&&(d.add(m),h.getAttribute("data-group")==="true"))for(const g of h.querySelectorAll(`[data-editable][${Te}]`)){const b=g.getAttribute(Te);b&&d.add(b)}}return[...d]}function E5(n,l){const o=Object.entries(l);let i=n.parentElement;for(;i;){const s=o.find(([,u])=>u===i);if(s)return s[0];i=i.parentElement}return null}function T5(n,l,o){const i=n.startStageRect.width>0?l.width/n.startStageRect.width:1,s=n.startStageRect.height>0?l.height/n.startStageRect.height:1,u={x:o.offsetX,y:o.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([m,h])=>[m,{x:l.x+(h.x-n.startStageRect.x)*i,y:l.y+(h.y-n.startStageRect.y)*s,width:h.width*i,height:h.height*s}]));for(const m of n.elementIds){const h=n.targetNodes[m],g=n.previousStyles[m],b=d[m];if(!h||!g||!b)continue;const p=n.resizeParentElementIds[m]?d[n.resizeParentElementIds[m]]:n.startParentStageRects[t1(h.parentElement)]??u;if(!p)continue;const S=Vn(g.transform);Hs(h,{...g,position:g.position||"absolute",left:zs((b.x-p.x)/o.scale),top:zs((b.y-p.y)/o.scale),width:zs(b.width/o.scale),height:zs(b.height/o.scale),transform:Na(0,0,S.rotate),transformOrigin:g.transformOrigin||"center center"})}}function t1(n){return n!=null&&n.getAttribute(Te)?`editable:${n.getAttribute(Te)}`:"slide"}const O0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function C5(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function M5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function A5(n){return n.altKey?1:n.shiftKey?10:5}function _5(n,l,o){var d;const i={[l]:o};if(typeof DOMParser>"u")return i;const u=(d=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:d.content.firstElementChild;if(!(u instanceof HTMLElement))return i;for(const m of u.querySelectorAll("[data-editor-id]")){const h=m.getAttribute("data-editor-id");h&&(i[h]=`${o}-${h}`)}return i}function zd(n,l,o){return l.length?(o(l.length===1?l[0]:{type:"operation.batch",slideId:n,operations:l,timestamp:Date.now()}),!0):!1}function R5({slide:n,selectedElementIds:l,iframeRef:o}){var h;if(!n||!l.length)return null;const i=(h=o.current)==null?void 0:h.contentDocument,s=i==null?void 0:i.querySelector(n.rootSelector),u=s==null?void 0:s.getBoundingClientRect();if(!u)return null;const d=l.map(g=>{const b=Gs(n.htmlSource,g),p=Is(n.htmlSource,g),S=i?Xe(i,g):null;return!b||!p||!S?null:{sourceElementId:g,html:b,rect:Wx(S.getBoundingClientRect(),u),...p}}).filter(g=>!!g),m=t5(d.map(g=>g.rect));return m?{elements:d,unionRect:m}:null}function N5({slide:n,selectedElementIds:l}){return!n||!l.length?[]:l.map(o=>{const i=Gs(n.htmlSource,o),s=Is(n.htmlSource,o);return!i||!s?null:{type:"element.remove",slideId:n.id,elementId:o,...s,html:i,timestamp:Date.now()}}).filter(o=>!!o)}function O5({slide:n,payload:l,iframeRef:o,slideSize:i}){if(!n||!l)return null;let s=n.htmlSource;const u=[],d=e5(o,n,i),m=n5(l.unionRect,24,d),h=[];return{operations:l.elements.map(b=>{const p=od(s,`${b.sourceElementId}-copy`),S=ev(b.html,_5(b.html,b.sourceElementId,p)),E=Nd(b.rect,m.x,m.y),T=Jx(S,E);return s=`${s}
381
+ <!-- ${p} reserved -->`,u.push(p),h.push({...b,rect:E}),{type:"element.insert",slideId:n.id,elementId:p,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:T,timestamp:Date.now()}}),selectedElementIds:u,nextClipboard:{elements:h,unionRect:Nd(l.unionRect,m.x,m.y)}}}function z0(n,l,o){return zd(n,l,o)}function z5({activeSlide:n,selectedElementIds:l,iframeRef:o,slideWidth:i,slideHeight:s,isEditingText:u,canUndo:d,canRedo:m,onEscapeSelection:h,onCommitOperation:g,onSelectElementIds:b,onUndo:p,onRedo:S}){const E=x.useRef(null),T=x.useRef(n),C=x.useRef(l),A=x.useRef(d),R=x.useRef(m),z=x.useRef(u),D=x.useRef(h);T.current=n,C.current=l,A.current=d,R.current=m,z.current=u,D.current=h,x.useEffect(()=>{var ee,re;const Y=()=>{const V=R5({slide:T.current,selectedElementIds:C.current,iframeRef:o});return E.current=V,!!V},ne=()=>{const V=T.current;if(!V)return!1;const F=N5({slide:V,selectedElementIds:C.current});return F.length?(z0(V.id,F,g),b([]),!0):!1},q=(V=E.current)=>{const F=T.current,M=O5({slide:F,payload:V,iframeRef:o,slideSize:{width:i,height:s}});return!F||!M?!1:(z0(F.id,M.operations,g),b(M.selectedElementIds),E.current=M.nextClipboard,!0)},P=V=>{var _;const F=O0[V.key],M=T.current,N=C.current;if(!M||!N.length||!F)return!1;const H=(_=o.current)==null?void 0:_.contentDocument,B=A5(V),G=N.map(L=>{const Z=M.elements.find(W=>W.id===L);if(!M5(Z))return null;const oe=H?Xe(H,L):null;if(!oe)return null;const ue=Xo(oe),me=Vn(ue.transform),ae=ad({...ue,transform:Na(me.translateX+F.x*B,me.translateY+F.y*B,me.rotate),transformOrigin:ue.transformOrigin||"center center"});return{type:"element.layout.update",slideId:M.id,elementId:L,previousStyle:ue,nextStyle:ae,timestamp:Date.now()}}).filter(L=>!!L);return zd(M.id,G,g),!0},j=V=>{var B;const F=T.current,M=C.current;if(!F||!M.length)return!1;const N=(B=o.current)==null?void 0:B.contentDocument,H=M.map(G=>{const _=N?Xe(N,G):null;if(!_)return null;const L=Xo(_),Z=Number.parseInt(L.zIndex||"",10),oe=Number.isFinite(Z)?Z:0,ue=V==="front"?999:V==="back"?0:Math.max(0,oe+(V==="forward"?1:-1)),me=ad({...L,zIndex:String(ue)});return me.zIndex===L.zIndex?null:{type:"element.layout.update",slideId:F.id,elementId:G,previousStyle:L,nextStyle:me,timestamp:Date.now()}}).filter(G=>!!G);return zd(F.id,H,g)},I=V=>{if(V.defaultPrevented||z.current)return;const F=V.key.toLowerCase(),M=V.metaKey||V.ctrlKey,N=M&&!V.shiftKey&&F==="z",H=M&&(V.shiftKey&&F==="z"||F==="y"),B=C5(V.target);let G=!1;if(N&&A.current)p(),G=!0;else if(H&&R.current)S(),G=!0;else{if(B)return;M&&!V.shiftKey&&F==="c"?G=Y():M&&!V.shiftKey&&F==="x"?G=Y()&&ne():M&&!V.shiftKey&&F==="v"?G=q():M&&!V.shiftKey&&F==="d"?G=Y()&&q():V.key==="Backspace"||V.key==="Delete"?G=ne():V.key==="Escape"?G=D.current():V.key in O0?G=P(V):M&&V.key==="]"?G=j(V.shiftKey?"front":"forward"):M&&V.key==="["&&(G=j(V.shiftKey?"back":"backward"))}G&&(V.preventDefault(),V.stopPropagation())},$=(ee=o.current)==null?void 0:ee.contentDocument,fe=(re=o.current)==null?void 0:re.contentWindow;return window.addEventListener("keydown",I),fe==null||fe.addEventListener("keydown",I),$==null||$.addEventListener("keydown",I),()=>{window.removeEventListener("keydown",I),fe==null||fe.removeEventListener("keydown",I),$==null||$.removeEventListener("keydown",I)}},[o,g,S,b,p,s,i])}const D0="hse-editing-text-style",D5=`
382
+ [data-hse-editing="true"] {
383
+ outline: none !important;
384
+ box-shadow: none !important;
385
+ overflow: visible;
386
+ caret-color: currentColor;
387
+ white-space: pre-wrap;
388
+ user-select: text;
389
+ -webkit-user-select: text;
390
+ }
391
+
392
+ [data-hse-editing="true"]:focus,
393
+ [data-hse-editing="true"]:focus-visible {
394
+ outline: none !important;
395
+ box-shadow: none !important;
396
+ }
397
+
398
+ body[data-hse-group-scope] [data-editable] {
399
+ transition: opacity 120ms ease, filter 120ms ease;
400
+ }
401
+
402
+ body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
403
+ opacity: 0.28;
404
+ filter: blur(1.5px);
405
+ }
406
+
407
+ body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
408
+ outline: 1px solid rgba(15, 23, 42, 0.22);
409
+ outline-offset: 4px;
410
+ }
411
+ `;function j5(n){return n.closest(`[data-editable][${Te}]`)}function j0(n,l,o,i){const s=n.elementFromPoint(l,o);return s?Dd(s,i):null}function k0(n,l){const o=Array.from(n.querySelectorAll("[data-editable]"));for(const s of o)s.removeAttribute("data-hse-active-group-scope"),s.removeAttribute("data-hse-outside-group-scope");if(!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"][${Te}="${l}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const s of o)s!==i&&!i.contains(s)&&s.setAttribute("data-hse-outside-group-scope","true")}function Dd(n,l){const o=j5(n);return o?l?o.closest(`[data-editable="block"][data-group="true"][${Te}="${l}"]`)?o:null:o.closest(`[data-editable="block"][data-group="true"][${Te}]`)??o:null}function k5(n){if(n.getElementById(D0))return;const l=n.createElement("style");l.id=D0,l.textContent=D5,n.head.appendChild(l)}function L5(n){const l=n.ownerDocument.getSelection(),o=n.ownerDocument.createRange();o.selectNodeContents(n),o.collapse(!1),l==null||l.removeAllRanges(),l==null||l.addRange(o)}function H5(n){return n?[n]:[]}function B5(n,l){return n.includes(l)?n.filter(o=>o!==l):[...n,l]}function U5(n,l){return n.includes(l)?n:[l]}function I5({selectedElementIds:n,activeGroupScopeId:l}){return l?{handled:!0,nextSelection:[l],exitGroupScope:!0}:n.length?{handled:!0,nextSelection:[],exitGroupScope:!1}:{handled:!1,nextSelection:n,exitGroupScope:!1}}function G5({activeSlide:n,iframeRef:l,onCommitOperation:o,onOpenSelectionContextMenu:i}){const[s,u]=x.useState([]),[d,m]=x.useState(null),[h,g]=x.useState(null),[b,p]=x.useState(null),S=x.useRef(null),E=x.useRef(null),T=x.useRef(()=>{}),C=x.useRef(()=>{}),A=s[s.length-1]??null,R=x.useCallback(()=>{m(V=>V===null?V:null)},[]);function z(V){u(F=>{const M=typeof V=="function"?V(F[F.length-1]??null):V;return H5(M)})}const D=x.useCallback(V=>{u(F=>B5(F,V))},[]),Y=x.useCallback((V,F)=>{const M=l.current,N=M==null?void 0:M.contentDocument;if(!M||!N||S.current)return null;const H=M.getBoundingClientRect(),B=H.width>0?M.clientWidth/H.width:1,G=H.height>0?M.clientHeight/H.height:1,_=j0(N,(V-H.left)*B,(F-H.top)*G,E.current);return(_==null?void 0:_.getAttribute(Te))??null},[l]),ne=x.useCallback((V,F)=>{const M=Y(V,F);return m(N=>N===M?N:M),M},[Y]),q=x.useCallback((V,F,M)=>{const N=Y(V,F);return N?(M?D(N):u([N]),N):null},[Y,D]),P=x.useCallback((V,F)=>{const M=Y(V,F);return M?(u(N=>U5(N,M)),m(M),i==null||i(V,F),!0):!1},[Y,i]),j=x.useCallback(V=>{var H;if(!n)return;const F=(H=l.current)==null?void 0:H.contentDocument,M=F?Xe(F,V):null;if(!M||M.getAttribute("data-editable")!=="text")return;const N={slideId:n.id,elementId:V,initialText:M.textContent||""};u([V]),S.current=N,p(N)},[n,l]),I=x.useCallback(V=>{g(V),E.current=V,u([V])},[]),$=x.useCallback(()=>{const V=E.current;E.current=null,g(null),u(V?[V]:[])},[]),fe=x.useCallback(()=>{if(S.current)return!1;const V=I5({selectedElementIds:s,activeGroupScopeId:E.current});return V.handled&&(V.exitGroupScope&&(E.current=null,g(null)),u(V.nextSelection)),V.handled},[s]);function ee(V,F){const M=b;if(!n||!M||M.slideId!==n.id||M.elementId!==V){S.current=null,p(null);return}const N=M.initialText;S.current=null,p(null),F!==N&&o({type:"text.update",slideId:n.id,elementId:V,previousText:N,nextText:F,timestamp:Date.now()})}function re(){var M;const V=(M=l.current)==null?void 0:M.contentDocument,F=S.current;if(F&&V){const N=Xe(V,F.elementId);N&&(N.textContent=F.initialText)}S.current=null,p(null)}return x.useEffect(()=>{S.current=b},[b]),x.useEffect(()=>{E.current=h},[h]),x.useEffect(()=>{!n||!b||b.slideId===n.id||p(null)},[n,b]),T.current=ee,C.current=re,x.useEffect(()=>{if(!n)return;const V=l.current;if(!V)return;const F=V.contentDocument;if(!F)return;F.open(),F.write(n.htmlSource),F.close(),k5(F),k0(F,E.current);const M=H=>{const B=H.getAttribute(Te);B&&T.current(B,H.textContent||"")};F.onclick=H=>{const B=H.target;if(!(B instanceof Element)){if(S.current){const Z=Xe(F,S.current.elementId);if(Z){M(Z);return}}u([]);return}const G=S.current;if(G){R();const Z=Xe(F,G.elementId);if(Z&&!Z.contains(B)){M(Z);return}return}const _=Dd(B,E.current);if(!_){E.current||u([]);return}const L=_.getAttribute(Te);L&&(H.shiftKey||H.metaKey||H.ctrlKey?D(L):u([L]))},F.onmousemove=H=>{if(S.current){R();return}const B=j0(F,H.clientX,H.clientY,E.current),G=(B==null?void 0:B.getAttribute(Te))??null;m(_=>_===G?_:G)},F.oncontextmenu=H=>{if(S.current)return;const B=V.getBoundingClientRect(),G=B.width>0?V.clientWidth/B.width:1,_=B.height>0?V.clientHeight/B.height:1,L=B.left+H.clientX/G,Z=B.top+H.clientY/_;P(L,Z)&&(H.preventDefault(),H.stopPropagation())},F.onmouseleave=()=>{R()};const N=Array.from(F.querySelectorAll(`[data-editable][${Te}]`));for(const H of N)H.style.cursor="default",H.ondblclick=null,H.onblur=null,H.onkeydown=null,H.onclick=B=>{var L;B.stopPropagation();const G=Dd(B.target,E.current);if(E.current&&!G)return;const _=(G==null?void 0:G.getAttribute(Te))??H.getAttribute(Te);((L=S.current)==null?void 0:L.elementId)!==_&&_&&(B.shiftKey||B.metaKey||B.ctrlKey?D(_):u([_]))},H.ondblclick=B=>{const G=H.getAttribute(Te),_=S.current;if(G&&H.getAttribute("data-group")==="true"){B.preventDefault(),B.stopPropagation(),I(G);return}if(H.getAttribute("data-editable")==="text"){if(G&&_&&_.slideId===n.id&&_.elementId===G){B.stopPropagation();return}B.preventDefault(),B.stopPropagation(),G&&j(G)}}},[n,I,j,R,l,P,D]),x.useEffect(()=>{var F;const V=(F=l.current)==null?void 0:F.contentDocument;V&&k0(V,h)},[h,l]),x.useEffect(()=>{var me;const V=b;if(!V||!n||V.slideId!==n.id)return;const F=l.current,M=F==null?void 0:F.contentDocument;if(!F||!M)return;const N=M.querySelector(Hd(V.elementId));if(!N)return;const H=()=>{T.current(V.elementId,N.textContent||"")};let B=!1;const G=N.style.display,_=N.style.alignItems,L=N.style.overflow,Z=N.style.cursor,oe=(me=N.ownerDocument.defaultView)==null?void 0:me.getComputedStyle(N),ue=(oe==null?void 0:oe.display)??"";return N.setAttribute("contenteditable","plaintext-only"),N.setAttribute("spellcheck","false"),N.setAttribute("data-hse-editing","true"),N.style.cursor="text",N.style.overflow="visible",ue==="inline-flex"?(N.style.display="inline-block",N.style.alignItems="normal"):(ue==="flex"||ue==="grid"||ue==="inline-grid")&&(N.style.display="block",N.style.alignItems="normal"),N.focus(),L5(N),N.onkeydown=ae=>{if(ae.key==="Enter"&&!ae.shiftKey){ae.preventDefault(),H();return}ae.key==="Escape"&&(ae.preventDefault(),C.current())},N.onmousedown=()=>{B=!1},N.onmouseup=()=>{const ae=N.ownerDocument.getSelection(),W=ae==null?void 0:ae.anchorNode,le=ae==null?void 0:ae.focusNode,ge=W?N.contains(W):!1,we=le?N.contains(le):!1;B=!!(ae&&!ae.isCollapsed&&ge&&we)},N.onclick=ae=>{ae.stopPropagation(),B&&(ae.preventDefault(),B=!1)},N.onblur=()=>{window.setTimeout(()=>{var Ce;if(((Ce=S.current)==null?void 0:Ce.elementId)!==V.elementId)return;const ae=N.ownerDocument.getSelection(),W=ae==null?void 0:ae.anchorNode,le=ae==null?void 0:ae.focusNode,ge=N.ownerDocument.activeElement,we=!!(ae&&!ae.isCollapsed)&&!!(W&&N.contains(W))&&!!(le&&N.contains(le));ge===N||we||H()},0)},()=>{N.removeAttribute("contenteditable"),N.removeAttribute("spellcheck"),N.removeAttribute("data-hse-editing"),N.style.cursor=Z,N.style.display=G,N.style.alignItems=_,N.style.overflow=L,N.onblur=null,N.onclick=null,N.onkeydown=null,N.onmousedown=null,N.onmouseup=null}},[n,l,b]),{selectedElementId:A,selectedElementIds:s,preselectedElementId:d,activeGroupScopeId:h,isEditingText:!!(n&&(b==null?void 0:b.slideId)===n.id),setSelectedElementId:z,setSelectedElementIds:u,beginTextEditing:j,beginGroupEditingScope:I,exitGroupEditingScope:$,clearSelection:fe,clearPreselection:R,updatePointerPreselection:ne,retargetPointerSelection:q,openPointerSelectionContextMenu:P}}function Y5(n,l={}){var b;const{onSlidesChange:o}=l,[i,s]=x.useReducer(vs,n,rv),[u,d]=x.useState(((b=n[0])==null?void 0:b.id)??"");x.useEffect(()=>{var p;s({type:"history.reset",slides:n}),d(((p=n[0])==null?void 0:p.id)??"")},[n]);const m=x.useMemo(()=>i.slides.find(p=>p.id===u)??i.slides[0],[u,i.slides]),h=(m==null?void 0:m.id)??"";function g(p){var S;return p.some(E=>E.id===u)||d(((S=p[0])==null?void 0:S.id)??""),o==null||o(p),p}return{slides:i.slides,activeSlide:m,activeSlideId:h,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:p=>{const S=vs(i,{type:"history.commit",operation:p});return s({type:"history.commit",operation:p}),g(S.slides)},runUndo:()=>{const p=vs(i,{type:"history.undo"});s({type:"history.undo"}),g(p.slides)},runRedo:()=>{const p=vs(i,{type:"history.redo"});s({type:"history.redo"}),g(p.slides)}}}const V5=["-webkit-","-moz-","-ms-"],q5=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 P5(n){return V5.some(l=>n.startsWith(l))?!1:!q5.has(n)}function $5(n){const l=window.getComputedStyle(n),o=[];for(const i of Array.from(l)){if(!P5(i))continue;const s=i==="transform"&&n.style.transform?n.style.transform.trim():l.getPropertyValue(i).trim();s.length!==0&&o.push({name:i,value:s})}return o.sort((i,s)=>i.name.localeCompare(s.name))}function X5({iframeRef:n,activeSlide:l,selectedElement:o,selectedElementIds:i,preselectedElementId:s,scale:u,offsetX:d,offsetY:m,slideWidth:h,slideHeight:g}){const b=i.join("\0"),p=s??"",[S,E]=x.useState({key:"",rect:null}),[T,C]=x.useState({key:"",rect:null}),[A,R]=x.useState({key:"",rect:null}),[z,D]=x.useState([]),Y=S.key===b?S.rect:null,ne=T.key===p?T.rect:null,q=A.key===b?A.rect:null;return x.useEffect(()=>{const P=n.current,j=P==null?void 0:P.contentDocument;if(!P||!j||!l){E({key:b,rect:null}),C({key:p,rect:null}),R({key:b,rect:null}),D([]);return}const I=j.querySelector(l.rootSelector),$=i[0]?Xe(j,i[0]):I;if(!$){E({key:b,rect:null}),C({key:p,rect:null}),R({key:b,rect:null}),D([]);return}const fe=$5($);D(M=>F5(M,fe)?M:fe);const ee=I==null?void 0:I.getBoundingClientRect();let re=null;if(!i.length||!I||!ee)re=null;else{const M=i.map(N=>Xe(j,N)).filter(N=>!!N).map(N=>Hr(N.getBoundingClientRect(),ee,{scale:u,offsetX:d,offsetY:m}));M.length&&(re=M.reduce((N,H)=>{const B=Math.min(N.x,H.x),G=Math.min(N.y,H.y),_=Math.max(N.x+N.width,H.x+H.width),L=Math.max(N.y+N.height,H.y+H.height);return{x:B,y:G,width:_-B,height:L-G}}))}E(M=>Wf(M,b,re)?M:{key:b,rect:re}),R(M=>Wf(M,b,re)?M:{key:b,rect:re});const V=s?Xe(j,s):null,F=V&&ee?Hr(V.getBoundingClientRect(),ee,{scale:u,offsetX:d,offsetY:m}):null;C(M=>Wf(M,p,F)?M:{key:p,rect:F})},[l,n,d,m,s,p,u,i,b,g,h]),{selectedStageRect:Y,preselectionOverlay:ne,selectionOverlay:q,selectionLabel:(o==null?void 0:o.type)||"element",inspectedStyles:z}}function Wf(n,l,o){return n.key===l&&K5(n.rect,o)}function K5(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 F5(n,l){return n.length!==l.length?!1:n.every((o,i)=>{const s=l[i];return(s==null?void 0:s.name)===o.name&&s.value===o.value})}function Q5(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 o=document.implementation.createHTMLDocument(),i=o.createElement("base"),s=o.createElement("a");return o.head.appendChild(i),o.body.appendChild(s),l&&(i.href=l),s.href=n,s.href}const Z5=(()=>{let n=0;const l=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${l()}${n}`)})();function dl(n){const l=[];for(let o=0,i=n.length;o<i;o++)l.push(n[o]);return l}let jr=null;function n1(n={}){return jr||(n.includeStyleProperties?(jr=n.includeStyleProperties,jr):(jr=dl(window.getComputedStyle(document.documentElement)),jr))}function ec(n,l){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(l);return i?parseFloat(i.replace("px","")):0}function J5(n){const l=ec(n,"border-left-width"),o=ec(n,"border-right-width");return n.clientWidth+l+o}function W5(n){const l=ec(n,"border-top-width"),o=ec(n,"border-bottom-width");return n.clientHeight+l+o}function a1(n,l={}){const o=l.width||J5(n),i=l.height||W5(n);return{width:o,height:i}}function e3(){let n,l;try{l=process}catch{}const o=l&&l.env?l.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const gn=16384;function t3(n){(n.width>gn||n.height>gn)&&(n.width>gn&&n.height>gn?n.width>n.height?(n.height*=gn/n.width,n.width=gn):(n.width*=gn/n.height,n.height=gn):n.width>gn?(n.height*=gn/n.width,n.width=gn):(n.width*=gn/n.height,n.height=gn))}function tc(n){return new Promise((l,o)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>l(i))})},i.onerror=o,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function n3(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(l=>`data:image/svg+xml;charset=utf-8,${l}`)}async function a3(n,l,o){const i="http://www.w3.org/2000/svg",s=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return s.setAttribute("width",`${l}`),s.setAttribute("height",`${o}`),s.setAttribute("viewBox",`0 0 ${l} ${o}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),s.appendChild(u),u.appendChild(n),n3(s)}const rn=(n,l)=>{if(n instanceof l)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===l.name||rn(o,l)};function l3(n){const l=n.getPropertyValue("content");return`${n.cssText} content: '${l.replace(/'|"/g,"")}';`}function r3(n,l){return n1(l).map(o=>{const i=n.getPropertyValue(o),s=n.getPropertyPriority(o);return`${o}: ${i}${s?" !important":""};`}).join(" ")}function o3(n,l,o,i){const s=`.${n}:${l}`,u=o.cssText?l3(o):r3(o,i);return document.createTextNode(`${s}{${u}}`)}function L0(n,l,o,i){const s=window.getComputedStyle(n,o),u=s.getPropertyValue("content");if(u===""||u==="none")return;const d=Z5();try{l.className=`${l.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(o3(d,o,s,i)),l.appendChild(m)}function i3(n,l,o){L0(n,l,":before",o),L0(n,l,":after",o)}const H0="application/font-woff",B0="image/jpeg",s3={woff:H0,woff2:H0,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:B0,jpeg:B0,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function c3(n){const l=/\.([^./]*?)$/g.exec(n);return l?l[1]:""}function vm(n){const l=c3(n).toLowerCase();return s3[l]||""}function u3(n){return n.split(/,/)[1]}function jd(n){return n.search(/^(data:)/)!==-1}function f3(n,l){return`data:${l};base64,${n}`}async function l1(n,l,o){const i=await fetch(n,l);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const s=await i.blob();return new Promise((u,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{u(o({res:i,result:m.result}))}catch(h){d(h)}},m.readAsDataURL(s)})}const ed={};function d3(n,l,o){let i=n.replace(/\?.*/,"");return o&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),l?`[${l}]${i}`:i}async function bm(n,l,o){const i=d3(n,l,o.includeQueryParams);if(ed[i]!=null)return ed[i];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let s;try{const u=await l1(n,o.fetchRequestInit,({res:d,result:m})=>(l||(l=d.headers.get("Content-Type")||""),u3(m)));s=f3(u,l)}catch(u){s=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return ed[i]=s,s}async function m3(n){const l=n.toDataURL();return l==="data:,"?n.cloneNode(!1):tc(l)}async function h3(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 tc(m)}const o=n.poster,i=vm(o),s=await bm(o,i,l);return tc(s)}async function p3(n,l){var o;try{if(!((o=n==null?void 0:n.contentDocument)===null||o===void 0)&&o.body)return await hc(n.contentDocument.body,l,!0)}catch{}return n.cloneNode(!1)}async function g3(n,l){return rn(n,HTMLCanvasElement)?m3(n):rn(n,HTMLVideoElement)?h3(n,l):rn(n,HTMLIFrameElement)?p3(n,l):n.cloneNode(r1(n))}const y3=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",r1=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function v3(n,l,o){var i,s;if(r1(l))return l;let u=[];return y3(n)&&n.assignedNodes?u=dl(n.assignedNodes()):rn(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=dl(n.contentDocument.body.childNodes):u=dl(((s=n.shadowRoot)!==null&&s!==void 0?s:n).childNodes),u.length===0||rn(n,HTMLVideoElement)||await u.reduce((d,m)=>d.then(()=>hc(m,o)).then(h=>{h&&l.appendChild(h)}),Promise.resolve()),l}function b3(n,l,o){const i=l.style;if(!i)return;const s=window.getComputedStyle(n);s.cssText?(i.cssText=s.cssText,i.transformOrigin=s.transformOrigin):n1(o).forEach(u=>{let d=s.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),rn(n,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&l.getAttribute("d")&&(d=`path(${l.getAttribute("d")})`),i.setProperty(u,d,s.getPropertyPriority(u))})}function x3(n,l){rn(n,HTMLTextAreaElement)&&(l.innerHTML=n.value),rn(n,HTMLInputElement)&&l.setAttribute("value",n.value)}function S3(n,l){if(rn(n,HTMLSelectElement)){const i=Array.from(l.children).find(s=>n.value===s.getAttribute("value"));i&&i.setAttribute("selected","")}}function w3(n,l,o){return rn(l,Element)&&(b3(n,l,o),i3(n,l,o),x3(n,l),S3(n,l)),l}async function E3(n,l){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const i={};for(let u=0;u<o.length;u++){const m=o[u].getAttribute("xlink:href");if(m){const h=n.querySelector(m),g=document.querySelector(m);!h&&g&&!i[m]&&(i[m]=await hc(g,l,!0))}}const s=Object.values(i);if(s.length){const u="http://www.w3.org/1999/xhtml",d=document.createElementNS(u,"svg");d.setAttribute("xmlns",u),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const m=document.createElementNS(u,"defs");d.appendChild(m);for(let h=0;h<s.length;h++)m.appendChild(s[h]);n.appendChild(d)}return n}async function hc(n,l,o){return!o&&l.filter&&!l.filter(n)?null:Promise.resolve(n).then(i=>g3(i,l)).then(i=>v3(n,i,l)).then(i=>w3(n,i,l)).then(i=>E3(i,l))}const o1=/url\((['"]?)([^'"]+?)\1\)/g,T3=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,C3=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function M3(n){const l=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${l})(['"]?\\))`,"g")}function A3(n){const l=[];return n.replace(o1,(o,i,s)=>(l.push(s),o)),l.filter(o=>!jd(o))}async function _3(n,l,o,i,s){try{const u=o?Q5(l,o):l,d=vm(l);let m;return s||(m=await bm(u,d,i)),n.replace(M3(l),`$1${m}$3`)}catch{}return n}function R3(n,{preferredFontFormat:l}){return l?n.replace(C3,o=>{for(;;){const[i,,s]=T3.exec(o)||[];if(!s)return"";if(s===l)return`src: ${i};`}}):n}function i1(n){return n.search(o1)!==-1}async function s1(n,l,o){if(!i1(n))return n;const i=R3(n,o);return A3(i).reduce((u,d)=>u.then(m=>_3(m,d,l,o)),Promise.resolve(i))}async function kr(n,l,o){var i;const s=(i=l.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(s){const u=await s1(s,null,o);return l.style.setProperty(n,u,l.style.getPropertyPriority(n)),!0}return!1}async function N3(n,l){await kr("background",n,l)||await kr("background-image",n,l),await kr("mask",n,l)||await kr("-webkit-mask",n,l)||await kr("mask-image",n,l)||await kr("-webkit-mask-image",n,l)}async function O3(n,l){const o=rn(n,HTMLImageElement);if(!(o&&!jd(n.src))&&!(rn(n,SVGImageElement)&&!jd(n.href.baseVal)))return;const i=o?n.src:n.href.baseVal,s=await bm(i,vm(i),l);await new Promise((u,d)=>{n.onload=u,n.onerror=l.onImageErrorHandler?(...h)=>{try{u(l.onImageErrorHandler(...h))}catch(g){d(g)}}:d;const m=n;m.decode&&(m.decode=u),m.loading==="lazy"&&(m.loading="eager"),o?(n.srcset="",n.src=s):n.href.baseVal=s})}async function z3(n,l){const i=dl(n.childNodes).map(s=>c1(s,l));await Promise.all(i).then(()=>n)}async function c1(n,l){rn(n,Element)&&(await N3(n,l),await O3(n,l),await z3(n,l))}function D3(n,l){const{style:o}=n;l.backgroundColor&&(o.backgroundColor=l.backgroundColor),l.width&&(o.width=`${l.width}px`),l.height&&(o.height=`${l.height}px`);const i=l.style;return i!=null&&Object.keys(i).forEach(s=>{o[s]=i[s]}),n}const U0={};async function I0(n){let l=U0[n];if(l!=null)return l;const i=await(await fetch(n)).text();return l={url:n,cssText:i},U0[n]=l,l}async function G0(n,l){let o=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(i,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),l1(m,l.fetchRequestInit,({result:h})=>(o=o.replace(d,`url(${h})`),[d,h]))});return Promise.all(u).then(()=>o)}function Y0(n){if(n==null)return[];const l=[],o=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(o,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const h=s.exec(i);if(h===null)break;l.push(h[0])}i=i.replace(s,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",m=new RegExp(d,"gi");for(;;){let h=u.exec(i);if(h===null){if(h=m.exec(i),h===null)break;u.lastIndex=m.lastIndex}else m.lastIndex=u.lastIndex;l.push(h[0])}return l}async function j3(n,l){const o=[],i=[];return n.forEach(s=>{if("cssRules"in s)try{dl(s.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let m=d+1;const h=u.href,g=I0(h).then(b=>G0(b,l)).then(b=>Y0(b).forEach(p=>{try{s.insertRule(p,p.startsWith("@import")?m+=1:s.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:p,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];s.href!=null&&i.push(I0(s.href).then(m=>G0(m,l)).then(m=>Y0(m).forEach(h=>{d.insertRule(h,d.cssRules.length)})).catch(m=>{console.error("Error loading remote stylesheet",m)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(n.forEach(s=>{if("cssRules"in s)try{dl(s.cssRules||[]).forEach(u=>{o.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${s.href}`,u)}}),o))}function k3(n){return n.filter(l=>l.type===CSSRule.FONT_FACE_RULE).filter(l=>i1(l.style.getPropertyValue("src")))}async function L3(n,l){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=dl(n.ownerDocument.styleSheets),i=await j3(o,l);return k3(i)}function u1(n){return n.trim().replace(/["']/g,"")}function H3(n){const l=new Set;function o(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{l.add(u1(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&o(u)})}return o(n),l}async function B3(n,l){const o=await L3(n,l),i=H3(n);return(await Promise.all(o.filter(u=>i.has(u1(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return s1(u.cssText,d,l)}))).join(`
412
+ `)}async function U3(n,l){const o=l.fontEmbedCSS!=null?l.fontEmbedCSS:l.skipFonts?null:await B3(n,l);if(o){const i=document.createElement("style"),s=document.createTextNode(o);i.appendChild(s),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function I3(n,l={}){const{width:o,height:i}=a1(n,l),s=await hc(n,l,!0);return await U3(s,l),await c1(s,l),D3(s,l),await a3(s,o,i)}async function G3(n,l={}){const{width:o,height:i}=a1(n,l),s=await I3(n,l),u=await tc(s),d=document.createElement("canvas"),m=d.getContext("2d"),h=l.pixelRatio||e3(),g=l.canvasWidth||o,b=l.canvasHeight||i;return d.width=g*h,d.height=b*h,l.skipAutoScale||t3(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 Y3(n,l={}){return(await G3(n,l)).toDataURL()}const V0=224,V3=2;function q3(n){return new Promise(l=>{window.setTimeout(l,n)})}async function P3(n){var l;if((l=n.fonts)!=null&&l.ready)try{await n.fonts.ready}catch{}}async function $3(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 o=l.contentDocument;if(!o)throw new Error("Unable to access thumbnail iframe document.");o.open(),o.write(n.htmlSource),o.close(),await P3(o),await q3(50);const i=o.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const s=o.body??i;return await Y3(s,{cacheBust:!0,pixelRatio:V3,canvasWidth:V0,canvasHeight:Math.round(n.height/n.width*V0),backgroundColor:"white",skipFonts:!1})}finally{l.remove()}}const X3=300;function K3(n){const[l,o]=x.useState({}),i=x.useRef(new Map),s=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 h of n){const g=`${h.id}:${h.htmlSource}`,b=i.current.get(g);if(b){m[h.id]=b;continue}try{const p=await $3(h);i.current.set(g,p),m[h.id]=p}catch{}if(u)return}u||o(h=>({...h,...m}))},X3);return()=>{u=!0,window.clearTimeout(d)}},[n]),x.useEffect(()=>{const u=new Set(s.map(d=>d.key));for(const d of i.current.keys())u.has(d)||i.current.delete(d)},[s]),l}function F3({stageViewportRef:n,slideWidth:l,slideHeight:o}){const[i,s]=x.useState({width:0,height:0});x.useEffect(()=>{const g=n.current;if(!g)return;const b=()=>{const S=g.getBoundingClientRect();s(E=>E.width===S.width&&E.height===S.height?E:{width:S.width,height:S.height})};b();const p=new ResizeObserver(()=>{b()});return p.observe(g),()=>{p.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/l:1,i.height>0?i.height/o:1),d=Number.isFinite(u)&&u>0?u:1,m=l*d,h=o*d;return{scale:d,offsetX:Math.max((i.width-m)/2,0),offsetY:Math.max((i.height-h)/2,0)}}function Q3({slides:n,deckTitle:l,isSaving:o=!1,onSlidesChange:i,onDeckTitleChange:s,onExportPdf:u,onExportHtml:d}){const{slides:m,activeSlide:h,activeSlideId:g,undoDepth:b,redoDepth:p,setActiveSlideId:S,commitOperation:E,runUndo:T,runRedo:C}=Y5(n,{onSlidesChange:i}),A=x.useRef(null),R=x.useRef(null),z=x.useRef(null),D=x.useRef(null),Y=x.useRef(null),[ne,q]=x.useState(!1),P=K3(m),j=x.useCallback((Q,de)=>{const he=D.current;he&&he.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Q,clientY:de,button:2,buttons:2}))},[]),{selectedElementId:I,selectedElementIds:$,preselectedElementId:fe,isEditingText:ee,activeGroupScopeId:re,setSelectedElementId:V,setSelectedElementIds:F,beginTextEditing:M,beginGroupEditingScope:N,clearSelection:H,clearPreselection:B,updatePointerPreselection:G,retargetPointerSelection:_}=G5({activeSlide:h,iframeRef:A,onCommitOperation:E,onOpenSelectionContextMenu:j}),L=h==null?void 0:h.elements.find(Q=>Q.id===I),Z=h==null?void 0:h.elements.find(Q=>Q.id===re),oe=$.length>1?"multi":(L==null?void 0:L.type)??(Z==null?void 0:Z.type)??"block",ue=h?$.map(Q=>h.elements.find(de=>de.id===Q)).filter(Q=>!!Q):[],me={group:$.length>=2&&ue.length===$.length,ungroup:$.length===1&&!!((L==null?void 0:L.type)==="group"||h&&I&&Z3(h.htmlSource,I))},ae=!!re&&$.length===1&&I===re,W=l??"",le=(h==null?void 0:h.width)||Vl,ge=(h==null?void 0:h.height)||ql,{scale:we,offsetX:Ce,offsetY:Ge}=F3({stageViewportRef:R,slideWidth:le,slideHeight:ge}),{selectedStageRect:Ye,preselectionOverlay:qt,selectionOverlay:Bt,inspectedStyles:Nt}=X5({iframeRef:A,activeSlide:h,selectedElement:L,selectedElementIds:$,preselectedElementId:fe,scale:we,offsetX:Ce,offsetY:Ge,slideWidth:le,slideHeight:ge}),{manipulationOverlay:ze,isManipulating:be,suppressBackgroundClear:on,beginMove:Qt,beginResize:ft,beginRotate:xn}=S5({activeSlide:h,selectedElement:L,selectedElementId:I,selectedElementIds:$,selectedStageRect:Ye,iframeRef:A,stageGeometry:{scale:we,offsetX:Ce,offsetY:Ge,slideWidth:le,slideHeight:ge},isEditingText:ee,onCommitOperation:E}),dt=(ze==null?void 0:ze.selectionBounds)??Bt,Pt=I??"slide-root",Ot={locked:h?$o(h,Pt,"data-editor-locked"):"",altText:h?$o(h,Pt,"alt"):"",ariaLabel:h?$o(h,Pt,"aria-label"):"",linkUrl:h?$o(h,Pt,"data-link-url"):""};function oa(Q,de){if(!h)return;const he=JN({elementId:Pt,nextValue:de,propertyName:Q,slide:h});he&&E(he)}function Ln(Q,de){if(!h)return;const he=WN({attributeName:Q,elementId:Pt,nextValue:de,slide:h});he&&E(he)}function $n(Q){if(!h||$.length===0)return;const de=$.map(he=>{const ye=Rd(h,he,"z-index"),Ne=Number.parseInt(ye,10),He=Number.isFinite(Ne)?Ne:0,$e=Q==="front"?"999":Q==="back"?"0":String(Math.max(0,He+(Q==="forward"?1:-1)));return ye===$e?null:{type:"style.update",slideId:h.id,elementId:he,propertyName:"z-index",previousValue:ye,nextValue:$e,timestamp:Date.now()}}).filter(he=>!!he);Ut(de)}function Ut(Q){!h||Q.length===0||E(Q.length===1?Q[0]:{type:"operation.batch",slideId:h.id,operations:Q,timestamp:Date.now()})}function Hn(Q,de,he){var $e;const ye={[de]:he},He=($e=new DOMParser().parseFromString(`<template>${Q}</template>`,"text/html").querySelector("template"))==null?void 0:$e.content.firstElementChild;if(!(He instanceof HTMLElement))return ye;for(const st of He.querySelectorAll(`[${Te}]`)){const mt=st.getAttribute(Te);mt&&(ye[mt]=`${he}-${mt}`)}return ye}function Zt(){var $e;if(!h||$.length===0)return;const Q=($e=A.current)==null?void 0:$e.contentDocument,de=Q==null?void 0:Q.querySelector(h.rootSelector),he=de==null?void 0:de.getBoundingClientRect();let ye=h.htmlSource;const Ne=[],He=$.map(st=>{const mt=Gs(h.htmlSource,st),vt=Is(h.htmlSource,st),je=Q?Xe(Q,st):null;if(!mt||!vt||!je||!he)return null;const lt=od(ye,`${st}-copy`),jt=ev(mt,Hn(mt,st,lt)),bt=Nd(Wx(je.getBoundingClientRect(),he),24,24),ca=Jx(jt,bt);return ye=`${ye}
413
+ <!-- ${lt} reserved -->`,Ne.push(lt),{type:"element.insert",slideId:h.id,elementId:lt,...vt,html:ca,timestamp:Date.now()}}).filter(st=>!!st);Ut(He),Ne.length&&F(Ne)}function ia(){if(!h||$.length===0)return;const Q=$.map(de=>{const he=Gs(h.htmlSource,de),ye=Is(h.htmlSource,de);return!he||!ye?null:{type:"element.remove",slideId:h.id,elementId:de,...ye,html:he,timestamp:Date.now()}}).filter(de=>!!de);Ut(Q),Q.length&&F([])}function At(Q){if(!h||m.length===0)return;const de=E2(m,Q);E({type:"slide.create",slide:de,index:Q,timestamp:Date.now()}),S(de.id),H()}function sn(){if(!h)return;const Q=m.findIndex(he=>he.id===h.id),de=Q>=0?Q+1:m.length;At(de)}function zt(Q){const de=m.findIndex(he=>he.id===Q);de<0||At(de)}function Zr(Q){const de=m.findIndex(he=>he.id===Q);de<0||At(de+1)}function xl(Q){const de=m.find(He=>He.id===Q);if(!de)return;const he=m.findIndex(He=>He.id===Q),ye=he>=0?he+1:m.length,Ne=T2(m,de);E({type:"slide.duplicate",sourceSlideId:Q,slide:Ne,index:ye,timestamp:Date.now()}),S(Ne.id),H()}function Sn(Q){if(m.length<=1)return;const de=m.findIndex(Ne=>Ne.id===Q),he=m[de];if(!he)return;const ye=m[de+1]??m[de-1]??m[0];E({type:"slide.delete",slide:he,index:de,timestamp:Date.now()}),g===Q&&S((ye==null?void 0:ye.id)??""),H()}function ja(Q){const de=m.find(he=>he.id===Q);de&&E({type:"slide.visibility.update",slideId:Q,previousHidden:de.hidden===!0,nextHidden:de.hidden!==!0,timestamp:Date.now()})}function ka(Q,de){const he=m.find(Ne=>Ne.id===Q),ye=de.trim()||"Untitled Slide";!he||he.title===ye||E({type:"slide.title.update",slideId:Q,previousTitle:he.title,nextTitle:ye,timestamp:Date.now()})}function sa(Q,de){const he=m.findIndex(ye=>ye.id===Q);he<0||he===de||(E({type:"slide.reorder",slideId:Q,fromIndex:he,toIndex:de,timestamp:Date.now()}),S(Q))}function wn(){if(!h||$.length<2)return;const Q=Re(),de=od(h.htmlSource,"group-1"),he=d2({html:h.htmlSource,slideId:h.id,groupElementId:de,elementRects:Q,elementIds:$});he&&(E(he),F([de]))}function Re(Q){var vt;const de=(vt=A.current)==null?void 0:vt.contentDocument,he=de==null?void 0:de.querySelector((h==null?void 0:h.rootSelector)??"");if(!de||!he)return{};const ye=he.getBoundingClientRect(),Ne=h?h.width/ye.width:1,He=h?h.height/ye.height:1,$e={},st=q0(de,Q),mt=[...Array.from(de.querySelectorAll(`[data-editable][${Te}]`)),...Array.from(st.keys())];for(const je of mt){const lt=je.getAttribute(Te)||st.get(je);if(!lt)continue;const jt=je.getBoundingClientRect(),bt=je.parentElement,ca=bt!=null&&bt.hasAttribute("data-editable")&&bt.getAttribute(Te)?bt.getAttribute(Te):null,kt=ca?$e[ca]??{x:0,y:0,width:ye.width,height:ye.height}:{x:0,y:0,width:ye.width,height:ye.height};$e[lt]={x:(jt.left-ye.left)*Ne-kt.x,y:(jt.top-ye.top)*He-kt.y,width:jt.width*Ne,height:jt.height*He}}return $e}function ot(){if(!h||$.length!==1||!I)return;const Q=m2({html:h.htmlSource,slideId:h.id,groupElementId:I,elementRects:Re(I),elementPresentationStyles:wt(I)});Q&&(E(Q),F(Q.childElementIds))}function wt(Q){var He,$e,st;const de=(He=A.current)==null?void 0:He.contentDocument;if(!de)return{};const he=Xe(de,Q);if(!he||he.getAttribute("data-group")==="true")return{};const ye={},Ne=q0(de,Q);for(const mt of Array.from(he.children)){if(!mt.hasAttribute("data-editable")&&!xm(mt))continue;const vt=mt.getAttribute(Te)||Ne.get(mt),je=($e=mt.ownerDocument.defaultView)==null?void 0:$e.getComputedStyle(mt);if(!(!vt||!je)){ye[vt]={color:je.color,fontSize:je.fontSize,fontWeight:je.fontWeight,fontStyle:je.fontStyle,lineHeight:je.lineHeight,textAlign:je.textAlign,paddingTop:je.paddingTop,paddingRight:je.paddingRight,paddingBottom:je.paddingBottom,paddingLeft:je.paddingLeft,listStylePosition:je.listStylePosition,listStyleType:je.listStyleType};for(const lt of Array.from(mt.querySelectorAll(`[data-editable][${Te}]`))){const jt=lt.getAttribute(Te),bt=(st=lt.ownerDocument.defaultView)==null?void 0:st.getComputedStyle(lt);!jt||!bt||(ye[jt]={color:bt.color,fontSize:bt.fontSize,fontWeight:bt.fontWeight,fontStyle:bt.fontStyle,lineHeight:bt.lineHeight,textAlign:bt.textAlign})}}}return ye}function Dt(Q){if(!h||!I||!dt)return;const de=Rd(h,I,"transform"),he={x:(dt.x-Ce)/we,y:(dt.y-Ge)/we,width:dt.width/we,height:dt.height/we};let ye=0,Ne=0;if(Q==="left"?ye=-he.x:Q==="hcenter"?ye=le/2-(he.x+he.width/2):Q==="right"?ye=le-(he.x+he.width):Q==="top"?Ne=-he.y:Q==="vcenter"?Ne=ge/2-(he.y+he.height/2):Q==="bottom"&&(Ne=ge-(he.y+he.height)),Math.abs(ye)<.01&&Math.abs(Ne)<.01)return;const He=Vn(de);oa("transform",Na(He.translateX+ye,He.translateY+Ne,He.rotate)??"")}function Xn(Q){var ca;if(!h||$.length<3)return;const de=(ca=A.current)==null?void 0:ca.contentDocument,he=de==null?void 0:de.querySelector(h.rootSelector),ye=he==null?void 0:he.getBoundingClientRect();if(!de||!ye)return;const Ne=$.map(kt=>{const Kn=Xe(de,kt);if(!Kn)return null;const En=Kn.getBoundingClientRect();return{elementId:kt,node:Kn,rect:{x:En.left-ye.left,y:En.top-ye.top,width:En.width,height:En.height}}}).filter(kt=>!!kt);if(Ne.length<3)return;const He=Q==="vertical"?"y":"x",$e=Q==="vertical"?"height":"width",st=[...Ne].sort((kt,Kn)=>kt.rect[He]-Kn.rect[He]),mt=st[0],vt=st[st.length-1];if(!mt||!vt)return;const je=mt.rect[He]+mt.rect[$e]/2,jt=(vt.rect[He]+vt.rect[$e]/2-je)/(st.length-1),bt=st.map((kt,Kn)=>{const En=je+jt*Kn,Jr=kt.rect[He]+kt.rect[$e]/2,Fn=En-Jr;if(Math.abs(Fn)<.01)return null;const Bn=Xo(kt.node),ua=Vn(Bn.transform),La=ad({...Bn,transform:Na(ua.translateX+(He==="x"?Fn:0),ua.translateY+(He==="y"?Fn:0),ua.rotate),transformOrigin:Bn.transformOrigin||"center center"});return{type:"element.layout.update",slideId:h.id,elementId:kt.elementId,previousStyle:Bn,nextStyle:La,timestamp:Date.now()}}).filter(kt=>!!kt);Ut(bt)}return z5({activeSlide:h,selectedElementIds:$,iframeRef:A,slideWidth:le,slideHeight:ge,isEditingText:ee,canUndo:b>0,canRedo:p>0,onCommitOperation:E,onSelectElementIds:F,onEscapeSelection:H,onUndo:T,onRedo:C}),h?v.jsx(ZN,{children:v.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[v.jsxs("div",{className:`flex min-h-0 flex-auto flex-col ${ne?"invisible pointer-events-none absolute inset-0":""}`,children:[v.jsx(BT,{title:W,onTitleChange:s,isSaving:o,onPresent:()=>{H(),q(!0)},onExportHtml:d,pdfSlides:m.map(Q=>({id:Q.id,title:Q.title,file:Q.sourceFile})),pdfThumbnails:P,onExportPdf:u}),v.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[v.jsx(aN,{slides:m,activeSlideId:h.id,slideCount:m.length,thumbnails:P,onSelectSlide:Q=>{S(Q),V(null)},onAdd:sn,onAddSlideAbove:zt,onAddSlideBelow:Zr,onDuplicate:xl,onDelete:Sn,onToggleHidden:ja,onRename:ka,onReorder:sa}),v.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:v.jsx(FN,{slideWidth:le,slideHeight:ge,offsetX:Ce,offsetY:Ge,scale:we,preselectionOverlay:qt,selectionOverlay:dt,toolbarKey:$.length?`${h.id}:${$.join(",")}`:null,inspectedStyles:Nt,selectedElementType:oe,selectionCommandAvailability:me,groupScopeOverlayPassive:ae,isEditingText:ee,manipulationOverlay:ze,iframeRef:A,stageViewportRef:R,selectionOverlayRef:z,selectionContextMenuTriggerRef:D,isManipulating:be,onSelectionOverlayMouseDown:Q=>{if(Q.button!==0||!$.length)return;const de=Q.shiftKey||Q.metaKey||Q.ctrlKey,he=G(Q.clientX,Q.clientY);if(Y.current={clientX:Q.clientX,clientY:Q.clientY,additive:de,targetElementId:he},he&&he!==I){Q.stopPropagation();return}he&&he===I&&Q.stopPropagation(),Qt({clientX:Q.clientX,clientY:Q.clientY,preventDefault:()=>Q.preventDefault(),stopPropagation:()=>Q.stopPropagation()})},onSelectionOverlayMouseMove:Q=>{const de=Y.current;if(G(Q.clientX,Q.clientY),!de||de.targetElementId===I)return;const he=Q.clientX-de.clientX,ye=Q.clientY-de.clientY;Math.hypot(he,ye)<=4||(Y.current=null,Qt({clientX:de.clientX,clientY:de.clientY,preventDefault:()=>Q.preventDefault(),stopPropagation:()=>Q.stopPropagation()}))},onSelectionOverlayContextMenu:Q=>{Q.preventDefault(),Q.stopPropagation(),j(Q.clientX,Q.clientY)},onSelectionOverlayMouseUp:Q=>{const de=Y.current;if(Y.current=null,!de)return;const he=Q.clientX-de.clientX,ye=Q.clientY-de.clientY;Math.hypot(he,ye)>4||_(Q.clientX,Q.clientY,de.additive)},onStageMouseLeave:B,onResizeHandleMouseDown:(Q,de)=>{$.length&&ft(Q,{clientX:de.clientX,clientY:de.clientY,preventDefault:()=>de.preventDefault(),stopPropagation:()=>de.stopPropagation()})},onRotateHandleMouseDown:Q=>{$.length===1&&xn({clientX:Q.clientX,clientY:Q.clientY,preventDefault:()=>Q.preventDefault(),stopPropagation:()=>Q.stopPropagation()})},onSelectionOverlayDoubleClick:Q=>{var de;if(re&&((de=A.current)!=null&&de.contentDocument)){const he=A.current.getBoundingClientRect(),Ne=A.current.contentDocument.elementFromPoint(Q.clientX-he.left,Q.clientY-he.top),He=Ne==null?void 0:Ne.closest(`[data-editable][${Te}]`);if((He==null?void 0:He.getAttribute("data-editable"))==="text"){const $e=He.getAttribute(Te);if($e){M($e);return}}}if($.length===1&&(L==null?void 0:L.type)==="text"&&I){M(I);return}$.length===1&&(L==null?void 0:L.type)==="group"&&I&&N(I)},onBackgroundClick:()=>{on||H()},onStyleChange:oa,onAttributeChange:Ln,onAlignToSlide:Dt,onDistribute:Xn,onGroup:wn,onLayerOrder:$n,onUngroup:ot,onDuplicate:Zt,onDelete:ia,attributeValues:Ot})})]})]}),ne?v.jsx(nN,{slides:m,startSlideId:h.id,onExit:()=>q(!1)}):null]})}):v.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}function Z3(n,l){if(typeof DOMParser>"u")return!1;const o=new DOMParser().parseFromString(n,"text/html"),i=Xe(o,l);return!i||i.getAttribute("data-editable")!=="block"?!1:Array.from(i.children).some(s=>s instanceof HTMLElement&&(s.hasAttribute("data-editable")||xm(s)))}function q0(n,l){const o=new Map;if(!l)return o;const i=Xe(n,l);if(!i||i.getAttribute("data-group")==="true")return o;const s=new Set(Array.from(n.querySelectorAll(`[${Te}]`)).map(d=>d.getAttribute(Te)).filter(d=>!!d)),u=d=>{if(!s.has(d))return s.add(d),d;const m=d.match(/^(.*?)(?:-(\d+))?$/),h=(m==null?void 0:m[1])||d;let g=Number.parseInt((m==null?void 0:m[2])||"1",10)+1;for(;s.has(`${h}-${g}`);)g+=1;const b=`${h}-${g}`;return s.add(b),b};for(const d of Array.from(i.children))xm(d)&&o.set(d,d.getAttribute(Te)||u("block-1"));return o}function xm(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}const J3="/deck/manifest.json",W3="/__editor/save-generated-deck",eO="/__editor/export-pdf",tO="/__editor/export-html",td=800;function nO(){const[n,l]=x.useState("Generated deck"),[o,i]=x.useState([]),[s,u]=x.useState(null),[d,m]=x.useState(!0),[h,g]=x.useState(!1),b=x.useRef(null),p=x.useRef([]),S=x.useRef(null),E=x.useRef(null),T=x.useRef(null),C=x.useRef(0),A=x.useRef(!1),R=x.useRef(null),z=x.useRef(Date.now());x.useEffect(()=>{let j=!1;return M2({manifestUrl:`${J3}?v=${Date.now()}`}).then(I=>{if(j)return;if(!I){l("Generated deck"),i([]),u("No slides were found at /deck/manifest.json."),m(!1);return}b.current=I.manifest;const $=I.manifest.topic||"Generated deck";E.current=$,l($),i(I.slides),p.current=I.slides,u(null),m(!1)}).catch(()=>{j||(l("Generated deck"),i([]),u("The app could not load the generated deck."),m(!1))}),()=>{j=!0,T.current&&window.clearTimeout(T.current)}},[]);const D=async()=>{var F;const j=b.current,I=S.current??p.current,$=E.current??n,fe=C.current;if(!((F=j==null?void 0:j.slides)!=null&&F.length)||!(I!=null&&I.length))return;if(A.current){await R.current,C.current!==fe&&await D();return}A.current=!0;const ee=new Map(p.current.map((M,N)=>{var H,B;return[M.id,M.sourceFile??((B=(H=j.slides)==null?void 0:H[N])==null?void 0:B.file)]})),re=I.flatMap(M=>{const N=M.sourceFile??ee.get(M.id);return N?[{file:N,title:M.title,hidden:M.hidden===!0?!0:void 0}]:[]}),V=fetch(W3,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:z.current,manifest:{...j,topic:$,slides:re},slides:I.map(M=>({file:M.sourceFile??ee.get(M.id),htmlSource:M.htmlSource,title:M.title,hidden:M.hidden===!0}))})}).then(M=>{if(!M.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(M=>{throw u("The app could not write generated slides back to disk."),M}).finally(()=>{if(A.current=!1,R.current=null,C.current!==fe){T.current||(T.current=window.setTimeout(()=>{T.current=null,D()},td));return}g(!1)});R.current=V,await V};return{deckTitle:n,slides:o,errorMessage:s,isLoading:d,isSaving:h,saveSlides:j=>{var $;if(p.current===j)return;const I=b.current;($=I==null?void 0:I.slides)!=null&&$.length&&(p.current=j,S.current=j,C.current+=1,g(!0),T.current&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,D()},td))},saveDeckTitle:j=>{const I=j.trim()||"Untitled deck";l(j),E.current=I,C.current+=1,g(!0),T.current&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,D()},td)},exportPdf:async j=>{T.current&&(window.clearTimeout(T.current),T.current=null),await D();const I=await fetch(eO,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:j})});if(!I.ok)throw new Error(await I.text());const $=await I.blob(),fe=URL.createObjectURL($),ee=document.createElement("a"),re=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";ee.href=fe,ee.download=`${re}.pdf`,document.body.appendChild(ee),ee.click(),ee.remove(),URL.revokeObjectURL(fe)},exportHtml:async()=>{T.current&&(window.clearTimeout(T.current),T.current=null),await D();const j=await fetch(tO,{method:"POST"});if(!j.ok)throw new Error(await j.text());const I=await j.blob(),$=URL.createObjectURL(I),fe=document.createElement("a"),ee=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";fe.href=$,fe.download=`${ee}.html`,document.body.appendChild(fe),fe.click(),fe.remove(),URL.revokeObjectURL($)}}}function P0({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 aO(){const{deckTitle:n,slides:l,errorMessage:o,isLoading:i,isSaving:s,saveSlides:u,saveDeckTitle:d,exportPdf:m,exportHtml:h}=nO();return i?v.jsx(P0,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):o?v.jsx(P0,{title:"Generated deck required",body:o}):v.jsxs(v.Fragment,{children:[v.jsx(l2,{position:"top-center",richColors:!0,closeButton:!0}),v.jsx(Q3,{slides:l,deckTitle:n,isSaving:s,onSlidesChange:u,onDeckTitleChange:d,onExportPdf:g=>{const b=ul.loading("Exporting PDF...");m(g).then(()=>{ul.success("PDF export is ready.",{id:b})}).catch(p=>{ul.error("PDF export failed.",{id:b,description:p instanceof Error?p.message:String(p)})})},onExportHtml:()=>{const g=ul.loading("Exporting HTML...");h().then(()=>{ul.success("HTML export is ready.",{id:g})}).catch(b=>{ul.error("HTML export failed.",{id:g,description:b instanceof Error?b.message:String(b)})})}})]})}const f1=document.getElementById("root");if(!f1)throw new Error("Root element #root was not found.");Ow.createRoot(f1).render(v.jsx(pe.StrictMode,{children:v.jsx(aO,{})}));