dsh-open-artifact 0.8.1 → 0.8.2

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 (77) hide show
  1. package/lib/client.js +2 -2
  2. package/lib/index.js +41 -4
  3. package/package.json +1 -1
  4. package/skills/open-artifact/SKILL.md +1 -1
  5. package/vendor/artifact-types/data/scripts/cli.mjs +1 -1
  6. package/vendor/artifact-types/data/scripts/editors/data/assets/{index-CZiM2XTm.js → index-B041Zu27.js} +1 -1
  7. package/vendor/artifact-types/data/scripts/editors/data/index.html +1 -1
  8. package/vendor/artifact-types/{design/scripts/editors/design/assets/index-jhwXmpbV.js → data/scripts/editors/design/assets/index-D6-vjsn9.js} +1 -1
  9. package/vendor/artifact-types/data/scripts/editors/design/index.html +1 -1
  10. package/vendor/artifact-types/{design/scripts/editors/design-system/assets/index-7LPrsXBY.js → data/scripts/editors/design-system/assets/index-BoT2v4hc.js} +1 -1
  11. package/vendor/artifact-types/data/scripts/editors/design-system/index.html +1 -1
  12. package/vendor/artifact-types/{design/scripts/editors/slides/assets/index-y09Z-wXP.js → data/scripts/editors/slides/assets/index-b9M479Ro.js} +2 -2
  13. package/vendor/artifact-types/data/scripts/editors/slides/assets/{src-C48N4IXt.js → src-CxNLgI5_.js} +1 -1
  14. package/vendor/artifact-types/data/scripts/editors/slides/index.html +1 -1
  15. package/vendor/artifact-types/{design/scripts/editors/whiteboard/assets/index-DbekE4ru.js → data/scripts/editors/whiteboard/assets/index-TrzGo_VR.js} +1 -1
  16. package/vendor/artifact-types/data/scripts/editors/whiteboard/index.html +1 -1
  17. package/vendor/artifact-types/design/scripts/cli.mjs +1 -1
  18. package/vendor/artifact-types/{slides/scripts/editors/data/assets/index-CZiM2XTm.js → design/scripts/editors/data/assets/index-B041Zu27.js} +1 -1
  19. package/vendor/artifact-types/design/scripts/editors/data/index.html +1 -1
  20. package/vendor/artifact-types/{data/scripts/editors/design/assets/index-jhwXmpbV.js → design/scripts/editors/design/assets/index-D6-vjsn9.js} +1 -1
  21. package/vendor/artifact-types/design/scripts/editors/design/index.html +1 -1
  22. package/vendor/artifact-types/{design-system/scripts/editors/design-system/assets/index-7LPrsXBY.js → design/scripts/editors/design-system/assets/index-BoT2v4hc.js} +1 -1
  23. package/vendor/artifact-types/design/scripts/editors/design-system/index.html +1 -1
  24. package/vendor/artifact-types/{slides/scripts/editors/slides/assets/index-y09Z-wXP.js → design/scripts/editors/slides/assets/index-b9M479Ro.js} +2 -2
  25. package/vendor/artifact-types/{slides/scripts/editors/slides/assets/src-C48N4IXt.js → design/scripts/editors/slides/assets/src-CxNLgI5_.js} +1 -1
  26. package/vendor/artifact-types/design/scripts/editors/slides/index.html +1 -1
  27. package/vendor/artifact-types/{design-system/scripts/editors/whiteboard/assets/index-DbekE4ru.js → design/scripts/editors/whiteboard/assets/index-TrzGo_VR.js} +1 -1
  28. package/vendor/artifact-types/design/scripts/editors/whiteboard/index.html +1 -1
  29. package/vendor/artifact-types/design-system/scripts/cli.mjs +1 -1
  30. package/vendor/artifact-types/{design/scripts/editors/data/assets/index-CZiM2XTm.js → design-system/scripts/editors/data/assets/index-B041Zu27.js} +1 -1
  31. package/vendor/artifact-types/design-system/scripts/editors/data/index.html +1 -1
  32. package/vendor/artifact-types/{slides/scripts/editors/design/assets/index-jhwXmpbV.js → design-system/scripts/editors/design/assets/index-D6-vjsn9.js} +1 -1
  33. package/vendor/artifact-types/design-system/scripts/editors/design/index.html +1 -1
  34. package/vendor/artifact-types/{data/scripts/editors/design-system/assets/index-7LPrsXBY.js → design-system/scripts/editors/design-system/assets/index-BoT2v4hc.js} +1 -1
  35. package/vendor/artifact-types/design-system/scripts/editors/design-system/index.html +1 -1
  36. package/vendor/artifact-types/design-system/scripts/editors/slides/assets/{index-y09Z-wXP.js → index-b9M479Ro.js} +2 -2
  37. package/vendor/artifact-types/{design/scripts/editors/slides/assets/src-C48N4IXt.js → design-system/scripts/editors/slides/assets/src-CxNLgI5_.js} +1 -1
  38. package/vendor/artifact-types/design-system/scripts/editors/slides/index.html +1 -1
  39. package/vendor/artifact-types/{data/scripts/editors/whiteboard/assets/index-DbekE4ru.js → design-system/scripts/editors/whiteboard/assets/index-TrzGo_VR.js} +1 -1
  40. package/vendor/artifact-types/design-system/scripts/editors/whiteboard/index.html +1 -1
  41. package/vendor/artifact-types/slides/scripts/cli.mjs +1 -1
  42. package/vendor/artifact-types/{design-system/scripts/editors/data/assets/index-CZiM2XTm.js → slides/scripts/editors/data/assets/index-B041Zu27.js} +1 -1
  43. package/vendor/artifact-types/slides/scripts/editors/data/index.html +1 -1
  44. package/vendor/artifact-types/{design-system/scripts/editors/design/assets/index-jhwXmpbV.js → slides/scripts/editors/design/assets/index-D6-vjsn9.js} +1 -1
  45. package/vendor/artifact-types/slides/scripts/editors/design/index.html +1 -1
  46. package/vendor/artifact-types/slides/scripts/editors/design-system/assets/{index-7LPrsXBY.js → index-BoT2v4hc.js} +1 -1
  47. package/vendor/artifact-types/slides/scripts/editors/design-system/index.html +1 -1
  48. package/vendor/artifact-types/{data/scripts/editors/slides/assets/index-y09Z-wXP.js → slides/scripts/editors/slides/assets/index-b9M479Ro.js} +2 -2
  49. package/vendor/artifact-types/{design-system/scripts/editors/slides/assets/src-C48N4IXt.js → slides/scripts/editors/slides/assets/src-CxNLgI5_.js} +1 -1
  50. package/vendor/artifact-types/slides/scripts/editors/slides/index.html +1 -1
  51. package/vendor/artifact-types/slides/scripts/editors/whiteboard/assets/{index-DbekE4ru.js → index-TrzGo_VR.js} +1 -1
  52. package/vendor/artifact-types/slides/scripts/editors/whiteboard/index.html +1 -1
  53. package/vendor/artifact-types/whiteboard/scripts/cli.mjs +1 -1
  54. package/vendor/artifact-types/whiteboard/scripts/editors/data/assets/index-B041Zu27.js +126 -0
  55. package/vendor/artifact-types/whiteboard/scripts/editors/data/index.html +1 -1
  56. package/vendor/artifact-types/whiteboard/scripts/editors/design/assets/index-D6-vjsn9.js +215 -0
  57. package/vendor/artifact-types/whiteboard/scripts/editors/design/index.html +1 -1
  58. package/vendor/artifact-types/whiteboard/scripts/editors/design-system/assets/index-BoT2v4hc.js +139 -0
  59. package/vendor/artifact-types/whiteboard/scripts/editors/design-system/index.html +1 -1
  60. package/vendor/artifact-types/whiteboard/scripts/editors/slides/assets/index-b9M479Ro.js +569 -0
  61. package/vendor/artifact-types/whiteboard/scripts/editors/slides/assets/src-CxNLgI5_.js +1 -0
  62. package/vendor/artifact-types/whiteboard/scripts/editors/slides/index.html +1 -1
  63. package/vendor/artifact-types/whiteboard/scripts/editors/whiteboard/assets/index-TrzGo_VR.js +141 -0
  64. package/vendor/artifact-types/whiteboard/scripts/editors/whiteboard/index.html +1 -1
  65. package/vendor/frame-host/client/comments.js +1 -1
  66. package/vendor/frame-host/frame-host.mjs +1 -1
  67. package/vendor/home/assets/{index-CPvXdSVh.js → index-aY1m8xEm.js} +1 -1
  68. package/vendor/home/index.html +1 -1
  69. package/vendor/open-artifact.mjs +56 -38
  70. package/vendor/shell/assets/{index-DE0jNtst.js → index-ElpFysv2.js} +1 -1
  71. package/vendor/shell/index.html +1 -1
  72. package/vendor/artifact-types/whiteboard/scripts/editors/data/assets/index-CZiM2XTm.js +0 -126
  73. package/vendor/artifact-types/whiteboard/scripts/editors/design/assets/index-jhwXmpbV.js +0 -215
  74. package/vendor/artifact-types/whiteboard/scripts/editors/design-system/assets/index-7LPrsXBY.js +0 -139
  75. package/vendor/artifact-types/whiteboard/scripts/editors/slides/assets/index-y09Z-wXP.js +0 -569
  76. package/vendor/artifact-types/whiteboard/scripts/editors/slides/assets/src-C48N4IXt.js +0 -1
  77. package/vendor/artifact-types/whiteboard/scripts/editors/whiteboard/assets/index-DbekE4ru.js +0 -141
@@ -6,7 +6,7 @@ function hE(n,a){for(var i=0;i<a.length;i++){const r=a[i];if(typeof r!="string"&
6
6
  `+L[s].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=s&&0<=l);break}}}finally{Le=!1,Error.prepareStackTrace=o}return(o=e?e.displayName||e.name:"")?ke(o):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke("Lazy");case 13:return e.child!==t&&t!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Ge(e.type,!1);case 11:return Ge(e.type.render,!1);case 1:return Ge(e.type,!0);case 31:return ke("Activity");default:return""}}function Ue(e){try{var t="",o=null;do t+=Se(e,o),o=e,e=e.return;while(e);return t}catch(s){return`
7
7
  Error generating stack: `+s.message+`
8
8
  `+s.stack}}var Te=Object.prototype.hasOwnProperty,we=n.unstable_scheduleCallback,Ae=n.unstable_cancelCallback,Ze=n.unstable_shouldYield,Me=n.unstable_requestPaint,fe=n.unstable_now,ye=n.unstable_getCurrentPriorityLevel,de=n.unstable_ImmediatePriority,ie=n.unstable_UserBlockingPriority,ve=n.unstable_NormalPriority,Be=n.unstable_LowPriority,Yt=n.unstable_IdlePriority,an=n.log,Rt=n.unstable_setDisableYieldValue,xe=null,qe=null;function ot(e){if(typeof an=="function"&&Rt(e),qe&&typeof qe.setStrictMode=="function")try{qe.setStrictMode(xe,e)}catch{}}var mt=Math.clz32?Math.clz32:Cn,On=Math.log,qn=Math.LN2;function Cn(e){return e>>>=0,e===0?32:31-(On(e)/qn|0)|0}var _t=256,Vn=262144,Fe=4194304;function Et(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 Gt(e,t,o){var s=e.pendingLanes;if(s===0)return 0;var l=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var E=s&134217727;return E!==0?(s=E&~u,s!==0?l=Et(s):(g&=E,g!==0?l=Et(g):o||(o=E&~e,o!==0&&(l=Et(o))))):(E=s&~u,E!==0?l=Et(E):g!==0?l=Et(g):o||(o=s&~e,o!==0&&(l=Et(o)))),l===0?0:t!==0&&t!==l&&(t&u)===0&&(u=l&-l,o=t&-t,u>=o||u===32&&(o&4194048)!==0)?t:l}function zt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $n(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 sn(){var e=Fe;return Fe<<=1,(Fe&62914560)===0&&(Fe=4194304),e}function Bo(e){for(var t=[],o=0;31>o;o++)t.push(e);return t}function An(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function os(e,t,o,s,l,u){var g=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var E=e.entanglements,L=e.expirationTimes,J=e.hiddenUpdates;for(o=g&~o;0<o;){var re=31-mt(o),ue=1<<re;E[re]=0,L[re]=-1;var ee=J[re];if(ee!==null)for(J[re]=null,re=0;re<ee.length;re++){var oe=ee[re];oe!==null&&(oe.lane&=-536870913)}o&=~ue}s!==0&&Gn(e,s,0),u!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Gn(e,t,o){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-mt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|o&261930}function Po(e,t){var o=e.entangledLanes|=t;for(e=e.entanglements;o;){var s=31-mt(o),l=1<<s;l&t|e[s]&t&&(e[s]|=t),o&=~l}}function Io(e,t){var o=t&-t;return o=(o&42)!==0?1:Yo(o),(o&(e.suspendedLanes|t))!==0?0:o}function Yo(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 wa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gr(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:tv(e.type))}function yr(e,t){var o=X.p;try{return X.p=e,t()}finally{X.p=o}}var qo=Math.random().toString(36).slice(2),Xt="__reactFiber$"+qo,rn="__reactProps$"+qo,as="__reactContainer$"+qo,Fc="__reactEvents$"+qo,o1="__reactListeners$"+qo,a1="__reactHandles$"+qo,vh="__reactResources$"+qo,ni="__reactMarker$"+qo;function Kc(e){delete e[Xt],delete e[rn],delete e[Fc],delete e[o1],delete e[a1]}function ss(e){var t=e[Xt];if(t)return t;for(var o=e.parentNode;o;){if(t=o[as]||o[Xt]){if(o=t.alternate,t.child!==null||o!==null&&o.child!==null)for(e=By(e);e!==null;){if(o=e[Xt])return o;e=By(e)}return t}e=o,o=e.parentNode}return null}function is(e){if(e=e[Xt]||e[as]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function rs(e){var t=e[vh];return t||(t=e[vh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function qt(e){e[ni]=!0}var bh=new Set,xh={};function Ra(e,t){ls(e,t),ls(e+"Capture",t)}function ls(e,t){for(xh[e]=t,e=0;e<t.length;e++)bh.add(t[e])}var s1=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]*$"),Sh={},Th={};function i1(e){return Te.call(Th,e)?!0:Te.call(Sh,e)?!1:s1.test(e)?Th[e]=!0:(Sh[e]=!0,!1)}function vr(e,t,o){if(i1(t))if(o===null)e.removeAttribute(t);else{switch(typeof o){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+o)}}function br(e,t,o){if(o===null)e.removeAttribute(t);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+o)}}function io(e,t,o,s){if(s===null)e.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(o);return}e.setAttributeNS(t,o,""+s)}}function Mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function r1(e,t,o){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var l=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(g){o=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(g){o=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qc(e){if(!e._valueTracker){var t=Eh(e)?"checked":"value";e._valueTracker=r1(e,t,""+e[t])}}function wh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),s="";return e&&(s=Eh(e)?e.checked?"true":"false":e.value),e=s,e!==o?(t.setValue(e),!0):!1}function xr(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 l1=/[\n"\\]/g;function Nn(e){return e.replace(l1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zc(e,t,o,s,l,u,g,E){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mn(t)):e.value!==""+Mn(t)&&(e.value=""+Mn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Wc(e,g,Mn(t)):o!=null?Wc(e,g,Mn(o)):s!=null&&e.removeAttribute("value"),l==null&&u!=null&&(e.defaultChecked=!!u),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Mn(E):e.removeAttribute("name")}function Rh(e,t,o,s,l,u,g,E){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||o!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Qc(e);return}o=o!=null?""+Mn(o):"",t=t!=null?""+Mn(t):o,E||t===e.value||(e.value=t),e.defaultValue=t}s=s??l,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=E?e.checked:!!s,e.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Qc(e)}function Wc(e,t,o){t==="number"&&xr(e.ownerDocument)===e||e.defaultValue===""+o||(e.defaultValue=""+o)}function cs(e,t,o,s){if(e=e.options,t){t={};for(var l=0;l<o.length;l++)t["$"+o[l]]=!0;for(o=0;o<e.length;o++)l=t.hasOwnProperty("$"+e[o].value),e[o].selected!==l&&(e[o].selected=l),l&&s&&(e[o].defaultSelected=!0)}else{for(o=""+Mn(o),t=null,l=0;l<e.length;l++){if(e[l].value===o){e[l].selected=!0,s&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Oh(e,t,o){if(t!=null&&(t=""+Mn(t),t!==e.value&&(e.value=t),o==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=o!=null?""+Mn(o):""}function Ch(e,t,o,s){if(t==null){if(s!=null){if(o!=null)throw Error(r(92));if(Q(s)){if(1<s.length)throw Error(r(93));s=s[0]}o=s}o==null&&(o=""),t=o}o=Mn(t),e.defaultValue=o,s=e.textContent,s===o&&s!==""&&s!==null&&(e.value=s),Qc(e)}function us(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var c1=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 Ah(e,t,o){var s=t.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,o):typeof o!="number"||o===0||c1.has(t)?t==="float"?e.cssFloat=o:e[t]=(""+o).trim():e[t]=o+"px"}function Mh(e,t,o){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,o!=null){for(var s in o)!o.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var l in t)s=t[l],t.hasOwnProperty(l)&&o[l]!==s&&Ah(e,l,s)}else for(var u in t)t.hasOwnProperty(u)&&Ah(e,u,t[u])}function $c(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 u1=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"]]),f1=/^[\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 Sr(e){return f1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ro(){}var Jc=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fs=null,ds=null;function Nh(e){var t=is(e);if(t&&(e=t.stateNode)){var o=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zc(e,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),t=o.name,o.type==="radio"&&t!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Nn(""+t)+'"][type="radio"]'),t=0;t<o.length;t++){var s=o[t];if(s!==e&&s.form===e.form){var l=s[rn]||null;if(!l)throw Error(r(90));Zc(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<o.length;t++)s=o[t],s.form===e.form&&wh(s)}break e;case"textarea":Oh(e,o.value,o.defaultValue);break e;case"select":t=o.value,t!=null&&cs(e,!!o.multiple,t,!1)}}}var tu=!1;function Dh(e,t,o){if(tu)return e(t,o);tu=!0;try{var s=e(t);return s}finally{if(tu=!1,(fs!==null||ds!==null)&&(ll(),fs&&(t=fs,e=ds,ds=fs=null,Nh(t),e)))for(t=0;t<e.length;t++)Nh(e[t])}}function ai(e,t){var o=e.stateNode;if(o===null)return null;var s=o[rn]||null;if(s===null)return null;o=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(r(231,t,typeof o));return o}var lo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=!1;if(lo)try{var si={};Object.defineProperty(si,"passive",{get:function(){nu=!0}}),window.addEventListener("test",si,si),window.removeEventListener("test",si,si)}catch{nu=!1}var Vo=null,ou=null,Tr=null;function _h(){if(Tr)return Tr;var e,t=ou,o=t.length,s,l="value"in Vo?Vo.value:Vo.textContent,u=l.length;for(e=0;e<o&&t[e]===l[e];e++);var g=o-e;for(s=1;s<=g&&t[o-s]===l[u-s];s++);return Tr=l.slice(e,1<s?1-s:void 0)}function Er(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 wr(){return!0}function zh(){return!1}function ln(e){function t(o,s,l,u,g){this._reactName=o,this._targetInst=l,this.type=s,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(o=e[E],this[E]=o?o(u):u[E]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?wr:zh,this.isPropagationStopped=zh,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=wr)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=wr)},persist:function(){},isPersistent:wr}),t}var Oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rr=ln(Oa),ii=x({},Oa,{view:0,detail:0}),d1=ln(ii),au,su,ri,Or=x({},ii,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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!==ri&&(ri&&e.type==="mousemove"?(au=e.screenX-ri.screenX,su=e.screenY-ri.screenY):su=au=0,ri=e),au)},movementY:function(e){return"movementY"in e?e.movementY:su}}),kh=ln(Or),p1=x({},Or,{dataTransfer:0}),h1=ln(p1),m1=x({},ii,{relatedTarget:0}),iu=ln(m1),g1=x({},Oa,{animationName:0,elapsedTime:0,pseudoElement:0}),y1=ln(g1),v1=x({},Oa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),b1=ln(v1),x1=x({},Oa,{data:0}),jh=ln(x1),S1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T1={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"},E1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=E1[e])?!!t[e]:!1}function ru(){return w1}var R1=x({},ii,{key:function(e){if(e.key){var t=S1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Er(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?T1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?Er(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Er(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),O1=ln(R1),C1=x({},Or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hh=ln(C1),A1=x({},ii,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),M1=ln(A1),N1=x({},Oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),D1=ln(N1),_1=x({},Or,{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}),z1=ln(_1),k1=x({},Oa,{newState:0,oldState:0}),j1=ln(k1),H1=[9,13,27,32],lu=lo&&"CompositionEvent"in window,li=null;lo&&"documentMode"in document&&(li=document.documentMode);var L1=lo&&"TextEvent"in window&&!li,Lh=lo&&(!lu||li&&8<li&&11>=li),Uh=" ",Bh=!1;function Ph(e,t){switch(e){case"keyup":return H1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ih(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ps=!1;function U1(e,t){switch(e){case"compositionend":return Ih(t);case"keypress":return t.which!==32?null:(Bh=!0,Uh);case"textInput":return e=t.data,e===Uh&&Bh?null:e;default:return null}}function B1(e,t){if(ps)return e==="compositionend"||!lu&&Ph(e,t)?(e=_h(),Tr=ou=Vo=null,ps=!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 Lh&&t.locale!=="ko"?null:t.data;default:return null}}var P1={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 Yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!P1[e.type]:t==="textarea"}function qh(e,t,o,s){fs?ds?ds.push(s):ds=[s]:fs=s,t=ml(t,"onChange"),0<t.length&&(o=new Rr("onChange","change",null,o,s),e.push({event:o,listeners:t}))}var ci=null,ui=null;function I1(e){Ry(e,0)}function Cr(e){var t=oi(e);if(wh(t))return e}function Vh(e,t){if(e==="change")return t}var Gh=!1;if(lo){var cu;if(lo){var uu="oninput"in document;if(!uu){var Xh=document.createElement("div");Xh.setAttribute("oninput","return;"),uu=typeof Xh.oninput=="function"}cu=uu}else cu=!1;Gh=cu&&(!document.documentMode||9<document.documentMode)}function Fh(){ci&&(ci.detachEvent("onpropertychange",Kh),ui=ci=null)}function Kh(e){if(e.propertyName==="value"&&Cr(ui)){var t=[];qh(t,ui,e,eu(e)),Dh(I1,t)}}function Y1(e,t,o){e==="focusin"?(Fh(),ci=t,ui=o,ci.attachEvent("onpropertychange",Kh)):e==="focusout"&&Fh()}function q1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Cr(ui)}function V1(e,t){if(e==="click")return Cr(t)}function G1(e,t){if(e==="input"||e==="change")return Cr(t)}function X1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yn=typeof Object.is=="function"?Object.is:X1;function fi(e,t){if(yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++){var l=o[s];if(!Te.call(t,l)||!yn(e[l],t[l]))return!1}return!0}function Qh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zh(e,t){var o=Qh(e);e=0;for(var s;o;){if(o.nodeType===3){if(s=e+o.textContent.length,e<=t&&s>=t)return{node:o,offset:t-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Qh(o)}}function Wh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $h(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=xr(e.document);t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=xr(e.document)}return t}function fu(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 F1=lo&&"documentMode"in document&&11>=document.documentMode,hs=null,du=null,di=null,pu=!1;function Jh(e,t,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;pu||hs==null||hs!==xr(s)||(s=hs,"selectionStart"in s&&fu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),di&&fi(di,s)||(di=s,s=ml(du,"onSelect"),0<s.length&&(t=new Rr("onSelect","select",null,t,o),e.push({event:t,listeners:s}),t.target=hs)))}function Ca(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var ms={animationend:Ca("Animation","AnimationEnd"),animationiteration:Ca("Animation","AnimationIteration"),animationstart:Ca("Animation","AnimationStart"),transitionrun:Ca("Transition","TransitionRun"),transitionstart:Ca("Transition","TransitionStart"),transitioncancel:Ca("Transition","TransitionCancel"),transitionend:Ca("Transition","TransitionEnd")},hu={},em={};lo&&(em=document.createElement("div").style,"AnimationEvent"in window||(delete ms.animationend.animation,delete ms.animationiteration.animation,delete ms.animationstart.animation),"TransitionEvent"in window||delete ms.transitionend.transition);function Aa(e){if(hu[e])return hu[e];if(!ms[e])return e;var t=ms[e],o;for(o in t)if(t.hasOwnProperty(o)&&o in em)return hu[e]=t[o];return e}var tm=Aa("animationend"),nm=Aa("animationiteration"),om=Aa("animationstart"),K1=Aa("transitionrun"),Q1=Aa("transitionstart"),Z1=Aa("transitioncancel"),am=Aa("transitionend"),sm=new Map,mu="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(" ");mu.push("scrollEnd");function Xn(e,t){sm.set(e,t),Ra(t,[e])}var Ar=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dn=[],gs=0,gu=0;function Mr(){for(var e=gs,t=gu=gs=0;t<e;){var o=Dn[t];Dn[t++]=null;var s=Dn[t];Dn[t++]=null;var l=Dn[t];Dn[t++]=null;var u=Dn[t];if(Dn[t++]=null,s!==null&&l!==null){var g=s.pending;g===null?l.next=l:(l.next=g.next,g.next=l),s.pending=l}u!==0&&im(o,l,u)}}function Nr(e,t,o,s){Dn[gs++]=e,Dn[gs++]=t,Dn[gs++]=o,Dn[gs++]=s,gu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function yu(e,t,o,s){return Nr(e,t,o,s),Dr(e)}function Ma(e,t){return Nr(e,null,null,t),Dr(e)}function im(e,t,o){e.lanes|=o;var s=e.alternate;s!==null&&(s.lanes|=o);for(var l=!1,u=e.return;u!==null;)u.childLanes|=o,s=u.alternate,s!==null&&(s.childLanes|=o),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(l=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,l&&t!==null&&(l=31-mt(o),e=u.hiddenUpdates,s=e[l],s===null?e[l]=[t]:s.push(t),t.lane=o|536870912),u):null}function Dr(e){if(50<ki)throw ki=0,Cf=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ys={};function W1(e,t,o,s){this.tag=e,this.key=o,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,o,s){return new W1(e,t,o,s)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function co(e,t){var o=e.alternate;return o===null?(o=vn(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o}function rm(e,t){e.flags&=65011714;var o=e.alternate;return o===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=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,t=o.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _r(e,t,o,s,l,u){var g=0;if(s=e,typeof e=="function")vu(e)&&(g=1);else if(typeof e=="string")g=nE(e,o,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Y:return e=vn(31,o,t,l),e.elementType=Y,e.lanes=u,e;case C:return Na(o.children,l,u,t);case M:g=8,l|=24;break;case O:return e=vn(12,o,t,l|2),e.elementType=O,e.lanes=u,e;case k:return e=vn(13,o,t,l),e.elementType=k,e.lanes=u,e;case B:return e=vn(19,o,t,l),e.elementType=B,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:g=10;break e;case N:g=9;break e;case D:g=11;break e;case j:g=14;break e;case U:g=16,s=null;break e}g=29,o=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=vn(g,o,t,l),t.elementType=e,t.type=s,t.lanes=u,t}function Na(e,t,o,s){return e=vn(7,e,s,t),e.lanes=o,e}function bu(e,t,o){return e=vn(6,e,null,t),e.lanes=o,e}function lm(e){var t=vn(18,null,null,0);return t.stateNode=e,t}function xu(e,t,o){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var cm=new WeakMap;function _n(e,t){if(typeof e=="object"&&e!==null){var o=cm.get(e);return o!==void 0?o:(t={value:e,source:t,stack:Ue(t)},cm.set(e,t),t)}return{value:e,source:t,stack:Ue(t)}}var vs=[],bs=0,zr=null,pi=0,zn=[],kn=0,Go=null,Jn=1,eo="";function uo(e,t){vs[bs++]=pi,vs[bs++]=zr,zr=e,pi=t}function um(e,t,o){zn[kn++]=Jn,zn[kn++]=eo,zn[kn++]=Go,Go=e;var s=Jn;e=eo;var l=32-mt(s)-1;s&=~(1<<l),o+=1;var u=32-mt(t)+l;if(30<u){var g=l-l%5;u=(s&(1<<g)-1).toString(32),s>>=g,l-=g,Jn=1<<32-mt(t)+l|o<<l|s,eo=u+e}else Jn=1<<u|o<<l|s,eo=e}function Su(e){e.return!==null&&(uo(e,1),um(e,1,0))}function Tu(e){for(;e===zr;)zr=vs[--bs],vs[bs]=null,pi=vs[--bs],vs[bs]=null;for(;e===Go;)Go=zn[--kn],zn[kn]=null,eo=zn[--kn],zn[kn]=null,Jn=zn[--kn],zn[kn]=null}function fm(e,t){zn[kn++]=Jn,zn[kn++]=eo,zn[kn++]=Go,Jn=t.id,eo=t.overflow,Go=e}var Ft=null,vt=null,nt=!1,Xo=null,jn=!1,Eu=Error(r(519));function Fo(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hi(_n(t,e)),Eu}function dm(e){var t=e.stateNode,o=e.type,s=e.memoizedProps;switch(t[Xt]=e,t[rn]=s,o){case"dialog":$e("cancel",t),$e("close",t);break;case"iframe":case"object":case"embed":$e("load",t);break;case"video":case"audio":for(o=0;o<Hi.length;o++)$e(Hi[o],t);break;case"source":$e("error",t);break;case"img":case"image":case"link":$e("error",t),$e("load",t);break;case"details":$e("toggle",t);break;case"input":$e("invalid",t),Rh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":$e("invalid",t);break;case"textarea":$e("invalid",t),Ch(t,s.value,s.defaultValue,s.children)}o=s.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||t.textContent===""+o||s.suppressHydrationWarning===!0||My(t.textContent,o)?(s.popover!=null&&($e("beforetoggle",t),$e("toggle",t)),s.onScroll!=null&&$e("scroll",t),s.onScrollEnd!=null&&$e("scrollend",t),s.onClick!=null&&(t.onclick=ro),t=!0):t=!1,t||Fo(e,!0)}function pm(e){for(Ft=e.return;Ft;)switch(Ft.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:Ft=Ft.return}}function xs(e){if(e!==Ft)return!1;if(!nt)return pm(e),nt=!0,!1;var t=e.tag,o;if((o=t!==3&&t!==27)&&((o=t===5)&&(o=e.type,o=!(o!=="form"&&o!=="button")||Yf(e.type,e.memoizedProps)),o=!o),o&&vt&&Fo(e),pm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));vt=Uy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));vt=Uy(e)}else t===27?(t=vt,ra(e.type)?(e=Ff,Ff=null,vt=e):vt=t):vt=Ft?Ln(e.stateNode.nextSibling):null;return!0}function Da(){vt=Ft=null,nt=!1}function wu(){var e=Xo;return e!==null&&(dn===null?dn=e:dn.push.apply(dn,e),Xo=null),e}function hi(e){Xo===null?Xo=[e]:Xo.push(e)}var Ru=A(null),_a=null,fo=null;function Ko(e,t,o){ne(Ru,t._currentValue),t._currentValue=o}function po(e){e._currentValue=Ru.current,G(Ru)}function Ou(e,t,o){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===o)break;e=e.return}}function Cu(e,t,o,s){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var u=l.dependencies;if(u!==null){var g=l.child;u=u.firstContext;e:for(;u!==null;){var E=u;u=l;for(var L=0;L<t.length;L++)if(E.context===t[L]){u.lanes|=o,E=u.alternate,E!==null&&(E.lanes|=o),Ou(u.return,o,e),s||(g=null);break e}u=E.next}}else if(l.tag===18){if(g=l.return,g===null)throw Error(r(341));g.lanes|=o,u=g.alternate,u!==null&&(u.lanes|=o),Ou(g,o,e),g=null}else g=l.child;if(g!==null)g.return=l;else for(g=l;g!==null;){if(g===e){g=null;break}if(l=g.sibling,l!==null){l.return=g.return,g=l;break}g=g.return}l=g}}function Ss(e,t,o,s){e=null;for(var l=t,u=!1;l!==null;){if(!u){if((l.flags&524288)!==0)u=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var g=l.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var E=l.type;yn(l.pendingProps.value,g.value)||(e!==null?e.push(E):e=[E])}}else if(l===he.current){if(g=l.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Ii):e=[Ii])}l=l.return}e!==null&&Cu(t,e,o,s),t.flags|=262144}function kr(e){for(e=e.firstContext;e!==null;){if(!yn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){_a=e,fo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Kt(e){return hm(_a,e)}function jr(e,t){return _a===null&&za(e),hm(e,t)}function hm(e,t){var o=t._currentValue;if(t={context:t,memoizedValue:o,next:null},fo===null){if(e===null)throw Error(r(308));fo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fo=fo.next=t;return o}var $1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(o,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(o){return o()})}},J1=n.unstable_scheduleCallback,eT=n.unstable_NormalPriority,kt={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new $1,data:new Map,refCount:0}}function mi(e){e.refCount--,e.refCount===0&&J1(eT,function(){e.controller.abort()})}var gi=null,Mu=0,Ts=0,Es=null;function tT(e,t){if(gi===null){var o=gi=[];Mu=0,Ts=zf(),Es={status:"pending",value:void 0,then:function(s){o.push(s)}}}return Mu++,t.then(mm,mm),t}function mm(){if(--Mu===0&&gi!==null){Es!==null&&(Es.status="fulfilled");var e=gi;gi=null,Ts=0,Es=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function nT(e,t){var o=[],s={status:"pending",value:null,reason:null,then:function(l){o.push(l)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var l=0;l<o.length;l++)(0,o[l])(t)},function(l){for(s.status="rejected",s.reason=l,l=0;l<o.length;l++)(0,o[l])(void 0)}),s}var gm=z.S;z.S=function(e,t){Jg=fe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tT(e,t),gm!==null&&gm(e,t)};var ka=A(null);function Nu(){var e=ka.current;return e!==null?e:gt.pooledCache}function Hr(e,t){t===null?ne(ka,ka.current):ne(ka,t.pool)}function ym(){var e=Nu();return e===null?null:{parent:kt._currentValue,pool:e}}var ws=Error(r(460)),Du=Error(r(474)),Lr=Error(r(542)),Ur={then:function(){}};function vm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bm(e,t,o){switch(o=e[o],o===void 0?e.push(t):o!==t&&(t.then(ro,ro),t=o),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sm(e),e;default:if(typeof t.status=="string")t.then(ro,ro);else{if(e=gt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=s}},function(s){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sm(e),e}throw Ha=t,ws}}function ja(e){try{var t=e._init;return t(e._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Ha=o,ws):o}}var Ha=null;function xm(){if(Ha===null)throw Error(r(459));var e=Ha;return Ha=null,e}function Sm(e){if(e===ws||e===Lr)throw Error(r(483))}var Rs=null,yi=0;function Br(e){var t=yi;return yi+=1,Rs===null&&(Rs=[]),bm(Rs,e,t)}function vi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pr(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Tm(e){function t(K,P){if(e){var $=K.deletions;$===null?(K.deletions=[P],K.flags|=16):$.push(P)}}function o(K,P){if(!e)return null;for(;P!==null;)t(K,P),P=P.sibling;return null}function s(K){for(var P=new Map;K!==null;)K.key!==null?P.set(K.key,K):P.set(K.index,K),K=K.sibling;return P}function l(K,P){return K=co(K,P),K.index=0,K.sibling=null,K}function u(K,P,$){return K.index=$,e?($=K.alternate,$!==null?($=$.index,$<P?(K.flags|=67108866,P):$):(K.flags|=67108866,P)):(K.flags|=1048576,P)}function g(K){return e&&K.alternate===null&&(K.flags|=67108866),K}function E(K,P,$,ce){return P===null||P.tag!==6?(P=bu($,K.mode,ce),P.return=K,P):(P=l(P,$),P.return=K,P)}function L(K,P,$,ce){var ze=$.type;return ze===C?re(K,P,$.props.children,ce,$.key):P!==null&&(P.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===U&&ja(ze)===P.type)?(P=l(P,$.props),vi(P,$),P.return=K,P):(P=_r($.type,$.key,$.props,null,K.mode,ce),vi(P,$),P.return=K,P)}function J(K,P,$,ce){return P===null||P.tag!==4||P.stateNode.containerInfo!==$.containerInfo||P.stateNode.implementation!==$.implementation?(P=xu($,K.mode,ce),P.return=K,P):(P=l(P,$.children||[]),P.return=K,P)}function re(K,P,$,ce,ze){return P===null||P.tag!==7?(P=Na($,K.mode,ce,ze),P.return=K,P):(P=l(P,$),P.return=K,P)}function ue(K,P,$){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=bu(""+P,K.mode,$),P.return=K,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case T:return $=_r(P.type,P.key,P.props,null,K.mode,$),vi($,P),$.return=K,$;case w:return P=xu(P,K.mode,$),P.return=K,P;case U:return P=ja(P),ue(K,P,$)}if(Q(P)||_(P))return P=Na(P,K.mode,$,null),P.return=K,P;if(typeof P.then=="function")return ue(K,Br(P),$);if(P.$$typeof===R)return ue(K,jr(K,P),$);Pr(K,P)}return null}function ee(K,P,$,ce){var ze=P!==null?P.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return ze!==null?null:E(K,P,""+$,ce);if(typeof $=="object"&&$!==null){switch($.$$typeof){case T:return $.key===ze?L(K,P,$,ce):null;case w:return $.key===ze?J(K,P,$,ce):null;case U:return $=ja($),ee(K,P,$,ce)}if(Q($)||_($))return ze!==null?null:re(K,P,$,ce,null);if(typeof $.then=="function")return ee(K,P,Br($),ce);if($.$$typeof===R)return ee(K,P,jr(K,$),ce);Pr(K,$)}return null}function oe(K,P,$,ce,ze){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return K=K.get($)||null,E(P,K,""+ce,ze);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case T:return K=K.get(ce.key===null?$:ce.key)||null,L(P,K,ce,ze);case w:return K=K.get(ce.key===null?$:ce.key)||null,J(P,K,ce,ze);case U:return ce=ja(ce),oe(K,P,$,ce,ze)}if(Q(ce)||_(ce))return K=K.get($)||null,re(P,K,ce,ze,null);if(typeof ce.then=="function")return oe(K,P,$,Br(ce),ze);if(ce.$$typeof===R)return oe(K,P,$,jr(P,ce),ze);Pr(P,ce)}return null}function Oe(K,P,$,ce){for(var ze=null,st=null,Ne=P,Xe=P=0,tt=null;Ne!==null&&Xe<$.length;Xe++){Ne.index>Xe?(tt=Ne,Ne=null):tt=Ne.sibling;var it=ee(K,Ne,$[Xe],ce);if(it===null){Ne===null&&(Ne=tt);break}e&&Ne&&it.alternate===null&&t(K,Ne),P=u(it,P,Xe),st===null?ze=it:st.sibling=it,st=it,Ne=tt}if(Xe===$.length)return o(K,Ne),nt&&uo(K,Xe),ze;if(Ne===null){for(;Xe<$.length;Xe++)Ne=ue(K,$[Xe],ce),Ne!==null&&(P=u(Ne,P,Xe),st===null?ze=Ne:st.sibling=Ne,st=Ne);return nt&&uo(K,Xe),ze}for(Ne=s(Ne);Xe<$.length;Xe++)tt=oe(Ne,K,Xe,$[Xe],ce),tt!==null&&(e&&tt.alternate!==null&&Ne.delete(tt.key===null?Xe:tt.key),P=u(tt,P,Xe),st===null?ze=tt:st.sibling=tt,st=tt);return e&&Ne.forEach(function(da){return t(K,da)}),nt&&uo(K,Xe),ze}function He(K,P,$,ce){if($==null)throw Error(r(151));for(var ze=null,st=null,Ne=P,Xe=P=0,tt=null,it=$.next();Ne!==null&&!it.done;Xe++,it=$.next()){Ne.index>Xe?(tt=Ne,Ne=null):tt=Ne.sibling;var da=ee(K,Ne,it.value,ce);if(da===null){Ne===null&&(Ne=tt);break}e&&Ne&&da.alternate===null&&t(K,Ne),P=u(da,P,Xe),st===null?ze=da:st.sibling=da,st=da,Ne=tt}if(it.done)return o(K,Ne),nt&&uo(K,Xe),ze;if(Ne===null){for(;!it.done;Xe++,it=$.next())it=ue(K,it.value,ce),it!==null&&(P=u(it,P,Xe),st===null?ze=it:st.sibling=it,st=it);return nt&&uo(K,Xe),ze}for(Ne=s(Ne);!it.done;Xe++,it=$.next())it=oe(Ne,K,Xe,it.value,ce),it!==null&&(e&&it.alternate!==null&&Ne.delete(it.key===null?Xe:it.key),P=u(it,P,Xe),st===null?ze=it:st.sibling=it,st=it);return e&&Ne.forEach(function(pE){return t(K,pE)}),nt&&uo(K,Xe),ze}function pt(K,P,$,ce){if(typeof $=="object"&&$!==null&&$.type===C&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case T:e:{for(var ze=$.key;P!==null;){if(P.key===ze){if(ze=$.type,ze===C){if(P.tag===7){o(K,P.sibling),ce=l(P,$.props.children),ce.return=K,K=ce;break e}}else if(P.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===U&&ja(ze)===P.type){o(K,P.sibling),ce=l(P,$.props),vi(ce,$),ce.return=K,K=ce;break e}o(K,P);break}else t(K,P);P=P.sibling}$.type===C?(ce=Na($.props.children,K.mode,ce,$.key),ce.return=K,K=ce):(ce=_r($.type,$.key,$.props,null,K.mode,ce),vi(ce,$),ce.return=K,K=ce)}return g(K);case w:e:{for(ze=$.key;P!==null;){if(P.key===ze)if(P.tag===4&&P.stateNode.containerInfo===$.containerInfo&&P.stateNode.implementation===$.implementation){o(K,P.sibling),ce=l(P,$.children||[]),ce.return=K,K=ce;break e}else{o(K,P);break}else t(K,P);P=P.sibling}ce=xu($,K.mode,ce),ce.return=K,K=ce}return g(K);case U:return $=ja($),pt(K,P,$,ce)}if(Q($))return Oe(K,P,$,ce);if(_($)){if(ze=_($),typeof ze!="function")throw Error(r(150));return $=ze.call($),He(K,P,$,ce)}if(typeof $.then=="function")return pt(K,P,Br($),ce);if($.$$typeof===R)return pt(K,P,jr(K,$),ce);Pr(K,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,P!==null&&P.tag===6?(o(K,P.sibling),ce=l(P,$),ce.return=K,K=ce):(o(K,P),ce=bu($,K.mode,ce),ce.return=K,K=ce),g(K)):o(K,P)}return function(K,P,$,ce){try{yi=0;var ze=pt(K,P,$,ce);return Rs=null,ze}catch(Ne){if(Ne===ws||Ne===Lr)throw Ne;var st=vn(29,Ne,null,K.mode);return st.lanes=ce,st.return=K,st}}}var La=Tm(!0),Em=Tm(!1),Qo=!1;function _u(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zu(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 Zo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wo(e,t,o){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(rt&2)!==0){var l=s.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),s.pending=t,t=Dr(e),im(e,null,o),t}return Nr(e,s,t,o),Dr(e)}function bi(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,o|=s,t.lanes=o,Po(e,o)}}function ku(e,t){var o=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var l=null,u=null;if(o=o.firstBaseUpdate,o!==null){do{var g={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};u===null?l=u=g:u=u.next=g,o=o.next}while(o!==null);u===null?l=u=t:u=u.next=t}else l=u=t;o={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}var ju=!1;function xi(){if(ju){var e=Es;if(e!==null)throw e}}function Si(e,t,o,s){ju=!1;var l=e.updateQueue;Qo=!1;var u=l.firstBaseUpdate,g=l.lastBaseUpdate,E=l.shared.pending;if(E!==null){l.shared.pending=null;var L=E,J=L.next;L.next=null,g===null?u=J:g.next=J,g=L;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==g&&(E===null?re.firstBaseUpdate=J:E.next=J,re.lastBaseUpdate=L))}if(u!==null){var ue=l.baseState;g=0,re=J=L=null,E=u;do{var ee=E.lane&-536870913,oe=ee!==E.lane;if(oe?(et&ee)===ee:(s&ee)===ee){ee!==0&&ee===Ts&&(ju=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Oe=e,He=E;ee=t;var pt=o;switch(He.tag){case 1:if(Oe=He.payload,typeof Oe=="function"){ue=Oe.call(pt,ue,ee);break e}ue=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=He.payload,ee=typeof Oe=="function"?Oe.call(pt,ue,ee):Oe,ee==null)break e;ue=x({},ue,ee);break e;case 2:Qo=!0}}ee=E.callback,ee!==null&&(e.flags|=64,oe&&(e.flags|=8192),oe=l.callbacks,oe===null?l.callbacks=[ee]:oe.push(ee))}else oe={lane:ee,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(J=re=oe,L=ue):re=re.next=oe,g|=ee;if(E=E.next,E===null){if(E=l.shared.pending,E===null)break;oe=E,E=oe.next,oe.next=null,l.lastBaseUpdate=oe,l.shared.pending=null}}while(!0);re===null&&(L=ue),l.baseState=L,l.firstBaseUpdate=J,l.lastBaseUpdate=re,u===null&&(l.shared.lanes=0),na|=g,e.lanes=g,e.memoizedState=ue}}function wm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Rm(e,t){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)wm(o[e],t)}var Os=A(null),Ir=A(0);function Om(e,t){e=To,ne(Ir,e),ne(Os,t),To=e|t.baseLanes}function Hu(){ne(Ir,To),ne(Os,Os.current)}function Lu(){To=Ir.current,G(Os),G(Ir)}var bn=A(null),Hn=null;function $o(e){var t=e.alternate;ne(Nt,Nt.current&1),ne(bn,e),Hn===null&&(t===null||Os.current!==null||t.memoizedState!==null)&&(Hn=e)}function Uu(e){ne(Nt,Nt.current),ne(bn,e),Hn===null&&(Hn=e)}function Cm(e){e.tag===22?(ne(Nt,Nt.current),ne(bn,e),Hn===null&&(Hn=e)):Jo()}function Jo(){ne(Nt,Nt.current),ne(bn,bn.current)}function xn(e){G(bn),Hn===e&&(Hn=null),G(Nt)}var Nt=A(0);function Yr(e){for(var t=e;t!==null;){if(t.tag===13){var o=t.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Gf(o)||Xf(o)))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 ho=0,Ve=null,ft=null,jt=null,qr=!1,Cs=!1,Ua=!1,Vr=0,Ti=0,As=null,oT=0;function Ot(){throw Error(r(321))}function Bu(e,t){if(t===null)return!1;for(var o=0;o<t.length&&o<e.length;o++)if(!yn(e[o],t[o]))return!1;return!0}function Pu(e,t,o,s,l,u){return ho=u,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?ug:tf,Ua=!1,u=o(s,l),Ua=!1,Cs&&(u=Mm(t,o,s,l)),Am(e),u}function Am(e){z.H=Ri;var t=ft!==null&&ft.next!==null;if(ho=0,jt=ft=Ve=null,qr=!1,Ti=0,As=null,t)throw Error(r(300));e===null||Ht||(e=e.dependencies,e!==null&&kr(e)&&(Ht=!0))}function Mm(e,t,o,s){Ve=e;var l=0;do{if(Cs&&(As=null),Ti=0,Cs=!1,25<=l)throw Error(r(301));if(l+=1,jt=ft=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=fg,u=t(o,s)}while(Cs);return u}function aT(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Ei(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Ve.flags|=1024),t}function Iu(){var e=Vr!==0;return Vr=0,e}function Yu(e,t,o){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o}function qu(e){if(qr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qr=!1}ho=0,jt=ft=Ve=null,Cs=!1,Ti=Vr=0,As=null}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ve.memoizedState=jt=e:jt=jt.next=e,jt}function Dt(){if(ft===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=jt===null?Ve.memoizedState:jt.next;if(t!==null)jt=t,ft=e;else{if(e===null)throw Ve.alternate===null?Error(r(467)):Error(r(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},jt===null?Ve.memoizedState=jt=e:jt=jt.next=e}return jt}function Gr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ei(e){var t=Ti;return Ti+=1,As===null&&(As=[]),e=bm(As,e,t),t=Ve,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?ug:tf),e}function Xr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ei(e);if(e.$$typeof===R)return Kt(e)}throw Error(r(438,String(e)))}function Vu(e){var t=null,o=Ve.updateQueue;if(o!==null&&(t=o.memoCache),t==null){var s=Ve.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),o===null&&(o=Gr(),Ve.updateQueue=o),o.memoCache=t,o=t.data[t.index],o===void 0)for(o=t.data[t.index]=Array(e),s=0;s<e;s++)o[s]=I;return t.index++,o}function mo(e,t){return typeof t=="function"?t(e):t}function Fr(e){var t=Dt();return Gu(t,ft,e)}function Gu(e,t,o){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=o;var l=e.baseQueue,u=s.pending;if(u!==null){if(l!==null){var g=l.next;l.next=u.next,u.next=g}t.baseQueue=l=u,s.pending=null}if(u=e.baseState,l===null)e.memoizedState=u;else{t=l.next;var E=g=null,L=null,J=t,re=!1;do{var ue=J.lane&-536870913;if(ue!==J.lane?(et&ue)===ue:(ho&ue)===ue){var ee=J.revertLane;if(ee===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ue===Ts&&(re=!0);else if((ho&ee)===ee){J=J.next,ee===Ts&&(re=!0);continue}else ue={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},L===null?(E=L=ue,g=u):L=L.next=ue,Ve.lanes|=ee,na|=ee;ue=J.action,Ua&&o(u,ue),u=J.hasEagerState?J.eagerState:o(u,ue)}else ee={lane:ue,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},L===null?(E=L=ee,g=u):L=L.next=ee,Ve.lanes|=ue,na|=ue;J=J.next}while(J!==null&&J!==t);if(L===null?g=u:L.next=E,!yn(u,e.memoizedState)&&(Ht=!0,re&&(o=Es,o!==null)))throw o;e.memoizedState=u,e.baseState=g,e.baseQueue=L,s.lastRenderedState=u}return l===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Xu(e){var t=Dt(),o=t.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=e;var s=o.dispatch,l=o.pending,u=t.memoizedState;if(l!==null){o.pending=null;var g=l=l.next;do u=e(u,g.action),g=g.next;while(g!==l);yn(u,t.memoizedState)||(Ht=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),o.lastRenderedState=u}return[u,s]}function Nm(e,t,o){var s=Ve,l=Dt(),u=nt;if(u){if(o===void 0)throw Error(r(407));o=o()}else o=t();var g=!yn((ft||l).memoizedState,o);if(g&&(l.memoizedState=o,Ht=!0),l=l.queue,Qu(zm.bind(null,s,l,e),[e]),l.getSnapshot!==t||g||jt!==null&&jt.memoizedState.tag&1){if(s.flags|=2048,Ms(9,{destroy:void 0},_m.bind(null,s,l,o,t),null),gt===null)throw Error(r(349));u||(ho&127)!==0||Dm(s,t,o)}return o}function Dm(e,t,o){e.flags|=16384,e={getSnapshot:t,value:o},t=Ve.updateQueue,t===null?(t=Gr(),Ve.updateQueue=t,t.stores=[e]):(o=t.stores,o===null?t.stores=[e]:o.push(e))}function _m(e,t,o,s){t.value=o,t.getSnapshot=s,km(t)&&jm(e)}function zm(e,t,o){return o(function(){km(t)&&jm(e)})}function km(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!yn(e,o)}catch{return!0}}function jm(e){var t=Ma(e,2);t!==null&&pn(t,e,2)}function Fu(e){var t=nn();if(typeof e=="function"){var o=e;if(e=o(),Ua){ot(!0);try{o()}finally{ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:e},t}function Hm(e,t,o,s){return e.baseState=o,Gu(e,ft,typeof s=="function"?s:mo)}function sT(e,t,o,s,l){if(Zr(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};z.T!==null?o(!0):u.isTransition=!1,s(u),o=t.pending,o===null?(u.next=t.pending=u,Lm(t,u)):(u.next=o.next,t.pending=o.next=u)}}function Lm(e,t){var o=t.action,s=t.payload,l=e.state;if(t.isTransition){var u=z.T,g={};z.T=g;try{var E=o(l,s),L=z.S;L!==null&&L(g,E),Um(e,t,E)}catch(J){Ku(e,t,J)}finally{u!==null&&g.types!==null&&(u.types=g.types),z.T=u}}else try{u=o(l,s),Um(e,t,u)}catch(J){Ku(e,t,J)}}function Um(e,t,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(s){Bm(e,t,s)},function(s){return Ku(e,t,s)}):Bm(e,t,o)}function Bm(e,t,o){t.status="fulfilled",t.value=o,Pm(t),e.state=o,t=e.pending,t!==null&&(o=t.next,o===t?e.pending=null:(o=o.next,t.next=o,Lm(e,o)))}function Ku(e,t,o){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=o,Pm(t),t=t.next;while(t!==s)}e.action=null}function Pm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Im(e,t){return t}function Ym(e,t){if(nt){var o=gt.formState;if(o!==null){e:{var s=Ve;if(nt){if(vt){t:{for(var l=vt,u=jn;l.nodeType!==8;){if(!u){l=null;break t}if(l=Ln(l.nextSibling),l===null){l=null;break t}}u=l.data,l=u==="F!"||u==="F"?l:null}if(l){vt=Ln(l.nextSibling),s=l.data==="F!";break e}}Fo(s)}s=!1}s&&(t=o[0])}}return o=nn(),o.memoizedState=o.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Im,lastRenderedState:t},o.queue=s,o=rg.bind(null,Ve,s),s.dispatch=o,s=Fu(!1),u=ef.bind(null,Ve,!1,s.queue),s=nn(),l={state:t,dispatch:null,action:e,pending:null},s.queue=l,o=sT.bind(null,Ve,l,u,o),l.dispatch=o,s.memoizedState=e,[t,o,!1]}function qm(e){var t=Dt();return Vm(t,ft,e)}function Vm(e,t,o){if(t=Gu(e,t,Im)[0],e=Fr(mo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ei(t)}catch(g){throw g===ws?Lr:g}else s=t;t=Dt();var l=t.queue,u=l.dispatch;return o!==t.memoizedState&&(Ve.flags|=2048,Ms(9,{destroy:void 0},iT.bind(null,l,o),null)),[s,u,e]}function iT(e,t){e.action=t}function Gm(e){var t=Dt(),o=ft;if(o!==null)return Vm(t,o,e);Dt(),t=t.memoizedState,o=Dt();var s=o.queue.dispatch;return o.memoizedState=e,[t,s,!1]}function Ms(e,t,o,s){return e={tag:e,create:o,deps:s,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Gr(),Ve.updateQueue=t),o=t.lastEffect,o===null?t.lastEffect=e.next=e:(s=o.next,o.next=e,e.next=s,t.lastEffect=e),e}function Xm(){return Dt().memoizedState}function Kr(e,t,o,s){var l=nn();Ve.flags|=e,l.memoizedState=Ms(1|t,{destroy:void 0},o,s===void 0?null:s)}function Qr(e,t,o,s){var l=Dt();s=s===void 0?null:s;var u=l.memoizedState.inst;ft!==null&&s!==null&&Bu(s,ft.memoizedState.deps)?l.memoizedState=Ms(t,u,o,s):(Ve.flags|=e,l.memoizedState=Ms(1|t,u,o,s))}function Fm(e,t){Kr(8390656,8,e,t)}function Qu(e,t){Qr(2048,8,e,t)}function rT(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=Gr(),Ve.updateQueue=t,t.events=[e];else{var o=t.events;o===null?t.events=[e]:o.push(e)}}function Km(e){var t=Dt().memoizedState;return rT({ref:t,nextImpl:e}),function(){if((rt&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Qm(e,t){return Qr(4,2,e,t)}function Zm(e,t){return Qr(4,4,e,t)}function Wm(e,t){if(typeof t=="function"){e=e();var o=t(e);return function(){typeof o=="function"?o():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $m(e,t,o){o=o!=null?o.concat([e]):null,Qr(4,4,Wm.bind(null,t,e),o)}function Zu(){}function Jm(e,t){var o=Dt();t=t===void 0?null:t;var s=o.memoizedState;return t!==null&&Bu(t,s[1])?s[0]:(o.memoizedState=[e,t],e)}function eg(e,t){var o=Dt();t=t===void 0?null:t;var s=o.memoizedState;if(t!==null&&Bu(t,s[1]))return s[0];if(s=e(),Ua){ot(!0);try{e()}finally{ot(!1)}}return o.memoizedState=[s,t],s}function Wu(e,t,o){return o===void 0||(ho&1073741824)!==0&&(et&261930)===0?e.memoizedState=t:(e.memoizedState=o,e=ty(),Ve.lanes|=e,na|=e,o)}function tg(e,t,o,s){return yn(o,t)?o:Os.current!==null?(e=Wu(e,o,s),yn(e,t)||(Ht=!0),e):(ho&42)===0||(ho&1073741824)!==0&&(et&261930)===0?(Ht=!0,e.memoizedState=o):(e=ty(),Ve.lanes|=e,na|=e,t)}function ng(e,t,o,s,l){var u=X.p;X.p=u!==0&&8>u?u:8;var g=z.T,E={};z.T=E,ef(e,!1,t,o);try{var L=l(),J=z.S;if(J!==null&&J(E,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=nT(L,s);wi(e,t,re,En(e))}else wi(e,t,s,En(e))}catch(ue){wi(e,t,{then:function(){},status:"rejected",reason:ue},En())}finally{X.p=u,g!==null&&E.types!==null&&(g.types=E.types),z.T=g}}function lT(){}function $u(e,t,o,s){if(e.tag!==5)throw Error(r(476));var l=og(e).queue;ng(e,l,t,F,o===null?lT:function(){return ag(e),o(s)})}function og(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:F},next:null};var o={};return t.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:o},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ag(e){var t=og(e);t.next===null&&(t=e.alternate.memoizedState),wi(e,t.next.queue,{},En())}function Ju(){return Kt(Ii)}function sg(){return Dt().memoizedState}function ig(){return Dt().memoizedState}function cT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var o=En();e=Zo(o);var s=Wo(t,e,o);s!==null&&(pn(s,t,o),bi(s,t,o)),t={cache:Au()},e.payload=t;return}t=t.return}}function uT(e,t,o){var s=En();o={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Zr(e)?lg(t,o):(o=yu(e,t,o,s),o!==null&&(pn(o,e,s),cg(o,t,s)))}function rg(e,t,o){var s=En();wi(e,t,o,s)}function wi(e,t,o,s){var l={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Zr(e))lg(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,E=u(g,o);if(l.hasEagerState=!0,l.eagerState=E,yn(E,g))return Nr(e,t,l,0),gt===null&&Mr(),!1}catch{}if(o=yu(e,t,l,s),o!==null)return pn(o,e,s),cg(o,t,s),!0}return!1}function ef(e,t,o,s){if(s={lane:2,revertLane:zf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Zr(e)){if(t)throw Error(r(479))}else t=yu(e,o,s,2),t!==null&&pn(t,e,2)}function Zr(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function lg(e,t){Cs=qr=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function cg(e,t,o){if((o&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,o|=s,t.lanes=o,Po(e,o)}}var Ri={readContext:Kt,use:Xr,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot,useHostTransitionStatus:Ot,useFormState:Ot,useActionState:Ot,useOptimistic:Ot,useMemoCache:Ot,useCacheRefresh:Ot};Ri.useEffectEvent=Ot;var ug={readContext:Kt,use:Xr,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:Fm,useImperativeHandle:function(e,t,o){o=o!=null?o.concat([e]):null,Kr(4194308,4,Wm.bind(null,t,e),o)},useLayoutEffect:function(e,t){return Kr(4194308,4,e,t)},useInsertionEffect:function(e,t){Kr(4,2,e,t)},useMemo:function(e,t){var o=nn();t=t===void 0?null:t;var s=e();if(Ua){ot(!0);try{e()}finally{ot(!1)}}return o.memoizedState=[s,t],s},useReducer:function(e,t,o){var s=nn();if(o!==void 0){var l=o(t);if(Ua){ot(!0);try{o(t)}finally{ot(!1)}}}else l=t;return s.memoizedState=s.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},s.queue=e,e=e.dispatch=uT.bind(null,Ve,e),[s.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:function(e){e=Fu(e);var t=e.queue,o=rg.bind(null,Ve,t);return t.dispatch=o,[e.memoizedState,o]},useDebugValue:Zu,useDeferredValue:function(e,t){var o=nn();return Wu(o,e,t)},useTransition:function(){var e=Fu(!1);return e=ng.bind(null,Ve,e.queue,!0,!1),nn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,o){var s=Ve,l=nn();if(nt){if(o===void 0)throw Error(r(407));o=o()}else{if(o=t(),gt===null)throw Error(r(349));(et&127)!==0||Dm(s,t,o)}l.memoizedState=o;var u={value:o,getSnapshot:t};return l.queue=u,Fm(zm.bind(null,s,u,e),[e]),s.flags|=2048,Ms(9,{destroy:void 0},_m.bind(null,s,u,o,t),null),o},useId:function(){var e=nn(),t=gt.identifierPrefix;if(nt){var o=eo,s=Jn;o=(s&~(1<<32-mt(s)-1)).toString(32)+o,t="_"+t+"R_"+o,o=Vr++,0<o&&(t+="H"+o.toString(32)),t+="_"}else o=oT++,t="_"+t+"r_"+o.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ju,useFormState:Ym,useActionState:Ym,useOptimistic:function(e){var t=nn();t.memoizedState=t.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=o,t=ef.bind(null,Ve,!0,o),o.dispatch=t,[e,t]},useMemoCache:Vu,useCacheRefresh:function(){return nn().memoizedState=cT.bind(null,Ve)},useEffectEvent:function(e){var t=nn(),o={impl:e};return t.memoizedState=o,function(){if((rt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},tf={readContext:Kt,use:Xr,useCallback:Jm,useContext:Kt,useEffect:Qu,useImperativeHandle:$m,useInsertionEffect:Qm,useLayoutEffect:Zm,useMemo:eg,useReducer:Fr,useRef:Xm,useState:function(){return Fr(mo)},useDebugValue:Zu,useDeferredValue:function(e,t){var o=Dt();return tg(o,ft.memoizedState,e,t)},useTransition:function(){var e=Fr(mo)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:Ei(e),t]},useSyncExternalStore:Nm,useId:sg,useHostTransitionStatus:Ju,useFormState:qm,useActionState:qm,useOptimistic:function(e,t){var o=Dt();return Hm(o,ft,e,t)},useMemoCache:Vu,useCacheRefresh:ig};tf.useEffectEvent=Km;var fg={readContext:Kt,use:Xr,useCallback:Jm,useContext:Kt,useEffect:Qu,useImperativeHandle:$m,useInsertionEffect:Qm,useLayoutEffect:Zm,useMemo:eg,useReducer:Xu,useRef:Xm,useState:function(){return Xu(mo)},useDebugValue:Zu,useDeferredValue:function(e,t){var o=Dt();return ft===null?Wu(o,e,t):tg(o,ft.memoizedState,e,t)},useTransition:function(){var e=Xu(mo)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:Ei(e),t]},useSyncExternalStore:Nm,useId:sg,useHostTransitionStatus:Ju,useFormState:Gm,useActionState:Gm,useOptimistic:function(e,t){var o=Dt();return ft!==null?Hm(o,ft,e,t):(o.baseState=e,[e,o.queue.dispatch])},useMemoCache:Vu,useCacheRefresh:ig};fg.useEffectEvent=Km;function nf(e,t,o,s){t=e.memoizedState,o=o(s,t),o=o==null?t:x({},t,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var of={enqueueSetState:function(e,t,o){e=e._reactInternals;var s=En(),l=Zo(s);l.payload=t,o!=null&&(l.callback=o),t=Wo(e,l,s),t!==null&&(pn(t,e,s),bi(t,e,s))},enqueueReplaceState:function(e,t,o){e=e._reactInternals;var s=En(),l=Zo(s);l.tag=1,l.payload=t,o!=null&&(l.callback=o),t=Wo(e,l,s),t!==null&&(pn(t,e,s),bi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var o=En(),s=Zo(o);s.tag=2,t!=null&&(s.callback=t),t=Wo(e,s,o),t!==null&&(pn(t,e,o),bi(t,e,o))}};function dg(e,t,o,s,l,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,g):t.prototype&&t.prototype.isPureReactComponent?!fi(o,s)||!fi(l,u):!0}function pg(e,t,o,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,s),t.state!==e&&of.enqueueReplaceState(t,t.state,null)}function Ba(e,t){var o=t;if("ref"in t){o={};for(var s in t)s!=="ref"&&(o[s]=t[s])}if(e=e.defaultProps){o===t&&(o=x({},o));for(var l in e)o[l]===void 0&&(o[l]=e[l])}return o}function hg(e){Ar(e)}function mg(e){console.error(e)}function gg(e){Ar(e)}function Wr(e,t){try{var o=e.onUncaughtError;o(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function yg(e,t,o){try{var s=e.onCaughtError;s(o.value,{componentStack:o.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function af(e,t,o){return o=Zo(o),o.tag=3,o.payload={element:null},o.callback=function(){Wr(e,t)},o}function vg(e){return e=Zo(e),e.tag=3,e}function bg(e,t,o,s){var l=o.type.getDerivedStateFromError;if(typeof l=="function"){var u=s.value;e.payload=function(){return l(u)},e.callback=function(){yg(t,o,s)}}var g=o.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){yg(t,o,s),typeof l!="function"&&(oa===null?oa=new Set([this]):oa.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})})}function fT(e,t,o,s,l){if(o.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=o.alternate,t!==null&&Ss(t,o,l,!0),o=bn.current,o!==null){switch(o.tag){case 31:case 13:return Hn===null?cl():o.alternate===null&&Ct===0&&(Ct=3),o.flags&=-257,o.flags|=65536,o.lanes=l,s===Ur?o.flags|=16384:(t=o.updateQueue,t===null?o.updateQueue=new Set([s]):t.add(s),Nf(e,s,l)),!1;case 22:return o.flags|=65536,s===Ur?o.flags|=16384:(t=o.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},o.updateQueue=t):(o=t.retryQueue,o===null?t.retryQueue=new Set([s]):o.add(s)),Nf(e,s,l)),!1}throw Error(r(435,o.tag))}return Nf(e,s,l),cl(),!1}if(nt)return t=bn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,s!==Eu&&(e=Error(r(422),{cause:s}),hi(_n(e,o)))):(s!==Eu&&(t=Error(r(423),{cause:s}),hi(_n(t,o))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,s=_n(s,o),l=af(e.stateNode,s,l),ku(e,l),Ct!==4&&(Ct=2)),!1;var u=Error(r(520),{cause:s});if(u=_n(u,o),zi===null?zi=[u]:zi.push(u),Ct!==4&&(Ct=2),t===null)return!0;s=_n(s,o),o=t;do{switch(o.tag){case 3:return o.flags|=65536,e=l&-l,o.lanes|=e,e=af(o.stateNode,s,e),ku(o,e),!1;case 1:if(t=o.type,u=o.stateNode,(o.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(oa===null||!oa.has(u))))return o.flags|=65536,l&=-l,o.lanes|=l,l=vg(l),bg(l,e,o,s),ku(o,l),!1}o=o.return}while(o!==null);return!1}var sf=Error(r(461)),Ht=!1;function Qt(e,t,o,s){t.child=e===null?Em(t,null,o,s):La(t,e.child,o,s)}function xg(e,t,o,s,l){o=o.render;var u=t.ref;if("ref"in s){var g={};for(var E in s)E!=="ref"&&(g[E]=s[E])}else g=s;return za(t),s=Pu(e,t,o,g,u,l),E=Iu(),e!==null&&!Ht?(Yu(e,t,l),go(e,t,l)):(nt&&E&&Su(t),t.flags|=1,Qt(e,t,s,l),t.child)}function Sg(e,t,o,s,l){if(e===null){var u=o.type;return typeof u=="function"&&!vu(u)&&u.defaultProps===void 0&&o.compare===null?(t.tag=15,t.type=u,Tg(e,t,u,s,l)):(e=_r(o.type,null,s,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!hf(e,l)){var g=u.memoizedProps;if(o=o.compare,o=o!==null?o:fi,o(g,s)&&e.ref===t.ref)return go(e,t,l)}return t.flags|=1,e=co(u,s),e.ref=t.ref,e.return=t,t.child=e}function Tg(e,t,o,s,l){if(e!==null){var u=e.memoizedProps;if(fi(u,s)&&e.ref===t.ref)if(Ht=!1,t.pendingProps=s=u,hf(e,l))(e.flags&131072)!==0&&(Ht=!0);else return t.lanes=e.lanes,go(e,t,l)}return rf(e,t,o,s,l)}function Eg(e,t,o,s){var l=s.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|o:o,e!==null){for(s=t.child=e.child,l=0;s!==null;)l=l|s.lanes|s.childLanes,s=s.sibling;s=l&~u}else s=0,t.child=null;return wg(e,t,u,o,s)}if((o&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hr(t,u!==null?u.cachePool:null),u!==null?Om(t,u):Hu(),Cm(t);else return s=t.lanes=536870912,wg(e,t,u!==null?u.baseLanes|o:o,o,s)}else u!==null?(Hr(t,u.cachePool),Om(t,u),Jo(),t.memoizedState=null):(e!==null&&Hr(t,null),Hu(),Jo());return Qt(e,t,l,o),t.child}function Oi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wg(e,t,o,s,l){var u=Nu();return u=u===null?null:{parent:kt._currentValue,pool:u},t.memoizedState={baseLanes:o,cachePool:u},e!==null&&Hr(t,null),Hu(),Cm(t),e!==null&&Ss(e,t,s,!0),t.childLanes=l,null}function $r(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Rg(e,t,o){return La(t,e.child,null,o),e=$r(t,t.pendingProps),e.flags|=2,xn(t),t.memoizedState=null,e}function dT(e,t,o){var s=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(nt){if(s.mode==="hidden")return e=$r(t,s),t.lanes=536870912,Oi(null,e);if(Uu(t),(e=vt)?(e=Ly(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Go!==null?{id:Jn,overflow:eo}:null,retryLane:536870912,hydrationErrors:null},o=lm(e),o.return=t,t.child=o,Ft=t,vt=null)):e=null,e===null)throw Fo(t);return t.lanes=536870912,null}return $r(t,s)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(Uu(t),l)if(t.flags&256)t.flags&=-257,t=Rg(e,t,o);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Ht||Ss(e,t,o,!1),l=(o&e.childLanes)!==0,Ht||l){if(s=gt,s!==null&&(g=Io(s,o),g!==0&&g!==u.retryLane))throw u.retryLane=g,Ma(e,g),pn(s,e,g),sf;cl(),t=Rg(e,t,o)}else e=u.treeContext,vt=Ln(g.nextSibling),Ft=t,nt=!0,Xo=null,jn=!1,e!==null&&fm(t,e),t=$r(t,s),t.flags|=4096;return t}return e=co(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jr(e,t){var o=t.ref;if(o===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(r(284));(e===null||e.ref!==o)&&(t.flags|=4194816)}}function rf(e,t,o,s,l){return za(t),o=Pu(e,t,o,s,void 0,l),s=Iu(),e!==null&&!Ht?(Yu(e,t,l),go(e,t,l)):(nt&&s&&Su(t),t.flags|=1,Qt(e,t,o,l),t.child)}function Og(e,t,o,s,l,u){return za(t),t.updateQueue=null,o=Mm(t,s,o,l),Am(e),s=Iu(),e!==null&&!Ht?(Yu(e,t,u),go(e,t,u)):(nt&&s&&Su(t),t.flags|=1,Qt(e,t,o,u),t.child)}function Cg(e,t,o,s,l){if(za(t),t.stateNode===null){var u=ys,g=o.contextType;typeof g=="object"&&g!==null&&(u=Kt(g)),u=new o(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=of,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},_u(t),g=o.contextType,u.context=typeof g=="object"&&g!==null?Kt(g):ys,u.state=t.memoizedState,g=o.getDerivedStateFromProps,typeof g=="function"&&(nf(t,o,g,s),u.state=t.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&of.enqueueReplaceState(u,u.state,null),Si(t,s,u,l),xi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var E=t.memoizedProps,L=Ba(o,E);u.props=L;var J=u.context,re=o.contextType;g=ys,typeof re=="object"&&re!==null&&(g=Kt(re));var ue=o.getDerivedStateFromProps;re=typeof ue=="function"||typeof u.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(E||J!==g)&&pg(t,u,s,g),Qo=!1;var ee=t.memoizedState;u.state=ee,Si(t,s,u,l),xi(),J=t.memoizedState,E||ee!==J||Qo?(typeof ue=="function"&&(nf(t,o,ue,s),J=t.memoizedState),(L=Qo||dg(t,o,L,s,ee,J,g))?(re||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=J),u.props=s,u.state=J,u.context=g,s=L):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,zu(e,t),g=t.memoizedProps,re=Ba(o,g),u.props=re,ue=t.pendingProps,ee=u.context,J=o.contextType,L=ys,typeof J=="object"&&J!==null&&(L=Kt(J)),E=o.getDerivedStateFromProps,(J=typeof E=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==ue||ee!==L)&&pg(t,u,s,L),Qo=!1,ee=t.memoizedState,u.state=ee,Si(t,s,u,l),xi();var oe=t.memoizedState;g!==ue||ee!==oe||Qo||e!==null&&e.dependencies!==null&&kr(e.dependencies)?(typeof E=="function"&&(nf(t,o,E,s),oe=t.memoizedState),(re=Qo||dg(t,o,re,s,ee,oe,L)||e!==null&&e.dependencies!==null&&kr(e.dependencies))?(J||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,oe,L),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,oe,L)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=oe),u.props=s,u.state=oe,u.context=L,s=re):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Jr(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,o=s&&typeof o.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=La(t,e.child,null,l),t.child=La(t,null,o,l)):Qt(e,t,o,l),t.memoizedState=u.state,e=t.child):e=go(e,t,l),e}function Ag(e,t,o,s){return Da(),t.flags|=256,Qt(e,t,o,s),t.child}var lf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cf(e){return{baseLanes:e,cachePool:ym()}}function uf(e,t,o){return e=e!==null?e.childLanes&~o:0,t&&(e|=Tn),e}function Mg(e,t,o){var s=t.pendingProps,l=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(Nt.current&2)!==0),g&&(l=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(nt){if(l?$o(t):Jo(),(e=vt)?(e=Ly(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Go!==null?{id:Jn,overflow:eo}:null,retryLane:536870912,hydrationErrors:null},o=lm(e),o.return=t,t.child=o,Ft=t,vt=null)):e=null,e===null)throw Fo(t);return Xf(e)?t.lanes=32:t.lanes=536870912,null}var E=s.children;return s=s.fallback,l?(Jo(),l=t.mode,E=el({mode:"hidden",children:E},l),s=Na(s,l,o,null),E.return=t,s.return=t,E.sibling=s,t.child=E,s=t.child,s.memoizedState=cf(o),s.childLanes=uf(e,g,o),t.memoizedState=lf,Oi(null,s)):($o(t),ff(t,E))}var L=e.memoizedState;if(L!==null&&(E=L.dehydrated,E!==null)){if(u)t.flags&256?($o(t),t.flags&=-257,t=df(e,t,o)):t.memoizedState!==null?(Jo(),t.child=e.child,t.flags|=128,t=null):(Jo(),E=s.fallback,l=t.mode,s=el({mode:"visible",children:s.children},l),E=Na(E,l,o,null),E.flags|=2,s.return=t,E.return=t,s.sibling=E,t.child=s,La(t,e.child,null,o),s=t.child,s.memoizedState=cf(o),s.childLanes=uf(e,g,o),t.memoizedState=lf,t=Oi(null,s));else if($o(t),Xf(E)){if(g=E.nextSibling&&E.nextSibling.dataset,g)var J=g.dgst;g=J,s=Error(r(419)),s.stack="",s.digest=g,hi({value:s,source:null,stack:null}),t=df(e,t,o)}else if(Ht||Ss(e,t,o,!1),g=(o&e.childLanes)!==0,Ht||g){if(g=gt,g!==null&&(s=Io(g,o),s!==0&&s!==L.retryLane))throw L.retryLane=s,Ma(e,s),pn(g,e,s),sf;Gf(E)||cl(),t=df(e,t,o)}else Gf(E)?(t.flags|=192,t.child=e.child,t=null):(e=L.treeContext,vt=Ln(E.nextSibling),Ft=t,nt=!0,Xo=null,jn=!1,e!==null&&fm(t,e),t=ff(t,s.children),t.flags|=4096);return t}return l?(Jo(),E=s.fallback,l=t.mode,L=e.child,J=L.sibling,s=co(L,{mode:"hidden",children:s.children}),s.subtreeFlags=L.subtreeFlags&65011712,J!==null?E=co(J,E):(E=Na(E,l,o,null),E.flags|=2),E.return=t,s.return=t,s.sibling=E,t.child=s,Oi(null,s),s=t.child,E=e.child.memoizedState,E===null?E=cf(o):(l=E.cachePool,l!==null?(L=kt._currentValue,l=l.parent!==L?{parent:L,pool:L}:l):l=ym(),E={baseLanes:E.baseLanes|o,cachePool:l}),s.memoizedState=E,s.childLanes=uf(e,g,o),t.memoizedState=lf,Oi(e.child,s)):($o(t),o=e.child,e=o.sibling,o=co(o,{mode:"visible",children:s.children}),o.return=t,o.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=o,t.memoizedState=null,o)}function ff(e,t){return t=el({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=vn(22,e,null,t),e.lanes=0,e}function df(e,t,o){return La(t,e.child,null,o),e=ff(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ng(e,t,o){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ou(e.return,t,o)}function pf(e,t,o,s,l,u){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:l,treeForkCount:u}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=s,g.tail=o,g.tailMode=l,g.treeForkCount=u)}function Dg(e,t,o){var s=t.pendingProps,l=s.revealOrder,u=s.tail;s=s.children;var g=Nt.current,E=(g&2)!==0;if(E?(g=g&1|2,t.flags|=128):g&=1,ne(Nt,g),Qt(e,t,s,o),s=nt?pi:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ng(e,o,t);else if(e.tag===19)Ng(e,o,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(l){case"forwards":for(o=t.child,l=null;o!==null;)e=o.alternate,e!==null&&Yr(e)===null&&(l=o),o=o.sibling;o=l,o===null?(l=t.child,t.child=null):(l=o.sibling,o.sibling=null),pf(t,!1,l,o,u,s);break;case"backwards":case"unstable_legacy-backwards":for(o=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Yr(e)===null){t.child=l;break}e=l.sibling,l.sibling=o,o=l,l=e}pf(t,!0,o,null,u,s);break;case"together":pf(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function go(e,t,o){if(e!==null&&(t.dependencies=e.dependencies),na|=t.lanes,(o&t.childLanes)===0)if(e!==null){if(Ss(e,t,o,!1),(o&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,o=co(e,e.pendingProps),t.child=o,o.return=t;e.sibling!==null;)e=e.sibling,o=o.sibling=co(e,e.pendingProps),o.return=t;o.sibling=null}return t.child}function hf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&kr(e)))}function pT(e,t,o){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),Ko(t,kt,e.memoizedState.cache),Da();break;case 27:case 5:_e(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:Ko(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uu(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?($o(t),t.flags|=128,null):(o&t.child.childLanes)!==0?Mg(e,t,o):($o(t),e=go(e,t,o),e!==null?e.sibling:null);$o(t);break;case 19:var l=(e.flags&128)!==0;if(s=(o&t.childLanes)!==0,s||(Ss(e,t,o,!1),s=(o&t.childLanes)!==0),l){if(s)return Dg(e,t,o);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ne(Nt,Nt.current),s)break;return null;case 22:return t.lanes=0,Eg(e,t,o,t.pendingProps);case 24:Ko(t,kt,e.memoizedState.cache)}return go(e,t,o)}function _g(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ht=!0;else{if(!hf(e,o)&&(t.flags&128)===0)return Ht=!1,pT(e,t,o);Ht=(e.flags&131072)!==0}else Ht=!1,nt&&(t.flags&1048576)!==0&&um(t,pi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e=="function")vu(e)?(s=Ba(e,s),t.tag=1,t=Cg(null,t,e,s,o)):(t.tag=0,t=rf(null,t,e,s,o));else{if(e!=null){var l=e.$$typeof;if(l===D){t.tag=11,t=xg(null,t,e,s,o);break e}else if(l===j){t.tag=14,t=Sg(null,t,e,s,o);break e}}throw t=te(e)||e,Error(r(306,t,""))}}return t;case 0:return rf(e,t,t.type,t.pendingProps,o);case 1:return s=t.type,l=Ba(s,t.pendingProps),Cg(e,t,s,l,o);case 3:e:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var u=t.memoizedState;l=u.element,zu(e,t),Si(t,s,null,o);var g=t.memoizedState;if(s=g.cache,Ko(t,kt,s),s!==u.cache&&Cu(t,[kt],o,!0),xi(),s=g.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Ag(e,t,s,o);break e}else if(s!==l){l=_n(Error(r(424)),t),hi(l),t=Ag(e,t,s,o);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,vt=Ln(e.firstChild),Ft=t,nt=!0,Xo=null,jn=!0,o=Em(t,null,s,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Da(),s===l){t=go(e,t,o);break e}Qt(e,t,s,o)}t=t.child}return t;case 26:return Jr(e,t),e===null?(o=qy(t.type,null,t.pendingProps,null))?t.memoizedState=o:nt||(o=t.type,e=t.pendingProps,s=gl(se.current).createElement(o),s[Xt]=t,s[rn]=e,Zt(s,o,e),qt(s),t.stateNode=s):t.memoizedState=qy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&nt&&(s=t.stateNode=Py(t.type,t.pendingProps,se.current),Ft=t,jn=!0,l=vt,ra(t.type)?(Ff=l,vt=Ln(s.firstChild)):vt=l),Qt(e,t,t.pendingProps.children,o),Jr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&nt&&((l=s=vt)&&(s=qT(s,t.type,t.pendingProps,jn),s!==null?(t.stateNode=s,Ft=t,vt=Ln(s.firstChild),jn=!1,l=!0):l=!1),l||Fo(t)),_e(t),l=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,s=u.children,Yf(l,u)?s=null:g!==null&&Yf(l,g)&&(t.flags|=32),t.memoizedState!==null&&(l=Pu(e,t,aT,null,null,o),Ii._currentValue=l),Jr(e,t),Qt(e,t,s,o),t.child;case 6:return e===null&&nt&&((e=o=vt)&&(o=VT(o,t.pendingProps,jn),o!==null?(t.stateNode=o,Ft=t,vt=null,e=!0):e=!1),e||Fo(t)),null;case 13:return Mg(e,t,o);case 4:return pe(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=La(t,null,s,o):Qt(e,t,s,o),t.child;case 11:return xg(e,t,t.type,t.pendingProps,o);case 7:return Qt(e,t,t.pendingProps,o),t.child;case 8:return Qt(e,t,t.pendingProps.children,o),t.child;case 12:return Qt(e,t,t.pendingProps.children,o),t.child;case 10:return s=t.pendingProps,Ko(t,t.type,s.value),Qt(e,t,s.children,o),t.child;case 9:return l=t.type._context,s=t.pendingProps.children,za(t),l=Kt(l),s=s(l),t.flags|=1,Qt(e,t,s,o),t.child;case 14:return Sg(e,t,t.type,t.pendingProps,o);case 15:return Tg(e,t,t.type,t.pendingProps,o);case 19:return Dg(e,t,o);case 31:return dT(e,t,o);case 22:return Eg(e,t,o,t.pendingProps);case 24:return za(t),s=Kt(kt),e===null?(l=Nu(),l===null&&(l=gt,u=Au(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=o),l=u),t.memoizedState={parent:s,cache:l},_u(t),Ko(t,kt,l)):((e.lanes&o)!==0&&(zu(e,t),Si(t,null,null,o),xi()),l=e.memoizedState,u=t.memoizedState,l.parent!==s?(l={parent:s,cache:s},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ko(t,kt,s)):(s=u.cache,Ko(t,kt,s),s!==l.cache&&Cu(t,[kt],o,!0))),Qt(e,t,t.pendingProps.children,o),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function yo(e){e.flags|=4}function mf(e,t,o,s,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(sy())e.flags|=8192;else throw Ha=Ur,Du}else e.flags&=-16777217}function zg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ky(t))if(sy())e.flags|=8192;else throw Ha=Ur,Du}function tl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?sn():536870912,e.lanes|=t,zs|=t)}function Ci(e,t){if(!nt)switch(e.tailMode){case"hidden":t=e.tail;for(var o=null;t!==null;)t.alternate!==null&&(o=t),t=t.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=0,s=0;if(t)for(var l=e.child;l!==null;)o|=l.lanes|l.childLanes,s|=l.subtreeFlags&65011712,s|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)o|=l.lanes|l.childLanes,s|=l.subtreeFlags,s|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=s,e.childLanes=o,t}function hT(e,t,o){var s=t.pendingProps;switch(Tu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return bt(t),null;case 3:return o=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),po(kt),ge(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(xs(t)?yo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wu())),bt(t),null;case 26:var l=t.type,u=t.memoizedState;return e===null?(yo(t),u!==null?(bt(t),zg(t,u)):(bt(t),mf(t,l,null,s,o))):u?u!==e.memoizedState?(yo(t),bt(t),zg(t,u)):(bt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&yo(t),bt(t),mf(t,l,e,s,o)),null;case 27:if(je(t),o=se.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&yo(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return bt(t),null}e=Z.current,xs(t)?dm(t):(e=Py(l,s,o),t.stateNode=e,yo(t))}return bt(t),null;case 5:if(je(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&yo(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return bt(t),null}if(u=Z.current,xs(t))dm(t);else{var g=gl(se.current);switch(u){case 1:u=g.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:u=g.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":u=g.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":u=g.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":u=g.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?g.createElement(l,{is:s.is}):g.createElement(l)}}u[Xt]=t,u[rn]=s;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)u.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=u;e:switch(Zt(u,l,s),l){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&yo(t)}}return bt(t),mf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,o),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&yo(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=se.current,xs(t)){if(e=t.stateNode,o=t.memoizedProps,s=null,l=Ft,l!==null)switch(l.tag){case 27:case 5:s=l.memoizedProps}e[Xt]=t,e=!!(e.nodeValue===o||s!==null&&s.suppressHydrationWarning===!0||My(e.nodeValue,o)),e||Fo(t,!0)}else e=gl(e).createTextNode(s),e[Xt]=t,t.stateNode=e}return bt(t),null;case 31:if(o=t.memoizedState,e===null||e.memoizedState!==null){if(s=xs(t),o!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Xt]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),e=!1}else o=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return t.flags&256?(xn(t),t):(xn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return bt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=xs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!l)throw Error(r(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));l[Xt]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),l=!1}else l=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(xn(t),t):(xn(t),null)}return xn(t),(t.flags&128)!==0?(t.lanes=o,t):(o=s!==null,e=e!==null&&e.memoizedState!==null,o&&(s=t.child,l=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(l=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==l&&(s.flags|=2048)),o!==e&&o&&(t.child.flags|=8192),tl(t,t.updateQueue),bt(t),null);case 4:return ge(),e===null&&Lf(t.stateNode.containerInfo),bt(t),null;case 10:return po(t.type),bt(t),null;case 19:if(G(Nt),s=t.memoizedState,s===null)return bt(t),null;if(l=(t.flags&128)!==0,u=s.rendering,u===null)if(l)Ci(s,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Yr(e),u!==null){for(t.flags|=128,Ci(s,!1),e=u.updateQueue,t.updateQueue=e,tl(t,e),t.subtreeFlags=0,e=o,o=t.child;o!==null;)rm(o,e),o=o.sibling;return ne(Nt,Nt.current&1|2),nt&&uo(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&fe()>il&&(t.flags|=128,l=!0,Ci(s,!1),t.lanes=4194304)}else{if(!l)if(e=Yr(u),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,tl(t,e),Ci(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!nt)return bt(t),null}else 2*fe()-s.renderingStartTime>il&&o!==536870912&&(t.flags|=128,l=!0,Ci(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=fe(),e.sibling=null,o=Nt.current,ne(Nt,l?o&1|2:o&1),nt&&uo(t,s.treeForkCount),e):(bt(t),null);case 22:case 23:return xn(t),Lu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(o&536870912)!==0&&(t.flags&128)===0&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),o=t.updateQueue,o!==null&&tl(t,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==o&&(t.flags|=2048),e!==null&&G(ka),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),po(kt),bt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function mT(e,t){switch(Tu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return po(kt),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(xn(t),t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Nt),null;case 4:return ge(),null;case 10:return po(t.type),null;case 22:case 23:return xn(t),Lu(),e!==null&&G(ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return po(kt),null;case 25:return null;default:return null}}function kg(e,t){switch(Tu(t),t.tag){case 3:po(kt),ge();break;case 26:case 27:case 5:je(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&xn(t);break;case 13:xn(t);break;case 19:G(Nt);break;case 10:po(t.type);break;case 22:case 23:xn(t),Lu(),e!==null&&G(ka);break;case 24:po(kt)}}function Ai(e,t){try{var o=t.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var l=s.next;o=l;do{if((o.tag&e)===e){s=void 0;var u=o.create,g=o.inst;s=u(),g.destroy=s}o=o.next}while(o!==l)}}catch(E){ct(t,t.return,E)}}function ea(e,t,o){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var u=l.next;s=u;do{if((s.tag&e)===e){var g=s.inst,E=g.destroy;if(E!==void 0){g.destroy=void 0,l=t;var L=o,J=E;try{J()}catch(re){ct(l,L,re)}}}s=s.next}while(s!==u)}}catch(re){ct(t,t.return,re)}}function jg(e){var t=e.updateQueue;if(t!==null){var o=e.stateNode;try{Rm(t,o)}catch(s){ct(e,e.return,s)}}}function Hg(e,t,o){o.props=Ba(e.type,e.memoizedProps),o.state=e.memoizedState;try{o.componentWillUnmount()}catch(s){ct(e,t,s)}}function Mi(e,t){try{var o=e.ref;if(o!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof o=="function"?e.refCleanup=o(s):o.current=s}}catch(l){ct(e,t,l)}}function to(e,t){var o=e.ref,s=e.refCleanup;if(o!==null)if(typeof s=="function")try{s()}catch(l){ct(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(l){ct(e,t,l)}else o.current=null}function Lg(e){var t=e.type,o=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":o.autoFocus&&s.focus();break e;case"img":o.src?s.src=o.src:o.srcSet&&(s.srcset=o.srcSet)}}catch(l){ct(e,e.return,l)}}function gf(e,t,o){try{var s=e.stateNode;LT(s,e.type,o,t),s[rn]=t}catch(l){ct(e,e.return,l)}}function Ug(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ra(e.type)||e.tag===4}function yf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ug(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&&ra(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 vf(e,t,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(e,t):(t=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,t.appendChild(e),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=ro));else if(s!==4&&(s===27&&ra(e.type)&&(o=e.stateNode,t=null),e=e.child,e!==null))for(vf(e,t,o),e=e.sibling;e!==null;)vf(e,t,o),e=e.sibling}function nl(e,t,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(s!==4&&(s===27&&ra(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(nl(e,t,o),e=e.sibling;e!==null;)nl(e,t,o),e=e.sibling}function Bg(e){var t=e.stateNode,o=e.memoizedProps;try{for(var s=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Zt(t,s,o),t[Xt]=e,t[rn]=o}catch(u){ct(e,e.return,u)}}var vo=!1,Lt=!1,bf=!1,Pg=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function gT(e,t){if(e=e.containerInfo,Pf=El,e=$h(e),fu(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var l=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{o.nodeType,u.nodeType}catch{o=null;break e}var g=0,E=-1,L=-1,J=0,re=0,ue=e,ee=null;t:for(;;){for(var oe;ue!==o||l!==0&&ue.nodeType!==3||(E=g+l),ue!==u||s!==0&&ue.nodeType!==3||(L=g+s),ue.nodeType===3&&(g+=ue.nodeValue.length),(oe=ue.firstChild)!==null;)ee=ue,ue=oe;for(;;){if(ue===e)break t;if(ee===o&&++J===l&&(E=g),ee===u&&++re===s&&(L=g),(oe=ue.nextSibling)!==null)break;ue=ee,ee=ue.parentNode}ue=oe}o=E===-1||L===-1?null:{start:E,end:L}}else o=null}o=o||{start:0,end:0}}else o=null;for(If={focusedElem:e,selectionRange:o},El=!1,Vt=t;Vt!==null;)if(t=Vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Vt=e;else for(;Vt!==null;){switch(t=Vt,u=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(o=0;o<e.length;o++)l=e[o],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,o=t,l=u.memoizedProps,u=u.memoizedState,s=o.stateNode;try{var Oe=Ba(o.type,l);e=s.getSnapshotBeforeUpdate(Oe,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(He){ct(o,o.return,He)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,o=e.nodeType,o===9)Vf(e);else if(o===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Vf(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Vt=e;break}Vt=t.return}}function Ig(e,t,o){var s=o.flags;switch(o.tag){case 0:case 11:case 15:xo(e,o),s&4&&Ai(5,o);break;case 1:if(xo(e,o),s&4)if(e=o.stateNode,t===null)try{e.componentDidMount()}catch(g){ct(o,o.return,g)}else{var l=Ba(o.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){ct(o,o.return,g)}}s&64&&jg(o),s&512&&Mi(o,o.return);break;case 3:if(xo(e,o),s&64&&(e=o.updateQueue,e!==null)){if(t=null,o.child!==null)switch(o.child.tag){case 27:case 5:t=o.child.stateNode;break;case 1:t=o.child.stateNode}try{Rm(e,t)}catch(g){ct(o,o.return,g)}}break;case 27:t===null&&s&4&&Bg(o);case 26:case 5:xo(e,o),t===null&&s&4&&Lg(o),s&512&&Mi(o,o.return);break;case 12:xo(e,o);break;case 31:xo(e,o),s&4&&Vg(e,o);break;case 13:xo(e,o),s&4&&Gg(e,o),s&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(o=RT.bind(null,o),GT(e,o))));break;case 22:if(s=o.memoizedState!==null||vo,!s){t=t!==null&&t.memoizedState!==null||Lt,l=vo;var u=Lt;vo=s,(Lt=t)&&!u?So(e,o,(o.subtreeFlags&8772)!==0):xo(e,o),vo=l,Lt=u}break;case 30:break;default:xo(e,o)}}function Yg(e){var t=e.alternate;t!==null&&(e.alternate=null,Yg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Kc(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 St=null,cn=!1;function bo(e,t,o){for(o=o.child;o!==null;)qg(e,t,o),o=o.sibling}function qg(e,t,o){if(qe&&typeof qe.onCommitFiberUnmount=="function")try{qe.onCommitFiberUnmount(xe,o)}catch{}switch(o.tag){case 26:Lt||to(o,t),bo(e,t,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Lt||to(o,t);var s=St,l=cn;ra(o.type)&&(St=o.stateNode,cn=!1),bo(e,t,o),Ui(o.stateNode),St=s,cn=l;break;case 5:Lt||to(o,t);case 6:if(s=St,l=cn,St=null,bo(e,t,o),St=s,cn=l,St!==null)if(cn)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(o.stateNode)}catch(u){ct(o,t,u)}else try{St.removeChild(o.stateNode)}catch(u){ct(o,t,u)}break;case 18:St!==null&&(cn?(e=St,jy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,o.stateNode),Is(e)):jy(St,o.stateNode));break;case 4:s=St,l=cn,St=o.stateNode.containerInfo,cn=!0,bo(e,t,o),St=s,cn=l;break;case 0:case 11:case 14:case 15:ea(2,o,t),Lt||ea(4,o,t),bo(e,t,o);break;case 1:Lt||(to(o,t),s=o.stateNode,typeof s.componentWillUnmount=="function"&&Hg(o,t,s)),bo(e,t,o);break;case 21:bo(e,t,o);break;case 22:Lt=(s=Lt)||o.memoizedState!==null,bo(e,t,o),Lt=s;break;default:bo(e,t,o)}}function Vg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Is(e)}catch(o){ct(t,t.return,o)}}}function Gg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Is(e)}catch(o){ct(t,t.return,o)}}function yT(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Pg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Pg),t;default:throw Error(r(435,e.tag))}}function ol(e,t){var o=yT(e);t.forEach(function(s){if(!o.has(s)){o.add(s);var l=OT.bind(null,e,s);s.then(l,l)}})}function un(e,t){var o=t.deletions;if(o!==null)for(var s=0;s<o.length;s++){var l=o[s],u=e,g=t,E=g;e:for(;E!==null;){switch(E.tag){case 27:if(ra(E.type)){St=E.stateNode,cn=!1;break e}break;case 5:St=E.stateNode,cn=!1;break e;case 3:case 4:St=E.stateNode.containerInfo,cn=!0;break e}E=E.return}if(St===null)throw Error(r(160));qg(u,g,l),St=null,cn=!1,u=l.alternate,u!==null&&(u.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xg(t,e),t=t.sibling}var Fn=null;function Xg(e,t){var o=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:un(t,e),fn(e),s&4&&(ea(3,e,e.return),Ai(3,e),ea(5,e,e.return));break;case 1:un(t,e),fn(e),s&512&&(Lt||o===null||to(o,o.return)),s&64&&vo&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(o=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=o===null?s:o.concat(s))));break;case 26:var l=Fn;if(un(t,e),fn(e),s&512&&(Lt||o===null||to(o,o.return)),s&4){var u=o!==null?o.memoizedState:null;if(s=e.memoizedState,o===null)if(s===null)if(e.stateNode===null){e:{s=e.type,o=e.memoizedProps,l=l.ownerDocument||l;t:switch(s){case"title":u=l.getElementsByTagName("title")[0],(!u||u[ni]||u[Xt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=l.createElement(s),l.head.insertBefore(u,l.querySelector("head > title"))),Zt(u,s,o),u[Xt]=e,qt(u),s=u;break e;case"link":var g=Xy("link","href",l).get(s+(o.href||""));if(g){for(var E=0;E<g.length;E++)if(u=g[E],u.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&u.getAttribute("rel")===(o.rel==null?null:o.rel)&&u.getAttribute("title")===(o.title==null?null:o.title)&&u.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){g.splice(E,1);break t}}u=l.createElement(s),Zt(u,s,o),l.head.appendChild(u);break;case"meta":if(g=Xy("meta","content",l).get(s+(o.content||""))){for(E=0;E<g.length;E++)if(u=g[E],u.getAttribute("content")===(o.content==null?null:""+o.content)&&u.getAttribute("name")===(o.name==null?null:o.name)&&u.getAttribute("property")===(o.property==null?null:o.property)&&u.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&u.getAttribute("charset")===(o.charSet==null?null:o.charSet)){g.splice(E,1);break t}}u=l.createElement(s),Zt(u,s,o),l.head.appendChild(u);break;default:throw Error(r(468,s))}u[Xt]=e,qt(u),s=u}e.stateNode=s}else Fy(l,e.type,e.stateNode);else e.stateNode=Gy(l,s,e.memoizedProps);else u!==s?(u===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):u.count--,s===null?Fy(l,e.type,e.stateNode):Gy(l,s,e.memoizedProps)):s===null&&e.stateNode!==null&&gf(e,e.memoizedProps,o.memoizedProps)}break;case 27:un(t,e),fn(e),s&512&&(Lt||o===null||to(o,o.return)),o!==null&&s&4&&gf(e,e.memoizedProps,o.memoizedProps);break;case 5:if(un(t,e),fn(e),s&512&&(Lt||o===null||to(o,o.return)),e.flags&32){l=e.stateNode;try{us(l,"")}catch(Oe){ct(e,e.return,Oe)}}s&4&&e.stateNode!=null&&(l=e.memoizedProps,gf(e,l,o!==null?o.memoizedProps:l)),s&1024&&(bf=!0);break;case 6:if(un(t,e),fn(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,o=e.stateNode;try{o.nodeValue=s}catch(Oe){ct(e,e.return,Oe)}}break;case 3:if(bl=null,l=Fn,Fn=yl(t.containerInfo),un(t,e),Fn=l,fn(e),s&4&&o!==null&&o.memoizedState.isDehydrated)try{Is(t.containerInfo)}catch(Oe){ct(e,e.return,Oe)}bf&&(bf=!1,Fg(e));break;case 4:s=Fn,Fn=yl(e.stateNode.containerInfo),un(t,e),fn(e),Fn=s;break;case 12:un(t,e),fn(e);break;case 31:un(t,e),fn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ol(e,s)));break;case 13:un(t,e),fn(e),e.child.flags&8192&&e.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(sl=fe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ol(e,s)));break;case 22:l=e.memoizedState!==null;var L=o!==null&&o.memoizedState!==null,J=vo,re=Lt;if(vo=J||l,Lt=re||L,un(t,e),Lt=re,vo=J,fn(e),s&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(o===null||L||vo||Lt||Pa(e)),o=null,t=e;;){if(t.tag===5||t.tag===26){if(o===null){L=o=t;try{if(u=L.stateNode,l)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{E=L.stateNode;var ue=L.memoizedProps.style,ee=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;E.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(Oe){ct(L,L.return,Oe)}}}else if(t.tag===6){if(o===null){L=t;try{L.stateNode.nodeValue=l?"":L.memoizedProps}catch(Oe){ct(L,L.return,Oe)}}}else if(t.tag===18){if(o===null){L=t;try{var oe=L.stateNode;l?Hy(oe,!0):Hy(L.stateNode,!1)}catch(Oe){ct(L,L.return,Oe)}}}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;o===t&&(o=null),t=t.return}o===t&&(o=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(o=s.retryQueue,o!==null&&(s.retryQueue=null,ol(e,o))));break;case 19:un(t,e),fn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ol(e,s)));break;case 30:break;case 21:break;default:un(t,e),fn(e)}}function fn(e){var t=e.flags;if(t&2){try{for(var o,s=e.return;s!==null;){if(Ug(s)){o=s;break}s=s.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var l=o.stateNode,u=yf(e);nl(e,u,l);break;case 5:var g=o.stateNode;o.flags&32&&(us(g,""),o.flags&=-33);var E=yf(e);nl(e,E,g);break;case 3:case 4:var L=o.stateNode.containerInfo,J=yf(e);vf(e,J,L);break;default:throw Error(r(161))}}catch(re){ct(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xo(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ig(e,t.alternate,t),t=t.sibling}function Pa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ea(4,t,t.return),Pa(t);break;case 1:to(t,t.return);var o=t.stateNode;typeof o.componentWillUnmount=="function"&&Hg(t,t.return,o),Pa(t);break;case 27:Ui(t.stateNode);case 26:case 5:to(t,t.return),Pa(t);break;case 22:t.memoizedState===null&&Pa(t);break;case 30:Pa(t);break;default:Pa(t)}e=e.sibling}}function So(e,t,o){for(o=o&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,l=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:So(l,u,o),Ai(4,u);break;case 1:if(So(l,u,o),s=u,l=s.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(J){ct(s,s.return,J)}if(s=u,l=s.updateQueue,l!==null){var E=s.stateNode;try{var L=l.shared.hiddenCallbacks;if(L!==null)for(l.shared.hiddenCallbacks=null,l=0;l<L.length;l++)wm(L[l],E)}catch(J){ct(s,s.return,J)}}o&&g&64&&jg(u),Mi(u,u.return);break;case 27:Bg(u);case 26:case 5:So(l,u,o),o&&s===null&&g&4&&Lg(u),Mi(u,u.return);break;case 12:So(l,u,o);break;case 31:So(l,u,o),o&&g&4&&Vg(l,u);break;case 13:So(l,u,o),o&&g&4&&Gg(l,u);break;case 22:u.memoizedState===null&&So(l,u,o),Mi(u,u.return);break;case 30:break;default:So(l,u,o)}t=t.sibling}}function xf(e,t){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==o&&(e!=null&&e.refCount++,o!=null&&mi(o))}function Sf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mi(e))}function Kn(e,t,o,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kg(e,t,o,s),t=t.sibling}function Kg(e,t,o,s){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Kn(e,t,o,s),l&2048&&Ai(9,t);break;case 1:Kn(e,t,o,s);break;case 3:Kn(e,t,o,s),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mi(e)));break;case 12:if(l&2048){Kn(e,t,o,s),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,E=u.onPostCommit;typeof E=="function"&&E(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){ct(t,t.return,L)}}else Kn(e,t,o,s);break;case 31:Kn(e,t,o,s);break;case 13:Kn(e,t,o,s);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?Kn(e,t,o,s):Ni(e,t):u._visibility&2?Kn(e,t,o,s):(u._visibility|=2,Ns(e,t,o,s,(t.subtreeFlags&10256)!==0||!1)),l&2048&&xf(g,t);break;case 24:Kn(e,t,o,s),l&2048&&Sf(t.alternate,t);break;default:Kn(e,t,o,s)}}function Ns(e,t,o,s,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,E=o,L=s,J=g.flags;switch(g.tag){case 0:case 11:case 15:Ns(u,g,E,L,l),Ai(8,g);break;case 23:break;case 22:var re=g.stateNode;g.memoizedState!==null?re._visibility&2?Ns(u,g,E,L,l):Ni(u,g):(re._visibility|=2,Ns(u,g,E,L,l)),l&&J&2048&&xf(g.alternate,g);break;case 24:Ns(u,g,E,L,l),l&&J&2048&&Sf(g.alternate,g);break;default:Ns(u,g,E,L,l)}t=t.sibling}}function Ni(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var o=e,s=t,l=s.flags;switch(s.tag){case 22:Ni(o,s),l&2048&&xf(s.alternate,s);break;case 24:Ni(o,s),l&2048&&Sf(s.alternate,s);break;default:Ni(o,s)}t=t.sibling}}var Di=8192;function Ds(e,t,o){if(e.subtreeFlags&Di)for(e=e.child;e!==null;)Qg(e,t,o),e=e.sibling}function Qg(e,t,o){switch(e.tag){case 26:Ds(e,t,o),e.flags&Di&&e.memoizedState!==null&&oE(o,Fn,e.memoizedState,e.memoizedProps);break;case 5:Ds(e,t,o);break;case 3:case 4:var s=Fn;Fn=yl(e.stateNode.containerInfo),Ds(e,t,o),Fn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Di,Di=16777216,Ds(e,t,o),Di=s):Ds(e,t,o));break;default:Ds(e,t,o)}}function Zg(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 _i(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var o=0;o<t.length;o++){var s=t[o];Vt=s,$g(s,e)}Zg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wg(e),e=e.sibling}function Wg(e){switch(e.tag){case 0:case 11:case 15:_i(e),e.flags&2048&&ea(9,e,e.return);break;case 3:_i(e);break;case 12:_i(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,al(e)):_i(e);break;default:_i(e)}}function al(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var o=0;o<t.length;o++){var s=t[o];Vt=s,$g(s,e)}Zg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ea(8,t,t.return),al(t);break;case 22:o=t.stateNode,o._visibility&2&&(o._visibility&=-3,al(t));break;default:al(t)}e=e.sibling}}function $g(e,t){for(;Vt!==null;){var o=Vt;switch(o.tag){case 0:case 11:case 15:ea(8,o,t);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var s=o.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:mi(o.memoizedState.cache)}if(s=o.child,s!==null)s.return=o,Vt=s;else e:for(o=e;Vt!==null;){s=Vt;var l=s.sibling,u=s.return;if(Yg(s),s===o){Vt=null;break e}if(l!==null){l.return=u,Vt=l;break e}Vt=u}}}var vT={getCacheForType:function(e){var t=Kt(kt),o=t.data.get(e);return o===void 0&&(o=e(),t.data.set(e,o)),o},cacheSignal:function(){return Kt(kt).controller.signal}},bT=typeof WeakMap=="function"?WeakMap:Map,rt=0,gt=null,We=null,et=0,lt=0,Sn=null,ta=!1,_s=!1,Tf=!1,To=0,Ct=0,na=0,Ia=0,Ef=0,Tn=0,zs=0,zi=null,dn=null,wf=!1,sl=0,Jg=0,il=1/0,rl=null,oa=null,Pt=0,aa=null,ks=null,Eo=0,Rf=0,Of=null,ey=null,ki=0,Cf=null;function En(){return(rt&2)!==0&&et!==0?et&-et:z.T!==null?zf():gr()}function ty(){if(Tn===0)if((et&536870912)===0||nt){var e=Vn;Vn<<=1,(Vn&3932160)===0&&(Vn=262144),Tn=e}else Tn=536870912;return e=bn.current,e!==null&&(e.flags|=32),Tn}function pn(e,t,o){(e===gt&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(js(e,0),sa(e,et,Tn,!1)),An(e,o),((rt&2)===0||e!==gt)&&(e===gt&&((rt&2)===0&&(Ia|=o),Ct===4&&sa(e,et,Tn,!1)),no(e))}function ny(e,t,o){if((rt&6)!==0)throw Error(r(327));var s=!o&&(t&127)===0&&(t&e.expiredLanes)===0||zt(e,t),l=s?TT(e,t):Mf(e,t,!0),u=s;do{if(l===0){_s&&!s&&sa(e,t,0,!1);break}else{if(o=e.current.alternate,u&&!xT(o)){l=Mf(e,t,!1),u=!1;continue}if(l===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var E=e;l=zi;var L=E.current.memoizedState.isDehydrated;if(L&&(js(E,g).flags|=256),g=Mf(E,g,!1),g!==2){if(Tf&&!L){E.errorRecoveryDisabledLanes|=u,Ia|=u,l=4;break e}u=dn,dn=l,u!==null&&(dn===null?dn=u:dn.push.apply(dn,u))}l=g}if(u=!1,l!==2)continue}}if(l===1){js(e,0),sa(e,t,0,!0);break}e:{switch(s=e,u=l,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:sa(s,t,Tn,!ta);break e;case 2:dn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(l=sl+300-fe(),10<l)){if(sa(s,t,Tn,!ta),Gt(s,0,!0)!==0)break e;Eo=t,s.timeoutHandle=zy(oy.bind(null,s,o,dn,rl,wf,t,Tn,Ia,zs,ta,u,"Throttled",-0,0),l);break e}oy(s,o,dn,rl,wf,t,Tn,Ia,zs,ta,u,null,-0,0)}}break}while(!0);no(e)}function oy(e,t,o,s,l,u,g,E,L,J,re,ue,ee,oe){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ro},Qg(t,u,ue);var Oe=(u&62914560)===u?sl-fe():(u&4194048)===u?Jg-fe():0;if(Oe=aE(ue,Oe),Oe!==null){Eo=u,e.cancelPendingCommit=Oe(fy.bind(null,e,t,u,o,s,l,g,E,L,re,ue,null,ee,oe)),sa(e,u,g,!J);return}}fy(e,t,u,o,s,l,g,E,L)}function xT(e){for(var t=e;;){var o=t.tag;if((o===0||o===11||o===15)&&t.flags&16384&&(o=t.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var s=0;s<o.length;s++){var l=o[s],u=l.getSnapshot;l=l.value;try{if(!yn(u(),l))return!1}catch{return!1}}if(o=t.child,t.subtreeFlags&16384&&o!==null)o.return=t,t=o;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 sa(e,t,o,s){t&=~Ef,t&=~Ia,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var l=t;0<l;){var u=31-mt(l),g=1<<u;s[u]=-1,l&=~g}o!==0&&Gn(e,o,t)}function ll(){return(rt&6)===0?(ji(0),!1):!0}function Af(){if(We!==null){if(lt===0)var e=We.return;else e=We,fo=_a=null,qu(e),Rs=null,yi=0,e=We;for(;e!==null;)kg(e.alternate,e),e=e.return;We=null}}function js(e,t){var o=e.timeoutHandle;o!==-1&&(e.timeoutHandle=-1,PT(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),Eo=0,Af(),gt=e,We=o=co(e.current,null),et=t,lt=0,Sn=null,ta=!1,_s=zt(e,t),Tf=!1,zs=Tn=Ef=Ia=na=Ct=0,dn=zi=null,wf=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var l=31-mt(s),u=1<<l;t|=e[l],s&=~u}return To=t,Mr(),o}function ay(e,t){Ve=null,z.H=Ri,t===ws||t===Lr?(t=xm(),lt=3):t===Du?(t=xm(),lt=4):lt=t===sf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Sn=t,We===null&&(Ct=1,Wr(e,_n(t,e.current)))}function sy(){var e=bn.current;return e===null?!0:(et&4194048)===et?Hn===null:(et&62914560)===et||(et&536870912)!==0?e===Hn:!1}function iy(){var e=z.H;return z.H=Ri,e===null?Ri:e}function ry(){var e=z.A;return z.A=vT,e}function cl(){Ct=4,ta||(et&4194048)!==et&&bn.current!==null||(_s=!0),(na&134217727)===0&&(Ia&134217727)===0||gt===null||sa(gt,et,Tn,!1)}function Mf(e,t,o){var s=rt;rt|=2;var l=iy(),u=ry();(gt!==e||et!==t)&&(rl=null,js(e,t)),t=!1;var g=Ct;e:do try{if(lt!==0&&We!==null){var E=We,L=Sn;switch(lt){case 8:Af(),g=6;break e;case 3:case 2:case 9:case 6:bn.current===null&&(t=!0);var J=lt;if(lt=0,Sn=null,Hs(e,E,L,J),o&&_s){g=0;break e}break;default:J=lt,lt=0,Sn=null,Hs(e,E,L,J)}}ST(),g=Ct;break}catch(re){ay(e,re)}while(!0);return t&&e.shellSuspendCounter++,fo=_a=null,rt=s,z.H=l,z.A=u,We===null&&(gt=null,et=0,Mr()),g}function ST(){for(;We!==null;)ly(We)}function TT(e,t){var o=rt;rt|=2;var s=iy(),l=ry();gt!==e||et!==t?(rl=null,il=fe()+500,js(e,t)):_s=zt(e,t);e:do try{if(lt!==0&&We!==null){t=We;var u=Sn;t:switch(lt){case 1:lt=0,Sn=null,Hs(e,t,u,1);break;case 2:case 9:if(vm(u)){lt=0,Sn=null,cy(t);break}t=function(){lt!==2&&lt!==9||gt!==e||(lt=7),no(e)},u.then(t,t);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:vm(u)?(lt=0,Sn=null,cy(t)):(lt=0,Sn=null,Hs(e,t,u,7));break;case 5:var g=null;switch(We.tag){case 26:g=We.memoizedState;case 5:case 27:var E=We;if(g?Ky(g):E.stateNode.complete){lt=0,Sn=null;var L=E.sibling;if(L!==null)We=L;else{var J=E.return;J!==null?(We=J,ul(J)):We=null}break t}}lt=0,Sn=null,Hs(e,t,u,5);break;case 6:lt=0,Sn=null,Hs(e,t,u,6);break;case 8:Af(),Ct=6;break e;default:throw Error(r(462))}}ET();break}catch(re){ay(e,re)}while(!0);return fo=_a=null,z.H=s,z.A=l,rt=o,We!==null?0:(gt=null,et=0,Mr(),Ct)}function ET(){for(;We!==null&&!Ze();)ly(We)}function ly(e){var t=_g(e.alternate,e,To);e.memoizedProps=e.pendingProps,t===null?ul(e):We=t}function cy(e){var t=e,o=t.alternate;switch(t.tag){case 15:case 0:t=Og(o,t,t.pendingProps,t.type,void 0,et);break;case 11:t=Og(o,t,t.pendingProps,t.type.render,t.ref,et);break;case 5:qu(t);default:kg(o,t),t=We=rm(t,To),t=_g(o,t,To)}e.memoizedProps=e.pendingProps,t===null?ul(e):We=t}function Hs(e,t,o,s){fo=_a=null,qu(t),Rs=null,yi=0;var l=t.return;try{if(fT(e,l,t,o,et)){Ct=1,Wr(e,_n(o,e.current)),We=null;return}}catch(u){if(l!==null)throw We=l,u;Ct=1,Wr(e,_n(o,e.current)),We=null;return}t.flags&32768?(nt||s===1?e=!0:_s||(et&536870912)!==0?e=!1:(ta=e=!0,(s===2||s===9||s===3||s===6)&&(s=bn.current,s!==null&&s.tag===13&&(s.flags|=16384))),uy(t,e)):ul(t)}function ul(e){var t=e;do{if((t.flags&32768)!==0){uy(t,ta);return}e=t.return;var o=hT(t.alternate,t,To);if(o!==null){We=o;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Ct===0&&(Ct=5)}function uy(e,t){do{var o=mT(e.alternate,e);if(o!==null){o.flags&=32767,We=o;return}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=o}while(e!==null);Ct=6,We=null}function fy(e,t,o,s,l,u,g,E,L){e.cancelPendingCommit=null;do fl();while(Pt!==0);if((rt&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=gu,os(e,o,u,g,E,L),e===gt&&(We=gt=null,et=0),ks=t,aa=e,Eo=o,Rf=u,Of=l,ey=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,CT(ve,function(){return gy(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null,l=X.p,X.p=2,g=rt,rt|=4;try{gT(e,t,o)}finally{rt=g,X.p=l,z.T=s}}Pt=1,dy(),py(),hy()}}function dy(){if(Pt===1){Pt=0;var e=aa,t=ks,o=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||o){o=z.T,z.T=null;var s=X.p;X.p=2;var l=rt;rt|=4;try{Xg(t,e);var u=If,g=$h(e.containerInfo),E=u.focusedElem,L=u.selectionRange;if(g!==E&&E&&E.ownerDocument&&Wh(E.ownerDocument.documentElement,E)){if(L!==null&&fu(E)){var J=L.start,re=L.end;if(re===void 0&&(re=J),"selectionStart"in E)E.selectionStart=J,E.selectionEnd=Math.min(re,E.value.length);else{var ue=E.ownerDocument||document,ee=ue&&ue.defaultView||window;if(ee.getSelection){var oe=ee.getSelection(),Oe=E.textContent.length,He=Math.min(L.start,Oe),pt=L.end===void 0?He:Math.min(L.end,Oe);!oe.extend&&He>pt&&(g=pt,pt=He,He=g);var K=Zh(E,He),P=Zh(E,pt);if(K&&P&&(oe.rangeCount!==1||oe.anchorNode!==K.node||oe.anchorOffset!==K.offset||oe.focusNode!==P.node||oe.focusOffset!==P.offset)){var $=ue.createRange();$.setStart(K.node,K.offset),oe.removeAllRanges(),He>pt?(oe.addRange($),oe.extend(P.node,P.offset)):($.setEnd(P.node,P.offset),oe.addRange($))}}}}for(ue=[],oe=E;oe=oe.parentNode;)oe.nodeType===1&&ue.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ue.length;E++){var ce=ue[E];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}El=!!Pf,If=Pf=null}finally{rt=l,X.p=s,z.T=o}}e.current=t,Pt=2}}function py(){if(Pt===2){Pt=0;var e=aa,t=ks,o=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||o){o=z.T,z.T=null;var s=X.p;X.p=2;var l=rt;rt|=4;try{Ig(e,t.alternate,t)}finally{rt=l,X.p=s,z.T=o}}Pt=3}}function hy(){if(Pt===4||Pt===3){Pt=0,Me();var e=aa,t=ks,o=Eo,s=ey;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pt=5:(Pt=0,ks=aa=null,my(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(oa=null),wa(o),t=t.stateNode,qe&&typeof qe.onCommitFiberRoot=="function")try{qe.onCommitFiberRoot(xe,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=z.T,l=X.p,X.p=2,z.T=null;try{for(var u=e.onRecoverableError,g=0;g<s.length;g++){var E=s[g];u(E.value,{componentStack:E.stack})}}finally{z.T=t,X.p=l}}(Eo&3)!==0&&fl(),no(e),l=e.pendingLanes,(o&261930)!==0&&(l&42)!==0?e===Cf?ki++:(ki=0,Cf=e):ki=0,ji(0)}}function my(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mi(t)))}function fl(){return dy(),py(),hy(),gy()}function gy(){if(Pt!==5)return!1;var e=aa,t=Rf;Rf=0;var o=wa(Eo),s=z.T,l=X.p;try{X.p=32>o?32:o,z.T=null,o=Of,Of=null;var u=aa,g=Eo;if(Pt=0,ks=aa=null,Eo=0,(rt&6)!==0)throw Error(r(331));var E=rt;if(rt|=4,Wg(u.current),Kg(u,u.current,g,o),rt=E,ji(0,!1),qe&&typeof qe.onPostCommitFiberRoot=="function")try{qe.onPostCommitFiberRoot(xe,u)}catch{}return!0}finally{X.p=l,z.T=s,my(e,t)}}function yy(e,t,o){t=_n(o,t),t=af(e.stateNode,t,2),e=Wo(e,t,2),e!==null&&(An(e,2),no(e))}function ct(e,t,o){if(e.tag===3)yy(e,e,o);else for(;t!==null;){if(t.tag===3){yy(t,e,o);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(oa===null||!oa.has(s))){e=_n(o,e),o=vg(2),s=Wo(t,o,2),s!==null&&(bg(o,s,t,e),An(s,2),no(s));break}}t=t.return}}function Nf(e,t,o){var s=e.pingCache;if(s===null){s=e.pingCache=new bT;var l=new Set;s.set(t,l)}else l=s.get(t),l===void 0&&(l=new Set,s.set(t,l));l.has(o)||(Tf=!0,l.add(o),e=wT.bind(null,e,t,o),t.then(e,e))}function wT(e,t,o){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,gt===e&&(et&o)===o&&(Ct===4||Ct===3&&(et&62914560)===et&&300>fe()-sl?(rt&2)===0&&js(e,0):Ef|=o,zs===et&&(zs=0)),no(e)}function vy(e,t){t===0&&(t=sn()),e=Ma(e,t),e!==null&&(An(e,t),no(e))}function RT(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),vy(e,o)}function OT(e,t){var o=0;switch(e.tag){case 31:case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(o=l.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),vy(e,o)}function CT(e,t){return we(e,t)}var dl=null,Ls=null,Df=!1,pl=!1,_f=!1,ia=0;function no(e){e!==Ls&&e.next===null&&(Ls===null?dl=Ls=e:Ls=Ls.next=e),pl=!0,Df||(Df=!0,MT())}function ji(e,t){if(!_f&&pl){_f=!0;do for(var o=!1,s=dl;s!==null;){if(e!==0){var l=s.pendingLanes;if(l===0)var u=0;else{var g=s.suspendedLanes,E=s.pingedLanes;u=(1<<31-mt(42|e)+1)-1,u&=l&~(g&~E),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(o=!0,Ty(s,u))}else u=et,u=Gt(s,s===gt?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||zt(s,u)||(o=!0,Ty(s,u));s=s.next}while(o);_f=!1}}function AT(){by()}function by(){pl=Df=!1;var e=0;ia!==0&&BT()&&(e=ia);for(var t=fe(),o=null,s=dl;s!==null;){var l=s.next,u=xy(s,t);u===0?(s.next=null,o===null?dl=l:o.next=l,l===null&&(Ls=o)):(o=s,(e!==0||(u&3)!==0)&&(pl=!0)),s=l}Pt!==0&&Pt!==5||ji(e),ia!==0&&(ia=0)}function xy(e,t){for(var o=e.suspendedLanes,s=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-mt(u),E=1<<g,L=l[g];L===-1?((E&o)===0||(E&s)!==0)&&(l[g]=$n(E,t)):L<=t&&(e.expiredLanes|=E),u&=~E}if(t=gt,o=et,o=Gt(e,e===t?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,o===0||e===t&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ae(s),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||zt(e,o)){if(t=o&-o,t===e.callbackPriority)return t;switch(s!==null&&Ae(s),wa(o)){case 2:case 8:o=ie;break;case 32:o=ve;break;case 268435456:o=Yt;break;default:o=ve}return s=Sy.bind(null,e),o=we(o,s),e.callbackPriority=t,e.callbackNode=o,t}return s!==null&&s!==null&&Ae(s),e.callbackPriority=2,e.callbackNode=null,2}function Sy(e,t){if(Pt!==0&&Pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(fl()&&e.callbackNode!==o)return null;var s=et;return s=Gt(e,e===gt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(ny(e,s,t),xy(e,fe()),e.callbackNode!=null&&e.callbackNode===o?Sy.bind(null,e):null)}function Ty(e,t){if(fl())return null;ny(e,t,!0)}function MT(){IT(function(){(rt&6)!==0?we(de,AT):by()})}function zf(){if(ia===0){var e=Ts;e===0&&(e=_t,_t<<=1,(_t&261888)===0&&(_t=256)),ia=e}return ia}function Ey(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Sr(""+e)}function wy(e,t){var o=t.ownerDocument.createElement("input");return o.name=t.name,o.value=t.value,e.id&&o.setAttribute("form",e.id),t.parentNode.insertBefore(o,t),e=new FormData(e),o.parentNode.removeChild(o),e}function NT(e,t,o,s,l){if(t==="submit"&&o&&o.stateNode===l){var u=Ey((l[rn]||null).action),g=s.submitter;g&&(t=(t=g[rn]||null)?Ey(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var E=new Rr("action","action",null,s,l);e.push({event:E,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ia!==0){var L=g?wy(l,g):new FormData(l);$u(o,{pending:!0,data:L,method:l.method,action:u},null,L)}}else typeof u=="function"&&(E.preventDefault(),L=g?wy(l,g):new FormData(l),$u(o,{pending:!0,data:L,method:l.method,action:u},u,L))},currentTarget:l}]})}}for(var kf=0;kf<mu.length;kf++){var jf=mu[kf],DT=jf.toLowerCase(),_T=jf[0].toUpperCase()+jf.slice(1);Xn(DT,"on"+_T)}Xn(tm,"onAnimationEnd"),Xn(nm,"onAnimationIteration"),Xn(om,"onAnimationStart"),Xn("dblclick","onDoubleClick"),Xn("focusin","onFocus"),Xn("focusout","onBlur"),Xn(K1,"onTransitionRun"),Xn(Q1,"onTransitionStart"),Xn(Z1,"onTransitionCancel"),Xn(am,"onTransitionEnd"),ls("onMouseEnter",["mouseout","mouseover"]),ls("onMouseLeave",["mouseout","mouseover"]),ls("onPointerEnter",["pointerout","pointerover"]),ls("onPointerLeave",["pointerout","pointerover"]),Ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hi="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(" "),zT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hi));function Ry(e,t){t=(t&4)!==0;for(var o=0;o<e.length;o++){var s=e[o],l=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var g=s.length-1;0<=g;g--){var E=s[g],L=E.instance,J=E.currentTarget;if(E=E.listener,L!==u&&l.isPropagationStopped())break e;u=E,l.currentTarget=J;try{u(l)}catch(re){Ar(re)}l.currentTarget=null,u=L}else for(g=0;g<s.length;g++){if(E=s[g],L=E.instance,J=E.currentTarget,E=E.listener,L!==u&&l.isPropagationStopped())break e;u=E,l.currentTarget=J;try{u(l)}catch(re){Ar(re)}l.currentTarget=null,u=L}}}}function $e(e,t){var o=t[Fc];o===void 0&&(o=t[Fc]=new Set);var s=e+"__bubble";o.has(s)||(Oy(t,e,2,!1),o.add(s))}function Hf(e,t,o){var s=0;t&&(s|=4),Oy(o,e,s,t)}var hl="_reactListening"+Math.random().toString(36).slice(2);function Lf(e){if(!e[hl]){e[hl]=!0,bh.forEach(function(o){o!=="selectionchange"&&(zT.has(o)||Hf(o,!1,e),Hf(o,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hl]||(t[hl]=!0,Hf("selectionchange",!1,t))}}function Oy(e,t,o,s){switch(tv(t)){case 2:var l=rE;break;case 8:l=lE;break;default:l=$f}o=l.bind(null,t,o,e),l=void 0,!nu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),s?l!==void 0?e.addEventListener(t,o,{capture:!0,passive:l}):e.addEventListener(t,o,!0):l!==void 0?e.addEventListener(t,o,{passive:l}):e.addEventListener(t,o,!1)}function Uf(e,t,o,s,l){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var E=s.stateNode.containerInfo;if(E===l)break;if(g===4)for(g=s.return;g!==null;){var L=g.tag;if((L===3||L===4)&&g.stateNode.containerInfo===l)return;g=g.return}for(;E!==null;){if(g=ss(E),g===null)return;if(L=g.tag,L===5||L===6||L===26||L===27){s=u=g;continue e}E=E.parentNode}}s=s.return}Dh(function(){var J=u,re=eu(o),ue=[];e:{var ee=sm.get(e);if(ee!==void 0){var oe=Rr,Oe=e;switch(e){case"keypress":if(Er(o)===0)break e;case"keydown":case"keyup":oe=O1;break;case"focusin":Oe="focus",oe=iu;break;case"focusout":Oe="blur",oe=iu;break;case"beforeblur":case"afterblur":oe=iu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=kh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=h1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=M1;break;case tm:case nm:case om:oe=y1;break;case am:oe=D1;break;case"scroll":case"scrollend":oe=d1;break;case"wheel":oe=z1;break;case"copy":case"cut":case"paste":oe=b1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Hh;break;case"toggle":case"beforetoggle":oe=j1}var He=(t&4)!==0,pt=!He&&(e==="scroll"||e==="scrollend"),K=He?ee!==null?ee+"Capture":null:ee;He=[];for(var P=J,$;P!==null;){var ce=P;if($=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||$===null||K===null||(ce=ai(P,K),ce!=null&&He.push(Li(P,ce,$))),pt)break;P=P.return}0<He.length&&(ee=new oe(ee,Oe,null,o,re),ue.push({event:ee,listeners:He}))}}if((t&7)===0){e:{if(ee=e==="mouseover"||e==="pointerover",oe=e==="mouseout"||e==="pointerout",ee&&o!==Jc&&(Oe=o.relatedTarget||o.fromElement)&&(ss(Oe)||Oe[as]))break e;if((oe||ee)&&(ee=re.window===re?re:(ee=re.ownerDocument)?ee.defaultView||ee.parentWindow:window,oe?(Oe=o.relatedTarget||o.toElement,oe=J,Oe=Oe?ss(Oe):null,Oe!==null&&(pt=f(Oe),He=Oe.tag,Oe!==pt||He!==5&&He!==27&&He!==6)&&(Oe=null)):(oe=null,Oe=J),oe!==Oe)){if(He=kh,ce="onMouseLeave",K="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(He=Hh,ce="onPointerLeave",K="onPointerEnter",P="pointer"),pt=oe==null?ee:oi(oe),$=Oe==null?ee:oi(Oe),ee=new He(ce,P+"leave",oe,o,re),ee.target=pt,ee.relatedTarget=$,ce=null,ss(re)===J&&(He=new He(K,P+"enter",Oe,o,re),He.target=$,He.relatedTarget=pt,ce=He),pt=ce,oe&&Oe)t:{for(He=kT,K=oe,P=Oe,$=0,ce=K;ce;ce=He(ce))$++;ce=0;for(var ze=P;ze;ze=He(ze))ce++;for(;0<$-ce;)K=He(K),$--;for(;0<ce-$;)P=He(P),ce--;for(;$--;){if(K===P||P!==null&&K===P.alternate){He=K;break t}K=He(K),P=He(P)}He=null}else He=null;oe!==null&&Cy(ue,ee,oe,He,!1),Oe!==null&&pt!==null&&Cy(ue,pt,Oe,He,!0)}}e:{if(ee=J?oi(J):window,oe=ee.nodeName&&ee.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ee.type==="file")var st=Vh;else if(Yh(ee))if(Gh)st=G1;else{st=q1;var Ne=Y1}else oe=ee.nodeName,!oe||oe.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&$c(J.elementType)&&(st=Vh):st=V1;if(st&&(st=st(e,J))){qh(ue,st,o,re);break e}Ne&&Ne(e,ee,J),e==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&Wc(ee,"number",ee.value)}switch(Ne=J?oi(J):window,e){case"focusin":(Yh(Ne)||Ne.contentEditable==="true")&&(hs=Ne,du=J,di=null);break;case"focusout":di=du=hs=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,Jh(ue,o,re);break;case"selectionchange":if(F1)break;case"keydown":case"keyup":Jh(ue,o,re)}var Xe;if(lu)e:{switch(e){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else ps?Ph(e,o)&&(tt="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(tt="onCompositionStart");tt&&(Lh&&o.locale!=="ko"&&(ps||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&ps&&(Xe=_h()):(Vo=re,ou="value"in Vo?Vo.value:Vo.textContent,ps=!0)),Ne=ml(J,tt),0<Ne.length&&(tt=new jh(tt,e,null,o,re),ue.push({event:tt,listeners:Ne}),Xe?tt.data=Xe:(Xe=Ih(o),Xe!==null&&(tt.data=Xe)))),(Xe=L1?U1(e,o):B1(e,o))&&(tt=ml(J,"onBeforeInput"),0<tt.length&&(Ne=new jh("onBeforeInput","beforeinput",null,o,re),ue.push({event:Ne,listeners:tt}),Ne.data=Xe)),NT(ue,e,J,o,re)}Ry(ue,t)})}function Li(e,t,o){return{instance:e,listener:t,currentTarget:o}}function ml(e,t){for(var o=t+"Capture",s=[];e!==null;){var l=e,u=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||u===null||(l=ai(e,o),l!=null&&s.unshift(Li(e,l,u)),l=ai(e,t),l!=null&&s.push(Li(e,l,u))),e.tag===3)return s;e=e.return}return[]}function kT(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cy(e,t,o,s,l){for(var u=t._reactName,g=[];o!==null&&o!==s;){var E=o,L=E.alternate,J=E.stateNode;if(E=E.tag,L!==null&&L===s)break;E!==5&&E!==26&&E!==27||J===null||(L=J,l?(J=ai(o,u),J!=null&&g.unshift(Li(o,J,L))):l||(J=ai(o,u),J!=null&&g.push(Li(o,J,L)))),o=o.return}g.length!==0&&e.push({event:t,listeners:g})}var jT=/\r\n?/g,HT=/\u0000|\uFFFD/g;function Ay(e){return(typeof e=="string"?e:""+e).replace(jT,`
9
- `).replace(HT,"")}function My(e,t){return t=Ay(t),Ay(e)===t}function dt(e,t,o,s,l,u){switch(o){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||us(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&us(e,""+s);break;case"className":br(e,"class",s);break;case"tabIndex":br(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":br(e,o,s);break;case"style":Mh(e,s,u);break;case"data":if(t!=="object"){br(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||o!=="href")){e.removeAttribute(o);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(o);break}s=Sr(""+s),e.setAttribute(o,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(o,"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 u=="function"&&(o==="formAction"?(t!=="input"&&dt(e,t,"name",l.name,l,null),dt(e,t,"formEncType",l.formEncType,l,null),dt(e,t,"formMethod",l.formMethod,l,null),dt(e,t,"formTarget",l.formTarget,l,null)):(dt(e,t,"encType",l.encType,l,null),dt(e,t,"method",l.method,l,null),dt(e,t,"target",l.target,l,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(o);break}s=Sr(""+s),e.setAttribute(o,s);break;case"onClick":s!=null&&(e.onclick=ro);break;case"onScroll":s!=null&&$e("scroll",e);break;case"onScrollEnd":s!=null&&$e("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(l.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}o=Sr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(o,""+s):e.removeAttribute(o);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":s===!0?e.setAttribute(o,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(o,s):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(o,s):e.removeAttribute(o);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(o):e.setAttribute(o,s);break;case"popover":$e("beforetoggle",e),$e("toggle",e),vr(e,"popover",s);break;case"xlinkActuate":io(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":io(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":io(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":io(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":io(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":io(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":io(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":io(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":io(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":vr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=u1.get(o)||o,vr(e,o,s))}}function Bf(e,t,o,s,l,u){switch(o){case"style":Mh(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(l.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"children":typeof s=="string"?us(e,s):(typeof s=="number"||typeof s=="bigint")&&us(e,""+s);break;case"onScroll":s!=null&&$e("scroll",e);break;case"onScrollEnd":s!=null&&$e("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ro);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!xh.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(l=o.endsWith("Capture"),t=o.slice(2,l?o.length-7:void 0),u=e[rn]||null,u=u!=null?u[o]:null,typeof u=="function"&&e.removeEventListener(t,u,l),typeof s=="function")){typeof u!="function"&&u!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(t,s,l);break e}o in e?e[o]=s:s===!0?e.setAttribute(o,""):vr(e,o,s)}}}function Zt(e,t,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",e),$e("load",e);var s=!1,l=!1,u;for(u in o)if(o.hasOwnProperty(u)){var g=o[u];if(g!=null)switch(u){case"src":s=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:dt(e,t,u,g,o,null)}}l&&dt(e,t,"srcSet",o.srcSet,o,null),s&&dt(e,t,"src",o.src,o,null);return;case"input":$e("invalid",e);var E=u=g=l=null,L=null,J=null;for(s in o)if(o.hasOwnProperty(s)){var re=o[s];if(re!=null)switch(s){case"name":l=re;break;case"type":g=re;break;case"checked":L=re;break;case"defaultChecked":J=re;break;case"value":u=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,t));break;default:dt(e,t,s,re,o,null)}}Rh(e,u,E,L,J,g,l,!1);return;case"select":$e("invalid",e),s=g=u=null;for(l in o)if(o.hasOwnProperty(l)&&(E=o[l],E!=null))switch(l){case"value":u=E;break;case"defaultValue":g=E;break;case"multiple":s=E;default:dt(e,t,l,E,o,null)}t=u,o=g,e.multiple=!!s,t!=null?cs(e,!!s,t,!1):o!=null&&cs(e,!!s,o,!0);return;case"textarea":$e("invalid",e),u=l=s=null;for(g in o)if(o.hasOwnProperty(g)&&(E=o[g],E!=null))switch(g){case"value":s=E;break;case"defaultValue":l=E;break;case"children":u=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:dt(e,t,g,E,o,null)}Ch(e,s,l,u);return;case"option":for(L in o)o.hasOwnProperty(L)&&(s=o[L],s!=null)&&(L==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":dt(e,t,L,s,o,null));return;case"dialog":$e("beforetoggle",e),$e("toggle",e),$e("cancel",e),$e("close",e);break;case"iframe":case"object":$e("load",e);break;case"video":case"audio":for(s=0;s<Hi.length;s++)$e(Hi[s],e);break;case"image":$e("error",e),$e("load",e);break;case"details":$e("toggle",e);break;case"embed":case"source":case"link":$e("error",e),$e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in o)if(o.hasOwnProperty(J)&&(s=o[J],s!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:dt(e,t,J,s,o,null)}return;default:if($c(t)){for(re in o)o.hasOwnProperty(re)&&(s=o[re],s!==void 0&&Bf(e,t,re,s,o,void 0));return}}for(E in o)o.hasOwnProperty(E)&&(s=o[E],s!=null&&dt(e,t,E,s,o,null))}function LT(e,t,o,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,u=null,g=null,E=null,L=null,J=null,re=null;for(oe in o){var ue=o[oe];if(o.hasOwnProperty(oe)&&ue!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":L=ue;default:s.hasOwnProperty(oe)||dt(e,t,oe,null,s,ue)}}for(var ee in s){var oe=s[ee];if(ue=o[ee],s.hasOwnProperty(ee)&&(oe!=null||ue!=null))switch(ee){case"type":u=oe;break;case"name":l=oe;break;case"checked":J=oe;break;case"defaultChecked":re=oe;break;case"value":g=oe;break;case"defaultValue":E=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,t));break;default:oe!==ue&&dt(e,t,ee,oe,s,ue)}}Zc(e,g,E,L,J,re,u,l);return;case"select":oe=g=E=ee=null;for(u in o)if(L=o[u],o.hasOwnProperty(u)&&L!=null)switch(u){case"value":break;case"multiple":oe=L;default:s.hasOwnProperty(u)||dt(e,t,u,null,s,L)}for(l in s)if(u=s[l],L=o[l],s.hasOwnProperty(l)&&(u!=null||L!=null))switch(l){case"value":ee=u;break;case"defaultValue":E=u;break;case"multiple":g=u;default:u!==L&&dt(e,t,l,u,s,L)}t=E,o=g,s=oe,ee!=null?cs(e,!!o,ee,!1):!!s!=!!o&&(t!=null?cs(e,!!o,t,!0):cs(e,!!o,o?[]:"",!1));return;case"textarea":oe=ee=null;for(E in o)if(l=o[E],o.hasOwnProperty(E)&&l!=null&&!s.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:dt(e,t,E,null,s,l)}for(g in s)if(l=s[g],u=o[g],s.hasOwnProperty(g)&&(l!=null||u!=null))switch(g){case"value":ee=l;break;case"defaultValue":oe=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(r(91));break;default:l!==u&&dt(e,t,g,l,s,u)}Oh(e,ee,oe);return;case"option":for(var Oe in o)ee=o[Oe],o.hasOwnProperty(Oe)&&ee!=null&&!s.hasOwnProperty(Oe)&&(Oe==="selected"?e.selected=!1:dt(e,t,Oe,null,s,ee));for(L in s)ee=s[L],oe=o[L],s.hasOwnProperty(L)&&ee!==oe&&(ee!=null||oe!=null)&&(L==="selected"?e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":dt(e,t,L,ee,s,oe));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 He in o)ee=o[He],o.hasOwnProperty(He)&&ee!=null&&!s.hasOwnProperty(He)&&dt(e,t,He,null,s,ee);for(J in s)if(ee=s[J],oe=o[J],s.hasOwnProperty(J)&&ee!==oe&&(ee!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,t));break;default:dt(e,t,J,ee,s,oe)}return;default:if($c(t)){for(var pt in o)ee=o[pt],o.hasOwnProperty(pt)&&ee!==void 0&&!s.hasOwnProperty(pt)&&Bf(e,t,pt,void 0,s,ee);for(re in s)ee=s[re],oe=o[re],!s.hasOwnProperty(re)||ee===oe||ee===void 0&&oe===void 0||Bf(e,t,re,ee,s,oe);return}}for(var K in o)ee=o[K],o.hasOwnProperty(K)&&ee!=null&&!s.hasOwnProperty(K)&&dt(e,t,K,null,s,ee);for(ue in s)ee=s[ue],oe=o[ue],!s.hasOwnProperty(ue)||ee===oe||ee==null&&oe==null||dt(e,t,ue,ee,s,oe)}function Ny(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function UT(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,o=performance.getEntriesByType("resource"),s=0;s<o.length;s++){var l=o[s],u=l.transferSize,g=l.initiatorType,E=l.duration;if(u&&E&&Ny(g)){for(g=0,E=l.responseEnd,s+=1;s<o.length;s++){var L=o[s],J=L.startTime;if(J>E)break;var re=L.transferSize,ue=L.initiatorType;re&&Ny(ue)&&(L=L.responseEnd,g+=re*(L<E?1:(E-J)/(L-J)))}if(--s,t+=8*(u+g)/(l.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 Pf=null,If=null;function gl(e){return e.nodeType===9?e:e.ownerDocument}function Dy(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 _y(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 Yf(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 qf=null;function BT(){var e=window.event;return e&&e.type==="popstate"?e===qf?!1:(qf=e,!0):(qf=null,!1)}var zy=typeof setTimeout=="function"?setTimeout:void 0,PT=typeof clearTimeout=="function"?clearTimeout:void 0,ky=typeof Promise=="function"?Promise:void 0,IT=typeof queueMicrotask=="function"?queueMicrotask:typeof ky<"u"?function(e){return ky.resolve(null).then(e).catch(YT)}:zy;function YT(e){setTimeout(function(){throw e})}function ra(e){return e==="head"}function jy(e,t){var o=t,s=0;do{var l=o.nextSibling;if(e.removeChild(o),l&&l.nodeType===8)if(o=l.data,o==="/$"||o==="/&"){if(s===0){e.removeChild(l),Is(t);return}s--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")s++;else if(o==="html")Ui(e.ownerDocument.documentElement);else if(o==="head"){o=e.ownerDocument.head,Ui(o);for(var u=o.firstChild;u;){var g=u.nextSibling,E=u.nodeName;u[ni]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&u.rel.toLowerCase()==="stylesheet"||o.removeChild(u),u=g}}else o==="body"&&Ui(e.ownerDocument.body);o=l}while(o);Is(t)}function Hy(e,t){var o=e;e=0;do{var s=o.nextSibling;if(o.nodeType===1?t?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(t?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),s&&s.nodeType===8)if(o=s.data,o==="/$"){if(e===0)break;e--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||e++;o=s}while(o)}function Vf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var o=t;switch(t=t.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Vf(o),Kc(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function qT(e,t,o,s){for(;e.nodeType===1;){var l=o;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[ni])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ln(e.nextSibling),e===null)break}return null}function VT(e,t,o){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o||(e=Ln(e.nextSibling),e===null))return null;return e}function Ly(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ln(e.nextSibling),e===null))return null;return e}function Gf(e){return e.data==="$?"||e.data==="$~"}function Xf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function GT(e,t){var o=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||o.readyState!=="loading")t();else{var s=function(){t(),o.removeEventListener("DOMContentLoaded",s)};o.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ln(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 Ff=null;function Uy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"||o==="/&"){if(t===0)return Ln(e.nextSibling);t--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||t++}e=e.nextSibling}return null}function By(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(t===0)return e;t--}else o!=="/$"&&o!=="/&"||t++}e=e.previousSibling}return null}function Py(e,t,o){switch(t=gl(o),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Kc(e)}var Un=new Map,Iy=new Set;function yl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wo=X.d;X.d={f:XT,r:FT,D:KT,C:QT,L:ZT,m:WT,X:JT,S:$T,M:eE};function XT(){var e=wo.f(),t=ll();return e||t}function FT(e){var t=is(e);t!==null&&t.tag===5&&t.type==="form"?ag(t):wo.r(e)}var Us=typeof document>"u"?null:document;function Yy(e,t,o){var s=Us;if(s&&typeof t=="string"&&t){var l=Nn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof o=="string"&&(l+='[crossorigin="'+o+'"]'),Iy.has(l)||(Iy.add(l),e={rel:e,crossOrigin:o,href:t},s.querySelector(l)===null&&(t=s.createElement("link"),Zt(t,"link",e),qt(t),s.head.appendChild(t)))}}function KT(e){wo.D(e),Yy("dns-prefetch",e,null)}function QT(e,t){wo.C(e,t),Yy("preconnect",e,t)}function ZT(e,t,o){wo.L(e,t,o);var s=Us;if(s&&e&&t){var l='link[rel="preload"][as="'+Nn(t)+'"]';t==="image"&&o&&o.imageSrcSet?(l+='[imagesrcset="'+Nn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(l+='[imagesizes="'+Nn(o.imageSizes)+'"]')):l+='[href="'+Nn(e)+'"]';var u=l;switch(t){case"style":u=Bs(e);break;case"script":u=Ps(e)}Un.has(u)||(e=x({rel:"preload",href:t==="image"&&o&&o.imageSrcSet?void 0:e,as:t},o),Un.set(u,e),s.querySelector(l)!==null||t==="style"&&s.querySelector(Bi(u))||t==="script"&&s.querySelector(Pi(u))||(t=s.createElement("link"),Zt(t,"link",e),qt(t),s.head.appendChild(t)))}}function WT(e,t){wo.m(e,t);var o=Us;if(o&&e){var s=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Nn(s)+'"][href="'+Nn(e)+'"]',u=l;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ps(e)}if(!Un.has(u)&&(e=x({rel:"modulepreload",href:e},t),Un.set(u,e),o.querySelector(l)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Pi(u)))return}s=o.createElement("link"),Zt(s,"link",e),qt(s),o.head.appendChild(s)}}}function $T(e,t,o){wo.S(e,t,o);var s=Us;if(s&&e){var l=rs(s).hoistableStyles,u=Bs(e);t=t||"default";var g=l.get(u);if(!g){var E={loading:0,preload:null};if(g=s.querySelector(Bi(u)))E.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},o),(o=Un.get(u))&&Kf(e,o);var L=g=s.createElement("link");qt(L),Zt(L,"link",e),L._p=new Promise(function(J,re){L.onload=J,L.onerror=re}),L.addEventListener("load",function(){E.loading|=1}),L.addEventListener("error",function(){E.loading|=2}),E.loading|=4,vl(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:E},l.set(u,g)}}}function JT(e,t){wo.X(e,t);var o=Us;if(o&&e){var s=rs(o).hoistableScripts,l=Ps(e),u=s.get(l);u||(u=o.querySelector(Pi(l)),u||(e=x({src:e,async:!0},t),(t=Un.get(l))&&Qf(e,t),u=o.createElement("script"),qt(u),Zt(u,"link",e),o.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(l,u))}}function eE(e,t){wo.M(e,t);var o=Us;if(o&&e){var s=rs(o).hoistableScripts,l=Ps(e),u=s.get(l);u||(u=o.querySelector(Pi(l)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Un.get(l))&&Qf(e,t),u=o.createElement("script"),qt(u),Zt(u,"link",e),o.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(l,u))}}function qy(e,t,o,s){var l=(l=se.current)?yl(l):null;if(!l)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(t=Bs(o.href),o=rs(l).hoistableStyles,s=o.get(t),s||(s={type:"style",instance:null,count:0,state:null},o.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){e=Bs(o.href);var u=rs(l).hoistableStyles,g=u.get(e);if(g||(l=l.ownerDocument||l,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=l.querySelector(Bi(e)))&&!u._p&&(g.instance=u,g.state.loading=5),Un.has(e)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Un.set(e,o),u||tE(l,e,o,g.state))),t&&s===null)throw Error(r(528,""));return g}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=o.async,o=o.src,typeof o=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ps(o),o=rs(l).hoistableScripts,s=o.get(t),s||(s={type:"script",instance:null,count:0,state:null},o.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Bs(e){return'href="'+Nn(e)+'"'}function Bi(e){return'link[rel="stylesheet"]['+e+"]"}function Vy(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function tE(e,t,o,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Zt(t,"link",o),qt(t),e.head.appendChild(t))}function Ps(e){return'[src="'+Nn(e)+'"]'}function Pi(e){return"script[async]"+e}function Gy(e,t,o){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Nn(o.href)+'"]');if(s)return t.instance=s,qt(s),s;var l=x({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),qt(s),Zt(s,"style",l),vl(s,o.precedence,e),t.instance=s;case"stylesheet":l=Bs(o.href);var u=e.querySelector(Bi(l));if(u)return t.state.loading|=4,t.instance=u,qt(u),u;s=Vy(o),(l=Un.get(l))&&Kf(s,l),u=(e.ownerDocument||e).createElement("link"),qt(u);var g=u;return g._p=new Promise(function(E,L){g.onload=E,g.onerror=L}),Zt(u,"link",s),t.state.loading|=4,vl(u,o.precedence,e),t.instance=u;case"script":return u=Ps(o.src),(l=e.querySelector(Pi(u)))?(t.instance=l,qt(l),l):(s=o,(l=Un.get(u))&&(s=x({},o),Qf(s,l)),e=e.ownerDocument||e,l=e.createElement("script"),qt(l),Zt(l,"link",s),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,vl(s,o.precedence,e));return t.instance}function vl(e,t,o){for(var s=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=s.length?s[s.length-1]:null,u=l,g=0;g<s.length;g++){var E=s[g];if(E.dataset.precedence===t)u=E;else if(u!==l)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=o.nodeType===9?o.head:o,t.insertBefore(e,t.firstChild))}function Kf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var bl=null;function Xy(e,t,o){if(bl===null){var s=new Map,l=bl=new Map;l.set(o,s)}else l=bl,s=l.get(o),s||(s=new Map,l.set(o,s));if(s.has(e))return s;for(s.set(e,null),o=o.getElementsByTagName(e),l=0;l<o.length;l++){var u=o[l];if(!(u[ni]||u[Xt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var E=s.get(g);E?E.push(u):s.set(g,[u])}}return s}function Fy(e,t,o){e=e.ownerDocument||e,e.head.insertBefore(o,t==="title"?e.querySelector("head > title"):null)}function nE(e,t,o){if(o===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 Ky(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function oE(e,t,o,s){if(o.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var l=Bs(s.href),u=t.querySelector(Bi(l));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=xl.bind(e),t.then(e,e)),o.state.loading|=4,o.instance=u,qt(u);return}u=t.ownerDocument||t,s=Vy(s),(l=Un.get(l))&&Kf(s,l),u=u.createElement("link"),qt(u);var g=u;g._p=new Promise(function(E,L){g.onload=E,g.onerror=L}),Zt(u,"link",s),o.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,t),(t=o.state.preload)&&(o.state.loading&3)===0&&(e.count++,o=xl.bind(e),t.addEventListener("load",o),t.addEventListener("error",o))}}var Zf=0;function aE(e,t){return e.stylesheets&&e.count===0&&Tl(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var s=setTimeout(function(){if(e.stylesheets&&Tl(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*UT());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tl(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(l)}}:null}function xl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Sl=null;function Tl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Sl=new Map,t.forEach(sE,e),Sl=null,xl.call(e))}function sE(e,t){if(!(t.state.loading&4)){var o=Sl.get(e);if(o)var s=o.get(null);else{o=new Map,Sl.set(e,o);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<l.length;u++){var g=l[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(o.set(g.dataset.precedence,g),s=g)}s&&o.set(null,s)}l=t.instance,g=l.getAttribute("data-precedence"),u=o.get(g)||s,u===s&&o.set(null,l),o.set(g,l),this.count++,s=xl.bind(this),l.addEventListener("load",s),l.addEventListener("error",s),u?u.parentNode.insertBefore(l,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Ii={$$typeof:R,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function iE(e,t,o,s,l,u,g,E,L){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bo(0),this.hiddenUpdates=Bo(null),this.identifierPrefix=s,this.onUncaughtError=l,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function Qy(e,t,o,s,l,u,g,E,L,J,re,ue){return e=new iE(e,t,o,g,L,J,re,ue,E),t=1,u===!0&&(t|=24),u=vn(3,null,null,t),e.current=u,u.stateNode=e,t=Au(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:o,cache:t},_u(u),e}function Zy(e){return e?(e=ys,e):ys}function Wy(e,t,o,s,l,u){l=Zy(l),s.context===null?s.context=l:s.pendingContext=l,s=Zo(t),s.payload={element:o},u=u===void 0?null:u,u!==null&&(s.callback=u),o=Wo(e,s,t),o!==null&&(pn(o,e,t),bi(o,e,t))}function $y(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function Wf(e,t){$y(e,t),(e=e.alternate)&&$y(e,t)}function Jy(e){if(e.tag===13||e.tag===31){var t=Ma(e,67108864);t!==null&&pn(t,e,67108864),Wf(e,67108864)}}function ev(e){if(e.tag===13||e.tag===31){var t=En();t=Yo(t);var o=Ma(e,t);o!==null&&pn(o,e,t),Wf(e,t)}}var El=!0;function rE(e,t,o,s){var l=z.T;z.T=null;var u=X.p;try{X.p=2,$f(e,t,o,s)}finally{X.p=u,z.T=l}}function lE(e,t,o,s){var l=z.T;z.T=null;var u=X.p;try{X.p=8,$f(e,t,o,s)}finally{X.p=u,z.T=l}}function $f(e,t,o,s){if(El){var l=Jf(s);if(l===null)Uf(e,t,s,wl,o),nv(e,s);else if(uE(l,e,t,o,s))s.stopPropagation();else if(nv(e,s),t&4&&-1<cE.indexOf(e)){for(;l!==null;){var u=is(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=Et(u.pendingLanes);if(g!==0){var E=u;for(E.pendingLanes|=2,E.entangledLanes|=2;g;){var L=1<<31-mt(g);E.entanglements[1]|=L,g&=~L}no(u),(rt&6)===0&&(il=fe()+500,ji(0))}}break;case 31:case 13:E=Ma(u,2),E!==null&&pn(E,u,2),ll(),Wf(u,2)}if(u=Jf(s),u===null&&Uf(e,t,s,wl,o),u===l)break;l=u}l!==null&&s.stopPropagation()}else Uf(e,t,s,null,o)}}function Jf(e){return e=eu(e),ed(e)}var wl=null;function ed(e){if(wl=null,e=ss(e),e!==null){var t=f(e);if(t===null)e=null;else{var o=t.tag;if(o===13){if(e=d(t),e!==null)return e;e=null}else if(o===31){if(e=m(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wl=e,null}function tv(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(ye()){case de:return 2;case ie:return 8;case ve:case Be:return 32;case Yt:return 268435456;default:return 32}default:return 32}}var td=!1,la=null,ca=null,ua=null,Yi=new Map,qi=new Map,fa=[],cE="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 nv(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":ua=null;break;case"pointerover":case"pointerout":Yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function Vi(e,t,o,s,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:o,eventSystemFlags:s,nativeEvent:u,targetContainers:[l]},t!==null&&(t=is(t),t!==null&&Jy(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function uE(e,t,o,s,l){switch(t){case"focusin":return la=Vi(la,e,t,o,s,l),!0;case"dragenter":return ca=Vi(ca,e,t,o,s,l),!0;case"mouseover":return ua=Vi(ua,e,t,o,s,l),!0;case"pointerover":var u=l.pointerId;return Yi.set(u,Vi(Yi.get(u)||null,e,t,o,s,l)),!0;case"gotpointercapture":return u=l.pointerId,qi.set(u,Vi(qi.get(u)||null,e,t,o,s,l)),!0}return!1}function ov(e){var t=ss(e.target);if(t!==null){var o=f(t);if(o!==null){if(t=o.tag,t===13){if(t=d(o),t!==null){e.blockedOn=t,yr(e.priority,function(){ev(o)});return}}else if(t===31){if(t=m(o),t!==null){e.blockedOn=t,yr(e.priority,function(){ev(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=Jf(e.nativeEvent);if(o===null){o=e.nativeEvent;var s=new o.constructor(o.type,o);Jc=s,o.target.dispatchEvent(s),Jc=null}else return t=is(o),t!==null&&Jy(t),e.blockedOn=o,!1;t.shift()}return!0}function av(e,t,o){Rl(e)&&o.delete(t)}function fE(){td=!1,la!==null&&Rl(la)&&(la=null),ca!==null&&Rl(ca)&&(ca=null),ua!==null&&Rl(ua)&&(ua=null),Yi.forEach(av),qi.forEach(av)}function Ol(e,t){e.blockedOn===t&&(e.blockedOn=null,td||(td=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,fE)))}var Cl=null;function sv(e){Cl!==e&&(Cl=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Cl===e&&(Cl=null);for(var t=0;t<e.length;t+=3){var o=e[t],s=e[t+1],l=e[t+2];if(typeof s!="function"){if(ed(s||o)===null)continue;break}var u=is(o);u!==null&&(e.splice(t,3),t-=3,$u(u,{pending:!0,data:l,method:o.method,action:s},s,l))}}))}function Is(e){function t(L){return Ol(L,e)}la!==null&&Ol(la,e),ca!==null&&Ol(ca,e),ua!==null&&Ol(ua,e),Yi.forEach(t),qi.forEach(t);for(var o=0;o<fa.length;o++){var s=fa[o];s.blockedOn===e&&(s.blockedOn=null)}for(;0<fa.length&&(o=fa[0],o.blockedOn===null);)ov(o),o.blockedOn===null&&fa.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(s=0;s<o.length;s+=3){var l=o[s],u=o[s+1],g=l[rn]||null;if(typeof u=="function")g||sv(o);else if(g){var E=null;if(u&&u.hasAttribute("formAction")){if(l=u,g=u[rn]||null)E=g.formAction;else if(ed(l)!==null)continue}else E=g.action;typeof E=="function"?o[s+1]=E:(o.splice(s,3),s-=3),sv(o)}}}function iv(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return l=g})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),s||setTimeout(o,20)}function o(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(o,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function nd(e){this._internalRoot=e}Al.prototype.render=nd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var o=t.current,s=En();Wy(o,s,e,t,null,null)},Al.prototype.unmount=nd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wy(e.current,2,null,e,null,null),ll(),t[as]=null}};function Al(e){this._internalRoot=e}Al.prototype.unstable_scheduleHydration=function(e){if(e){var t=gr();e={blockedOn:null,target:e,priority:t};for(var o=0;o<fa.length&&t!==0&&t<fa[o].priority;o++);fa.splice(o,0,e),o===0&&ov(e)}};var rv=a.version;if(rv!=="19.2.4")throw Error(r(527,rv,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=h(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var dE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ml.isDisabled&&Ml.supportsFiber)try{xe=Ml.inject(dE),qe=Ml}catch{}}return Xi.createRoot=function(e,t){if(!c(e))throw Error(r(299));var o=!1,s="",l=hg,u=mg,g=gg;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Qy(e,1,!1,null,null,o,s,null,l,u,g,iv),e[as]=t.current,Lf(e),new nd(t)},Xi.hydrateRoot=function(e,t,o){if(!c(e))throw Error(r(299));var s=!1,l="",u=hg,g=mg,E=gg,L=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(l=o.identifierPrefix),o.onUncaughtError!==void 0&&(u=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(E=o.onRecoverableError),o.formState!==void 0&&(L=o.formState)),t=Qy(e,1,!0,t,o??null,s,l,L,u,g,E,iv),t.context=Zy(null),o=t.current,s=En(),s=Yo(s),l=Zo(s),l.callback=null,Wo(o,l,s),o=s,t.current.lanes=o,An(t,o),no(t),e[as]=t.current,Lf(e),new Al(t)},Xi.version="19.2.4",Xi}var yv;function wE(){if(yv)return sd.exports;yv=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(a){console.error(a)}}return n(),sd.exports=EE(),sd.exports}var RE=wE();function Bb(n){var a,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(a=0;a<c;a++)n[a]&&(i=Bb(n[a]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function OE(){for(var n,a,i=0,r="",c=arguments.length;i<c;i++)(n=arguments[i])&&(a=Bb(n))&&(r&&(r+=" "),r+=a);return r}function Mt(...n){return OE(n)}const vv={};function en(n,a){const i=b.useRef(vv);return i.current===vv&&(i.current=n(a)),i}const zd=[];let kd;function CE(){return kd}function AE(n){zd.push(n)}function cr(n){const a=(i,r)=>{const c=en(ME).current;let f;try{kd=c;for(const d of zd)d.before(c);f=n(i,r);for(const d of zd)d.after(c);c.didInitialize=!0}finally{kd=void 0}return f};return a.displayName=n.displayName||n.name,a}function ap(n){return b.forwardRef(cr(n))}function ME(){return{didInitialize:!1}}function sp(){}const _o=Object.freeze([]),wt=Object.freeze({}),NE=()=>{},Ee=typeof document<"u"?b.useLayoutEffect:NE;function DE(n,a){return function(r,...c){const f=new URL(n);return f.searchParams.set("code",r.toString()),c.forEach(d=>f.searchParams.append("args[]",d)),`${a} error #${r}; visit ${f} for the full message.`}}const Bt=DE("https://base-ui.com/production-error","Base UI"),Pb=b.createContext(void 0);function ic(n){const a=b.useContext(Pb);if(a===void 0&&!n)throw new Error(Bt(72));return a}function rc(n){b.useEffect(n,_o)}const Fi=0;class mn{static create(){return new mn}currentId=Fi;start(a,i){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Fi,i()},a)}isStarted(){return this.currentId!==Fi}clear=()=>{this.currentId!==Fi&&(clearTimeout(this.currentId),this.currentId=Fi)};disposeEffect=()=>this.clear}function tn(){const n=en(mn.create).current;return rc(n.disposeEffect),n}function _E(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:zE,platform:kE,maxTouchPoints:jE}=_E(),lc=zE.toLowerCase(),nr=kE.toLowerCase(),cc=/^i(os$|p)/.test(nr)||nr==="macintel"&&jE>1,bv="android",jd=nr===bv||lc.includes(bv),ip=!cc&&nr.startsWith("mac");nr.startsWith("win");const HE=ip||cc,ba=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ba&&lc.includes("firefox");!ba&&lc.includes("chrom");const Ib=HE,rp=/jsdom|happydom/.test(lc);function oo(n){n.preventDefault(),n.stopPropagation()}function LE(n){return"nativeEvent"in n}function lp(n){return n.pointerType===""&&n.isTrusted?!0:jd&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function cp(n){return rp?!1:!jd&&n.width===0&&n.height===0||jd&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function ma(n,a){const i=["mouse","pen"];return a||i.push("",void 0),i.includes(n)}function UE(n){const a=n.type;return a==="click"||a==="mousedown"||a==="keydown"||a==="keyup"}function uc(){return typeof window<"u"}function $t(n){return up(n)?(n.nodeName||"").toLowerCase():"#document"}function xt(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function Uo(n){var a;return(a=(up(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function up(n){return uc()?n instanceof Node||n instanceof xt(n).Node:!1}function Je(n){return uc()?n instanceof Element||n instanceof xt(n).Element:!1}function ut(n){return uc()?n instanceof HTMLElement||n instanceof xt(n).HTMLElement:!1}function Qs(n){return!uc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof xt(n).ShadowRoot}function ur(n){const{overflow:a,overflowX:i,overflowY:r,display:c}=wn(n);return/auto|scroll|overlay|hidden|clip/.test(a+r+i)&&c!=="inline"&&c!=="contents"}function BE(n){return/^(table|td|th)$/.test($t(n))}function fc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const PE=/transform|translate|scale|rotate|perspective|filter/,IE=/paint|layout|strict|content/,Ya=n=>!!n&&n!=="none";let cd;function fp(n){const a=Je(n)?wn(n):n;return Ya(a.transform)||Ya(a.translate)||Ya(a.scale)||Ya(a.rotate)||Ya(a.perspective)||!dp()&&(Ya(a.backdropFilter)||Ya(a.filter))||PE.test(a.willChange||"")||IE.test(a.contain||"")}function YE(n){let a=zo(n);for(;ut(a)&&!Co(a);){if(fp(a))return a;if(fc(a))return null;a=zo(a)}return null}function dp(){return cd==null&&(cd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),cd}function Co(n){return/^(html|body|#document)$/.test($t(n))}function wn(n){return xt(n).getComputedStyle(n)}function dc(n){return Je(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function zo(n){if($t(n)==="html")return n;const a=n.assignedSlot||n.parentNode||Qs(n)&&n.host||Uo(n);return Qs(a)?a.host:a}function Yb(n){const a=zo(n);return Co(a)?(n.ownerDocument||n).body:ut(a)&&ur(a)?a:Yb(a)}function or(n,a,i){var r;a===void 0&&(a=[]),i===void 0&&(i=!0);const c=Yb(n),f=c===((r=n.ownerDocument)==null?void 0:r.body),d=xt(c);if(f){const m=Hd(d);return a.concat(d,d.visualViewport||[],ur(c)?c:[],m&&i?or(m):[])}else return a.concat(c,or(c,[],i))}function Hd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function It(n){let a=n.activeElement;for(;a?.shadowRoot?.activeElement!=null;)a=a.shadowRoot.activeElement;return a}function De(n,a){if(!n||!a)return!1;const i=a.getRootNode?.();if(n.contains(a))return!0;if(i&&Qs(i)){let r=a;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function Tt(n){return"composedPath"in n?n.composedPath()[0]??n.target:n.target}const Ld="data-base-ui-focusable",qb="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",pc="ArrowLeft",hc="ArrowRight",Vb="ArrowUp",pp="ArrowDown",Gb="data-starting-style",qE="data-ending-style",VE={[Gb]:""},GE={[qE]:""},hp={transitionStatus(n){return n==="starting"?VE:n==="ending"?GE:null}},XE="data-open",FE="data-closed",KE="data-anchor-hidden",Xb="data-popup-open",QE="data-pressed",ZE={[Xb]:""},WE={[Xb]:"",[QE]:""},$E={[XE]:""},JE={[FE]:""},ew={[KE]:""},mp={open(n){return n?ZE:null}},Ud={open(n){return n?WE:null}},mc={open(n){return n?$E:JE},anchorHidden(n){return n?ew:null}},gc={...mc,...hp},Bd="data-trigger-disabled";function Gl(n,a){if(!Je(n))return!1;const i=n;if(a.hasElement(i))return!i.hasAttribute(Bd);for(const[,r]of a.entries())if(De(r,i))return!r.hasAttribute(Bd);return!1}function ud(n,a){if(a==null)return!1;if("composedPath"in n)return n.composedPath().includes(a);const i=n;return i.target!=null&&a.contains(i.target)}function tw(n){return n.matches("html,body")}function yc(n){return ut(n)&&n.matches(qb)}function nw(n){return n?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${qb}`)!=null}function Pd(n){return n?n.getAttribute("role")==="combobox"&&yc(n):!1}function Xl(n){if(!n||rp)return!0;try{return n.matches(":focus-visible")}catch{return!0}}function Id(n){return n?n.hasAttribute(Ld)?n:n.querySelector(`[${Ld}]`)||n:null}function ow(n,a){return a!=null&&!ma(a)?0:typeof n=="function"?n():n}function Ka(n,a,i){const r=ow(n,i);return typeof r=="number"?r:r?.[a]}function xv(n){return typeof n=="function"?n():n}function Fb(n,a){return a||n==="click"||n==="mousedown"}function aw(n){return n?.includes("mouse")&&n!=="mousedown"}const vc="none",ko="trigger-press",At="trigger-hover",Gs="trigger-focus",gp="outside-press",Kb="item-press",Qb="close-press",Qa="focus-out",fr="escape-key",Fl="list-navigation",sw="cancel-open",Zi="sibling-open",iw="disabled",bc="imperative-action";function Ke(n,a,i,r){let c=!1,f=!1;const d=wt;return{reason:n,event:a??new Event("base-ui"),cancel(){c=!0},allowPropagation(){f=!0},get isCanceled(){return c},get isPropagationAllowed(){return f},trigger:i,...d}}const Zb=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new mn,currentIdRef:{current:null},currentContextRef:{current:null}});function rw(n,a){n.current=a.current}function lw(n){const{children:a,delay:i,timeoutMs:r=0}=n,c=b.useRef(i),f=b.useRef(i),d=b.useRef(null),m=b.useRef(null),p=tn();return Ee(()=>{if(f.current=i,!d.current){c.current=i;return}c.current={open:Ka(c.current,"open"),close:Ka(i,"close")}},[i,d,c,f]),y.jsx(Zb.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:c,initialDelayRef:f,currentIdRef:d,timeoutMs:r,currentContextRef:m,timeout:p}),[r,p]),children:a})}function cw(n,a={open:!1}){const{open:i}=a,r="rootStore"in n?n.rootStore:n,c=r.useState("floatingId"),f=b.useContext(Zb),{currentIdRef:d,delayRef:m,timeoutMs:p,initialDelayRef:h,currentContextRef:v,hasProvider:x,timeout:S}=f,[T,w]=b.useState(!1),C=b.useRef(i);return Ee(()=>{C.current=i},[i]),Ee(()=>{function M(){v.current?.setIsInstantPhase(!1),d.current=null,v.current=null,m.current=h.current,S.clear()}if(d.current&&!i&&d.current===c){if(w(!1),p){const O=c;return S.start(p,()=>{r.select("open")||d.current&&d.current!==O||M()}),()=>{(C.current||d.current!==O)&&S.clear()}}M()}},[i,c,d,m,p,h,v,S,r]),Ee(()=>{if(!i)return;const M=v.current,O=d.current;S.clear(),v.current={onOpenChange:r.setOpen,setIsInstantPhase:w},d.current=c,m.current={open:0,close:Ka(h.current,"close")},O!==null&&O!==c?(w(!0),M?.setIsInstantPhase(!0),M?.onOpenChange(!1,Ke(vc))):(w(!1),M?.setIsInstantPhase(!1))},[i,c,r,d,m,h,v,S]),Ee(()=>()=>{if(d.current===c){if(v.current=null,!C.current)return;d.current=null,rw(m,h),S.clear()}},[v,d,m,c,h,S]),b.useMemo(()=>({activeIdRef:d,hasProvider:x,delayRef:m,isInstantPhase:T}),[d,x,m,T])}function Ie(n,a,i,r){return n.addEventListener(a,i,r),()=>{n.removeEventListener(a,i,r)}}function Wn(...n){return()=>{for(let a=0;a<n.length;a+=1){const i=n[a];i&&i()}}}function Za(n,a,i,r){const c=en(Wb).current;return fw(c,n,a,i,r)&&$b(c,[n,a,i,r]),c.callback}function uw(n){const a=en(Wb).current;return dw(a,n)&&$b(a,n),a.callback}function Wb(){return{callback:null,cleanup:null,refs:[]}}function fw(n,a,i,r,c){return n.refs[0]!==a||n.refs[1]!==i||n.refs[2]!==r||n.refs[3]!==c}function dw(n,a){return n.refs.length!==a.length||n.refs.some((i,r)=>i!==a[r])}function $b(n,a){if(n.refs=a,a.every(i=>i==null)){n.callback=null;return}n.callback=i=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),i!=null){const r=Array(a.length).fill(null);for(let c=0;c<a.length;c+=1){const f=a[c];if(f!=null)switch(typeof f){case"function":{const d=f(i);typeof d=="function"&&(r[c]=d);break}case"object":{f.current=i;break}}}n.cleanup=()=>{for(let c=0;c<a.length;c+=1){const f=a[c];if(f!=null)switch(typeof f){case"function":{const d=r[c];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}function Ut(n){const a=en(pw,n).current;return a.next=n,Ee(a.effect),a}function pw(n){const a={current:n,next:n,effect:()=>{a.current=a.next}};return a}const yp={...bE},fd=yp.useInsertionEffect,hw=fd&&fd!==yp.useLayoutEffect?fd:n=>n();function Ce(n){const a=en(mw).current;return a.next=n,hw(a.effect),a.trampoline}function mw(){const n={next:void 0,callback:gw,trampoline:(...a)=>n.callback?.(...a),effect:()=>{n.callback=n.next}};return n}function gw(){}const Nl=null;class yw{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=a=>{this.isScheduled=!1;const i=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let c=0;c<i.length;c+=1)i[c]?.(a)};request(a){const i=this.nextId;return this.nextId+=1,this.callbacks.push(a),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),i}cancel(a){const i=a-this.startId;i<0||i>=this.callbacks.length||this.callbacks[i]!==null&&(this.callbacks[i]=null,this.callbacksCount-=1)}}let Dl=new yw;class ao{static create(){return new ao}static request(a){return Dl.request(a)}static cancel(a){return Dl.cancel(a)}currentId=Nl;request(a){this.cancel(),this.currentId=Dl.request(()=>{this.currentId=Nl,a()})}cancel=()=>{this.currentId!==Nl&&(Dl.cancel(this.currentId),this.currentId=Nl)};disposeEffect=()=>this.cancel}function ar(){const n=en(ao.create).current;return rc(n.disposeEffect),n}function Qe(n){return n?.ownerDocument||document}const vw={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Jb={...vw,position:"fixed",top:0,left:0},jo=b.forwardRef(function(a,i){const[r,c]=b.useState();Ee(()=>{Ib&&ba&&c("button")},[]);const f={tabIndex:0,role:r};return y.jsx("span",{...a,ref:i,style:Jb,"aria-hidden":r?void 0:!0,...f,"data-base-ui-focus-guard":""})}),Zs=Math.min,Ao=Math.max,Kl=Math.round,_l=Math.floor,Mo=n=>({x:n,y:n}),bw={left:"right",right:"left",bottom:"top",top:"bottom"};function e0(n,a,i){return Ao(n,Zs(a,i))}function ya(n,a){return typeof n=="function"?n(a):n}function In(n){return n.split("-")[0]}function Ho(n){return n.split("-")[1]}function vp(n){return n==="x"?"y":"x"}function bp(n){return n==="y"?"height":"width"}function Bn(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function xp(n){return vp(Bn(n))}function xw(n,a,i){i===void 0&&(i=!1);const r=Ho(n),c=xp(n),f=bp(c);let d=c==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[f]>a.floating[f]&&(d=Ql(d)),[d,Ql(d)]}function Sw(n){const a=Ql(n);return[Yd(n),a,Yd(a)]}function Yd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Sv=["left","right"],Tv=["right","left"],Tw=["top","bottom"],Ew=["bottom","top"];function ww(n,a,i){switch(n){case"top":case"bottom":return i?a?Tv:Sv:a?Sv:Tv;case"left":case"right":return a?Tw:Ew;default:return[]}}function Rw(n,a,i,r){const c=Ho(n);let f=ww(In(n),i==="start",r);return c&&(f=f.map(d=>d+"-"+c),a&&(f=f.concat(f.map(Yd)))),f}function Ql(n){const a=In(n);return bw[a]+n.slice(a.length)}function Ow(n){var a,i,r,c;return{top:(a=n.top)!=null?a:0,right:(i=n.right)!=null?i:0,bottom:(r=n.bottom)!=null?r:0,left:(c=n.left)!=null?c:0}}function t0(n){return typeof n!="number"?Ow(n):{top:n,right:n,bottom:n,left:n}}function Zl(n){const{x:a,y:i,width:r,height:c}=n;return{width:r,height:c,top:i,left:a,right:a+r,bottom:i+c,x:a,y:i}}function $i(n,a){return a<0||a>=n.length}function Il(n,a){return Oo(n.current,{disabledIndices:a})}function qd(n,a){return Oo(n.current,{decrement:!0,startingIndex:n.current.length,disabledIndices:a})}function Oo(n,{startingIndex:a=-1,decrement:i=!1,disabledIndices:r,amount:c=1}={}){let f=a;do f+=i?-c:c;while(f>=0&&f<=n.length-1&&Xs(n,f,r));return f}function Xs(n,a,i){if(typeof i=="function"?i(a):i?.includes(a)??!1)return!0;const c=n[a];return c?!xc(c)||c.matches(":disabled")?!0:!i&&(c.hasAttribute("disabled")||c.getAttribute("aria-disabled")==="true"):!1}function Cw(n){return n.visibility==="hidden"||n.visibility==="collapse"}function xc(n,a=n?wn(n):null){return!n||!n.isConnected||!a||Cw(a)?!1:typeof n.checkVisibility=="function"?n.checkVisibility():a.display!=="none"&&a.display!=="contents"}const Aw='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function Mw(n){const a=n.assignedSlot;if(a)return a;if(n.parentElement)return n.parentElement;const i=n.getRootNode();return Qs(i)?i.host:null}function Vd(n){for(const a of Array.from(n.children))if($t(a)==="summary")return a;return null}function Nw(n,a){const i=Vd(a);return!!i&&(n===i||De(i,n))}function n0(n){const a=n?$t(n):"";return n!=null&&n.matches(Aw)&&(a!=="summary"||n.parentElement!=null&&$t(n.parentElement)==="details"&&Vd(n.parentElement)===n)&&(a!=="details"||Vd(n)==null)&&(a!=="input"||n.type!=="hidden")}function o0(n){if(!n0(n)||!n.isConnected||n.matches(":disabled"))return!1;for(let a=n;a;a=Mw(a)){const i=a!==n,r=$t(a)==="slot";if(a.hasAttribute("inert")||i&&$t(a)==="details"&&!a.open&&!Nw(n,a)||a.hasAttribute("hidden")||!r&&!Dw(a,i))return!1}return!0}function Dw(n,a){const i=wn(n);return a?i.display!=="none":xc(n,i)}function a0(n){const a=n.tabIndex;if(a<0){const i=$t(n);if(i==="details"||i==="audio"||i==="video"||ut(n)&&n.isContentEditable)return 0}return a}function dd(n){if($t(n)!=="input")return null;const a=n;return a.type==="radio"&&a.name!==""?a:null}function _w(n,a){const i=dd(n);if(!i)return!0;const r=a.find(c=>{const f=dd(c);return f?.name===i.name&&f.form===i.form&&f.checked});return r?r===i:a.find(c=>{const f=dd(c);return f?.name===i.name&&f.form===i.form})===i}function s0(n){if(ut(n)&&$t(n)==="slot"){const a=n.assignedElements({flatten:!0});if(a.length>0)return a}return ut(n)&&n.shadowRoot?Array.from(n.shadowRoot.children):Array.from(n.children)}function i0(n,a){s0(n).forEach(i=>{n0(i)&&a.push(i),i0(i,a)})}function r0(n,a,i){s0(n).forEach(r=>{ut(r)&&r.matches(a)&&i.push(r),r0(r,a,i)})}function Sp(n){return o0(n)&&a0(n)>=0}function l0(n){const a=[];return i0(n,a),a.filter(o0)}function dr(n){const a=l0(n);return a.filter(i=>a0(i)>=0&&_w(i,a))}function c0(n,a){const i=dr(n),r=i.length;if(r===0)return;const c=It(Qe(n)),f=i.indexOf(c),d=f===-1?a===1?0:r-1:f+a;return i[d]}function Tp(n){return c0(Qe(n).body,1)||n}function u0(n){return c0(Qe(n).body,-1)||n}function f0(n,a){if(!n)return null;const i=dr(Qe(n).body),r=i.length;if(r===0)return null;const c=i.indexOf(n);if(c===-1)return null;const f=(c+a+r)%r;return i[f]}function zw(n){return f0(n,1)}function kw(n){return f0(n,-1)}function Fs(n,a){const i=a||n.currentTarget,r=n.relatedTarget;return!r||!De(i,r)}function jw(n){dr(n).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function Ev(n){const a=[];r0(n,"[data-tabindex]",a),a.forEach(i=>{const r=i.dataset.tabindex;delete i.dataset.tabindex,r?i.setAttribute("tabindex",r):i.removeAttribute("tabindex")})}function va(n,a,i=!0){return n.filter(c=>c.parentId===a).flatMap(c=>[...!i||c.context?.open?[c]:[],...va(n,c.id,i)])}function wv(n,a){let i=[],r=n.find(c=>c.id===a)?.parentId;for(;r;){const c=n.find(f=>f.id===r);r=c?.parentId,c&&(i=i.concat(c))}return i}function sr(n){return`data-base-ui-${n}`}let zl=0;function Yl(n,a={}){const{preventScroll:i=!1,sync:r=!1,shouldFocus:c}=a;cancelAnimationFrame(zl);function f(){c&&!c()||n?.focus({preventScroll:i})}if(r)return f(),sp;const d=requestAnimationFrame(f);return zl=d,()=>{zl===d&&(cancelAnimationFrame(d),zl=0)}}const pd={inert:new WeakMap,"aria-hidden":new WeakMap},Rv="data-base-ui-inert",Gd={inert:new WeakSet,"aria-hidden":new WeakSet};let Ki=new WeakMap,hd=0;function Hw(n){return Gd[n]}function d0(n){return n?Qs(n)?n.host:d0(n.parentNode):null}const Ov=(n,a)=>a.map(i=>{if(n.contains(i))return i;const r=d0(i);return n.contains(r)?r:null}).filter(i=>i!=null),Cv=n=>{const a=new Set;return n.forEach(i=>{let r=i;for(;r&&!a.has(r);)a.add(r),r=r.parentNode}),a},Av=(n,a,i)=>{const r=[],c=f=>{!f||i.has(f)||Array.from(f.children).forEach(d=>{$t(d)!=="script"&&(a.has(d)?c(d):r.push(d))})};return c(n),r};function Lw(n,a,i,r,{mark:c=!0}){let f=null;r?f="inert":i&&(f="aria-hidden");let d=null,m=null;const p=Ov(a,n),h=c?Av(a,Cv(p),new Set(p)):[],v=[],x=[];if(f){const S=pd[f],T=Hw(f);m=T,d=S;const w=Ov(a,Array.from(a.querySelectorAll("[aria-live]"))),C=p.concat(w);Av(a,Cv(C),new Set(C)).forEach(O=>{const N=O.getAttribute(f),R=N!==null&&N!=="false",D=(S.get(O)||0)+1;S.set(O,D),v.push(O),D===1&&R&&T.add(O),R||O.setAttribute(f,f==="inert"?"":"true")})}return c&&h.forEach(S=>{const T=(Ki.get(S)||0)+1;Ki.set(S,T),x.push(S),T===1&&S.setAttribute(Rv,"")}),hd+=1,()=>{d&&v.forEach(S=>{const w=(d.get(S)||0)-1;d.set(S,w),w||(!m?.has(S)&&f&&S.removeAttribute(f),m?.delete(S))}),c&&x.forEach(S=>{const T=(Ki.get(S)||0)-1;Ki.set(S,T),T||S.removeAttribute(Rv)}),hd-=1,hd||(pd.inert=new WeakMap,pd["aria-hidden"]=new WeakMap,Gd.inert=new WeakSet,Gd["aria-hidden"]=new WeakSet,Ki=new WeakMap)}}function Mv(n,a={}){const{ariaHidden:i=!1,inert:r=!1,mark:c=!0}=a,f=Qe(n[0]).body;return Lw(n,f,i,r,{mark:c})}var Yn=Ub();let Nv=0;function Uw(n,a="mui"){const[i,r]=b.useState(n),c=n||i;return b.useEffect(()=>{i==null&&(Nv+=1,r(`${a}-${Nv}`))},[i,a]),c}const Dv=yp.useId;function Wa(n,a){if(Dv!==void 0){const i=Dv();return n??(a?`${a}-${i}`:i)}return Uw(n,a)}const Bw=parseInt(b.version,10);function Ep(n){return Bw>=n}function _v(n){if(!b.isValidElement(n))return null;const a=n,i=a.props;return(Ep(19)?i?.ref:a.ref)??null}function Xd(n,a){if(n&&!a)return n;if(!n&&a)return a;if(n||a)return{...n,...a}}function Pw(n,a){const i={};for(const r in n){const c=n[r];if(a?.hasOwnProperty(r)){const f=a[r](c);f!=null&&Object.assign(i,f);continue}c===!0?i[`data-${r.toLowerCase()}`]="":c&&(i[`data-${r.toLowerCase()}`]=c.toString())}return i}function Iw(n,a){return typeof n=="function"?n(a):n}function Yw(n,a){return typeof n=="function"?n(a):n}const wp={};function No(n,a,i,r,c){if(!i&&!r&&!c&&!n)return Wl(a);let f=Wl(n);return a&&(f=Wi(f,a)),i&&(f=Wi(f,i)),r&&(f=Wi(f,r)),c&&(f=Wi(f,c)),f}function qw(n){if(n.length===0)return wp;if(n.length===1)return Wl(n[0]);let a=Wl(n[0]);for(let i=1;i<n.length;i+=1)a=Wi(a,n[i]);return a}function Wl(n){return Rp(n)?{...h0(n,wp)}:Vw(n)}function Wi(n,a){return Rp(a)?h0(a,n):Gw(n,a)}function Vw(n){const a={...n};for(const i in a){const r=a[i];p0(i,r)&&(a[i]=m0(r))}return a}function Gw(n,a){if(!a)return n;for(const i in a){const r=a[i];switch(i){case"style":{n[i]=Xd(n.style,r);break}case"className":{n[i]=g0(n.className,r);break}default:p0(i,r)?n[i]=Xw(n[i],r):n[i]=r}}return n}function p0(n,a){const i=n.charCodeAt(0),r=n.charCodeAt(1),c=n.charCodeAt(2);return i===111&&r===110&&c>=65&&c<=90&&(typeof a=="function"||typeof a>"u")}function Rp(n){return typeof n=="function"}function h0(n,a){return Rp(n)?n(a):n??wp}function Xw(n,a){return a?n?(...i)=>{const r=i[0];if(y0(r)){const f=r;$l(f);const d=a(...i);return f.baseUIHandlerPrevented||n?.(...i),d}const c=a(...i);return n?.(...i),c}:m0(a):n}function m0(n){return n&&((...a)=>{const i=a[0];return y0(i)&&$l(i),n(...a)})}function $l(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function g0(n,a){return a?n?a+" "+n:a:n}function y0(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function yt(n,a,i={}){let r=a.render;i.enabled!==!1&&(r=Zw(r));const c=Fw(a,i,r);if(i.enabled===!1)return null;const f=i.state??wt;return Ww(n,r,c,f)}function Fw(n,a,i){const{className:r,style:c}=n,{state:f=wt,ref:d,props:m,stateAttributesMapping:p,enabled:h=!0}=a,v=h?Iw(r,f):void 0,x=h?Yw(c,f):void 0,S=h?Pw(f,p):wt,T=h&&m?Kw(m):void 0,w=h?Xd(S,T)??{}:wt;return typeof document<"u"&&(h?Array.isArray(d)?w.ref=uw([w.ref,_v(i),...d]):w.ref=Za(w.ref,_v(i),d):Za(null,null)),h?(v!==void 0&&(w.className=g0(w.className,v)),x!==void 0&&(w.style=Xd(w.style,x)),w):wt}function Kw(n){return Array.isArray(n)?qw(n):No(void 0,n)}const Qw=Symbol.for("react.lazy");function Zw(n){if(n?.$$typeof!==Qw)return n;const a=b.Children.toArray(n)[0];return b.isValidElement(a)?a:n}function Ww(n,a,i,r){if(a){if(typeof a=="function")return a(i,r);const c=No(i,a.props);return c.ref=i.ref,b.cloneElement(a,c)}if(n&&typeof n=="string")return $w(n,i);throw new Error(Bt(8))}function $w(n,a){return n==="button"?b.createElement("button",{type:"button",...a,key:a.key}):n==="img"?b.createElement("img",{alt:"",...a,key:a.key}):b.createElement(n,a)}const Jw=500,v0=500,eR={style:{transition:"none"}},b0="data-base-ui-click-trigger",tR="data-base-ui-swipe-ignore",nR="data-swipe-ignore",oR=`[${tR}]`,aR=`[${nR}]`,sR={fallbackAxisSide:"none"},Op={fallbackAxisSide:"end"},iR={clipPath:"inset(50%)",position:"fixed",top:0,left:0},x0=b.createContext(null),S0=()=>b.useContext(x0),rR=sr("portal");function T0(n={}){const{ref:a,container:i,componentProps:r=wt,elementProps:c}=n,f=Wa(),m=S0()?.portalNode,[p,h]=b.useState(null),[v,x]=b.useState(null),S=Ce(M=>{M!==null&&x(M)}),T=b.useRef(null);Ee(()=>{if(i===null){T.current&&(T.current=null,x(null),h(null));return}const M=(i&&(up(i)?i:i.current))??m??document.body;if(M==null){T.current&&(T.current=null,x(null),h(null));return}T.current!==M&&(T.current=M,x(null),h(M))},[i,m]);const w=yt("div",r,{ref:[a,S],props:[{id:f,[rR]:""},c]}),C=p&&w?Yn.createPortal(w,p):null;return{node:v,nodeId:b.isValidElement(w)?w.props.id:void 0,subtree:C}}const Cp=b.forwardRef(function(a,i){const{render:r,className:c,style:f,children:d,container:m,portalOwnerRole:p,...h}=a,{node:v,nodeId:x,subtree:S}=T0({container:m,ref:i,componentProps:a,elementProps:h}),T=b.useRef(null),w=b.useRef(null),C=b.useRef(null),M=b.useRef(null),[O,N]=b.useState(null),R=b.useRef(!1),D=O?.modal,k=O?.open,B=!!O&&!O.modal&&O.open&&!!v;b.useEffect(()=>{if(!v||D)return;function U(Y){v&&Y.relatedTarget&&Fs(Y)&&(Y.type==="focusin"?R.current&&(Ev(v),R.current=!1):(jw(v),R.current=!0))}return Wn(Ie(v,"focusin",U,!0),Ie(v,"focusout",U,!0))},[v,D]),Ee(()=>{!v||k!==!0||!R.current||(Ev(v),R.current=!1)},[k,v]);const j=b.useMemo(()=>({beforeOutsideRef:T,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:M,portalNode:v,setFocusManagerState:N}),[v]);return y.jsxs(b.Fragment,{children:[S,y.jsxs(x0.Provider,{value:j,children:[B&&v&&y.jsx(jo,{"data-type":"outside",ref:T,onFocus:U=>{if(Fs(U,v))C.current?.focus();else{const Y=O?O.domReference:null;u0(Y)?.focus()}}}),B&&v&&y.jsx("span",{role:p,"aria-owns":x,style:iR}),v&&Yn.createPortal(d,v),B&&v&&y.jsx(jo,{"data-type":"outside",ref:w,onFocus:U=>{if(Fs(U,v))M.current?.focus();else{const Y=O?O.domReference:null;Tp(Y)?.focus(),O?.closeOnFocusOut&&O?.onOpenChange(!1,Ke(Qa,U.nativeEvent))}}})]})]})});function E0(){const n=new Map;return{emit(a,i){n.get(a)?.forEach(r=>r(i))},on(a,i){n.has(a)||n.set(a,new Set),n.get(a).add(i)},off(a,i){n.get(a)?.delete(i)}}}class Ap{nodesRef={current:[]};events=E0();addNode(a){this.nodesRef.current.push(a)}removeNode(a){const i=this.nodesRef.current.findIndex(r=>r===a);i!==-1&&this.nodesRef.current.splice(i,1)}}const w0=b.createContext(null),R0=b.createContext(null),Ja=()=>b.useContext(w0)?.id||null,xa=n=>{const a=b.useContext(R0);return n??a};function Mp(n){const a=Wa(),i=xa(n),r=Ja();return Ee(()=>{if(!a)return;const c={id:a,parentId:r};return i?.addNode(c),()=>{i?.removeNode(c)}},[i,a,r]),a}function O0(n){const{children:a,id:i}=n,r=Ja();return y.jsx(w0.Provider,{value:b.useMemo(()=>({id:i,parentId:r}),[i,r]),children:a})}function C0(n){const{children:a,externalTree:i}=n,r=en(()=>i??new Ap).current;return y.jsx(R0.Provider,{value:r,children:a})}function Ro(n){return n==null?n:"current"in n?n.current:n}function lR(n,a){const i=xt(Tt(n));return n instanceof i.KeyboardEvent?"keyboard":n instanceof i.FocusEvent?a||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof i.MouseEvent?a||(n.detail===0?"keyboard":"mouse"):""}const zv=20;let ha=[];function Np(){ha=ha.filter(n=>n.deref()?.isConnected)}function kv(n){Np(),n&&$t(n)!=="body"&&(ha.push(new WeakRef(n)),ha.length>zv&&(ha=ha.slice(-zv)))}function jv(){return Np(),ha[ha.length-1]?.deref()}function cR(n){return n?Sp(n)?n:dr(n)[0]||n:null}function Hv(n){if(n.hasAttribute("tabindex")&&!n.hasAttribute("data-tabindex")||!n.getAttribute("role")?.includes("dialog"))return;const i=l0(n).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return Sp(c)||c.hasAttribute("data-tabindex")&&!f.startsWith("-")}),r=n.getAttribute("tabindex");i.length===0?r!=="0"&&(n.setAttribute("tabindex","0"),n.setAttribute("data-tabindex","0")):(r!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function Dp(n){const{context:a,children:i,disabled:r=!1,initialFocus:c=!0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,closeOnFocusOut:p=!0,openInteractionType:h="",nextFocusableElement:v,previousFocusableElement:x,beforeContentFocusGuardRef:S,externalTree:T,getInsideElements:w}=n,C="rootStore"in a?a.rootStore:a,M=C.useState("open"),O=C.useState("domReferenceElement"),N=C.useState("floatingElement"),{events:R,dataRef:D}=C.context,k=Ce(()=>D.current.floatingContext?.nodeId),B=c===!1,j=Pd(O)&&B,U=Ut(c),Y=Ut(f),I=Ut(h),H=Ut(M),_=xa(T),V=S0(),te=b.useRef(!1),Q=b.useRef(!1),z=b.useRef(!1),X=b.useRef(null),F=b.useRef(""),W=b.useRef(""),ae=b.useRef(null),A=b.useRef(null),G=Za(ae,S,V?.beforeInsideRef),ne=Za(A,V?.afterInsideRef),Z=tn(),le=tn(),se=ar(),he=V!=null,pe=Id(N),ge=Ce((Re=pe)=>Re?dr(Re):[]),_e=Ce(()=>w?.().filter(Re=>Re!=null)??[]);b.useEffect(()=>{if(r||!m)return;function Re(ke){ke.key==="Tab"&&De(pe,It(Qe(pe)))&&ge().length===0&&!j&&oo(ke)}const be=Qe(pe);return Ie(be,"keydown",Re)},[r,pe,m,j,ge]),b.useEffect(()=>{if(r||!M)return;const Re=Qe(pe);function be(){z.current=!1}function ke(Ge){const Se=Tt(Ge),Ue=_e(),Te=De(N,Se)||De(O,Se)||De(V?.portalNode,Se)||Ue.some(we=>we===Se||De(we,Se));z.current=!Te,W.current=Ge.pointerType||"keyboard",Se?.closest(`[${b0}]`)&&(Q.current=!0,le.start(0,()=>{Q.current=!1}))}function Le(){W.current="keyboard"}return Wn(Ie(Re,"pointerdown",ke,!0),Ie(Re,"pointerup",be,!0),Ie(Re,"pointercancel",be,!0),Ie(Re,"keydown",Le,!0),be)},[r,N,O,pe,M,V,le,_e]),b.useEffect(()=>{if(r||!p)return;const Re=Qe(pe);function be(){Q.current=!0,le.start(0,()=>{Q.current=!1})}function ke(Ue){const Te=Tt(Ue);Sp(Te)&&(X.current=Te)}function Le(Ue){const Te=Ue.relatedTarget,we=Ue.currentTarget,Ae=Tt(Ue);m&&Te==null&&Ae!=null&&De(N,Ae)&&kv(Ae),queueMicrotask(()=>{const Ze=k(),Me=C.context.triggerElements,fe=_e(),ye=Te?.hasAttribute(sr("focus-guard"))&&[ae.current,A.current,V?.beforeInsideRef.current,V?.afterInsideRef.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,Ro(x),Ro(v)].includes(Te),de=!(De(O,Te)||De(N,Te)||De(Te,N)||De(V?.portalNode,Te)||fe.some(ie=>ie===Te||De(ie,Te))||Me.hasMatchingElement(ie=>De(ie,Te))||ye||_&&(va(_.nodesRef.current,Ze).find(ie=>De(ie.context?.elements.floating,Te)||De(ie.context?.elements.domReference,Te))||wv(_.nodesRef.current,Ze).find(ie=>[ie.context?.elements.floating,Id(ie.context?.elements.floating)].includes(Te)||ie.context?.elements.domReference===Te)));if(we===O&&pe&&Hv(pe),d&&we!==O&&!xc(Ae)&&It(Re)===Re.body){if(ut(pe)&&(pe.focus(),d==="popup")){se.request(()=>{pe.focus()});return}const ie=ge(),ve=X.current,Be=(ve&&ie.includes(ve)?ve:null)||ie[ie.length-1]||pe;ut(Be)&&Be.focus()}if(D.current.insideReactTree){D.current.insideReactTree=!1;return}(j||!m)&&Te&&de&&!Q.current&&(j||Te!==jv())&&(te.current=!0,C.setOpen(!1,Ke(Qa,Ue)))})}function Ge(){z.current||(D.current.insideReactTree=!0,Z.start(0,()=>{D.current.insideReactTree=!1}))}const Se=ut(O)?O:null;if(!(!N&&!Se))return Wn(Se&&Ie(Se,"focusout",Le),Se&&Ie(Se,"pointerdown",be),N&&Ie(N,"focusin",ke),N&&Ie(N,"focusout",Le),N&&V&&Ie(N,"focusout",Ge,!0))},[r,O,N,pe,m,_,V,C,p,d,ge,j,k,D,Z,le,se,v,x,_e]),b.useEffect(()=>{if(r||!N||!M)return;const Re=Array.from(V?.portalNode?.querySelectorAll(`[${sr("portal")}]`)||[]),ke=(_?wv(_.nodesRef.current,k()):[]).find(we=>Pd(we.context?.elements.domReference||null))?.context?.elements.domReference,Ge=[...[N,...Re,ae.current,A.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,..._e()],ke,Ro(x),Ro(v),j?O:null].filter(we=>we!=null),Se=Mv(Ge,{ariaHidden:m||j,mark:!1}),Ue=[N,...Re].filter(we=>we!=null),Te=Mv(Ue);return()=>{Te(),Se()}},[M,r,O,N,m,V,j,_,k,v,x,_e]),Ee(()=>{if(!M||r||!ut(pe))return;F.current="",W.current="";const Re=Qe(pe),be=It(Re);queueMicrotask(()=>{const ke=U.current,Le=typeof ke=="function"?ke(I.current||""):ke;if(Le===void 0||Le===!1||De(pe,be))return;let Se=null;const Ue=()=>(Se==null&&(Se=ge(pe)),Se[0]||pe);let Te;Le===!0||Le===null?Te=Ue():Te=Ro(Le),Te=Te||Ue();const we=De(pe,It(Re));Yl(Te,{preventScroll:Te===pe,shouldFocus(){if(!H.current)return!1;if(we)return!0;const Ae=It(Re);return!(Ae!==Te&&De(pe,Ae))}})})},[r,M,pe,ge,U,I,H]),Ee(()=>{if(r||!pe)return;const Re=Qe(pe),be=It(Re),ke=I.current==null;kv(be);function Le(Se){if(Se.open||(F.current=lR(Se.nativeEvent,W.current)),Se.reason===At&&Se.nativeEvent.type==="mouseleave"&&(te.current=!0),Se.reason===gp)if(Se.nested)te.current=!1;else if(lp(Se.nativeEvent)||cp(Se.nativeEvent))te.current=!1;else{let Ue=!1;Qe(pe).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?te.current=!1:te.current=!0}}R.on("openchange",Le);function Ge(Se){const Ue=Y.current;let Te=typeof Ue=="function"?Ue(Se):Ue;if(Te===void 0||Te===!1)return null;Te===null&&(Te=!0);const we=O?.isConnected?O:null,Ae=be?.isConnected&&$t(be)!=="body"?be:null;let Ze=ke?Ae||we:we||Ae;return Ze||(Ze=jv()||null),typeof Te=="boolean"?Ze:Ro(Te)||Ze||null}return()=>{R.off("openchange",Le);const Se=It(Re),Ue=_e(),Te=De(N,Se)||Ue.some(Me=>Me===Se||De(Me,Se))||_&&va(_.nodesRef.current,k(),!1).some(Me=>De(Me.context?.elements.floating,Se)),we=Y.current,Ae=F.current,Ze=Ge(Ae);queueMicrotask(()=>{const Me=cR(Ze),fe=typeof we!="boolean";if(we&&!te.current&&ut(Me)&&(!(!fe&&Me!==Se&&Se!==Re.body)||Te)){const ye={preventScroll:!0};Ae==="keyboard"&&(ye.focusVisible=!0),Me.focus(ye)}te.current=!1})}},[r,N,pe,Y,I,R,_,O,k,_e]),Ee(()=>{if(!ba||M||!N)return;const Re=It(Qe(N));!ut(Re)||!yc(Re)||De(N,Re)&&Re.blur()},[M,N]),Ee(()=>{if(!(r||!V))return V.setFocusManagerState({modal:m,closeOnFocusOut:p,open:M,onOpenChange:C.setOpen,domReference:O}),()=>{V.setFocusManagerState(null)}},[r,V,m,M,C,p,O]),Ee(()=>{if(!(r||!pe))return Hv(pe),()=>{queueMicrotask(Np)}},[r,pe]);const je=!r&&(m?!j:!0)&&(he||m);return y.jsxs(b.Fragment,{children:[je&&y.jsx(jo,{"data-type":"inside",ref:G,onFocus:Re=>{if(m){const be=ge();Yl(be[be.length-1])}else V?.portalNode&&(te.current=!1,Fs(Re,V.portalNode)?Tp(O)?.focus():Ro(x??V.beforeOutsideRef)?.focus())}}),i,je&&y.jsx(jo,{"data-type":"inside",ref:ne,onFocus:Re=>{m?Yl(ge()[0]):V?.portalNode&&(p&&(te.current=!0),Fs(Re,V.portalNode)?u0(O)?.focus():Ro(v??V.afterOutsideRef)?.focus())}})]})}function _p(n,a={}){const{enabled:i=!0,event:r="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:m=0,reason:p=ko}=a,h="rootStore"in n?n.rootStore:n,v=h.context.dataRef,x=b.useRef(void 0),S=ar(),T=tn(),w=b.useMemo(()=>{function C(O,N,R,D){const k=Ke(p,N,R);O&&D==="touch"&&m>0?T.start(m,()=>{h.setOpen(!0,k)}):h.setOpen(O,k)}function M(O,N,R){const D=v.current.openEvent,k=h.select("domReferenceElement")!==N;return O&&k||!O||!c?!0:D&&d?!R(D.type):!1}return{onPointerDown(O){x.current=ma(O.pointerType,!0)&&cp(O.nativeEvent)?"virtual":O.pointerType},onMouseDown(O){const N=x.current,R=O.nativeEvent,D=h.select("open");if(O.button!==0||r==="click"||ma(N,!0)&&f)return;const k=M(D,O.currentTarget,U=>U==="click"||U==="mousedown"),B=Tt(R);if(yc(B)){C(k,R,B,N);return}const j=O.currentTarget;S.request(()=>{C(k,R,j,N)})},onClick(O){if(r==="mousedown-only")return;const N=x.current;if(r==="mousedown"&&N){x.current=void 0;return}if(ma(N,!0)&&f)return;const R=h.select("open"),D=M(R,O.currentTarget,k=>k==="click"||k==="mousedown"||k==="keydown"||k==="keyup");C(D,O.nativeEvent,O.currentTarget,N)},onKeyDown(){x.current=void 0}}},[v,r,f,p,h,d,c,S,T,m]);return b.useMemo(()=>i?{reference:w}:wt,[i,w])}function uR(n,a){let i=null,r=null,c=!1;return{contextElement:n||void 0,getBoundingClientRect(){const f=n?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=a.axis==="x"||a.axis==="both",m=a.axis==="y"||a.axis==="both",p=["mouseenter","mousemove"].includes(a.dataRef.current.openEvent?.type||"")&&a.pointerType!=="touch";let h=f.width,v=f.height,x=f.x,S=f.y;return i==null&&a.x&&d&&(i=f.x-a.x),r==null&&a.y&&m&&(r=f.y-a.y),x-=i||0,S-=r||0,h=0,v=0,!c||p?(h=a.axis==="y"?f.width:0,v=a.axis==="x"?f.height:0,x=d&&a.x!=null?a.x:x,S=m&&a.y!=null?a.y:S):c&&!p&&(v=a.axis==="x"?f.height:v,h=a.axis==="y"?f.width:h),c=!0,{width:h,height:v,x,y:S,top:S,right:x+h,bottom:S+v,left:x}}}}function Lv(n){return n!=null&&n.clientX!=null}function fR(n,a={}){const{enabled:i=!0,axis:r="both"}=a,c="rootStore"in n?n.rootStore:n,f=c.useState("open"),d=c.useState("floatingElement"),m=c.useState("domReferenceElement"),p=c.context.dataRef,h=b.useRef(!1),v=b.useRef(null),[x,S]=b.useState(),[T,w]=b.useState([]),C=Ce(D=>{c.set("positionReference",D)}),M=Ce((D,k,B)=>{h.current||p.current.openEvent&&!Lv(p.current.openEvent)||c.set("positionReference",uR(B??m,{x:D,y:k,axis:r,dataRef:p,pointerType:x}))}),O=Ce(D=>{f?v.current||(M(D.clientX,D.clientY,D.currentTarget),w([])):M(D.clientX,D.clientY,D.currentTarget)}),N=ma(x)?d:f;b.useEffect(()=>{if(!i){C(m);return}if(!N)return;function D(){v.current?.(),v.current=null}const k=xt(d);function B(j){const U=Tt(j);De(d,U)?D():M(j.clientX,j.clientY)}return!p.current.openEvent||Lv(p.current.openEvent)?v.current=Ie(k,"mousemove",B):C(m),D},[N,i,d,p,m,c,M,C,T]),b.useEffect(()=>()=>{c.set("positionReference",null)},[c]),b.useEffect(()=>{i&&!d&&(h.current=!1)},[i,d]),b.useEffect(()=>{!i&&f&&(h.current=!0)},[i,f]);const R=b.useMemo(()=>{function D(k){S(k.pointerType)}return{onPointerDown:D,onPointerEnter:D,onMouseMove:O,onMouseEnter:O}},[O]);return b.useMemo(()=>i?{reference:R,trigger:R}:{},[i,R])}function dR(){return!1}function pR(n){return{escapeKey:typeof n=="boolean"?n:n?.escapeKey??!1,outsidePress:typeof n=="boolean"?n:n?.outsidePress??!0}}function Sc(n,a={}){const{enabled:i=!0,escapeKey:r=!0,outsidePress:c=!0,outsidePressEvent:f="sloppy",referencePress:d=dR,bubbles:m,externalTree:p}=a,h="rootStore"in n?n.rootStore:n,v=h.useState("open"),x=h.useState("floatingElement"),{dataRef:S,events:T}=h.context,w=xa(p),C=Ce(typeof c=="function"?c:()=>!1),M=typeof c=="function"?C:c,O=M!==!1,N=Ce(()=>f),{escapeKey:R,outsidePress:D}=pR(m),k=b.useRef(!1),B=b.useRef(!1),j=b.useRef(!1),U=b.useRef(!1),Y=b.useRef(!1),I=b.useRef(""),H=b.useRef(null),_=tn(),V=tn(),te=Ce(()=>{V.clear(),S.current.insideReactTree=!1}),Q=Ce(Z=>{const le=S.current.floatingContext?.nodeId;return(w?va(w.nodesRef.current,le):[]).some(he=>he.context?.open&&!he.context.dataRef.current[Z])}),z=Ce(Z=>ud(Z,h.select("floatingElement"))||ud(Z,h.select("domReferenceElement"))),X=Ce(Z=>{d()&&h.setOpen(!1,Ke(ko,Z.nativeEvent))}),F=Ce(Z=>{if(!v||!i||!r||Z.key!=="Escape"||Y.current||!R&&Q("__escapeKeyBubbles"))return;const le=LE(Z)?Z.nativeEvent:Z,se=Ke(fr,le);h.setOpen(!1,se),se.isCanceled||Z.preventDefault(),!R&&!se.isPropagationAllowed&&Z.stopPropagation()}),W=Ce(()=>{S.current.insideReactTree=!0,V.start(0,te)}),ae=Ce(Z=>{if(!v||!i||Z.button!==0)return;const le=Tt(Z.nativeEvent);De(h.select("floatingElement"),le)&&(k.current||(k.current=!0,B.current=!1))}),A=Ce(Z=>{!v||!i||(Z.defaultPrevented||Z.nativeEvent.defaultPrevented)&&k.current&&(B.current=!0)});b.useEffect(()=>{function Z(le){le.open||(U.current=!1)}return T.on("openchange",Z),()=>{T.off("openchange",Z)}},[T]),b.useEffect(()=>{if(!v||!i)return v||(U.current=!1),te;S.current.__escapeKeyBubbles=R,S.current.__outsidePressBubbles=D;const Z=new mn,le=new mn,se=Qe(x);function he(){Z.clear(),Y.current=!0}function pe(){Z.start(ba?5:0,()=>{Y.current=!1})}function ge(){j.current=!0,le.start(0,()=>{j.current=!1})}function _e(){k.current=!1,B.current=!1}function je(){const de=I.current,ie=de==="pen"||!de?"mouse":de,ve=N(),Be=typeof ve=="function"?ve():ve;return typeof Be=="string"?Be:Be[ie]}function Re(de){const ie=je();return ie==="intentional"&&de.type!=="click"||ie==="sloppy"&&de.type==="click"}function be(de){const ie=S.current.floatingContext?.nodeId,ve=w&&va(w.nodesRef.current,ie).some(Be=>ud(de,Be.context?.elements.floating));return z(de)||ve}function ke(de){if(Re(de)){de.type!=="click"&&!z(de)&&(le.clear(),j.current=!1),te();return}if(S.current.insideReactTree){te();return}const ie=Tt(de),ve=`[${sr("inert")}]`,Be=Je(ie)?ie.getRootNode():null,Yt=Array.from((Qs(Be)?Be:Qe(h.select("floatingElement"))).querySelectorAll(ve)),an=h.context.triggerElements;if(ie&&(an.hasElement(ie)||an.hasMatchingElement(xe=>De(xe,ie))))return;let Rt=Je(ie)?ie:null;for(;Rt&&!Co(Rt);){const xe=zo(Rt);if(Co(xe)||!Je(xe))break;Rt=xe}if(!(Yt.length&&Je(ie)&&!tw(ie)&&!De(ie,h.select("floatingElement"))&&Yt.every(xe=>!De(Rt,xe)))){if(ut(ie)&&!("touches"in de)){const xe=Co(ie),qe=wn(ie),ot=/auto|scroll/,mt=xe||ot.test(qe.overflowX),On=xe||ot.test(qe.overflowY),qn=mt&&ie.clientWidth>0&&ie.scrollWidth>ie.clientWidth,Cn=On&&ie.clientHeight>0&&ie.scrollHeight>ie.clientHeight,_t=qe.direction==="rtl",Vn=Cn&&(_t?de.offsetX<=ie.offsetWidth-ie.clientWidth:de.offsetX>ie.clientWidth),Fe=qn&&de.offsetY>ie.clientHeight;if(Vn||Fe)return}if(!be(de)){if(je()==="intentional"){if(de.detail!==0&&!lp(de)&&!U.current)return;if(j.current){le.clear(),j.current=!1;return}}typeof M=="function"&&!M(de)||Q("__outsidePressBubbles")||(h.setOpen(!1,Ke(gp,de)),te())}}}function Le(de){je()!=="sloppy"||de.pointerType==="touch"||!h.select("open")||!i||z(de)||ke(de)}function Ge(de){if(je()!=="sloppy"||!h.select("open")||!i||z(de))return;const ie=de.touches[0];ie&&(H.current={startTime:Date.now(),startX:ie.clientX,startY:ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{H.current&&(H.current.dismissOnTouchEnd=!1,H.current.dismissOnMouseDown=!1)}))}function Se(de,ie){const ve=Tt(de);if(!ve)return;const Be=Ie(ve,de.type,()=>{ie(de),Be()})}function Ue(de){I.current="touch",Se(de,Ge)}function Te(de){_.clear(),de.type==="pointerdown"&&(de.button===0&&(U.current=!0),I.current=de.pointerType),!(de.type==="mousedown"&&H.current&&!H.current.dismissOnMouseDown)&&Se(de,ie=>{ie.type==="pointerdown"?Le(ie):ke(ie)})}function we(de){if(de.type==="pointercancel"&&(U.current=!1),!k.current)return;const ie=B.current;if(_e(),je()==="intentional"){if(de.type==="pointercancel"){ie&&ge();return}if(!be(de)){if(ie){ge();return}typeof M=="function"&&!M(de)||(le.clear(),j.current=!0,te())}}}function Ae(de){if(je()!=="sloppy"||!H.current||z(de))return;const ie=de.touches[0];if(!ie)return;const ve=Math.abs(ie.clientX-H.current.startX),Be=Math.abs(ie.clientY-H.current.startY),Yt=Math.sqrt(ve*ve+Be*Be);Yt>5&&(H.current.dismissOnTouchEnd=!0),Yt>10&&(ke(de),_.clear(),H.current=null)}function Ze(de){Se(de,Ae)}function Me(de){je()!=="sloppy"||!H.current||z(de)||(H.current.dismissOnTouchEnd&&ke(de),_.clear(),H.current=null)}function fe(de){Se(de,Me)}const ye=Wn(r&&Wn(Ie(se,"keydown",F),Ie(se,"compositionstart",he),Ie(se,"compositionend",pe)),O&&Wn(Ie(se,"click",Te,!0),Ie(se,"pointerdown",Te,!0),Ie(se,"pointerup",we,!0),Ie(se,"pointercancel",we,!0),Ie(se,"mousedown",Te,!0),Ie(se,"mouseup",we,!0),Ie(se,"touchstart",Ue,{capture:!0,passive:!0}),Ie(se,"touchmove",Ze,{capture:!0,passive:!0}),Ie(se,"touchend",fe,{capture:!0,passive:!0})));return()=>{ye(),Z.clear(),le.clear(),_e(),j.current=!1,te()}},[S,x,r,O,M,v,i,R,D,F,te,N,Q,z,w,h,_]);const G=b.useMemo(()=>({onKeyDown:F,onPointerDown:X,onClick:X}),[F,X]),ne=b.useMemo(()=>({onKeyDown:F,onPointerDown:A,onMouseDown:A,onClickCapture:W,onMouseDownCapture(Z){W(),ae(Z)},onPointerDownCapture(Z){W(),ae(Z)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[F,W,ae,A]);return b.useMemo(()=>i?{reference:G,floating:ne,trigger:G}:{},[i,G,ne])}function Uv(n,a,i){let{reference:r,floating:c}=n;const f=Bn(a),d=xp(a),m=bp(d),p=In(a),h=f==="y",v=r.x+r.width/2-c.width/2,x=r.y+r.height/2-c.height/2,S=r[m]/2-c[m]/2;let T;switch(p){case"top":T={x:v,y:r.y-c.height};break;case"bottom":T={x:v,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:x};break;case"left":T={x:r.x-c.width,y:x};break;default:T={x:r.x,y:r.y}}const w=Ho(a);return w&&(T[d]+=S*(w==="end"?1:-1)*(i&&h?-1:1)),T}async function hR(n,a){var i;a===void 0&&(a={});const{x:r,y:c,platform:f,rects:d,elements:m,strategy:p}=n,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:S=!1,padding:T=0}=ya(a,n),w=t0(T),M=m[S?x==="floating"?"reference":"floating":x],O=Zl(await f.getClippingRect({element:(i=await(f.isElement==null?void 0:f.isElement(M)))==null||i?M:M.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:h,rootBoundary:v,strategy:p})),N=x==="floating"?{x:r,y:c,width:d.floating.width,height:d.floating.height}:d.reference,R=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),D=await(f.isElement==null?void 0:f.isElement(R))&&await(f.getScale==null?void 0:f.getScale(R))||{x:1,y:1},k=Zl(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:N,offsetParent:R,strategy:p}):N);return{top:(O.top-k.top+w.top)/D.y,bottom:(k.bottom-O.bottom+w.bottom)/D.y,left:(O.left-k.left+w.left)/D.x,right:(k.right-O.right+w.right)/D.x}}const mR=50,gR=async(n,a,i)=>{const{placement:r="bottom",strategy:c="absolute",middleware:f=[],platform:d}=i,m=d.detectOverflow?d:{...d,detectOverflow:hR},p=await(d.isRTL==null?void 0:d.isRTL(a));let h=await d.getElementRects({reference:n,floating:a,strategy:c}),{x:v,y:x}=Uv(h,r,p),S=r,T=0;const w={};for(let C=0;C<f.length;C++){const M=f[C];if(!M)continue;const{name:O,fn:N}=M,{x:R,y:D,data:k,reset:B}=await N({x:v,y:x,initialPlacement:r,placement:S,strategy:c,middlewareData:w,rects:h,platform:m,elements:{reference:n,floating:a}});v=R??v,x=D??x,w[O]={...w[O],...k},B&&T<mR&&(T++,typeof B=="object"&&(B.placement&&(S=B.placement),B.rects&&(h=B.rects===!0?await d.getElementRects({reference:n,floating:a,strategy:c}):B.rects),{x:v,y:x}=Uv(h,S,p)),C=-1)}return{x:v,y:x,placement:S,strategy:c,middlewareData:w}},yR=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var i,r;const{placement:c,middlewareData:f,rects:d,initialPlacement:m,platform:p,elements:h}=a,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...M}=ya(n,a);if((i=f.arrow)!=null&&i.alignmentOffset)return{};const O=In(c),N=Bn(m),R=In(m)===m,D=await(p.isRTL==null?void 0:p.isRTL(h.floating)),k=S||(R||!C?[Ql(m)]:Sw(m)),B=w!=="none";!S&&B&&k.push(...Rw(m,C,w,D));const j=[m,...k],U=await p.detectOverflow(a,M),Y=[];let I=((r=f.flip)==null?void 0:r.overflows)||[];if(v&&Y.push(U[O]),x){const te=xw(c,d,D);Y.push(U[te[0]],U[te[1]])}if(I=[...I,{placement:c,overflows:Y}],!Y.every(te=>te<=0)){var H,_;const te=(((H=f.flip)==null?void 0:H.index)||0)+1,Q=j[te];if(Q&&(!(x==="alignment"?N!==Bn(Q):!1)||I.every(F=>Bn(F.placement)===N?F.overflows[0]>0:!0)))return{data:{index:te,overflows:I},reset:{placement:Q}};let z=(_=I.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:_.placement;if(!z)switch(T){case"bestFit":{var V;const X=(V=I.filter(F=>{if(B){const W=Bn(F.placement);return W===N||W==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(W=>W>0).reduce((W,ae)=>W+ae,0)]).sort((F,W)=>F[1]-W[1])[0])==null?void 0:V[0];X&&(z=X);break}case"initialPlacement":z=m;break}if(c!==z)return{reset:{placement:z}}}return{}}}},A0=new Set(["left","top"]);async function vR(n,a){const{placement:i,platform:r,elements:c}=n,f=await(r.isRTL==null?void 0:r.isRTL(c.floating)),d=In(i),m=Ho(i),p=Bn(i)==="y",h=A0.has(d)?-1:1,v=f&&p?-1:1,x=ya(a,n);let{mainAxis:S,crossAxis:T,alignmentAxis:w}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof w=="number"&&(T=m==="end"?w*-1:w),p?{x:T*v,y:S*h}:{x:S*h,y:T*v}}const bR=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var i,r;const{x:c,y:f,placement:d,middlewareData:m}=a,p=await vR(a,n);return d===((i=m.offset)==null?void 0:i.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:c+p.x,y:f+p.y,data:{...p,placement:d}}}}},xR=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:i,y:r,placement:c,platform:f}=a,{mainAxis:d=!0,crossAxis:m=!1,limiter:p={fn:N=>{let{x:R,y:D}=N;return{x:R,y:D}}},...h}=ya(n,a),v={x:i,y:r},x=await f.detectOverflow(a,h),S=Bn(c),T=vp(S);let w=v[T],C=v[S];const M=(N,R)=>e0(R+x[N==="y"?"top":"left"],R,R-x[N==="y"?"bottom":"right"]);d&&(w=M(T,w)),m&&(C=M(S,C));const O=p.fn({...a,[T]:w,[S]:C});return{...O,data:{x:O.x-i,y:O.y-r,enabled:{[T]:d,[S]:m}}}}}},SR=function(n){return n===void 0&&(n={}),{options:n,fn(a){var i,r;const{x:c,y:f,placement:d,rects:m,middlewareData:p}=a,{offset:h=0,mainAxis:v=!0,crossAxis:x=!0}=ya(n,a),S={x:c,y:f},T=Bn(d),w=vp(T);let C=S[w],M=S[T];const O=ya(h,a),N=typeof O=="number"?{mainAxis:O,crossAxis:0}:{mainAxis:(i=O.mainAxis)!=null?i:0,crossAxis:(r=O.crossAxis)!=null?r:0};if(v){const k=w==="y"?"height":"width",B=m.reference[w]-m.floating[k]+N.mainAxis,j=m.reference[w]+m.reference[k]-N.mainAxis;C<B?C=B:C>j&&(C=j)}if(x){var R,D;const k=w==="y"?"width":"height",B=A0.has(In(d)),j=m.reference[T]-m.floating[k]+(B&&((R=p.offset)==null?void 0:R[T])||0)+(B?0:N.crossAxis),U=m.reference[T]+m.reference[k]+(B?0:((D=p.offset)==null?void 0:D[T])||0)-(B?N.crossAxis:0);M<j?M=j:M>U&&(M=U)}return{[w]:C,[T]:M}}}},TR=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){const{placement:i,rects:r,platform:c,elements:f}=a,{apply:d=()=>{},...m}=ya(n,a),p=await c.detectOverflow(a,m),h=In(i),v=Ho(i),x=Bn(i)==="y",{width:S,height:T}=r.floating;let w,C;h==="top"||h==="bottom"?(w=h,C=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(C=h,w=v==="end"?"top":"bottom");const M=T-p.top-p.bottom,O=S-p.left-p.right,N=Zs(T-p[w],M),R=Zs(S-p[C],O),D=a.middlewareData.shift,k=!D;let B=N,j=R;D!=null&&D.enabled.x&&(j=O),D!=null&&D.enabled.y&&(B=M),k&&!v&&(x?j=S-2*Ao(p.left,p.right):B=T-2*Ao(p.top,p.bottom)),await d({...a,availableWidth:j,availableHeight:B});const U=await c.getDimensions(f.floating);return S!==U.width||T!==U.height?{reset:{rects:!0}}:{}}}};function M0(n){const a=wn(n);let i=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const c=ut(n),f=c?n.offsetWidth:i,d=c?n.offsetHeight:r,m=Kl(i)!==f||Kl(r)!==d;return m&&(i=f,r=d),{width:i,height:r,$:m}}function zp(n){return Je(n)?n:n.contextElement}function Ks(n){const a=zp(n);if(!ut(a))return Mo(1);const i=a.getBoundingClientRect(),{width:r,height:c,$:f}=M0(a);let d=(f?Kl(i.width):i.width)/r,m=(f?Kl(i.height):i.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const ER=Mo(0);function N0(n){const a=xt(n);return!dp()||!a.visualViewport?ER:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function wR(n,a,i){return a===void 0&&(a=!1),!!i&&a&&i===xt(n)}function $a(n,a,i,r){a===void 0&&(a=!1),i===void 0&&(i=!1);const c=n.getBoundingClientRect(),f=zp(n);let d=Mo(1);a&&(r?Je(r)&&(d=Ks(r)):d=Ks(n));const m=wR(f,i,r)?N0(f):Mo(0);let p=(c.left+m.x)/d.x,h=(c.top+m.y)/d.y,v=c.width/d.x,x=c.height/d.y;if(f&&r){const S=xt(f),T=Je(r)?xt(r):r;let w=S,C=Hd(w);for(;C&&T!==w;){const M=Ks(C),O=C.getBoundingClientRect(),N=wn(C),R=O.left+(C.clientLeft+parseFloat(N.paddingLeft))*M.x,D=O.top+(C.clientTop+parseFloat(N.paddingTop))*M.y;p*=M.x,h*=M.y,v*=M.x,x*=M.y,p+=R,h+=D,w=xt(C),C=Hd(w)}}return Zl({width:v,height:x,x:p,y:h})}function Tc(n,a){const i=dc(n).scrollLeft;return a?a.left+i:$a(Uo(n)).left+i}function D0(n,a){const i=n.getBoundingClientRect(),r=i.left+a.scrollLeft-Tc(n,i),c=i.top+a.scrollTop;return{x:r,y:c}}function RR(n){let{elements:a,rect:i,offsetParent:r,strategy:c}=n;const f=c==="fixed",d=Uo(r),m=a?fc(a.floating):!1;if(r===d||m&&f)return i;let p={scrollLeft:0,scrollTop:0},h=Mo(1);const v=Mo(0),x=ut(r);if((x||!f)&&(($t(r)!=="body"||ur(d))&&(p=dc(r)),x)){const T=$a(r);h=Ks(r),v.x=T.x+r.clientLeft,v.y=T.y+r.clientTop}const S=d&&!x&&!f?D0(d,p):Mo(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-p.scrollLeft*h.x+v.x+S.x,y:i.y*h.y-p.scrollTop*h.y+v.y+S.y}}function OR(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function CR(n){const a=dc(n),i=n.ownerDocument.body,r=Ao(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),c=Ao(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let f=-a.scrollLeft+Tc(n);const d=-a.scrollTop;return wn(i).direction==="rtl"&&(f+=Ao(n.clientWidth,i.clientWidth)-r),{width:r,height:c,x:f,y:d}}const AR=25;function MR(n,a,i){i===void 0&&(i="viewport");const r=i==="layoutViewport",c=xt(n),f=Uo(n),d=c.visualViewport;let m=f.clientWidth,p=f.clientHeight,h=0,v=0;if(d){const S=!dp()||a==="fixed";r?S||(h=-d.offsetLeft,v=-d.offsetTop):(m=d.width,p=d.height,S&&(h=d.offsetLeft,v=d.offsetTop))}if(Tc(f)<=0){const S=f.ownerDocument,T=S.body,w=getComputedStyle(T),C=S.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,M=Math.abs(f.clientWidth-T.clientWidth-C),O=getComputedStyle(f).scrollbarGutter==="stable both-edges"?M/2:M;O<=AR&&(m-=O)}return{width:m,height:p,x:h,y:v}}function NR(n,a){const i=$a(n,!0,a==="fixed"),r=i.top+n.clientTop,c=i.left+n.clientLeft,f=Ks(n),d=n.clientWidth*f.x,m=n.clientHeight*f.y,p=c*f.x,h=r*f.y;return{width:d,height:m,x:p,y:h}}function Bv(n,a,i){let r;if(a==="viewport"||a==="layoutViewport")r=MR(n,i,a);else if(a==="document")r=CR(Uo(n));else if(Je(a))r=NR(a,i);else{const c=N0(n);r={x:a.x-c.x,y:a.y-c.y,width:a.width,height:a.height}}return Zl(r)}function DR(n,a){const i=a.get(n);if(i)return i;let r=or(n,[],!1).filter(m=>Je(m)&&$t(m)!=="body"),c=null;const f=wn(n).position==="fixed";let d=f?zo(n):n;for(;Je(d)&&!Co(d);){const m=wn(d),p=fp(d),h=c?c.position:f?"fixed":"";!p&&(h==="fixed"||h==="absolute"&&m.position==="static")?r=r.filter(x=>x!==d):c=m,d=zo(d)}return a.set(n,r),r}function _R(n){let{element:a,boundary:i,rootBoundary:r,strategy:c}=n;const d=[...i==="clippingAncestors"?fc(a)?[]:DR(a,this._c):[].concat(i),r],m=Bv(a,d[0],c);let p=m.top,h=m.right,v=m.bottom,x=m.left;for(let S=1;S<d.length;S++){const T=Bv(a,d[S],c);p=Ao(T.top,p),h=Zs(T.right,h),v=Zs(T.bottom,v),x=Ao(T.left,x)}return{width:h-x,height:v-p,x,y:p}}function zR(n){const{width:a,height:i}=M0(n);return{width:a,height:i}}function kR(n,a,i){const r=ut(a),c=Uo(a),f=i==="fixed",d=$a(n,!0,f,a);let m={scrollLeft:0,scrollTop:0};const p=Mo(0);if((r||!f)&&(($t(a)!=="body"||ur(c))&&(m=dc(a)),r)){const S=$a(a,!0,f,a);p.x=S.x+a.clientLeft,p.y=S.y+a.clientTop}!r&&c&&(p.x=Tc(c));const h=c&&!r&&!f?D0(c,m):Mo(0),v=d.left+m.scrollLeft-p.x-h.x,x=d.top+m.scrollTop-p.y-h.y;return{x:v,y:x,width:d.width,height:d.height}}function md(n){return wn(n).position==="static"}function Pv(n,a){if(!ut(n)||wn(n).position==="fixed")return null;if(a)return a(n);let i=n.offsetParent;return Uo(n)===i&&(i=i.ownerDocument.body),i}function _0(n,a){const i=xt(n);if(fc(n))return i;if(!ut(n)){let c=zo(n);for(;c&&!Co(c);){if(Je(c)&&!md(c))return c;c=zo(c)}return i}let r=Pv(n,a);for(;r&&BE(r)&&md(r);)r=Pv(r,a);return r&&Co(r)&&md(r)&&!fp(r)?i:r||YE(n)||i}const jR=async function(n){const a=this.getOffsetParent||_0,i=this.getDimensions,r=await i(n.floating);return{reference:kR(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HR(n){return wn(n).direction==="rtl"}const LR={convertOffsetParentRelativeRectToViewportRelativeRect:RR,getDocumentElement:Uo,getClippingRect:_R,getOffsetParent:_0,getElementRects:jR,getClientRects:OR,getDimensions:zR,getScale:Ks,isElement:Je,isRTL:HR};function z0(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function UR(n,a,i){let r=null,c;const f=Uo(n);function d(){var v;clearTimeout(c),(v=r)==null||v.disconnect(),r=null}function m(v,x){v===void 0&&(v=!1),x===void 0&&(x=1),d();const S=n.getBoundingClientRect(),{left:T,top:w,width:C,height:M}=S;if(v||a(),!C||!M)return;const O=_l(w),N=_l(f.clientWidth-(T+C)),R=_l(f.clientHeight-(w+M)),D=_l(T),B={rootMargin:-O+"px "+-N+"px "+-R+"px "+-D+"px",threshold:Ao(0,Zs(1,x))||1};let j=!0;function U(Y){const I=Y[0].intersectionRatio;if(!z0(S,n.getBoundingClientRect()))return m();if(I!==x){if(!j)return m();I?m(!1,I):c=setTimeout(()=>{m(!1,1e-7)},1e3)}j=!1}try{r=new IntersectionObserver(U,{...B,root:f.ownerDocument})}catch{r=new IntersectionObserver(U,B)}r.observe(n)}const p=xt(n),h=()=>m(i);return p.addEventListener("resize",h),m(!0),()=>{p.removeEventListener("resize",h),d()}}function Iv(n,a,i,r){r===void 0&&(r={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,h=zp(n),v=c||f?[...h?or(h):[],...a?or(a):[]]:[];v.forEach(O=>{c&&O.addEventListener("scroll",i),f&&O.addEventListener("resize",i)});const x=h&&m?UR(h,i,f):null;let S=-1,T=null;d&&(T=new ResizeObserver(O=>{let[N]=O;N&&N.target===h&&T&&a&&(T.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var R;(R=T)==null||R.observe(a)})),i()}),h&&!p&&T.observe(h),a&&T.observe(a));let w,C=p?$a(n):null;p&&M();function M(){const O=$a(n);C&&!z0(C,O)&&i(),C=O,w=requestAnimationFrame(M)}return i(),()=>{var O;v.forEach(N=>{c&&N.removeEventListener("scroll",i),f&&N.removeEventListener("resize",i)}),x?.(),(O=T)==null||O.disconnect(),T=null,p&&cancelAnimationFrame(w)}}const BR=bR,PR=xR,IR=yR,YR=TR,qR=SR,VR=(n,a,i)=>{const r=new Map,c=i??{},f={...LR,...c.platform,_c:r};return gR(n,a,{...c,platform:f})};var GR=typeof document<"u",XR=function(){},ql=GR?b.useLayoutEffect:XR;function Jl(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let i,r,c;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(i=n.length,i!==a.length)return!1;for(r=i;r--!==0;)if(!Jl(n[r],a[r]))return!1;return!0}if(c=Object.keys(n),i=c.length,i!==Object.keys(a).length)return!1;for(r=i;r--!==0;)if(!{}.hasOwnProperty.call(a,c[r]))return!1;for(r=i;r--!==0;){const f=c[r];if(!(f==="_owner"&&n.$$typeof)&&!Jl(n[f],a[f]))return!1}return!0}return n!==n&&a!==a}function k0(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Yv(n,a){const i=k0(n);return Math.round(a*i)/i}function gd(n){const a=b.useRef(n);return ql(()=>{a.current=n}),a}function FR(n){n===void 0&&(n={});const{placement:a="bottom",strategy:i="absolute",middleware:r=[],platform:c,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:p,open:h}=n,[v,x]=b.useState({x:0,y:0,strategy:i,placement:a,middlewareData:{},isPositioned:!1}),[S,T]=b.useState(r);Jl(S,r)||T(r);const[w,C]=b.useState(null),[M,O]=b.useState(null),N=b.useCallback(F=>{F!==B.current&&(B.current=F,C(F))},[]),R=b.useCallback(F=>{F!==j.current&&(j.current=F,O(F))},[]),D=f||w,k=d||M,B=b.useRef(null),j=b.useRef(null),U=b.useRef(v),Y=p!=null,I=gd(p),H=gd(c),_=gd(h),V=b.useCallback(()=>{if(!B.current||!j.current)return;const F={placement:a,strategy:i,middleware:S};H.current&&(F.platform=H.current),VR(B.current,j.current,F).then(W=>{const ae={...W,isPositioned:_.current!==!1};te.current&&!Jl(U.current,ae)&&(U.current=ae,Yn.flushSync(()=>{x(ae)}))})},[S,a,i,H,_]);ql(()=>{h===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,x(F=>({...F,isPositioned:!1})))},[h]);const te=b.useRef(!1);ql(()=>(te.current=!0,()=>{te.current=!1}),[]),ql(()=>{if(D&&(B.current=D),k&&(j.current=k),D&&k){if(I.current)return I.current(D,k,V);V()}},[D,k,V,I,Y]);const Q=b.useMemo(()=>({reference:B,floating:j,setReference:N,setFloating:R}),[N,R]),z=b.useMemo(()=>({reference:D,floating:k}),[D,k]),X=b.useMemo(()=>{const F={position:i,left:0,top:0};if(!z.floating)return F;const W=Yv(z.floating,v.x),ae=Yv(z.floating,v.y);return m?{...F,transform:"translate("+W+"px, "+ae+"px)",...k0(z.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:W,top:ae}},[i,m,z.floating,v.x,v.y]);return b.useMemo(()=>({...v,update:V,refs:Q,elements:z,floatingStyles:X}),[v,V,Q,z,X])}const KR=(n,a)=>{const i=BR(n);return{name:i.name,fn:i.fn,options:[n,a]}},QR=(n,a)=>{const i=PR(n);return{name:i.name,fn:i.fn,options:[n,a]}},ZR=(n,a)=>({fn:qR(n).fn,options:[n,a]}),WR=(n,a)=>{const i=IR(n);return{name:i.name,fn:i.fn,options:[n,a]}},$R=(n,a)=>{const i=YR(n);return{name:i.name,fn:i.fn,options:[n,a]}};var yd={exports:{}},vd={};var qv;function JR(){if(qv)return vd;qv=1;var n=lr();function a(x,S){return x===S&&(x!==0||1/x===1/S)||x!==x&&S!==S}var i=typeof Object.is=="function"?Object.is:a,r=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(x,S){var T=S(),w=r({inst:{value:T,getSnapshot:S}}),C=w[0].inst,M=w[1];return f(function(){C.value=T,C.getSnapshot=S,p(C)&&M({inst:C})},[x,T,S]),c(function(){return p(C)&&M({inst:C}),x(function(){p(C)&&M({inst:C})})},[x]),d(T),T}function p(x){var S=x.getSnapshot;x=x.value;try{var T=S();return!i(x,T)}catch{return!0}}function h(x,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return vd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,vd}var Vv;function j0(){return Vv||(Vv=1,yd.exports=JR()),yd.exports}var kp=j0(),bd={exports:{}},xd={};var Gv;function e2(){if(Gv)return xd;Gv=1;var n=lr(),a=j0();function i(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var r=typeof Object.is=="function"?Object.is:i,c=a.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,p=n.useDebugValue;return xd.useSyncExternalStoreWithSelector=function(h,v,x,S,T){var w=f(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=m(function(){function O(B){if(!N){if(N=!0,R=B,B=S(B),T!==void 0&&C.hasValue){var j=C.value;if(T(j,B))return D=j}return D=B}if(j=D,r(R,B))return j;var U=S(B);return T!==void 0&&T(j,U)?(R=B,j):(R=B,D=U)}var N=!1,R,D,k=x===void 0?null:x;return[function(){return O(v())},k===null?void 0:function(){return O(k())}]},[v,x,S,T]);var M=c(h,w[0],w[1]);return d(function(){C.hasValue=!0,C.value=M},[M]),p(M),M},xd}var Xv;function t2(){return Xv||(Xv=1,bd.exports=e2()),bd.exports}var n2=t2();const o2=Ep(19),a2=o2?i2:r2;function H0(n,a,i,r,c){return a2(n,a,i,r,c)}function s2(n,a,i,r,c){const f=b.useCallback(()=>a(n.getSnapshot(),i,r,c),[n,a,i,r,c]);return kp.useSyncExternalStore(n.subscribe,f,f)}AE({before(n){n.syncIndex=0,n.didInitialize||(n.syncTick=1,n.syncHooks=[],n.didChangeStore=!0,n.getSnapshot=()=>{let a=!1;for(let i=0;i<n.syncHooks.length;i+=1){const r=n.syncHooks[i],c=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,c)||(a=!0,r.value=c)}return a&&(n.syncTick+=1),n.syncTick})},after(n){n.syncHooks.length>0&&(n.didChangeStore&&(n.didChangeStore=!1,n.subscribe=a=>{const i=new Set;for(const c of n.syncHooks)i.add(c.store);const r=[];for(const c of i)r.push(c.subscribe(a));return()=>{for(const c of r)c()}}),kp.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot))}});function i2(n,a,i,r,c){const f=CE();if(!f)return s2(n,a,i,r,c);const d=f.syncIndex;f.syncIndex+=1;let m;return f.didInitialize?(m=f.syncHooks[d],(m.store!==n||m.selector!==a||!Object.is(m.a1,i)||!Object.is(m.a2,r)||!Object.is(m.a3,c))&&(m.store!==n&&(f.didChangeStore=!0),m.store=n,m.selector=a,m.a1=i,m.a2=r,m.a3=c,m.value=a(n.getSnapshot(),i,r,c))):(m={store:n,selector:a,a1:i,a2:r,a3:c,value:a(n.getSnapshot(),i,r,c)},f.syncHooks.push(m)),m.value}function r2(n,a,i,r,c){return n2.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>a(f,i,r,c))}class l2{static create(a){return new this(a)}constructor(a){this.state=a,this.listeners=new Set,this.updateTick=0}subscribe=a=>(this.listeners.add(a),()=>{this.listeners.delete(a)});getSnapshot=()=>this.state;setState(a){if(this.state===a)return;this.state=a,this.updateTick+=1;const i=this.updateTick;for(const r of this.listeners){if(i!==this.updateTick)return;r(a)}}update(a){for(const i in a)if(!Object.is(this.state[i],a[i])){this.setState({...this.state,...a});return}}set(a,i){Object.is(this.state[a],i)||this.setState({...this.state,[a]:i})}notifyAll(){const a={...this.state};this.setState(a)}use(a,i,r,c){return H0(this,a,i,r,c)}}class Ws extends l2{constructor(a,i={},r){super(a),this.context=i,this.selectors=r}useSyncedValue(a,i){b.useDebugValue(a);const r=this;Ee(()=>{r.state[a]!==i&&r.set(a,i)},[r,a,i])}useSyncedValueWithCleanup(a,i){const r=this;Ee(()=>(r.state[a]!==i&&r.set(a,i),()=>{r.set(a,void 0)}),[r,a,i])}useSyncedValues(a){const i=this,r=Object.values(a);Ee(()=>{i.update(a)},[i,...r])}useControlledProp(a,i){b.useDebugValue(a);const r=this,c=i!==void 0;Ee(()=>{c&&!Object.is(r.state[a],i)&&r.setState({...r.state,[a]:i})},[r,a,i,c])}select(a,i,r,c){const f=this.selectors[a];return f(this.state,i,r,c)}useState(a,i,r,c){return b.useDebugValue(a),H0(this,this.selectors[a],i,r,c)}useContextCallback(a,i){b.useDebugValue(a);const r=Ce(i??sp);this.context[a]=r}useStateSetter(a){const i=b.useRef(void 0);return i.current===void 0&&(i.current=r=>{this.set(a,r)}),i.current}observe(a,i){let r;typeof a=="function"?r=a:r=this.selectors[a];let c=r(this.state);return i(c,c,this),this.subscribe(f=>{const d=r(f);if(!Object.is(c,d)){const m=c;c=d,i(d,m,this)}})}}const c2={open:n=>n.open,transitionStatus:n=>n.transitionStatus,domReferenceElement:n=>n.domReferenceElement,referenceElement:n=>n.positionReference??n.referenceElement,floatingElement:n=>n.floatingElement,floatingId:n=>n.floatingId};class L0 extends Ws{constructor(a){const{syncOnly:i,nested:r,onOpenChange:c,triggerElements:f,...d}=a;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:c,dataRef:{current:{}},events:E0(),nested:r,triggerElements:f},c2),this.syncOnly=i}syncOpenEvent=(a,i)=>{(!a||!this.state.open||i!=null&&UE(i))&&(this.context.dataRef.current.openEvent=a?i:void 0)};dispatchOpenChange=(a,i)=>{this.syncOpenEvent(a,i.event);const r={open:a,reason:i.reason,nativeEvent:i.event,nested:this.context.nested,triggerElement:i.trigger};this.context.events.emit("openchange",r)};setOpen=(a,i)=>{if(this.syncOnly){this.context.onOpenChange?.(a,i);return}this.dispatchOpenChange(a,i),this.context.onOpenChange?.(a,i)}}function U0(n){const{popupStore:a,treatPopupAsFloatingElement:i=!1,floatingRootContext:r,floatingId:c,nested:f,onOpenChange:d}=n,m=a.useState("open"),p=a.useState("activeTriggerElement"),h=a.useState(i?"popupElement":"positionerElement"),v=a.context.triggerElements,x=d,S=b.useRef(null);r===void 0&&S.current===null&&(S.current=new L0({open:m,transitionStatus:void 0,referenceElement:p,floatingElement:h,triggerElements:v,onOpenChange:x,floatingId:c,syncOnly:!0,nested:f}));const T=r??S.current;return a.useSyncedValue("floatingId",c),Ee(()=>{const w={open:m,floatingId:c,referenceElement:p,floatingElement:h};Je(p)&&(w.domReferenceElement=p),T.state.positionReference===T.state.referenceElement&&(w.positionReference=p),T.update(w)},[m,c,p,h,T]),T.context.onOpenChange=x,T.context.nested=f,T}function u2(n,a=!1,i=!1,r=!1){const[c,f]=b.useState(n&&a?"idle":void 0),[d,m]=b.useState(n&&!r);return n&&!d&&(m(!0),f("starting")),!n&&d&&c!=="ending"&&!i&&f("ending"),!n&&!d&&c==="ending"&&f(void 0),Ee(()=>{if(!n&&d&&c!=="ending"&&i){const p=ao.request(()=>{f("ending")});return()=>{ao.cancel(p)}}},[n,d,c,i]),Ee(()=>{if(!n||a)return;const p=ao.request(()=>{f(void 0)});return()=>{ao.cancel(p)}},[a,n]),Ee(()=>{if(!n||!a)return;n&&d&&c!=="idle"&&f("starting");const p=ao.request(()=>{f("idle")});return()=>{ao.cancel(p)}},[a,n,d,c]),{mounted:d,setMounted:m,transitionStatus:c}}let kl=null;function f2(n){if(!kl){const a=[];kl=a,queueMicrotask(()=>{kl=null,Yn.flushSync(()=>{for(const i of a)i()})})}kl.push(n)}function Ec(n,a=!1,i=!1){const r=ar();return Ce((c,f=null)=>{r.cancel();const d=Ro(n);if(d==null)return;const m=d,p=()=>{if(!i){Yn.flushSync(c);return}f2(()=>{f?.aborted||c()})};if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){c();return}function h(){Promise.all(m.getAnimations().map(v=>v.finished)).then(()=>{f?.aborted||p()},()=>{if(f?.aborted)return;if(m.getAnimations().some(x=>x.pending||x.playState!=="finished")){h();return}p()})}if(a){const v=Gb;if(!m.hasAttribute(v)){r.request(h);return}const x=new MutationObserver(()=>{m.hasAttribute(v)||(x.disconnect(),h())});x.observe(m,{attributes:!0,attributeFilter:[v]}),f?.addEventListener("abort",()=>x.disconnect(),{once:!0});return}r.request(h)})}function $s(n){const{enabled:a=!0,open:i,ref:r,batch:c=!1,onComplete:f}=n,d=Ce(f),m=Ec(r,i,c);b.useEffect(()=>{if(!a)return;const p=new AbortController;return m(d,p.signal),()=>{p.abort()}},[a,i,d,m])}const wc={tabIndex:-1,[Ld]:""};function B0(n){return a=>a==="touch"?n.current:!0}function jp(n,a=!1){const i=Wa(),r=Ja()!=null,c=en(()=>n(i,r)).current;return U0({popupStore:c,treatPopupAsFloatingElement:a,floatingRootContext:c.state.floatingRootContext,floatingId:i,nested:r,onOpenChange:c.setOpen}),c}function Rc({handle:n,store:a}){return Ee(()=>n.attachStore(a),[n,a]),null}function Fv(n){const a=n.context.triggerElements.size;n.select("open")&&n.state.triggerCount!==a&&n.set("triggerCount",a)}function P0(n,a){const i=b.useRef(null);return Ce(r=>{const c=i.current;if(c!==null){if(c.element===r&&c.store===a&&c.id===n)return;i.current=null;const f=c.store;f.context.triggerElements.getById(c.id)===c.element&&(f.context.triggerElements.delete(c.id),Fv(f))}r!==null&&n!==void 0&&(i.current={store:a,id:n,element:r},a.context.triggerElements.add(n,r),Fv(a))})}function Oc(n,a,i,r=!1){let c=n.preventUnmountingOnClose;a?c=!1:r&&(c=!0);const f=i?.id??null;let d=n.activeTriggerId,m=n.activeTriggerElement;return(f||a)&&(d=f,m=i??null),{open:a,preventUnmountingOnClose:c,activeTriggerId:d,activeTriggerElement:m}}function Hp(n){let a=!1;return n.preventUnmountOnClose=()=>{a=!0},()=>a}function d2(n,a,i,r={}){const c=i.reason,f=c===At,d=a&&c===Gs,m=!a&&(c===ko||c===fr),p=Hp(i);if(n.context.onOpenChange?.(a,i),i.isCanceled)return;r.onBeforeDispatch?.(),n.state.floatingRootContext.dispatchOpenChange(a,i);const h=()=>{const v=Oc(n.state,a,i.trigger,p()),x={...r.extraState,...v};d?x.instantType="focus":m?x.instantType="dismiss":f&&(x.instantType=void 0),n.update(x)};f?Yn.flushSync(h):h()}function Lp(n,a,i,r){const c=i.useState("isMountedByTrigger",n),f=P0(n,i),d=Ce(p=>{const h=i.select("open"),v=i.select("activeTriggerId");if(v===n){const x={activeTriggerElement:p,...h?r:null};i.update(x);return}if(v==null&&h){const x={activeTriggerId:n??null,activeTriggerElement:p,...r};i.update(x)}}),m=Ce(p=>{f(p),p&&d(p)});return Ee(()=>(m(a.current),()=>m(null)),[m,a,i,n]),Ee(()=>{if(c){const p={activeTriggerElement:a.current,...r};i.update(p)}},[c,i,a,...Object.values(r)]),{registerTrigger:m,isMountedByThisTrigger:c}}function Cc(n,a={}){const{closeOnActiveTriggerUnmount:i=!1}=a,r=b.useRef(null),c=n.useState("open"),f=n.useState("triggerCount"),d=n.useState("activeTriggerId"),m=n.useState("activeTriggerElement");Ee(()=>{if(!c){r.current=null,n.state.triggerCount!==0&&n.set("triggerCount",0);return}const p=n.context.triggerElements.size,h={};n.state.triggerCount!==p&&(h.triggerCount=p);const v=n.select("activeTriggerId");let x=null;if(v){const S=n.context.triggerElements.getById(v);if(S)r.current=v,S!==n.state.activeTriggerElement&&(h.activeTriggerElement=S);else{for(const[T,w]of n.context.triggerElements.entries())if(w===n.state.activeTriggerElement){h.activeTriggerId=T,h.activeTriggerElement=w,r.current=T;break}h.activeTriggerId===void 0&&(r.current===v?x=v:r.current=null)}}else r.current=null;if(!x&&!v&&p===1){const S=n.context.triggerElements.entries().next();if(!S.done){const[T,w]=S.value;h.activeTriggerId=T,h.activeTriggerElement=w,r.current=T}}(h.triggerCount!==void 0||h.activeTriggerId!==void 0||h.activeTriggerElement!==void 0)&&n.update(h),x&&i&&queueMicrotask(()=>{if(n.select("open")&&n.select("activeTriggerId")===x&&!n.context.triggerElements.getById(x)){const S=Ke(vc);n.setOpen(!1,S),S.isCanceled||n.update({activeTriggerId:null,activeTriggerElement:null})}})},[c,n,f,d,m,i])}function Ac(n,a,i,r){const{mounted:c,setMounted:f,transitionStatus:d}=u2(n,!1,!1,r),m=a.useState("preventUnmountingOnClose"),p=n?!1:m;a.useSyncedValues({mounted:c,transitionStatus:d,preventUnmountingOnClose:p});const h=Ce(()=>{f(!1),a.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),i?.(),a.context.onOpenChangeComplete?.(!1)});return $s({enabled:c&&!n&&!p,open:n,ref:a.context.popupRef,onComplete(){n||h()}}),{forceUnmount:h,transitionStatus:d}}function Mc(n,a){n.useSyncedValues(a),Ee(()=>()=>{n.update({activeTriggerProps:wt,inactiveTriggerProps:wt,popupProps:wt})},[n])}function I0(n,a){Ee(()=>{!a&&n.state.openMethod!==null&&n.set("openMethod",null)},[a,n]),Ee(()=>()=>{n.state.openMethod!==null&&n.set("openMethod",null)},[n])}class Nc{constructor(){this.idMap=new Map}add(a,i){this.idMap.set(a,i)}delete(a){this.idMap.delete(a)}hasElement(a){for(const i of this.idMap.values())if(i===a)return!0;return!1}hasMatchingElement(a){for(const i of this.idMap.values())if(a(i))return!0;return!1}getById(a){return this.idMap.get(a)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function Dc(n,a,i=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new L0({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:n,floatingId:a,syncOnly:!0,nested:i,onOpenChange:void 0}),floatingId:a,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:wt,inactiveTriggerProps:wt,popupProps:wt}}const Ji=n=>n.triggerIdProp??n.activeTriggerId,Up=n=>n.openProp??n.open,Kv=n=>(n.popupElement?.id??n.floatingId)||void 0;function Y0(n,a){return a!==void 0&&Up(n)&&Ji(n)===a}function p2(n,a){return Y0(n,a)?!0:a!==void 0&&Up(n)&&Ji(n)==null&&n.triggerCount===1}const _c={open:Up,mounted:n=>n.mounted,transitionStatus:n=>n.transitionStatus,floatingRootContext:n=>n.floatingRootContext,triggerCount:n=>n.triggerCount,preventUnmountingOnClose:n=>n.preventUnmountingOnClose,payload:n=>n.payload,activeTriggerId:Ji,activeTriggerElement:n=>n.mounted?n.activeTriggerElement:null,popupId:Kv,isTriggerActive:(n,a)=>a!==void 0&&Ji(n)===a,isOpenedByTrigger:(n,a)=>Y0(n,a),isMountedByTrigger:(n,a)=>a!==void 0&&Ji(n)===a&&n.mounted,triggerProps:(n,a)=>a?n.activeTriggerProps:n.inactiveTriggerProps,triggerPopupId:(n,a)=>p2(n,a)?Kv(n):void 0,popupProps:n=>n.popupProps,popupElement:n=>n.popupElement,positionerElement:n=>n.positionerElement};function Bp(n){const a=b.useCallback(r=>n===void 0?sp:n.subscribeStore(r),[n]),i=b.useCallback(()=>n===void 0?void 0:n.store,[n]);return kp.useSyncExternalStore(a,i,()=>n?.serverStore)}function h2(n){return m2(n,n.rootContext)}function m2(n,a){const{nodeId:i,externalTree:r}=n,c=a.useState("referenceElement"),f=a.useState("floatingElement"),d=a.useState("domReferenceElement"),m=a.useState("open"),p=a.useState("floatingId"),[h,v]=b.useState(null),[x,S]=b.useState(void 0),[T,w]=b.useState(void 0),C=b.useRef(null),M=xa(r),O=b.useMemo(()=>({reference:c,floating:f,domReference:d}),[c,f,d]),N=FR({...n,elements:{...O,...h&&{reference:h}}}),R=Je(x)?x:null,D=T===void 0?a.state.floatingElement:T;a.useSyncedValue("referenceElement",x??null),a.useSyncedValue("domReferenceElement",x===void 0?d:R),a.useSyncedValue("floatingElement",D);const k=b.useCallback(H=>{const _=Je(H)?{getBoundingClientRect:()=>H.getBoundingClientRect(),getClientRects:()=>H.getClientRects(),contextElement:H}:H;v(_),N.refs.setReference(_)},[N.refs]),B=b.useCallback(H=>{(Je(H)||H===null)&&(C.current=H,S(H)),(Je(N.refs.reference.current)||N.refs.reference.current===null||H!==null&&!Je(H))&&N.refs.setReference(H)},[N.refs,S]),j=b.useCallback(H=>{w(H),N.refs.setFloating(H)},[N.refs]),U=b.useMemo(()=>({...N.refs,setReference:B,setFloating:j,setPositionReference:k,domReference:C}),[N.refs,B,j,k]),Y=b.useMemo(()=>({...N.elements,domReference:d}),[N.elements,d]),I=b.useMemo(()=>({...N,dataRef:a.context.dataRef,open:m,onOpenChange:a.setOpen,events:a.context.events,floatingId:p,refs:U,elements:Y,nodeId:i,rootStore:a}),[N,U,Y,i,a,m,p]);return Ee(()=>{d&&(C.current=d)},[d]),Ee(()=>{a.context.dataRef.current.floatingContext=I;const H=M?.nodesRef.current.find(_=>_.id===i);H&&(H.context=I)}),b.useMemo(()=>({...N,context:I,refs:U,elements:Y,rootStore:a}),[N,U,Y,I,a])}const Sd=ip&&ba;function q0(n,a={}){const{enabled:i=!0,delay:r}=a,c="rootStore"in n?n.rootStore:n,{events:f,dataRef:d}=c.context,m=b.useRef(!1),p=b.useRef(null),h=b.useRef(!0),v=tn();b.useEffect(()=>{const S=c.select("domReferenceElement");if(!i)return;const T=xt(S);function w(){const O=c.select("domReferenceElement");!c.select("open")&&ut(O)&&O===It(Qe(O))&&(m.current=!0,p.current=O)}function C(){h.current=!0}function M(){h.current=!1}return Wn(Ie(T,"blur",w),Sd&&Ie(T,"keydown",C,!0),Sd&&Ie(T,"pointerdown",M,!0))},[c,i]),b.useEffect(()=>{if(!i)return;function S(T){if(T.reason===ko||T.reason===fr){const w=c.select("domReferenceElement");Je(w)&&(p.current=w,m.current=!0)}}return f.on("openchange",S),()=>{f.off("openchange",S)}},[f,i,c]);const x=b.useMemo(()=>{function S(){m.current=!1,p.current=null}return{onMouseLeave(){S()},onFocus(T){const w=T.currentTarget;if(m.current){if(p.current===w)return;S()}const C=Tt(T.nativeEvent);if(Je(C)){if(Sd&&!T.relatedTarget){if(!h.current&&!yc(C))return}else if(!Xl(C))return}const M=Gl(T.relatedTarget,c.context.triggerElements),{nativeEvent:O,currentTarget:N}=T,R=typeof r=="function"?r():r;if(c.select("open")&&M||R===0||R===void 0){c.setOpen(!0,Ke(Gs,O,N));return}v.start(R,()=>{m.current||c.setOpen(!0,Ke(Gs,O,N))})},onBlur(T){S();const w=T.relatedTarget,C=T.nativeEvent,M=Je(w)&&w.hasAttribute(sr("focus-guard"))&&w.getAttribute("data-type")==="outside";v.start(0,()=>{const O=c.select("domReferenceElement"),N=It(Qe(O));!w&&N===O||De(d.current.floatingContext?.refs.floating.current,N)||De(O,N)||M||Gl(w??N,c.context.triggerElements)||c.setOpen(!1,Ke(Gs,C))})}}},[d,r,c,v]);return b.useMemo(()=>i?{reference:x,trigger:x}:{},[i,x])}class Pp{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new mn,this.restTimeout=new mn,this.handleCloseOptions=void 0}static create(){return new Pp}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const ec=new WeakMap;function tc(n){if(!n.performedPointerEventsMutation)return;const a=n.pointerEventsScopeElement;a&&ec.get(a)===n&&(n.pointerEventsScopeElement?.style.removeProperty("pointer-events"),n.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),n.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ec.delete(a)),n.performedPointerEventsMutation=!1,n.pointerEventsScopeElement=null,n.pointerEventsReferenceElement=null,n.pointerEventsFloatingElement=null}function V0(n,a){const{scopeElement:i,referenceElement:r,floatingElement:c}=a,f=ec.get(i);f&&f!==n&&tc(f),tc(n),n.performedPointerEventsMutation=!0,n.pointerEventsScopeElement=i,n.pointerEventsReferenceElement=r,n.pointerEventsFloatingElement=c,ec.set(i,n),i.style.pointerEvents="none",r.style.pointerEvents="auto",c.style.pointerEvents="auto"}function Ip(n){const a=n.context.dataRef.current,i=en(()=>a.hoverInteractionState??Pp.create()).current;return a.hoverInteractionState||(a.hoverInteractionState=i),rc(a.hoverInteractionState.disposeEffect),a.hoverInteractionState}function Yp(n,a={}){const{enabled:i=!0,closeDelay:r=0,nodeId:c}=a,f="rootStore"in n?n.rootStore:n,d=f.useState("open"),m=f.useState("floatingElement"),p=f.useState("domReferenceElement"),{dataRef:h}=f.context,v=xa(),x=Ja(),S=Ip(f),T=tn(),w=Ce(()=>Fb(h.current.openEvent?.type,S.interactedInside)),C=Ce(()=>aw(h.current.openEvent?.type)),M=Ce(()=>{tc(S)});Ee(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,M())},[d,S,M]),b.useEffect(()=>M,[M]),Ee(()=>{if(i&&d&&S.handleCloseOptions?.blockPointerEvents&&C()&&Je(p)&&m){const O=p,N=m,R=Qe(m),D=v?.nodesRef.current.find(U=>U.id===x)?.context?.elements.floating;D&&(D.style.pointerEvents="");const k=S.pointerEventsScopeElement!==N?S.pointerEventsScopeElement:null,B=D!==N?D:null,j=S.handleCloseOptions?.getScope?.()??k??B??O.closest("[data-rootownerid]")??R.body;return V0(S,{scopeElement:j,referenceElement:O,floatingElement:N}),()=>{M()}}},[i,d,p,m,S,C,v,x,M]),b.useEffect(()=>{if(!i)return;function O(){return!!(v&&x&&va(v.nodesRef.current,x).length>0)}function N(U){const Y=Ka(r,"close",S.pointerType),I=()=>{f.setOpen(!1,Ke(At,U)),v?.events.emit("floating.closed",U)};Y?S.openChangeTimeout.start(Y,I):(S.openChangeTimeout.clear(),I())}function R(U){const Y=Tt(U);if(!nw(Y)){S.interactedInside=!1;return}S.interactedInside=Y?.closest("[aria-haspopup]")!=null}function D(){S.openChangeTimeout.clear(),T.clear(),v?.events.off("floating.closed",B),M()}function k(U){if(O()&&v){v.events.on("floating.closed",B);return}if(Gl(U.relatedTarget,f.context.triggerElements))return;const Y=h.current.floatingContext?.nodeId??c,I=U.relatedTarget;if(!(v&&Y&&Je(I)&&va(v.nodesRef.current,Y,!1).some(_=>De(_.context?.elements.floating,I)))){if(S.handler){S.handler(U);return}M(),C()&&!w()&&N(U)}}function B(U){!v||!x||O()||T.start(0,()=>{v.events.off("floating.closed",B),f.setOpen(!1,Ke(At,U)),v.events.emit("floating.closed",U)})}const j=m;return Wn(j&&Ie(j,"mouseenter",D),j&&Ie(j,"mouseleave",k),j&&Ie(j,"pointerdown",R,!0),()=>{v?.events.off("floating.closed",B)})},[i,m,f,h,r,c,C,w,M,S,v,x,T])}const g2={current:null};function zc(n,a={}){const{enabled:i=!0,delay:r=0,handleClose:c=null,mouseOnly:f=!1,restMs:d=0,move:m=!0,triggerElementRef:p=g2,externalTree:h,isActiveTrigger:v=!0,getHandleCloseContext:x,isClosing:S,shouldOpen:T,guardStaleOpen:w=!1}=a,C="rootStore"in n?n.rootStore:n,{dataRef:M,events:O}=C.context,N=xa(h),R=Ip(C),D=b.useRef(!1),k=Ut(c),B=Ut(r),j=Ut(d),U=Ut(i),Y=Ut(T),I=Ut(S),H=Ce(()=>Fb(M.current.openEvent?.type,R.interactedInside)),_=Ce(()=>Y.current?.()!==!1),V=Ce((z,X,F)=>{const W=C.context.triggerElements;if(W.hasElement(X))return!z||!De(z,X);if(!Je(F))return!1;const ae=F;return W.hasMatchingElement(A=>De(A,ae))&&(!z||!De(z,ae))}),te=Ce(()=>{if(!R.handler)return;Qe(C.select("domReferenceElement")).removeEventListener("mousemove",R.handler),R.handler=void 0}),Q=Ce(()=>{tc(R)});return v&&(R.handleCloseOptions=c?.__options),b.useEffect(()=>te,[te]),b.useEffect(()=>{if(!i)return;function z(X){X.open?D.current=!1:(D.current=X.reason===At,te(),R.openChangeTimeout.clear(),R.restTimeout.clear(),R.blockMouseMove=!0,R.restTimeoutPending=!1)}return O.on("openchange",z),()=>{O.off("openchange",z)}},[i,O,R,te]),b.useEffect(()=>{if(!i)return;function z(G,ne=!0){const Z=Ka(B.current,"close",R.pointerType);Z?R.openChangeTimeout.start(Z,()=>{C.setOpen(!1,Ke(At,G)),N?.events.emit("floating.closed",G)}):ne&&(R.openChangeTimeout.clear(),C.setOpen(!1,Ke(At,G)),N?.events.emit("floating.closed",G))}const X=p.current??(v?C.select("domReferenceElement"):null);if(!Je(X))return;function F(G){if(R.openChangeTimeout.clear(),R.blockMouseMove=!1,f&&!ma(R.pointerType))return;const ne=xv(j.current),Z=Ka(B.current,"open",R.pointerType),le=Tt(G),se=G.currentTarget??null,he=C.select("domReferenceElement");let pe=se;if(Je(le)&&!C.context.triggerElements.hasElement(le)){for(const Se of C.context.triggerElements.elements())if(De(Se,le)){pe=Se;break}}Je(se)&&Je(he)&&!C.context.triggerElements.hasElement(se)&&De(se,he)&&(pe=he);const ge=pe==null?!1:V(he,pe,le),_e=C.select("open"),je=I.current?.()??C.select("transitionStatus")==="ending",Re=!_e&&je&&D.current,be=!ge&&Je(pe)&&Je(he)&&De(he,pe)&&Re,ke=ne>0&&!Z,Le=ge&&(_e||Re)||be,Ge=!_e||ge;if(Le){_()&&C.setOpen(!0,Ke(At,G,pe));return}ke||(Z?R.openChangeTimeout.start(Z,()=>{Ge&&_()&&C.setOpen(!0,Ke(At,G,pe))}):Ge&&_()&&C.setOpen(!0,Ke(At,G,pe)))}function W(G){if(H()){Q();return}te();const ne=C.select("domReferenceElement"),Z=Qe(ne);R.restTimeout.clear(),R.restTimeoutPending=!1;const le=M.current.floatingContext??x?.();if(Gl(G.relatedTarget,C.context.triggerElements))return;if(k.current&&le){C.select("open")||R.openChangeTimeout.clear();const he=p.current;R.handler=k.current({...le,tree:N,x:G.clientX,y:G.clientY,onClose(){Q(),te(),U.current&&!H()&&he===C.select("domReferenceElement")&&z(G,!0)}}),Z.addEventListener("mousemove",R.handler),R.handler(G);return}(R.pointerType!=="touch"||!De(C.select("floatingElement"),G.relatedTarget))&&z(G)}function ae(G){De(X,G.relatedTarget)||(R.openChangeTimeout.clear(),R.restTimeout.clear(),R.restTimeoutPending=!1)}const A=w?Ie(X,"mouseout",ae):void 0;return m?Wn(Ie(X,"mousemove",F,{once:!0}),Ie(X,"mouseenter",F),Ie(X,"mouseleave",W),A):Wn(Ie(X,"mouseenter",F),Ie(X,"mouseleave",W),A)},[te,Q,M,B,C,i,k,R,v,V,H,f,m,j,p,N,U,x,I,_,w]),b.useMemo(()=>{if(!i)return;function z(X){R.pointerType=X.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(X){const{nativeEvent:F}=X,W=X.currentTarget,ae=C.select("domReferenceElement"),A=C.select("open"),G=V(ae,W,X.target);if(f&&!ma(R.pointerType))return;if(A&&G&&R.handleCloseOptions?.blockPointerEvents){const le=C.select("floatingElement");if(le){const se=R.handleCloseOptions?.getScope?.()??W.ownerDocument.body;V0(R,{scopeElement:se,referenceElement:W,floatingElement:le})}}const ne=xv(j.current);if(A&&!G||ne===0||!G&&R.restTimeoutPending&&X.movementX**2+X.movementY**2<2)return;R.restTimeout.clear();function Z(){if(R.restTimeoutPending=!1,H())return;const le=C.select("open");!R.blockMouseMove&&(!le||G)&&_()&&C.setOpen(!0,Ke(At,F,W))}R.pointerType==="touch"?Yn.flushSync(()=>{Z()}):G&&A?Z():(R.restTimeoutPending=!0,R.restTimeout.start(ne,Z))}}},[i,R,H,V,f,C,j,_])}const y2="Escape";function Qv(n){return ba&&n.movementX===0&&n.movementY===0}function kc(n,a,i){switch(n){case"vertical":return a;case"horizontal":return i;default:return a||i}}function jl(n,a){return kc(a,n===Vb||n===pp,n===pc||n===hc)}function Td(n,a,i){return kc(a,n===pp,i?n===pc:n===hc)||n==="Enter"||n===" "||n===""}function v2(n,a,i){return kc(a,i?n===pc:n===hc,n===pp)}function b2(n,a,i,r){const c=i?n===hc:n===pc,f=n===Vb;return a==="both"||a==="horizontal"&&r?n===y2:kc(a,c,f)}function x2(n,a){const{listRef:i,activeIndex:r,onNavigate:c=()=>{},enabled:f=!0,selectedIndex:d=null,allowEscape:m=!1,loopFocus:p=!1,nested:h=!1,rtl:v=!1,virtual:x=!1,focusItemOnOpen:S="auto",focusItemOnHover:T=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:M="vertical",parentOrientation:O,id:N,resetOnPointerLeave:R=!0,externalTree:D,grid:k}=a,B=k!=null,j="rootStore"in n?n.rootStore:n,U=j.useState("open"),Y=j.useState("floatingElement"),I=j.useState("domReferenceElement"),H=j.context.dataRef,_=Id(Y),V=Pd(I),te=Ut(_),Q=Ja(),z=xa(D),X=b.useRef(S),F=b.useRef(d??-1),W=b.useRef(null),ae=b.useRef(!0),A=Ce(fe=>{c(F.current===-1?null:F.current,fe)}),G=b.useRef(!!Y),ne=b.useRef(U),Z=b.useRef(!1),le=b.useRef(!1),se=b.useRef(null),he=Ut(C),pe=Ut(U),ge=Ut(d),_e=Ut(R),je=ar(),Re=ar(),be=Ce(()=>{function fe(ve){x?z?.events.emit("virtualfocus",ve):se.current=Yl(ve,{sync:Z.current,preventScroll:!0})}const ye=i.current[F.current],de=le.current;ye&&fe(ye),(Z.current?ve=>ve():ve=>je.request(ve))(()=>{const ve=i.current[F.current]||ye;if(!ve)return;ye||fe(ve),Te&&(de||!ae.current)&&ve.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Ee(()=>{H.current.orientation=M},[H,M]),Ee(()=>{f&&(U&&Y?(F.current=d??-1,X.current&&d!=null&&(le.current=!0,A())):G.current&&(F.current=-1,A()))},[f,U,Y,d,A]),Ee(()=>{if(f){if(!U){Z.current=!1;return}if(Y)if(r==null){if(Z.current=!1,ge.current!=null)return;if(G.current&&(F.current=-1,be()),(!ne.current||!G.current)&&X.current&&(W.current!=null||X.current===!0&&W.current==null)){let fe=0;const ye=()=>{i.current[0]==null?(fe<2&&(fe?ie=>Re.request(ie):queueMicrotask)(ye),fe+=1):(F.current=W.current==null||Td(W.current,M,v)||h?Il(i):qd(i),W.current=null,A())};ye()}}else $i(i.current,r)||(F.current=r,be(),le.current=!1)}},[f,U,Y,r,ge,h,i,M,v,A,be,Re]),Ee(()=>{if(!f||Y||!z||x||!G.current)return;const fe=z.nodesRef.current,ye=fe.find(ve=>ve.id===Q)?.context?.elements.floating,de=It(Qe(I??ye??null)),ie=fe.some(ve=>ve.context&&De(ve.context.elements.floating,de));ye&&!ie&&ae.current&&ye.focus({preventScroll:!0})},[f,Y,I,z,Q,x]),Ee(()=>{ne.current=U,G.current=!!Y}),Ee(()=>{U||(W.current=null,X.current=S)},[U,S]);const ke=r!=null,Le=Ce(fe=>{if(!pe.current)return;const ye=i.current.indexOf(fe.currentTarget);ye!==-1&&(F.current!==ye||r!==ye)&&(F.current=ye,A(fe))}),Ge=Ce(()=>O??z?.nodesRef.current.find(fe=>fe.id===Q)?.context?.dataRef?.current.orientation),Se=Ce(()=>Il(i,he.current)),Ue=Ce(fe=>{if(ae.current=!1,Z.current=!0,fe.which===229||!pe.current&&fe.currentTarget===te.current)return;if(h&&b2(fe.key,M,v,B)){jl(fe.key,Ge())||oo(fe),j.setOpen(!1,Ke(Fl,fe.nativeEvent)),ut(I)&&(x?z?.events.emit("virtualfocus",I):I.focus());return}const ye=F.current,de=Il(i,C),ie=qd(i,C);if(V||(fe.key==="Home"&&(oo(fe),F.current=de,A(fe)),fe.key==="End"&&(oo(fe),F.current=ie,A(fe))),k!=null){const ve=k(fe,F.current,i,M,p,v,C,de,ie);if(ve!=null&&(F.current=ve,A(fe)),M==="both")return}if(jl(fe.key,M)){if(oo(fe),U&&!x&&It(fe.currentTarget.ownerDocument)===fe.currentTarget){F.current=Td(fe.key,M,v)?de:ie,A(fe);return}Td(fe.key,M,v)?p?ye>=ie?m&&ye!==i.current.length?F.current=-1:(Z.current=!1,F.current=de):F.current=Oo(i.current,{startingIndex:ye,disabledIndices:C}):F.current=Math.min(ie,Oo(i.current,{startingIndex:ye,disabledIndices:C})):p?ye<=de?m&&ye!==-1?F.current=i.current.length:(Z.current=!1,F.current=ie):F.current=Oo(i.current,{startingIndex:ye,decrement:!0,disabledIndices:C}):F.current=Math.max(de,Oo(i.current,{startingIndex:ye,decrement:!0,disabledIndices:C})),$i(i.current,F.current)&&(F.current=-1),A(fe)}}),Te=b.useMemo(()=>({onFocus(ye){Z.current=!0,Le(ye)},onClick:({currentTarget:ye})=>ye.focus({preventScroll:!0}),onMouseMove(ye){Qv(ye)||(Z.current=!0,le.current=!1,T&&Le(ye))},onPointerLeave(ye){if(!pe.current||!ae.current||ye.pointerType==="touch")return;Z.current=!0;const de=ye.relatedTarget;if(!(!T||i.current.includes(de))&&_e.current&&(se.current?.(),se.current=null,F.current=-1,A(ye),!x)){const ie=te.current,ve=It(Qe(ie));ie&&De(ie,ve)&&ie.focus({preventScroll:!0})}}}),[Le,pe,te,T,i,A,_e,x]),we=b.useMemo(()=>x&&U&&ke&&{"aria-activedescendant":`${N}-${r}`},[x,U,ke,N,r]),Ae=b.useMemo(()=>({...V?{}:we,onKeyDown(fe){if(fe.key==="Tab"&&fe.shiftKey&&U&&!x){const ye=Tt(fe.nativeEvent);if(ye&&!De(te.current,ye))return;oo(fe),j.setOpen(!1,Ke(Qa,fe.nativeEvent)),ut(I)&&I.focus();return}Ue(fe)},onPointerMove(fe){Qv(fe)||(ae.current=!0)}}),[we,Ue,te,V,j,U,x,I]),Ze=b.useMemo(()=>{function fe(ie){j.setOpen(!0,Ke(Fl,ie.nativeEvent,ie.currentTarget))}function ye(ie){S==="auto"&&lp(ie.nativeEvent)&&(X.current=!x)}function de(ie){X.current=S,S==="auto"&&cp(ie.nativeEvent)&&(X.current=!0)}return{onKeyDown(ie){const ve=j.select("open");ae.current=!1;const Be=ie.key.startsWith("Arrow"),Yt=v2(ie.key,Ge(),v),an=jl(ie.key,M),Rt=(h?Yt:an)||ie.key==="Enter"||ie.key.trim()==="";if(x&&ve)return Ue(ie);if(!(!ve&&!w&&Be)){if(Rt){const xe=jl(ie.key,Ge());W.current=h&&xe?null:ie.key}if(h){Yt&&(oo(ie),ve?(F.current=Se(),A(ie)):fe(ie));return}an&&(ge.current!=null&&(F.current=ge.current),oo(ie),!ve&&w?fe(ie):Ue(ie),ve&&A(ie))}},onFocus(ie){j.select("open")&&!x&&(F.current=-1,A(ie))},onPointerDown:de,onPointerEnter:de,onMouseDown:ye,onClick:ye}},[Ue,S,Se,h,A,j,w,M,Ge,v,ge,x]),Me=b.useMemo(()=>({...we,...Ze}),[we,Ze]);return b.useMemo(()=>f?{reference:Me,floating:Ae,item:Te,trigger:Ze}:{},[f,Me,Ae,Ze,Te])}function S2(n,a){const{listRef:i,elementsRef:r,activeIndex:c,onMatch:f,disabledIndices:d,onTyping:m,enabled:p=!0,resetMs:h=750,selectedIndex:v=null}=a,x="rootStore"in n?n.rootStore:n,S=x.useState("open"),T=tn(),w=b.useRef(""),C=b.useRef(v??c??-1),M=b.useRef(null),O=Ce(D=>{function k(te){return r?.current[te]}function B(te){const Q=k(te);return Q&&!xc(Q)||Q?.matches(":disabled")?!1:d==null||!Xs(_o,te,d)}function j(te,Q,z=0){if(te.length===0)return-1;const X=(z%te.length+te.length)%te.length,F=Q.toLowerCase();for(let W=0;W<te.length;W+=1){const ae=(X+W)%te.length;if(!(!te[ae]?.toLowerCase().startsWith(F)||!B(ae)))return ae}return-1}const U=i.current;if(w.current.length>0&&D.key===" "&&(oo(D),m?.(!0)),w.current.length>0&&w.current[0]!==" "&&j(U,w.current)===-1&&D.key!==" "&&m?.(!1),U==null||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;S&&D.key!==" "&&(oo(D),m?.(!0));const Y=w.current==="";Y&&(C.current=v??c??-1),U.every((te,Q)=>te&&B(Q)?te[0]?.toLowerCase()!==te[1]?.toLowerCase():!0)&&w.current===D.key&&(w.current="",C.current=M.current),w.current+=D.key,T.start(h,()=>{w.current="",C.current=M.current,m?.(!1)});const _=((Y?v??c??-1:C.current)??0)+1,V=j(U,w.current,_);V!==-1?(f?.(V),M.current=V):D.key!==" "&&(w.current="",m?.(!1))}),N=Ce(D=>{const k=D.relatedTarget,B=x.select("domReferenceElement"),j=x.select("floatingElement");De(B,k)||De(j,k)||(T.clear(),w.current="",C.current=M.current,m?.(!1))});Ee(()=>{!S&&v!==null||(T.clear(),M.current=null,w.current!==""&&(w.current=""))},[S,v,T]);const R=b.useMemo(()=>({onKeyDown:O,onBlur:N}),[O,N]);return b.useMemo(()=>p?{reference:R,floating:R}:{},[p,R])}const Zv=.1,T2=Zv*Zv,ht=.5;function Hl(n,a,i,r,c,f){return r>=a!=f>=a&&n<=(c-i)*(a-r)/(f-r)+i}function Ll(n,a,i,r,c,f,d,m,p,h){let v=!1;return Hl(n,a,i,r,c,f)&&(v=!v),Hl(n,a,c,f,d,m)&&(v=!v),Hl(n,a,d,m,p,h)&&(v=!v),Hl(n,a,p,h,i,r)&&(v=!v),v}function E2(n,a,i){return n>=i.x&&n<=i.x+i.width&&a>=i.y&&a<=i.y+i.height}function Ul(n,a,i,r,c,f){const d=Math.min(i,c),m=Math.max(i,c),p=Math.min(r,f),h=Math.max(r,f);return n>=d&&n<=m&&a>=p&&a<=h}function jc(n={}){const{blockPointerEvents:a=!1}=n,i=new mn,r=({x:c,y:f,placement:d,elements:m,onClose:p,nodeId:h,tree:v})=>{const x=d?.split("-")[0];let S=!1,T=null,w=null,C=typeof performance<"u"?performance.now():0;function M(N,R){const D=performance.now(),k=D-C;if(T===null||w===null||k===0)return T=N,w=R,C=D,!1;const B=N-T,j=R-w,U=B*B+j*j,Y=k*k*T2;return T=N,w=R,C=D,U<Y}function O(){i.clear(),p()}return function(R){i.clear();const D=m.domReference,k=m.floating;if(!D||!k||x==null||c==null||f==null)return;const{clientX:B,clientY:j}=R,U=Tt(R),Y=R.type==="mouseleave",I=De(k,U),H=De(D,U);if(I&&(S=!0,!Y))return;if(H&&(S=!1,!Y)){S=!0;return}if(Y&&Je(R.relatedTarget)&&De(k,R.relatedTarget))return;function _(){return!!(v&&va(v.nodesRef.current,h).length>0)}function V(){_()||O()}if(_())return;const te=D.getBoundingClientRect(),Q=k.getBoundingClientRect(),z=c>Q.right-Q.width/2,X=f>Q.bottom-Q.height/2,F=Q.width>te.width,W=Q.height>te.height,ae=(F?te:Q).left,A=(F?te:Q).right,G=(W?te:Q).top,ne=(W?te:Q).bottom;if(x==="top"&&f>=te.bottom-1||x==="bottom"&&f<=te.top+1||x==="left"&&c>=te.right-1||x==="right"&&c<=te.left+1){V();return}let Z=!1;switch(x){case"top":Z=Ul(B,j,ae,te.top+1,A,Q.bottom-1);break;case"bottom":Z=Ul(B,j,ae,Q.top+1,A,te.bottom-1);break;case"left":Z=Ul(B,j,Q.right-1,ne,te.left+1,G);break;case"right":Z=Ul(B,j,te.right-1,ne,Q.left+1,G);break}if(Z)return;if(S&&!E2(B,j,te)){V();return}if(!Y&&M(B,j)){V();return}let le=!1;switch(x){case"top":{const se=F?ht/2:ht*4,he=F||z?c+se:c-se,pe=F?c-se:z?c+se:c-se,ge=f+ht+1,_e=z||F?Q.bottom-ht:Q.top,je=z?F?Q.bottom-ht:Q.top:Q.bottom-ht;le=Ll(B,j,he,ge,pe,ge,Q.left,_e,Q.right,je);break}case"bottom":{const se=F?ht/2:ht*4,he=F||z?c+se:c-se,pe=F?c-se:z?c+se:c-se,ge=f-ht,_e=z||F?Q.top+ht:Q.bottom,je=z?F?Q.top+ht:Q.bottom:Q.top+ht;le=Ll(B,j,he,ge,pe,ge,Q.left,_e,Q.right,je);break}case"left":{const se=W?ht/2:ht*4,he=W||X?f+se:f-se,pe=W?f-se:X?f+se:f-se,ge=c+ht+1,_e=X||W?Q.right-ht:Q.left,je=X?W?Q.right-ht:Q.left:Q.right-ht;le=Ll(B,j,_e,Q.top,je,Q.bottom,ge,he,ge,pe);break}case"right":{const se=W?ht/2:ht*4,he=W||X?f+se:f-se,pe=W?f-se:X?f+se:f-se,ge=c-ht,_e=X||W?Q.left+ht:Q.right,je=X?W?Q.left+ht:Q.right:Q.left+ht;le=Ll(B,j,ge,he,ge,pe,_e,Q.top,je,Q.bottom);break}}le?S||i.start(40,V):V()}};return r.__options={...n,blockPointerEvents:a},r}const w2={..._c,disabled:n=>n.disabled,instantType:n=>n.instantType,isInstantPhase:n=>n.isInstantPhase,trackCursorAxis:n=>n.trackCursorAxis,disableHoverablePopup:n=>n.disableHoverablePopup,lastOpenChangeReason:n=>n.openChangeReason,closeOnClick:n=>n.closeOnClick,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin};class R2 extends Ws{constructor(a,i,r){const c=new Nc;super(O2(a,c,i,r),C2(c),w2)}setOpen=(a,i)=>{d2(this,a,i,{extraState:{openChangeReason:i.reason}})};cancelPendingOpen(a){this.state.floatingRootContext.dispatchOpenChange(!1,Ke(ko,a))}}function O2(n,a,i,r=!1){return{...Dc(a,i,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...n}}function C2(n){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n}}const A2=cr(function(a){const{disabled:i=!1,defaultOpen:r=!1,open:c,disableHoverablePopup:f=!1,trackCursorAxis:d="none",actionsRef:m,onOpenChange:p,onOpenChangeComplete:h,handle:v,triggerId:x,defaultTriggerId:S=null,children:T}=a,w=jp((H,_)=>new R2({open:r,openProp:c,activeTriggerId:S,triggerIdProp:x},H,_));w.useControlledProp("openProp",c),w.useControlledProp("triggerIdProp",x),w.useContextCallback("onOpenChange",p),w.useContextCallback("onOpenChangeComplete",h);const C=w.useState("open"),M=!i&&C,O=w.useState("activeTriggerId"),N=w.useState("mounted"),R=w.useState("payload");w.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:f,disabled:i}),Cc(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:D,transitionStatus:k}=Ac(M,w),B=w.useState("isInstantPhase"),j=w.useState("instantType"),U=w.useState("lastOpenChangeReason"),Y=b.useRef(null);Ee(()=>{C&&i&&w.setOpen(!1,Ke(iw))},[C,i,w]),Ee(()=>{k==="ending"&&U===vc||k!=="ending"&&B?(j!=="delay"&&(Y.current=j),w.set("instantType","delay")):Y.current!==null&&(w.set("instantType",Y.current),Y.current=null)},[k,B,U,j,w]),Ee(()=>{M&&O==null&&w.set("payload",void 0)},[w,O,M]),b.useImperativeHandle(m,()=>({unmount:D,close:()=>w.setOpen(!1,Ke(bc))}),[D,w]);const I=M||N||!i&&d!=="none";return y.jsxs(Pb.Provider,{value:w,children:[v&&y.jsx(Rc,{handle:v,store:w}),I&&y.jsx(M2,{store:w,disabled:i,trackCursorAxis:d}),typeof T=="function"?T({payload:R}):T]})});function M2({store:n,disabled:a,trackCursorAxis:i}){const r=n.useState("floatingRootContext"),c=Sc(r,{enabled:!a,referencePress:()=>n.select("closeOnClick")}),f=fR(r,{enabled:!a&&i!=="none",axis:i==="none"?void 0:i}),d=b.useMemo(()=>No(f.reference,c.reference),[f.reference,c.reference]);return Mc(n,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:c.floating??wt}),null}function Sa(n){return Wa(n,"base-ui")}const G0=b.createContext(void 0);function N2(){return b.useContext(G0)}const D2=600,X0="data-base-ui-tooltip-trigger";function Wv(n){if("composedPath"in n){const i=n.composedPath();for(let r=0;r<i.length;r+=1){const c=i[r];if(Je(c))return c}}const a=n.target;return Je(a)?a:null}function _2(n){let a=n;for(;a;){const i=a.closest(`[${X0}]`);if(i)return i;const r=a.getRootNode();a="host"in r&&Je(r.host)?r.host:null}return null}const z2=ap(function(a,i){const{render:r,className:c,style:f,handle:d,payload:m,disabled:p,delay:h,closeOnClick:v=!0,closeDelay:x,id:S,...T}=a,w=ic(!0),M=Bp(d)??w;if(!M)throw new Error(Bt(82));const O=Sa(S),N=M.useState("isTriggerActive",O),R=M.useState("isOpenedByTrigger",O),D=M.useState("floatingRootContext"),k=b.useRef(null),B=x??0,{registerTrigger:j,isMountedByThisTrigger:U}=Lp(O,k,M,{payload:m,closeOnClick:v,closeDelay:B}),Y=N2(),{activeIdRef:I,delayRef:H,isInstantPhase:_,hasProvider:V}=cw(D,{open:R}),te=Ip(D);M.useSyncedValue("isInstantPhase",_);const Q=M.useState("disabled"),z=p??Q,X=Ut(z),F=M.useState("trackCursorAxis"),W=M.useState("disableHoverablePopup"),ae=b.useRef(!1),A=tn(),G=b.useRef(void 0);function ne(){return V&&I.current!=null?0:h??Y??D2}function Z(be){const ke=k.current;if(!ke||!be)return!1;const Le=_2(be);return Le!==null&&Le!==ke&&De(ke,Le)}function le(be){const ke=Z(be);return ae.current=ke,ke&&(te.openChangeTimeout.clear(),te.restTimeout.clear(),te.restTimeoutPending=!1,A.clear()),ke}const se=zc(D,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!W&&F!=="both"?jc():null,restMs:ne,delay(){return x==null&&V?{close:Ka(H.current,"close")}:{close:B}},triggerElementRef:k,isActiveTrigger:N,isClosing:()=>M.select("transitionStatus")==="ending",shouldOpen(){return!ae.current}}),he=q0(D,{enabled:!z}).reference,pe=be=>{const ke=ae.current,Le=Wv(be),Ge=le(Le),Se=k.current,Ue=Se&&Le&&De(Se,Le);if(Ge&&M.select("open")&&M.select("lastOpenChangeReason")===At){M.setOpen(!1,Ke(At,be));return}if(ke&&!Ge&&Ue&&!X.current&&!M.select("open")&&Se&&ma(G.current)){const Te=()=>{!ae.current&&!X.current&&!M.select("open")&&M.setOpen(!0,Ke(At,be,Se))},we=ne();we===0?(A.clear(),Te()):A.start(we,Te)}},ge=M.useState("triggerProps",U);return yt("button",a,{state:{open:R},ref:[i,j,k],props:[se,he,U||F!=="none"?ge:void 0,{onMouseOver(be){pe(be.nativeEvent)},onFocus(be){Z(Wv(be.nativeEvent))&&be.preventBaseUIHandler()},onMouseLeave(){ae.current=!1,A.clear(),G.current=void 0},onPointerEnter(be){G.current=be.pointerType},onPointerDown(be){G.current=be.pointerType,M.set("closeOnClick",v),v&&!M.select("open")&&M.cancelPendingOpen(be.nativeEvent)},onClick(be){v&&!M.select("open")&&M.cancelPendingOpen(be.nativeEvent)},id:O,[Bd]:z?"":void 0,[X0]:z?void 0:""},T],stateAttributesMapping:mp})}),F0=b.createContext(void 0);function k2(){const n=b.useContext(F0);if(n===void 0)throw new Error(Bt(70));return n}const K0=b.forwardRef(function(a,i){const{children:r,container:c,className:f,render:d,style:m,...p}=a,{node:h,subtree:v}=T0({container:c,ref:i,componentProps:a,elementProps:p});return!v&&!h?null:y.jsxs(b.Fragment,{children:[v,h&&Yn.createPortal(r,h)]})}),j2=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a;return ic().useState("mounted")||r?y.jsx(F0.Provider,{value:r,children:y.jsx(K0,{ref:i,...c})}):null}),Q0=b.createContext(void 0);function H2(){const n=b.useContext(Q0);if(n===void 0)throw new Error(Bt(71));return n}const L2=b.createContext(void 0);function qp(){return b.useContext(L2)?.direction??"ltr"}const U2=n=>({name:"arrow",options:n,async fn(a){const{x:i,y:r,placement:c,rects:f,platform:d,elements:m,middlewareData:p}=a,{element:h,padding:v=0,offsetParent:x="real"}=ya(n,a)||{};if(h==null)return{};const S=t0(v),T={x:i,y:r},w=xp(c),C=bp(w),M=await d.getDimensions(h),O=w==="y",N=O?"top":"left",R=O?"bottom":"right",D=O?"clientHeight":"clientWidth",k=f.reference[C]+f.reference[w]-T[w]-f.floating[C],B=T[w]-f.reference[w],j=x==="real"?await d.getOffsetParent?.(h):m.floating;let U=m.floating[D]||f.floating[C];(!U||!await d.isElement?.(j))&&(U=m.floating[D]||f.floating[C]);const Y=k/2-B/2,I=U/2-M[C]/2-1,H=Math.min(S[N],I),_=Math.min(S[R],I),V=H,te=U-M[C]-_,Q=U/2-M[C]/2+Y,z=e0(V,Q,te),X=!p.arrow&&Ho(c)!=null&&Q!==z&&f.reference[C]/2-(Q<V?H:_)-M[C]/2<0,F=X?Q<V?Q-V:Q-te:0;return{[w]:T[w]+F,data:{[w]:z,centerOffset:Q-z-F,...X&&{alignmentOffset:F}},reset:X}}}),B2=(n,a)=>{const{name:i,fn:r}=U2(n);return{name:i,fn:r,options:[n,a]}},P2={name:"hide",async fn(n){const{width:a,height:i,x:r,y:c}=n.rects.reference,f=a===0&&i===0&&r===0&&c===0,d=await n.platform.detectOverflow(n,{elementContext:"reference"});return{data:{referenceHidden:d.top-i>=0||d.right-a>=0||d.bottom-i>=0||d.left-a>=0||f}}}},I2={sideX:"left",sideY:"top"},Y2="--available-width",q2="--available-height",V2="--anchor-width",G2="--anchor-height",X2="--transform-origin",$v=Y2,Jv=q2;function Z0(n,a,i){const r=n==="inline-start"||n==="inline-end";return{top:"top",right:r?i?"inline-start":"inline-end":"right",bottom:"bottom",left:r?i?"inline-end":"inline-start":"left"}[a]}function eb(n,a,i){const{rects:r,placement:c}=n;return{side:Z0(a,In(c),i),align:Ho(c)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Vp(n){return F2(n,h2)}function F2(n,a){const{anchor:i,positionMethod:r="absolute",side:c="bottom",sideOffset:f=0,align:d="center",alignOffset:m=0,collisionBoundary:p,collisionPadding:h=5,sticky:v=!1,arrowPadding:x=5,disableAnchorTracking:S=!1,inline:T,keepMounted:w=!1,floatingRootContext:C,mounted:M,collisionAvoidance:O,shift:N,nodeId:R,adaptiveOrigin:D,lazyFlip:k=!1,externalTree:B}=n,[j,U]=b.useState(null);!M&&j!==null&&U(null);const Y=O.side||"flip",I=O.align||"flip",H=O.fallbackAxisSide||"end",_=N?.crossAxis??!1,V=N?.rootBoundary,te=typeof i=="function"?i:void 0,Q=Ce(te),z=te?Q:i,X=Ut(i),F=Ut(M),ae=qp()==="rtl",A=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ae?"left":"right","inline-start":ae?"right":"left"}[c],G=d==="center"?A:`${A}-${d}`;let ne=h;typeof ne=="number"?ne={top:ne,right:ne,bottom:ne,left:ne}:ne&&(ne={top:ne.top||0,right:ne.right||0,bottom:ne.bottom||0,left:ne.left||0});const Z=1,le=c==="bottom"?Z:0,se=c==="top"?Z:0,he=c==="right"?Z:0,pe=c==="left"?Z:0,ge={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:ne},_e=b.useRef(null),je=Ut(f),Re=Ut(m),be=typeof f!="function"?f:0,ke=typeof m!="function"?m:0,Le=[];T&&Le.push(T),Le.push(KR(Fe=>{const Et=eb(Fe,c,ae),Gt=typeof je.current=="function"?je.current(Et):je.current,zt=typeof Re.current=="function"?Re.current(Et):Re.current;return{mainAxis:Gt,crossAxis:zt,alignmentAxis:zt}},[be,ke,ae,c]));const Ge=I==="none"&&Y!=="shift",Se=!Ge&&(v||_||Y==="shift"),Ue=Y==="none"?null:WR({...ge,padding:{top:ne.top+Z+le,right:ne.right+Z+pe,bottom:ne.bottom+Z+se,left:ne.left+Z+he},mainAxis:!_&&Y==="flip",crossAxis:I==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),Te=Ge?null:QR({...ge,rootBoundary:V,mainAxis:I!=="none",crossAxis:Se,limiter:v||_?void 0:ZR(Fe=>{if(!_e.current)return{};const{width:Et,height:Gt}=_e.current.getBoundingClientRect(),zt=Bn(In(Fe.placement)),$n=zt==="y"?Et:Gt,sn=zt==="y"?ne.left+ne.right:ne.top+ne.bottom;return{offset:$n/2+sn/2}})},[ge,v,_,V,ne,I]);Y==="shift"||I==="shift"||d==="center"?Le.push(Te,Ue):Le.push(Ue,Te),Le.push($R({...ge,apply({elements:{floating:Fe},availableWidth:Et,availableHeight:Gt,rects:zt}){if(!F.current)return;const $n=Fe.style;$n.setProperty($v,`${Et}px`),$n.setProperty(Jv,`${Gt}px`);const sn=xt(Fe).devicePixelRatio||1,{x:Bo,y:An,width:os,height:Gn}=zt.reference,Po=(Math.round((Bo+os)*sn)-Math.round(Bo*sn))/sn,Io=(Math.round((An+Gn)*sn)-Math.round(An*sn))/sn;$n.setProperty(V2,`${Po}px`),$n.setProperty(G2,`${Io}px`)}}),B2(Fe=>({element:_e.current||Qe(Fe.elements.floating).createElement("div"),padding:_e.current?x:0,offsetParent:"floating"}),[x]),{name:"transformOrigin",fn(Fe){const{elements:{floating:Et},middlewareData:Gt,placement:zt,platform:$n,rects:sn,y:Bo}=Fe,An=In(zt),os=Ho(zt),Gn=Bn(An)==="y",Po=_e.current,Io=typeof f=="function"?f(eb(Fe,c,ae)):f;let Yo;if(!Po&&os&&Math.abs(Gn?Gt.shift?.x||0:Gt.shift?.y||0)<=1)Yo=os==="start"===(Gn&&$n.isRTL?.(Et)===!0)?"100%":"0%";else{const gr=Gn?Gt.arrow?.x||0:Gt.arrow?.y||0,yr=Gn?Po?.clientWidth||0:Po?.clientHeight||0;Yo=`${gr+yr/2}px`}let wa=An==="top"||An==="left"?`calc(100% + ${Io}px)`:`${-Io}px`;return Se&&Gn&&Math.abs(Gt.shift?.y||0)>Io&&(wa=`${sn.reference.y+sn.reference.height/2-Bo}px`),Et.style.setProperty(X2,Gn?`${Yo} ${wa}`:`${wa} ${Yo}`),{}}},P2,D),Ee(()=>{!M&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[M,C]);const we=b.useMemo(()=>({ancestorScroll:!S,elementResize:!S&&typeof ResizeObserver<"u",layoutShift:!S&&typeof IntersectionObserver<"u"}),[S]),{refs:Ae,elements:Ze,x:Me,y:fe,middlewareData:ye,update:de,placement:ie,context:ve,isPositioned:Be,floatingStyles:Yt}=a({rootContext:C,open:w?M:void 0,placement:G,middleware:Le,strategy:r,whileElementsMounted:w?void 0:(...Fe)=>Iv(...Fe,we),nodeId:R,externalTree:B}),{sideX:an,sideY:Rt}=ye.adaptiveOrigin||I2,xe=Be?r:"fixed",qe=b.useMemo(()=>{let Fe;return Be?D?Fe={position:xe,[an]:Me,[Rt]:fe}:Fe={...Yt,position:xe}:Fe={position:xe,top:0,left:0},Fe[$v]="100vw",Fe[Jv]="100vh",Be||(Fe.opacity=0),Fe},[D,xe,an,Me,Rt,fe,Yt,Be]),ot=b.useRef(null);Ee(()=>{if(!M)return;const Fe=X.current,Et=typeof Fe=="function"?Fe():Fe,zt=(tb(Et)?Et.current:Et)||null||null;zt!==ot.current&&(Ae.setPositionReference(zt),ot.current=zt)},[M,Ae,z,X]),b.useEffect(()=>{if(!M)return;const Fe=X.current;typeof Fe!="function"&&tb(Fe)&&Fe.current!==ot.current&&(Ae.setPositionReference(Fe.current),ot.current=Fe.current)},[M,Ae,z,X]),b.useEffect(()=>{if(w&&M&&Ze.reference&&Ze.floating)return Iv(Ze.reference,Ze.floating,de,we)},[w,M,Ze,de,we]);const mt=In(ie),On=Z0(c,mt,ae),qn=Ho(ie)||"center",Cn=!!ye.hide?.referenceHidden;Ee(()=>{k&&M&&Be&&mt!==A&&U(mt)},[k,M,Be,mt,A]);const _t=b.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Vn=ye.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:qe,arrowStyles:_t,arrowRef:_e,arrowUncentered:Vn,side:On,align:qn,physicalSide:mt,anchorHidden:Cn,refs:Ae,context:ve,isPositioned:Be,update:de}),[qe,_t,_e,Vn,On,qn,mt,Cn,Ae,ve,Be,de])}function tb(n){return n!=null&&"current"in n}function Hc(n){return n==="starting"?eR:wt}function Gp(n,a,{styles:i,transitionStatus:r,props:c,refs:f,hidden:d,inert:m=!1}){const p={...i};return m&&(p.pointerEvents="none"),yt("div",n,{state:a,ref:f,props:[{role:"presentation",hidden:d,style:p},Hc(r),c],stateAttributesMapping:mc})}const K2=b.forwardRef(function(a,i){const{render:r,className:c,anchor:f,positionMethod:d="absolute",side:m="top",align:p="center",sideOffset:h=0,alignOffset:v=0,collisionBoundary:x="clipping-ancestors",collisionPadding:S=5,arrowPadding:T=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:M=Op,style:O,...N}=a,R=ic(),D=k2(),k=R.useState("open"),B=R.useState("mounted"),j=R.useState("trackCursorAxis"),U=R.useState("disableHoverablePopup"),Y=R.useState("floatingRootContext"),I=R.useState("instantType"),H=R.useState("transitionStatus"),_=R.useState("adaptiveOrigin"),V=Vp({anchor:f,positionMethod:d,floatingRootContext:Y,mounted:B,side:m,sideOffset:h,align:p,alignOffset:v,collisionBoundary:x,collisionPadding:S,sticky:w,arrowPadding:T,disableAnchorTracking:C,keepMounted:D,collisionAvoidance:M,adaptiveOrigin:_}),te=b.useMemo(()=>({open:k,side:V.side,align:V.align,anchorHidden:V.anchorHidden,instant:j!=="none"?"tracking-cursor":I}),[k,V.side,V.align,V.anchorHidden,j,I]),Q=Gp(a,te,{styles:V.positionerStyles,transitionStatus:H,props:N,refs:[i,R.useStateSetter("positionerElement")],hidden:!B,inert:!k||j==="both"||U});return y.jsx(Q0.Provider,{value:V,children:Q})}),Q2=b.forwardRef(function(a,i){const{render:r,className:c,style:f,...d}=a,m=ic(),{side:p,align:h}=H2(),v=m.useState("open"),x=m.useState("instantType"),S=m.useState("transitionStatus"),T=m.useState("popupProps"),w=m.useState("floatingRootContext"),C=m.useState("disabled"),M=m.useState("closeDelay");$s({open:v,ref:m.context.popupRef,onComplete(){v&&m.context.onOpenChangeComplete?.(!0)}}),Yp(w,{enabled:!C,closeDelay:M});const O=m.useStateSetter("popupElement");return yt("div",a,{state:{open:v,side:p,align:h,instant:x,transitionStatus:S},ref:[i,m.context.popupRef,O],props:[wc,T,Hc(S),d],stateAttributesMapping:gc})}),Z2=function(a){const{delay:i,closeDelay:r,timeout:c=400}=a,f=b.useMemo(()=>({open:i,close:r}),[i,r]);return y.jsx(G0.Provider,{value:i,children:y.jsx(lw,{delay:f,timeoutMs:c,children:a.children})})};function Lc(n){return Ep(19)?n:n?"true":void 0}function W0({label:n,shortcut:a,side:i="bottom",children:r}){return y.jsxs(A2,{children:[y.jsx(z2,{render:r}),y.jsx(j2,{children:y.jsx(K2,{side:i,sideOffset:6,className:"z-[1000]",children:y.jsxs(Q2,{className:"rounded-md bg-fg px-2 py-1 text-xs text-surface shadow-popup data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity",children:[n,a?y.jsx("span",{className:"ml-2 opacity-60",children:a}):null]})})})]})}function W2({children:n}){return y.jsx(Z2,{delay:500,closeDelay:0,children:n})}function $2(n){return n.repeat&&(n.key==="Enter"||n.key===" ")}function ir(n){$2(n)&&n.target===n.currentTarget&&n.preventDefault()}function $0(n){return n?a=>{ir(a),n(a)}:ir}const J2=200,eO=2e3;function tO(n,a,i){let r=null,c=!1;const f=()=>{c||(c=!0,n.removeEventListener("keydown",d,!0),n.removeEventListener("keyup",d,!0),n.clearTimeout(m),r!==null&&n.clearTimeout(r))},d=p=>{const h=p.key==="Enter"||p.key===" ";if(p.type==="keyup"){p.key===" "&&!i(p.target)&&p.preventDefault(),p.key===a&&r===null&&(r=n.setTimeout(f,J2));return}h&&!i(p.target)&&(p.preventDefault(),p.stopImmediatePropagation())},m=n.setTimeout(f,eO);return n.addEventListener("keydown",d,!0),n.addEventListener("keyup",d,!0),f}const nO={primary:"bg-accent text-accent-fg hover:brightness-110 active:brightness-95",secondary:"bg-surface text-fg border border-line hover:bg-hover",ghost:"bg-transparent text-fg hover:bg-hover",danger:"bg-danger text-white hover:brightness-110"},oO={sm:"h-6 px-2 text-xs gap-1",md:"h-7 px-2.5 text-[13px] gap-1.5",lg:"h-8 px-3 text-[13px] gap-2"},on=b.forwardRef(function({variant:a="secondary",size:i="md",icon:r,className:c,children:f,type:d="button",onKeyDown:m,...p},h){return y.jsxs("button",{ref:h,type:d,className:Mt("inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-control font-medium transition-[background,filter]","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-45",nO[a],oO[i],c),...p,onKeyDown:$0(m),children:[r,f]})}),aO={sm:"size-6",md:"size-7",lg:"size-8"},Js=b.forwardRef(function({label:a,icon:i,shortcut:r,active:c,size:f="md",noTooltip:d,className:m,type:p="button",onKeyDown:h,...v},x){const S=y.jsx("button",{ref:x,type:p,"aria-label":a,"aria-pressed":c===void 0?void 0:c,className:Mt("inline-flex shrink-0 items-center justify-center rounded-control text-fg-muted transition-colors","hover:bg-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-40",c&&"bg-accent-soft text-accent hover:bg-accent-soft hover:text-accent",aO[f],m),...v,onKeyDown:$0(h),children:i});return d?S:y.jsx(W0,{label:a,shortcut:r,children:S})}),J0=b.createContext(void 0);function Xp(n){const a=b.useContext(J0);if(a===void 0&&!n)throw new Error(Bt(33));return a}const ex=b.createContext(void 0);function Ta(n){const a=b.useContext(ex);if(a===void 0&&!n)throw new Error(Bt(36));return a}const sO=b.createContext(void 0);function Fp(n=!0){const a=b.useContext(sO);if(a===void 0&&!n)throw new Error(Bt(25));return a}function tx({controlled:n,default:a,name:i,state:r="value"}){const{current:c}=b.useRef(n!==void 0),[f,d]=b.useState(a),m=c&&n!==void 0?n:f,p=b.useCallback(h=>{c||d(h)},[]);return[m,p]}const nx=b.createContext(void 0);function Kp(n=!1){const a=b.useContext(nx);if(a===void 0&&!n)throw new Error(Bt(16));return a}function iO(n){const{focusableWhenDisabled:a,disabled:i,composite:r=!1,tabIndex:c=0,isNativeButton:f}=n,d=r&&a!==!1,m=r&&a===!1;return{props:b.useMemo(()=>{const h={onKeyDown(v){i&&a&&v.key!=="Tab"&&v.preventDefault()}};return r||(h.tabIndex=c,!f&&i&&(h.tabIndex=a?c:-1)),(f&&(a||d)||!f&&i)&&(h["aria-disabled"]=i),f&&(!a||m)&&(h.disabled=i),h},[r,i,a,d,m,f,c])}}function Vl(n,a,{detail:i=0}={}){n.dispatchEvent(new(xt(n)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:i,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey,altKey:a.altKey,metaKey:a.metaKey}))}function ei(n={}){const{disabled:a=!1,focusableWhenDisabled:i,tabIndex:r=0,native:c=!0,composite:f}=n,d=b.useRef(null),m=Kp(!0),p=f??m!==void 0,{props:h}=iO({focusableWhenDisabled:i,disabled:a,composite:p,tabIndex:r,isNativeButton:c}),v=b.useCallback(()=>{const T=d.current;Ed(T)&&p&&a&&h.disabled===void 0&&T.disabled&&(T.disabled=!1)},[a,h.disabled,p]);Ee(v,[v]);const x=b.useCallback((T={})=>{const{onClick:w,onMouseDown:C,onKeyUp:M,onKeyDown:O,onPointerDown:N,...R}=T;return No({onClick(D){if(a){D.preventDefault();return}w?.(D)},onMouseDown(D){a||C?.(D)},onKeyDown(D){if(a||($l(D),O?.(D),D.baseUIHandlerPrevented))return;const k=D.target===D.currentTarget,B=D.currentTarget,j=Ed(B),U=!c&&rO(B),Y=k&&(c?j:!U),I=D.key==="Enter",H=D.key===" ",_=B.getAttribute("role"),V=_?.startsWith("menuitem")||_==="option"||_==="gridcell";if(k&&p&&H){if(D.defaultPrevented&&V)return;D.preventDefault(),(!c||j)&&(D.preventBaseUIHandler(),Vl(B,D));return}if(!Y||c||!H&&!I){k&&U&&H&&D.preventDefault();return}D.defaultPrevented||(D.preventDefault(),I&&(D.preventBaseUIHandler(),Vl(B,D)))},onKeyUp(D){if(!a){if($l(D),M?.(D),D.target===D.currentTarget&&c&&p&&Ed(D.currentTarget)&&D.key===" "){D.preventDefault();return}D.baseUIHandlerPrevented||D.target===D.currentTarget&&!c&&!p&&!D.defaultPrevented&&D.key===" "&&(D.preventBaseUIHandler(),Vl(D.currentTarget,D))}},onPointerDown(D){if(a){D.preventDefault();return}N?.(D)}},c?{type:"button"}:{role:"button"},h,R)},[a,h,p,c]),S=Ce(T=>{d.current=T,v()});return{getButtonProps:x,buttonRef:S}}function Ed(n){return ut(n)&&n.tagName==="BUTTON"}function rO(n){return ut(n)&&n.tagName==="A"&&!!n.href}function lO(n){const{closeOnClick:a,highlighted:i,id:r,nodeId:c,store:f,typingRef:d,itemRef:m,itemMetadata:p}=n,{events:h}=f.useState("floatingTreeRoot"),v=f.useState("open"),x=Fp(!0),S=x!==void 0;return b.useMemo(()=>({id:r,role:"menuitem",tabIndex:v&&i?0:-1,onKeyDown(T){T.key===" "&&d?.current&&T.preventDefault()},onMouseMove(T){c&&h.emit("itemhover",{nodeId:c,target:T.currentTarget})},onClick(T){a&&h.emit("close",{domEvent:T,reason:Kb})},onMouseUp(T){if(x){const w=x.initialCursorPointRef.current;if(x.initialCursorPointRef.current=null,S&&w&&Math.abs(T.clientX-w.x)<=1&&Math.abs(T.clientY-w.y)<=1||S&&!ip&&T.button===2)return}m.current&&f.context.allowMouseUpTriggerRef.current&&(!S||T.button===2)&&p.type==="regular-item"&&Vl(m.current,T,{detail:1})}}),[a,i,r,h,c,v,f,d,m,x,S,p])}const cO={type:"regular-item"};function ox(n){const{closeOnClick:a,disabled:i,highlighted:r,id:c,store:f,typingRef:d=f.context.typingRef,nativeButton:m,itemMetadata:p,nodeId:h}=n,v=b.useRef(null),{getButtonProps:x,buttonRef:S}=ei({disabled:i,focusableWhenDisabled:!0,native:m,composite:!0}),T=lO({closeOnClick:a,highlighted:r,id:c,nodeId:h,store:f,typingRef:d,itemRef:v,itemMetadata:p}),w=b.useCallback(M=>No(T,{onMouseEnter(){p.type==="submenu-trigger"&&p.setActive()}},M,x),[T,x,p]),C=Za(v,S);return b.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const ax=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function uO(){return b.useContext(ax)}function Qp(n={}){const{guess:a,label:i,metadata:r,textRef:c,index:f}=n,{register:d,unregister:m,subscribeMapChange:p,nextIndexRef:h}=uO(),v=b.useRef(-1),[x,S]=b.useState(f==null&&a?()=>{if(v.current===-1){const M=h.current;h.current+=1,v.current=M}return v.current}:-1),T=f??x,w=b.useRef(null),C=b.useCallback(M=>{const O=w.current;O&&m(O),w.current=M,M&&d(M,{metadata:r??null,index:f??null,label:i,textRef:c})},[f,d,m,r,i,c]);return Ee(()=>{if(f==null)return p(M=>{const O=w.current?M.get(w.current)?.index:null;O!=null&&S(O)})},[f,p]),{ref:C,index:T}}const sx=b.forwardRef(function(a,i){const{render:r,className:c,id:f,label:d,nativeButton:m=!1,disabled:p=!1,closeOnClick:h=!0,style:v,...x}=a,S=Qp({guess:!0,label:d}),T=Xp(!0),w=Sa(f),{store:C}=Ta(),M=C.useState("disabled"),O=p||M,N=C.useState("isActive",S.index),R=C.useState("itemProps"),{getItemProps:D,itemRef:k}=ox({closeOnClick:h,disabled:O,highlighted:N,id:w,store:C,nativeButton:m,nodeId:T?.context.nodeId,itemMetadata:cO});return yt("div",a,{state:{disabled:O,highlighted:N},props:[R,x,D],ref:[k,i,S.ref]})}),fO=b.createContext(void 0);function Zp(n){return b.useContext(fO)}const Fd="ArrowUp",Kd="ArrowDown",Qd="ArrowLeft",Zd="ArrowRight",Wd="Home",$d="End",Uc=new Set([Fd,Kd,Qd,Zd,Wd,$d]),dO="Shift",pO=[dO,"Control","Alt","Meta"];function hO(n){return ut(n)&&n.tagName==="INPUT"}function nb(n){return!!(hO(n)&&n.selectionStart!=null||ut(n)&&n.tagName==="TEXTAREA")}function ob(n,a,i,r){if(!n||!a||!a.scrollTo)return;let c=n.scrollLeft,f=n.scrollTop;const d=n.clientWidth<n.scrollWidth,m=n.clientHeight<n.scrollHeight;if(d&&r!=="vertical"){const p=ab(n,a,"left"),h=Bl(n),v=Bl(a);i==="ltr"&&(p+a.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-h.scrollPaddingRight?c=p+a.offsetWidth+v.scrollMarginRight-n.clientWidth+h.scrollPaddingRight:p-v.scrollMarginLeft<n.scrollLeft+h.scrollPaddingLeft&&(c=p-v.scrollMarginLeft-h.scrollPaddingLeft)),i==="rtl"&&(p-v.scrollMarginLeft<n.scrollLeft+h.scrollPaddingLeft?c=p-v.scrollMarginLeft-h.scrollPaddingLeft:p+a.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-h.scrollPaddingRight&&(c=p+a.offsetWidth+v.scrollMarginRight-n.clientWidth+h.scrollPaddingRight))}if(m&&r!=="horizontal"){const p=ab(n,a,"top"),h=Bl(n),v=Bl(a);p-v.scrollMarginTop<n.scrollTop+h.scrollPaddingTop?f=p-v.scrollMarginTop-h.scrollPaddingTop:p+a.offsetHeight+v.scrollMarginBottom>n.scrollTop+n.clientHeight-h.scrollPaddingBottom&&(f=p+a.offsetHeight+v.scrollMarginBottom-n.clientHeight+h.scrollPaddingBottom)}n.scrollTo({left:c,top:f,behavior:"auto"})}function ab(n,a,i){const r=i==="left"?"offsetLeft":"offsetTop";let c=0;for(;a.offsetParent&&(c+=a[r],a.offsetParent!==n);)a=a.offsetParent;return c}function Bl(n){const a=getComputedStyle(n);return{scrollMarginTop:parseFloat(a.scrollMarginTop)||0,scrollMarginRight:parseFloat(a.scrollMarginRight)||0,scrollMarginBottom:parseFloat(a.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(a.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(a.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(a.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(a.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(a.scrollPaddingLeft)||0}}const Wp=b.forwardRef(function(a,i){const{render:r,className:c,style:f,finalFocus:d,...m}=a,{store:p}=Ta(),{side:h,align:v}=Xp(),x=Zp()!=null,S=p.useState("open"),T=p.useState("transitionStatus"),w=p.useState("popupProps"),C=p.useState("mounted"),M=p.useState("instantType"),O=p.useState("activeTriggerElement"),N=p.useState("parent"),R=p.useState("lastOpenChangeReason"),D=p.useState("rootId"),k=p.useState("floatingRootContext"),B=p.useState("floatingTreeRoot"),j=p.useState("closeDelay"),U=p.useState("hoverEnabled"),Y=p.useState("disabled"),I=p.useState("openMethod"),H=N.type==="context-menu";$s({open:S,ref:p.context.popupRef,onComplete(){S&&p.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function z(X){p.setOpen(!1,Ke(X.reason,X.domEvent))}return B.events.on("close",z),()=>{B.events.off("close",z)}},[B.events,p]),Yp(k,{enabled:U&&!Y&&!H&&N.type!=="menubar",closeDelay:j});const _=p.useStateSetter("popupElement"),V={transitionStatus:T,side:h,align:v,open:S,nested:N.type==="menu",instant:M},te=yt("div",a,{state:V,ref:[i,p.context.popupRef,_],stateAttributesMapping:gc,props:[w,{onKeyDown(z){x&&Uc.has(z.key)&&z.stopPropagation()}},Hc(T),m,{"data-rootownerid":D}]});let Q=N.type===void 0||H;return(O||N.type==="menubar"&&R!==gp)&&(Q=!0),y.jsx(Dp,{context:k,openInteractionType:I,modal:H,disabled:!C,returnFocus:d===void 0?Q:d,initialFocus:N.type!=="menu",restoreFocus:!0,externalTree:N.type!=="menubar"?B:void 0,previousFocusableElement:O,nextFocusableElement:N.type===void 0?p.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:N.type===void 0?p.context.beforeContentFocusGuardRef:void 0,children:te})}),ix=b.createContext(void 0);function mO(){const n=b.useContext(ix);if(n===void 0)throw new Error(Bt(32));return n}const $p=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a,{store:f,parent:d}=Ta();if(!(f.useState("mounted")||r))return null;const h=d.type==="menu"||d.type==="menubar"?"group":void 0;return y.jsx(ix.Provider,{value:r,children:y.jsx(Cp,{ref:i,...c,portalOwnerRole:h})})});function rx(n){const{children:a,elementsRef:i,labelsRef:r,onMapChange:c}=n,f=Ce(c),[,d]=b.useState(!1),m=en(yO).current,p=en(gO).current,h=b.useRef(0),v=b.useRef(!0),x=b.useRef(null),S=b.useRef(null),T=Ce(()=>{v.current||(v.current=!0,d(k=>!k))}),w=Ce((k,B)=>{p.set(k,B),T()}),C=Ce(k=>{p.delete(k),T()}),M=Ce(k=>{const B=new Map;return i.current.length=0,r&&(r.current.length=0),k.forEach(j=>{B.set(j.element,{...j.registration.metadata??{},index:j.index}),i.current[j.index]=j.element,r&&(r.current[j.index]=j.registration.label!==void 0?j.registration.label:j.registration.textRef?.current?.textContent??j.element.textContent)}),h.current=i.current.length,B});function O(k){if(S.current?.disconnect(),S.current=null,typeof MutationObserver!="function"||k.length<2)return;const B=new MutationObserver(U=>{if(!xO(U))return;let Y=null;for(const I of k)if(I.isConnected){if(Y&&lx(Y,I)>0){B.disconnect(),T();return}Y=I}});S.current=B;const j=new Set;for(let U=1;U<k.length;U+=1){const Y=bO(k[U-1],k[U]);Y&&j.add(Y)}j.forEach(U=>B.observe(U,{childList:!0}))}const N=Ce(()=>{const[k,B]=vO(p),j=M(k),U=x.current,Y=!U||U.length!==k.length||k.some((I,H)=>{const _=U[H];return I.index!==_.index||I.element!==_.element||I.registration.index!==_.registration.index||I.registration.metadata!==_.registration.metadata});O(B),x.current=k,v.current=!1,Y&&(m.forEach(I=>I(j)),f(j))});Ee(()=>(!v.current&&x.current&&M(x.current),()=>{i.current=[],r&&(r.current=[])}),[i,r,M]),Ee(()=>{v.current&&N()}),Ee(()=>()=>{S.current?.disconnect(),v.current=!0},[]);const R=Ce(k=>(m.add(k),()=>{m.delete(k)})),D=b.useMemo(()=>({register:w,unregister:C,subscribeMapChange:R,nextIndexRef:h}),[w,C,R,h]);return y.jsx(ax.Provider,{value:D,children:a})}function gO(){return new Map}function yO(){return new Set}function vO(n){const a=new Set,i=[],r=[];n.forEach((f,d)=>{if(!d.isConnected)return;const m=f.index,p={index:m??-1,element:d,registration:f};m===null?r.push(p):m>=0&&(a.add(m),i.push(p))});let c=0;return r.sort((f,d)=>lx(f.element,d.element)),r.forEach(f=>{for(;a.has(c);)c+=1;f.index=c,i.push(f),c+=1}),a.size>0&&i.sort((f,d)=>f.index-d.index),[i,r.map(f=>f.element)]}function bO(n,a){let i=n.parentElement;for(;i&&!i.contains(a);)i=i.parentElement;return i}function xO(n){for(const a of n)for(let i=0;i<a.removedNodes.length;i+=1)if(a.removedNodes[i].isConnected)return!0;return!1}function lx(n,a){return n.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Jp=b.forwardRef(function(a,i){const{cutout:r,...c}=a;let f;if(r){const d=r.getBoundingClientRect();f=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return y.jsx("div",{ref:i,role:"presentation","data-base-ui-inert":"",...c,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});let sb={},ib={},rb="";function Bc(n,a){return ur(n)?n:a}function lb(n,a,i){return/hidden|clip/.test(n.getComputedStyle(Bc(a,i)).overflowY)}function SO(n){if(typeof document>"u")return!1;const a=Qe(n);return xt(a).innerWidth-a.documentElement.clientWidth>0}function TO(n){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const i=Qe(n),r=i.documentElement,c=i.body,f=Bc(r,c),d=f.style.overflowY,m=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",f.style.overflowY="scroll";const p=f.offsetWidth;f.style.overflowY="hidden";const h=f.offsetWidth;return f.style.overflowY=d,r.style.scrollbarGutter=m,p===h}function EO(n){const a=Qe(n),i=a.documentElement,r=a.body,c=Bc(i,r),f={overflowY:c.style.overflowY,overflowX:c.style.overflowX};return Object.assign(c.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(c.style,f)}}function wO(n){const a=Qe(n),i=a.documentElement,r=a.body,c=xt(i);let f=0,d=0,m=!1;const p=ao.create();if(ba&&(c.visualViewport?.scale??1)!==1)return()=>{};function h(){const T=c.getComputedStyle(i),w=c.getComputedStyle(r),O=(T.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=i.scrollTop,d=i.scrollLeft,sb={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY,overflowX:i.style.overflowX},rb=i.style.scrollBehavior,ib={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const N=i.scrollHeight>i.clientHeight,R=i.scrollWidth>i.clientWidth,D=T.overflowY==="scroll"||w.overflowY==="scroll",k=T.overflowX==="scroll"||w.overflowX==="scroll",B=Math.max(0,c.innerWidth-r.clientWidth),j=Math.max(0,c.innerHeight-r.clientHeight),U=parseFloat(w.marginTop)+parseFloat(w.marginBottom),Y=parseFloat(w.marginLeft)+parseFloat(w.marginRight),I=Bc(i,r);if(m=TO(n),m){i.style.scrollbarGutter=O,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(i.style,{scrollbarGutter:O,overflowY:"hidden",overflowX:"hidden"}),(N||D)&&(i.style.overflowY="scroll"),(R||k)&&(i.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:U||j?`calc(100dvh - ${U+j}px)`:"100dvh",width:Y||B?`calc(100vw - ${Y+B}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=f,r.scrollLeft=d,i.setAttribute("data-base-ui-scroll-locked",""),i.style.scrollBehavior="unset"}function v(){Object.assign(i.style,sb),Object.assign(r.style,ib),m||(i.scrollTop=f,i.scrollLeft=d,i.removeAttribute("data-base-ui-scroll-locked"),i.style.scrollBehavior=rb)}function x(){v(),p.request(h)}h();const S=Ie(c,"resize",x);return()=>{p.cancel(),v(),typeof c.removeEventListener=="function"&&S()}}class RO{lockCount=0;restore=null;timeoutLock=mn.create();timeoutUnlock=mn.create();acquire(a){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(a)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(a){if(this.lockCount===0||this.restore!==null)return;const i=Qe(a),r=i.documentElement,c=i.body,f=xt(r);if(lb(f,r,c)){const m=new f.MutationObserver(()=>{lb(f,r,c)||(m.disconnect(),this.restore=null,this.lock(a))}),p={attributes:!0};m.observe(r,p),m.observe(c,p),this.restore=()=>m.disconnect();return}const d=cc||!SO(a);this.restore=d?EO(a):wO(a)}}const OO=new RO;function cx(n=!0,a=null){Ee(()=>{if(n)return OO.acquire(a)},[n,a])}const CO=20;function ux(n,a,i,r){const[c,f]=b.useState(!1);Ee(()=>{if(!n||!a||i==null){f(!1);return}const d=Qe(i).documentElement.clientWidth,m=i.offsetWidth;f(d>0&&m>0&&m>=d-CO)},[n,a,i]),cx(n&&(!a||c),r)}const eh=b.forwardRef(function(a,i){const{anchor:r,positionMethod:c="absolute",className:f,render:d,side:m,align:p,sideOffset:h=0,alignOffset:v=0,collisionBoundary:x="clipping-ancestors",collisionPadding:S=5,arrowPadding:T=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:M=sR,style:O,...N}=a,{store:R}=Ta(),D=mO(),k=Fp(!0),B=R.useState("parent"),j=R.useState("floatingRootContext"),U=R.useState("floatingTreeRoot"),Y=R.useState("mounted"),I=R.useState("open"),H=R.useState("modal"),_=R.useState("openMethod"),V=R.useState("activeTriggerElement"),te=R.useState("transitionStatus"),Q=R.useState("positionerElement"),z=R.useState("instantType"),X=R.useState("adaptiveOrigin"),F=R.useState("lastOpenChangeReason"),W=R.useState("floatingNodeId"),ae=R.useState("floatingParentNodeId"),A=j.useState("domReferenceElement"),G=b.useRef(null),ne=Ec(Q);let Z=r,le=h,se=v,he=p,pe=M;B.type==="context-menu"&&(Z=r??B.context?.anchor,he=he??"start",!m&&he!=="center"&&(se=a.alignOffset??2,le=a.sideOffset??-5));let ge=m,_e=he;B.type==="menu"?(ge=ge??"inline-end",_e=_e??"start",pe=a.collisionAvoidance??Op):B.type==="menubar"&&(ge=ge??(B.context.orientation==="vertical"?"inline-end":"bottom"),_e=_e??"start");const je=B.type==="context-menu",Re=Vp({anchor:Z,floatingRootContext:j,positionMethod:k?"fixed":c,mounted:Y,side:ge,sideOffset:le,align:_e,alignOffset:se,arrowPadding:je?0:T,collisionBoundary:x,collisionPadding:S,sticky:w,nodeId:W,keepMounted:D,disableAnchorTracking:C,collisionAvoidance:pe,shift:je?{crossAxis:!("side"in pe&&pe.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:U,adaptiveOrigin:X});b.useEffect(()=>{function we(Ae){Ae.open&&(Ae.parentNodeId===W&&R.set("hoverEnabled",!1),Ae.nodeId!==W&&Ae.parentNodeId===R.select("floatingParentNodeId")&&R.setOpen(!1,Ke(Zi)))}return U.events.on("menuopenchange",we),()=>{U.events.off("menuopenchange",we)}},[R,U.events,W]),b.useEffect(()=>{if(R.select("floatingParentNodeId")==null)return;function we(Ae){if(Ae.open||Ae.nodeId!==R.select("floatingParentNodeId"))return;const Ze=Ae.reason??Zi;R.setOpen(!1,Ke(Ze))}return U.events.on("menuopenchange",we),()=>{U.events.off("menuopenchange",we)}},[U.events,R]);const be=tn();b.useEffect(()=>{I||be.clear()},[I,be]),b.useEffect(()=>{function we(Ae){if(!(!I||Ae.nodeId!==R.select("floatingParentNodeId")))if(Ae.target&&V&&V!==Ae.target){const Ze=R.select("closeDelay");Ze>0?be.isStarted()||be.start(Ze,()=>{R.setOpen(!1,Ke(Zi))}):R.setOpen(!1,Ke(Zi))}else be.clear()}return U.events.on("itemhover",we),()=>{U.events.off("itemhover",we)}},[U.events,I,V,R,be]),b.useEffect(()=>{const we={open:I,nodeId:W,parentNodeId:ae,reason:R.select("lastOpenChangeReason")};U.events.emit("menuopenchange",we)},[U.events,I,R,W,ae]),Ee(()=>{const we=A,Ae=G.current;if(we&&(G.current=we),Ae&&we&&we!==Ae){R.set("instantType",void 0);const Ze=new AbortController;return ne(()=>{R.set("instantType","trigger-change")},Ze.signal),()=>{Ze.abort()}}},[A,ne,R]);const ke={open:I,side:Re.side,align:Re.align,anchorHidden:Re.anchorHidden,nested:B.type==="menu",instant:z},Le=B.type==="menubar"&&B.context.modal;ux(I&&(Le||H&&F!==At),_==="touch",Q,V);const Se=Gp(a,ke,{styles:Re.positionerStyles,transitionStatus:te,props:N,refs:[i,R.useStateSetter("positionerElement")],hidden:!Y,inert:!I}),Ue=Y&&B.type!=="menu"&&(B.type!=="menubar"&&H&&F!==At||B.type==="menubar"&&B.context.modal);let Te=null;return B.type==="menubar"?Te=B.context.contentElement:B.type===void 0&&(Te=V),y.jsxs(J0.Provider,{value:Re,children:[Ue&&y.jsx(Jp,{ref:B.type==="context-menu"||B.type==="nested-context-menu"?B.context.internalBackdropRef:null,inert:Lc(!I),cutout:Te}),y.jsx(O0,{id:W,children:y.jsx(rx,{elementsRef:R.context.itemDomElements,labelsRef:R.context.itemLabels,children:Se})})]})}),AO=b.createContext(null);function fx(n){return b.useContext(AO)}function MO(n){const a=b.useRef(""),i=b.useCallback(c=>{c.defaultPrevented||(a.current=c.pointerType,n(c,c.pointerType))},[n]);return{onClick:b.useCallback(c=>{if(c.detail===0){n(c,"keyboard");return}"pointerType"in c?n(c,c.pointerType):n(c,a.current),a.current=""},[n]),onPointerDown:i}}function NO(n,a){const i=b.useRef(n),r=Ce(a);Ee(()=>{i.current!==n&&r(i.current),i.current=n},[n,r])}function dx(n,a){const i=Ce((f,d)=>{(typeof n=="function"?n():n)||a(d||(cc?"touch":""))}),{onClick:r,onPointerDown:c}=MO(i);return b.useMemo(()=>({onClick:r,onPointerDown:c}),[r,c])}function DO(n){const[a,i]=b.useState(null),r=dx(n,i);return NO(n,c=>{c&&!n&&i(null)}),b.useMemo(()=>({openMethod:a,triggerProps:r}),[a,r])}const _O={..._c,disabled:n=>n.parent.type==="menubar"&&n.parent.context.disabled||n.disabled,modal:n=>(n.parent.type===void 0||n.parent.type==="context-menu")&&(n.modal??!0),openMethod:n=>n.openMethod,allowMouseEnter:n=>n.allowMouseEnter,highlightItemOnHover:n=>n.highlightItemOnHover,parent:n=>n.parent,rootId:n=>n.parent.type==="menu"?n.parent.store.select("rootId"):n.parent.type!==void 0?n.parent.context.rootId:n.rootId,activeIndex:n=>n.activeIndex,isActive:(n,a)=>n.activeIndex===a,hoverEnabled:n=>n.hoverEnabled,instantType:n=>n.instantType,lastOpenChangeReason:n=>n.openChangeReason,floatingTreeRoot:n=>n.parent.type==="menu"?n.parent.store.select("floatingTreeRoot"):n.floatingTreeRoot,floatingNodeId:n=>n.floatingNodeId,floatingParentNodeId:n=>n.floatingParentNodeId,itemProps:n=>n.itemProps,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin,keyboardEventRelay:n=>{if(n.keyboardEventRelay)return n.keyboardEventRelay;if(n.parent.type==="menu")return n.parent.store.select("keyboardEventRelay")}};class zO extends Ws{constructor(a,i,r=!1){const c=new Nc,f=jO(c,i,r,a);super(f,kO(c),_O),this.unsubscribeParentListener=this.observe("parent",d=>{if(this.unsubscribeParentListener?.(),d.type==="menu"){let m=d.store.select("rootId"),p=d.store.select("floatingTreeRoot"),h=d.store.select("keyboardEventRelay");this.unsubscribeParentListener=d.store.subscribe(()=>{const v=d.store.select("rootId"),x=d.store.select("floatingTreeRoot"),S=d.store.select("keyboardEventRelay");m===v&&p===x&&h===S||(m=v,p=x,h=S,this.notifyAll())}),this.context.allowMouseUpTriggerRef=d.store.context.allowMouseUpTriggerRef;return}d.type!==void 0&&(this.context.allowMouseUpTriggerRef=d.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(a,i){this.state.floatingRootContext.context.events.emit("setOpen",{open:a,eventDetails:i})}unsubscribeParentListener=null}function kO(n){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:n}}function jO(n,a,i=!1,r){return{...Dc(n,a,i),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ap,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:wt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const px=b.createContext(void 0);function hx(){return b.useContext(px)}const th=cr(function(a){const{children:i,open:r,onOpenChange:c,onOpenChangeComplete:f,defaultOpen:d=!1,disabled:m=!1,modal:p,loopFocus:h=!0,orientation:v="vertical",actionsRef:x,closeParentOnEsc:S=!1,handle:T,triggerId:w,defaultTriggerId:C=null,highlightItemOnHover:M=!0}=a,O=Fp(!0),N=Ta(!0),R=fx(!0),D=hx(),k=b.useMemo(()=>D&&N?{type:"menu",store:N.store}:R?{type:"menubar",context:R}:O&&!N?{type:"context-menu",context:O}:{type:void 0},[O,N,R,D]),B=Wa(),j=Wa(),U=Ja(),Y=k.type==="menu"?k.store:void 0,I=(r??d)&&Y?.state.transitionStatus==="starting",H=en(()=>I?Y?.state.instantType:void 0).current,_=HO({open:d,openProp:r,activeTriggerId:C,triggerIdProp:w,parent:k,disabled:m,highlightItemOnHover:M,modal:k.type===void 0?p:void 0,rootId:B,instantType:H},j,U!=null);_.useControlledProp("openProp",r),_.useControlledProp("triggerIdProp",w),_.useContextCallback("onOpenChangeComplete",f);const V=_.useState("floatingTreeRoot"),te=Mp(V),Q=_.useState("open"),z=_.useState("activeTriggerElement"),X=_.useState("positionerElement"),F=_.useState("hoverEnabled"),W=_.useState("disabled"),ae=_.useState("lastOpenChangeReason"),A=_.useState("parent"),G=_.useState("activeIndex"),ne=_.useState("payload"),Z=_.useState("floatingParentNodeId"),le=b.useRef(null),se=b.useRef(A.type!=="context-menu"),he=tn(),pe=b.useRef(!0),ge=tn(),_e=Z!=null,{openMethod:je,triggerProps:Re}=DO(Q);_.useSyncedValues({disabled:m,highlightItemOnHover:M,modal:A.type===void 0?p:void 0,openMethod:je,rootId:B}),Cc(_);const{forceUnmount:be,transitionStatus:ke}=Ac(Q,_,()=>{_.set("allowMouseEnter",!1)},I),Le=Ec(_.context.popupRef);b.useEffect(()=>{if(H===void 0)return;const xe=()=>{_.state.instantType===H&&_.set("instantType",void 0)};if(!Q){xe();return}if(ke!==void 0)return;if(_.context.popupRef.current==null){xe();return}const qe=new AbortController;return Le(xe,qe.signal),()=>{qe.abort()}},[H,Q,ke,Le,_]),Ee(()=>{O&&!N?_.update({parent:{type:"context-menu",context:O},floatingNodeId:te,floatingParentNodeId:U}):N&&_.update({floatingNodeId:te,floatingParentNodeId:U})},[O,N,te,U,_]),b.useEffect(()=>{if(Q||(le.current=null),A.type==="context-menu"){if(!Q){he.clear(),se.current=!1;return}he.start(500,()=>{se.current=!0})}},[he,Q,A.type]),Ee(()=>{!Q&&!F&&_.set("hoverEnabled",!0)},[Q,F,_]);const Ge=Ce((xe,qe)=>{const ot=qe.reason;if(!xe&&!_.select("open")||Q===xe&&qe.trigger===z&&ae===ot)return;const mt=Hp(qe);if(!xe&&qe.trigger==null&&(qe.trigger=z??void 0),c?.(xe,qe),qe.isCanceled)return;_.state.floatingRootContext.dispatchOpenChange(xe,qe);const On=qe.event;if(xe===!1&&On?.type==="click"&&On.pointerType==="touch"&&!pe.current)return;xe&&ot===Gs?(pe.current=!1,ge.start(300,()=>{pe.current=!0})):(pe.current=!0,ge.clear());const qn=(ot===ko||ot===Kb)&&On.detail===0,Cn=!xe&&(ot===fr||ot==null);le.current=qe.event;const _t=Oc(_.state,xe,qe.trigger,mt());_t.openChangeReason=ot,A.type==="menubar"&&(ot===Gs||ot===Qa||ot===At||ot===Fl||ot===Zi)?_t.instantType="group":qn||Cn?_t.instantType=qn?"click":"dismiss":_t.instantType=void 0,_.update(_t)}),Se=U0({popupStore:_,floatingRootContext:_.state.floatingRootContext,floatingId:j,nested:U!=null,onOpenChange:Ge}),Ue=Se.context.events;Ee(()=>{const xe=({open:qe,eventDetails:ot})=>Ge(qe,ot);return Ue.on("setOpen",xe),()=>{Ue?.off("setOpen",xe)}},[Ue,Ge]);const Te=b.useCallback(()=>{_.setOpen(!1,Ke(bc))},[_]);b.useImperativeHandle(x,()=>({unmount:be,close:Te}),[be,Te]);let we;A.type==="context-menu"&&(we=A.context),b.useImperativeHandle(we?.positionerRef,()=>X,[X]),b.useImperativeHandle(we?.actionsRef,()=>({setOpen:Ge}),[Ge]);const Ae=Sc(Se,{enabled:!W,bubbles:{escapeKey:S&&A.type==="menu"},outsidePress(){return A.type!=="context-menu"||le.current?.type==="contextmenu"?!0:se.current},externalTree:_e?V:void 0}),Ze=qp(),Me=b.useCallback(xe=>{_.select("activeIndex")!==xe&&_.set("activeIndex",xe)},[_]),fe=x2(Se,{enabled:!W,listRef:_.context.itemDomElements,activeIndex:G,nested:A.type!==void 0,loopFocus:h,orientation:v,parentOrientation:A.type==="menubar"?A.context.orientation:void 0,rtl:Ze==="rtl",disabledIndices:_o,onNavigate:Me,openOnArrowKeyDown:A.type!=="context-menu",externalTree:_e?V:void 0,focusItemOnHover:M}),ye=b.useCallback(xe=>{_.context.typingRef.current=xe},[_]),de=S2(Se,{enabled:!W,listRef:_.context.itemLabels,elementsRef:_.context.itemDomElements,activeIndex:G,resetMs:Jw,onMatch:xe=>{Q&&xe!==G&&_.set("activeIndex",xe)},onTyping:ye}),ie=b.useMemo(()=>{const xe=No(de.reference,fe.reference,Ae.reference,{onMouseMove(){_.set("allowMouseEnter",!0)}},Re);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=Q,xe},[_,de.reference,fe.reference,Ae.reference,Re,Q]),ve=b.useMemo(()=>{const xe=No(fe.trigger,Ae.trigger,Re);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=!1,xe},[fe.trigger,Ae.trigger,Re]);en(()=>(_.update({inactiveTriggerProps:ve}),null));const Be=b.useMemo(()=>No(wc,{id:j,role:"menu","aria-orientation":v==="horizontal"?"horizontal":void 0,"aria-labelledby":z?.id,onMouseMove(){_.set("allowMouseEnter",!0),A.type==="menu"&&_.set("hoverEnabled",!1)},onClick(){_.select("hoverEnabled")&&_.set("hoverEnabled",!1)},onKeyDown(xe){const qe=_.select("keyboardEventRelay");qe&&!xe.isPropagationStopped()&&qe(xe)}},de.floating,fe.floating,Ae.floating),[z,j,v,A.type,_,de.floating,fe.floating,Ae.floating]),Yt=fe.item??wt;Mc(_,{floatingRootContext:Se,activeTriggerProps:ie,inactiveTriggerProps:ve,popupProps:Be,itemProps:Yt});const an=b.useMemo(()=>({store:_,parent:k}),[_,k]),Rt=y.jsxs(ex.Provider,{value:an,children:[T&&y.jsx(Rc,{handle:T,store:_}),typeof i=="function"?i({payload:ne}):i]});return A.type===void 0||A.type==="context-menu"?y.jsx(C0,{externalTree:V,children:Rt}):Rt});function HO(n,a,i){return en(()=>new zO(n,a,i)).current}function LO(n){const a=Ta().store,i=b.useMemo(()=>({parentMenu:a}),[a]);return y.jsx(px.Provider,{value:i,children:y.jsx(th,{...n})})}const Pl=5;function UO(n,a){const i=BO(a);return n.clientX>=i.left-Pl&&n.clientX<=i.right+Pl&&n.clientY>=i.top-Pl&&n.clientY<=i.bottom+Pl}function BO(n){const a=n.getBoundingClientRect(),i=xt(n);if(rp)return a;const r=i.getComputedStyle(n,"::before"),c=i.getComputedStyle(n,"::after");if(!(r.content!=="none"||c.content!=="none"))return a;const d=parseFloat(r.width)||0,m=parseFloat(r.height)||0,p=parseFloat(c.width)||0,h=parseFloat(c.height)||0,v=Math.max(a.width,d,p),x=Math.max(a.height,m,h),S=v-a.width,T=x-a.height;return{left:a.left-S/2,right:a.right+S/2,top:a.top-T/2,bottom:a.bottom+T/2}}function PO(n={}){const{highlightItemOnHover:a,highlightedIndex:i,onHighlightedIndexChange:r}=Kp(),{ref:c,index:f}=Qp(n),d=i===f,m=b.useRef(null),p=Za(c,m);return{compositeProps:{tabIndex:d?0:-1,onFocus(){r(f)},onMouseMove(){const v=m.current;if(!a||!v)return;const x=v.hasAttribute("disabled")||v.ariaDisabled==="true";!d&&!x&&v.focus()}},compositeRef:p,index:f}}function mx(n){const{render:a,className:i,style:r,state:c=wt,props:f=_o,refs:d=_o,metadata:m,stateAttributesMapping:p,tag:h="div",...v}=n,{compositeProps:x,compositeRef:S}=PO({metadata:m});return yt(h,n,{state:c,ref:[S,...d],props:[x,...f,v],stateAttributesMapping:p})}function gx(n){if(ut(n)&&n.hasAttribute("data-rootownerid"))return n.getAttribute("data-rootownerid");if(!Co(n))return gx(zo(n))}function yx(n,a){const i=b.useRef(null);function r(f){Yn.flushSync(()=>{n.setOpen(!1,Ke(Qa,f.nativeEvent,f.currentTarget))}),kw(i.current)?.focus()}function c(f){const d=n.select("positionerElement");if(d&&Fs(f,d))n.context.beforeContentFocusGuardRef.current?.focus();else{Yn.flushSync(()=>{n.setOpen(!1,Ke(Qa,f.nativeEvent,f.currentTarget))});let m=zw(n.context.triggerFocusTargetRef.current||a.current);for(;m!==null&&De(d,m);){const p=m;if(m=Tp(m),m===p)break}m?.focus()}}return{preFocusGuardRef:i,handlePreFocusGuardFocus:r,handleFocusTargetFocus:c}}function IO(n){const{enabled:a=!0,mouseDownAction:i,open:r}=n,c=b.useRef(!1);return b.useMemo(()=>a?{onMouseDown:f=>{(i==="open"&&!r||i==="close"&&r)&&(c.current=!0,Qe(f.currentTarget).addEventListener("click",()=>{c.current=!1},{once:!0}))},onClick:f=>{c.current&&(c.current=!1,f.preventBaseUIHandler())}}:wt,[a,i,r])}const vx=ap(function(a,i){const{render:r,className:c,style:f,disabled:d=!1,nativeButton:m=!0,id:p,openOnHover:h,delay:v=100,closeDelay:x=0,handle:S,payload:T,...w}=a,C=Ta(!0),O=Bp(S)??C?.store;if(!O)throw new Error(Bt(85));const N=Sa(p),R=O.useState("isTriggerActive",N),D=O.useState("floatingRootContext"),k=O.useState("isOpenedByTrigger",N),B=O.useState("triggerPopupId",N),j=b.useRef(null),U=qO(),Y=Kp(!0),I=xa(),H=b.useMemo(()=>I??new Ap,[I]),_=Mp(H),V=Ja(),{registerTrigger:te,isMountedByThisTrigger:Q}=Lp(N,j,O,{payload:T,closeDelay:x,parent:U,floatingTreeRoot:H,floatingNodeId:_,floatingParentNodeId:V,keyboardEventRelay:Y?.relayKeyboardEvent}),z=U.type==="menubar",X=O.useState("disabled"),F=d||X||z&&U.context.disabled,{getButtonProps:W,buttonRef:ae}=ei({disabled:F,native:m});b.useEffect(()=>{!k&&U.type===void 0&&(O.context.allowMouseUpTriggerRef.current=!1)},[O,k,U.type]);const A=b.useRef(null),G=tn(),ne=Ce(we=>{if(!A.current)return;G.clear(),O.context.allowMouseUpTriggerRef.current=!1;const Ae=we.target;De(A.current,Ae)||De(O.select("positionerElement"),Ae)||Ae===A.current||Ae!=null&&gx(Ae)===O.select("rootId")||UO(we,A.current)||H.events.emit("close",{domEvent:we,reason:sw})});b.useEffect(()=>{k&&O.select("lastOpenChangeReason")===At&&Qe(A.current).addEventListener("mouseup",ne,{once:!0})},[k,ne,O]);const Z=z&&U.context.hasSubmenuOpen,se=zc(D,{enabled:(h??Z)&&!F&&(!z||Z&&!Q),handleClose:jc({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:U.type===void 0?v:void 0,delay:{close:x},triggerElementRef:j,externalTree:H,isActiveTrigger:R,isClosing:()=>O.select("transitionStatus")==="ending"}),he=YO(k,O.select("lastOpenChangeReason")),pe=_p(D,{enabled:!F,event:k&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:U.type===void 0?he:!1}),ge=q0(D,{enabled:!F&&Z}),_e=IO({open:k,enabled:z,mouseDownAction:"open"}),je=b.useMemo(()=>No(ge.reference,pe.reference),[ge.reference,pe.reference]),Re=O.useState("triggerProps",Q),{preFocusGuardRef:be,handlePreFocusGuardFocus:ke,handleFocusTargetFocus:Le}=yx(O,j),Ge={disabled:F,open:k},Se=[A,i,ae,te,j],Ue=[je,se??wt,Re,{"aria-haspopup":"menu","aria-controls":B,id:N,onMouseDown:we=>{if(O.select("open"))return;G.start(200,()=>{O.context.allowMouseUpTriggerRef.current=!0}),Qe(we.currentTarget).addEventListener("mouseup",ne,{once:!0})}},z?{role:"menuitem"}:{},_e,w,W],Te=yt("button",a,{enabled:!z,stateAttributesMapping:Ud,state:Ge,ref:Se,props:Ue});return z?y.jsx(mx,{tag:"button",render:r,className:c,style:f,state:Ge,refs:Se,props:Ue,stateAttributesMapping:Ud}):k?y.jsxs(b.Fragment,{children:[y.jsx(jo,{ref:be,onFocus:ke},`${N}-pre-focus-guard`),y.jsx(b.Fragment,{children:Te},N),y.jsx(jo,{ref:O.context.triggerFocusTargetRef,onFocus:Le},`${N}-post-focus-guard`)]}):y.jsx(b.Fragment,{children:Te},N)});function YO(n,a){const i=tn(),[r,c]=b.useState(!1);return Ee(()=>{n&&a===At?(c(!0),i.start(v0,()=>{c(!1)})):n||(i.clear(),c(!1))},[n,a,i]),r}function qO(){const n=fx();return b.useMemo(()=>n?{type:"menubar",context:n}:{type:void 0},[n])}const VO=b.forwardRef(function(a,i){const{className:r,render:c,orientation:f="horizontal",style:d,...m}=a;return yt("div",a,{state:{orientation:f},ref:i,props:[{role:"separator","aria-orientation":f},m]})});function GO(n){return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const XO={"aria-expanded":void 0},FO=b.forwardRef(function(a,i){const{render:r,className:c,style:f,label:d,id:m,nativeButton:p=!1,openOnHover:h=!0,delay:v=100,closeDelay:x=0,disabled:S=!1,...T}=a,w=hx();if(!w?.parentMenu)throw new Error(Bt(37));const C=Qp({guess:!0,label:d}),M=Xp(),{store:O}=Ta(),N=Sa(m),R=O.useState("open"),D=O.useState("floatingRootContext"),k=O.useState("floatingTreeRoot"),B=O.useState("triggerPopupId",N),j=P0(N,O),U=Ce(je=>{j(je),je!==null&&O.select("open")&&O.select("activeTriggerId")==null&&O.update({activeTriggerId:N??null,activeTriggerElement:je,closeDelay:x})}),Y=b.useRef(null),I=b.useCallback(je=>{Y.current=je,O.set("activeTriggerElement",je)},[O]);Ee(()=>(U(Y.current),()=>U(null)),[U,N,O]),O.useSyncedValue("closeDelay",x);const H=w.parentMenu,_=O.useState("disabled"),V=H.useState("disabled"),te=S||_||V,Q=H.useState("itemProps"),z=H.useState("isActive",C.index),X=b.useMemo(()=>({type:"submenu-trigger",setActive(){H.select("highlightItemOnHover")&&H.set("activeIndex",C.index)}}),[H,C.index]),{getItemProps:F,itemRef:W}=ox({closeOnClick:!1,disabled:te,highlighted:z,id:N,store:O,typingRef:H.context.typingRef,nativeButton:p,itemMetadata:X,nodeId:M?.context.nodeId}),ae=O.useState("hoverEnabled"),A=zc(D,{enabled:ae&&h&&!te,handleClose:jc({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:v,delay:{open:v,close:x},shouldOpen:v>0?()=>H.select("allowMouseEnter"):void 0,triggerElementRef:Y,externalTree:k,isClosing:()=>O.select("transitionStatus")==="ending",guardStaleOpen:!0}),ne=_p(D,{enabled:!te,event:"mousedown",toggle:!h,ignoreMouse:h,stickIfOpen:!1}).reference??wt,Z=O.useState("triggerProps",!0);delete Z.id;const le={disabled:te,highlighted:z,open:R},se=O.useState("openMethod"),pe=O.useState("lastOpenChangeReason")===Fl||se==="keyboard";return yt("div",a,{state:le,stateAttributesMapping:mp,props:[ne,A,Z,Q,R&&pe&&Ib?XO:void 0,{"aria-controls":B,tabIndex:R||z?0:-1,onBlur(){z&&H.set("activeIndex",null)}},T,F],ref:[i,C.ref,W,U,I]})});const KO=n=>n?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function QO(n,a,i=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:KO(n),size:24,node:a,...i.length>0?{aliases:i}:{}}}const ZO=n=>{let a="",i=!1;for(const r of n){if(r==="-"||r==="_"||r<=" "){i=a.length>0;continue}a.length===0?a+=r.toLowerCase():a+=i?r.toUpperCase():r,i=!1}return a};const WO=n=>{const a=ZO(n);return a.charAt(0).toUpperCase()+a.slice(1)};const Jd=(...n)=>n.filter((a,i,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===i).join(" ").trim();const qa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function wd(n){return n!=null}function $O(n,a={}){const i=a.attributeNames??{},r=S=>i[S]??S,c=n.size??n.width??qa.width,f=n.size??n.height??qa.height,d=n.aliases?.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`)??[],m=[...n.name?[`lucide-${n.name}`]:[],...d],p=a.className?.split(" ").filter(Boolean)??[],h=a.includeDefaultClasses===!1?Jd(...p):Jd("lucide",...m,...p),v=a.absoluteStrokeWidth?Number(a.strokeWidth??qa["stroke-width"])*Number(n.size??n.width??qa.width)/Number(a.size??a.width??qa.width):a.strokeWidth??qa["stroke-width"];return["svg",{...Object.entries(qa).reduce((S,[T,w])=>(S[r(T)]=w,S),{}),..."color"in a&&a.color&&{[r("stroke")]:a.color},..."size"in a&&wd(a.size)&&{[r("width")]:a.size,[r("height")]:a.size},..."width"in a&&wd(a.width)&&{[r("width")]:a.width},..."height"in a&&wd(a.height)&&{[r("height")]:a.height},[r("stroke-width")]:v,...h&&{[r("class")]:h},[r("viewBox")]:`0 0 ${c} ${f}`,...a.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},n.node.map(S=>{const[T,w,C]=S,M=a.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[T,M,C]:[T,M]})]}function JO(n,a={}){return $O(n,{...a,attributeNames:{...a.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const eC=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},tC=b.createContext({}),nC=()=>b.useContext(tC),oC=b.forwardRef(({color:n,size:a,width:i,height:r,strokeWidth:c,absoluteStrokeWidth:f,nonScalingStroke:d,className:m="",children:p,iconNode:h=[],icon:v={node:h,aliases:[],size:24},...x},S)=>{const{size:T=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:M=!1,color:O="currentColor",className:N=""}=nC()??{},R=!!p||eC(x),[D,k,B=[]]=JO(v,{color:n??O,width:i??a??T,height:r??a??T,strokeWidth:c??w,absoluteStrokeWidth:f??C,nonScalingStroke:d??M,className:Jd(N,m),hasA11yProp:R,attributes:x});return b.createElement(D,{ref:S,...k},[...B.map(([j,U])=>b.createElement(j,U)),...Array.isArray(p)?p:[p]])});function Ye(n,a=[],i=[]){const r=typeof n=="string"?QO(n,a,i):n,c=b.forwardRef(({className:f,...d},m)=>b.createElement(oC,{ref:m,icon:r,className:f,...d}));return r.name&&(c.displayName=WO(r.name)),c}const bx={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};bx.node;const nh=Ye(bx);const xx={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};xx.node;const Pc=Ye(xx);const Sx={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Sx.node;const Tx=Ye(Sx);const Ex={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Ex.node;const aC=Ye(Ex);const wx={name:"cloud-alert",size:24,node:[["path",{d:"M12 12v4",key:"tww15h"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.128 16.949A7 7 0 1 1 15.71 8h1.79a1 1 0 0 1 0 9h-1.642",key:"1namsd"}]]};wx.node;const sC=Ye(wx);const Rx={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};Rx.node;const Ox=Ye(Rx);const Cx={name:"copy",size:24,node:[["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"}]]};Cx.node;const nc=Ye(Cx);const Ax={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};Ax.node;const iC=Ye(Ax);const Mx={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};Mx.node;const Nx=Ye(Mx);const Dx={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};Dx.node;const rC=Ye(Dx);const _x={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};_x.node;const lC=Ye(_x);const zx={name:"eye",size:24,node:[["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"}]]};zx.node;const cC=Ye(zx);const kx={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};kx.node;const uC=Ye(kx);const jx={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};jx.node;const fC=Ye(jx);const Hx={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};Hx.node;const Lx=Ye(Hx);const Ux={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};Ux.node;const dC=Ye(Ux);const Bx={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};Bx.node;const Px=Ye(Bx);const Ix={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};Ix.node;const Yx=Ye(Ix);const qx={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};qx.node;const pC=Ye(qx);const Vx={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Vx.node;const oh=Ye(Vx);const Gx={name:"lock",size:24,node:[["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"}]]};Gx.node;const ah=Ye(Gx);const Xx={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};Xx.node;const sh=Ye(Xx);const Fx={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};Fx.node;const ih=Ye(Fx);const Kx={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};Kx.node;const hC=Ye(Kx);const Qx={name:"pencil",size:24,node:[["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"}]]};Qx.node;const rh=Ye(Qx);const Zx={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};Zx.node;const mC=Ye(Zx);const Wx={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};Wx.node;const gC=Ye(Wx);const $x={name:"play",size:24,node:[["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"}]]};$x.node;const yC=Ye($x);const Jx={name:"presentation",size:24,node:[["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"}]]};Jx.node;const vC=Ye(Jx);const eS={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};eS.node;const bC=Ye(eS);const tS={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};tS.node;const xC=Ye(tS);const nS={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};nS.node;const oS=Ye(nS);const aS={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};aS.node;const SC=Ye(aS);const sS={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};sS.node;const TC=Ye(sS);const iS={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};iS.node;const EC=Ye(iS);const rS={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};rS.node;const wC=Ye(rS);const lS={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};lS.node;const RC=Ye(lS);const cS={name:"share",size:24,node:[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]]};cS.node;const OC=Ye(cS);const uS={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};uS.node;const fS=Ye(uS);const dS={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};dS.node;const lh=Ye(dS);const pS={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};pS.node;const CC=Ye(pS);const hS={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};hS.node;const cb=Ye(hS);const mS={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};mS.node;const AC=Ye(mS);const gS={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};gS.node;const pr=Ye(gS),yS="rounded-lg bg-surface p-1 text-[13px] text-fg shadow-popup outline-none origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0",vS="flex h-7 min-w-40 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover data-[disabled]:opacity-40";function bS({trigger:n,children:a,side:i="bottom",align:r="start",open:c,onOpenChange:f}){return y.jsxs(th,{open:c,onOpenChange:f?d=>f(d):void 0,children:[y.jsx(vx,{render:n,onKeyDown:ir}),y.jsx($p,{children:y.jsx(eh,{side:i,align:r,sideOffset:6,className:"z-[1000]",children:y.jsx(Wp,{className:yS,children:a})})})]})}function Wt({children:n,onSelect:a,icon:i,shortcut:r,disabled:c,danger:f}){return y.jsxs(sx,{className:Mt(vS,f&&"text-danger"),disabled:c,onClick:a,onKeyDown:ir,children:[y.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:i}),y.jsx("span",{className:"flex-1",children:n}),r?y.jsx("span",{className:"ml-4 text-xs text-fg-subtle",children:r}):null]})}function Va(){return y.jsx(VO,{className:"mx-1 my-1 h-px bg-line"})}function oc({children:n}){return y.jsx("div",{className:"px-2 py-1 text-xs text-fg-subtle",children:n})}function ub({label:n,icon:a,children:i}){return y.jsxs(LO,{children:[y.jsxs(FO,{className:vS,onKeyDown:ir,children:[y.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:a}),y.jsx("span",{className:"flex-1",children:n}),y.jsx(Tx,{className:"size-3.5 text-fg-subtle"})]}),y.jsx($p,{children:y.jsx(eh,{sideOffset:4,className:"z-[1000]",children:y.jsx(Wp,{className:yS,children:i})})})]})}const xS=b.createContext(void 0);function es(n){const a=b.useContext(xS);if(!n&&a===void 0)throw new Error(Bt(27));return a}const MC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,forceRender:d=!1,...m}=a,p=es(),h=p.useState("open"),v=p.useState("nested"),x=p.useState("mounted"),S=p.useState("transitionStatus");return yt("div",a,{state:{open:h,transitionStatus:S},ref:[p.context.backdropRef,i],stateAttributesMapping:gc,props:[{role:"presentation",hidden:!x,style:{userSelect:"none",WebkitUserSelect:"none"}},m],enabled:d||!v})}),NC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,disabled:d=!1,nativeButton:m=!0,...p}=a,h=es(),v=h.useState("open"),{getButtonProps:x,buttonRef:S}=ei({disabled:d,native:m}),T={disabled:d};function w(C){v&&h.setOpen(!1,Ke(Qb,C.nativeEvent))}return yt("button",a,{state:T,ref:[i,S],props:[{onClick:w},p,x]})}),DC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,...m}=a,p=es(),h=Sa(d);return p.useSyncedValueWithCleanup("descriptionElementId",h),yt("p",a,{ref:i,props:[{id:h},m]})}),SS=b.createContext(void 0);function _C(){const n=b.useContext(SS);if(n===void 0)throw new Error(Bt(26));return n}const zC="--nested-dialogs",kC="data-nested-dialog-open",jC={...mc,...hp,nestedDialogOpen(n){return n?{[kC]:""}:null}},HC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,finalFocus:d,initialFocus:m,...p}=a,h=es(),v=h.useState("descriptionElementId"),x=h.useState("disablePointerDismissal"),S=h.useState("floatingRootContext"),T=h.useState("popupProps"),w=h.useState("modal"),C=h.useState("mounted"),M=h.useState("nested"),O=h.useState("nestedOpenDialogCount"),N=h.useState("open"),R=h.useState("openMethod"),D=h.useState("titleElementId"),k=h.useState("transitionStatus"),B=h.useState("role"),j=S.useState("floatingId");_C(),$s({open:N,ref:h.context.popupRef,onComplete(){N&&h.context.onOpenChangeComplete?.(!0)}});const U=m===void 0?B0(h.context.popupRef):m,Y=O>0,I=h.useStateSetter("popupElement"),_=yt("div",a,{state:{open:N,nested:M,transitionStatus:k,nestedDialogOpen:Y},props:[T,{id:j,"aria-labelledby":D,"aria-describedby":v,role:B,...wc,hidden:!C,onKeyDown(V){Uc.has(V.key)&&V.stopPropagation()},style:{[zC]:O}},p],ref:[i,h.context.popupRef,I],stateAttributesMapping:jC});return y.jsx(Dp,{context:S,openInteractionType:R,disabled:!C,closeOnFocusOut:!x,initialFocus:U,returnFocus:d,modal:w!==!1,restoreFocus:"popup",children:_})}),LC=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a,f=es(),d=f.useState("mounted"),m=f.useState("modal"),p=f.useState("open");return d||r?y.jsx(SS.Provider,{value:r,children:y.jsxs(Cp,{ref:i,...c,children:[d&&m===!0&&y.jsx(Jp,{ref:f.context.internalBackdropRef,inert:Lc(!p)}),a.children]})}):null});function UC({store:n,parentContext:a,isDrawer:i}){const r=n.useState("open"),c=n.useState("disablePointerDismissal"),f=n.useState("modal"),d=n.useState("popupElement"),m=n.useState("floatingRootContext"),[p,h]=b.useState(0),[v,x]=b.useState(0),S=p===0,T=Sc(m,{outsidePressEvent(){return n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:f==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(w){if(!n.context.outsidePressEnabledRef.current||"button"in w&&w.button!==0)return!1;if("touches"in w){if(w.type==="touchend"){if(w.changedTouches.length!==1||w.touches.length!==0)return!1}else if(w.touches.length!==1)return!1}const C=Tt(w);if(S&&!c){if(f){const M=n.context.internalBackdropRef.current,O=n.context.backdropRef.current;return M||O?M===C||O===C||De(C,d)&&!C?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return cx(r&&f===!0,d),n.useContextCallback("onNestedDialogOpen",(w,C)=>{h(w),x(C)}),Ee(()=>(a?.onNestedDialogOpen&&(r?a.onNestedDialogOpen(p+1,v+(i?1:0)):a.onNestedDialogOpen(0,0)),()=>{a?.onNestedDialogOpen&&r&&a.onNestedDialogOpen(0,0)}),[i,r,p,v,a]),Mc(n,{activeTriggerProps:T.reference,inactiveTriggerProps:T.trigger,popupProps:T.floating,nestedOpenDialogCount:p,nestedOpenDrawerCount:v}),null}const BC={..._c,modal:n=>n.modal,nested:n=>n.nested,nestedOpenDialogCount:n=>n.nestedOpenDialogCount,nestedOpenDrawerCount:n=>n.nestedOpenDrawerCount,disablePointerDismissal:n=>n.disablePointerDismissal,openMethod:n=>n.openMethod,descriptionElementId:n=>n.descriptionElementId,titleElementId:n=>n.titleElementId,viewportElement:n=>n.viewportElement,role:n=>n.role};class PC extends Ws{constructor(a,i,r){const c=new Nc,f=IC(a,c,i,r);super(f,YC(c),BC)}setOpen=(a,i)=>{i.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!a&&i.trigger==null&&this.state.activeTriggerId!=null&&(i.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(a,i),!i.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(a,i),this.update(Oc(this.state,a,i.trigger)))}}function IC(n,a,i,r=!1){return{...Dc(a,i,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...n}}function YC(n){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0}}function qC(n,a){const{children:i,open:r,defaultOpen:c=!1,onOpenChange:f,onOpenChangeComplete:d,disablePointerDismissal:m=!1,modal:p=!0,actionsRef:h,handle:v,triggerId:x,defaultTriggerId:S=null}=a,T=n==="drawer",w=p,C=m,M="dialog",O=es(!0),N=O!=null,R={modal:w,disablePointerDismissal:C,nested:N,role:M},D=jp((I,H)=>new PC({open:c,openProp:r,activeTriggerId:S,triggerIdProp:x,...R},I,H),!0);D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",x),D.useSyncedValues(R),D.useContextCallback("onOpenChange",f),D.useContextCallback("onOpenChangeComplete",d);const k=D.useState("open"),B=D.useState("mounted"),j=D.useState("payload");I0(D,k),Cc(D);const{forceUnmount:U}=Ac(k,D);b.useImperativeHandle(h,()=>({unmount:U,close:()=>D.setOpen(!1,Ke(bc))}),[U,D]);const Y=k||B;return y.jsxs(xS.Provider,{value:D,children:[v&&y.jsx(Rc,{handle:v,store:D}),Y&&y.jsx(UC,{store:D,parentContext:O?.context,isDrawer:T}),typeof i=="function"?i({payload:j}):i]})}const VC=cr(function(a){return qC("dialog",a)}),GC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,...m}=a,p=es(),h=Sa(d);return p.useSyncedValueWithCleanup("titleElementId",h),yt("h2",a,{ref:i,props:[{id:h},m]})}),TS=b.createContext(void 0);function ti(n){const a=b.useContext(TS);if(a===void 0&&!n)throw new Error(Bt(47));return a}const XC={..._c,disabled:n=>n.disabled,instantType:n=>n.instantType,openMethod:n=>n.openMethod,openChangeReason:n=>n.openChangeReason,modal:n=>n.modal,focusManagerModal:n=>n.focusManagerModal,stickIfOpen:n=>n.stickIfOpen,titleElementId:n=>n.titleElementId,descriptionElementId:n=>n.descriptionElementId,openOnHover:n=>n.openOnHover,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin};class FC extends Ws{constructor(a,i,r){const c=new Nc;super(KC(a,c,i,r),QC(c),XC)}setOpen=(a,i)=>{const r=i.reason===At,c=i.reason===ko&&i.event.detail===0,f=!a&&(i.reason===fr||i.reason==null),d=Hp(i),m=this.select("activeTriggerId");if(!a&&i.reason===Qb&&i.trigger==null&&m!=null&&(i.trigger=this.context.triggerElements.getById(m)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(a,i),i.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(a,i);const p=()=>{const v=Oc(this.state,a,i.trigger,d());v.openChangeReason=i.reason,this.update(v)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(v0,()=>{this.set("stickIfOpen",!1)}),Yn.flushSync(p)):p();let h;c?h="click":f?h="dismiss":i.reason===Qa&&(h="focus"),this.set("instantType",h)}}function KC(n,a,i,r=!1){const c={...Dc(a,i,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...n};return c.open&&n?.mounted===void 0&&(c.mounted=!0),c}function QC(n){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new mn,triggerElements:n}}const fb=cr(function({props:a}){const{children:i,open:r,defaultOpen:c=!1,onOpenChange:f,onOpenChangeComplete:d,modal:m=!1,handle:p,triggerId:h,defaultTriggerId:v=null}=a,x=WC(p,{modal:m,open:c,openProp:r,activeTriggerId:v,triggerIdProp:h});x.useControlledProp("openProp",r),x.useControlledProp("triggerIdProp",h);const S=x.useState("open"),T=x.useState("mounted"),w=x.useState("payload");x.useContextCallback("onOpenChange",f),x.useContextCallback("onOpenChangeComplete",d),I0(x,S),Cc(x);const{forceUnmount:C}=Ac(S,x,()=>{x.update({stickIfOpen:!0,openChangeReason:null})});x.useSyncedValues({modal:m}),b.useEffect(()=>{S||x.context.stickIfOpenTimeout.clear()},[x,S]),b.useImperativeHandle(a.actionsRef,()=>({unmount:C,close:()=>x.setOpen(!1,Ke(bc))}),[C,x]);const M=S||T;return y.jsxs(TS.Provider,{value:x,children:[p&&y.jsx(Rc,{handle:p,store:x}),M&&y.jsx($C,{store:x,modal:m}),typeof i=="function"?i({payload:w}):i]})});function ZC(n){return ti(!0)?y.jsx(fb,{props:n}):y.jsx(C0,{children:y.jsx(fb,{props:n})})}function WC(n,a){const i=jp((r,c)=>new FC(a,r,c));return b.useEffect(()=>i.context.stickIfOpenTimeout.disposeEffect(),[i]),i}function $C({store:n,modal:a}){const i=n.useState("floatingRootContext"),r=Sc(i,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),c=r.reference,f=r.floating;return Mc(n,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:f}),null}const JC=300,eA=ap(function(a,i){const{render:r,className:c,style:f,disabled:d=!1,nativeButton:m=!0,handle:p,payload:h,openOnHover:v=!1,delay:x=JC,closeDelay:S=0,id:T,...w}=a,C=ti(!0),O=Bp(p)??C;if(!O)throw new Error(Bt(74));const N=Sa(T),R=O.useState("isTriggerActive",N),D=O.useState("floatingRootContext"),k=O.useState("isOpenedByTrigger",N),B=O.useState("triggerPopupId",N),j=b.useRef(null),{registerTrigger:U,isMountedByThisTrigger:Y}=Lp(N,j,O,{payload:h,disabled:d,openOnHover:v,closeDelay:S}),I=O.useState("openChangeReason"),H=O.useState("stickIfOpen"),_=O.useState("openMethod"),V=O.useState("focusManagerModal"),te=zc(D,{enabled:!d&&v&&(_!=="touch"||I!==ko),mouseOnly:!0,move:!1,handleClose:jc(),restMs:x,delay:{close:S},triggerElementRef:j,isActiveTrigger:R,isClosing:()=>O.select("transitionStatus")==="ending"}),Q=_p(D,{stickIfOpen:H}),z=dx(()=>O.select("open"),he=>{O.set("openMethod",he)}),X=O.useState("triggerProps",Y),{getButtonProps:F,buttonRef:W}=ei({disabled:d,native:m}),ae={open(he){return he&&I===ko?Ud.open(he):mp.open(he)}},{preFocusGuardRef:A,handlePreFocusGuardFocus:G,handleFocusTargetFocus:ne}=yx(O,j),le=yt("button",a,{state:{disabled:d,open:k},ref:[W,i,U,j],props:[Q.reference,te,X,z,{[b0]:"",id:N,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":B},w,F],stateAttributesMapping:ae}),se=y.jsx(b.Fragment,{children:le},N);return Y&&!V?y.jsxs(b.Fragment,{children:[y.jsx(jo,{ref:A,onFocus:G}),se,y.jsx(jo,{ref:O.context.triggerFocusTargetRef,onFocus:ne})]}):se}),ES=b.createContext(void 0);function tA(){const n=b.useContext(ES);if(n===void 0)throw new Error(Bt(45));return n}const nA=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a;return ti().useState("mounted")||r?y.jsx(ES.Provider,{value:r,children:y.jsx(Cp,{ref:i,...c})}):null}),wS=b.createContext(void 0);function RS(){const n=b.useContext(wS);if(!n)throw new Error(Bt(46));return n}const oA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,anchor:d,positionMethod:m,side:p,align:h,sideOffset:v,alignOffset:x,collisionBoundary:S="clipping-ancestors",collisionPadding:T,arrowPadding:w,sticky:C,disableAnchorTracking:M=!1,collisionAvoidance:O=Op,...N}=a,R=ti(),D=tA(),k=Mp(),B=R.useState("floatingRootContext"),j=R.useState("mounted"),U=R.useState("open"),Y=R.useState("openChangeReason"),I=R.useState("activeTriggerElement"),H=R.useState("modal"),_=R.useState("openMethod"),V=R.useState("positionerElement"),te=R.useState("instantType"),Q=R.useState("transitionStatus"),z=R.useState("adaptiveOrigin"),X=b.useRef(null),F=Ec(V),W=Vp({anchor:d,floatingRootContext:B,positionMethod:m,mounted:j,side:p,sideOffset:v,align:h,alignOffset:x,arrowPadding:w,collisionBoundary:S,collisionPadding:T,sticky:C,disableAnchorTracking:M,keepMounted:D,nodeId:k,collisionAvoidance:O,adaptiveOrigin:z}),ae=B.useState("domReferenceElement");Ee(()=>{const le=ae,se=X.current;if(le&&(X.current=le),se&&le&&le!==se){R.set("instantType",void 0);const he=new AbortController;return F(()=>{R.set("instantType","trigger-change")},he.signal),()=>{he.abort()}}},[ae,F,R]);const A=H===!0&&Y!==At;ux(U&&A,_==="touch",V,I);const G=R.useStateSetter("positionerElement"),ne={open:U,side:W.side,align:W.align,anchorHidden:W.anchorHidden,instant:te},Z=Gp(a,ne,{styles:W.positionerStyles,transitionStatus:Q,props:N,refs:[i,G],hidden:!j,inert:!U});return y.jsxs(wS.Provider,{value:W,children:[j&&A&&y.jsx(Jp,{inert:Lc(!U),cutout:I}),y.jsx(O0,{id:k,children:Z})]})}),aA=b.createContext(void 0);function sA(){const[n,a]=b.useState(0),i=Ce(()=>(a(c=>c+1),()=>{a(c=>Math.max(0,c-1))}));return{context:b.useMemo(()=>({register:i}),[i]),hasClosePart:n>0}}const iA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,initialFocus:d,finalFocus:m,...p}=a,h=ti(),v=RS(),x=Zp()!=null,{context:S,hasClosePart:T}=sA(),w=h.useState("open"),C=h.useState("openMethod"),M=h.useState("instantType"),O=h.useState("transitionStatus"),N=h.useState("popupProps"),R=h.useState("titleElementId"),D=h.useState("descriptionElementId"),k=h.useState("modal"),B=h.useState("mounted"),j=h.useState("openChangeReason"),U=h.useState("activeTriggerElement"),Y=h.useState("floatingRootContext"),I=Y.useState("floatingId"),H=h.useState("disabled"),_=h.useState("openOnHover"),V=h.useState("closeDelay");$s({open:w,ref:h.context.popupRef,onComplete(){w&&h.context.onOpenChangeComplete?.(!0)}}),Yp(Y,{enabled:_&&!H,closeDelay:V});const te=d===void 0?B0(h.context.popupRef):d,Q=k!==!1&&T;h.useSyncedValue("focusManagerModal",Q);const z=h.useStateSetter("popupElement"),X={open:w,side:v.side,align:v.align,instant:M,transitionStatus:O},F=yt("div",a,{state:X,ref:[i,h.context.popupRef,z],props:[N,{id:I,role:"dialog",...wc,"aria-labelledby":R,"aria-describedby":D,onKeyDown(W){x&&Uc.has(W.key)&&W.stopPropagation()}},Hc(O),p],stateAttributesMapping:gc});return y.jsx(Dp,{context:Y,openInteractionType:C,modal:Q,disabled:!B||j===At,initialFocus:te,returnFocus:m,restoreFocus:"popup",previousFocusableElement:ut(U)?U:void 0,nextFocusableElement:h.context.triggerFocusTargetRef,beforeContentFocusGuardRef:h.context.beforeContentFocusGuardRef,children:y.jsx(aA.Provider,{value:S,children:F})})}),rA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,...d}=a,p=ti().useState("open"),{arrowRef:h,side:v,align:x,arrowUncentered:S,arrowStyles:T}=RS();return yt("div",a,{state:{open:p,side:v,align:x,uncentered:S},ref:[i,h],props:[{style:T,"aria-hidden":!0},d],stateAttributesMapping:mc})});function lA({open:n,onOpenChange:a,title:i,description:r,children:c,footer:f,className:d}){return y.jsx(VC,{open:n,onOpenChange:m=>a(m),children:y.jsxs(LC,{children:[y.jsx(MC,{className:"fixed inset-0 z-[900] bg-black/30 transition-opacity data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"}),y.jsxs(HC,{className:Mt("fixed left-1/2 top-1/2 z-[901] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-surface p-5 text-fg shadow-popup outline-none","transition-[opacity,transform] data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",d),children:[y.jsxs("div",{className:"mb-3 flex items-start gap-3",children:[y.jsxs("div",{className:"flex-1",children:[y.jsx(GC,{className:"text-[15px] font-semibold",children:i}),r?y.jsx(DC,{className:"mt-1 text-fg-muted",children:r}):null]}),y.jsx(NC,{"aria-label":"Close",className:"rounded-md p-1 text-fg-muted hover:bg-hover",children:y.jsx(pr,{className:"size-4"})})]}),c,f?y.jsx("div",{className:"mt-4 flex justify-end gap-2",children:f}):null]})]})})}function cA({open:n,onOpenChange:a,title:i,description:r,confirmLabel:c="Confirm",danger:f,onConfirm:d}){return y.jsx(lA,{open:n,onOpenChange:a,title:i,description:r,footer:y.jsxs(y.Fragment,{children:[y.jsx(on,{onClick:()=>a(!1),children:"Cancel"}),y.jsx(on,{variant:f?"danger":"primary",onClick:()=>{d(),a(!1)},children:c})]})})}const OS="data-composite-item-active";function uA(n){const{loopFocus:a=!0,orientation:i="both",grid:r,onLoop:c,direction:f,highlightedIndex:d,onHighlightedIndexChange:m,rootRef:p,enableHomeAndEndKeys:h=!1,stopEventPropagation:v,disabledIndices:x,modifierKeys:S=_o}=n,[T,w]=b.useState(0),C=r!=null,M=b.useRef(null),O=Za(M,p),N=b.useRef([]),R=b.useRef(!1),D=b.useRef(null),k=d??T,B=Ce((H,_=!1)=>{if(D.current=N.current[H]??null,(m??w)(H),_){const V=N.current[H];ob(M.current,V,f,i)}}),j=Ce(H=>{if(H.size===0)return;if(R.current){const Q=N.current,z=Q.indexOf(D.current);if(z===-1){const X=Q[k];!X||Xs(Q,k,x)?B(fA(Q,x)):D.current=X}else z!==k&&B(z);return}R.current=!0;const _=Array.from(H.keys()),V=_.find(Q=>Q?.hasAttribute(OS))??null,te=V?H.get(V)?.index??-1:-1;if(te!==-1)B(te);else if(Xs(_,k,x)){const Q=Oo(_,{disabledIndices:x});$i(_,Q)||B(Q)}ob(M.current,V,f,i)});Ee(()=>{if(x==null||d!=null||!R.current)return;const H=N.current;if(Xs(H,k,x)){const _=Oo(H,{disabledIndices:x});$i(H,_)||B(_)}},[x,d,k,N,B]);const U=Ce((H,_,V)=>c?c(H,_,V,N):V),Y=Ce(H=>{const _=H.key===Wd||H.key===$d;if(!Uc.has(H.key)||!h&&_||dA(H,S)||!M.current)return;const te=f==="rtl",Q=te?Qd:Zd,z=te?Zd:Qd,X=i==="vertical"?Kd:Q,F=i==="vertical"?Fd:z,W=Tt(H.nativeEvent);if(W!=null&&nb(W)&&!GO(W)){const le=W.selectionStart,se=W.selectionEnd,he=W.value;if(le==null||H.shiftKey||le!==se||H.key!==F&&le<he.length||H.key!==X&&le>0)return}let ae=k;const A=Il(N,x),G=qd(N,x);r!=null&&(ae=r({disabledIndices:x,elementsRef:N,event:H,highlightedIndex:k,loopFocus:a,maxIndex:G,minIndex:A,onLoop:U,orientation:i,rtl:te}));const ne=i!=="vertical"&&H.key===Q||i!=="horizontal"&&H.key===Kd,Z=i!=="vertical"&&H.key===z||i!=="horizontal"&&H.key===Fd;h&&(H.key===Wd?ae=A:H.key===$d&&(ae=G)),ae===k&&(ne||Z)&&(a&&ae===G&&ne?(ae=A,c&&(ae=c(H,k,ae,N))):a&&ae===A&&Z?(ae=G,c&&(ae=c(H,k,ae,N))):ae=Oo(N.current,{startingIndex:ae,decrement:Z,disabledIndices:x})),ae!==k&&!$i(N.current,ae)&&(v&&H.stopPropagation(),(C||_||ne||Z)&&H.preventDefault(),B(ae,!0),queueMicrotask(()=>{N.current[ae]?.focus()}))});return{props:{ref:O,onFocus(H){const _=M.current,V=Tt(H.nativeEvent);!_||V==null||!nb(V)||V.setSelectionRange(0,V.value.length)},onKeyDown:Y},highlightedIndex:k,onHighlightedIndexChange:B,elementsRef:N,onMapChange:j,relayKeyboardEvent:Y}}function fA(n,a){let i=-1;for(let r=0;r<n.length;r+=1){const c=n[r];if(!(!c||Xs(n,r,a))){if(c.hasAttribute(OS))return r;i===-1&&(i=r)}}return Math.max(i,0)}function dA(n,a){for(const i of pO)if(!a.includes(i)&&n.getModifierState(i))return!0;return!1}function pA(n){const{render:a,className:i,style:r,refs:c=_o,props:f=_o,state:d=wt,stateAttributesMapping:m,highlightedIndex:p,onHighlightedIndexChange:h,orientation:v,grid:x,loopFocus:S,onLoop:T,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:M=!0,rootRef:O,disabledIndices:N,modifierKeys:R,highlightItemOnHover:D=!1,tag:k="div",...B}=n,j=qp(),{props:U,highlightedIndex:Y,onHighlightedIndexChange:I,elementsRef:H,onMapChange:_,relayKeyboardEvent:V}=uA({grid:x,loopFocus:S,onLoop:T,orientation:v,highlightedIndex:p,onHighlightedIndexChange:h,rootRef:O,stopEventPropagation:M,enableHomeAndEndKeys:w,direction:j,disabledIndices:N,modifierKeys:R}),te=yt(k,n,{state:d,ref:c,props:[U,...f,B],stateAttributesMapping:m}),Q=b.useMemo(()=>({highlightedIndex:Y,onHighlightedIndexChange:I,highlightItemOnHover:D,relayKeyboardEvent:V}),[Y,I,D,V]);return y.jsx(nx.Provider,{value:Q,children:y.jsx(rx,{elementsRef:H,onMapChange:z=>{C?.(z),_(z)},children:te})})}const hA=b.createContext(void 0);function mA(){return b.useContext(hA)}const CS=b.createContext(void 0);function gA(){return b.useContext(CS)}const yA=b.forwardRef(function(a,i){const{defaultValue:r,disabled:c=!1,loopFocus:f=!0,onValueChange:d,orientation:m="horizontal",multiple:p=!1,value:h,className:v,render:x,style:S,...T}=a,w=Zp(),C=mA(),M=r??_o,O=h!==void 0||r!==void 0,N=(w?.disabled??!1)||(C?.disabled??!1)||c,[R,D]=tx({controlled:h,default:M,name:"ToggleGroup",state:"value"}),k=Ce((I,H,_)=>{let V;p?(V=R.slice(),H?V.push(I):V.splice(R.indexOf(I),1)):V=H?[I]:[],d?.(V,_),!_.isCanceled&&D(V)}),B={disabled:N,multiple:p,orientation:m},j=b.useMemo(()=>({disabled:N,setGroupValue:k,value:R,isValueInitialized:O}),[N,k,R,O]),U={role:"group"},Y=yt("div",a,{enabled:!!w,state:B,ref:i,props:[U,T]});return y.jsx(CS.Provider,{value:j,children:w?Y:y.jsx(pA,{render:x,className:v,style:S,state:B,refs:[i],props:[U,T],loopFocus:f,enableHomeAndEndKeys:!0,orientation:m})})}),vA=b.forwardRef(function(a,i){const{className:r,defaultPressed:c=!1,disabled:f=!1,form:d,onPressedChange:m,pressed:p,render:h,type:v,value:x,nativeButton:S=!0,style:T,...w}=a,C=Sa(x||void 0),M=gA(),O=M?.value??[],N=(f||M?.disabled)??!1,[R,D]=tx({controlled:M?C!==void 0&&O.indexOf(C)>-1:p,default:c,name:"Toggle",state:"pressed"}),{getButtonProps:k,buttonRef:B}=ei({disabled:N,native:S}),j={disabled:N,pressed:R},U=[B,i],Y=[{"aria-pressed":R,onClick(_){const V=!R,te=Ke(vc,_.nativeEvent);m?.(V,te),!te.isCanceled&&(C&&M?.setGroupValue?.(C,V,te),!te.isCanceled&&D(V))}},w,k],I=yt("button",a,{enabled:!M,state:j,ref:U,props:Y}),H=b.useMemo(()=>({disabled:N,focusableWhenDisabled:!1}),[N]);return M?y.jsx(mx,{tag:"button",render:h,className:r,style:T,metadata:H,state:j,refs:U,props:Y}):I}),bA="h-7 w-full min-w-0 rounded-control border border-line bg-surface-2 px-2 text-[13px] text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:bg-surface",xA=b.forwardRef(function({className:a,...i},r){return y.jsx("input",{ref:r,className:Mt(bA,a),...i})});function SA({value:n,options:a,onChange:i,className:r,...c}){return y.jsx(yA,{value:n===null?[]:[n],onValueChange:f=>{const d=f[0];d!==void 0&&i(d)},"aria-label":c["aria-label"],className:Mt("flex h-7 items-center gap-0.5 rounded-control bg-surface-2 p-0.5",r),children:a.map(f=>y.jsx(vA,{value:f.value,"aria-label":f.title,title:f.title,className:"flex h-full flex-1 items-center justify-center rounded-[4px] px-1.5 text-fg-muted outline-none hover:text-fg data-[pressed]:bg-surface data-[pressed]:text-fg data-[pressed]:shadow-sm focus-visible:outline-2 focus-visible:outline-accent",children:f.label},f.value))})}function TA(n,a){const i=xt(n).getComputedStyle(n).transform;let r=0,c=0,f=1;if(i&&i!=="none"){const d=i.match(/matrix(?:3d)?\(([^)]+)\)/);if(d){const m=d[1].split(", ").map(parseFloat);m.length===6?(r=m[4],c=m[5],f=Math.sqrt(m[0]*m[0]+m[1]*m[1])):m.length===16&&(r=m[12],c=m[13],f=m[0])}}return{x:r,y:c,scale:f}}const AS=b.createContext(void 0);function Ic(){const n=b.useContext(AS);if(!n)throw new Error(Bt(73));return n}let db=0;function MS(n){return db+=1,`${n}-${Math.random().toString(36).slice(2,6)}-${db}`}function Rd(n,a){if(typeof n=="string")return{description:n};if(typeof n=="function"){const i=n(a);return typeof i=="string"?{description:i}:i}return n}function Od(n){const a=new Map;let i=0,r=0;return n.forEach((c,f)=>{const d=c.transitionStatus==="ending";a.set(c.id,{value:c,domIndex:f,visibleIndex:d?-1:i,offsetY:r}),r+=c.height||0,d||(i+=1)}),a}function Cd(n,a){let i=0;return n.map(r=>{if(r.transitionStatus==="ending")return r;const c=i>=a;return i+=1,r.limited===c?r:{...r,limited:c}})}const Qn={toasts:n=>n.toasts,isEmpty:n=>n.toasts.length===0,toast:(n,a)=>n.toastMetadata.get(a)?.value,toastIndex:(n,a)=>n.toastMetadata.get(a)?.domIndex??-1,toastOffsetY:(n,a)=>n.toastMetadata.get(a)?.offsetY??0,toastVisibleIndex:(n,a)=>n.toastMetadata.get(a)?.visibleIndex??-1,focused:n=>n.focused,expanded:n=>n.hovering||n.focused,expandedOrOutOfFocus:n=>n.hovering||n.focused||!n.isWindowFocused,prevFocusElement:n=>n.prevFocusElement};class EA extends Ws{timers=new Map;areTimersPaused=!1;constructor(a){super({...a,toastMetadata:Od(a.toasts)},{},Qn)}setViewport=a=>{this.set("viewport",a)};syncProviderProps(a,i){const r=this.state.limit!==i;if(this.state.timeout===a&&!r)return;const c={timeout:a,limit:i};if(r){const f=Cd(this.state.toasts,i);c.toasts=f,c.toastMetadata=Od(f)}this.update(c)}disposeEffect=()=>()=>{this.timers.forEach(a=>{a.timeout?.clear()}),this.timers.clear()};removeToast(a,i=!1){const r=Qn.toastIndex(this.state,a);if(r===-1)return;const c=this.state.toasts[r];i||c?.onRemove?.();const f=[...this.state.toasts];f.splice(r,1),this.setToasts(f)}addToast=a=>{const{timeout:i,limit:r}=this.state,c=a.id||MS("toast");if(a.id){const p=Qn.toast(this.state,a.id);if(p)if(p.transitionStatus==="ending")this.removeToast(a.id,!0);else{const{id:h,transitionStatus:v,...x}=a;return this.updateToastInternal(a.id,x,!0,!0),a.id}}const f={...a,id:c,updateKey:0,transitionStatus:"starting"},d=[f,...this.state.toasts];this.setToasts(Cd(d,r));const m=f.timeout??i;return f.type!=="loading"&&m>0&&this.scheduleTimer(c,m,()=>this.closeToast(c)),Qn.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),c};updateToast=(a,i)=>{const r=Qn.toast(this.state,a);!r||r.transitionStatus==="ending"||this.updateToastInternal(a,typeof i=="function"?i(r):i,!1,!0)};updateToastInternal=(a,i,r=!1,c=!1)=>{const{timeout:f,toasts:d}=this.state,m=Qn.toast(this.state,a);if(!m||m.transitionStatus==="ending")return;const p={...m,...i,...c&&{updateKey:m.updateKey+1}};this.setToasts(d.map(M=>M.id===a?p:M));const h=p.timeout??f,v=m.timeout??f,x=Object.hasOwn(i,"timeout"),S=p.transitionStatus!=="ending"&&p.type!=="loading"&&h>0,T=this.timers.has(a),w=v!==h,C=m.type==="loading";if(!S&&T){this.clearTimer(a);return}S&&(!T||w||x||C||r)&&(this.clearTimer(a),this.scheduleTimer(a,h,()=>this.closeToast(a)),Qn.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=a=>{const i=a===void 0,{limit:r,toasts:c}=this.state;let f;if(i)f=c,this.clearTimers();else{const p=Qn.toast(this.state,a);if(!p)return;f=[p],this.clearTimer(a)}const d=c.map(p=>i||p.id===a?{...p,transitionStatus:"ending",height:0}:p),m=Cd(d,r);this.setToasts(m,!m.some(p=>p.transitionStatus!=="ending")),f.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(a)};promiseToast=(a,i)=>{const r=Rd(i.loading),c=this.addToast({...r,type:"loading"}),f=a.then(d=>{const m=Rd(i.success,d);return this.updateToast(c,{...m,type:"success",timeout:m.timeout}),d}).catch(d=>{const m=Rd(i.error,d);return this.updateToast(c,{...m,type:"error",timeout:m.timeout}),Promise.reject(d)});return{}.hasOwnProperty.call(i,"setPromise")&&i.setPromise(f),f};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(a=>{a.timeout&&(a.timeout.clear(),a.remaining=Math.max(a.remaining-(Date.now()-a.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((a,i)=>{a.remaining=a.remaining>0?a.remaining:a.delay,a.timeout??=mn.create(),a.timeout.start(a.remaining,()=>{this.handleTimerFired(i),a.callback()}),a.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=a=>{if(a.pointerType!=="touch")return;const i=Tt(a);De(this.state.viewport,i)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(a,i,r){const c=Date.now(),d=!Qn.expandedOrOutOfFocus(this.state)?mn.create():void 0;d?.start(i,()=>{this.handleTimerFired(a),r()}),this.timers.set(a,{timeout:d,start:c,delay:i,remaining:i,callback:r})}clearTimers(){this.timers.forEach(a=>{a.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(a){this.timers.get(a)?.timeout?.clear(),this.timers.delete(a),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(a){this.timers.delete(a),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(a,i=a.length===0){const r={toasts:a,toastMetadata:Od(a)};i&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(a){const i=It(Qe(this.state.viewport));if(!this.state.viewport||!De(this.state.viewport,i)||!Xl(i))return;if(a===void 0){this.restoreFocusToPrevElement();return}const r=Qn.toasts(this.state),c=Qn.toastIndex(this.state,a),f=(m,p)=>{for(let h=m;h>=0&&h<r.length;h+=p)if(r[h].transitionStatus!=="ending")return r[h];return null},d=f(c+1,1)??f(c-1,-1);d?d.ref?.current?.focus():this.restoreFocusToPrevElement()}}const wA=function(a){const{children:i,timeout:r=5e3,limit:c=3,toastManager:f}=a,d=en(()=>new EA({timeout:r,limit:c,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return rc(d.disposeEffect),b.useEffect(function(){return f?f[" subscribe"](({action:h,options:v})=>{const x=v.id;h==="promise"&&v.promise?d.promiseToast(v.promise,v):h==="update"&&x?d.updateToast(x,v.updates):h==="close"?d.closeToast(x):d.addToast(v)}):void 0},[d,f]),y.jsxs(AS.Provider,{value:d,children:[y.jsx(RA,{store:d,timeout:r,limit:c}),i]})};function RA(n){const{store:a,timeout:i,limit:r}=n;return Ee(()=>{a.syncProviderProps(i,r)},[a,i,r]),null}const OA="--toast-frontmost-height",CA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,children:d,...m}=a,p=Ic(),h=tn(),v=b.useRef(!1),x=b.useRef(!1),S=b.useRef(!1),T=p.useState("isEmpty"),w=p.useState("toasts"),C=p.useState("focused"),M=p.useState("expanded"),O=p.useState("prevFocusElement"),N=w[0]?.height,R=w.some(W=>W.transitionStatus==="ending"),D=w.filter(W=>W.priority==="high");b.useEffect(()=>{const W=p.state.viewport;if(!W||T)return;const ae=xt(W),A=Qe(W);function G(le){le.key==="F6"&&Tt(le)!==W&&(le.preventDefault(),p.set("prevFocusElement",It(A)),W?.focus({preventScroll:!0}),p.pauseTimers(),p.set("focused",!0))}function ne(le){Tt(le)===ae&&(p.set("isWindowFocused",!1),p.pauseTimers())}function Z(le){if(le.relatedTarget)return;const se=Tt(le),he=It(Qe(W));(se===ae||!De(W,se)||!Xl(he))&&p.resumeTimers(),h.start(0,()=>p.set("isWindowFocused",!0))}return Wn(Ie(ae,"keydown",G),Ie(ae,"blur",ne,!0),Ie(ae,"focus",Z,!0),Ie(A,"pointerdown",p.handleDocumentPointerDown,!0))},[p,h,T]);function k(W){v.current=!0;const ae=W.relatedTarget===p.state.viewport?w.find(A=>A.transitionStatus!=="ending"&&!A.limited):void 0;ae?ae.ref?.current?.focus():p.restoreFocusToPrevElement()}function B(W){W.key==="Tab"&&W.shiftKey&&Tt(W.nativeEvent)===p.state.viewport&&(W.preventDefault(),p.restoreFocusToPrevElement())}function j(){p.state.toasts.some(ae=>ae.transitionStatus==="ending")||S.current||!x.current||(p.state.isWindowFocused&&p.resumeTimers(),p.set("hovering",!1),x.current=!1)}b.useEffect(j,[R,p]);function U(){p.pauseTimers(),p.set("hovering",!0),x.current=!1}function Y(){p.state.isWindowFocused&&p.resumeTimers()}function I(){x.current=!0,j()}function H(W){W.pointerType==="touch"&&(S.current=!0)}function _(W){W.pointerType==="touch"&&(S.current=!1,j())}function V(){if(v.current){v.current=!1;return}C||Xl(It(Qe(p.state.viewport)))&&(p.set("focused",!0),p.pauseTimers())}function te(W){!C||De(p.state.viewport,W.relatedTarget)||(p.set("focused",!1),Y())}const Q={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:U,onMouseMove:U,onMouseLeave:I,onFocus:V,onBlur:te,onKeyDown:B,onClick:V,onPointerDown:H,onPointerUp:_,onPointerCancel:_,style:{[OA]:N?`${N}px`:void 0}},z={expanded:M},X=!T&&O&&y.jsx(jo,{onFocus:k}),F=yt("div",a,{ref:[i,p.setViewport],state:z,props:[Q,m,{children:y.jsxs(b.Fragment,{children:[X,d,X]})}]});return y.jsxs(b.Fragment,{children:[X,F,!C&&D.length>0&&y.jsx("div",{style:Jb,children:D.map(W=>y.jsxs("div",{role:"alert","aria-atomic":!0,children:[y.jsx("div",{children:W.title}),y.jsx("div",{children:W.description})]},W.id))})]})}),NS=b.createContext(void 0);function ch(){const n=b.useContext(NS);if(!n)throw new Error(Bt(66));return n}function Ad(n,a,i){switch(n){case"up":return-i;case"down":return i;case"left":return-a;case"right":return a;default:return 0}}const AA="--toast-index",MA="--toast-offset-y",NA="--toast-height",DA="--toast-swipe-movement-x",_A="--toast-swipe-movement-y",zA="data-swipe-direction",kA={...hp,swipeDirection(n){return n?{[zA]:n}:null}},pb=40,jA=10,hb=.5,HA=1,LA=`${oR},${aR}`,UA=b.forwardRef(function(a,i){const{toast:r,render:c,className:f,swipeDirection:d=["down","right"],style:m,...p}=a,h=r.positionerProps?.anchor!==void 0;let v=[];h||(v=Array.isArray(d)?d:[d]);const x=v.length>0,S=Ic(),[T,w]=b.useState(void 0),[C,M]=b.useState(!1),[O,N]=b.useState(!1),[R,D]=b.useState({x:0,y:0}),[k,B]=b.useState({x:0,y:0,scale:1}),[j,U]=b.useState(),[Y,I]=b.useState(),[H,_]=b.useState(null),V=b.useRef(null),te=b.useRef(void 0),Q=b.useRef({x:0,y:0}),z=b.useRef({x:0,y:0,scale:1}),X=b.useRef(void 0),F=b.useRef(0),W=b.useRef(!1),ae=b.useRef({x:0,y:0}),A=b.useRef(!1),G=b.useRef({x:0,y:0}),ne=b.useRef(null),Z=b.useRef(null),le=S.useState("toastIndex",r.id),se=S.useState("toastVisibleIndex",r.id),he=S.useState("toastOffsetY",r.id),pe=S.useState("focused"),ge=S.useState("expanded");$s({open:r.transitionStatus!=="ending",ref:V,onComplete(){r.transitionStatus==="ending"&&S.removeToast(r.id)}});const _e=Ce((Me=!1)=>{const fe=V.current;if(!fe)return;const ye=fe.style.height;fe.style.height="auto";const de=fe.offsetHeight;fe.style.height=ye;function ie(){S.updateToastInternal(r.id,{ref:V,height:de,transitionStatus:void 0})}Me?Yn.flushSync(ie):ie()});Ee(()=>{const Me=te.current;r.transitionStatus!=="starting"&&Me===r.id||(Me!==void 0&&(w(void 0),B({x:0,y:0,scale:1}),je({x:0,y:0})),te.current=r.id,_e())},[_e,r.id,r.transitionStatus]);function je(Me){G.current=Me,D(Me)}Ee(()=>()=>{Z.current?.abort()},[]);function Re(Me,fe){const ye=ve=>ve>0?ve**hb:-(Math.abs(ve)**hb),de=Me>0&&!v.includes("right")||Me<0&&!v.includes("left"),ie=fe>0&&!v.includes("down")||fe<0&&!v.includes("up");return{x:de?ye(Me):Me,y:ie?ye(fe):fe}}const be=Ce(Me=>{if(Me.pointerId!==ne.current)return;ne.current=null,Z.current?.abort(),Z.current=null,M(!1),N(!1),_(null);const fe=z.current;if(Me.type==="pointercancel"||W.current){je({x:fe.x,y:fe.y}),w(void 0);return}const ye=G.current,de=ye.x-fe.x,ie=ye.y-fe.y;let ve;for(const Be of v)if(Ad(Be,de,ie)>pb){ve=Be;break}ve?(w(ve),S.closeToast(r.id)):(je({x:fe.x,y:fe.y}),w(void 0))});function ke(Me){if(Me.button!==0||(Me.pointerType==="touch"&&S.pauseTimers(),Tt(Me.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${LA}`)))return;W.current=!1,X.current=void 0,F.current=0,ne.current=Me.pointerId,Q.current={x:Me.clientX,y:Me.clientY},ae.current=Q.current;const de=Me.currentTarget,ie=TA(de);z.current=ie,B(ie),je({x:ie.x,y:ie.y}),S.set("hovering",!0),M(!0),N(!1),_(null),A.current=!0,Z.current?.abort();const ve=new AbortController;Z.current=ve;const Be=Qe(de);Be.addEventListener("pointerup",be,{signal:ve.signal}),Be.addEventListener("pointercancel",be,{signal:ve.signal}),de.setPointerCapture?.(Me.pointerId)}function Le(Me){if(Me.pointerId!==ne.current)return;Me.preventDefault(),A.current&&(Q.current={x:Me.clientX,y:Me.clientY},A.current=!1);const{clientY:fe,clientX:ye,movementX:de,movementY:ie}=Me;(ie<0&&fe>ae.current.y||ie>0&&fe<ae.current.y)&&(ae.current={x:ae.current.x,y:fe}),(de<0&&ye>ae.current.x||de>0&&ye<ae.current.x)&&(ae.current={x:ye,y:ae.current.y});const ve=ye-Q.current.x,Be=fe-Q.current.y,Yt=fe-ae.current.y,an=ye-ae.current.x;let Rt=H;if(!O&&Math.sqrt(ve*ve+Be*Be)>=HA){N(!0);const _t=v.includes("left")||v.includes("right"),Vn=v.includes("up")||v.includes("down");if(_t&&Vn){const Fe=Math.abs(ve),Et=Math.abs(Be);Rt=Fe>Et?"horizontal":"vertical",_(Rt)}}let xe;if(!X.current)Rt==="vertical"?Be>0?xe="down":Be<0&&(xe="up"):Rt==="horizontal"?ve>0?xe="right":ve<0&&(xe="left"):Math.abs(ve)>=Math.abs(Be)?xe=ve>0?"right":"left":xe=Be>0?"down":"up",xe&&v.includes(xe)&&(X.current=xe,F.current=Ad(xe,ve,Be),w(xe));else{const Cn=X.current,_t=Ad(Cn,an,Yt);_t>pb?(W.current=!1,w(Cn)):!(v.includes("left")&&v.includes("right"))&&!(v.includes("up")&&v.includes("down"))&&F.current-_t>=jA&&(W.current=!0)}const qe=Re(ve,Be);let ot=z.current.x,mt=z.current.y;const On=v.includes("left")||v.includes("right"),qn=v.includes("up")||v.includes("down");Rt!=="vertical"&&On&&(ot+=qe.x),Rt!=="horizontal"&&qn&&(mt+=qe.y),je({x:ot,y:mt})}function Ge(Me){if(Me.key==="Escape"){if(!V.current||!De(V.current,It(Qe(V.current))))return;S.closeToast(r.id)}}b.useEffect(()=>{const Me=V.current;if(!x||!Me)return;function fe(ye){ne.current===null||!De(Me,Tt(ye))||ye.preventDefault()}return Ie(Me,"touchmove",fe,{passive:!1})},[x]);function Se(){const Me=R.x-k.x,fe=R.y-k.y;return{transition:C?"none":void 0,transform:C?`translateX(${R.x}px) translateY(${R.y}px) scale(${k.scale})`:void 0,[DA]:`${Me}px`,[_A]:`${fe}px`}}const Ue=r.priority==="high",Te={role:Ue?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":Y,"aria-hidden":Ue&&!pe?!0:void 0,onPointerDown:x?ke:void 0,onPointerMove:x?Le:void 0,onPointerUp:x?be:void 0,onPointerCancel:x?be:void 0,onKeyDown:Ge,inert:Lc(r.limited),style:{...Se(),[AA]:r.transitionStatus==="ending"?le:se,[MA]:`${he}px`,[NA]:r.height?`${r.height}px`:void 0}},we=b.useMemo(()=>({toast:r,setTitleId:U,setDescriptionId:I,recalculateHeight:_e,visibleIndex:se,expanded:ge}),[r,U,I,_e,se,ge]),Ae={transitionStatus:r.transitionStatus,expanded:ge,limited:r.limited||!1,type:r.type,swiping:C,swipeDirection:T},Ze=yt("div",a,{ref:[i,V],state:Ae,stateAttributesMapping:kA,props:[Te,p]});return y.jsx(NS.Provider,{value:we,children:Ze})}),BA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,...d}=a,{visibleIndex:m,expanded:p,recalculateHeight:h}=ch(),v=b.useRef(null);Ee(()=>{h();const T=v.current;if(!T||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;const w=new ResizeObserver(()=>h(!0)),C=new MutationObserver(()=>h(!0));return w.observe(T),C.observe(T,{childList:!0,subtree:!0,characterData:!0}),()=>{w.disconnect(),C.disconnect()}},[h]);const x=m>0;return yt("div",a,{ref:[i,v],state:{expanded:p,behind:x},props:d})});function DS(n){return n==null||typeof n=="boolean"||n===""?!1:Array.isArray(n)?n.some(DS):!0}function PA(n){return b.isValidElement(n)&&DS(n.props.children)}function _S(n,a,i){const{toast:r,setTitleId:c,setDescriptionId:f}=ch(),d=i==="title"?c:f,m=a??(i==="title"?r.title:r.description);return{id:Wa(n),children:m,type:r.type,setId:d}}function zS(n,a,i){const r=PA(n);return Ee(()=>{if(r)return i(a),()=>{i(c=>c===a?void 0:c)}},[r,a,i]),r?n:null}const IA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,children:m,...p}=a,{id:h,children:v,type:x,setId:S}=_S(d,m,"description"),w=yt("p",a,{ref:i,state:{type:x},props:{...p,id:h,children:v}});return zS(w,h,S)}),YA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,children:m,...p}=a,{id:h,children:v,type:x,setId:S}=_S(d,m,"title"),w=yt("h2",a,{ref:i,state:{type:x},props:{...p,id:h,children:v}});return zS(w,h,S)}),qA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,disabled:d,nativeButton:m=!0,...p}=a,h=Ic(),{toast:v,expanded:x}=ch(),[S,T]=b.useState(!1),{getButtonProps:w,buttonRef:C}=ei({disabled:d,native:m}),M={type:v.type};return yt("button",a,{ref:[i,C],state:M,props:[{"aria-hidden":!x&&!S,onClick(){h.closeToast(v.id)},onFocus(){T(!0)},onBlur(){T(!1)}},p,w]})}),VA=b.forwardRef(function(a,i){return y.jsx(K0,{ref:i,...a})});function GA(){const n=Ic(),a=n.useState("toasts");return b.useMemo(()=>({toasts:a,add:n.addToast,close:n.closeToast,update:n.updateToast,promise:n.promiseToast}),[a,n])}function XA(){const n=new Set;function a(i){n.forEach(r=>r(i))}return{" subscribe":function(r){return n.add(r),()=>{n.delete(r)}},add(i){const r=i.id||MS("toast"),c={...i,id:r,transitionStatus:"starting"};return a({action:"add",options:c}),r},close(i){a({action:"close",options:{id:i}})},update(i,r){a({action:"update",options:{id:i,updates:r}})},promise(i,r){let c=i;return a({action:"promise",options:{...r,promise:i,setPromise(f){c=f}}}),c}}}function mb({icon:n,title:a,children:i}){return y.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-fg-muted",children:[n?y.jsx("div",{className:"text-fg-subtle",children:n}):null,y.jsx("div",{className:"text-[15px] font-semibold text-fg",children:a}),i?y.jsx("div",{className:"max-w-sm",children:i}):null]})}const Yc=XA();function FA(n){if(n.repeat||n.key!=="Enter"&&n.key!==" ")return;const a=n.currentTarget.closest("[data-toast]")??n.currentTarget,i=a.ownerDocument.defaultView;i&&tO(i,n.key,r=>r instanceof i.Node&&a.contains(r))}function KA(){const{toasts:n}=GA();return n.map(a=>y.jsxs(UA,{toast:a,"data-toast":"",className:"pointer-events-auto flex w-80 items-start gap-3 rounded-lg bg-surface p-3 text-fg shadow-popup transition-[opacity,transform] data-[starting-style]:translate-y-2 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",children:[y.jsxs(BA,{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[y.jsx(YA,{className:"text-[13px] font-semibold"}),y.jsx(IA,{className:"text-xs text-fg-muted"})]}),y.jsx(qA,{"aria-label":"Dismiss",onKeyDown:FA,className:"rounded p-0.5 text-fg-muted hover:bg-hover",children:y.jsx(pr,{className:"size-3.5"})})]},a.id))}function QA({children:n}){return y.jsxs(wA,{toastManager:Yc,timeout:4e3,children:[n,y.jsx(VA,{children:y.jsx(CA,{className:"pointer-events-none fixed bottom-4 right-4 z-[1100] flex flex-col gap-2",children:y.jsx(KA,{})})})]})}const ZA=["a[href]","button","iframe","input","select","textarea","summary","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])","[tabindex]"].join(", "),WA="audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function $A(n){return!(n.tabIndex>=0||!n.hasAttribute("tabindex")&&n.matches(WA))||n.getAttribute("aria-hidden")==="true"||n.matches(":disabled")?!1:typeof n.checkVisibility!="function"||n.checkVisibility({visibilityProperty:!0})}function JA(n){return Array.from(n.querySelectorAll(ZA)).filter($A)}function eM(n){const a=i=>!/visible|hidden|clip/.test(i);return n.scrollWidth>n.clientWidth+1&&a(n.overflowX)||n.scrollHeight>n.clientHeight+1&&a(n.overflowY)}function tM(n){const[a,i]=b.useState(!1);return b.useLayoutEffect(()=>{const r=n.current,c=r?.ownerDocument.defaultView;if(!r||!c)return;const f=()=>{const v=c.getComputedStyle(r);i(eM({scrollWidth:r.scrollWidth,clientWidth:r.clientWidth,scrollHeight:r.scrollHeight,clientHeight:r.clientHeight,overflowX:v.overflowX,overflowY:v.overflowY}))};if(f(),typeof c.ResizeObserver!="function")return;const d=new c.ResizeObserver(f),m=new Set,p=v=>{if(v.nodeType!==1)return;const x=v;if(c.getComputedStyle(x).display==="contents"){x.childNodes.forEach(p);return}m.has(x)||(m.add(x),d.observe(x))};d.observe(r),r.childNodes.forEach(p);const h=new c.MutationObserver(v=>{for(const x of v)x.addedNodes.forEach(p);for(const x of m)r.contains(x)||(d.unobserve(x),m.delete(x));f()});return h.observe(r,{childList:!0,subtree:!0,characterData:!0}),()=>{d.disconnect(),h.disconnect()}},[n]),a}b.forwardRef(function({label:a,className:i,...r},c){const f=b.useRef(null),d=b.useCallback(T=>{f.current=T,typeof c=="function"?c(T):c&&(c.current=T)},[c]),m=tM(f),[p,h]=b.useState(!1),[v,x]=b.useState(null);b.useLayoutEffect(()=>{const T=f.current,w=T?.ownerDocument.defaultView;if(!m||!T||!w)return;const C=()=>{h(JA(T).length===0),x(T.closest('[role="dialog"], [role="alertdialog"]')?.getAttribute("aria-labelledby")??null)};C();const M=new w.MutationObserver(C);return M.observe(T,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex","disabled","hidden","href","contenteditable"]}),()=>M.disconnect()},[m]);const S=m&&p;return y.jsx("div",{ref:d,...S?{role:"group",tabIndex:0,"aria-labelledby":a===void 0?v??void 0:void 0,"aria-label":a??(v===null?"Panel content":void 0)}:{},className:Mt(S&&"focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent",i),...r})});const nM={blur:{label:"Blur",unit:"px",min:0,max:200,step:1,identity:0,initial:4},brightness:{label:"Brightness",unit:"%",min:0,max:500,step:1,identity:100,initial:120},contrast:{label:"Contrast",unit:"%",min:0,max:500,step:1,identity:100,initial:120},grayscale:{label:"Grayscale",unit:"%",min:0,max:100,step:1,identity:0,initial:100},saturate:{label:"Saturate",unit:"%",min:0,max:500,step:1,identity:100,initial:150},"hue-rotate":{label:"Hue rotate",unit:"deg",min:-360,max:360,step:1,identity:0,initial:90},invert:{label:"Invert",unit:"%",min:0,max:100,step:1,identity:0,initial:100},sepia:{label:"Sepia",unit:"%",min:0,max:100,step:1,identity:0,initial:100},opacity:{label:"Opacity",unit:"%",min:0,max:100,step:1,identity:100,initial:50}};[...Object.keys(nM)];const oM={cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",copyLink:"Copy link",loading:"Loading…",justNow:"just now",never:"never",agent:"Agent",delete:"Delete",rename:"Rename",duplicate:"Duplicate",pin:"Pin",unpin:"Unpin",open:"Open",save:"Save",updated:"Updated {when}",pinned:"Pinned",unpinned:"Unpinned",duplicated:"Duplicated",couldNotPin:"Could not pin: {error}",couldNotUnpin:"Could not unpin: {error}",couldNotRename:"Could not rename: {error}",couldNotDuplicate:"Could not duplicate: {error}",couldNotDelete:"Could not delete: {error}",statusNone:"No session",statusWorking:"Working",statusIdle:"Idle",statusWaiting:"Waiting",statusOffline:"Offline",working:"{agent} is working…",artifactOptions:"Artifact options",artifactName:"Artifact name",comments:"Comments",doneCommenting:"Done commenting",openComment:"1 open comment",openComments:"{count} open comments",commentOptions:"Comment options",showAllComments:"Show all comments",hideComments:"Hide comments",share:"Share",sharedOnNetwork:"Shared with your network",onlyThisComputer:"Only this computer",ask:"Ask {agent}",hideAsk:"Hide",openHarnessSession:"Open the {harness} session",messageAgent:"Message {agent} about this artifact",switchArtifact:"Switch artifact",inThisSession:"In this session",recent:"Recent",allArtifacts:"All artifacts",export:"Export",openSession:"Open session",offline:"offline",versionHistory:"Version history",openInNewTab:"Open in new tab",refresh:"Refresh",storage:"Storage",inThisFolder:"{size} in this folder",copyPath:"Copy path",linkCopied:"Link copied",pathCopied:"Path copied",deleteTitle:'Delete "{title}"?',deleteBody:"It leaves your artifacts. Its folder stays where it is: {root}",shareTitle:"Share this artifact",peopleWithAccess:"People with access",joinedPeople:"People who joined",noneJoined:"Nobody has joined yet. Send someone a link below.",online:"Online",seenAgo:"Seen {when}",guestPaused:"Link off: no access until it is back on",changeRole:"Change {name}'s role",roleLinkOff:"Link off",remove:"Remove",removeGuest:"Remove {name}",removeTitle:"Remove {name}?",removeBody:"They lose access to this artifact. They can join again with a link.",you:"(you)",thisComputer:"This computer",owner:"Owner",generalAccess:"General access",onLan:"Anyone on your network with a link",onlyHereSub:"Nobody else can open the links.",onLanSub:"People on the same Wi-Fi or LAN open it with a link; the link sets their role.",onNetworkAt:"On this network at {addresses}",onTailnet:"Tailscale: {address}, for people on your tailnet from any network (copy it from a link's More menu)",noAddress:"This computer has no local network address.",whereOff:"Only this computer can open these links for now. Copying one opens this to your network.",inviteLinks:"Invite links",roleEditor:"Editor",roleCommenter:"Commenter",roleViewer:"Viewer",linkEditor:"Can edit",linkCommenter:"Can comment",linkViewer:"Can view",noteEditor:"Edit and comment",noteCommenter:"Comment, no edits",noteViewer:"Read only",linkOff:"Off: nobody can join with it",turnOn:"Turn on",more:"More",moreFor:"More: {role}",copyTailnet:"Copy Tailscale link",copyTailnetNote:"For people on your tailnet, off this network ({address})",turnOnLink:"Turn on link",turnOffLink:"Turn off link",turnOffNote:"Whoever joined with it loses access until it is back on",resetLink:"Reset link",resetNote:"A new address; whoever joined with the old one is removed",resetTitle:'Reset the "{role}" link?',resetBody:"The old link stops working and the people who joined with it lose access.",plainHttp:"This is plain HTTP: others on the network can read what passes. A link is the permission: whoever has it gets its role, so send it only to the people meant to have it, and reset a link that went further.",cannotShare:"{type} pages can't be shared on the network yet: only this computer opens it.",shareError:"Could not do that: {error}",sendingTitle:"Sending this to someone?",sendingBody:"Share the link instead of a file and they will always have the latest changes.",invitePeople:"Invite people",allLinksOff:"All the links are off. Invite people to turn one on.",joinsAs:"People who open this link join as {role}. Invite people to give another role.",onlyHereLink:"Only this computer can open the link.",nothingToExport:"Nothing to export yet.",exportOptions:"Asks for options first",archiveLabel:"Whole folder (.zip)",archiveDescription:"Everything here, to back up or move",archiveStarted:"Downloading {name}",archiveHint:"The whole folder in one zip, to back up, move to another computer or send to someone. Unzip it and open it with the same type to carry on; share links and this computer's server state are left out.",archiveTooLarge:"The folder is over what a zip holds (4 GiB or 65,535 files): copy the folder itself instead.",archiveUnsupported:"{type} folders can't be zipped here: copy the folder itself instead.",archiveFailed:"Could not zip the folder: {error}",exportBusy:"Another export is running. Try {label} again in a moment.",exportUnsupported:"{label} can't be exported right now.",exportFailed:"Could not export {label}.",saving:"Saving…",reconnecting:"Reconnecting…",notSaved:"Not saved",notSavedTitle:"The page could not save its last changes.",saveRetry:"Couldn't save — retry",readOnly:"Read-only",readOnlyTitle:"Nothing can be saved here",leaveLosesWork:"Leave? Changes that are not saved yet will be lost.",actionSaveNow:"Save now",actionOpenFind:"Find",actionUndo:"Undo",actionRedo:"Redo",actionEditPage:"Edit page",actionUsePage:"Use this page",actionCommentSelection:"Comment on selection",actionOpenPageList:"Pages",actionHandOffCode:"Hand off to code",whyOlderVersion:"You are viewing an older version",whyAgentWorking:"{agent} is working",whyDraftOpen:"Close the open draft first",whyCommentsOn:"Turn off comment mode first",whyNeedsAgent:"Needs an agent session",whyUnsaved:"Save first",whyOther:"Not available right now",noOwner:"No session owns this artifact",noOwnerNote:"What you send waits for the next session that works on it.",ownerNote:"Messages go to the {harness} session that made this artifact.",agentIdle:"{agent} is idle",agentWaiting:"{agent} is waiting",sessionOffline:"The session is offline",offlineNote:"{agent} sees what you send the next time the {harness} session works.",askPlaceholder:"What should change?",sendToAgent:"Send to {agent}",sending:"Sending…",sent:"Sent.",sentInbox:"{agent} will see it the next time the session works.",notDelivered:"Not delivered.",notSent:"Not sent: {error}",viaDelivered:"delivered",viaInbox:"waiting for the session",viaFailed:"not delivered",emptyTitle:"This artifact is empty",emptyBody:"Nothing of {type} has been written to {root} yet. An agent writes it: send it this.",startSession:"Start a session with {agent}",promptCopied:"Copied: paste it into any agent session that has the Artifact tool.",sentToSession:"Sent to a new session.",problemTitle:"This artifact cannot open here",noPage:"No page.",folder:"Folder: {root}",askToLook:"Ask {agent} to look",problemAsk:"The artifact page could not open: {problem}",noBoot:"No artifact to show. Open one from the home page.",homeTitle:"Open Artifact",homeSub:"The artifacts and types every agent on this computer shares.",artifacts:"Artifacts",types:"Types",newArtifact:"New artifact",moreActions:"More actions",backToSession:"Back to session",noArtifacts:"No artifacts yet. Ask an agent to make one with the Artifact tool, or start one here.",pageOpen:"Open now",typeMissing:"Type not installed",deleted:'Deleted "{title}". Its folder stays.',undo:"Undo",restored:"Restored",couldNotRestore:"Could not restore: {error}",couldNotLoad:"Could not load: {error}",typeRoots:"Type roots: {roots}",noTypes:"No types found.",disabled:"Disabled",shadowedBy:"Overridden by {root}",newOf:"New {type}",create:"Create",title:"Title",folderOptional:"Folder (optional)",folderHint:"Default: a new folder in the home workspace",needTitle:"Give it a title first.",couldNotCreate:"Could not create it: {error}",renameArtifact:"Rename artifact",cannotCreateYet:"Only Design artifacts can be made here for now."},aM={cancel:"取消",close:"关闭",copy:"复制",copied:"已复制",copyLink:"复制链接",loading:"加载中…",justNow:"刚刚",never:"从未",agent:"Agent",delete:"删除",rename:"重命名",duplicate:"复制一份",pin:"置顶",unpin:"取消置顶",open:"打开",save:"保存",updated:"更新于 {when}",pinned:"已置顶",unpinned:"已取消置顶",duplicated:"已复制一份",couldNotPin:"没能置顶:{error}",couldNotUnpin:"没能取消置顶:{error}",couldNotRename:"没能重命名:{error}",couldNotDuplicate:"没能复制:{error}",couldNotDelete:"没能删除:{error}",statusNone:"无会话",statusWorking:"工作中",statusIdle:"空闲",statusWaiting:"等待中",statusOffline:"离线",working:"{agent} 正在工作…",artifactOptions:"作品选项",artifactName:"作品名",comments:"评论",doneCommenting:"结束评论",openComment:"1 条未解决的评论",openComments:"{count} 条未解决的评论",commentOptions:"评论选项",showAllComments:"显示全部评论",hideComments:"隐藏评论",share:"分享",sharedOnNetwork:"已分享到局域网",onlyThisComputer:"仅这台电脑",ask:"问 {agent}",hideAsk:"收起",openHarnessSession:"打开 {harness} 会话",messageAgent:"就这个作品给 {agent} 发消息",switchArtifact:"切换作品",inThisSession:"这个会话里的",recent:"最近",allArtifacts:"所有作品",export:"导出",openSession:"打开会话",offline:"离线",versionHistory:"版本历史",openInNewTab:"在新标签页打开",refresh:"刷新",storage:"存储",inThisFolder:"这个文件夹 {size}",copyPath:"复制路径",linkCopied:"链接已复制",pathCopied:"路径已复制",deleteTitle:"删除「{title}」?",deleteBody:"它会移出作品列表,文件夹保留在原处:{root}",shareTitle:"分享这份内容",peopleWithAccess:"有权访问的人",joinedPeople:"加入的人",noneJoined:"还没有人加入。把下面的链接发给对方。",online:"在线",seenAgo:"{when}来过",guestPaused:"链接已关闭,暂时无法访问",changeRole:"更改「{name}」的角色",roleLinkOff:"链接已关闭",remove:"移出",removeGuest:"移出 {name}",removeTitle:"移出「{name}」?",removeBody:"对方将无法再访问这份内容,之后仍可以用链接重新加入。",you:"(你)",thisComputer:"这台电脑",owner:"所有者",generalAccess:"一般访问权限",onLan:"同一网络里有链接的人",onlyHereSub:"别人打不开这些链接。",onLanSub:"同一 Wi-Fi 或局域网里的人用链接打开,链接决定角色。",onNetworkAt:"在这个网络上:{addresses}",onTailnet:"Tailscale:{address},同一 tailnet 的人在别的网络也能打开(复制在链接的「更多」里)",noAddress:"这台电脑没有局域网地址。",whereOff:"现在只有这台电脑能打开这些链接。复制链接会顺手分享到局域网。",inviteLinks:"邀请链接",roleEditor:"编辑者",roleCommenter:"评论者",roleViewer:"查看者",linkEditor:"可编辑",linkCommenter:"可评论",linkViewer:"可查看",noteEditor:"编辑和评论",noteCommenter:"只能评论",noteViewer:"只读",linkOff:"已关闭:没人能用它加入",turnOn:"开启",more:"更多",moreFor:"更多:{role}",copyTailnet:"复制 Tailscale 链接",copyTailnetNote:"给同一 tailnet 里不在这个网络的人({address})",turnOnLink:"开启链接",turnOffLink:"关闭链接",turnOffNote:"用它加入的人暂时无法访问",resetLink:"重置链接",resetNote:"换一个新地址,用旧链接加入的人会被移出",resetTitle:"重置「{role}」链接?",resetBody:"旧链接会失效,通过它加入的人也会失去访问权限。",plainHttp:"这是明文 HTTP:同一网络的人能看到传输内容。链接就是权限:拿到链接的人就有对应角色,只发给该有的人;传出去了就重置链接。",cannotShare:"{type} 的页面暂时不能分享到网络:只有这台电脑能打开。",shareError:"没做成:{error}",sendingTitle:"要发给别人?",sendingBody:"发链接而不是文件,对方看到的总是最新版本。",invitePeople:"邀请别人",allLinksOff:"所有链接都关着。去邀请页打开一条。",joinsAs:"用这条链接打开的人以{role}身份加入。要给别的角色,去邀请页。",onlyHereLink:"只有这台电脑能打开这个链接。",nothingToExport:"还没有可导出的内容。",exportOptions:"会先询问导出选项",archiveLabel:"整个文件夹(.zip)",archiveDescription:"这里的全部内容,用来备份或搬走",archiveStarted:"开始下载 {name}",archiveHint:"整个文件夹打成了一个 zip,可以备份、换电脑或发给别人。解压后用同一个类型打开就能接着用;分享链接和这台电脑上的服务器状态不在里面。",archiveTooLarge:"文件夹超过了 zip 的上限(4 GiB 或 65535 个文件),请直接复制文件夹。",archiveUnsupported:"{type} 的文件夹在这里打不了包,请直接复制文件夹。",archiveFailed:"没能打包:{error}",exportBusy:"另一个导出正在进行,请稍后再导出 {label}。",exportUnsupported:"现在无法导出 {label}。",exportFailed:"无法导出 {label}。",saving:"正在保存…",reconnecting:"正在重新连接…",notSaved:"未保存",notSavedTitle:"页面没能保存最近的修改。",saveRetry:"保存失败,点击重试",readOnly:"只读",readOnlyTitle:"这里的内容无法保存",leaveLosesWork:"确定离开?尚未保存的修改会丢失。",actionSaveNow:"立即保存",actionOpenFind:"查找",actionUndo:"撤销",actionRedo:"重做",actionEditPage:"编辑页面",actionUsePage:"使用这个页面",actionCommentSelection:"评论选中内容",actionOpenPageList:"页面列表",actionHandOffCode:"交给代码处理",whyOlderVersion:"你正在查看旧版本",whyAgentWorking:"{agent} 正在工作",whyDraftOpen:"请先关闭打开的草稿",whyCommentsOn:"请先退出评论模式",whyNeedsAgent:"需要一个智能体会话",whyUnsaved:"请先保存",whyOther:"暂时不可用",noOwner:"没有会话拥有这个作品",noOwnerNote:"发出的消息会等下一个处理它的会话。",ownerNote:"消息会发给做这个作品的 {harness} 会话。",agentIdle:"{agent} 空闲",agentWaiting:"{agent} 在等待",sessionOffline:"会话离线",offlineNote:"{harness} 会话下次工作时,{agent} 会看到你发的消息。",askPlaceholder:"想改什么?",sendToAgent:"发给 {agent}",sending:"发送中…",sent:"已发送。",sentInbox:"会话下次工作时 {agent} 会看到。",notDelivered:"没送达。",notSent:"没发出去:{error}",viaDelivered:"已送达",viaInbox:"等会话处理",viaFailed:"没送达",emptyTitle:"这个作品还是空的",emptyBody:"{root} 里还没有写入 {type} 的内容。由 Agent 来写:把下面这段发给它。",startSession:"和 {agent} 开个新会话",promptCopied:"已复制:粘贴到任意装了 Artifact 工具的 Agent 会话里。",sentToSession:"已发到新会话。",problemTitle:"这个作品在这里打不开",noPage:"没有页面。",folder:"文件夹:{root}",askToLook:"让 {agent} 看看",problemAsk:"作品页打不开:{problem}",noBoot:"没有要显示的作品。从主页打开一个。",homeTitle:"Open Artifact",homeSub:"本机所有 Agent 共用的作品和类型。",artifacts:"作品",types:"类型",newArtifact:"新建作品",moreActions:"更多操作",backToSession:"回到会话",noArtifacts:"还没有作品。让 Agent 用 Artifact 工具创建一个,或者在这里新建。",pageOpen:"已打开",typeMissing:"类型没有安装",deleted:"已删除「{title}」,文件夹保留。",undo:"撤销",restored:"已恢复",couldNotRestore:"没能恢复:{error}",couldNotLoad:"读取失败:{error}",typeRoots:"类型根目录:{roots}",noTypes:"没有找到类型。",disabled:"已停用",shadowedBy:"被 {root} 覆盖",newOf:"新建 {type}",create:"创建",title:"标题",folderOptional:"文件夹(可不填)",folderHint:"默认:主工作区里新建一个文件夹",needTitle:"先写个标题。",couldNotCreate:"没建成:{error}",renameArtifact:"重命名作品",cannotCreateYet:"目前这里只能新建 Design 作品。"};function sM(n){return n&&/^zh\b/i.test(n)?"zh-CN":"en"}const uh=sM(typeof navigator>"u"?void 0:navigator.language);function iM(n,a){return a?n.replace(/\{(\w+)\}/g,(i,r)=>r in a?String(a[r]):i):n}function rM(n,a,i){return iM((n==="zh-CN"?aM[a]:void 0)??oM[a],i)}function q(n,a){return rM(uh,n,a)}const lM=/^art_[0-9a-z]{10,40}$/;function cM(n){if(typeof n!="string")return null;const a=/^open-artifact:\/\/artifact\/([^/?#]+)/.exec(n.trim()),i=a?a[1]:n.trim();return lM.test(i)?i:null}const hn={artifacts:"artifacts",artifact:"artifact",types:"types",events:"events",share:"artifact.share",archive:"artifact.archive",restore:"artifacts.restore",open:"artifacts.open",create:"artifacts.create",update:"artifacts.update",duplicate:"artifacts.duplicate",delete:"artifacts.delete",ask:"artifacts.ask"},uM="[Artifact comment sent to agent]",fM="[Artifact edit request sent to agent]",dM="[Artifact task finished]",pM="open-artifact-shell",Ga={shell:"open_artifact_shell",id:"open_artifact_id",comment:"comment",panel:"panel"},hM=["saved","actions","formats","shareNotice"],mM=1,gM=/^[a-z][a-z0-9]{0,23}$/,gb="not run: the artifact was updated";function yM(n){return!!n&&typeof n=="object"&&typeof n.openArtifact=="string"}const vM=["quickstart","list","publish","read","open","call","adopt","delete","share"],bM=["get","list","query","set","update","delete","str_replace","batch"],xM=["read","reply","resolve","reopen","wait"],SM=["share","export"],TM={type:"object",properties:{action:{type:"string",enum:vM,description:"What to do. Omitted: publish."},intent:{type:"string",description:"quickstart: what is being made (design, slides, whiteboard, document, data, other), or a few words about it."},scope:{type:"string",enum:["types","mine","all"],description:"list: the installed types, this session's and this workspace's artifacts (default), or every artifact."},type:{type:"string",description:"list: only artifacts of this type (an id, or open-artifact://type/<id>)."},query:{type:"string",description:"list: only artifacts whose title contains this text."},limit:{type:"integer",description:"list: how many to return (default 50, at most 200)."},cursor:{type:"string",description:"list: the next_cursor of the previous page."},type_url:{type:"string",description:"publish without url: the type to create from (open-artifact://type/<id>, from quickstart). read without url: the type to describe."},title:{type:"string",description:"publish without url: the new artifact's name."},folder:{type:"string",description:"publish without url, or adopt: where the artifact's folder goes (absolute, or relative to the workspace). Default <workspace>/artifacts/<slug>."},url:{type:"string",description:"An artifact: open-artifact://artifact/<id>, as publish returned it."},files:{type:"object",additionalProperties:!0,description:'publish with url: files to write under the artifact root, as {"rel/path": "text"} or {"rel/path": {"content": "...", "encoding": "base64"}}; null deletes.'},if_match:{type:"object",additionalProperties:!0,description:'publish with url: {"rel/path": sha256 | null | "*"}. Write only while the file still has the sha256 you read, does not exist (null), or anyway ("*"). One mismatch writes nothing and returns the current versions.'},check:{type:"boolean",description:"publish with url: run the type's check action after writing; its result comes back as check."},open:{type:"string",enum:["after_first_write","now"],description:"publish without url: after_first_write opens the page in your app once your first write lands; now opens it at once. Where your app cannot show pages by itself the result says so: open view_url in your app's built-in browser, if you have one."},related:{type:"boolean",description:"quickstart: list existing artifacts the recommended type can build on, such as design systems (default true)."},path:{type:"string",description:"read: one file or folder under the root (omitted: the record and the file list)."},paths:{type:"array",items:{type:"string"},description:"read: several files under the root at once."},name:{type:"string",description:"call: the action's name (check, upload, ...; read with url lists them)."},args:{type:"object",additionalProperties:!0,description:"call: the action's arguments. upload: {file: absolute path, name?, group?}."},panel:{type:"string",enum:SM,description:"open: also open the page's Share panel (share), for the person to share it on the network, or its Export tab (export), for them to download a file."}}},EM={type:"object",properties:{action:{type:"string",enum:bM},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>)."},collection:{type:"string"},doc_id:{type:"string"},path:{type:"string",description:"collection/doc_id, instead of the two."},data:{type:"object",additionalProperties:!0,description:"set / update: the document's fields."},file_path:{type:"string",description:"set / update: a JSON file holding the fields, instead of data."},if_match:{description:'set / update / delete / str_replace: the sha256 get returned (write only if unchanged), null (only if it does not exist) or "*" (replace whatever is there).'},field:{type:"string",description:"str_replace: the text field, as a dot path (body, notes.text)."},old:{type:"string",description:"str_replace: the passage to replace; it must occur exactly once."},new:{type:"string",description:"str_replace: the passage that replaces it."},where:{type:"array",items:{type:"object",additionalProperties:!0},description:"query: [{field, op, value}], all must hold. op: ==, !=, <, <=, >, >=, in, not-in (up to 30 values), array-contains."},order_by:{type:"object",additionalProperties:!0,description:'query: {field, dir: "asc" | "desc"}.'},limit:{type:"integer",description:"list / query: how many documents (default 100, at most 1000)."},cursor:{type:"string",description:"list / query: the next_cursor of the previous page."},out_file:{type:"string",description:"get / list / query: write the result to this JSON file (absolute, or relative to the workspace) and return only its path and counts."},writes:{type:"array",items:{type:"object",additionalProperties:!0},description:"batch: [{op: set|update|delete|str_replace, path | collection+doc_id, data | file_path, if_match?, field?, old?, new?}], at most 500."}},required:["action","url"]},wM={type:"object",properties:{action:{type:"string",enum:xM},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>). wait: optional."},thread_id:{type:"string",description:'reply / resolve / reopen: the thread (after ";thread=" in the message).'},text:{type:"string",description:"reply: the answer."},resolve:{type:"boolean",description:"reply: resolve the thread too."},all:{type:"boolean",description:"read: resolved threads too."},since:{type:"string",description:"read: only threads with a message at or after this time (ISO 8601)."},acknowledge_duplicate:{type:"boolean",description:"reply: send the same text as your last reply in this thread again, on purpose."},timeout_ms:{type:"number",description:"wait: how long (default 600000)."}},required:["action"]},yb={Artifact:TM,ArtifactData:EM,ArtifactComments:wM},RM={Artifact:["Make and change artifacts: typed folders of files that open as live pages the person can view, edit, comment on and export. Actions:","- quickstart {intent}: call first for a new artifact; recommends a type and returns the call that creates it.",'- list {scope: "mine" | "all" | "types", type?, query?}: find existing artifacts, or the installed types.',"- publish {type_url, title, folder?, open?}: create an artifact; the result carries its root folder and the type's instructions. publish {url, files, if_match?, check?}: write files when you have no file tools of your own.","- read {url, path? | paths?}: the artifact's record, files and actions, or some of its files with their sha256. read {type_url}: a type's instructions, before creating.",`- open {url, panel?}: show it to the person in the computer's browser (or the app, when it shows pages), once its content is written. When your app has a built-in browser, open view_url there instead. panel "share" or "export" opens its Share panel or Export tab for them.`,"- call {url, name, args?}: run one of the type's actions (check, upload, ...). A long one answers {task, pending: true}; its result comes later as a message.","- adopt {url | folder}: take over an artifact, or add an existing folder. Only when the person asks.","- share {url}: whether it is shared on the local network, and its links. Only the person changes that, in the page's Share panel.","- delete {url}: forget an artifact; its folder stays. Only when the person asks."].join(`
9
+ `).replace(HT,"")}function My(e,t){return t=Ay(t),Ay(e)===t}function dt(e,t,o,s,l,u){switch(o){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||us(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&us(e,""+s);break;case"className":br(e,"class",s);break;case"tabIndex":br(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":br(e,o,s);break;case"style":Mh(e,s,u);break;case"data":if(t!=="object"){br(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||o!=="href")){e.removeAttribute(o);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(o);break}s=Sr(""+s),e.setAttribute(o,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(o,"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 u=="function"&&(o==="formAction"?(t!=="input"&&dt(e,t,"name",l.name,l,null),dt(e,t,"formEncType",l.formEncType,l,null),dt(e,t,"formMethod",l.formMethod,l,null),dt(e,t,"formTarget",l.formTarget,l,null)):(dt(e,t,"encType",l.encType,l,null),dt(e,t,"method",l.method,l,null),dt(e,t,"target",l.target,l,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(o);break}s=Sr(""+s),e.setAttribute(o,s);break;case"onClick":s!=null&&(e.onclick=ro);break;case"onScroll":s!=null&&$e("scroll",e);break;case"onScrollEnd":s!=null&&$e("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(l.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}o=Sr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(o,""+s):e.removeAttribute(o);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":s===!0?e.setAttribute(o,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(o,s):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(o,s):e.removeAttribute(o);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(o):e.setAttribute(o,s);break;case"popover":$e("beforetoggle",e),$e("toggle",e),vr(e,"popover",s);break;case"xlinkActuate":io(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":io(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":io(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":io(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":io(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":io(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":io(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":io(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":io(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":vr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=u1.get(o)||o,vr(e,o,s))}}function Bf(e,t,o,s,l,u){switch(o){case"style":Mh(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(l.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"children":typeof s=="string"?us(e,s):(typeof s=="number"||typeof s=="bigint")&&us(e,""+s);break;case"onScroll":s!=null&&$e("scroll",e);break;case"onScrollEnd":s!=null&&$e("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ro);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!xh.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(l=o.endsWith("Capture"),t=o.slice(2,l?o.length-7:void 0),u=e[rn]||null,u=u!=null?u[o]:null,typeof u=="function"&&e.removeEventListener(t,u,l),typeof s=="function")){typeof u!="function"&&u!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(t,s,l);break e}o in e?e[o]=s:s===!0?e.setAttribute(o,""):vr(e,o,s)}}}function Zt(e,t,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",e),$e("load",e);var s=!1,l=!1,u;for(u in o)if(o.hasOwnProperty(u)){var g=o[u];if(g!=null)switch(u){case"src":s=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:dt(e,t,u,g,o,null)}}l&&dt(e,t,"srcSet",o.srcSet,o,null),s&&dt(e,t,"src",o.src,o,null);return;case"input":$e("invalid",e);var E=u=g=l=null,L=null,J=null;for(s in o)if(o.hasOwnProperty(s)){var re=o[s];if(re!=null)switch(s){case"name":l=re;break;case"type":g=re;break;case"checked":L=re;break;case"defaultChecked":J=re;break;case"value":u=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,t));break;default:dt(e,t,s,re,o,null)}}Rh(e,u,E,L,J,g,l,!1);return;case"select":$e("invalid",e),s=g=u=null;for(l in o)if(o.hasOwnProperty(l)&&(E=o[l],E!=null))switch(l){case"value":u=E;break;case"defaultValue":g=E;break;case"multiple":s=E;default:dt(e,t,l,E,o,null)}t=u,o=g,e.multiple=!!s,t!=null?cs(e,!!s,t,!1):o!=null&&cs(e,!!s,o,!0);return;case"textarea":$e("invalid",e),u=l=s=null;for(g in o)if(o.hasOwnProperty(g)&&(E=o[g],E!=null))switch(g){case"value":s=E;break;case"defaultValue":l=E;break;case"children":u=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:dt(e,t,g,E,o,null)}Ch(e,s,l,u);return;case"option":for(L in o)o.hasOwnProperty(L)&&(s=o[L],s!=null)&&(L==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":dt(e,t,L,s,o,null));return;case"dialog":$e("beforetoggle",e),$e("toggle",e),$e("cancel",e),$e("close",e);break;case"iframe":case"object":$e("load",e);break;case"video":case"audio":for(s=0;s<Hi.length;s++)$e(Hi[s],e);break;case"image":$e("error",e),$e("load",e);break;case"details":$e("toggle",e);break;case"embed":case"source":case"link":$e("error",e),$e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in o)if(o.hasOwnProperty(J)&&(s=o[J],s!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:dt(e,t,J,s,o,null)}return;default:if($c(t)){for(re in o)o.hasOwnProperty(re)&&(s=o[re],s!==void 0&&Bf(e,t,re,s,o,void 0));return}}for(E in o)o.hasOwnProperty(E)&&(s=o[E],s!=null&&dt(e,t,E,s,o,null))}function LT(e,t,o,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,u=null,g=null,E=null,L=null,J=null,re=null;for(oe in o){var ue=o[oe];if(o.hasOwnProperty(oe)&&ue!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":L=ue;default:s.hasOwnProperty(oe)||dt(e,t,oe,null,s,ue)}}for(var ee in s){var oe=s[ee];if(ue=o[ee],s.hasOwnProperty(ee)&&(oe!=null||ue!=null))switch(ee){case"type":u=oe;break;case"name":l=oe;break;case"checked":J=oe;break;case"defaultChecked":re=oe;break;case"value":g=oe;break;case"defaultValue":E=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,t));break;default:oe!==ue&&dt(e,t,ee,oe,s,ue)}}Zc(e,g,E,L,J,re,u,l);return;case"select":oe=g=E=ee=null;for(u in o)if(L=o[u],o.hasOwnProperty(u)&&L!=null)switch(u){case"value":break;case"multiple":oe=L;default:s.hasOwnProperty(u)||dt(e,t,u,null,s,L)}for(l in s)if(u=s[l],L=o[l],s.hasOwnProperty(l)&&(u!=null||L!=null))switch(l){case"value":ee=u;break;case"defaultValue":E=u;break;case"multiple":g=u;default:u!==L&&dt(e,t,l,u,s,L)}t=E,o=g,s=oe,ee!=null?cs(e,!!o,ee,!1):!!s!=!!o&&(t!=null?cs(e,!!o,t,!0):cs(e,!!o,o?[]:"",!1));return;case"textarea":oe=ee=null;for(E in o)if(l=o[E],o.hasOwnProperty(E)&&l!=null&&!s.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:dt(e,t,E,null,s,l)}for(g in s)if(l=s[g],u=o[g],s.hasOwnProperty(g)&&(l!=null||u!=null))switch(g){case"value":ee=l;break;case"defaultValue":oe=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(r(91));break;default:l!==u&&dt(e,t,g,l,s,u)}Oh(e,ee,oe);return;case"option":for(var Oe in o)ee=o[Oe],o.hasOwnProperty(Oe)&&ee!=null&&!s.hasOwnProperty(Oe)&&(Oe==="selected"?e.selected=!1:dt(e,t,Oe,null,s,ee));for(L in s)ee=s[L],oe=o[L],s.hasOwnProperty(L)&&ee!==oe&&(ee!=null||oe!=null)&&(L==="selected"?e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":dt(e,t,L,ee,s,oe));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 He in o)ee=o[He],o.hasOwnProperty(He)&&ee!=null&&!s.hasOwnProperty(He)&&dt(e,t,He,null,s,ee);for(J in s)if(ee=s[J],oe=o[J],s.hasOwnProperty(J)&&ee!==oe&&(ee!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,t));break;default:dt(e,t,J,ee,s,oe)}return;default:if($c(t)){for(var pt in o)ee=o[pt],o.hasOwnProperty(pt)&&ee!==void 0&&!s.hasOwnProperty(pt)&&Bf(e,t,pt,void 0,s,ee);for(re in s)ee=s[re],oe=o[re],!s.hasOwnProperty(re)||ee===oe||ee===void 0&&oe===void 0||Bf(e,t,re,ee,s,oe);return}}for(var K in o)ee=o[K],o.hasOwnProperty(K)&&ee!=null&&!s.hasOwnProperty(K)&&dt(e,t,K,null,s,ee);for(ue in s)ee=s[ue],oe=o[ue],!s.hasOwnProperty(ue)||ee===oe||ee==null&&oe==null||dt(e,t,ue,ee,s,oe)}function Ny(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function UT(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,o=performance.getEntriesByType("resource"),s=0;s<o.length;s++){var l=o[s],u=l.transferSize,g=l.initiatorType,E=l.duration;if(u&&E&&Ny(g)){for(g=0,E=l.responseEnd,s+=1;s<o.length;s++){var L=o[s],J=L.startTime;if(J>E)break;var re=L.transferSize,ue=L.initiatorType;re&&Ny(ue)&&(L=L.responseEnd,g+=re*(L<E?1:(E-J)/(L-J)))}if(--s,t+=8*(u+g)/(l.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 Pf=null,If=null;function gl(e){return e.nodeType===9?e:e.ownerDocument}function Dy(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 _y(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 Yf(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 qf=null;function BT(){var e=window.event;return e&&e.type==="popstate"?e===qf?!1:(qf=e,!0):(qf=null,!1)}var zy=typeof setTimeout=="function"?setTimeout:void 0,PT=typeof clearTimeout=="function"?clearTimeout:void 0,ky=typeof Promise=="function"?Promise:void 0,IT=typeof queueMicrotask=="function"?queueMicrotask:typeof ky<"u"?function(e){return ky.resolve(null).then(e).catch(YT)}:zy;function YT(e){setTimeout(function(){throw e})}function ra(e){return e==="head"}function jy(e,t){var o=t,s=0;do{var l=o.nextSibling;if(e.removeChild(o),l&&l.nodeType===8)if(o=l.data,o==="/$"||o==="/&"){if(s===0){e.removeChild(l),Is(t);return}s--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")s++;else if(o==="html")Ui(e.ownerDocument.documentElement);else if(o==="head"){o=e.ownerDocument.head,Ui(o);for(var u=o.firstChild;u;){var g=u.nextSibling,E=u.nodeName;u[ni]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&u.rel.toLowerCase()==="stylesheet"||o.removeChild(u),u=g}}else o==="body"&&Ui(e.ownerDocument.body);o=l}while(o);Is(t)}function Hy(e,t){var o=e;e=0;do{var s=o.nextSibling;if(o.nodeType===1?t?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(t?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),s&&s.nodeType===8)if(o=s.data,o==="/$"){if(e===0)break;e--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||e++;o=s}while(o)}function Vf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var o=t;switch(t=t.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Vf(o),Kc(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function qT(e,t,o,s){for(;e.nodeType===1;){var l=o;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[ni])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ln(e.nextSibling),e===null)break}return null}function VT(e,t,o){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o||(e=Ln(e.nextSibling),e===null))return null;return e}function Ly(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ln(e.nextSibling),e===null))return null;return e}function Gf(e){return e.data==="$?"||e.data==="$~"}function Xf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function GT(e,t){var o=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||o.readyState!=="loading")t();else{var s=function(){t(),o.removeEventListener("DOMContentLoaded",s)};o.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ln(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 Ff=null;function Uy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"||o==="/&"){if(t===0)return Ln(e.nextSibling);t--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||t++}e=e.nextSibling}return null}function By(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(t===0)return e;t--}else o!=="/$"&&o!=="/&"||t++}e=e.previousSibling}return null}function Py(e,t,o){switch(t=gl(o),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Kc(e)}var Un=new Map,Iy=new Set;function yl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wo=X.d;X.d={f:XT,r:FT,D:KT,C:QT,L:ZT,m:WT,X:JT,S:$T,M:eE};function XT(){var e=wo.f(),t=ll();return e||t}function FT(e){var t=is(e);t!==null&&t.tag===5&&t.type==="form"?ag(t):wo.r(e)}var Us=typeof document>"u"?null:document;function Yy(e,t,o){var s=Us;if(s&&typeof t=="string"&&t){var l=Nn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof o=="string"&&(l+='[crossorigin="'+o+'"]'),Iy.has(l)||(Iy.add(l),e={rel:e,crossOrigin:o,href:t},s.querySelector(l)===null&&(t=s.createElement("link"),Zt(t,"link",e),qt(t),s.head.appendChild(t)))}}function KT(e){wo.D(e),Yy("dns-prefetch",e,null)}function QT(e,t){wo.C(e,t),Yy("preconnect",e,t)}function ZT(e,t,o){wo.L(e,t,o);var s=Us;if(s&&e&&t){var l='link[rel="preload"][as="'+Nn(t)+'"]';t==="image"&&o&&o.imageSrcSet?(l+='[imagesrcset="'+Nn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(l+='[imagesizes="'+Nn(o.imageSizes)+'"]')):l+='[href="'+Nn(e)+'"]';var u=l;switch(t){case"style":u=Bs(e);break;case"script":u=Ps(e)}Un.has(u)||(e=x({rel:"preload",href:t==="image"&&o&&o.imageSrcSet?void 0:e,as:t},o),Un.set(u,e),s.querySelector(l)!==null||t==="style"&&s.querySelector(Bi(u))||t==="script"&&s.querySelector(Pi(u))||(t=s.createElement("link"),Zt(t,"link",e),qt(t),s.head.appendChild(t)))}}function WT(e,t){wo.m(e,t);var o=Us;if(o&&e){var s=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Nn(s)+'"][href="'+Nn(e)+'"]',u=l;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ps(e)}if(!Un.has(u)&&(e=x({rel:"modulepreload",href:e},t),Un.set(u,e),o.querySelector(l)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Pi(u)))return}s=o.createElement("link"),Zt(s,"link",e),qt(s),o.head.appendChild(s)}}}function $T(e,t,o){wo.S(e,t,o);var s=Us;if(s&&e){var l=rs(s).hoistableStyles,u=Bs(e);t=t||"default";var g=l.get(u);if(!g){var E={loading:0,preload:null};if(g=s.querySelector(Bi(u)))E.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},o),(o=Un.get(u))&&Kf(e,o);var L=g=s.createElement("link");qt(L),Zt(L,"link",e),L._p=new Promise(function(J,re){L.onload=J,L.onerror=re}),L.addEventListener("load",function(){E.loading|=1}),L.addEventListener("error",function(){E.loading|=2}),E.loading|=4,vl(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:E},l.set(u,g)}}}function JT(e,t){wo.X(e,t);var o=Us;if(o&&e){var s=rs(o).hoistableScripts,l=Ps(e),u=s.get(l);u||(u=o.querySelector(Pi(l)),u||(e=x({src:e,async:!0},t),(t=Un.get(l))&&Qf(e,t),u=o.createElement("script"),qt(u),Zt(u,"link",e),o.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(l,u))}}function eE(e,t){wo.M(e,t);var o=Us;if(o&&e){var s=rs(o).hoistableScripts,l=Ps(e),u=s.get(l);u||(u=o.querySelector(Pi(l)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Un.get(l))&&Qf(e,t),u=o.createElement("script"),qt(u),Zt(u,"link",e),o.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(l,u))}}function qy(e,t,o,s){var l=(l=se.current)?yl(l):null;if(!l)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(t=Bs(o.href),o=rs(l).hoistableStyles,s=o.get(t),s||(s={type:"style",instance:null,count:0,state:null},o.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){e=Bs(o.href);var u=rs(l).hoistableStyles,g=u.get(e);if(g||(l=l.ownerDocument||l,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=l.querySelector(Bi(e)))&&!u._p&&(g.instance=u,g.state.loading=5),Un.has(e)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Un.set(e,o),u||tE(l,e,o,g.state))),t&&s===null)throw Error(r(528,""));return g}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=o.async,o=o.src,typeof o=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ps(o),o=rs(l).hoistableScripts,s=o.get(t),s||(s={type:"script",instance:null,count:0,state:null},o.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Bs(e){return'href="'+Nn(e)+'"'}function Bi(e){return'link[rel="stylesheet"]['+e+"]"}function Vy(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function tE(e,t,o,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Zt(t,"link",o),qt(t),e.head.appendChild(t))}function Ps(e){return'[src="'+Nn(e)+'"]'}function Pi(e){return"script[async]"+e}function Gy(e,t,o){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Nn(o.href)+'"]');if(s)return t.instance=s,qt(s),s;var l=x({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),qt(s),Zt(s,"style",l),vl(s,o.precedence,e),t.instance=s;case"stylesheet":l=Bs(o.href);var u=e.querySelector(Bi(l));if(u)return t.state.loading|=4,t.instance=u,qt(u),u;s=Vy(o),(l=Un.get(l))&&Kf(s,l),u=(e.ownerDocument||e).createElement("link"),qt(u);var g=u;return g._p=new Promise(function(E,L){g.onload=E,g.onerror=L}),Zt(u,"link",s),t.state.loading|=4,vl(u,o.precedence,e),t.instance=u;case"script":return u=Ps(o.src),(l=e.querySelector(Pi(u)))?(t.instance=l,qt(l),l):(s=o,(l=Un.get(u))&&(s=x({},o),Qf(s,l)),e=e.ownerDocument||e,l=e.createElement("script"),qt(l),Zt(l,"link",s),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,vl(s,o.precedence,e));return t.instance}function vl(e,t,o){for(var s=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=s.length?s[s.length-1]:null,u=l,g=0;g<s.length;g++){var E=s[g];if(E.dataset.precedence===t)u=E;else if(u!==l)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=o.nodeType===9?o.head:o,t.insertBefore(e,t.firstChild))}function Kf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var bl=null;function Xy(e,t,o){if(bl===null){var s=new Map,l=bl=new Map;l.set(o,s)}else l=bl,s=l.get(o),s||(s=new Map,l.set(o,s));if(s.has(e))return s;for(s.set(e,null),o=o.getElementsByTagName(e),l=0;l<o.length;l++){var u=o[l];if(!(u[ni]||u[Xt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var E=s.get(g);E?E.push(u):s.set(g,[u])}}return s}function Fy(e,t,o){e=e.ownerDocument||e,e.head.insertBefore(o,t==="title"?e.querySelector("head > title"):null)}function nE(e,t,o){if(o===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 Ky(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function oE(e,t,o,s){if(o.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var l=Bs(s.href),u=t.querySelector(Bi(l));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=xl.bind(e),t.then(e,e)),o.state.loading|=4,o.instance=u,qt(u);return}u=t.ownerDocument||t,s=Vy(s),(l=Un.get(l))&&Kf(s,l),u=u.createElement("link"),qt(u);var g=u;g._p=new Promise(function(E,L){g.onload=E,g.onerror=L}),Zt(u,"link",s),o.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,t),(t=o.state.preload)&&(o.state.loading&3)===0&&(e.count++,o=xl.bind(e),t.addEventListener("load",o),t.addEventListener("error",o))}}var Zf=0;function aE(e,t){return e.stylesheets&&e.count===0&&Tl(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var s=setTimeout(function(){if(e.stylesheets&&Tl(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*UT());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tl(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(l)}}:null}function xl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Sl=null;function Tl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Sl=new Map,t.forEach(sE,e),Sl=null,xl.call(e))}function sE(e,t){if(!(t.state.loading&4)){var o=Sl.get(e);if(o)var s=o.get(null);else{o=new Map,Sl.set(e,o);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<l.length;u++){var g=l[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(o.set(g.dataset.precedence,g),s=g)}s&&o.set(null,s)}l=t.instance,g=l.getAttribute("data-precedence"),u=o.get(g)||s,u===s&&o.set(null,l),o.set(g,l),this.count++,s=xl.bind(this),l.addEventListener("load",s),l.addEventListener("error",s),u?u.parentNode.insertBefore(l,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Ii={$$typeof:R,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function iE(e,t,o,s,l,u,g,E,L){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bo(0),this.hiddenUpdates=Bo(null),this.identifierPrefix=s,this.onUncaughtError=l,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function Qy(e,t,o,s,l,u,g,E,L,J,re,ue){return e=new iE(e,t,o,g,L,J,re,ue,E),t=1,u===!0&&(t|=24),u=vn(3,null,null,t),e.current=u,u.stateNode=e,t=Au(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:o,cache:t},_u(u),e}function Zy(e){return e?(e=ys,e):ys}function Wy(e,t,o,s,l,u){l=Zy(l),s.context===null?s.context=l:s.pendingContext=l,s=Zo(t),s.payload={element:o},u=u===void 0?null:u,u!==null&&(s.callback=u),o=Wo(e,s,t),o!==null&&(pn(o,e,t),bi(o,e,t))}function $y(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function Wf(e,t){$y(e,t),(e=e.alternate)&&$y(e,t)}function Jy(e){if(e.tag===13||e.tag===31){var t=Ma(e,67108864);t!==null&&pn(t,e,67108864),Wf(e,67108864)}}function ev(e){if(e.tag===13||e.tag===31){var t=En();t=Yo(t);var o=Ma(e,t);o!==null&&pn(o,e,t),Wf(e,t)}}var El=!0;function rE(e,t,o,s){var l=z.T;z.T=null;var u=X.p;try{X.p=2,$f(e,t,o,s)}finally{X.p=u,z.T=l}}function lE(e,t,o,s){var l=z.T;z.T=null;var u=X.p;try{X.p=8,$f(e,t,o,s)}finally{X.p=u,z.T=l}}function $f(e,t,o,s){if(El){var l=Jf(s);if(l===null)Uf(e,t,s,wl,o),nv(e,s);else if(uE(l,e,t,o,s))s.stopPropagation();else if(nv(e,s),t&4&&-1<cE.indexOf(e)){for(;l!==null;){var u=is(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=Et(u.pendingLanes);if(g!==0){var E=u;for(E.pendingLanes|=2,E.entangledLanes|=2;g;){var L=1<<31-mt(g);E.entanglements[1]|=L,g&=~L}no(u),(rt&6)===0&&(il=fe()+500,ji(0))}}break;case 31:case 13:E=Ma(u,2),E!==null&&pn(E,u,2),ll(),Wf(u,2)}if(u=Jf(s),u===null&&Uf(e,t,s,wl,o),u===l)break;l=u}l!==null&&s.stopPropagation()}else Uf(e,t,s,null,o)}}function Jf(e){return e=eu(e),ed(e)}var wl=null;function ed(e){if(wl=null,e=ss(e),e!==null){var t=f(e);if(t===null)e=null;else{var o=t.tag;if(o===13){if(e=d(t),e!==null)return e;e=null}else if(o===31){if(e=m(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wl=e,null}function tv(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(ye()){case de:return 2;case ie:return 8;case ve:case Be:return 32;case Yt:return 268435456;default:return 32}default:return 32}}var td=!1,la=null,ca=null,ua=null,Yi=new Map,qi=new Map,fa=[],cE="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 nv(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":ua=null;break;case"pointerover":case"pointerout":Yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function Vi(e,t,o,s,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:o,eventSystemFlags:s,nativeEvent:u,targetContainers:[l]},t!==null&&(t=is(t),t!==null&&Jy(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function uE(e,t,o,s,l){switch(t){case"focusin":return la=Vi(la,e,t,o,s,l),!0;case"dragenter":return ca=Vi(ca,e,t,o,s,l),!0;case"mouseover":return ua=Vi(ua,e,t,o,s,l),!0;case"pointerover":var u=l.pointerId;return Yi.set(u,Vi(Yi.get(u)||null,e,t,o,s,l)),!0;case"gotpointercapture":return u=l.pointerId,qi.set(u,Vi(qi.get(u)||null,e,t,o,s,l)),!0}return!1}function ov(e){var t=ss(e.target);if(t!==null){var o=f(t);if(o!==null){if(t=o.tag,t===13){if(t=d(o),t!==null){e.blockedOn=t,yr(e.priority,function(){ev(o)});return}}else if(t===31){if(t=m(o),t!==null){e.blockedOn=t,yr(e.priority,function(){ev(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=Jf(e.nativeEvent);if(o===null){o=e.nativeEvent;var s=new o.constructor(o.type,o);Jc=s,o.target.dispatchEvent(s),Jc=null}else return t=is(o),t!==null&&Jy(t),e.blockedOn=o,!1;t.shift()}return!0}function av(e,t,o){Rl(e)&&o.delete(t)}function fE(){td=!1,la!==null&&Rl(la)&&(la=null),ca!==null&&Rl(ca)&&(ca=null),ua!==null&&Rl(ua)&&(ua=null),Yi.forEach(av),qi.forEach(av)}function Ol(e,t){e.blockedOn===t&&(e.blockedOn=null,td||(td=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,fE)))}var Cl=null;function sv(e){Cl!==e&&(Cl=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Cl===e&&(Cl=null);for(var t=0;t<e.length;t+=3){var o=e[t],s=e[t+1],l=e[t+2];if(typeof s!="function"){if(ed(s||o)===null)continue;break}var u=is(o);u!==null&&(e.splice(t,3),t-=3,$u(u,{pending:!0,data:l,method:o.method,action:s},s,l))}}))}function Is(e){function t(L){return Ol(L,e)}la!==null&&Ol(la,e),ca!==null&&Ol(ca,e),ua!==null&&Ol(ua,e),Yi.forEach(t),qi.forEach(t);for(var o=0;o<fa.length;o++){var s=fa[o];s.blockedOn===e&&(s.blockedOn=null)}for(;0<fa.length&&(o=fa[0],o.blockedOn===null);)ov(o),o.blockedOn===null&&fa.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(s=0;s<o.length;s+=3){var l=o[s],u=o[s+1],g=l[rn]||null;if(typeof u=="function")g||sv(o);else if(g){var E=null;if(u&&u.hasAttribute("formAction")){if(l=u,g=u[rn]||null)E=g.formAction;else if(ed(l)!==null)continue}else E=g.action;typeof E=="function"?o[s+1]=E:(o.splice(s,3),s-=3),sv(o)}}}function iv(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return l=g})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),s||setTimeout(o,20)}function o(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(o,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function nd(e){this._internalRoot=e}Al.prototype.render=nd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var o=t.current,s=En();Wy(o,s,e,t,null,null)},Al.prototype.unmount=nd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wy(e.current,2,null,e,null,null),ll(),t[as]=null}};function Al(e){this._internalRoot=e}Al.prototype.unstable_scheduleHydration=function(e){if(e){var t=gr();e={blockedOn:null,target:e,priority:t};for(var o=0;o<fa.length&&t!==0&&t<fa[o].priority;o++);fa.splice(o,0,e),o===0&&ov(e)}};var rv=a.version;if(rv!=="19.2.4")throw Error(r(527,rv,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=h(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var dE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ml.isDisabled&&Ml.supportsFiber)try{xe=Ml.inject(dE),qe=Ml}catch{}}return Xi.createRoot=function(e,t){if(!c(e))throw Error(r(299));var o=!1,s="",l=hg,u=mg,g=gg;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Qy(e,1,!1,null,null,o,s,null,l,u,g,iv),e[as]=t.current,Lf(e),new nd(t)},Xi.hydrateRoot=function(e,t,o){if(!c(e))throw Error(r(299));var s=!1,l="",u=hg,g=mg,E=gg,L=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(l=o.identifierPrefix),o.onUncaughtError!==void 0&&(u=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(E=o.onRecoverableError),o.formState!==void 0&&(L=o.formState)),t=Qy(e,1,!0,t,o??null,s,l,L,u,g,E,iv),t.context=Zy(null),o=t.current,s=En(),s=Yo(s),l=Zo(s),l.callback=null,Wo(o,l,s),o=s,t.current.lanes=o,An(t,o),no(t),e[as]=t.current,Lf(e),new Al(t)},Xi.version="19.2.4",Xi}var yv;function wE(){if(yv)return sd.exports;yv=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(a){console.error(a)}}return n(),sd.exports=EE(),sd.exports}var RE=wE();function Bb(n){var a,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(a=0;a<c;a++)n[a]&&(i=Bb(n[a]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function OE(){for(var n,a,i=0,r="",c=arguments.length;i<c;i++)(n=arguments[i])&&(a=Bb(n))&&(r&&(r+=" "),r+=a);return r}function Mt(...n){return OE(n)}const vv={};function en(n,a){const i=b.useRef(vv);return i.current===vv&&(i.current=n(a)),i}const zd=[];let kd;function CE(){return kd}function AE(n){zd.push(n)}function cr(n){const a=(i,r)=>{const c=en(ME).current;let f;try{kd=c;for(const d of zd)d.before(c);f=n(i,r);for(const d of zd)d.after(c);c.didInitialize=!0}finally{kd=void 0}return f};return a.displayName=n.displayName||n.name,a}function ap(n){return b.forwardRef(cr(n))}function ME(){return{didInitialize:!1}}function sp(){}const _o=Object.freeze([]),wt=Object.freeze({}),NE=()=>{},Ee=typeof document<"u"?b.useLayoutEffect:NE;function DE(n,a){return function(r,...c){const f=new URL(n);return f.searchParams.set("code",r.toString()),c.forEach(d=>f.searchParams.append("args[]",d)),`${a} error #${r}; visit ${f} for the full message.`}}const Bt=DE("https://base-ui.com/production-error","Base UI"),Pb=b.createContext(void 0);function ic(n){const a=b.useContext(Pb);if(a===void 0&&!n)throw new Error(Bt(72));return a}function rc(n){b.useEffect(n,_o)}const Fi=0;class mn{static create(){return new mn}currentId=Fi;start(a,i){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Fi,i()},a)}isStarted(){return this.currentId!==Fi}clear=()=>{this.currentId!==Fi&&(clearTimeout(this.currentId),this.currentId=Fi)};disposeEffect=()=>this.clear}function tn(){const n=en(mn.create).current;return rc(n.disposeEffect),n}function _E(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:zE,platform:kE,maxTouchPoints:jE}=_E(),lc=zE.toLowerCase(),nr=kE.toLowerCase(),cc=/^i(os$|p)/.test(nr)||nr==="macintel"&&jE>1,bv="android",jd=nr===bv||lc.includes(bv),ip=!cc&&nr.startsWith("mac");nr.startsWith("win");const HE=ip||cc,ba=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ba&&lc.includes("firefox");!ba&&lc.includes("chrom");const Ib=HE,rp=/jsdom|happydom/.test(lc);function oo(n){n.preventDefault(),n.stopPropagation()}function LE(n){return"nativeEvent"in n}function lp(n){return n.pointerType===""&&n.isTrusted?!0:jd&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function cp(n){return rp?!1:!jd&&n.width===0&&n.height===0||jd&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function ma(n,a){const i=["mouse","pen"];return a||i.push("",void 0),i.includes(n)}function UE(n){const a=n.type;return a==="click"||a==="mousedown"||a==="keydown"||a==="keyup"}function uc(){return typeof window<"u"}function $t(n){return up(n)?(n.nodeName||"").toLowerCase():"#document"}function xt(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function Uo(n){var a;return(a=(up(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function up(n){return uc()?n instanceof Node||n instanceof xt(n).Node:!1}function Je(n){return uc()?n instanceof Element||n instanceof xt(n).Element:!1}function ut(n){return uc()?n instanceof HTMLElement||n instanceof xt(n).HTMLElement:!1}function Qs(n){return!uc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof xt(n).ShadowRoot}function ur(n){const{overflow:a,overflowX:i,overflowY:r,display:c}=wn(n);return/auto|scroll|overlay|hidden|clip/.test(a+r+i)&&c!=="inline"&&c!=="contents"}function BE(n){return/^(table|td|th)$/.test($t(n))}function fc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const PE=/transform|translate|scale|rotate|perspective|filter/,IE=/paint|layout|strict|content/,Ya=n=>!!n&&n!=="none";let cd;function fp(n){const a=Je(n)?wn(n):n;return Ya(a.transform)||Ya(a.translate)||Ya(a.scale)||Ya(a.rotate)||Ya(a.perspective)||!dp()&&(Ya(a.backdropFilter)||Ya(a.filter))||PE.test(a.willChange||"")||IE.test(a.contain||"")}function YE(n){let a=zo(n);for(;ut(a)&&!Co(a);){if(fp(a))return a;if(fc(a))return null;a=zo(a)}return null}function dp(){return cd==null&&(cd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),cd}function Co(n){return/^(html|body|#document)$/.test($t(n))}function wn(n){return xt(n).getComputedStyle(n)}function dc(n){return Je(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function zo(n){if($t(n)==="html")return n;const a=n.assignedSlot||n.parentNode||Qs(n)&&n.host||Uo(n);return Qs(a)?a.host:a}function Yb(n){const a=zo(n);return Co(a)?(n.ownerDocument||n).body:ut(a)&&ur(a)?a:Yb(a)}function or(n,a,i){var r;a===void 0&&(a=[]),i===void 0&&(i=!0);const c=Yb(n),f=c===((r=n.ownerDocument)==null?void 0:r.body),d=xt(c);if(f){const m=Hd(d);return a.concat(d,d.visualViewport||[],ur(c)?c:[],m&&i?or(m):[])}else return a.concat(c,or(c,[],i))}function Hd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function It(n){let a=n.activeElement;for(;a?.shadowRoot?.activeElement!=null;)a=a.shadowRoot.activeElement;return a}function De(n,a){if(!n||!a)return!1;const i=a.getRootNode?.();if(n.contains(a))return!0;if(i&&Qs(i)){let r=a;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function Tt(n){return"composedPath"in n?n.composedPath()[0]??n.target:n.target}const Ld="data-base-ui-focusable",qb="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",pc="ArrowLeft",hc="ArrowRight",Vb="ArrowUp",pp="ArrowDown",Gb="data-starting-style",qE="data-ending-style",VE={[Gb]:""},GE={[qE]:""},hp={transitionStatus(n){return n==="starting"?VE:n==="ending"?GE:null}},XE="data-open",FE="data-closed",KE="data-anchor-hidden",Xb="data-popup-open",QE="data-pressed",ZE={[Xb]:""},WE={[Xb]:"",[QE]:""},$E={[XE]:""},JE={[FE]:""},ew={[KE]:""},mp={open(n){return n?ZE:null}},Ud={open(n){return n?WE:null}},mc={open(n){return n?$E:JE},anchorHidden(n){return n?ew:null}},gc={...mc,...hp},Bd="data-trigger-disabled";function Gl(n,a){if(!Je(n))return!1;const i=n;if(a.hasElement(i))return!i.hasAttribute(Bd);for(const[,r]of a.entries())if(De(r,i))return!r.hasAttribute(Bd);return!1}function ud(n,a){if(a==null)return!1;if("composedPath"in n)return n.composedPath().includes(a);const i=n;return i.target!=null&&a.contains(i.target)}function tw(n){return n.matches("html,body")}function yc(n){return ut(n)&&n.matches(qb)}function nw(n){return n?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${qb}`)!=null}function Pd(n){return n?n.getAttribute("role")==="combobox"&&yc(n):!1}function Xl(n){if(!n||rp)return!0;try{return n.matches(":focus-visible")}catch{return!0}}function Id(n){return n?n.hasAttribute(Ld)?n:n.querySelector(`[${Ld}]`)||n:null}function ow(n,a){return a!=null&&!ma(a)?0:typeof n=="function"?n():n}function Ka(n,a,i){const r=ow(n,i);return typeof r=="number"?r:r?.[a]}function xv(n){return typeof n=="function"?n():n}function Fb(n,a){return a||n==="click"||n==="mousedown"}function aw(n){return n?.includes("mouse")&&n!=="mousedown"}const vc="none",ko="trigger-press",At="trigger-hover",Gs="trigger-focus",gp="outside-press",Kb="item-press",Qb="close-press",Qa="focus-out",fr="escape-key",Fl="list-navigation",sw="cancel-open",Zi="sibling-open",iw="disabled",bc="imperative-action";function Ke(n,a,i,r){let c=!1,f=!1;const d=wt;return{reason:n,event:a??new Event("base-ui"),cancel(){c=!0},allowPropagation(){f=!0},get isCanceled(){return c},get isPropagationAllowed(){return f},trigger:i,...d}}const Zb=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new mn,currentIdRef:{current:null},currentContextRef:{current:null}});function rw(n,a){n.current=a.current}function lw(n){const{children:a,delay:i,timeoutMs:r=0}=n,c=b.useRef(i),f=b.useRef(i),d=b.useRef(null),m=b.useRef(null),p=tn();return Ee(()=>{if(f.current=i,!d.current){c.current=i;return}c.current={open:Ka(c.current,"open"),close:Ka(i,"close")}},[i,d,c,f]),y.jsx(Zb.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:c,initialDelayRef:f,currentIdRef:d,timeoutMs:r,currentContextRef:m,timeout:p}),[r,p]),children:a})}function cw(n,a={open:!1}){const{open:i}=a,r="rootStore"in n?n.rootStore:n,c=r.useState("floatingId"),f=b.useContext(Zb),{currentIdRef:d,delayRef:m,timeoutMs:p,initialDelayRef:h,currentContextRef:v,hasProvider:x,timeout:S}=f,[T,w]=b.useState(!1),C=b.useRef(i);return Ee(()=>{C.current=i},[i]),Ee(()=>{function M(){v.current?.setIsInstantPhase(!1),d.current=null,v.current=null,m.current=h.current,S.clear()}if(d.current&&!i&&d.current===c){if(w(!1),p){const O=c;return S.start(p,()=>{r.select("open")||d.current&&d.current!==O||M()}),()=>{(C.current||d.current!==O)&&S.clear()}}M()}},[i,c,d,m,p,h,v,S,r]),Ee(()=>{if(!i)return;const M=v.current,O=d.current;S.clear(),v.current={onOpenChange:r.setOpen,setIsInstantPhase:w},d.current=c,m.current={open:0,close:Ka(h.current,"close")},O!==null&&O!==c?(w(!0),M?.setIsInstantPhase(!0),M?.onOpenChange(!1,Ke(vc))):(w(!1),M?.setIsInstantPhase(!1))},[i,c,r,d,m,h,v,S]),Ee(()=>()=>{if(d.current===c){if(v.current=null,!C.current)return;d.current=null,rw(m,h),S.clear()}},[v,d,m,c,h,S]),b.useMemo(()=>({activeIdRef:d,hasProvider:x,delayRef:m,isInstantPhase:T}),[d,x,m,T])}function Ie(n,a,i,r){return n.addEventListener(a,i,r),()=>{n.removeEventListener(a,i,r)}}function Wn(...n){return()=>{for(let a=0;a<n.length;a+=1){const i=n[a];i&&i()}}}function Za(n,a,i,r){const c=en(Wb).current;return fw(c,n,a,i,r)&&$b(c,[n,a,i,r]),c.callback}function uw(n){const a=en(Wb).current;return dw(a,n)&&$b(a,n),a.callback}function Wb(){return{callback:null,cleanup:null,refs:[]}}function fw(n,a,i,r,c){return n.refs[0]!==a||n.refs[1]!==i||n.refs[2]!==r||n.refs[3]!==c}function dw(n,a){return n.refs.length!==a.length||n.refs.some((i,r)=>i!==a[r])}function $b(n,a){if(n.refs=a,a.every(i=>i==null)){n.callback=null;return}n.callback=i=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),i!=null){const r=Array(a.length).fill(null);for(let c=0;c<a.length;c+=1){const f=a[c];if(f!=null)switch(typeof f){case"function":{const d=f(i);typeof d=="function"&&(r[c]=d);break}case"object":{f.current=i;break}}}n.cleanup=()=>{for(let c=0;c<a.length;c+=1){const f=a[c];if(f!=null)switch(typeof f){case"function":{const d=r[c];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}function Ut(n){const a=en(pw,n).current;return a.next=n,Ee(a.effect),a}function pw(n){const a={current:n,next:n,effect:()=>{a.current=a.next}};return a}const yp={...bE},fd=yp.useInsertionEffect,hw=fd&&fd!==yp.useLayoutEffect?fd:n=>n();function Ce(n){const a=en(mw).current;return a.next=n,hw(a.effect),a.trampoline}function mw(){const n={next:void 0,callback:gw,trampoline:(...a)=>n.callback?.(...a),effect:()=>{n.callback=n.next}};return n}function gw(){}const Nl=null;class yw{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=a=>{this.isScheduled=!1;const i=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let c=0;c<i.length;c+=1)i[c]?.(a)};request(a){const i=this.nextId;return this.nextId+=1,this.callbacks.push(a),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),i}cancel(a){const i=a-this.startId;i<0||i>=this.callbacks.length||this.callbacks[i]!==null&&(this.callbacks[i]=null,this.callbacksCount-=1)}}let Dl=new yw;class ao{static create(){return new ao}static request(a){return Dl.request(a)}static cancel(a){return Dl.cancel(a)}currentId=Nl;request(a){this.cancel(),this.currentId=Dl.request(()=>{this.currentId=Nl,a()})}cancel=()=>{this.currentId!==Nl&&(Dl.cancel(this.currentId),this.currentId=Nl)};disposeEffect=()=>this.cancel}function ar(){const n=en(ao.create).current;return rc(n.disposeEffect),n}function Qe(n){return n?.ownerDocument||document}const vw={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Jb={...vw,position:"fixed",top:0,left:0},jo=b.forwardRef(function(a,i){const[r,c]=b.useState();Ee(()=>{Ib&&ba&&c("button")},[]);const f={tabIndex:0,role:r};return y.jsx("span",{...a,ref:i,style:Jb,"aria-hidden":r?void 0:!0,...f,"data-base-ui-focus-guard":""})}),Zs=Math.min,Ao=Math.max,Kl=Math.round,_l=Math.floor,Mo=n=>({x:n,y:n}),bw={left:"right",right:"left",bottom:"top",top:"bottom"};function e0(n,a,i){return Ao(n,Zs(a,i))}function ya(n,a){return typeof n=="function"?n(a):n}function In(n){return n.split("-")[0]}function Ho(n){return n.split("-")[1]}function vp(n){return n==="x"?"y":"x"}function bp(n){return n==="y"?"height":"width"}function Bn(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function xp(n){return vp(Bn(n))}function xw(n,a,i){i===void 0&&(i=!1);const r=Ho(n),c=xp(n),f=bp(c);let d=c==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[f]>a.floating[f]&&(d=Ql(d)),[d,Ql(d)]}function Sw(n){const a=Ql(n);return[Yd(n),a,Yd(a)]}function Yd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Sv=["left","right"],Tv=["right","left"],Tw=["top","bottom"],Ew=["bottom","top"];function ww(n,a,i){switch(n){case"top":case"bottom":return i?a?Tv:Sv:a?Sv:Tv;case"left":case"right":return a?Tw:Ew;default:return[]}}function Rw(n,a,i,r){const c=Ho(n);let f=ww(In(n),i==="start",r);return c&&(f=f.map(d=>d+"-"+c),a&&(f=f.concat(f.map(Yd)))),f}function Ql(n){const a=In(n);return bw[a]+n.slice(a.length)}function Ow(n){var a,i,r,c;return{top:(a=n.top)!=null?a:0,right:(i=n.right)!=null?i:0,bottom:(r=n.bottom)!=null?r:0,left:(c=n.left)!=null?c:0}}function t0(n){return typeof n!="number"?Ow(n):{top:n,right:n,bottom:n,left:n}}function Zl(n){const{x:a,y:i,width:r,height:c}=n;return{width:r,height:c,top:i,left:a,right:a+r,bottom:i+c,x:a,y:i}}function $i(n,a){return a<0||a>=n.length}function Il(n,a){return Oo(n.current,{disabledIndices:a})}function qd(n,a){return Oo(n.current,{decrement:!0,startingIndex:n.current.length,disabledIndices:a})}function Oo(n,{startingIndex:a=-1,decrement:i=!1,disabledIndices:r,amount:c=1}={}){let f=a;do f+=i?-c:c;while(f>=0&&f<=n.length-1&&Xs(n,f,r));return f}function Xs(n,a,i){if(typeof i=="function"?i(a):i?.includes(a)??!1)return!0;const c=n[a];return c?!xc(c)||c.matches(":disabled")?!0:!i&&(c.hasAttribute("disabled")||c.getAttribute("aria-disabled")==="true"):!1}function Cw(n){return n.visibility==="hidden"||n.visibility==="collapse"}function xc(n,a=n?wn(n):null){return!n||!n.isConnected||!a||Cw(a)?!1:typeof n.checkVisibility=="function"?n.checkVisibility():a.display!=="none"&&a.display!=="contents"}const Aw='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function Mw(n){const a=n.assignedSlot;if(a)return a;if(n.parentElement)return n.parentElement;const i=n.getRootNode();return Qs(i)?i.host:null}function Vd(n){for(const a of Array.from(n.children))if($t(a)==="summary")return a;return null}function Nw(n,a){const i=Vd(a);return!!i&&(n===i||De(i,n))}function n0(n){const a=n?$t(n):"";return n!=null&&n.matches(Aw)&&(a!=="summary"||n.parentElement!=null&&$t(n.parentElement)==="details"&&Vd(n.parentElement)===n)&&(a!=="details"||Vd(n)==null)&&(a!=="input"||n.type!=="hidden")}function o0(n){if(!n0(n)||!n.isConnected||n.matches(":disabled"))return!1;for(let a=n;a;a=Mw(a)){const i=a!==n,r=$t(a)==="slot";if(a.hasAttribute("inert")||i&&$t(a)==="details"&&!a.open&&!Nw(n,a)||a.hasAttribute("hidden")||!r&&!Dw(a,i))return!1}return!0}function Dw(n,a){const i=wn(n);return a?i.display!=="none":xc(n,i)}function a0(n){const a=n.tabIndex;if(a<0){const i=$t(n);if(i==="details"||i==="audio"||i==="video"||ut(n)&&n.isContentEditable)return 0}return a}function dd(n){if($t(n)!=="input")return null;const a=n;return a.type==="radio"&&a.name!==""?a:null}function _w(n,a){const i=dd(n);if(!i)return!0;const r=a.find(c=>{const f=dd(c);return f?.name===i.name&&f.form===i.form&&f.checked});return r?r===i:a.find(c=>{const f=dd(c);return f?.name===i.name&&f.form===i.form})===i}function s0(n){if(ut(n)&&$t(n)==="slot"){const a=n.assignedElements({flatten:!0});if(a.length>0)return a}return ut(n)&&n.shadowRoot?Array.from(n.shadowRoot.children):Array.from(n.children)}function i0(n,a){s0(n).forEach(i=>{n0(i)&&a.push(i),i0(i,a)})}function r0(n,a,i){s0(n).forEach(r=>{ut(r)&&r.matches(a)&&i.push(r),r0(r,a,i)})}function Sp(n){return o0(n)&&a0(n)>=0}function l0(n){const a=[];return i0(n,a),a.filter(o0)}function dr(n){const a=l0(n);return a.filter(i=>a0(i)>=0&&_w(i,a))}function c0(n,a){const i=dr(n),r=i.length;if(r===0)return;const c=It(Qe(n)),f=i.indexOf(c),d=f===-1?a===1?0:r-1:f+a;return i[d]}function Tp(n){return c0(Qe(n).body,1)||n}function u0(n){return c0(Qe(n).body,-1)||n}function f0(n,a){if(!n)return null;const i=dr(Qe(n).body),r=i.length;if(r===0)return null;const c=i.indexOf(n);if(c===-1)return null;const f=(c+a+r)%r;return i[f]}function zw(n){return f0(n,1)}function kw(n){return f0(n,-1)}function Fs(n,a){const i=a||n.currentTarget,r=n.relatedTarget;return!r||!De(i,r)}function jw(n){dr(n).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function Ev(n){const a=[];r0(n,"[data-tabindex]",a),a.forEach(i=>{const r=i.dataset.tabindex;delete i.dataset.tabindex,r?i.setAttribute("tabindex",r):i.removeAttribute("tabindex")})}function va(n,a,i=!0){return n.filter(c=>c.parentId===a).flatMap(c=>[...!i||c.context?.open?[c]:[],...va(n,c.id,i)])}function wv(n,a){let i=[],r=n.find(c=>c.id===a)?.parentId;for(;r;){const c=n.find(f=>f.id===r);r=c?.parentId,c&&(i=i.concat(c))}return i}function sr(n){return`data-base-ui-${n}`}let zl=0;function Yl(n,a={}){const{preventScroll:i=!1,sync:r=!1,shouldFocus:c}=a;cancelAnimationFrame(zl);function f(){c&&!c()||n?.focus({preventScroll:i})}if(r)return f(),sp;const d=requestAnimationFrame(f);return zl=d,()=>{zl===d&&(cancelAnimationFrame(d),zl=0)}}const pd={inert:new WeakMap,"aria-hidden":new WeakMap},Rv="data-base-ui-inert",Gd={inert:new WeakSet,"aria-hidden":new WeakSet};let Ki=new WeakMap,hd=0;function Hw(n){return Gd[n]}function d0(n){return n?Qs(n)?n.host:d0(n.parentNode):null}const Ov=(n,a)=>a.map(i=>{if(n.contains(i))return i;const r=d0(i);return n.contains(r)?r:null}).filter(i=>i!=null),Cv=n=>{const a=new Set;return n.forEach(i=>{let r=i;for(;r&&!a.has(r);)a.add(r),r=r.parentNode}),a},Av=(n,a,i)=>{const r=[],c=f=>{!f||i.has(f)||Array.from(f.children).forEach(d=>{$t(d)!=="script"&&(a.has(d)?c(d):r.push(d))})};return c(n),r};function Lw(n,a,i,r,{mark:c=!0}){let f=null;r?f="inert":i&&(f="aria-hidden");let d=null,m=null;const p=Ov(a,n),h=c?Av(a,Cv(p),new Set(p)):[],v=[],x=[];if(f){const S=pd[f],T=Hw(f);m=T,d=S;const w=Ov(a,Array.from(a.querySelectorAll("[aria-live]"))),C=p.concat(w);Av(a,Cv(C),new Set(C)).forEach(O=>{const N=O.getAttribute(f),R=N!==null&&N!=="false",D=(S.get(O)||0)+1;S.set(O,D),v.push(O),D===1&&R&&T.add(O),R||O.setAttribute(f,f==="inert"?"":"true")})}return c&&h.forEach(S=>{const T=(Ki.get(S)||0)+1;Ki.set(S,T),x.push(S),T===1&&S.setAttribute(Rv,"")}),hd+=1,()=>{d&&v.forEach(S=>{const w=(d.get(S)||0)-1;d.set(S,w),w||(!m?.has(S)&&f&&S.removeAttribute(f),m?.delete(S))}),c&&x.forEach(S=>{const T=(Ki.get(S)||0)-1;Ki.set(S,T),T||S.removeAttribute(Rv)}),hd-=1,hd||(pd.inert=new WeakMap,pd["aria-hidden"]=new WeakMap,Gd.inert=new WeakSet,Gd["aria-hidden"]=new WeakSet,Ki=new WeakMap)}}function Mv(n,a={}){const{ariaHidden:i=!1,inert:r=!1,mark:c=!0}=a,f=Qe(n[0]).body;return Lw(n,f,i,r,{mark:c})}var Yn=Ub();let Nv=0;function Uw(n,a="mui"){const[i,r]=b.useState(n),c=n||i;return b.useEffect(()=>{i==null&&(Nv+=1,r(`${a}-${Nv}`))},[i,a]),c}const Dv=yp.useId;function Wa(n,a){if(Dv!==void 0){const i=Dv();return n??(a?`${a}-${i}`:i)}return Uw(n,a)}const Bw=parseInt(b.version,10);function Ep(n){return Bw>=n}function _v(n){if(!b.isValidElement(n))return null;const a=n,i=a.props;return(Ep(19)?i?.ref:a.ref)??null}function Xd(n,a){if(n&&!a)return n;if(!n&&a)return a;if(n||a)return{...n,...a}}function Pw(n,a){const i={};for(const r in n){const c=n[r];if(a?.hasOwnProperty(r)){const f=a[r](c);f!=null&&Object.assign(i,f);continue}c===!0?i[`data-${r.toLowerCase()}`]="":c&&(i[`data-${r.toLowerCase()}`]=c.toString())}return i}function Iw(n,a){return typeof n=="function"?n(a):n}function Yw(n,a){return typeof n=="function"?n(a):n}const wp={};function No(n,a,i,r,c){if(!i&&!r&&!c&&!n)return Wl(a);let f=Wl(n);return a&&(f=Wi(f,a)),i&&(f=Wi(f,i)),r&&(f=Wi(f,r)),c&&(f=Wi(f,c)),f}function qw(n){if(n.length===0)return wp;if(n.length===1)return Wl(n[0]);let a=Wl(n[0]);for(let i=1;i<n.length;i+=1)a=Wi(a,n[i]);return a}function Wl(n){return Rp(n)?{...h0(n,wp)}:Vw(n)}function Wi(n,a){return Rp(a)?h0(a,n):Gw(n,a)}function Vw(n){const a={...n};for(const i in a){const r=a[i];p0(i,r)&&(a[i]=m0(r))}return a}function Gw(n,a){if(!a)return n;for(const i in a){const r=a[i];switch(i){case"style":{n[i]=Xd(n.style,r);break}case"className":{n[i]=g0(n.className,r);break}default:p0(i,r)?n[i]=Xw(n[i],r):n[i]=r}}return n}function p0(n,a){const i=n.charCodeAt(0),r=n.charCodeAt(1),c=n.charCodeAt(2);return i===111&&r===110&&c>=65&&c<=90&&(typeof a=="function"||typeof a>"u")}function Rp(n){return typeof n=="function"}function h0(n,a){return Rp(n)?n(a):n??wp}function Xw(n,a){return a?n?(...i)=>{const r=i[0];if(y0(r)){const f=r;$l(f);const d=a(...i);return f.baseUIHandlerPrevented||n?.(...i),d}const c=a(...i);return n?.(...i),c}:m0(a):n}function m0(n){return n&&((...a)=>{const i=a[0];return y0(i)&&$l(i),n(...a)})}function $l(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function g0(n,a){return a?n?a+" "+n:a:n}function y0(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function yt(n,a,i={}){let r=a.render;i.enabled!==!1&&(r=Zw(r));const c=Fw(a,i,r);if(i.enabled===!1)return null;const f=i.state??wt;return Ww(n,r,c,f)}function Fw(n,a,i){const{className:r,style:c}=n,{state:f=wt,ref:d,props:m,stateAttributesMapping:p,enabled:h=!0}=a,v=h?Iw(r,f):void 0,x=h?Yw(c,f):void 0,S=h?Pw(f,p):wt,T=h&&m?Kw(m):void 0,w=h?Xd(S,T)??{}:wt;return typeof document<"u"&&(h?Array.isArray(d)?w.ref=uw([w.ref,_v(i),...d]):w.ref=Za(w.ref,_v(i),d):Za(null,null)),h?(v!==void 0&&(w.className=g0(w.className,v)),x!==void 0&&(w.style=Xd(w.style,x)),w):wt}function Kw(n){return Array.isArray(n)?qw(n):No(void 0,n)}const Qw=Symbol.for("react.lazy");function Zw(n){if(n?.$$typeof!==Qw)return n;const a=b.Children.toArray(n)[0];return b.isValidElement(a)?a:n}function Ww(n,a,i,r){if(a){if(typeof a=="function")return a(i,r);const c=No(i,a.props);return c.ref=i.ref,b.cloneElement(a,c)}if(n&&typeof n=="string")return $w(n,i);throw new Error(Bt(8))}function $w(n,a){return n==="button"?b.createElement("button",{type:"button",...a,key:a.key}):n==="img"?b.createElement("img",{alt:"",...a,key:a.key}):b.createElement(n,a)}const Jw=500,v0=500,eR={style:{transition:"none"}},b0="data-base-ui-click-trigger",tR="data-base-ui-swipe-ignore",nR="data-swipe-ignore",oR=`[${tR}]`,aR=`[${nR}]`,sR={fallbackAxisSide:"none"},Op={fallbackAxisSide:"end"},iR={clipPath:"inset(50%)",position:"fixed",top:0,left:0},x0=b.createContext(null),S0=()=>b.useContext(x0),rR=sr("portal");function T0(n={}){const{ref:a,container:i,componentProps:r=wt,elementProps:c}=n,f=Wa(),m=S0()?.portalNode,[p,h]=b.useState(null),[v,x]=b.useState(null),S=Ce(M=>{M!==null&&x(M)}),T=b.useRef(null);Ee(()=>{if(i===null){T.current&&(T.current=null,x(null),h(null));return}const M=(i&&(up(i)?i:i.current))??m??document.body;if(M==null){T.current&&(T.current=null,x(null),h(null));return}T.current!==M&&(T.current=M,x(null),h(M))},[i,m]);const w=yt("div",r,{ref:[a,S],props:[{id:f,[rR]:""},c]}),C=p&&w?Yn.createPortal(w,p):null;return{node:v,nodeId:b.isValidElement(w)?w.props.id:void 0,subtree:C}}const Cp=b.forwardRef(function(a,i){const{render:r,className:c,style:f,children:d,container:m,portalOwnerRole:p,...h}=a,{node:v,nodeId:x,subtree:S}=T0({container:m,ref:i,componentProps:a,elementProps:h}),T=b.useRef(null),w=b.useRef(null),C=b.useRef(null),M=b.useRef(null),[O,N]=b.useState(null),R=b.useRef(!1),D=O?.modal,k=O?.open,B=!!O&&!O.modal&&O.open&&!!v;b.useEffect(()=>{if(!v||D)return;function U(Y){v&&Y.relatedTarget&&Fs(Y)&&(Y.type==="focusin"?R.current&&(Ev(v),R.current=!1):(jw(v),R.current=!0))}return Wn(Ie(v,"focusin",U,!0),Ie(v,"focusout",U,!0))},[v,D]),Ee(()=>{!v||k!==!0||!R.current||(Ev(v),R.current=!1)},[k,v]);const j=b.useMemo(()=>({beforeOutsideRef:T,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:M,portalNode:v,setFocusManagerState:N}),[v]);return y.jsxs(b.Fragment,{children:[S,y.jsxs(x0.Provider,{value:j,children:[B&&v&&y.jsx(jo,{"data-type":"outside",ref:T,onFocus:U=>{if(Fs(U,v))C.current?.focus();else{const Y=O?O.domReference:null;u0(Y)?.focus()}}}),B&&v&&y.jsx("span",{role:p,"aria-owns":x,style:iR}),v&&Yn.createPortal(d,v),B&&v&&y.jsx(jo,{"data-type":"outside",ref:w,onFocus:U=>{if(Fs(U,v))M.current?.focus();else{const Y=O?O.domReference:null;Tp(Y)?.focus(),O?.closeOnFocusOut&&O?.onOpenChange(!1,Ke(Qa,U.nativeEvent))}}})]})]})});function E0(){const n=new Map;return{emit(a,i){n.get(a)?.forEach(r=>r(i))},on(a,i){n.has(a)||n.set(a,new Set),n.get(a).add(i)},off(a,i){n.get(a)?.delete(i)}}}class Ap{nodesRef={current:[]};events=E0();addNode(a){this.nodesRef.current.push(a)}removeNode(a){const i=this.nodesRef.current.findIndex(r=>r===a);i!==-1&&this.nodesRef.current.splice(i,1)}}const w0=b.createContext(null),R0=b.createContext(null),Ja=()=>b.useContext(w0)?.id||null,xa=n=>{const a=b.useContext(R0);return n??a};function Mp(n){const a=Wa(),i=xa(n),r=Ja();return Ee(()=>{if(!a)return;const c={id:a,parentId:r};return i?.addNode(c),()=>{i?.removeNode(c)}},[i,a,r]),a}function O0(n){const{children:a,id:i}=n,r=Ja();return y.jsx(w0.Provider,{value:b.useMemo(()=>({id:i,parentId:r}),[i,r]),children:a})}function C0(n){const{children:a,externalTree:i}=n,r=en(()=>i??new Ap).current;return y.jsx(R0.Provider,{value:r,children:a})}function Ro(n){return n==null?n:"current"in n?n.current:n}function lR(n,a){const i=xt(Tt(n));return n instanceof i.KeyboardEvent?"keyboard":n instanceof i.FocusEvent?a||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof i.MouseEvent?a||(n.detail===0?"keyboard":"mouse"):""}const zv=20;let ha=[];function Np(){ha=ha.filter(n=>n.deref()?.isConnected)}function kv(n){Np(),n&&$t(n)!=="body"&&(ha.push(new WeakRef(n)),ha.length>zv&&(ha=ha.slice(-zv)))}function jv(){return Np(),ha[ha.length-1]?.deref()}function cR(n){return n?Sp(n)?n:dr(n)[0]||n:null}function Hv(n){if(n.hasAttribute("tabindex")&&!n.hasAttribute("data-tabindex")||!n.getAttribute("role")?.includes("dialog"))return;const i=l0(n).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return Sp(c)||c.hasAttribute("data-tabindex")&&!f.startsWith("-")}),r=n.getAttribute("tabindex");i.length===0?r!=="0"&&(n.setAttribute("tabindex","0"),n.setAttribute("data-tabindex","0")):(r!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function Dp(n){const{context:a,children:i,disabled:r=!1,initialFocus:c=!0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,closeOnFocusOut:p=!0,openInteractionType:h="",nextFocusableElement:v,previousFocusableElement:x,beforeContentFocusGuardRef:S,externalTree:T,getInsideElements:w}=n,C="rootStore"in a?a.rootStore:a,M=C.useState("open"),O=C.useState("domReferenceElement"),N=C.useState("floatingElement"),{events:R,dataRef:D}=C.context,k=Ce(()=>D.current.floatingContext?.nodeId),B=c===!1,j=Pd(O)&&B,U=Ut(c),Y=Ut(f),I=Ut(h),H=Ut(M),_=xa(T),V=S0(),te=b.useRef(!1),Q=b.useRef(!1),z=b.useRef(!1),X=b.useRef(null),F=b.useRef(""),W=b.useRef(""),ae=b.useRef(null),A=b.useRef(null),G=Za(ae,S,V?.beforeInsideRef),ne=Za(A,V?.afterInsideRef),Z=tn(),le=tn(),se=ar(),he=V!=null,pe=Id(N),ge=Ce((Re=pe)=>Re?dr(Re):[]),_e=Ce(()=>w?.().filter(Re=>Re!=null)??[]);b.useEffect(()=>{if(r||!m)return;function Re(ke){ke.key==="Tab"&&De(pe,It(Qe(pe)))&&ge().length===0&&!j&&oo(ke)}const be=Qe(pe);return Ie(be,"keydown",Re)},[r,pe,m,j,ge]),b.useEffect(()=>{if(r||!M)return;const Re=Qe(pe);function be(){z.current=!1}function ke(Ge){const Se=Tt(Ge),Ue=_e(),Te=De(N,Se)||De(O,Se)||De(V?.portalNode,Se)||Ue.some(we=>we===Se||De(we,Se));z.current=!Te,W.current=Ge.pointerType||"keyboard",Se?.closest(`[${b0}]`)&&(Q.current=!0,le.start(0,()=>{Q.current=!1}))}function Le(){W.current="keyboard"}return Wn(Ie(Re,"pointerdown",ke,!0),Ie(Re,"pointerup",be,!0),Ie(Re,"pointercancel",be,!0),Ie(Re,"keydown",Le,!0),be)},[r,N,O,pe,M,V,le,_e]),b.useEffect(()=>{if(r||!p)return;const Re=Qe(pe);function be(){Q.current=!0,le.start(0,()=>{Q.current=!1})}function ke(Ue){const Te=Tt(Ue);Sp(Te)&&(X.current=Te)}function Le(Ue){const Te=Ue.relatedTarget,we=Ue.currentTarget,Ae=Tt(Ue);m&&Te==null&&Ae!=null&&De(N,Ae)&&kv(Ae),queueMicrotask(()=>{const Ze=k(),Me=C.context.triggerElements,fe=_e(),ye=Te?.hasAttribute(sr("focus-guard"))&&[ae.current,A.current,V?.beforeInsideRef.current,V?.afterInsideRef.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,Ro(x),Ro(v)].includes(Te),de=!(De(O,Te)||De(N,Te)||De(Te,N)||De(V?.portalNode,Te)||fe.some(ie=>ie===Te||De(ie,Te))||Me.hasMatchingElement(ie=>De(ie,Te))||ye||_&&(va(_.nodesRef.current,Ze).find(ie=>De(ie.context?.elements.floating,Te)||De(ie.context?.elements.domReference,Te))||wv(_.nodesRef.current,Ze).find(ie=>[ie.context?.elements.floating,Id(ie.context?.elements.floating)].includes(Te)||ie.context?.elements.domReference===Te)));if(we===O&&pe&&Hv(pe),d&&we!==O&&!xc(Ae)&&It(Re)===Re.body){if(ut(pe)&&(pe.focus(),d==="popup")){se.request(()=>{pe.focus()});return}const ie=ge(),ve=X.current,Be=(ve&&ie.includes(ve)?ve:null)||ie[ie.length-1]||pe;ut(Be)&&Be.focus()}if(D.current.insideReactTree){D.current.insideReactTree=!1;return}(j||!m)&&Te&&de&&!Q.current&&(j||Te!==jv())&&(te.current=!0,C.setOpen(!1,Ke(Qa,Ue)))})}function Ge(){z.current||(D.current.insideReactTree=!0,Z.start(0,()=>{D.current.insideReactTree=!1}))}const Se=ut(O)?O:null;if(!(!N&&!Se))return Wn(Se&&Ie(Se,"focusout",Le),Se&&Ie(Se,"pointerdown",be),N&&Ie(N,"focusin",ke),N&&Ie(N,"focusout",Le),N&&V&&Ie(N,"focusout",Ge,!0))},[r,O,N,pe,m,_,V,C,p,d,ge,j,k,D,Z,le,se,v,x,_e]),b.useEffect(()=>{if(r||!N||!M)return;const Re=Array.from(V?.portalNode?.querySelectorAll(`[${sr("portal")}]`)||[]),ke=(_?wv(_.nodesRef.current,k()):[]).find(we=>Pd(we.context?.elements.domReference||null))?.context?.elements.domReference,Ge=[...[N,...Re,ae.current,A.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,..._e()],ke,Ro(x),Ro(v),j?O:null].filter(we=>we!=null),Se=Mv(Ge,{ariaHidden:m||j,mark:!1}),Ue=[N,...Re].filter(we=>we!=null),Te=Mv(Ue);return()=>{Te(),Se()}},[M,r,O,N,m,V,j,_,k,v,x,_e]),Ee(()=>{if(!M||r||!ut(pe))return;F.current="",W.current="";const Re=Qe(pe),be=It(Re);queueMicrotask(()=>{const ke=U.current,Le=typeof ke=="function"?ke(I.current||""):ke;if(Le===void 0||Le===!1||De(pe,be))return;let Se=null;const Ue=()=>(Se==null&&(Se=ge(pe)),Se[0]||pe);let Te;Le===!0||Le===null?Te=Ue():Te=Ro(Le),Te=Te||Ue();const we=De(pe,It(Re));Yl(Te,{preventScroll:Te===pe,shouldFocus(){if(!H.current)return!1;if(we)return!0;const Ae=It(Re);return!(Ae!==Te&&De(pe,Ae))}})})},[r,M,pe,ge,U,I,H]),Ee(()=>{if(r||!pe)return;const Re=Qe(pe),be=It(Re),ke=I.current==null;kv(be);function Le(Se){if(Se.open||(F.current=lR(Se.nativeEvent,W.current)),Se.reason===At&&Se.nativeEvent.type==="mouseleave"&&(te.current=!0),Se.reason===gp)if(Se.nested)te.current=!1;else if(lp(Se.nativeEvent)||cp(Se.nativeEvent))te.current=!1;else{let Ue=!1;Qe(pe).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?te.current=!1:te.current=!0}}R.on("openchange",Le);function Ge(Se){const Ue=Y.current;let Te=typeof Ue=="function"?Ue(Se):Ue;if(Te===void 0||Te===!1)return null;Te===null&&(Te=!0);const we=O?.isConnected?O:null,Ae=be?.isConnected&&$t(be)!=="body"?be:null;let Ze=ke?Ae||we:we||Ae;return Ze||(Ze=jv()||null),typeof Te=="boolean"?Ze:Ro(Te)||Ze||null}return()=>{R.off("openchange",Le);const Se=It(Re),Ue=_e(),Te=De(N,Se)||Ue.some(Me=>Me===Se||De(Me,Se))||_&&va(_.nodesRef.current,k(),!1).some(Me=>De(Me.context?.elements.floating,Se)),we=Y.current,Ae=F.current,Ze=Ge(Ae);queueMicrotask(()=>{const Me=cR(Ze),fe=typeof we!="boolean";if(we&&!te.current&&ut(Me)&&(!(!fe&&Me!==Se&&Se!==Re.body)||Te)){const ye={preventScroll:!0};Ae==="keyboard"&&(ye.focusVisible=!0),Me.focus(ye)}te.current=!1})}},[r,N,pe,Y,I,R,_,O,k,_e]),Ee(()=>{if(!ba||M||!N)return;const Re=It(Qe(N));!ut(Re)||!yc(Re)||De(N,Re)&&Re.blur()},[M,N]),Ee(()=>{if(!(r||!V))return V.setFocusManagerState({modal:m,closeOnFocusOut:p,open:M,onOpenChange:C.setOpen,domReference:O}),()=>{V.setFocusManagerState(null)}},[r,V,m,M,C,p,O]),Ee(()=>{if(!(r||!pe))return Hv(pe),()=>{queueMicrotask(Np)}},[r,pe]);const je=!r&&(m?!j:!0)&&(he||m);return y.jsxs(b.Fragment,{children:[je&&y.jsx(jo,{"data-type":"inside",ref:G,onFocus:Re=>{if(m){const be=ge();Yl(be[be.length-1])}else V?.portalNode&&(te.current=!1,Fs(Re,V.portalNode)?Tp(O)?.focus():Ro(x??V.beforeOutsideRef)?.focus())}}),i,je&&y.jsx(jo,{"data-type":"inside",ref:ne,onFocus:Re=>{m?Yl(ge()[0]):V?.portalNode&&(p&&(te.current=!0),Fs(Re,V.portalNode)?u0(O)?.focus():Ro(v??V.afterOutsideRef)?.focus())}})]})}function _p(n,a={}){const{enabled:i=!0,event:r="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:m=0,reason:p=ko}=a,h="rootStore"in n?n.rootStore:n,v=h.context.dataRef,x=b.useRef(void 0),S=ar(),T=tn(),w=b.useMemo(()=>{function C(O,N,R,D){const k=Ke(p,N,R);O&&D==="touch"&&m>0?T.start(m,()=>{h.setOpen(!0,k)}):h.setOpen(O,k)}function M(O,N,R){const D=v.current.openEvent,k=h.select("domReferenceElement")!==N;return O&&k||!O||!c?!0:D&&d?!R(D.type):!1}return{onPointerDown(O){x.current=ma(O.pointerType,!0)&&cp(O.nativeEvent)?"virtual":O.pointerType},onMouseDown(O){const N=x.current,R=O.nativeEvent,D=h.select("open");if(O.button!==0||r==="click"||ma(N,!0)&&f)return;const k=M(D,O.currentTarget,U=>U==="click"||U==="mousedown"),B=Tt(R);if(yc(B)){C(k,R,B,N);return}const j=O.currentTarget;S.request(()=>{C(k,R,j,N)})},onClick(O){if(r==="mousedown-only")return;const N=x.current;if(r==="mousedown"&&N){x.current=void 0;return}if(ma(N,!0)&&f)return;const R=h.select("open"),D=M(R,O.currentTarget,k=>k==="click"||k==="mousedown"||k==="keydown"||k==="keyup");C(D,O.nativeEvent,O.currentTarget,N)},onKeyDown(){x.current=void 0}}},[v,r,f,p,h,d,c,S,T,m]);return b.useMemo(()=>i?{reference:w}:wt,[i,w])}function uR(n,a){let i=null,r=null,c=!1;return{contextElement:n||void 0,getBoundingClientRect(){const f=n?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=a.axis==="x"||a.axis==="both",m=a.axis==="y"||a.axis==="both",p=["mouseenter","mousemove"].includes(a.dataRef.current.openEvent?.type||"")&&a.pointerType!=="touch";let h=f.width,v=f.height,x=f.x,S=f.y;return i==null&&a.x&&d&&(i=f.x-a.x),r==null&&a.y&&m&&(r=f.y-a.y),x-=i||0,S-=r||0,h=0,v=0,!c||p?(h=a.axis==="y"?f.width:0,v=a.axis==="x"?f.height:0,x=d&&a.x!=null?a.x:x,S=m&&a.y!=null?a.y:S):c&&!p&&(v=a.axis==="x"?f.height:v,h=a.axis==="y"?f.width:h),c=!0,{width:h,height:v,x,y:S,top:S,right:x+h,bottom:S+v,left:x}}}}function Lv(n){return n!=null&&n.clientX!=null}function fR(n,a={}){const{enabled:i=!0,axis:r="both"}=a,c="rootStore"in n?n.rootStore:n,f=c.useState("open"),d=c.useState("floatingElement"),m=c.useState("domReferenceElement"),p=c.context.dataRef,h=b.useRef(!1),v=b.useRef(null),[x,S]=b.useState(),[T,w]=b.useState([]),C=Ce(D=>{c.set("positionReference",D)}),M=Ce((D,k,B)=>{h.current||p.current.openEvent&&!Lv(p.current.openEvent)||c.set("positionReference",uR(B??m,{x:D,y:k,axis:r,dataRef:p,pointerType:x}))}),O=Ce(D=>{f?v.current||(M(D.clientX,D.clientY,D.currentTarget),w([])):M(D.clientX,D.clientY,D.currentTarget)}),N=ma(x)?d:f;b.useEffect(()=>{if(!i){C(m);return}if(!N)return;function D(){v.current?.(),v.current=null}const k=xt(d);function B(j){const U=Tt(j);De(d,U)?D():M(j.clientX,j.clientY)}return!p.current.openEvent||Lv(p.current.openEvent)?v.current=Ie(k,"mousemove",B):C(m),D},[N,i,d,p,m,c,M,C,T]),b.useEffect(()=>()=>{c.set("positionReference",null)},[c]),b.useEffect(()=>{i&&!d&&(h.current=!1)},[i,d]),b.useEffect(()=>{!i&&f&&(h.current=!0)},[i,f]);const R=b.useMemo(()=>{function D(k){S(k.pointerType)}return{onPointerDown:D,onPointerEnter:D,onMouseMove:O,onMouseEnter:O}},[O]);return b.useMemo(()=>i?{reference:R,trigger:R}:{},[i,R])}function dR(){return!1}function pR(n){return{escapeKey:typeof n=="boolean"?n:n?.escapeKey??!1,outsidePress:typeof n=="boolean"?n:n?.outsidePress??!0}}function Sc(n,a={}){const{enabled:i=!0,escapeKey:r=!0,outsidePress:c=!0,outsidePressEvent:f="sloppy",referencePress:d=dR,bubbles:m,externalTree:p}=a,h="rootStore"in n?n.rootStore:n,v=h.useState("open"),x=h.useState("floatingElement"),{dataRef:S,events:T}=h.context,w=xa(p),C=Ce(typeof c=="function"?c:()=>!1),M=typeof c=="function"?C:c,O=M!==!1,N=Ce(()=>f),{escapeKey:R,outsidePress:D}=pR(m),k=b.useRef(!1),B=b.useRef(!1),j=b.useRef(!1),U=b.useRef(!1),Y=b.useRef(!1),I=b.useRef(""),H=b.useRef(null),_=tn(),V=tn(),te=Ce(()=>{V.clear(),S.current.insideReactTree=!1}),Q=Ce(Z=>{const le=S.current.floatingContext?.nodeId;return(w?va(w.nodesRef.current,le):[]).some(he=>he.context?.open&&!he.context.dataRef.current[Z])}),z=Ce(Z=>ud(Z,h.select("floatingElement"))||ud(Z,h.select("domReferenceElement"))),X=Ce(Z=>{d()&&h.setOpen(!1,Ke(ko,Z.nativeEvent))}),F=Ce(Z=>{if(!v||!i||!r||Z.key!=="Escape"||Y.current||!R&&Q("__escapeKeyBubbles"))return;const le=LE(Z)?Z.nativeEvent:Z,se=Ke(fr,le);h.setOpen(!1,se),se.isCanceled||Z.preventDefault(),!R&&!se.isPropagationAllowed&&Z.stopPropagation()}),W=Ce(()=>{S.current.insideReactTree=!0,V.start(0,te)}),ae=Ce(Z=>{if(!v||!i||Z.button!==0)return;const le=Tt(Z.nativeEvent);De(h.select("floatingElement"),le)&&(k.current||(k.current=!0,B.current=!1))}),A=Ce(Z=>{!v||!i||(Z.defaultPrevented||Z.nativeEvent.defaultPrevented)&&k.current&&(B.current=!0)});b.useEffect(()=>{function Z(le){le.open||(U.current=!1)}return T.on("openchange",Z),()=>{T.off("openchange",Z)}},[T]),b.useEffect(()=>{if(!v||!i)return v||(U.current=!1),te;S.current.__escapeKeyBubbles=R,S.current.__outsidePressBubbles=D;const Z=new mn,le=new mn,se=Qe(x);function he(){Z.clear(),Y.current=!0}function pe(){Z.start(ba?5:0,()=>{Y.current=!1})}function ge(){j.current=!0,le.start(0,()=>{j.current=!1})}function _e(){k.current=!1,B.current=!1}function je(){const de=I.current,ie=de==="pen"||!de?"mouse":de,ve=N(),Be=typeof ve=="function"?ve():ve;return typeof Be=="string"?Be:Be[ie]}function Re(de){const ie=je();return ie==="intentional"&&de.type!=="click"||ie==="sloppy"&&de.type==="click"}function be(de){const ie=S.current.floatingContext?.nodeId,ve=w&&va(w.nodesRef.current,ie).some(Be=>ud(de,Be.context?.elements.floating));return z(de)||ve}function ke(de){if(Re(de)){de.type!=="click"&&!z(de)&&(le.clear(),j.current=!1),te();return}if(S.current.insideReactTree){te();return}const ie=Tt(de),ve=`[${sr("inert")}]`,Be=Je(ie)?ie.getRootNode():null,Yt=Array.from((Qs(Be)?Be:Qe(h.select("floatingElement"))).querySelectorAll(ve)),an=h.context.triggerElements;if(ie&&(an.hasElement(ie)||an.hasMatchingElement(xe=>De(xe,ie))))return;let Rt=Je(ie)?ie:null;for(;Rt&&!Co(Rt);){const xe=zo(Rt);if(Co(xe)||!Je(xe))break;Rt=xe}if(!(Yt.length&&Je(ie)&&!tw(ie)&&!De(ie,h.select("floatingElement"))&&Yt.every(xe=>!De(Rt,xe)))){if(ut(ie)&&!("touches"in de)){const xe=Co(ie),qe=wn(ie),ot=/auto|scroll/,mt=xe||ot.test(qe.overflowX),On=xe||ot.test(qe.overflowY),qn=mt&&ie.clientWidth>0&&ie.scrollWidth>ie.clientWidth,Cn=On&&ie.clientHeight>0&&ie.scrollHeight>ie.clientHeight,_t=qe.direction==="rtl",Vn=Cn&&(_t?de.offsetX<=ie.offsetWidth-ie.clientWidth:de.offsetX>ie.clientWidth),Fe=qn&&de.offsetY>ie.clientHeight;if(Vn||Fe)return}if(!be(de)){if(je()==="intentional"){if(de.detail!==0&&!lp(de)&&!U.current)return;if(j.current){le.clear(),j.current=!1;return}}typeof M=="function"&&!M(de)||Q("__outsidePressBubbles")||(h.setOpen(!1,Ke(gp,de)),te())}}}function Le(de){je()!=="sloppy"||de.pointerType==="touch"||!h.select("open")||!i||z(de)||ke(de)}function Ge(de){if(je()!=="sloppy"||!h.select("open")||!i||z(de))return;const ie=de.touches[0];ie&&(H.current={startTime:Date.now(),startX:ie.clientX,startY:ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{H.current&&(H.current.dismissOnTouchEnd=!1,H.current.dismissOnMouseDown=!1)}))}function Se(de,ie){const ve=Tt(de);if(!ve)return;const Be=Ie(ve,de.type,()=>{ie(de),Be()})}function Ue(de){I.current="touch",Se(de,Ge)}function Te(de){_.clear(),de.type==="pointerdown"&&(de.button===0&&(U.current=!0),I.current=de.pointerType),!(de.type==="mousedown"&&H.current&&!H.current.dismissOnMouseDown)&&Se(de,ie=>{ie.type==="pointerdown"?Le(ie):ke(ie)})}function we(de){if(de.type==="pointercancel"&&(U.current=!1),!k.current)return;const ie=B.current;if(_e(),je()==="intentional"){if(de.type==="pointercancel"){ie&&ge();return}if(!be(de)){if(ie){ge();return}typeof M=="function"&&!M(de)||(le.clear(),j.current=!0,te())}}}function Ae(de){if(je()!=="sloppy"||!H.current||z(de))return;const ie=de.touches[0];if(!ie)return;const ve=Math.abs(ie.clientX-H.current.startX),Be=Math.abs(ie.clientY-H.current.startY),Yt=Math.sqrt(ve*ve+Be*Be);Yt>5&&(H.current.dismissOnTouchEnd=!0),Yt>10&&(ke(de),_.clear(),H.current=null)}function Ze(de){Se(de,Ae)}function Me(de){je()!=="sloppy"||!H.current||z(de)||(H.current.dismissOnTouchEnd&&ke(de),_.clear(),H.current=null)}function fe(de){Se(de,Me)}const ye=Wn(r&&Wn(Ie(se,"keydown",F),Ie(se,"compositionstart",he),Ie(se,"compositionend",pe)),O&&Wn(Ie(se,"click",Te,!0),Ie(se,"pointerdown",Te,!0),Ie(se,"pointerup",we,!0),Ie(se,"pointercancel",we,!0),Ie(se,"mousedown",Te,!0),Ie(se,"mouseup",we,!0),Ie(se,"touchstart",Ue,{capture:!0,passive:!0}),Ie(se,"touchmove",Ze,{capture:!0,passive:!0}),Ie(se,"touchend",fe,{capture:!0,passive:!0})));return()=>{ye(),Z.clear(),le.clear(),_e(),j.current=!1,te()}},[S,x,r,O,M,v,i,R,D,F,te,N,Q,z,w,h,_]);const G=b.useMemo(()=>({onKeyDown:F,onPointerDown:X,onClick:X}),[F,X]),ne=b.useMemo(()=>({onKeyDown:F,onPointerDown:A,onMouseDown:A,onClickCapture:W,onMouseDownCapture(Z){W(),ae(Z)},onPointerDownCapture(Z){W(),ae(Z)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[F,W,ae,A]);return b.useMemo(()=>i?{reference:G,floating:ne,trigger:G}:{},[i,G,ne])}function Uv(n,a,i){let{reference:r,floating:c}=n;const f=Bn(a),d=xp(a),m=bp(d),p=In(a),h=f==="y",v=r.x+r.width/2-c.width/2,x=r.y+r.height/2-c.height/2,S=r[m]/2-c[m]/2;let T;switch(p){case"top":T={x:v,y:r.y-c.height};break;case"bottom":T={x:v,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:x};break;case"left":T={x:r.x-c.width,y:x};break;default:T={x:r.x,y:r.y}}const w=Ho(a);return w&&(T[d]+=S*(w==="end"?1:-1)*(i&&h?-1:1)),T}async function hR(n,a){var i;a===void 0&&(a={});const{x:r,y:c,platform:f,rects:d,elements:m,strategy:p}=n,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:S=!1,padding:T=0}=ya(a,n),w=t0(T),M=m[S?x==="floating"?"reference":"floating":x],O=Zl(await f.getClippingRect({element:(i=await(f.isElement==null?void 0:f.isElement(M)))==null||i?M:M.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:h,rootBoundary:v,strategy:p})),N=x==="floating"?{x:r,y:c,width:d.floating.width,height:d.floating.height}:d.reference,R=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),D=await(f.isElement==null?void 0:f.isElement(R))&&await(f.getScale==null?void 0:f.getScale(R))||{x:1,y:1},k=Zl(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:N,offsetParent:R,strategy:p}):N);return{top:(O.top-k.top+w.top)/D.y,bottom:(k.bottom-O.bottom+w.bottom)/D.y,left:(O.left-k.left+w.left)/D.x,right:(k.right-O.right+w.right)/D.x}}const mR=50,gR=async(n,a,i)=>{const{placement:r="bottom",strategy:c="absolute",middleware:f=[],platform:d}=i,m=d.detectOverflow?d:{...d,detectOverflow:hR},p=await(d.isRTL==null?void 0:d.isRTL(a));let h=await d.getElementRects({reference:n,floating:a,strategy:c}),{x:v,y:x}=Uv(h,r,p),S=r,T=0;const w={};for(let C=0;C<f.length;C++){const M=f[C];if(!M)continue;const{name:O,fn:N}=M,{x:R,y:D,data:k,reset:B}=await N({x:v,y:x,initialPlacement:r,placement:S,strategy:c,middlewareData:w,rects:h,platform:m,elements:{reference:n,floating:a}});v=R??v,x=D??x,w[O]={...w[O],...k},B&&T<mR&&(T++,typeof B=="object"&&(B.placement&&(S=B.placement),B.rects&&(h=B.rects===!0?await d.getElementRects({reference:n,floating:a,strategy:c}):B.rects),{x:v,y:x}=Uv(h,S,p)),C=-1)}return{x:v,y:x,placement:S,strategy:c,middlewareData:w}},yR=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var i,r;const{placement:c,middlewareData:f,rects:d,initialPlacement:m,platform:p,elements:h}=a,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...M}=ya(n,a);if((i=f.arrow)!=null&&i.alignmentOffset)return{};const O=In(c),N=Bn(m),R=In(m)===m,D=await(p.isRTL==null?void 0:p.isRTL(h.floating)),k=S||(R||!C?[Ql(m)]:Sw(m)),B=w!=="none";!S&&B&&k.push(...Rw(m,C,w,D));const j=[m,...k],U=await p.detectOverflow(a,M),Y=[];let I=((r=f.flip)==null?void 0:r.overflows)||[];if(v&&Y.push(U[O]),x){const te=xw(c,d,D);Y.push(U[te[0]],U[te[1]])}if(I=[...I,{placement:c,overflows:Y}],!Y.every(te=>te<=0)){var H,_;const te=(((H=f.flip)==null?void 0:H.index)||0)+1,Q=j[te];if(Q&&(!(x==="alignment"?N!==Bn(Q):!1)||I.every(F=>Bn(F.placement)===N?F.overflows[0]>0:!0)))return{data:{index:te,overflows:I},reset:{placement:Q}};let z=(_=I.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:_.placement;if(!z)switch(T){case"bestFit":{var V;const X=(V=I.filter(F=>{if(B){const W=Bn(F.placement);return W===N||W==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(W=>W>0).reduce((W,ae)=>W+ae,0)]).sort((F,W)=>F[1]-W[1])[0])==null?void 0:V[0];X&&(z=X);break}case"initialPlacement":z=m;break}if(c!==z)return{reset:{placement:z}}}return{}}}},A0=new Set(["left","top"]);async function vR(n,a){const{placement:i,platform:r,elements:c}=n,f=await(r.isRTL==null?void 0:r.isRTL(c.floating)),d=In(i),m=Ho(i),p=Bn(i)==="y",h=A0.has(d)?-1:1,v=f&&p?-1:1,x=ya(a,n);let{mainAxis:S,crossAxis:T,alignmentAxis:w}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof w=="number"&&(T=m==="end"?w*-1:w),p?{x:T*v,y:S*h}:{x:S*h,y:T*v}}const bR=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var i,r;const{x:c,y:f,placement:d,middlewareData:m}=a,p=await vR(a,n);return d===((i=m.offset)==null?void 0:i.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:c+p.x,y:f+p.y,data:{...p,placement:d}}}}},xR=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:i,y:r,placement:c,platform:f}=a,{mainAxis:d=!0,crossAxis:m=!1,limiter:p={fn:N=>{let{x:R,y:D}=N;return{x:R,y:D}}},...h}=ya(n,a),v={x:i,y:r},x=await f.detectOverflow(a,h),S=Bn(c),T=vp(S);let w=v[T],C=v[S];const M=(N,R)=>e0(R+x[N==="y"?"top":"left"],R,R-x[N==="y"?"bottom":"right"]);d&&(w=M(T,w)),m&&(C=M(S,C));const O=p.fn({...a,[T]:w,[S]:C});return{...O,data:{x:O.x-i,y:O.y-r,enabled:{[T]:d,[S]:m}}}}}},SR=function(n){return n===void 0&&(n={}),{options:n,fn(a){var i,r;const{x:c,y:f,placement:d,rects:m,middlewareData:p}=a,{offset:h=0,mainAxis:v=!0,crossAxis:x=!0}=ya(n,a),S={x:c,y:f},T=Bn(d),w=vp(T);let C=S[w],M=S[T];const O=ya(h,a),N=typeof O=="number"?{mainAxis:O,crossAxis:0}:{mainAxis:(i=O.mainAxis)!=null?i:0,crossAxis:(r=O.crossAxis)!=null?r:0};if(v){const k=w==="y"?"height":"width",B=m.reference[w]-m.floating[k]+N.mainAxis,j=m.reference[w]+m.reference[k]-N.mainAxis;C<B?C=B:C>j&&(C=j)}if(x){var R,D;const k=w==="y"?"width":"height",B=A0.has(In(d)),j=m.reference[T]-m.floating[k]+(B&&((R=p.offset)==null?void 0:R[T])||0)+(B?0:N.crossAxis),U=m.reference[T]+m.reference[k]+(B?0:((D=p.offset)==null?void 0:D[T])||0)-(B?N.crossAxis:0);M<j?M=j:M>U&&(M=U)}return{[w]:C,[T]:M}}}},TR=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){const{placement:i,rects:r,platform:c,elements:f}=a,{apply:d=()=>{},...m}=ya(n,a),p=await c.detectOverflow(a,m),h=In(i),v=Ho(i),x=Bn(i)==="y",{width:S,height:T}=r.floating;let w,C;h==="top"||h==="bottom"?(w=h,C=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(C=h,w=v==="end"?"top":"bottom");const M=T-p.top-p.bottom,O=S-p.left-p.right,N=Zs(T-p[w],M),R=Zs(S-p[C],O),D=a.middlewareData.shift,k=!D;let B=N,j=R;D!=null&&D.enabled.x&&(j=O),D!=null&&D.enabled.y&&(B=M),k&&!v&&(x?j=S-2*Ao(p.left,p.right):B=T-2*Ao(p.top,p.bottom)),await d({...a,availableWidth:j,availableHeight:B});const U=await c.getDimensions(f.floating);return S!==U.width||T!==U.height?{reset:{rects:!0}}:{}}}};function M0(n){const a=wn(n);let i=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const c=ut(n),f=c?n.offsetWidth:i,d=c?n.offsetHeight:r,m=Kl(i)!==f||Kl(r)!==d;return m&&(i=f,r=d),{width:i,height:r,$:m}}function zp(n){return Je(n)?n:n.contextElement}function Ks(n){const a=zp(n);if(!ut(a))return Mo(1);const i=a.getBoundingClientRect(),{width:r,height:c,$:f}=M0(a);let d=(f?Kl(i.width):i.width)/r,m=(f?Kl(i.height):i.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const ER=Mo(0);function N0(n){const a=xt(n);return!dp()||!a.visualViewport?ER:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function wR(n,a,i){return a===void 0&&(a=!1),!!i&&a&&i===xt(n)}function $a(n,a,i,r){a===void 0&&(a=!1),i===void 0&&(i=!1);const c=n.getBoundingClientRect(),f=zp(n);let d=Mo(1);a&&(r?Je(r)&&(d=Ks(r)):d=Ks(n));const m=wR(f,i,r)?N0(f):Mo(0);let p=(c.left+m.x)/d.x,h=(c.top+m.y)/d.y,v=c.width/d.x,x=c.height/d.y;if(f&&r){const S=xt(f),T=Je(r)?xt(r):r;let w=S,C=Hd(w);for(;C&&T!==w;){const M=Ks(C),O=C.getBoundingClientRect(),N=wn(C),R=O.left+(C.clientLeft+parseFloat(N.paddingLeft))*M.x,D=O.top+(C.clientTop+parseFloat(N.paddingTop))*M.y;p*=M.x,h*=M.y,v*=M.x,x*=M.y,p+=R,h+=D,w=xt(C),C=Hd(w)}}return Zl({width:v,height:x,x:p,y:h})}function Tc(n,a){const i=dc(n).scrollLeft;return a?a.left+i:$a(Uo(n)).left+i}function D0(n,a){const i=n.getBoundingClientRect(),r=i.left+a.scrollLeft-Tc(n,i),c=i.top+a.scrollTop;return{x:r,y:c}}function RR(n){let{elements:a,rect:i,offsetParent:r,strategy:c}=n;const f=c==="fixed",d=Uo(r),m=a?fc(a.floating):!1;if(r===d||m&&f)return i;let p={scrollLeft:0,scrollTop:0},h=Mo(1);const v=Mo(0),x=ut(r);if((x||!f)&&(($t(r)!=="body"||ur(d))&&(p=dc(r)),x)){const T=$a(r);h=Ks(r),v.x=T.x+r.clientLeft,v.y=T.y+r.clientTop}const S=d&&!x&&!f?D0(d,p):Mo(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-p.scrollLeft*h.x+v.x+S.x,y:i.y*h.y-p.scrollTop*h.y+v.y+S.y}}function OR(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function CR(n){const a=dc(n),i=n.ownerDocument.body,r=Ao(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),c=Ao(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let f=-a.scrollLeft+Tc(n);const d=-a.scrollTop;return wn(i).direction==="rtl"&&(f+=Ao(n.clientWidth,i.clientWidth)-r),{width:r,height:c,x:f,y:d}}const AR=25;function MR(n,a,i){i===void 0&&(i="viewport");const r=i==="layoutViewport",c=xt(n),f=Uo(n),d=c.visualViewport;let m=f.clientWidth,p=f.clientHeight,h=0,v=0;if(d){const S=!dp()||a==="fixed";r?S||(h=-d.offsetLeft,v=-d.offsetTop):(m=d.width,p=d.height,S&&(h=d.offsetLeft,v=d.offsetTop))}if(Tc(f)<=0){const S=f.ownerDocument,T=S.body,w=getComputedStyle(T),C=S.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,M=Math.abs(f.clientWidth-T.clientWidth-C),O=getComputedStyle(f).scrollbarGutter==="stable both-edges"?M/2:M;O<=AR&&(m-=O)}return{width:m,height:p,x:h,y:v}}function NR(n,a){const i=$a(n,!0,a==="fixed"),r=i.top+n.clientTop,c=i.left+n.clientLeft,f=Ks(n),d=n.clientWidth*f.x,m=n.clientHeight*f.y,p=c*f.x,h=r*f.y;return{width:d,height:m,x:p,y:h}}function Bv(n,a,i){let r;if(a==="viewport"||a==="layoutViewport")r=MR(n,i,a);else if(a==="document")r=CR(Uo(n));else if(Je(a))r=NR(a,i);else{const c=N0(n);r={x:a.x-c.x,y:a.y-c.y,width:a.width,height:a.height}}return Zl(r)}function DR(n,a){const i=a.get(n);if(i)return i;let r=or(n,[],!1).filter(m=>Je(m)&&$t(m)!=="body"),c=null;const f=wn(n).position==="fixed";let d=f?zo(n):n;for(;Je(d)&&!Co(d);){const m=wn(d),p=fp(d),h=c?c.position:f?"fixed":"";!p&&(h==="fixed"||h==="absolute"&&m.position==="static")?r=r.filter(x=>x!==d):c=m,d=zo(d)}return a.set(n,r),r}function _R(n){let{element:a,boundary:i,rootBoundary:r,strategy:c}=n;const d=[...i==="clippingAncestors"?fc(a)?[]:DR(a,this._c):[].concat(i),r],m=Bv(a,d[0],c);let p=m.top,h=m.right,v=m.bottom,x=m.left;for(let S=1;S<d.length;S++){const T=Bv(a,d[S],c);p=Ao(T.top,p),h=Zs(T.right,h),v=Zs(T.bottom,v),x=Ao(T.left,x)}return{width:h-x,height:v-p,x,y:p}}function zR(n){const{width:a,height:i}=M0(n);return{width:a,height:i}}function kR(n,a,i){const r=ut(a),c=Uo(a),f=i==="fixed",d=$a(n,!0,f,a);let m={scrollLeft:0,scrollTop:0};const p=Mo(0);if((r||!f)&&(($t(a)!=="body"||ur(c))&&(m=dc(a)),r)){const S=$a(a,!0,f,a);p.x=S.x+a.clientLeft,p.y=S.y+a.clientTop}!r&&c&&(p.x=Tc(c));const h=c&&!r&&!f?D0(c,m):Mo(0),v=d.left+m.scrollLeft-p.x-h.x,x=d.top+m.scrollTop-p.y-h.y;return{x:v,y:x,width:d.width,height:d.height}}function md(n){return wn(n).position==="static"}function Pv(n,a){if(!ut(n)||wn(n).position==="fixed")return null;if(a)return a(n);let i=n.offsetParent;return Uo(n)===i&&(i=i.ownerDocument.body),i}function _0(n,a){const i=xt(n);if(fc(n))return i;if(!ut(n)){let c=zo(n);for(;c&&!Co(c);){if(Je(c)&&!md(c))return c;c=zo(c)}return i}let r=Pv(n,a);for(;r&&BE(r)&&md(r);)r=Pv(r,a);return r&&Co(r)&&md(r)&&!fp(r)?i:r||YE(n)||i}const jR=async function(n){const a=this.getOffsetParent||_0,i=this.getDimensions,r=await i(n.floating);return{reference:kR(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HR(n){return wn(n).direction==="rtl"}const LR={convertOffsetParentRelativeRectToViewportRelativeRect:RR,getDocumentElement:Uo,getClippingRect:_R,getOffsetParent:_0,getElementRects:jR,getClientRects:OR,getDimensions:zR,getScale:Ks,isElement:Je,isRTL:HR};function z0(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function UR(n,a,i){let r=null,c;const f=Uo(n);function d(){var v;clearTimeout(c),(v=r)==null||v.disconnect(),r=null}function m(v,x){v===void 0&&(v=!1),x===void 0&&(x=1),d();const S=n.getBoundingClientRect(),{left:T,top:w,width:C,height:M}=S;if(v||a(),!C||!M)return;const O=_l(w),N=_l(f.clientWidth-(T+C)),R=_l(f.clientHeight-(w+M)),D=_l(T),B={rootMargin:-O+"px "+-N+"px "+-R+"px "+-D+"px",threshold:Ao(0,Zs(1,x))||1};let j=!0;function U(Y){const I=Y[0].intersectionRatio;if(!z0(S,n.getBoundingClientRect()))return m();if(I!==x){if(!j)return m();I?m(!1,I):c=setTimeout(()=>{m(!1,1e-7)},1e3)}j=!1}try{r=new IntersectionObserver(U,{...B,root:f.ownerDocument})}catch{r=new IntersectionObserver(U,B)}r.observe(n)}const p=xt(n),h=()=>m(i);return p.addEventListener("resize",h),m(!0),()=>{p.removeEventListener("resize",h),d()}}function Iv(n,a,i,r){r===void 0&&(r={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,h=zp(n),v=c||f?[...h?or(h):[],...a?or(a):[]]:[];v.forEach(O=>{c&&O.addEventListener("scroll",i),f&&O.addEventListener("resize",i)});const x=h&&m?UR(h,i,f):null;let S=-1,T=null;d&&(T=new ResizeObserver(O=>{let[N]=O;N&&N.target===h&&T&&a&&(T.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var R;(R=T)==null||R.observe(a)})),i()}),h&&!p&&T.observe(h),a&&T.observe(a));let w,C=p?$a(n):null;p&&M();function M(){const O=$a(n);C&&!z0(C,O)&&i(),C=O,w=requestAnimationFrame(M)}return i(),()=>{var O;v.forEach(N=>{c&&N.removeEventListener("scroll",i),f&&N.removeEventListener("resize",i)}),x?.(),(O=T)==null||O.disconnect(),T=null,p&&cancelAnimationFrame(w)}}const BR=bR,PR=xR,IR=yR,YR=TR,qR=SR,VR=(n,a,i)=>{const r=new Map,c=i??{},f={...LR,...c.platform,_c:r};return gR(n,a,{...c,platform:f})};var GR=typeof document<"u",XR=function(){},ql=GR?b.useLayoutEffect:XR;function Jl(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let i,r,c;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(i=n.length,i!==a.length)return!1;for(r=i;r--!==0;)if(!Jl(n[r],a[r]))return!1;return!0}if(c=Object.keys(n),i=c.length,i!==Object.keys(a).length)return!1;for(r=i;r--!==0;)if(!{}.hasOwnProperty.call(a,c[r]))return!1;for(r=i;r--!==0;){const f=c[r];if(!(f==="_owner"&&n.$$typeof)&&!Jl(n[f],a[f]))return!1}return!0}return n!==n&&a!==a}function k0(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Yv(n,a){const i=k0(n);return Math.round(a*i)/i}function gd(n){const a=b.useRef(n);return ql(()=>{a.current=n}),a}function FR(n){n===void 0&&(n={});const{placement:a="bottom",strategy:i="absolute",middleware:r=[],platform:c,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:p,open:h}=n,[v,x]=b.useState({x:0,y:0,strategy:i,placement:a,middlewareData:{},isPositioned:!1}),[S,T]=b.useState(r);Jl(S,r)||T(r);const[w,C]=b.useState(null),[M,O]=b.useState(null),N=b.useCallback(F=>{F!==B.current&&(B.current=F,C(F))},[]),R=b.useCallback(F=>{F!==j.current&&(j.current=F,O(F))},[]),D=f||w,k=d||M,B=b.useRef(null),j=b.useRef(null),U=b.useRef(v),Y=p!=null,I=gd(p),H=gd(c),_=gd(h),V=b.useCallback(()=>{if(!B.current||!j.current)return;const F={placement:a,strategy:i,middleware:S};H.current&&(F.platform=H.current),VR(B.current,j.current,F).then(W=>{const ae={...W,isPositioned:_.current!==!1};te.current&&!Jl(U.current,ae)&&(U.current=ae,Yn.flushSync(()=>{x(ae)}))})},[S,a,i,H,_]);ql(()=>{h===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,x(F=>({...F,isPositioned:!1})))},[h]);const te=b.useRef(!1);ql(()=>(te.current=!0,()=>{te.current=!1}),[]),ql(()=>{if(D&&(B.current=D),k&&(j.current=k),D&&k){if(I.current)return I.current(D,k,V);V()}},[D,k,V,I,Y]);const Q=b.useMemo(()=>({reference:B,floating:j,setReference:N,setFloating:R}),[N,R]),z=b.useMemo(()=>({reference:D,floating:k}),[D,k]),X=b.useMemo(()=>{const F={position:i,left:0,top:0};if(!z.floating)return F;const W=Yv(z.floating,v.x),ae=Yv(z.floating,v.y);return m?{...F,transform:"translate("+W+"px, "+ae+"px)",...k0(z.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:W,top:ae}},[i,m,z.floating,v.x,v.y]);return b.useMemo(()=>({...v,update:V,refs:Q,elements:z,floatingStyles:X}),[v,V,Q,z,X])}const KR=(n,a)=>{const i=BR(n);return{name:i.name,fn:i.fn,options:[n,a]}},QR=(n,a)=>{const i=PR(n);return{name:i.name,fn:i.fn,options:[n,a]}},ZR=(n,a)=>({fn:qR(n).fn,options:[n,a]}),WR=(n,a)=>{const i=IR(n);return{name:i.name,fn:i.fn,options:[n,a]}},$R=(n,a)=>{const i=YR(n);return{name:i.name,fn:i.fn,options:[n,a]}};var yd={exports:{}},vd={};var qv;function JR(){if(qv)return vd;qv=1;var n=lr();function a(x,S){return x===S&&(x!==0||1/x===1/S)||x!==x&&S!==S}var i=typeof Object.is=="function"?Object.is:a,r=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(x,S){var T=S(),w=r({inst:{value:T,getSnapshot:S}}),C=w[0].inst,M=w[1];return f(function(){C.value=T,C.getSnapshot=S,p(C)&&M({inst:C})},[x,T,S]),c(function(){return p(C)&&M({inst:C}),x(function(){p(C)&&M({inst:C})})},[x]),d(T),T}function p(x){var S=x.getSnapshot;x=x.value;try{var T=S();return!i(x,T)}catch{return!0}}function h(x,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return vd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,vd}var Vv;function j0(){return Vv||(Vv=1,yd.exports=JR()),yd.exports}var kp=j0(),bd={exports:{}},xd={};var Gv;function e2(){if(Gv)return xd;Gv=1;var n=lr(),a=j0();function i(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var r=typeof Object.is=="function"?Object.is:i,c=a.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,p=n.useDebugValue;return xd.useSyncExternalStoreWithSelector=function(h,v,x,S,T){var w=f(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=m(function(){function O(B){if(!N){if(N=!0,R=B,B=S(B),T!==void 0&&C.hasValue){var j=C.value;if(T(j,B))return D=j}return D=B}if(j=D,r(R,B))return j;var U=S(B);return T!==void 0&&T(j,U)?(R=B,j):(R=B,D=U)}var N=!1,R,D,k=x===void 0?null:x;return[function(){return O(v())},k===null?void 0:function(){return O(k())}]},[v,x,S,T]);var M=c(h,w[0],w[1]);return d(function(){C.hasValue=!0,C.value=M},[M]),p(M),M},xd}var Xv;function t2(){return Xv||(Xv=1,bd.exports=e2()),bd.exports}var n2=t2();const o2=Ep(19),a2=o2?i2:r2;function H0(n,a,i,r,c){return a2(n,a,i,r,c)}function s2(n,a,i,r,c){const f=b.useCallback(()=>a(n.getSnapshot(),i,r,c),[n,a,i,r,c]);return kp.useSyncExternalStore(n.subscribe,f,f)}AE({before(n){n.syncIndex=0,n.didInitialize||(n.syncTick=1,n.syncHooks=[],n.didChangeStore=!0,n.getSnapshot=()=>{let a=!1;for(let i=0;i<n.syncHooks.length;i+=1){const r=n.syncHooks[i],c=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,c)||(a=!0,r.value=c)}return a&&(n.syncTick+=1),n.syncTick})},after(n){n.syncHooks.length>0&&(n.didChangeStore&&(n.didChangeStore=!1,n.subscribe=a=>{const i=new Set;for(const c of n.syncHooks)i.add(c.store);const r=[];for(const c of i)r.push(c.subscribe(a));return()=>{for(const c of r)c()}}),kp.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot))}});function i2(n,a,i,r,c){const f=CE();if(!f)return s2(n,a,i,r,c);const d=f.syncIndex;f.syncIndex+=1;let m;return f.didInitialize?(m=f.syncHooks[d],(m.store!==n||m.selector!==a||!Object.is(m.a1,i)||!Object.is(m.a2,r)||!Object.is(m.a3,c))&&(m.store!==n&&(f.didChangeStore=!0),m.store=n,m.selector=a,m.a1=i,m.a2=r,m.a3=c,m.value=a(n.getSnapshot(),i,r,c))):(m={store:n,selector:a,a1:i,a2:r,a3:c,value:a(n.getSnapshot(),i,r,c)},f.syncHooks.push(m)),m.value}function r2(n,a,i,r,c){return n2.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>a(f,i,r,c))}class l2{static create(a){return new this(a)}constructor(a){this.state=a,this.listeners=new Set,this.updateTick=0}subscribe=a=>(this.listeners.add(a),()=>{this.listeners.delete(a)});getSnapshot=()=>this.state;setState(a){if(this.state===a)return;this.state=a,this.updateTick+=1;const i=this.updateTick;for(const r of this.listeners){if(i!==this.updateTick)return;r(a)}}update(a){for(const i in a)if(!Object.is(this.state[i],a[i])){this.setState({...this.state,...a});return}}set(a,i){Object.is(this.state[a],i)||this.setState({...this.state,[a]:i})}notifyAll(){const a={...this.state};this.setState(a)}use(a,i,r,c){return H0(this,a,i,r,c)}}class Ws extends l2{constructor(a,i={},r){super(a),this.context=i,this.selectors=r}useSyncedValue(a,i){b.useDebugValue(a);const r=this;Ee(()=>{r.state[a]!==i&&r.set(a,i)},[r,a,i])}useSyncedValueWithCleanup(a,i){const r=this;Ee(()=>(r.state[a]!==i&&r.set(a,i),()=>{r.set(a,void 0)}),[r,a,i])}useSyncedValues(a){const i=this,r=Object.values(a);Ee(()=>{i.update(a)},[i,...r])}useControlledProp(a,i){b.useDebugValue(a);const r=this,c=i!==void 0;Ee(()=>{c&&!Object.is(r.state[a],i)&&r.setState({...r.state,[a]:i})},[r,a,i,c])}select(a,i,r,c){const f=this.selectors[a];return f(this.state,i,r,c)}useState(a,i,r,c){return b.useDebugValue(a),H0(this,this.selectors[a],i,r,c)}useContextCallback(a,i){b.useDebugValue(a);const r=Ce(i??sp);this.context[a]=r}useStateSetter(a){const i=b.useRef(void 0);return i.current===void 0&&(i.current=r=>{this.set(a,r)}),i.current}observe(a,i){let r;typeof a=="function"?r=a:r=this.selectors[a];let c=r(this.state);return i(c,c,this),this.subscribe(f=>{const d=r(f);if(!Object.is(c,d)){const m=c;c=d,i(d,m,this)}})}}const c2={open:n=>n.open,transitionStatus:n=>n.transitionStatus,domReferenceElement:n=>n.domReferenceElement,referenceElement:n=>n.positionReference??n.referenceElement,floatingElement:n=>n.floatingElement,floatingId:n=>n.floatingId};class L0 extends Ws{constructor(a){const{syncOnly:i,nested:r,onOpenChange:c,triggerElements:f,...d}=a;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:c,dataRef:{current:{}},events:E0(),nested:r,triggerElements:f},c2),this.syncOnly=i}syncOpenEvent=(a,i)=>{(!a||!this.state.open||i!=null&&UE(i))&&(this.context.dataRef.current.openEvent=a?i:void 0)};dispatchOpenChange=(a,i)=>{this.syncOpenEvent(a,i.event);const r={open:a,reason:i.reason,nativeEvent:i.event,nested:this.context.nested,triggerElement:i.trigger};this.context.events.emit("openchange",r)};setOpen=(a,i)=>{if(this.syncOnly){this.context.onOpenChange?.(a,i);return}this.dispatchOpenChange(a,i),this.context.onOpenChange?.(a,i)}}function U0(n){const{popupStore:a,treatPopupAsFloatingElement:i=!1,floatingRootContext:r,floatingId:c,nested:f,onOpenChange:d}=n,m=a.useState("open"),p=a.useState("activeTriggerElement"),h=a.useState(i?"popupElement":"positionerElement"),v=a.context.triggerElements,x=d,S=b.useRef(null);r===void 0&&S.current===null&&(S.current=new L0({open:m,transitionStatus:void 0,referenceElement:p,floatingElement:h,triggerElements:v,onOpenChange:x,floatingId:c,syncOnly:!0,nested:f}));const T=r??S.current;return a.useSyncedValue("floatingId",c),Ee(()=>{const w={open:m,floatingId:c,referenceElement:p,floatingElement:h};Je(p)&&(w.domReferenceElement=p),T.state.positionReference===T.state.referenceElement&&(w.positionReference=p),T.update(w)},[m,c,p,h,T]),T.context.onOpenChange=x,T.context.nested=f,T}function u2(n,a=!1,i=!1,r=!1){const[c,f]=b.useState(n&&a?"idle":void 0),[d,m]=b.useState(n&&!r);return n&&!d&&(m(!0),f("starting")),!n&&d&&c!=="ending"&&!i&&f("ending"),!n&&!d&&c==="ending"&&f(void 0),Ee(()=>{if(!n&&d&&c!=="ending"&&i){const p=ao.request(()=>{f("ending")});return()=>{ao.cancel(p)}}},[n,d,c,i]),Ee(()=>{if(!n||a)return;const p=ao.request(()=>{f(void 0)});return()=>{ao.cancel(p)}},[a,n]),Ee(()=>{if(!n||!a)return;n&&d&&c!=="idle"&&f("starting");const p=ao.request(()=>{f("idle")});return()=>{ao.cancel(p)}},[a,n,d,c]),{mounted:d,setMounted:m,transitionStatus:c}}let kl=null;function f2(n){if(!kl){const a=[];kl=a,queueMicrotask(()=>{kl=null,Yn.flushSync(()=>{for(const i of a)i()})})}kl.push(n)}function Ec(n,a=!1,i=!1){const r=ar();return Ce((c,f=null)=>{r.cancel();const d=Ro(n);if(d==null)return;const m=d,p=()=>{if(!i){Yn.flushSync(c);return}f2(()=>{f?.aborted||c()})};if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){c();return}function h(){Promise.all(m.getAnimations().map(v=>v.finished)).then(()=>{f?.aborted||p()},()=>{if(f?.aborted)return;if(m.getAnimations().some(x=>x.pending||x.playState!=="finished")){h();return}p()})}if(a){const v=Gb;if(!m.hasAttribute(v)){r.request(h);return}const x=new MutationObserver(()=>{m.hasAttribute(v)||(x.disconnect(),h())});x.observe(m,{attributes:!0,attributeFilter:[v]}),f?.addEventListener("abort",()=>x.disconnect(),{once:!0});return}r.request(h)})}function $s(n){const{enabled:a=!0,open:i,ref:r,batch:c=!1,onComplete:f}=n,d=Ce(f),m=Ec(r,i,c);b.useEffect(()=>{if(!a)return;const p=new AbortController;return m(d,p.signal),()=>{p.abort()}},[a,i,d,m])}const wc={tabIndex:-1,[Ld]:""};function B0(n){return a=>a==="touch"?n.current:!0}function jp(n,a=!1){const i=Wa(),r=Ja()!=null,c=en(()=>n(i,r)).current;return U0({popupStore:c,treatPopupAsFloatingElement:a,floatingRootContext:c.state.floatingRootContext,floatingId:i,nested:r,onOpenChange:c.setOpen}),c}function Rc({handle:n,store:a}){return Ee(()=>n.attachStore(a),[n,a]),null}function Fv(n){const a=n.context.triggerElements.size;n.select("open")&&n.state.triggerCount!==a&&n.set("triggerCount",a)}function P0(n,a){const i=b.useRef(null);return Ce(r=>{const c=i.current;if(c!==null){if(c.element===r&&c.store===a&&c.id===n)return;i.current=null;const f=c.store;f.context.triggerElements.getById(c.id)===c.element&&(f.context.triggerElements.delete(c.id),Fv(f))}r!==null&&n!==void 0&&(i.current={store:a,id:n,element:r},a.context.triggerElements.add(n,r),Fv(a))})}function Oc(n,a,i,r=!1){let c=n.preventUnmountingOnClose;a?c=!1:r&&(c=!0);const f=i?.id??null;let d=n.activeTriggerId,m=n.activeTriggerElement;return(f||a)&&(d=f,m=i??null),{open:a,preventUnmountingOnClose:c,activeTriggerId:d,activeTriggerElement:m}}function Hp(n){let a=!1;return n.preventUnmountOnClose=()=>{a=!0},()=>a}function d2(n,a,i,r={}){const c=i.reason,f=c===At,d=a&&c===Gs,m=!a&&(c===ko||c===fr),p=Hp(i);if(n.context.onOpenChange?.(a,i),i.isCanceled)return;r.onBeforeDispatch?.(),n.state.floatingRootContext.dispatchOpenChange(a,i);const h=()=>{const v=Oc(n.state,a,i.trigger,p()),x={...r.extraState,...v};d?x.instantType="focus":m?x.instantType="dismiss":f&&(x.instantType=void 0),n.update(x)};f?Yn.flushSync(h):h()}function Lp(n,a,i,r){const c=i.useState("isMountedByTrigger",n),f=P0(n,i),d=Ce(p=>{const h=i.select("open"),v=i.select("activeTriggerId");if(v===n){const x={activeTriggerElement:p,...h?r:null};i.update(x);return}if(v==null&&h){const x={activeTriggerId:n??null,activeTriggerElement:p,...r};i.update(x)}}),m=Ce(p=>{f(p),p&&d(p)});return Ee(()=>(m(a.current),()=>m(null)),[m,a,i,n]),Ee(()=>{if(c){const p={activeTriggerElement:a.current,...r};i.update(p)}},[c,i,a,...Object.values(r)]),{registerTrigger:m,isMountedByThisTrigger:c}}function Cc(n,a={}){const{closeOnActiveTriggerUnmount:i=!1}=a,r=b.useRef(null),c=n.useState("open"),f=n.useState("triggerCount"),d=n.useState("activeTriggerId"),m=n.useState("activeTriggerElement");Ee(()=>{if(!c){r.current=null,n.state.triggerCount!==0&&n.set("triggerCount",0);return}const p=n.context.triggerElements.size,h={};n.state.triggerCount!==p&&(h.triggerCount=p);const v=n.select("activeTriggerId");let x=null;if(v){const S=n.context.triggerElements.getById(v);if(S)r.current=v,S!==n.state.activeTriggerElement&&(h.activeTriggerElement=S);else{for(const[T,w]of n.context.triggerElements.entries())if(w===n.state.activeTriggerElement){h.activeTriggerId=T,h.activeTriggerElement=w,r.current=T;break}h.activeTriggerId===void 0&&(r.current===v?x=v:r.current=null)}}else r.current=null;if(!x&&!v&&p===1){const S=n.context.triggerElements.entries().next();if(!S.done){const[T,w]=S.value;h.activeTriggerId=T,h.activeTriggerElement=w,r.current=T}}(h.triggerCount!==void 0||h.activeTriggerId!==void 0||h.activeTriggerElement!==void 0)&&n.update(h),x&&i&&queueMicrotask(()=>{if(n.select("open")&&n.select("activeTriggerId")===x&&!n.context.triggerElements.getById(x)){const S=Ke(vc);n.setOpen(!1,S),S.isCanceled||n.update({activeTriggerId:null,activeTriggerElement:null})}})},[c,n,f,d,m,i])}function Ac(n,a,i,r){const{mounted:c,setMounted:f,transitionStatus:d}=u2(n,!1,!1,r),m=a.useState("preventUnmountingOnClose"),p=n?!1:m;a.useSyncedValues({mounted:c,transitionStatus:d,preventUnmountingOnClose:p});const h=Ce(()=>{f(!1),a.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),i?.(),a.context.onOpenChangeComplete?.(!1)});return $s({enabled:c&&!n&&!p,open:n,ref:a.context.popupRef,onComplete(){n||h()}}),{forceUnmount:h,transitionStatus:d}}function Mc(n,a){n.useSyncedValues(a),Ee(()=>()=>{n.update({activeTriggerProps:wt,inactiveTriggerProps:wt,popupProps:wt})},[n])}function I0(n,a){Ee(()=>{!a&&n.state.openMethod!==null&&n.set("openMethod",null)},[a,n]),Ee(()=>()=>{n.state.openMethod!==null&&n.set("openMethod",null)},[n])}class Nc{constructor(){this.idMap=new Map}add(a,i){this.idMap.set(a,i)}delete(a){this.idMap.delete(a)}hasElement(a){for(const i of this.idMap.values())if(i===a)return!0;return!1}hasMatchingElement(a){for(const i of this.idMap.values())if(a(i))return!0;return!1}getById(a){return this.idMap.get(a)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function Dc(n,a,i=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new L0({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:n,floatingId:a,syncOnly:!0,nested:i,onOpenChange:void 0}),floatingId:a,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:wt,inactiveTriggerProps:wt,popupProps:wt}}const Ji=n=>n.triggerIdProp??n.activeTriggerId,Up=n=>n.openProp??n.open,Kv=n=>(n.popupElement?.id??n.floatingId)||void 0;function Y0(n,a){return a!==void 0&&Up(n)&&Ji(n)===a}function p2(n,a){return Y0(n,a)?!0:a!==void 0&&Up(n)&&Ji(n)==null&&n.triggerCount===1}const _c={open:Up,mounted:n=>n.mounted,transitionStatus:n=>n.transitionStatus,floatingRootContext:n=>n.floatingRootContext,triggerCount:n=>n.triggerCount,preventUnmountingOnClose:n=>n.preventUnmountingOnClose,payload:n=>n.payload,activeTriggerId:Ji,activeTriggerElement:n=>n.mounted?n.activeTriggerElement:null,popupId:Kv,isTriggerActive:(n,a)=>a!==void 0&&Ji(n)===a,isOpenedByTrigger:(n,a)=>Y0(n,a),isMountedByTrigger:(n,a)=>a!==void 0&&Ji(n)===a&&n.mounted,triggerProps:(n,a)=>a?n.activeTriggerProps:n.inactiveTriggerProps,triggerPopupId:(n,a)=>p2(n,a)?Kv(n):void 0,popupProps:n=>n.popupProps,popupElement:n=>n.popupElement,positionerElement:n=>n.positionerElement};function Bp(n){const a=b.useCallback(r=>n===void 0?sp:n.subscribeStore(r),[n]),i=b.useCallback(()=>n===void 0?void 0:n.store,[n]);return kp.useSyncExternalStore(a,i,()=>n?.serverStore)}function h2(n){return m2(n,n.rootContext)}function m2(n,a){const{nodeId:i,externalTree:r}=n,c=a.useState("referenceElement"),f=a.useState("floatingElement"),d=a.useState("domReferenceElement"),m=a.useState("open"),p=a.useState("floatingId"),[h,v]=b.useState(null),[x,S]=b.useState(void 0),[T,w]=b.useState(void 0),C=b.useRef(null),M=xa(r),O=b.useMemo(()=>({reference:c,floating:f,domReference:d}),[c,f,d]),N=FR({...n,elements:{...O,...h&&{reference:h}}}),R=Je(x)?x:null,D=T===void 0?a.state.floatingElement:T;a.useSyncedValue("referenceElement",x??null),a.useSyncedValue("domReferenceElement",x===void 0?d:R),a.useSyncedValue("floatingElement",D);const k=b.useCallback(H=>{const _=Je(H)?{getBoundingClientRect:()=>H.getBoundingClientRect(),getClientRects:()=>H.getClientRects(),contextElement:H}:H;v(_),N.refs.setReference(_)},[N.refs]),B=b.useCallback(H=>{(Je(H)||H===null)&&(C.current=H,S(H)),(Je(N.refs.reference.current)||N.refs.reference.current===null||H!==null&&!Je(H))&&N.refs.setReference(H)},[N.refs,S]),j=b.useCallback(H=>{w(H),N.refs.setFloating(H)},[N.refs]),U=b.useMemo(()=>({...N.refs,setReference:B,setFloating:j,setPositionReference:k,domReference:C}),[N.refs,B,j,k]),Y=b.useMemo(()=>({...N.elements,domReference:d}),[N.elements,d]),I=b.useMemo(()=>({...N,dataRef:a.context.dataRef,open:m,onOpenChange:a.setOpen,events:a.context.events,floatingId:p,refs:U,elements:Y,nodeId:i,rootStore:a}),[N,U,Y,i,a,m,p]);return Ee(()=>{d&&(C.current=d)},[d]),Ee(()=>{a.context.dataRef.current.floatingContext=I;const H=M?.nodesRef.current.find(_=>_.id===i);H&&(H.context=I)}),b.useMemo(()=>({...N,context:I,refs:U,elements:Y,rootStore:a}),[N,U,Y,I,a])}const Sd=ip&&ba;function q0(n,a={}){const{enabled:i=!0,delay:r}=a,c="rootStore"in n?n.rootStore:n,{events:f,dataRef:d}=c.context,m=b.useRef(!1),p=b.useRef(null),h=b.useRef(!0),v=tn();b.useEffect(()=>{const S=c.select("domReferenceElement");if(!i)return;const T=xt(S);function w(){const O=c.select("domReferenceElement");!c.select("open")&&ut(O)&&O===It(Qe(O))&&(m.current=!0,p.current=O)}function C(){h.current=!0}function M(){h.current=!1}return Wn(Ie(T,"blur",w),Sd&&Ie(T,"keydown",C,!0),Sd&&Ie(T,"pointerdown",M,!0))},[c,i]),b.useEffect(()=>{if(!i)return;function S(T){if(T.reason===ko||T.reason===fr){const w=c.select("domReferenceElement");Je(w)&&(p.current=w,m.current=!0)}}return f.on("openchange",S),()=>{f.off("openchange",S)}},[f,i,c]);const x=b.useMemo(()=>{function S(){m.current=!1,p.current=null}return{onMouseLeave(){S()},onFocus(T){const w=T.currentTarget;if(m.current){if(p.current===w)return;S()}const C=Tt(T.nativeEvent);if(Je(C)){if(Sd&&!T.relatedTarget){if(!h.current&&!yc(C))return}else if(!Xl(C))return}const M=Gl(T.relatedTarget,c.context.triggerElements),{nativeEvent:O,currentTarget:N}=T,R=typeof r=="function"?r():r;if(c.select("open")&&M||R===0||R===void 0){c.setOpen(!0,Ke(Gs,O,N));return}v.start(R,()=>{m.current||c.setOpen(!0,Ke(Gs,O,N))})},onBlur(T){S();const w=T.relatedTarget,C=T.nativeEvent,M=Je(w)&&w.hasAttribute(sr("focus-guard"))&&w.getAttribute("data-type")==="outside";v.start(0,()=>{const O=c.select("domReferenceElement"),N=It(Qe(O));!w&&N===O||De(d.current.floatingContext?.refs.floating.current,N)||De(O,N)||M||Gl(w??N,c.context.triggerElements)||c.setOpen(!1,Ke(Gs,C))})}}},[d,r,c,v]);return b.useMemo(()=>i?{reference:x,trigger:x}:{},[i,x])}class Pp{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new mn,this.restTimeout=new mn,this.handleCloseOptions=void 0}static create(){return new Pp}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const ec=new WeakMap;function tc(n){if(!n.performedPointerEventsMutation)return;const a=n.pointerEventsScopeElement;a&&ec.get(a)===n&&(n.pointerEventsScopeElement?.style.removeProperty("pointer-events"),n.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),n.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ec.delete(a)),n.performedPointerEventsMutation=!1,n.pointerEventsScopeElement=null,n.pointerEventsReferenceElement=null,n.pointerEventsFloatingElement=null}function V0(n,a){const{scopeElement:i,referenceElement:r,floatingElement:c}=a,f=ec.get(i);f&&f!==n&&tc(f),tc(n),n.performedPointerEventsMutation=!0,n.pointerEventsScopeElement=i,n.pointerEventsReferenceElement=r,n.pointerEventsFloatingElement=c,ec.set(i,n),i.style.pointerEvents="none",r.style.pointerEvents="auto",c.style.pointerEvents="auto"}function Ip(n){const a=n.context.dataRef.current,i=en(()=>a.hoverInteractionState??Pp.create()).current;return a.hoverInteractionState||(a.hoverInteractionState=i),rc(a.hoverInteractionState.disposeEffect),a.hoverInteractionState}function Yp(n,a={}){const{enabled:i=!0,closeDelay:r=0,nodeId:c}=a,f="rootStore"in n?n.rootStore:n,d=f.useState("open"),m=f.useState("floatingElement"),p=f.useState("domReferenceElement"),{dataRef:h}=f.context,v=xa(),x=Ja(),S=Ip(f),T=tn(),w=Ce(()=>Fb(h.current.openEvent?.type,S.interactedInside)),C=Ce(()=>aw(h.current.openEvent?.type)),M=Ce(()=>{tc(S)});Ee(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,M())},[d,S,M]),b.useEffect(()=>M,[M]),Ee(()=>{if(i&&d&&S.handleCloseOptions?.blockPointerEvents&&C()&&Je(p)&&m){const O=p,N=m,R=Qe(m),D=v?.nodesRef.current.find(U=>U.id===x)?.context?.elements.floating;D&&(D.style.pointerEvents="");const k=S.pointerEventsScopeElement!==N?S.pointerEventsScopeElement:null,B=D!==N?D:null,j=S.handleCloseOptions?.getScope?.()??k??B??O.closest("[data-rootownerid]")??R.body;return V0(S,{scopeElement:j,referenceElement:O,floatingElement:N}),()=>{M()}}},[i,d,p,m,S,C,v,x,M]),b.useEffect(()=>{if(!i)return;function O(){return!!(v&&x&&va(v.nodesRef.current,x).length>0)}function N(U){const Y=Ka(r,"close",S.pointerType),I=()=>{f.setOpen(!1,Ke(At,U)),v?.events.emit("floating.closed",U)};Y?S.openChangeTimeout.start(Y,I):(S.openChangeTimeout.clear(),I())}function R(U){const Y=Tt(U);if(!nw(Y)){S.interactedInside=!1;return}S.interactedInside=Y?.closest("[aria-haspopup]")!=null}function D(){S.openChangeTimeout.clear(),T.clear(),v?.events.off("floating.closed",B),M()}function k(U){if(O()&&v){v.events.on("floating.closed",B);return}if(Gl(U.relatedTarget,f.context.triggerElements))return;const Y=h.current.floatingContext?.nodeId??c,I=U.relatedTarget;if(!(v&&Y&&Je(I)&&va(v.nodesRef.current,Y,!1).some(_=>De(_.context?.elements.floating,I)))){if(S.handler){S.handler(U);return}M(),C()&&!w()&&N(U)}}function B(U){!v||!x||O()||T.start(0,()=>{v.events.off("floating.closed",B),f.setOpen(!1,Ke(At,U)),v.events.emit("floating.closed",U)})}const j=m;return Wn(j&&Ie(j,"mouseenter",D),j&&Ie(j,"mouseleave",k),j&&Ie(j,"pointerdown",R,!0),()=>{v?.events.off("floating.closed",B)})},[i,m,f,h,r,c,C,w,M,S,v,x,T])}const g2={current:null};function zc(n,a={}){const{enabled:i=!0,delay:r=0,handleClose:c=null,mouseOnly:f=!1,restMs:d=0,move:m=!0,triggerElementRef:p=g2,externalTree:h,isActiveTrigger:v=!0,getHandleCloseContext:x,isClosing:S,shouldOpen:T,guardStaleOpen:w=!1}=a,C="rootStore"in n?n.rootStore:n,{dataRef:M,events:O}=C.context,N=xa(h),R=Ip(C),D=b.useRef(!1),k=Ut(c),B=Ut(r),j=Ut(d),U=Ut(i),Y=Ut(T),I=Ut(S),H=Ce(()=>Fb(M.current.openEvent?.type,R.interactedInside)),_=Ce(()=>Y.current?.()!==!1),V=Ce((z,X,F)=>{const W=C.context.triggerElements;if(W.hasElement(X))return!z||!De(z,X);if(!Je(F))return!1;const ae=F;return W.hasMatchingElement(A=>De(A,ae))&&(!z||!De(z,ae))}),te=Ce(()=>{if(!R.handler)return;Qe(C.select("domReferenceElement")).removeEventListener("mousemove",R.handler),R.handler=void 0}),Q=Ce(()=>{tc(R)});return v&&(R.handleCloseOptions=c?.__options),b.useEffect(()=>te,[te]),b.useEffect(()=>{if(!i)return;function z(X){X.open?D.current=!1:(D.current=X.reason===At,te(),R.openChangeTimeout.clear(),R.restTimeout.clear(),R.blockMouseMove=!0,R.restTimeoutPending=!1)}return O.on("openchange",z),()=>{O.off("openchange",z)}},[i,O,R,te]),b.useEffect(()=>{if(!i)return;function z(G,ne=!0){const Z=Ka(B.current,"close",R.pointerType);Z?R.openChangeTimeout.start(Z,()=>{C.setOpen(!1,Ke(At,G)),N?.events.emit("floating.closed",G)}):ne&&(R.openChangeTimeout.clear(),C.setOpen(!1,Ke(At,G)),N?.events.emit("floating.closed",G))}const X=p.current??(v?C.select("domReferenceElement"):null);if(!Je(X))return;function F(G){if(R.openChangeTimeout.clear(),R.blockMouseMove=!1,f&&!ma(R.pointerType))return;const ne=xv(j.current),Z=Ka(B.current,"open",R.pointerType),le=Tt(G),se=G.currentTarget??null,he=C.select("domReferenceElement");let pe=se;if(Je(le)&&!C.context.triggerElements.hasElement(le)){for(const Se of C.context.triggerElements.elements())if(De(Se,le)){pe=Se;break}}Je(se)&&Je(he)&&!C.context.triggerElements.hasElement(se)&&De(se,he)&&(pe=he);const ge=pe==null?!1:V(he,pe,le),_e=C.select("open"),je=I.current?.()??C.select("transitionStatus")==="ending",Re=!_e&&je&&D.current,be=!ge&&Je(pe)&&Je(he)&&De(he,pe)&&Re,ke=ne>0&&!Z,Le=ge&&(_e||Re)||be,Ge=!_e||ge;if(Le){_()&&C.setOpen(!0,Ke(At,G,pe));return}ke||(Z?R.openChangeTimeout.start(Z,()=>{Ge&&_()&&C.setOpen(!0,Ke(At,G,pe))}):Ge&&_()&&C.setOpen(!0,Ke(At,G,pe)))}function W(G){if(H()){Q();return}te();const ne=C.select("domReferenceElement"),Z=Qe(ne);R.restTimeout.clear(),R.restTimeoutPending=!1;const le=M.current.floatingContext??x?.();if(Gl(G.relatedTarget,C.context.triggerElements))return;if(k.current&&le){C.select("open")||R.openChangeTimeout.clear();const he=p.current;R.handler=k.current({...le,tree:N,x:G.clientX,y:G.clientY,onClose(){Q(),te(),U.current&&!H()&&he===C.select("domReferenceElement")&&z(G,!0)}}),Z.addEventListener("mousemove",R.handler),R.handler(G);return}(R.pointerType!=="touch"||!De(C.select("floatingElement"),G.relatedTarget))&&z(G)}function ae(G){De(X,G.relatedTarget)||(R.openChangeTimeout.clear(),R.restTimeout.clear(),R.restTimeoutPending=!1)}const A=w?Ie(X,"mouseout",ae):void 0;return m?Wn(Ie(X,"mousemove",F,{once:!0}),Ie(X,"mouseenter",F),Ie(X,"mouseleave",W),A):Wn(Ie(X,"mouseenter",F),Ie(X,"mouseleave",W),A)},[te,Q,M,B,C,i,k,R,v,V,H,f,m,j,p,N,U,x,I,_,w]),b.useMemo(()=>{if(!i)return;function z(X){R.pointerType=X.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(X){const{nativeEvent:F}=X,W=X.currentTarget,ae=C.select("domReferenceElement"),A=C.select("open"),G=V(ae,W,X.target);if(f&&!ma(R.pointerType))return;if(A&&G&&R.handleCloseOptions?.blockPointerEvents){const le=C.select("floatingElement");if(le){const se=R.handleCloseOptions?.getScope?.()??W.ownerDocument.body;V0(R,{scopeElement:se,referenceElement:W,floatingElement:le})}}const ne=xv(j.current);if(A&&!G||ne===0||!G&&R.restTimeoutPending&&X.movementX**2+X.movementY**2<2)return;R.restTimeout.clear();function Z(){if(R.restTimeoutPending=!1,H())return;const le=C.select("open");!R.blockMouseMove&&(!le||G)&&_()&&C.setOpen(!0,Ke(At,F,W))}R.pointerType==="touch"?Yn.flushSync(()=>{Z()}):G&&A?Z():(R.restTimeoutPending=!0,R.restTimeout.start(ne,Z))}}},[i,R,H,V,f,C,j,_])}const y2="Escape";function Qv(n){return ba&&n.movementX===0&&n.movementY===0}function kc(n,a,i){switch(n){case"vertical":return a;case"horizontal":return i;default:return a||i}}function jl(n,a){return kc(a,n===Vb||n===pp,n===pc||n===hc)}function Td(n,a,i){return kc(a,n===pp,i?n===pc:n===hc)||n==="Enter"||n===" "||n===""}function v2(n,a,i){return kc(a,i?n===pc:n===hc,n===pp)}function b2(n,a,i,r){const c=i?n===hc:n===pc,f=n===Vb;return a==="both"||a==="horizontal"&&r?n===y2:kc(a,c,f)}function x2(n,a){const{listRef:i,activeIndex:r,onNavigate:c=()=>{},enabled:f=!0,selectedIndex:d=null,allowEscape:m=!1,loopFocus:p=!1,nested:h=!1,rtl:v=!1,virtual:x=!1,focusItemOnOpen:S="auto",focusItemOnHover:T=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:M="vertical",parentOrientation:O,id:N,resetOnPointerLeave:R=!0,externalTree:D,grid:k}=a,B=k!=null,j="rootStore"in n?n.rootStore:n,U=j.useState("open"),Y=j.useState("floatingElement"),I=j.useState("domReferenceElement"),H=j.context.dataRef,_=Id(Y),V=Pd(I),te=Ut(_),Q=Ja(),z=xa(D),X=b.useRef(S),F=b.useRef(d??-1),W=b.useRef(null),ae=b.useRef(!0),A=Ce(fe=>{c(F.current===-1?null:F.current,fe)}),G=b.useRef(!!Y),ne=b.useRef(U),Z=b.useRef(!1),le=b.useRef(!1),se=b.useRef(null),he=Ut(C),pe=Ut(U),ge=Ut(d),_e=Ut(R),je=ar(),Re=ar(),be=Ce(()=>{function fe(ve){x?z?.events.emit("virtualfocus",ve):se.current=Yl(ve,{sync:Z.current,preventScroll:!0})}const ye=i.current[F.current],de=le.current;ye&&fe(ye),(Z.current?ve=>ve():ve=>je.request(ve))(()=>{const ve=i.current[F.current]||ye;if(!ve)return;ye||fe(ve),Te&&(de||!ae.current)&&ve.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Ee(()=>{H.current.orientation=M},[H,M]),Ee(()=>{f&&(U&&Y?(F.current=d??-1,X.current&&d!=null&&(le.current=!0,A())):G.current&&(F.current=-1,A()))},[f,U,Y,d,A]),Ee(()=>{if(f){if(!U){Z.current=!1;return}if(Y)if(r==null){if(Z.current=!1,ge.current!=null)return;if(G.current&&(F.current=-1,be()),(!ne.current||!G.current)&&X.current&&(W.current!=null||X.current===!0&&W.current==null)){let fe=0;const ye=()=>{i.current[0]==null?(fe<2&&(fe?ie=>Re.request(ie):queueMicrotask)(ye),fe+=1):(F.current=W.current==null||Td(W.current,M,v)||h?Il(i):qd(i),W.current=null,A())};ye()}}else $i(i.current,r)||(F.current=r,be(),le.current=!1)}},[f,U,Y,r,ge,h,i,M,v,A,be,Re]),Ee(()=>{if(!f||Y||!z||x||!G.current)return;const fe=z.nodesRef.current,ye=fe.find(ve=>ve.id===Q)?.context?.elements.floating,de=It(Qe(I??ye??null)),ie=fe.some(ve=>ve.context&&De(ve.context.elements.floating,de));ye&&!ie&&ae.current&&ye.focus({preventScroll:!0})},[f,Y,I,z,Q,x]),Ee(()=>{ne.current=U,G.current=!!Y}),Ee(()=>{U||(W.current=null,X.current=S)},[U,S]);const ke=r!=null,Le=Ce(fe=>{if(!pe.current)return;const ye=i.current.indexOf(fe.currentTarget);ye!==-1&&(F.current!==ye||r!==ye)&&(F.current=ye,A(fe))}),Ge=Ce(()=>O??z?.nodesRef.current.find(fe=>fe.id===Q)?.context?.dataRef?.current.orientation),Se=Ce(()=>Il(i,he.current)),Ue=Ce(fe=>{if(ae.current=!1,Z.current=!0,fe.which===229||!pe.current&&fe.currentTarget===te.current)return;if(h&&b2(fe.key,M,v,B)){jl(fe.key,Ge())||oo(fe),j.setOpen(!1,Ke(Fl,fe.nativeEvent)),ut(I)&&(x?z?.events.emit("virtualfocus",I):I.focus());return}const ye=F.current,de=Il(i,C),ie=qd(i,C);if(V||(fe.key==="Home"&&(oo(fe),F.current=de,A(fe)),fe.key==="End"&&(oo(fe),F.current=ie,A(fe))),k!=null){const ve=k(fe,F.current,i,M,p,v,C,de,ie);if(ve!=null&&(F.current=ve,A(fe)),M==="both")return}if(jl(fe.key,M)){if(oo(fe),U&&!x&&It(fe.currentTarget.ownerDocument)===fe.currentTarget){F.current=Td(fe.key,M,v)?de:ie,A(fe);return}Td(fe.key,M,v)?p?ye>=ie?m&&ye!==i.current.length?F.current=-1:(Z.current=!1,F.current=de):F.current=Oo(i.current,{startingIndex:ye,disabledIndices:C}):F.current=Math.min(ie,Oo(i.current,{startingIndex:ye,disabledIndices:C})):p?ye<=de?m&&ye!==-1?F.current=i.current.length:(Z.current=!1,F.current=ie):F.current=Oo(i.current,{startingIndex:ye,decrement:!0,disabledIndices:C}):F.current=Math.max(de,Oo(i.current,{startingIndex:ye,decrement:!0,disabledIndices:C})),$i(i.current,F.current)&&(F.current=-1),A(fe)}}),Te=b.useMemo(()=>({onFocus(ye){Z.current=!0,Le(ye)},onClick:({currentTarget:ye})=>ye.focus({preventScroll:!0}),onMouseMove(ye){Qv(ye)||(Z.current=!0,le.current=!1,T&&Le(ye))},onPointerLeave(ye){if(!pe.current||!ae.current||ye.pointerType==="touch")return;Z.current=!0;const de=ye.relatedTarget;if(!(!T||i.current.includes(de))&&_e.current&&(se.current?.(),se.current=null,F.current=-1,A(ye),!x)){const ie=te.current,ve=It(Qe(ie));ie&&De(ie,ve)&&ie.focus({preventScroll:!0})}}}),[Le,pe,te,T,i,A,_e,x]),we=b.useMemo(()=>x&&U&&ke&&{"aria-activedescendant":`${N}-${r}`},[x,U,ke,N,r]),Ae=b.useMemo(()=>({...V?{}:we,onKeyDown(fe){if(fe.key==="Tab"&&fe.shiftKey&&U&&!x){const ye=Tt(fe.nativeEvent);if(ye&&!De(te.current,ye))return;oo(fe),j.setOpen(!1,Ke(Qa,fe.nativeEvent)),ut(I)&&I.focus();return}Ue(fe)},onPointerMove(fe){Qv(fe)||(ae.current=!0)}}),[we,Ue,te,V,j,U,x,I]),Ze=b.useMemo(()=>{function fe(ie){j.setOpen(!0,Ke(Fl,ie.nativeEvent,ie.currentTarget))}function ye(ie){S==="auto"&&lp(ie.nativeEvent)&&(X.current=!x)}function de(ie){X.current=S,S==="auto"&&cp(ie.nativeEvent)&&(X.current=!0)}return{onKeyDown(ie){const ve=j.select("open");ae.current=!1;const Be=ie.key.startsWith("Arrow"),Yt=v2(ie.key,Ge(),v),an=jl(ie.key,M),Rt=(h?Yt:an)||ie.key==="Enter"||ie.key.trim()==="";if(x&&ve)return Ue(ie);if(!(!ve&&!w&&Be)){if(Rt){const xe=jl(ie.key,Ge());W.current=h&&xe?null:ie.key}if(h){Yt&&(oo(ie),ve?(F.current=Se(),A(ie)):fe(ie));return}an&&(ge.current!=null&&(F.current=ge.current),oo(ie),!ve&&w?fe(ie):Ue(ie),ve&&A(ie))}},onFocus(ie){j.select("open")&&!x&&(F.current=-1,A(ie))},onPointerDown:de,onPointerEnter:de,onMouseDown:ye,onClick:ye}},[Ue,S,Se,h,A,j,w,M,Ge,v,ge,x]),Me=b.useMemo(()=>({...we,...Ze}),[we,Ze]);return b.useMemo(()=>f?{reference:Me,floating:Ae,item:Te,trigger:Ze}:{},[f,Me,Ae,Ze,Te])}function S2(n,a){const{listRef:i,elementsRef:r,activeIndex:c,onMatch:f,disabledIndices:d,onTyping:m,enabled:p=!0,resetMs:h=750,selectedIndex:v=null}=a,x="rootStore"in n?n.rootStore:n,S=x.useState("open"),T=tn(),w=b.useRef(""),C=b.useRef(v??c??-1),M=b.useRef(null),O=Ce(D=>{function k(te){return r?.current[te]}function B(te){const Q=k(te);return Q&&!xc(Q)||Q?.matches(":disabled")?!1:d==null||!Xs(_o,te,d)}function j(te,Q,z=0){if(te.length===0)return-1;const X=(z%te.length+te.length)%te.length,F=Q.toLowerCase();for(let W=0;W<te.length;W+=1){const ae=(X+W)%te.length;if(!(!te[ae]?.toLowerCase().startsWith(F)||!B(ae)))return ae}return-1}const U=i.current;if(w.current.length>0&&D.key===" "&&(oo(D),m?.(!0)),w.current.length>0&&w.current[0]!==" "&&j(U,w.current)===-1&&D.key!==" "&&m?.(!1),U==null||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;S&&D.key!==" "&&(oo(D),m?.(!0));const Y=w.current==="";Y&&(C.current=v??c??-1),U.every((te,Q)=>te&&B(Q)?te[0]?.toLowerCase()!==te[1]?.toLowerCase():!0)&&w.current===D.key&&(w.current="",C.current=M.current),w.current+=D.key,T.start(h,()=>{w.current="",C.current=M.current,m?.(!1)});const _=((Y?v??c??-1:C.current)??0)+1,V=j(U,w.current,_);V!==-1?(f?.(V),M.current=V):D.key!==" "&&(w.current="",m?.(!1))}),N=Ce(D=>{const k=D.relatedTarget,B=x.select("domReferenceElement"),j=x.select("floatingElement");De(B,k)||De(j,k)||(T.clear(),w.current="",C.current=M.current,m?.(!1))});Ee(()=>{!S&&v!==null||(T.clear(),M.current=null,w.current!==""&&(w.current=""))},[S,v,T]);const R=b.useMemo(()=>({onKeyDown:O,onBlur:N}),[O,N]);return b.useMemo(()=>p?{reference:R,floating:R}:{},[p,R])}const Zv=.1,T2=Zv*Zv,ht=.5;function Hl(n,a,i,r,c,f){return r>=a!=f>=a&&n<=(c-i)*(a-r)/(f-r)+i}function Ll(n,a,i,r,c,f,d,m,p,h){let v=!1;return Hl(n,a,i,r,c,f)&&(v=!v),Hl(n,a,c,f,d,m)&&(v=!v),Hl(n,a,d,m,p,h)&&(v=!v),Hl(n,a,p,h,i,r)&&(v=!v),v}function E2(n,a,i){return n>=i.x&&n<=i.x+i.width&&a>=i.y&&a<=i.y+i.height}function Ul(n,a,i,r,c,f){const d=Math.min(i,c),m=Math.max(i,c),p=Math.min(r,f),h=Math.max(r,f);return n>=d&&n<=m&&a>=p&&a<=h}function jc(n={}){const{blockPointerEvents:a=!1}=n,i=new mn,r=({x:c,y:f,placement:d,elements:m,onClose:p,nodeId:h,tree:v})=>{const x=d?.split("-")[0];let S=!1,T=null,w=null,C=typeof performance<"u"?performance.now():0;function M(N,R){const D=performance.now(),k=D-C;if(T===null||w===null||k===0)return T=N,w=R,C=D,!1;const B=N-T,j=R-w,U=B*B+j*j,Y=k*k*T2;return T=N,w=R,C=D,U<Y}function O(){i.clear(),p()}return function(R){i.clear();const D=m.domReference,k=m.floating;if(!D||!k||x==null||c==null||f==null)return;const{clientX:B,clientY:j}=R,U=Tt(R),Y=R.type==="mouseleave",I=De(k,U),H=De(D,U);if(I&&(S=!0,!Y))return;if(H&&(S=!1,!Y)){S=!0;return}if(Y&&Je(R.relatedTarget)&&De(k,R.relatedTarget))return;function _(){return!!(v&&va(v.nodesRef.current,h).length>0)}function V(){_()||O()}if(_())return;const te=D.getBoundingClientRect(),Q=k.getBoundingClientRect(),z=c>Q.right-Q.width/2,X=f>Q.bottom-Q.height/2,F=Q.width>te.width,W=Q.height>te.height,ae=(F?te:Q).left,A=(F?te:Q).right,G=(W?te:Q).top,ne=(W?te:Q).bottom;if(x==="top"&&f>=te.bottom-1||x==="bottom"&&f<=te.top+1||x==="left"&&c>=te.right-1||x==="right"&&c<=te.left+1){V();return}let Z=!1;switch(x){case"top":Z=Ul(B,j,ae,te.top+1,A,Q.bottom-1);break;case"bottom":Z=Ul(B,j,ae,Q.top+1,A,te.bottom-1);break;case"left":Z=Ul(B,j,Q.right-1,ne,te.left+1,G);break;case"right":Z=Ul(B,j,te.right-1,ne,Q.left+1,G);break}if(Z)return;if(S&&!E2(B,j,te)){V();return}if(!Y&&M(B,j)){V();return}let le=!1;switch(x){case"top":{const se=F?ht/2:ht*4,he=F||z?c+se:c-se,pe=F?c-se:z?c+se:c-se,ge=f+ht+1,_e=z||F?Q.bottom-ht:Q.top,je=z?F?Q.bottom-ht:Q.top:Q.bottom-ht;le=Ll(B,j,he,ge,pe,ge,Q.left,_e,Q.right,je);break}case"bottom":{const se=F?ht/2:ht*4,he=F||z?c+se:c-se,pe=F?c-se:z?c+se:c-se,ge=f-ht,_e=z||F?Q.top+ht:Q.bottom,je=z?F?Q.top+ht:Q.bottom:Q.top+ht;le=Ll(B,j,he,ge,pe,ge,Q.left,_e,Q.right,je);break}case"left":{const se=W?ht/2:ht*4,he=W||X?f+se:f-se,pe=W?f-se:X?f+se:f-se,ge=c+ht+1,_e=X||W?Q.right-ht:Q.left,je=X?W?Q.right-ht:Q.left:Q.right-ht;le=Ll(B,j,_e,Q.top,je,Q.bottom,ge,he,ge,pe);break}case"right":{const se=W?ht/2:ht*4,he=W||X?f+se:f-se,pe=W?f-se:X?f+se:f-se,ge=c-ht,_e=X||W?Q.left+ht:Q.right,je=X?W?Q.left+ht:Q.right:Q.left+ht;le=Ll(B,j,ge,he,ge,pe,_e,Q.top,je,Q.bottom);break}}le?S||i.start(40,V):V()}};return r.__options={...n,blockPointerEvents:a},r}const w2={..._c,disabled:n=>n.disabled,instantType:n=>n.instantType,isInstantPhase:n=>n.isInstantPhase,trackCursorAxis:n=>n.trackCursorAxis,disableHoverablePopup:n=>n.disableHoverablePopup,lastOpenChangeReason:n=>n.openChangeReason,closeOnClick:n=>n.closeOnClick,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin};class R2 extends Ws{constructor(a,i,r){const c=new Nc;super(O2(a,c,i,r),C2(c),w2)}setOpen=(a,i)=>{d2(this,a,i,{extraState:{openChangeReason:i.reason}})};cancelPendingOpen(a){this.state.floatingRootContext.dispatchOpenChange(!1,Ke(ko,a))}}function O2(n,a,i,r=!1){return{...Dc(a,i,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...n}}function C2(n){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n}}const A2=cr(function(a){const{disabled:i=!1,defaultOpen:r=!1,open:c,disableHoverablePopup:f=!1,trackCursorAxis:d="none",actionsRef:m,onOpenChange:p,onOpenChangeComplete:h,handle:v,triggerId:x,defaultTriggerId:S=null,children:T}=a,w=jp((H,_)=>new R2({open:r,openProp:c,activeTriggerId:S,triggerIdProp:x},H,_));w.useControlledProp("openProp",c),w.useControlledProp("triggerIdProp",x),w.useContextCallback("onOpenChange",p),w.useContextCallback("onOpenChangeComplete",h);const C=w.useState("open"),M=!i&&C,O=w.useState("activeTriggerId"),N=w.useState("mounted"),R=w.useState("payload");w.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:f,disabled:i}),Cc(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:D,transitionStatus:k}=Ac(M,w),B=w.useState("isInstantPhase"),j=w.useState("instantType"),U=w.useState("lastOpenChangeReason"),Y=b.useRef(null);Ee(()=>{C&&i&&w.setOpen(!1,Ke(iw))},[C,i,w]),Ee(()=>{k==="ending"&&U===vc||k!=="ending"&&B?(j!=="delay"&&(Y.current=j),w.set("instantType","delay")):Y.current!==null&&(w.set("instantType",Y.current),Y.current=null)},[k,B,U,j,w]),Ee(()=>{M&&O==null&&w.set("payload",void 0)},[w,O,M]),b.useImperativeHandle(m,()=>({unmount:D,close:()=>w.setOpen(!1,Ke(bc))}),[D,w]);const I=M||N||!i&&d!=="none";return y.jsxs(Pb.Provider,{value:w,children:[v&&y.jsx(Rc,{handle:v,store:w}),I&&y.jsx(M2,{store:w,disabled:i,trackCursorAxis:d}),typeof T=="function"?T({payload:R}):T]})});function M2({store:n,disabled:a,trackCursorAxis:i}){const r=n.useState("floatingRootContext"),c=Sc(r,{enabled:!a,referencePress:()=>n.select("closeOnClick")}),f=fR(r,{enabled:!a&&i!=="none",axis:i==="none"?void 0:i}),d=b.useMemo(()=>No(f.reference,c.reference),[f.reference,c.reference]);return Mc(n,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:c.floating??wt}),null}function Sa(n){return Wa(n,"base-ui")}const G0=b.createContext(void 0);function N2(){return b.useContext(G0)}const D2=600,X0="data-base-ui-tooltip-trigger";function Wv(n){if("composedPath"in n){const i=n.composedPath();for(let r=0;r<i.length;r+=1){const c=i[r];if(Je(c))return c}}const a=n.target;return Je(a)?a:null}function _2(n){let a=n;for(;a;){const i=a.closest(`[${X0}]`);if(i)return i;const r=a.getRootNode();a="host"in r&&Je(r.host)?r.host:null}return null}const z2=ap(function(a,i){const{render:r,className:c,style:f,handle:d,payload:m,disabled:p,delay:h,closeOnClick:v=!0,closeDelay:x,id:S,...T}=a,w=ic(!0),M=Bp(d)??w;if(!M)throw new Error(Bt(82));const O=Sa(S),N=M.useState("isTriggerActive",O),R=M.useState("isOpenedByTrigger",O),D=M.useState("floatingRootContext"),k=b.useRef(null),B=x??0,{registerTrigger:j,isMountedByThisTrigger:U}=Lp(O,k,M,{payload:m,closeOnClick:v,closeDelay:B}),Y=N2(),{activeIdRef:I,delayRef:H,isInstantPhase:_,hasProvider:V}=cw(D,{open:R}),te=Ip(D);M.useSyncedValue("isInstantPhase",_);const Q=M.useState("disabled"),z=p??Q,X=Ut(z),F=M.useState("trackCursorAxis"),W=M.useState("disableHoverablePopup"),ae=b.useRef(!1),A=tn(),G=b.useRef(void 0);function ne(){return V&&I.current!=null?0:h??Y??D2}function Z(be){const ke=k.current;if(!ke||!be)return!1;const Le=_2(be);return Le!==null&&Le!==ke&&De(ke,Le)}function le(be){const ke=Z(be);return ae.current=ke,ke&&(te.openChangeTimeout.clear(),te.restTimeout.clear(),te.restTimeoutPending=!1,A.clear()),ke}const se=zc(D,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!W&&F!=="both"?jc():null,restMs:ne,delay(){return x==null&&V?{close:Ka(H.current,"close")}:{close:B}},triggerElementRef:k,isActiveTrigger:N,isClosing:()=>M.select("transitionStatus")==="ending",shouldOpen(){return!ae.current}}),he=q0(D,{enabled:!z}).reference,pe=be=>{const ke=ae.current,Le=Wv(be),Ge=le(Le),Se=k.current,Ue=Se&&Le&&De(Se,Le);if(Ge&&M.select("open")&&M.select("lastOpenChangeReason")===At){M.setOpen(!1,Ke(At,be));return}if(ke&&!Ge&&Ue&&!X.current&&!M.select("open")&&Se&&ma(G.current)){const Te=()=>{!ae.current&&!X.current&&!M.select("open")&&M.setOpen(!0,Ke(At,be,Se))},we=ne();we===0?(A.clear(),Te()):A.start(we,Te)}},ge=M.useState("triggerProps",U);return yt("button",a,{state:{open:R},ref:[i,j,k],props:[se,he,U||F!=="none"?ge:void 0,{onMouseOver(be){pe(be.nativeEvent)},onFocus(be){Z(Wv(be.nativeEvent))&&be.preventBaseUIHandler()},onMouseLeave(){ae.current=!1,A.clear(),G.current=void 0},onPointerEnter(be){G.current=be.pointerType},onPointerDown(be){G.current=be.pointerType,M.set("closeOnClick",v),v&&!M.select("open")&&M.cancelPendingOpen(be.nativeEvent)},onClick(be){v&&!M.select("open")&&M.cancelPendingOpen(be.nativeEvent)},id:O,[Bd]:z?"":void 0,[X0]:z?void 0:""},T],stateAttributesMapping:mp})}),F0=b.createContext(void 0);function k2(){const n=b.useContext(F0);if(n===void 0)throw new Error(Bt(70));return n}const K0=b.forwardRef(function(a,i){const{children:r,container:c,className:f,render:d,style:m,...p}=a,{node:h,subtree:v}=T0({container:c,ref:i,componentProps:a,elementProps:p});return!v&&!h?null:y.jsxs(b.Fragment,{children:[v,h&&Yn.createPortal(r,h)]})}),j2=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a;return ic().useState("mounted")||r?y.jsx(F0.Provider,{value:r,children:y.jsx(K0,{ref:i,...c})}):null}),Q0=b.createContext(void 0);function H2(){const n=b.useContext(Q0);if(n===void 0)throw new Error(Bt(71));return n}const L2=b.createContext(void 0);function qp(){return b.useContext(L2)?.direction??"ltr"}const U2=n=>({name:"arrow",options:n,async fn(a){const{x:i,y:r,placement:c,rects:f,platform:d,elements:m,middlewareData:p}=a,{element:h,padding:v=0,offsetParent:x="real"}=ya(n,a)||{};if(h==null)return{};const S=t0(v),T={x:i,y:r},w=xp(c),C=bp(w),M=await d.getDimensions(h),O=w==="y",N=O?"top":"left",R=O?"bottom":"right",D=O?"clientHeight":"clientWidth",k=f.reference[C]+f.reference[w]-T[w]-f.floating[C],B=T[w]-f.reference[w],j=x==="real"?await d.getOffsetParent?.(h):m.floating;let U=m.floating[D]||f.floating[C];(!U||!await d.isElement?.(j))&&(U=m.floating[D]||f.floating[C]);const Y=k/2-B/2,I=U/2-M[C]/2-1,H=Math.min(S[N],I),_=Math.min(S[R],I),V=H,te=U-M[C]-_,Q=U/2-M[C]/2+Y,z=e0(V,Q,te),X=!p.arrow&&Ho(c)!=null&&Q!==z&&f.reference[C]/2-(Q<V?H:_)-M[C]/2<0,F=X?Q<V?Q-V:Q-te:0;return{[w]:T[w]+F,data:{[w]:z,centerOffset:Q-z-F,...X&&{alignmentOffset:F}},reset:X}}}),B2=(n,a)=>{const{name:i,fn:r}=U2(n);return{name:i,fn:r,options:[n,a]}},P2={name:"hide",async fn(n){const{width:a,height:i,x:r,y:c}=n.rects.reference,f=a===0&&i===0&&r===0&&c===0,d=await n.platform.detectOverflow(n,{elementContext:"reference"});return{data:{referenceHidden:d.top-i>=0||d.right-a>=0||d.bottom-i>=0||d.left-a>=0||f}}}},I2={sideX:"left",sideY:"top"},Y2="--available-width",q2="--available-height",V2="--anchor-width",G2="--anchor-height",X2="--transform-origin",$v=Y2,Jv=q2;function Z0(n,a,i){const r=n==="inline-start"||n==="inline-end";return{top:"top",right:r?i?"inline-start":"inline-end":"right",bottom:"bottom",left:r?i?"inline-end":"inline-start":"left"}[a]}function eb(n,a,i){const{rects:r,placement:c}=n;return{side:Z0(a,In(c),i),align:Ho(c)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Vp(n){return F2(n,h2)}function F2(n,a){const{anchor:i,positionMethod:r="absolute",side:c="bottom",sideOffset:f=0,align:d="center",alignOffset:m=0,collisionBoundary:p,collisionPadding:h=5,sticky:v=!1,arrowPadding:x=5,disableAnchorTracking:S=!1,inline:T,keepMounted:w=!1,floatingRootContext:C,mounted:M,collisionAvoidance:O,shift:N,nodeId:R,adaptiveOrigin:D,lazyFlip:k=!1,externalTree:B}=n,[j,U]=b.useState(null);!M&&j!==null&&U(null);const Y=O.side||"flip",I=O.align||"flip",H=O.fallbackAxisSide||"end",_=N?.crossAxis??!1,V=N?.rootBoundary,te=typeof i=="function"?i:void 0,Q=Ce(te),z=te?Q:i,X=Ut(i),F=Ut(M),ae=qp()==="rtl",A=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ae?"left":"right","inline-start":ae?"right":"left"}[c],G=d==="center"?A:`${A}-${d}`;let ne=h;typeof ne=="number"?ne={top:ne,right:ne,bottom:ne,left:ne}:ne&&(ne={top:ne.top||0,right:ne.right||0,bottom:ne.bottom||0,left:ne.left||0});const Z=1,le=c==="bottom"?Z:0,se=c==="top"?Z:0,he=c==="right"?Z:0,pe=c==="left"?Z:0,ge={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:ne},_e=b.useRef(null),je=Ut(f),Re=Ut(m),be=typeof f!="function"?f:0,ke=typeof m!="function"?m:0,Le=[];T&&Le.push(T),Le.push(KR(Fe=>{const Et=eb(Fe,c,ae),Gt=typeof je.current=="function"?je.current(Et):je.current,zt=typeof Re.current=="function"?Re.current(Et):Re.current;return{mainAxis:Gt,crossAxis:zt,alignmentAxis:zt}},[be,ke,ae,c]));const Ge=I==="none"&&Y!=="shift",Se=!Ge&&(v||_||Y==="shift"),Ue=Y==="none"?null:WR({...ge,padding:{top:ne.top+Z+le,right:ne.right+Z+pe,bottom:ne.bottom+Z+se,left:ne.left+Z+he},mainAxis:!_&&Y==="flip",crossAxis:I==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),Te=Ge?null:QR({...ge,rootBoundary:V,mainAxis:I!=="none",crossAxis:Se,limiter:v||_?void 0:ZR(Fe=>{if(!_e.current)return{};const{width:Et,height:Gt}=_e.current.getBoundingClientRect(),zt=Bn(In(Fe.placement)),$n=zt==="y"?Et:Gt,sn=zt==="y"?ne.left+ne.right:ne.top+ne.bottom;return{offset:$n/2+sn/2}})},[ge,v,_,V,ne,I]);Y==="shift"||I==="shift"||d==="center"?Le.push(Te,Ue):Le.push(Ue,Te),Le.push($R({...ge,apply({elements:{floating:Fe},availableWidth:Et,availableHeight:Gt,rects:zt}){if(!F.current)return;const $n=Fe.style;$n.setProperty($v,`${Et}px`),$n.setProperty(Jv,`${Gt}px`);const sn=xt(Fe).devicePixelRatio||1,{x:Bo,y:An,width:os,height:Gn}=zt.reference,Po=(Math.round((Bo+os)*sn)-Math.round(Bo*sn))/sn,Io=(Math.round((An+Gn)*sn)-Math.round(An*sn))/sn;$n.setProperty(V2,`${Po}px`),$n.setProperty(G2,`${Io}px`)}}),B2(Fe=>({element:_e.current||Qe(Fe.elements.floating).createElement("div"),padding:_e.current?x:0,offsetParent:"floating"}),[x]),{name:"transformOrigin",fn(Fe){const{elements:{floating:Et},middlewareData:Gt,placement:zt,platform:$n,rects:sn,y:Bo}=Fe,An=In(zt),os=Ho(zt),Gn=Bn(An)==="y",Po=_e.current,Io=typeof f=="function"?f(eb(Fe,c,ae)):f;let Yo;if(!Po&&os&&Math.abs(Gn?Gt.shift?.x||0:Gt.shift?.y||0)<=1)Yo=os==="start"===(Gn&&$n.isRTL?.(Et)===!0)?"100%":"0%";else{const gr=Gn?Gt.arrow?.x||0:Gt.arrow?.y||0,yr=Gn?Po?.clientWidth||0:Po?.clientHeight||0;Yo=`${gr+yr/2}px`}let wa=An==="top"||An==="left"?`calc(100% + ${Io}px)`:`${-Io}px`;return Se&&Gn&&Math.abs(Gt.shift?.y||0)>Io&&(wa=`${sn.reference.y+sn.reference.height/2-Bo}px`),Et.style.setProperty(X2,Gn?`${Yo} ${wa}`:`${wa} ${Yo}`),{}}},P2,D),Ee(()=>{!M&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[M,C]);const we=b.useMemo(()=>({ancestorScroll:!S,elementResize:!S&&typeof ResizeObserver<"u",layoutShift:!S&&typeof IntersectionObserver<"u"}),[S]),{refs:Ae,elements:Ze,x:Me,y:fe,middlewareData:ye,update:de,placement:ie,context:ve,isPositioned:Be,floatingStyles:Yt}=a({rootContext:C,open:w?M:void 0,placement:G,middleware:Le,strategy:r,whileElementsMounted:w?void 0:(...Fe)=>Iv(...Fe,we),nodeId:R,externalTree:B}),{sideX:an,sideY:Rt}=ye.adaptiveOrigin||I2,xe=Be?r:"fixed",qe=b.useMemo(()=>{let Fe;return Be?D?Fe={position:xe,[an]:Me,[Rt]:fe}:Fe={...Yt,position:xe}:Fe={position:xe,top:0,left:0},Fe[$v]="100vw",Fe[Jv]="100vh",Be||(Fe.opacity=0),Fe},[D,xe,an,Me,Rt,fe,Yt,Be]),ot=b.useRef(null);Ee(()=>{if(!M)return;const Fe=X.current,Et=typeof Fe=="function"?Fe():Fe,zt=(tb(Et)?Et.current:Et)||null||null;zt!==ot.current&&(Ae.setPositionReference(zt),ot.current=zt)},[M,Ae,z,X]),b.useEffect(()=>{if(!M)return;const Fe=X.current;typeof Fe!="function"&&tb(Fe)&&Fe.current!==ot.current&&(Ae.setPositionReference(Fe.current),ot.current=Fe.current)},[M,Ae,z,X]),b.useEffect(()=>{if(w&&M&&Ze.reference&&Ze.floating)return Iv(Ze.reference,Ze.floating,de,we)},[w,M,Ze,de,we]);const mt=In(ie),On=Z0(c,mt,ae),qn=Ho(ie)||"center",Cn=!!ye.hide?.referenceHidden;Ee(()=>{k&&M&&Be&&mt!==A&&U(mt)},[k,M,Be,mt,A]);const _t=b.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Vn=ye.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:qe,arrowStyles:_t,arrowRef:_e,arrowUncentered:Vn,side:On,align:qn,physicalSide:mt,anchorHidden:Cn,refs:Ae,context:ve,isPositioned:Be,update:de}),[qe,_t,_e,Vn,On,qn,mt,Cn,Ae,ve,Be,de])}function tb(n){return n!=null&&"current"in n}function Hc(n){return n==="starting"?eR:wt}function Gp(n,a,{styles:i,transitionStatus:r,props:c,refs:f,hidden:d,inert:m=!1}){const p={...i};return m&&(p.pointerEvents="none"),yt("div",n,{state:a,ref:f,props:[{role:"presentation",hidden:d,style:p},Hc(r),c],stateAttributesMapping:mc})}const K2=b.forwardRef(function(a,i){const{render:r,className:c,anchor:f,positionMethod:d="absolute",side:m="top",align:p="center",sideOffset:h=0,alignOffset:v=0,collisionBoundary:x="clipping-ancestors",collisionPadding:S=5,arrowPadding:T=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:M=Op,style:O,...N}=a,R=ic(),D=k2(),k=R.useState("open"),B=R.useState("mounted"),j=R.useState("trackCursorAxis"),U=R.useState("disableHoverablePopup"),Y=R.useState("floatingRootContext"),I=R.useState("instantType"),H=R.useState("transitionStatus"),_=R.useState("adaptiveOrigin"),V=Vp({anchor:f,positionMethod:d,floatingRootContext:Y,mounted:B,side:m,sideOffset:h,align:p,alignOffset:v,collisionBoundary:x,collisionPadding:S,sticky:w,arrowPadding:T,disableAnchorTracking:C,keepMounted:D,collisionAvoidance:M,adaptiveOrigin:_}),te=b.useMemo(()=>({open:k,side:V.side,align:V.align,anchorHidden:V.anchorHidden,instant:j!=="none"?"tracking-cursor":I}),[k,V.side,V.align,V.anchorHidden,j,I]),Q=Gp(a,te,{styles:V.positionerStyles,transitionStatus:H,props:N,refs:[i,R.useStateSetter("positionerElement")],hidden:!B,inert:!k||j==="both"||U});return y.jsx(Q0.Provider,{value:V,children:Q})}),Q2=b.forwardRef(function(a,i){const{render:r,className:c,style:f,...d}=a,m=ic(),{side:p,align:h}=H2(),v=m.useState("open"),x=m.useState("instantType"),S=m.useState("transitionStatus"),T=m.useState("popupProps"),w=m.useState("floatingRootContext"),C=m.useState("disabled"),M=m.useState("closeDelay");$s({open:v,ref:m.context.popupRef,onComplete(){v&&m.context.onOpenChangeComplete?.(!0)}}),Yp(w,{enabled:!C,closeDelay:M});const O=m.useStateSetter("popupElement");return yt("div",a,{state:{open:v,side:p,align:h,instant:x,transitionStatus:S},ref:[i,m.context.popupRef,O],props:[wc,T,Hc(S),d],stateAttributesMapping:gc})}),Z2=function(a){const{delay:i,closeDelay:r,timeout:c=400}=a,f=b.useMemo(()=>({open:i,close:r}),[i,r]);return y.jsx(G0.Provider,{value:i,children:y.jsx(lw,{delay:f,timeoutMs:c,children:a.children})})};function Lc(n){return Ep(19)?n:n?"true":void 0}function W0({label:n,shortcut:a,side:i="bottom",children:r}){return y.jsxs(A2,{children:[y.jsx(z2,{render:r}),y.jsx(j2,{children:y.jsx(K2,{side:i,sideOffset:6,className:"z-[1000]",children:y.jsxs(Q2,{className:"rounded-md bg-fg px-2 py-1 text-xs text-surface shadow-popup data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity",children:[n,a?y.jsx("span",{className:"ml-2 opacity-60",children:a}):null]})})})]})}function W2({children:n}){return y.jsx(Z2,{delay:500,closeDelay:0,children:n})}function $2(n){return n.repeat&&(n.key==="Enter"||n.key===" ")}function ir(n){$2(n)&&n.target===n.currentTarget&&n.preventDefault()}function $0(n){return n?a=>{ir(a),n(a)}:ir}const J2=200,eO=2e3;function tO(n,a,i){let r=null,c=!1;const f=()=>{c||(c=!0,n.removeEventListener("keydown",d,!0),n.removeEventListener("keyup",d,!0),n.clearTimeout(m),r!==null&&n.clearTimeout(r))},d=p=>{const h=p.key==="Enter"||p.key===" ";if(p.type==="keyup"){p.key===" "&&!i(p.target)&&p.preventDefault(),p.key===a&&r===null&&(r=n.setTimeout(f,J2));return}h&&!i(p.target)&&(p.preventDefault(),p.stopImmediatePropagation())},m=n.setTimeout(f,eO);return n.addEventListener("keydown",d,!0),n.addEventListener("keyup",d,!0),f}const nO={primary:"bg-accent text-accent-fg hover:brightness-110 active:brightness-95",secondary:"bg-surface text-fg border border-line hover:bg-hover",ghost:"bg-transparent text-fg hover:bg-hover",danger:"bg-danger text-white hover:brightness-110"},oO={sm:"h-6 px-2 text-xs gap-1",md:"h-7 px-2.5 text-[13px] gap-1.5",lg:"h-8 px-3 text-[13px] gap-2"},on=b.forwardRef(function({variant:a="secondary",size:i="md",icon:r,className:c,children:f,type:d="button",onKeyDown:m,...p},h){return y.jsxs("button",{ref:h,type:d,className:Mt("inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-control font-medium transition-[background,filter]","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-45",nO[a],oO[i],c),...p,onKeyDown:$0(m),children:[r,f]})}),aO={sm:"size-6",md:"size-7",lg:"size-8"},Js=b.forwardRef(function({label:a,icon:i,shortcut:r,active:c,size:f="md",noTooltip:d,className:m,type:p="button",onKeyDown:h,...v},x){const S=y.jsx("button",{ref:x,type:p,"aria-label":a,"aria-pressed":c===void 0?void 0:c,className:Mt("inline-flex shrink-0 items-center justify-center rounded-control text-fg-muted transition-colors","hover:bg-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-40",c&&"bg-accent-soft text-accent hover:bg-accent-soft hover:text-accent",aO[f],m),...v,onKeyDown:$0(h),children:i});return d?S:y.jsx(W0,{label:a,shortcut:r,children:S})}),J0=b.createContext(void 0);function Xp(n){const a=b.useContext(J0);if(a===void 0&&!n)throw new Error(Bt(33));return a}const ex=b.createContext(void 0);function Ta(n){const a=b.useContext(ex);if(a===void 0&&!n)throw new Error(Bt(36));return a}const sO=b.createContext(void 0);function Fp(n=!0){const a=b.useContext(sO);if(a===void 0&&!n)throw new Error(Bt(25));return a}function tx({controlled:n,default:a,name:i,state:r="value"}){const{current:c}=b.useRef(n!==void 0),[f,d]=b.useState(a),m=c&&n!==void 0?n:f,p=b.useCallback(h=>{c||d(h)},[]);return[m,p]}const nx=b.createContext(void 0);function Kp(n=!1){const a=b.useContext(nx);if(a===void 0&&!n)throw new Error(Bt(16));return a}function iO(n){const{focusableWhenDisabled:a,disabled:i,composite:r=!1,tabIndex:c=0,isNativeButton:f}=n,d=r&&a!==!1,m=r&&a===!1;return{props:b.useMemo(()=>{const h={onKeyDown(v){i&&a&&v.key!=="Tab"&&v.preventDefault()}};return r||(h.tabIndex=c,!f&&i&&(h.tabIndex=a?c:-1)),(f&&(a||d)||!f&&i)&&(h["aria-disabled"]=i),f&&(!a||m)&&(h.disabled=i),h},[r,i,a,d,m,f,c])}}function Vl(n,a,{detail:i=0}={}){n.dispatchEvent(new(xt(n)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:i,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey,altKey:a.altKey,metaKey:a.metaKey}))}function ei(n={}){const{disabled:a=!1,focusableWhenDisabled:i,tabIndex:r=0,native:c=!0,composite:f}=n,d=b.useRef(null),m=Kp(!0),p=f??m!==void 0,{props:h}=iO({focusableWhenDisabled:i,disabled:a,composite:p,tabIndex:r,isNativeButton:c}),v=b.useCallback(()=>{const T=d.current;Ed(T)&&p&&a&&h.disabled===void 0&&T.disabled&&(T.disabled=!1)},[a,h.disabled,p]);Ee(v,[v]);const x=b.useCallback((T={})=>{const{onClick:w,onMouseDown:C,onKeyUp:M,onKeyDown:O,onPointerDown:N,...R}=T;return No({onClick(D){if(a){D.preventDefault();return}w?.(D)},onMouseDown(D){a||C?.(D)},onKeyDown(D){if(a||($l(D),O?.(D),D.baseUIHandlerPrevented))return;const k=D.target===D.currentTarget,B=D.currentTarget,j=Ed(B),U=!c&&rO(B),Y=k&&(c?j:!U),I=D.key==="Enter",H=D.key===" ",_=B.getAttribute("role"),V=_?.startsWith("menuitem")||_==="option"||_==="gridcell";if(k&&p&&H){if(D.defaultPrevented&&V)return;D.preventDefault(),(!c||j)&&(D.preventBaseUIHandler(),Vl(B,D));return}if(!Y||c||!H&&!I){k&&U&&H&&D.preventDefault();return}D.defaultPrevented||(D.preventDefault(),I&&(D.preventBaseUIHandler(),Vl(B,D)))},onKeyUp(D){if(!a){if($l(D),M?.(D),D.target===D.currentTarget&&c&&p&&Ed(D.currentTarget)&&D.key===" "){D.preventDefault();return}D.baseUIHandlerPrevented||D.target===D.currentTarget&&!c&&!p&&!D.defaultPrevented&&D.key===" "&&(D.preventBaseUIHandler(),Vl(D.currentTarget,D))}},onPointerDown(D){if(a){D.preventDefault();return}N?.(D)}},c?{type:"button"}:{role:"button"},h,R)},[a,h,p,c]),S=Ce(T=>{d.current=T,v()});return{getButtonProps:x,buttonRef:S}}function Ed(n){return ut(n)&&n.tagName==="BUTTON"}function rO(n){return ut(n)&&n.tagName==="A"&&!!n.href}function lO(n){const{closeOnClick:a,highlighted:i,id:r,nodeId:c,store:f,typingRef:d,itemRef:m,itemMetadata:p}=n,{events:h}=f.useState("floatingTreeRoot"),v=f.useState("open"),x=Fp(!0),S=x!==void 0;return b.useMemo(()=>({id:r,role:"menuitem",tabIndex:v&&i?0:-1,onKeyDown(T){T.key===" "&&d?.current&&T.preventDefault()},onMouseMove(T){c&&h.emit("itemhover",{nodeId:c,target:T.currentTarget})},onClick(T){a&&h.emit("close",{domEvent:T,reason:Kb})},onMouseUp(T){if(x){const w=x.initialCursorPointRef.current;if(x.initialCursorPointRef.current=null,S&&w&&Math.abs(T.clientX-w.x)<=1&&Math.abs(T.clientY-w.y)<=1||S&&!ip&&T.button===2)return}m.current&&f.context.allowMouseUpTriggerRef.current&&(!S||T.button===2)&&p.type==="regular-item"&&Vl(m.current,T,{detail:1})}}),[a,i,r,h,c,v,f,d,m,x,S,p])}const cO={type:"regular-item"};function ox(n){const{closeOnClick:a,disabled:i,highlighted:r,id:c,store:f,typingRef:d=f.context.typingRef,nativeButton:m,itemMetadata:p,nodeId:h}=n,v=b.useRef(null),{getButtonProps:x,buttonRef:S}=ei({disabled:i,focusableWhenDisabled:!0,native:m,composite:!0}),T=lO({closeOnClick:a,highlighted:r,id:c,nodeId:h,store:f,typingRef:d,itemRef:v,itemMetadata:p}),w=b.useCallback(M=>No(T,{onMouseEnter(){p.type==="submenu-trigger"&&p.setActive()}},M,x),[T,x,p]),C=Za(v,S);return b.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const ax=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function uO(){return b.useContext(ax)}function Qp(n={}){const{guess:a,label:i,metadata:r,textRef:c,index:f}=n,{register:d,unregister:m,subscribeMapChange:p,nextIndexRef:h}=uO(),v=b.useRef(-1),[x,S]=b.useState(f==null&&a?()=>{if(v.current===-1){const M=h.current;h.current+=1,v.current=M}return v.current}:-1),T=f??x,w=b.useRef(null),C=b.useCallback(M=>{const O=w.current;O&&m(O),w.current=M,M&&d(M,{metadata:r??null,index:f??null,label:i,textRef:c})},[f,d,m,r,i,c]);return Ee(()=>{if(f==null)return p(M=>{const O=w.current?M.get(w.current)?.index:null;O!=null&&S(O)})},[f,p]),{ref:C,index:T}}const sx=b.forwardRef(function(a,i){const{render:r,className:c,id:f,label:d,nativeButton:m=!1,disabled:p=!1,closeOnClick:h=!0,style:v,...x}=a,S=Qp({guess:!0,label:d}),T=Xp(!0),w=Sa(f),{store:C}=Ta(),M=C.useState("disabled"),O=p||M,N=C.useState("isActive",S.index),R=C.useState("itemProps"),{getItemProps:D,itemRef:k}=ox({closeOnClick:h,disabled:O,highlighted:N,id:w,store:C,nativeButton:m,nodeId:T?.context.nodeId,itemMetadata:cO});return yt("div",a,{state:{disabled:O,highlighted:N},props:[R,x,D],ref:[k,i,S.ref]})}),fO=b.createContext(void 0);function Zp(n){return b.useContext(fO)}const Fd="ArrowUp",Kd="ArrowDown",Qd="ArrowLeft",Zd="ArrowRight",Wd="Home",$d="End",Uc=new Set([Fd,Kd,Qd,Zd,Wd,$d]),dO="Shift",pO=[dO,"Control","Alt","Meta"];function hO(n){return ut(n)&&n.tagName==="INPUT"}function nb(n){return!!(hO(n)&&n.selectionStart!=null||ut(n)&&n.tagName==="TEXTAREA")}function ob(n,a,i,r){if(!n||!a||!a.scrollTo)return;let c=n.scrollLeft,f=n.scrollTop;const d=n.clientWidth<n.scrollWidth,m=n.clientHeight<n.scrollHeight;if(d&&r!=="vertical"){const p=ab(n,a,"left"),h=Bl(n),v=Bl(a);i==="ltr"&&(p+a.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-h.scrollPaddingRight?c=p+a.offsetWidth+v.scrollMarginRight-n.clientWidth+h.scrollPaddingRight:p-v.scrollMarginLeft<n.scrollLeft+h.scrollPaddingLeft&&(c=p-v.scrollMarginLeft-h.scrollPaddingLeft)),i==="rtl"&&(p-v.scrollMarginLeft<n.scrollLeft+h.scrollPaddingLeft?c=p-v.scrollMarginLeft-h.scrollPaddingLeft:p+a.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-h.scrollPaddingRight&&(c=p+a.offsetWidth+v.scrollMarginRight-n.clientWidth+h.scrollPaddingRight))}if(m&&r!=="horizontal"){const p=ab(n,a,"top"),h=Bl(n),v=Bl(a);p-v.scrollMarginTop<n.scrollTop+h.scrollPaddingTop?f=p-v.scrollMarginTop-h.scrollPaddingTop:p+a.offsetHeight+v.scrollMarginBottom>n.scrollTop+n.clientHeight-h.scrollPaddingBottom&&(f=p+a.offsetHeight+v.scrollMarginBottom-n.clientHeight+h.scrollPaddingBottom)}n.scrollTo({left:c,top:f,behavior:"auto"})}function ab(n,a,i){const r=i==="left"?"offsetLeft":"offsetTop";let c=0;for(;a.offsetParent&&(c+=a[r],a.offsetParent!==n);)a=a.offsetParent;return c}function Bl(n){const a=getComputedStyle(n);return{scrollMarginTop:parseFloat(a.scrollMarginTop)||0,scrollMarginRight:parseFloat(a.scrollMarginRight)||0,scrollMarginBottom:parseFloat(a.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(a.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(a.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(a.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(a.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(a.scrollPaddingLeft)||0}}const Wp=b.forwardRef(function(a,i){const{render:r,className:c,style:f,finalFocus:d,...m}=a,{store:p}=Ta(),{side:h,align:v}=Xp(),x=Zp()!=null,S=p.useState("open"),T=p.useState("transitionStatus"),w=p.useState("popupProps"),C=p.useState("mounted"),M=p.useState("instantType"),O=p.useState("activeTriggerElement"),N=p.useState("parent"),R=p.useState("lastOpenChangeReason"),D=p.useState("rootId"),k=p.useState("floatingRootContext"),B=p.useState("floatingTreeRoot"),j=p.useState("closeDelay"),U=p.useState("hoverEnabled"),Y=p.useState("disabled"),I=p.useState("openMethod"),H=N.type==="context-menu";$s({open:S,ref:p.context.popupRef,onComplete(){S&&p.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function z(X){p.setOpen(!1,Ke(X.reason,X.domEvent))}return B.events.on("close",z),()=>{B.events.off("close",z)}},[B.events,p]),Yp(k,{enabled:U&&!Y&&!H&&N.type!=="menubar",closeDelay:j});const _=p.useStateSetter("popupElement"),V={transitionStatus:T,side:h,align:v,open:S,nested:N.type==="menu",instant:M},te=yt("div",a,{state:V,ref:[i,p.context.popupRef,_],stateAttributesMapping:gc,props:[w,{onKeyDown(z){x&&Uc.has(z.key)&&z.stopPropagation()}},Hc(T),m,{"data-rootownerid":D}]});let Q=N.type===void 0||H;return(O||N.type==="menubar"&&R!==gp)&&(Q=!0),y.jsx(Dp,{context:k,openInteractionType:I,modal:H,disabled:!C,returnFocus:d===void 0?Q:d,initialFocus:N.type!=="menu",restoreFocus:!0,externalTree:N.type!=="menubar"?B:void 0,previousFocusableElement:O,nextFocusableElement:N.type===void 0?p.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:N.type===void 0?p.context.beforeContentFocusGuardRef:void 0,children:te})}),ix=b.createContext(void 0);function mO(){const n=b.useContext(ix);if(n===void 0)throw new Error(Bt(32));return n}const $p=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a,{store:f,parent:d}=Ta();if(!(f.useState("mounted")||r))return null;const h=d.type==="menu"||d.type==="menubar"?"group":void 0;return y.jsx(ix.Provider,{value:r,children:y.jsx(Cp,{ref:i,...c,portalOwnerRole:h})})});function rx(n){const{children:a,elementsRef:i,labelsRef:r,onMapChange:c}=n,f=Ce(c),[,d]=b.useState(!1),m=en(yO).current,p=en(gO).current,h=b.useRef(0),v=b.useRef(!0),x=b.useRef(null),S=b.useRef(null),T=Ce(()=>{v.current||(v.current=!0,d(k=>!k))}),w=Ce((k,B)=>{p.set(k,B),T()}),C=Ce(k=>{p.delete(k),T()}),M=Ce(k=>{const B=new Map;return i.current.length=0,r&&(r.current.length=0),k.forEach(j=>{B.set(j.element,{...j.registration.metadata??{},index:j.index}),i.current[j.index]=j.element,r&&(r.current[j.index]=j.registration.label!==void 0?j.registration.label:j.registration.textRef?.current?.textContent??j.element.textContent)}),h.current=i.current.length,B});function O(k){if(S.current?.disconnect(),S.current=null,typeof MutationObserver!="function"||k.length<2)return;const B=new MutationObserver(U=>{if(!xO(U))return;let Y=null;for(const I of k)if(I.isConnected){if(Y&&lx(Y,I)>0){B.disconnect(),T();return}Y=I}});S.current=B;const j=new Set;for(let U=1;U<k.length;U+=1){const Y=bO(k[U-1],k[U]);Y&&j.add(Y)}j.forEach(U=>B.observe(U,{childList:!0}))}const N=Ce(()=>{const[k,B]=vO(p),j=M(k),U=x.current,Y=!U||U.length!==k.length||k.some((I,H)=>{const _=U[H];return I.index!==_.index||I.element!==_.element||I.registration.index!==_.registration.index||I.registration.metadata!==_.registration.metadata});O(B),x.current=k,v.current=!1,Y&&(m.forEach(I=>I(j)),f(j))});Ee(()=>(!v.current&&x.current&&M(x.current),()=>{i.current=[],r&&(r.current=[])}),[i,r,M]),Ee(()=>{v.current&&N()}),Ee(()=>()=>{S.current?.disconnect(),v.current=!0},[]);const R=Ce(k=>(m.add(k),()=>{m.delete(k)})),D=b.useMemo(()=>({register:w,unregister:C,subscribeMapChange:R,nextIndexRef:h}),[w,C,R,h]);return y.jsx(ax.Provider,{value:D,children:a})}function gO(){return new Map}function yO(){return new Set}function vO(n){const a=new Set,i=[],r=[];n.forEach((f,d)=>{if(!d.isConnected)return;const m=f.index,p={index:m??-1,element:d,registration:f};m===null?r.push(p):m>=0&&(a.add(m),i.push(p))});let c=0;return r.sort((f,d)=>lx(f.element,d.element)),r.forEach(f=>{for(;a.has(c);)c+=1;f.index=c,i.push(f),c+=1}),a.size>0&&i.sort((f,d)=>f.index-d.index),[i,r.map(f=>f.element)]}function bO(n,a){let i=n.parentElement;for(;i&&!i.contains(a);)i=i.parentElement;return i}function xO(n){for(const a of n)for(let i=0;i<a.removedNodes.length;i+=1)if(a.removedNodes[i].isConnected)return!0;return!1}function lx(n,a){return n.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Jp=b.forwardRef(function(a,i){const{cutout:r,...c}=a;let f;if(r){const d=r.getBoundingClientRect();f=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return y.jsx("div",{ref:i,role:"presentation","data-base-ui-inert":"",...c,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});let sb={},ib={},rb="";function Bc(n,a){return ur(n)?n:a}function lb(n,a,i){return/hidden|clip/.test(n.getComputedStyle(Bc(a,i)).overflowY)}function SO(n){if(typeof document>"u")return!1;const a=Qe(n);return xt(a).innerWidth-a.documentElement.clientWidth>0}function TO(n){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const i=Qe(n),r=i.documentElement,c=i.body,f=Bc(r,c),d=f.style.overflowY,m=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",f.style.overflowY="scroll";const p=f.offsetWidth;f.style.overflowY="hidden";const h=f.offsetWidth;return f.style.overflowY=d,r.style.scrollbarGutter=m,p===h}function EO(n){const a=Qe(n),i=a.documentElement,r=a.body,c=Bc(i,r),f={overflowY:c.style.overflowY,overflowX:c.style.overflowX};return Object.assign(c.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(c.style,f)}}function wO(n){const a=Qe(n),i=a.documentElement,r=a.body,c=xt(i);let f=0,d=0,m=!1;const p=ao.create();if(ba&&(c.visualViewport?.scale??1)!==1)return()=>{};function h(){const T=c.getComputedStyle(i),w=c.getComputedStyle(r),O=(T.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=i.scrollTop,d=i.scrollLeft,sb={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY,overflowX:i.style.overflowX},rb=i.style.scrollBehavior,ib={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const N=i.scrollHeight>i.clientHeight,R=i.scrollWidth>i.clientWidth,D=T.overflowY==="scroll"||w.overflowY==="scroll",k=T.overflowX==="scroll"||w.overflowX==="scroll",B=Math.max(0,c.innerWidth-r.clientWidth),j=Math.max(0,c.innerHeight-r.clientHeight),U=parseFloat(w.marginTop)+parseFloat(w.marginBottom),Y=parseFloat(w.marginLeft)+parseFloat(w.marginRight),I=Bc(i,r);if(m=TO(n),m){i.style.scrollbarGutter=O,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(i.style,{scrollbarGutter:O,overflowY:"hidden",overflowX:"hidden"}),(N||D)&&(i.style.overflowY="scroll"),(R||k)&&(i.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:U||j?`calc(100dvh - ${U+j}px)`:"100dvh",width:Y||B?`calc(100vw - ${Y+B}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=f,r.scrollLeft=d,i.setAttribute("data-base-ui-scroll-locked",""),i.style.scrollBehavior="unset"}function v(){Object.assign(i.style,sb),Object.assign(r.style,ib),m||(i.scrollTop=f,i.scrollLeft=d,i.removeAttribute("data-base-ui-scroll-locked"),i.style.scrollBehavior=rb)}function x(){v(),p.request(h)}h();const S=Ie(c,"resize",x);return()=>{p.cancel(),v(),typeof c.removeEventListener=="function"&&S()}}class RO{lockCount=0;restore=null;timeoutLock=mn.create();timeoutUnlock=mn.create();acquire(a){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(a)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(a){if(this.lockCount===0||this.restore!==null)return;const i=Qe(a),r=i.documentElement,c=i.body,f=xt(r);if(lb(f,r,c)){const m=new f.MutationObserver(()=>{lb(f,r,c)||(m.disconnect(),this.restore=null,this.lock(a))}),p={attributes:!0};m.observe(r,p),m.observe(c,p),this.restore=()=>m.disconnect();return}const d=cc||!SO(a);this.restore=d?EO(a):wO(a)}}const OO=new RO;function cx(n=!0,a=null){Ee(()=>{if(n)return OO.acquire(a)},[n,a])}const CO=20;function ux(n,a,i,r){const[c,f]=b.useState(!1);Ee(()=>{if(!n||!a||i==null){f(!1);return}const d=Qe(i).documentElement.clientWidth,m=i.offsetWidth;f(d>0&&m>0&&m>=d-CO)},[n,a,i]),cx(n&&(!a||c),r)}const eh=b.forwardRef(function(a,i){const{anchor:r,positionMethod:c="absolute",className:f,render:d,side:m,align:p,sideOffset:h=0,alignOffset:v=0,collisionBoundary:x="clipping-ancestors",collisionPadding:S=5,arrowPadding:T=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:M=sR,style:O,...N}=a,{store:R}=Ta(),D=mO(),k=Fp(!0),B=R.useState("parent"),j=R.useState("floatingRootContext"),U=R.useState("floatingTreeRoot"),Y=R.useState("mounted"),I=R.useState("open"),H=R.useState("modal"),_=R.useState("openMethod"),V=R.useState("activeTriggerElement"),te=R.useState("transitionStatus"),Q=R.useState("positionerElement"),z=R.useState("instantType"),X=R.useState("adaptiveOrigin"),F=R.useState("lastOpenChangeReason"),W=R.useState("floatingNodeId"),ae=R.useState("floatingParentNodeId"),A=j.useState("domReferenceElement"),G=b.useRef(null),ne=Ec(Q);let Z=r,le=h,se=v,he=p,pe=M;B.type==="context-menu"&&(Z=r??B.context?.anchor,he=he??"start",!m&&he!=="center"&&(se=a.alignOffset??2,le=a.sideOffset??-5));let ge=m,_e=he;B.type==="menu"?(ge=ge??"inline-end",_e=_e??"start",pe=a.collisionAvoidance??Op):B.type==="menubar"&&(ge=ge??(B.context.orientation==="vertical"?"inline-end":"bottom"),_e=_e??"start");const je=B.type==="context-menu",Re=Vp({anchor:Z,floatingRootContext:j,positionMethod:k?"fixed":c,mounted:Y,side:ge,sideOffset:le,align:_e,alignOffset:se,arrowPadding:je?0:T,collisionBoundary:x,collisionPadding:S,sticky:w,nodeId:W,keepMounted:D,disableAnchorTracking:C,collisionAvoidance:pe,shift:je?{crossAxis:!("side"in pe&&pe.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:U,adaptiveOrigin:X});b.useEffect(()=>{function we(Ae){Ae.open&&(Ae.parentNodeId===W&&R.set("hoverEnabled",!1),Ae.nodeId!==W&&Ae.parentNodeId===R.select("floatingParentNodeId")&&R.setOpen(!1,Ke(Zi)))}return U.events.on("menuopenchange",we),()=>{U.events.off("menuopenchange",we)}},[R,U.events,W]),b.useEffect(()=>{if(R.select("floatingParentNodeId")==null)return;function we(Ae){if(Ae.open||Ae.nodeId!==R.select("floatingParentNodeId"))return;const Ze=Ae.reason??Zi;R.setOpen(!1,Ke(Ze))}return U.events.on("menuopenchange",we),()=>{U.events.off("menuopenchange",we)}},[U.events,R]);const be=tn();b.useEffect(()=>{I||be.clear()},[I,be]),b.useEffect(()=>{function we(Ae){if(!(!I||Ae.nodeId!==R.select("floatingParentNodeId")))if(Ae.target&&V&&V!==Ae.target){const Ze=R.select("closeDelay");Ze>0?be.isStarted()||be.start(Ze,()=>{R.setOpen(!1,Ke(Zi))}):R.setOpen(!1,Ke(Zi))}else be.clear()}return U.events.on("itemhover",we),()=>{U.events.off("itemhover",we)}},[U.events,I,V,R,be]),b.useEffect(()=>{const we={open:I,nodeId:W,parentNodeId:ae,reason:R.select("lastOpenChangeReason")};U.events.emit("menuopenchange",we)},[U.events,I,R,W,ae]),Ee(()=>{const we=A,Ae=G.current;if(we&&(G.current=we),Ae&&we&&we!==Ae){R.set("instantType",void 0);const Ze=new AbortController;return ne(()=>{R.set("instantType","trigger-change")},Ze.signal),()=>{Ze.abort()}}},[A,ne,R]);const ke={open:I,side:Re.side,align:Re.align,anchorHidden:Re.anchorHidden,nested:B.type==="menu",instant:z},Le=B.type==="menubar"&&B.context.modal;ux(I&&(Le||H&&F!==At),_==="touch",Q,V);const Se=Gp(a,ke,{styles:Re.positionerStyles,transitionStatus:te,props:N,refs:[i,R.useStateSetter("positionerElement")],hidden:!Y,inert:!I}),Ue=Y&&B.type!=="menu"&&(B.type!=="menubar"&&H&&F!==At||B.type==="menubar"&&B.context.modal);let Te=null;return B.type==="menubar"?Te=B.context.contentElement:B.type===void 0&&(Te=V),y.jsxs(J0.Provider,{value:Re,children:[Ue&&y.jsx(Jp,{ref:B.type==="context-menu"||B.type==="nested-context-menu"?B.context.internalBackdropRef:null,inert:Lc(!I),cutout:Te}),y.jsx(O0,{id:W,children:y.jsx(rx,{elementsRef:R.context.itemDomElements,labelsRef:R.context.itemLabels,children:Se})})]})}),AO=b.createContext(null);function fx(n){return b.useContext(AO)}function MO(n){const a=b.useRef(""),i=b.useCallback(c=>{c.defaultPrevented||(a.current=c.pointerType,n(c,c.pointerType))},[n]);return{onClick:b.useCallback(c=>{if(c.detail===0){n(c,"keyboard");return}"pointerType"in c?n(c,c.pointerType):n(c,a.current),a.current=""},[n]),onPointerDown:i}}function NO(n,a){const i=b.useRef(n),r=Ce(a);Ee(()=>{i.current!==n&&r(i.current),i.current=n},[n,r])}function dx(n,a){const i=Ce((f,d)=>{(typeof n=="function"?n():n)||a(d||(cc?"touch":""))}),{onClick:r,onPointerDown:c}=MO(i);return b.useMemo(()=>({onClick:r,onPointerDown:c}),[r,c])}function DO(n){const[a,i]=b.useState(null),r=dx(n,i);return NO(n,c=>{c&&!n&&i(null)}),b.useMemo(()=>({openMethod:a,triggerProps:r}),[a,r])}const _O={..._c,disabled:n=>n.parent.type==="menubar"&&n.parent.context.disabled||n.disabled,modal:n=>(n.parent.type===void 0||n.parent.type==="context-menu")&&(n.modal??!0),openMethod:n=>n.openMethod,allowMouseEnter:n=>n.allowMouseEnter,highlightItemOnHover:n=>n.highlightItemOnHover,parent:n=>n.parent,rootId:n=>n.parent.type==="menu"?n.parent.store.select("rootId"):n.parent.type!==void 0?n.parent.context.rootId:n.rootId,activeIndex:n=>n.activeIndex,isActive:(n,a)=>n.activeIndex===a,hoverEnabled:n=>n.hoverEnabled,instantType:n=>n.instantType,lastOpenChangeReason:n=>n.openChangeReason,floatingTreeRoot:n=>n.parent.type==="menu"?n.parent.store.select("floatingTreeRoot"):n.floatingTreeRoot,floatingNodeId:n=>n.floatingNodeId,floatingParentNodeId:n=>n.floatingParentNodeId,itemProps:n=>n.itemProps,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin,keyboardEventRelay:n=>{if(n.keyboardEventRelay)return n.keyboardEventRelay;if(n.parent.type==="menu")return n.parent.store.select("keyboardEventRelay")}};class zO extends Ws{constructor(a,i,r=!1){const c=new Nc,f=jO(c,i,r,a);super(f,kO(c),_O),this.unsubscribeParentListener=this.observe("parent",d=>{if(this.unsubscribeParentListener?.(),d.type==="menu"){let m=d.store.select("rootId"),p=d.store.select("floatingTreeRoot"),h=d.store.select("keyboardEventRelay");this.unsubscribeParentListener=d.store.subscribe(()=>{const v=d.store.select("rootId"),x=d.store.select("floatingTreeRoot"),S=d.store.select("keyboardEventRelay");m===v&&p===x&&h===S||(m=v,p=x,h=S,this.notifyAll())}),this.context.allowMouseUpTriggerRef=d.store.context.allowMouseUpTriggerRef;return}d.type!==void 0&&(this.context.allowMouseUpTriggerRef=d.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(a,i){this.state.floatingRootContext.context.events.emit("setOpen",{open:a,eventDetails:i})}unsubscribeParentListener=null}function kO(n){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:n}}function jO(n,a,i=!1,r){return{...Dc(n,a,i),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ap,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:wt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const px=b.createContext(void 0);function hx(){return b.useContext(px)}const th=cr(function(a){const{children:i,open:r,onOpenChange:c,onOpenChangeComplete:f,defaultOpen:d=!1,disabled:m=!1,modal:p,loopFocus:h=!0,orientation:v="vertical",actionsRef:x,closeParentOnEsc:S=!1,handle:T,triggerId:w,defaultTriggerId:C=null,highlightItemOnHover:M=!0}=a,O=Fp(!0),N=Ta(!0),R=fx(!0),D=hx(),k=b.useMemo(()=>D&&N?{type:"menu",store:N.store}:R?{type:"menubar",context:R}:O&&!N?{type:"context-menu",context:O}:{type:void 0},[O,N,R,D]),B=Wa(),j=Wa(),U=Ja(),Y=k.type==="menu"?k.store:void 0,I=(r??d)&&Y?.state.transitionStatus==="starting",H=en(()=>I?Y?.state.instantType:void 0).current,_=HO({open:d,openProp:r,activeTriggerId:C,triggerIdProp:w,parent:k,disabled:m,highlightItemOnHover:M,modal:k.type===void 0?p:void 0,rootId:B,instantType:H},j,U!=null);_.useControlledProp("openProp",r),_.useControlledProp("triggerIdProp",w),_.useContextCallback("onOpenChangeComplete",f);const V=_.useState("floatingTreeRoot"),te=Mp(V),Q=_.useState("open"),z=_.useState("activeTriggerElement"),X=_.useState("positionerElement"),F=_.useState("hoverEnabled"),W=_.useState("disabled"),ae=_.useState("lastOpenChangeReason"),A=_.useState("parent"),G=_.useState("activeIndex"),ne=_.useState("payload"),Z=_.useState("floatingParentNodeId"),le=b.useRef(null),se=b.useRef(A.type!=="context-menu"),he=tn(),pe=b.useRef(!0),ge=tn(),_e=Z!=null,{openMethod:je,triggerProps:Re}=DO(Q);_.useSyncedValues({disabled:m,highlightItemOnHover:M,modal:A.type===void 0?p:void 0,openMethod:je,rootId:B}),Cc(_);const{forceUnmount:be,transitionStatus:ke}=Ac(Q,_,()=>{_.set("allowMouseEnter",!1)},I),Le=Ec(_.context.popupRef);b.useEffect(()=>{if(H===void 0)return;const xe=()=>{_.state.instantType===H&&_.set("instantType",void 0)};if(!Q){xe();return}if(ke!==void 0)return;if(_.context.popupRef.current==null){xe();return}const qe=new AbortController;return Le(xe,qe.signal),()=>{qe.abort()}},[H,Q,ke,Le,_]),Ee(()=>{O&&!N?_.update({parent:{type:"context-menu",context:O},floatingNodeId:te,floatingParentNodeId:U}):N&&_.update({floatingNodeId:te,floatingParentNodeId:U})},[O,N,te,U,_]),b.useEffect(()=>{if(Q||(le.current=null),A.type==="context-menu"){if(!Q){he.clear(),se.current=!1;return}he.start(500,()=>{se.current=!0})}},[he,Q,A.type]),Ee(()=>{!Q&&!F&&_.set("hoverEnabled",!0)},[Q,F,_]);const Ge=Ce((xe,qe)=>{const ot=qe.reason;if(!xe&&!_.select("open")||Q===xe&&qe.trigger===z&&ae===ot)return;const mt=Hp(qe);if(!xe&&qe.trigger==null&&(qe.trigger=z??void 0),c?.(xe,qe),qe.isCanceled)return;_.state.floatingRootContext.dispatchOpenChange(xe,qe);const On=qe.event;if(xe===!1&&On?.type==="click"&&On.pointerType==="touch"&&!pe.current)return;xe&&ot===Gs?(pe.current=!1,ge.start(300,()=>{pe.current=!0})):(pe.current=!0,ge.clear());const qn=(ot===ko||ot===Kb)&&On.detail===0,Cn=!xe&&(ot===fr||ot==null);le.current=qe.event;const _t=Oc(_.state,xe,qe.trigger,mt());_t.openChangeReason=ot,A.type==="menubar"&&(ot===Gs||ot===Qa||ot===At||ot===Fl||ot===Zi)?_t.instantType="group":qn||Cn?_t.instantType=qn?"click":"dismiss":_t.instantType=void 0,_.update(_t)}),Se=U0({popupStore:_,floatingRootContext:_.state.floatingRootContext,floatingId:j,nested:U!=null,onOpenChange:Ge}),Ue=Se.context.events;Ee(()=>{const xe=({open:qe,eventDetails:ot})=>Ge(qe,ot);return Ue.on("setOpen",xe),()=>{Ue?.off("setOpen",xe)}},[Ue,Ge]);const Te=b.useCallback(()=>{_.setOpen(!1,Ke(bc))},[_]);b.useImperativeHandle(x,()=>({unmount:be,close:Te}),[be,Te]);let we;A.type==="context-menu"&&(we=A.context),b.useImperativeHandle(we?.positionerRef,()=>X,[X]),b.useImperativeHandle(we?.actionsRef,()=>({setOpen:Ge}),[Ge]);const Ae=Sc(Se,{enabled:!W,bubbles:{escapeKey:S&&A.type==="menu"},outsidePress(){return A.type!=="context-menu"||le.current?.type==="contextmenu"?!0:se.current},externalTree:_e?V:void 0}),Ze=qp(),Me=b.useCallback(xe=>{_.select("activeIndex")!==xe&&_.set("activeIndex",xe)},[_]),fe=x2(Se,{enabled:!W,listRef:_.context.itemDomElements,activeIndex:G,nested:A.type!==void 0,loopFocus:h,orientation:v,parentOrientation:A.type==="menubar"?A.context.orientation:void 0,rtl:Ze==="rtl",disabledIndices:_o,onNavigate:Me,openOnArrowKeyDown:A.type!=="context-menu",externalTree:_e?V:void 0,focusItemOnHover:M}),ye=b.useCallback(xe=>{_.context.typingRef.current=xe},[_]),de=S2(Se,{enabled:!W,listRef:_.context.itemLabels,elementsRef:_.context.itemDomElements,activeIndex:G,resetMs:Jw,onMatch:xe=>{Q&&xe!==G&&_.set("activeIndex",xe)},onTyping:ye}),ie=b.useMemo(()=>{const xe=No(de.reference,fe.reference,Ae.reference,{onMouseMove(){_.set("allowMouseEnter",!0)}},Re);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=Q,xe},[_,de.reference,fe.reference,Ae.reference,Re,Q]),ve=b.useMemo(()=>{const xe=No(fe.trigger,Ae.trigger,Re);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=!1,xe},[fe.trigger,Ae.trigger,Re]);en(()=>(_.update({inactiveTriggerProps:ve}),null));const Be=b.useMemo(()=>No(wc,{id:j,role:"menu","aria-orientation":v==="horizontal"?"horizontal":void 0,"aria-labelledby":z?.id,onMouseMove(){_.set("allowMouseEnter",!0),A.type==="menu"&&_.set("hoverEnabled",!1)},onClick(){_.select("hoverEnabled")&&_.set("hoverEnabled",!1)},onKeyDown(xe){const qe=_.select("keyboardEventRelay");qe&&!xe.isPropagationStopped()&&qe(xe)}},de.floating,fe.floating,Ae.floating),[z,j,v,A.type,_,de.floating,fe.floating,Ae.floating]),Yt=fe.item??wt;Mc(_,{floatingRootContext:Se,activeTriggerProps:ie,inactiveTriggerProps:ve,popupProps:Be,itemProps:Yt});const an=b.useMemo(()=>({store:_,parent:k}),[_,k]),Rt=y.jsxs(ex.Provider,{value:an,children:[T&&y.jsx(Rc,{handle:T,store:_}),typeof i=="function"?i({payload:ne}):i]});return A.type===void 0||A.type==="context-menu"?y.jsx(C0,{externalTree:V,children:Rt}):Rt});function HO(n,a,i){return en(()=>new zO(n,a,i)).current}function LO(n){const a=Ta().store,i=b.useMemo(()=>({parentMenu:a}),[a]);return y.jsx(px.Provider,{value:i,children:y.jsx(th,{...n})})}const Pl=5;function UO(n,a){const i=BO(a);return n.clientX>=i.left-Pl&&n.clientX<=i.right+Pl&&n.clientY>=i.top-Pl&&n.clientY<=i.bottom+Pl}function BO(n){const a=n.getBoundingClientRect(),i=xt(n);if(rp)return a;const r=i.getComputedStyle(n,"::before"),c=i.getComputedStyle(n,"::after");if(!(r.content!=="none"||c.content!=="none"))return a;const d=parseFloat(r.width)||0,m=parseFloat(r.height)||0,p=parseFloat(c.width)||0,h=parseFloat(c.height)||0,v=Math.max(a.width,d,p),x=Math.max(a.height,m,h),S=v-a.width,T=x-a.height;return{left:a.left-S/2,right:a.right+S/2,top:a.top-T/2,bottom:a.bottom+T/2}}function PO(n={}){const{highlightItemOnHover:a,highlightedIndex:i,onHighlightedIndexChange:r}=Kp(),{ref:c,index:f}=Qp(n),d=i===f,m=b.useRef(null),p=Za(c,m);return{compositeProps:{tabIndex:d?0:-1,onFocus(){r(f)},onMouseMove(){const v=m.current;if(!a||!v)return;const x=v.hasAttribute("disabled")||v.ariaDisabled==="true";!d&&!x&&v.focus()}},compositeRef:p,index:f}}function mx(n){const{render:a,className:i,style:r,state:c=wt,props:f=_o,refs:d=_o,metadata:m,stateAttributesMapping:p,tag:h="div",...v}=n,{compositeProps:x,compositeRef:S}=PO({metadata:m});return yt(h,n,{state:c,ref:[S,...d],props:[x,...f,v],stateAttributesMapping:p})}function gx(n){if(ut(n)&&n.hasAttribute("data-rootownerid"))return n.getAttribute("data-rootownerid");if(!Co(n))return gx(zo(n))}function yx(n,a){const i=b.useRef(null);function r(f){Yn.flushSync(()=>{n.setOpen(!1,Ke(Qa,f.nativeEvent,f.currentTarget))}),kw(i.current)?.focus()}function c(f){const d=n.select("positionerElement");if(d&&Fs(f,d))n.context.beforeContentFocusGuardRef.current?.focus();else{Yn.flushSync(()=>{n.setOpen(!1,Ke(Qa,f.nativeEvent,f.currentTarget))});let m=zw(n.context.triggerFocusTargetRef.current||a.current);for(;m!==null&&De(d,m);){const p=m;if(m=Tp(m),m===p)break}m?.focus()}}return{preFocusGuardRef:i,handlePreFocusGuardFocus:r,handleFocusTargetFocus:c}}function IO(n){const{enabled:a=!0,mouseDownAction:i,open:r}=n,c=b.useRef(!1);return b.useMemo(()=>a?{onMouseDown:f=>{(i==="open"&&!r||i==="close"&&r)&&(c.current=!0,Qe(f.currentTarget).addEventListener("click",()=>{c.current=!1},{once:!0}))},onClick:f=>{c.current&&(c.current=!1,f.preventBaseUIHandler())}}:wt,[a,i,r])}const vx=ap(function(a,i){const{render:r,className:c,style:f,disabled:d=!1,nativeButton:m=!0,id:p,openOnHover:h,delay:v=100,closeDelay:x=0,handle:S,payload:T,...w}=a,C=Ta(!0),O=Bp(S)??C?.store;if(!O)throw new Error(Bt(85));const N=Sa(p),R=O.useState("isTriggerActive",N),D=O.useState("floatingRootContext"),k=O.useState("isOpenedByTrigger",N),B=O.useState("triggerPopupId",N),j=b.useRef(null),U=qO(),Y=Kp(!0),I=xa(),H=b.useMemo(()=>I??new Ap,[I]),_=Mp(H),V=Ja(),{registerTrigger:te,isMountedByThisTrigger:Q}=Lp(N,j,O,{payload:T,closeDelay:x,parent:U,floatingTreeRoot:H,floatingNodeId:_,floatingParentNodeId:V,keyboardEventRelay:Y?.relayKeyboardEvent}),z=U.type==="menubar",X=O.useState("disabled"),F=d||X||z&&U.context.disabled,{getButtonProps:W,buttonRef:ae}=ei({disabled:F,native:m});b.useEffect(()=>{!k&&U.type===void 0&&(O.context.allowMouseUpTriggerRef.current=!1)},[O,k,U.type]);const A=b.useRef(null),G=tn(),ne=Ce(we=>{if(!A.current)return;G.clear(),O.context.allowMouseUpTriggerRef.current=!1;const Ae=we.target;De(A.current,Ae)||De(O.select("positionerElement"),Ae)||Ae===A.current||Ae!=null&&gx(Ae)===O.select("rootId")||UO(we,A.current)||H.events.emit("close",{domEvent:we,reason:sw})});b.useEffect(()=>{k&&O.select("lastOpenChangeReason")===At&&Qe(A.current).addEventListener("mouseup",ne,{once:!0})},[k,ne,O]);const Z=z&&U.context.hasSubmenuOpen,se=zc(D,{enabled:(h??Z)&&!F&&(!z||Z&&!Q),handleClose:jc({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:U.type===void 0?v:void 0,delay:{close:x},triggerElementRef:j,externalTree:H,isActiveTrigger:R,isClosing:()=>O.select("transitionStatus")==="ending"}),he=YO(k,O.select("lastOpenChangeReason")),pe=_p(D,{enabled:!F,event:k&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:U.type===void 0?he:!1}),ge=q0(D,{enabled:!F&&Z}),_e=IO({open:k,enabled:z,mouseDownAction:"open"}),je=b.useMemo(()=>No(ge.reference,pe.reference),[ge.reference,pe.reference]),Re=O.useState("triggerProps",Q),{preFocusGuardRef:be,handlePreFocusGuardFocus:ke,handleFocusTargetFocus:Le}=yx(O,j),Ge={disabled:F,open:k},Se=[A,i,ae,te,j],Ue=[je,se??wt,Re,{"aria-haspopup":"menu","aria-controls":B,id:N,onMouseDown:we=>{if(O.select("open"))return;G.start(200,()=>{O.context.allowMouseUpTriggerRef.current=!0}),Qe(we.currentTarget).addEventListener("mouseup",ne,{once:!0})}},z?{role:"menuitem"}:{},_e,w,W],Te=yt("button",a,{enabled:!z,stateAttributesMapping:Ud,state:Ge,ref:Se,props:Ue});return z?y.jsx(mx,{tag:"button",render:r,className:c,style:f,state:Ge,refs:Se,props:Ue,stateAttributesMapping:Ud}):k?y.jsxs(b.Fragment,{children:[y.jsx(jo,{ref:be,onFocus:ke},`${N}-pre-focus-guard`),y.jsx(b.Fragment,{children:Te},N),y.jsx(jo,{ref:O.context.triggerFocusTargetRef,onFocus:Le},`${N}-post-focus-guard`)]}):y.jsx(b.Fragment,{children:Te},N)});function YO(n,a){const i=tn(),[r,c]=b.useState(!1);return Ee(()=>{n&&a===At?(c(!0),i.start(v0,()=>{c(!1)})):n||(i.clear(),c(!1))},[n,a,i]),r}function qO(){const n=fx();return b.useMemo(()=>n?{type:"menubar",context:n}:{type:void 0},[n])}const VO=b.forwardRef(function(a,i){const{className:r,render:c,orientation:f="horizontal",style:d,...m}=a;return yt("div",a,{state:{orientation:f},ref:i,props:[{role:"separator","aria-orientation":f},m]})});function GO(n){return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const XO={"aria-expanded":void 0},FO=b.forwardRef(function(a,i){const{render:r,className:c,style:f,label:d,id:m,nativeButton:p=!1,openOnHover:h=!0,delay:v=100,closeDelay:x=0,disabled:S=!1,...T}=a,w=hx();if(!w?.parentMenu)throw new Error(Bt(37));const C=Qp({guess:!0,label:d}),M=Xp(),{store:O}=Ta(),N=Sa(m),R=O.useState("open"),D=O.useState("floatingRootContext"),k=O.useState("floatingTreeRoot"),B=O.useState("triggerPopupId",N),j=P0(N,O),U=Ce(je=>{j(je),je!==null&&O.select("open")&&O.select("activeTriggerId")==null&&O.update({activeTriggerId:N??null,activeTriggerElement:je,closeDelay:x})}),Y=b.useRef(null),I=b.useCallback(je=>{Y.current=je,O.set("activeTriggerElement",je)},[O]);Ee(()=>(U(Y.current),()=>U(null)),[U,N,O]),O.useSyncedValue("closeDelay",x);const H=w.parentMenu,_=O.useState("disabled"),V=H.useState("disabled"),te=S||_||V,Q=H.useState("itemProps"),z=H.useState("isActive",C.index),X=b.useMemo(()=>({type:"submenu-trigger",setActive(){H.select("highlightItemOnHover")&&H.set("activeIndex",C.index)}}),[H,C.index]),{getItemProps:F,itemRef:W}=ox({closeOnClick:!1,disabled:te,highlighted:z,id:N,store:O,typingRef:H.context.typingRef,nativeButton:p,itemMetadata:X,nodeId:M?.context.nodeId}),ae=O.useState("hoverEnabled"),A=zc(D,{enabled:ae&&h&&!te,handleClose:jc({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:v,delay:{open:v,close:x},shouldOpen:v>0?()=>H.select("allowMouseEnter"):void 0,triggerElementRef:Y,externalTree:k,isClosing:()=>O.select("transitionStatus")==="ending",guardStaleOpen:!0}),ne=_p(D,{enabled:!te,event:"mousedown",toggle:!h,ignoreMouse:h,stickIfOpen:!1}).reference??wt,Z=O.useState("triggerProps",!0);delete Z.id;const le={disabled:te,highlighted:z,open:R},se=O.useState("openMethod"),pe=O.useState("lastOpenChangeReason")===Fl||se==="keyboard";return yt("div",a,{state:le,stateAttributesMapping:mp,props:[ne,A,Z,Q,R&&pe&&Ib?XO:void 0,{"aria-controls":B,tabIndex:R||z?0:-1,onBlur(){z&&H.set("activeIndex",null)}},T,F],ref:[i,C.ref,W,U,I]})});const KO=n=>n?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function QO(n,a,i=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:KO(n),size:24,node:a,...i.length>0?{aliases:i}:{}}}const ZO=n=>{let a="",i=!1;for(const r of n){if(r==="-"||r==="_"||r<=" "){i=a.length>0;continue}a.length===0?a+=r.toLowerCase():a+=i?r.toUpperCase():r,i=!1}return a};const WO=n=>{const a=ZO(n);return a.charAt(0).toUpperCase()+a.slice(1)};const Jd=(...n)=>n.filter((a,i,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===i).join(" ").trim();const qa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function wd(n){return n!=null}function $O(n,a={}){const i=a.attributeNames??{},r=S=>i[S]??S,c=n.size??n.width??qa.width,f=n.size??n.height??qa.height,d=n.aliases?.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`)??[],m=[...n.name?[`lucide-${n.name}`]:[],...d],p=a.className?.split(" ").filter(Boolean)??[],h=a.includeDefaultClasses===!1?Jd(...p):Jd("lucide",...m,...p),v=a.absoluteStrokeWidth?Number(a.strokeWidth??qa["stroke-width"])*Number(n.size??n.width??qa.width)/Number(a.size??a.width??qa.width):a.strokeWidth??qa["stroke-width"];return["svg",{...Object.entries(qa).reduce((S,[T,w])=>(S[r(T)]=w,S),{}),..."color"in a&&a.color&&{[r("stroke")]:a.color},..."size"in a&&wd(a.size)&&{[r("width")]:a.size,[r("height")]:a.size},..."width"in a&&wd(a.width)&&{[r("width")]:a.width},..."height"in a&&wd(a.height)&&{[r("height")]:a.height},[r("stroke-width")]:v,...h&&{[r("class")]:h},[r("viewBox")]:`0 0 ${c} ${f}`,...a.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},n.node.map(S=>{const[T,w,C]=S,M=a.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[T,M,C]:[T,M]})]}function JO(n,a={}){return $O(n,{...a,attributeNames:{...a.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const eC=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},tC=b.createContext({}),nC=()=>b.useContext(tC),oC=b.forwardRef(({color:n,size:a,width:i,height:r,strokeWidth:c,absoluteStrokeWidth:f,nonScalingStroke:d,className:m="",children:p,iconNode:h=[],icon:v={node:h,aliases:[],size:24},...x},S)=>{const{size:T=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:M=!1,color:O="currentColor",className:N=""}=nC()??{},R=!!p||eC(x),[D,k,B=[]]=JO(v,{color:n??O,width:i??a??T,height:r??a??T,strokeWidth:c??w,absoluteStrokeWidth:f??C,nonScalingStroke:d??M,className:Jd(N,m),hasA11yProp:R,attributes:x});return b.createElement(D,{ref:S,...k},[...B.map(([j,U])=>b.createElement(j,U)),...Array.isArray(p)?p:[p]])});function Ye(n,a=[],i=[]){const r=typeof n=="string"?QO(n,a,i):n,c=b.forwardRef(({className:f,...d},m)=>b.createElement(oC,{ref:m,icon:r,className:f,...d}));return r.name&&(c.displayName=WO(r.name)),c}const bx={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};bx.node;const nh=Ye(bx);const xx={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};xx.node;const Pc=Ye(xx);const Sx={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Sx.node;const Tx=Ye(Sx);const Ex={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Ex.node;const aC=Ye(Ex);const wx={name:"cloud-alert",size:24,node:[["path",{d:"M12 12v4",key:"tww15h"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.128 16.949A7 7 0 1 1 15.71 8h1.79a1 1 0 0 1 0 9h-1.642",key:"1namsd"}]]};wx.node;const sC=Ye(wx);const Rx={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};Rx.node;const Ox=Ye(Rx);const Cx={name:"copy",size:24,node:[["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"}]]};Cx.node;const nc=Ye(Cx);const Ax={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};Ax.node;const iC=Ye(Ax);const Mx={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};Mx.node;const Nx=Ye(Mx);const Dx={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};Dx.node;const rC=Ye(Dx);const _x={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};_x.node;const lC=Ye(_x);const zx={name:"eye",size:24,node:[["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"}]]};zx.node;const cC=Ye(zx);const kx={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};kx.node;const uC=Ye(kx);const jx={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};jx.node;const fC=Ye(jx);const Hx={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};Hx.node;const Lx=Ye(Hx);const Ux={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};Ux.node;const dC=Ye(Ux);const Bx={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};Bx.node;const Px=Ye(Bx);const Ix={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};Ix.node;const Yx=Ye(Ix);const qx={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};qx.node;const pC=Ye(qx);const Vx={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Vx.node;const oh=Ye(Vx);const Gx={name:"lock",size:24,node:[["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"}]]};Gx.node;const ah=Ye(Gx);const Xx={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};Xx.node;const sh=Ye(Xx);const Fx={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};Fx.node;const ih=Ye(Fx);const Kx={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};Kx.node;const hC=Ye(Kx);const Qx={name:"pencil",size:24,node:[["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"}]]};Qx.node;const rh=Ye(Qx);const Zx={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};Zx.node;const mC=Ye(Zx);const Wx={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};Wx.node;const gC=Ye(Wx);const $x={name:"play",size:24,node:[["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"}]]};$x.node;const yC=Ye($x);const Jx={name:"presentation",size:24,node:[["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"}]]};Jx.node;const vC=Ye(Jx);const eS={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};eS.node;const bC=Ye(eS);const tS={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};tS.node;const xC=Ye(tS);const nS={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};nS.node;const oS=Ye(nS);const aS={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};aS.node;const SC=Ye(aS);const sS={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};sS.node;const TC=Ye(sS);const iS={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};iS.node;const EC=Ye(iS);const rS={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};rS.node;const wC=Ye(rS);const lS={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};lS.node;const RC=Ye(lS);const cS={name:"share",size:24,node:[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]]};cS.node;const OC=Ye(cS);const uS={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};uS.node;const fS=Ye(uS);const dS={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};dS.node;const lh=Ye(dS);const pS={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};pS.node;const CC=Ye(pS);const hS={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};hS.node;const cb=Ye(hS);const mS={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};mS.node;const AC=Ye(mS);const gS={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};gS.node;const pr=Ye(gS),yS="rounded-lg bg-surface p-1 text-[13px] text-fg shadow-popup outline-none origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0",vS="flex h-7 min-w-40 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover data-[disabled]:opacity-40";function bS({trigger:n,children:a,side:i="bottom",align:r="start",open:c,onOpenChange:f}){return y.jsxs(th,{open:c,onOpenChange:f?d=>f(d):void 0,children:[y.jsx(vx,{render:n,onKeyDown:ir}),y.jsx($p,{children:y.jsx(eh,{side:i,align:r,sideOffset:6,className:"z-[1000]",children:y.jsx(Wp,{className:yS,children:a})})})]})}function Wt({children:n,onSelect:a,icon:i,shortcut:r,disabled:c,danger:f}){return y.jsxs(sx,{className:Mt(vS,f&&"text-danger"),disabled:c,onClick:a,onKeyDown:ir,children:[y.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:i}),y.jsx("span",{className:"flex-1",children:n}),r?y.jsx("span",{className:"ml-4 text-xs text-fg-subtle",children:r}):null]})}function Va(){return y.jsx(VO,{className:"mx-1 my-1 h-px bg-line"})}function oc({children:n}){return y.jsx("div",{className:"px-2 py-1 text-xs text-fg-subtle",children:n})}function ub({label:n,icon:a,children:i}){return y.jsxs(LO,{children:[y.jsxs(FO,{className:vS,onKeyDown:ir,children:[y.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:a}),y.jsx("span",{className:"flex-1",children:n}),y.jsx(Tx,{className:"size-3.5 text-fg-subtle"})]}),y.jsx($p,{children:y.jsx(eh,{sideOffset:4,className:"z-[1000]",children:y.jsx(Wp,{className:yS,children:i})})})]})}const xS=b.createContext(void 0);function es(n){const a=b.useContext(xS);if(!n&&a===void 0)throw new Error(Bt(27));return a}const MC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,forceRender:d=!1,...m}=a,p=es(),h=p.useState("open"),v=p.useState("nested"),x=p.useState("mounted"),S=p.useState("transitionStatus");return yt("div",a,{state:{open:h,transitionStatus:S},ref:[p.context.backdropRef,i],stateAttributesMapping:gc,props:[{role:"presentation",hidden:!x,style:{userSelect:"none",WebkitUserSelect:"none"}},m],enabled:d||!v})}),NC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,disabled:d=!1,nativeButton:m=!0,...p}=a,h=es(),v=h.useState("open"),{getButtonProps:x,buttonRef:S}=ei({disabled:d,native:m}),T={disabled:d};function w(C){v&&h.setOpen(!1,Ke(Qb,C.nativeEvent))}return yt("button",a,{state:T,ref:[i,S],props:[{onClick:w},p,x]})}),DC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,...m}=a,p=es(),h=Sa(d);return p.useSyncedValueWithCleanup("descriptionElementId",h),yt("p",a,{ref:i,props:[{id:h},m]})}),SS=b.createContext(void 0);function _C(){const n=b.useContext(SS);if(n===void 0)throw new Error(Bt(26));return n}const zC="--nested-dialogs",kC="data-nested-dialog-open",jC={...mc,...hp,nestedDialogOpen(n){return n?{[kC]:""}:null}},HC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,finalFocus:d,initialFocus:m,...p}=a,h=es(),v=h.useState("descriptionElementId"),x=h.useState("disablePointerDismissal"),S=h.useState("floatingRootContext"),T=h.useState("popupProps"),w=h.useState("modal"),C=h.useState("mounted"),M=h.useState("nested"),O=h.useState("nestedOpenDialogCount"),N=h.useState("open"),R=h.useState("openMethod"),D=h.useState("titleElementId"),k=h.useState("transitionStatus"),B=h.useState("role"),j=S.useState("floatingId");_C(),$s({open:N,ref:h.context.popupRef,onComplete(){N&&h.context.onOpenChangeComplete?.(!0)}});const U=m===void 0?B0(h.context.popupRef):m,Y=O>0,I=h.useStateSetter("popupElement"),_=yt("div",a,{state:{open:N,nested:M,transitionStatus:k,nestedDialogOpen:Y},props:[T,{id:j,"aria-labelledby":D,"aria-describedby":v,role:B,...wc,hidden:!C,onKeyDown(V){Uc.has(V.key)&&V.stopPropagation()},style:{[zC]:O}},p],ref:[i,h.context.popupRef,I],stateAttributesMapping:jC});return y.jsx(Dp,{context:S,openInteractionType:R,disabled:!C,closeOnFocusOut:!x,initialFocus:U,returnFocus:d,modal:w!==!1,restoreFocus:"popup",children:_})}),LC=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a,f=es(),d=f.useState("mounted"),m=f.useState("modal"),p=f.useState("open");return d||r?y.jsx(SS.Provider,{value:r,children:y.jsxs(Cp,{ref:i,...c,children:[d&&m===!0&&y.jsx(Jp,{ref:f.context.internalBackdropRef,inert:Lc(!p)}),a.children]})}):null});function UC({store:n,parentContext:a,isDrawer:i}){const r=n.useState("open"),c=n.useState("disablePointerDismissal"),f=n.useState("modal"),d=n.useState("popupElement"),m=n.useState("floatingRootContext"),[p,h]=b.useState(0),[v,x]=b.useState(0),S=p===0,T=Sc(m,{outsidePressEvent(){return n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:f==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(w){if(!n.context.outsidePressEnabledRef.current||"button"in w&&w.button!==0)return!1;if("touches"in w){if(w.type==="touchend"){if(w.changedTouches.length!==1||w.touches.length!==0)return!1}else if(w.touches.length!==1)return!1}const C=Tt(w);if(S&&!c){if(f){const M=n.context.internalBackdropRef.current,O=n.context.backdropRef.current;return M||O?M===C||O===C||De(C,d)&&!C?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return cx(r&&f===!0,d),n.useContextCallback("onNestedDialogOpen",(w,C)=>{h(w),x(C)}),Ee(()=>(a?.onNestedDialogOpen&&(r?a.onNestedDialogOpen(p+1,v+(i?1:0)):a.onNestedDialogOpen(0,0)),()=>{a?.onNestedDialogOpen&&r&&a.onNestedDialogOpen(0,0)}),[i,r,p,v,a]),Mc(n,{activeTriggerProps:T.reference,inactiveTriggerProps:T.trigger,popupProps:T.floating,nestedOpenDialogCount:p,nestedOpenDrawerCount:v}),null}const BC={..._c,modal:n=>n.modal,nested:n=>n.nested,nestedOpenDialogCount:n=>n.nestedOpenDialogCount,nestedOpenDrawerCount:n=>n.nestedOpenDrawerCount,disablePointerDismissal:n=>n.disablePointerDismissal,openMethod:n=>n.openMethod,descriptionElementId:n=>n.descriptionElementId,titleElementId:n=>n.titleElementId,viewportElement:n=>n.viewportElement,role:n=>n.role};class PC extends Ws{constructor(a,i,r){const c=new Nc,f=IC(a,c,i,r);super(f,YC(c),BC)}setOpen=(a,i)=>{i.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!a&&i.trigger==null&&this.state.activeTriggerId!=null&&(i.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(a,i),!i.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(a,i),this.update(Oc(this.state,a,i.trigger)))}}function IC(n,a,i,r=!1){return{...Dc(a,i,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...n}}function YC(n){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0}}function qC(n,a){const{children:i,open:r,defaultOpen:c=!1,onOpenChange:f,onOpenChangeComplete:d,disablePointerDismissal:m=!1,modal:p=!0,actionsRef:h,handle:v,triggerId:x,defaultTriggerId:S=null}=a,T=n==="drawer",w=p,C=m,M="dialog",O=es(!0),N=O!=null,R={modal:w,disablePointerDismissal:C,nested:N,role:M},D=jp((I,H)=>new PC({open:c,openProp:r,activeTriggerId:S,triggerIdProp:x,...R},I,H),!0);D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",x),D.useSyncedValues(R),D.useContextCallback("onOpenChange",f),D.useContextCallback("onOpenChangeComplete",d);const k=D.useState("open"),B=D.useState("mounted"),j=D.useState("payload");I0(D,k),Cc(D);const{forceUnmount:U}=Ac(k,D);b.useImperativeHandle(h,()=>({unmount:U,close:()=>D.setOpen(!1,Ke(bc))}),[U,D]);const Y=k||B;return y.jsxs(xS.Provider,{value:D,children:[v&&y.jsx(Rc,{handle:v,store:D}),Y&&y.jsx(UC,{store:D,parentContext:O?.context,isDrawer:T}),typeof i=="function"?i({payload:j}):i]})}const VC=cr(function(a){return qC("dialog",a)}),GC=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,...m}=a,p=es(),h=Sa(d);return p.useSyncedValueWithCleanup("titleElementId",h),yt("h2",a,{ref:i,props:[{id:h},m]})}),TS=b.createContext(void 0);function ti(n){const a=b.useContext(TS);if(a===void 0&&!n)throw new Error(Bt(47));return a}const XC={..._c,disabled:n=>n.disabled,instantType:n=>n.instantType,openMethod:n=>n.openMethod,openChangeReason:n=>n.openChangeReason,modal:n=>n.modal,focusManagerModal:n=>n.focusManagerModal,stickIfOpen:n=>n.stickIfOpen,titleElementId:n=>n.titleElementId,descriptionElementId:n=>n.descriptionElementId,openOnHover:n=>n.openOnHover,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin};class FC extends Ws{constructor(a,i,r){const c=new Nc;super(KC(a,c,i,r),QC(c),XC)}setOpen=(a,i)=>{const r=i.reason===At,c=i.reason===ko&&i.event.detail===0,f=!a&&(i.reason===fr||i.reason==null),d=Hp(i),m=this.select("activeTriggerId");if(!a&&i.reason===Qb&&i.trigger==null&&m!=null&&(i.trigger=this.context.triggerElements.getById(m)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(a,i),i.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(a,i);const p=()=>{const v=Oc(this.state,a,i.trigger,d());v.openChangeReason=i.reason,this.update(v)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(v0,()=>{this.set("stickIfOpen",!1)}),Yn.flushSync(p)):p();let h;c?h="click":f?h="dismiss":i.reason===Qa&&(h="focus"),this.set("instantType",h)}}function KC(n,a,i,r=!1){const c={...Dc(a,i,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...n};return c.open&&n?.mounted===void 0&&(c.mounted=!0),c}function QC(n){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new mn,triggerElements:n}}const fb=cr(function({props:a}){const{children:i,open:r,defaultOpen:c=!1,onOpenChange:f,onOpenChangeComplete:d,modal:m=!1,handle:p,triggerId:h,defaultTriggerId:v=null}=a,x=WC(p,{modal:m,open:c,openProp:r,activeTriggerId:v,triggerIdProp:h});x.useControlledProp("openProp",r),x.useControlledProp("triggerIdProp",h);const S=x.useState("open"),T=x.useState("mounted"),w=x.useState("payload");x.useContextCallback("onOpenChange",f),x.useContextCallback("onOpenChangeComplete",d),I0(x,S),Cc(x);const{forceUnmount:C}=Ac(S,x,()=>{x.update({stickIfOpen:!0,openChangeReason:null})});x.useSyncedValues({modal:m}),b.useEffect(()=>{S||x.context.stickIfOpenTimeout.clear()},[x,S]),b.useImperativeHandle(a.actionsRef,()=>({unmount:C,close:()=>x.setOpen(!1,Ke(bc))}),[C,x]);const M=S||T;return y.jsxs(TS.Provider,{value:x,children:[p&&y.jsx(Rc,{handle:p,store:x}),M&&y.jsx($C,{store:x,modal:m}),typeof i=="function"?i({payload:w}):i]})});function ZC(n){return ti(!0)?y.jsx(fb,{props:n}):y.jsx(C0,{children:y.jsx(fb,{props:n})})}function WC(n,a){const i=jp((r,c)=>new FC(a,r,c));return b.useEffect(()=>i.context.stickIfOpenTimeout.disposeEffect(),[i]),i}function $C({store:n,modal:a}){const i=n.useState("floatingRootContext"),r=Sc(i,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),c=r.reference,f=r.floating;return Mc(n,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:f}),null}const JC=300,eA=ap(function(a,i){const{render:r,className:c,style:f,disabled:d=!1,nativeButton:m=!0,handle:p,payload:h,openOnHover:v=!1,delay:x=JC,closeDelay:S=0,id:T,...w}=a,C=ti(!0),O=Bp(p)??C;if(!O)throw new Error(Bt(74));const N=Sa(T),R=O.useState("isTriggerActive",N),D=O.useState("floatingRootContext"),k=O.useState("isOpenedByTrigger",N),B=O.useState("triggerPopupId",N),j=b.useRef(null),{registerTrigger:U,isMountedByThisTrigger:Y}=Lp(N,j,O,{payload:h,disabled:d,openOnHover:v,closeDelay:S}),I=O.useState("openChangeReason"),H=O.useState("stickIfOpen"),_=O.useState("openMethod"),V=O.useState("focusManagerModal"),te=zc(D,{enabled:!d&&v&&(_!=="touch"||I!==ko),mouseOnly:!0,move:!1,handleClose:jc(),restMs:x,delay:{close:S},triggerElementRef:j,isActiveTrigger:R,isClosing:()=>O.select("transitionStatus")==="ending"}),Q=_p(D,{stickIfOpen:H}),z=dx(()=>O.select("open"),he=>{O.set("openMethod",he)}),X=O.useState("triggerProps",Y),{getButtonProps:F,buttonRef:W}=ei({disabled:d,native:m}),ae={open(he){return he&&I===ko?Ud.open(he):mp.open(he)}},{preFocusGuardRef:A,handlePreFocusGuardFocus:G,handleFocusTargetFocus:ne}=yx(O,j),le=yt("button",a,{state:{disabled:d,open:k},ref:[W,i,U,j],props:[Q.reference,te,X,z,{[b0]:"",id:N,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":B},w,F],stateAttributesMapping:ae}),se=y.jsx(b.Fragment,{children:le},N);return Y&&!V?y.jsxs(b.Fragment,{children:[y.jsx(jo,{ref:A,onFocus:G}),se,y.jsx(jo,{ref:O.context.triggerFocusTargetRef,onFocus:ne})]}):se}),ES=b.createContext(void 0);function tA(){const n=b.useContext(ES);if(n===void 0)throw new Error(Bt(45));return n}const nA=b.forwardRef(function(a,i){const{keepMounted:r=!1,...c}=a;return ti().useState("mounted")||r?y.jsx(ES.Provider,{value:r,children:y.jsx(Cp,{ref:i,...c})}):null}),wS=b.createContext(void 0);function RS(){const n=b.useContext(wS);if(!n)throw new Error(Bt(46));return n}const oA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,anchor:d,positionMethod:m,side:p,align:h,sideOffset:v,alignOffset:x,collisionBoundary:S="clipping-ancestors",collisionPadding:T,arrowPadding:w,sticky:C,disableAnchorTracking:M=!1,collisionAvoidance:O=Op,...N}=a,R=ti(),D=tA(),k=Mp(),B=R.useState("floatingRootContext"),j=R.useState("mounted"),U=R.useState("open"),Y=R.useState("openChangeReason"),I=R.useState("activeTriggerElement"),H=R.useState("modal"),_=R.useState("openMethod"),V=R.useState("positionerElement"),te=R.useState("instantType"),Q=R.useState("transitionStatus"),z=R.useState("adaptiveOrigin"),X=b.useRef(null),F=Ec(V),W=Vp({anchor:d,floatingRootContext:B,positionMethod:m,mounted:j,side:p,sideOffset:v,align:h,alignOffset:x,arrowPadding:w,collisionBoundary:S,collisionPadding:T,sticky:C,disableAnchorTracking:M,keepMounted:D,nodeId:k,collisionAvoidance:O,adaptiveOrigin:z}),ae=B.useState("domReferenceElement");Ee(()=>{const le=ae,se=X.current;if(le&&(X.current=le),se&&le&&le!==se){R.set("instantType",void 0);const he=new AbortController;return F(()=>{R.set("instantType","trigger-change")},he.signal),()=>{he.abort()}}},[ae,F,R]);const A=H===!0&&Y!==At;ux(U&&A,_==="touch",V,I);const G=R.useStateSetter("positionerElement"),ne={open:U,side:W.side,align:W.align,anchorHidden:W.anchorHidden,instant:te},Z=Gp(a,ne,{styles:W.positionerStyles,transitionStatus:Q,props:N,refs:[i,G],hidden:!j,inert:!U});return y.jsxs(wS.Provider,{value:W,children:[j&&A&&y.jsx(Jp,{inert:Lc(!U),cutout:I}),y.jsx(O0,{id:k,children:Z})]})}),aA=b.createContext(void 0);function sA(){const[n,a]=b.useState(0),i=Ce(()=>(a(c=>c+1),()=>{a(c=>Math.max(0,c-1))}));return{context:b.useMemo(()=>({register:i}),[i]),hasClosePart:n>0}}const iA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,initialFocus:d,finalFocus:m,...p}=a,h=ti(),v=RS(),x=Zp()!=null,{context:S,hasClosePart:T}=sA(),w=h.useState("open"),C=h.useState("openMethod"),M=h.useState("instantType"),O=h.useState("transitionStatus"),N=h.useState("popupProps"),R=h.useState("titleElementId"),D=h.useState("descriptionElementId"),k=h.useState("modal"),B=h.useState("mounted"),j=h.useState("openChangeReason"),U=h.useState("activeTriggerElement"),Y=h.useState("floatingRootContext"),I=Y.useState("floatingId"),H=h.useState("disabled"),_=h.useState("openOnHover"),V=h.useState("closeDelay");$s({open:w,ref:h.context.popupRef,onComplete(){w&&h.context.onOpenChangeComplete?.(!0)}}),Yp(Y,{enabled:_&&!H,closeDelay:V});const te=d===void 0?B0(h.context.popupRef):d,Q=k!==!1&&T;h.useSyncedValue("focusManagerModal",Q);const z=h.useStateSetter("popupElement"),X={open:w,side:v.side,align:v.align,instant:M,transitionStatus:O},F=yt("div",a,{state:X,ref:[i,h.context.popupRef,z],props:[N,{id:I,role:"dialog",...wc,"aria-labelledby":R,"aria-describedby":D,onKeyDown(W){x&&Uc.has(W.key)&&W.stopPropagation()}},Hc(O),p],stateAttributesMapping:gc});return y.jsx(Dp,{context:Y,openInteractionType:C,modal:Q,disabled:!B||j===At,initialFocus:te,returnFocus:m,restoreFocus:"popup",previousFocusableElement:ut(U)?U:void 0,nextFocusableElement:h.context.triggerFocusTargetRef,beforeContentFocusGuardRef:h.context.beforeContentFocusGuardRef,children:y.jsx(aA.Provider,{value:S,children:F})})}),rA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,...d}=a,p=ti().useState("open"),{arrowRef:h,side:v,align:x,arrowUncentered:S,arrowStyles:T}=RS();return yt("div",a,{state:{open:p,side:v,align:x,uncentered:S},ref:[i,h],props:[{style:T,"aria-hidden":!0},d],stateAttributesMapping:mc})});function lA({open:n,onOpenChange:a,title:i,description:r,children:c,footer:f,className:d}){return y.jsx(VC,{open:n,onOpenChange:m=>a(m),children:y.jsxs(LC,{children:[y.jsx(MC,{className:"fixed inset-0 z-[900] bg-black/30 transition-opacity data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"}),y.jsxs(HC,{className:Mt("fixed left-1/2 top-1/2 z-[901] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-surface p-5 text-fg shadow-popup outline-none","transition-[opacity,transform] data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",d),children:[y.jsxs("div",{className:"mb-3 flex items-start gap-3",children:[y.jsxs("div",{className:"flex-1",children:[y.jsx(GC,{className:"text-[15px] font-semibold",children:i}),r?y.jsx(DC,{className:"mt-1 text-fg-muted",children:r}):null]}),y.jsx(NC,{"aria-label":"Close",className:"rounded-md p-1 text-fg-muted hover:bg-hover",children:y.jsx(pr,{className:"size-4"})})]}),c,f?y.jsx("div",{className:"mt-4 flex justify-end gap-2",children:f}):null]})]})})}function cA({open:n,onOpenChange:a,title:i,description:r,confirmLabel:c="Confirm",danger:f,onConfirm:d}){return y.jsx(lA,{open:n,onOpenChange:a,title:i,description:r,footer:y.jsxs(y.Fragment,{children:[y.jsx(on,{onClick:()=>a(!1),children:"Cancel"}),y.jsx(on,{variant:f?"danger":"primary",onClick:()=>{d(),a(!1)},children:c})]})})}const OS="data-composite-item-active";function uA(n){const{loopFocus:a=!0,orientation:i="both",grid:r,onLoop:c,direction:f,highlightedIndex:d,onHighlightedIndexChange:m,rootRef:p,enableHomeAndEndKeys:h=!1,stopEventPropagation:v,disabledIndices:x,modifierKeys:S=_o}=n,[T,w]=b.useState(0),C=r!=null,M=b.useRef(null),O=Za(M,p),N=b.useRef([]),R=b.useRef(!1),D=b.useRef(null),k=d??T,B=Ce((H,_=!1)=>{if(D.current=N.current[H]??null,(m??w)(H),_){const V=N.current[H];ob(M.current,V,f,i)}}),j=Ce(H=>{if(H.size===0)return;if(R.current){const Q=N.current,z=Q.indexOf(D.current);if(z===-1){const X=Q[k];!X||Xs(Q,k,x)?B(fA(Q,x)):D.current=X}else z!==k&&B(z);return}R.current=!0;const _=Array.from(H.keys()),V=_.find(Q=>Q?.hasAttribute(OS))??null,te=V?H.get(V)?.index??-1:-1;if(te!==-1)B(te);else if(Xs(_,k,x)){const Q=Oo(_,{disabledIndices:x});$i(_,Q)||B(Q)}ob(M.current,V,f,i)});Ee(()=>{if(x==null||d!=null||!R.current)return;const H=N.current;if(Xs(H,k,x)){const _=Oo(H,{disabledIndices:x});$i(H,_)||B(_)}},[x,d,k,N,B]);const U=Ce((H,_,V)=>c?c(H,_,V,N):V),Y=Ce(H=>{const _=H.key===Wd||H.key===$d;if(!Uc.has(H.key)||!h&&_||dA(H,S)||!M.current)return;const te=f==="rtl",Q=te?Qd:Zd,z=te?Zd:Qd,X=i==="vertical"?Kd:Q,F=i==="vertical"?Fd:z,W=Tt(H.nativeEvent);if(W!=null&&nb(W)&&!GO(W)){const le=W.selectionStart,se=W.selectionEnd,he=W.value;if(le==null||H.shiftKey||le!==se||H.key!==F&&le<he.length||H.key!==X&&le>0)return}let ae=k;const A=Il(N,x),G=qd(N,x);r!=null&&(ae=r({disabledIndices:x,elementsRef:N,event:H,highlightedIndex:k,loopFocus:a,maxIndex:G,minIndex:A,onLoop:U,orientation:i,rtl:te}));const ne=i!=="vertical"&&H.key===Q||i!=="horizontal"&&H.key===Kd,Z=i!=="vertical"&&H.key===z||i!=="horizontal"&&H.key===Fd;h&&(H.key===Wd?ae=A:H.key===$d&&(ae=G)),ae===k&&(ne||Z)&&(a&&ae===G&&ne?(ae=A,c&&(ae=c(H,k,ae,N))):a&&ae===A&&Z?(ae=G,c&&(ae=c(H,k,ae,N))):ae=Oo(N.current,{startingIndex:ae,decrement:Z,disabledIndices:x})),ae!==k&&!$i(N.current,ae)&&(v&&H.stopPropagation(),(C||_||ne||Z)&&H.preventDefault(),B(ae,!0),queueMicrotask(()=>{N.current[ae]?.focus()}))});return{props:{ref:O,onFocus(H){const _=M.current,V=Tt(H.nativeEvent);!_||V==null||!nb(V)||V.setSelectionRange(0,V.value.length)},onKeyDown:Y},highlightedIndex:k,onHighlightedIndexChange:B,elementsRef:N,onMapChange:j,relayKeyboardEvent:Y}}function fA(n,a){let i=-1;for(let r=0;r<n.length;r+=1){const c=n[r];if(!(!c||Xs(n,r,a))){if(c.hasAttribute(OS))return r;i===-1&&(i=r)}}return Math.max(i,0)}function dA(n,a){for(const i of pO)if(!a.includes(i)&&n.getModifierState(i))return!0;return!1}function pA(n){const{render:a,className:i,style:r,refs:c=_o,props:f=_o,state:d=wt,stateAttributesMapping:m,highlightedIndex:p,onHighlightedIndexChange:h,orientation:v,grid:x,loopFocus:S,onLoop:T,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:M=!0,rootRef:O,disabledIndices:N,modifierKeys:R,highlightItemOnHover:D=!1,tag:k="div",...B}=n,j=qp(),{props:U,highlightedIndex:Y,onHighlightedIndexChange:I,elementsRef:H,onMapChange:_,relayKeyboardEvent:V}=uA({grid:x,loopFocus:S,onLoop:T,orientation:v,highlightedIndex:p,onHighlightedIndexChange:h,rootRef:O,stopEventPropagation:M,enableHomeAndEndKeys:w,direction:j,disabledIndices:N,modifierKeys:R}),te=yt(k,n,{state:d,ref:c,props:[U,...f,B],stateAttributesMapping:m}),Q=b.useMemo(()=>({highlightedIndex:Y,onHighlightedIndexChange:I,highlightItemOnHover:D,relayKeyboardEvent:V}),[Y,I,D,V]);return y.jsx(nx.Provider,{value:Q,children:y.jsx(rx,{elementsRef:H,onMapChange:z=>{C?.(z),_(z)},children:te})})}const hA=b.createContext(void 0);function mA(){return b.useContext(hA)}const CS=b.createContext(void 0);function gA(){return b.useContext(CS)}const yA=b.forwardRef(function(a,i){const{defaultValue:r,disabled:c=!1,loopFocus:f=!0,onValueChange:d,orientation:m="horizontal",multiple:p=!1,value:h,className:v,render:x,style:S,...T}=a,w=Zp(),C=mA(),M=r??_o,O=h!==void 0||r!==void 0,N=(w?.disabled??!1)||(C?.disabled??!1)||c,[R,D]=tx({controlled:h,default:M,name:"ToggleGroup",state:"value"}),k=Ce((I,H,_)=>{let V;p?(V=R.slice(),H?V.push(I):V.splice(R.indexOf(I),1)):V=H?[I]:[],d?.(V,_),!_.isCanceled&&D(V)}),B={disabled:N,multiple:p,orientation:m},j=b.useMemo(()=>({disabled:N,setGroupValue:k,value:R,isValueInitialized:O}),[N,k,R,O]),U={role:"group"},Y=yt("div",a,{enabled:!!w,state:B,ref:i,props:[U,T]});return y.jsx(CS.Provider,{value:j,children:w?Y:y.jsx(pA,{render:x,className:v,style:S,state:B,refs:[i],props:[U,T],loopFocus:f,enableHomeAndEndKeys:!0,orientation:m})})}),vA=b.forwardRef(function(a,i){const{className:r,defaultPressed:c=!1,disabled:f=!1,form:d,onPressedChange:m,pressed:p,render:h,type:v,value:x,nativeButton:S=!0,style:T,...w}=a,C=Sa(x||void 0),M=gA(),O=M?.value??[],N=(f||M?.disabled)??!1,[R,D]=tx({controlled:M?C!==void 0&&O.indexOf(C)>-1:p,default:c,name:"Toggle",state:"pressed"}),{getButtonProps:k,buttonRef:B}=ei({disabled:N,native:S}),j={disabled:N,pressed:R},U=[B,i],Y=[{"aria-pressed":R,onClick(_){const V=!R,te=Ke(vc,_.nativeEvent);m?.(V,te),!te.isCanceled&&(C&&M?.setGroupValue?.(C,V,te),!te.isCanceled&&D(V))}},w,k],I=yt("button",a,{enabled:!M,state:j,ref:U,props:Y}),H=b.useMemo(()=>({disabled:N,focusableWhenDisabled:!1}),[N]);return M?y.jsx(mx,{tag:"button",render:h,className:r,style:T,metadata:H,state:j,refs:U,props:Y}):I}),bA="h-7 w-full min-w-0 rounded-control border border-line bg-surface-2 px-2 text-[13px] text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:bg-surface",xA=b.forwardRef(function({className:a,...i},r){return y.jsx("input",{ref:r,className:Mt(bA,a),...i})});function SA({value:n,options:a,onChange:i,className:r,...c}){return y.jsx(yA,{value:n===null?[]:[n],onValueChange:f=>{const d=f[0];d!==void 0&&i(d)},"aria-label":c["aria-label"],className:Mt("flex h-7 items-center gap-0.5 rounded-control bg-surface-2 p-0.5",r),children:a.map(f=>y.jsx(vA,{value:f.value,"aria-label":f.title,title:f.title,className:"flex h-full flex-1 items-center justify-center rounded-[4px] px-1.5 text-fg-muted outline-none hover:text-fg data-[pressed]:bg-surface data-[pressed]:text-fg data-[pressed]:shadow-sm focus-visible:outline-2 focus-visible:outline-accent",children:f.label},f.value))})}function TA(n,a){const i=xt(n).getComputedStyle(n).transform;let r=0,c=0,f=1;if(i&&i!=="none"){const d=i.match(/matrix(?:3d)?\(([^)]+)\)/);if(d){const m=d[1].split(", ").map(parseFloat);m.length===6?(r=m[4],c=m[5],f=Math.sqrt(m[0]*m[0]+m[1]*m[1])):m.length===16&&(r=m[12],c=m[13],f=m[0])}}return{x:r,y:c,scale:f}}const AS=b.createContext(void 0);function Ic(){const n=b.useContext(AS);if(!n)throw new Error(Bt(73));return n}let db=0;function MS(n){return db+=1,`${n}-${Math.random().toString(36).slice(2,6)}-${db}`}function Rd(n,a){if(typeof n=="string")return{description:n};if(typeof n=="function"){const i=n(a);return typeof i=="string"?{description:i}:i}return n}function Od(n){const a=new Map;let i=0,r=0;return n.forEach((c,f)=>{const d=c.transitionStatus==="ending";a.set(c.id,{value:c,domIndex:f,visibleIndex:d?-1:i,offsetY:r}),r+=c.height||0,d||(i+=1)}),a}function Cd(n,a){let i=0;return n.map(r=>{if(r.transitionStatus==="ending")return r;const c=i>=a;return i+=1,r.limited===c?r:{...r,limited:c}})}const Qn={toasts:n=>n.toasts,isEmpty:n=>n.toasts.length===0,toast:(n,a)=>n.toastMetadata.get(a)?.value,toastIndex:(n,a)=>n.toastMetadata.get(a)?.domIndex??-1,toastOffsetY:(n,a)=>n.toastMetadata.get(a)?.offsetY??0,toastVisibleIndex:(n,a)=>n.toastMetadata.get(a)?.visibleIndex??-1,focused:n=>n.focused,expanded:n=>n.hovering||n.focused,expandedOrOutOfFocus:n=>n.hovering||n.focused||!n.isWindowFocused,prevFocusElement:n=>n.prevFocusElement};class EA extends Ws{timers=new Map;areTimersPaused=!1;constructor(a){super({...a,toastMetadata:Od(a.toasts)},{},Qn)}setViewport=a=>{this.set("viewport",a)};syncProviderProps(a,i){const r=this.state.limit!==i;if(this.state.timeout===a&&!r)return;const c={timeout:a,limit:i};if(r){const f=Cd(this.state.toasts,i);c.toasts=f,c.toastMetadata=Od(f)}this.update(c)}disposeEffect=()=>()=>{this.timers.forEach(a=>{a.timeout?.clear()}),this.timers.clear()};removeToast(a,i=!1){const r=Qn.toastIndex(this.state,a);if(r===-1)return;const c=this.state.toasts[r];i||c?.onRemove?.();const f=[...this.state.toasts];f.splice(r,1),this.setToasts(f)}addToast=a=>{const{timeout:i,limit:r}=this.state,c=a.id||MS("toast");if(a.id){const p=Qn.toast(this.state,a.id);if(p)if(p.transitionStatus==="ending")this.removeToast(a.id,!0);else{const{id:h,transitionStatus:v,...x}=a;return this.updateToastInternal(a.id,x,!0,!0),a.id}}const f={...a,id:c,updateKey:0,transitionStatus:"starting"},d=[f,...this.state.toasts];this.setToasts(Cd(d,r));const m=f.timeout??i;return f.type!=="loading"&&m>0&&this.scheduleTimer(c,m,()=>this.closeToast(c)),Qn.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),c};updateToast=(a,i)=>{const r=Qn.toast(this.state,a);!r||r.transitionStatus==="ending"||this.updateToastInternal(a,typeof i=="function"?i(r):i,!1,!0)};updateToastInternal=(a,i,r=!1,c=!1)=>{const{timeout:f,toasts:d}=this.state,m=Qn.toast(this.state,a);if(!m||m.transitionStatus==="ending")return;const p={...m,...i,...c&&{updateKey:m.updateKey+1}};this.setToasts(d.map(M=>M.id===a?p:M));const h=p.timeout??f,v=m.timeout??f,x=Object.hasOwn(i,"timeout"),S=p.transitionStatus!=="ending"&&p.type!=="loading"&&h>0,T=this.timers.has(a),w=v!==h,C=m.type==="loading";if(!S&&T){this.clearTimer(a);return}S&&(!T||w||x||C||r)&&(this.clearTimer(a),this.scheduleTimer(a,h,()=>this.closeToast(a)),Qn.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=a=>{const i=a===void 0,{limit:r,toasts:c}=this.state;let f;if(i)f=c,this.clearTimers();else{const p=Qn.toast(this.state,a);if(!p)return;f=[p],this.clearTimer(a)}const d=c.map(p=>i||p.id===a?{...p,transitionStatus:"ending",height:0}:p),m=Cd(d,r);this.setToasts(m,!m.some(p=>p.transitionStatus!=="ending")),f.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(a)};promiseToast=(a,i)=>{const r=Rd(i.loading),c=this.addToast({...r,type:"loading"}),f=a.then(d=>{const m=Rd(i.success,d);return this.updateToast(c,{...m,type:"success",timeout:m.timeout}),d}).catch(d=>{const m=Rd(i.error,d);return this.updateToast(c,{...m,type:"error",timeout:m.timeout}),Promise.reject(d)});return{}.hasOwnProperty.call(i,"setPromise")&&i.setPromise(f),f};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(a=>{a.timeout&&(a.timeout.clear(),a.remaining=Math.max(a.remaining-(Date.now()-a.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((a,i)=>{a.remaining=a.remaining>0?a.remaining:a.delay,a.timeout??=mn.create(),a.timeout.start(a.remaining,()=>{this.handleTimerFired(i),a.callback()}),a.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=a=>{if(a.pointerType!=="touch")return;const i=Tt(a);De(this.state.viewport,i)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(a,i,r){const c=Date.now(),d=!Qn.expandedOrOutOfFocus(this.state)?mn.create():void 0;d?.start(i,()=>{this.handleTimerFired(a),r()}),this.timers.set(a,{timeout:d,start:c,delay:i,remaining:i,callback:r})}clearTimers(){this.timers.forEach(a=>{a.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(a){this.timers.get(a)?.timeout?.clear(),this.timers.delete(a),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(a){this.timers.delete(a),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(a,i=a.length===0){const r={toasts:a,toastMetadata:Od(a)};i&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(a){const i=It(Qe(this.state.viewport));if(!this.state.viewport||!De(this.state.viewport,i)||!Xl(i))return;if(a===void 0){this.restoreFocusToPrevElement();return}const r=Qn.toasts(this.state),c=Qn.toastIndex(this.state,a),f=(m,p)=>{for(let h=m;h>=0&&h<r.length;h+=p)if(r[h].transitionStatus!=="ending")return r[h];return null},d=f(c+1,1)??f(c-1,-1);d?d.ref?.current?.focus():this.restoreFocusToPrevElement()}}const wA=function(a){const{children:i,timeout:r=5e3,limit:c=3,toastManager:f}=a,d=en(()=>new EA({timeout:r,limit:c,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return rc(d.disposeEffect),b.useEffect(function(){return f?f[" subscribe"](({action:h,options:v})=>{const x=v.id;h==="promise"&&v.promise?d.promiseToast(v.promise,v):h==="update"&&x?d.updateToast(x,v.updates):h==="close"?d.closeToast(x):d.addToast(v)}):void 0},[d,f]),y.jsxs(AS.Provider,{value:d,children:[y.jsx(RA,{store:d,timeout:r,limit:c}),i]})};function RA(n){const{store:a,timeout:i,limit:r}=n;return Ee(()=>{a.syncProviderProps(i,r)},[a,i,r]),null}const OA="--toast-frontmost-height",CA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,children:d,...m}=a,p=Ic(),h=tn(),v=b.useRef(!1),x=b.useRef(!1),S=b.useRef(!1),T=p.useState("isEmpty"),w=p.useState("toasts"),C=p.useState("focused"),M=p.useState("expanded"),O=p.useState("prevFocusElement"),N=w[0]?.height,R=w.some(W=>W.transitionStatus==="ending"),D=w.filter(W=>W.priority==="high");b.useEffect(()=>{const W=p.state.viewport;if(!W||T)return;const ae=xt(W),A=Qe(W);function G(le){le.key==="F6"&&Tt(le)!==W&&(le.preventDefault(),p.set("prevFocusElement",It(A)),W?.focus({preventScroll:!0}),p.pauseTimers(),p.set("focused",!0))}function ne(le){Tt(le)===ae&&(p.set("isWindowFocused",!1),p.pauseTimers())}function Z(le){if(le.relatedTarget)return;const se=Tt(le),he=It(Qe(W));(se===ae||!De(W,se)||!Xl(he))&&p.resumeTimers(),h.start(0,()=>p.set("isWindowFocused",!0))}return Wn(Ie(ae,"keydown",G),Ie(ae,"blur",ne,!0),Ie(ae,"focus",Z,!0),Ie(A,"pointerdown",p.handleDocumentPointerDown,!0))},[p,h,T]);function k(W){v.current=!0;const ae=W.relatedTarget===p.state.viewport?w.find(A=>A.transitionStatus!=="ending"&&!A.limited):void 0;ae?ae.ref?.current?.focus():p.restoreFocusToPrevElement()}function B(W){W.key==="Tab"&&W.shiftKey&&Tt(W.nativeEvent)===p.state.viewport&&(W.preventDefault(),p.restoreFocusToPrevElement())}function j(){p.state.toasts.some(ae=>ae.transitionStatus==="ending")||S.current||!x.current||(p.state.isWindowFocused&&p.resumeTimers(),p.set("hovering",!1),x.current=!1)}b.useEffect(j,[R,p]);function U(){p.pauseTimers(),p.set("hovering",!0),x.current=!1}function Y(){p.state.isWindowFocused&&p.resumeTimers()}function I(){x.current=!0,j()}function H(W){W.pointerType==="touch"&&(S.current=!0)}function _(W){W.pointerType==="touch"&&(S.current=!1,j())}function V(){if(v.current){v.current=!1;return}C||Xl(It(Qe(p.state.viewport)))&&(p.set("focused",!0),p.pauseTimers())}function te(W){!C||De(p.state.viewport,W.relatedTarget)||(p.set("focused",!1),Y())}const Q={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:U,onMouseMove:U,onMouseLeave:I,onFocus:V,onBlur:te,onKeyDown:B,onClick:V,onPointerDown:H,onPointerUp:_,onPointerCancel:_,style:{[OA]:N?`${N}px`:void 0}},z={expanded:M},X=!T&&O&&y.jsx(jo,{onFocus:k}),F=yt("div",a,{ref:[i,p.setViewport],state:z,props:[Q,m,{children:y.jsxs(b.Fragment,{children:[X,d,X]})}]});return y.jsxs(b.Fragment,{children:[X,F,!C&&D.length>0&&y.jsx("div",{style:Jb,children:D.map(W=>y.jsxs("div",{role:"alert","aria-atomic":!0,children:[y.jsx("div",{children:W.title}),y.jsx("div",{children:W.description})]},W.id))})]})}),NS=b.createContext(void 0);function ch(){const n=b.useContext(NS);if(!n)throw new Error(Bt(66));return n}function Ad(n,a,i){switch(n){case"up":return-i;case"down":return i;case"left":return-a;case"right":return a;default:return 0}}const AA="--toast-index",MA="--toast-offset-y",NA="--toast-height",DA="--toast-swipe-movement-x",_A="--toast-swipe-movement-y",zA="data-swipe-direction",kA={...hp,swipeDirection(n){return n?{[zA]:n}:null}},pb=40,jA=10,hb=.5,HA=1,LA=`${oR},${aR}`,UA=b.forwardRef(function(a,i){const{toast:r,render:c,className:f,swipeDirection:d=["down","right"],style:m,...p}=a,h=r.positionerProps?.anchor!==void 0;let v=[];h||(v=Array.isArray(d)?d:[d]);const x=v.length>0,S=Ic(),[T,w]=b.useState(void 0),[C,M]=b.useState(!1),[O,N]=b.useState(!1),[R,D]=b.useState({x:0,y:0}),[k,B]=b.useState({x:0,y:0,scale:1}),[j,U]=b.useState(),[Y,I]=b.useState(),[H,_]=b.useState(null),V=b.useRef(null),te=b.useRef(void 0),Q=b.useRef({x:0,y:0}),z=b.useRef({x:0,y:0,scale:1}),X=b.useRef(void 0),F=b.useRef(0),W=b.useRef(!1),ae=b.useRef({x:0,y:0}),A=b.useRef(!1),G=b.useRef({x:0,y:0}),ne=b.useRef(null),Z=b.useRef(null),le=S.useState("toastIndex",r.id),se=S.useState("toastVisibleIndex",r.id),he=S.useState("toastOffsetY",r.id),pe=S.useState("focused"),ge=S.useState("expanded");$s({open:r.transitionStatus!=="ending",ref:V,onComplete(){r.transitionStatus==="ending"&&S.removeToast(r.id)}});const _e=Ce((Me=!1)=>{const fe=V.current;if(!fe)return;const ye=fe.style.height;fe.style.height="auto";const de=fe.offsetHeight;fe.style.height=ye;function ie(){S.updateToastInternal(r.id,{ref:V,height:de,transitionStatus:void 0})}Me?Yn.flushSync(ie):ie()});Ee(()=>{const Me=te.current;r.transitionStatus!=="starting"&&Me===r.id||(Me!==void 0&&(w(void 0),B({x:0,y:0,scale:1}),je({x:0,y:0})),te.current=r.id,_e())},[_e,r.id,r.transitionStatus]);function je(Me){G.current=Me,D(Me)}Ee(()=>()=>{Z.current?.abort()},[]);function Re(Me,fe){const ye=ve=>ve>0?ve**hb:-(Math.abs(ve)**hb),de=Me>0&&!v.includes("right")||Me<0&&!v.includes("left"),ie=fe>0&&!v.includes("down")||fe<0&&!v.includes("up");return{x:de?ye(Me):Me,y:ie?ye(fe):fe}}const be=Ce(Me=>{if(Me.pointerId!==ne.current)return;ne.current=null,Z.current?.abort(),Z.current=null,M(!1),N(!1),_(null);const fe=z.current;if(Me.type==="pointercancel"||W.current){je({x:fe.x,y:fe.y}),w(void 0);return}const ye=G.current,de=ye.x-fe.x,ie=ye.y-fe.y;let ve;for(const Be of v)if(Ad(Be,de,ie)>pb){ve=Be;break}ve?(w(ve),S.closeToast(r.id)):(je({x:fe.x,y:fe.y}),w(void 0))});function ke(Me){if(Me.button!==0||(Me.pointerType==="touch"&&S.pauseTimers(),Tt(Me.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${LA}`)))return;W.current=!1,X.current=void 0,F.current=0,ne.current=Me.pointerId,Q.current={x:Me.clientX,y:Me.clientY},ae.current=Q.current;const de=Me.currentTarget,ie=TA(de);z.current=ie,B(ie),je({x:ie.x,y:ie.y}),S.set("hovering",!0),M(!0),N(!1),_(null),A.current=!0,Z.current?.abort();const ve=new AbortController;Z.current=ve;const Be=Qe(de);Be.addEventListener("pointerup",be,{signal:ve.signal}),Be.addEventListener("pointercancel",be,{signal:ve.signal}),de.setPointerCapture?.(Me.pointerId)}function Le(Me){if(Me.pointerId!==ne.current)return;Me.preventDefault(),A.current&&(Q.current={x:Me.clientX,y:Me.clientY},A.current=!1);const{clientY:fe,clientX:ye,movementX:de,movementY:ie}=Me;(ie<0&&fe>ae.current.y||ie>0&&fe<ae.current.y)&&(ae.current={x:ae.current.x,y:fe}),(de<0&&ye>ae.current.x||de>0&&ye<ae.current.x)&&(ae.current={x:ye,y:ae.current.y});const ve=ye-Q.current.x,Be=fe-Q.current.y,Yt=fe-ae.current.y,an=ye-ae.current.x;let Rt=H;if(!O&&Math.sqrt(ve*ve+Be*Be)>=HA){N(!0);const _t=v.includes("left")||v.includes("right"),Vn=v.includes("up")||v.includes("down");if(_t&&Vn){const Fe=Math.abs(ve),Et=Math.abs(Be);Rt=Fe>Et?"horizontal":"vertical",_(Rt)}}let xe;if(!X.current)Rt==="vertical"?Be>0?xe="down":Be<0&&(xe="up"):Rt==="horizontal"?ve>0?xe="right":ve<0&&(xe="left"):Math.abs(ve)>=Math.abs(Be)?xe=ve>0?"right":"left":xe=Be>0?"down":"up",xe&&v.includes(xe)&&(X.current=xe,F.current=Ad(xe,ve,Be),w(xe));else{const Cn=X.current,_t=Ad(Cn,an,Yt);_t>pb?(W.current=!1,w(Cn)):!(v.includes("left")&&v.includes("right"))&&!(v.includes("up")&&v.includes("down"))&&F.current-_t>=jA&&(W.current=!0)}const qe=Re(ve,Be);let ot=z.current.x,mt=z.current.y;const On=v.includes("left")||v.includes("right"),qn=v.includes("up")||v.includes("down");Rt!=="vertical"&&On&&(ot+=qe.x),Rt!=="horizontal"&&qn&&(mt+=qe.y),je({x:ot,y:mt})}function Ge(Me){if(Me.key==="Escape"){if(!V.current||!De(V.current,It(Qe(V.current))))return;S.closeToast(r.id)}}b.useEffect(()=>{const Me=V.current;if(!x||!Me)return;function fe(ye){ne.current===null||!De(Me,Tt(ye))||ye.preventDefault()}return Ie(Me,"touchmove",fe,{passive:!1})},[x]);function Se(){const Me=R.x-k.x,fe=R.y-k.y;return{transition:C?"none":void 0,transform:C?`translateX(${R.x}px) translateY(${R.y}px) scale(${k.scale})`:void 0,[DA]:`${Me}px`,[_A]:`${fe}px`}}const Ue=r.priority==="high",Te={role:Ue?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":Y,"aria-hidden":Ue&&!pe?!0:void 0,onPointerDown:x?ke:void 0,onPointerMove:x?Le:void 0,onPointerUp:x?be:void 0,onPointerCancel:x?be:void 0,onKeyDown:Ge,inert:Lc(r.limited),style:{...Se(),[AA]:r.transitionStatus==="ending"?le:se,[MA]:`${he}px`,[NA]:r.height?`${r.height}px`:void 0}},we=b.useMemo(()=>({toast:r,setTitleId:U,setDescriptionId:I,recalculateHeight:_e,visibleIndex:se,expanded:ge}),[r,U,I,_e,se,ge]),Ae={transitionStatus:r.transitionStatus,expanded:ge,limited:r.limited||!1,type:r.type,swiping:C,swipeDirection:T},Ze=yt("div",a,{ref:[i,V],state:Ae,stateAttributesMapping:kA,props:[Te,p]});return y.jsx(NS.Provider,{value:we,children:Ze})}),BA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,...d}=a,{visibleIndex:m,expanded:p,recalculateHeight:h}=ch(),v=b.useRef(null);Ee(()=>{h();const T=v.current;if(!T||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;const w=new ResizeObserver(()=>h(!0)),C=new MutationObserver(()=>h(!0));return w.observe(T),C.observe(T,{childList:!0,subtree:!0,characterData:!0}),()=>{w.disconnect(),C.disconnect()}},[h]);const x=m>0;return yt("div",a,{ref:[i,v],state:{expanded:p,behind:x},props:d})});function DS(n){return n==null||typeof n=="boolean"||n===""?!1:Array.isArray(n)?n.some(DS):!0}function PA(n){return b.isValidElement(n)&&DS(n.props.children)}function _S(n,a,i){const{toast:r,setTitleId:c,setDescriptionId:f}=ch(),d=i==="title"?c:f,m=a??(i==="title"?r.title:r.description);return{id:Wa(n),children:m,type:r.type,setId:d}}function zS(n,a,i){const r=PA(n);return Ee(()=>{if(r)return i(a),()=>{i(c=>c===a?void 0:c)}},[r,a,i]),r?n:null}const IA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,children:m,...p}=a,{id:h,children:v,type:x,setId:S}=_S(d,m,"description"),w=yt("p",a,{ref:i,state:{type:x},props:{...p,id:h,children:v}});return zS(w,h,S)}),YA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,id:d,children:m,...p}=a,{id:h,children:v,type:x,setId:S}=_S(d,m,"title"),w=yt("h2",a,{ref:i,state:{type:x},props:{...p,id:h,children:v}});return zS(w,h,S)}),qA=b.forwardRef(function(a,i){const{render:r,className:c,style:f,disabled:d,nativeButton:m=!0,...p}=a,h=Ic(),{toast:v,expanded:x}=ch(),[S,T]=b.useState(!1),{getButtonProps:w,buttonRef:C}=ei({disabled:d,native:m}),M={type:v.type};return yt("button",a,{ref:[i,C],state:M,props:[{"aria-hidden":!x&&!S,onClick(){h.closeToast(v.id)},onFocus(){T(!0)},onBlur(){T(!1)}},p,w]})}),VA=b.forwardRef(function(a,i){return y.jsx(K0,{ref:i,...a})});function GA(){const n=Ic(),a=n.useState("toasts");return b.useMemo(()=>({toasts:a,add:n.addToast,close:n.closeToast,update:n.updateToast,promise:n.promiseToast}),[a,n])}function XA(){const n=new Set;function a(i){n.forEach(r=>r(i))}return{" subscribe":function(r){return n.add(r),()=>{n.delete(r)}},add(i){const r=i.id||MS("toast"),c={...i,id:r,transitionStatus:"starting"};return a({action:"add",options:c}),r},close(i){a({action:"close",options:{id:i}})},update(i,r){a({action:"update",options:{id:i,updates:r}})},promise(i,r){let c=i;return a({action:"promise",options:{...r,promise:i,setPromise(f){c=f}}}),c}}}function mb({icon:n,title:a,children:i}){return y.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-fg-muted",children:[n?y.jsx("div",{className:"text-fg-subtle",children:n}):null,y.jsx("div",{className:"text-[15px] font-semibold text-fg",children:a}),i?y.jsx("div",{className:"max-w-sm",children:i}):null]})}const Yc=XA();function FA(n){if(n.repeat||n.key!=="Enter"&&n.key!==" ")return;const a=n.currentTarget.closest("[data-toast]")??n.currentTarget,i=a.ownerDocument.defaultView;i&&tO(i,n.key,r=>r instanceof i.Node&&a.contains(r))}function KA(){const{toasts:n}=GA();return n.map(a=>y.jsxs(UA,{toast:a,"data-toast":"",className:"pointer-events-auto flex w-80 items-start gap-3 rounded-lg bg-surface p-3 text-fg shadow-popup transition-[opacity,transform] data-[starting-style]:translate-y-2 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",children:[y.jsxs(BA,{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[y.jsx(YA,{className:"text-[13px] font-semibold"}),y.jsx(IA,{className:"text-xs text-fg-muted"})]}),y.jsx(qA,{"aria-label":"Dismiss",onKeyDown:FA,className:"rounded p-0.5 text-fg-muted hover:bg-hover",children:y.jsx(pr,{className:"size-3.5"})})]},a.id))}function QA({children:n}){return y.jsxs(wA,{toastManager:Yc,timeout:4e3,children:[n,y.jsx(VA,{children:y.jsx(CA,{className:"pointer-events-none fixed bottom-4 right-4 z-[1100] flex flex-col gap-2",children:y.jsx(KA,{})})})]})}const ZA=["a[href]","button","iframe","input","select","textarea","summary","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])","[tabindex]"].join(", "),WA="audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function $A(n){return!(n.tabIndex>=0||!n.hasAttribute("tabindex")&&n.matches(WA))||n.getAttribute("aria-hidden")==="true"||n.matches(":disabled")?!1:typeof n.checkVisibility!="function"||n.checkVisibility({visibilityProperty:!0})}function JA(n){return Array.from(n.querySelectorAll(ZA)).filter($A)}function eM(n){const a=i=>!/visible|hidden|clip/.test(i);return n.scrollWidth>n.clientWidth+1&&a(n.overflowX)||n.scrollHeight>n.clientHeight+1&&a(n.overflowY)}function tM(n){const[a,i]=b.useState(!1);return b.useLayoutEffect(()=>{const r=n.current,c=r?.ownerDocument.defaultView;if(!r||!c)return;const f=()=>{const v=c.getComputedStyle(r);i(eM({scrollWidth:r.scrollWidth,clientWidth:r.clientWidth,scrollHeight:r.scrollHeight,clientHeight:r.clientHeight,overflowX:v.overflowX,overflowY:v.overflowY}))};if(f(),typeof c.ResizeObserver!="function")return;const d=new c.ResizeObserver(f),m=new Set,p=v=>{if(v.nodeType!==1)return;const x=v;if(c.getComputedStyle(x).display==="contents"){x.childNodes.forEach(p);return}m.has(x)||(m.add(x),d.observe(x))};d.observe(r),r.childNodes.forEach(p);const h=new c.MutationObserver(v=>{for(const x of v)x.addedNodes.forEach(p);for(const x of m)r.contains(x)||(d.unobserve(x),m.delete(x));f()});return h.observe(r,{childList:!0,subtree:!0,characterData:!0}),()=>{d.disconnect(),h.disconnect()}},[n]),a}b.forwardRef(function({label:a,className:i,...r},c){const f=b.useRef(null),d=b.useCallback(T=>{f.current=T,typeof c=="function"?c(T):c&&(c.current=T)},[c]),m=tM(f),[p,h]=b.useState(!1),[v,x]=b.useState(null);b.useLayoutEffect(()=>{const T=f.current,w=T?.ownerDocument.defaultView;if(!m||!T||!w)return;const C=()=>{h(JA(T).length===0),x(T.closest('[role="dialog"], [role="alertdialog"]')?.getAttribute("aria-labelledby")??null)};C();const M=new w.MutationObserver(C);return M.observe(T,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex","disabled","hidden","href","contenteditable"]}),()=>M.disconnect()},[m]);const S=m&&p;return y.jsx("div",{ref:d,...S?{role:"group",tabIndex:0,"aria-labelledby":a===void 0?v??void 0:void 0,"aria-label":a??(v===null?"Panel content":void 0)}:{},className:Mt(S&&"focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent",i),...r})});const nM={blur:{label:"Blur",unit:"px",min:0,max:200,step:1,identity:0,initial:4},brightness:{label:"Brightness",unit:"%",min:0,max:500,step:1,identity:100,initial:120},contrast:{label:"Contrast",unit:"%",min:0,max:500,step:1,identity:100,initial:120},grayscale:{label:"Grayscale",unit:"%",min:0,max:100,step:1,identity:0,initial:100},saturate:{label:"Saturate",unit:"%",min:0,max:500,step:1,identity:100,initial:150},"hue-rotate":{label:"Hue rotate",unit:"deg",min:-360,max:360,step:1,identity:0,initial:90},invert:{label:"Invert",unit:"%",min:0,max:100,step:1,identity:0,initial:100},sepia:{label:"Sepia",unit:"%",min:0,max:100,step:1,identity:0,initial:100},opacity:{label:"Opacity",unit:"%",min:0,max:100,step:1,identity:100,initial:50}};[...Object.keys(nM)];const oM={cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",copyLink:"Copy link",loading:"Loading…",justNow:"just now",never:"never",agent:"Agent",delete:"Delete",rename:"Rename",duplicate:"Duplicate",pin:"Pin",unpin:"Unpin",open:"Open",save:"Save",updated:"Updated {when}",pinned:"Pinned",unpinned:"Unpinned",duplicated:"Duplicated",couldNotPin:"Could not pin: {error}",couldNotUnpin:"Could not unpin: {error}",couldNotRename:"Could not rename: {error}",couldNotDuplicate:"Could not duplicate: {error}",couldNotDelete:"Could not delete: {error}",statusNone:"No session",statusWorking:"Working",statusIdle:"Idle",statusWaiting:"Waiting",statusOffline:"Offline",working:"{agent} is working…",artifactOptions:"Artifact options",artifactName:"Artifact name",comments:"Comments",doneCommenting:"Done commenting",openComment:"1 open comment",openComments:"{count} open comments",commentOptions:"Comment options",showAllComments:"Show all comments",hideComments:"Hide comments",share:"Share",sharedOnNetwork:"Shared with your network",onlyThisComputer:"Only this computer",ask:"Ask {agent}",hideAsk:"Hide",openHarnessSession:"Open the {harness} session",messageAgent:"Message {agent} about this artifact",switchArtifact:"Switch artifact",inThisSession:"In this session",recent:"Recent",allArtifacts:"All artifacts",export:"Export",openSession:"Open session",offline:"offline",versionHistory:"Version history",openInNewTab:"Open in new tab",refresh:"Refresh",storage:"Storage",inThisFolder:"{size} in this folder",copyPath:"Copy path",linkCopied:"Link copied",pathCopied:"Path copied",deleteTitle:'Delete "{title}"?',deleteBody:"It leaves your artifacts. Its folder stays where it is: {root}",shareTitle:"Share this artifact",peopleWithAccess:"People with access",joinedPeople:"People who joined",noneJoined:"Nobody has joined yet. Send someone a link below.",online:"Online",seenAgo:"Seen {when}",guestPaused:"Link off: no access until it is back on",changeRole:"Change {name}'s role",roleLinkOff:"Link off",remove:"Remove",removeGuest:"Remove {name}",removeTitle:"Remove {name}?",removeBody:"They lose access to this artifact. They can join again with a link.",you:"(you)",thisComputer:"This computer",owner:"Owner",generalAccess:"General access",onLan:"Anyone on your network with a link",onlyHereSub:"Nobody else can open the links.",onLanSub:"People on the same Wi-Fi or LAN open it with a link; the link sets their role.",onNetworkAt:"On this network at {addresses}",onTailnet:"Tailscale: {address}, for people on your tailnet from any network (copy it from a link's More menu)",noAddress:"This computer has no local network address.",whereOff:"Only this computer can open these links for now. Copying one opens this to your network.",inviteLinks:"Invite links",roleEditor:"Editor",roleCommenter:"Commenter",roleViewer:"Viewer",linkEditor:"Can edit",linkCommenter:"Can comment",linkViewer:"Can view",noteEditor:"Edit and comment",noteCommenter:"Comment, no edits",noteViewer:"Read only",linkOff:"Off: nobody can join with it",turnOn:"Turn on",more:"More",moreFor:"More: {role}",copyTailnet:"Copy Tailscale link",copyTailnetNote:"For people on your tailnet, off this network ({address})",turnOnLink:"Turn on link",turnOffLink:"Turn off link",turnOffNote:"Whoever joined with it loses access until it is back on",resetLink:"Reset link",resetNote:"A new address; whoever joined with the old one is removed",resetTitle:'Reset the "{role}" link?',resetBody:"The old link stops working and the people who joined with it lose access.",plainHttp:"This is plain HTTP: others on the network can read what passes. A link is the permission: whoever has it gets its role, so send it only to the people meant to have it, and reset a link that went further.",cannotShare:"{type} pages can't be shared on the network yet: only this computer opens it.",shareError:"Could not do that: {error}",sendingTitle:"Sending this to someone?",sendingBody:"Share the link instead of a file and they will always have the latest changes.",invitePeople:"Invite people",allLinksOff:"All the links are off. Invite people to turn one on.",joinsAs:"People who open this link join as {role}. Invite people to give another role.",onlyHereLink:"Only this computer can open the link.",nothingToExport:"Nothing to export yet.",exportOptions:"Asks for options first",archiveLabel:"Whole folder (.zip)",archiveDescription:"Everything here, to back up or move",archiveStarted:"Downloading {name}",archiveHint:"The whole folder in one zip, to back up, move to another computer or send to someone. Unzip it and open it with the same type to carry on; share links and this computer's server state are left out.",archiveTooLarge:"The folder is over what a zip holds (4 GiB or 65,535 files): copy the folder itself instead.",archiveUnsupported:"{type} folders can't be zipped here: copy the folder itself instead.",archiveFailed:"Could not zip the folder: {error}",exportBusy:"Another export is running. Try {label} again in a moment.",exportUnsupported:"{label} can't be exported right now.",exportFailed:"Could not export {label}.",saving:"Saving…",reconnecting:"Reconnecting…",notSaved:"Not saved",notSavedTitle:"The page could not save its last changes.",saveRetry:"Couldn't save — retry",readOnly:"Read-only",readOnlyTitle:"Nothing can be saved here",leaveLosesWork:"Leave? Changes that are not saved yet will be lost.",actionSaveNow:"Save now",actionOpenFind:"Find",actionUndo:"Undo",actionRedo:"Redo",actionEditPage:"Edit page",actionUsePage:"Use this page",actionCommentSelection:"Comment on selection",actionOpenPageList:"Pages",actionHandOffCode:"Hand off to code",whyOlderVersion:"You are viewing an older version",whyAgentWorking:"{agent} is working",whyDraftOpen:"Close the open draft first",whyCommentsOn:"Turn off comment mode first",whyNeedsAgent:"Needs an agent session",whyUnsaved:"Save first",whyOther:"Not available right now",noOwner:"No session owns this artifact",noOwnerNote:"What you send waits for the next session that works on it.",ownerNote:"Messages go to the {harness} session that made this artifact.",agentIdle:"{agent} is idle",agentWaiting:"{agent} is waiting",sessionOffline:"The session is offline",offlineNote:"{agent} sees what you send the next time the {harness} session works.",askPlaceholder:"What should change?",sendToAgent:"Send to {agent}",sending:"Sending…",sent:"Sent.",sentInbox:"{agent} will see it the next time the session works.",notDelivered:"Not delivered.",notSent:"Not sent: {error}",viaDelivered:"delivered",viaInbox:"waiting for the session",viaFailed:"not delivered",emptyTitle:"This artifact is empty",emptyBody:"Nothing of {type} has been written to {root} yet. An agent writes it: send it this.",startSession:"Start a session with {agent}",promptCopied:"Copied: paste it into any agent session that has the Artifact tool.",sentToSession:"Sent to a new session.",problemTitle:"This artifact cannot open here",noPage:"No page.",folder:"Folder: {root}",askToLook:"Ask {agent} to look",problemAsk:"The artifact page could not open: {problem}",noBoot:"No artifact to show. Open one from the home page.",homeTitle:"Open Artifact",homeSub:"The artifacts and types every agent on this computer shares.",artifacts:"Artifacts",types:"Types",newArtifact:"New artifact",moreActions:"More actions",backToSession:"Back to session",noArtifacts:"No artifacts yet. Ask an agent to make one with the Artifact tool, or start one here.",pageOpen:"Open now",typeMissing:"Type not installed",deleted:'Deleted "{title}". Its folder stays.',undo:"Undo",restored:"Restored",couldNotRestore:"Could not restore: {error}",couldNotLoad:"Could not load: {error}",typeRoots:"Type roots: {roots}",noTypes:"No types found.",disabled:"Disabled",shadowedBy:"Overridden by {root}",newOf:"New {type}",create:"Create",title:"Title",folderOptional:"Folder (optional)",folderHint:"Default: a new folder in the home workspace",needTitle:"Give it a title first.",couldNotCreate:"Could not create it: {error}",renameArtifact:"Rename artifact",cannotCreateYet:"Only Design artifacts can be made here for now."},aM={cancel:"取消",close:"关闭",copy:"复制",copied:"已复制",copyLink:"复制链接",loading:"加载中…",justNow:"刚刚",never:"从未",agent:"Agent",delete:"删除",rename:"重命名",duplicate:"复制一份",pin:"置顶",unpin:"取消置顶",open:"打开",save:"保存",updated:"更新于 {when}",pinned:"已置顶",unpinned:"已取消置顶",duplicated:"已复制一份",couldNotPin:"没能置顶:{error}",couldNotUnpin:"没能取消置顶:{error}",couldNotRename:"没能重命名:{error}",couldNotDuplicate:"没能复制:{error}",couldNotDelete:"没能删除:{error}",statusNone:"无会话",statusWorking:"工作中",statusIdle:"空闲",statusWaiting:"等待中",statusOffline:"离线",working:"{agent} 正在工作…",artifactOptions:"作品选项",artifactName:"作品名",comments:"评论",doneCommenting:"结束评论",openComment:"1 条未解决的评论",openComments:"{count} 条未解决的评论",commentOptions:"评论选项",showAllComments:"显示全部评论",hideComments:"隐藏评论",share:"分享",sharedOnNetwork:"已分享到局域网",onlyThisComputer:"仅这台电脑",ask:"问 {agent}",hideAsk:"收起",openHarnessSession:"打开 {harness} 会话",messageAgent:"就这个作品给 {agent} 发消息",switchArtifact:"切换作品",inThisSession:"这个会话里的",recent:"最近",allArtifacts:"所有作品",export:"导出",openSession:"打开会话",offline:"离线",versionHistory:"版本历史",openInNewTab:"在新标签页打开",refresh:"刷新",storage:"存储",inThisFolder:"这个文件夹 {size}",copyPath:"复制路径",linkCopied:"链接已复制",pathCopied:"路径已复制",deleteTitle:"删除「{title}」?",deleteBody:"它会移出作品列表,文件夹保留在原处:{root}",shareTitle:"分享这份内容",peopleWithAccess:"有权访问的人",joinedPeople:"加入的人",noneJoined:"还没有人加入。把下面的链接发给对方。",online:"在线",seenAgo:"{when}来过",guestPaused:"链接已关闭,暂时无法访问",changeRole:"更改「{name}」的角色",roleLinkOff:"链接已关闭",remove:"移出",removeGuest:"移出 {name}",removeTitle:"移出「{name}」?",removeBody:"对方将无法再访问这份内容,之后仍可以用链接重新加入。",you:"(你)",thisComputer:"这台电脑",owner:"所有者",generalAccess:"一般访问权限",onLan:"同一网络里有链接的人",onlyHereSub:"别人打不开这些链接。",onLanSub:"同一 Wi-Fi 或局域网里的人用链接打开,链接决定角色。",onNetworkAt:"在这个网络上:{addresses}",onTailnet:"Tailscale:{address},同一 tailnet 的人在别的网络也能打开(复制在链接的「更多」里)",noAddress:"这台电脑没有局域网地址。",whereOff:"现在只有这台电脑能打开这些链接。复制链接会顺手分享到局域网。",inviteLinks:"邀请链接",roleEditor:"编辑者",roleCommenter:"评论者",roleViewer:"查看者",linkEditor:"可编辑",linkCommenter:"可评论",linkViewer:"可查看",noteEditor:"编辑和评论",noteCommenter:"只能评论",noteViewer:"只读",linkOff:"已关闭:没人能用它加入",turnOn:"开启",more:"更多",moreFor:"更多:{role}",copyTailnet:"复制 Tailscale 链接",copyTailnetNote:"给同一 tailnet 里不在这个网络的人({address})",turnOnLink:"开启链接",turnOffLink:"关闭链接",turnOffNote:"用它加入的人暂时无法访问",resetLink:"重置链接",resetNote:"换一个新地址,用旧链接加入的人会被移出",resetTitle:"重置「{role}」链接?",resetBody:"旧链接会失效,通过它加入的人也会失去访问权限。",plainHttp:"这是明文 HTTP:同一网络的人能看到传输内容。链接就是权限:拿到链接的人就有对应角色,只发给该有的人;传出去了就重置链接。",cannotShare:"{type} 的页面暂时不能分享到网络:只有这台电脑能打开。",shareError:"没做成:{error}",sendingTitle:"要发给别人?",sendingBody:"发链接而不是文件,对方看到的总是最新版本。",invitePeople:"邀请别人",allLinksOff:"所有链接都关着。去邀请页打开一条。",joinsAs:"用这条链接打开的人以{role}身份加入。要给别的角色,去邀请页。",onlyHereLink:"只有这台电脑能打开这个链接。",nothingToExport:"还没有可导出的内容。",exportOptions:"会先询问导出选项",archiveLabel:"整个文件夹(.zip)",archiveDescription:"这里的全部内容,用来备份或搬走",archiveStarted:"开始下载 {name}",archiveHint:"整个文件夹打成了一个 zip,可以备份、换电脑或发给别人。解压后用同一个类型打开就能接着用;分享链接和这台电脑上的服务器状态不在里面。",archiveTooLarge:"文件夹超过了 zip 的上限(4 GiB 或 65535 个文件),请直接复制文件夹。",archiveUnsupported:"{type} 的文件夹在这里打不了包,请直接复制文件夹。",archiveFailed:"没能打包:{error}",exportBusy:"另一个导出正在进行,请稍后再导出 {label}。",exportUnsupported:"现在无法导出 {label}。",exportFailed:"无法导出 {label}。",saving:"正在保存…",reconnecting:"正在重新连接…",notSaved:"未保存",notSavedTitle:"页面没能保存最近的修改。",saveRetry:"保存失败,点击重试",readOnly:"只读",readOnlyTitle:"这里的内容无法保存",leaveLosesWork:"确定离开?尚未保存的修改会丢失。",actionSaveNow:"立即保存",actionOpenFind:"查找",actionUndo:"撤销",actionRedo:"重做",actionEditPage:"编辑页面",actionUsePage:"使用这个页面",actionCommentSelection:"评论选中内容",actionOpenPageList:"页面列表",actionHandOffCode:"交给代码处理",whyOlderVersion:"你正在查看旧版本",whyAgentWorking:"{agent} 正在工作",whyDraftOpen:"请先关闭打开的草稿",whyCommentsOn:"请先退出评论模式",whyNeedsAgent:"需要一个智能体会话",whyUnsaved:"请先保存",whyOther:"暂时不可用",noOwner:"没有会话拥有这个作品",noOwnerNote:"发出的消息会等下一个处理它的会话。",ownerNote:"消息会发给做这个作品的 {harness} 会话。",agentIdle:"{agent} 空闲",agentWaiting:"{agent} 在等待",sessionOffline:"会话离线",offlineNote:"{harness} 会话下次工作时,{agent} 会看到你发的消息。",askPlaceholder:"想改什么?",sendToAgent:"发给 {agent}",sending:"发送中…",sent:"已发送。",sentInbox:"会话下次工作时 {agent} 会看到。",notDelivered:"没送达。",notSent:"没发出去:{error}",viaDelivered:"已送达",viaInbox:"等会话处理",viaFailed:"没送达",emptyTitle:"这个作品还是空的",emptyBody:"{root} 里还没有写入 {type} 的内容。由 Agent 来写:把下面这段发给它。",startSession:"和 {agent} 开个新会话",promptCopied:"已复制:粘贴到任意装了 Artifact 工具的 Agent 会话里。",sentToSession:"已发到新会话。",problemTitle:"这个作品在这里打不开",noPage:"没有页面。",folder:"文件夹:{root}",askToLook:"让 {agent} 看看",problemAsk:"作品页打不开:{problem}",noBoot:"没有要显示的作品。从主页打开一个。",homeTitle:"Open Artifact",homeSub:"本机所有 Agent 共用的作品和类型。",artifacts:"作品",types:"类型",newArtifact:"新建作品",moreActions:"更多操作",backToSession:"回到会话",noArtifacts:"还没有作品。让 Agent 用 Artifact 工具创建一个,或者在这里新建。",pageOpen:"已打开",typeMissing:"类型没有安装",deleted:"已删除「{title}」,文件夹保留。",undo:"撤销",restored:"已恢复",couldNotRestore:"没能恢复:{error}",couldNotLoad:"读取失败:{error}",typeRoots:"类型根目录:{roots}",noTypes:"没有找到类型。",disabled:"已停用",shadowedBy:"被 {root} 覆盖",newOf:"新建 {type}",create:"创建",title:"标题",folderOptional:"文件夹(可不填)",folderHint:"默认:主工作区里新建一个文件夹",needTitle:"先写个标题。",couldNotCreate:"没建成:{error}",renameArtifact:"重命名作品",cannotCreateYet:"目前这里只能新建 Design 作品。"};function sM(n){return n&&/^zh\b/i.test(n)?"zh-CN":"en"}const uh=sM(typeof navigator>"u"?void 0:navigator.language);function iM(n,a){return a?n.replace(/\{(\w+)\}/g,(i,r)=>r in a?String(a[r]):i):n}function rM(n,a,i){return iM((n==="zh-CN"?aM[a]:void 0)??oM[a],i)}function q(n,a){return rM(uh,n,a)}const lM=/^art_[0-9a-z]{10,40}$/;function cM(n){if(typeof n!="string")return null;const a=/^open-artifact:\/\/artifact\/([^/?#]+)/.exec(n.trim()),i=a?a[1]:n.trim();return lM.test(i)?i:null}const hn={artifacts:"artifacts",artifact:"artifact",types:"types",events:"events",share:"artifact.share",archive:"artifact.archive",restore:"artifacts.restore",open:"artifacts.open",create:"artifacts.create",update:"artifacts.update",duplicate:"artifacts.duplicate",delete:"artifacts.delete",ask:"artifacts.ask"},uM="[Artifact comment sent to agent]",fM="[Artifact edit request sent to agent]",dM="[Artifact task finished]",pM="open-artifact-shell",Ga={shell:"open_artifact_shell",id:"open_artifact_id",comment:"comment",panel:"panel"},hM=["saved","actions","formats","shareNotice"],mM=1,gM=/^[a-z][a-z0-9]{0,23}$/,gb="not run: the artifact was updated";function yM(n){return!!n&&typeof n=="object"&&typeof n.openArtifact=="string"}const vM=["quickstart","list","publish","read","open","call","adopt","delete","share"],bM=["get","list","query","set","update","delete","str_replace","batch"],xM=["read","reply","resolve","reopen","wait"],SM=["share","export"],TM={type:"object",properties:{action:{type:"string",enum:vM,description:"What to do. Omitted: publish."},intent:{type:"string",description:"quickstart: what is being made (design, design-system, slides, whiteboard, document, data, other), or a few words about it."},scope:{type:"string",enum:["types","mine","all"],description:"list: the installed types, this session's and this workspace's artifacts (default), or every artifact."},type:{type:"string",description:"list: only artifacts of this type (an id, or open-artifact://type/<id>)."},query:{type:"string",description:"list: only artifacts whose title contains this text."},limit:{type:"integer",description:"list: how many to return (default 50, at most 200)."},cursor:{type:"string",description:"list: the next_cursor of the previous page."},type_url:{type:"string",description:"publish without url: the type to create from (open-artifact://type/<id>, from quickstart). read without url: the type to describe."},title:{type:"string",description:"publish without url: the new artifact's name."},folder:{type:"string",description:"publish without url, or adopt: where the artifact's folder goes (absolute, or relative to the workspace). Default <workspace>/artifacts/<slug>."},url:{type:"string",description:"An artifact: open-artifact://artifact/<id>, as publish returned it."},files:{type:"object",additionalProperties:!0,description:'publish with url: files to write under the artifact root, as {"rel/path": "text"} or {"rel/path": {"content": "...", "encoding": "base64"}}; null deletes.'},if_match:{type:"object",additionalProperties:!0,description:'publish with url: {"rel/path": sha256 | null | "*"}. Write only while the file still has the sha256 you read, does not exist (null), or anyway ("*"). One mismatch writes nothing and returns the current versions.'},check:{type:"boolean",description:"publish with url: run the type's check action after writing; its result comes back as check."},open:{type:"string",enum:["after_first_write","now"],description:"publish without url: after_first_write opens the page in your app once your first write lands; now opens it at once. Where your app cannot show pages by itself the result says so: open view_url in your app's built-in browser, if you have one."},related:{type:"boolean",description:"quickstart: list existing artifacts the recommended type can build on, such as design systems (default true)."},path:{type:"string",description:"read: one file or folder under the root (omitted: the record and the file list)."},paths:{type:"array",items:{type:"string"},description:"read: several files under the root at once."},name:{type:"string",description:"call: the action's name (check, upload, ...; read with url lists them)."},args:{type:"object",additionalProperties:!0,description:"call: the action's arguments. upload: {file: absolute path, name?, group?}."},panel:{type:"string",enum:SM,description:"open: also open the page's Share panel (share), for the person to share it on the network, or its Export tab (export), for them to download a file."}}},EM={type:"object",properties:{action:{type:"string",enum:bM},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>)."},collection:{type:"string"},doc_id:{type:"string"},path:{type:"string",description:"collection/doc_id, instead of the two."},data:{type:"object",additionalProperties:!0,description:"set / update: the document's fields."},file_path:{type:"string",description:"set / update: a JSON file holding the fields, instead of data."},if_match:{description:'set / update / delete / str_replace: the sha256 get returned (write only if unchanged), null (only if it does not exist) or "*" (replace whatever is there).'},field:{type:"string",description:"str_replace: the text field, as a dot path (body, notes.text)."},old:{type:"string",description:"str_replace: the passage to replace; it must occur exactly once."},new:{type:"string",description:"str_replace: the passage that replaces it."},where:{type:"array",items:{type:"object",additionalProperties:!0},description:"query: [{field, op, value}], all must hold. op: ==, !=, <, <=, >, >=, in, not-in (up to 30 values), array-contains."},order_by:{type:"object",additionalProperties:!0,description:'query: {field, dir: "asc" | "desc"}.'},limit:{type:"integer",description:"list / query: how many documents (default 100, at most 1000)."},cursor:{type:"string",description:"list / query: the next_cursor of the previous page."},out_file:{type:"string",description:"get / list / query: write the result to this JSON file (absolute, or relative to the workspace) and return only its path and counts."},writes:{type:"array",items:{type:"object",additionalProperties:!0},description:"batch: [{op: set|update|delete|str_replace, path | collection+doc_id, data | file_path, if_match?, field?, old?, new?}], at most 500."}},required:["action","url"]},wM={type:"object",properties:{action:{type:"string",enum:xM},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>). wait: optional."},thread_id:{type:"string",description:'reply / resolve / reopen: the thread (after ";thread=" in the message).'},text:{type:"string",description:"reply: the answer."},resolve:{type:"boolean",description:"reply: resolve the thread too."},all:{type:"boolean",description:"read: resolved threads too."},since:{type:"string",description:"read: only threads with a message at or after this time (ISO 8601)."},acknowledge_duplicate:{type:"boolean",description:"reply: send the same text as your last reply in this thread again, on purpose."},timeout_ms:{type:"number",description:"wait: how long (default 600000)."}},required:["action"]},yb={Artifact:TM,ArtifactData:EM,ArtifactComments:wM},RM={Artifact:["Make and change artifacts: typed folders of files that open as live pages the person can view, edit, comment on and export. Actions:","- quickstart {intent}: call first for a new artifact; recommends a type and returns the call that creates it.",'- list {scope: "mine" | "all" | "types", type?, query?}: find existing artifacts, or the installed types.',"- publish {type_url, title, folder?, open?}: create an artifact; the result carries its root folder and the type's instructions. publish {url, files, if_match?, check?}: write files when you have no file tools of your own.","- read {url, path? | paths?}: the artifact's record, files and actions, or some of its files with their sha256. read {type_url}: a type's instructions, before creating.",`- open {url, panel?}: show it to the person in the computer's browser (or the app, when it shows pages), once its content is written. When your app has a built-in browser, open view_url there instead. panel "share" or "export" opens its Share panel or Export tab for them.`,"- call {url, name, args?}: run one of the type's actions (check, upload, ...). A long one answers {task, pending: true}; its result comes later as a message.","- adopt {url | folder}: take over an artifact, or add an existing folder. Only when the person asks.","- share {url}: whether it is shared on the local network, and its links. Only the person changes that, in the page's Share panel.","- delete {url}: forget an artifact; its folder stays. Only when the person asks."].join(`
10
10
  `),ArtifactData:'Read and write the document store of an artifact whose type keeps one (its instructions say so). get, list and query read documents with their sha256; set, update, delete, str_replace and batch write them. update merges fields, and {"__delete__": true} removes one; str_replace changes one passage of a long text field. Replacing or deleting an existing document needs if_match: the sha256 you read, or "*". Your writes show live on open pages.',ArtifactComments:`Comments the person leaves on their artifact's page, kept in the artifact's own folder on this computer (no outside service). read lists the threads; reply answers one (thread_id is after ";thread=" in the message), with resolve: true when it is done; resolve and reopen change a thread's state. A thread sent to you is the person asking for your answer in it, so replying there is what they asked for. Answer only threads sent to you, in one or two lines. wait blocks until the next message for this session: use it only when nothing else can wake you.`},OM={Artifact:{title:"Artifact",openWorldHint:!1},ArtifactData:{title:"Artifact data",openWorldHint:!1},ArtifactComments:{title:"Artifact comments",destructiveHint:!1,openWorldHint:!1}};Object.keys(yb).map(n=>({name:n,description:RM[n],inputSchema:yb[n],annotations:OM[n]}));const CM=300,AM=12,vb=["Artifact","ArtifactData","ArtifactComments"];function ga(n,a=CM){const i=String(n??"").replace(/[<>]/g,"").replace(/\s+/g," ").trim();return i.length>a?`${i.slice(0,a-1).trimEnd()}…`:i}function MM(n){const a=ga(n,Number.MAX_SAFE_INTEGER),i=a.search(/[.!?。!?](\s|$)/);return i>=0?a.slice(0,i+1):a}function NM(n){const a=ga(n,24);return/^[a-z0-9]{1,5}$/i.test(a)?a.toUpperCase():a}const bb=n=>!n||/[.!?。!?…]$/.test(n)?n:`${n}.`;function DM(n,a=!1){const i=ga(n.title,80)||n.id;if(a)return`- ${n.id}: ${i}`;const r=ga(n.when)||ga(MM(n.description)),c=(n.exports??[]).map(NM).filter(Boolean),f=[bb(i),bb(r),c.length?`Exports: ${c.join(", ")}.`:""].filter(Boolean);return`- ${n.id}: ${f.join(" ")}`}const _M="Open Artifact lets you make artifacts: typed folders of files (a slide deck, a design canvas, a whiteboard, a data dashboard and more) that open as live pages the person can view, edit, comment on and export. You make and change them with the Artifact, ArtifactData and ArtifactComments tools.",zM=`<where_output_goes>
11
11
  Decide where your output will live before you make anything.
12
12
  - Something the person will read once and move on from (an answer, an explanation, a summary, a short report) goes in your reply, however long it is. A diagram or chart that explains your answer goes in the reply too, when you can show one there.