-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6161.2996e0b8.iframe.bundle.js
1 lines (1 loc) · 27.9 KB
/
6161.2996e0b8.iframe.bundle.js
1
"use strict";(self.webpackChunk_leather_io_ui=self.webpackChunk_leather_io_ui||[]).push([[6161],{"../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_react-dom@1_ppiori5i6dmsrwqyclhkqz64ri/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{UC:()=>$d08ef79370b62062$export$7c6e2c02157bb7d2,q7:()=>$d08ef79370b62062$export$6d08773d2e66f8f2,JU:()=>$d08ef79370b62062$export$b04be29aa201d4f5,ZL:()=>$d08ef79370b62062$export$602eac185826482c,bL:()=>$d08ef79370b62062$export$be92b6f5f03c0fe9,wv:()=>$d08ef79370b62062$export$1ff3c3f08ae963c0,l9:()=>$d08ef79370b62062$export$41fb9f06171c75f4});var esm_extends=__webpack_require__("../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/extends.js"),react=__webpack_require__("../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]/node_modules/@radix-ui/primitive/dist/index.mjs"),react_compose_refs_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs"),react_context_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-context/dist/index.mjs"),react_use_controllable_state_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"),react_primitive_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]._q2hdzynczbqlprxkwgklkdriia/node_modules/@radix-ui/react-primitive/dist/index.mjs"),react_collection_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_s5ea4qejjnve37kxbr3xbca2xy/node_modules/@radix-ui/react-collection/dist/index.mjs"),react_direction_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-direction/dist/index.mjs"),react_dismissable_layer_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_react-d_j6oxuu3amfkyaikjq4hrxc5pfy/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"),react_focus_guards_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-focus-guards/dist/index.mjs"),react_focus_scope_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_react-dom@18._cqygtgnjeliwwmg6cnyey55ifu/node_modules/@radix-ui/react-focus-scope/dist/index.mjs"),react_id_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-id/dist/index.mjs"),react_popper_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@radix-ui/react-popper/dist/index.mjs"),react_portal_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@radix-ui/react-portal/dist/index.mjs"),react_presence_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@radix-ui/react-presence/dist/index.mjs"),react_roving_focus_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_react-dom@18_gwziov6bewyhzrap5bbufmv4f4/node_modules/@radix-ui/react-roving-focus/dist/index.mjs"),react_slot_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-slot/dist/index.mjs"),react_use_callback_ref_dist=__webpack_require__("../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"),es2015=__webpack_require__("../../node_modules/.pnpm/[email protected]/node_modules/aria-hidden/dist/es2015/index.js"),Combination=__webpack_require__("../../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/react-remove-scroll/dist/es2015/Combination.js");const $6cc32821e9371a1c$var$SELECTION_KEYS=["Enter"," "],$6cc32821e9371a1c$var$LAST_KEYS=["ArrowUp","PageDown","End"],$6cc32821e9371a1c$var$FIRST_LAST_KEYS=["ArrowDown","PageUp","Home",...$6cc32821e9371a1c$var$LAST_KEYS],[$6cc32821e9371a1c$var$Collection,$6cc32821e9371a1c$var$useCollection,$6cc32821e9371a1c$var$createCollectionScope]=(0,react_collection_dist.N)("Menu"),[$6cc32821e9371a1c$var$createMenuContext,$6cc32821e9371a1c$export$4027731b685e72eb]=(0,react_context_dist.A)("Menu",[$6cc32821e9371a1c$var$createCollectionScope,react_popper_dist.Bk,react_roving_focus_dist.RG]),$6cc32821e9371a1c$var$usePopperScope=(0,react_popper_dist.Bk)(),$6cc32821e9371a1c$var$useRovingFocusGroupScope=(0,react_roving_focus_dist.RG)(),[$6cc32821e9371a1c$var$MenuProvider,$6cc32821e9371a1c$var$useMenuContext]=$6cc32821e9371a1c$var$createMenuContext("Menu"),[$6cc32821e9371a1c$var$MenuRootProvider,$6cc32821e9371a1c$var$useMenuRootContext]=$6cc32821e9371a1c$var$createMenuContext("Menu"),$6cc32821e9371a1c$export$d9b273488cd8ce6f=props=>{const{__scopeMenu,open=!1,children,dir,onOpenChange,modal=!0}=props,popperScope=$6cc32821e9371a1c$var$usePopperScope(__scopeMenu),[content,setContent]=(0,react.useState)(null),isUsingKeyboardRef=(0,react.useRef)(!1),handleOpenChange=(0,react_use_callback_ref_dist.c)(onOpenChange),direction=(0,react_direction_dist.jH)(dir);return(0,react.useEffect)((()=>{const handleKeyDown=()=>{isUsingKeyboardRef.current=!0,document.addEventListener("pointerdown",handlePointer,{capture:!0,once:!0}),document.addEventListener("pointermove",handlePointer,{capture:!0,once:!0})},handlePointer=()=>isUsingKeyboardRef.current=!1;return document.addEventListener("keydown",handleKeyDown,{capture:!0}),()=>{document.removeEventListener("keydown",handleKeyDown,{capture:!0}),document.removeEventListener("pointerdown",handlePointer,{capture:!0}),document.removeEventListener("pointermove",handlePointer,{capture:!0})}}),[]),(0,react.createElement)(react_popper_dist.bL,popperScope,(0,react.createElement)($6cc32821e9371a1c$var$MenuProvider,{scope:__scopeMenu,open,onOpenChange:handleOpenChange,content,onContentChange:setContent},(0,react.createElement)($6cc32821e9371a1c$var$MenuRootProvider,{scope:__scopeMenu,onClose:(0,react.useCallback)((()=>handleOpenChange(!1)),[handleOpenChange]),isUsingKeyboardRef,dir:direction,modal},children)))},$6cc32821e9371a1c$export$9fa5ebd18bee4d43=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeMenu,...anchorProps}=props,popperScope=$6cc32821e9371a1c$var$usePopperScope(__scopeMenu);return(0,react.createElement)(react_popper_dist.Mz,(0,esm_extends.A)({},popperScope,anchorProps,{ref:forwardedRef}))})),[$6cc32821e9371a1c$var$PortalProvider,$6cc32821e9371a1c$var$usePortalContext]=$6cc32821e9371a1c$var$createMenuContext("MenuPortal",{forceMount:void 0}),$6cc32821e9371a1c$export$793392f970497feb=props=>{const{__scopeMenu,forceMount,children,container}=props,context=$6cc32821e9371a1c$var$useMenuContext("MenuPortal",__scopeMenu);return(0,react.createElement)($6cc32821e9371a1c$var$PortalProvider,{scope:__scopeMenu,forceMount},(0,react.createElement)(react_presence_dist.C,{present:forceMount||context.open},(0,react.createElement)(react_portal_dist.Z,{asChild:!0,container},children)))},[$6cc32821e9371a1c$var$MenuContentProvider,$6cc32821e9371a1c$var$useMenuContentContext]=$6cc32821e9371a1c$var$createMenuContext("MenuContent"),$6cc32821e9371a1c$export$479f0f2f71193efe=(0,react.forwardRef)(((props,forwardedRef)=>{const portalContext=$6cc32821e9371a1c$var$usePortalContext("MenuContent",props.__scopeMenu),{forceMount=portalContext.forceMount,...contentProps}=props,context=$6cc32821e9371a1c$var$useMenuContext("MenuContent",props.__scopeMenu),rootContext=$6cc32821e9371a1c$var$useMenuRootContext("MenuContent",props.__scopeMenu);return(0,react.createElement)($6cc32821e9371a1c$var$Collection.Provider,{scope:props.__scopeMenu},(0,react.createElement)(react_presence_dist.C,{present:forceMount||context.open},(0,react.createElement)($6cc32821e9371a1c$var$Collection.Slot,{scope:props.__scopeMenu},rootContext.modal?(0,react.createElement)($6cc32821e9371a1c$var$MenuRootContentModal,(0,esm_extends.A)({},contentProps,{ref:forwardedRef})):(0,react.createElement)($6cc32821e9371a1c$var$MenuRootContentNonModal,(0,esm_extends.A)({},contentProps,{ref:forwardedRef})))))})),$6cc32821e9371a1c$var$MenuRootContentModal=(0,react.forwardRef)(((props,forwardedRef)=>{const context=$6cc32821e9371a1c$var$useMenuContext("MenuContent",props.__scopeMenu),ref=(0,react.useRef)(null),composedRefs=(0,react_compose_refs_dist.s)(forwardedRef,ref);return(0,react.useEffect)((()=>{const content=ref.current;if(content)return(0,es2015.Eq)(content)}),[]),(0,react.createElement)($6cc32821e9371a1c$var$MenuContentImpl,(0,esm_extends.A)({},props,{ref:composedRefs,trapFocus:context.open,disableOutsidePointerEvents:context.open,disableOutsideScroll:!0,onFocusOutside:(0,dist.m)(props.onFocusOutside,(event=>event.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>context.onOpenChange(!1)}))})),$6cc32821e9371a1c$var$MenuRootContentNonModal=(0,react.forwardRef)(((props,forwardedRef)=>{const context=$6cc32821e9371a1c$var$useMenuContext("MenuContent",props.__scopeMenu);return(0,react.createElement)($6cc32821e9371a1c$var$MenuContentImpl,(0,esm_extends.A)({},props,{ref:forwardedRef,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>context.onOpenChange(!1)}))})),$6cc32821e9371a1c$var$MenuContentImpl=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeMenu,loop=!1,trapFocus,onOpenAutoFocus,onCloseAutoFocus,disableOutsidePointerEvents,onEntryFocus,onEscapeKeyDown,onPointerDownOutside,onFocusOutside,onInteractOutside,onDismiss,disableOutsideScroll,...contentProps}=props,context=$6cc32821e9371a1c$var$useMenuContext("MenuContent",__scopeMenu),rootContext=$6cc32821e9371a1c$var$useMenuRootContext("MenuContent",__scopeMenu),popperScope=$6cc32821e9371a1c$var$usePopperScope(__scopeMenu),rovingFocusGroupScope=$6cc32821e9371a1c$var$useRovingFocusGroupScope(__scopeMenu),getItems=$6cc32821e9371a1c$var$useCollection(__scopeMenu),[currentItemId,setCurrentItemId]=(0,react.useState)(null),contentRef=(0,react.useRef)(null),composedRefs=(0,react_compose_refs_dist.s)(forwardedRef,contentRef,context.onContentChange),timerRef=(0,react.useRef)(0),searchRef=(0,react.useRef)(""),pointerGraceTimerRef=(0,react.useRef)(0),pointerGraceIntentRef=(0,react.useRef)(null),pointerDirRef=(0,react.useRef)("right"),lastPointerXRef=(0,react.useRef)(0),ScrollLockWrapper=disableOutsideScroll?Combination.A:react.Fragment,scrollLockWrapperProps=disableOutsideScroll?{as:react_slot_dist.DX,allowPinchZoom:!0}:void 0,handleTypeaheadSearch=key=>{var _items$find,_items$find2;const search=searchRef.current+key,items=getItems().filter((item=>!item.disabled)),currentItem=document.activeElement,currentMatch=null===(_items$find=items.find((item=>item.ref.current===currentItem)))||void 0===_items$find?void 0:_items$find.textValue,nextMatch=function $6cc32821e9371a1c$var$getNextMatch(values,search,currentMatch){const isRepeated=search.length>1&&Array.from(search).every((char=>char===search[0])),normalizedSearch=isRepeated?search[0]:search,currentMatchIndex=currentMatch?values.indexOf(currentMatch):-1;let wrappedValues=function $6cc32821e9371a1c$var$wrapArray(array,startIndex){return array.map(((_,index)=>array[(startIndex+index)%array.length]))}(values,Math.max(currentMatchIndex,0));1===normalizedSearch.length&&(wrappedValues=wrappedValues.filter((v=>v!==currentMatch)));const nextMatch=wrappedValues.find((value=>value.toLowerCase().startsWith(normalizedSearch.toLowerCase())));return nextMatch!==currentMatch?nextMatch:void 0}(items.map((item=>item.textValue)),search,currentMatch),newItem=null===(_items$find2=items.find((item=>item.textValue===nextMatch)))||void 0===_items$find2?void 0:_items$find2.ref.current;!function updateSearch(value){searchRef.current=value,window.clearTimeout(timerRef.current),""!==value&&(timerRef.current=window.setTimeout((()=>updateSearch("")),1e3))}(search),newItem&&setTimeout((()=>newItem.focus()))};(0,react.useEffect)((()=>()=>window.clearTimeout(timerRef.current)),[]),(0,react_focus_guards_dist.Oh)();const isPointerMovingToSubmenu=(0,react.useCallback)((event=>{var _pointerGraceIntentRe,_pointerGraceIntentRe2;return pointerDirRef.current===(null===(_pointerGraceIntentRe=pointerGraceIntentRef.current)||void 0===_pointerGraceIntentRe?void 0:_pointerGraceIntentRe.side)&&function $6cc32821e9371a1c$var$isPointerInGraceArea(event,area){if(!area)return!1;const cursorPos={x:event.clientX,y:event.clientY};return function $6cc32821e9371a1c$var$isPointInPolygon(point,polygon){const{x,y}=point;let inside=!1;for(let i=0,j=polygon.length-1;i<polygon.length;j=i++){const xi=polygon[i].x,yi=polygon[i].y,xj=polygon[j].x,yj=polygon[j].y;yi>y!=yj>y&&x<(xj-xi)*(y-yi)/(yj-yi)+xi&&(inside=!inside)}return inside}(cursorPos,area)}(event,null===(_pointerGraceIntentRe2=pointerGraceIntentRef.current)||void 0===_pointerGraceIntentRe2?void 0:_pointerGraceIntentRe2.area)}),[]);return(0,react.createElement)($6cc32821e9371a1c$var$MenuContentProvider,{scope:__scopeMenu,searchRef,onItemEnter:(0,react.useCallback)((event=>{isPointerMovingToSubmenu(event)&&event.preventDefault()}),[isPointerMovingToSubmenu]),onItemLeave:(0,react.useCallback)((event=>{var _contentRef$current;isPointerMovingToSubmenu(event)||(null===(_contentRef$current=contentRef.current)||void 0===_contentRef$current||_contentRef$current.focus(),setCurrentItemId(null))}),[isPointerMovingToSubmenu]),onTriggerLeave:(0,react.useCallback)((event=>{isPointerMovingToSubmenu(event)&&event.preventDefault()}),[isPointerMovingToSubmenu]),pointerGraceTimerRef,onPointerGraceIntentChange:(0,react.useCallback)((intent=>{pointerGraceIntentRef.current=intent}),[])},(0,react.createElement)(ScrollLockWrapper,scrollLockWrapperProps,(0,react.createElement)(react_focus_scope_dist.n,{asChild:!0,trapped:trapFocus,onMountAutoFocus:(0,dist.m)(onOpenAutoFocus,(event=>{var _contentRef$current2;event.preventDefault(),null===(_contentRef$current2=contentRef.current)||void 0===_contentRef$current2||_contentRef$current2.focus()})),onUnmountAutoFocus:onCloseAutoFocus},(0,react.createElement)(react_dismissable_layer_dist.qW,{asChild:!0,disableOutsidePointerEvents,onEscapeKeyDown,onPointerDownOutside,onFocusOutside,onInteractOutside,onDismiss},(0,react.createElement)(react_roving_focus_dist.bL,(0,esm_extends.A)({asChild:!0},rovingFocusGroupScope,{dir:rootContext.dir,orientation:"vertical",loop,currentTabStopId:currentItemId,onCurrentTabStopIdChange:setCurrentItemId,onEntryFocus:(0,dist.m)(onEntryFocus,(event=>{rootContext.isUsingKeyboardRef.current||event.preventDefault()}))}),(0,react.createElement)(react_popper_dist.UC,(0,esm_extends.A)({role:"menu","aria-orientation":"vertical","data-state":$6cc32821e9371a1c$var$getOpenState(context.open),"data-radix-menu-content":"",dir:rootContext.dir},popperScope,contentProps,{ref:composedRefs,style:{outline:"none",...contentProps.style},onKeyDown:(0,dist.m)(contentProps.onKeyDown,(event=>{const isKeyDownInside=event.target.closest("[data-radix-menu-content]")===event.currentTarget,isModifierKey=event.ctrlKey||event.altKey||event.metaKey,isCharacterKey=1===event.key.length;isKeyDownInside&&("Tab"===event.key&&event.preventDefault(),!isModifierKey&&isCharacterKey&&handleTypeaheadSearch(event.key));const content=contentRef.current;if(event.target!==content)return;if(!$6cc32821e9371a1c$var$FIRST_LAST_KEYS.includes(event.key))return;event.preventDefault();const candidateNodes=getItems().filter((item=>!item.disabled)).map((item=>item.ref.current));$6cc32821e9371a1c$var$LAST_KEYS.includes(event.key)&&candidateNodes.reverse(),function $6cc32821e9371a1c$var$focusFirst(candidates){const PREVIOUSLY_FOCUSED_ELEMENT=document.activeElement;for(const candidate of candidates){if(candidate===PREVIOUSLY_FOCUSED_ELEMENT)return;if(candidate.focus(),document.activeElement!==PREVIOUSLY_FOCUSED_ELEMENT)return}}(candidateNodes)})),onBlur:(0,dist.m)(props.onBlur,(event=>{event.currentTarget.contains(event.target)||(window.clearTimeout(timerRef.current),searchRef.current="")})),onPointerMove:(0,dist.m)(props.onPointerMove,$6cc32821e9371a1c$var$whenMouse((event=>{const target=event.target,pointerXHasChanged=lastPointerXRef.current!==event.clientX;if(event.currentTarget.contains(target)&&pointerXHasChanged){const newDir=event.clientX>lastPointerXRef.current?"right":"left";pointerDirRef.current=newDir,lastPointerXRef.current=event.clientX}})))})))))))})),$6cc32821e9371a1c$export$dd37bec0e8a99143=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeMenu,...labelProps}=props;return(0,react.createElement)(react_primitive_dist.sG.div,(0,esm_extends.A)({},labelProps,{ref:forwardedRef}))})),$6cc32821e9371a1c$export$2ce376c2cc3355c8=(0,react.forwardRef)(((props,forwardedRef)=>{const{disabled=!1,onSelect,...itemProps}=props,ref=(0,react.useRef)(null),rootContext=$6cc32821e9371a1c$var$useMenuRootContext("MenuItem",props.__scopeMenu),contentContext=$6cc32821e9371a1c$var$useMenuContentContext("MenuItem",props.__scopeMenu),composedRefs=(0,react_compose_refs_dist.s)(forwardedRef,ref),isPointerDownRef=(0,react.useRef)(!1);return(0,react.createElement)($6cc32821e9371a1c$var$MenuItemImpl,(0,esm_extends.A)({},itemProps,{ref:composedRefs,disabled,onClick:(0,dist.m)(props.onClick,(()=>{const menuItem=ref.current;if(!disabled&&menuItem){const itemSelectEvent=new CustomEvent("menu.itemSelect",{bubbles:!0,cancelable:!0});menuItem.addEventListener("menu.itemSelect",(event=>null==onSelect?void 0:onSelect(event)),{once:!0}),(0,react_primitive_dist.hO)(menuItem,itemSelectEvent),itemSelectEvent.defaultPrevented?isPointerDownRef.current=!1:rootContext.onClose()}})),onPointerDown:event=>{var _props$onPointerDown;null===(_props$onPointerDown=props.onPointerDown)||void 0===_props$onPointerDown||_props$onPointerDown.call(props,event),isPointerDownRef.current=!0},onPointerUp:(0,dist.m)(props.onPointerUp,(event=>{var _event$currentTarget;isPointerDownRef.current||null===(_event$currentTarget=event.currentTarget)||void 0===_event$currentTarget||_event$currentTarget.click()})),onKeyDown:(0,dist.m)(props.onKeyDown,(event=>{const isTypingAhead=""!==contentContext.searchRef.current;disabled||isTypingAhead&&" "===event.key||$6cc32821e9371a1c$var$SELECTION_KEYS.includes(event.key)&&(event.currentTarget.click(),event.preventDefault())}))}))})),$6cc32821e9371a1c$var$MenuItemImpl=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeMenu,disabled=!1,textValue,...itemProps}=props,contentContext=$6cc32821e9371a1c$var$useMenuContentContext("MenuItem",__scopeMenu),rovingFocusGroupScope=$6cc32821e9371a1c$var$useRovingFocusGroupScope(__scopeMenu),ref=(0,react.useRef)(null),composedRefs=(0,react_compose_refs_dist.s)(forwardedRef,ref),[isFocused,setIsFocused]=(0,react.useState)(!1),[textContent,setTextContent]=(0,react.useState)("");return(0,react.useEffect)((()=>{const menuItem=ref.current;var _menuItem$textContent;menuItem&&setTextContent((null!==(_menuItem$textContent=menuItem.textContent)&&void 0!==_menuItem$textContent?_menuItem$textContent:"").trim())}),[itemProps.children]),(0,react.createElement)($6cc32821e9371a1c$var$Collection.ItemSlot,{scope:__scopeMenu,disabled,textValue:null!=textValue?textValue:textContent},(0,react.createElement)(react_roving_focus_dist.q7,(0,esm_extends.A)({asChild:!0},rovingFocusGroupScope,{focusable:!disabled}),(0,react.createElement)(react_primitive_dist.sG.div,(0,esm_extends.A)({role:"menuitem","data-highlighted":isFocused?"":void 0,"aria-disabled":disabled||void 0,"data-disabled":disabled?"":void 0},itemProps,{ref:composedRefs,onPointerMove:(0,dist.m)(props.onPointerMove,$6cc32821e9371a1c$var$whenMouse((event=>{if(disabled)contentContext.onItemLeave(event);else if(contentContext.onItemEnter(event),!event.defaultPrevented){event.currentTarget.focus()}}))),onPointerLeave:(0,dist.m)(props.onPointerLeave,$6cc32821e9371a1c$var$whenMouse((event=>contentContext.onItemLeave(event)))),onFocus:(0,dist.m)(props.onFocus,(()=>setIsFocused(!0))),onBlur:(0,dist.m)(props.onBlur,(()=>setIsFocused(!1)))}))))})),[$6cc32821e9371a1c$var$RadioGroupProvider,$6cc32821e9371a1c$var$useRadioGroupContext]=$6cc32821e9371a1c$var$createMenuContext("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),[$6cc32821e9371a1c$var$ItemIndicatorProvider,$6cc32821e9371a1c$var$useItemIndicatorContext]=$6cc32821e9371a1c$var$createMenuContext("MenuItemIndicator",{checked:!1}),$6cc32821e9371a1c$export$1cec7dcdd713e220=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeMenu,...separatorProps}=props;return(0,react.createElement)(react_primitive_dist.sG.div,(0,esm_extends.A)({role:"separator","aria-orientation":"horizontal"},separatorProps,{ref:forwardedRef}))})),[$6cc32821e9371a1c$var$MenuSubProvider,$6cc32821e9371a1c$var$useMenuSubContext]=$6cc32821e9371a1c$var$createMenuContext("MenuSub");function $6cc32821e9371a1c$var$getOpenState(open){return open?"open":"closed"}function $6cc32821e9371a1c$var$whenMouse(handler){return event=>"mouse"===event.pointerType?handler(event):void 0}const $6cc32821e9371a1c$export$be92b6f5f03c0fe9=$6cc32821e9371a1c$export$d9b273488cd8ce6f,$6cc32821e9371a1c$export$b688253958b8dfe7=$6cc32821e9371a1c$export$9fa5ebd18bee4d43,$6cc32821e9371a1c$export$602eac185826482c=$6cc32821e9371a1c$export$793392f970497feb,$6cc32821e9371a1c$export$7c6e2c02157bb7d2=$6cc32821e9371a1c$export$479f0f2f71193efe,$6cc32821e9371a1c$export$b04be29aa201d4f5=$6cc32821e9371a1c$export$dd37bec0e8a99143,$6cc32821e9371a1c$export$6d08773d2e66f8f2=$6cc32821e9371a1c$export$2ce376c2cc3355c8,$6cc32821e9371a1c$export$1ff3c3f08ae963c0=$6cc32821e9371a1c$export$1cec7dcdd713e220,[$d08ef79370b62062$var$createDropdownMenuContext,$d08ef79370b62062$export$c0623cd925aeb687]=(0,react_context_dist.A)("DropdownMenu",[$6cc32821e9371a1c$export$4027731b685e72eb]),$d08ef79370b62062$var$useMenuScope=$6cc32821e9371a1c$export$4027731b685e72eb(),[$d08ef79370b62062$var$DropdownMenuProvider,$d08ef79370b62062$var$useDropdownMenuContext]=$d08ef79370b62062$var$createDropdownMenuContext("DropdownMenu"),$d08ef79370b62062$export$e44a253a59704894=props=>{const{__scopeDropdownMenu,children,dir,open:openProp,defaultOpen,onOpenChange,modal=!0}=props,menuScope=$d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu),triggerRef=(0,react.useRef)(null),[open=!1,setOpen]=(0,react_use_controllable_state_dist.i)({prop:openProp,defaultProp:defaultOpen,onChange:onOpenChange});return(0,react.createElement)($d08ef79370b62062$var$DropdownMenuProvider,{scope:__scopeDropdownMenu,triggerId:(0,react_id_dist.B)(),triggerRef,contentId:(0,react_id_dist.B)(),open,onOpenChange:setOpen,onOpenToggle:(0,react.useCallback)((()=>setOpen((prevOpen=>!prevOpen))),[setOpen]),modal},(0,react.createElement)($6cc32821e9371a1c$export$be92b6f5f03c0fe9,(0,esm_extends.A)({},menuScope,{open,onOpenChange:setOpen,dir,modal}),children))},$d08ef79370b62062$export$d2469213b3befba9=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeDropdownMenu,disabled=!1,...triggerProps}=props,context=$d08ef79370b62062$var$useDropdownMenuContext("DropdownMenuTrigger",__scopeDropdownMenu),menuScope=$d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);return(0,react.createElement)($6cc32821e9371a1c$export$b688253958b8dfe7,(0,esm_extends.A)({asChild:!0},menuScope),(0,react.createElement)(react_primitive_dist.sG.button,(0,esm_extends.A)({type:"button",id:context.triggerId,"aria-haspopup":"menu","aria-expanded":context.open,"aria-controls":context.open?context.contentId:void 0,"data-state":context.open?"open":"closed","data-disabled":disabled?"":void 0,disabled},triggerProps,{ref:(0,react_compose_refs_dist.t)(forwardedRef,context.triggerRef),onPointerDown:(0,dist.m)(props.onPointerDown,(event=>{disabled||0!==event.button||!1!==event.ctrlKey||(context.onOpenToggle(),context.open||event.preventDefault())})),onKeyDown:(0,dist.m)(props.onKeyDown,(event=>{disabled||(["Enter"," "].includes(event.key)&&context.onOpenToggle(),"ArrowDown"===event.key&&context.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(event.key)&&event.preventDefault())}))})))})),$d08ef79370b62062$export$cd369b4d4d54efc9=props=>{const{__scopeDropdownMenu,...portalProps}=props,menuScope=$d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);return(0,react.createElement)($6cc32821e9371a1c$export$602eac185826482c,(0,esm_extends.A)({},menuScope,portalProps))},$d08ef79370b62062$export$6e76d93a37c01248=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeDropdownMenu,...contentProps}=props,context=$d08ef79370b62062$var$useDropdownMenuContext("DropdownMenuContent",__scopeDropdownMenu),menuScope=$d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu),hasInteractedOutsideRef=(0,react.useRef)(!1);return(0,react.createElement)($6cc32821e9371a1c$export$7c6e2c02157bb7d2,(0,esm_extends.A)({id:context.contentId,"aria-labelledby":context.triggerId},menuScope,contentProps,{ref:forwardedRef,onCloseAutoFocus:(0,dist.m)(props.onCloseAutoFocus,(event=>{var _context$triggerRef$c;hasInteractedOutsideRef.current||null===(_context$triggerRef$c=context.triggerRef.current)||void 0===_context$triggerRef$c||_context$triggerRef$c.focus(),hasInteractedOutsideRef.current=!1,event.preventDefault()})),onInteractOutside:(0,dist.m)(props.onInteractOutside,(event=>{const originalEvent=event.detail.originalEvent,ctrlLeftClick=0===originalEvent.button&&!0===originalEvent.ctrlKey,isRightClick=2===originalEvent.button||ctrlLeftClick;context.modal&&!isRightClick||(hasInteractedOutsideRef.current=!0)})),style:{...props.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)"}}))})),$d08ef79370b62062$export$76e48c5b57f24495=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeDropdownMenu,...labelProps}=props,menuScope=$d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);return(0,react.createElement)($6cc32821e9371a1c$export$b04be29aa201d4f5,(0,esm_extends.A)({},menuScope,labelProps,{ref:forwardedRef}))})),$d08ef79370b62062$export$ed97964d1871885d=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeDropdownMenu,...itemProps}=props,menuScope=$d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);return(0,react.createElement)($6cc32821e9371a1c$export$6d08773d2e66f8f2,(0,esm_extends.A)({},menuScope,itemProps,{ref:forwardedRef}))})),$d08ef79370b62062$export$da160178fd3bc7e9=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeDropdownMenu,...separatorProps}=props,menuScope=$d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);return(0,react.createElement)($6cc32821e9371a1c$export$1ff3c3f08ae963c0,(0,esm_extends.A)({},menuScope,separatorProps,{ref:forwardedRef}))})),$d08ef79370b62062$export$be92b6f5f03c0fe9=$d08ef79370b62062$export$e44a253a59704894,$d08ef79370b62062$export$41fb9f06171c75f4=$d08ef79370b62062$export$d2469213b3befba9,$d08ef79370b62062$export$602eac185826482c=$d08ef79370b62062$export$cd369b4d4d54efc9,$d08ef79370b62062$export$7c6e2c02157bb7d2=$d08ef79370b62062$export$6e76d93a37c01248,$d08ef79370b62062$export$b04be29aa201d4f5=$d08ef79370b62062$export$76e48c5b57f24495,$d08ef79370b62062$export$6d08773d2e66f8f2=$d08ef79370b62062$export$ed97964d1871885d,$d08ef79370b62062$export$1ff3c3f08ae963c0=$d08ef79370b62062$export$da160178fd3bc7e9}}]);