"use strict";(self.__cfswpl__=self.__cfswpl__||[]).push([[525],{7063:(e,t,n)=>{n.d(t,{Ry:()=>u});n(8206),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865);var r=function(e){return"undefined"===typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},o=new WeakMap,i=new WeakMap,l={},a=0,c=function(e){return e&&(e.host||c(e.parentNode))},s=function(e,t,n,r){var s=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=c(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);l[n]||(l[n]=new WeakMap);var u=l[n],d=[],f=new Set,p=new Set(s),v=function(e){e&&!f.has(e)&&(f.add(e),v(e.parentNode))};s.forEach(v);var m=function(e){e&&!p.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(f.has(e))m(e);else{var t=e.getAttribute(r),l=null!==t&&"false"!==t,a=(o.get(e)||0)+1,c=(u.get(e)||0)+1;o.set(e,a),u.set(e,c),d.push(e),1===a&&l&&i.set(e,!0),1===c&&e.setAttribute(n,"true"),l||e.setAttribute(r,"true")}}))};return m(t),f.clear(),a++,function(){d.forEach((function(e){var t=o.get(e)-1,l=u.get(e)-1;o.set(e,t),u.set(e,l),t||(i.has(e)||e.removeAttribute(r),i.delete(e)),l||e.removeAttribute(n)})),--a||(o=new WeakMap,o=new WeakMap,i=new WeakMap,l={})}},u=function(e,t,n){void 0===n&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=t||r(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),s(o,i,n,"aria-hidden")):function(){return null}}},7837:(e,t,n)=>{n.d(t,{pF:()=>r,zi:()=>o,xv:()=>i,Av:()=>l});var r="right-scroll-bar-position",o="width-before-scroll-bar",i="with-scroll-bars-hidden",l="--removed-body-scroll-bar-size"},4332:(e,t,n)=>{n.d(t,{jp:()=>d});var r=n(5152),o=n(9420),i=n(7837),l={left:0,top:0,right:0,gap:0},a=function(e){return parseInt(e||"",10)||0},c=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return l;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[a(n),a(r),a(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},s=(0,o.Ws)(),u=function(e,t,n,r){var o=e.left,l=e.top,a=e.right,c=e.gap;return void 0===n&&(n="margin"),"\n .".concat(i.xv," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(c,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(l,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(c,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(i.pF," {\n right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(i.zi," {\n margin-right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(i.pF," .").concat(i.pF," {\n right: 0 ").concat(r,";\n }\n \n .").concat(i.zi," .").concat(i.zi," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat(i.Av,": ").concat(c,"px;\n }\n")},d=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o,l=r.useMemo((function(){return c(i)}),[i]);return r.createElement(s,{styles:u(l,!t,i,n?"":"!important")})}},4554:(e,t,n)=>{n.d(t,{Z:()=>M});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nr[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},b=function(e,t){return"v"===e?function(e){return y(e,"overflowY")}(t):function(e){return y(e,"overflowX")}(t)},E=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},x=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},C=function(e){return[e.deltaX,e.deltaY]},S=function(e){return e&&"current"in e?e.current:e},P=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},R=0,O=[];const T=(0,f.L)(s,(function(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(R++)[0],a=l.useState((function(){return(0,v.Ws)()}))[0],c=l.useRef(e);l.useEffect((function(){c.current=e}),[e]),l.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=i([e.lockRef.current],(e.shards||[]).map(S),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=l.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!c.current.allowPinchZoom;var o,i=x(e),l=n.current,a="deltaX"in e?e.deltaX:l[0]-i[0],s="deltaY"in e?e.deltaY:l[1]-i[1],u=e.target,d=Math.abs(a)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=w(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=w(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(a||s)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),l=i*r,a=n.target,c=t.contains(a),s=!1,u=l>0,d=0,f=0;do{var p=E(e,a),v=p[0],m=p[1]-p[2]-i*v;(v||m)&&b(e,a)&&(d+=m,f+=v),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&(o&&0===d||!o&&l>d)||!u&&(o&&0===f||!o&&-l>f))&&(s=!0),s}(p,t,e,"h"===p?a:s,!0)}),[]),u=l.useCallback((function(e){var n=e;if(O.length&&O[O.length-1]===a){var r="deltaY"in n?C(n):x(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(c.current.shards||[]).map(S).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?s(n,i[0]):!c.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),d=l.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),f=l.useCallback((function(e){n.current=x(e),r.current=void 0}),[]),m=l.useCallback((function(t){d(t.type,C(t),t.target,s(t,e.lockRef.current))}),[]),h=l.useCallback((function(t){d(t.type,x(t),t.target,s(t,e.lockRef.current))}),[]);l.useEffect((function(){return O.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",u,g),document.addEventListener("touchmove",u,g),document.addEventListener("touchstart",f,g),function(){O=O.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,g),document.removeEventListener("touchmove",u,g),document.removeEventListener("touchstart",f,g)}}),[]);var y=e.removeScrollBar,T=e.inert;return l.createElement(l.Fragment,null,T?l.createElement(a,{styles:P(o)}):null,y?l.createElement(p.jp,{gapMode:"margin"}):null)}));var A=l.forwardRef((function(e,t){return l.createElement(d,r({},e,{ref:t,sideCar:T}))}));A.classNames=d.classNames;const M=A},9420:(e,t,n)=>{n.d(t,{Ws:()=>a});var r,o=n(5152);function i(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=r||n.nc;return t&&e.setAttribute("nonce",t),e}var l=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=i())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},a=function(){var e,t=(e=l(),function(t,n){o.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}}},1257:(e,t,n)=>{n.d(t,{q:()=>o});var r=n(5152);function o(e,t){return n=t||null,o=function(t){return e.forEach((function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(i=(0,r.useState)((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade;var n,o,i}},875:(e,t,n)=>{n.d(t,{L:()=>l});var r=n(7463),o=n(5152),i=function(e){var t=e.sideCar,n=(0,r._T)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return o.createElement(i,(0,r.pi)({},n))};function l(e,t){return e.useMedium(t),i}i.isSideCarExport=!0},7554:(e,t,n)=>{n.d(t,{_:()=>l});var r=n(7463);function o(e){return e}function i(e,t){void 0===t&&(t=o);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(i)};l(),n={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),n}}}}}function l(e){void 0===e&&(e={});var t=i(null);return t.options=(0,r.pi)({async:!0,ssr:!1},e),t}},6206:(e,t,n)=>{function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null===e||void 0===e||e(r),!1===n||!r.defaultPrevented)return null===t||void 0===t?void 0:t(r)}}n.d(t,{M:()=>r})},8771:(e,t,n)=>{n.d(t,{F:()=>o,e:()=>i});var r=n(5152);function o(...e){return t=>e.forEach((e=>function(e,t){"function"===typeof e?e(t):null!==e&&void 0!==e&&(e.current=t)}(e,t)))}function i(...e){return(0,r.useCallback)(o(...e),e)}},5360:(e,t,n)=>{n.d(t,{b:()=>o});var r=n(5152);function o(e,t=[]){let n=[];const o=()=>{const t=n.map((e=>(0,r.createContext)(e)));return function(n){const o=(null===n||void 0===n?void 0:n[e])||t;return(0,r.useMemo)((()=>({[`__scope${e}`]:{...n,[e]:o}})),[n,o])}};return o.scopeName=e,[function(t,o){const i=(0,r.createContext)(o),l=n.length;function a(t){const{scope:n,children:o,...a}=t,c=(null===n||void 0===n?void 0:n[e][l])||i,s=(0,r.useMemo)((()=>a),Object.values(a));return(0,r.createElement)(c.Provider,{value:s},o)}return n=[...n,o],a.displayName=t+"Provider",[a,function(n,a){const c=(null===a||void 0===a?void 0:a[e][l])||i,s=(0,r.useContext)(c);if(s)return s;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},i(o,...t)]}function i(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,r.useMemo)((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return n.scopeName=t.scopeName,n}},4369:(e,t,n)=>{n.d(t,{XB:()=>v});var r=n(7288),o=n(5152),i=n(6206),l=n(5320),a=n(8771),c=n(9698);const s="dismissableLayer.update",u="dismissableLayer.pointerDownOutside",d="dismissableLayer.focusOutside";let f;const p=(0,o.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),v=(0,o.forwardRef)(((e,t)=>{var n;const{disableOutsidePointerEvents:v=!1,onEscapeKeyDown:g,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:E,...x}=e,C=(0,o.useContext)(p),[S,P]=(0,o.useState)(null),R=null!==(n=null===S||void 0===S?void 0:S.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,O]=(0,o.useState)({}),T=(0,a.e)(t,(e=>P(e))),A=Array.from(C.layers),[M]=[...C.layersWithOutsidePointerEventsDisabled].slice(-1),k=A.indexOf(M),_=S?A.indexOf(S):-1,L=C.layersWithOutsidePointerEventsDisabled.size>0,D=_>=k,W=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,c.W)(e),r=(0,o.useRef)(!1),i=(0,o.useRef)((()=>{}));return(0,o.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){const r={originalEvent:e};function o(){h(u,n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...C.branches].some((e=>e.contains(t)));D&&!n&&(null===y||void 0===y||y(e),null===b||void 0===b||b(e),e.defaultPrevented||null===E||void 0===E||E())}),R),N=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,c.W)(e),r=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){h(d,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...C.branches].some((e=>e.contains(t)))||(null===w||void 0===w||w(e),null===b||void 0===b||b(e),e.defaultPrevented||null===E||void 0===E||E())}),R);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,c.W)(e);(0,o.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{_===C.layers.size-1&&(null===g||void 0===g||g(e),!e.defaultPrevented&&E&&(e.preventDefault(),E()))}),R),(0,o.useEffect)((()=>{if(S)return v&&(0===C.layersWithOutsidePointerEventsDisabled.size&&(f=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),C.layersWithOutsidePointerEventsDisabled.add(S)),C.layers.add(S),m(),()=>{v&&1===C.layersWithOutsidePointerEventsDisabled.size&&(R.body.style.pointerEvents=f)}}),[S,R,v,C]),(0,o.useEffect)((()=>()=>{S&&(C.layers.delete(S),C.layersWithOutsidePointerEventsDisabled.delete(S),m())}),[S,C]),(0,o.useEffect)((()=>{const e=()=>O({});return document.addEventListener(s,e),()=>document.removeEventListener(s,e)}),[]),(0,o.createElement)(l.WV.div,(0,r.Z)({},x,{ref:T,style:{pointerEvents:L?D?"auto":"none":void 0,...e.style},onFocusCapture:(0,i.M)(e.onFocusCapture,N.onFocusCapture),onBlurCapture:(0,i.M)(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:(0,i.M)(e.onPointerDownCapture,W.onPointerDownCapture)}))}));function m(){const e=new CustomEvent(s);document.dispatchEvent(e)}function h(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,l.jH)(o,i):o.dispatchEvent(i)}},7552:(e,t,n)=>{n.d(t,{EW:()=>i});var r=n(5152);let o=0;function i(){(0,r.useEffect)((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:l()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:l()),o++,()=>{1===o&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),o--}}),[])}function l(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}},5420:(e,t,n)=>{n.d(t,{M:()=>d});var r=n(7288),o=n(5152),i=n(8771),l=n(5320),a=n(9698);const c="focusScope.autoFocusOnMount",s="focusScope.autoFocusOnUnmount",u={bubbles:!1,cancelable:!0},d=(0,o.forwardRef)(((e,t)=>{const{loop:n=!1,trapped:d=!1,onMountAutoFocus:v,onUnmountAutoFocus:g,...y}=e,[w,b]=(0,o.useState)(null),E=(0,a.W)(v),x=(0,a.W)(g),C=(0,o.useRef)(null),S=(0,i.e)(t,(e=>b(e))),P=(0,o.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,o.useEffect)((()=>{if(d){function e(e){if(P.paused||!w)return;const t=e.target;w.contains(t)?C.current=t:m(C.current,{select:!0})}function t(e){if(P.paused||!w)return;const t=e.relatedTarget;null!==t&&(w.contains(t)||m(C.current,{select:!0}))}function n(e){const t=document.activeElement;for(const n of e)n.removedNodes.length>0&&(null!==w&&void 0!==w&&w.contains(t)||m(w))}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return w&&r.observe(w,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[d,w,P.paused]),(0,o.useEffect)((()=>{if(w){h.add(P);const t=document.activeElement;if(!w.contains(t)){const n=new CustomEvent(c,u);w.addEventListener(c,E),w.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(m(r,{select:t}),document.activeElement!==n)return}((e=f(w),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&m(w))}return()=>{w.removeEventListener(c,E),setTimeout((()=>{const e=new CustomEvent(s,u);w.addEventListener(s,x),w.dispatchEvent(e),e.defaultPrevented||m(null!==t&&void 0!==t?t:document.body,{select:!0}),w.removeEventListener(s,x),h.remove(P)}),0)}}var e}),[w,E,x,P]);const R=(0,o.useCallback)((e=>{if(!n&&!d)return;if(P.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=f(e),n=p(t,e),r=p(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&m(i,{select:!0})):(e.preventDefault(),n&&m(o,{select:!0})):r===t&&e.preventDefault()}}),[n,d,P.paused]);return(0,o.createElement)(l.WV.div,(0,r.Z)({tabIndex:-1},y,{ref:S,onKeyDown:R}))}));function f(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function p(e,t){for(const n of e)if(!v(n,{upTo:t}))return n}function v(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function m(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const h=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null===n||void 0===n||n.pause()),e=g(e,t),e.unshift(t)},remove(t){var n;e=g(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function g(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}},1276:(e,t,n)=>{var r;n.d(t,{M:()=>c});var o=n(5152),i=n(9981);const l=(r||(r=n.t(o,2)))["useId".toString()]||(()=>{});let a=0;function c(e){const[t,n]=o.useState(l());return(0,i.b)((()=>{e||n((e=>null!==e&&void 0!==e?e:String(a++)))}),[e]),e||(t?`radix-${t}`:"")}},4314:(e,t,n)=>{n.d(t,{Eh:()=>q,x8:()=>X,VY:()=>Y,h_:()=>$,fC:()=>K,xz:()=>U});var r=n(7288),o=n(5152),i=n(6206),l=n(8771),a=n(5360),c=n(4369),s=n(7552),u=n(5420),d=n(1276),f=n(237),p=n(2651),v=n(3890),m=n(9981);const h=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=(0,o.useState)(),r=(0,o.useRef)({}),i=(0,o.useRef)(e),l=(0,o.useRef)("none"),a=e?"mounted":"unmounted",[c,s]=function(e,t){return(0,o.useReducer)(((e,n)=>{const r=t[e][n];return null!==r&&void 0!==r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,o.useEffect)((()=>{const e=g(r.current);l.current="mounted"===c?e:"none"}),[c]),(0,m.b)((()=>{const t=r.current,n=i.current;if(n!==e){const r=l.current,o=g(t);if(e)s("MOUNT");else if("none"===o||"none"===(null===t||void 0===t?void 0:t.display))s("UNMOUNT");else{const e=r!==o;s(n&&e?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,s]),(0,m.b)((()=>{if(t){const e=e=>{const n=g(r.current).includes(e.animationName);e.target===t&&n&&(0,v.flushSync)((()=>s("ANIMATION_END")))},n=e=>{e.target===t&&(l.current=g(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:(0,o.useCallback)((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),i="function"===typeof n?n({present:r.isPresent}):o.Children.only(n),a=(0,l.e)(r.ref,i.ref);return"function"===typeof n||r.isPresent?(0,o.cloneElement)(i,{ref:a}):null};function g(e){return(null===e||void 0===e?void 0:e.animationName)||"none"}h.displayName="Presence";var y=n(5320),w=n(8426),b=n(7342),E=n(7063),x=n(4554);const C="Popover",[S,P]=(0,a.b)(C,[f.D7]),R=(0,f.D7)(),[O,T]=S(C),A=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:l,modal:a=!1}=e,c=R(t),s=(0,o.useRef)(null),[u,p]=(0,o.useState)(!1),[v=!1,m]=(0,b.T)({prop:r,defaultProp:i,onChange:l});return(0,o.createElement)(f.fC,c,(0,o.createElement)(O,{scope:t,contentId:(0,d.M)(),triggerRef:s,open:v,onOpenChange:m,onOpenToggle:(0,o.useCallback)((()=>m((e=>!e))),[m]),hasCustomAnchor:u,onCustomAnchorAdd:(0,o.useCallback)((()=>p(!0)),[]),onCustomAnchorRemove:(0,o.useCallback)((()=>p(!1)),[]),modal:a},n))},M="PopoverTrigger",k=(0,o.forwardRef)(((e,t)=>{const{__scopePopover:n,...a}=e,c=T(M,n),s=R(n),u=(0,l.e)(t,c.triggerRef),d=(0,o.createElement)(y.WV.button,(0,r.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":z(c.open)},a,{ref:u,onClick:(0,i.M)(e.onClick,c.onOpenToggle)}));return c.hasCustomAnchor?d:(0,o.createElement)(f.ee,(0,r.Z)({asChild:!0},s),d)})),_="PopoverPortal",[L,D]=S(_,{forceMount:void 0}),W=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,l=T(_,t);return(0,o.createElement)(L,{scope:t,forceMount:n},(0,o.createElement)(h,{present:n||l.open},(0,o.createElement)(p.h,{asChild:!0,container:i},r)))},N="PopoverContent",I=(0,o.forwardRef)(((e,t)=>{const n=D(N,e.__scopePopover),{forceMount:i=n.forceMount,...l}=e,a=T(N,e.__scopePopover);return(0,o.createElement)(h,{present:i||a.open},a.modal?(0,o.createElement)(F,(0,r.Z)({},l,{ref:t})):(0,o.createElement)(V,(0,r.Z)({},l,{ref:t})))})),F=(0,o.forwardRef)(((e,t)=>{const n=T(N,e.__scopePopover),a=(0,o.useRef)(null),c=(0,l.e)(t,a),s=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{const e=a.current;if(e)return(0,E.Ry)(e)}),[]),(0,o.createElement)(x.Z,{as:w.g7,allowPinchZoom:!0},(0,o.createElement)(B,(0,r.Z)({},e,{ref:c,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,i.M)(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),s.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:(0,i.M)(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:(0,i.M)(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),V=(0,o.forwardRef)(((e,t)=>{const n=T(N,e.__scopePopover),i=(0,o.useRef)(!1),l=(0,o.useRef)(!1);return(0,o.createElement)(B,(0,r.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,o;(null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented)||(i.current||null===(o=n.triggerRef.current)||void 0===o||o.focus(),t.preventDefault());i.current=!1,l.current=!1},onInteractOutside:t=>{var r,o;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(l.current=!0));const a=t.target;(null===(o=n.triggerRef.current)||void 0===o?void 0:o.contains(a))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&l.current&&t.preventDefault()}}))})),B=(0,o.forwardRef)(((e,t)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:a,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:m,onInteractOutside:h,...g}=e,y=T(N,n),w=R(n);return(0,s.EW)(),(0,o.createElement)(u.M,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:a},(0,o.createElement)(c.XB,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:m,onDismiss:()=>y.onOpenChange(!1)},(0,o.createElement)(f.VY,(0,r.Z)({"data-state":z(y.open),role:"dialog",id:y.contentId},w,g,{ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))})),Z="PopoverClose",H=(0,o.forwardRef)(((e,t)=>{const{__scopePopover:n,...l}=e,a=T(Z,n);return(0,o.createElement)(y.WV.button,(0,r.Z)({type:"button"},l,{ref:t,onClick:(0,i.M)(e.onClick,(()=>a.onOpenChange(!1)))}))})),j=(0,o.forwardRef)(((e,t)=>{const{__scopePopover:n,...i}=e,l=R(n);return(0,o.createElement)(f.Eh,(0,r.Z)({},l,i,{ref:t}))}));function z(e){return e?"open":"closed"}const K=A,U=k,$=W,Y=I,X=H,q=j},237:(e,t,n)=>{n.d(t,{ee:()=>Ye,Eh:()=>qe,VY:()=>Xe,fC:()=>$e,D7:()=>ke});var r=n(7288),o=n(5152);function i(e){return e.split("-")[1]}function l(e){return"y"===e?"height":"width"}function a(e){return e.split("-")[0]}function c(e){return["top","bottom"].includes(a(e))?"x":"y"}function s(e,t,n){let{reference:r,floating:o}=e;const s=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=c(t),f=l(d),p=r[f]/2-o[f]/2,v="x"===d;let m;switch(a(t)){case"top":m={x:s,y:r.y-o.height};break;case"bottom":m={x:s,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-o.width,y:u};break;default:m={x:r.x,y:r.y}}switch(i(t)){case"start":m[d]-=p*(n&&v?-1:1);break;case"end":m[d]+=p*(n&&v?-1:1)}return m}const u=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=s(u,r,c),p=r,v={},m=0;for(let n=0;n({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e||{},{x:o,y:a,placement:s,rects:u,platform:f,elements:p}=t;if(null==n)return{};const v=d(r),m={x:o,y:a},g=c(s),y=l(g),w=await f.getDimensions(n),b="y"===g,E=b?"top":"left",x=b?"bottom":"right",C=b?"clientHeight":"clientWidth",S=u.reference[y]+u.reference[g]-m[g]-u.floating[y],P=m[g]-u.reference[g],R=await(null==f.getOffsetParent?void 0:f.getOffsetParent(n));let O=R?R[C]:0;O&&await(null==f.isElement?void 0:f.isElement(R))||(O=p.floating[C]||u.floating[y]);const T=S/2-P/2,A=v[E],M=O-w[y]-v[x],k=O/2-w[y]/2+T,_=h(A,k,M),L=null!=i(s)&&k!=_&&u.reference[y]/2-(ke.concat(t,t+"-start",t+"-end")),[]),{left:"right",right:"left",bottom:"top",top:"bottom"});function b(e){return e.replace(/left|right|bottom|top/g,(e=>w[e]))}function E(e,t,n){void 0===n&&(n=!1);const r=i(e),o=c(e),a=l(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=b(s)),{main:s,cross:b(s)}}const x={start:"end",end:"start"};function C(e){return e.replace(/start|end/g,(e=>x[e]))}const S=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:l,initialPlacement:c,platform:s,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...y}=e,w=a(r),x=a(c)===c,S=await(null==s.isRTL?void 0:s.isRTL(u.floating)),P=v||(x||!g?[b(c)]:function(e){const t=b(e);return[C(e),t,C(t)]}(c));v||"none"===h||P.push(...function(e,t,n,r){const o=i(e);let l=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(a(e),"start"===n,r);return o&&(l=l.map((e=>e+"-"+o)),t&&(l=l.concat(l.map(C)))),l}(c,g,h,S));const R=[c,...P],O=await p(t,y),T=[];let A=(null==(n=o.flip)?void 0:n.overflows)||[];if(d&&T.push(O[w]),f){const{main:e,cross:t}=E(r,l,S);T.push(O[e],O[t])}if(A=[...A,{placement:r,overflows:T}],!T.every((e=>e<=0))){var M,k;const e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(k=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(m){case"bestFit":{var _;const e=null==(_=A.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0];e&&(n=e);break}case"initialPlacement":n=c}if(r!==n)return{reset:{placement:n}}}return{}}}};function P(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function R(e){return y.some((t=>e[t]>=0))}const O=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{strategy:n="referenceHidden",...r}=e,{rects:o}=t;switch(n){case"referenceHidden":{const e=P(await p(t,{...r,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:R(e)}}}case"escaped":{const e=P(await p(t,{...r,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:R(e)}}}default:return{}}}}};const T=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,l=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=a(n),u=i(n),d="x"===c(n),f=["left","top"].includes(s)?-1:1,p=l&&d?-1:1,v="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof v?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),d?{x:h*p,y:m*f}:{x:m*f,y:h*p}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function A(e){return"x"===e?"y":"x"}const M=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,d={x:n,y:r},f=await p(t,u),v=c(a(o)),m=A(v);let g=d[v],y=d[m];if(i){const e="y"===v?"bottom":"right";g=h(g+f["y"===v?"top":"left"],g,g-f[e])}if(l){const e="y"===m?"bottom":"right";y=h(y+f["y"===m?"top":"left"],y,y-f[e])}const w=s.fn({...t,[v]:g,[m]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},k=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:u=!0,crossAxis:d=!0}=e,f={x:n,y:r},p=c(o),v=A(p);let m=f[p],h=f[v];const g="function"==typeof s?s(t):s,y="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+y.mainAxis,n=i.reference[p]+i.reference[e]-y.mainAxis;mn&&(m=n)}if(d){var w,b;const e="y"===p?"width":"height",t=["top","left"].includes(a(o)),n=i.reference[v]-i.floating[e]+(t&&(null==(w=l.offset)?void 0:w[v])||0)+(t?0:y.crossAxis),r=i.reference[v]+i.reference[e]+(t?0:(null==(b=l.offset)?void 0:b[v])||0)-(t?y.crossAxis:0);hr&&(h=r)}return{[p]:m,[v]:h}}}},_=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:l}=t,{apply:s=(()=>{}),...u}=e,d=await p(t,u),f=a(n),h=i(n),g="x"===c(n),{width:y,height:w}=r.floating;let b,E;"top"===f||"bottom"===f?(b=f,E=h===(await(null==o.isRTL?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(E=f,b="end"===h?"top":"bottom");const x=w-d[b],C=y-d[E],S=!t.middlewareData.shift;let P=x,R=C;if(g){const e=y-d.left-d.right;R=h||S?v(C,e):e}else{const e=w-d.top-d.bottom;P=h||S?v(x,e):e}if(S&&!h){const e=m(d.left,0),t=m(d.right,0),n=m(d.top,0),r=m(d.bottom,0);g?R=y-2*(0!==e||0!==t?e+t:m(d.left,d.right)):P=w-2*(0!==n||0!==r?n+r:m(d.top,d.bottom))}await s({...t,availableWidth:R,availableHeight:P});const O=await o.getDimensions(l.floating);return y!==O.width||w!==O.height?{reset:{rects:!0}}:{}}}};function L(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function D(e){return L(e).getComputedStyle(e)}function W(e){return e instanceof L(e).Node}function N(e){return W(e)?(e.nodeName||"").toLowerCase():""}function I(e){return e instanceof L(e).HTMLElement}function F(e){return e instanceof L(e).Element}function V(e){return"undefined"!=typeof ShadowRoot&&(e instanceof L(e).ShadowRoot||e instanceof ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=D(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Z(e){return["table","td","th"].includes(N(e))}function H(e){const t=j(),n=D(e);return"none"!==n.transform||"none"!==n.perspective||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function j(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function z(e){return["html","body","#document"].includes(N(e))}const K=Math.min,U=Math.max,$=Math.round;function Y(e){const t=D(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=I(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=$(n)!==i||$(r)!==l;return a&&(n=i,r=l),{width:n,height:r,fallback:a}}function X(e){return F(e)?e:e.contextElement}const q={x:1,y:1};function G(e){const t=X(e);if(!I(t))return q;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=Y(t);let l=(i?$(n.width):n.width)/r,a=(i?$(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const J={x:0,y:0};function Q(e,t,n){var r,o;if(void 0===t&&(t=!0),!j())return J;const i=e?L(e):window;return!n||t&&n!==i?J:{x:(null==(r=i.visualViewport)?void 0:r.offsetLeft)||0,y:(null==(o=i.visualViewport)?void 0:o.offsetTop)||0}}function ee(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=X(e);let l=q;t&&(r?F(r)&&(l=G(r)):l=G(e));const a=Q(i,n,r);let c=(o.left+a.x)/l.x,s=(o.top+a.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=L(i),t=r&&F(r)?L(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=G(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,c*=e.x,s*=e.y,u*=e.x,d*=e.y,c+=t.x,s+=t.y,n=L(n).frameElement}}return f({width:u,height:d,x:c,y:s})}function te(e){return((W(e)?e.ownerDocument:e.document)||window.document).documentElement}function ne(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){return ee(te(e)).left+ne(e).scrollLeft}function oe(e){if("html"===N(e))return e;const t=e.assignedSlot||e.parentNode||V(e)&&e.host||te(e);return V(t)?t.host:t}function ie(e){const t=oe(e);return z(t)?t.ownerDocument.body:I(t)&&B(t)?t:ie(t)}function le(e,t){var n;void 0===t&&(t=[]);const r=ie(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r);return o?t.concat(i,i.visualViewport||[],B(r)?r:[]):t.concat(r,le(r))}function ae(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=L(e),r=te(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,c=0;if(o){i=o.width,l=o.height;const e=j();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n);else if("document"===t)r=function(e){const t=te(e),n=ne(e),r=e.ownerDocument.body,o=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+re(e);const a=-n.scrollTop;return"rtl"===D(r).direction&&(l+=U(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(te(e));else if(F(t))r=function(e,t){const n=ee(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=I(e)?G(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Q(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return f(r)}function ce(e,t){const n=oe(e);return!(n===t||!F(n)||z(n))&&("fixed"===D(n).position||ce(n,t))}function se(e,t){return I(e)&&"fixed"!==D(e).position?t?t(e):e.offsetParent:null}function ue(e,t){const n=L(e);if(!I(e))return n;let r=se(e,t);for(;r&&Z(r)&&"static"===D(r).position;)r=se(r,t);return r&&("html"===N(r)||"body"===N(r)&&"static"===D(r).position&&!H(r))?n:r||function(e){let t=oe(e);for(;I(t)&&!z(t);){if(H(t))return t;t=oe(t)}return null}(e)||n}function de(e,t,n){const r=I(t),o=te(t),i="fixed"===n,l=ee(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c={x:0,y:0};if(r||!r&&!i)if(("body"!==N(t)||B(o))&&(a=ne(t)),I(t)){const e=ee(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=re(o));return{x:l.left+a.scrollLeft-c.x,y:l.top+a.scrollTop-c.y,width:l.width,height:l.height}}const fe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=le(e).filter((e=>F(e)&&"body"!==N(e))),o=null;const i="fixed"===D(e).position;let l=i?oe(e):e;for(;F(l)&&!z(l);){const t=D(l),n=H(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||B(l)&&!n&&ce(e,l))?r=r.filter((e=>e!==l)):o=t,l=oe(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],c=l.reduce(((e,n)=>{const r=ae(t,n,o);return e.top=U(r.top,e.top),e.right=K(r.right,e.right),e.bottom=K(r.bottom,e.bottom),e.left=U(r.left,e.left),e}),ae(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=I(n),i=te(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const c={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==N(n)||B(i))&&(l=ne(n)),I(n))){const e=ee(n);a=G(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+c.x,y:t.y*a.y-l.scrollTop*a.y+c.y}},isElement:F,getDimensions:function(e){return Y(e)},getOffsetParent:ue,getDocumentElement:te,getScale:G,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ue,i=this.getDimensions;return{reference:de(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===D(e).direction};function pe(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=!0,animationFrame:a=!1}=r,c=o||i?[...F(e)?le(e):e.contextElement?le(e.contextElement):[],...le(t)]:[];c.forEach((e=>{const t=!F(e)&&e.toString().includes("V");!o||a&&!t||e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let s,u=null;l&&(u=new ResizeObserver((()=>{n()})),F(e)&&!a&&u.observe(e),F(e)||!e.contextElement||a||u.observe(e.contextElement),u.observe(t));let d=a?ee(e):null;return a&&function t(){const r=ee(e);!d||r.x===d.x&&r.y===d.y&&r.width===d.width&&r.height===d.height||n(),d=r,s=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=u)||e.disconnect(),u=null,a&&cancelAnimationFrame(s)}}var ve=n(3890);const me=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return t&&(r=t,{}.hasOwnProperty.call(r,"current"))?null!=t.current?g({element:t.current,padding:n}).fn(e):{}:t?g({element:t,padding:n}).fn(e):{};var r}}};var he="undefined"!==typeof document?o.useLayoutEffect:o.useEffect;function ge(e,t){if(e===t)return!0;if(typeof e!==typeof t)return!1;if("function"===typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!==r--;)if(!ge(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ge(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ye(e){if("undefined"===typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function we(e,t){const n=ye(e);return Math.round(t*n)/n}function be(e){const t=o.useRef(e);return he((()=>{t.current=e})),t}function Ee(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:l,floating:a}={},transform:c=!0,whileElementsMounted:s,open:d}=e,[f,p]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=o.useState(r);ge(v,r)||m(r);const[h,g]=o.useState(null),[y,w]=o.useState(null),b=o.useCallback((e=>{e!=S.current&&(S.current=e,g(e))}),[g]),E=o.useCallback((e=>{e!==P.current&&(P.current=e,w(e))}),[w]),x=l||h,C=a||y,S=o.useRef(null),P=o.useRef(null),R=o.useRef(f),O=be(s),T=be(i),A=o.useCallback((()=>{if(!S.current||!P.current)return;const e={placement:t,strategy:n,middleware:v};T.current&&(e.platform=T.current),((e,t,n)=>{const r=new Map,o={platform:fe,...n},i={...o.platform,_c:r};return u(e,t,{...o,platform:i})})(S.current,P.current,e).then((e=>{const t={...e,isPositioned:!0};M.current&&!ge(R.current,t)&&(R.current=t,ve.flushSync((()=>{p(t)})))}))}),[v,t,n,T]);he((()=>{!1===d&&R.current.isPositioned&&(R.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const M=o.useRef(!1);he((()=>(M.current=!0,()=>{M.current=!1})),[]),he((()=>{if(x&&(S.current=x),C&&(P.current=C),x&&C){if(O.current)return O.current(x,C,A);A()}}),[x,C,A,O]);const k=o.useMemo((()=>({reference:S,floating:P,setReference:b,setFloating:E})),[b,E]),_=o.useMemo((()=>({reference:x,floating:C})),[x,C]),L=o.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=we(_.floating,f.x),r=we(_.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...ye(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,_.floating,f.x,f.y]);return o.useMemo((()=>({...f,update:A,refs:k,elements:_,floatingStyles:L})),[f,A,k,_,L])}var xe=n(5320);const Ce=(0,o.forwardRef)(((e,t)=>{const{children:n,width:i=10,height:l=5,...a}=e;return(0,o.createElement)(xe.WV.svg,(0,r.Z)({},a,{ref:t,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,o.createElement)("polygon",{points:"0,0 30,0 15,10"}))})),Se=Ce;var Pe=n(8771),Re=n(5360),Oe=n(9698),Te=n(9981);const Ae="Popper",[Me,ke]=(0,Re.b)(Ae),[_e,Le]=Me(Ae),De=e=>{const{__scopePopper:t,children:n}=e,[r,i]=(0,o.useState)(null);return(0,o.createElement)(_e,{scope:t,anchor:r,onAnchorChange:i},n)},We="PopperAnchor",Ne=(0,o.forwardRef)(((e,t)=>{const{__scopePopper:n,virtualRef:i,...l}=e,a=Le(We,n),c=(0,o.useRef)(null),s=(0,Pe.e)(t,c);return(0,o.useEffect)((()=>{a.onAnchorChange((null===i||void 0===i?void 0:i.current)||c.current)})),i?null:(0,o.createElement)(xe.WV.div,(0,r.Z)({},l,{ref:s}))})),Ie="PopperContent",[Fe,Ve]=Me(Ie),Be=(0,o.forwardRef)(((e,t)=>{var n,i,l,a,c,s,u,d;const{__scopePopper:f,side:p="bottom",sideOffset:v=0,align:m="center",alignOffset:h=0,arrowPadding:g=0,collisionBoundary:y=[],collisionPadding:w=0,sticky:b="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:C,...P}=e,R=Le(Ie,f),[A,L]=(0,o.useState)(null),D=(0,Pe.e)(t,(e=>L(e))),[W,N]=(0,o.useState)(null),I=function(e){const[t,n]=(0,o.useState)(void 0);return(0,Te.b)((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(W),F=null!==(n=null===I||void 0===I?void 0:I.width)&&void 0!==n?n:0,V=null!==(i=null===I||void 0===I?void 0:I.height)&&void 0!==i?i:0,B=p+("center"!==m?"-"+m:""),Z="number"===typeof w?w:{top:0,right:0,bottom:0,left:0,...w},H=Array.isArray(y)?y:[y],j=H.length>0,z={padding:Z,boundary:H.filter(ze),altBoundary:j},{refs:K,floatingStyles:U,placement:$,isPositioned:Y,middlewareData:X}=Ee({strategy:"fixed",placement:B,whileElementsMounted:pe,elements:{reference:R.anchor},middleware:[T({mainAxis:v+V,alignmentAxis:h}),x&&M({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?k():void 0,...z}),x&&S({...z}),_({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)}}),W&&me({element:W,padding:g}),Ke({arrowWidth:F,arrowHeight:V}),E&&O({strategy:"referenceHidden"})]}),[q,G]=Ue($),J=(0,Oe.W)(C);(0,Te.b)((()=>{Y&&(null===J||void 0===J||J())}),[Y,J]);const Q=null===(l=X.arrow)||void 0===l?void 0:l.x,ee=null===(a=X.arrow)||void 0===a?void 0:a.y,te=0!==(null===(c=X.arrow)||void 0===c?void 0:c.centerOffset),[ne,re]=(0,o.useState)();return(0,Te.b)((()=>{A&&re(window.getComputedStyle(A).zIndex)}),[A]),(0,o.createElement)("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:Y?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null===(s=X.transformOrigin)||void 0===s?void 0:s.x,null===(u=X.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},(0,o.createElement)(Fe,{scope:f,placedSide:q,onArrowChange:N,arrowX:Q,arrowY:ee,shouldHideArrow:te},(0,o.createElement)(xe.WV.div,(0,r.Z)({"data-side":q,"data-align":G},P,{ref:D,style:{...P.style,animation:Y?void 0:"none",opacity:null!==(d=X.hide)&&void 0!==d&&d.referenceHidden?0:void 0}}))))})),Ze="PopperArrow",He={top:"bottom",right:"left",bottom:"top",left:"right"},je=(0,o.forwardRef)((function(e,t){const{__scopePopper:n,...i}=e,l=Ve(Ze,n),a=He[l.placedSide];return(0,o.createElement)("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0}},(0,o.createElement)(Se,(0,r.Z)({},i,{ref:t,style:{...i.style,display:"block"}})))}));function ze(e){return null!==e}const Ke=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;const{placement:a,rects:c,middlewareData:s}=t,u=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,v]=Ue(a),m={start:"0%",center:"50%",end:"100%"}[v],h=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(l=s.arrow)||void 0===l?void 0:l.y)&&void 0!==i?i:0)+f/2;let y="",w="";return"bottom"===p?(y=u?m:`${h}px`,w=-f+"px"):"top"===p?(y=u?m:`${h}px`,w=`${c.floating.height+f}px`):"right"===p?(y=-f+"px",w=u?m:`${g}px`):"left"===p&&(y=`${c.floating.width+f}px`,w=u?m:`${g}px`),{data:{x:y,y:w}}}});function Ue(e){const[t,n="center"]=e.split("-");return[t,n]}const $e=De,Ye=Ne,Xe=Be,qe=je},2651:(e,t,n)=>{n.d(t,{h:()=>a});var r=n(7288),o=n(5152),i=n(3890),l=n(5320);const a=(0,o.forwardRef)(((e,t)=>{var n;const{container:a=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...c}=e;return a?i.createPortal((0,o.createElement)(l.WV.div,(0,r.Z)({},c,{ref:t})),a):null}))},5320:(e,t,n)=>{n.d(t,{WV:()=>a,jH:()=>c});var r=n(7288),o=n(5152),i=n(3890),l=n(8426);const a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=(0,o.forwardRef)(((e,n)=>{const{asChild:i,...a}=e,c=i?l.g7:t;return(0,o.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,o.createElement)(c,(0,r.Z)({},a,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function c(e,t){e&&(0,i.flushSync)((()=>e.dispatchEvent(t)))}},2859:(e,t,n)=>{n.d(t,{Eh:()=>Ze,VY:()=>ke,ZA:()=>Le,ck:()=>We,wU:()=>Ie,eT:()=>Ne,__:()=>De,h_:()=>Me,fC:()=>Oe,$G:()=>Ve,u_:()=>Fe,Z0:()=>Be,xz:()=>Te,B4:()=>Ae,l_:()=>_e});var r=n(7288),o=n(5152),i=n(3890);function l(e,[t,n]){return Math.min(n,Math.max(t,e))}var a=n(6206),c=n(5360),s=n(8771),u=n(8426);const d=(0,o.createContext)(void 0);var f=n(4369),p=n(7552),v=n(5420),m=n(1276),h=n(237),g=n(2651),y=n(5320),w=n(9698),b=n(7342),E=n(9981);const x=(0,o.forwardRef)(((e,t)=>(0,o.createElement)(y.WV.span,(0,r.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))));var C=n(7063),S=n(4554);const P=[" ","Enter","ArrowUp","ArrowDown"],R=[" ","Enter"],O="Select",[T,A,M]=function(e){const t=e+"CollectionProvider",[n,r]=(0,c.b)(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{const{scope:t,children:n}=e,r=o.useRef(null),l=o.useRef(new Map).current;return o.createElement(i,{scope:t,itemMap:l,collectionRef:r},n)},d=e+"CollectionSlot",f=o.forwardRef(((e,t)=>{const{scope:n,children:r}=e,i=l(d,n),a=(0,s.e)(t,i.collectionRef);return o.createElement(u.g7,{ref:a},r)})),p=e+"CollectionItemSlot",v="data-radix-collection-item",m=o.forwardRef(((e,t)=>{const{scope:n,children:r,...i}=e,a=o.useRef(null),c=(0,s.e)(t,a),d=l(p,n);return o.useEffect((()=>(d.itemMap.set(a,{ref:a,...i}),()=>{d.itemMap.delete(a)}))),o.createElement(u.g7,{[v]:"",ref:c},r)}));return[{Provider:a,Slot:f,ItemSlot:m},function(t){const n=l(e+"CollectionConsumer",t);return o.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(O),[k,_]=(0,c.b)(O,[M,h.D7]),L=(0,h.D7)(),[D,W]=k(O),[N,I]=k(O),F=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:l,value:a,defaultValue:c,onValueChange:s,dir:u,name:f,autoComplete:p,disabled:v,required:g}=e,y=L(t),[w,E]=(0,o.useState)(null),[x,C]=(0,o.useState)(null),[S,P]=(0,o.useState)(!1),R=function(e){const t=(0,o.useContext)(d);return e||t||"ltr"}(u),[O=!1,A]=(0,b.T)({prop:r,defaultProp:i,onChange:l}),[M,k]=(0,b.T)({prop:a,defaultProp:c,onChange:s}),_=(0,o.useRef)(null),W=!w||Boolean(w.closest("form")),[I,F]=(0,o.useState)(new Set),V=Array.from(I).map((e=>e.props.value)).join(";");return(0,o.createElement)(h.fC,y,(0,o.createElement)(D,{required:g,scope:t,trigger:w,onTriggerChange:E,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:(0,m.M)(),value:M,onValueChange:k,open:O,onOpenChange:A,dir:R,triggerPointerDownPosRef:_,disabled:v},(0,o.createElement)(T.Provider,{scope:t},(0,o.createElement)(N,{scope:e.__scopeSelect,onNativeOptionAdd:(0,o.useCallback)((e=>{F((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:(0,o.useCallback)((e=>{F((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),W?(0,o.createElement)(Se,{key:V,"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:M,onChange:e=>k(e.target.value),disabled:v},void 0===M?(0,o.createElement)("option",{value:""}):null,Array.from(I)):null))},V="SelectTrigger",B=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...l}=e,c=L(n),u=W(V,n),d=u.disabled||i,f=(0,s.e)(t,u.onTriggerChange),p=A(n),[v,m,g]=Pe((e=>{const t=p().filter((e=>!e.disabled)),n=t.find((e=>e.value===u.value)),r=Re(t,e,n);void 0!==r&&u.onValueChange(r.value)})),w=()=>{d||(u.onOpenChange(!0),g())};return(0,o.createElement)(h.ee,(0,r.Z)({asChild:!0},c),(0,o.createElement)(y.WV.button,(0,r.Z)({type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":void 0===u.value?"":void 0},l,{ref:f,onClick:(0,a.M)(l.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:(0,a.M)(l.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(w(),u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:(0,a.M)(l.onKeyDown,(e=>{const t=""!==v.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),t&&" "===e.key||P.includes(e.key)&&(w(),e.preventDefault())}))})))})),Z="SelectValue",H=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,className:i,style:l,children:a,placeholder:c,...u}=e,d=W(Z,n),{onValueNodeHasChildrenChange:f}=d,p=void 0!==a,v=(0,s.e)(t,d.onValueNodeChange);return(0,E.b)((()=>{f(p)}),[f,p]),(0,o.createElement)(y.WV.span,(0,r.Z)({},u,{ref:v,style:{pointerEvents:"none"}}),void 0===d.value&&void 0!==c?c:a)})),j=e=>(0,o.createElement)(g.h,(0,r.Z)({asChild:!0},e)),z="SelectContent",K=(0,o.forwardRef)(((e,t)=>{const n=W(z,e.__scopeSelect),[l,a]=(0,o.useState)();if((0,E.b)((()=>{a(new DocumentFragment)}),[]),!n.open){const t=l;return t?(0,i.createPortal)((0,o.createElement)($,{scope:e.__scopeSelect},(0,o.createElement)(T.Slot,{scope:e.__scopeSelect},(0,o.createElement)("div",null,e.children))),t):null}return(0,o.createElement)(X,(0,r.Z)({},e,{ref:t}))})),U=10,[$,Y]=k(z),X=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,side:m,sideOffset:h,align:g,alignOffset:y,arrowPadding:w,collisionBoundary:b,collisionPadding:E,sticky:x,hideWhenDetached:P,avoidCollisions:R,...O}=e,T=W(z,n),[M,k]=(0,o.useState)(null),[_,L]=(0,o.useState)(null),D=(0,s.e)(t,(e=>k(e))),[N,I]=(0,o.useState)(null),[F,V]=(0,o.useState)(null),B=A(n),[Z,H]=(0,o.useState)(!1),j=(0,o.useRef)(!1);(0,o.useEffect)((()=>{if(M)return(0,C.Ry)(M)}),[M]),(0,p.EW)();const K=(0,o.useCallback)((e=>{const[t,...n]=B().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(null===n||void 0===n||n.scrollIntoView({block:"nearest"}),n===t&&_&&(_.scrollTop=0),n===r&&_&&(_.scrollTop=_.scrollHeight),null===n||void 0===n||n.focus(),document.activeElement!==o)return}}),[B,_]),U=(0,o.useCallback)((()=>K([N,M])),[K,N,M]);(0,o.useEffect)((()=>{Z&&U()}),[Z,U]);const{onOpenChange:Y,triggerPointerDownPosRef:X}=T;(0,o.useEffect)((()=>{if(M){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=X.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=X.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():M.contains(n.target)||Y(!1),document.removeEventListener("pointermove",t),X.current=null};return null!==X.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[M,Y,X]),(0,o.useEffect)((()=>{const e=()=>Y(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[Y]);const[J,Q]=Pe((e=>{const t=B().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Re(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),ee=(0,o.useCallback)(((e,t,n)=>{const r=!j.current&&!n;(void 0!==T.value&&T.value===t||r)&&(I(e),r&&(j.current=!0))}),[T.value]),te=(0,o.useCallback)((()=>null===M||void 0===M?void 0:M.focus()),[M]),ne=(0,o.useCallback)(((e,t,n)=>{const r=!j.current&&!n;(void 0!==T.value&&T.value===t||r)&&V(e)}),[T.value]),re="popper"===i?G:q,oe=re===G?{side:m,sideOffset:h,align:g,alignOffset:y,arrowPadding:w,collisionBoundary:b,collisionPadding:E,sticky:x,hideWhenDetached:P,avoidCollisions:R}:{};return(0,o.createElement)($,{scope:n,content:M,viewport:_,onViewportChange:L,itemRefCallback:ee,selectedItem:N,onItemLeave:te,itemTextRefCallback:ne,focusSelectedItem:U,selectedItemText:F,position:i,isPositioned:Z,searchRef:J},(0,o.createElement)(S.Z,{as:u.g7,allowPinchZoom:!0},(0,o.createElement)(v.M,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.M)(l,(e=>{var t;null===(t=T.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},(0,o.createElement)(f.XB,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1)},(0,o.createElement)(re,(0,r.Z)({role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:e=>e.preventDefault()},O,oe,{onPlaced:()=>H(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:(0,a.M)(O.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=B().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>K(t))),e.preventDefault()}}))}))))))})),q=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,onPlaced:i,...a}=e,c=W(z,n),u=Y(z,n),[d,f]=(0,o.useState)(null),[p,v]=(0,o.useState)(null),m=(0,s.e)(t,(e=>v(e))),h=A(n),g=(0,o.useRef)(!1),w=(0,o.useRef)(!0),{viewport:b,selectedItem:x,selectedItemText:C,focusSelectedItem:S}=u,P=(0,o.useCallback)((()=>{if(c.trigger&&c.valueNode&&d&&p&&b&&x&&C){const e=c.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=c.valueNode.getBoundingClientRect(),r=C.getBoundingClientRect();if("rtl"!==c.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,c=e.width+a,s=Math.max(c,t.width),u=window.innerWidth-U,f=l(i,[U,u-s]);d.style.minWidth=c+"px",d.style.left=f+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,c=e.width+a,s=Math.max(c,t.width),u=window.innerWidth-U,f=l(i,[U,u-s]);d.style.minWidth=c+"px",d.style.right=f+"px"}const o=h(),a=window.innerHeight-2*U,s=b.scrollHeight,u=window.getComputedStyle(p),f=parseInt(u.borderTopWidth,10),v=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),y=f+v+s+parseInt(u.paddingBottom,10)+m,w=Math.min(5*x.offsetHeight,y),E=window.getComputedStyle(b),S=parseInt(E.paddingTop,10),P=parseInt(E.paddingBottom,10),R=e.top+e.height/2-U,O=a-R,T=x.offsetHeight/2,A=f+v+(x.offsetTop+T),M=y-A;if(A<=R){const e=x===o[o.length-1].ref.current;d.style.bottom="0px";const t=p.clientHeight-b.offsetTop-b.offsetHeight,n=A+Math.max(O,T+(e?P:0)+t+m);d.style.height=n+"px"}else{const e=x===o[0].ref.current;d.style.top="0px";const t=Math.max(R,f+b.offsetTop+(e?S:0)+T)+M;d.style.height=t+"px",b.scrollTop=A-R+b.offsetTop}d.style.margin=`${U}px 0`,d.style.minHeight=w+"px",d.style.maxHeight=a+"px",null===i||void 0===i||i(),requestAnimationFrame((()=>g.current=!0))}}),[h,c.trigger,c.valueNode,d,p,b,x,C,c.dir,i]);(0,E.b)((()=>P()),[P]);const[R,O]=(0,o.useState)();(0,E.b)((()=>{p&&O(window.getComputedStyle(p).zIndex)}),[p]);const T=(0,o.useCallback)((e=>{e&&!0===w.current&&(P(),null===S||void 0===S||S(),w.current=!1)}),[P,S]);return(0,o.createElement)(J,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:g,onScrollButtonChange:T},(0,o.createElement)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R}},(0,o.createElement)(y.WV.div,(0,r.Z)({},a,{ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}}))))})),G=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:l=U,...a}=e,c=L(n);return(0,o.createElement)(h.VY,(0,r.Z)({},c,a,{ref:t,align:i,collisionPadding:l,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[J,Q]=k(z,{}),ee="SelectViewport",te=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,...i}=e,l=Y(ee,n),c=Q(ee,n),u=(0,s.e)(t,l.onViewportChange),d=(0,o.useRef)(0);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),(0,o.createElement)(T.Slot,{scope:n},(0,o.createElement)(y.WV.div,(0,r.Z)({"data-radix-select-viewport":"",role:"presentation"},i,{ref:u,style:{position:"relative",flex:1,overflow:"auto",...i.style},onScroll:(0,a.M)(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(null!==r&&void 0!==r&&r.current&&n){const e=Math.abs(d.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*U,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),l=Math.max(o,i);if(l0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop}))}))))})),ne="SelectGroup",[re,oe]=k(ne),ie=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,...i}=e,l=(0,m.M)();return(0,o.createElement)(re,{scope:n,id:l},(0,o.createElement)(y.WV.div,(0,r.Z)({role:"group","aria-labelledby":l},i,{ref:t})))})),le="SelectLabel",ae=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,...i}=e,l=oe(le,n);return(0,o.createElement)(y.WV.div,(0,r.Z)({id:l.id},i,{ref:t}))})),ce="SelectItem",[se,ue]=k(ce),de=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,value:i,disabled:l=!1,textValue:c,...u}=e,d=W(ce,n),f=Y(ce,n),p=d.value===i,[v,h]=(0,o.useState)(null!==c&&void 0!==c?c:""),[g,w]=(0,o.useState)(!1),b=(0,s.e)(t,(e=>{var t;return null===(t=f.itemRefCallback)||void 0===t?void 0:t.call(f,e,i,l)})),E=(0,m.M)(),x=()=>{l||(d.onValueChange(i),d.onOpenChange(!1))};return(0,o.createElement)(se,{scope:n,value:i,disabled:l,textId:E,isSelected:p,onItemTextChange:(0,o.useCallback)((e=>{h((t=>{var n;return t||(null!==(n=null===e||void 0===e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},(0,o.createElement)(T.ItemSlot,{scope:n,value:i,disabled:l,textValue:v},(0,o.createElement)(y.WV.div,(0,r.Z)({role:"option","aria-labelledby":E,"data-highlighted":g?"":void 0,"aria-selected":p&&g,"data-state":p?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1},u,{ref:b,onFocus:(0,a.M)(u.onFocus,(()=>w(!0))),onBlur:(0,a.M)(u.onBlur,(()=>w(!1))),onPointerUp:(0,a.M)(u.onPointerUp,x),onPointerMove:(0,a.M)(u.onPointerMove,(e=>{var t;l?null===(t=f.onItemLeave)||void 0===t||t.call(f):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:(0,a.M)(u.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=f.onItemLeave)||void 0===t||t.call(f))})),onKeyDown:(0,a.M)(u.onKeyDown,(e=>{var t;""!==(null===(t=f.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(R.includes(e.key)&&x()," "===e.key&&e.preventDefault())}))}))))})),fe="SelectItemText",pe=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,className:l,style:a,...c}=e,u=W(fe,n),d=Y(fe,n),f=ue(fe,n),p=I(fe,n),[v,m]=(0,o.useState)(null),h=(0,s.e)(t,(e=>m(e)),f.onItemTextChange,(e=>{var t;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,f.value,f.disabled)})),g=null===v||void 0===v?void 0:v.textContent,w=(0,o.useMemo)((()=>(0,o.createElement)("option",{key:f.value,value:f.value,disabled:f.disabled},g)),[f.disabled,f.value,g]),{onNativeOptionAdd:b,onNativeOptionRemove:x}=p;return(0,E.b)((()=>(b(w),()=>x(w))),[b,x,w]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(y.WV.span,(0,r.Z)({id:f.textId},c,{ref:h})),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?(0,i.createPortal)(c.children,u.valueNode):null)})),ve="SelectItemIndicator",me=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,...i}=e;return ue(ve,n).isSelected?(0,o.createElement)(y.WV.span,(0,r.Z)({"aria-hidden":!0},i,{ref:t})):null})),he="SelectScrollUpButton",ge=(0,o.forwardRef)(((e,t)=>{const n=Y(he,e.__scopeSelect),i=Q(he,e.__scopeSelect),[l,a]=(0,o.useState)(!1),c=(0,s.e)(t,i.onScrollButtonChange);return(0,E.b)((()=>{if(n.viewport&&n.isPositioned){const e=n.viewport;function t(){const t=e.scrollTop>0;a(t)}return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[n.viewport,n.isPositioned]),l?(0,o.createElement)(be,(0,r.Z)({},e,{ref:c,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),ye="SelectScrollDownButton",we=(0,o.forwardRef)(((e,t)=>{const n=Y(ye,e.__scopeSelect),i=Q(ye,e.__scopeSelect),[l,a]=(0,o.useState)(!1),c=(0,s.e)(t,i.onScrollButtonChange);return(0,E.b)((()=>{if(n.viewport&&n.isPositioned){const e=n.viewport;function t(){const t=e.scrollHeight-e.clientHeight,n=Math.ceil(e.scrollTop)e.removeEventListener("scroll",t)}}),[n.viewport,n.isPositioned]),l?(0,o.createElement)(be,(0,r.Z)({},e,{ref:c,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),be=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...l}=e,c=Y("SelectScrollButton",n),s=(0,o.useRef)(null),u=A(n),d=(0,o.useCallback)((()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)}),[]);return(0,o.useEffect)((()=>()=>d()),[d]),(0,E.b)((()=>{var e;const t=u().find((e=>e.ref.current===document.activeElement));null===t||void 0===t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[u]),(0,o.createElement)(y.WV.div,(0,r.Z)({"aria-hidden":!0},l,{ref:t,style:{flexShrink:0,...l.style},onPointerDown:(0,a.M)(l.onPointerDown,(()=>{null===s.current&&(s.current=window.setInterval(i,50))})),onPointerMove:(0,a.M)(l.onPointerMove,(()=>{var e;null===(e=c.onItemLeave)||void 0===e||e.call(c),null===s.current&&(s.current=window.setInterval(i,50))})),onPointerLeave:(0,a.M)(l.onPointerLeave,(()=>{d()}))}))})),Ee=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,...i}=e;return(0,o.createElement)(y.WV.div,(0,r.Z)({"aria-hidden":!0},i,{ref:t}))})),xe="SelectArrow",Ce=(0,o.forwardRef)(((e,t)=>{const{__scopeSelect:n,...i}=e,l=L(n),a=W(xe,n),c=Y(xe,n);return a.open&&"popper"===c.position?(0,o.createElement)(h.Eh,(0,r.Z)({},l,i,{ref:t})):null})),Se=(0,o.forwardRef)(((e,t)=>{const{value:n,...i}=e,l=(0,o.useRef)(null),a=(0,s.e)(t,l),c=function(e){const t=(0,o.useRef)({value:e,previous:e});return(0,o.useMemo)((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n);return(0,o.useEffect)((()=>{const e=l.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(c!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[c,n]),(0,o.createElement)(x,{asChild:!0},(0,o.createElement)("select",(0,r.Z)({},i,{ref:a,defaultValue:n})))}));function Pe(e){const t=(0,w.W)(e),n=(0,o.useRef)(""),r=(0,o.useRef)(0),i=(0,o.useCallback)((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),l=(0,o.useCallback)((()=>{n.current="",window.clearTimeout(r.current)}),[]);return(0,o.useEffect)((()=>()=>window.clearTimeout(r.current)),[]),[n,i,l]}function Re(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(l=e,a=Math.max(o,0),l.map(((e,t)=>l[(a+t)%l.length])));var l,a;1===r.length&&(i=i.filter((e=>e!==n)));const c=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return c!==n?c:void 0}Se.displayName="BubbleSelect";const Oe=F,Te=B,Ae=H,Me=j,ke=K,_e=te,Le=ie,De=ae,We=de,Ne=pe,Ie=me,Fe=ge,Ve=we,Be=Ee,Ze=Ce},8426:(e,t,n)=>{n.d(t,{g7:()=>l});var r=n(7288),o=n(5152),i=n(8771);const l=(0,o.forwardRef)(((e,t)=>{const{children:n,...i}=e,l=o.Children.toArray(n),c=l.find(s);if(c){const e=c.props.children,n=l.map((t=>t===c?o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null:t));return(0,o.createElement)(a,(0,r.Z)({},i,{ref:t}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,n):null)}return(0,o.createElement)(a,(0,r.Z)({},i,{ref:t}),n)}));l.displayName="Slot";const a=(0,o.forwardRef)(((e,t)=>{const{children:n,...r}=e;return(0,o.isValidElement)(n)?(0,o.cloneElement)(n,{...u(r,n.props),ref:t?(0,i.F)(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null}));a.displayName="SlotClone";const c=({children:e})=>(0,o.createElement)(o.Fragment,null,e);function s(e){return(0,o.isValidElement)(e)&&e.type===c}function u(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}},9698:(e,t,n)=>{n.d(t,{W:()=>o});var r=n(5152);function o(e){const t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e})),(0,r.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}},7342:(e,t,n)=>{n.d(t,{T:()=>i});var r=n(5152),o=n(9698);function i({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[i,l]=function({defaultProp:e,onChange:t}){const n=(0,r.useState)(e),[i]=n,l=(0,r.useRef)(i),a=(0,o.W)(t);return(0,r.useEffect)((()=>{l.current!==i&&(a(i),l.current=i)}),[i,l,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,c=a?e:i,s=(0,o.W)(n);return[c,(0,r.useCallback)((t=>{if(a){const n=t,r="function"===typeof t?n(e):t;r!==e&&s(r)}else l(t)}),[a,e,l,s])]}},9981:(e,t,n)=>{n.d(t,{b:()=>o});var r=n(5152);const o=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{}},7288:(e,t,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},7463:(e,t,n)=>{n.d(t,{pi:()=>r,_T:()=>o});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n