@rangka/client 0.1.1 → 0.1.3
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/dist/App.d.ts.map +1 -1
- package/dist/App.js +7 -1
- package/dist/App.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -0
- package/dist/main.js.map +1 -1
- package/dist/shell/assets/index-63v1sBS3.css +1 -0
- package/dist/shell/assets/index-Dh7K40cQ.js +8634 -0
- package/dist/shell/assets/vendor-query-B2cydN5j.js +1 -0
- package/dist/shell/assets/vendor-radix-BJxYPxPb.js +69 -0
- package/dist/shell/assets/vendor-router-ET_myMt5.js +17 -0
- package/dist/shell/index.html +5 -2
- package/dist/theme.css +82 -0
- package/dist/widgets/components/lazy-manifest.d.ts +11 -0
- package/dist/widgets/components/lazy-manifest.d.ts.map +1 -0
- package/dist/widgets/components/lazy-manifest.js +32 -0
- package/dist/widgets/components/lazy-manifest.js.map +1 -0
- package/dist/widgets/components/register.js +12 -12
- package/dist/widgets/components/register.js.map +1 -1
- package/dist/widgets/loader.d.ts +3 -0
- package/dist/widgets/loader.d.ts.map +1 -0
- package/dist/widgets/loader.js +73 -0
- package/dist/widgets/loader.js.map +1 -0
- package/dist/widgets/renderer/LazyWidget.d.ts +8 -0
- package/dist/widgets/renderer/LazyWidget.d.ts.map +1 -0
- package/dist/widgets/renderer/LazyWidget.js +31 -0
- package/dist/widgets/renderer/LazyWidget.js.map +1 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.d.ts +17 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.d.ts.map +1 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.js +18 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.js.map +1 -0
- package/dist/widgets/renderer/WidgetRenderer.d.ts.map +1 -1
- package/dist/widgets/renderer/WidgetRenderer.js +8 -6
- package/dist/widgets/renderer/WidgetRenderer.js.map +1 -1
- package/package.json +7 -4
- package/.claude/skills/add-widget/SKILL.md +0 -101
- package/.turbo/turbo-build.log +0 -29
- package/CHANGELOG.md +0 -25
- package/CLAUDE.md +0 -236
- package/components.json +0 -25
- package/dist/components/ui/chart.d.ts +0 -45
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/chart.js +0 -119
- package/dist/components/ui/chart.js.map +0 -1
- package/dist/shell/assets/index--35CAvcP.js +0 -8715
- package/dist/shell/assets/index-COLmoPYo.css +0 -1
- package/index.html +0 -12
- package/src/App.tsx +0 -44
- package/src/__tests__/setup.ts +0 -1
- package/src/api/auth.ts +0 -41
- package/src/api/boot.ts +0 -10
- package/src/api/client.ts +0 -26
- package/src/api/paths.ts +0 -3
- package/src/api/token.ts +0 -13
- package/src/auth/LoginForm.tsx +0 -67
- package/src/auth/SessionExpired.tsx +0 -24
- package/src/auth/SetupForm.tsx +0 -76
- package/src/boot/BootGate.tsx +0 -35
- package/src/boot/BootProvider.tsx +0 -28
- package/src/boot/types.ts +0 -9
- package/src/boot/useBoot.ts +0 -111
- package/src/components/Icon.tsx +0 -17
- package/src/components/ui/accordion.tsx +0 -82
- package/src/components/ui/alert-dialog.tsx +0 -180
- package/src/components/ui/alert.tsx +0 -76
- package/src/components/ui/aspect-ratio.tsx +0 -9
- package/src/components/ui/avatar.tsx +0 -94
- package/src/components/ui/badge.tsx +0 -45
- package/src/components/ui/breadcrumb.tsx +0 -104
- package/src/components/ui/button-group.tsx +0 -78
- package/src/components/ui/button.tsx +0 -65
- package/src/components/ui/calendar.tsx +0 -187
- package/src/components/ui/card.tsx +0 -85
- package/src/components/ui/carousel.tsx +0 -229
- package/src/components/ui/chart.tsx +0 -339
- package/src/components/ui/checkbox.tsx +0 -27
- package/src/components/ui/collapsible.tsx +0 -21
- package/src/components/ui/combobox.tsx +0 -275
- package/src/components/ui/command.tsx +0 -178
- package/src/components/ui/context-menu.tsx +0 -242
- package/src/components/ui/dialog.tsx +0 -146
- package/src/components/ui/direction.tsx +0 -20
- package/src/components/ui/drawer.tsx +0 -118
- package/src/components/ui/dropdown-menu.tsx +0 -247
- package/src/components/ui/empty.tsx +0 -94
- package/src/components/ui/field.tsx +0 -224
- package/src/components/ui/hover-card.tsx +0 -36
- package/src/components/ui/input-group.tsx +0 -142
- package/src/components/ui/input-otp.tsx +0 -86
- package/src/components/ui/input.tsx +0 -19
- package/src/components/ui/item.tsx +0 -182
- package/src/components/ui/kbd.tsx +0 -26
- package/src/components/ui/label.tsx +0 -19
- package/src/components/ui/menubar.tsx +0 -260
- package/src/components/ui/native-select.tsx +0 -55
- package/src/components/ui/navigation-menu.tsx +0 -160
- package/src/components/ui/pagination.tsx +0 -112
- package/src/components/ui/popover.tsx +0 -74
- package/src/components/ui/progress.tsx +0 -31
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -42
- package/src/components/ui/scroll-area.tsx +0 -53
- package/src/components/ui/select.tsx +0 -185
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/sheet.tsx +0 -128
- package/src/components/ui/sidebar.tsx +0 -669
- package/src/components/ui/skeleton.tsx +0 -13
- package/src/components/ui/slider.tsx +0 -54
- package/src/components/ui/sonner.tsx +0 -43
- package/src/components/ui/spinner.tsx +0 -16
- package/src/components/ui/switch.tsx +0 -33
- package/src/components/ui/table.tsx +0 -87
- package/src/components/ui/tabs.tsx +0 -80
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/toggle-group.tsx +0 -86
- package/src/components/ui/toggle.tsx +0 -44
- package/src/components/ui/tooltip.tsx +0 -53
- package/src/context/MetaContext.tsx +0 -22
- package/src/context/ModuleContext.tsx +0 -62
- package/src/context/PermissionsContext.tsx +0 -39
- package/src/context/ShellProviders.tsx +0 -33
- package/src/context/UserContext.tsx +0 -16
- package/src/data/QueryProvider.tsx +0 -7
- package/src/data/queryClient.ts +0 -18
- package/src/data/useModelMeta.ts +0 -17
- package/src/data/useMutation.ts +0 -60
- package/src/data/useRecord.ts +0 -29
- package/src/data/useSource.ts +0 -112
- package/src/hooks/use-mobile.ts +0 -19
- package/src/index.css +0 -260
- package/src/index.ts +0 -16
- package/src/lib/utils.ts +0 -6
- package/src/main.tsx +0 -17
- package/src/router/NotFound.tsx +0 -8
- package/src/router/RouterProvider.tsx +0 -7
- package/src/router/buildRouteTree.tsx +0 -63
- package/src/router/createShellRouter.ts +0 -9
- package/src/router/hooks.ts +0 -43
- package/src/shell/CommandPalette.tsx +0 -76
- package/src/shell/ConfirmDialog.tsx +0 -34
- package/src/shell/ConfirmProvider.tsx +0 -56
- package/src/shell/DrawerContext.tsx +0 -44
- package/src/shell/HeaderActions.tsx +0 -31
- package/src/shell/ModuleSelectorPage.tsx +0 -149
- package/src/shell/PageOutlet.tsx +0 -21
- package/src/shell/ShellContext.tsx +0 -45
- package/src/shell/ShellDevTools.tsx +0 -153
- package/src/shell/ShellLayout.tsx +0 -231
- package/src/shell/Toast.tsx +0 -58
- package/src/shell/ToastProvider.tsx +0 -60
- package/src/shell/app-sidebar/AppSidebar.tsx +0 -44
- package/src/shell/app-sidebar/ModuleSwitcher.tsx +0 -87
- package/src/shell/app-sidebar/NavMain.tsx +0 -64
- package/src/shell/app-sidebar/NavUser.tsx +0 -97
- package/src/shell/app-sidebar/SearchMenu.tsx +0 -22
- package/src/shell/app-sidebar/index.ts +0 -8
- package/src/shell/app-sidebar/types.ts +0 -38
- package/src/shell/types.ts +0 -6
- package/src/shell/useBreadcrumbs.ts +0 -42
- package/src/studio/bridge.ts +0 -125
- package/src/studio/index.ts +0 -3
- package/src/studio/overlay.ts +0 -47
- package/src/studio/types.ts +0 -32
- package/src/studio/walker.ts +0 -48
- package/src/vite-env.d.ts +0 -1
- package/src/widgets/__tests__/action-edge-cases.test.ts +0 -281
- package/src/widgets/__tests__/action.test.ts +0 -236
- package/src/widgets/__tests__/attachment-widget.test.tsx +0 -85
- package/src/widgets/__tests__/attachments-widget.test.tsx +0 -109
- package/src/widgets/__tests__/binding.test.ts +0 -76
- package/src/widgets/__tests__/button-widget.test.tsx +0 -145
- package/src/widgets/__tests__/checkbox-widget.test.tsx +0 -158
- package/src/widgets/__tests__/code-widget.test.tsx +0 -64
- package/src/widgets/__tests__/computed-widget.test.tsx +0 -62
- package/src/widgets/__tests__/condition-edge-cases.test.ts +0 -120
- package/src/widgets/__tests__/condition.test.ts +0 -221
- package/src/widgets/__tests__/context.test.ts +0 -99
- package/src/widgets/__tests__/data-widget.test.tsx +0 -204
- package/src/widgets/__tests__/datepicker-widget.test.tsx +0 -66
- package/src/widgets/__tests__/datetime-widget.test.tsx +0 -67
- package/src/widgets/__tests__/drawer-widget.test.tsx +0 -149
- package/src/widgets/__tests__/dynamic-link-widget.test.tsx +0 -52
- package/src/widgets/__tests__/edge-cases.test.ts +0 -232
- package/src/widgets/__tests__/evaluator.test.ts +0 -107
- package/src/widgets/__tests__/functions.test.ts +0 -147
- package/src/widgets/__tests__/grid-widget.test.tsx +0 -137
- package/src/widgets/__tests__/hooks.test.tsx +0 -249
- package/src/widgets/__tests__/icon-widget.test.tsx +0 -129
- package/src/widgets/__tests__/input-widget.test.tsx +0 -264
- package/src/widgets/__tests__/integration.test.ts +0 -116
- package/src/widgets/__tests__/json-widget.test.tsx +0 -70
- package/src/widgets/__tests__/link-widget.test.tsx +0 -92
- package/src/widgets/__tests__/many-to-many-widget.test.tsx +0 -93
- package/src/widgets/__tests__/modal-widget.test.tsx +0 -148
- package/src/widgets/__tests__/money-widget.test.tsx +0 -97
- package/src/widgets/__tests__/parser.test.ts +0 -171
- package/src/widgets/__tests__/reactive-variables.test.ts +0 -383
- package/src/widgets/__tests__/renderer.test.tsx +0 -300
- package/src/widgets/__tests__/repeat-widget.test.tsx +0 -229
- package/src/widgets/__tests__/select-widget.test.tsx +0 -231
- package/src/widgets/__tests__/sequence-widget.test.tsx +0 -58
- package/src/widgets/__tests__/shell-integration.test.tsx +0 -1343
- package/src/widgets/__tests__/split-widget.test.tsx +0 -133
- package/src/widgets/__tests__/state-edge-cases.test.ts +0 -118
- package/src/widgets/__tests__/state.test.ts +0 -106
- package/src/widgets/__tests__/table-data-binding.test.tsx +0 -482
- package/src/widgets/__tests__/table-filter-popover.test.tsx +0 -486
- package/src/widgets/__tests__/table-search.test.tsx +0 -305
- package/src/widgets/__tests__/table-widget.test.tsx +0 -509
- package/src/widgets/__tests__/textarea-widget.test.tsx +0 -105
- package/src/widgets/__tests__/tracker-validator-edge-cases.test.ts +0 -242
- package/src/widgets/__tests__/tracker.test.ts +0 -133
- package/src/widgets/__tests__/tree-widget.test.tsx +0 -97
- package/src/widgets/__tests__/use-model-source.test.ts +0 -67
- package/src/widgets/__tests__/validator.test.ts +0 -208
- package/src/widgets/action/dispatcher.ts +0 -334
- package/src/widgets/action/index.ts +0 -2
- package/src/widgets/binding/index.ts +0 -2
- package/src/widgets/binding/resolver.ts +0 -61
- package/src/widgets/components/AttachmentWidget.tsx +0 -111
- package/src/widgets/components/AttachmentsWidget.tsx +0 -121
- package/src/widgets/components/BadgeWidget.tsx +0 -35
- package/src/widgets/components/ButtonWidget.tsx +0 -43
- package/src/widgets/components/CardWidget.tsx +0 -68
- package/src/widgets/components/CheckboxWidget.tsx +0 -39
- package/src/widgets/components/CodeWidget.tsx +0 -44
- package/src/widgets/components/ColumnWidget.tsx +0 -22
- package/src/widgets/components/ComputedWidget.tsx +0 -49
- package/src/widgets/components/DataWidget.tsx +0 -189
- package/src/widgets/components/DatePickerWidget.tsx +0 -73
- package/src/widgets/components/DatetimeWidget.tsx +0 -160
- package/src/widgets/components/DividerWidget.tsx +0 -37
- package/src/widgets/components/DrawerWidget.tsx +0 -52
- package/src/widgets/components/DynamicLinkWidget.tsx +0 -130
- package/src/widgets/components/GridWidget.tsx +0 -134
- package/src/widgets/components/GroupWidget.tsx +0 -111
- package/src/widgets/components/IconWidget.tsx +0 -29
- package/src/widgets/components/ImageWidget.tsx +0 -28
- package/src/widgets/components/InputWidget.tsx +0 -70
- package/src/widgets/components/JsonWidget.tsx +0 -78
- package/src/widgets/components/LinkWidget.tsx +0 -99
- package/src/widgets/components/ManyToManyWidget.tsx +0 -125
- package/src/widgets/components/ModalWidget.tsx +0 -52
- package/src/widgets/components/MoneyWidget.tsx +0 -80
- package/src/widgets/components/RepeatWidget.tsx +0 -66
- package/src/widgets/components/ScrollAreaWidget.tsx +0 -40
- package/src/widgets/components/SectionWidget.tsx +0 -78
- package/src/widgets/components/SelectWidget.tsx +0 -63
- package/src/widgets/components/SequenceWidget.tsx +0 -32
- package/src/widgets/components/SpacerWidget.tsx +0 -29
- package/src/widgets/components/SplitWidget.tsx +0 -60
- package/src/widgets/components/StackWidget.tsx +0 -44
- package/src/widgets/components/TableWidget.tsx +0 -366
- package/src/widgets/components/TextWidget.tsx +0 -44
- package/src/widgets/components/TextareaWidget.tsx +0 -49
- package/src/widgets/components/TreeWidget.tsx +0 -109
- package/src/widgets/components/index.ts +0 -30
- package/src/widgets/components/register.ts +0 -93
- package/src/widgets/components/table/CellRenderers.tsx +0 -83
- package/src/widgets/components/table/TablePagination.tsx +0 -45
- package/src/widgets/components/table/TableToolbar.tsx +0 -285
- package/src/widgets/components/table/filter-operators.ts +0 -134
- package/src/widgets/components/table/index.ts +0 -11
- package/src/widgets/condition/evaluator.ts +0 -57
- package/src/widgets/condition/index.ts +0 -1
- package/src/widgets/context/builder.ts +0 -99
- package/src/widgets/context/index.ts +0 -8
- package/src/widgets/context/types.ts +0 -37
- package/src/widgets/data/index.ts +0 -5
- package/src/widgets/data/useModelQuery.ts +0 -116
- package/src/widgets/data/useModelRecord.ts +0 -37
- package/src/widgets/expression/evaluator.ts +0 -100
- package/src/widgets/expression/functions.ts +0 -131
- package/src/widgets/expression/index.ts +0 -13
- package/src/widgets/expression/parser.ts +0 -229
- package/src/widgets/expression/types.ts +0 -45
- package/src/widgets/form/FormContext.ts +0 -29
- package/src/widgets/form/FormProvider.tsx +0 -84
- package/src/widgets/form/FormWidget.tsx +0 -42
- package/src/widgets/form/index.ts +0 -4
- package/src/widgets/form/useFormState.ts +0 -127
- package/src/widgets/form/useFormSubmit.ts +0 -90
- package/src/widgets/form/useFormValidation.ts +0 -62
- package/src/widgets/hooks/index.ts +0 -8
- package/src/widgets/hooks/useAction.ts +0 -83
- package/src/widgets/hooks/useBind.ts +0 -34
- package/src/widgets/hooks/useCondition.ts +0 -21
- package/src/widgets/hooks/useDataQuery.ts +0 -48
- package/src/widgets/hooks/useExpression.ts +0 -14
- package/src/widgets/hooks/usePageState.ts +0 -21
- package/src/widgets/hooks/useSurfaceContext.ts +0 -11
- package/src/widgets/hooks/useWidgetContext.ts +0 -14
- package/src/widgets/index.ts +0 -80
- package/src/widgets/lib/layout-props.ts +0 -135
- package/src/widgets/reactivity/index.ts +0 -11
- package/src/widgets/reactivity/tracker.ts +0 -139
- package/src/widgets/reactivity/variables.ts +0 -213
- package/src/widgets/registry.ts +0 -41
- package/src/widgets/renderer/SlotRenderer.tsx +0 -47
- package/src/widgets/renderer/WidgetRenderer.tsx +0 -191
- package/src/widgets/renderer/index.ts +0 -4
- package/src/widgets/shell/WidgetSlotRenderer.tsx +0 -73
- package/src/widgets/shell/index.ts +0 -4
- package/src/widgets/shell/useActionHandlers.ts +0 -170
- package/src/widgets/state/index.ts +0 -2
- package/src/widgets/state/store.ts +0 -96
- package/src/widgets/types.ts +0 -28
- package/src/widgets/validation/index.ts +0 -2
- package/src/widgets/validation/validator.ts +0 -140
- package/tsconfig.json +0 -27
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -21
- package/vitest.config.ts +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ye=e=>{throw TypeError(e)};var Vt=(e,t,s)=>t.has(e)||ye("Cannot "+s);var r=(e,t,s)=>(Vt(e,t,"read from private field"),s?s.call(e):t.get(e)),h=(e,t,s)=>t.has(e)?ye("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),o=(e,t,s,i)=>(Vt(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),p=(e,t,s)=>(Vt(e,t,"access private method"),s);var Gt=(e,t,s,i)=>({set _(n){o(e,t,n,s)},get _(){return r(e,t,i)}});import{r as H,j as Ve}from"./vendor-radix-BJxYPxPb.js";var Lt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ht,Y,gt,Re,We=(Re=class extends Lt{constructor(){super();h(this,ht);h(this,Y);h(this,gt);o(this,gt,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){r(this,Y)||this.setEventListener(r(this,gt))}onUnsubscribe(){var t;this.hasListeners()||((t=r(this,Y))==null||t.call(this),o(this,Y,void 0))}setEventListener(t){var s;o(this,gt,t),(s=r(this,Y))==null||s.call(this),o(this,Y,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){r(this,ht)!==t&&(o(this,ht,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof r(this,ht)=="boolean"?r(this,ht):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ht=new WeakMap,Y=new WeakMap,gt=new WeakMap,Re),he=new We,$e={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},tt,ue,Fe,Je=(Fe=class{constructor(){h(this,tt,$e);h(this,ue,!1)}setTimeoutProvider(e){o(this,tt,e)}setTimeout(e,t){return r(this,tt).setTimeout(e,t)}clearTimeout(e){r(this,tt).clearTimeout(e)}setInterval(e,t){return r(this,tt).setInterval(e,t)}clearInterval(e){r(this,tt).clearInterval(e)}},tt=new WeakMap,ue=new WeakMap,Fe),ut=new Je;function Ze(e){setTimeout(e,0)}var Xe=typeof window>"u"||"Deno"in globalThis;function _(){}function Ye(e,t){return typeof e=="function"?e(t):e}function Wt(e){return typeof e=="number"&&e>=0&&e!==1/0}function je(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ot(e,t){return typeof e=="function"?e(t):e}function L(e,t){return typeof e=="function"?e(t):e}function pe(e,t){const{type:s="all",exact:i,fetchStatus:n,predicate:a,queryKey:c,stale:u}=e;if(c){if(i){if(t.queryHash!==ce(c,t.options))return!1}else if(!xt(t.queryKey,c))return!1}if(s!=="all"){const y=t.isActive();if(s==="active"&&!y||s==="inactive"&&y)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||n&&n!==t.state.fetchStatus||a&&!a(t))}function ve(e,t){const{exact:s,status:i,predicate:n,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(s){if(Dt(t.options.mutationKey)!==Dt(a))return!1}else if(!xt(t.options.mutationKey,a))return!1}return!(i&&t.state.status!==i||n&&!n(t))}function ce(e,t){return((t==null?void 0:t.queryKeyHashFn)||Dt)(e)}function Dt(e){return JSON.stringify(e,(t,s)=>Jt(s)?Object.keys(s).sort().reduce((i,n)=>(i[n]=s[n],i),{}):s)}function xt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>xt(e[s],t[s])):!1}var ts=Object.prototype.hasOwnProperty;function Ue(e,t,s=0){if(e===t)return e;if(s>500)return t;const i=me(e)&&me(t);if(!i&&!(Jt(e)&&Jt(t)))return t;const a=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),u=c.length,y=i?new Array(u):{};let F=0;for(let g=0;g<u;g++){const d=i?g:c[g],O=e[d],f=t[d];if(O===f){y[d]=O,(i?g<a:ts.call(e,d))&&F++;continue}if(O===null||f===null||typeof O!="object"||typeof f!="object"){y[d]=f;continue}const E=Ue(O,f,s+1);y[d]=E,E===O&&F++}return a===u&&F===a?e:y}function $t(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function me(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jt(e){if(!ge(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!ge(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ge(e){return Object.prototype.toString.call(e)==="[object Object]"}function es(e){return new Promise(t=>{ut.setTimeout(t,e)})}function Zt(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Ue(e,t):t}function xs(e){return e}function ss(e,t,s=0){const i=[...e,t];return s&&i.length>s?i.slice(1):i}function is(e,t,s=0){const i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}var le=Symbol();function qe(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===le?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _e(e,t){return typeof e=="function"?e(...t):!!e}function rs(e,t,s){let i=!1,n;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??(n=t()),i||(i=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}),e}var At=(()=>{let e=()=>Xe;return{isServer(){return e()},setIsServer(t){e=t}}})();function Xt(){let e,t;const s=new Promise((n,a)=>{e=n,t=a});s.status="pending",s.catch(()=>{});function i(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{i({status:"fulfilled",value:n}),e(n)},s.reject=n=>{i({status:"rejected",reason:n}),t(n)},s}var ns=Ze;function as(){let e=[],t=0,s=u=>{u()},i=u=>{u()},n=ns;const a=u=>{t?e.push(u):n(()=>{s(u)})},c=()=>{const u=e;e=[],u.length&&n(()=>{i(()=>{u.forEach(y=>{s(y)})})})};return{batch:u=>{let y;t++;try{y=u()}finally{t--,t||c()}return y},batchCalls:u=>(...y)=>{a(()=>{u(...y)})},schedule:a,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{n=u}}}var D=as(),bt,et,St,Ee,os=(Ee=class extends Lt{constructor(){super();h(this,bt,!0);h(this,et);h(this,St);o(this,St,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){r(this,et)||this.setEventListener(r(this,St))}onUnsubscribe(){var t;this.hasListeners()||((t=r(this,et))==null||t.call(this),o(this,et,void 0))}setEventListener(t){var s;o(this,St,t),(s=r(this,et))==null||s.call(this),o(this,et,t(this.setOnline.bind(this)))}setOnline(t){r(this,bt)!==t&&(o(this,bt,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return r(this,bt)}},bt=new WeakMap,et=new WeakMap,St=new WeakMap,Ee),zt=new os;function us(e){return Math.min(1e3*2**e,3e4)}function ke(e){return(e??"online")==="online"?zt.isOnline():!0}var Yt=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Le(e){let t=!1,s=0,i;const n=Xt(),a=()=>n.status!=="pending",c=m=>{var S;if(!a()){const w=new Yt(m);O(w),(S=e.onCancel)==null||S.call(e,w)}},u=()=>{t=!0},y=()=>{t=!1},F=()=>he.isFocused()&&(e.networkMode==="always"||zt.isOnline())&&e.canRun(),g=()=>ke(e.networkMode)&&e.canRun(),d=m=>{a()||(i==null||i(),n.resolve(m))},O=m=>{a()||(i==null||i(),n.reject(m))},f=()=>new Promise(m=>{var S;i=w=>{(a()||F())&&m(w)},(S=e.onPause)==null||S.call(e)}).then(()=>{var m;i=void 0,a()||(m=e.onContinue)==null||m.call(e)}),E=()=>{if(a())return;let m;const S=s===0?e.initialPromise:void 0;try{m=S??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var U;if(a())return;const Q=e.retry??(At.isServer()?0:3),P=e.retryDelay??us,l=typeof P=="function"?P(s,w):P,M=Q===!0||typeof Q=="number"&&s<Q||typeof Q=="function"&&Q(s,w);if(t||!M){O(w);return}s++,(U=e.onFail)==null||U.call(e,s,w),es(l).then(()=>F()?void 0:f()).then(()=>{t?O(w):E()})})};return{promise:n,status:()=>n.status,cancel:c,continue:()=>(i==null||i(),n),cancelRetry:u,continueRetry:y,canStart:g,start:()=>(g()?E():f().then(E),n)}}var ct,Qe,Ke=(Qe=class{constructor(){h(this,ct)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wt(this.gcTime)&&o(this,ct,ut.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(At.isServer()?1/0:300*1e3))}clearGcTimeout(){r(this,ct)!==void 0&&(ut.clearTimeout(r(this,ct)),o(this,ct,void 0))}},ct=new WeakMap,Qe);function hs(e){return{onFetch:(t,s)=>{var g,d,O,f,E;const i=t.options,n=(O=(d=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:d.fetchMore)==null?void 0:O.direction,a=((f=t.state.data)==null?void 0:f.pages)||[],c=((E=t.state.data)==null?void 0:E.pageParams)||[];let u={pages:[],pageParams:[]},y=0;const F=async()=>{let m=!1;const S=P=>{rs(P,()=>t.signal,()=>m=!0)},w=qe(t.options,t.fetchOptions),Q=async(P,l,M)=>{if(m)return Promise.reject(t.signal.reason);if(l==null&&P.pages.length)return Promise.resolve(P);const J=(()=>{const Z={client:t.client,queryKey:t.queryKey,pageParam:l,direction:M?"backward":"forward",meta:t.options.meta};return S(Z),Z})(),C=await w(J),{maxPages:I}=t.options,A=M?is:ss;return{pages:A(P.pages,C,I),pageParams:A(P.pageParams,l,I)}};if(n&&a.length){const P=n==="backward",l=P?cs:be,M={pages:a,pageParams:c},U=l(i,M);u=await Q(M,U,P)}else{const P=e??a.length;do{const l=y===0?c[0]??i.initialPageParam:be(i,u);if(y>0&&l==null)break;u=await Q(u,l),y++}while(y<P)}return u};t.options.persister?t.fetchFn=()=>{var m,S;return(S=(m=t.options).persister)==null?void 0:S.call(m,F,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=F}}}function be(e,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}function cs(e,{pages:t,pageParams:s}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,s[0],s):void 0}var wt,lt,Ct,K,dt,T,jt,ft,k,He,V,Me,ls=(Me=class extends Ke{constructor(t){super();h(this,k);h(this,wt);h(this,lt);h(this,Ct);h(this,K);h(this,dt);h(this,T);h(this,jt);h(this,ft);o(this,ft,!1),o(this,jt,t.defaultOptions),this.setOptions(t.options),this.observers=[],o(this,dt,t.client),o(this,K,r(this,dt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,o(this,lt,we(this.options)),this.state=t.state??r(this,lt),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return r(this,wt)}get promise(){var t;return(t=r(this,T))==null?void 0:t.promise}setOptions(t){if(this.options={...r(this,jt),...t},t!=null&&t._type&&o(this,wt,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=we(this.options);s.data!==void 0&&(this.setState(Se(s.data,s.dataUpdatedAt)),o(this,lt,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&r(this,K).remove(this)}setData(t,s){const i=Zt(this.state.data,t,this.options);return p(this,k,V).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(t){p(this,k,V).call(this,{type:"setState",state:t})}cancel(t){var i,n;const s=(i=r(this,T))==null?void 0:i.promise;return(n=r(this,T))==null||n.cancel(t),s?s.then(_).catch(_):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return r(this,lt)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>L(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===le||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ot(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!je(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=r(this,T))==null||s.continue()}onOnline(){var s;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=r(this,T))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),r(this,K).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(r(this,T)&&(r(this,ft)||p(this,k,He).call(this)?r(this,T).cancel({revert:!0}):r(this,T).cancelRetry()),this.scheduleGc()),r(this,K).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||p(this,k,V).call(this,{type:"invalidate"})}async fetch(t,s){var F,g,d,O,f,E,m,S,w,Q,P;if(this.state.fetchStatus!=="idle"&&((F=r(this,T))==null?void 0:F.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(r(this,T))return r(this,T).continueRetry(),r(this,T).promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(M=>M.options.queryFn);l&&this.setOptions(l.options)}const i=new AbortController,n=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(o(this,ft,!0),i.signal)})},a=()=>{const l=qe(this.options,s),U=(()=>{const J={client:r(this,dt),queryKey:this.queryKey,meta:this.meta};return n(J),J})();return o(this,ft,!1),this.options.persister?this.options.persister(l,U,this):l(U)},u=(()=>{const l={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:r(this,dt),state:this.state,fetchFn:a};return n(l),l})(),y=r(this,wt)==="infinite"?hs(this.options.pages):this.options.behavior;y==null||y.onFetch(u,this),o(this,Ct,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=u.fetchOptions)==null?void 0:g.meta))&&p(this,k,V).call(this,{type:"fetch",meta:(d=u.fetchOptions)==null?void 0:d.meta}),o(this,T,Le({initialPromise:s==null?void 0:s.initialPromise,fn:u.fetchFn,onCancel:l=>{l instanceof Yt&&l.revert&&this.setState({...r(this,Ct),fetchStatus:"idle"}),i.abort()},onFail:(l,M)=>{p(this,k,V).call(this,{type:"failed",failureCount:l,error:M})},onPause:()=>{p(this,k,V).call(this,{type:"pause"})},onContinue:()=>{p(this,k,V).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const l=await r(this,T).start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),(f=(O=r(this,K).config).onSuccess)==null||f.call(O,l,this),(m=(E=r(this,K).config).onSettled)==null||m.call(E,l,this.state.error,this),l}catch(l){if(l instanceof Yt){if(l.silent)return r(this,T).promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw p(this,k,V).call(this,{type:"error",error:l}),(w=(S=r(this,K).config).onError)==null||w.call(S,l,this),(P=(Q=r(this,K).config).onSettled)==null||P.call(Q,this.state.data,l,this),l}finally{this.scheduleGc()}}},wt=new WeakMap,lt=new WeakMap,Ct=new WeakMap,K=new WeakMap,dt=new WeakMap,T=new WeakMap,jt=new WeakMap,ft=new WeakMap,k=new WeakSet,He=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},V=function(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Ne(i.data,this.options),fetchMeta:t.meta??null};case"success":const n={...i,...Se(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return o(this,Ct,t.manual?n:void 0),n;case"error":const a=t.error;return{...i,error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),D.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),r(this,K).notify({query:this,type:"updated",action:t})})},Me);function Ne(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ke(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Se(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function we(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var q,v,Ut,j,yt,Ot,W,st,qt,Pt,Rt,pt,vt,it,Ft,b,Tt,te,ee,se,ie,re,ne,ae,Ge,Ie,ds=(Ie=class extends Lt{constructor(t,s){super();h(this,b);h(this,q);h(this,v);h(this,Ut);h(this,j);h(this,yt);h(this,Ot);h(this,W);h(this,st);h(this,qt);h(this,Pt);h(this,Rt);h(this,pt);h(this,vt);h(this,it);h(this,Ft,new Set);this.options=s,o(this,q,t),o(this,st,null),o(this,W,Xt()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(r(this,v).addObserver(this),Ce(r(this,v),this.options)?p(this,b,Tt).call(this):this.updateResult(),p(this,b,ie).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return oe(r(this,v),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return oe(r(this,v),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,p(this,b,re).call(this),p(this,b,ne).call(this),r(this,v).removeObserver(this)}setOptions(t){const s=this.options,i=r(this,v);if(this.options=r(this,q).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof L(this.options.enabled,r(this,v))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");p(this,b,ae).call(this),r(this,v).setOptions(this.options),s._defaulted&&!$t(this.options,s)&&r(this,q).getQueryCache().notify({type:"observerOptionsUpdated",query:r(this,v),observer:this});const n=this.hasListeners();n&&Oe(r(this,v),i,this.options,s)&&p(this,b,Tt).call(this),this.updateResult(),n&&(r(this,v)!==i||L(this.options.enabled,r(this,v))!==L(s.enabled,r(this,v))||ot(this.options.staleTime,r(this,v))!==ot(s.staleTime,r(this,v)))&&p(this,b,te).call(this);const a=p(this,b,ee).call(this);n&&(r(this,v)!==i||L(this.options.enabled,r(this,v))!==L(s.enabled,r(this,v))||a!==r(this,it))&&p(this,b,se).call(this,a)}getOptimisticResult(t){const s=r(this,q).getQueryCache().build(r(this,q),t),i=this.createResult(s,t);return ys(this,i)&&(o(this,j,i),o(this,Ot,this.options),o(this,yt,r(this,v).state)),i}getCurrentResult(){return r(this,j)}trackResult(t,s){return new Proxy(t,{get:(i,n)=>(this.trackProp(n),s==null||s(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&r(this,W).status==="pending"&&r(this,W).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,n))})}trackProp(t){r(this,Ft).add(t)}getCurrentQuery(){return r(this,v)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=r(this,q).defaultQueryOptions(t),i=r(this,q).getQueryCache().build(r(this,q),s);return i.fetch().then(()=>this.createResult(i,s))}fetch(t){return p(this,b,Tt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),r(this,j)))}createResult(t,s){var I;const i=r(this,v),n=this.options,a=r(this,j),c=r(this,yt),u=r(this,Ot),F=t!==i?t.state:r(this,Ut),{state:g}=t;let d={...g},O=!1,f;if(s._optimisticResults){const A=this.hasListeners(),Z=!A&&Ce(t,s),Kt=A&&Oe(t,i,s,n);(Z||Kt)&&(d={...d,...Ne(g.data,t.options)}),s._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:m,status:S}=d;f=d.data;let w=!1;if(s.placeholderData!==void 0&&f===void 0&&S==="pending"){let A;a!=null&&a.isPlaceholderData&&s.placeholderData===(u==null?void 0:u.placeholderData)?(A=a.data,w=!0):A=typeof s.placeholderData=="function"?s.placeholderData((I=r(this,Rt))==null?void 0:I.state.data,r(this,Rt)):s.placeholderData,A!==void 0&&(S="success",f=Zt(a==null?void 0:a.data,A,s),O=!0)}if(s.select&&f!==void 0&&!w)if(a&&f===(c==null?void 0:c.data)&&s.select===r(this,qt))f=r(this,Pt);else try{o(this,qt,s.select),f=s.select(f),f=Zt(a==null?void 0:a.data,f,s),o(this,Pt,f),o(this,st,null)}catch(A){o(this,st,A)}r(this,st)&&(E=r(this,st),f=r(this,Pt),m=Date.now(),S="error");const Q=d.fetchStatus==="fetching",P=S==="pending",l=S==="error",M=P&&Q,U=f!==void 0,C={status:S,fetchStatus:d.fetchStatus,isPending:P,isSuccess:S==="success",isError:l,isInitialLoading:M,isLoading:M,data:f,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>F.dataUpdateCount||d.errorUpdateCount>F.errorUpdateCount,isFetching:Q,isRefetching:Q&&!P,isLoadingError:l&&!U,isPaused:d.fetchStatus==="paused",isPlaceholderData:O,isRefetchError:l&&U,isStale:de(t,s),refetch:this.refetch,promise:r(this,W),isEnabled:L(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=C.data!==void 0,Z=C.status==="error"&&!A,Kt=Nt=>{Z?Nt.reject(C.error):A&&Nt.resolve(C.data)},fe=()=>{const Nt=o(this,W,C.promise=Xt());Kt(Nt)},Ht=r(this,W);switch(Ht.status){case"pending":t.queryHash===i.queryHash&&Kt(Ht);break;case"fulfilled":(Z||C.data!==Ht.value)&&fe();break;case"rejected":(!Z||C.error!==Ht.reason)&&fe();break}}return C}updateResult(){const t=r(this,j),s=this.createResult(r(this,v),this.options);if(o(this,yt,r(this,v).state),o(this,Ot,this.options),r(this,yt).data!==void 0&&o(this,Rt,r(this,v)),$t(s,t))return;o(this,j,s);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,a=typeof n=="function"?n():n;if(a==="all"||!a&&!r(this,Ft).size)return!0;const c=new Set(a??r(this,Ft));return this.options.throwOnError&&c.add("error"),Object.keys(r(this,j)).some(u=>{const y=u;return r(this,j)[y]!==t[y]&&c.has(y)})};p(this,b,Ge).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&p(this,b,ie).call(this)}},q=new WeakMap,v=new WeakMap,Ut=new WeakMap,j=new WeakMap,yt=new WeakMap,Ot=new WeakMap,W=new WeakMap,st=new WeakMap,qt=new WeakMap,Pt=new WeakMap,Rt=new WeakMap,pt=new WeakMap,vt=new WeakMap,it=new WeakMap,Ft=new WeakMap,b=new WeakSet,Tt=function(t){p(this,b,ae).call(this);let s=r(this,v).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(_)),s},te=function(){p(this,b,re).call(this);const t=ot(this.options.staleTime,r(this,v));if(At.isServer()||r(this,j).isStale||!Wt(t))return;const i=je(r(this,j).dataUpdatedAt,t)+1;o(this,pt,ut.setTimeout(()=>{r(this,j).isStale||this.updateResult()},i))},ee=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(r(this,v)):this.options.refetchInterval)??!1},se=function(t){p(this,b,ne).call(this),o(this,it,t),!(At.isServer()||L(this.options.enabled,r(this,v))===!1||!Wt(r(this,it))||r(this,it)===0)&&o(this,vt,ut.setInterval(()=>{(this.options.refetchIntervalInBackground||he.isFocused())&&p(this,b,Tt).call(this)},r(this,it)))},ie=function(){p(this,b,te).call(this),p(this,b,se).call(this,p(this,b,ee).call(this))},re=function(){r(this,pt)!==void 0&&(ut.clearTimeout(r(this,pt)),o(this,pt,void 0))},ne=function(){r(this,vt)!==void 0&&(ut.clearInterval(r(this,vt)),o(this,vt,void 0))},ae=function(){const t=r(this,q).getQueryCache().build(r(this,q),this.options);if(t===r(this,v))return;const s=r(this,v);o(this,v,t),o(this,Ut,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Ge=function(t){D.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(r(this,j))}),r(this,q).getQueryCache().notify({query:r(this,v),type:"observerResultsUpdated"})})},Ie);function fs(e,t){return L(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&L(t.retryOnMount,e)===!1)}function Ce(e,t){return fs(e,t)||e.state.data!==void 0&&oe(e,t,t.refetchOnMount)}function oe(e,t,s){if(L(t.enabled,e)!==!1&&ot(t.staleTime,e)!=="static"){const i=typeof s=="function"?s(e):s;return i==="always"||i!==!1&&de(e,t)}return!1}function Oe(e,t,s,i){return(e!==t||L(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&de(e,s)}function de(e,t){return L(t.enabled,e)!==!1&&e.isStaleByTime(ot(t.staleTime,e))}function ys(e,t){return!$t(e.getCurrentResult(),t)}var _t,G,x,mt,B,X,Te,ps=(Te=class extends Ke{constructor(t){super();h(this,B);h(this,_t);h(this,G);h(this,x);h(this,mt);o(this,_t,t.client),this.mutationId=t.mutationId,o(this,x,t.mutationCache),o(this,G,[]),this.state=t.state||vs(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){r(this,G).includes(t)||(r(this,G).push(t),this.clearGcTimeout(),r(this,x).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){o(this,G,r(this,G).filter(s=>s!==t)),this.scheduleGc(),r(this,x).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){r(this,G).length||(this.state.status==="pending"?this.scheduleGc():r(this,x).remove(this))}continue(){var t;return((t=r(this,mt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,u,y,F,g,d,O,f,E,m,S,w,Q,P,l,M,U,J;const s=()=>{p(this,B,X).call(this,{type:"continue"})},i={client:r(this,_t),meta:this.options.meta,mutationKey:this.options.mutationKey};o(this,mt,Le({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(C,I)=>{p(this,B,X).call(this,{type:"failed",failureCount:C,error:I})},onPause:()=>{p(this,B,X).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>r(this,x).canRun(this)}));const n=this.state.status==="pending",a=!r(this,mt).canStart();try{if(n)s();else{p(this,B,X).call(this,{type:"pending",variables:t,isPaused:a}),r(this,x).config.onMutate&&await r(this,x).config.onMutate(t,this,i);const I=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,i));I!==this.state.context&&p(this,B,X).call(this,{type:"pending",context:I,variables:t,isPaused:a})}const C=await r(this,mt).start();return await((F=(y=r(this,x).config).onSuccess)==null?void 0:F.call(y,C,t,this.state.context,this,i)),await((d=(g=this.options).onSuccess)==null?void 0:d.call(g,C,t,this.state.context,i)),await((f=(O=r(this,x).config).onSettled)==null?void 0:f.call(O,C,null,this.state.variables,this.state.context,this,i)),await((m=(E=this.options).onSettled)==null?void 0:m.call(E,C,null,t,this.state.context,i)),p(this,B,X).call(this,{type:"success",data:C}),C}catch(C){try{await((w=(S=r(this,x).config).onError)==null?void 0:w.call(S,C,t,this.state.context,this,i))}catch(I){Promise.reject(I)}try{await((P=(Q=this.options).onError)==null?void 0:P.call(Q,C,t,this.state.context,i))}catch(I){Promise.reject(I)}try{await((M=(l=r(this,x).config).onSettled)==null?void 0:M.call(l,void 0,C,this.state.variables,this.state.context,this,i))}catch(I){Promise.reject(I)}try{await((J=(U=this.options).onSettled)==null?void 0:J.call(U,void 0,C,t,this.state.context,i))}catch(I){Promise.reject(I)}throw p(this,B,X).call(this,{type:"error",error:C}),C}finally{r(this,x).runNext(this)}}},_t=new WeakMap,G=new WeakMap,x=new WeakMap,mt=new WeakMap,B=new WeakSet,X=function(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),D.batch(()=>{r(this,G).forEach(i=>{i.onMutationUpdate(t)}),r(this,x).notify({mutation:this,type:"updated",action:t})})},Te);function vs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $,N,kt,De,ms=(De=class extends Lt{constructor(t={}){super();h(this,$);h(this,N);h(this,kt);this.config=t,o(this,$,new Set),o(this,N,new Map),o(this,kt,0)}build(t,s,i){const n=new ps({client:t,mutationCache:this,mutationId:++Gt(this,kt)._,options:t.defaultMutationOptions(s),state:i});return this.add(n),n}add(t){r(this,$).add(t);const s=Bt(t);if(typeof s=="string"){const i=r(this,N).get(s);i?i.push(t):r(this,N).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(r(this,$).delete(t)){const s=Bt(t);if(typeof s=="string"){const i=r(this,N).get(s);if(i)if(i.length>1){const n=i.indexOf(t);n!==-1&&i.splice(n,1)}else i[0]===t&&r(this,N).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Bt(t);if(typeof s=="string"){const i=r(this,N).get(s),n=i==null?void 0:i.find(a=>a.state.status==="pending");return!n||n===t}else return!0}runNext(t){var i;const s=Bt(t);if(typeof s=="string"){const n=(i=r(this,N).get(s))==null?void 0:i.find(a=>a!==t&&a.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){D.batch(()=>{r(this,$).forEach(t=>{this.notify({type:"removed",mutation:t})}),r(this,$).clear(),r(this,N).clear()})}getAll(){return Array.from(r(this,$))}find(t){const s={exact:!0,...t};return this.getAll().find(i=>ve(s,i))}findAll(t={}){return this.getAll().filter(s=>ve(t,s))}notify(t){D.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return D.batch(()=>Promise.all(t.map(s=>s.continue().catch(_))))}},$=new WeakMap,N=new WeakMap,kt=new WeakMap,De);function Bt(e){var t;return(t=e.options.scope)==null?void 0:t.id}var z,xe,gs=(xe=class extends Lt{constructor(t={}){super();h(this,z);this.config=t,o(this,z,new Map)}build(t,s,i){const n=s.queryKey,a=s.queryHash??ce(n,s);let c=this.get(a);return c||(c=new ls({client:t,queryKey:n,queryHash:a,options:t.defaultQueryOptions(s),state:i,defaultOptions:t.getQueryDefaults(n)}),this.add(c)),c}add(t){r(this,z).has(t.queryHash)||(r(this,z).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=r(this,z).get(t.queryHash);s&&(t.destroy(),s===t&&r(this,z).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){D.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return r(this,z).get(t)}getAll(){return[...r(this,z).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>pe(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>pe(t,i)):s}notify(t){D.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){D.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){D.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},z=new WeakMap,xe),R,rt,nt,Et,Qt,at,Mt,It,Ae,As=(Ae=class{constructor(e={}){h(this,R);h(this,rt);h(this,nt);h(this,Et);h(this,Qt);h(this,at);h(this,Mt);h(this,It);o(this,R,e.queryCache||new gs),o(this,rt,e.mutationCache||new ms),o(this,nt,e.defaultOptions||{}),o(this,Et,new Map),o(this,Qt,new Map),o(this,at,0)}mount(){Gt(this,at)._++,r(this,at)===1&&(o(this,Mt,he.subscribe(async e=>{e&&(await this.resumePausedMutations(),r(this,R).onFocus())})),o(this,It,zt.subscribe(async e=>{e&&(await this.resumePausedMutations(),r(this,R).onOnline())})))}unmount(){var e,t;Gt(this,at)._--,r(this,at)===0&&((e=r(this,Mt))==null||e.call(this),o(this,Mt,void 0),(t=r(this,It))==null||t.call(this),o(this,It,void 0))}isFetching(e){return r(this,R).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return r(this,rt).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=r(this,R).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=r(this,R).build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(ot(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return r(this,R).findAll(e).map(({queryKey:t,state:s})=>{const i=s.data;return[t,i]})}setQueryData(e,t,s){const i=this.defaultQueryOptions({queryKey:e}),n=r(this,R).get(i.queryHash),a=n==null?void 0:n.state.data,c=Ye(t,a);if(c!==void 0)return r(this,R).build(this,i).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return D.batch(()=>r(this,R).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=r(this,R).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=r(this,R);D.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=r(this,R);return D.batch(()=>(s.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},i=D.batch(()=>r(this,R).findAll(e).map(n=>n.cancel(s)));return Promise.all(i).then(_).catch(_)}invalidateQueries(e,t={}){return D.batch(()=>(r(this,R).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=D.batch(()=>r(this,R).findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let a=n.fetch(void 0,s);return s.throwOnError||(a=a.catch(_)),n.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(_)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=r(this,R).build(this,t);return s.isStaleByTime(ot(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_).catch(_)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_).catch(_)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return zt.isOnline()?r(this,rt).resumePausedMutations():Promise.resolve()}getQueryCache(){return r(this,R)}getMutationCache(){return r(this,rt)}getDefaultOptions(){return r(this,nt)}setDefaultOptions(e){o(this,nt,e)}setQueryDefaults(e,t){r(this,Et).set(Dt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...r(this,Et).values()],s={};return t.forEach(i=>{xt(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,t){r(this,Qt).set(Dt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...r(this,Qt).values()],s={};return t.forEach(i=>{xt(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...r(this,nt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ce(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===le&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...r(this,nt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){r(this,R).clear(),r(this,rt).clear()}},R=new WeakMap,rt=new WeakMap,nt=new WeakMap,Et=new WeakMap,Qt=new WeakMap,at=new WeakMap,Mt=new WeakMap,It=new WeakMap,Ae),Be=H.createContext(void 0),bs=e=>{const t=H.useContext(Be);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},js=({client:e,children:t})=>(H.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Ve.jsx(Be.Provider,{value:e,children:t})),ze=H.createContext(!1),Ss=()=>H.useContext(ze);ze.Provider;function ws(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Cs=H.createContext(ws()),Os=()=>H.useContext(Cs),Ps=(e,t,s)=>{const i=s!=null&&s.state.error&&typeof e.throwOnError=="function"?_e(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},Rs=e=>{H.useEffect(()=>{e.clearReset()},[e])},Fs=({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(n&&e.data===void 0||_e(s,[e.error,i])),Es=e=>{if(e.suspense){const s=n=>n==="static"?n:Math.max(n??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...n)=>s(i(...n)):s(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Qs=(e,t)=>e.isLoading&&e.isFetching&&!t,Ms=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Pe=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Is(e,t,s){var f,E,m,S;const i=Ss(),n=Os(),a=bs(),c=a.defaultQueryOptions(e);(E=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||E.call(f,c);const u=a.getQueryCache().get(c.queryHash),y=e.subscribed!==!1;c._optimisticResults=i?"isRestoring":y?"optimistic":void 0,Es(c),Ps(c,n,u),Rs(n);const F=!a.getQueryCache().get(c.queryHash),[g]=H.useState(()=>new t(a,c)),d=g.getOptimisticResult(c),O=!i&&y;if(H.useSyncExternalStore(H.useCallback(w=>{const Q=O?g.subscribe(D.batchCalls(w)):_;return g.updateResult(),Q},[g,O]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),H.useEffect(()=>{g.setOptions(c)},[c,g]),Ms(c,d))throw Pe(c,g,n);if(Fs({result:d,errorResetBoundary:n,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw d.error;if((S=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||S.call(m,c,d),c.experimental_prefetchInRender&&!At.isServer()&&Qs(d,i)){const w=F?Pe(c,g,n):u==null?void 0:u.promise;w==null||w.catch(_).finally(()=>{g.updateResult()})}return c.notifyOnChangeProps?d:g.trackResult(d)}function Us(e,t){return Is(e,ds)}export{js as Q,As as a,Us as b,xs as k,bs as u};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function ba(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bn={exports:{}},ct={};/**
|
|
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 Mr;function Ca(){if(Mr)return ct;Mr=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 ct.Fragment=t,ct.jsx=n,ct.jsxs=n,ct}var Or;function Sa(){return Or||(Or=1,bn.exports=Ca()),bn.exports}var v=Sa(),Cn={exports:{}},H={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ir;function Ea(){if(Ir)return H;Ir=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function m(g){return g===null||typeof g!="object"?null:(g=p&&g[p]||g["@@iterator"],typeof g=="function"?g:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,w={};function x(g,R,L){this.props=g,this.context=R,this.refs=w,this.updater=L||y}x.prototype.isReactComponent={},x.prototype.setState=function(g,R){if(typeof g!="object"&&typeof g!="function"&&g!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,g,R,"setState")},x.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function b(){}b.prototype=x.prototype;function C(g,R,L){this.props=g,this.context=R,this.refs=w,this.updater=L||y}var S=C.prototype=new b;S.constructor=C,h(S,x.prototype),S.isPureReactComponent=!0;var P=Array.isArray;function T(){}var E={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function I(g,R,L){var D=L.ref;return{$$typeof:e,type:g,key:R,ref:D!==void 0?D:null,props:L}}function k(g,R){return I(g.type,R,g.props)}function F(g){return typeof g=="object"&&g!==null&&g.$$typeof===e}function Y(g){var R={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(L){return R[L]})}var z=/\/+/g;function V(g,R){return typeof g=="object"&&g!==null&&g.key!=null?Y(""+g.key):R.toString(36)}function J(g){switch(g.status){case"fulfilled":return g.value;case"rejected":throw g.reason;default:switch(typeof g.status=="string"?g.then(T,T):(g.status="pending",g.then(function(R){g.status==="pending"&&(g.status="fulfilled",g.value=R)},function(R){g.status==="pending"&&(g.status="rejected",g.reason=R)})),g.status){case"fulfilled":return g.value;case"rejected":throw g.reason}}throw g}function $(g,R,L,D,W){var B=typeof g;(B==="undefined"||B==="boolean")&&(g=null);var A=!1;if(g===null)A=!0;else switch(B){case"bigint":case"string":case"number":A=!0;break;case"object":switch(g.$$typeof){case e:case t:A=!0;break;case d:return A=g._init,$(A(g._payload),R,L,D,W)}}if(A)return W=W(g),A=D===""?"."+V(g,0):D,P(W)?(L="",A!=null&&(L=A.replace(z,"$&/")+"/"),$(W,R,L,"",function(Z){return Z})):W!=null&&(F(W)&&(W=k(W,L+(W.key==null||g&&g.key===W.key?"":(""+W.key).replace(z,"$&/")+"/")+A)),R.push(W)),1;A=0;var K=D===""?".":D+":";if(P(g))for(var U=0;U<g.length;U++)D=g[U],B=K+V(D,U),A+=$(D,R,L,B,W);else if(U=m(g),typeof U=="function")for(g=U.call(g),U=0;!(D=g.next()).done;)D=D.value,B=K+V(D,U++),A+=$(D,R,L,B,W);else if(B==="object"){if(typeof g.then=="function")return $(J(g),R,L,D,W);throw R=String(g),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return A}function X(g,R,L){if(g==null)return g;var D=[],W=0;return $(g,D,"","",function(B){return R.call(L,B,W++)}),D}function j(g){if(g._status===-1){var R=g._result;R=R(),R.then(function(L){(g._status===0||g._status===-1)&&(g._status=1,g._result=L)},function(L){(g._status===0||g._status===-1)&&(g._status=2,g._result=L)}),g._status===-1&&(g._status=0,g._result=R)}if(g._status===1)return g._result.default;throw g._result}var M=typeof reportError=="function"?reportError:function(g){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g),error:g});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",g);return}console.error(g)},q={map:X,forEach:function(g,R,L){X(g,function(){R.apply(this,arguments)},L)},count:function(g){var R=0;return X(g,function(){R++}),R},toArray:function(g){return X(g,function(R){return R})||[]},only:function(g){if(!F(g))throw Error("React.Children.only expected to receive a single React element child.");return g}};return H.Activity=f,H.Children=q,H.Component=x,H.Fragment=n,H.Profiler=o,H.PureComponent=C,H.StrictMode=r,H.Suspense=u,H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,H.__COMPILER_RUNTIME={__proto__:null,c:function(g){return E.H.useMemoCache(g)}},H.cache=function(g){return function(){return g.apply(null,arguments)}},H.cacheSignal=function(){return null},H.cloneElement=function(g,R,L){if(g==null)throw Error("The argument must be a React element, but you passed "+g+".");var D=h({},g.props),W=g.key;if(R!=null)for(B in R.key!==void 0&&(W=""+R.key),R)!O.call(R,B)||B==="key"||B==="__self"||B==="__source"||B==="ref"&&R.ref===void 0||(D[B]=R[B]);var B=arguments.length-2;if(B===1)D.children=L;else if(1<B){for(var A=Array(B),K=0;K<B;K++)A[K]=arguments[K+2];D.children=A}return I(g.type,W,D)},H.createContext=function(g){return g={$$typeof:i,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null},g.Provider=g,g.Consumer={$$typeof:s,_context:g},g},H.createElement=function(g,R,L){var D,W={},B=null;if(R!=null)for(D in R.key!==void 0&&(B=""+R.key),R)O.call(R,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(W[D]=R[D]);var A=arguments.length-2;if(A===1)W.children=L;else if(1<A){for(var K=Array(A),U=0;U<A;U++)K[U]=arguments[U+2];W.children=K}if(g&&g.defaultProps)for(D in A=g.defaultProps,A)W[D]===void 0&&(W[D]=A[D]);return I(g,B,W)},H.createRef=function(){return{current:null}},H.forwardRef=function(g){return{$$typeof:a,render:g}},H.isValidElement=F,H.lazy=function(g){return{$$typeof:d,_payload:{_status:-1,_result:g},_init:j}},H.memo=function(g,R){return{$$typeof:l,type:g,compare:R===void 0?null:R}},H.startTransition=function(g){var R=E.T,L={};E.T=L;try{var D=g(),W=E.S;W!==null&&W(L,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(T,M)}catch(B){M(B)}finally{R!==null&&L.types!==null&&(R.types=L.types),E.T=R}},H.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},H.use=function(g){return E.H.use(g)},H.useActionState=function(g,R,L){return E.H.useActionState(g,R,L)},H.useCallback=function(g,R){return E.H.useCallback(g,R)},H.useContext=function(g){return E.H.useContext(g)},H.useDebugValue=function(){},H.useDeferredValue=function(g,R){return E.H.useDeferredValue(g,R)},H.useEffect=function(g,R){return E.H.useEffect(g,R)},H.useEffectEvent=function(g){return E.H.useEffectEvent(g)},H.useId=function(){return E.H.useId()},H.useImperativeHandle=function(g,R,L){return E.H.useImperativeHandle(g,R,L)},H.useInsertionEffect=function(g,R){return E.H.useInsertionEffect(g,R)},H.useLayoutEffect=function(g,R){return E.H.useLayoutEffect(g,R)},H.useMemo=function(g,R){return E.H.useMemo(g,R)},H.useOptimistic=function(g,R){return E.H.useOptimistic(g,R)},H.useReducer=function(g,R,L){return E.H.useReducer(g,R,L)},H.useRef=function(g){return E.H.useRef(g)},H.useState=function(g){return E.H.useState(g)},H.useSyncExternalStore=function(g,R,L){return E.H.useSyncExternalStore(g,R,L)},H.useTransition=function(){return E.H.useTransition()},H.version="19.2.7",H}var Nr;function vo(){return Nr||(Nr=1,Cn.exports=Ea()),Cn.exports}var c=vo();const Ra=po(c),Yt=ba({__proto__:null,default:Ra},[c]);var Sn={exports:{}},oe={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react-dom.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Dr;function Pa(){if(Dr)return oe;Dr=1;var e=vo();function t(u){var l="https://react.dev/errors/"+u;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+u+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(u,l,d){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:f==null?null:""+f,children:u,containerInfo:l,implementation:d}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,l){if(u==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return oe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,oe.createPortal=function(u,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return s(u,l,null,d)},oe.flushSync=function(u){var l=i.T,d=r.p;try{if(i.T=null,r.p=2,u)return u()}finally{i.T=l,r.p=d,r.d.f()}},oe.preconnect=function(u,l){typeof u=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,r.d.C(u,l))},oe.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},oe.preinit=function(u,l){if(typeof u=="string"&&l&&typeof l.as=="string"){var d=l.as,f=a(d,l.crossOrigin),p=typeof l.integrity=="string"?l.integrity:void 0,m=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;d==="style"?r.d.S(u,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:f,integrity:p,fetchPriority:m}):d==="script"&&r.d.X(u,{crossOrigin:f,integrity:p,fetchPriority:m,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},oe.preinitModule=function(u,l){if(typeof u=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var d=a(l.as,l.crossOrigin);r.d.M(u,{crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&r.d.M(u)},oe.preload=function(u,l){if(typeof u=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var d=l.as,f=a(d,l.crossOrigin);r.d.L(u,d,{crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},oe.preloadModule=function(u,l){if(typeof u=="string")if(l){var d=a(l.as,l.crossOrigin);r.d.m(u,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else r.d.m(u)},oe.requestFormReset=function(u){r.d.r(u)},oe.unstable_batchedUpdates=function(u,l){return u(l)},oe.useFormState=function(u,l,d){return i.H.useFormState(u,l,d)},oe.useFormStatus=function(){return i.H.useHostTransitionStatus()},oe.version="19.2.7",oe}var Lr;function _a(){if(Lr)return Sn.exports;Lr=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sn.exports=Pa(),Sn.exports}var tt=_a();const Lp=po(tt);function kr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=kr(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():kr(e[o],null)}}}}function G(...e){return c.useCallback(Xn(...e),e)}function Me(e){const t=c.forwardRef((n,r)=>{let{children:o,...s}=n,i=null,a=!1;const u=[];jr(o)&&typeof Pt=="function"&&(o=Pt(o._payload)),c.Children.forEach(o,p=>{var m;if(Ia(p)){a=!0;const y=p;let h="child"in y.props?y.props.child:y.props.children;jr(h)&&typeof Pt=="function"&&(h=Pt(h._payload)),i=Aa(y,h),u.push((m=i==null?void 0:i.props)==null?void 0:m.children)}else u.push(p)}),i?i=c.cloneElement(i,void 0,u):!a&&c.Children.count(o)===1&&c.isValidElement(o)&&(i=o);const l=i?Oa(i):void 0,d=G(r,l);if(!i){if(o||o===0)throw new Error(a?ka(e):La(e));return o}const f=Ma(s,i.props??{});return i.type!==c.Fragment&&(f.ref=r?d:l),c.cloneElement(i,f)});return t.displayName=`${e}.Slot`,t}var kp=Me("Slot"),ho=Symbol.for("radix.slottable");function Ta(e){const t=n=>"child"in n?n.children(n.child):n.children;return t.displayName=`${e}.Slottable`,t.__radixId=ho,t}var Aa=(e,t)=>{if("child"in e.props){const n=e.props.child;return c.isValidElement(n)?c.cloneElement(n,void 0,e.props.children(n.props.children)):null}return c.isValidElement(t)?t:null};function Ma(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 u=s(...a);return o(...a),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Oa(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 Ia(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ho}var Na=Symbol.for("react.lazy");function jr(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Na&&"_payload"in e&&Da(e._payload)}function Da(e){return typeof e=="object"&&e!==null&&"then"in e}var La=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,ka=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Pt=Yt[" use ".trim().toString()],ja=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],N=ja.reduce((e,t)=>{const n=Me(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mo(e,t){e&&tt.flushSync(()=>e.dispatchEvent(t))}var go=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"}),Fa="VisuallyHidden",yo=c.forwardRef((e,t)=>v.jsx(N.span,{...e,ref:t,style:{...go,...e.style}}));yo.displayName=Fa;var $a=yo;function Ha(e,t){const n=c.createContext(t);n.displayName=e+"Context";const r=s=>{const{children:i,...a}=s,u=c.useMemo(()=>a,Object.values(a));return v.jsx(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ie(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i);a.displayName=s+"Context";const u=n.length;n=[...n,i];const l=f=>{var x;const{scope:p,children:m,...y}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[u])||a,w=c.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:w,children:m})};l.displayName=s+"Provider";function d(f,p){var h;const m=((h=p==null?void 0:p[e])==null?void 0:h[u])||a,y=c.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,d]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const u=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return o.scopeName=e,[r,Ba(o,...t)]}function Ba(...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:u,scopeName:l})=>{const f=u(s)[`__scope${l}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function qn(e){const t=e+"CollectionProvider",[n,r]=ie(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:w,children:x}=h,b=c.useRef(null),C=c.useRef(new Map).current;return v.jsx(o,{scope:w,itemMap:C,collectionRef:b,children:x})};i.displayName=t;const a=e+"CollectionSlot",u=Me(a),l=c.forwardRef((h,w)=>{const{scope:x,children:b}=h,C=s(a,x),S=G(w,C.collectionRef);return v.jsx(u,{ref:S,children:b})});l.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Me(d),m=c.forwardRef((h,w)=>{const{scope:x,children:b,...C}=h,S=c.useRef(null),P=G(w,S),T=s(d,x);return c.useEffect(()=>(T.itemMap.set(S,{ref:S,...C}),()=>void T.itemMap.delete(S))),v.jsx(p,{[f]:"",ref:P,children:b})});m.displayName=d;function y(h){const w=s(e+"CollectionConsumer",h);return c.useCallback(()=>{const b=w.collectionRef.current;if(!b)return[];const C=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((T,E)=>C.indexOf(T.ref.current)-C.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:l,ItemSlot:m},y,r]}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var te=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Wa=Yt[" useInsertionEffect ".trim().toString()]||te;function Ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Ua({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:o;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"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.`),d.current=a},[a,r])}const l=c.useCallback(d=>{var f;if(a){const p=Va(d)?d(e):d;p!==e&&((f=i.current)==null||f.call(i,p))}else s(d)},[a,e,s,i]);return[u,l]}function Ua({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Wa(()=>{s.current=t},[t]),c.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Va(e){return typeof e=="function"}function Ga(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ne=e=>{const{present:t,children:n}=e,r=Ka(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=Ya(r.ref,za(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};ne.displayName="Presence";function Ka(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,u]=Ga(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=_t(r.current);s.current=a==="mounted"?l:"none"},[a]),te(()=>{const l=r.current,d=o.current;if(d!==e){const p=s.current,m=_t(l);e?u("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),te(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,f=m=>{const h=_t(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(u("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},p=m=>{m.target===t&&(s.current=_t(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Fr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ya(...e){const t=c.useRef(e);return t.current=e,c.useCallback(n=>{const r=t.current;let o=!1;const s=r.map(i=>{const a=Fr(i,n);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():Fr(r[i],null)}}},[])}function _t(e){return(e==null?void 0:e.animationName)||"none"}function za(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 Xa=Yt[" useId ".trim().toString()]||(()=>{}),qa=0;function le(e){const[t,n]=c.useState(Xa());return te(()=>{n(r=>r??String(qa++))},[e]),t?`radix-${t}`:""}var zt="Collapsible",[Za]=ie(zt),[Ja,Zn]=Za(zt),wo=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[u,l]=Ce({prop:r,defaultProp:o??!1,onChange:i,caller:zt});return v.jsx(Ja,{scope:n,disabled:s,contentId:le(),open:u,onOpenToggle:c.useCallback(()=>l(d=>!d),[l]),children:v.jsx(N.div,{"data-state":Qn(u),"data-disabled":s?"":void 0,...a,ref:t})})});wo.displayName=zt;var xo="CollapsibleTrigger",Qa=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Zn(xo,n);return v.jsx(N.button,{type:"button","aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open||!1,"data-state":Qn(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:_(e.onClick,o.onOpenToggle)})});Qa.displayName=xo;var Jn="CollapsibleContent",ec=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Zn(Jn,e.__scopeCollapsible);return v.jsx(ne,{present:n||o.open,children:({present:s})=>v.jsx(tc,{...r,ref:t,present:s})})});ec.displayName=Jn;var tc=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=Zn(Jn,n),[a,u]=c.useState(r),l=c.useRef(null),d=G(t,l),f=c.useRef(0),p=f.current,m=c.useRef(0),y=m.current,h=i.open||a,w=c.useRef(h),x=c.useRef(void 0);return c.useEffect(()=>{const b=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(b)},[]),te(()=>{const b=l.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const C=b.getBoundingClientRect();f.current=C.height,m.current=C.width,w.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),u(r)}},[i.open,r]),v.jsx(N.div,{"data-state":Qn(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...s,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:h&&o})});function Qn(e){return e?"open":"closed"}var jp=wo,nc=c.createContext(void 0);function ht(e){const t=c.useContext(nc);return e||t||"ltr"}function re(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}function rc(e,t=globalThis==null?void 0:globalThis.document){const n=re(e);c.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 oc="DismissableLayer",Ln="dismissableLayer.update",sc="dismissableLayer.pointerDownOutside",ic="dismissableLayer.focusOutside",$r,bo=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...u}=e,l=c.useContext(bo),[d,f]=c.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),y=G(t,E=>f(E)),h=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(w),b=d?h.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,P=lc(E=>{const O=E.target,I=[...l.branches].some(k=>k.contains(O));!S||I||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},p),T=uc(E=>{const O=E.target;[...l.branches].some(k=>k.contains(O))||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},p);return rc(E=>{b===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),c.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&($r=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Hr(),()=>{n&&(l.layersWithOutsidePointerEventsDisabled.delete(d),l.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=$r))}},[d,p,n,l]),c.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Hr())},[d,l]),c.useEffect(()=>{const E=()=>m({});return document.addEventListener(Ln,E),()=>document.removeEventListener(Ln,E)},[]),v.jsx(N.div,{...u,ref:y,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,P.onPointerDownCapture)})});nt.displayName=oc;var ac="DismissableLayerBranch",cc=c.forwardRef((e,t)=>{const n=c.useContext(bo),r=c.useRef(null),o=G(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx(N.div,{...e,ref:o})});cc.displayName=ac;function lc(e,t=globalThis==null?void 0:globalThis.document){const n=re(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let u=function(){Co(sc,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}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 uc(e,t=globalThis==null?void 0:globalThis.document){const n=re(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Co(ic,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 Hr(){const e=new CustomEvent(Ln);document.dispatchEvent(e)}function Co(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?mo(o,s):o.dispatchEvent(s)}var En="focusScope.autoFocusOnMount",Rn="focusScope.autoFocusOnUnmount",Br={bubbles:!1,cancelable:!0},dc="FocusScope",mt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,u]=c.useState(null),l=re(o),d=re(s),f=c.useRef(null),p=G(t,h=>u(h)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let h=function(C){if(m.paused||!a)return;const S=C.target;a.contains(S)?f.current=S:Te(f.current,{select:!0})},w=function(C){if(m.paused||!a)return;const S=C.relatedTarget;S!==null&&(a.contains(S)||Te(f.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&Te(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",w);const b=new MutationObserver(x);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",w),b.disconnect()}}},[r,a,m.paused]),c.useEffect(()=>{if(a){Ur.add(m);const h=document.activeElement;if(!a.contains(h)){const x=new CustomEvent(En,Br);a.addEventListener(En,l),a.dispatchEvent(x),x.defaultPrevented||(fc(gc(So(a)),{select:!0}),document.activeElement===h&&Te(a))}return()=>{a.removeEventListener(En,l),setTimeout(()=>{const x=new CustomEvent(Rn,Br);a.addEventListener(Rn,d),a.dispatchEvent(x),x.defaultPrevented||Te(h??document.body,{select:!0}),a.removeEventListener(Rn,d),Ur.remove(m)},0)}}},[a,l,d,m]);const y=c.useCallback(h=>{if(!n&&!r||m.paused)return;const w=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(w&&x){const b=h.currentTarget,[C,S]=pc(b);C&&S?!h.shiftKey&&x===S?(h.preventDefault(),n&&Te(C,{select:!0})):h.shiftKey&&x===C&&(h.preventDefault(),n&&Te(S,{select:!0})):x===b&&h.preventDefault()}},[n,r,m.paused]);return v.jsx(N.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});mt.displayName=dc;function fc(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Te(r,{select:t}),document.activeElement!==n)return}function pc(e){const t=So(e),n=Wr(t,e),r=Wr(t.reverse(),e);return[n,r]}function So(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 Wr(e,t){for(const n of e)if(!vc(n,{upTo:t}))return n}function vc(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 hc(e){return e instanceof HTMLInputElement&&"select"in e}function Te(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hc(e)&&t&&e.select()}}var Ur=mc();function mc(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Vr(e,t),e.unshift(t)},remove(t){var n;e=Vr(e,t),(n=e[0])==null||n.resume()}}}function Vr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gc(e){return e.filter(t=>t.tagName!=="A")}var yc="Portal",rt=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=c.useState(!1);te(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?tt.createPortal(v.jsx(N.div,{...r,ref:t}),i):null});rt.displayName=yc;var Tt=0,ye=null;function Xt(){c.useEffect(()=>{ye||(ye={start:Gr(),end:Gr()});const{start:e,end:t}=ye;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Tt++,()=>{Tt===1&&(ye==null||ye.start.remove(),ye==null||ye.end.remove(),ye=null),Tt=Math.max(0,Tt-1)}},[])}function Gr(){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 we=function(){return we=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},we.apply(this,arguments)};function Eo(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 wc(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))}var Dt="right-scroll-bar-position",Lt="width-before-scroll-bar",xc="with-scroll-bars-hidden",bc="--removed-body-scroll-bar-size";function Pn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Cc(e,t){var n=c.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 Sc=typeof window<"u"?c.useLayoutEffect:c.useEffect,Kr=new WeakMap;function Ec(e,t){var n=Cc(null,function(r){return e.forEach(function(o){return Pn(o,r)})});return Sc(function(){var r=Kr.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Pn(a,null)}),s.forEach(function(a){o.has(a)||Pn(a,i)})}Kr.set(n,e)},[e]),n}function Rc(e){return e}function Pc(e,t){t===void 0&&(t=Rc);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 u=function(){var d=i;i=[],d.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(d){i.push(d),l()},filter:function(d){return i=i.filter(d),n}}}};return o}function _c(e){e===void 0&&(e={});var t=Pc(null);return t.options=we({async:!0,ssr:!1},e),t}var Ro=function(e){var t=e.sideCar,n=Eo(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 c.createElement(r,we({},n))};Ro.isSideCarExport=!0;function Tc(e,t){return e.useMedium(t),Ro}var Po=_c(),_n=function(){},qt=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:_n,onWheelCapture:_n,onTouchMoveCapture:_n}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,y=e.noIsolation,h=e.inert,w=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,C=e.gapMode,S=Eo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,T=Ec([n,t]),E=we(we({},S),o);return c.createElement(c.Fragment,null,d&&c.createElement(P,{sideCar:Po,removeScrollBar:l,shards:f,noRelative:m,noIsolation:y,inert:h,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:C}),i?c.cloneElement(c.Children.only(a),we(we({},E),{ref:T})):c.createElement(b,we({},E,{className:u,ref:T}),a))});qt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qt.classNames={fullWidth:Lt,zeroRight:Dt};var Ac=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ac();return t&&e.setAttribute("nonce",t),e}function Oc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ic(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Nc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mc())&&(Oc(t,n),Ic(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Dc=function(){var e=Nc();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_o=function(){var e=Dc(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Lc={left:0,top:0,right:0,gap:0},Tn=function(e){return parseInt(e||"",10)||0},kc=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[Tn(n),Tn(r),Tn(o)]},jc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Lc;var t=kc(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])}},Fc=_o(),Xe="data-scroll-locked",$c=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
26
|
+
.`.concat(xc,` {
|
|
27
|
+
overflow: hidden `).concat(r,`;
|
|
28
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
body[`).concat(Xe,`] {
|
|
31
|
+
overflow: hidden `).concat(r,`;
|
|
32
|
+
overscroll-behavior: contain;
|
|
33
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
34
|
+
padding-left: `.concat(o,`px;
|
|
35
|
+
padding-top: `).concat(s,`px;
|
|
36
|
+
padding-right: `).concat(i,`px;
|
|
37
|
+
margin-left:0;
|
|
38
|
+
margin-top:0;
|
|
39
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
40
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.`).concat(Dt,` {
|
|
44
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.`).concat(Lt,` {
|
|
48
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.`).concat(Dt," .").concat(Dt,` {
|
|
52
|
+
right: 0 `).concat(r,`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.`).concat(Lt," .").concat(Lt,` {
|
|
56
|
+
margin-right: 0 `).concat(r,`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
body[`).concat(Xe,`] {
|
|
60
|
+
`).concat(bc,": ").concat(a,`px;
|
|
61
|
+
}
|
|
62
|
+
`)},Yr=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},Hc=function(){c.useEffect(function(){return document.body.setAttribute(Xe,(Yr()+1).toString()),function(){var e=Yr()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Bc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Hc();var s=c.useMemo(function(){return jc(o)},[o]);return c.createElement(Fc,{styles:$c(s,!t,o,n?"":"!important")})},kn=!1;if(typeof window<"u")try{var At=Object.defineProperty({},"passive",{get:function(){return kn=!0,!0}});window.addEventListener("test",At,At),window.removeEventListener("test",At,At)}catch{kn=!1}var Ke=kn?{passive:!1}:!1,Wc=function(e){return e.tagName==="TEXTAREA"},To=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wc(e)&&n[t]==="visible")},Uc=function(e){return To(e,"overflowY")},Vc=function(e){return To(e,"overflowX")},zr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ao(e,r);if(o){var s=Mo(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gc=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Kc=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ao=function(e,t){return e==="v"?Uc(t):Vc(t)},Mo=function(e,t){return e==="v"?Gc(t):Kc(t)},Yc=function(e,t){return e==="h"&&t==="rtl"?-1:1},zc=function(e,t,n,r,o){var s=Yc(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,u=t.contains(a),l=!1,d=i>0,f=0,p=0;do{if(!a)break;var m=Mo(e,a),y=m[0],h=m[1],w=m[2],x=h-w-s*y;(y||x)&&Ao(e,a)&&(f+=x,p+=y);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(l=!0),l},Mt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xr=function(e){return[e.deltaX,e.deltaY]},qr=function(e){return e&&"current"in e?e.current:e},Xc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qc=function(e){return`
|
|
63
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
64
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
65
|
+
`)},Zc=0,Ye=[];function Jc(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(Zc++)[0],s=c.useState(_o)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=wc([e.lockRef.current],(e.shards||[]).map(qr),!0).filter(Boolean);return h.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(h,w){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var x=Mt(h),b=n.current,C="deltaX"in h?h.deltaX:b[0]-x[0],S="deltaY"in h?h.deltaY:b[1]-x[1],P,T=h.target,E=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in h&&E==="h"&&T.type==="range")return!1;var O=window.getSelection(),I=O&&O.anchorNode,k=I?I===T||I.contains(T):!1;if(k)return!1;var F=zr(E,T);if(!F)return!0;if(F?P=E:(P=E==="v"?"h":"v",F=zr(E,T)),!F)return!1;if(!r.current&&"changedTouches"in h&&(C||S)&&(r.current=P),!P)return!0;var Y=r.current||P;return zc(Y,w,h,Y==="h"?C:S)},[]),u=c.useCallback(function(h){var w=h;if(!(!Ye.length||Ye[Ye.length-1]!==s)){var x="deltaY"in w?Xr(w):Mt(w),b=t.current.filter(function(P){return P.name===w.type&&(P.target===w.target||w.target===P.shadowParent)&&Xc(P.delta,x)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var C=(i.current.shards||[]).map(qr).filter(Boolean).filter(function(P){return P.contains(w.target)}),S=C.length>0?a(w,C[0]):!i.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),l=c.useCallback(function(h,w,x,b){var C={name:h,delta:w,target:x,should:b,shadowParent:Qc(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),d=c.useCallback(function(h){n.current=Mt(h),r.current=void 0},[]),f=c.useCallback(function(h){l(h.type,Xr(h),h.target,a(h,e.lockRef.current))},[]),p=c.useCallback(function(h){l(h.type,Mt(h),h.target,a(h,e.lockRef.current))},[]);c.useEffect(function(){return Ye.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Ke),document.addEventListener("touchmove",u,Ke),document.addEventListener("touchstart",d,Ke),function(){Ye=Ye.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,Ke),document.removeEventListener("touchmove",u,Ke),document.removeEventListener("touchstart",d,Ke)}},[]);var m=e.removeScrollBar,y=e.inert;return c.createElement(c.Fragment,null,y?c.createElement(s,{styles:qc(o)}):null,m?c.createElement(Bc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const el=Tc(Po,Jc);var gt=c.forwardRef(function(e,t){return c.createElement(qt,we({},e,{ref:t,sideCar:el}))});gt.classNames=qt.classNames;var tl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ze=new WeakMap,Ot=new WeakMap,It={},An=0,Oo=function(e){return e&&(e.host||Oo(e.parentNode))},nl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Oo(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})},rl=function(e,t,n,r){var o=nl(t,Array.isArray(e)?e:[e]);It[n]||(It[n]=new WeakMap);var s=It[n],i=[],a=new Set,u=new Set(o),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var m=p.getAttribute(r),y=m!==null&&m!=="false",h=(ze.get(p)||0)+1,w=(s.get(p)||0)+1;ze.set(p,h),s.set(p,w),i.push(p),h===1&&y&&Ot.set(p,!0),w===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return d(t),a.clear(),An++,function(){i.forEach(function(f){var p=ze.get(f)-1,m=s.get(f)-1;ze.set(f,p),s.set(f,m),p||(Ot.has(f)||f.removeAttribute(r),Ot.delete(f)),m||f.removeAttribute(n)}),An--,An||(ze=new WeakMap,ze=new WeakMap,Ot=new WeakMap,It={})}},Zt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=tl(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),rl(r,o,n,"aria-hidden")):function(){return null}},Jt="Dialog",[Io]=ie(Jt),[ol,me]=Io(Jt),No=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=c.useRef(null),u=c.useRef(null),[l,d]=Ce({prop:r,defaultProp:o??!1,onChange:s,caller:Jt});return v.jsx(ol,{scope:t,triggerRef:a,contentRef:u,contentId:le(),titleId:le(),descriptionId:le(),open:l,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};No.displayName=Jt;var Do="DialogTrigger",sl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=me(Do,n),s=G(t,o.triggerRef);return v.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":nr(o.open),...r,ref:s,onClick:_(e.onClick,o.onOpenToggle)})});sl.displayName=Do;var er="DialogPortal",[il,Lo]=Io(er,{forceMount:void 0}),ko=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=me(er,t);return v.jsx(il,{scope:t,forceMount:n,children:c.Children.map(r,i=>v.jsx(ne,{present:n||s.open,children:v.jsx(rt,{asChild:!0,container:o,children:i})}))})};ko.displayName=er;var jt="DialogOverlay",jo=c.forwardRef((e,t)=>{const n=Lo(jt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=me(jt,e.__scopeDialog);return s.modal?v.jsx(ne,{present:r||s.open,children:v.jsx(cl,{...o,ref:t})}):null});jo.displayName=jt;var al=Me("DialogOverlay.RemoveScroll"),cl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=me(jt,n);return v.jsx(gt,{as:al,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(N.div,{"data-state":nr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),$e="DialogContent",Fo=c.forwardRef((e,t)=>{const n=Lo($e,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=me($e,e.__scopeDialog);return v.jsx(ne,{present:r||s.open,children:s.modal?v.jsx(ll,{...o,ref:t}):v.jsx(ul,{...o,ref:t})})});Fo.displayName=$e;var ll=c.forwardRef((e,t)=>{const n=me($e,e.__scopeDialog),r=c.useRef(null),o=G(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return Zt(s)},[]),v.jsx($o,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:_(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault())})}),ul=c.forwardRef((e,t)=>{const n=me($e,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return v.jsx($o,{...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 u,l;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),$o=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=me($e,n),u=c.useRef(null),l=G(t,u);return Xt(),v.jsxs(v.Fragment,{children:[v.jsx(mt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:v.jsx(nt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nr(a.open),...i,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(dl,{titleId:a.titleId}),v.jsx(pl,{contentRef:u,descriptionId:a.descriptionId})]})]})}),tr="DialogTitle",Ho=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=me(tr,n);return v.jsx(N.h2,{id:o.titleId,...r,ref:t})});Ho.displayName=tr;var Bo="DialogDescription",Wo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=me(Bo,n);return v.jsx(N.p,{id:o.descriptionId,...r,ref:t})});Wo.displayName=Bo;var Uo="DialogClose",Vo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=me(Uo,n);return v.jsx(N.button,{type:"button",...r,ref:t,onClick:_(e.onClick,()=>o.onOpenChange(!1))})});Vo.displayName=Uo;function nr(e){return e?"open":"closed"}var Go="DialogTitleWarning",[Fp,Ko]=Ha(Go,{contentName:$e,titleName:tr,docsSlug:"dialog"}),dl=({titleId:e})=>{const t=Ko(Go),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
66
|
+
|
|
67
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
68
|
+
|
|
69
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},fl="DialogDescriptionWarning",pl=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ko(fl).contentName}}.`;return c.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},$p=No,Hp=ko,Bp=jo,Wp=Fo,Up=Ho,Vp=Wo,Gp=Vo,Mn=!1;function vl(){const[e,t]=c.useState(Mn);return c.useEffect(()=>{Mn||(Mn=!0,t(!0))},[]),e}var Yo=Yt[" useSyncExternalStore ".trim().toString()];function hl(){return()=>{}}function ml(){return Yo(hl,()=>!0,()=>!1)}var gl=typeof Yo=="function"?ml:vl,rr="Avatar",[yl]=ie(rr),[wl,zo]=yl(rr),Xo=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=c.useState("idle");return v.jsx(wl,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:v.jsx(N.span,{...r,ref:t})})});Xo.displayName=rr;var qo="AvatarImage",Zo=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,i=zo(qo,n),a=xl(r,s),u=re(l=>{o(l),i.onImageLoadingStatusChange(l)});return te(()=>{a!=="idle"&&u(a)},[a,u]),a==="loaded"?v.jsx(N.img,{...s,ref:t,src:r}):null});Zo.displayName=qo;var Jo="AvatarFallback",Qo=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=zo(Jo,n),[i,a]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(u)}},[r]),i&&s.imageLoadingStatus!=="loaded"?v.jsx(N.span,{...o,ref:t}):null});Qo.displayName=Jo;function Zr(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function xl(e,{referrerPolicy:t,crossOrigin:n}){const r=gl(),o=c.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[i,a]=c.useState(()=>Zr(s,e));return te(()=>{a(Zr(s,e))},[s,e]),te(()=>{const u=f=>()=>{a(f)};if(!s)return;const l=u("loaded"),d=u("error");return s.addEventListener("load",l),s.addEventListener("error",d),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",l),s.removeEventListener("error",d)}},[s,n,t]),i}var Kp=Xo,Yp=Zo,zp=Qo;function es(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ts(e){const[t,n]=c.useState(void 0);return te(()=>{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 u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;i=l.inlineSize,a=l.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 Qt="Checkbox",[bl]=ie(Qt),[Cl,or]=bl(Qt);function Sl(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:u,required:l,value:d="on",internal_do_not_use_render:f}=e,[p,m]=Ce({prop:n,defaultProp:o??!1,onChange:u,caller:Qt}),[y,h]=c.useState(null),[w,x]=c.useState(null),b=c.useRef(!1),C=y?!!i||!!y.closest("form"):!0,S={checked:p,disabled:s,setChecked:m,control:y,setControl:h,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:b,required:l,defaultChecked:Ae(o)?!1:o,isFormControl:C,bubbleInput:w,setBubbleInput:x};return v.jsx(Cl,{scope:t,...S,children:Pl(f)?f(S):r})}var ns="CheckboxTrigger",rs=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:u,required:l,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:y}=or(ns,e),h=G(o,d),w=c.useRef(u);return c.useEffect(()=>{const x=s==null?void 0:s.form;if(x){const b=()=>f(w.current);return x.addEventListener("reset",b),()=>x.removeEventListener("reset",b)}},[s,f]),v.jsx(N.button,{type:"button",role:"checkbox","aria-checked":Ae(u)?"mixed":u,"aria-required":l,"data-state":as(u),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:h,onKeyDown:_(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_(n,x=>{f(b=>Ae(b)?!0:!b),y&&m&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})})});rs.displayName=ns;var El=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:u,onCheckedChange:l,form:d,...f}=e;return v.jsx(Sl,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:l,name:r,form:d,value:u,internal_do_not_use_render:({isFormControl:p})=>v.jsxs(v.Fragment,{children:[v.jsx(rs,{...f,ref:t,__scopeCheckbox:n}),p&&v.jsx(is,{__scopeCheckbox:n})]})})});El.displayName=Qt;var os="CheckboxIndicator",Rl=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=or(os,n);return v.jsx(ne,{present:r||Ae(s.checked)||s.checked===!0,children:v.jsx(N.span,{"data-state":as(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Rl.displayName=os;var ss="CheckboxBubbleInput",is=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:u,name:l,value:d,form:f,bubbleInput:p,setBubbleInput:m}=or(ss,e),y=G(n,m),h=es(s),w=ts(r);c.useEffect(()=>{const b=p;if(!b)return;const C=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(C,"checked").set,T=!o.current;if(h!==s&&P){const E=new Event("click",{bubbles:T});b.indeterminate=Ae(s),P.call(b,Ae(s)?!1:s),b.dispatchEvent(E)}},[p,h,s,o]);const x=c.useRef(Ae(s)?!1:s);return v.jsx(N.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:a,disabled:u,name:l,value:d,form:f,...t,tabIndex:-1,ref:y,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});is.displayName=ss;function Pl(e){return typeof e=="function"}function Ae(e){return e==="indeterminate"}function as(e){return Ae(e)?"indeterminate":e?"checked":"unchecked"}const _l=["top","right","bottom","left"],Oe=Math.min,ce=Math.max,Ft=Math.round,Nt=Math.floor,be=e=>({x:e,y:e}),Tl={left:"right",right:"left",bottom:"top",top:"bottom"};function jn(e,t,n){return ce(e,Oe(t,n))}function Re(e,t){return typeof e=="function"?e(t):e}function Pe(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function sr(e){return e==="x"?"y":"x"}function ir(e){return e==="y"?"height":"width"}function xe(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ar(e){return sr(xe(e))}function Al(e,t,n){n===void 0&&(n=!1);const r=ot(e),o=ar(e),s=ir(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=$t(i)),[i,$t(i)]}function Ml(e){const t=$t(e);return[Fn(e),t,Fn(t)]}function Fn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Jr=["left","right"],Qr=["right","left"],Ol=["top","bottom"],Il=["bottom","top"];function Nl(e,t,n){switch(e){case"top":case"bottom":return n?t?Qr:Jr:t?Jr:Qr;case"left":case"right":return t?Ol:Il;default:return[]}}function Dl(e,t,n,r){const o=ot(e);let s=Nl(Pe(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Fn)))),s}function $t(e){const t=Pe(e);return Tl[t]+e.slice(t.length)}function Ll(e){return{top:0,right:0,bottom:0,left:0,...e}}function cs(e){return typeof e!="number"?Ll(e):{top:e,right:e,bottom:e,left:e}}function Ht(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 eo(e,t,n){let{reference:r,floating:o}=e;const s=xe(t),i=ar(t),a=ir(i),u=Pe(t),l=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let m;switch(u){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(ot(t)){case"start":m[i]-=p*(n&&l?-1:1);break;case"end":m[i]+=p*(n&&l?-1:1);break}return m}async function kl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Re(t,e),y=cs(m),w=a[p?f==="floating"?"reference":"floating":f],x=Ht(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:u})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},P=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:C,strategy:u}):b);return{top:(x.top-P.top+y.top)/S.y,bottom:(P.bottom-x.bottom+y.bottom)/S.y,left:(x.left-P.left+y.left)/S.x,right:(P.right-x.right+y.right)/S.x}}const jl=50,Fl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:kl},u=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=eo(l,r,u),p=r,m=0;const y={};for(let h=0;h<s.length;h++){const w=s[h];if(!w)continue;const{name:x,fn:b}=w,{x:C,y:S,data:P,reset:T}=await b({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:y,rects:l,platform:a,elements:{reference:e,floating:t}});d=C??d,f=S??f,y[x]={...y[x],...P},T&&m<jl&&(m++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(l=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:d,y:f}=eo(l,p,u)),h=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:y}},$l=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:u}=t,{element:l,padding:d=0}=Re(e,t)||{};if(l==null)return{};const f=cs(d),p={x:n,y:r},m=ar(o),y=ir(m),h=await i.getDimensions(l),w=m==="y",x=w?"top":"left",b=w?"bottom":"right",C=w?"clientHeight":"clientWidth",S=s.reference[y]+s.reference[m]-p[m]-s.floating[y],P=p[m]-s.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let E=T?T[C]:0;(!E||!await(i.isElement==null?void 0:i.isElement(T)))&&(E=a.floating[C]||s.floating[y]);const O=S/2-P/2,I=E/2-h[y]/2-1,k=Oe(f[x],I),F=Oe(f[b],I),Y=k,z=E-h[y]-F,V=E/2-h[y]/2+O,J=jn(Y,V,z),$=!u.arrow&&ot(o)!=null&&V!==J&&s.reference[y]/2-(V<Y?k:F)-h[y]/2<0,X=$?V<Y?V-Y:V-z:0;return{[m]:p[m]+X,data:{[m]:J,centerOffset:V-J-X,...$&&{alignmentOffset:X}},reset:$}}}),Hl=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:u,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...w}=Re(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Pe(o),b=xe(a),C=Pe(a)===a,S=await(u.isRTL==null?void 0:u.isRTL(l.floating)),P=p||(C||!h?[$t(a)]:Ml(a)),T=y!=="none";!p&&T&&P.push(...Dl(a,h,y,S));const E=[a,...P],O=await u.detectOverflow(t,w),I=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&I.push(O[x]),f){const V=Al(o,i,S);I.push(O[V[0]],O[V[1]])}if(k=[...k,{placement:o,overflows:I}],!I.every(V=>V<=0)){var F,Y;const V=(((F=s.flip)==null?void 0:F.index)||0)+1,J=E[V];if(J&&(!(f==="alignment"?b!==xe(J):!1)||k.every(j=>xe(j.placement)===b?j.overflows[0]>0:!0)))return{data:{index:V,overflows:k},reset:{placement:J}};let $=(Y=k.filter(X=>X.overflows[0]<=0).sort((X,j)=>X.overflows[1]-j.overflows[1])[0])==null?void 0:Y.placement;if(!$)switch(m){case"bestFit":{var z;const X=(z=k.filter(j=>{if(T){const M=xe(j.placement);return M===b||M==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(M=>M>0).reduce((M,q)=>M+q,0)]).sort((j,M)=>j[1]-M[1])[0])==null?void 0:z[0];X&&($=X);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function to(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function no(e){return _l.some(t=>e[t]>=0)}const Bl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Re(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=to(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:no(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=to(i,n.floating);return{data:{escapedOffsets:a,escaped:no(a)}}}default:return{}}}}},ls=new Set(["left","top"]);async function Wl(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Pe(n),a=ot(n),u=xe(n)==="y",l=ls.has(i)?-1:1,d=s&&u?-1:1,f=Re(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),u?{x:m*d,y:p*l}:{x:p*l,y:m*d}}const Ul=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,u=await Wl(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},Vl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:x=>{let{x:b,y:C}=x;return{x:b,y:C}}},...l}=Re(e,t),d={x:n,y:r},f=await s.detectOverflow(t,l),p=xe(Pe(o)),m=sr(p);let y=d[m],h=d[p];if(i){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",C=y+f[x],S=y-f[b];y=jn(C,y,S)}if(a){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",C=h+f[x],S=h-f[b];h=jn(C,h,S)}const w=u.fn({...t,[m]:y,[p]:h});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[m]:i,[p]:a}}}}}},Gl=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:u=!0,crossAxis:l=!0}=Re(e,t),d={x:n,y:r},f=xe(o),p=sr(f);let m=d[p],y=d[f];const h=Re(a,t),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=p==="y"?"height":"width",S=s.reference[p]-s.floating[C]+w.mainAxis,P=s.reference[p]+s.reference[C]-w.mainAxis;m<S?m=S:m>P&&(m=P)}if(l){var x,b;const C=p==="y"?"width":"height",S=ls.has(Pe(o)),P=s.reference[f]-s.floating[C]+(S&&((x=i.offset)==null?void 0:x[f])||0)+(S?0:w.crossAxis),T=s.reference[f]+s.reference[C]+(S?0:((b=i.offset)==null?void 0:b[f])||0)-(S?w.crossAxis:0);y<P?y=P:y>T&&(y=T)}return{[p]:m,[f]:y}}}},Kl=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:u=()=>{},...l}=Re(e,t),d=await i.detectOverflow(t,l),f=Pe(o),p=ot(o),m=xe(o)==="y",{width:y,height:h}=s.floating;let w,x;f==="top"||f==="bottom"?(w=f,x=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,w=p==="end"?"top":"bottom");const b=h-d.top-d.bottom,C=y-d.left-d.right,S=Oe(h-d[w],b),P=Oe(y-d[x],C),T=!t.middlewareData.shift;let E=S,O=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=b),T&&!p){const k=ce(d.left,0),F=ce(d.right,0),Y=ce(d.top,0),z=ce(d.bottom,0);m?O=y-2*(k!==0||F!==0?k+F:ce(d.left,d.right)):E=h-2*(Y!==0||z!==0?Y+z:ce(d.top,d.bottom))}await u({...t,availableWidth:O,availableHeight:E});const I=await i.getDimensions(a.floating);return y!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function en(){return typeof window<"u"}function st(e){return us(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){var t;return(t=(us(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function us(e){return en()?e instanceof Node||e instanceof ue(e).Node:!1}function ve(e){return en()?e instanceof Element||e instanceof ue(e).Element:!1}function _e(e){return en()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function ro(e){return!en()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}function yt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=he(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Yl(e){return/^(table|td|th)$/.test(st(e))}function tn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const zl=/transform|translate|scale|rotate|perspective|filter/,Xl=/paint|layout|strict|content/,Fe=e=>!!e&&e!=="none";let On;function cr(e){const t=ve(e)?he(e):e;return Fe(t.transform)||Fe(t.translate)||Fe(t.scale)||Fe(t.rotate)||Fe(t.perspective)||!lr()&&(Fe(t.backdropFilter)||Fe(t.filter))||zl.test(t.willChange||"")||Xl.test(t.contain||"")}function ql(e){let t=Ie(e);for(;_e(t)&&!Ze(t);){if(cr(t))return t;if(tn(t))return null;t=Ie(t)}return null}function lr(){return On==null&&(On=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),On}function Ze(e){return/^(html|body|#document)$/.test(st(e))}function he(e){return ue(e).getComputedStyle(e)}function nn(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ie(e){if(st(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||Se(e);return ro(t)?t.host:t}function ds(e){const t=Ie(e);return Ze(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&yt(t)?t:ds(t)}function dt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ds(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ue(o);if(s){const a=$n(i);return t.concat(i,i.visualViewport||[],yt(o)?o:[],a&&n?dt(a):[])}else return t.concat(o,dt(o,[],n))}function $n(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fs(e){const t=he(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_e(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ft(n)!==s||Ft(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ur(e){return ve(e)?e:e.contextElement}function qe(e){const t=ur(e);if(!_e(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=fs(t);let i=(s?Ft(n.width):n.width)/r,a=(s?Ft(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Zl=be(0);function ps(e){const t=ue(e);return!lr()||!t.visualViewport?Zl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ue(e)?!1:t}function He(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ur(e);let i=be(1);t&&(r?ve(r)&&(i=qe(r)):i=qe(e));const a=Jl(s,n,r)?ps(s):be(0);let u=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=ue(s),m=r&&ve(r)?ue(r):r;let y=p,h=$n(y);for(;h&&r&&m!==y;){const w=qe(h),x=h.getBoundingClientRect(),b=he(h),C=x.left+(h.clientLeft+parseFloat(b.paddingLeft))*w.x,S=x.top+(h.clientTop+parseFloat(b.paddingTop))*w.y;u*=w.x,l*=w.y,d*=w.x,f*=w.y,u+=C,l+=S,y=ue(h),h=$n(y)}}return Ht({width:d,height:f,x:u,y:l})}function rn(e,t){const n=nn(e).scrollLeft;return t?t.left+n:He(Se(e)).left+n}function vs(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ql(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Se(r),a=t?tn(t.floating):!1;if(r===i||a&&s)return n;let u={scrollLeft:0,scrollTop:0},l=be(1);const d=be(0),f=_e(r);if((f||!f&&!s)&&((st(r)!=="body"||yt(i))&&(u=nn(r)),f)){const m=He(r);l=qe(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=i&&!f&&!s?vs(i,u):be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-u.scrollTop*l.y+d.y+p.y}}function eu(e){return Array.from(e.getClientRects())}function tu(e){const t=Se(e),n=nn(e),r=e.ownerDocument.body,o=ce(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ce(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+rn(e);const a=-n.scrollTop;return he(r).direction==="rtl"&&(i+=ce(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const oo=25;function nu(e,t){const n=ue(e),r=Se(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,u=0;if(o){s=o.width,i=o.height;const d=lr();(!d||d&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const l=rn(r);if(l<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(r.clientWidth-f.clientWidth-m);y<=oo&&(s-=y)}else l<=oo&&(s+=l);return{width:s,height:i,x:a,y:u}}function ru(e,t){const n=He(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=_e(e)?qe(e):be(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:i,height:a,x:u,y:l}}function so(e,t,n){let r;if(t==="viewport")r=nu(e,n);else if(t==="document")r=tu(Se(e));else if(ve(t))r=ru(t,n);else{const o=ps(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ht(r)}function hs(e,t){const n=Ie(e);return n===t||!ve(n)||Ze(n)?!1:he(n).position==="fixed"||hs(n,t)}function ou(e,t){const n=t.get(e);if(n)return n;let r=dt(e,[],!1).filter(a=>ve(a)&&st(a)!=="body"),o=null;const s=he(e).position==="fixed";let i=s?Ie(e):e;for(;ve(i)&&!Ze(i);){const a=he(i),u=cr(i);!u&&a.position==="fixed"&&(o=null),(s?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||yt(i)&&!u&&hs(e,i))?r=r.filter(d=>d!==i):o=a,i=Ie(i)}return t.set(e,r),r}function su(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?tn(t)?[]:ou(t,this._c):[].concat(n),r],a=so(t,i[0],o);let u=a.top,l=a.right,d=a.bottom,f=a.left;for(let p=1;p<i.length;p++){const m=so(t,i[p],o);u=ce(m.top,u),l=Oe(m.right,l),d=Oe(m.bottom,d),f=ce(m.left,f)}return{width:l-f,height:d-u,x:f,y:u}}function iu(e){const{width:t,height:n}=fs(e);return{width:t,height:n}}function au(e,t,n){const r=_e(t),o=Se(t),s=n==="fixed",i=He(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const u=be(0);function l(){u.x=rn(o)}if(r||!r&&!s)if((st(t)!=="body"||yt(o))&&(a=nn(t)),r){const m=He(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const d=o&&!r&&!s?vs(o,a):be(0),f=i.left+a.scrollLeft-u.x-d.x,p=i.top+a.scrollTop-u.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function In(e){return he(e).position==="static"}function io(e,t){if(!_e(e)||he(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Se(e)===n&&(n=n.ownerDocument.body),n}function ms(e,t){const n=ue(e);if(tn(e))return n;if(!_e(e)){let o=Ie(e);for(;o&&!Ze(o);){if(ve(o)&&!In(o))return o;o=Ie(o)}return n}let r=io(e,t);for(;r&&Yl(r)&&In(r);)r=io(r,t);return r&&Ze(r)&&In(r)&&!cr(r)?n:r||ql(e)||n}const cu=async function(e){const t=this.getOffsetParent||ms,n=this.getDimensions,r=await n(e.floating);return{reference:au(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lu(e){return he(e).direction==="rtl"}const uu={convertOffsetParentRelativeRectToViewportRelativeRect:Ql,getDocumentElement:Se,getClippingRect:su,getOffsetParent:ms,getElementRects:cu,getClientRects:eu,getDimensions:iu,getScale:qe,isElement:ve,isRTL:lu};function gs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function du(e,t){let n=null,r;const o=Se(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=l;if(a||t(),!p||!m)return;const y=Nt(f),h=Nt(o.clientWidth-(d+p)),w=Nt(o.clientHeight-(f+m)),x=Nt(d),C={rootMargin:-y+"px "+-h+"px "+-w+"px "+-x+"px",threshold:ce(0,Oe(1,u))||1};let S=!0;function P(T){const E=T[0].intersectionRatio;if(E!==u){if(!S)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!gs(l,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(P,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return i(!0),s}function fu(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:u=!1}=r,l=ur(e),d=o||s?[...l?dt(l):[],...t?dt(t):[]]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=l&&a?du(l,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(x=>{let[b]=x;b&&b.target===l&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),l&&!u&&m.observe(l),t&&m.observe(t));let y,h=u?He(e):null;u&&w();function w(){const x=He(e);h&&!gs(h,x)&&n(),h=x,y=requestAnimationFrame(w)}return n(),()=>{var x;d.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(x=m)==null||x.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const pu=Ul,vu=Vl,hu=Hl,mu=Kl,gu=Bl,ao=$l,yu=Gl,wu=(e,t,n)=>{const r=new Map,o={platform:uu,...n},s={...o.platform,_c:r};return Fl(e,t,{...o,platform:s})};var xu=typeof document<"u",bu=function(){},kt=xu?c.useLayoutEffect:bu;function Bt(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(!Bt(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)&&!Bt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ys(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function co(e,t){const n=ys(e);return Math.round(t*n)/n}function Nn(e){const t=c.useRef(e);return kt(()=>{t.current=e}),t}function Cu(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:u,open:l}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=c.useState(r);Bt(p,r)||m(r);const[y,h]=c.useState(null),[w,x]=c.useState(null),b=c.useCallback(j=>{j!==T.current&&(T.current=j,h(j))},[]),C=c.useCallback(j=>{j!==E.current&&(E.current=j,x(j))},[]),S=s||y,P=i||w,T=c.useRef(null),E=c.useRef(null),O=c.useRef(d),I=u!=null,k=Nn(u),F=Nn(o),Y=Nn(l),z=c.useCallback(()=>{if(!T.current||!E.current)return;const j={placement:t,strategy:n,middleware:p};F.current&&(j.platform=F.current),wu(T.current,E.current,j).then(M=>{const q={...M,isPositioned:Y.current!==!1};V.current&&!Bt(O.current,q)&&(O.current=q,tt.flushSync(()=>{f(q)}))})},[p,t,n,F,Y]);kt(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[l]);const V=c.useRef(!1);kt(()=>(V.current=!0,()=>{V.current=!1}),[]),kt(()=>{if(S&&(T.current=S),P&&(E.current=P),S&&P){if(k.current)return k.current(S,P,z);z()}},[S,P,z,k,I]);const J=c.useMemo(()=>({reference:T,floating:E,setReference:b,setFloating:C}),[b,C]),$=c.useMemo(()=>({reference:S,floating:P}),[S,P]),X=c.useMemo(()=>{const j={position:n,left:0,top:0};if(!$.floating)return j;const M=co($.floating,d.x),q=co($.floating,d.y);return a?{...j,transform:"translate("+M+"px, "+q+"px)",...ys($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:q}},[n,a,$.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:z,refs:J,elements:$,floatingStyles:X}),[d,z,J,$,X])}const Su=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?ao({element:r.current,padding:o}).fn(n):{}:r?ao({element:r,padding:o}).fn(n):{}}}},Eu=(e,t)=>{const n=pu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ru=(e,t)=>{const n=vu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pu=(e,t)=>({fn:yu(e).fn,options:[e,t]}),_u=(e,t)=>{const n=hu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tu=(e,t)=>{const n=mu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Au=(e,t)=>{const n=gu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mu=(e,t)=>{const n=Su(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ou="Arrow",ws=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return v.jsx(N.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});ws.displayName=Ou;var Iu=ws,dr="Popper",[xs,De]=ie(dr),[Nu,bs]=xs(dr),Cs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null),[s,i]=c.useState(void 0);return v.jsx(Nu,{scope:t,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})};Cs.displayName=dr;var Ss="PopperAnchor",Es=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=bs(Ss,n),i=c.useRef(null),a=s.onAnchorChange,u=c.useCallback(y=>{i.current=y,y&&a(y)},[a]),l=G(t,u),d=c.useRef(null);c.useEffect(()=>{if(!r)return;const y=d.current;d.current=r.current,y!==d.current&&a(d.current)});const f=s.placementState&&pr(s.placementState),p=f==null?void 0:f[0],m=f==null?void 0:f[1];return r?null:v.jsx(N.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...o,ref:l})});Es.displayName=Ss;var fr="PopperContent",[Du,Lu]=xs(fr),Rs=c.forwardRef((e,t)=>{var K,U,Z,Q,ee,ge;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l,collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...h}=e,w=bs(fr,n),[x,b]=c.useState(null),C=G(t,ae=>b(ae)),[S,P]=c.useState(null),T=ts(S),E=(T==null?void 0:T.width)??0,O=(T==null?void 0:T.height)??0,I=r+(s!=="center"?"-"+s:""),k=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=l?Array.isArray(l)?l:[l]:void 0,Y=F!==void 0&&F.length>0,z={padding:k,boundary:F==null?void 0:F.filter(ju),altBoundary:Y},{refs:V,floatingStyles:J,placement:$,isPositioned:X,middlewareData:j}=Cu({strategy:"fixed",placement:I,whileElementsMounted:(...ae)=>fu(...ae,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[Eu({mainAxis:o+O,alignmentAxis:i}),u&&Ru({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Pu():void 0,...z}),u&&_u({...z}),Tu({...z,apply:({elements:ae,rects:Ge,availableWidth:it,availableHeight:at})=>{const{width:wa,height:xa}=Ge.reference,Rt=ae.floating.style;Rt.setProperty("--radix-popper-available-width",`${it}px`),Rt.setProperty("--radix-popper-available-height",`${at}px`),Rt.setProperty("--radix-popper-anchor-width",`${wa}px`),Rt.setProperty("--radix-popper-anchor-height",`${xa}px`)}}),S&&Mu({element:S,padding:a}),Fu({arrowWidth:E,arrowHeight:O}),p&&Au({strategy:"referenceHidden",...z})]}),M=w.setPlacementState;te(()=>(M($),()=>{M(void 0)}),[$,M]);const[q,g]=pr($),R=re(y);te(()=>{X&&(R==null||R())},[X,R]);const L=(K=j.arrow)==null?void 0:K.x,D=(U=j.arrow)==null?void 0:U.y,W=((Z=j.arrow)==null?void 0:Z.centerOffset)!==0,[B,A]=c.useState();return te(()=>{x&&A(window.getComputedStyle(x).zIndex)},[x]),v.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:X?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(Q=j.transformOrigin)==null?void 0:Q.x,(ee=j.transformOrigin)==null?void 0:ee.y].join(" "),...((ge=j.hide)==null?void 0:ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Du,{scope:n,placedSide:q,placedAlign:g,onArrowChange:P,arrowX:L,arrowY:D,shouldHideArrow:W,children:v.jsx(N.div,{"data-side":q,"data-align":g,...h,ref:C,style:{...h.style,animation:X?void 0:"none"}})})})});Rs.displayName=fr;var Ps="PopperArrow",ku={top:"bottom",right:"left",bottom:"top",left:"right"},_s=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Lu(Ps,r),i=ku[s.placedSide];return v.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:v.jsx(Iu,{...o,ref:n,style:{...o.style,display:"block"}})})});_s.displayName=Ps;function ju(e){return e!==null}var Fu=e=>({name:"transformOrigin",options:e,fn(t){var w,x,b;const{placement:n,rects:r,middlewareData:o}=t,i=((w=o.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[l,d]=pr(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((x=o.arrow)==null?void 0:x.x)??0)+a/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+u/2;let y="",h="";return l==="bottom"?(y=i?f:`${p}px`,h=`${-u}px`):l==="top"?(y=i?f:`${p}px`,h=`${r.floating.height+u}px`):l==="right"?(y=`${-u}px`,h=i?f:`${m}px`):l==="left"&&(y=`${r.floating.width+u}px`,h=i?f:`${m}px`),{data:{x:y,y:h}}}});function pr(e){const[t,n="center"]=e.split("-");return[t,n]}var on=Cs,wt=Es,sn=Rs,an=_s,Dn="rovingFocusGroup.onEntryFocus",$u={bubbles:!1,cancelable:!0},xt="RovingFocusGroup",[Hn,Ts,Hu]=qn(xt),[Bu,cn]=ie(xt,[Hu]),[Wu,Uu]=Bu(xt),As=c.forwardRef((e,t)=>v.jsx(Hn.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Hn.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Vu,{...e,ref:t})})}));As.displayName=xt;var Vu=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...f}=e,p=c.useRef(null),m=G(t,p),y=ht(s),[h,w]=Ce({prop:i,defaultProp:a??null,onChange:u,caller:xt}),[x,b]=c.useState(!1),C=re(l),S=Ts(n),P=c.useRef(!1),[T,E]=c.useState(0);return c.useEffect(()=>{const O=p.current;if(O)return O.addEventListener(Dn,C),()=>O.removeEventListener(Dn,C)},[C]),v.jsx(Wu,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:h,onItemFocus:c.useCallback(O=>w(O),[w]),onItemShiftTab:c.useCallback(()=>b(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(O=>O+1),[]),onFocusableItemRemove:c.useCallback(()=>E(O=>O-1),[]),children:v.jsx(N.div,{tabIndex:x||T===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{P.current=!0}),onFocus:_(e.onFocus,O=>{const I=!P.current;if(O.target===O.currentTarget&&I&&!x){const k=new CustomEvent(Dn,$u);if(O.currentTarget.dispatchEvent(k),!k.defaultPrevented){const F=S().filter($=>$.focusable),Y=F.find($=>$.active),z=F.find($=>$.id===h),J=[Y,z,...F].filter(Boolean).map($=>$.ref.current);Is(J,d)}}P.current=!1}),onBlur:_(e.onBlur,()=>b(!1))})})}),Ms="RovingFocusGroupItem",Os=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,u=le(),l=s||u,d=Uu(Ms,n),f=d.currentTabStopId===l,p=Ts(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:h}=d;return c.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),v.jsx(Hn.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:v.jsx(N.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:_(e.onMouseDown,w=>{r?d.onItemFocus(l):w.preventDefault()}),onFocus:_(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:_(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=Yu(w,d.orientation,d.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let C=p().filter(S=>S.focusable).map(S=>S.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();const S=C.indexOf(w.currentTarget);C=d.loop?zu(C,S+1):C.slice(S+1)}setTimeout(()=>Is(C))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});Os.displayName=Ms;var Gu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ku(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Yu(e,t,n){const r=Ku(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gu[r]}function Is(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ns=As,Ds=Os,Bn=["Enter"," "],Xu=["ArrowDown","PageUp","Home"],Ls=["ArrowUp","PageDown","End"],qu=[...Xu,...Ls],Zu={ltr:[...Bn,"ArrowRight"],rtl:[...Bn,"ArrowLeft"]},Ju={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bt="Menu",[ft,Qu,ed]=qn(bt),[We,ks]=ie(bt,[ed,De,cn]),ln=De(),js=cn(),[td,Ue]=We(bt),[nd,Ct]=We(bt),Fs=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=ln(t),[u,l]=c.useState(null),d=c.useRef(!1),f=re(s),p=ht(o);return c.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),v.jsx(on,{...a,children:v.jsx(td,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:v.jsx(nd,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};Fs.displayName=bt;var rd="MenuAnchor",vr=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ln(n);return v.jsx(wt,{...o,...r,ref:t})});vr.displayName=rd;var hr="MenuPortal",[od,$s]=We(hr,{forceMount:void 0}),Hs=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ue(hr,t);return v.jsx(od,{scope:t,forceMount:n,children:v.jsx(ne,{present:n||s.open,children:v.jsx(rt,{asChild:!0,container:o,children:r})})})};Hs.displayName=hr;var de="MenuContent",[sd,mr]=We(de),Bs=c.forwardRef((e,t)=>{const n=$s(de,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ue(de,e.__scopeMenu),i=Ct(de,e.__scopeMenu);return v.jsx(ft.Provider,{scope:e.__scopeMenu,children:v.jsx(ne,{present:r||s.open,children:v.jsx(ft.Slot,{scope:e.__scopeMenu,children:i.modal?v.jsx(id,{...o,ref:t}):v.jsx(ad,{...o,ref:t})})})})}),id=c.forwardRef((e,t)=>{const n=Ue(de,e.__scopeMenu),r=c.useRef(null),o=G(t,r);return c.useEffect(()=>{const s=r.current;if(s)return Zt(s)},[]),v.jsx(gr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ad=c.forwardRef((e,t)=>{const n=Ue(de,e.__scopeMenu);return v.jsx(gr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cd=Me("MenuContent.ScrollLock"),gr=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:y,...h}=e,w=Ue(de,n),x=Ct(de,n),b=ln(n),C=js(n),S=Qu(n),[P,T]=c.useState(null),E=c.useRef(null),O=G(t,E,w.onContentChange),I=c.useRef(0),k=c.useRef(""),F=c.useRef(0),Y=c.useRef(null),z=c.useRef("right"),V=c.useRef(0),J=y?gt:c.Fragment,$=y?{as:cd,allowPinchZoom:!0}:void 0,X=M=>{var A,K;const q=k.current+M,g=S().filter(U=>!U.disabled),R=document.activeElement,L=(A=g.find(U=>U.ref.current===R))==null?void 0:A.textValue,D=g.map(U=>U.textValue),W=xd(D,q,L),B=(K=g.find(U=>U.textValue===W))==null?void 0:K.ref.current;(function U(Z){k.current=Z,window.clearTimeout(I.current),Z!==""&&(I.current=window.setTimeout(()=>U(""),1e3))})(q),B&&setTimeout(()=>B.focus())};c.useEffect(()=>()=>window.clearTimeout(I.current),[]),Xt();const j=c.useCallback(M=>{var g,R;return z.current===((g=Y.current)==null?void 0:g.side)&&Cd(M,(R=Y.current)==null?void 0:R.area)},[]);return v.jsx(sd,{scope:n,searchRef:k,onItemEnter:c.useCallback(M=>{j(M)&&M.preventDefault()},[j]),onItemLeave:c.useCallback(M=>{var q;j(M)||((q=E.current)==null||q.focus(),T(null))},[j]),onTriggerLeave:c.useCallback(M=>{j(M)&&M.preventDefault()},[j]),pointerGraceTimerRef:F,onPointerGraceIntentChange:c.useCallback(M=>{Y.current=M},[]),children:v.jsx(J,{...$,children:v.jsx(mt,{asChild:!0,trapped:o,onMountAutoFocus:_(s,M=>{var q;M.preventDefault(),(q=E.current)==null||q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:v.jsx(nt,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:v.jsx(Ns,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:T,onEntryFocus:_(u,M=>{x.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(sn,{role:"menu","aria-orientation":"vertical","data-state":ri(w.open),"data-radix-menu-content":"",dir:x.dir,...b,...h,ref:O,style:{outline:"none",...h.style},onKeyDown:_(h.onKeyDown,M=>{const g=M.target.closest("[data-radix-menu-content]")===M.currentTarget,R=M.ctrlKey||M.altKey||M.metaKey,L=M.key.length===1;g&&(M.key==="Tab"&&M.preventDefault(),!R&&L&&X(M.key));const D=E.current;if(M.target!==D||!qu.includes(M.key))return;M.preventDefault();const B=S().filter(A=>!A.disabled).map(A=>A.ref.current);Ls.includes(M.key)&&B.reverse(),yd(B)}),onBlur:_(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(I.current),k.current="")}),onPointerMove:_(e.onPointerMove,pt(M=>{const q=M.target,g=V.current!==M.clientX;if(M.currentTarget.contains(q)&&g){const R=M.clientX>V.current?"right":"left";z.current=R,V.current=M.clientX}}))})})})})})})});Bs.displayName=de;var ld="MenuGroup",yr=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(N.div,{role:"group",...r,ref:t})});yr.displayName=ld;var ud="MenuLabel",Ws=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(N.div,{...r,ref:t})});Ws.displayName=ud;var Wt="MenuItem",lo="menu.itemSelect",un=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),i=Ct(Wt,e.__scopeMenu),a=mr(Wt,e.__scopeMenu),u=G(t,s),l=c.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const p=new CustomEvent(lo,{bubbles:!0,cancelable:!0});f.addEventListener(lo,m=>r==null?void 0:r(m),{once:!0}),mo(f,p),p.defaultPrevented?l.current=!1:i.onClose()}};return v.jsx(Us,{...o,ref:u,disabled:n,onClick:_(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),l.current=!0},onPointerUp:_(e.onPointerUp,f=>{var p;l.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:_(e.onKeyDown,f=>{const p=a.searchRef.current!=="";n||p&&f.key===" "||Bn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});un.displayName=Wt;var Us=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=mr(Wt,n),a=js(n),u=c.useRef(null),l=G(t,u),[d,f]=c.useState(!1),[p,m]=c.useState("");return c.useEffect(()=>{const y=u.current;y&&m((y.textContent??"").trim())},[s.children]),v.jsx(ft.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:v.jsx(Ds,{asChild:!0,...a,focusable:!r,children:v.jsx(N.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:_(e.onPointerMove,pt(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,pt(y=>i.onItemLeave(y))),onFocus:_(e.onFocus,()=>f(!0)),onBlur:_(e.onBlur,()=>f(!1))})})})}),dd="MenuCheckboxItem",Vs=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return v.jsx(Xs,{scope:e.__scopeMenu,checked:n,children:v.jsx(un,{role:"menuitemcheckbox","aria-checked":Ut(n)?"mixed":n,...o,ref:t,"data-state":xr(n),onSelect:_(o.onSelect,()=>r==null?void 0:r(Ut(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Vs.displayName=dd;var Gs="MenuRadioGroup",[fd,pd]=We(Gs,{value:void 0,onValueChange:()=>{}}),Ks=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=re(r);return v.jsx(fd,{scope:e.__scopeMenu,value:n,onValueChange:s,children:v.jsx(yr,{...o,ref:t})})});Ks.displayName=Gs;var Ys="MenuRadioItem",zs=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=pd(Ys,e.__scopeMenu),s=n===o.value;return v.jsx(Xs,{scope:e.__scopeMenu,checked:s,children:v.jsx(un,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":xr(s),onSelect:_(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});zs.displayName=Ys;var wr="MenuItemIndicator",[Xs,vd]=We(wr,{checked:!1}),qs=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=vd(wr,n);return v.jsx(ne,{present:r||Ut(s.checked)||s.checked===!0,children:v.jsx(N.span,{...o,ref:t,"data-state":xr(s.checked)})})});qs.displayName=wr;var hd="MenuSeparator",Zs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(N.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Zs.displayName=hd;var md="MenuArrow",Js=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ln(n);return v.jsx(an,{...o,...r,ref:t})});Js.displayName=md;var gd="MenuSub",[Xp,Qs]=We(gd),lt="MenuSubTrigger",ei=c.forwardRef((e,t)=>{const n=Ue(lt,e.__scopeMenu),r=Ct(lt,e.__scopeMenu),o=Qs(lt,e.__scopeMenu),s=mr(lt,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=s,l={__scopeMenu:e.__scopeMenu},d=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>d,[d]),c.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),u(null)}},[a,u]),v.jsx(vr,{asChild:!0,...l,children:v.jsx(Us,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?o.contentId:void 0,"data-state":ri(n.open),...e,ref:Xn(t,o.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,pt(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:_(e.onPointerLeave,pt(f=>{var m,y;d();const p=(m=n.content)==null?void 0:m.getBoundingClientRect();if(p){const h=(y=n.content)==null?void 0:y.dataset.side,w=h==="right",x=w?-5:5,b=p[w?"left":"right"],C=p[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:b,y:p.top},{x:C,y:p.top},{x:C,y:p.bottom},{x:b,y:p.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,f=>{var m;const p=s.searchRef.current!=="";e.disabled||p&&f.key===" "||Zu[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});ei.displayName=lt;var ti="MenuSubContent",ni=c.forwardRef((e,t)=>{const n=$s(de,e.__scopeMenu),{forceMount:r=n.forceMount,align:o="start",...s}=e,i=Ue(de,e.__scopeMenu),a=Ct(de,e.__scopeMenu),u=Qs(ti,e.__scopeMenu),l=c.useRef(null),d=G(t,l);return v.jsx(ft.Provider,{scope:e.__scopeMenu,children:v.jsx(ne,{present:r||i.open,children:v.jsx(ft.Slot,{scope:e.__scopeMenu,children:v.jsx(gr,{id:u.contentId,"aria-labelledby":u.triggerId,...s,ref:d,align:o,side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;a.isUsingKeyboardRef.current&&((p=l.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:_(e.onFocusOutside,f=>{f.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:_(e.onKeyDown,f=>{var y;const p=f.currentTarget.contains(f.target),m=Ju[a.dir].includes(f.key);p&&m&&(i.onOpenChange(!1),(y=u.trigger)==null||y.focus(),f.preventDefault())})})})})})});ni.displayName=ti;function ri(e){return e?"open":"closed"}function Ut(e){return e==="indeterminate"}function xr(e){return Ut(e)?"indeterminate":e?"checked":"unchecked"}function yd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xd(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=wd(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const u=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function bd(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],u=t[i],l=a.x,d=a.y,f=u.x,p=u.y;d>r!=p>r&&n<(f-l)*(r-d)/(p-d)+l&&(o=!o)}return o}function Cd(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bd(n,t)}function pt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Sd=Fs,Ed=vr,Rd=Hs,Pd=Bs,_d=yr,Td=Ws,Ad=un,Md=Vs,Od=Ks,Id=zs,Nd=qs,Dd=Zs,Ld=Js,kd=ei,jd=ni,dn="DropdownMenu",[Fd]=ie(dn,[ks]),se=ks(),[$d,oi]=Fd(dn),si=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,u=se(t),l=c.useRef(null),[d,f]=Ce({prop:o,defaultProp:s??!1,onChange:i,caller:dn});return v.jsx($d,{scope:t,triggerId:le(),triggerRef:l,contentId:le(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:a,children:v.jsx(Sd,{...u,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};si.displayName=dn;var ii="DropdownMenuTrigger",ai=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=oi(ii,n),i=se(n);return v.jsx(Ed,{asChild:!0,...i,children:v.jsx(N.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Xn(t,s.triggerRef),onPointerDown:_(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:_(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});ai.displayName=ii;var Hd="DropdownMenuPortal",ci=e=>{const{__scopeDropdownMenu:t,...n}=e,r=se(t);return v.jsx(Rd,{...r,...n})};ci.displayName=Hd;var li="DropdownMenuContent",ui=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oi(li,n),s=se(n),i=c.useRef(!1);return v.jsx(Pd,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,a=>{var u;i.current||(u=o.triggerRef.current)==null||u.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:_(e.onInteractOutside,a=>{const u=a.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,d=u.button===2||l;(!o.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ui.displayName=li;var Bd="DropdownMenuGroup",Wd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(_d,{...o,...r,ref:t})});Wd.displayName=Bd;var Ud="DropdownMenuLabel",di=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Td,{...o,...r,ref:t})});di.displayName=Ud;var Vd="DropdownMenuItem",fi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Ad,{...o,...r,ref:t})});fi.displayName=Vd;var Gd="DropdownMenuCheckboxItem",Kd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Md,{...o,...r,ref:t})});Kd.displayName=Gd;var Yd="DropdownMenuRadioGroup",zd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Od,{...o,...r,ref:t})});zd.displayName=Yd;var Xd="DropdownMenuRadioItem",qd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Id,{...o,...r,ref:t})});qd.displayName=Xd;var Zd="DropdownMenuItemIndicator",Jd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Nd,{...o,...r,ref:t})});Jd.displayName=Zd;var Qd="DropdownMenuSeparator",pi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Dd,{...o,...r,ref:t})});pi.displayName=Qd;var ef="DropdownMenuArrow",tf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(Ld,{...o,...r,ref:t})});tf.displayName=ef;var nf="DropdownMenuSubTrigger",rf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(kd,{...o,...r,ref:t})});rf.displayName=nf;var of="DropdownMenuSubContent",sf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=se(n);return v.jsx(jd,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sf.displayName=of;var qp=si,Zp=ai,Jp=ci,Qp=ui,ev=di,tv=fi,nv=pi,af="Label",vi=c.forwardRef((e,t)=>v.jsx(N.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vi.displayName=af;var rv=vi;function Wn(e,[t,n]){return Math.min(n,Math.max(t,e))}var fn="Popover",[hi]=ie(fn,[De]),St=De(),[cf,Le]=hi(fn),mi=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=St(t),u=c.useRef(null),[l,d]=c.useState(!1),[f,p]=Ce({prop:r,defaultProp:o??!1,onChange:s,caller:fn});return v.jsx(on,{...a,children:v.jsx(cf,{scope:t,contentId:le(),triggerRef:u,open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(m=>!m),[p]),hasCustomAnchor:l,onCustomAnchorAdd:c.useCallback(()=>d(!0),[]),onCustomAnchorRemove:c.useCallback(()=>d(!1),[]),modal:i,children:n})})};mi.displayName=fn;var gi="PopoverAnchor",lf=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Le(gi,n),s=St(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return c.useEffect(()=>(i(),()=>a()),[i,a]),v.jsx(wt,{...s,...r,ref:t})});lf.displayName=gi;var yi="PopoverTrigger",wi=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Le(yi,n),s=St(n),i=G(t,o.triggerRef),a=v.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Ei(o.open),...r,ref:i,onClick:_(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:v.jsx(wt,{asChild:!0,...s,children:a})});wi.displayName=yi;var br="PopoverPortal",[uf,df]=hi(br,{forceMount:void 0}),xi=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Le(br,t);return v.jsx(uf,{scope:t,forceMount:n,children:v.jsx(ne,{present:n||s.open,children:v.jsx(rt,{asChild:!0,container:o,children:r})})})};xi.displayName=br;var Je="PopoverContent",bi=c.forwardRef((e,t)=>{const n=df(Je,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Le(Je,e.__scopePopover);return v.jsx(ne,{present:r||s.open,children:s.modal?v.jsx(pf,{...o,ref:t}):v.jsx(vf,{...o,ref:t})})});bi.displayName=Je;var ff=Me("PopoverContent.RemoveScroll"),pf=c.forwardRef((e,t)=>{const n=Le(Je,e.__scopePopover),r=c.useRef(null),o=G(t,r),s=c.useRef(!1);return c.useEffect(()=>{const i=r.current;if(i)return Zt(i)},[]),v.jsx(gt,{as:ff,allowPinchZoom:!0,children:v.jsx(Ci,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,l=a.button===2||u;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:_(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),vf=c.forwardRef((e,t)=>{const n=Le(Je,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return v.jsx(Ci,{...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 u,l;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Ci=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:d,...f}=e,p=Le(Je,n),m=St(n);return Xt(),v.jsx(mt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:v.jsx(nt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),children:v.jsx(sn,{"data-state":Ei(p.open),role:"dialog",id:p.contentId,...m,...f,ref:t,style:{...f.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)"}})})})}),Si="PopoverClose",hf=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Le(Si,n);return v.jsx(N.button,{type:"button",...r,ref:t,onClick:_(e.onClick,()=>o.onOpenChange(!1))})});hf.displayName=Si;var mf="PopoverArrow",gf=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=St(n);return v.jsx(an,{...o,...r,ref:t})});gf.displayName=mf;function Ei(e){return e?"open":"closed"}var ov=mi,sv=wi,iv=xi,av=bi;function yf(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Cr="ScrollArea",[Ri]=ie(Cr),[wf,fe]=Ri(Cr),Pi=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[a,u]=c.useState(null),[l,d]=c.useState(null),[f,p]=c.useState(null),[m,y]=c.useState(null),[h,w]=c.useState(null),[x,b]=c.useState(0),[C,S]=c.useState(0),[P,T]=c.useState(!1),[E,O]=c.useState(!1),I=G(t,F=>u(F)),k=ht(o);return v.jsx(wf,{scope:n,type:r,dir:k,scrollHideDelay:s,scrollArea:a,viewport:l,onViewportChange:d,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:P,onScrollbarXEnabledChange:T,scrollbarY:h,onScrollbarYChange:w,scrollbarYEnabled:E,onScrollbarYEnabledChange:O,onCornerWidthChange:b,onCornerHeightChange:S,children:v.jsx(N.div,{dir:k,...i,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});Pi.displayName=Cr;var _i="ScrollAreaViewport",Ti=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=fe(_i,n),a=c.useRef(null),u=G(t,a,i.onViewportChange);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),v.jsx(N.div,{"data-radix-scroll-area-viewport":"",...s,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:v.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Ti.displayName=_i;var Ee="ScrollAreaScrollbar",xf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=fe(Ee,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=e.orientation==="horizontal";return c.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?v.jsx(bf,{...r,ref:t,forceMount:n}):o.type==="scroll"?v.jsx(Cf,{...r,ref:t,forceMount:n}):o.type==="auto"?v.jsx(Ai,{...r,ref:t,forceMount:n}):o.type==="always"?v.jsx(Sr,{...r,ref:t,"data-state":"visible"}):null});xf.displayName=Ee;var bf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=fe(Ee,e.__scopeScrollArea),[s,i]=c.useState(!1);return c.useEffect(()=>{const a=o.scrollArea;let u=0;if(a){const l=()=>{window.clearTimeout(u),i(!0)},d=()=>{u=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",l),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),a.removeEventListener("pointerenter",l),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),v.jsx(ne,{present:n||s,children:v.jsx(Ai,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Cf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=fe(Ee,e.__scopeScrollArea),s=e.orientation==="horizontal",i=vn(()=>u("SCROLL_END"),100),[a,u]=yf("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(a==="idle"){const l=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(l)}},[a,o.scrollHideDelay,u]),c.useEffect(()=>{const l=o.viewport,d=s?"scrollLeft":"scrollTop";if(l){let f=l[d];const p=()=>{const m=l[d];f!==m&&(u("SCROLL"),i()),f=m};return l.addEventListener("scroll",p),()=>l.removeEventListener("scroll",p)}},[o.viewport,s,u,i]),v.jsx(ne,{present:n||a!=="hidden",children:v.jsx(Sr,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:_(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:_(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Ai=c.forwardRef((e,t)=>{const n=fe(Ee,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=c.useState(!1),a=e.orientation==="horizontal",u=vn(()=>{if(n.viewport){const l=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?l:d)}},10);return Qe(n.viewport,u),Qe(n.content,u),v.jsx(ne,{present:r||s,children:v.jsx(Sr,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Sr=c.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=fe(Ee,e.__scopeScrollArea),s=c.useRef(null),i=c.useRef(0),[a,u]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Ni(a.viewport,a.content),d={...r,sizes:a,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:p=>s.current=p,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:p=>i.current=p};function f(p,m){return Af(p,i.current,a,m)}return n==="horizontal"?v.jsx(Sf,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollLeft,m=uo(p,a,o.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=f(p,o.dir))}}):n==="vertical"?v.jsx(Ef,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollTop,m=uo(p,a);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=f(p))}}):null}),Sf=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=fe(Ee,e.__scopeScrollArea),[i,a]=c.useState(),u=c.useRef(null),l=G(t,u,s.onScrollbarXChange);return c.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),v.jsx(Oi,{"data-orientation":"horizontal",...o,ref:l,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":pn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),Li(p,f)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Gt(i.paddingLeft),paddingEnd:Gt(i.paddingRight)}})}})}),Ef=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=fe(Ee,e.__scopeScrollArea),[i,a]=c.useState(),u=c.useRef(null),l=G(t,u,s.onScrollbarYChange);return c.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),v.jsx(Oi,{"data-orientation":"vertical",...o,ref:l,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":pn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),Li(p,f)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Gt(i.paddingTop),paddingEnd:Gt(i.paddingBottom)}})}})}),[Rf,Mi]=Ri(Ee),Oi=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:d,onResize:f,...p}=e,m=fe(Ee,n),[y,h]=c.useState(null),w=G(t,I=>h(I)),x=c.useRef(null),b=c.useRef(""),C=m.viewport,S=r.content-r.viewport,P=re(d),T=re(u),E=vn(f,10);function O(I){if(x.current){const k=I.clientX-x.current.left,F=I.clientY-x.current.top;l({x:k,y:F})}}return c.useEffect(()=>{const I=k=>{const F=k.target;(y==null?void 0:y.contains(F))&&P(k,S)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[C,y,S,P]),c.useEffect(T,[r,T]),Qe(y,E),Qe(m.content,E),v.jsx(Rf,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:re(s),onThumbPointerUp:re(i),onThumbPositionChange:T,onThumbPointerDown:re(a),children:v.jsx(N.div,{...p,ref:w,style:{position:"absolute",...p.style},onPointerDown:_(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),x.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),O(I))}),onPointerMove:_(e.onPointerMove,O),onPointerUp:_(e.onPointerUp,I=>{const k=I.target;k.hasPointerCapture(I.pointerId)&&k.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=b.current,m.viewport&&(m.viewport.style.scrollBehavior=""),x.current=null})})})}),Vt="ScrollAreaThumb",Pf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Mi(Vt,e.__scopeScrollArea);return v.jsx(ne,{present:n||o.hasThumb,children:v.jsx(_f,{ref:t,...r})})}),_f=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=fe(Vt,n),i=Mi(Vt,n),{onThumbPositionChange:a}=i,u=G(t,f=>i.onThumbChange(f)),l=c.useRef(void 0),d=vn(()=>{l.current&&(l.current(),l.current=void 0)},100);return c.useEffect(()=>{const f=s.viewport;if(f){const p=()=>{if(d(),!l.current){const m=Mf(f,a);l.current=m,a()}};return a(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[s.viewport,d,a]),v.jsx(N.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:_(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),y=f.clientX-m.left,h=f.clientY-m.top;i.onThumbPointerDown({x:y,y:h})}),onPointerUp:_(e.onPointerUp,i.onThumbPointerUp)})});Pf.displayName=Vt;var Er="ScrollAreaCorner",Ii=c.forwardRef((e,t)=>{const n=fe(Er,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(Tf,{...e,ref:t}):null});Ii.displayName=Er;var Tf=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=fe(Er,n),[s,i]=c.useState(0),[a,u]=c.useState(0),l=!!(s&&a);return Qe(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),u(d)}),Qe(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),i(d)}),l?v.jsx(N.div,{...r,ref:t,style:{width:s,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Gt(e){return e?parseInt(e,10):0}function Ni(e,t){const n=e/t;return isNaN(n)?0:n}function pn(e){const t=Ni(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Af(e,t,n,r="ltr"){const o=pn(n),s=o/2,i=t||s,a=o-i,u=n.scrollbar.paddingStart+i,l=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return Di([u,l],f)(e)}function uo(e,t,n="ltr"){const r=pn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,a=s-r,u=n==="ltr"?[0,i]:[i*-1,0],l=Wn(e,u);return Di([0,i],[0,a])(l)}function Di(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Li(e,t){return e>0&&e<t}var Mf=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&t(),n=s,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function vn(e,t){const n=re(e),r=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),c.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Qe(e,t){const n=re(t);te(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var cv=Pi,lv=Ti,uv=Ii,Of=[" ","Enter","ArrowUp","ArrowDown"],If=[" ","Enter"],Be="Select",[hn,mn,Nf]=qn(Be),[Ve]=ie(Be,[Nf,De]),gn=De(),[Df,ke]=Ve(Be),[Lf,kf]=Ve(Be),jf="SelectProvider";function ki(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:u,dir:l,name:d,autoComplete:f,disabled:p,required:m,form:y,internal_do_not_use_render:h}=e,w=gn(t),[x,b]=c.useState(null),[C,S]=c.useState(null),[P,T]=c.useState(!1),E=ht(l),[O,I]=Ce({prop:r,defaultProp:o??!1,onChange:s,caller:Be}),[k,F]=Ce({prop:i,defaultProp:a,onChange:u,caller:Be}),Y=c.useRef(null),z=x?!!y||!!x.closest("form"):!0,[V,J]=c.useState(new Set),$=le(),X=Array.from(V).map(g=>g.props.value).join(";"),j=c.useCallback(g=>{J(R=>new Set(R).add(g))},[]),M=c.useCallback(g=>{J(R=>{const L=new Set(R);return L.delete(g),L})},[]),q={required:m,trigger:x,onTriggerChange:b,valueNode:C,onValueNodeChange:S,valueNodeHasChildren:P,onValueNodeHasChildrenChange:T,contentId:$,value:k,onValueChange:F,open:O,onOpenChange:I,dir:E,triggerPointerDownPosRef:Y,disabled:p,name:d,autoComplete:f,form:y,nativeOptions:V,nativeSelectKey:X,isFormControl:z};return v.jsx(on,{...w,children:v.jsx(Df,{scope:t,...q,children:v.jsx(hn.Provider,{scope:t,children:v.jsx(Lf,{scope:t,onNativeOptionAdd:j,onNativeOptionRemove:M,children:fp(h)?h(q):n})})})})}ki.displayName=jf;var Ff=e=>{const{__scopeSelect:t,children:n,...r}=e;return v.jsx(ki,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:o})=>v.jsxs(v.Fragment,{children:[n,o?v.jsx(Zi,{__scopeSelect:t}):null]})})};Ff.displayName=Be;var ji="SelectTrigger",$f=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=gn(n),i=ke(ji,n),a=i.disabled||r,u=G(t,i.onTriggerChange),l=mn(n),d=c.useRef("touch"),[f,p,m]=Ji(h=>{const w=l().filter(C=>!C.disabled),x=w.find(C=>C.value===i.value),b=Qi(w,h,x);b!==void 0&&i.onValueChange(b.value)}),y=h=>{a||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return v.jsx(wt,{asChild:!0,...s,children:v.jsx(N.button,{type:"button",role:"combobox","aria-controls":i.open?i.contentId:void 0,"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":Pr(i.value)?"":void 0,...o,ref:u,onClick:_(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&y(h)}),onPointerDown:_(o.onPointerDown,h=>{d.current=h.pointerType;const w=h.target;w.hasPointerCapture(h.pointerId)&&w.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(y(h),h.preventDefault())}),onKeyDown:_(o.onKeyDown,h=>{const w=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(w&&h.key===" ")&&Of.includes(h.key)&&(y(),h.preventDefault())})})})});$f.displayName=ji;var Fi="SelectValue",Hf=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,u=ke(Fi,n),{onValueNodeHasChildrenChange:l}=u,d=s!==void 0,f=G(t,u.onValueNodeChange);te(()=>{l(d)},[l,d]);const p=Pr(u.value);return v.jsx(N.span,{...a,asChild:p?!1:a.asChild,ref:f,style:{pointerEvents:"none"},children:v.jsx(c.Fragment,{children:p?i:s},p?"placeholder":"value")})});Hf.displayName=Fi;var Bf="SelectIcon",Wf=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return v.jsx(N.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Wf.displayName=Bf;var $i="SelectPortal",[Uf,Vf]=Ve($i,{forceMount:void 0}),Gf=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return v.jsx(Uf,{scope:e.__scopeSelect,forceMount:n,children:v.jsx(rt,{asChild:!0,...r})})};Gf.displayName=$i;var Ne="SelectContent",Kf=c.forwardRef((e,t)=>{const n=Vf(Ne,e.__scopeSelect),{forceMount:r=n.forceMount,...o}=e,s=ke(Ne,e.__scopeSelect),[i,a]=c.useState();return te(()=>{a(new DocumentFragment)},[]),v.jsx(ne,{present:r||s.open,children:({present:u})=>u?v.jsx(Wi,{...o,ref:t}):v.jsx(Hi,{...o,fragment:i})})});Kf.displayName=Ne;var Hi=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:o}=e;return o?tt.createPortal(v.jsx(Bi,{scope:n,children:v.jsx(hn.Slot,{scope:n,children:v.jsx("div",{ref:t,children:r})})}),o):null});Hi.displayName="SelectContentFragment";var pe=10,[Bi,je]=Ve(Ne),Yf="SelectContentImpl",zf=Me("SelectContent.RemoveScroll"),Wi=c.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:h,avoidCollisions:w,...x}=e,b=ke(Ne,n),[C,S]=c.useState(null),[P,T]=c.useState(null),E=G(t,A=>S(A)),[O,I]=c.useState(null),[k,F]=c.useState(null),Y=mn(n),[z,V]=c.useState(!1),J=c.useRef(!1);c.useEffect(()=>{if(C)return Zt(C)},[C]),Xt();const $=c.useCallback(A=>{const[K,...U]=Y().map(ee=>ee.ref.current),[Z]=U.slice(-1),Q=document.activeElement;for(const ee of A)if(ee===Q||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===K&&P&&(P.scrollTop=0),ee===Z&&P&&(P.scrollTop=P.scrollHeight),ee==null||ee.focus(),document.activeElement!==Q))return},[Y,P]),X=c.useCallback(()=>$([O,C]),[$,O,C]);c.useEffect(()=>{z&&X()},[z,X]);const{onOpenChange:j,triggerPointerDownPosRef:M}=b;c.useEffect(()=>{if(C){let A={x:0,y:0};const K=Z=>{var Q,ee;A={x:Math.abs(Math.round(Z.pageX)-(((Q=M.current)==null?void 0:Q.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((ee=M.current)==null?void 0:ee.y)??0))}},U=Z=>{A.x<=10&&A.y<=10?Z.preventDefault():Z.composedPath().includes(C)||j(!1),document.removeEventListener("pointermove",K),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",U,{capture:!0})}}},[C,j,M]),c.useEffect(()=>{const A=()=>j(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[j]);const[q,g]=Ji(A=>{const K=Y().filter(Q=>!Q.disabled),U=K.find(Q=>Q.ref.current===document.activeElement),Z=Qi(K,A,U);Z&&setTimeout(()=>Z.ref.current.focus())}),R=c.useCallback((A,K,U)=>{const Z=!J.current&&!U;(b.value!==void 0&&b.value===K||Z)&&(I(A),Z&&(J.current=!0))},[b.value]),L=c.useCallback(()=>C==null?void 0:C.focus(),[C]),D=c.useCallback((A,K,U)=>{const Z=!J.current&&!U;(b.value!==void 0&&b.value===K||Z)&&F(A)},[b.value]),W=r==="popper"?Un:Ui,B=W===Un?{side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:h,avoidCollisions:w}:{};return v.jsx(Bi,{scope:n,content:C,viewport:P,onViewportChange:T,itemRefCallback:R,selectedItem:O,onItemLeave:L,itemTextRefCallback:D,focusSelectedItem:X,selectedItemText:k,position:r,isPositioned:z,searchRef:q,children:v.jsx(gt,{as:zf,allowPinchZoom:!0,children:v.jsx(mt,{asChild:!0,trapped:b.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:_(o,A=>{var K;(K=b.trigger)==null||K.focus({preventScroll:!0}),A.preventDefault()}),children:v.jsx(nt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:v.jsx(W,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:A=>A.preventDefault(),...x,...B,onPlaced:()=>V(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:_(x.onKeyDown,A=>{const K=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!K&&A.key.length===1&&g(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let Z=Y().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(A.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const Q=A.target,ee=Z.indexOf(Q);Z=Z.slice(ee+1)}setTimeout(()=>$(Z)),A.preventDefault()}})})})})})})});Wi.displayName=Yf;var Xf="SelectItemAlignedPosition",Ui=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ke(Ne,n),i=je(Ne,n),[a,u]=c.useState(null),[l,d]=c.useState(null),f=G(t,E=>d(E)),p=mn(n),m=c.useRef(!1),y=c.useRef(!0),{viewport:h,selectedItem:w,selectedItemText:x,focusSelectedItem:b}=i,C=c.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&h&&w&&x){const E=s.trigger.getBoundingClientRect(),O=l.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),k=x.getBoundingClientRect();if(s.dir!=="rtl"){const Q=k.left-O.left,ee=I.left-Q,ge=E.left-ee,ae=E.width+ge,Ge=Math.max(ae,O.width),it=window.innerWidth-pe,at=Wn(ee,[pe,Math.max(pe,it-Ge)]);a.style.minWidth=ae+"px",a.style.left=at+"px"}else{const Q=O.right-k.right,ee=window.innerWidth-I.right-Q,ge=window.innerWidth-E.right-ee,ae=E.width+ge,Ge=Math.max(ae,O.width),it=window.innerWidth-pe,at=Wn(ee,[pe,Math.max(pe,it-Ge)]);a.style.minWidth=ae+"px",a.style.right=at+"px"}const F=p(),Y=window.innerHeight-pe*2,z=h.scrollHeight,V=window.getComputedStyle(l),J=parseInt(V.borderTopWidth,10),$=parseInt(V.paddingTop,10),X=parseInt(V.borderBottomWidth,10),j=parseInt(V.paddingBottom,10),M=J+$+z+j+X,q=Math.min(w.offsetHeight*5,M),g=window.getComputedStyle(h),R=parseInt(g.paddingTop,10),L=parseInt(g.paddingBottom,10),D=E.top+E.height/2-pe,W=Y-D,B=w.offsetHeight/2,A=w.offsetTop+B,K=J+$+A,U=M-K;if(K<=D){const Q=F.length>0&&w===F[F.length-1].ref.current;a.style.bottom="0px";const ee=l.clientHeight-h.offsetTop-h.offsetHeight,ge=Math.max(W,B+(Q?L:0)+ee+X),ae=K+ge;a.style.height=ae+"px"}else{const Q=F.length>0&&w===F[0].ref.current;a.style.top="0px";const ge=Math.max(D,J+h.offsetTop+(Q?R:0)+B)+U;a.style.height=ge+"px",h.scrollTop=K-D+h.offsetTop}a.style.margin=`${pe}px 0`,a.style.minHeight=q+"px",a.style.maxHeight=Y+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,a,l,h,w,x,s.dir,r]);te(()=>C(),[C]);const[S,P]=c.useState();te(()=>{l&&P(window.getComputedStyle(l).zIndex)},[l]);const T=c.useCallback(E=>{E&&y.current===!0&&(C(),b==null||b(),y.current=!1)},[C,b]);return v.jsx(Zf,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:v.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:v.jsx(N.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ui.displayName=Xf;var qf="SelectPopperPosition",Un=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=pe,...s}=e,i=gn(n);return v.jsx(sn,{...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)"}})});Un.displayName=qf;var[Zf,Rr]=Ve(Ne,{}),Vn="SelectViewport",Jf=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=je(Vn,n),i=Rr(Vn,n),a=G(t,s.onViewportChange),u=c.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),v.jsx(hn.Slot,{scope:n,children:v.jsx(N.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:_(o.onScroll,l=>{const d=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&f){const m=Math.abs(u.current-d.scrollTop);if(m>0){const y=window.innerHeight-pe*2,h=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),x=Math.max(h,w);if(x<y){const b=x+m,C=Math.min(y,b),S=b-C;f.style.height=C+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});Jf.displayName=Vn;var Vi="SelectGroup",[Qf,ep]=Ve(Vi),tp=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=le();return v.jsx(Qf,{scope:n,id:o,children:v.jsx(N.div,{role:"group","aria-labelledby":o,...r,ref:t})})});tp.displayName=Vi;var Gi="SelectLabel",np=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ep(Gi,n);return v.jsx(N.div,{id:o.id,...r,ref:t})});np.displayName=Gi;var Kt="SelectItem",[rp,Ki]=Ve(Kt),op=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=ke(Kt,n),u=je(Kt,n),l=a.value===r,[d,f]=c.useState(s??""),[p,m]=c.useState(!1),y=G(t,b=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,b,r,o)}),h=le(),w=c.useRef("touch"),x=()=>{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 v.jsx(rp,{scope:n,value:r,disabled:o,textId:h,isSelected:l,onItemTextChange:c.useCallback(b=>{f(C=>C||((b==null?void 0:b.textContent)??"").trim())},[]),children:v.jsx(hn.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:v.jsx(N.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":l&&p,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:_(i.onFocus,()=>m(!0)),onBlur:_(i.onBlur,()=>m(!1)),onClick:_(i.onClick,()=>{w.current!=="mouse"&&x()}),onPointerUp:_(i.onPointerUp,()=>{w.current==="mouse"&&x()}),onPointerDown:_(i.onPointerDown,b=>{w.current=b.pointerType}),onPointerMove:_(i.onPointerMove,b=>{var C;w.current=b.pointerType,o?(C=u.onItemLeave)==null||C.call(u):w.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(i.onPointerLeave,b=>{var C;b.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:_(i.onKeyDown,b=>{var S;((S=u.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(If.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});op.displayName=Kt;var ut="SelectItemText",sp=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=ke(ut,n),a=je(ut,n),u=Ki(ut,n),l=kf(ut,n),[d,f]=c.useState(null),p=G(t,x=>f(x),u.onItemTextChange,x=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,x,u.value,u.disabled)}),m=d==null?void 0:d.textContent,y=c.useMemo(()=>v.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:w}=l;return te(()=>(h(y),()=>w(y)),[h,w,y]),v.jsxs(v.Fragment,{children:[v.jsx(N.span,{id:u.textId,...s,ref:p}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?tt.createPortal(s.children,i.valueNode):null]})});sp.displayName=ut;var Yi="SelectItemIndicator",ip=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ki(Yi,n).isSelected?v.jsx(N.span,{"aria-hidden":!0,...r,ref:t}):null});ip.displayName=Yi;var Gn="SelectScrollUpButton",ap=c.forwardRef((e,t)=>{const n=je(Gn,e.__scopeSelect),r=Rr(Gn,e.__scopeSelect),[o,s]=c.useState(!1),i=G(t,r.onScrollButtonChange);return te(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollTop>0;s(l)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?v.jsx(zi,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});ap.displayName=Gn;var Kn="SelectScrollDownButton",cp=c.forwardRef((e,t)=>{const n=je(Kn,e.__scopeSelect),r=Rr(Kn,e.__scopeSelect),[o,s]=c.useState(!1),i=G(t,r.onScrollButtonChange);return te(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<l;s(d)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?v.jsx(zi,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});cp.displayName=Kn;var zi=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=je("SelectScrollButton",n),i=c.useRef(null),a=mn(n),u=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),te(()=>{var d;const l=a().find(f=>f.ref.current===document.activeElement);(d=l==null?void 0:l.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),v.jsx(N.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:_(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:_(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:_(o.onPointerLeave,()=>{u()})})}),lp="SelectSeparator",up=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(N.div,{"aria-hidden":!0,...r,ref:t})});up.displayName=lp;var Xi="SelectArrow",dp=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=gn(n);return je(Xi,n).position==="popper"?v.jsx(an,{...o,...r,ref:t}):null});dp.displayName=Xi;var qi="SelectBubbleInput",Zi=c.forwardRef(({__scopeSelect:e,...t},n)=>{const r=ke(qi,e),{value:o,onValueChange:s,required:i,disabled:a,name:u,autoComplete:l,form:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=c.useRef(null),y=G(n,m),h=o??"",w=es(h);return c.useEffect(()=>{const x=m.current;if(!x)return;const b=window.HTMLSelectElement.prototype,S=Object.getOwnPropertyDescriptor(b,"value").set;if(w!==h&&S){const P=new Event("change",{bubbles:!0});S.call(x,h),x.dispatchEvent(P)}},[w,h]),v.jsxs(N.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:u,autoComplete:l,disabled:a,form:d,onChange:x=>s(x.target.value),...t,style:{...go,...t.style},ref:y,defaultValue:h,children:[Pr(o)?v.jsx("option",{value:""}):null,Array.from(f)]},p)});Zi.displayName=qi;function fp(e){return typeof e=="function"}function Pr(e){return e===""||e===void 0}function Ji(e){const t=re(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(i=>{const a=n.current+i;t(a),(function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(a)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Qi(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=pp(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const u=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function pp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vp="Separator",fo="horizontal",hp=["horizontal","vertical"],ea=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=fo,...o}=e,s=mp(r)?r:fo,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return v.jsx(N.div,{"data-orientation":s,...a,...o,ref:t})});ea.displayName=vp;function mp(e){return hp.includes(e)}var dv=ea,yn="Tabs",[gp]=ie(yn,[cn]),ta=cn(),[yp,_r]=gp(yn),na=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:u="automatic",...l}=e,d=ht(a),[f,p]=Ce({prop:r,onChange:o,defaultProp:s??"",caller:yn});return v.jsx(yp,{scope:n,baseId:le(),value:f,onValueChange:p,orientation:i,dir:d,activationMode:u,children:v.jsx(N.div,{dir:d,"data-orientation":i,...l,ref:t})})});na.displayName=yn;var ra="TabsList",oa=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=_r(ra,n),i=ta(n);return v.jsx(Ns,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:v.jsx(N.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});oa.displayName=ra;var sa="TabsTrigger",ia=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=_r(sa,n),a=ta(n),u=ca(i.baseId,r),l=la(i.baseId,r),d=r===i.value;return v.jsx(Ds,{asChild:!0,...a,focusable:!o,active:d,children:v.jsx(N.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":l,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...s,ref:t,onMouseDown:_(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:_(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:_(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(r)})})})});ia.displayName=sa;var aa="TabsContent",wp=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=_r(aa,n),u=ca(a.baseId,r),l=la(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),v.jsx(ne,{present:o||d,children:({present:p})=>v.jsx(N.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:l,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&s})})});wp.displayName=aa;function ca(e,t){return`${e}-trigger-${t}`}function la(e,t){return`${e}-content-${t}`}var fv=na,pv=oa,vv=ia,[wn]=ie("Tooltip",[De]),xn=De(),ua="TooltipProvider",xp=700,Yn="tooltip.open",[bp,Tr]=wn(ua),da=e=>{const{__scopeTooltip:t,delayDuration:n=xp,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),v.jsx(bp,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{r<=0||(window.clearTimeout(u.current),i.current=!1)},[r]),onClose:c.useCallback(()=>{r<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};da.displayName=ua;var vt="Tooltip",[Cp,Et]=wn(vt),fa=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,u=Tr(vt,e.__scopeTooltip),l=xn(t),[d,f]=c.useState(null),p=le(),m=c.useRef(0),y=i??u.disableHoverableContent,h=a??u.delayDuration,w=c.useRef(!1),[x,b]=Ce({prop:r,defaultProp:o??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(Yn))):u.onClose(),s==null||s(E)},caller:vt}),C=c.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),S=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w.current=!1,b(!0)},[b]),P=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),T=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,b(!0),m.current=0},h)},[h,b]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),v.jsx(on,{...l,children:v.jsx(Cp,{scope:t,contentId:p,open:x,stateAttribute:C,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?T():S()},[u.isOpenDelayedRef,T,S]),onTriggerLeave:c.useCallback(()=>{y?P():(window.clearTimeout(m.current),m.current=0)},[P,y]),onOpen:S,onClose:P,disableHoverableContent:y,children:n})})};fa.displayName=vt;var zn="TooltipTrigger",pa=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Et(zn,n),s=Tr(zn,n),i=xn(n),a=c.useRef(null),u=G(t,a,o.onTriggerChange),l=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>l.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),v.jsx(wt,{asChild:!0,...i,children:v.jsx(N.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:_(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:_(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:_(e.onBlur,o.onClose),onClick:_(e.onClick,o.onClose)})})});pa.displayName=zn;var Ar="TooltipPortal",[Sp,Ep]=wn(Ar,{forceMount:void 0}),va=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Et(Ar,t);return v.jsx(Sp,{scope:t,forceMount:n,children:v.jsx(ne,{present:n||s.open,children:v.jsx(rt,{asChild:!0,container:o,children:r})})})};va.displayName=Ar;var et="TooltipContent",ha=c.forwardRef((e,t)=>{const n=Ep(et,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Et(et,e.__scopeTooltip);return v.jsx(ne,{present:r||i.open,children:i.disableHoverableContent?v.jsx(ma,{side:o,...s,ref:t}):v.jsx(Rp,{side:o,...s,ref:t})})}),Rp=c.forwardRef((e,t)=>{const n=Et(et,e.__scopeTooltip),r=Tr(et,e.__scopeTooltip),o=c.useRef(null),s=G(t,o),[i,a]=c.useState(null),{trigger:u,onClose:l}=n,d=o.current,{onPointerInTransitChange:f}=r,p=c.useCallback(()=>{a(null),f(!1)},[f]),m=c.useCallback((y,h)=>{const w=y.currentTarget,x={x:y.clientX,y:y.clientY},b=Ap(x,w.getBoundingClientRect()),C=Mp(x,b),S=Op(h.getBoundingClientRect()),P=Np([...C,...S]);a(P),f(!0)},[f]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(u&&d){const y=w=>m(w,d),h=w=>m(w,u);return u.addEventListener("pointerleave",y),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",h)}}},[u,d,m,p]),c.useEffect(()=>{if(i){const y=h=>{const w=h.target,x={x:h.clientX,y:h.clientY},b=(u==null?void 0:u.contains(w))||(d==null?void 0:d.contains(w)),C=!Ip(x,i);b?p():C&&(p(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,d,i,l,p]),v.jsx(ma,{...e,ref:s})}),[Pp,_p]=wn(vt,{isInside:!1}),Tp=Ta("TooltipContent"),ma=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,u=Et(et,n),l=xn(n),{onClose:d}=u;return c.useEffect(()=>(document.addEventListener(Yn,d),()=>document.removeEventListener(Yn,d)),[d]),c.useEffect(()=>{if(u.trigger){const f=p=>{p.target instanceof Node&&p.target.contains(u.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,d]),v.jsx(nt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:v.jsxs(sn,{"data-state":u.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(Tp,{children:r}),v.jsx(Pp,{scope:n,isInside:!0,children:v.jsx($a,{id:u.contentId,role:"tooltip",children:o||r})})]})})});ha.displayName=et;var ga="TooltipArrow",ya=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xn(n);return _p(ga,n).isInside?null:v.jsx(an,{...o,...r,ref:t})});ya.displayName=ga;function Ap(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Mp(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Op(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Ip(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],u=t[i],l=a.x,d=a.y,f=u.x,p=u.y;d>r!=p>r&&n<(f-l)*(r-d)/(p-d)+l&&(o=!o)}return o}function Np(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Dp(t)}function Dp(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var hv=da,mv=fa,gv=pa,yv=va,wv=ha,xv=ya;export{El as $,xv as A,Xn as B,wv as C,Vp as D,fv as E,zp as F,pv as G,vv as H,tv as I,Ff as J,$f as K,ev as L,Wf as M,Hf as N,Bp as O,hv as P,Gf as Q,Ra as R,kp as S,gv as T,Kf as U,Jf as V,op as W,ip as X,sp as Y,ap as Z,cp as _,vo as a,Rl as a0,cv as a1,lv as a2,uv as a3,xf as a4,Pf as a5,ov as a6,sv as a7,iv as a8,av as a9,Lp as aa,tt as b,_a as c,rv as d,dv as e,mv as f,yv as g,$p as h,Wp as i,v as j,Gp as k,Up as l,Hp as m,qp as n,Zp as o,Jp as p,Qp as q,c as r,nv as s,jp as t,Qa as u,ec as v,Kp as w,Yp as x,le as y,N as z};
|