@indxsearch/systm 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -0
- package/dist/components/Base/Base.d.ts +6 -0
- package/dist/components/Button/Button.d.ts +13 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/FilterPanelBase/FilterPanelBase.d.ts +10 -0
- package/dist/components/InputField/InputField.d.ts +9 -0
- package/dist/components/Popover/Popover.d.ts +12 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +12 -0
- package/dist/components/SearchField/SearchField.d.ts +19 -0
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Slider/Slider.d.ts +26 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +10 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.es.js +5124 -0
- package/dist/index.umd.js +62 -0
- package/dist/systm.css +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
(function(te,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Z):(te=typeof globalThis<"u"?globalThis:te||self,Z(te.IndxSystem={},te.React,te.ReactDOM))})(this,function(te,Z,xn){"use strict";function Sn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Sn(Z),it=Sn(xn);var st={exports:{}},Ue={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var En;function Eo(){if(En)return Ue;En=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var a in o)a!=="key"&&(s[a]=o[a])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return Ue.Fragment=t,Ue.jsx=n,Ue.jsxs=n,Ue}var Ye={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Cn;function Co(){return Cn||(Cn=1,process.env.NODE_ENV!=="production"&&function(){function e(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===$?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case c:return"Fragment";case w:return"Profiler";case m:return"StrictMode";case E:return"Suspense";case O:return"SuspenseList";case D:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case l:return"Portal";case b:return(S.displayName||"Context")+".Provider";case y:return(S._context.displayName||"Context")+".Consumer";case _:var M=S.render;return S=S.displayName,S||(S=M.displayName||M.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case P:return M=S.displayName||null,M!==null?M:e(S.type)||"Memo";case L:M=S._payload,S=S._init;try{return e(S(M))}catch{}}return null}function t(S){return""+S}function n(S){try{t(S);var M=!1}catch{M=!0}if(M){M=console;var V=M.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return V.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(S)}}function r(S){if(S===c)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===L)return"<...>";try{var M=e(S);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function o(){var S=W.A;return S===null?null:S.getOwner()}function s(){return Error("react-stack-top-frame")}function i(S){if(C.call(S,"key")){var M=Object.getOwnPropertyDescriptor(S,"key").get;if(M&&M.isReactWarning)return!1}return S.key!==void 0}function a(S,M){function V(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}V.isReactWarning=!0,Object.defineProperty(S,"key",{get:V,configurable:!0})}function d(){var S=e(this.type);return N[S]||(N[S]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),S=this.props.ref,S!==void 0?S:null}function f(S,M,V,H,K,z,Q,F){return V=z.ref,S={$$typeof:p,type:S,key:M,props:z,_owner:K},(V!==void 0?V:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:d}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function g(S,M,V,H,K,z,Q,F){var B=M.children;if(B!==void 0)if(H)if(R(B)){for(H=0;H<B.length;H++)h(B[H]);Object.freeze&&Object.freeze(B)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(B);if(C.call(M,"key")){B=e(S);var X=Object.keys(M).filter(function(Y){return Y!=="key"});H=0<X.length?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}",j[B+H]||(X=0<X.length?"{"+X.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,H,B,X,B),j[B+H]=!0)}if(B=null,V!==void 0&&(n(V),B=""+V),i(M)&&(n(M.key),B=""+M.key),"key"in M){V={};for(var U in M)U!=="key"&&(V[U]=M[U])}else V=M;return B&&a(V,typeof S=="function"?S.displayName||S.name||"Unknown":S),f(S,B,z,K,o(),V,Q,F)}function h(S){typeof S=="object"&&S!==null&&S.$$typeof===p&&S._store&&(S._store.validated=1)}var v=Z,p=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),b=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),W=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,R=Array.isArray,T=console.createTask?console.createTask:function(){return null};v={"react-stack-bottom-frame":function(S){return S()}};var I,N={},k=v["react-stack-bottom-frame"].bind(v,s)(),A=T(r(s)),j={};Ye.Fragment=c,Ye.jsx=function(S,M,V,H,K){var z=1e4>W.recentlyCreatedOwnerStacks++;return g(S,M,V,!1,H,K,z?Error("react-stack-top-frame"):k,z?T(r(S)):A)},Ye.jsxs=function(S,M,V,H,K){var z=1e4>W.recentlyCreatedOwnerStacks++;return g(S,M,V,!0,H,K,z?Error("react-stack-top-frame"):k,z?T(r(S)):A)}}()),Ye}var _n;function _o(){return _n||(_n=1,process.env.NODE_ENV==="production"?st.exports=Eo():st.exports=Co()),st.exports}var x=_o();const jt={button:"_button_1sns4_1",micro:"_micro_1sns4_22",default:"_default_1sns4_30",large:"_large_1sns4_38",primary:"_primary_1sns4_47",secondary:"_secondary_1sns4_57",ghost:"_ghost_1sns4_67"};function Ro(e){const{size:t="default",variant:n="primary",iconLeft:r,iconRight:o,className:s,children:i,...a}=e,d=t==="micro"?"14px":t==="large"?"21px":"14px",f=[jt.button,jt[t],jt[n],s].filter(Boolean).join(" ");return x.jsxs("button",{className:f,...a,children:[r&&Z.cloneElement(r,{size:d,color:"currentColor"}),i,o&&Z.cloneElement(o,{size:d,color:"currentColor"})]})}const qe={checkboxWrapper:"_checkboxWrapper_1wbyq_1",checkbox:"_checkbox_1wbyq_1",label:"_label_1wbyq_44",score:"_score_1wbyq_48",disabled:"_disabled_1wbyq_55"},Po=({label:e,score:t,className:n="",...r})=>{const o=Z.useId(),s=r.disabled;return x.jsxs("label",{htmlFor:o,className:`${qe.checkboxWrapper} ${n} ${s?qe.disabled:""}`,children:[x.jsx("input",{id:o,type:"checkbox",className:qe.checkbox,...r}),e&&x.jsx("span",{className:qe.label,children:e}),t&&x.jsx("span",{className:qe.score,children:t})]})},Rn={container:"_container_dlzj1_1",default:"_default_dlzj1_5"};function To({children:e,className:t}){return x.jsx("div",{className:`${Rn.container} ${Rn.default} ${t||""}`,children:e})}const Ne={container:"_container_10bfq_1",header:"_header_10bfq_11",title:"_title_10bfq_31",body:"_body_10bfq_49"},Oo=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 1H2V2H1V1ZM3 3H2V2H3V3ZM4 3V4H3V3H4ZM5 2H4V3H5V2ZM5 2V1H6V2H5Z",fill:e})})},Ao=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M6 2V3L1 3L1 2L6 2Z",fill:e})})},ko=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M4 5H3V3L1 3L1 2L3 2L3 0L4 0V2L6 2V3H4V5Z",fill:e})})},Mo=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0H2V1H1V3H2V4H4V3H5V1H4V0ZM4 1V3H2V1H4ZM6 4H5V5H6V4Z",fill:e})})};function No({title:e,children:t,className:n="",collapsible:r=!0,collapsed:o=!1}){const[s,i]=Z.useState(()=>!o);Z.useEffect(()=>{r&&i(!o)},[o,r]);const a=()=>{r&&i(d=>!d)};return x.jsxs("div",{className:`${Ne.container} ${n}`,children:[e&&(r?x.jsxs("button",{type:"button",className:Ne.header,onClick:a,"aria-label":s?"Collapse panel":"Expand panel","aria-expanded":s,children:[x.jsx("div",{className:Ne.title,role:"heading","aria-level":3,children:e}),s?x.jsx(Ao,{color:"var(--lv5)",size:14}):x.jsx(ko,{color:"var(--lv5)",size:14})]}):x.jsx("div",{className:Ne.header,children:x.jsx("div",{className:Ne.title,role:"heading","aria-level":3,children:e})})),(!r||s)&&x.jsx("div",{className:Ne.body,children:t})]})}const ue={wrapper:"_wrapper_tf1yl_1",label:"_label_tf1yl_7",inputContainer:"_inputContainer_tf1yl_12",input:"_input_tf1yl_12",focus:"_focus_tf1yl_35",searchIcon:"_searchIcon_tf1yl_52",rightContent:"_rightContent_tf1yl_67",sizeMicro:"_sizeMicro_tf1yl_78",sizeDefault:"_sizeDefault_tf1yl_87",error:"_error_tf1yl_110",errorText:"_errorText_tf1yl_114"},Io={micro:14,default:21};function Do({label:e,error:t,className:n="",showSearchIcon:r=!0,searchIcon:o,searchIconColor:s,inputSize:i="default",showFocusBorder:a=!1,children:d,...f}){const g=Z.useRef(null),h=Io[i],v={};s&&(v["--search-icon-color"]=s);const p="var(--search-icon-color)",l=o??x.jsx(Mo,{}),c=i==="micro"?ue.sizeMicro:ue.sizeDefault;return x.jsxs("div",{className:`${ue.wrapper} ${n}`,children:[e&&x.jsx("label",{className:ue.label,children:e}),x.jsxs("div",{className:`${ue.inputContainer} ${c}`,children:[r&&x.jsx("span",{className:ue.searchIcon,children:Z.cloneElement(l,{size:h,color:s??p})}),x.jsx("input",{ref:g,className:`${ue.input} ${a?ue.focus:""} ${t?ue.error:""}`,style:v,...f}),d&&x.jsx("div",{className:ue.rightContent,children:d})]}),t&&x.jsx("span",{className:ue.errorText,children:t})]})}const Ie={wrapper:"_wrapper_su5p5_1",label:"_label_su5p5_7",input:"_input_su5p5_12",error:"_error_su5p5_61",errorText:"_errorText_su5p5_69",borderBottom:"_borderBottom_su5p5_75"};function jo({label:e,error:t,className:n="",isValid:r=!0,variant:o="default",...s}){const i=t||!r;return x.jsxs("div",{className:`${Ie.wrapper} ${n}`,children:[e&&x.jsx("label",{className:Ie.label,children:e}),x.jsx("input",{className:`${Ie.input} ${o==="borderBottom"?Ie.borderBottom:""} ${i?Ie.error:""}`,...s}),t&&x.jsx("span",{className:Ie.errorText,children:t})]})}const Ke={radioWrapper:"_radioWrapper_1faq0_1",radioInput:"_radioInput_1faq0_9",customRadio:"_customRadio_1faq0_23",labelText:"_labelText_1faq0_57",disabled:"_disabled_1faq0_63"},Lo=({id:e,name:t,value:n,label:r,checked:o=!1,onChange:s,disabled:i=!1})=>x.jsxs("label",{className:`${Ke.radioWrapper} ${i?Ke.disabled:""}`,children:[x.jsx("input",{id:e,type:"radio",name:t,value:n,checked:o,onChange:s,disabled:i,className:Ke.radioInput}),x.jsx("span",{className:Ke.customRadio}),x.jsx("span",{className:Ke.labelText,children:r})]}),at={switch:"_switch_1xsea_1",slider:"_slider_1xsea_23",label:"_label_1xsea_28",disabled:"_disabled_1xsea_43"},Fo=({id:e,checked:t,onChange:n,disabled:r=!1,label:o})=>{const s=Z.useId(),i=e||s;return x.jsxs("label",{htmlFor:i,className:`${at.switch} ${r?at.disabled:""}`,children:[x.jsx("input",{id:i,type:"checkbox",checked:t,onChange:a=>n(a.target.checked),disabled:r}),x.jsx("span",{className:at.slider}),o&&x.jsx("span",{className:at.label,children:o})]})},oe={basetrack:"_basetrack_1ezlq_1",selectedtrack:"_selectedtrack_1ezlq_29",livetrack:"_livetrack_1ezlq_36",livetrackFaceted:"_livetrackFaceted_1ezlq_42",livetrackDefault:"_livetrackDefault_1ezlq_45",thumbs:"_thumbs_1ezlq_48",disabled:"_disabled_1ezlq_82"};var Xe={},ie={},Ze={},Ge={},Pn;function Lt(){if(Pn)return Ge;Pn=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.Direction=void 0;var e;return function(t){t.Right="to right",t.Left="to left",t.Down="to bottom",t.Up="to top"}(e||(Ge.Direction=e={})),Ge}var Tn;function On(){return Tn||(Tn=1,function(e){var t=Ze&&Ze.__spreadArray||function(C,R,T){if(T||arguments.length===2)for(var I=0,N=R.length,k;I<N;I++)(k||!(I in R))&&(k||(k=Array.prototype.slice.call(R,0,I)),k[I]=R[I]);return C.concat(k||Array.prototype.slice.call(R))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Z,r=Lt(),o=function(C){var R=C.toString().split(".")[1];return R?R.length:0};e.getStepDecimals=o;function s(C){return C.touches&&C.touches.length||C.changedTouches&&C.changedTouches.length}e.isTouchEvent=s;function i(C,R,T){var I=(R-C)/T,N=8,k=Number(I.toFixed(N));return parseInt(k.toString(),10)===k}e.isStepDivisible=i;function a(C,R,T,I,N,k,A){var j=1e11;if(C=Math.round(C*j)/j,!k){var S=A[R-1],M=A[R+1];if(S&&S>C)return S;if(M&&M<C)return M}if(C>I)return I;if(C<T)return T;var V=Math.floor(C*j-T*j)%Math.floor(N*j),H=Math.floor(C*j-Math.abs(V)),K=V===0?C:H/j,z=Math.abs(V/j)<N/2?K:K+N,Q=(0,e.getStepDecimals)(N);return parseFloat(z.toFixed(Q))}e.normalizeValue=a;function d(C,R,T){return(C-R)/(T-R)}e.relativeValue=d;function f(C){return C===r.Direction.Up||C===r.Direction.Down}e.isVertical=f;function g(C,R,T){if(R>=T)throw new RangeError("min (".concat(R,") is equal/bigger than max (").concat(T,")"));if(C<R)throw new RangeError("value (".concat(C,") is smaller than min (").concat(R,")"));if(C>T)throw new RangeError("value (".concat(C,") is bigger than max (").concat(T,")"))}e.checkBoundaries=g;function h(C,R,T){return C<R?R:C>T?T:C}e.checkValuesAgainstBoundaries=h;function v(C){if(!(C.length<2)&&!C.slice(1).every(function(R,T){return C[T]<=R}))throw new RangeError("values={[".concat(C,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=v;function p(C){var R=window.getComputedStyle(C);return{top:parseInt(R["margin-top"],10),bottom:parseInt(R["margin-bottom"],10),left:parseInt(R["margin-left"],10),right:parseInt(R["margin-right"],10)}}e.getMargin=p;function l(C){var R=window.getComputedStyle(C);return{top:parseInt(R["padding-top"],10)+parseInt(R["border-top-width"],10),bottom:parseInt(R["padding-bottom"],10)+parseInt(R["border-bottom-width"],10),left:parseInt(R["padding-left"],10)+parseInt(R["border-left-width"],10),right:parseInt(R["padding-right"],10)+parseInt(R["border-right-width"],10)}}e.getPaddingAndBorder=l;function c(C,R,T){var I=T?-1:1;C.forEach(function(N,k){return w(N,I*R[k].x,R[k].y)})}e.translateThumbs=c;function m(C,R,T,I){for(var N=0,k=$(C[0],R,T,I),A=1;A<C.length;A++){var j=$(C[A],R,T,I);j<k&&(k=j,N=A)}return N}e.getClosestThumbIndex=m;function w(C,R,T){C.style.transform="translate(".concat(R,"px, ").concat(T,"px)")}e.translate=w;var y=function(C){var R=[],T=null,I=function(){for(var N=[],k=0;k<arguments.length;k++)N[k]=arguments[k];R=N,!T&&(T=requestAnimationFrame(function(){T=null,C.apply(void 0,R)}))};return I};e.schd=y;function b(C,R,T){var I=C.slice(0);return I[R]=T,I}e.replaceAt=b;function _(C){var R=C.values,T=C.colors,I=C.min,N=C.max,k=C.direction,A=k===void 0?r.Direction.Right:k,j=C.rtl,S=j===void 0?!1:j;S&&A===r.Direction.Right?A=r.Direction.Left:S&&r.Direction.Left&&(A=r.Direction.Right);var M=R.slice(0).sort(function(H,K){return H-K}).map(function(H){return(H-I)/(N-I)*100}),V=M.reduce(function(H,K,z){return"".concat(H,", ").concat(T[z]," ").concat(K,"%, ").concat(T[z+1]," ").concat(K,"%")},"");return"linear-gradient(".concat(A,", ").concat(T[0]," 0%").concat(V,", ").concat(T[T.length-1]," 100%)")}e.getTrackBackground=_;function E(){}e.voidFn=E;function O(C){throw new Error("Didn't expect to get here")}e.assertUnreachable=O;var P=function(C,R,T,I,N){N===void 0&&(N=function(A){return A});var k=Math.ceil(t([C],Array.from(C.children),!0).reduce(function(A,j){var S=Math.ceil(j.getBoundingClientRect().width);if(j.innerText&&j.innerText.includes(T)&&j.childElementCount===0){var M=j.cloneNode(!0);M.innerHTML=N(R.toFixed(I)),M.style.visibility="hidden",document.body.appendChild(M),S=Math.ceil(M.getBoundingClientRect().width),document.body.removeChild(M)}return S>A?S:A},C.getBoundingClientRect().width));return k},L=function(C,R,T,I,N,k,A){A===void 0&&(A=function(M){return M});var j=[],S=function(M){var V=P(T[M],I[M],N,k,A),H=R[M].x;R.forEach(function(K,z){var Q=K.x,F=P(T[z],I[z],N,k,A);M!==z&&(H>=Q&&H<=Q+F||H+V>=Q&&H+V<=Q+F)&&(j.includes(z)||(j.push(M),j.push(z),j=t(t([],j,!0),[M,z],!1),S(z)))})};return S(C),Array.from(new Set(j.sort()))},D=function(C,R,T,I,N,k){I===void 0&&(I=.1),N===void 0&&(N=" - "),k===void 0&&(k=function(z){return z});var A=(0,e.getStepDecimals)(I),j=(0,n.useState)({}),S=j[0],M=j[1],V=(0,n.useState)(k(R[T].toFixed(A))),H=V[0],K=V[1];return(0,n.useEffect)(function(){if(C){var z=C.getThumbs();if(z.length<1)return;var Q={},F=C.getOffsets(),B=L(T,F,z,R,N,A,k),X=k(R[T].toFixed(A));if(B.length){var U=B.reduce(function(le,Pe,Te,It){return le.length?t(t([],le,!0),[F[It[Te]].x],!1):[F[It[Te]].x]},[]);if(Math.min.apply(Math,U)===F[T].x){var Y=[];B.forEach(function(le){Y.push(R[le].toFixed(A))}),X=Array.from(new Set(Y.sort(function(le,Pe){return parseFloat(le)-parseFloat(Pe)}))).map(k).join(N);var q=Math.min.apply(Math,U),re=Math.max.apply(Math,U),ce=z[B[U.indexOf(re)]].getBoundingClientRect().width;Q.left="".concat(Math.abs(q-(re+ce))/2,"px"),Q.transform="translate(-50%, 0)"}else Q.visibility="hidden"}K(X),M(Q)}},[C,R]),[H,S]};e.useThumbOverlap=D;function $(C,R,T,I){var N=C.getBoundingClientRect(),k=N.left,A=N.top,j=N.width,S=N.height;return f(I)?Math.abs(T-(A+S/2)):Math.abs(R-(k+j/2))}var W=function(){var C,R=((C=navigator.userAgentData)===null||C===void 0?void 0:C.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(R)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=W}(Ze)),Ze}var An;function $o(){if(An)return ie;An=1;var e=ie&&ie.__extends||function(){var h=function(v,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(l[m]=c[m])},h(v,p)};return function(v,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");h(v,p);function l(){this.constructor=v}v.prototype=p===null?Object.create(p):(l.prototype=p.prototype,new l)}}(),t=ie&&ie.__createBinding||(Object.create?function(h,v,p,l){l===void 0&&(l=p);var c=Object.getOwnPropertyDescriptor(v,p);(!c||("get"in c?!v.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return v[p]}}),Object.defineProperty(h,l,c)}:function(h,v,p,l){l===void 0&&(l=p),h[l]=v[p]}),n=ie&&ie.__setModuleDefault||(Object.create?function(h,v){Object.defineProperty(h,"default",{enumerable:!0,value:v})}:function(h,v){h.default=v}),r=ie&&ie.__importStar||function(h){if(h&&h.__esModule)return h;var v={};if(h!=null)for(var p in h)p!=="default"&&Object.prototype.hasOwnProperty.call(h,p)&&t(v,h,p);return n(v,h),v},o=ie&&ie.__spreadArray||function(h,v,p){if(p||arguments.length===2)for(var l=0,c=v.length,m;l<c;l++)(m||!(l in v))&&(m||(m=Array.prototype.slice.call(v,0,l)),m[l]=v[l]);return h.concat(m||Array.prototype.slice.call(v))};Object.defineProperty(ie,"__esModule",{value:!0});var s=r(Z),i=On(),a=Lt(),d=["ArrowRight","ArrowUp","k","PageUp"],f=["ArrowLeft","ArrowDown","j","PageDown"],g=function(h){e(v,h);function v(p){var l=h.call(this,p)||this;if(l.trackRef=s.createRef(),l.thumbRefs=[],l.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(l.props.values.length).fill(0).map(function(c,m){return m}),isChanged:!1,markOffsets:[]},l.getOffsets=function(){var c=l.props,m=c.direction,w=c.values,y=c.min,b=c.max,_=l.trackRef.current;if(!_)return console.warn("No track element found."),[];var E=_.getBoundingClientRect(),O=(0,i.getPaddingAndBorder)(_);return l.getThumbs().map(function(P,L){var D={x:0,y:0},$=P.getBoundingClientRect(),W=(0,i.getMargin)(P);switch(m){case a.Direction.Right:return D.x=(W.left+O.left)*-1,D.y=(($.height-E.height)/2+O.top)*-1,D.x+=E.width*(0,i.relativeValue)(w[L],y,b)-$.width/2,D;case a.Direction.Left:return D.x=(W.right+O.right)*-1,D.y=(($.height-E.height)/2+O.top)*-1,D.x+=E.width-E.width*(0,i.relativeValue)(w[L],y,b)-$.width/2,D;case a.Direction.Up:return D.x=(($.width-E.width)/2+W.left+O.left)*-1,D.y=-O.left,D.y+=E.height-E.height*(0,i.relativeValue)(w[L],y,b)-$.height/2,D;case a.Direction.Down:return D.x=(($.width-E.width)/2+W.left+O.left)*-1,D.y=-O.left,D.y+=E.height*(0,i.relativeValue)(w[L],y,b)-$.height/2,D;default:return(0,i.assertUnreachable)(m)}})},l.getThumbs=function(){return l.trackRef&&l.trackRef.current?Array.from(l.trackRef.current.children).filter(function(c){return c.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},l.getTargetIndex=function(c){return l.getThumbs().findIndex(function(m){return m===c.target||m.contains(c.target)})},l.addTouchEvents=function(c){document.addEventListener("touchmove",l.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",l.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",l.schdOnEnd,{passive:!1})},l.addMouseEvents=function(c){document.addEventListener("mousemove",l.schdOnMouseMove),document.addEventListener("mouseup",l.schdOnEnd)},l.onMouseDownTrack=function(c){var m;if(!(c.button!==0||(0,i.isIOS)()))if(c.persist(),c.preventDefault(),l.addMouseEvents(c.nativeEvent),l.props.values.length>1&&l.props.draggableTrack){if(l.thumbRefs.some(function(y){var b;return(b=y.current)===null||b===void 0?void 0:b.contains(c.target)}))return;l.setState({draggedTrackPos:[c.clientX,c.clientY]},function(){return l.onMove(c.clientX,c.clientY)})}else{var w=(0,i.getClosestThumbIndex)(l.thumbRefs.map(function(y){return y.current}),c.clientX,c.clientY,l.props.direction);(m=l.thumbRefs[w].current)===null||m===void 0||m.focus(),l.setState({draggedThumbIndex:w},function(){return l.onMove(c.clientX,c.clientY)})}},l.onResize=function(){(0,i.translateThumbs)(l.getThumbs(),l.getOffsets(),l.props.rtl),l.calculateMarkOffsets()},l.onTouchStartTrack=function(c){var m;if(c.persist(),l.addTouchEvents(c.nativeEvent),l.props.values.length>1&&l.props.draggableTrack){if(l.thumbRefs.some(function(y){var b;return(b=y.current)===null||b===void 0?void 0:b.contains(c.target)}))return;l.setState({draggedTrackPos:[c.touches[0].clientX,c.touches[0].clientY]},function(){return l.onMove(c.touches[0].clientX,c.touches[0].clientY)})}else{var w=(0,i.getClosestThumbIndex)(l.thumbRefs.map(function(y){return y.current}),c.touches[0].clientX,c.touches[0].clientY,l.props.direction);(m=l.thumbRefs[w].current)===null||m===void 0||m.focus(),l.setState({draggedThumbIndex:w},function(){return l.onMove(c.touches[0].clientX,c.touches[0].clientY)})}},l.onMouseOrTouchStart=function(c){if(!l.props.disabled){var m=(0,i.isTouchEvent)(c);if(!(!m&&c.button!==0)){var w=l.getTargetIndex(c);w!==-1&&(m?l.addTouchEvents(c):l.addMouseEvents(c),l.setState({draggedThumbIndex:w,thumbZIndexes:l.state.thumbZIndexes.map(function(y,b){return b===w?Math.max.apply(Math,l.state.thumbZIndexes):y<=l.state.thumbZIndexes[w]?y:y-1})}))}}},l.onMouseMove=function(c){c.preventDefault(),l.onMove(c.clientX,c.clientY)},l.onTouchMove=function(c){c.preventDefault(),l.onMove(c.touches[0].clientX,c.touches[0].clientY)},l.onKeyDown=function(c){var m=l.props,w=m.values,y=m.onChange,b=m.step,_=m.rtl,E=m.direction,O=l.state.isChanged,P=l.getTargetIndex(c.nativeEvent),L=_||E===a.Direction.Left||E===a.Direction.Down?-1:1;P!==-1&&(d.includes(c.key)?(c.preventDefault(),l.setState({draggedThumbIndex:P,isChanged:!0}),y((0,i.replaceAt)(w,P,l.normalizeValue(w[P]+L*(c.key==="PageUp"?b*10:b),P)))):f.includes(c.key)?(c.preventDefault(),l.setState({draggedThumbIndex:P,isChanged:!0}),y((0,i.replaceAt)(w,P,l.normalizeValue(w[P]-L*(c.key==="PageDown"?b*10:b),P)))):c.key==="Tab"?l.setState({draggedThumbIndex:-1},function(){O&&l.fireOnFinalChange()}):O&&l.fireOnFinalChange())},l.onKeyUp=function(c){var m=l.state.isChanged;l.setState({draggedThumbIndex:-1},function(){m&&l.fireOnFinalChange()})},l.onMove=function(c,m){var w=l.state,y=w.draggedThumbIndex,b=w.draggedTrackPos,_=l.props,E=_.direction,O=_.min,P=_.max,L=_.onChange,D=_.values,$=_.step,W=_.rtl;if(y===-1&&b[0]===-1&&b[1]===-1)return null;var C=l.trackRef.current;if(!C)return null;var R=C.getBoundingClientRect(),T=(0,i.isVertical)(E)?R.height:R.width;if(b[0]!==-1&&b[1]!==-1){var I=c-b[0],N=m-b[1],k=0;switch(E){case a.Direction.Right:case a.Direction.Left:k=I/T*(P-O);break;case a.Direction.Down:case a.Direction.Up:k=N/T*(P-O);break;default:(0,i.assertUnreachable)(E)}if(W&&(k*=-1),Math.abs(k)>=$/2){for(var A=0;A<l.thumbRefs.length;A++){if(D[A]===P&&Math.sign(k)===1||D[A]===O&&Math.sign(k)===-1)return;var j=D[A]+k;j>P?k=P-D[A]:j<O&&(k=O-D[A])}for(var S=D.slice(0),A=0;A<l.thumbRefs.length;A++)S=(0,i.replaceAt)(S,A,l.normalizeValue(D[A]+k,A));l.setState({draggedTrackPos:[c,m]}),L(S)}}else{var M=0;switch(E){case a.Direction.Right:M=(c-R.left)/T*(P-O)+O;break;case a.Direction.Left:M=(T-(c-R.left))/T*(P-O)+O;break;case a.Direction.Down:M=(m-R.top)/T*(P-O)+O;break;case a.Direction.Up:M=(T-(m-R.top))/T*(P-O)+O;break;default:(0,i.assertUnreachable)(E)}W&&(M=P+O-M),Math.abs(D[y]-M)>=$/2&&L((0,i.replaceAt)(D,y,l.normalizeValue(M,y)))}},l.normalizeValue=function(c,m){var w=l.props,y=w.min,b=w.max,_=w.step,E=w.allowOverlap,O=w.values;return(0,i.normalizeValue)(c,m,y,b,_,E,O)},l.onEnd=function(c){if(c.preventDefault(),document.removeEventListener("mousemove",l.schdOnMouseMove),document.removeEventListener("touchmove",l.schdOnTouchMove),document.removeEventListener("mouseup",l.schdOnEnd),document.removeEventListener("touchend",l.schdOnEnd),document.removeEventListener("touchcancel",l.schdOnEnd),l.state.draggedThumbIndex===-1&&l.state.draggedTrackPos[0]===-1&&l.state.draggedTrackPos[1]===-1)return null;l.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){l.fireOnFinalChange()})},l.fireOnFinalChange=function(){l.setState({isChanged:!1});var c=l.props,m=c.onFinalChange,w=c.values;m&&m(w)},l.updateMarkRefs=function(c){if(!c.renderMark){l.numOfMarks=void 0,l.markRefs=void 0;return}l.numOfMarks=(c.max-c.min)/l.props.step,l.markRefs=[];for(var m=0;m<l.numOfMarks+1;m++)l.markRefs[m]=s.createRef()},l.calculateMarkOffsets=function(){if(!(!l.props.renderMark||!l.trackRef||!l.numOfMarks||!l.markRefs||l.trackRef.current===null)){for(var c=window.getComputedStyle(l.trackRef.current),m=parseInt(c.width,10),w=parseInt(c.height,10),y=parseInt(c.paddingLeft,10),b=parseInt(c.paddingTop,10),_=[],E=0;E<l.numOfMarks+1;E++){var O=9999,P=9999;if(l.markRefs[E].current){var L=l.markRefs[E].current.getBoundingClientRect();O=L.height,P=L.width}l.props.direction===a.Direction.Left||l.props.direction===a.Direction.Right?_.push([Math.round(m/l.numOfMarks*E+y-P/2),-Math.round((O-w)/2)]):_.push([Math.round(w/l.numOfMarks*E+b-O/2),-Math.round((P-m)/2)])}l.setState({markOffsets:_})}},p.step===0)throw new Error('"step" property should be a positive number');return l.schdOnMouseMove=(0,i.schd)(l.onMouseMove),l.schdOnTouchMove=(0,i.schd)(l.onTouchMove),l.schdOnEnd=(0,i.schd)(l.onEnd),l.thumbRefs=p.values.map(function(){return s.createRef()}),l.updateMarkRefs(p),l}return v.prototype.componentDidMount=function(){var p=this,l=this.props,c=l.values,m=l.min,w=l.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",p.onResize)},unobserve:function(){return window.removeEventListener("resize",p.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,i.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(y){return(0,i.checkBoundaries)(y,p.props.min,p.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,i.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),c.forEach(function(y){(0,i.isStepDivisible)(m,y,w)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},v.prototype.componentDidUpdate=function(p,l){var c=this.props,m=c.max,w=c.min,y=c.step,b=c.values,_=c.rtl;(p.max!==m||p.min!==w||p.step!==y)&&this.updateMarkRefs(this.props),(0,i.translateThumbs)(this.getThumbs(),this.getOffsets(),_),(p.max!==m||p.min!==w||p.step!==y||l.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),b.forEach(function(E){(0,i.isStepDivisible)(w,E,y)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},v.prototype.componentWillUnmount=function(){var p={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,p),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},v.prototype.render=function(){var p=this,l=this.props,c=l.label,m=l.labelledBy,w=l.renderTrack,y=l.renderThumb,b=l.renderMark,_=b===void 0?function(){return null}:b,E=l.values,O=l.min,P=l.max,L=l.allowOverlap,D=l.disabled,$=this.state,W=$.draggedThumbIndex,C=$.thumbZIndexes,R=$.markOffsets;return w({props:{style:{transform:"scale(1)",cursor:W>-1?"grabbing":this.props.draggableTrack?(0,i.isVertical)(this.props.direction)?"ns-resize":"ew-resize":E.length===1&&!D?"pointer":"inherit"},onMouseDown:D?i.voidFn:this.onMouseDownTrack,onTouchStart:D?i.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:D,children:o(o([],R.map(function(T,I,N){return _({props:{style:p.props.direction===a.Direction.Left||p.props.direction===a.Direction.Right?{position:"absolute",left:"".concat(T[0],"px"),marginTop:"".concat(T[1],"px")}:{position:"absolute",top:"".concat(T[0],"px"),marginLeft:"".concat(T[1],"px")},key:"mark".concat(I),ref:p.markRefs[I]},index:I})}),!0),E.map(function(T,I){var N=p.state.draggedThumbIndex===I;return y({index:I,value:T,isDragged:N,props:{style:{position:"absolute",zIndex:C[I],cursor:D?"inherit":N?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:I,tabIndex:D?void 0:0,"aria-valuemax":L?P:E[I+1]||P,"aria-valuemin":L?O:E[I-1]||O,"aria-valuenow":T,draggable:!1,ref:p.thumbRefs[I],"aria-label":c,"aria-labelledby":m,role:"slider",onKeyDown:D?i.voidFn:p.onKeyDown,onKeyUp:D?i.voidFn:p.onKeyUp}})}),!0)})},v.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:a.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},v}(s.Component);return ie.default=g,ie}var kn;function Bo(){return kn||(kn=1,function(e){var t=Xe&&Xe.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=t($o());e.Range=n.default;var r=On();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return r.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return r.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return r.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return r.checkValuesAgainstBoundaries}});var o=Lt();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return o.Direction}})}(Xe)),Xe}var Mn=Bo();const Wo=e=>{const{min:t,max:n,step:r=1,disabled:o=!1,className:s,activeMin:i,activeMax:a,isFaceted:d=!1,highlightFaceted:f=!0,onChange:g,onFinalChange:h}=e;if("isRange"in e&&e.isRange){const v=e.value,[p,l]=v;return x.jsx("div",{className:s,children:x.jsx(Mn.Range,{step:r,min:t,max:n,values:v,onChange:c=>g(c),onFinalChange:c=>h==null?void 0:h(c),disabled:o,renderTrack:({props:c,children:m})=>{const{key:w,...y}=c,b=n-t,_=(p-t)/b*100,E=(l-p)/b*100;let O=0,P=0;const L=typeof i=="number"&&typeof a=="number"&&a>i&&(i>t||a<n);return L&&(O=(i-t)/b*100,P=(a-i)/b*100),x.jsxs("div",{...y,className:oe.basetrack,style:{...y.style},children:[!L&&x.jsx("div",{className:oe.selectedtrack,style:{left:`${_}%`,width:`${E}%`,zIndex:"1"}}),L&&x.jsx("div",{className:`${oe.livetrack} ${d?oe.livetrackFaceted:oe.livetrackDefault}`,style:{left:`${O}%`,width:`${P}%`,zIndex:"2"}}),m]},w)},renderThumb:({props:c})=>{const{key:m,...w}=c;return x.jsx("div",{...w,className:`${oe.thumbs} ${o?oe.disabled:""}`,style:{...w.style,zIndex:"3"}},m)}})})}else{const v=e.value;return x.jsx("div",{className:s,children:x.jsx(Mn.Range,{step:r,min:t,max:n,values:[v],onChange:p=>g(p[0]),onFinalChange:p=>h==null?void 0:h(p[0]),disabled:o,renderTrack:({props:p,children:l})=>{const{key:c,...m}=p,w=n-t,y=(v-t)/w*100;let b=0,_=0;const E=typeof i=="number"&&typeof a=="number"&&a>i&&(i>t||a<n);return E&&(b=(i-t)/w*100,_=(a-i)/w*100),x.jsxs("div",{...m,className:oe.basetrack,style:{...m.style},children:[!E&&x.jsx("div",{className:oe.selectedtrack,style:{left:"0%",width:`${y}%`,zIndex:"1"}}),E&&x.jsx("div",{className:`${oe.livetrack} ${d?oe.livetrackFaceted:oe.livetrackDefault}`,style:{left:`${b}%`,width:`${_}%`,zIndex:"2"}}),l]},c)},renderThumb:({props:p})=>{const{key:l,...c}=p;return x.jsx("div",{...c,className:`${oe.thumbs} ${o?oe.disabled:""}`,style:{...c.style,zIndex:"3"}},l)}})})}};function Nn(e,[t,n]){return Math.min(n,Math.max(t,e))}function G(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ct(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i),d=n.length;n=[...n,i];const f=h=>{var w;const{scope:v,children:p,...l}=h,c=((w=v==null?void 0:v[e])==null?void 0:w[d])||a,m=u.useMemo(()=>l,Object.values(l));return x.jsx(c.Provider,{value:m,children:p})};f.displayName=s+"Provider";function g(h,v){var c;const p=((c=v==null?void 0:v[e])==null?void 0:c[d])||a,l=u.useContext(p);if(l)return l;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[f,g]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const d=(a==null?void 0:a[e])||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[r,Vo(o,...t)]}function Vo(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:d,scopeName:f})=>{const h=d(s)[`__scope${f}`];return{...a,...h}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function In(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=In(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():In(e[o],null)}}}}function ee(...e){return u.useCallback(Dn(...e),e)}function Je(e){const t=Ho(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),d=a.find(Uo);if(d){const f=d.props.children,g=a.map(h=>h===d?u.Children.count(f)>1?u.Children.only(null):u.isValidElement(f)?f.props.children:null:h);return x.jsx(t,{...i,ref:o,children:u.isValidElement(f)?u.cloneElement(f,void 0,g):null})}return x.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Ho(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=qo(o),a=Yo(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Dn(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zo=Symbol("radix.slottable");function Uo(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zo}function Yo(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function qo(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ko(e){const t=e+"CollectionProvider",[n,r]=ct(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=c=>{const{scope:m,children:w}=c,y=Z.useRef(null),b=Z.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:b,collectionRef:y,children:w})};i.displayName=t;const a=e+"CollectionSlot",d=Je(a),f=Z.forwardRef((c,m)=>{const{scope:w,children:y}=c,b=s(a,w),_=ee(m,b.collectionRef);return x.jsx(d,{ref:_,children:y})});f.displayName=a;const g=e+"CollectionItemSlot",h="data-radix-collection-item",v=Je(g),p=Z.forwardRef((c,m)=>{const{scope:w,children:y,...b}=c,_=Z.useRef(null),E=ee(m,_),O=s(g,w);return Z.useEffect(()=>(O.itemMap.set(_,{ref:_,...b}),()=>void O.itemMap.delete(_))),x.jsx(v,{[h]:"",ref:E,children:y})});p.displayName=g;function l(c){const m=s(e+"CollectionConsumer",c);return Z.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(m.itemMap.values()).sort((O,P)=>b.indexOf(O.ref.current)-b.indexOf(P.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:f,ItemSlot:p},l,r]}var Xo=u.createContext(void 0);function Zo(e){const t=u.useContext(Xo);return e||t||"ltr"}var Go=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=Go.reduce((e,t)=>{const n=Je(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,d=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Jo(e,t){e&&it.flushSync(()=>e.dispatchEvent(t))}function Oe(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Qo(e,t=globalThis==null?void 0:globalThis.document){const n=Oe(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ei="DismissableLayer",Ft="dismissableLayer.update",ti="dismissableLayer.pointerDownOutside",ni="dismissableLayer.focusOutside",jn,Ln=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$t=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...d}=e,f=u.useContext(Ln),[g,h]=u.useState(null),v=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=u.useState({}),l=ee(t,P=>h(P)),c=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=c.indexOf(m),y=g?c.indexOf(g):-1,b=f.layersWithOutsidePointerEventsDisabled.size>0,_=y>=w,E=ii(P=>{const L=P.target,D=[...f.branches].some($=>$.contains(L));!_||D||(o==null||o(P),i==null||i(P),P.defaultPrevented||a==null||a())},v),O=si(P=>{const L=P.target;[...f.branches].some($=>$.contains(L))||(s==null||s(P),i==null||i(P),P.defaultPrevented||a==null||a())},v);return Qo(P=>{y===f.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},v),u.useEffect(()=>{if(g)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(jn=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(g)),f.layers.add(g),Fn(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=jn)}},[g,v,n,f]),u.useEffect(()=>()=>{g&&(f.layers.delete(g),f.layersWithOutsidePointerEventsDisabled.delete(g),Fn())},[g,f]),u.useEffect(()=>{const P=()=>p({});return document.addEventListener(Ft,P),()=>document.removeEventListener(Ft,P)},[]),x.jsx(J.div,{...d,ref:l,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,O.onFocusCapture),onBlurCapture:G(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,E.onPointerDownCapture)})});$t.displayName=ei;var ri="DismissableLayerBranch",oi=u.forwardRef((e,t)=>{const n=u.useContext(Ln),r=u.useRef(null),o=ee(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(J.div,{...e,ref:o})});oi.displayName=ri;function ii(e,t=globalThis==null?void 0:globalThis.document){const n=Oe(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){$n(ti,n,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function si(e,t=globalThis==null?void 0:globalThis.document){const n=Oe(e),r=u.useRef(!1);return u.useEffect(()=>{const o=s=>{s.target&&!r.current&&$n(ni,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Fn(){const e=new CustomEvent(Ft);document.dispatchEvent(e)}function $n(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Jo(o,s):o.dispatchEvent(s)}var Bt=0;function Bn(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wn()),document.body.insertAdjacentElement("beforeend",e[1]??Wn()),Bt++,()=>{Bt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bt--}},[])}function Wn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wt="focusScope.autoFocusOnMount",Vt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},ai="FocusScope",Ht=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,d]=u.useState(null),f=Oe(o),g=Oe(s),h=u.useRef(null),v=ee(t,c=>d(c)),p=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let c=function(b){if(p.paused||!a)return;const _=b.target;a.contains(_)?h.current=_:xe(h.current,{select:!0})},m=function(b){if(p.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||xe(h.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&xe(a)};document.addEventListener("focusin",c),document.addEventListener("focusout",m);const y=new MutationObserver(w);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",m),y.disconnect()}}},[r,a,p.paused]),u.useEffect(()=>{if(a){Un.add(p);const c=document.activeElement;if(!a.contains(c)){const w=new CustomEvent(Wt,Vn);a.addEventListener(Wt,f),a.dispatchEvent(w),w.defaultPrevented||(ci(pi(Hn(a)),{select:!0}),document.activeElement===c&&xe(a))}return()=>{a.removeEventListener(Wt,f),setTimeout(()=>{const w=new CustomEvent(Vt,Vn);a.addEventListener(Vt,g),a.dispatchEvent(w),w.defaultPrevented||xe(c??document.body,{select:!0}),a.removeEventListener(Vt,g),Un.remove(p)},0)}}},[a,f,g,p]);const l=u.useCallback(c=>{if(!n&&!r||p.paused)return;const m=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,w=document.activeElement;if(m&&w){const y=c.currentTarget,[b,_]=li(y);b&&_?!c.shiftKey&&w===_?(c.preventDefault(),n&&xe(b,{select:!0})):c.shiftKey&&w===b&&(c.preventDefault(),n&&xe(_,{select:!0})):w===y&&c.preventDefault()}},[n,r,p.paused]);return x.jsx(J.div,{tabIndex:-1,...i,ref:v,onKeyDown:l})});Ht.displayName=ai;function ci(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xe(r,{select:t}),document.activeElement!==n)return}function li(e){const t=Hn(e),n=zn(t,e),r=zn(t.reverse(),e);return[n,r]}function Hn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zn(e,t){for(const n of e)if(!ui(n,{upTo:t}))return n}function ui(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function di(e){return e instanceof HTMLInputElement&&"select"in e}function xe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&di(e)&&t&&e.select()}}var Un=fi();function fi(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yn(e,t),e.unshift(t)},remove(t){var n;e=Yn(e,t),(n=e[0])==null||n.resume()}}}function Yn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pi(e){return e.filter(t=>t.tagName!=="A")}var ne=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},hi=u[" useId ".trim().toString()]||(()=>{}),mi=0;function lt(e){const[t,n]=u.useState(hi());return ne(()=>{n(r=>r??String(mi++))},[e]),e||(t?`radix-${t}`:"")}const vi=["top","right","bottom","left"],Se=Math.min,se=Math.max,ut=Math.round,dt=Math.floor,he=e=>({x:e,y:e}),gi={left:"right",right:"left",bottom:"top",top:"bottom"},yi={start:"end",end:"start"};function zt(e,t,n){return se(e,Se(t,n))}function we(e,t){return typeof e=="function"?e(t):e}function be(e){return e.split("-")[0]}function De(e){return e.split("-")[1]}function Ut(e){return e==="x"?"y":"x"}function Yt(e){return e==="y"?"height":"width"}const wi=new Set(["top","bottom"]);function me(e){return wi.has(be(e))?"y":"x"}function qt(e){return Ut(me(e))}function bi(e,t,n){n===void 0&&(n=!1);const r=De(e),o=qt(e),s=Yt(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ft(i)),[i,ft(i)]}function xi(e){const t=ft(e);return[Kt(e),t,Kt(t)]}function Kt(e){return e.replace(/start|end/g,t=>yi[t])}const qn=["left","right"],Kn=["right","left"],Si=["top","bottom"],Ei=["bottom","top"];function Ci(e,t,n){switch(e){case"top":case"bottom":return n?t?Kn:qn:t?qn:Kn;case"left":case"right":return t?Si:Ei;default:return[]}}function _i(e,t,n,r){const o=De(e);let s=Ci(be(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Kt)))),s}function ft(e){return e.replace(/left|right|bottom|top/g,t=>gi[t])}function Ri(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xn(e){return typeof e!="number"?Ri(e):{top:e,right:e,bottom:e,left:e}}function pt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zn(e,t,n){let{reference:r,floating:o}=e;const s=me(t),i=qt(t),a=Yt(i),d=be(t),f=s==="y",g=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let p;switch(d){case"top":p={x:g,y:r.y-o.height};break;case"bottom":p={x:g,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-o.width,y:h};break;default:p={x:r.x,y:r.y}}switch(De(t)){case"start":p[i]-=v*(n&&f?-1:1);break;case"end":p[i]+=v*(n&&f?-1:1);break}return p}const Pi=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let f=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:h}=Zn(f,r,d),v=r,p={},l=0;for(let c=0;c<a.length;c++){const{name:m,fn:w}=a[c],{x:y,y:b,data:_,reset:E}=await w({x:g,y:h,initialPlacement:r,placement:v,strategy:o,middlewareData:p,rects:f,platform:i,elements:{reference:e,floating:t}});g=y??g,h=b??h,p={...p,[m]:{...p[m],..._}},E&&l<=50&&(l++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(f=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:g,y:h}=Zn(f,v,d)),c=-1)}return{x:g,y:h,placement:v,strategy:o,middlewareData:p}};async function Qe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:g="viewport",elementContext:h="floating",altBoundary:v=!1,padding:p=0}=we(t,e),l=Xn(p),m=a[v?h==="floating"?"reference":"floating":h],w=pt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:f,rootBoundary:g,strategy:d})),y=h==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),_=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},E=pt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:d}):y);return{top:(w.top-E.top+l.top)/_.y,bottom:(E.bottom-w.bottom+l.bottom)/_.y,left:(w.left-E.left+l.left)/_.x,right:(E.right-w.right+l.right)/_.x}}const Ti=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:d}=t,{element:f,padding:g=0}=we(e,t)||{};if(f==null)return{};const h=Xn(g),v={x:n,y:r},p=qt(o),l=Yt(p),c=await i.getDimensions(f),m=p==="y",w=m?"top":"left",y=m?"bottom":"right",b=m?"clientHeight":"clientWidth",_=s.reference[l]+s.reference[p]-v[p]-s.floating[l],E=v[p]-s.reference[p],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(f));let P=O?O[b]:0;(!P||!await(i.isElement==null?void 0:i.isElement(O)))&&(P=a.floating[b]||s.floating[l]);const L=_/2-E/2,D=P/2-c[l]/2-1,$=Se(h[w],D),W=Se(h[y],D),C=$,R=P-c[l]-W,T=P/2-c[l]/2+L,I=zt(C,T,R),N=!d.arrow&&De(o)!=null&&T!==I&&s.reference[l]/2-(T<C?$:W)-c[l]/2<0,k=N?T<C?T-C:T-R:0;return{[p]:v[p]+k,data:{[p]:I,centerOffset:T-I-k,...N&&{alignmentOffset:k}},reset:N}}}),Oi=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:d,elements:f}=t,{mainAxis:g=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:l="none",flipAlignment:c=!0,...m}=we(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=be(o),y=me(a),b=be(a)===a,_=await(d.isRTL==null?void 0:d.isRTL(f.floating)),E=v||(b||!c?[ft(a)]:xi(a)),O=l!=="none";!v&&O&&E.push(..._i(a,c,l,_));const P=[a,...E],L=await Qe(t,m),D=[];let $=((r=s.flip)==null?void 0:r.overflows)||[];if(g&&D.push(L[w]),h){const T=bi(o,i,_);D.push(L[T[0]],L[T[1]])}if($=[...$,{placement:o,overflows:D}],!D.every(T=>T<=0)){var W,C;const T=(((W=s.flip)==null?void 0:W.index)||0)+1,I=P[T];if(I&&(!(h==="alignment"?y!==me(I):!1)||$.every(A=>me(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:T,overflows:$},reset:{placement:I}};let N=(C=$.filter(k=>k.overflows[0]<=0).sort((k,A)=>k.overflows[1]-A.overflows[1])[0])==null?void 0:C.placement;if(!N)switch(p){case"bestFit":{var R;const k=(R=$.filter(A=>{if(O){const j=me(A.placement);return j===y||j==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(j=>j>0).reduce((j,S)=>j+S,0)]).sort((A,j)=>A[1]-j[1])[0])==null?void 0:R[0];k&&(N=k);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Gn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jn(e){return vi.some(t=>e[t]>=0)}const Ai=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=we(e,t);switch(r){case"referenceHidden":{const s=await Qe(t,{...o,elementContext:"reference"}),i=Gn(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Jn(i)}}}case"escaped":{const s=await Qe(t,{...o,altBoundary:!0}),i=Gn(s,n.floating);return{data:{escapedOffsets:i,escaped:Jn(i)}}}default:return{}}}}},Qn=new Set(["left","top"]);async function ki(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=be(n),a=De(n),d=me(n)==="y",f=Qn.has(i)?-1:1,g=s&&d?-1:1,h=we(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:l}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof l=="number"&&(p=a==="end"?l*-1:l),d?{x:p*g,y:v*f}:{x:v*f,y:p*g}}const Mi=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,d=await ki(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:i}}}}},Ni=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:m=>{let{x:w,y}=m;return{x:w,y}}},...d}=we(e,t),f={x:n,y:r},g=await Qe(t,d),h=me(be(o)),v=Ut(h);let p=f[v],l=f[h];if(s){const m=v==="y"?"top":"left",w=v==="y"?"bottom":"right",y=p+g[m],b=p-g[w];p=zt(y,p,b)}if(i){const m=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=l+g[m],b=l-g[w];l=zt(y,l,b)}const c=a.fn({...t,[v]:p,[h]:l});return{...c,data:{x:c.x-n,y:c.y-r,enabled:{[v]:s,[h]:i}}}}}},Ii=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:d=!0,crossAxis:f=!0}=we(e,t),g={x:n,y:r},h=me(o),v=Ut(h);let p=g[v],l=g[h];const c=we(a,t),m=typeof c=="number"?{mainAxis:c,crossAxis:0}:{mainAxis:0,crossAxis:0,...c};if(d){const b=v==="y"?"height":"width",_=s.reference[v]-s.floating[b]+m.mainAxis,E=s.reference[v]+s.reference[b]-m.mainAxis;p<_?p=_:p>E&&(p=E)}if(f){var w,y;const b=v==="y"?"width":"height",_=Qn.has(be(o)),E=s.reference[h]-s.floating[b]+(_&&((w=i.offset)==null?void 0:w[h])||0)+(_?0:m.crossAxis),O=s.reference[h]+s.reference[b]+(_?0:((y=i.offset)==null?void 0:y[h])||0)-(_?m.crossAxis:0);l<E?l=E:l>O&&(l=O)}return{[v]:p,[h]:l}}}},Di=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:d=()=>{},...f}=we(e,t),g=await Qe(t,f),h=be(o),v=De(o),p=me(o)==="y",{width:l,height:c}=s.floating;let m,w;h==="top"||h==="bottom"?(m=h,w=v===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(w=h,m=v==="end"?"top":"bottom");const y=c-g.top-g.bottom,b=l-g.left-g.right,_=Se(c-g[m],y),E=Se(l-g[w],b),O=!t.middlewareData.shift;let P=_,L=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=y),O&&!v){const $=se(g.left,0),W=se(g.right,0),C=se(g.top,0),R=se(g.bottom,0);p?L=l-2*($!==0||W!==0?$+W:se(g.left,g.right)):P=c-2*(C!==0||R!==0?C+R:se(g.top,g.bottom))}await d({...t,availableWidth:L,availableHeight:P});const D=await i.getDimensions(a.floating);return l!==D.width||c!==D.height?{reset:{rects:!0}}:{}}}};function ht(){return typeof window<"u"}function je(e){return er(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ve(e){var t;return(t=(er(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function er(e){return ht()?e instanceof Node||e instanceof ae(e).Node:!1}function de(e){return ht()?e instanceof Element||e instanceof ae(e).Element:!1}function ge(e){return ht()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function tr(e){return!ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}const ji=new Set(["inline","contents"]);function et(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ji.has(o)}const Li=new Set(["table","td","th"]);function Fi(e){return Li.has(je(e))}const $i=[":popover-open",":modal"];function mt(e){return $i.some(t=>{try{return e.matches(t)}catch{return!1}})}const Bi=["transform","translate","scale","rotate","perspective"],Wi=["transform","translate","scale","rotate","perspective","filter"],Vi=["paint","layout","strict","content"];function Xt(e){const t=Zt(),n=de(e)?fe(e):e;return Bi.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wi.some(r=>(n.willChange||"").includes(r))||Vi.some(r=>(n.contain||"").includes(r))}function Hi(e){let t=Ee(e);for(;ge(t)&&!Le(t);){if(Xt(t))return t;if(mt(t))return null;t=Ee(t)}return null}function Zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zi=new Set(["html","body","#document"]);function Le(e){return zi.has(je(e))}function fe(e){return ae(e).getComputedStyle(e)}function vt(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ee(e){if(je(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tr(e)&&e.host||ve(e);return tr(t)?t.host:t}function nr(e){const t=Ee(e);return Le(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&et(t)?t:nr(t)}function tt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=nr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ae(o);if(s){const a=Gt(i);return t.concat(i,i.visualViewport||[],et(o)?o:[],a&&n?tt(a):[])}return t.concat(o,tt(o,[],n))}function Gt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rr(e){const t=fe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ut(n)!==s||ut(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Jt(e){return de(e)?e:e.contextElement}function Fe(e){const t=Jt(e);if(!ge(t))return he(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=rr(t);let i=(s?ut(n.width):n.width)/r,a=(s?ut(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Ui=he(0);function or(e){const t=ae(e);return!Zt()||!t.visualViewport?Ui:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yi(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function Ae(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Jt(e);let i=he(1);t&&(r?de(r)&&(i=Fe(r)):i=Fe(e));const a=Yi(s,n,r)?or(s):he(0);let d=(o.left+a.x)/i.x,f=(o.top+a.y)/i.y,g=o.width/i.x,h=o.height/i.y;if(s){const v=ae(s),p=r&&de(r)?ae(r):r;let l=v,c=Gt(l);for(;c&&r&&p!==l;){const m=Fe(c),w=c.getBoundingClientRect(),y=fe(c),b=w.left+(c.clientLeft+parseFloat(y.paddingLeft))*m.x,_=w.top+(c.clientTop+parseFloat(y.paddingTop))*m.y;d*=m.x,f*=m.y,g*=m.x,h*=m.y,d+=b,f+=_,l=ae(c),c=Gt(l)}}return pt({width:g,height:h,x:d,y:f})}function gt(e,t){const n=vt(e).scrollLeft;return t?t.left+n:Ae(ve(e)).left+n}function ir(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function qi(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ve(r),a=t?mt(t.floating):!1;if(r===i||a&&s)return n;let d={scrollLeft:0,scrollTop:0},f=he(1);const g=he(0),h=ge(r);if((h||!h&&!s)&&((je(r)!=="body"||et(i))&&(d=vt(r)),ge(r))){const p=Ae(r);f=Fe(r),g.x=p.x+r.clientLeft,g.y=p.y+r.clientTop}const v=i&&!h&&!s?ir(i,d):he(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+g.x+v.x,y:n.y*f.y-d.scrollTop*f.y+g.y+v.y}}function Ki(e){return Array.from(e.getClientRects())}function Xi(e){const t=ve(e),n=vt(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gt(e);const a=-n.scrollTop;return fe(r).direction==="rtl"&&(i+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const sr=25;function Zi(e,t){const n=ae(e),r=ve(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,d=0;if(o){s=o.width,i=o.height;const g=Zt();(!g||g&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const f=gt(r);if(f<=0){const g=r.ownerDocument,h=g.body,v=getComputedStyle(h),p=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,l=Math.abs(r.clientWidth-h.clientWidth-p);l<=sr&&(s-=l)}else f<=sr&&(s+=f);return{width:s,height:i,x:a,y:d}}const Gi=new Set(["absolute","fixed"]);function Ji(e,t){const n=Ae(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ge(e)?Fe(e):he(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,d=o*s.x,f=r*s.y;return{width:i,height:a,x:d,y:f}}function ar(e,t,n){let r;if(t==="viewport")r=Zi(e,n);else if(t==="document")r=Xi(ve(e));else if(de(t))r=Ji(t,n);else{const o=or(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pt(r)}function cr(e,t){const n=Ee(e);return n===t||!de(n)||Le(n)?!1:fe(n).position==="fixed"||cr(n,t)}function Qi(e,t){const n=t.get(e);if(n)return n;let r=tt(e,[],!1).filter(a=>de(a)&&je(a)!=="body"),o=null;const s=fe(e).position==="fixed";let i=s?Ee(e):e;for(;de(i)&&!Le(i);){const a=fe(i),d=Xt(i);!d&&a.position==="fixed"&&(o=null),(s?!d&&!o:!d&&a.position==="static"&&!!o&&Gi.has(o.position)||et(i)&&!d&&cr(e,i))?r=r.filter(g=>g!==i):o=a,i=Ee(i)}return t.set(e,r),r}function es(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?mt(t)?[]:Qi(t,this._c):[].concat(n),r],a=i[0],d=i.reduce((f,g)=>{const h=ar(t,g,o);return f.top=se(h.top,f.top),f.right=Se(h.right,f.right),f.bottom=Se(h.bottom,f.bottom),f.left=se(h.left,f.left),f},ar(t,a,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ts(e){const{width:t,height:n}=rr(e);return{width:t,height:n}}function ns(e,t,n){const r=ge(t),o=ve(t),s=n==="fixed",i=Ae(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=he(0);function f(){d.x=gt(o)}if(r||!r&&!s)if((je(t)!=="body"||et(o))&&(a=vt(t)),r){const p=Ae(t,!0,s,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else o&&f();s&&!r&&o&&f();const g=o&&!r&&!s?ir(o,a):he(0),h=i.left+a.scrollLeft-d.x-g.x,v=i.top+a.scrollTop-d.y-g.y;return{x:h,y:v,width:i.width,height:i.height}}function Qt(e){return fe(e).position==="static"}function lr(e,t){if(!ge(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ve(e)===n&&(n=n.ownerDocument.body),n}function ur(e,t){const n=ae(e);if(mt(e))return n;if(!ge(e)){let o=Ee(e);for(;o&&!Le(o);){if(de(o)&&!Qt(o))return o;o=Ee(o)}return n}let r=lr(e,t);for(;r&&Fi(r)&&Qt(r);)r=lr(r,t);return r&&Le(r)&&Qt(r)&&!Xt(r)?n:r||Hi(e)||n}const rs=async function(e){const t=this.getOffsetParent||ur,n=this.getDimensions,r=await n(e.floating);return{reference:ns(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function os(e){return fe(e).direction==="rtl"}const is={convertOffsetParentRelativeRectToViewportRelativeRect:qi,getDocumentElement:ve,getClippingRect:es,getOffsetParent:ur,getElementRects:rs,getClientRects:Ki,getDimensions:ts,getScale:Fe,isElement:de,isRTL:os};function dr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ss(e,t){let n=null,r;const o=ve(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const f=e.getBoundingClientRect(),{left:g,top:h,width:v,height:p}=f;if(a||t(),!v||!p)return;const l=dt(h),c=dt(o.clientWidth-(g+v)),m=dt(o.clientHeight-(h+p)),w=dt(g),b={rootMargin:-l+"px "+-c+"px "+-m+"px "+-w+"px",threshold:se(0,Se(1,d))||1};let _=!0;function E(O){const P=O[0].intersectionRatio;if(P!==d){if(!_)return i();P?i(!1,P):r=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!dr(f,e.getBoundingClientRect())&&i(),_=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return i(!0),s}function as(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Jt(e),g=o||s?[...f?tt(f):[],...tt(t)]:[];g.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=f&&a?ss(f,n):null;let v=-1,p=null;i&&(p=new ResizeObserver(w=>{let[y]=w;y&&y.target===f&&p&&(p.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),f&&!d&&p.observe(f),p.observe(t));let l,c=d?Ae(e):null;d&&m();function m(){const w=Ae(e);c&&!dr(c,w)&&n(),c=w,l=requestAnimationFrame(m)}return n(),()=>{var w;g.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(w=p)==null||w.disconnect(),p=null,d&&cancelAnimationFrame(l)}}const cs=Mi,ls=Ni,us=Oi,ds=Di,fs=Ai,fr=Ti,ps=Ii,hs=(e,t,n)=>{const r=new Map,o={platform:is,...n},s={...o.platform,_c:r};return Pi(e,t,{...o,platform:s})};var ms=typeof document<"u",vs=function(){},yt=ms?Z.useLayoutEffect:vs;function wt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wt(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;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!wt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function pr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hr(e,t){const n=pr(e);return Math.round(t*n)/n}function en(e){const t=u.useRef(e);return yt(()=>{t.current=e}),t}function gs(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:d,open:f}=e,[g,h]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,p]=u.useState(r);wt(v,r)||p(r);const[l,c]=u.useState(null),[m,w]=u.useState(null),y=u.useCallback(A=>{A!==O.current&&(O.current=A,c(A))},[]),b=u.useCallback(A=>{A!==P.current&&(P.current=A,w(A))},[]),_=s||l,E=i||m,O=u.useRef(null),P=u.useRef(null),L=u.useRef(g),D=d!=null,$=en(d),W=en(o),C=en(f),R=u.useCallback(()=>{if(!O.current||!P.current)return;const A={placement:t,strategy:n,middleware:v};W.current&&(A.platform=W.current),hs(O.current,P.current,A).then(j=>{const S={...j,isPositioned:C.current!==!1};T.current&&!wt(L.current,S)&&(L.current=S,it.flushSync(()=>{h(S)}))})},[v,t,n,W,C]);yt(()=>{f===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[f]);const T=u.useRef(!1);yt(()=>(T.current=!0,()=>{T.current=!1}),[]),yt(()=>{if(_&&(O.current=_),E&&(P.current=E),_&&E){if($.current)return $.current(_,E,R);R()}},[_,E,R,$,D]);const I=u.useMemo(()=>({reference:O,floating:P,setReference:y,setFloating:b}),[y,b]),N=u.useMemo(()=>({reference:_,floating:E}),[_,E]),k=u.useMemo(()=>{const A={position:n,left:0,top:0};if(!N.floating)return A;const j=hr(N.floating,g.x),S=hr(N.floating,g.y);return a?{...A,transform:"translate("+j+"px, "+S+"px)",...pr(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:S}},[n,a,N.floating,g.x,g.y]);return u.useMemo(()=>({...g,update:R,refs:I,elements:N,floatingStyles:k}),[g,R,I,N,k])}const ys=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?fr({element:r.current,padding:o}).fn(n):{}:r?fr({element:r,padding:o}).fn(n):{}}}},ws=(e,t)=>({...cs(e),options:[e,t]}),bs=(e,t)=>({...ls(e),options:[e,t]}),xs=(e,t)=>({...ps(e),options:[e,t]}),Ss=(e,t)=>({...us(e),options:[e,t]}),Es=(e,t)=>({...ds(e),options:[e,t]}),Cs=(e,t)=>({...fs(e),options:[e,t]}),_s=(e,t)=>({...ys(e),options:[e,t]});var Rs="Arrow",mr=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return x.jsx(J.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});mr.displayName=Rs;var Ps=mr;function Ts(e){const[t,n]=u.useState(void 0);return ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;i=f.inlineSize,a=f.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var tn="Popper",[vr,bt]=ct(tn),[Os,gr]=vr(tn),yr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return x.jsx(Os,{scope:t,anchor:r,onAnchorChange:o,children:n})};yr.displayName=tn;var wr="PopperAnchor",br=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=gr(wr,n),i=u.useRef(null),a=ee(t,i),d=u.useRef(null);return u.useEffect(()=>{const f=d.current;d.current=(r==null?void 0:r.current)||i.current,f!==d.current&&s.onAnchorChange(d.current)}),r?null:x.jsx(J.div,{...o,ref:a})});br.displayName=wr;var nn="PopperContent",[As,ks]=vr(nn),xr=u.forwardRef((e,t)=>{var F,B,X,U,Y,q;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:g=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:p="optimized",onPlaced:l,...c}=e,m=gr(nn,n),[w,y]=u.useState(null),b=ee(t,re=>y(re)),[_,E]=u.useState(null),O=Ts(_),P=(O==null?void 0:O.width)??0,L=(O==null?void 0:O.height)??0,D=r+(s!=="center"?"-"+s:""),$=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},W=Array.isArray(f)?f:[f],C=W.length>0,R={padding:$,boundary:W.filter(Ns),altBoundary:C},{refs:T,floatingStyles:I,placement:N,isPositioned:k,middlewareData:A}=gs({strategy:"fixed",placement:D,whileElementsMounted:(...re)=>as(...re,{animationFrame:p==="always"}),elements:{reference:m.anchor},middleware:[ws({mainAxis:o+L,alignmentAxis:i}),d&&bs({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?xs():void 0,...R}),d&&Ss({...R}),Es({...R,apply:({elements:re,rects:ce,availableWidth:le,availableHeight:Pe})=>{const{width:Te,height:It}=ce.reference,Dt=re.floating.style;Dt.setProperty("--radix-popper-available-width",`${le}px`),Dt.setProperty("--radix-popper-available-height",`${Pe}px`),Dt.setProperty("--radix-popper-anchor-width",`${Te}px`),Dt.setProperty("--radix-popper-anchor-height",`${It}px`)}}),_&&_s({element:_,padding:a}),Is({arrowWidth:P,arrowHeight:L}),v&&Cs({strategy:"referenceHidden",...R})]}),[j,S]=Cr(N),M=Oe(l);ne(()=>{k&&(M==null||M())},[k,M]);const V=(F=A.arrow)==null?void 0:F.x,H=(B=A.arrow)==null?void 0:B.y,K=((X=A.arrow)==null?void 0:X.centerOffset)!==0,[z,Q]=u.useState();return ne(()=>{w&&Q(window.getComputedStyle(w).zIndex)},[w]),x.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:k?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(U=A.transformOrigin)==null?void 0:U.x,(Y=A.transformOrigin)==null?void 0:Y.y].join(" "),...((q=A.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(As,{scope:n,placedSide:j,onArrowChange:E,arrowX:V,arrowY:H,shouldHideArrow:K,children:x.jsx(J.div,{"data-side":j,"data-align":S,...c,ref:b,style:{...c.style,animation:k?void 0:"none"}})})})});xr.displayName=nn;var Sr="PopperArrow",Ms={top:"bottom",right:"left",bottom:"top",left:"right"},Er=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=ks(Sr,r),i=Ms[s.placedSide];return x.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:x.jsx(Ps,{...o,ref:n,style:{...o.style,display:"block"}})})});Er.displayName=Sr;function Ns(e){return e!==null}var Is=e=>({name:"transformOrigin",options:e,fn(t){var m,w,y;const{placement:n,rects:r,middlewareData:o}=t,i=((m=o.arrow)==null?void 0:m.centerOffset)!==0,a=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[f,g]=Cr(n),h={start:"0%",center:"50%",end:"100%"}[g],v=(((w=o.arrow)==null?void 0:w.x)??0)+a/2,p=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let l="",c="";return f==="bottom"?(l=i?h:`${v}px`,c=`${-d}px`):f==="top"?(l=i?h:`${v}px`,c=`${r.floating.height+d}px`):f==="right"?(l=`${-d}px`,c=i?h:`${p}px`):f==="left"&&(l=`${r.floating.width+d}px`,c=i?h:`${p}px`),{data:{x:l,y:c}}}});function Cr(e){const[t,n="center"]=e.split("-");return[t,n]}var _r=yr,rn=br,Rr=xr,Pr=Er,Ds="Portal",on=u.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=u.useState(!1);ne(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?xn.createPortal(x.jsx(J.div,{...r,ref:t}),i):null});on.displayName=Ds;var js=u[" useInsertionEffect ".trim().toString()]||ne;function sn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Ls({defaultProp:t,onChange:n}),a=e!==void 0,d=a?e:o;{const g=u.useRef(e!==void 0);u.useEffect(()=>{const h=g.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=a},[a,r])}const f=u.useCallback(g=>{var h;if(a){const v=Fs(g)?g(e):g;v!==e&&((h=i.current)==null||h.call(i,v))}else s(g)},[a,e,s,i]);return[d,f]}function Ls({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return js(()=>{s.current=t},[t]),u.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Fs(e){return typeof e=="function"}function $s(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Tr=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Bs="VisuallyHidden",Ws=u.forwardRef((e,t)=>x.jsx(J.span,{...e,ref:t,style:{...Tr,...e.style}}));Ws.displayName=Bs;var Vs=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$e=new WeakMap,xt=new WeakMap,St={},an=0,Or=function(e){return e&&(e.host||Or(e.parentNode))},Hs=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Or(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},zs=function(e,t,n,r){var o=Hs(t,Array.isArray(e)?e:[e]);St[n]||(St[n]=new WeakMap);var s=St[n],i=[],a=new Set,d=new Set(o),f=function(h){!h||a.has(h)||(a.add(h),f(h.parentNode))};o.forEach(f);var g=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(v){if(a.has(v))g(v);else try{var p=v.getAttribute(r),l=p!==null&&p!=="false",c=($e.get(v)||0)+1,m=(s.get(v)||0)+1;$e.set(v,c),s.set(v,m),i.push(v),c===1&&l&&xt.set(v,!0),m===1&&v.setAttribute(n,"true"),l||v.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",v,w)}})};return g(t),a.clear(),an++,function(){i.forEach(function(h){var v=$e.get(h)-1,p=s.get(h)-1;$e.set(h,v),s.set(h,p),v||(xt.has(h)||h.removeAttribute(r),xt.delete(h)),p||h.removeAttribute(n)}),an--,an||($e=new WeakMap,$e=new WeakMap,xt=new WeakMap,St={})}},Ar=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Vs(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),zs(r,o,n,"aria-hidden")):function(){return null}},ye=function(){return ye=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ye.apply(this,arguments)};function kr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Us(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Et="right-scroll-bar-position",Ct="width-before-scroll-bar",Ys="with-scroll-bars-hidden",qs="--removed-body-scroll-bar-size";function cn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ks(e,t){var n=Z.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Xs=typeof window<"u"?u.useLayoutEffect:u.useEffect,Mr=new WeakMap;function Zs(e,t){var n=Ks(null,function(r){return e.forEach(function(o){return cn(o,r)})});return Xs(function(){var r=Mr.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||cn(a,null)}),s.forEach(function(a){o.has(a)||cn(a,i)})}Mr.set(n,e)},[e]),n}function Gs(e){return e}function Js(e,t){t===void 0&&(t=Gs);var n=[],r=!1,o={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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var d=function(){var g=i;i=[],g.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(g){i.push(g),f()},filter:function(g){return i=i.filter(g),n}}}};return o}function Qs(e){e===void 0&&(e={});var t=Js(null);return t.options=ye({async:!0,ssr:!1},e),t}var Nr=function(e){var t=e.sideCar,n=kr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,ye({},n))};Nr.isSideCarExport=!0;function ea(e,t){return e.useMedium(t),Nr}var Ir=Qs(),ln=function(){},_t=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:ln,onWheelCapture:ln,onTouchMoveCapture:ln}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,d=e.className,f=e.removeScrollBar,g=e.enabled,h=e.shards,v=e.sideCar,p=e.noRelative,l=e.noIsolation,c=e.inert,m=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,b=e.gapMode,_=kr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,O=Zs([n,t]),P=ye(ye({},_),o);return u.createElement(u.Fragment,null,g&&u.createElement(E,{sideCar:Ir,removeScrollBar:f,shards:h,noRelative:p,noIsolation:l,inert:c,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:b}),i?u.cloneElement(u.Children.only(a),ye(ye({},P),{ref:O})):u.createElement(y,ye({},P,{className:d,ref:O}),a))});_t.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_t.classNames={fullWidth:Ct,zeroRight:Et};var ta=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function na(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ta();return t&&e.setAttribute("nonce",t),e}function ra(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ia=function(){var e=0,t=null;return{add:function(n){e==0&&(t=na())&&(ra(t,n),oa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sa=function(){var e=ia();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Dr=function(){var e=sa(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},aa={left:0,top:0,right:0,gap:0},un=function(e){return parseInt(e||"",10)||0},ca=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[un(n),un(r),un(o)]},la=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return aa;var t=ca(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])}},ua=Dr(),Be="data-scroll-locked",da=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
23
|
+
.`.concat(Ys,` {
|
|
24
|
+
overflow: hidden `).concat(r,`;
|
|
25
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
26
|
+
}
|
|
27
|
+
body[`).concat(Be,`] {
|
|
28
|
+
overflow: hidden `).concat(r,`;
|
|
29
|
+
overscroll-behavior: contain;
|
|
30
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
31
|
+
padding-left: `.concat(o,`px;
|
|
32
|
+
padding-top: `).concat(s,`px;
|
|
33
|
+
padding-right: `).concat(i,`px;
|
|
34
|
+
margin-left:0;
|
|
35
|
+
margin-top:0;
|
|
36
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
37
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.`).concat(Et,` {
|
|
41
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.`).concat(Ct,` {
|
|
45
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.`).concat(Et," .").concat(Et,` {
|
|
49
|
+
right: 0 `).concat(r,`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.`).concat(Ct," .").concat(Ct,` {
|
|
53
|
+
margin-right: 0 `).concat(r,`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
body[`).concat(Be,`] {
|
|
57
|
+
`).concat(qs,": ").concat(a,`px;
|
|
58
|
+
}
|
|
59
|
+
`)},jr=function(){var e=parseInt(document.body.getAttribute(Be)||"0",10);return isFinite(e)?e:0},fa=function(){u.useEffect(function(){return document.body.setAttribute(Be,(jr()+1).toString()),function(){var e=jr()-1;e<=0?document.body.removeAttribute(Be):document.body.setAttribute(Be,e.toString())}},[])},pa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;fa();var s=u.useMemo(function(){return la(o)},[o]);return u.createElement(ua,{styles:da(s,!t,o,n?"":"!important")})},dn=!1;if(typeof window<"u")try{var Rt=Object.defineProperty({},"passive",{get:function(){return dn=!0,!0}});window.addEventListener("test",Rt,Rt),window.removeEventListener("test",Rt,Rt)}catch{dn=!1}var We=dn?{passive:!1}:!1,ha=function(e){return e.tagName==="TEXTAREA"},Lr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ha(e)&&n[t]==="visible")},ma=function(e){return Lr(e,"overflowY")},va=function(e){return Lr(e,"overflowX")},Fr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$r(e,r);if(o){var s=Br(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ga=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ya=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$r=function(e,t){return e==="v"?ma(t):va(t)},Br=function(e,t){return e==="v"?ga(t):ya(t)},wa=function(e,t){return e==="h"&&t==="rtl"?-1:1},ba=function(e,t,n,r,o){var s=wa(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,d=t.contains(a),f=!1,g=i>0,h=0,v=0;do{if(!a)break;var p=Br(e,a),l=p[0],c=p[1],m=p[2],w=c-m-s*l;(l||w)&&$r(e,a)&&(h+=w,v+=l);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(g&&Math.abs(h)<1||!g&&Math.abs(v)<1)&&(f=!0),f},Pt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wr=function(e){return[e.deltaX,e.deltaY]},Vr=function(e){return e&&"current"in e?e.current:e},xa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sa=function(e){return`
|
|
60
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
+
`)},Ea=0,Ve=[];function Ca(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(Ea++)[0],s=u.useState(Dr)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var c=Us([e.lockRef.current],(e.shards||[]).map(Vr),!0).filter(Boolean);return c.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),c.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=u.useCallback(function(c,m){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!i.current.allowPinchZoom;var w=Pt(c),y=n.current,b="deltaX"in c?c.deltaX:y[0]-w[0],_="deltaY"in c?c.deltaY:y[1]-w[1],E,O=c.target,P=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in c&&P==="h"&&O.type==="range")return!1;var L=window.getSelection(),D=L&&L.anchorNode,$=D?D===O||D.contains(O):!1;if($)return!1;var W=Fr(P,O);if(!W)return!0;if(W?E=P:(E=P==="v"?"h":"v",W=Fr(P,O)),!W)return!1;if(!r.current&&"changedTouches"in c&&(b||_)&&(r.current=E),!E)return!0;var C=r.current||E;return ba(C,m,c,C==="h"?b:_)},[]),d=u.useCallback(function(c){var m=c;if(!(!Ve.length||Ve[Ve.length-1]!==s)){var w="deltaY"in m?Wr(m):Pt(m),y=t.current.filter(function(E){return E.name===m.type&&(E.target===m.target||m.target===E.shadowParent)&&xa(E.delta,w)})[0];if(y&&y.should){m.cancelable&&m.preventDefault();return}if(!y){var b=(i.current.shards||[]).map(Vr).filter(Boolean).filter(function(E){return E.contains(m.target)}),_=b.length>0?a(m,b[0]):!i.current.noIsolation;_&&m.cancelable&&m.preventDefault()}}},[]),f=u.useCallback(function(c,m,w,y){var b={name:c,delta:m,target:w,should:y,shadowParent:_a(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),g=u.useCallback(function(c){n.current=Pt(c),r.current=void 0},[]),h=u.useCallback(function(c){f(c.type,Wr(c),c.target,a(c,e.lockRef.current))},[]),v=u.useCallback(function(c){f(c.type,Pt(c),c.target,a(c,e.lockRef.current))},[]);u.useEffect(function(){return Ve.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",d,We),document.addEventListener("touchmove",d,We),document.addEventListener("touchstart",g,We),function(){Ve=Ve.filter(function(c){return c!==s}),document.removeEventListener("wheel",d,We),document.removeEventListener("touchmove",d,We),document.removeEventListener("touchstart",g,We)}},[]);var p=e.removeScrollBar,l=e.inert;return u.createElement(u.Fragment,null,l?u.createElement(s,{styles:Sa(o)}):null,p?u.createElement(pa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _a(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ra=ea(Ir,Ca);var fn=u.forwardRef(function(e,t){return u.createElement(_t,ye({},e,{ref:t,sideCar:Ra}))});fn.classNames=_t.classNames;var Pa=[" ","Enter","ArrowUp","ArrowDown"],Ta=[" ","Enter"],ke="Select",[Tt,Ot,Oa]=Ko(ke),[He,Sl]=ct(ke,[Oa,bt]),At=bt(),[Aa,Ce]=He(ke),[ka,Ma]=He(ke),Hr=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:d,dir:f,name:g,autoComplete:h,disabled:v,required:p,form:l}=e,c=At(t),[m,w]=u.useState(null),[y,b]=u.useState(null),[_,E]=u.useState(!1),O=Zo(f),[P,L]=sn({prop:r,defaultProp:o??!1,onChange:s,caller:ke}),[D,$]=sn({prop:i,defaultProp:a,onChange:d,caller:ke}),W=u.useRef(null),C=m?l||!!m.closest("form"):!0,[R,T]=u.useState(new Set),I=Array.from(R).map(N=>N.props.value).join(";");return x.jsx(_r,{...c,children:x.jsxs(Aa,{required:p,scope:t,trigger:m,onTriggerChange:w,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:_,onValueNodeHasChildrenChange:E,contentId:lt(),value:D,onValueChange:$,open:P,onOpenChange:L,dir:O,triggerPointerDownPosRef:W,disabled:v,children:[x.jsx(Tt.Provider,{scope:t,children:x.jsx(ka,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(N=>{T(k=>new Set(k).add(N))},[]),onNativeOptionRemove:u.useCallback(N=>{T(k=>{const A=new Set(k);return A.delete(N),A})},[]),children:n})}),C?x.jsxs(co,{"aria-hidden":!0,required:p,tabIndex:-1,name:g,autoComplete:h,value:D,onChange:N=>$(N.target.value),disabled:v,form:l,children:[D===void 0?x.jsx("option",{value:""}):null,Array.from(R)]},I):null]})})};Hr.displayName=ke;var zr="SelectTrigger",Ur=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=At(n),i=Ce(zr,n),a=i.disabled||r,d=ee(t,i.onTriggerChange),f=Ot(n),g=u.useRef("touch"),[h,v,p]=uo(c=>{const m=f().filter(b=>!b.disabled),w=m.find(b=>b.value===i.value),y=fo(m,c,w);y!==void 0&&i.onValueChange(y.value)}),l=c=>{a||(i.onOpenChange(!0),p()),c&&(i.triggerPointerDownPosRef.current={x:Math.round(c.pageX),y:Math.round(c.pageY)})};return x.jsx(rn,{asChild:!0,...s,children:x.jsx(J.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":lo(i.value)?"":void 0,...o,ref:d,onClick:G(o.onClick,c=>{c.currentTarget.focus(),g.current!=="mouse"&&l(c)}),onPointerDown:G(o.onPointerDown,c=>{g.current=c.pointerType;const m=c.target;m.hasPointerCapture(c.pointerId)&&m.releasePointerCapture(c.pointerId),c.button===0&&c.ctrlKey===!1&&c.pointerType==="mouse"&&(l(c),c.preventDefault())}),onKeyDown:G(o.onKeyDown,c=>{const m=h.current!=="";!(c.ctrlKey||c.altKey||c.metaKey)&&c.key.length===1&&v(c.key),!(m&&c.key===" ")&&Pa.includes(c.key)&&(l(),c.preventDefault())})})})});Ur.displayName=zr;var Yr="SelectValue",qr=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,d=Ce(Yr,n),{onValueNodeHasChildrenChange:f}=d,g=s!==void 0,h=ee(t,d.onValueNodeChange);return ne(()=>{f(g)},[f,g]),x.jsx(J.span,{...a,ref:h,style:{pointerEvents:"none"},children:lo(d.value)?x.jsx(x.Fragment,{children:i}):s})});qr.displayName=Yr;var Na="SelectIcon",Kr=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return x.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Kr.displayName=Na;var Ia="SelectPortal",Xr=e=>x.jsx(on,{asChild:!0,...e});Xr.displayName=Ia;var Me="SelectContent",Zr=u.forwardRef((e,t)=>{const n=Ce(Me,e.__scopeSelect),[r,o]=u.useState();if(ne(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?it.createPortal(x.jsx(Gr,{scope:e.__scopeSelect,children:x.jsx(Tt.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),s):null}return x.jsx(Jr,{...e,ref:t})});Zr.displayName=Me;var pe=10,[Gr,_e]=He(Me),Da="SelectContentImpl",ja=Je("SelectContent.RemoveScroll"),Jr=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:d,align:f,alignOffset:g,arrowPadding:h,collisionBoundary:v,collisionPadding:p,sticky:l,hideWhenDetached:c,avoidCollisions:m,...w}=e,y=Ce(Me,n),[b,_]=u.useState(null),[E,O]=u.useState(null),P=ee(t,F=>_(F)),[L,D]=u.useState(null),[$,W]=u.useState(null),C=Ot(n),[R,T]=u.useState(!1),I=u.useRef(!1);u.useEffect(()=>{if(b)return Ar(b)},[b]),Bn();const N=u.useCallback(F=>{const[B,...X]=C().map(q=>q.ref.current),[U]=X.slice(-1),Y=document.activeElement;for(const q of F)if(q===Y||(q==null||q.scrollIntoView({block:"nearest"}),q===B&&E&&(E.scrollTop=0),q===U&&E&&(E.scrollTop=E.scrollHeight),q==null||q.focus(),document.activeElement!==Y))return},[C,E]),k=u.useCallback(()=>N([L,b]),[N,L,b]);u.useEffect(()=>{R&&k()},[R,k]);const{onOpenChange:A,triggerPointerDownPosRef:j}=y;u.useEffect(()=>{if(b){let F={x:0,y:0};const B=U=>{var Y,q;F={x:Math.abs(Math.round(U.pageX)-(((Y=j.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(U.pageY)-(((q=j.current)==null?void 0:q.y)??0))}},X=U=>{F.x<=10&&F.y<=10?U.preventDefault():b.contains(U.target)||A(!1),document.removeEventListener("pointermove",B),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",X,{capture:!0})}}},[b,A,j]),u.useEffect(()=>{const F=()=>A(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[A]);const[S,M]=uo(F=>{const B=C().filter(Y=>!Y.disabled),X=B.find(Y=>Y.ref.current===document.activeElement),U=fo(B,F,X);U&&setTimeout(()=>U.ref.current.focus())}),V=u.useCallback((F,B,X)=>{const U=!I.current&&!X;(y.value!==void 0&&y.value===B||U)&&(D(F),U&&(I.current=!0))},[y.value]),H=u.useCallback(()=>b==null?void 0:b.focus(),[b]),K=u.useCallback((F,B,X)=>{const U=!I.current&&!X;(y.value!==void 0&&y.value===B||U)&&W(F)},[y.value]),z=r==="popper"?pn:Qr,Q=z===pn?{side:a,sideOffset:d,align:f,alignOffset:g,arrowPadding:h,collisionBoundary:v,collisionPadding:p,sticky:l,hideWhenDetached:c,avoidCollisions:m}:{};return x.jsx(Gr,{scope:n,content:b,viewport:E,onViewportChange:O,itemRefCallback:V,selectedItem:L,onItemLeave:H,itemTextRefCallback:K,focusSelectedItem:k,selectedItemText:$,position:r,isPositioned:R,searchRef:S,children:x.jsx(fn,{as:ja,allowPinchZoom:!0,children:x.jsx(Ht,{asChild:!0,trapped:y.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:G(o,F=>{var B;(B=y.trigger)==null||B.focus({preventScroll:!0}),F.preventDefault()}),children:x.jsx($t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:x.jsx(z,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:F=>F.preventDefault(),...w,...Q,onPlaced:()=>T(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:G(w.onKeyDown,F=>{const B=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!B&&F.key.length===1&&M(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let U=C().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(F.key)&&(U=U.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const Y=F.target,q=U.indexOf(Y);U=U.slice(q+1)}setTimeout(()=>N(U)),F.preventDefault()}})})})})})})});Jr.displayName=Da;var La="SelectItemAlignedPosition",Qr=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ce(Me,n),i=_e(Me,n),[a,d]=u.useState(null),[f,g]=u.useState(null),h=ee(t,P=>g(P)),v=Ot(n),p=u.useRef(!1),l=u.useRef(!0),{viewport:c,selectedItem:m,selectedItemText:w,focusSelectedItem:y}=i,b=u.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&f&&c&&m&&w){const P=s.trigger.getBoundingClientRect(),L=f.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),$=w.getBoundingClientRect();if(s.dir!=="rtl"){const Y=$.left-L.left,q=D.left-Y,re=P.left-q,ce=P.width+re,le=Math.max(ce,L.width),Pe=window.innerWidth-pe,Te=Nn(q,[pe,Math.max(pe,Pe-le)]);a.style.minWidth=ce+"px",a.style.left=Te+"px"}else{const Y=L.right-$.right,q=window.innerWidth-D.right-Y,re=window.innerWidth-P.right-q,ce=P.width+re,le=Math.max(ce,L.width),Pe=window.innerWidth-pe,Te=Nn(q,[pe,Math.max(pe,Pe-le)]);a.style.minWidth=ce+"px",a.style.right=Te+"px"}const W=v(),C=window.innerHeight-pe*2,R=c.scrollHeight,T=window.getComputedStyle(f),I=parseInt(T.borderTopWidth,10),N=parseInt(T.paddingTop,10),k=parseInt(T.borderBottomWidth,10),A=parseInt(T.paddingBottom,10),j=I+N+R+A+k,S=Math.min(m.offsetHeight*5,j),M=window.getComputedStyle(c),V=parseInt(M.paddingTop,10),H=parseInt(M.paddingBottom,10),K=P.top+P.height/2-pe,z=C-K,Q=m.offsetHeight/2,F=m.offsetTop+Q,B=I+N+F,X=j-B;if(B<=K){const Y=W.length>0&&m===W[W.length-1].ref.current;a.style.bottom="0px";const q=f.clientHeight-c.offsetTop-c.offsetHeight,re=Math.max(z,Q+(Y?H:0)+q+k),ce=B+re;a.style.height=ce+"px"}else{const Y=W.length>0&&m===W[0].ref.current;a.style.top="0px";const re=Math.max(K,I+c.offsetTop+(Y?V:0)+Q)+X;a.style.height=re+"px",c.scrollTop=B-K+c.offsetTop}a.style.margin=`${pe}px 0`,a.style.minHeight=S+"px",a.style.maxHeight=C+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[v,s.trigger,s.valueNode,a,f,c,m,w,s.dir,r]);ne(()=>b(),[b]);const[_,E]=u.useState();ne(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);const O=u.useCallback(P=>{P&&l.current===!0&&(b(),y==null||y(),l.current=!1)},[b,y]);return x.jsx($a,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:O,children:x.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:x.jsx(J.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Qr.displayName=La;var Fa="SelectPopperPosition",pn=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=pe,...s}=e,i=At(n);return x.jsx(Rr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});pn.displayName=Fa;var[$a,hn]=He(Me,{}),mn="SelectViewport",eo=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=_e(mn,n),i=hn(mn,n),a=ee(t,s.onViewportChange),d=u.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),x.jsx(Tt.Slot,{scope:n,children:x.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:G(o.onScroll,f=>{const g=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=i;if(v!=null&&v.current&&h){const p=Math.abs(d.current-g.scrollTop);if(p>0){const l=window.innerHeight-pe*2,c=parseFloat(h.style.minHeight),m=parseFloat(h.style.height),w=Math.max(c,m);if(w<l){const y=w+p,b=Math.min(l,y),_=y-b;h.style.height=b+"px",h.style.bottom==="0px"&&(g.scrollTop=_>0?_:0,h.style.justifyContent="flex-end")}}}d.current=g.scrollTop})})})]})});eo.displayName=mn;var to="SelectGroup",[Ba,Wa]=He(to),Va=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=lt();return x.jsx(Ba,{scope:n,id:o,children:x.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Va.displayName=to;var no="SelectLabel",Ha=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wa(no,n);return x.jsx(J.div,{id:o.id,...r,ref:t})});Ha.displayName=no;var kt="SelectItem",[za,ro]=He(kt),oo=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Ce(kt,n),d=_e(kt,n),f=a.value===r,[g,h]=u.useState(s??""),[v,p]=u.useState(!1),l=ee(t,y=>{var b;return(b=d.itemRefCallback)==null?void 0:b.call(d,y,r,o)}),c=lt(),m=u.useRef("touch"),w=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(za,{scope:n,value:r,disabled:o,textId:c,isSelected:f,onItemTextChange:u.useCallback(y=>{h(b=>b||((y==null?void 0:y.textContent)??"").trim())},[]),children:x.jsx(Tt.ItemSlot,{scope:n,value:r,disabled:o,textValue:g,children:x.jsx(J.div,{role:"option","aria-labelledby":c,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:l,onFocus:G(i.onFocus,()=>p(!0)),onBlur:G(i.onBlur,()=>p(!1)),onClick:G(i.onClick,()=>{m.current!=="mouse"&&w()}),onPointerUp:G(i.onPointerUp,()=>{m.current==="mouse"&&w()}),onPointerDown:G(i.onPointerDown,y=>{m.current=y.pointerType}),onPointerMove:G(i.onPointerMove,y=>{var b;m.current=y.pointerType,o?(b=d.onItemLeave)==null||b.call(d):m.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(i.onPointerLeave,y=>{var b;y.currentTarget===document.activeElement&&((b=d.onItemLeave)==null||b.call(d))}),onKeyDown:G(i.onKeyDown,y=>{var _;((_=d.searchRef)==null?void 0:_.current)!==""&&y.key===" "||(Ta.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});oo.displayName=kt;var nt="SelectItemText",io=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Ce(nt,n),a=_e(nt,n),d=ro(nt,n),f=Ma(nt,n),[g,h]=u.useState(null),v=ee(t,w=>h(w),d.onItemTextChange,w=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,w,d.value,d.disabled)}),p=g==null?void 0:g.textContent,l=u.useMemo(()=>x.jsx("option",{value:d.value,disabled:d.disabled,children:p},d.value),[d.disabled,d.value,p]),{onNativeOptionAdd:c,onNativeOptionRemove:m}=f;return ne(()=>(c(l),()=>m(l)),[c,m,l]),x.jsxs(x.Fragment,{children:[x.jsx(J.span,{id:d.textId,...s,ref:v}),d.isSelected&&i.valueNode&&!i.valueNodeHasChildren?it.createPortal(s.children,i.valueNode):null]})});io.displayName=nt;var so="SelectItemIndicator",Ua=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ro(so,n).isSelected?x.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});Ua.displayName=so;var vn="SelectScrollUpButton",Ya=u.forwardRef((e,t)=>{const n=_e(vn,e.__scopeSelect),r=hn(vn,e.__scopeSelect),[o,s]=u.useState(!1),i=ee(t,r.onScrollButtonChange);return ne(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=d.scrollTop>0;s(f)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(ao,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop-d.offsetHeight)}}):null});Ya.displayName=vn;var gn="SelectScrollDownButton",qa=u.forwardRef((e,t)=>{const n=_e(gn,e.__scopeSelect),r=hn(gn,e.__scopeSelect),[o,s]=u.useState(!1),i=ee(t,r.onScrollButtonChange);return ne(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=d.scrollHeight-d.clientHeight,g=Math.ceil(d.scrollTop)<f;s(g)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(ao,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop+d.offsetHeight)}}):null});qa.displayName=gn;var ao=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=_e("SelectScrollButton",n),i=u.useRef(null),a=Ot(n),d=u.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return u.useEffect(()=>()=>d(),[d]),ne(()=>{var g;const f=a().find(h=>h.ref.current===document.activeElement);(g=f==null?void 0:f.ref.current)==null||g.scrollIntoView({block:"nearest"})},[a]),x.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:G(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:G(o.onPointerMove,()=>{var f;(f=s.onItemLeave)==null||f.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:G(o.onPointerLeave,()=>{d()})})}),Ka="SelectSeparator",Xa=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});Xa.displayName=Ka;var yn="SelectArrow",Za=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=At(n),s=Ce(yn,n),i=_e(yn,n);return s.open&&i.position==="popper"?x.jsx(Pr,{...o,...r,ref:t}):null});Za.displayName=yn;var Ga="SelectBubbleInput",co=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),s=ee(r,o),i=$s(t);return u.useEffect(()=>{const a=o.current;if(!a)return;const d=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(d,"value").set;if(i!==t&&g){const h=new Event("change",{bubbles:!0});g.call(a,t),a.dispatchEvent(h)}},[i,t]),x.jsx(J.select,{...n,style:{...Tr,...n.style},ref:s,defaultValue:t})});co.displayName=Ga;function lo(e){return e===""||e===void 0}function uo(e){const t=Oe(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(i=>{const a=n.current+i;t(a),function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(a)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function fo(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Ja(e,Math.max(s,0));o.length===1&&(i=i.filter(f=>f!==n));const d=i.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Ja(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Qa=Hr,ec=Ur,tc=qr,nc=Kr,rc=Xr,oc=Zr,ic=eo,sc=oo,ac=io;const rt={trigger:"_trigger_14rt8_1",icon:"_icon_14rt8_33",content:"_content_14rt8_39",viewport:"_viewport_14rt8_47",item:"_item_14rt8_51"},cc=({value:e,onValueChange:t,options:n,placeholder:r="Select...",className:o="",disabled:s=!1})=>x.jsxs(Qa,{value:e,onValueChange:t,disabled:s,children:[x.jsxs(ec,{className:`${rt.trigger} ${o}`,children:[x.jsx(tc,{placeholder:r}),x.jsx(nc,{className:rt.icon,children:x.jsx(Oo,{size:14,color:"currentColor"})})]}),x.jsx(rc,{children:x.jsx(oc,{className:rt.content,position:"popper",sideOffset:4,children:x.jsx(ic,{className:rt.viewport,children:n.map(i=>x.jsx(sc,{value:i.value,className:rt.item,children:x.jsx(ac,{children:i.label})},i.value))})})})]});function lc(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var wn=e=>{const{present:t,children:n}=e,r=uc(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=ee(r.ref,dc(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};wn.displayName="Presence";function uc(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),i=e?"mounted":"unmounted",[a,d]=lc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const f=Mt(r.current);s.current=a==="mounted"?f:"none"},[a]),ne(()=>{const f=r.current,g=o.current;if(g!==e){const v=s.current,p=Mt(f);e?d("MOUNT"):p==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(g&&v!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),ne(()=>{if(t){let f;const g=t.ownerDocument.defaultView??window,h=p=>{const c=Mt(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&c&&(d("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",f=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},v=p=>{p.target===t&&(s.current=Mt(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{g.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Mt(e){return(e==null?void 0:e.animationName)||"none"}function dc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nt="Popover",[po,Tl]=ct(Nt,[bt]),ot=bt(),[fc,Re]=po(Nt),ho=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=ot(t),d=u.useRef(null),[f,g]=u.useState(!1),[h,v]=sn({prop:r,defaultProp:o??!1,onChange:s,caller:Nt});return x.jsx(_r,{...a,children:x.jsx(fc,{scope:t,contentId:lt(),triggerRef:d,open:h,onOpenChange:v,onOpenToggle:u.useCallback(()=>v(p=>!p),[v]),hasCustomAnchor:f,onCustomAnchorAdd:u.useCallback(()=>g(!0),[]),onCustomAnchorRemove:u.useCallback(()=>g(!1),[]),modal:i,children:n})})};ho.displayName=Nt;var mo="PopoverAnchor",pc=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Re(mo,n),s=ot(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return u.useEffect(()=>(i(),()=>a()),[i,a]),x.jsx(rn,{...s,...r,ref:t})});pc.displayName=mo;var vo="PopoverTrigger",go=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Re(vo,n),s=ot(n),i=ee(t,o.triggerRef),a=x.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":So(o.open),...r,ref:i,onClick:G(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:x.jsx(rn,{asChild:!0,...s,children:a})});go.displayName=vo;var bn="PopoverPortal",[hc,mc]=po(bn,{forceMount:void 0}),yo=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Re(bn,t);return x.jsx(hc,{scope:t,forceMount:n,children:x.jsx(wn,{present:n||s.open,children:x.jsx(on,{asChild:!0,container:o,children:r})})})};yo.displayName=bn;var ze="PopoverContent",wo=u.forwardRef((e,t)=>{const n=mc(ze,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Re(ze,e.__scopePopover);return x.jsx(wn,{present:r||s.open,children:s.modal?x.jsx(gc,{...o,ref:t}):x.jsx(yc,{...o,ref:t})})});wo.displayName=ze;var vc=Je("PopoverContent.RemoveScroll"),gc=u.forwardRef((e,t)=>{const n=Re(ze,e.__scopePopover),r=u.useRef(null),o=ee(t,r),s=u.useRef(!1);return u.useEffect(()=>{const i=r.current;if(i)return Ar(i)},[]),x.jsx(fn,{as:vc,allowPinchZoom:!0,children:x.jsx(bo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,f=a.button===2||d;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:G(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),yc=u.forwardRef((e,t)=>{const n=Re(ze,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return x.jsx(bo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((f=n.triggerRef.current)==null?void 0:f.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),bo=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:g,...h}=e,v=Re(ze,n),p=ot(n);return Bn(),x.jsx(Ht,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx($t,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:g,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:f,onDismiss:()=>v.onOpenChange(!1),children:x.jsx(Rr,{"data-state":So(v.open),role:"dialog",id:v.contentId,...p,...h,ref:t,style:{...h.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)"}})})})}),xo="PopoverClose",wc=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Re(xo,n);return x.jsx(J.button,{type:"button",...r,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});wc.displayName=xo;var bc="PopoverArrow",xc=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ot(n);return x.jsx(Pr,{...o,...r,ref:t})});xc.displayName=bc;function So(e){return e?"open":"closed"}var Sc=ho,Ec=go,Cc=yo,_c=wo;const Rc={content:"_content_1qahr_1"},Pc=({trigger:e,children:t,open:n,onOpenChange:r,align:o="end",side:s="bottom",sideOffset:i=5,className:a=""})=>x.jsxs(Sc,{open:n,onOpenChange:r,children:[x.jsx(Ec,{asChild:!0,children:e}),x.jsx(Cc,{children:x.jsx(_c,{className:`${Rc.content} ${a}`,align:o,side:s,sideOffset:i,children:t})})]});te.Base=To,te.Button=Ro,te.Checkbox=Po,te.FilterPanelBase=No,te.InputField=jo,te.Popover=Pc,te.RadioButton=Lo,te.SearchField=Do,te.Select=cc,te.Slider=Wo,te.ToggleSwitch=Fo,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|