sanity-plugin-tags-v4 1.0.13 → 1.0.15
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/_chunks/{index-b36506b1.js → index-50487dd3.js} +3 -3
- package/dist/_chunks/{index-e916f2f4.js.map → index-50487dd3.js.map} +1 -1
- package/dist/_chunks/{index-e916f2f4.js → index-93c20fed.js} +3 -3
- package/dist/_chunks/{index-b36506b1.js.map → index-93c20fed.js.map} +1 -1
- package/dist/_chunks/{refractor-cb52ef90.js → refractor-6bc5dd5c.js} +2 -2
- package/dist/_chunks/{refractor-cb52ef90.js.map → refractor-6bc5dd5c.js.map} +1 -1
- package/dist/_chunks/{refractor-72943e55.js → refractor-b579ec55.js} +2 -2
- package/dist/_chunks/{refractor-72943e55.js.map → refractor-b579ec55.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/TagsInput.tsx +6 -3
- package/src/utils/mutators.ts +2 -2
|
@@ -2347,11 +2347,11 @@ const{dragControls}=this.node.getProps();if(dragControls){this.removeGroupContro
|
|
|
2347
2347
|
*/const{onViewportEnter,onViewportLeave}=this.node.getProps();const callback=isIntersecting?onViewportEnter:onViewportLeave;callback&&callback(entry);};return observeIntersection(this.node.current,options,onIntersectionUpdate);}mount(){this.startObserver();}update(){if(typeof IntersectionObserver==="undefined")return;const{props,prevProps}=this.node;const hasOptionsChanged=["amount","margin","root"].some(hasViewportOptionChanged(props,prevProps));if(hasOptionsChanged){this.startObserver();}}unmount(){}}function hasViewportOptionChanged(_ref65){let{viewport={}}=_ref65;let{viewport:prevViewport={}}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return name=>viewport[name]!==prevViewport[name];}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}};const layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}};const featureBundle=_objectSpread(_objectSpread(_objectSpread(_objectSpread({},animations),gestureAnimations),drag),layout);const motion=/*@__PURE__*/createMotionProxy(featureBundle,createDomVisualElement);var resizeObservers=[];var hasActiveObservations=function(){return resizeObservers.some(function(ro){return ro.activeTargets.length>0;});};var hasSkippedObservations=function(){return resizeObservers.some(function(ro){return ro.skippedTargets.length>0;});};var msg='ResizeObserver loop completed with undelivered notifications.';var deliverResizeLoopError=function(){var event;if(typeof ErrorEvent==='function'){event=new ErrorEvent('error',{message:msg});}else{event=document.createEvent('Event');event.initEvent('error',false,false);event.message=msg;}window.dispatchEvent(event);};var ResizeObserverBoxOptions;(function(ResizeObserverBoxOptions){ResizeObserverBoxOptions["BORDER_BOX"]="border-box";ResizeObserverBoxOptions["CONTENT_BOX"]="content-box";ResizeObserverBoxOptions["DEVICE_PIXEL_CONTENT_BOX"]="device-pixel-content-box";})(ResizeObserverBoxOptions||(ResizeObserverBoxOptions={}));var freeze=function(obj){return Object.freeze(obj);};var ResizeObserverSize=function(){function ResizeObserverSize(inlineSize,blockSize){this.inlineSize=inlineSize;this.blockSize=blockSize;freeze(this);}return ResizeObserverSize;}();var DOMRectReadOnly=function(){function DOMRectReadOnly(x,y,width,height){this.x=x;this.y=y;this.width=width;this.height=height;this.top=this.y;this.left=this.x;this.bottom=this.top+this.height;this.right=this.left+this.width;return freeze(this);}DOMRectReadOnly.prototype.toJSON=function(){var _a=this,x=_a.x,y=_a.y,top=_a.top,right=_a.right,bottom=_a.bottom,left=_a.left,width=_a.width,height=_a.height;return{x:x,y:y,top:top,right:right,bottom:bottom,left:left,width:width,height:height};};DOMRectReadOnly.fromRect=function(rectangle){return new DOMRectReadOnly(rectangle.x,rectangle.y,rectangle.width,rectangle.height);};return DOMRectReadOnly;}();var isSVG=function(target){return target instanceof SVGElement&&'getBBox'in target;};var isHidden=function(target){if(isSVG(target)){var _a=target.getBBox(),width=_a.width,height=_a.height;return!width&&!height;}var _b=target,offsetWidth=_b.offsetWidth,offsetHeight=_b.offsetHeight;return!(offsetWidth||offsetHeight||target.getClientRects().length);};var isElement=function(obj){var _a;if(obj instanceof Element){return true;}var scope=(_a=obj===null||obj===void 0?void 0:obj.ownerDocument)===null||_a===void 0?void 0:_a.defaultView;return!!(scope&&obj instanceof scope.Element);};var isReplacedElement=function(target){switch(target.tagName){case'INPUT':if(target.type!=='image'){break;}case'VIDEO':case'AUDIO':case'EMBED':case'OBJECT':case'CANVAS':case'IFRAME':case'IMG':return true;}return false;};var global$1=typeof window!=='undefined'?window:{};var cache=new WeakMap();var scrollRegexp=/auto|scroll/;var verticalRegexp=/^tb|vertical/;var IE=/msie|trident/i.test(global$1.navigator&&global$1.navigator.userAgent);var parseDimension=function(pixel){return parseFloat(pixel||'0');};var size$1=function(inlineSize,blockSize,switchSizes){if(inlineSize===void 0){inlineSize=0;}if(blockSize===void 0){blockSize=0;}if(switchSizes===void 0){switchSizes=false;}return new ResizeObserverSize((switchSizes?blockSize:inlineSize)||0,(switchSizes?inlineSize:blockSize)||0);};var zeroBoxes=freeze({devicePixelContentBoxSize:size$1(),borderBoxSize:size$1(),contentBoxSize:size$1(),contentRect:new DOMRectReadOnly(0,0,0,0)});var calculateBoxSizes=function(target,forceRecalculation){if(forceRecalculation===void 0){forceRecalculation=false;}if(cache.has(target)&&!forceRecalculation){return cache.get(target);}if(isHidden(target)){cache.set(target,zeroBoxes);return zeroBoxes;}var cs=getComputedStyle(target);var svg=isSVG(target)&&target.ownerSVGElement&&target.getBBox();var removePadding=!IE&&cs.boxSizing==='border-box';var switchSizes=verticalRegexp.test(cs.writingMode||'');var canScrollVertically=!svg&&scrollRegexp.test(cs.overflowY||'');var canScrollHorizontally=!svg&&scrollRegexp.test(cs.overflowX||'');var paddingTop=svg?0:parseDimension(cs.paddingTop);var paddingRight=svg?0:parseDimension(cs.paddingRight);var paddingBottom=svg?0:parseDimension(cs.paddingBottom);var paddingLeft=svg?0:parseDimension(cs.paddingLeft);var borderTop=svg?0:parseDimension(cs.borderTopWidth);var borderRight=svg?0:parseDimension(cs.borderRightWidth);var borderBottom=svg?0:parseDimension(cs.borderBottomWidth);var borderLeft=svg?0:parseDimension(cs.borderLeftWidth);var horizontalPadding=paddingLeft+paddingRight;var verticalPadding=paddingTop+paddingBottom;var horizontalBorderArea=borderLeft+borderRight;var verticalBorderArea=borderTop+borderBottom;var horizontalScrollbarThickness=!canScrollHorizontally?0:target.offsetHeight-verticalBorderArea-target.clientHeight;var verticalScrollbarThickness=!canScrollVertically?0:target.offsetWidth-horizontalBorderArea-target.clientWidth;var widthReduction=removePadding?horizontalPadding+horizontalBorderArea:0;var heightReduction=removePadding?verticalPadding+verticalBorderArea:0;var contentWidth=svg?svg.width:parseDimension(cs.width)-widthReduction-verticalScrollbarThickness;var contentHeight=svg?svg.height:parseDimension(cs.height)-heightReduction-horizontalScrollbarThickness;var borderBoxWidth=contentWidth+horizontalPadding+verticalScrollbarThickness+horizontalBorderArea;var borderBoxHeight=contentHeight+verticalPadding+horizontalScrollbarThickness+verticalBorderArea;var boxes=freeze({devicePixelContentBoxSize:size$1(Math.round(contentWidth*devicePixelRatio),Math.round(contentHeight*devicePixelRatio),switchSizes),borderBoxSize:size$1(borderBoxWidth,borderBoxHeight,switchSizes),contentBoxSize:size$1(contentWidth,contentHeight,switchSizes),contentRect:new DOMRectReadOnly(paddingLeft,paddingTop,contentWidth,contentHeight)});cache.set(target,boxes);return boxes;};var calculateBoxSize=function(target,observedBox,forceRecalculation){var _a=calculateBoxSizes(target,forceRecalculation),borderBoxSize=_a.borderBoxSize,contentBoxSize=_a.contentBoxSize,devicePixelContentBoxSize=_a.devicePixelContentBoxSize;switch(observedBox){case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:return devicePixelContentBoxSize;case ResizeObserverBoxOptions.BORDER_BOX:return borderBoxSize;default:return contentBoxSize;}};var ResizeObserverEntry=function(){function ResizeObserverEntry(target){var boxes=calculateBoxSizes(target);this.target=target;this.contentRect=boxes.contentRect;this.borderBoxSize=freeze([boxes.borderBoxSize]);this.contentBoxSize=freeze([boxes.contentBoxSize]);this.devicePixelContentBoxSize=freeze([boxes.devicePixelContentBoxSize]);}return ResizeObserverEntry;}();var calculateDepthForNode=function(node){if(isHidden(node)){return Infinity;}var depth=0;var parent=node.parentNode;while(parent){depth+=1;parent=parent.parentNode;}return depth;};var broadcastActiveObservations=function(){var shallowestDepth=Infinity;var callbacks=[];resizeObservers.forEach(function processObserver(ro){if(ro.activeTargets.length===0){return;}var entries=[];ro.activeTargets.forEach(function processTarget(ot){var entry=new ResizeObserverEntry(ot.target);var targetDepth=calculateDepthForNode(ot.target);entries.push(entry);ot.lastReportedSize=calculateBoxSize(ot.target,ot.observedBox);if(targetDepth<shallowestDepth){shallowestDepth=targetDepth;}});callbacks.push(function resizeObserverCallback(){ro.callback.call(ro.observer,entries,ro.observer);});ro.activeTargets.splice(0,ro.activeTargets.length);});for(var _i=0,callbacks_1=callbacks;_i<callbacks_1.length;_i++){var callback=callbacks_1[_i];callback();}return shallowestDepth;};var gatherActiveObservationsAtDepth=function(depth){resizeObservers.forEach(function processObserver(ro){ro.activeTargets.splice(0,ro.activeTargets.length);ro.skippedTargets.splice(0,ro.skippedTargets.length);ro.observationTargets.forEach(function processTarget(ot){if(ot.isActive()){if(calculateDepthForNode(ot.target)>depth){ro.activeTargets.push(ot);}else{ro.skippedTargets.push(ot);}}});});};var process$1=function(){var depth=0;gatherActiveObservationsAtDepth(depth);while(hasActiveObservations()){depth=broadcastActiveObservations();gatherActiveObservationsAtDepth(depth);}if(hasSkippedObservations()){deliverResizeLoopError();}return depth>0;};var trigger;var callbacks=[];var notify=function(){return callbacks.splice(0).forEach(function(cb){return cb();});};var queueMicroTask=function(callback){if(!trigger){var toggle_1=0;var el_1=document.createTextNode('');var config={characterData:true};new MutationObserver(function(){return notify();}).observe(el_1,config);trigger=function(){el_1.textContent="".concat(toggle_1?toggle_1--:toggle_1++);};}callbacks.push(callback);trigger();};var queueResizeObserver=function(cb){queueMicroTask(function ResizeObserver(){requestAnimationFrame(cb);});};var watching=0;var isWatching=function(){return!!watching;};var CATCH_PERIOD=250;var observerConfig={attributes:true,characterData:true,childList:true,subtree:true};var events=['resize','load','transitionend','animationend','animationstart','animationiteration','keyup','keydown','mouseup','mousedown','mouseover','mouseout','blur','focus'];var time=function(timeout){if(timeout===void 0){timeout=0;}return Date.now()+timeout;};var scheduled=false;var Scheduler=function(){function Scheduler(){var _this=this;this.stopped=true;this.listener=function(){return _this.schedule();};}Scheduler.prototype.run=function(timeout){var _this=this;if(timeout===void 0){timeout=CATCH_PERIOD;}if(scheduled){return;}scheduled=true;var until=time(timeout);queueResizeObserver(function(){var elementsHaveResized=false;try{elementsHaveResized=process$1();}finally{scheduled=false;timeout=until-time();if(!isWatching()){return;}if(elementsHaveResized){_this.run(1000);}else if(timeout>0){_this.run(timeout);}else{_this.start();}}});};Scheduler.prototype.schedule=function(){this.stop();this.run();};Scheduler.prototype.observe=function(){var _this=this;var cb=function(){return _this.observer&&_this.observer.observe(document.body,observerConfig);};document.body?cb():global$1.addEventListener('DOMContentLoaded',cb);};Scheduler.prototype.start=function(){var _this=this;if(this.stopped){this.stopped=false;this.observer=new MutationObserver(this.listener);this.observe();events.forEach(function(name){return global$1.addEventListener(name,_this.listener,true);});}};Scheduler.prototype.stop=function(){var _this=this;if(!this.stopped){this.observer&&this.observer.disconnect();events.forEach(function(name){return global$1.removeEventListener(name,_this.listener,true);});this.stopped=true;}};return Scheduler;}();var scheduler=new Scheduler();var updateCount=function(n){!watching&&n>0&&scheduler.start();watching+=n;!watching&&scheduler.stop();};var skipNotifyOnElement=function(target){return!isSVG(target)&&!isReplacedElement(target)&&getComputedStyle(target).display==='inline';};var ResizeObservation=function(){function ResizeObservation(target,observedBox){this.target=target;this.observedBox=observedBox||ResizeObserverBoxOptions.CONTENT_BOX;this.lastReportedSize={inlineSize:0,blockSize:0};}ResizeObservation.prototype.isActive=function(){var size=calculateBoxSize(this.target,this.observedBox,true);if(skipNotifyOnElement(this.target)){this.lastReportedSize=size;}if(this.lastReportedSize.inlineSize!==size.inlineSize||this.lastReportedSize.blockSize!==size.blockSize){return true;}return false;};return ResizeObservation;}();var ResizeObserverDetail=function(){function ResizeObserverDetail(resizeObserver,callback){this.activeTargets=[];this.skippedTargets=[];this.observationTargets=[];this.observer=resizeObserver;this.callback=callback;}return ResizeObserverDetail;}();var observerMap=new WeakMap();var getObservationIndex=function(observationTargets,target){for(var i=0;i<observationTargets.length;i+=1){if(observationTargets[i].target===target){return i;}}return-1;};var ResizeObserverController=function(){function ResizeObserverController(){}ResizeObserverController.connect=function(resizeObserver,callback){var detail=new ResizeObserverDetail(resizeObserver,callback);observerMap.set(resizeObserver,detail);};ResizeObserverController.observe=function(resizeObserver,target,options){var detail=observerMap.get(resizeObserver);var firstObservation=detail.observationTargets.length===0;if(getObservationIndex(detail.observationTargets,target)<0){firstObservation&&resizeObservers.push(detail);detail.observationTargets.push(new ResizeObservation(target,options&&options.box));updateCount(1);scheduler.schedule();}};ResizeObserverController.unobserve=function(resizeObserver,target){var detail=observerMap.get(resizeObserver);var index=getObservationIndex(detail.observationTargets,target);var lastObservation=detail.observationTargets.length===1;if(index>=0){lastObservation&&resizeObservers.splice(resizeObservers.indexOf(detail),1);detail.observationTargets.splice(index,1);updateCount(-1);}};ResizeObserverController.disconnect=function(resizeObserver){var _this=this;var detail=observerMap.get(resizeObserver);detail.observationTargets.slice().forEach(function(ot){return _this.unobserve(resizeObserver,ot.target);});detail.activeTargets.splice(0,detail.activeTargets.length);};return ResizeObserverController;}();var ResizeObserver$1=function(){function ResizeObserver(callback){if(arguments.length===0){throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");}if(typeof callback!=='function'){throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");}ResizeObserverController.connect(this,callback);}ResizeObserver.prototype.observe=function(target,options){if(arguments.length===0){throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");}if(!isElement(target)){throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");}ResizeObserverController.observe(this,target,options);};ResizeObserver.prototype.unobserve=function(target){if(arguments.length===0){throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");}if(!isElement(target)){throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");}ResizeObserverController.unobserve(this,target);};ResizeObserver.prototype.disconnect=function(){ResizeObserverController.disconnect(this);};ResizeObserver.toString=function(){return'function ResizeObserver () { [polyfill code] }';};return ResizeObserver;}();const context=React__default.createContext(!0);function forbiddenInRender(){throw new Error("A function wrapped in useEffectEvent can't be called during rendering.");}const isInvalidExecutionContextForEventFunction="use"in React__default?()=>{try{return React__default.use(context);}catch(_unused2){return!1;}}:()=>!1;function useEffectEvent(fn){const ref=React__default.useRef(forbiddenInRender);return React__default.useInsertionEffect(()=>{ref.current=fn;},[fn]),function(){isInvalidExecutionContextForEventFunction()&&forbiddenInRender();const latestFn=ref.current;return latestFn(...arguments);};}buildTheme();const EMPTY_ARRAY=[],EMPTY_RECORD={},POPOVER_MOTION_PROPS={card:{initial:{scale:0.97,willChange:"transform"},hidden:{opacity:0},visible:{opacity:1,transition:{when:"beforeChildren",duration:0.1}},scaleIn:{scale:1},scaleOut:{scale:0.97}},children:{hidden:{opacity:0},visible:{opacity:1}},transition:{type:"spring",visualDuration:0.2,bounce:0.25}};function _isEnterToClickElement(element){return isHTMLAnchorElement(element)||isHTMLButtonElement(element);}function isHTMLElement(node){return node instanceof Node&&node.nodeType===Node.ELEMENT_NODE;}function isHTMLAnchorElement(element){return isHTMLElement(element)&&element.nodeName==="A";}function isHTMLInputElement(element){return isHTMLElement(element)&&element.nodeName==="INPUT";}function isHTMLButtonElement(element){return isHTMLElement(element)&&element.nodeName==="BUTTON";}function isHTMLSelectElement(element){return isHTMLElement(element)&&element.nodeName==="SELECT";}function isHTMLTextAreaElement(element){return isHTMLElement(element)&&element.nodeName==="TEXTAREA";}function containsOrEqualsElement(element,node){return element.contains(node)||element===node;}function _isScrollable(el){if(!(el instanceof Element))return!1;const style=window.getComputedStyle(el);return style.overflowX.includes("auto")||style.overflowX.includes("scroll")||style.overflowY.includes("auto")||style.overflowY.includes("scroll");}function _fillCSSObject(keys,value){return keys.reduce((style,key2)=>(style[key2]=value,style),{});}function rem(pixelValue){return pixelValue===0?0:"".concat(pixelValue/16,"rem");}function _responsive(media,values,callback){return((values===null||values===void 0?void 0:values.map(callback))||[]).map((statement,mediaIndex)=>mediaIndex===0?statement:{["@media screen and (min-width: ".concat(media[mediaIndex-1],"px)")]:statement});}function _getArrayProp(val,defaultVal){return val===void 0?defaultVal||EMPTY_ARRAY:Array.isArray(val)?val:[val];}function _getResponsiveSpace(theme,props){let spaceIndexes=arguments.length>2&&arguments[2]!==undefined?arguments[2]:EMPTY_ARRAY;if(!Array.isArray(spaceIndexes))throw new Error("the property must be array of numbers");if(spaceIndexes.length===0)return null;const{media,space}=getTheme_v2(theme);return _responsive(media,spaceIndexes,spaceIndex=>_fillCSSObject(props,rem(space[spaceIndex])));}function responsiveFont(fontKey,props){const{$size,$weight}=props,{font,media}=getTheme_v2(props.theme),{family,sizes,weights}=font[fontKey],fontWeight=$weight&&weights[$weight]||weights.regular,defaultSize=sizes[2],base={position:"relative",fontFamily:family,fontWeight:"".concat(fontWeight),padding:"1px 0",margin:0,"&:before":{content:'""',display:"block",height:0},"&:after":{content:'""',display:"block",height:0},"& > code, & > span":{display:"block"},"&:not([hidden])":{display:"block"}};if(!$size)return responsiveFont.warned||(console.warn("No size specified for responsive font",{fontKey,$size,props,base}),responsiveFont.warned=!0),[base];const resp=_responsive(media,$size,sizeIndex=>fontSize(sizes[sizeIndex]||defaultSize));return[base,...resp];}function fontSize(size2){const{ascenderHeight,descenderHeight,fontSize:fontSize2,iconSize,letterSpacing,lineHeight}=size2,negHeight=ascenderHeight+descenderHeight,capHeight=lineHeight-negHeight,iconOffset=(capHeight-iconSize)/2,customIconSize=Math.floor(fontSize2*1.125/2)*2+1,customIconOffset=(capHeight-customIconSize)/2;return{fontSize:rem(fontSize2),lineHeight:"calc(".concat(lineHeight," / ").concat(fontSize2,")"),letterSpacing:rem(letterSpacing),transform:"translateY(".concat(rem(descenderHeight),")"),"&:before":{marginTop:"calc(".concat(rem(0-negHeight)," - 1px)")},"&:after":{marginBottom:"-1px"},"& svg:not([data-sanity-icon])":{fontSize:"calc(".concat(customIconSize," / 16 * 1rem)"),margin:rem(customIconOffset)},"& [data-sanity-icon]":{fontSize:"calc(".concat(iconSize," / 16 * 1rem)"),margin:rem(iconOffset)}};}function responsiveCodeFontStyle(props){return responsiveFont("code",props);}function responsiveHeadingFont(props){return responsiveFont("heading",props);}function responsiveLabelFont(props){return responsiveFont("label",props);}function responsiveTextAlignStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$align,textAlign=>({textAlign}));}function responsiveTextFont(props){return responsiveFont("text",props);}function getGlobalScope(){if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global;throw new Error("@sanity/ui: could not locate global scope");}const globalScope=getGlobalScope();function createGlobalScopedContext(key2,defaultValue){const symbol=Symbol.for(key2);if(typeof document>"u"){const context=createContext(defaultValue);return context.displayName=key2,context;}return globalScope[symbol]=globalScope[symbol]||createContext(defaultValue),globalScope[symbol];}const ThemeContext=createGlobalScopedContext("@sanity/ui/context/theme",null);function ThemeProvider(props){var _props$scheme,_props$theme,_props$tone;const $=dist.c(15),parentTheme=useContext(ThemeContext),{children}=props,scheme=(_props$scheme=props.scheme)!==null&&_props$scheme!==void 0?_props$scheme:(parentTheme===null||parentTheme===void 0?void 0:parentTheme.scheme)||"light",rootTheme=(_props$theme=props.theme)!==null&&_props$theme!==void 0?_props$theme:(parentTheme===null||parentTheme===void 0?void 0:parentTheme.theme)||null,tone=(_props$tone=props.tone)!==null&&_props$tone!==void 0?_props$tone:(parentTheme===null||parentTheme===void 0?void 0:parentTheme.tone)||"default";let t0;bb0:{if(!rootTheme){t0=null;break bb0;}let t12;$[0]!==rootTheme||$[1]!==scheme||$[2]!==tone?(t12={version:0,theme:rootTheme,scheme,tone},$[0]=rootTheme,$[1]=scheme,$[2]=tone,$[3]=t12):t12=$[3],t0=t12;}const themeContext=t0;let t1;bb1:{if(!rootTheme){t1=null;break bb1;}let t22;$[4]!==rootTheme||$[5]!==scheme||$[6]!==tone?(t22=getScopedTheme(rootTheme,scheme,tone),$[4]=rootTheme,$[5]=scheme,$[6]=tone,$[7]=t22):t22=$[7],t1=t22;}const theme=t1;if(!theme){let t22;return $[8]===Symbol.for("react.memo_cache_sentinel")?(t22=/* @__PURE__ */jsx("pre",{children:'ThemeProvider: no "theme" property provided'}),$[8]=t22):t22=$[8],t22;}let t2;$[9]!==children||$[10]!==theme?(t2=/* @__PURE__ */jsx(ThemeProvider$1,{theme,children}),$[9]=children,$[10]=theme,$[11]=t2):t2=$[11];let t3;return $[12]!==t2||$[13]!==themeContext?(t3=/* @__PURE__ */jsx(ThemeContext.Provider,{value:themeContext,children:t2}),$[12]=t2,$[13]=themeContext,$[14]=t3):t3=$[14],t3;}ThemeProvider.displayName="ThemeProvider";function useRootTheme(){const value=useContext(ThemeContext);if(!value)throw new Error("useRootTheme(): missing context value");return value;}function ThemeColorProvider(props){const $=dist.c(5),{children,scheme,tone}=props,root=useRootTheme(),t0=scheme||root.scheme;let t1;return $[0]!==children||$[1]!==root.theme||$[2]!==t0||$[3]!==tone?(t1=/* @__PURE__ */jsx(ThemeProvider,{scheme:t0,theme:root.theme,tone,children}),$[0]=children,$[1]=root.theme,$[2]=t0,$[3]=tone,$[4]=t1):t1=$[4],t1;}ThemeColorProvider.displayName="ThemeColorProvider";function useTheme_v2(){const $=dist.c(2),t0=useTheme();let t1;return $[0]!==t0?(t1=getTheme_v2(t0),$[0]=t0,$[1]=t1):t1=$[1],t1;}function responsiveBorderStyle(){return[border,borderTop,borderRight,borderBottom,borderLeft];}function border(props){var _card$border$width,_card$border;const{card,media}=getTheme_v2(props.theme),borderStyle="".concat((_card$border$width=(_card$border=card.border)===null||_card$border===void 0?void 0:_card$border.width)!==null&&_card$border$width!==void 0?_card$border$width:1,"px solid var(--card-border-color)");return _responsive(media,props.$border,value=>value?{"&&":{border:borderStyle}}:{"&&":{border:0}});}function borderTop(props){var _card$border$width2,_card$border2;const{card,media}=getTheme_v2(props.theme),borderStyle="".concat((_card$border$width2=(_card$border2=card.border)===null||_card$border2===void 0?void 0:_card$border2.width)!==null&&_card$border$width2!==void 0?_card$border$width2:1,"px solid var(--card-border-color)");return _responsive(media,props.$borderTop,value=>value?{"&&":{borderTop:borderStyle}}:{"&&":{borderTop:0}});}function borderRight(props){var _card$border$width3,_card$border3;const{card,media}=getTheme_v2(props.theme),borderStyle="".concat((_card$border$width3=(_card$border3=card.border)===null||_card$border3===void 0?void 0:_card$border3.width)!==null&&_card$border$width3!==void 0?_card$border$width3:1,"px solid var(--card-border-color)");return _responsive(media,props.$borderRight,value=>value?{"&&":{borderRight:borderStyle}}:{"&&":{borderRight:0}});}function borderBottom(props){var _card$border$width4,_card$border4;const{card,media}=getTheme_v2(props.theme),borderStyle="".concat((_card$border$width4=(_card$border4=card.border)===null||_card$border4===void 0?void 0:_card$border4.width)!==null&&_card$border$width4!==void 0?_card$border$width4:1,"px solid var(--card-border-color)");return _responsive(media,props.$borderBottom,value=>value?{"&&":{borderBottom:borderStyle}}:{"&&":{borderBottom:0}});}function borderLeft(props){var _card$border$width5,_card$border5;const{card,media}=getTheme_v2(props.theme),borderStyle="".concat((_card$border$width5=(_card$border5=card.border)===null||_card$border5===void 0?void 0:_card$border5.width)!==null&&_card$border$width5!==void 0?_card$border$width5:1,"px solid var(--card-border-color)");return _responsive(media,props.$borderLeft,value=>value?{"&&":{borderLeft:borderStyle}}:{"&&":{borderLeft:0}});}const BASE_STYLE$4={'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"}},BOX_SIZING={content:"content-box",border:"border-box"},BOX_HEIGHT={stretch:"stretch",fill:"100%"};function boxStyle(){return BASE_STYLE$4;}function responsiveBoxStyle(){return[responsiveBoxSizingStyle,responsiveBoxHeightStyle,responsiveBoxOverflowStyle,responsiveBoxDisplayStyle];}function responsiveBoxDisplayStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$display,display=>({"&:not([hidden])":{display}}));}function responsiveBoxSizingStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$sizing,sizing=>({boxSizing:BOX_SIZING[sizing]}));}function responsiveBoxHeightStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$height,height=>({height:BOX_HEIGHT[height]}));}function responsiveBoxOverflowStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$overflow,overflow=>({overflow}));}const BASE_STYLE$3={minWidth:0,minHeight:0};function flexItemStyle(){return[BASE_STYLE$3,responsiveFlexItemStyle];}function responsiveFlexItemStyle(props){const{media}=getTheme_v2(props.theme);return props.$flex?_responsive(media,props.$flex,flex=>({flex:"".concat(flex)})):EMPTY_ARRAY;}const BASE_STYLE$2={"&&:not([hidden])":{display:"flex"}};function responsiveFlexStyle(){return[BASE_STYLE$2,responsiveFlexAlignStyle,responsiveFlexGapStyle,responsiveFlexWrapStyle,responsiveFlexJustifyStyle,responsiveFlexDirectionStyle];}function responsiveFlexAlignStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$align,align=>({alignItems:align}));}function responsiveFlexGapStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$gap,gap=>({gap:gap?rem(space[gap]):void 0}));}function responsiveFlexWrapStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$wrap,wrap=>({flexWrap:wrap}));}function responsiveFlexJustifyStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$justify,justify=>({justifyContent:justify}));}function responsiveFlexDirectionStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$direction,direction=>({flexDirection:direction}));}function focusRingBorderStyle(border2){return"inset 0 0 0 ".concat(border2.width,"px ").concat(border2.color);}function focusRingStyle(opts){const{base,border:border2,focusRing}=opts,focusRingOutsetWidth=focusRing.offset+focusRing.width,focusRingInsetWidth=0-focusRing.offset,bgColor=base?base.bg:"var(--card-bg-color)";return[focusRingInsetWidth>0&&"inset 0 0 0 ".concat(focusRingInsetWidth,"px var(--card-focus-ring-color)"),border2&&focusRingBorderStyle(border2),focusRingInsetWidth<0&&"0 0 0 ".concat(0-focusRingInsetWidth,"px ").concat(bgColor),focusRingOutsetWidth>0&&"0 0 0 ".concat(focusRingOutsetWidth,"px var(--card-focus-ring-color)")].filter(Boolean).join(",");}function responsiveGridItemStyle(){return[responsiveGridItemRowStyle,responsiveGridItemRowStartStyle,responsiveGridItemRowEndStyle,responsiveGridItemColumnStyle,responsiveGridItemColumnStartStyle,responsiveGridItemColumnEndStyle];}const GRID_ITEM_ROW={auto:"auto",full:"1 / -1"},GRID_ITEM_COLUMN={auto:"auto",full:"1 / -1"};function responsiveGridItemRowStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$row,row=>typeof row=="number"?{gridRow:"span ".concat(row," / span ").concat(row)}:{gridRow:GRID_ITEM_ROW[row]});}function responsiveGridItemRowStartStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$rowStart,rowStart=>({gridRowStart:"".concat(rowStart)}));}function responsiveGridItemRowEndStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$rowEnd,rowEnd=>({gridRowEnd:"".concat(rowEnd)}));}function responsiveGridItemColumnStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$column,column=>typeof column=="number"?{gridColumn:"span ".concat(column," / span ").concat(column)}:{gridColumn:GRID_ITEM_COLUMN[column]});}function responsiveGridItemColumnStartStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$columnStart,columnStart=>({gridColumnStart:"".concat(columnStart)}));}function responsiveGridItemColumnEndStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$columnEnd,columnEnd=>({gridColumnEnd:"".concat(columnEnd)}));}const GRID_CSS={"&&:not([hidden])":{display:"grid"},'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"}},GRID_AUTO_COLUMS={auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},GRID_AUTO_ROWS={auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"};function responsiveGridStyle(){return[GRID_CSS,responsiveGridAutoFlowStyle,responsiveGridAutoRowsStyle,responsiveGridAutoColsStyle,responsiveGridColumnsStyle,responsiveGridRowsStyle,responsiveGridGapStyle,responsiveGridGapXStyle,responsiveGridGapYStyle];}function responsiveGridAutoFlowStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$autoFlow,autoFlow=>({gridAutoFlow:autoFlow}));}function responsiveGridAutoRowsStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$autoRows,autoRows=>({gridAutoRows:autoRows&&GRID_AUTO_ROWS[autoRows]}));}function responsiveGridAutoColsStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$autoCols,autoCols=>({gridAutoColumns:autoCols&&GRID_AUTO_COLUMS[autoCols]}));}function responsiveGridColumnsStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$columns,columns=>({gridTemplateColumns:columns&&"repeat(".concat(columns,",minmax(0,1fr));")}));}function responsiveGridRowsStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$rows,rows=>({gridTemplateRows:rows&&"repeat(".concat(rows,",minmax(0,1fr));")}));}function responsiveGridGapStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$gap,gap=>({gridGap:gap?rem(space[gap]):void 0}));}function responsiveGridGapXStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$gapX,gapX=>({columnGap:gapX?rem(space[gapX]):void 0}));}function responsiveGridGapYStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$gapY,gapY=>({rowGap:gapY?rem(space[gapY]):void 0}));}function responsiveInputPaddingStyle(props){const{$fontSize,$iconLeft,$iconRight,$padding,$space}=props,{font,media,space}=getTheme_v2(props.theme),len=Math.max($padding.length,$space.length,$fontSize.length),_padding=[],_space=[],_fontSize=[];for(let i=0;i<len;i+=1)_fontSize[i]=$fontSize[i]===void 0?_fontSize[i-1]:$fontSize[i],_padding[i]=$padding[i]===void 0?_padding[i-1]:$padding[i],_space[i]=$space[i]===void 0?_space[i-1]:$space[i];return _responsive(media,_padding,(_,i)=>{const size2=font.text.sizes[_fontSize[i]]||font.text.sizes[2],emSize=size2.lineHeight-size2.ascenderHeight-size2.descenderHeight,p=space[_padding[i]],s=space[_space[i]],styles={paddingTop:rem(p-size2.ascenderHeight),paddingRight:rem(p),paddingBottom:rem(p-size2.descenderHeight),paddingLeft:rem(p)};return $iconRight&&(styles.paddingRight=rem(p+emSize+s)),$iconLeft&&(styles.paddingLeft=rem(p+emSize+s)),styles;});}function responsiveInputPaddingIconRightStyle(props){return responsiveInputPaddingStyle(_objectSpread(_objectSpread({},props),{},{$iconRight:!0}));}const ROOT_STYLE=css(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));function textInputRootStyle(){return ROOT_STYLE;}function textInputBaseStyle(props){const{$scheme,$tone,$weight}=props,{color,font}=getTheme_v2(props.theme);return css(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ",";\n font-weight: ",";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='","'][data-tone='","'] {\n --input-fg-color: ",";\n --input-placeholder-color: ",";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ",";\n --input-placeholder-color: ",";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ",";\n --input-placeholder-color: ",";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ",";\n --input-placeholder-color: ",";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ",";\n --input-placeholder-color: ",";\n }\n }\n "])),font.text.family,$weight&&font.text.weights[$weight]||font.text.weights.regular,$scheme,$tone,color.input.default.enabled.fg,color.input.default.enabled.placeholder,color.input.default.enabled.fg,color.input.default.enabled.placeholder,color.input.default.disabled.fg,color.input.default.disabled.placeholder,color.input.invalid.enabled.fg,color.input.invalid.enabled.placeholder,color.input.default.readOnly.fg,color.input.default.readOnly.placeholder);}function textInputFontSizeStyle(props){const{font,media}=getTheme_v2(props.theme);return _responsive(media,props.$fontSize,sizeIndex=>{const size2=font.text.sizes[sizeIndex]||font.text.sizes[2];return{fontSize:rem(size2.fontSize),lineHeight:"".concat(size2.lineHeight/size2.fontSize)};});}function textInputRepresentationStyle(props){const{$hasPrefix,$hasSuffix,$scheme,$tone,$unstableDisableFocusRing}=props,{color,input}=getTheme_v2(props.theme);return css(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ",";\n border-bottom-left-radius: ",";\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n\n &[data-scheme='","'][data-tone='","'] {\n --card-bg-color: ",";\n --card-fg-color: ",";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ",";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ",";\n --card-fg-color: ",";\n\n &[data-border] {\n --input-box-shadow: ",";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ",";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ",";\n }\n }\n\n /* disabled */\n *:not(:invalid):disabled + & {\n --card-bg-color: "," !important;\n --card-fg-color: "," !important;\n --card-icon-color: "," !important;\n\n &[data-border] {\n --input-box-shadow: ",";\n }\n }\n\n *:invalid:disabled + & {\n --card-bg-color: "," !important;\n --card-fg-color: "," !important;\n --card-icon-color: "," !important;\n\n &[data-border] {\n --input-box-shadow: ",";\n }\n }\n\n /* readOnly */\n *:not(:invalid):read-only + & {\n --card-bg-color: "," !important;\n --card-fg-color: "," !important;\n }\n\n *:invalid:read-only + & {\n --card-bg-color: "," !important;\n --card-fg-color: "," !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ",";\n --card-fg-color: ",";\n }\n\n *:invalid:not(:disabled):not(:read-only):hover + & {\n --card-bg-color: ",";\n --card-fg-color: ",";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ",";\n }\n\n *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {\n --input-box-shadow: ",";\n }\n }\n }\n "])),$hasPrefix?0:void 0,$hasPrefix?0:void 0,$hasSuffix?0:void 0,$hasSuffix?0:void 0,$scheme,$tone,color.input.default.enabled.bg,color.input.default.enabled.fg,focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),color.input.invalid.enabled.bg,color.input.invalid.enabled.fg,focusRingBorderStyle({color:color.input.invalid.enabled.border,width:input.border.width}),$unstableDisableFocusRing?void 0:focusRingStyle({border:{color:color.input.default.enabled.border,width:input.border.width},focusRing:input.text.focusRing}),$unstableDisableFocusRing?void 0:focusRingStyle({focusRing:input.text.focusRing}),color.input.default.disabled.bg,color.input.default.disabled.fg,color.input.default.disabled.fg,focusRingBorderStyle({color:color.input.default.disabled.border,width:input.border.width}),color.input.invalid.disabled.bg,color.input.invalid.disabled.fg,color.input.invalid.disabled.fg,focusRingBorderStyle({color:color.input.invalid.disabled.border,width:input.border.width}),color.input.default.readOnly.bg,color.input.default.readOnly.fg,color.input.invalid.readOnly.bg,color.input.invalid.readOnly.fg,color.input.default.hovered.bg,color.input.default.hovered.fg,color.input.invalid.hovered.bg,color.input.invalid.hovered.fg,focusRingBorderStyle({color:color.input.default.hovered.border,width:input.border.width}),focusRingBorderStyle({color:color.input.invalid.hovered.border,width:input.border.width}));}function responsiveMarginStyle(props){const{theme}=props;return[_getResponsiveSpace(theme,["margin"],props.$margin),_getResponsiveSpace(theme,["marginLeft","marginRight"],props.$marginX),_getResponsiveSpace(theme,["marginTop","marginBottom"],props.$marginY),_getResponsiveSpace(theme,["marginTop"],props.$marginTop),_getResponsiveSpace(theme,["marginRight"],props.$marginRight),_getResponsiveSpace(theme,["marginBottom"],props.$marginBottom),_getResponsiveSpace(theme,["marginLeft"],props.$marginLeft)].filter(Boolean);}function responsivePaddingStyle(props){const{theme}=props;return[_getResponsiveSpace(theme,["padding"],props.$padding),_getResponsiveSpace(theme,["paddingLeft","paddingRight"],props.$paddingX),_getResponsiveSpace(theme,["paddingTop","paddingBottom"],props.$paddingY),_getResponsiveSpace(theme,["paddingTop"],props.$paddingTop),_getResponsiveSpace(theme,["paddingRight"],props.$paddingRight),_getResponsiveSpace(theme,["paddingBottom"],props.$paddingBottom),_getResponsiveSpace(theme,["paddingLeft"],props.$paddingLeft)].filter(Boolean);}function responsiveRadiusStyle(props){const{media,radius}=getTheme_v2(props.theme);return _responsive(media,props.$radius,value=>{let borderRadius=0;return typeof value=="number"&&(borderRadius=rem(radius[value])),value==="full"&&(borderRadius="9999px"),{borderRadius};});}function toBoxShadow(shadow,color){return"".concat(shadow.map(rem).join(" ")," ").concat(color);}function shadowStyle(shadow){let outlineWidth=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;if(!shadow)return EMPTY_RECORD;const outline="0 0 0 ".concat(rem(outlineWidth)," var(--card-shadow-outline-color)"),umbra=toBoxShadow(shadow.umbra,"var(--card-shadow-umbra-color)"),penumbra=toBoxShadow(shadow.penumbra,"var(--card-shadow-penumbra-color)"),ambient=toBoxShadow(shadow.ambient,"var(--card-shadow-ambient-color)");return{boxShadow:"".concat(outline,", ").concat(umbra,", ").concat(penumbra,", ").concat(ambient)};}function responsiveShadowStyle(props){const{card,media,shadow}=getTheme_v2(props.theme);return _responsive(media,props.$shadow,index=>shadowStyle(shadow[index],card.shadow.outline));}const SpanWithTextOverflow=styled.span.withConfig({displayName:"SpanWithTextOverflow",componentId:"sc-ol2i3b-0"})(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;overflow:clip;"])));function labelBaseStyle(props){const{$accent,$muted}=props,{font}=getTheme_v2(props.theme);return css(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n text-transform: uppercase;\n\n ","\n\n ","\n\n & code {\n font-family: ",";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])),$accent&&css(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))),$muted&&css(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))),font.code.family);}const StyledLabel=/* @__PURE__ */styled.div.withConfig({displayName:"StyledLabel",componentId:"sc-1luap7z-0"})(responsiveLabelFont,responsiveTextAlignStyle,labelBaseStyle),Label=forwardRef(function(props,ref){var _props2;const $=dist.c(26);let accent,align,childrenProp,restProps,t0,t1,textOverflow,weight;$[0]!==props?(_props2=props,{accent,align,children:childrenProp,muted:t0,size:t1,textOverflow,weight}=_props2,restProps=_objectWithoutProperties(_props2,_excluded16),_props2,$[0]=props,$[1]=accent,$[2]=align,$[3]=childrenProp,$[4]=restProps,$[5]=t0,$[6]=t1,$[7]=textOverflow,$[8]=weight):(accent=$[1],align=$[2],childrenProp=$[3],restProps=$[4],t0=$[5],t1=$[6],textOverflow=$[7],weight=$[8]);const muted=t0===void 0?!1:t0,size2=t1===void 0?2:t1;let children=childrenProp;if(textOverflow==="ellipsis"){let t22;$[9]!==children?(t22=/* @__PURE__ */jsx(SpanWithTextOverflow,{children}),$[9]=children,$[10]=t22):t22=$[10],children=t22;}else{let t22;$[11]!==children?(t22=/* @__PURE__ */jsx("span",{children}),$[11]=children,$[12]=t22):t22=$[12],children=t22;}let t2;$[13]!==align?(t2=_getArrayProp(align),$[13]=align,$[14]=t2):t2=$[14];let t3;$[15]!==size2?(t3=_getArrayProp(size2),$[15]=size2,$[16]=t3):t3=$[16];let t4;return $[17]!==accent||$[18]!==children||$[19]!==muted||$[20]!==ref||$[21]!==restProps||$[22]!==t2||$[23]!==t3||$[24]!==weight?(t4=/* @__PURE__ */jsx(StyledLabel,_objectSpread(_objectSpread({"data-ui":"Label"},restProps),{},{$accent:accent,$align:t2,$muted:muted,$size:t3,$weight:weight,ref,children})),$[17]=accent,$[18]=children,$[19]=muted,$[20]=ref,$[21]=restProps,$[22]=t2,$[23]=t3,$[24]=weight,$[25]=t4):t4=$[25],t4;});Label.displayName="ForwardRef(Label)";const avatarStyle={root:avatarRootStyle,arrow:avatarArrowStyle,bgStroke:avatarBgStrokeStyle,stroke:avatarStrokeStyle,initials:avatarInitialsStyle,image:avatarImageStyle};function avatarArrowStyle(){return{position:"absolute",boxSizing:"border-box",zIndex:"0",opacity:"0",transition:"all 0.2s linear",transform:"rotate(-90deg) translate3d(0, 6px, 0)",left:0,right:0,top:0,bottom:0,"& > svg":{width:"11px",height:"7px",position:"absolute",top:"-5px",left:"50%",transform:"translateX(-6px)","&:not([hidden])":{display:"block"}},"[data-arrow-position='inside'] > &":{transform:"rotate(-90deg) translate3d(0, 6px, 0)",opacity:"0"},"[data-arrow-position='top'] > &":{opacity:"1",transform:"rotate(0deg)"},"[data-arrow-position='bottom'] > &":{opacity:"1",transform:"rotate(-180deg)"}};}function avatarRootStyle(props){const{$color}=props,{avatar}=getTheme_v2(props.theme);return{"--avatar-bg-color":"var(--card-avatar-".concat($color,"-bg-color)"),"--avatar-fg-color":"var(--card-avatar-".concat($color,"-fg-color)"),backgroundColor:"var(--avatar-bg-color)",position:"relative",boxSizing:"border-box",userSelect:"none",boxShadow:"0 0 0 1px var(--card-bg-color)",'&[data-status="inactive"]':{opacity:"0.5"},"&>svg":{"&:not([hidden])":{display:"block"}},/* &:is(button) */'&[data-as="button"]':{WebkitFontSmoothing:"inherit",appearance:"none",margin:0,padding:0,border:0,font:"inherit",color:"inherit",outline:"none","&:focus":{boxShadow:focusRingStyle({focusRing:avatar.focusRing})},"&:focus:not(:focus-visible)":{boxShadow:"none"}}};}function responsiveAvatarSizeStyle(props){const{avatar,media}=getTheme_v2(props.theme);return _responsive(media,props.$size,size2=>{const avatarSize=avatar.sizes[size2]||avatar.sizes[0];return{width:rem(avatarSize.size),height:rem(avatarSize.size),borderRadius:rem(avatarSize.size/2),"&>svg":{width:rem(avatarSize.size),height:rem(avatarSize.size),borderRadius:rem(avatarSize.size/2)}};});}function avatarImageStyle(){return{position:"relative"};}function avatarInitialsStyle(){return{width:"100%",height:"100%",color:"var(--avatar-fg-color)",alignItems:"center",justifyContent:"center",textTransform:"uppercase",textAlign:"center",borderRadius:"50%","&:not([hidden])":{display:"flex"}};}function avatarBgStrokeStyle(){return{strokeWidth:"4px",stroke:"var(--card-bg-color)"};}function avatarStrokeStyle(){return{strokeWidth:"2px",stroke:"var(--avatar-bg-color)",'[data-status="editing"] &':{strokeDasharray:"2 4",strokeLinecap:"round"}};}const StyledAvatar=/* @__PURE__ */styled.div.withConfig({displayName:"StyledAvatar",componentId:"sc-1rj7kl0-0"})(responsiveAvatarSizeStyle,avatarStyle.root),Arrow$1=/* @__PURE__ */styled.div.withConfig({displayName:"Arrow",componentId:"sc-1rj7kl0-1"})(avatarStyle.arrow),BgStroke=/* @__PURE__ */styled.ellipse.withConfig({displayName:"BgStroke",componentId:"sc-1rj7kl0-2"})(avatarStyle.bgStroke),Stroke=/* @__PURE__ */styled.ellipse.withConfig({displayName:"Stroke",componentId:"sc-1rj7kl0-3"})(avatarStyle.stroke),Initials=/* @__PURE__ */styled.div.withConfig({displayName:"Initials",componentId:"sc-1rj7kl0-4"})(avatarStyle.initials),InitialsLabel=/* @__PURE__ */styled(Label).withConfig({displayName:"InitialsLabel",componentId:"sc-1rj7kl0-5"})({color:"inherit"}),AvatarImage=/* @__PURE__ */styled.svg.withConfig({displayName:"AvatarImage",componentId:"sc-1rj7kl0-6"})(avatarStyle.image),Avatar=forwardRef(function(props,ref){var _props3;const $=dist.c(46);let __unstable_hideInnerStroke,animateArrowFrom,arrowPositionProp,asProp,initials,onImageLoadError,restProps,src,t0,t1,t2,title;$[0]!==props?(_props3=props,{__unstable_hideInnerStroke,as:asProp,color:t0,src,title,initials,onImageLoadError,arrowPosition:arrowPositionProp,animateArrowFrom,status:t1,size:t2}=_props3,restProps=_objectWithoutProperties(_props3,_excluded17),_props3,$[0]=props,$[1]=__unstable_hideInnerStroke,$[2]=animateArrowFrom,$[3]=arrowPositionProp,$[4]=asProp,$[5]=initials,$[6]=onImageLoadError,$[7]=restProps,$[8]=src,$[9]=t0,$[10]=t1,$[11]=t2,$[12]=title):(__unstable_hideInnerStroke=$[1],animateArrowFrom=$[2],arrowPositionProp=$[3],asProp=$[4],initials=$[5],onImageLoadError=$[6],restProps=$[7],src=$[8],t0=$[9],t1=$[10],t2=$[11],title=$[12]);const color=t0===void 0?"gray":t0,status=t1===void 0?"online":t1,sizeProp=t2===void 0?1:t2,{avatar}=useTheme_v2(),as=ReactIs.isValidElementType(asProp)?asProp:"div",size2=_getArrayProp(sizeProp),_sizeRem=(avatar.sizes[size2[0]]||avatar.sizes[0]).size,_radius=_sizeRem/2,elementId=useId(),[arrowPosition,setArrowPosition]=useState(animateArrowFrom||arrowPositionProp||"inside"),[imageFailed,setImageFailed]=useState(!1),imageId="avatar-image-".concat(elementId);let t3,t4;$[13]!==arrowPosition||$[14]!==arrowPositionProp?(t3=()=>{if(arrowPosition===arrowPositionProp)return;const raf=requestAnimationFrame(()=>setArrowPosition(arrowPositionProp));return()=>cancelAnimationFrame(raf);},t4=[arrowPosition,arrowPositionProp],$[13]=arrowPosition,$[14]=arrowPositionProp,$[15]=t3,$[16]=t4):(t3=$[15],t4=$[16]),useEffect$1(t3,t4);let t5,t6;$[17]!==src?(t5=()=>{src&&setImageFailed(!1);},t6=[src],$[17]=src,$[18]=t5,$[19]=t6):(t5=$[18],t6=$[19]),useEffect$1(t5,t6);let t7;$[20]!==onImageLoadError?(t7=()=>{setImageFailed(!0),onImageLoadError&&onImageLoadError(new Error("Avatar: the image failed to load"));},$[20]=onImageLoadError,$[21]=t7):t7=$[21];const handleImageError=t7,T0=StyledAvatar,t8=typeof as=="string"?as:void 0,t9="Avatar";let t10;$[22]!==color?(t10=/* @__PURE__ */jsx(Arrow$1,{children:/* @__PURE__ */jsx("svg",{width:"11",height:"7",viewBox:"0 0 11 7",fill:"none",children:/* @__PURE__ */jsx("path",{d:"M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z",fill:color})})}),$[22]=color,$[23]=t10):t10=$[23];let t11;$[24]!==__unstable_hideInnerStroke||$[25]!==_radius||$[26]!==_sizeRem||$[27]!==handleImageError||$[28]!==imageFailed||$[29]!==imageId||$[30]!==src?(t11=!imageFailed&&src&&/* @__PURE__ */jsxs(AvatarImage,{viewBox:"0 0 ".concat(_sizeRem," ").concat(_sizeRem),fill:"none",children:[/* @__PURE__ */jsx("defs",{children:/* @__PURE__ */jsx("pattern",{id:imageId,patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:/* @__PURE__ */jsx("image",{href:src,width:"1",height:"1",onError:handleImageError})})}),/* @__PURE__ */jsx("circle",{cx:_radius,cy:_radius,r:_radius,fill:"url(#".concat(imageId,")")}),!__unstable_hideInnerStroke&&/* @__PURE__ */jsx(BgStroke,{cx:_radius,cy:_radius,rx:_radius,ry:_radius,vectorEffect:"non-scaling-stroke"}),/* @__PURE__ */jsx(Stroke,{cx:_radius,cy:_radius,rx:_radius,ry:_radius,vectorEffect:"non-scaling-stroke"})]}),$[24]=__unstable_hideInnerStroke,$[25]=_radius,$[26]=_sizeRem,$[27]=handleImageError,$[28]=imageFailed,$[29]=imageId,$[30]=src,$[31]=t11):t11=$[31];const t12=(imageFailed||!src)&&initials&&/* @__PURE__ */jsx(Fragment,{children:/* @__PURE__ */jsx(Initials,{children:/* @__PURE__ */jsx(InitialsLabel,{forwardedAs:"span",size:size2.map(_temp$a),weight:"medium",children:initials})})});let t13;return $[32]!==T0||$[33]!==arrowPosition||$[34]!==as||$[35]!==color||$[36]!==ref||$[37]!==restProps||$[38]!==size2||$[39]!==status||$[40]!==t10||$[41]!==t11||$[42]!==t12||$[43]!==t8||$[44]!==title?(t13=/* @__PURE__ */jsxs(T0,_objectSpread(_objectSpread({as,"data-as":t8,"data-ui":t9},restProps),{},{$color:color,$size:size2,"aria-label":title,"data-arrow-position":arrowPosition,"data-status":status,ref,title,children:[t10,t11,t12]})),$[32]=T0,$[33]=arrowPosition,$[34]=as,$[35]=color,$[36]=ref,$[37]=restProps,$[38]=size2,$[39]=status,$[40]=t10,$[41]=t11,$[42]=t12,$[43]=t8,$[44]=title,$[45]=t13):t13=$[45],t13;});Avatar.displayName="ForwardRef(Avatar)";function _temp$a(s){return s===1?1:s===2?3:s===3?5:0;}function _responsiveAvatarCounterSizeStyle(props){const{avatar,media}=getTheme_v2(props.theme);return _responsive(media,props.$size,size2=>{const avatarSize=avatar.sizes[size2];return avatarSize?{borderRadius:rem(avatarSize.size/2),minWidth:rem(avatarSize.size),height:rem(avatarSize.size)}:EMPTY_RECORD;});}function _avatarCounterBaseStyle(props){const{space}=getTheme_v2(props.theme);return css(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n inset 0 0 0 1px var(--card-hairline-hard-color);\n padding: 0 ",";\n\n &:not([hidden]) {\n display: flex;\n }\n "])),rem(space[2]));}const StyledAvatarCounter=/* @__PURE__ */styled.div.withConfig({displayName:"StyledAvatarCounter",componentId:"sc-1ydx86y-0"})(_responsiveAvatarCounterSizeStyle,_avatarCounterBaseStyle),AvatarCounter=forwardRef(function(props,ref){const $=dist.c(20),{count,size:t0}=props,sizeProp=t0===void 0?1:t0;let T0,T1,t1,t2,t3,t4,t5;if($[0]!==ref||$[1]!==sizeProp){const size2=_getArrayProp(sizeProp);T1=StyledAvatarCounter,t3=size2,t4="AvatarCounter",t5=ref,T0=Label,t1="span",t2=size2.map(_temp$9),$[0]=ref,$[1]=sizeProp,$[2]=T0,$[3]=T1,$[4]=t1,$[5]=t2,$[6]=t3,$[7]=t4,$[8]=t5;}else T0=$[2],T1=$[3],t1=$[4],t2=$[5],t3=$[6],t4=$[7],t5=$[8];let t6;$[9]!==T0||$[10]!==count||$[11]!==t1||$[12]!==t2?(t6=/* @__PURE__ */jsx(T0,{as:t1,size:t2,weight:"medium",children:count}),$[9]=T0,$[10]=count,$[11]=t1,$[12]=t2,$[13]=t6):t6=$[13];let t7;return $[14]!==T1||$[15]!==t3||$[16]!==t4||$[17]!==t5||$[18]!==t6?(t7=/* @__PURE__ */jsx(T1,{$size:t3,"data-ui":t4,ref:t5,children:t6}),$[14]=T1,$[15]=t3,$[16]=t4,$[17]=t5,$[18]=t6,$[19]=t7):t7=$[19],t7;});AvatarCounter.displayName="ForwardRef(AvatarCounter)";function _temp$9(s){return s===1?1:s===2?3:s===3?5:0;}const BASE_STYLES=css(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));function avatarStackStyle(){return BASE_STYLES;}function responsiveAvatarStackSizeStyle(props){const{avatar,media}=getTheme_v2(props.theme);return _responsive(media,props.$size,size2=>{const avatarSize=avatar.sizes[size2];return avatarSize?{"& > div + div":{marginLeft:rem(avatarSize.distance)}}:EMPTY_RECORD;});}const StyledAvatarStack=/* @__PURE__ */styled.div.withConfig({displayName:"StyledAvatarStack",componentId:"sc-cysmbb-0"})(responsiveAvatarStackSizeStyle,avatarStackStyle),AvatarStack=forwardRef(function(props,ref){var _props4;const $=dist.c(38);let childrenProp,restProps,t0,t1;$[0]!==props?(_props4=props,{children:childrenProp,maxLength:t0,size:t1}=_props4,restProps=_objectWithoutProperties(_props4,_excluded18),_props4,$[0]=props,$[1]=childrenProp,$[2]=restProps,$[3]=t0,$[4]=t1):(childrenProp=$[1],restProps=$[2],t0=$[3],t1=$[4]);const maxLengthProp=t0===void 0?4:t0,sizeProp=t1===void 0?1:t1;let T0,t2,t3,t4,t5,t6,t7,t8;if($[5]!==childrenProp||$[6]!==maxLengthProp||$[7]!==ref||$[8]!==restProps||$[9]!==sizeProp){const children=Children.toArray(childrenProp).filter(isValidElement$1),maxLength=Math.max(maxLengthProp,0);let t92;$[18]!==sizeProp?(t92=_getArrayProp(sizeProp),$[18]=sizeProp,$[19]=t92):t92=$[19];const size2=t92,len=children.length,visibleCount=maxLength-1,extraCount=len-visibleCount,visibleChildren=extraCount>1?children.slice(extraCount,len):children;T0=StyledAvatarStack,t2="AvatarStack",t3=restProps,t4=ref,t5=size2,$[20]!==len||$[21]!==size2?(t6=len===0&&/* @__PURE__ */jsx("div",{children:/* @__PURE__ */jsx(AvatarCounter,{count:len,size:size2})}),$[20]=len,$[21]=size2,$[22]=t6):t6=$[22],$[23]!==extraCount||$[24]!==len||$[25]!==size2?(t7=len!==0&&extraCount>1&&/* @__PURE__ */jsx("div",{children:/* @__PURE__ */jsx(AvatarCounter,{count:extraCount,size:size2})}),$[23]=extraCount,$[24]=len,$[25]=size2,$[26]=t7):t7=$[26];let t10;$[27]!==size2?(t10=(child,childIndex)=>/* @__PURE__ */jsx("div",{children:cloneElement(child,{size:size2})},String(childIndex)),$[27]=size2,$[28]=t10):t10=$[28],t8=visibleChildren.map(t10),$[5]=childrenProp,$[6]=maxLengthProp,$[7]=ref,$[8]=restProps,$[9]=sizeProp,$[10]=T0,$[11]=t2,$[12]=t3,$[13]=t4,$[14]=t5,$[15]=t6,$[16]=t7,$[17]=t8;}else T0=$[10],t2=$[11],t3=$[12],t4=$[13],t5=$[14],t6=$[15],t7=$[16],t8=$[17];let t9;return $[29]!==T0||$[30]!==t2||$[31]!==t3||$[32]!==t4||$[33]!==t5||$[34]!==t6||$[35]!==t7||$[36]!==t8?(t9=/* @__PURE__ */jsxs(T0,_objectSpread(_objectSpread({"data-ui":t2},t3),{},{ref:t4,$size:t5,children:[t6,t7,t8]})),$[29]=T0,$[30]=t2,$[31]=t3,$[32]=t4,$[33]=t5,$[34]=t6,$[35]=t7,$[36]=t8,$[37]=t9):t9=$[37],t9;});AvatarStack.displayName="ForwardRef(AvatarStack)";const StyledBox=/* @__PURE__ */styled.div.withConfig({displayName:"StyledBox",componentId:"sc-1hhky9f-0"})(boxStyle,flexItemStyle,responsiveBoxStyle,responsiveGridItemStyle,responsiveMarginStyle,responsivePaddingStyle),Box=forwardRef(function(props,ref){var _props5;const $=dist.c(109);let column,columnEnd,columnStart,flex,height,marginBottom,marginLeft,marginRight,marginTop,marginX,marginY,overflow,paddingBottom,paddingLeft,paddingRight,paddingTop,paddingX,paddingY,restProps,row,rowEnd,rowStart,sizing,t0,t1,t2,t3;$[0]!==props?(_props5=props,{as:t0,column,columnStart,columnEnd,display:t1,flex,height,margin:t2,marginX,marginY,marginTop,marginRight,marginBottom,marginLeft,overflow,padding:t3,paddingX,paddingY,paddingTop,paddingRight,paddingBottom,paddingLeft,row,rowStart,rowEnd,sizing}=_props5,restProps=_objectWithoutProperties(_props5,_excluded19),_props5,$[0]=props,$[1]=column,$[2]=columnEnd,$[3]=columnStart,$[4]=flex,$[5]=height,$[6]=marginBottom,$[7]=marginLeft,$[8]=marginRight,$[9]=marginTop,$[10]=marginX,$[11]=marginY,$[12]=overflow,$[13]=paddingBottom,$[14]=paddingLeft,$[15]=paddingRight,$[16]=paddingTop,$[17]=paddingX,$[18]=paddingY,$[19]=restProps,$[20]=row,$[21]=rowEnd,$[22]=rowStart,$[23]=sizing,$[24]=t0,$[25]=t1,$[26]=t2,$[27]=t3):(column=$[1],columnEnd=$[2],columnStart=$[3],flex=$[4],height=$[5],marginBottom=$[6],marginLeft=$[7],marginRight=$[8],marginTop=$[9],marginX=$[10],marginY=$[11],overflow=$[12],paddingBottom=$[13],paddingLeft=$[14],paddingRight=$[15],paddingTop=$[16],paddingX=$[17],paddingY=$[18],restProps=$[19],row=$[20],rowEnd=$[21],rowStart=$[22],sizing=$[23],t0=$[24],t1=$[25],t2=$[26],t3=$[27]);const asProp=t0===void 0?"div":t0,display=t1===void 0?"block":t1,margin=t2===void 0?0:t2,padding=t3===void 0?0:t3,t4=typeof asProp=="string"?asProp:void 0;let t5;$[28]!==column?(t5=_getArrayProp(column),$[28]=column,$[29]=t5):t5=$[29];let t6;$[30]!==columnStart?(t6=_getArrayProp(columnStart),$[30]=columnStart,$[31]=t6):t6=$[31];let t7;$[32]!==columnEnd?(t7=_getArrayProp(columnEnd),$[32]=columnEnd,$[33]=t7):t7=$[33];let t8;$[34]!==display?(t8=_getArrayProp(display),$[34]=display,$[35]=t8):t8=$[35];let t9;$[36]!==flex?(t9=_getArrayProp(flex),$[36]=flex,$[37]=t9):t9=$[37];let t10;$[38]!==height?(t10=_getArrayProp(height),$[38]=height,$[39]=t10):t10=$[39];let t11;$[40]!==margin?(t11=_getArrayProp(margin),$[40]=margin,$[41]=t11):t11=$[41];let t12;$[42]!==marginX?(t12=_getArrayProp(marginX),$[42]=marginX,$[43]=t12):t12=$[43];let t13;$[44]!==marginY?(t13=_getArrayProp(marginY),$[44]=marginY,$[45]=t13):t13=$[45];let t14;$[46]!==marginTop?(t14=_getArrayProp(marginTop),$[46]=marginTop,$[47]=t14):t14=$[47];let t15;$[48]!==marginRight?(t15=_getArrayProp(marginRight),$[48]=marginRight,$[49]=t15):t15=$[49];let t16;$[50]!==marginBottom?(t16=_getArrayProp(marginBottom),$[50]=marginBottom,$[51]=t16):t16=$[51];let t17;$[52]!==marginLeft?(t17=_getArrayProp(marginLeft),$[52]=marginLeft,$[53]=t17):t17=$[53];let t18;$[54]!==overflow?(t18=_getArrayProp(overflow),$[54]=overflow,$[55]=t18):t18=$[55];let t19;$[56]!==padding?(t19=_getArrayProp(padding),$[56]=padding,$[57]=t19):t19=$[57];let t20;$[58]!==paddingX?(t20=_getArrayProp(paddingX),$[58]=paddingX,$[59]=t20):t20=$[59];let t21;$[60]!==paddingY?(t21=_getArrayProp(paddingY),$[60]=paddingY,$[61]=t21):t21=$[61];let t22;$[62]!==paddingTop?(t22=_getArrayProp(paddingTop),$[62]=paddingTop,$[63]=t22):t22=$[63];let t23;$[64]!==paddingRight?(t23=_getArrayProp(paddingRight),$[64]=paddingRight,$[65]=t23):t23=$[65];let t24;$[66]!==paddingBottom?(t24=_getArrayProp(paddingBottom),$[66]=paddingBottom,$[67]=t24):t24=$[67];let t25;$[68]!==paddingLeft?(t25=_getArrayProp(paddingLeft),$[68]=paddingLeft,$[69]=t25):t25=$[69];let t26;$[70]!==row?(t26=_getArrayProp(row),$[70]=row,$[71]=t26):t26=$[71];let t27;$[72]!==rowStart?(t27=_getArrayProp(rowStart),$[72]=rowStart,$[73]=t27):t27=$[73];let t28;$[74]!==rowEnd?(t28=_getArrayProp(rowEnd),$[74]=rowEnd,$[75]=t28):t28=$[75];let t29;$[76]!==sizing?(t29=_getArrayProp(sizing),$[76]=sizing,$[77]=t29):t29=$[77];let t30;return $[78]!==asProp||$[79]!==props.children||$[80]!==ref||$[81]!==restProps||$[82]!==t10||$[83]!==t11||$[84]!==t12||$[85]!==t13||$[86]!==t14||$[87]!==t15||$[88]!==t16||$[89]!==t17||$[90]!==t18||$[91]!==t19||$[92]!==t20||$[93]!==t21||$[94]!==t22||$[95]!==t23||$[96]!==t24||$[97]!==t25||$[98]!==t26||$[99]!==t27||$[100]!==t28||$[101]!==t29||$[102]!==t4||$[103]!==t5||$[104]!==t6||$[105]!==t7||$[106]!==t8||$[107]!==t9?(t30=/* @__PURE__ */jsx(StyledBox,_objectSpread(_objectSpread({"data-as":t4,"data-ui":"Box"},restProps),{},{$column:t5,$columnStart:t6,$columnEnd:t7,$display:t8,$flex:t9,$height:t10,$margin:t11,$marginX:t12,$marginY:t13,$marginTop:t14,$marginRight:t15,$marginBottom:t16,$marginLeft:t17,$overflow:t18,$padding:t19,$paddingX:t20,$paddingY:t21,$paddingTop:t22,$paddingRight:t23,$paddingBottom:t24,$paddingLeft:t25,$row:t26,$rowStart:t27,$rowEnd:t28,$sizing:t29,as:asProp,ref,children:props.children})),$[78]=asProp,$[79]=props.children,$[80]=ref,$[81]=restProps,$[82]=t10,$[83]=t11,$[84]=t12,$[85]=t13,$[86]=t14,$[87]=t15,$[88]=t16,$[89]=t17,$[90]=t18,$[91]=t19,$[92]=t20,$[93]=t21,$[94]=t22,$[95]=t23,$[96]=t24,$[97]=t25,$[98]=t26,$[99]=t27,$[100]=t28,$[101]=t29,$[102]=t4,$[103]=t5,$[104]=t6,$[105]=t7,$[106]=t8,$[107]=t9,$[108]=t30):t30=$[108],t30;});Box.displayName="ForwardRef(Box)";function textBaseStyle(props){const{$accent,$muted}=props,{font}=getTheme_v2(props.theme);return css(_templateObject0||(_templateObject0=_taggedTemplateLiteral(["\n color: var(--card-fg-color);\n\n ","\n\n ","\n\n & code {\n font-family: ",";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ",";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n\n & path {\n vector-effect: non-scaling-stroke !important;\n }\n }\n "])),$accent&&css(_templateObject1||(_templateObject1=_taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))),$muted&&css(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))),font.code.family,font.text.weights.bold);}const StyledText=/* @__PURE__ */styled.div.withConfig({displayName:"StyledText",componentId:"sc-11ov82j-0"})(responsiveTextFont,responsiveTextAlignStyle,textBaseStyle),Text=forwardRef(function(props,ref){var _props6;const $=dist.c(26);let align,childrenProp,restProps,t0,t1,t2,textOverflow,weight;$[0]!==props?(_props6=props,{accent:t0,align,children:childrenProp,muted:t1,size:t2,textOverflow,weight}=_props6,restProps=_objectWithoutProperties(_props6,_excluded20),_props6,$[0]=props,$[1]=align,$[2]=childrenProp,$[3]=restProps,$[4]=t0,$[5]=t1,$[6]=t2,$[7]=textOverflow,$[8]=weight):(align=$[1],childrenProp=$[2],restProps=$[3],t0=$[4],t1=$[5],t2=$[6],textOverflow=$[7],weight=$[8]);const accent=t0===void 0?!1:t0,muted=t1===void 0?!1:t1,size2=t2===void 0?2:t2;let children=childrenProp;if(textOverflow==="ellipsis"){let t32;$[9]!==children?(t32=/* @__PURE__ */jsx(SpanWithTextOverflow,{children}),$[9]=children,$[10]=t32):t32=$[10],children=t32;}let t3;$[11]!==align?(t3=_getArrayProp(align),$[11]=align,$[12]=t3):t3=$[12];let t4;$[13]!==size2?(t4=_getArrayProp(size2),$[13]=size2,$[14]=t4):t4=$[14];let t5;$[15]!==children?(t5=/* @__PURE__ */jsx("span",{children}),$[15]=children,$[16]=t5):t5=$[16];let t6;return $[17]!==accent||$[18]!==muted||$[19]!==ref||$[20]!==restProps||$[21]!==t3||$[22]!==t4||$[23]!==t5||$[24]!==weight?(t6=/* @__PURE__ */jsx(StyledText,_objectSpread(_objectSpread({"data-ui":"Text"},restProps),{},{$accent:accent,$align:t3,$muted:muted,ref,$size:t4,$weight:weight,children:t5})),$[17]=accent,$[18]=muted,$[19]=ref,$[20]=restProps,$[21]=t3,$[22]=t4,$[23]=t5,$[24]=weight,$[25]=t6):t6=$[25],t6;});Text.displayName="ForwardRef(Text)";function badgeStyle(props){const{$tone}=props;return{"--card-bg-color":"var(--card-badge-".concat($tone,"-bg-color)"),"--card-fg-color":"var(--card-badge-".concat($tone,"-fg-color)"),backgroundColor:"var(--card-bg-color)",cursor:"default","&:not([hidden])":{display:"inline-block",verticalAlign:"top"}};}const StyledBadge=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledBadge",componentId:"sc-5u140l-0"})(responsiveRadiusStyle,badgeStyle),Badge=forwardRef(function(props,ref){const $=dist.c(21);let children,restProps,t0,t1,t2,t3;if($[0]!==props){const{children:t42,fontSize:t52,mode:_deprecated_mode,padding:t62,radius:t72,tone:t8}=props,t9=_objectWithoutProperties(props,_excluded21);children=t42,t0=t52,t1=t62,t2=t72,t3=t8,restProps=t9,$[0]=props,$[1]=children,$[2]=restProps,$[3]=t0,$[4]=t1,$[5]=t2,$[6]=t3;}else children=$[1],restProps=$[2],t0=$[3],t1=$[4],t2=$[5],t3=$[6];const fontSize2=t0===void 0?1:t0,padding=t1===void 0?1:t1,radius=t2===void 0?"full":t2,tone=t3===void 0?"default":t3;let t4;$[7]!==radius?(t4=_getArrayProp(radius),$[7]=radius,$[8]=t4):t4=$[8];let t5;$[9]!==padding?(t5=_getArrayProp(padding),$[9]=padding,$[10]=t5):t5=$[10];let t6;$[11]!==children||$[12]!==fontSize2?(t6=/* @__PURE__ */jsx(Text,{size:fontSize2,children}),$[11]=children,$[12]=fontSize2,$[13]=t6):t6=$[13];let t7;return $[14]!==ref||$[15]!==restProps||$[16]!==t4||$[17]!==t5||$[18]!==t6||$[19]!==tone?(t7=/* @__PURE__ */jsx(StyledBadge,_objectSpread(_objectSpread({"data-ui":"Badge"},restProps),{},{$tone:tone,$radius:t4,padding:t5,ref,children:t6})),$[14]=ref,$[15]=restProps,$[16]=t4,$[17]=t5,$[18]=t6,$[19]=tone,$[20]=t7):t7=$[20],t7;});Badge.displayName="ForwardRef(Badge)";const StyledFlex=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledFlex",componentId:"sc-oxesg3-0"})(flexItemStyle,responsiveFlexStyle),Flex=forwardRef(function(props,ref){var _props7;const $=dist.c(27);let align,as,gap,justify,restProps,t0,wrap;$[0]!==props?(_props7=props,{align,as,direction:t0,gap,justify,wrap}=_props7,restProps=_objectWithoutProperties(_props7,_excluded22),_props7,$[0]=props,$[1]=align,$[2]=as,$[3]=gap,$[4]=justify,$[5]=restProps,$[6]=t0,$[7]=wrap):(align=$[1],as=$[2],gap=$[3],justify=$[4],restProps=$[5],t0=$[6],wrap=$[7]);const direction=t0===void 0?"row":t0;let t1;$[8]!==align?(t1=_getArrayProp(align),$[8]=align,$[9]=t1):t1=$[9];let t2;$[10]!==direction?(t2=_getArrayProp(direction),$[10]=direction,$[11]=t2):t2=$[11];let t3;$[12]!==gap?(t3=_getArrayProp(gap),$[12]=gap,$[13]=t3):t3=$[13];let t4;$[14]!==justify?(t4=_getArrayProp(justify),$[14]=justify,$[15]=t4):t4=$[15];let t5;$[16]!==wrap?(t5=_getArrayProp(wrap),$[16]=wrap,$[17]=t5):t5=$[17];let t6;return $[18]!==as||$[19]!==ref||$[20]!==restProps||$[21]!==t1||$[22]!==t2||$[23]!==t3||$[24]!==t4||$[25]!==t5?(t6=/* @__PURE__ */jsx(StyledFlex,_objectSpread(_objectSpread({"data-ui":"Flex"},restProps),{},{$align:t1,$direction:t2,$gap:t3,$justify:t4,$wrap:t5,forwardedAs:as,ref})),$[18]=as,$[19]=ref,$[20]=restProps,$[21]=t1,$[22]=t2,$[23]=t3,$[24]=t4,$[25]=t5,$[26]=t6):t6=$[26],t6;});Flex.displayName="ForwardRef(Flex)";const rotate$1=keyframes$1(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"]))),StyledSpinner=styled(Text).withConfig({displayName:"StyledSpinner",componentId:"sc-124hnd0-0"})(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["& > span > svg{animation:"," 500ms linear infinite;}"])),rotate$1),Spinner=forwardRef(function(props,ref){const $=dist.c(4);let t0;$[0]===Symbol.for("react.memo_cache_sentinel")?(t0=/* @__PURE__ */jsx(SpinnerIcon,{}),$[0]=t0):t0=$[0];let t1;return $[1]!==props||$[2]!==ref?(t1=/* @__PURE__ */jsx(StyledSpinner,_objectSpread(_objectSpread({"data-ui":"Spinner"},props),{},{ref,children:t0})),$[1]=props,$[2]=ref,$[3]=t1):t1=$[3],t1;});Spinner.displayName="ForwardRef(Spinner)";function _cardColorStyle(base,color){var _color$badge$neutral,_color$badge$neutral2,_color$badge$neutral3,_color$badge$neutral4,_color$badge$suggest,_color$badge$suggest2,_color$badge$suggest3,_color$badge$suggest4;let checkered=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;return{// from base
|
|
2348
2348
|
"--card-backdrop-color":base.backdrop,"--card-focus-ring-color":base.focusRing,"--card-shadow-outline-color":base.shadow.outline,"--card-shadow-umbra-color":base.shadow.umbra,"--card-shadow-penumbra-color":base.shadow.penumbra,"--card-shadow-ambient-color":base.shadow.ambient,// from state
|
|
2349
2349
|
"--card-accent-fg-color":color.accent.fg,"--card-avatar-gray-bg-color":color.avatar.gray.bg,"--card-avatar-gray-fg-color":color.avatar.gray.fg,"--card-avatar-blue-bg-color":color.avatar.blue.bg,"--card-avatar-blue-fg-color":color.avatar.blue.fg,"--card-avatar-purple-bg-color":color.avatar.purple.bg,"--card-avatar-purple-fg-color":color.avatar.purple.fg,"--card-avatar-magenta-bg-color":color.avatar.magenta.bg,"--card-avatar-magenta-fg-color":color.avatar.magenta.fg,"--card-avatar-red-bg-color":color.avatar.red.bg,"--card-avatar-red-fg-color":color.avatar.red.fg,"--card-avatar-orange-bg-color":color.avatar.orange.bg,"--card-avatar-orange-fg-color":color.avatar.orange.fg,"--card-avatar-yellow-bg-color":color.avatar.yellow.bg,"--card-avatar-yellow-fg-color":color.avatar.yellow.fg,"--card-avatar-green-bg-color":color.avatar.green.bg,"--card-avatar-green-fg-color":color.avatar.green.fg,"--card-avatar-cyan-bg-color":color.avatar.cyan.bg,"--card-avatar-cyan-fg-color":color.avatar.cyan.fg,"--card-bg-color":color.bg,"--card-bg-image":checkered?"repeating-conic-gradient(".concat(color.bg," 0% 25%, ").concat(color.muted.bg," 0% 50%)"):void 0,"--card-border-color":color.border,"--card-badge-default-bg-color":color.badge.default.bg,"--card-badge-default-dot-color":color.badge.default.dot,"--card-badge-default-fg-color":color.badge.default.fg,"--card-badge-default-icon-color":color.badge.default.icon,"--card-badge-neutral-bg-color":(_color$badge$neutral=color.badge.neutral)===null||_color$badge$neutral===void 0?void 0:_color$badge$neutral.bg,"--card-badge-neutral-dot-color":(_color$badge$neutral2=color.badge.neutral)===null||_color$badge$neutral2===void 0?void 0:_color$badge$neutral2.dot,"--card-badge-neutral-fg-color":(_color$badge$neutral3=color.badge.neutral)===null||_color$badge$neutral3===void 0?void 0:_color$badge$neutral3.fg,"--card-badge-neutral-icon-color":(_color$badge$neutral4=color.badge.neutral)===null||_color$badge$neutral4===void 0?void 0:_color$badge$neutral4.icon,"--card-badge-primary-bg-color":color.badge.primary.bg,"--card-badge-primary-dot-color":color.badge.primary.dot,"--card-badge-primary-fg-color":color.badge.primary.fg,"--card-badge-primary-icon-color":color.badge.primary.icon,"--card-badge-suggest-bg-color":(_color$badge$suggest=color.badge.suggest)===null||_color$badge$suggest===void 0?void 0:_color$badge$suggest.bg,"--card-badge-suggest-dot-color":(_color$badge$suggest2=color.badge.suggest)===null||_color$badge$suggest2===void 0?void 0:_color$badge$suggest2.dot,"--card-badge-suggest-fg-color":(_color$badge$suggest3=color.badge.suggest)===null||_color$badge$suggest3===void 0?void 0:_color$badge$suggest3.fg,"--card-badge-suggest-icon-color":(_color$badge$suggest4=color.badge.suggest)===null||_color$badge$suggest4===void 0?void 0:_color$badge$suggest4.icon,"--card-badge-positive-bg-color":color.badge.positive.bg,"--card-badge-positive-dot-color":color.badge.positive.dot,"--card-badge-positive-fg-color":color.badge.positive.fg,"--card-badge-positive-icon-color":color.badge.positive.icon,"--card-badge-caution-bg-color":color.badge.caution.bg,"--card-badge-caution-dot-color":color.badge.caution.dot,"--card-badge-caution-fg-color":color.badge.caution.fg,"--card-badge-caution-icon-color":color.badge.caution.icon,"--card-badge-critical-bg-color":color.badge.critical.bg,"--card-badge-critical-dot-color":color.badge.critical.dot,"--card-badge-critical-fg-color":color.badge.critical.fg,"--card-badge-critical-icon-color":color.badge.critical.icon,"--card-code-bg-color":color.code.bg,"--card-code-fg-color":color.code.fg,"--card-fg-color":color.fg,"--card-icon-color":color.icon,"--card-kbd-bg-color":color.kbd.bg,"--card-kbd-border-color":color.kbd.border,"--card-kbd-fg-color":color.kbd.fg,"--card-link-fg-color":color.link.fg,"--card-muted-bg-color":color.muted.bg,"--card-muted-fg-color":color.muted.fg,"--card-skeleton-color-from":color.skeleton.from,"--card-skeleton-color-to":color.skeleton.to,// deprecated variables (kept for legacy)
|
|
2350
|
-
"--card-bg2-color":color.muted.bg,"--card-link-color":color.link.fg,"--card-hairline-soft-color":color.border,"--card-hairline-hard-color":color.border};}function buttonBaseStyles(props){const{$width}=props,{style}=getTheme_v2(props.theme);return css(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n ",";\n\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n vertical-align: top;\n\n ","\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])),style===null||style===void 0?void 0:style.button,$width==="fill"&&css(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n "]))));}function combineBoxShadow(){for(var _len7=arguments.length,boxShadows=new Array(_len7),_key7=0;_key7<_len7;_key7++){boxShadows[_key7]=arguments[_key7];}return boxShadows.filter(Boolean).join(",");}function buttonColorStyles(props){var _style$button;const{$mode}=props,{button,color:baseColor,style}=getTheme_v2(props.theme),shadow=props.$mode==="ghost",mode=baseColor.button[$mode]||baseColor.button.default,color=mode[props.$tone]||mode.default,border2={width:button.border.width,color:"var(--card-border-color)"},defaultBoxShadow=void 0;return[_cardColorStyle(baseColor,color.enabled),{backgroundColor:"var(--card-bg-color)",color:"var(--card-fg-color)",boxShadow:focusRingBorderStyle(border2),'&:disabled, &[data-disabled="true"]':_cardColorStyle(baseColor,color.disabled),"&:not([data-disabled='true'])":{boxShadow:combineBoxShadow(focusRingBorderStyle(border2),shadow?defaultBoxShadow:void 0),"&:focus":{boxShadow:focusRingStyle({base:baseColor,border:{width:2,color:baseColor.bg},focusRing:button.focusRing})},"&:focus:not(:focus-visible)":{boxShadow:combineBoxShadow(focusRingBorderStyle(border2),shadow?defaultBoxShadow:void 0)},"@media (hover: hover)":{"&:hover":_cardColorStyle(baseColor,color.hovered),"&:active":_cardColorStyle(baseColor,color.pressed),"&[data-hovered]":_cardColorStyle(baseColor,color.hovered)},"&[data-selected]":_cardColorStyle(baseColor,color.pressed)}},style===null||style===void 0||(_style$button=style.button)===null||_style$button===void 0?void 0:_style$button.root].filter(Boolean);}const StyledButton=/* @__PURE__ */styled.button.withConfig({displayName:"StyledButton",componentId:"sc-aaekt4-0"})(responsiveRadiusStyle,buttonBaseStyles,buttonColorStyles),LoadingBox=styled.div.withConfig({displayName:"LoadingBox",componentId:"sc-aaekt4-1"})(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;"]))),Button=forwardRef(function(props,ref){var _props8;const $=dist.c(86);let IconComponent,IconRightComponent,children,disabled,loading,paddingBottomProp,paddingLeftProp,paddingRightProp,paddingTopProp,paddingXProp,paddingYProp,restProps,selected,t0,t1,t2,t3,t4,t5,t6,t7,t8,text,textAlign,textWeight,width;$[0]!==props?(_props8=props,{children,disabled,fontSize:t0,icon:IconComponent,iconRight:IconRightComponent,justify:t1,loading,mode:t2,padding:t3,paddingX:paddingXProp,paddingY:paddingYProp,paddingTop:paddingTopProp,paddingBottom:paddingBottomProp,paddingLeft:paddingLeftProp,paddingRight:paddingRightProp,radius:t4,selected,space:t5,text,textAlign,textWeight,tone:t6,type:t7,muted:t8,width}=_props8,restProps=_objectWithoutProperties(_props8,_excluded23),_props8,$[0]=props,$[1]=IconComponent,$[2]=IconRightComponent,$[3]=children,$[4]=disabled,$[5]=loading,$[6]=paddingBottomProp,$[7]=paddingLeftProp,$[8]=paddingRightProp,$[9]=paddingTopProp,$[10]=paddingXProp,$[11]=paddingYProp,$[12]=restProps,$[13]=selected,$[14]=t0,$[15]=t1,$[16]=t2,$[17]=t3,$[18]=t4,$[19]=t5,$[20]=t6,$[21]=t7,$[22]=t8,$[23]=text,$[24]=textAlign,$[25]=textWeight,$[26]=width):(IconComponent=$[1],IconRightComponent=$[2],children=$[3],disabled=$[4],loading=$[5],paddingBottomProp=$[6],paddingLeftProp=$[7],paddingRightProp=$[8],paddingTopProp=$[9],paddingXProp=$[10],paddingYProp=$[11],restProps=$[12],selected=$[13],t0=$[14],t1=$[15],t2=$[16],t3=$[17],t4=$[18],t5=$[19],t6=$[20],t7=$[21],t8=$[22],text=$[23],textAlign=$[24],textWeight=$[25],width=$[26]);const fontSize2=t0===void 0?1:t0,justifyProp=t1===void 0?"center":t1,mode=t2===void 0?"default":t2,paddingProp=t3===void 0?3:t3,radiusProp=t4===void 0?2:t4,spaceProp=t5===void 0?3:t5,tone=t6===void 0?"default":t6,type=t7===void 0?"button":t7,muted=t8===void 0?!1:t8,{button}=useTheme_v2();let t9;$[27]!==justifyProp?(t9=_getArrayProp(justifyProp),$[27]=justifyProp,$[28]=t9):t9=$[28];const justify=t9;let t10;$[29]!==paddingProp?(t10=_getArrayProp(paddingProp),$[29]=paddingProp,$[30]=t10):t10=$[30];const padding=t10;let t11;$[31]!==paddingXProp?(t11=_getArrayProp(paddingXProp),$[31]=paddingXProp,$[32]=t11):t11=$[32];const paddingX=t11;let t12;$[33]!==paddingYProp?(t12=_getArrayProp(paddingYProp),$[33]=paddingYProp,$[34]=t12):t12=$[34];const paddingY=t12;let t13;$[35]!==paddingTopProp?(t13=_getArrayProp(paddingTopProp),$[35]=paddingTopProp,$[36]=t13):t13=$[36];const paddingTop=t13;let t14;$[37]!==paddingBottomProp?(t14=_getArrayProp(paddingBottomProp),$[37]=paddingBottomProp,$[38]=t14):t14=$[38];const paddingBottom=t14;let t15;$[39]!==paddingLeftProp?(t15=_getArrayProp(paddingLeftProp),$[39]=paddingLeftProp,$[40]=t15):t15=$[40];const paddingLeft=t15;let t16;$[41]!==paddingRightProp?(t16=_getArrayProp(paddingRightProp),$[41]=paddingRightProp,$[42]=t16):t16=$[42];const paddingRight=t16;let t17;$[43]!==radiusProp?(t17=_getArrayProp(radiusProp),$[43]=radiusProp,$[44]=t17):t17=$[44];const radius=t17;let t18;$[45]!==spaceProp?(t18=_getArrayProp(spaceProp),$[45]=spaceProp,$[46]=t18):t18=$[46];const space=t18;let t19;$[47]!==padding||$[48]!==paddingBottom||$[49]!==paddingLeft||$[50]!==paddingRight||$[51]!==paddingTop||$[52]!==paddingX||$[53]!==paddingY?(t19={padding,paddingX,paddingY,paddingTop,paddingBottom,paddingLeft,paddingRight},$[47]=padding,$[48]=paddingBottom,$[49]=paddingLeft,$[50]=paddingRight,$[51]=paddingTop,$[52]=paddingX,$[53]=paddingY,$[54]=t19):t19=$[54];const boxProps=t19,t20=!!(loading||disabled),t21=selected?"":void 0,t22=!!(loading||disabled);let t23;$[55]!==loading?(t23=!!loading&&/* @__PURE__ */jsx(LoadingBox,{children:/* @__PURE__ */jsx(Spinner,{})}),$[55]=loading,$[56]=t23):t23=$[56];let t24;$[57]!==IconComponent||$[58]!==IconRightComponent||$[59]!==boxProps||$[60]!==button||$[61]!==fontSize2||$[62]!==justify||$[63]!==muted||$[64]!==space||$[65]!==text||$[66]!==textAlign||$[67]!==textWeight?(t24=(IconComponent||text||IconRightComponent)&&/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({as:"span"},boxProps),{},{children:/* @__PURE__ */jsxs(Flex,{as:"span",justify,gap:space,children:[IconComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconComponent)&&IconComponent,reactIsExports.isValidElementType(IconComponent)&&/* @__PURE__ */jsx(IconComponent,{})]}),text&&/* @__PURE__ */jsx(Box,{children:/* @__PURE__ */jsx(Text,{muted,align:textAlign,size:fontSize2,textOverflow:"ellipsis",weight:textWeight!==null&&textWeight!==void 0?textWeight:button.textWeight,children:text})}),IconRightComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconRightComponent)&&IconRightComponent,reactIsExports.isValidElementType(IconRightComponent)&&/* @__PURE__ */jsx(IconRightComponent,{})]})]})})),$[57]=IconComponent,$[58]=IconRightComponent,$[59]=boxProps,$[60]=button,$[61]=fontSize2,$[62]=justify,$[63]=muted,$[64]=space,$[65]=text,$[66]=textAlign,$[67]=textWeight,$[68]=t24):t24=$[68];let t25;$[69]!==boxProps||$[70]!==children?(t25=children&&/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({as:"span"},boxProps),{},{children})),$[69]=boxProps,$[70]=children,$[71]=t25):t25=$[71];let t26;return $[72]!==mode||$[73]!==radius||$[74]!==ref||$[75]!==restProps||$[76]!==t20||$[77]!==t21||$[78]!==t22||$[79]!==t23||$[80]!==t24||$[81]!==t25||$[82]!==tone||$[83]!==type||$[84]!==width?(t26=/* @__PURE__ */jsxs(StyledButton,_objectSpread(_objectSpread({"data-ui":"Button"},restProps),{},{$mode:mode,$radius:radius,$tone:tone,"data-disabled":t20,"data-selected":t21,disabled:t22,ref,type,$width:width,children:[t23,t24,t25]})),$[72]=mode,$[73]=radius,$[74]=ref,$[75]=restProps,$[76]=t20,$[77]=t21,$[78]=t22,$[79]=t23,$[80]=t24,$[81]=t25,$[82]=tone,$[83]=type,$[84]=width,$[85]=t26):t26=$[85],t26;});Button.displayName="ForwardRef(Button)";function cardStyle(props){return[cardBaseStyle(props),cardColorStyle(props)];}function cardBaseStyle(props){const{$checkered}=props,{space}=getTheme_v2(props.theme);return css(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n ","\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n "])),$checkered&&css(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n background-size: ","px ","px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])),space[3],space[3]));}function cardColorStyle(props){var _style$card;const{$checkered,$focusRing,$muted}=props,{card,color,style}=getTheme_v2(props.theme),border2={width:card.border.width,color:"var(--card-border-color)"};return css(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n color-scheme: ",";\n\n ","\n\n background-color: ",";\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ","\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ","\n }\n\n &[data-selected] {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ",";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ","\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ","\n }\n\n &[data-selected] {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ",";\n }\n }\n }\n\n ","\n "])),color._dark?"dark":"light",_cardColorStyle(color,color,$checkered),$muted?"var(--card-muted-bg-color)":"var(--card-bg-color)",_cardColorStyle(color,color.selectable.default.disabled,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),_cardColorStyle(color,color.selectable.default.selected,$checkered),_cardColorStyle(color,color.selectable.default.hovered,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),$focusRing?focusRingStyle({base:color,border:border2,focusRing:card.focusRing}):void 0,_cardColorStyle(color,color.selectable.default.disabled,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),_cardColorStyle(color,color.selectable.default.selected,$checkered),_cardColorStyle(color,color.selectable.default.hovered,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),$focusRing?focusRingStyle({base:color,border:border2,focusRing:card.focusRing}):void 0,style===null||style===void 0||(_style$card=style.card)===null||_style$card===void 0?void 0:_style$card.root);}const StyledCard=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledCard",componentId:"sc-osnro2-0"})(responsiveBorderStyle,responsiveRadiusStyle,responsiveShadowStyle,cardStyle),Card=forwardRef(function(props,ref){var _props9;const $=dist.c(56);let asProp,border2,borderBottom2,borderLeft2,borderRight2,borderTop2,muted,pressed,restProps,scheme,selected,shadow,t0,t1,t2,t3;$[0]!==props?(_props9=props,{__unstable_checkered:t0,__unstable_focusRing:t1,as:asProp,border:border2,borderTop:borderTop2,borderRight:borderRight2,borderBottom:borderBottom2,borderLeft:borderLeft2,muted,pressed,radius:t2,scheme,selected,shadow,tone:t3}=_props9,restProps=_objectWithoutProperties(_props9,_excluded24),_props9,$[0]=props,$[1]=asProp,$[2]=border2,$[3]=borderBottom2,$[4]=borderLeft2,$[5]=borderRight2,$[6]=borderTop2,$[7]=muted,$[8]=pressed,$[9]=restProps,$[10]=scheme,$[11]=selected,$[12]=shadow,$[13]=t0,$[14]=t1,$[15]=t2,$[16]=t3):(asProp=$[1],border2=$[2],borderBottom2=$[3],borderLeft2=$[4],borderRight2=$[5],borderTop2=$[6],muted=$[7],pressed=$[8],restProps=$[9],scheme=$[10],selected=$[11],shadow=$[12],t0=$[13],t1=$[14],t2=$[15],t3=$[16]);const checkered=t0===void 0?!1:t0,focusRing=t1===void 0?!1:t1,radius=t2===void 0?0:t2,toneProp=t3===void 0?"default":t3,as=reactIsExports.isValidElementType(asProp)?asProp:"div",rootTheme=useRootTheme(),tone=toneProp==="inherit"?rootTheme.tone:toneProp,t4=typeof as=="string"?as:void 0,t5=rootTheme.scheme;let t6;$[17]!==border2?(t6=_getArrayProp(border2),$[17]=border2,$[18]=t6):t6=$[18];let t7;$[19]!==borderTop2?(t7=_getArrayProp(borderTop2),$[19]=borderTop2,$[20]=t7):t7=$[20];let t8;$[21]!==borderRight2?(t8=_getArrayProp(borderRight2),$[21]=borderRight2,$[22]=t8):t8=$[22];let t9;$[23]!==borderBottom2?(t9=_getArrayProp(borderBottom2),$[23]=borderBottom2,$[24]=t9):t9=$[24];let t10;$[25]!==borderLeft2?(t10=_getArrayProp(borderLeft2),$[25]=borderLeft2,$[26]=t10):t10=$[26];let t11;$[27]!==radius?(t11=_getArrayProp(radius),$[27]=radius,$[28]=t11):t11=$[28];let t12;$[29]!==shadow?(t12=_getArrayProp(shadow),$[29]=shadow,$[30]=t12):t12=$[30];const t13=checkered?"":void 0,t14=pressed?"":void 0,t15=selected?"":void 0;let t16;$[31]!==as||$[32]!==checkered||$[33]!==focusRing||$[34]!==muted||$[35]!==ref||$[36]!==restProps||$[37]!==rootTheme.scheme||$[38]!==selected||$[39]!==t10||$[40]!==t11||$[41]!==t12||$[42]!==t13||$[43]!==t14||$[44]!==t15||$[45]!==t4||$[46]!==t6||$[47]!==t7||$[48]!==t8||$[49]!==t9||$[50]!==tone?(t16=/* @__PURE__ */jsx(StyledCard,_objectSpread(_objectSpread({"data-as":t4,"data-scheme":t5,"data-ui":"Card","data-tone":tone},restProps),{},{$border:t6,$borderTop:t7,$borderRight:t8,$borderBottom:t9,$borderLeft:t10,$checkered:checkered,$focusRing:focusRing,$muted:muted,$radius:t11,$shadow:t12,$tone:tone,"data-checkered":t13,"data-pressed":t14,"data-selected":t15,forwardedAs:as,ref,selected})),$[31]=as,$[32]=checkered,$[33]=focusRing,$[34]=muted,$[35]=ref,$[36]=restProps,$[37]=rootTheme.scheme,$[38]=selected,$[39]=t10,$[40]=t11,$[41]=t12,$[42]=t13,$[43]=t14,$[44]=t15,$[45]=t4,$[46]=t6,$[47]=t7,$[48]=t8,$[49]=t9,$[50]=tone,$[51]=t16):t16=$[51];let t17;return $[52]!==scheme||$[53]!==t16||$[54]!==tone?(t17=/* @__PURE__ */jsx(ThemeColorProvider,{scheme,tone,children:t16}),$[52]=scheme,$[53]=t16,$[54]=tone,$[55]=t17):t17=$[55],t17;});Card.displayName="ForwardRef(Card)";function useClickOutsideEvent(listener,t0,boundaryElement){const $=dist.c(9),elementsArg=t0===void 0?_temp$8:t0;let t1;$[0]!==boundaryElement||$[1]!==elementsArg||$[2]!==listener?(t1=evt=>{if(!listener)return;const target=evt.target;if(!(target instanceof Node))return;const resolvedBoundaryElement=boundaryElement===null||boundaryElement===void 0?void 0:boundaryElement();if(resolvedBoundaryElement&&!resolvedBoundaryElement.contains(target))return;const elements=elementsArg().flat();for(const el of elements)if(el&&(target===el||el.contains(target)))return;listener(evt);},$[0]=boundaryElement,$[1]=elementsArg,$[2]=listener,$[3]=t1):t1=$[3];const onEvent=useEffectEvent(t1),hasListener=!!listener;let t2;$[4]!==hasListener||$[5]!==onEvent?(t2=()=>{if(!hasListener)return;const handleEvent=evt_0=>onEvent(evt_0);return document.addEventListener("mousedown",handleEvent),()=>{document.removeEventListener("mousedown",handleEvent);};},$[4]=hasListener,$[5]=onEvent,$[6]=t2):t2=$[6];let t3;$[7]!==hasListener?(t3=[hasListener],$[7]=hasListener,$[8]=t3):t3=$[8],useEffect$1(t2,t3),useDebugValue(listener?"MouseDown On":"MouseDown Off");}function _temp$8(){return EMPTY_ARRAY;}function useCustomValidity(ref,customValidity){const $=dist.c(4);let t0,t1;$[0]!==customValidity||$[1]!==ref?(t0=()=>{var _ref$current;(_ref$current=ref.current)===null||_ref$current===void 0||_ref$current.setCustomValidity(customValidity||"");},t1=[customValidity,ref],$[0]=customValidity,$[1]=ref,$[2]=t0,$[3]=t1):(t0=$[2],t1=$[3]),useEffect$1(t0,t1);}const _ResizeObserver=typeof document<"u"&&typeof window<"u"&&window.ResizeObserver?window.ResizeObserver:ResizeObserver$1,_elementSizeObserver=_createElementSizeObserver();function _createElementRectValueListener(){return{subscribe(element,subscriber){const resizeObserver=new _ResizeObserver(_ref66=>{let[entry]=_ref66;subscriber({_contentRect:entry.contentRect,border:{width:entry.borderBoxSize[0].inlineSize,height:entry.borderBoxSize[0].blockSize},content:{width:entry.contentRect.width,height:entry.contentRect.height}});});return resizeObserver.observe(element),()=>{resizeObserver.unobserve(element),resizeObserver.disconnect();};}};}function _createElementSizeObserver(){const disposeCache=/* @__PURE__ */new WeakMap(),subscribersCache=/* @__PURE__ */new WeakMap();return{subscribe(element,subscriber){const subscribers=subscribersCache.get(element)||[];let dispose=disposeCache.get(element);return subscribersCache.has(element)||(subscribersCache.set(element,subscribers),dispose=_createElementRectValueListener().subscribe(element,elementRect=>{for(const sub of subscribers)sub(elementRect);})),subscribers.push(subscriber),()=>{const idx=subscribers.indexOf(subscriber);idx>-1&&subscribers.splice(idx,1),subscribers.length===0&&dispose&&dispose();};}};}function useElementSize(element){const $=dist.c(3),[size2,setSize]=useState(null);let t0,t1;return $[0]!==element?(t0=()=>{if(element)return _elementSizeObserver.subscribe(element,setSize);},t1=[element],$[0]=element,$[1]=t0,$[2]=t1):(t0=$[1],t1=$[2]),useEffect$1(t0,t1),size2;}function useGlobalKeyDown(onKeyDown,options){const $=dist.c(7);let t0;$[0]!==onKeyDown?(t0=event=>onKeyDown(event),$[0]=onKeyDown,$[1]=t0):t0=$[1];const handleKeyDown=useEffectEvent(t0);let t1;$[2]!==handleKeyDown||$[3]!==options?(t1=()=>{const handler=event_0=>handleKeyDown(event_0);return window.addEventListener("keydown",handler,options),()=>window.removeEventListener("keydown",handler,options);},$[2]=handleKeyDown,$[3]=options,$[4]=t1):t1=$[4];let t2;$[5]!==options?(t2=[options],$[5]=options,$[6]=t2):t2=$[6],useEffect$1(t1,t2);}function useMatchMedia(mediaQueryString,getServerSnapshot2){const $=dist.c(4);useDebugValue(mediaQueryString);let t0;$[0]!==mediaQueryString?(t0=onStoreChange=>{const media=window.matchMedia(mediaQueryString);return media.addEventListener("change",onStoreChange),()=>media.removeEventListener("change",onStoreChange);},$[0]=mediaQueryString,$[1]=t0):t0=$[1];let t1;return $[2]!==mediaQueryString?(t1=()=>window.matchMedia(mediaQueryString).matches,$[2]=mediaQueryString,$[3]=t1):t1=$[3],useSyncExternalStore(t0,t1,getServerSnapshot2);}function _getMediaQuery(media,index){return index===0?"screen and (max-width: ".concat(media[index]-1,"px)"):index===media.length?"screen and (min-width: ".concat(media[index-1],"px)"):"screen and (min-width: ".concat(media[index-1],"px) and (max-width: ").concat(media[index]-1,"px)");}function _createMediaStore(media){const mediaLen=media.length;let sizes;const getSizes=()=>{if(!sizes){sizes=[];for(let index=mediaLen;index>-1;index-=1){const mediaQuery=_getMediaQuery(media,index);sizes.push({index,mq:window.matchMedia(mediaQuery)});}}return sizes;};return{getSnapshot:()=>{for(const{index,mq}of getSizes())if(mq.matches)return index;return 0;},subscribe:onStoreChange=>{const disposeFns=[];for(const{mq}of getSizes()){const handleChange=()=>{mq.matches&&onStoreChange();};mq.addEventListener("change",handleChange),disposeFns.push(()=>mq.removeEventListener("change",handleChange));}return()=>{for(const disposeFn of disposeFns)disposeFn();};}};}function getServerSnapshot(){return 0;}function useMediaIndex(){const $=dist.c(2),{media}=useTheme_v2();let t0;$[0]!==media?(t0=_createMediaStore(media),$[0]=media,$[1]=t0):t0=$[1];const store=t0;return useSyncExternalStore(store.subscribe,store.getSnapshot,getServerSnapshot);}function usePrefersDark(t0){return useMatchMedia("(prefers-color-scheme: dark)",t0===void 0?_temp$7:t0);}function _temp$7(){return!1;}function usePrefersReducedMotion(t0){return useMatchMedia("(prefers-reduced-motion: reduce)",t0===void 0?_temp$6:t0);}function _temp$6(){return!1;}function checkboxBaseStyles(){return css(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n position: relative;\n display: inline-block;\n "])));}function inputElementStyles(props){const{color,input,radius}=getTheme_v2(props.theme),{focusRing}=input.checkbox;return css(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ",";\n width: ",";\n box-sizing: border-box;\n box-shadow: ",";\n border-radius: ",";\n line-height: 1;\n background-color: ",";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 1.5px !important;\n }\n }\n }\n\n &:checked + span {\n background: ",";\n box-shadow: ",";\n color: ",";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ",";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ",";\n }\n\n &[data-error] + span {\n background-color: ",";\n box-shadow: ",";\n color: ",";\n }\n &[data-error]&:checked + span {\n background-color: ",";\n color: ",";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ",";\n }\n\n &:disabled + span {\n background-color: ",";\n box-shadow: ",";\n color: ",";\n }\n &:disabled&:checked + span {\n background-color: ",";\n }\n\n &[data-read-only] + span {\n background-color: ",";\n box-shadow: ",";\n color: ",";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ",";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])),rem(input.checkbox.size),rem(input.checkbox.size),focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),rem(radius[2]),color.input.default.enabled.bg,color.input.default.enabled.fg,focusRingBorderStyle({color:color.input.default.enabled.fg,width:input.border.width}),color.input.default.enabled.bg,focusRingStyle({focusRing}),focusRingStyle({focusRing:{width:1,offset:1}}),color.input.invalid.enabled.border,focusRingBorderStyle({width:input.border.width,color:color.input.invalid.enabled.muted.bg}),color.input.default.disabled.fg,color.input.invalid.enabled.muted.bg,color.input.default.enabled.bg,focusRingStyle({border:{width:input.border.width,color:color.input.invalid.readOnly.muted.bg},focusRing:{width:1,offset:1}}),color.input.default.disabled.bg,focusRingBorderStyle({width:input.border.width,color:color.input.default.disabled.border}),color.input.default.disabled.fg,color.input.default.disabled.muted.bg,color.input.default.readOnly.bg,focusRingBorderStyle({width:input.border.width,color:color.input.default.readOnly.border}),color.input.default.readOnly.fg,color.input.default.readOnly.muted.bg);}const StyledCheckbox=/* @__PURE__ */styled.div.withConfig({displayName:"StyledCheckbox",componentId:"sc-1l5mt2l-0"})(checkboxBaseStyles),Input$5=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-1l5mt2l-1"})(inputElementStyles),Checkbox=forwardRef(function(props,forwardedRef){var _props0;const $=dist.c(25);let checked,className,customValidity,disabled,indeterminate,readOnly,restProps,style;$[0]!==props?(_props0=props,{checked,className,disabled,indeterminate,customValidity,readOnly,style}=_props0,restProps=_objectWithoutProperties(_props0,_excluded25),_props0,$[0]=props,$[1]=checked,$[2]=className,$[3]=customValidity,$[4]=disabled,$[5]=indeterminate,$[6]=readOnly,$[7]=restProps,$[8]=style):(checked=$[1],className=$[2],customValidity=$[3],disabled=$[4],indeterminate=$[5],readOnly=$[6],restProps=$[7],style=$[8]);const ref=useRef$1(null);let t0;$[9]===Symbol.for("react.memo_cache_sentinel")?(t0=()=>ref.current,$[9]=t0):t0=$[9],useImperativeHandle(forwardedRef,t0);let t1,t2;$[10]!==indeterminate?(t1=()=>{ref.current&&(ref.current.indeterminate=indeterminate||!1);},t2=[indeterminate],$[10]=indeterminate,$[11]=t1,$[12]=t2):(t1=$[11],t2=$[12]),useEffect$1(t1,t2),useCustomValidity(ref,customValidity);const t3=!disabled&&readOnly?"":void 0,t4=customValidity?"":void 0,t5=disabled||readOnly;let t6;$[13]!==checked||$[14]!==readOnly||$[15]!==restProps||$[16]!==t3||$[17]!==t4||$[18]!==t5?(t6=/* @__PURE__ */jsx(Input$5,_objectSpread(_objectSpread({"data-read-only":t3,"data-error":t4},restProps),{},{checked,disabled:t5,type:"checkbox",readOnly,ref})),$[13]=checked,$[14]=readOnly,$[15]=restProps,$[16]=t3,$[17]=t4,$[18]=t5,$[19]=t6):t6=$[19];let t7;$[20]===Symbol.for("react.memo_cache_sentinel")?(t7=/* @__PURE__ */jsxs("span",{children:[/* @__PURE__ */jsx(CheckmarkIcon,{}),/* @__PURE__ */jsx(RemoveIcon,{})]}),$[20]=t7):t7=$[20];let t8;return $[21]!==className||$[22]!==style||$[23]!==t6?(t8=/* @__PURE__ */jsxs(StyledCheckbox,{className,"data-ui":"Checkbox",style,children:[t6,t7]}),$[21]=className,$[22]=style,$[23]=t6,$[24]=t8):t8=$[24],t8;});Checkbox.displayName="ForwardRef(Checkbox)";function codeSyntaxHighlightingStyle(_ref67){let{theme}=_ref67;const{color:{syntax:color}}=getTheme_v2(theme);return{"&.atrule":{color:color.atrule},"&.attr-name":{color:color.attrName},"&.attr-value":{color:color.attrValue},"&.attribute":{color:color.attribute},"&.boolean":{color:color.boolean},"&.builtin":{color:color.builtin},"&.cdata":{color:color.cdata},"&.char":{color:color.char},"&.class":{color:color.class},"&.class-name":{color:color.className},"&.comment":{color:color.comment},"&.constant":{color:color.constant},"&.deleted":{color:color.deleted},"&.doctype":{color:color.doctype},"&.entity":{color:color.entity},"&.function":{color:color.function},"&.hexcode":{color:color.hexcode},"&.id":{color:color.id},"&.important":{color:color.important},"&.inserted":{color:color.inserted},"&.keyword":{color:color.keyword},"&.number":{color:color.number},"&.operator":{color:color.operator},"&.prolog":{color:color.prolog},"&.property":{color:color.property},"&.pseudo-class":{color:color.pseudoClass},"&.pseudo-element":{color:color.pseudoElement},"&.punctuation":{color:color.punctuation},"&.regex":{color:color.regex},"&.selector":{color:color.selector},"&.string":{color:color.string},"&.symbol":{color:color.symbol},"&.tag":{color:color.tag},"&.unit":{color:color.unit},"&.url":{color:color.url},"&.variable":{color:color.variable}};}function codeBaseStyle(){return css(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ","\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])),codeSyntaxHighlightingStyle);}const LazyRefractor=lazy(()=>import('./refractor-cb52ef90.js')),StyledCode=/* @__PURE__ */styled.pre.withConfig({displayName:"StyledCode",componentId:"sc-4dymyn-0"})(codeBaseStyle,responsiveCodeFontStyle),Code=forwardRef(function(props,ref){var _props1;const $=dist.c(22);let children,language,restProps,t0,weight;$[0]!==props?(_props1=props,{children,language,size:t0,weight}=_props1,restProps=_objectWithoutProperties(_props1,_excluded26),_props1,$[0]=props,$[1]=children,$[2]=language,$[3]=restProps,$[4]=t0,$[5]=weight):(children=$[1],language=$[2],restProps=$[3],t0=$[4],weight=$[5]);const size2=t0===void 0?2:t0;let t1;$[6]!==size2?(t1=_getArrayProp(size2),$[6]=size2,$[7]=t1):t1=$[7];let t2;$[8]!==children?(t2=/* @__PURE__ */jsx("code",{children}),$[8]=children,$[9]=t2):t2=$[9];let t3;$[10]!==children||$[11]!==language?(t3=/* @__PURE__ */jsx(LazyRefractor,{language,value:children}),$[10]=children,$[11]=language,$[12]=t3):t3=$[12];let t4;$[13]!==t2||$[14]!==t3?(t4=/* @__PURE__ */jsx(Suspense,{fallback:t2,children:t3}),$[13]=t2,$[14]=t3,$[15]=t4):t4=$[15];let t5;return $[16]!==ref||$[17]!==restProps||$[18]!==t1||$[19]!==t4||$[20]!==weight?(t5=/* @__PURE__ */jsx(StyledCode,_objectSpread(_objectSpread({"data-ui":"Code"},restProps),{},{$size:t1,$weight:weight,ref,children:t4})),$[16]=ref,$[17]=restProps,$[18]=t1,$[19]=t4,$[20]=weight,$[21]=t5):t5=$[21],t5;});Code.displayName="ForwardRef(Code)";const BASE_STYLE$1={width:"100%",margin:"0 auto"};function containerBaseStyle(){return BASE_STYLE$1;}function responsiveContainerWidthStyle(props){const{container,media}=getTheme_v2(props.theme);return _responsive(media,props.$width,val=>({maxWidth:val==="auto"?"none":rem(container[val])}));}const StyledContainer=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledContainer",componentId:"sc-wyroop-0"})(containerBaseStyle,responsiveContainerWidthStyle),Container=forwardRef(function(props,ref){var _props10;const $=dist.c(11);let as,restProps,t0;$[0]!==props?(_props10=props,{as,width:t0}=_props10,restProps=_objectWithoutProperties(_props10,_excluded27),_props10,$[0]=props,$[1]=as,$[2]=restProps,$[3]=t0):(as=$[1],restProps=$[2],t0=$[3]);const width=t0===void 0?2:t0;let t1;$[4]!==width?(t1=_getArrayProp(width),$[4]=width,$[5]=t1):t1=$[5];let t2;return $[6]!==as||$[7]!==ref||$[8]!==restProps||$[9]!==t1?(t2=/* @__PURE__ */jsx(StyledContainer,_objectSpread(_objectSpread({"data-ui":"Container"},restProps),{},{$width:t1,forwardedAs:as,ref})),$[6]=as,$[7]=ref,$[8]=restProps,$[9]=t1,$[10]=t2):t2=$[10],t2;});Container.displayName="ForwardRef(Container)";const StyledGrid=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledGrid",componentId:"sc-v8t8oz-0"})(responsiveGridStyle),Grid=forwardRef(function(props,ref){var _props11;const $=dist.c(42);let as,autoCols,autoFlow,autoRows,children,columns,gap,gapX,gapY,restProps,rows;$[0]!==props?(_props11=props,{as,autoRows,autoCols,autoFlow,columns,gap,gapX,gapY,rows,children}=_props11,restProps=_objectWithoutProperties(_props11,_excluded28),_props11,$[0]=props,$[1]=as,$[2]=autoCols,$[3]=autoFlow,$[4]=autoRows,$[5]=children,$[6]=columns,$[7]=gap,$[8]=gapX,$[9]=gapY,$[10]=restProps,$[11]=rows):(as=$[1],autoCols=$[2],autoFlow=$[3],autoRows=$[4],children=$[5],columns=$[6],gap=$[7],gapX=$[8],gapY=$[9],restProps=$[10],rows=$[11]);const t0=typeof as=="string"?as:void 0;let t1;$[12]!==autoRows?(t1=_getArrayProp(autoRows),$[12]=autoRows,$[13]=t1):t1=$[13];let t2;$[14]!==autoCols?(t2=_getArrayProp(autoCols),$[14]=autoCols,$[15]=t2):t2=$[15];let t3;$[16]!==autoFlow?(t3=_getArrayProp(autoFlow),$[16]=autoFlow,$[17]=t3):t3=$[17];let t4;$[18]!==columns?(t4=_getArrayProp(columns),$[18]=columns,$[19]=t4):t4=$[19];let t5;$[20]!==gap?(t5=_getArrayProp(gap),$[20]=gap,$[21]=t5):t5=$[21];let t6;$[22]!==gapX?(t6=_getArrayProp(gapX),$[22]=gapX,$[23]=t6):t6=$[23];let t7;$[24]!==gapY?(t7=_getArrayProp(gapY),$[24]=gapY,$[25]=t7):t7=$[25];let t8;$[26]!==rows?(t8=_getArrayProp(rows),$[26]=rows,$[27]=t8):t8=$[27];let t9;return $[28]!==as||$[29]!==children||$[30]!==ref||$[31]!==restProps||$[32]!==t0||$[33]!==t1||$[34]!==t2||$[35]!==t3||$[36]!==t4||$[37]!==t5||$[38]!==t6||$[39]!==t7||$[40]!==t8?(t9=/* @__PURE__ */jsx(StyledGrid,_objectSpread(_objectSpread({"data-as":t0,"data-ui":"Grid"},restProps),{},{$autoRows:t1,$autoCols:t2,$autoFlow:t3,$columns:t4,$gap:t5,$gapX:t6,$gapY:t7,$rows:t8,forwardedAs:as,ref,children})),$[28]=as,$[29]=children,$[30]=ref,$[31]=restProps,$[32]=t0,$[33]=t1,$[34]=t2,$[35]=t3,$[36]=t4,$[37]=t5,$[38]=t6,$[39]=t7,$[40]=t8,$[41]=t9):t9=$[41],t9;});Grid.displayName="ForwardRef(Grid)";function headingBaseStyle(props){const{$accent,$muted}=props,{font}=getTheme_v2(props.theme);return css(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n ","\n\n ","\n\n & code {\n font-family: ",";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ",";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])),$accent&&css(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))),$muted&&css(_templateObject24||(_templateObject24=_taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))),font.code.family,font.heading.weights.bold);}const StyledHeading=/* @__PURE__ */styled.div.withConfig({displayName:"StyledHeading",componentId:"sc-137lwim-0"})(headingBaseStyle,responsiveTextAlignStyle,responsiveHeadingFont),Heading=forwardRef(function(props,ref){var _props12;const $=dist.c(26);let align,childrenProp,restProps,t0,t1,t2,textOverflow,weight;$[0]!==props?(_props12=props,{accent:t0,align,children:childrenProp,muted:t1,size:t2,textOverflow,weight}=_props12,restProps=_objectWithoutProperties(_props12,_excluded29),_props12,$[0]=props,$[1]=align,$[2]=childrenProp,$[3]=restProps,$[4]=t0,$[5]=t1,$[6]=t2,$[7]=textOverflow,$[8]=weight):(align=$[1],childrenProp=$[2],restProps=$[3],t0=$[4],t1=$[5],t2=$[6],textOverflow=$[7],weight=$[8]);const accent=t0===void 0?!1:t0,muted=t1===void 0?!1:t1,size2=t2===void 0?2:t2;let children=childrenProp;if(textOverflow==="ellipsis"){let t32;$[9]!==children?(t32=/* @__PURE__ */jsx(SpanWithTextOverflow,{children}),$[9]=children,$[10]=t32):t32=$[10],children=t32;}let t3;$[11]!==align?(t3=_getArrayProp(align),$[11]=align,$[12]=t3):t3=$[12];let t4;$[13]!==size2?(t4=_getArrayProp(size2),$[13]=size2,$[14]=t4):t4=$[14];let t5;$[15]!==children?(t5=/* @__PURE__ */jsx("span",{children}),$[15]=children,$[16]=t5):t5=$[16];let t6;return $[17]!==accent||$[18]!==muted||$[19]!==ref||$[20]!==restProps||$[21]!==t3||$[22]!==t4||$[23]!==t5||$[24]!==weight?(t6=/* @__PURE__ */jsx(StyledHeading,_objectSpread(_objectSpread({"data-ui":"Heading"},restProps),{},{$accent:accent,$align:t3,$muted:muted,$size:t4,$weight:weight,ref,children:t5})),$[17]=accent,$[18]=muted,$[19]=ref,$[20]=restProps,$[21]=t3,$[22]=t4,$[23]=t5,$[24]=weight,$[25]=t6):t6=$[25],t6;});Heading.displayName="ForwardRef(Heading)";function inlineBaseStyle(){return{lineHeight:"0","&&:not([hidden])":{display:"block"},"& > div":{display:"inline-block",verticalAlign:"middle"}};}function inlineSpaceStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$space,spaceIndex=>{const _space=rem(spaceIndex===0.5?space[1]/2:space[spaceIndex]);return{margin:"-".concat(_space," 0 0 -").concat(_space),"& > div":{padding:"".concat(_space," 0 0 ").concat(_space)}};});}const StyledInline=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledInline",componentId:"sc-1pkiy6j-0"})(inlineBaseStyle,inlineSpaceStyle),Inline=forwardRef(function(props,ref){var _props13;const $=dist.c(15);let as,childrenProp,restProps,space;$[0]!==props?(_props13=props,{as,children:childrenProp,space}=_props13,restProps=_objectWithoutProperties(_props13,_excluded30),_props13,$[0]=props,$[1]=as,$[2]=childrenProp,$[3]=restProps,$[4]=space):(as=$[1],childrenProp=$[2],restProps=$[3],space=$[4]);let t0;$[5]!==childrenProp?(t0=Children.map(childrenProp,_temp$5),$[5]=childrenProp,$[6]=t0):t0=$[6];const children=t0;let t1;$[7]!==space?(t1=_getArrayProp(space),$[7]=space,$[8]=t1):t1=$[8];const t2=ref;let t3;return $[9]!==as||$[10]!==children||$[11]!==restProps||$[12]!==t1||$[13]!==t2?(t3=/* @__PURE__ */jsx(StyledInline,_objectSpread(_objectSpread({"data-ui":"Inline"},restProps),{},{$space:t1,forwardedAs:as,ref:t2,children})),$[9]=as,$[10]=children,$[11]=restProps,$[12]=t1,$[13]=t2,$[14]=t3):t3=$[14],t3;});Inline.displayName="ForwardRef(Inline)";function _temp$5(child){return child&&/* @__PURE__ */jsx("div",{children:child});}function kbdStyle(){return css(_templateObject25||(_templateObject25=_taggedTemplateLiteral(["\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));}const StyledKBD=/* @__PURE__ */styled.kbd.withConfig({displayName:"StyledKBD",componentId:"sc-1w7yd8w-0"})(responsiveRadiusStyle,kbdStyle),KBD=forwardRef(function(props,ref){var _props14;const $=dist.c(19);let children,restProps,t0,t1,t2;$[0]!==props?(_props14=props,{children,fontSize:t0,padding:t1,radius:t2}=_props14,restProps=_objectWithoutProperties(_props14,_excluded31),_props14,$[0]=props,$[1]=children,$[2]=restProps,$[3]=t0,$[4]=t1,$[5]=t2):(children=$[1],restProps=$[2],t0=$[3],t1=$[4],t2=$[5]);const fontSize2=t0===void 0?0:t0,padding=t1===void 0?1:t1,radius=t2===void 0?2:t2;let t3;$[6]!==radius?(t3=_getArrayProp(radius),$[6]=radius,$[7]=t3):t3=$[7];let t4;$[8]!==children||$[9]!==fontSize2?(t4=/* @__PURE__ */jsx(Text,{as:"span",size:fontSize2,weight:"semibold",children}),$[8]=children,$[9]=fontSize2,$[10]=t4):t4=$[10];let t5;$[11]!==padding||$[12]!==t4?(t5=/* @__PURE__ */jsx(Box,{as:"span",padding,children:t4}),$[11]=padding,$[12]=t4,$[13]=t5):t5=$[13];let t6;return $[14]!==ref||$[15]!==restProps||$[16]!==t3||$[17]!==t5?(t6=/* @__PURE__ */jsx(StyledKBD,_objectSpread(_objectSpread({"data-ui":"KBD"},restProps),{},{$radius:t3,ref,children:t5})),$[14]=ref,$[15]=restProps,$[16]=t3,$[17]=t5,$[18]=t6):t6=$[18],t6;});KBD.displayName="ForwardRef(KBD)";const origin={name:"@sanity/ui/origin",fn(_ref68){var _middlewareData$shift,_middlewareData$shift2;let{middlewareData,placement,rects}=_ref68;const[side]=placement.split("-"),floatingWidth=rects.floating.width,floatingHeight=rects.floating.height,shiftX=((_middlewareData$shift=middlewareData.shift)===null||_middlewareData$shift===void 0?void 0:_middlewareData$shift.x)||0,shiftY=((_middlewareData$shift2=middlewareData.shift)===null||_middlewareData$shift2===void 0?void 0:_middlewareData$shift2.y)||0;if(floatingWidth<=0||floatingHeight<=0)return{};const isVerticalPlacement=["bottom","top"].includes(side),{originX,originY}=isVerticalPlacement?{originX:clamp(0.5-shiftX/floatingWidth,0,1),originY:side==="bottom"?0:1}:{originX:side==="left"?1:0,originY:clamp(0.5-shiftY/floatingHeight,0,1)};return{data:{originX,originY}};}};function clamp(num,min,max){return Math.min(Math.max(num,min),max);}function moveTowardsLength(movingPoint,targetPoint,amount){const width=targetPoint.x-movingPoint.x,height=targetPoint.y-movingPoint.y,distance=Math.sqrt(width*width+height*height);return moveTowardsFractional(movingPoint,targetPoint,Math.min(1,amount/distance));}function moveTowardsFractional(movingPoint,targetPoint,fraction){return{x:movingPoint.x+(targetPoint.x-movingPoint.x)*fraction,y:movingPoint.y+(targetPoint.y-movingPoint.y)*fraction};}function getRoundedCommands(points){const len=points.length,cmds=[];for(let i=0;i<len;i+=1){const point=points[i],prevPoint=points[i-1],nextPoint=points[i+1];if(prevPoint&&point.radius){const curveStart=moveTowardsLength(point,prevPoint,point.radius),curveEnd=moveTowardsLength(point,nextPoint,point.radius),startControl=moveTowardsFractional(curveStart,point,0.5),endControl=moveTowardsFractional(point,curveEnd,0.5);cmds.push(_objectSpread({type:"point"},curveStart)),cmds.push({type:"curve",curveEnd,startControl,endControl});}else cmds.push(_objectSpread({type:"point"},point));}return cmds;}function compileCommands(cmds){return cmds.map((n,idx)=>n.type==="point"?"".concat(idx===0?"M":"L"," ").concat(n.x," ").concat(n.y):n.type==="curve"?"C ".concat(n.startControl.x," ").concat(n.startControl.y," ").concat(n.endControl.x," ").concat(n.endControl.y," ").concat(n.curveEnd.x," ").concat(n.curveEnd.y):"").join(" ");}const StyledArrow=/* @__PURE__ */styled.div.withConfig({displayName:"StyledArrow",componentId:"sc-12vzy6c-0"})(_ref69=>{let{$w:w}=_ref69;return css(_templateObject26||(_templateObject26=_taggedTemplateLiteral(["\n position: absolute;\n width: ","px;\n height: ","px;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n line-height: 0;\n transform-origin: ","px ","px;\n }\n\n [data-placement^='top'] > & {\n bottom: -","px;\n\n & > svg {\n transform: rotate(0);\n }\n }\n\n [data-placement^='right'] > & {\n left: -","px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -","px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -","px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n "])),w,w,w/2,w/2,w,w,w,w);}),StrokePath=styled.path.withConfig({displayName:"StrokePath",componentId:"sc-12vzy6c-1"})(_templateObject27||(_templateObject27=_taggedTemplateLiteral(["stroke:var(--card-shadow-outline-color);"]))),ShapePath=styled.path.withConfig({displayName:"ShapePath",componentId:"sc-12vzy6c-2"})(_templateObject28||(_templateObject28=_taggedTemplateLiteral(["fill:var(--card-bg-color);"]))),Arrow=forwardRef(function(props,ref){var _props15;const $=dist.c(29);let h,restProps,t0,w;$[0]!==props?(_props15=props,{width:w,height:h,radius:t0}=_props15,restProps=_objectWithoutProperties(_props15,_excluded32),_props15,$[0]=props,$[1]=h,$[2]=restProps,$[3]=t0,$[4]=w):(h=$[1],restProps=$[2],t0=$[3],w=$[4]);const radius=t0===void 0?0:t0,{card}=useTheme_v2(),strokeWidth=card.shadow.outline,center=w/2;let t1;if($[5]!==center||$[6]!==h||$[7]!==radius||$[8]!==w){const points=[{x:0,y:0},{x:radius,y:0,radius},{x:center,y:h-1,radius},{x:w-radius,y:0,radius},{x:w,y:0}],cmds=getRoundedCommands(points);t1=compileCommands(cmds),$[5]=center,$[6]=h,$[7]=radius,$[8]=w,$[9]=t1;}else t1=$[9];const path=t1,strokePath="".concat(path),fillPath="".concat(path," M ").concat(w," -1 M 0 -1 Z"),t2="0 0 ".concat(w," ").concat(w);let t3;$[10]!==strokeWidth||$[11]!==w?(t3=/* @__PURE__ */jsx("mask",{id:"stroke-mask",children:/* @__PURE__ */jsx("rect",{x:0,y:strokeWidth,width:w,height:w,fill:"white"})}),$[10]=strokeWidth,$[11]=w,$[12]=t3):t3=$[12];const t4=strokeWidth*2;let t5;$[13]!==strokePath||$[14]!==t4?(t5=/* @__PURE__ */jsx(StrokePath,{d:strokePath,mask:"url(#stroke-mask)",strokeWidth:t4}),$[13]=strokePath,$[14]=t4,$[15]=t5):t5=$[15];let t6;$[16]!==fillPath?(t6=/* @__PURE__ */jsx(ShapePath,{d:fillPath}),$[16]=fillPath,$[17]=t6):t6=$[17];let t7;$[18]!==t2||$[19]!==t3||$[20]!==t5||$[21]!==t6||$[22]!==w?(t7=/* @__PURE__ */jsxs("svg",{width:w,height:w,viewBox:t2,children:[t3,t5,t6]}),$[18]=t2,$[19]=t3,$[20]=t5,$[21]=t6,$[22]=w,$[23]=t7):t7=$[23];let t8;return $[24]!==ref||$[25]!==restProps||$[26]!==t7||$[27]!==w?(t8=/* @__PURE__ */jsx(StyledArrow,_objectSpread(_objectSpread({},restProps),{},{$w:w,ref,children:t7})),$[24]=ref,$[25]=restProps,$[26]=t7,$[27]=w,$[28]=t8):t8=$[28],t8;});Arrow.displayName="ForwardRef(Arrow)";const BoundaryElementContext=createGlobalScopedContext("@sanity/ui/context/boundaryElement",null);function isRecord(value){return!!(value&&typeof value=="object"&&!Array.isArray(value));}const DEFAULT_VALUE={version:0,element:null};function useBoundaryElement(){const value=useContext(BoundaryElementContext);if(value&&(!isRecord(value)||value.version!==0))throw new Error("useBoundaryElement(): the context value is not compatible");return value||DEFAULT_VALUE;}function findMaxBreakpoints(media,width){const ret=[];for(let i=0;i<media.length;i+=1)media[i]>width&&ret.push(i);return ret;}function findMinBreakpoints(media,width){const ret=[];for(let i=0;i<media.length;i+=1)media[i]<=width&&ret.push(i);return ret;}const ElementQuery=forwardRef(function(props,forwardedRef){var _props16,_useElementSize$borde,_useElementSize;const $=dist.c(18),theme=useTheme_v2();let _media,children,restProps;$[0]!==props?(_props16=props,{children,media:_media}=_props16,restProps=_objectWithoutProperties(_props16,_excluded33),_props16,$[0]=props,$[1]=_media,$[2]=children,$[3]=restProps):(_media=$[1],children=$[2],restProps=$[3]);const media=_media!==null&&_media!==void 0?_media:theme.media,[element,setElement]=useState(null),width=(_useElementSize$borde=(_useElementSize=useElementSize(element))===null||_useElementSize===void 0?void 0:_useElementSize.border.width)!==null&&_useElementSize$borde!==void 0?_useElementSize$borde:window.innerWidth;let t0;if($[4]!==media||$[5]!==width){const eq=findMaxBreakpoints(media,width);t0=eq.length?eq.join(" "):void 0,$[4]=media,$[5]=width,$[6]=t0;}else t0=$[6];const max=t0;let t1;if($[7]!==media||$[8]!==width){const eq_0=findMinBreakpoints(media,width);t1=eq_0.length?eq_0.join(" "):void 0,$[7]=media,$[8]=width,$[9]=t1;}else t1=$[9];const min=t1;let t2,t3;$[10]!==element?(t2=()=>element,t3=[element],$[10]=element,$[11]=t2,$[12]=t3):(t2=$[11],t3=$[12]),useImperativeHandle(forwardedRef,t2,t3);let t4;return $[13]!==children||$[14]!==max||$[15]!==min||$[16]!==restProps?(t4=/* @__PURE__ */jsx("div",_objectSpread(_objectSpread({"data-ui":"ElementQuery"},restProps),{},{"data-eq-max":max,"data-eq-min":min,ref:setElement,children})),$[13]=children,$[14]=max,$[15]=min,$[16]=restProps,$[17]=t4):t4=$[17],t4;});ElementQuery.displayName="ForwardRef(ElementQuery)";function getLayerContext(contextValue){if(!isRecord(contextValue)||contextValue.version!==0)throw new Error("the context value is not compatible");if(!contextValue)throw new Error("components using `useLayer()` should be wrapped in a <LayerProvider>.");if(contextValue.version===0)return contextValue;throw new Error("could not get layer context");}const LayerContext=createGlobalScopedContext("@sanity/ui/context/layer",null);function LayerProvider(props){var _parent$level;const $=dist.c(21),{children,zOffset:t0}=props,zOffsetProp=t0===void 0?0:t0,parentContextValue=useContext(LayerContext);let t1;$[0]!==parentContextValue?(t1=parentContextValue&&getLayerContext(parentContextValue),$[0]=parentContextValue,$[1]=t1):t1=$[1];const parent=t1,parentRegisterChild=parent===null||parent===void 0?void 0:parent.registerChild,level=((_parent$level=parent===null||parent===void 0?void 0:parent.level)!==null&&_parent$level!==void 0?_parent$level:0)+1;let t2;$[2]!==zOffsetProp?(t2=_getArrayProp(zOffsetProp),$[2]=zOffsetProp,$[3]=t2):t2=$[3];const zOffset=t2,maxMediaIndex=zOffset.length-1,mediaIndex=Math.min(useMediaIndex(),maxMediaIndex),zIndex=parent?parent.zIndex+zOffset[mediaIndex]:zOffset[mediaIndex];let t3;$[4]===Symbol.for("react.memo_cache_sentinel")?(t3={},$[4]=t3):t3=$[4];const[,setChildLayers]=useState(t3),[size2,setSize]=useState(0),isTopLayer=size2===0;let t4;$[5]!==parentRegisterChild||$[6]!==setChildLayers?(t4=childLevel=>{const parentDispose=parentRegisterChild===null||parentRegisterChild===void 0?void 0:parentRegisterChild(childLevel);return childLevel!==void 0?setChildLayers(state=>{var _state$childLevel;const prevLen=(_state$childLevel=state[childLevel])!==null&&_state$childLevel!==void 0?_state$childLevel:0,nextState=_objectSpread(_objectSpread({},state),{},{[childLevel]:prevLen+1});return setSize(Object.keys(nextState).length),nextState;}):setSize(_temp$4),()=>{childLevel!==void 0?setChildLayers(state_0=>{const nextState_0=_objectSpread({},state_0);return nextState_0[childLevel]===1?(delete nextState_0[childLevel],setSize(Object.keys(nextState_0).length)):nextState_0[childLevel]=nextState_0[childLevel]-1,nextState_0;}):setSize(_temp2$2),parentDispose===null||parentDispose===void 0?void 0:parentDispose();};},$[5]=parentRegisterChild,$[6]=setChildLayers,$[7]=t4):t4=$[7];const registerChild=t4;let t5,t6;$[8]!==level||$[9]!==parentRegisterChild?(t5=()=>parentRegisterChild===null||parentRegisterChild===void 0?void 0:parentRegisterChild(level),t6=[level,parentRegisterChild],$[8]=level,$[9]=parentRegisterChild,$[10]=t5,$[11]=t6):(t5=$[10],t6=$[11]),useEffect$1(t5,t6);let t7;$[12]!==isTopLayer||$[13]!==level||$[14]!==registerChild||$[15]!==size2||$[16]!==zIndex?(t7={version:0,isTopLayer,level,registerChild,size:size2,zIndex},$[12]=isTopLayer,$[13]=level,$[14]=registerChild,$[15]=size2,$[16]=zIndex,$[17]=t7):t7=$[17];const value=t7;let t8;return $[18]!==children||$[19]!==value?(t8=/* @__PURE__ */jsx(LayerContext.Provider,{value,children}),$[18]=children,$[19]=value,$[20]=t8):t8=$[20],t8;}function _temp2$2(v_0){return v_0-1;}function _temp$4(v){return v+1;}LayerProvider.displayName="LayerProvider";function useLayer(){const $=dist.c(2),value=useContext(LayerContext);if(!value)throw new Error("useLayer(): missing context value");try{let t1;return $[0]!==value?(t1=getLayerContext(value),$[0]=value,$[1]=t1):t1=$[1],t1;}catch(t0){const err=t0;throw err instanceof Error?new Error("useLayer(): ".concat(err.message)):new Error("useLayer(): ".concat(err));}}const StyledLayer=/* @__PURE__ */styled.div.withConfig({displayName:"StyledLayer",componentId:"sc-16kojrv-0"})({position:"relative"}),LayerChildren=forwardRef(function(props,forwardedRef){var _props17;const $=dist.c(22);let children,onActivate,onFocus,restProps,t0;$[0]!==props?(_props17=props,{children,onActivate,onFocus,style:t0}=_props17,restProps=_objectWithoutProperties(_props17,_excluded34),_props17,$[0]=props,$[1]=children,$[2]=onActivate,$[3]=onFocus,$[4]=restProps,$[5]=t0):(children=$[1],onActivate=$[2],onFocus=$[3],restProps=$[4],t0=$[5]);const style=t0===void 0?EMPTY_RECORD:t0,{zIndex,isTopLayer}=useLayer(),lastFocusedRef=useRef$1(null),ref=useRef$1(null),isTopLayerRef=useRef$1(isTopLayer);let t1;$[6]===Symbol.for("react.memo_cache_sentinel")?(t1=()=>ref.current,$[6]=t1):t1=$[6],useImperativeHandle(forwardedRef,t1);let t2,t3;$[7]!==isTopLayer||$[8]!==onActivate?(t2=()=>{var _onActivate;isTopLayerRef.current!==isTopLayer&&isTopLayer&&(_onActivate=onActivate)!==null&&_onActivate!==void 0&&_onActivate({activeElement:lastFocusedRef.current}),isTopLayerRef.current=isTopLayer;},t3=[isTopLayer,onActivate],$[7]=isTopLayer,$[8]=onActivate,$[9]=t2,$[10]=t3):(t2=$[9],t3=$[10]),useEffect$1(t2,t3);let t4;$[11]!==isTopLayer||$[12]!==onFocus?(t4=event=>{var _onFocus;(_onFocus=onFocus)===null||_onFocus===void 0||_onFocus(event);const rootElement=ref.current,target=document.activeElement;!isTopLayer||!rootElement||!target||isHTMLElement(target)&&containsOrEqualsElement(rootElement,target)&&(lastFocusedRef.current=target);},$[11]=isTopLayer,$[12]=onFocus,$[13]=t4):t4=$[13];const handleFocus=t4;let t5;$[14]!==style||$[15]!==zIndex?(t5=_objectSpread(_objectSpread({},style),{},{zIndex}),$[14]=style,$[15]=zIndex,$[16]=t5):t5=$[16];let t6;return $[17]!==children||$[18]!==handleFocus||$[19]!==restProps||$[20]!==t5?(t6=/* @__PURE__ */jsx(StyledLayer,_objectSpread(_objectSpread({},restProps),{},{"data-ui":"Layer",onFocus:handleFocus,ref,style:t5,children})),$[17]=children,$[18]=handleFocus,$[19]=restProps,$[20]=t5,$[21]=t6):t6=$[21],t6;}),Layer=forwardRef(function(props,ref){var _props18;const $=dist.c(11);let children,restProps,t0;$[0]!==props?(_props18=props,{children,zOffset:t0}=_props18,restProps=_objectWithoutProperties(_props18,_excluded35),_props18,$[0]=props,$[1]=children,$[2]=restProps,$[3]=t0):(children=$[1],restProps=$[2],t0=$[3]);const zOffset=t0===void 0?1:t0;let t1;$[4]!==children||$[5]!==ref||$[6]!==restProps?(t1=/* @__PURE__ */jsx(LayerChildren,_objectSpread(_objectSpread({},restProps),{},{ref,children})),$[4]=children,$[5]=ref,$[6]=restProps,$[7]=t1):t1=$[7];let t2;return $[8]!==t1||$[9]!==zOffset?(t2=/* @__PURE__ */jsx(LayerProvider,{zOffset,children:t1}),$[8]=t1,$[9]=zOffset,$[10]=t2):t2=$[10],t2;});Layer.displayName="ForwardRef(Layer)";const key="@sanity/ui/context/portal",elementKey=Symbol.for("".concat(key,"/element"));globalScope[elementKey]=null;const defaultContextValue={version:0,boundaryElement:null,get element(){return typeof document>"u"?null:(globalScope[elementKey]||(globalScope[elementKey]=document.createElement("div"),globalScope[elementKey].setAttribute("data-portal",""),document.body.appendChild(globalScope[elementKey])),globalScope[elementKey]);}},PortalContext=createGlobalScopedContext(key,defaultContextValue);function usePortal(){const value=useContext(PortalContext);if(!value)throw new Error("usePortal(): missing context value");if(!isRecord(value)||value.version!==0)throw new Error("usePortal(): the context value is not compatible");return value;}function Portal(props){var _portal$elements;const $=dist.c(3),{children,__unstable_name:name}=props,portal=usePortal(),portalElement=(name?portal.elements&&portal.elements[name]:portal.element)||((_portal$elements=portal.elements)===null||_portal$elements===void 0?void 0:_portal$elements.default);if(!portalElement)return null;let t0;return $[0]!==children||$[1]!==portalElement?(t0=createPortal(children,portalElement),$[0]=children,$[1]=portalElement,$[2]=t0):t0=$[2],t0;}Portal.displayName="Portal";const StyledSrOnly=styled.div.withConfig({displayName:"StyledSrOnly",componentId:"sc-mubr0c-0"})(_templateObject29||(_templateObject29=_taggedTemplateLiteral(["display:block;width:0;height:0;position:absolute;overflow:hidden;overflow:clip;"]))),SrOnly=forwardRef(function(props,ref){const $=dist.c(4),{as,children}=props;let t0;return $[0]!==as||$[1]!==children||$[2]!==ref?(t0=/* @__PURE__ */jsx(StyledSrOnly,{"aria-hidden":!0,as,"data-ui":"SrOnly",ref,children}),$[0]=as,$[1]=children,$[2]=ref,$[3]=t0):t0=$[3],t0;});SrOnly.displayName="ForwardRef(SrOnly)";const StyledVirtualList=styled.div.withConfig({displayName:"StyledVirtualList",componentId:"sc-dlqsj4-0"})(_templateObject30||(_templateObject30=_taggedTemplateLiteral(["position:relative;"]))),ItemWrapper=styled.div.withConfig({displayName:"ItemWrapper",componentId:"sc-dlqsj4-1"})(_templateObject31||(_templateObject31=_taggedTemplateLiteral(["position:absolute;left:0;right:0;"]))),VirtualList=forwardRef(function(props,forwardedRef){var _props19;const $=dist.c(44);let getItemKey,onChange,renderItem,restProps,t0,t1,t2;$[0]!==props?(_props19=props,{as:t0,gap:t1,getItemKey,items:t2,onChange,renderItem}=_props19,restProps=_objectWithoutProperties(_props19,_excluded36),_props19,$[0]=props,$[1]=getItemKey,$[2]=onChange,$[3]=renderItem,$[4]=restProps,$[5]=t0,$[6]=t1,$[7]=t2):(getItemKey=$[1],onChange=$[2],renderItem=$[3],restProps=$[4],t0=$[5],t1=$[6],t2=$[7]);const as=t0===void 0?"div":t0,gap=t1===void 0?0:t1;let t3;$[8]!==t2?(t3=t2===void 0?[]:t2,$[8]=t2,$[9]=t3):t3=$[9];const items=t3,{space}=useTheme_v2(),ref=useRef$1(null),wrapperRef=useRef$1(null),[scrollTop,setScrollTop]=useState(0),[scrollHeight,setScrollHeight]=useState(0),[itemHeight,setItemHeight]=useState(-1);let t4;$[10]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>ref.current,$[10]=t4):t4=$[10],useImperativeHandle(forwardedRef,t4);let t5;$[11]===Symbol.for("react.memo_cache_sentinel")?(t5=()=>{if(!wrapperRef.current)return;const firstElement=wrapperRef.current.firstChild;firstElement instanceof HTMLElement&&setItemHeight(firstElement.offsetHeight);},$[11]=t5):t5=$[11];let t6;$[12]!==renderItem?(t6=[renderItem],$[12]=renderItem,$[13]=t6):t6=$[13],useEffect$1(t5,t6);let t7,t8;$[14]===Symbol.for("react.memo_cache_sentinel")?(t7=()=>{if(!ref.current)return;const scrollEl=findScrollable(ref.current.parentNode);if(scrollEl){if(!(scrollEl instanceof HTMLElement))return;const handleScroll=()=>{setScrollTop(scrollEl.scrollTop);};scrollEl.addEventListener("scroll",handleScroll,{passive:!0});const ro=new _ResizeObserver(entries=>{setScrollHeight(entries[0].contentRect.height);});return ro.observe(scrollEl),handleScroll(),()=>{scrollEl.removeEventListener("scroll",handleScroll),ro.unobserve(scrollEl),ro.disconnect();};}const handleScroll_0=()=>{setScrollTop(window.scrollY);},handleResize=()=>{setScrollHeight(window.innerHeight);};return window.addEventListener("scroll",handleScroll_0,{passive:!0}),window.addEventListener("resize",handleResize),setScrollHeight(window.innerHeight),handleScroll_0(),()=>{window.removeEventListener("scroll",handleScroll_0),window.removeEventListener("resize",handleResize);};},t8=[],$[14]=t7,$[15]=t8):(t7=$[14],t8=$[15]),useEffect$1(t7,t8);const len=items.length,height=itemHeight?len*(itemHeight+space[gap])-space[gap]:0,fromIndex=height?Math.max(Math.floor(scrollTop/height*len)-2,0):0,toIndex=height?Math.ceil((scrollTop+scrollHeight)/height*len)+1:0;let t10,t9;$[16]!==fromIndex||$[17]!==gap||$[18]!==itemHeight||$[19]!==onChange||$[20]!==scrollHeight||$[21]!==scrollTop||$[22]!==space||$[23]!==toIndex?(t9=()=>{onChange&&onChange({fromIndex,gap:space[gap],itemHeight,scrollHeight,scrollTop,toIndex});},t10=[fromIndex,gap,itemHeight,onChange,scrollHeight,scrollTop,space,toIndex],$[16]=fromIndex,$[17]=gap,$[18]=itemHeight,$[19]=onChange,$[20]=scrollHeight,$[21]=scrollTop,$[22]=space,$[23]=toIndex,$[24]=t10,$[25]=t9):(t10=$[24],t9=$[25]),useEffect$1(t9,t10);let t11;$[26]!==fromIndex||$[27]!==gap||$[28]!==getItemKey||$[29]!==itemHeight||$[30]!==items||$[31]!==renderItem||$[32]!==space||$[33]!==toIndex?(t11={fromIndex,gap,itemHeight,space,toIndex,getItemKey,items,renderItem},$[26]=fromIndex,$[27]=gap,$[28]=getItemKey,$[29]=itemHeight,$[30]=items,$[31]=renderItem,$[32]=space,$[33]=toIndex,$[34]=t11):t11=$[34];const children=useChildren(t11);let t12;$[35]!==height?(t12={height},$[35]=height,$[36]=t12):t12=$[36];let t13;$[37]!==children||$[38]!==t12?(t13=/* @__PURE__ */jsx("div",{ref:wrapperRef,style:t12,children}),$[37]=children,$[38]=t12,$[39]=t13):t13=$[39];let t14;return $[40]!==as||$[41]!==restProps||$[42]!==t13?(t14=/* @__PURE__ */jsx(StyledVirtualList,_objectSpread(_objectSpread({as,"data-ui":"VirtualList"},restProps),{},{ref,children:t13})),$[40]=as,$[41]=restProps,$[42]=t13,$[43]=t14):t14=$[43],t14;});VirtualList.displayName="ForwardRef(VirtualList)";function useChildren(t0){const $=dist.c(21),{fromIndex,gap,getItemKey,itemHeight,items,renderItem,space,toIndex}=t0;if(!renderItem||items.length===0)return null;if(itemHeight===-1){let t12;$[0]!==items[0]||$[1]!==renderItem?(t12=renderItem(items[0]),$[0]=items[0],$[1]=renderItem,$[2]=t12):t12=$[2];let t2;return $[3]!==t12?(t2=[/* @__PURE__ */jsx(ItemWrapper,{children:t12},0)],$[3]=t12,$[4]=t2):t2=$[4],t2;}let t1;if($[5]!==fromIndex||$[6]!==gap||$[7]!==getItemKey||$[8]!==itemHeight||$[9]!==items||$[10]!==renderItem||$[11]!==space||$[12]!==toIndex){let t2;$[14]!==fromIndex||$[15]!==gap||$[16]!==getItemKey||$[17]!==itemHeight||$[18]!==renderItem||$[19]!==space?(t2=(item,_itemIndex)=>{const itemIndex=fromIndex+_itemIndex,node=renderItem(item),key2=getItemKey?getItemKey(item,itemIndex):itemIndex;return/* @__PURE__ */jsx(ItemWrapper,{style:{top:itemIndex*(itemHeight+space[gap])},children:node},key2);},$[14]=fromIndex,$[15]=gap,$[16]=getItemKey,$[17]=itemHeight,$[18]=renderItem,$[19]=space,$[20]=t2):t2=$[20],t1=items.slice(fromIndex,toIndex).map(t2),$[5]=fromIndex,$[6]=gap,$[7]=getItemKey,$[8]=itemHeight,$[9]=items,$[10]=renderItem,$[11]=space,$[12]=toIndex,$[13]=t1;}else t1=$[13];return t1;}function findScrollable(parentNode){let _scrollEl=parentNode;for(;_scrollEl&&!_isScrollable(_scrollEl);)_scrollEl=_scrollEl.parentNode;return _scrollEl;}function getElementRef(element){var _Object$getOwnPropert,_Object$getOwnPropert2;let getter=(_Object$getOwnPropert=Object.getOwnPropertyDescriptor(element.props,"ref"))===null||_Object$getOwnPropert===void 0?void 0:_Object$getOwnPropert.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;return mayWarn?element.ref:(getter=(_Object$getOwnPropert2=Object.getOwnPropertyDescriptor(element,"ref"))===null||_Object$getOwnPropert2===void 0?void 0:_Object$getOwnPropert2.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning,mayWarn?element.props.ref:element.props.ref||element.ref);}const DEFAULT_POPOVER_DISTANCE=4,DEFAULT_POPOVER_PADDING=4,DEFAULT_POPOVER_ARROW_WIDTH=19,DEFAULT_POPOVER_ARROW_HEIGHT=8,DEFAULT_POPOVER_ARROW_RADIUS=2,DEFAULT_POPOVER_MARGINS=[0,0,0,0],DEFAULT_FALLBACK_PLACEMENTS$1={top:["bottom","left","right"],"top-start":["bottom-start","left-start","right-start"],"top-end":["bottom-end","left-end","right-end"],bottom:["top","left","right"],"bottom-start":["top-start","left-start","right-start"],"bottom-end":["top-end","left-end","right-end"],left:["right","top","bottom"],"left-start":["right-start","top-start","bottom-start"],"left-end":["right-end","top-end","bottom-end"],right:["left","top","bottom"],"right-start":["left-start","top-start","bottom-start"],"right-end":["left-end","top-end","bottom-end"]};function size(options){const{constrainSize,margins,matchReferenceWidth,maxWidthRef,padding=0,referenceWidthRef,setReferenceWidth,widthRef}=options;return{name:"@sanity/ui/size",async fn(args){var _maxWidthRef$current;const{elements,placement,platform,rects}=args,{floating,reference}=rects,overflow=await detectOverflow(args,{altBoundary:!0,boundary:options.boundaryElement||void 0,elementContext:"floating",padding,rootBoundary:"viewport"});let maxWidth=1/0,maxHeight=1/0;const floatingW=floating.width,floatingH=floating.height;placement.includes("top")&&(maxWidth=floatingW-(overflow.left+overflow.right),maxHeight=floatingH-overflow.top),placement.includes("right")&&(maxWidth=floatingW-overflow.right,maxHeight=floatingH-(overflow.top+overflow.bottom)),placement.includes("bottom")&&(maxWidth=floatingW-(overflow.left+overflow.right),maxHeight=floatingH-overflow.bottom),placement.includes("left")&&(maxWidth=floatingW-overflow.left,maxHeight=floatingH-(overflow.top+overflow.bottom));const availableWidth=maxWidth-margins[1]-margins[3],availableHeight=maxHeight-margins[0]-margins[2],referenceWidth=reference.width-margins[1]-margins[3];referenceWidthRef.current=referenceWidth,setReferenceWidth(referenceWidth),matchReferenceWidth?elements.floating.style.width="".concat(referenceWidth,"px"):widthRef.current!==void 0&&(elements.floating.style.width="".concat(widthRef.current,"px")),constrainSize&&(elements.floating.style.maxWidth="".concat(Math.min(availableWidth,(_maxWidthRef$current=maxWidthRef.current)!==null&&_maxWidthRef$current!==void 0?_maxWidthRef$current:1/0),"px"),elements.floating.style.maxHeight="".concat(availableHeight,"px"));const nextDimensions=await platform.getDimensions(elements.floating),targetH=nextDimensions.height,targetW=nextDimensions.width;return floatingW!==targetW||floatingH!==targetH?{reset:{rects:!0}}:{};}};}function calcCurrentWidth(params){const{container,mediaIndex,width}=params,w=width[mediaIndex],currentWidth=w===void 0?width[width.length-1]:w;return typeof currentWidth=="number"?container[currentWidth]:void 0;}function calcMaxWidth(params){const{boundaryWidth,currentWidth}=params;if(!(currentWidth===void 0&&boundaryWidth===void 0))return Math.min(currentWidth!==null&¤tWidth!==void 0?currentWidth:1/0,(boundaryWidth||1/0)-DEFAULT_POPOVER_PADDING*2);}const MotionCard$1=styled(motion.create(Card)).withConfig({displayName:"MotionCard",componentId:"sc-ihg31s-0"})(_templateObject32||(_templateObject32=_taggedTemplateLiteral(["&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;"]))),MotionFlex=styled(motion.create(Flex)).withConfig({displayName:"MotionFlex",componentId:"sc-ihg31s-1"})(_templateObject33||(_templateObject33=_taggedTemplateLiteral(["will-change:opacity;"]))),PopoverCard=forwardRef(function(props,ref){var _props20;const $=dist.c(66);let animate,arrow2,arrowRef,arrowX,arrowY,children,marginsProp,originX,originY,overflow,padding,placement,radius,restProps,scheme,shadow,strategy,style,tone,width,xProp,yProp;$[0]!==props?(_props20=props,{__unstable_margins:marginsProp,animate,arrow:arrow2,arrowRef,arrowX,arrowY,children,padding,placement,originX,originY,overflow,radius,scheme,shadow,strategy,style,tone,width,x:xProp,y:yProp}=_props20,restProps=_objectWithoutProperties(_props20,_excluded37),_props20,$[0]=props,$[1]=animate,$[2]=arrow2,$[3]=arrowRef,$[4]=arrowX,$[5]=arrowY,$[6]=children,$[7]=marginsProp,$[8]=originX,$[9]=originY,$[10]=overflow,$[11]=padding,$[12]=placement,$[13]=radius,$[14]=restProps,$[15]=scheme,$[16]=shadow,$[17]=strategy,$[18]=style,$[19]=tone,$[20]=width,$[21]=xProp,$[22]=yProp):(animate=$[1],arrow2=$[2],arrowRef=$[3],arrowX=$[4],arrowY=$[5],children=$[6],marginsProp=$[7],originX=$[8],originY=$[9],overflow=$[10],padding=$[11],placement=$[12],radius=$[13],restProps=$[14],scheme=$[15],shadow=$[16],strategy=$[17],style=$[18],tone=$[19],width=$[20],xProp=$[21],yProp=$[22]);const{zIndex}=useLayer(),margins=marginsProp||DEFAULT_POPOVER_MARGINS,x=(xProp!==null&&xProp!==void 0?xProp:0)+margins[3],y=(yProp!==null&&yProp!==void 0?yProp:0)+margins[0],t0=animate?"transform":void 0;let t1;$[23]!==originX||$[24]!==originY||$[25]!==strategy||$[26]!==style||$[27]!==t0||$[28]!==width||$[29]!==x||$[30]!==y||$[31]!==zIndex?(t1=_objectSpread({left:x,originX,originY,position:strategy,top:y,width,zIndex,willChange:t0},style),$[23]=originX,$[24]=originY,$[25]=strategy,$[26]=style,$[27]=t0,$[28]=width,$[29]=x,$[30]=y,$[31]=zIndex,$[32]=t1):t1=$[32];const rootStyle2=t1,t2=arrowX!==null?arrowX:void 0,t3=arrowY!==null?arrowY:void 0;let t4;$[33]!==t2||$[34]!==t3?(t4={left:t2,top:t3,right:void 0,bottom:void 0},$[33]=t2,$[34]=t3,$[35]=t4):t4=$[35];const arrowStyle=t4,t5=restProps;let t6;$[36]!==animate?(t6=animate?["hidden","initial"]:void 0,$[36]=animate,$[37]=t6):t6=$[37];let t7;$[38]!==animate?(t7=animate?["visible","scaleIn"]:void 0,$[38]=animate,$[39]=t7):t7=$[39];let t8;$[40]!==animate?(t8=animate?["hidden","scaleOut"]:void 0,$[40]=animate,$[41]=t8):t8=$[41];let t9;$[42]!==children||$[43]!==padding?(t9=/* @__PURE__ */jsx(Flex,{direction:"column",flex:1,padding,children}),$[42]=children,$[43]=padding,$[44]=t9):t9=$[44];let t10;$[45]!==overflow||$[46]!==t9?(t10=/* @__PURE__ */jsx(MotionFlex,{"data-ui":"Popover__wrapper",direction:"column",flex:1,overflow,variants:POPOVER_MOTION_PROPS.children,transition:POPOVER_MOTION_PROPS.transition,children:t9}),$[45]=overflow,$[46]=t9,$[47]=t10):t10=$[47];let t11;$[48]!==arrow2||$[49]!==arrowRef||$[50]!==arrowStyle?(t11=arrow2&&/* @__PURE__ */jsx(Arrow,{ref:arrowRef,style:arrowStyle,width:DEFAULT_POPOVER_ARROW_WIDTH,height:DEFAULT_POPOVER_ARROW_HEIGHT,radius:DEFAULT_POPOVER_ARROW_RADIUS}),$[48]=arrow2,$[49]=arrowRef,$[50]=arrowStyle,$[51]=t11):t11=$[51];let t12;return $[52]!==placement||$[53]!==radius||$[54]!==ref||$[55]!==rootStyle2||$[56]!==scheme||$[57]!==shadow||$[58]!==t10||$[59]!==t11||$[60]!==t5||$[61]!==t6||$[62]!==t7||$[63]!==t8||$[64]!==tone?(t12=/* @__PURE__ */jsxs(MotionCard$1,_objectSpread(_objectSpread({"data-ui":"Popover"},t5),{},{"data-placement":placement,radius,ref,scheme,shadow,sizing:"border",style:rootStyle2,tone,variants:POPOVER_MOTION_PROPS.card,transition:POPOVER_MOTION_PROPS.transition,initial:t6,animate:t7,exit:t8,children:[t10,t11]})),$[52]=placement,$[53]=radius,$[54]=ref,$[55]=rootStyle2,$[56]=scheme,$[57]=shadow,$[58]=t10,$[59]=t11,$[60]=t5,$[61]=t6,$[62]=t7,$[63]=t8,$[64]=tone,$[65]=t12):t12=$[65],t12;});PopoverCard.displayName="ForwardRef(PopoverCard)";const ViewportOverlay=()=>{const $=dist.c(2),{zIndex}=useLayer();let t0;return $[0]!==zIndex?(t0=/* @__PURE__ */jsx("div",{style:{height:"100vh",inset:0,position:"fixed",width:"100vw",zIndex}}),$[0]=zIndex,$[1]=t0):t0=$[1],t0;},Popover=forwardRef(function(props,forwardedRef){var _props$placement,_ref70,_ref71,_useElementSize2,_middlewareData$hide,_middlewareData$arrow2,_middlewareData$arrow3,_middlewareData$Sani,_middlewareData$Sani2;const $=dist.c(126),{container,layer}=useTheme_v2(),boundaryElementContext=useBoundaryElement();let _boundaryElement,_fallbackPlacements,_floatingBoundary,_referenceBoundary,_zOffsetProp,childProp,content,disabled,matchReferenceWidth,modal,open,paddingProp,portal,referenceElement,restProps,scheme,t0,t1,t10,t11,t2,t3,t4,t5,t6,t7,t8,t9,updateRef;if($[0]!==props){const{__unstable_margins:t122,animate:t132,arrow:t142,boundaryElement:t152,children:t162,constrainSize:t172,content:t182,disabled:t192,fallbackPlacements:t202,matchReferenceWidth:t212,floatingBoundary:t222,modal:t232,onActivate,open:t242,overflow:t252,padding:t262,placement:t272,placementStrategy:t282,portal:t292,preventOverflow:t302,radius:t312,referenceBoundary:t322,referenceElement:t332,scheme:t342,shadow:t352,tone:t362,width:t372,zOffset:t382,updateRef:t392}=props,t402=_objectWithoutProperties(props,_excluded38);t0=t122,t1=t132,t2=t142,_boundaryElement=t152,childProp=t162,t3=t172,content=t182,disabled=t192,_fallbackPlacements=t202,matchReferenceWidth=t212,_floatingBoundary=t222,modal=t232,open=t242,t4=t252,paddingProp=t262,t5=t272,t6=t282,portal=t292,t7=t302,t8=t312,_referenceBoundary=t322,referenceElement=t332,scheme=t342,t9=t352,t10=t362,t11=t372,_zOffsetProp=t382,updateRef=t392,restProps=t402,$[0]=props,$[1]=_boundaryElement,$[2]=_fallbackPlacements,$[3]=_floatingBoundary,$[4]=_referenceBoundary,$[5]=_zOffsetProp,$[6]=childProp,$[7]=content,$[8]=disabled,$[9]=matchReferenceWidth,$[10]=modal,$[11]=open,$[12]=paddingProp,$[13]=portal,$[14]=referenceElement,$[15]=restProps,$[16]=scheme,$[17]=t0,$[18]=t1,$[19]=t10,$[20]=t11,$[21]=t2,$[22]=t3,$[23]=t4,$[24]=t5,$[25]=t6,$[26]=t7,$[27]=t8,$[28]=t9,$[29]=updateRef;}else _boundaryElement=$[1],_fallbackPlacements=$[2],_floatingBoundary=$[3],_referenceBoundary=$[4],_zOffsetProp=$[5],childProp=$[6],content=$[7],disabled=$[8],matchReferenceWidth=$[9],modal=$[10],open=$[11],paddingProp=$[12],portal=$[13],referenceElement=$[14],restProps=$[15],scheme=$[16],t0=$[17],t1=$[18],t10=$[19],t11=$[20],t2=$[21],t3=$[22],t4=$[23],t5=$[24],t6=$[25],t7=$[26],t8=$[27],t9=$[28],updateRef=$[29];const margins=t0===void 0?DEFAULT_POPOVER_MARGINS:t0,_animate=t1===void 0?!1:t1,arrowProp=t2===void 0?!1:t2,constrainSize=t3===void 0?!1:t3,overflow=t4===void 0?"hidden":t4,placementProp=t5===void 0?"bottom":t5,placementStrategy=t6===void 0?"flip":t6,preventOverflow=t7===void 0?!0:t7,radiusProp=t8===void 0?3:t8,shadowProp=t9===void 0?3:t9,tone=t10===void 0?"inherit":t10,widthProp=t11===void 0?"auto":t11,boundaryElement=_boundaryElement!==null&&_boundaryElement!==void 0?_boundaryElement:boundaryElementContext===null||boundaryElementContext===void 0?void 0:boundaryElementContext.element,fallbackPlacements=_fallbackPlacements!==null&&_fallbackPlacements!==void 0?_fallbackPlacements:DEFAULT_FALLBACK_PLACEMENTS$1[(_props$placement=props.placement)!==null&&_props$placement!==void 0?_props$placement:"bottom"],floatingBoundary=(_ref70=_floatingBoundary!==null&&_floatingBoundary!==void 0?_floatingBoundary:props.boundaryElement)!==null&&_ref70!==void 0?_ref70:boundaryElementContext.element,referenceBoundary=(_ref71=_referenceBoundary!==null&&_referenceBoundary!==void 0?_referenceBoundary:props.boundaryElement)!==null&&_ref71!==void 0?_ref71:boundaryElementContext.element,zOffsetProp=_zOffsetProp!==null&&_zOffsetProp!==void 0?_zOffsetProp:layer.popover.zOffset,animate=usePrefersReducedMotion()?!1:_animate,boundarySize=(_useElementSize2=useElementSize(boundaryElement))===null||_useElementSize2===void 0?void 0:_useElementSize2.border;let t12;$[30]!==paddingProp?(t12=_getArrayProp(paddingProp),$[30]=paddingProp,$[31]=t12):t12=$[31];const padding=t12;let t13;$[32]!==radiusProp?(t13=_getArrayProp(radiusProp),$[32]=radiusProp,$[33]=t13):t13=$[33];const radius=t13;let t14;$[34]!==shadowProp?(t14=_getArrayProp(shadowProp),$[34]=shadowProp,$[35]=t14):t14=$[35];const shadow=t14,widthArrayProp=_getArrayProp(widthProp);let t15;$[36]!==zOffsetProp?(t15=_getArrayProp(zOffsetProp),$[36]=zOffsetProp,$[37]=t15):t15=$[37];const zOffset=t15,ref=useRef$1(null),arrowRef=useRef$1(null);let t16;$[38]===Symbol.for("react.memo_cache_sentinel")?(t16=()=>ref.current,$[38]=t16):t16=$[38],useImperativeHandle(forwardedRef,t16);const mediaIndex=useMediaIndex(),boundaryWidth=constrainSize||preventOverflow?boundarySize===null||boundarySize===void 0?void 0:boundarySize.width:void 0,width=calcCurrentWidth({container,mediaIndex,width:widthArrayProp}),widthRef=useRef$1(width);let t17,t18;$[39]!==width?(t17=()=>{widthRef.current=width;},t18=[width],$[39]=width,$[40]=t17,$[41]=t18):(t17=$[40],t18=$[41]),useEffect$1(t17,t18);let t19;$[42]!==boundaryWidth||$[43]!==width?(t19=calcMaxWidth({boundaryWidth,currentWidth:width}),$[42]=boundaryWidth,$[43]=width,$[44]=t19):t19=$[44];const maxWidth=t19,maxWidthRef=useRef$1(maxWidth);let t20,t21;$[45]!==maxWidth?(t20=()=>{maxWidthRef.current=maxWidth;},t21=[maxWidth],$[45]=maxWidth,$[46]=t20,$[47]=t21):(t20=$[46],t21=$[47]),useEffect$1(t20,t21);const referenceWidthRef=useRef$1(void 0);let t22,t23;$[48]!==matchReferenceWidth||$[49]!==maxWidth||$[50]!==open||$[51]!==width?(t22=()=>{const floatingElement=ref.current;if(!open||!floatingElement)return;const referenceWidth=referenceWidthRef.current;matchReferenceWidth?referenceWidth!==void 0&&(floatingElement.style.width="".concat(referenceWidth,"px")):width!==void 0&&(floatingElement.style.width="".concat(width,"px")),typeof maxWidth=="number"&&(floatingElement.style.maxWidth="".concat(maxWidth,"px"));},t23=[width,matchReferenceWidth,maxWidth,open],$[48]=matchReferenceWidth,$[49]=maxWidth,$[50]=open,$[51]=width,$[52]=t22,$[53]=t23):(t22=$[52],t23=$[53]),useEffect$1(t22,t23);const[referenceWidth_0,setReferenceWidth]=useState(void 0);let t24;$[54]!==animate||$[55]!==arrowProp||$[56]!==constrainSize||$[57]!==fallbackPlacements||$[58]!==floatingBoundary||$[59]!==margins||$[60]!==matchReferenceWidth||$[61]!==placementProp||$[62]!==placementStrategy||$[63]!==preventOverflow||$[64]!==referenceBoundary?(t24={animate,arrowProp,arrowRef,constrainSize,fallbackPlacements,floatingBoundary,margins,matchReferenceWidth,maxWidthRef,placementProp,placementStrategy,preventOverflow,referenceBoundary,referenceWidthRef,rootBoundary:"viewport",setReferenceWidth,widthRef},$[54]=animate,$[55]=arrowProp,$[56]=constrainSize,$[57]=fallbackPlacements,$[58]=floatingBoundary,$[59]=margins,$[60]=matchReferenceWidth,$[61]=placementProp,$[62]=placementStrategy,$[63]=preventOverflow,$[64]=referenceBoundary,$[65]=t24):t24=$[65];const middleware=useMiddleware$1(t24);let t25;$[66]!==referenceElement?(t25=referenceElement?{reference:referenceElement}:void 0,$[66]=referenceElement,$[67]=t25):t25=$[67];let t26;$[68]!==middleware||$[69]!==placementProp||$[70]!==t25?(t26={middleware,placement:placementProp,whileElementsMounted:autoUpdate,elements:t25},$[68]=middleware,$[69]=placementProp,$[70]=t25,$[71]=t26):t26=$[71];const{x,y,middlewareData,placement,refs,strategy,update}=useFloating(t26),referenceHidden=(_middlewareData$hide=middlewareData.hide)===null||_middlewareData$hide===void 0?void 0:_middlewareData$hide.referenceHidden,arrowX=(_middlewareData$arrow2=middlewareData.arrow)===null||_middlewareData$arrow2===void 0?void 0:_middlewareData$arrow2.x,arrowY=(_middlewareData$arrow3=middlewareData.arrow)===null||_middlewareData$arrow3===void 0?void 0:_middlewareData$arrow3.y,originX=(_middlewareData$Sani=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani===void 0?void 0:_middlewareData$Sani.originX,originY=(_middlewareData$Sani2=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani2===void 0?void 0:_middlewareData$Sani2.originY;let t27;$[72]===Symbol.for("react.memo_cache_sentinel")?(t27=arrowEl=>{arrowRef.current=arrowEl;},$[72]=t27):t27=$[72];const setArrow=t27;let t28;$[73]!==refs?(t28=node=>{ref.current=node,refs.setFloating(node);},$[73]=refs,$[74]=t28):t28=$[74];const setFloating=t28;let t29;$[75]!==childProp?(t29=childProp?getElementRef(childProp):null,$[75]=childProp,$[76]=t29):t29=$[76];let t30;$[77]!==refs.reference.current?(t30=()=>refs.reference.current,$[77]=refs.reference.current,$[78]=t30):t30=$[78],useImperativeHandle(t29,t30);let t31;bb0:{if(referenceElement){t31=childProp;break bb0;}if(!childProp){t31=null;break bb0;}let t322;$[79]!==childProp||$[80]!==refs.setReference?(t322=cloneElement(childProp,{ref:refs.setReference}),$[79]=childProp,$[80]=refs.setReference,$[81]=t322):t322=$[81],t31=t322;}const child=t31;let t32,t33;if($[82]!==update?(t32=()=>update,t33=[update],$[82]=update,$[83]=t32,$[84]=t33):(t32=$[83],t33=$[84]),useImperativeHandle(updateRef,t32,t33),disabled){let t342;return $[85]!==childProp?(t342=childProp||/* @__PURE__ */jsx(Fragment,{}),$[85]=childProp,$[86]=t342):t342=$[86],t342;}let t34;$[87]!==modal?(t34=modal&&/* @__PURE__ */jsx(ViewportOverlay,{}),$[87]=modal,$[88]=t34):t34=$[88];const t35=matchReferenceWidth?referenceWidth_0:width;let t36;$[89]!==animate||$[90]!==arrowProp||$[91]!==arrowX||$[92]!==arrowY||$[93]!==content||$[94]!==margins||$[95]!==originX||$[96]!==originY||$[97]!==overflow||$[98]!==padding||$[99]!==placement||$[100]!==radius||$[101]!==referenceHidden||$[102]!==restProps||$[103]!==scheme||$[104]!==setFloating||$[105]!==shadow||$[106]!==strategy||$[107]!==t35||$[108]!==tone||$[109]!==x||$[110]!==y?(t36=/* @__PURE__ */jsx(PopoverCard,_objectSpread(_objectSpread({},restProps),{},{__unstable_margins:margins,animate,arrow:arrowProp,arrowRef:setArrow,arrowX,arrowY,hidden:referenceHidden,overflow,padding,placement,radius,ref:setFloating,scheme,shadow,originX,originY,strategy,tone,width:t35,x,y,children:content})),$[89]=animate,$[90]=arrowProp,$[91]=arrowX,$[92]=arrowY,$[93]=content,$[94]=margins,$[95]=originX,$[96]=originY,$[97]=overflow,$[98]=padding,$[99]=placement,$[100]=radius,$[101]=referenceHidden,$[102]=restProps,$[103]=scheme,$[104]=setFloating,$[105]=shadow,$[106]=strategy,$[107]=t35,$[108]=tone,$[109]=x,$[110]=y,$[111]=t36):t36=$[111];let t37;$[112]!==t34||$[113]!==t36||$[114]!==zOffset?(t37=/* @__PURE__ */jsxs(LayerProvider,{zOffset,children:[t34,t36]}),$[112]=t34,$[113]=t36,$[114]=zOffset,$[115]=t37):t37=$[115];const popover=t37;let t38;$[116]!==open||$[117]!==popover||$[118]!==portal?(t38=open&&(portal?/* @__PURE__ */jsx(Portal,{__unstable_name:typeof portal=="string"?portal:void 0,children:popover}):popover),$[116]=open,$[117]=popover,$[118]=portal,$[119]=t38):t38=$[119];const children=t38;let t39;$[120]!==animate||$[121]!==children?(t39=animate?/* @__PURE__ */jsx(AnimatePresence,{children}):children,$[120]=animate,$[121]=children,$[122]=t39):t39=$[122];let t40;return $[123]!==child||$[124]!==t39?(t40=/* @__PURE__ */jsxs(Fragment,{children:[t39,child]}),$[123]=child,$[124]=t39,$[125]=t40):t40=$[125],t40;});Popover.displayName="ForwardRef(Popover)";function useMiddleware$1(t0){const $=dist.c(42),{animate,arrowProp,arrowRef,constrainSize,fallbackPlacements,floatingBoundary,margins,matchReferenceWidth,maxWidthRef,placementProp,placementStrategy,preventOverflow,referenceBoundary,referenceWidthRef,rootBoundary,setReferenceWidth,widthRef}=t0;let ret;if($[0]!==animate||$[1]!==arrowProp||$[2]!==arrowRef||$[3]!==constrainSize||$[4]!==fallbackPlacements||$[5]!==floatingBoundary||$[6]!==margins||$[7]!==matchReferenceWidth||$[8]!==maxWidthRef||$[9]!==placementProp||$[10]!==placementStrategy||$[11]!==preventOverflow||$[12]!==referenceBoundary||$[13]!==referenceWidthRef||$[14]!==rootBoundary||$[15]!==setReferenceWidth||$[16]!==widthRef){if(ret=[],constrainSize||preventOverflow)if(placementStrategy==="autoPlacement"){let t12;$[18]!==fallbackPlacements||$[19]!==placementProp?(t12=autoPlacement({allowedPlacements:[placementProp].concat(fallbackPlacements)}),$[18]=fallbackPlacements,$[19]=placementProp,$[20]=t12):t12=$[20],ret.push(t12);}else{const t12=floatingBoundary||void 0;let t22;$[21]!==fallbackPlacements||$[22]!==rootBoundary||$[23]!==t12?(t22=flip({boundary:t12,fallbackPlacements,padding:DEFAULT_POPOVER_PADDING,rootBoundary}),$[21]=fallbackPlacements,$[22]=rootBoundary,$[23]=t12,$[24]=t22):t22=$[24],ret.push(t22);}let t1;if($[25]===Symbol.for("react.memo_cache_sentinel")?(t1=offset({mainAxis:DEFAULT_POPOVER_DISTANCE}),$[25]=t1):t1=$[25],ret.push(t1),constrainSize||matchReferenceWidth){const t22=floatingBoundary||void 0;let t32;$[26]!==constrainSize||$[27]!==margins||$[28]!==matchReferenceWidth||$[29]!==maxWidthRef||$[30]!==referenceWidthRef||$[31]!==setReferenceWidth||$[32]!==t22||$[33]!==widthRef?(t32=size({boundaryElement:t22,constrainSize,margins,matchReferenceWidth,maxWidthRef,padding:DEFAULT_POPOVER_PADDING,referenceWidthRef,setReferenceWidth,widthRef}),$[26]=constrainSize,$[27]=margins,$[28]=matchReferenceWidth,$[29]=maxWidthRef,$[30]=referenceWidthRef,$[31]=setReferenceWidth,$[32]=t22,$[33]=widthRef,$[34]=t32):t32=$[34],ret.push(t32);}if(preventOverflow){const t22=floatingBoundary||void 0;let t32;$[35]!==rootBoundary||$[36]!==t22?(t32=shift({boundary:t22,rootBoundary,padding:DEFAULT_POPOVER_PADDING}),$[35]=rootBoundary,$[36]=t22,$[37]=t32):t32=$[37],ret.push(t32);}if(arrowProp){let t22;$[38]!==arrowRef?(t22=arrow({element:arrowRef,padding:DEFAULT_POPOVER_PADDING}),$[38]=arrowRef,$[39]=t22):t22=$[39],ret.push(t22);}animate&&ret.push(origin);const t2=referenceBoundary||void 0;let t3;$[40]!==t2?(t3=hide({boundary:t2,padding:DEFAULT_POPOVER_PADDING,strategy:"referenceHidden"}),$[40]=t2,$[41]=t3):t3=$[41],ret.push(t3),$[0]=animate,$[1]=arrowProp,$[2]=arrowRef,$[3]=constrainSize,$[4]=fallbackPlacements,$[5]=floatingBoundary,$[6]=margins,$[7]=matchReferenceWidth,$[8]=maxWidthRef,$[9]=placementProp,$[10]=placementStrategy,$[11]=preventOverflow,$[12]=referenceBoundary,$[13]=referenceWidthRef,$[14]=rootBoundary,$[15]=setReferenceWidth,$[16]=widthRef,$[17]=ret;}else ret=$[17];return ret;}function radioBaseStyle(){return css(_templateObject34||(_templateObject34=_taggedTemplateLiteral(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));}function inputElementStyle(props){const{color,input}=getTheme_v2(props.theme),dist=(input.radio.size-input.radio.markSize)/2;return css(_templateObject35||(_templateObject35=_taggedTemplateLiteral(["\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n z-index: 1;\n padding: 0;\n margin: 0;\n border-radius: ",";\n border: none;\n\n /* enabled */\n & + span {\n display: block;\n position: relative;\n height: ",";\n width: ",";\n border-radius: ",";\n background: ",";\n box-shadow: ",";\n\n &::after {\n content: '';\n position: absolute;\n top: ",";\n left: ",";\n height: ",";\n width: ",";\n border-radius: ",";\n background: ",";\n opacity: 0;\n }\n }\n\n /* focused */\n &:not(:disabled):focus + span {\n box-shadow: ",";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ",";\n }\n\n &:checked + span::after {\n opacity: 1;\n }\n\n /* customValidity */\n &[data-error] + span {\n background-color: ",";\n box-shadow: ",";\n &::after {\n background: ",";\n }\n }\n\n /* read only */\n &[data-read-only] + span {\n box-shadow: 0 0 0 1px ",";\n background: ",";\n\n &::after {\n background: ",";\n }\n }\n\n /* disabled */\n &:not([data-read-only]):disabled + span {\n box-shadow: 0 0 0 1px ",";\n background: ",";\n\n &::after {\n background: ",";\n }\n }\n "])),rem(input.radio.size/2),rem(input.radio.size),rem(input.radio.size),rem(input.radio.size/2),color.input.default.enabled.bg,focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),rem(dist),rem(dist),rem(input.radio.markSize),rem(input.radio.markSize),rem(input.radio.markSize/2),color.input.default.enabled.fg,focusRingStyle({border:{width:input.border.width,color:color.input.default.enabled.border},focusRing:input.radio.focusRing}),focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),color.input.invalid.enabled.border,focusRingBorderStyle({width:input.border.width,color:color.input.invalid.enabled.muted.bg}),color.input.invalid.enabled.muted.bg,color.input.default.readOnly.border,color.input.default.readOnly.bg,color.input.default.readOnly.border,color.input.default.disabled.border,color.input.default.disabled.bg,color.input.default.disabled.border);}const StyledRadio=/* @__PURE__ */styled.div.withConfig({displayName:"StyledRadio",componentId:"sc-ccrwkf-0"})(radioBaseStyle),Input$4=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-ccrwkf-1"})(inputElementStyle),Radio=forwardRef(function(props,forwardedRef){var _props21;const $=dist.c(19);let className,customValidity,disabled,readOnly,restProps,style;$[0]!==props?(_props21=props,{className,disabled,style,customValidity,readOnly}=_props21,restProps=_objectWithoutProperties(_props21,_excluded39),_props21,$[0]=props,$[1]=className,$[2]=customValidity,$[3]=disabled,$[4]=readOnly,$[5]=restProps,$[6]=style):(className=$[1],customValidity=$[2],disabled=$[3],readOnly=$[4],restProps=$[5],style=$[6]);const ref=useRef$1(null);let t0;$[7]===Symbol.for("react.memo_cache_sentinel")?(t0=()=>ref.current,$[7]=t0):t0=$[7],useImperativeHandle(forwardedRef,t0),useCustomValidity(ref,customValidity);const t1=!disabled&&readOnly?"":void 0,t2=customValidity?"":void 0,t3=disabled||readOnly;let t4;$[8]!==readOnly||$[9]!==restProps||$[10]!==t1||$[11]!==t2||$[12]!==t3?(t4=/* @__PURE__ */jsx(Input$4,_objectSpread(_objectSpread({"data-read-only":t1,"data-error":t2},restProps),{},{disabled:t3,readOnly,ref,type:"radio"})),$[8]=readOnly,$[9]=restProps,$[10]=t1,$[11]=t2,$[12]=t3,$[13]=t4):t4=$[13];let t5;$[14]===Symbol.for("react.memo_cache_sentinel")?(t5=/* @__PURE__ */jsx("span",{}),$[14]=t5):t5=$[14];let t6;return $[15]!==className||$[16]!==style||$[17]!==t4?(t6=/* @__PURE__ */jsxs(StyledRadio,{className,"data-ui":"Radio",style,children:[t4,t5]}),$[15]=className,$[16]=style,$[17]=t4,$[18]=t6):t6=$[18],t6;});Radio.displayName="ForwardRef(Radio)";function rootStyle(){return css(_templateObject36||(_templateObject36=_taggedTemplateLiteral(["\n position: relative;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));}function inputBaseStyle(props){const{font}=getTheme_v2(props.theme);return css(_templateObject37||(_templateObject37=_taggedTemplateLiteral(["\n -webkit-font-smoothing: antialiased;\n appearance: none;\n border: 0;\n font-family: ",";\n color: inherit;\n width: 100%;\n outline: none;\n margin: 0;\n\n &:disabled {\n opacity: 1;\n }\n "])),font.text.family);}function inputColorStyle(props){const{color,input}=getTheme_v2(props.theme);return css(_templateObject38||(_templateObject38=_taggedTemplateLiteral(["\n /* enabled */\n background-color: ",";\n color: ",";\n box-shadow: ",";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ",";\n color: ",";\n box-shadow: ",";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ",";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ",";\n color: ",";\n box-shadow: ",";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ",";\n color: ",";\n box-shadow: ",";\n }\n "])),color.input.default.enabled.bg,color.input.default.enabled.fg,focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),color.input.default.hovered.bg,color.input.default.hovered.fg,focusRingBorderStyle({color:color.input.default.hovered.border,width:input.border.width}),focusRingStyle({border:{width:input.border.width,color:color.input.default.enabled.border},focusRing:input.select.focusRing}),color.input.default.readOnly.bg,color.input.default.readOnly.fg,focusRingBorderStyle({color:color.input.default.readOnly.border,width:input.border.width}),color.input.default.disabled.bg,color.input.default.disabled.fg,focusRingBorderStyle({color:color.input.default.disabled.border,width:input.border.width}));}function textSize(size2){return{fontSize:rem(size2.fontSize),lineHeight:"".concat(rem(size2.lineHeight))};}function inputTextSizeStyle(props){const{$fontSize}=props,{font,media}=getTheme_v2(props.theme);return _responsive(media,$fontSize,sizeIndex=>textSize(font.text.sizes[sizeIndex]||font.text.sizes[2]));}function inputStyle(){return[responsiveRadiusStyle,inputBaseStyle,inputColorStyle,inputTextSizeStyle,responsiveInputPaddingIconRightStyle];}function iconBoxStyle(props){const{color}=getTheme_v2(props.theme);return css(_templateObject39||(_templateObject39=_taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n\n /* enabled */\n --card-fg-color: ",";\n\n /* hover */\n @media (hover: hover) {\n select:not(disabled):not(:read-only):hover + && {\n --card-fg-color: ",";\n }\n }\n\n /* disabled */\n select:disabled + && {\n --card-fg-color: ",";\n }\n\n /* read-only */\n select[data-read-only] + && {\n --card-fg-color: ",";\n }\n "])),color.input.default.enabled.fg,color.input.default.hovered.fg,color.input.default.disabled.fg,color.input.default.readOnly.fg);}const selectStyle={root:rootStyle,input:inputStyle,iconBox:iconBoxStyle},StyledSelect=/* @__PURE__ */styled.div.withConfig({displayName:"StyledSelect",componentId:"sc-5mxno7-0"})(selectStyle.root),Input$3=/* @__PURE__ */styled.select.withConfig({displayName:"Input",componentId:"sc-5mxno7-1"})(selectStyle.input),IconBox=/* @__PURE__ */styled(Box).withConfig({displayName:"IconBox",componentId:"sc-5mxno7-2"})(selectStyle.iconBox),Select=forwardRef(function(props,forwardedRef){var _props22;const $=dist.c(37);let children,customValidity,disabled,readOnly,restProps,t0,t1,t2,t3;$[0]!==props?(_props22=props,{children,customValidity,disabled,fontSize:t0,padding:t1,radius:t2,readOnly,space:t3}=_props22,restProps=_objectWithoutProperties(_props22,_excluded40),_props22,$[0]=props,$[1]=children,$[2]=customValidity,$[3]=disabled,$[4]=readOnly,$[5]=restProps,$[6]=t0,$[7]=t1,$[8]=t2,$[9]=t3):(children=$[1],customValidity=$[2],disabled=$[3],readOnly=$[4],restProps=$[5],t0=$[6],t1=$[7],t2=$[8],t3=$[9]);const fontSize2=t0===void 0?2:t0,padding=t1===void 0?3:t1,radius=t2===void 0?2:t2,space=t3===void 0?3:t3,ref=useRef$1(null);let t4;$[10]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>ref.current,$[10]=t4):t4=$[10],useImperativeHandle(forwardedRef,t4),useCustomValidity(ref,customValidity);const t5=!disabled&&readOnly?"":void 0;let t6;$[11]!==fontSize2?(t6=_getArrayProp(fontSize2),$[11]=fontSize2,$[12]=t6):t6=$[12];let t7;$[13]!==padding?(t7=_getArrayProp(padding),$[13]=padding,$[14]=t7):t7=$[14];let t8;$[15]!==radius?(t8=_getArrayProp(radius),$[15]=radius,$[16]=t8):t8=$[16];let t9;$[17]!==space?(t9=_getArrayProp(space),$[17]=space,$[18]=t9):t9=$[18];const t10=disabled||readOnly;let t11;$[19]!==children||$[20]!==restProps||$[21]!==t10||$[22]!==t5||$[23]!==t6||$[24]!==t7||$[25]!==t8||$[26]!==t9?(t11=/* @__PURE__ */jsx(Input$3,_objectSpread(_objectSpread({"data-read-only":t5,"data-ui":"Select"},restProps),{},{$fontSize:t6,$padding:t7,$radius:t8,$space:t9,disabled:t10,ref,children})),$[19]=children,$[20]=restProps,$[21]=t10,$[22]=t5,$[23]=t6,$[24]=t7,$[25]=t8,$[26]=t9,$[27]=t11):t11=$[27];let t12;$[28]===Symbol.for("react.memo_cache_sentinel")?(t12=/* @__PURE__ */jsx(ChevronDownIcon,{}),$[28]=t12):t12=$[28];let t13;$[29]!==fontSize2?(t13=/* @__PURE__ */jsx(Text,{size:fontSize2,children:t12}),$[29]=fontSize2,$[30]=t13):t13=$[30];let t14;$[31]!==padding||$[32]!==t13?(t14=/* @__PURE__ */jsx(IconBox,{padding,children:t13}),$[31]=padding,$[32]=t13,$[33]=t14):t14=$[33];let t15;return $[34]!==t11||$[35]!==t14?(t15=/* @__PURE__ */jsxs(StyledSelect,{"data-ui":"Select",children:[t11,t14]}),$[34]=t11,$[35]=t14,$[36]=t15):t15=$[36],t15;});Select.displayName="ForwardRef(Select)";const BASE_STYLE={"&&:not([hidden])":{display:"grid"},'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"},gridTemplateColumns:"minmax(0, 1fr)",gridAutoRows:"min-content"};function stackBaseStyle(){return BASE_STYLE;}function responsiveStackSpaceStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$space,spaceIndex=>({gridGap:rem(space[spaceIndex])}));}const StyledStack=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledStack",componentId:"sc-8dpfq2-0"})(stackBaseStyle,responsiveStackSpaceStyle),Stack=forwardRef(function(props,ref){var _props23;const $=dist.c(12);let as,restProps,space;$[0]!==props?(_props23=props,{as,space}=_props23,restProps=_objectWithoutProperties(_props23,_excluded41),_props23,$[0]=props,$[1]=as,$[2]=restProps,$[3]=space):(as=$[1],restProps=$[2],space=$[3]);const t0=typeof as=="string"?as:void 0;let t1;$[4]!==space?(t1=_getArrayProp(space),$[4]=space,$[5]=t1):t1=$[5];let t2;return $[6]!==as||$[7]!==ref||$[8]!==restProps||$[9]!==t0||$[10]!==t1?(t2=/* @__PURE__ */jsx(StyledStack,_objectSpread(_objectSpread({"data-as":t0,"data-ui":"Stack"},restProps),{},{$space:t1,forwardedAs:as,ref})),$[6]=as,$[7]=ref,$[8]=restProps,$[9]=t0,$[10]=t1,$[11]=t2):t2=$[11],t2;});Stack.displayName="ForwardRef(Stack)";function switchBaseStyles(){return css(_templateObject40||(_templateObject40=_taggedTemplateLiteral(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));}function switchInputStyles(){return css(_templateObject41||(_templateObject41=_taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n padding: 0;\n margin: 0;\n\n /* Place the input element above the representation element */\n z-index: 1;\n "])));}function switchRepresentationStyles(props){const{color,input}=getTheme_v2(props.theme);return css(_templateObject42||(_templateObject42=_taggedTemplateLiteral(["\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ",";\n height: ",";\n border-radius: ",";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ",";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n input[data-read-only]:disabled + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n input:checked[data-read-only]:disabled + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n "])),color.input.default.enabled.border,color.input.default.enabled.bg,rem(input.switch.width),rem(input.switch.height),rem(input.switch.height/2),focusRingStyle({focusRing:input.switch.focusRing}),color.input.default.enabled.fg,color.input.default.enabled.bg,color.input.default.hovered.border,color.input.default.hovered.bg,color.input.default.enabled.fg,color.input.default.enabled.bg,color.input.default.disabled.border,color.input.default.disabled.bg,color.input.default.readOnly.border,color.input.default.readOnly.bg,color.input.default.readOnly.fg,color.input.default.readOnly.bg);}function switchTrackStyles(props){const{input}=getTheme_v2(props.theme);return css(_templateObject43||(_templateObject43=_taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n background-color: var(--switch-bg-color);\n position: absolute;\n left: 0;\n top: 0;\n width: ",";\n height: ",";\n border-radius: ",";\n "])),rem(input.switch.width),rem(input.switch.height),rem(input.switch.height/2));}function switchThumbStyles(props){const{$indeterminate}=props,{input}=getTheme_v2(props.theme),trackWidth=input.switch.width,trackHeight=input.switch.height,trackPadding=input.switch.padding,size2=trackHeight-input.switch.padding*2,checkedOffset=trackWidth-trackPadding*2-size2,indeterminateOffset=trackWidth/2-size2/2-trackPadding,checked=$indeterminate!==!0&&props.$checked===!0;return css(_templateObject44||(_templateObject44=_taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n position: absolute;\n left: ",";\n top: ",";\n height: ",";\n width: ",";\n border-radius: ",";\n transition-property: transform;\n transition-duration: ","ms;\n transition-timing-function: ",";\n background: var(--switch-fg-color);\n transform: translate3d(0, 0, 0);\n box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);\n\n ","\n\n ","\n "])),rem(trackPadding),rem(trackPadding),rem(size2),rem(size2),rem(size2/2),input.switch.transitionDurationMs,input.switch.transitionTimingFunction,checked&&css(_templateObject45||(_templateObject45=_taggedTemplateLiteral(["\n transform: translate3d(","px, 0, 0);\n "])),checkedOffset),$indeterminate&&css(_templateObject46||(_templateObject46=_taggedTemplateLiteral(["\n transform: translate3d(","px, 0, 0);\n "])),indeterminateOffset));}const StyledSwitch=/* @__PURE__ */styled.span.withConfig({displayName:"StyledSwitch",componentId:"sc-dw1foe-0"})(switchBaseStyles),Input$2=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-dw1foe-1"})(switchInputStyles),Representation=/* @__PURE__ */styled.span.withConfig({displayName:"Representation",componentId:"sc-dw1foe-2"})(switchRepresentationStyles),Track=/* @__PURE__ */styled.span.withConfig({displayName:"Track",componentId:"sc-dw1foe-3"})(switchTrackStyles),Thumb=/* @__PURE__ */styled.span.withConfig({displayName:"Thumb",componentId:"sc-dw1foe-4"})(switchThumbStyles),Switch=forwardRef(function(props,forwardedRef){var _props24;const $=dist.c(26);let checked,className,disabled,indeterminate,readOnly,restProps,style;$[0]!==props?(_props24=props,{checked,className,disabled,indeterminate,readOnly,style}=_props24,restProps=_objectWithoutProperties(_props24,_excluded42),_props24,$[0]=props,$[1]=checked,$[2]=className,$[3]=disabled,$[4]=indeterminate,$[5]=readOnly,$[6]=restProps,$[7]=style):(checked=$[1],className=$[2],disabled=$[3],indeterminate=$[4],readOnly=$[5],restProps=$[6],style=$[7]);const ref=useRef$1(null);let t0;$[8]===Symbol.for("react.memo_cache_sentinel")?(t0=()=>ref.current,$[8]=t0):t0=$[8],useImperativeHandle(forwardedRef,t0);let t1,t2;$[9]!==indeterminate?(t1=()=>{ref.current&&(ref.current.indeterminate=indeterminate||!1);},t2=[indeterminate],$[9]=indeterminate,$[10]=t1,$[11]=t2):(t1=$[10],t2=$[11]),useEffect$1(t1,t2);const t3=!disabled&&readOnly?"":void 0,t4=indeterminate!==!0&&checked,t5=disabled||readOnly;let t6;$[12]!==restProps||$[13]!==t3||$[14]!==t4||$[15]!==t5?(t6=/* @__PURE__ */jsx(Input$2,_objectSpread(_objectSpread({"data-read-only":t3},restProps),{},{checked:t4,disabled:t5,type:"checkbox",ref})),$[12]=restProps,$[13]=t3,$[14]=t4,$[15]=t5,$[16]=t6):t6=$[16];let t7;$[17]===Symbol.for("react.memo_cache_sentinel")?(t7=/* @__PURE__ */jsx(Track,{}),$[17]=t7):t7=$[17];let t8;$[18]!==checked||$[19]!==indeterminate?(t8=/* @__PURE__ */jsxs(Representation,{"aria-hidden":!0,"data-name":"representation",children:[t7,/* @__PURE__ */jsx(Thumb,{$checked:checked,$indeterminate:indeterminate})]}),$[18]=checked,$[19]=indeterminate,$[20]=t8):t8=$[20];let t9;return $[21]!==className||$[22]!==style||$[23]!==t6||$[24]!==t8?(t9=/* @__PURE__ */jsxs(StyledSwitch,{className,"data-ui":"Switch",style,children:[t6,t8]}),$[21]=className,$[22]=style,$[23]=t6,$[24]=t8,$[25]=t9):t9=$[25],t9;});Switch.displayName="ForwardRef(Switch)";const StyledTextArea=/* @__PURE__ */styled.span.withConfig({displayName:"StyledTextArea",componentId:"sc-1d6h1o8-0"})(textInputRootStyle),InputRoot$1=styled.span.withConfig({displayName:"InputRoot",componentId:"sc-1d6h1o8-1"})(_templateObject47||(_templateObject47=_taggedTemplateLiteral(["flex:1;min-width:0;display:block;position:relative;"]))),Input$1=/* @__PURE__ */styled.textarea.withConfig({displayName:"Input",componentId:"sc-1d6h1o8-2"})(responsiveInputPaddingStyle,textInputBaseStyle,textInputFontSizeStyle),Presentation$1=/* @__PURE__ */styled.div.withConfig({displayName:"Presentation",componentId:"sc-1d6h1o8-3"})(responsiveRadiusStyle,textInputRepresentationStyle),TextArea=forwardRef(function(props,forwardedRef){var _props25;const $=dist.c(35);let __unstable_disableFocusRing,customValidity,restProps,t0,t1,t2,t3,t4,weight;$[0]!==props?(_props25=props,{border:t0,customValidity,disabled:t1,fontSize:t2,padding:t3,radius:t4,weight,__unstable_disableFocusRing}=_props25,restProps=_objectWithoutProperties(_props25,_excluded43),_props25,$[0]=props,$[1]=__unstable_disableFocusRing,$[2]=customValidity,$[3]=restProps,$[4]=t0,$[5]=t1,$[6]=t2,$[7]=t3,$[8]=t4,$[9]=weight):(__unstable_disableFocusRing=$[1],customValidity=$[2],restProps=$[3],t0=$[4],t1=$[5],t2=$[6],t3=$[7],t4=$[8],weight=$[9]);const border2=t0===void 0?!0:t0,disabled=t1===void 0?!1:t1,fontSize2=t2===void 0?2:t2,padding=t3===void 0?3:t3,radius=t4===void 0?2:t4,ref=useRef$1(null),rootTheme=useRootTheme();let t5;$[10]===Symbol.for("react.memo_cache_sentinel")?(t5=()=>ref.current,$[10]=t5):t5=$[10],useImperativeHandle(forwardedRef,t5),useCustomValidity(ref,customValidity);const t6=rootTheme.scheme,t7=rootTheme.tone;let t8;$[11]!==fontSize2?(t8=_getArrayProp(fontSize2),$[11]=fontSize2,$[12]=t8):t8=$[12];let t9;$[13]!==padding?(t9=_getArrayProp(padding),$[13]=padding,$[14]=t9):t9=$[14];const t10=rootTheme.scheme;let t11;$[15]===Symbol.for("react.memo_cache_sentinel")?(t11=_getArrayProp(0),$[15]=t11):t11=$[15];let t12;$[16]!==disabled||$[17]!==restProps||$[18]!==rootTheme.scheme||$[19]!==rootTheme.tone||$[20]!==t8||$[21]!==t9||$[22]!==weight?(t12=/* @__PURE__ */jsx(Input$1,_objectSpread(_objectSpread({"data-as":"textarea","data-scheme":t6,"data-tone":t7},restProps),{},{$fontSize:t8,$padding:t9,$scheme:t10,$space:t11,$tone:rootTheme.tone,$weight:weight,disabled,ref})),$[16]=disabled,$[17]=restProps,$[18]=rootTheme.scheme,$[19]=rootTheme.tone,$[20]=t8,$[21]=t9,$[22]=weight,$[23]=t12):t12=$[23];let t13;$[24]!==radius?(t13=_getArrayProp(radius),$[24]=radius,$[25]=t13):t13=$[25];const t14=border2?"":void 0;let t15;$[26]!==__unstable_disableFocusRing||$[27]!==rootTheme.scheme||$[28]!==rootTheme.tone||$[29]!==t13||$[30]!==t14?(t15=/* @__PURE__ */jsx(Presentation$1,{$radius:t13,$unstableDisableFocusRing:__unstable_disableFocusRing,$scheme:rootTheme.scheme,$tone:rootTheme.tone,"data-border":t14,"data-scheme":rootTheme.scheme,"data-tone":rootTheme.tone}),$[26]=__unstable_disableFocusRing,$[27]=rootTheme.scheme,$[28]=rootTheme.tone,$[29]=t13,$[30]=t14,$[31]=t15):t15=$[31];let t16;return $[32]!==t12||$[33]!==t15?(t16=/* @__PURE__ */jsx(StyledTextArea,{"data-ui":"TextArea",children:/* @__PURE__ */jsxs(InputRoot$1,{children:[t12,t15]})}),$[32]=t12,$[33]=t15,$[34]=t16):t16=$[34],t16;});TextArea.displayName="ForwardRef(TextArea)";const CLEAR_BUTTON_BOX_STYLE={zIndex:2},StyledTextInput=/* @__PURE__ */styled(Card).attrs({forwardedAs:"span"}).withConfig({displayName:"StyledTextInput",componentId:"sc-h62wco-0"})(textInputRootStyle),InputRoot=styled.span.withConfig({displayName:"InputRoot",componentId:"sc-h62wco-1"})(_templateObject48||(_templateObject48=_taggedTemplateLiteral(["flex:1;min-width:0;display:block;position:relative;"]))),Prefix=styled(Card).attrs({forwardedAs:"span"}).withConfig({displayName:"Prefix",componentId:"sc-h62wco-2"})(_templateObject49||(_templateObject49=_taggedTemplateLiteral(["border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}"]))),Suffix=styled(Card).attrs({forwardedAs:"span"}).withConfig({displayName:"Suffix",componentId:"sc-h62wco-3"})(_templateObject50||(_templateObject50=_taggedTemplateLiteral(["border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}"]))),Input=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-h62wco-4"})(responsiveInputPaddingStyle,textInputBaseStyle,textInputFontSizeStyle),Presentation=/* @__PURE__ */styled.span.withConfig({displayName:"Presentation",componentId:"sc-h62wco-5"})(responsiveRadiusStyle,textInputRepresentationStyle),LeftBox=styled(Box).withConfig({displayName:"LeftBox",componentId:"sc-h62wco-6"})(_templateObject51||(_templateObject51=_taggedTemplateLiteral(["position:absolute;top:0;left:0;"]))),RightBox=styled(Box).withConfig({displayName:"RightBox",componentId:"sc-h62wco-7"})(_templateObject52||(_templateObject52=_taggedTemplateLiteral(["position:absolute;top:0;right:0;"]))),RightCard=styled(Card).withConfig({displayName:"RightCard",componentId:"sc-h62wco-8"})(_templateObject53||(_templateObject53=_taggedTemplateLiteral(["background-color:transparent;position:absolute;top:0;right:0;"]))),TextInputClearButton=/* @__PURE__ */styled(Button).withConfig({displayName:"TextInputClearButton",componentId:"sc-h62wco-9"})({"&:not([hidden])":{display:"block"}}),TextInput=forwardRef(function(props,forwardedRef){var _props26;const $=dist.c(92);let IconComponent,IconRightComponent,__unstable_disableFocusRing,clearButton,customValidity,onClear,prefix,readOnly,restProps,suffix,t0,t1,t2,t3,t4,t5,t6,weight;$[0]!==props?(_props26=props,{__unstable_disableFocusRing,border:t0,clearButton,disabled:t1,fontSize:t2,icon:IconComponent,iconRight:IconRightComponent,onClear,padding:t3,prefix,radius:t4,readOnly,space:t5,suffix,customValidity,type:t6,weight}=_props26,restProps=_objectWithoutProperties(_props26,_excluded44),_props26,$[0]=props,$[1]=IconComponent,$[2]=IconRightComponent,$[3]=__unstable_disableFocusRing,$[4]=clearButton,$[5]=customValidity,$[6]=onClear,$[7]=prefix,$[8]=readOnly,$[9]=restProps,$[10]=suffix,$[11]=t0,$[12]=t1,$[13]=t2,$[14]=t3,$[15]=t4,$[16]=t5,$[17]=t6,$[18]=weight):(IconComponent=$[1],IconRightComponent=$[2],__unstable_disableFocusRing=$[3],clearButton=$[4],customValidity=$[5],onClear=$[6],prefix=$[7],readOnly=$[8],restProps=$[9],suffix=$[10],t0=$[11],t1=$[12],t2=$[13],t3=$[14],t4=$[15],t5=$[16],t6=$[17],weight=$[18]);const border2=t0===void 0?!0:t0,disabled=t1===void 0?!1:t1,fontSizeProp=t2===void 0?2:t2,paddingProp=t3===void 0?3:t3,radiusProp=t4===void 0?2:t4,spaceProp=t5===void 0?3:t5,type=t6===void 0?"text":t6,ref=useRef$1(null),rootTheme=useRootTheme();let t7;$[19]!==fontSizeProp?(t7=_getArrayProp(fontSizeProp),$[19]=fontSizeProp,$[20]=t7):t7=$[20];const fontSize2=t7;let t8;$[21]!==paddingProp?(t8=_getArrayProp(paddingProp),$[21]=paddingProp,$[22]=t8):t8=$[22];const padding=t8;let t9;$[23]!==radiusProp?(t9=_getArrayProp(radiusProp),$[23]=radiusProp,$[24]=t9):t9=$[24];const radius=t9;let t10;$[25]!==spaceProp?(t10=_getArrayProp(spaceProp),$[25]=spaceProp,$[26]=t10):t10=$[26];const space=t10,$hasClearButton=!!clearButton,$hasIcon=!!IconComponent,$hasIconRight=!!IconRightComponent,$hasSuffix=!!suffix,$hasPrefix=!!prefix;let t11;$[27]===Symbol.for("react.memo_cache_sentinel")?(t11=()=>ref.current,$[27]=t11):t11=$[27],useImperativeHandle(forwardedRef,t11),useCustomValidity(ref,customValidity);const handleClearMouseDown=_temp$2$1;let t12;$[28]!==onClear?(t12=event_0=>{var _ref$current2;event_0.preventDefault(),event_0.stopPropagation(),onClear&&onClear(),(_ref$current2=ref.current)===null||_ref$current2===void 0?void 0:_ref$current2.focus();},$[28]=onClear,$[29]=t12):t12=$[29];const handleClearClick=t12;let t13;$[30]!==prefix||$[31]!==radius?(t13=prefix&&/* @__PURE__ */jsx(Prefix,{borderTop:!0,borderLeft:!0,borderBottom:!0,radius,sizing:"border",tone:"inherit",children:/* @__PURE__ */jsx("span",{children:prefix})}),$[30]=prefix,$[31]=radius,$[32]=t13):t13=$[32];const prefixNode=t13,t14=border2?"":void 0;let t15;$[33]!==IconComponent||$[34]!==fontSize2||$[35]!==padding?(t15=IconComponent&&/* @__PURE__ */jsx(LeftBox,{padding,children:/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconComponent)&&IconComponent,reactIsExports.isValidElementType(IconComponent)&&/* @__PURE__ */jsx(IconComponent,{})]})}),$[33]=IconComponent,$[34]=fontSize2,$[35]=padding,$[36]=t15):t15=$[36];let t16;$[37]!==$hasClearButton||$[38]!==IconRightComponent||$[39]!==fontSize2||$[40]!==padding?(t16=!$hasClearButton&&IconRightComponent&&/* @__PURE__ */jsx(RightBox,{padding,children:/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconRightComponent)&&IconRightComponent,reactIsExports.isValidElementType(IconRightComponent)&&/* @__PURE__ */jsx(IconRightComponent,{})]})}),$[37]=$hasClearButton,$[38]=IconRightComponent,$[39]=fontSize2,$[40]=padding,$[41]=t16):t16=$[41];let t17;$[42]!==$hasPrefix||$[43]!==$hasSuffix||$[44]!==__unstable_disableFocusRing||$[45]!==radius||$[46]!==rootTheme.scheme||$[47]!==rootTheme.tone||$[48]!==t14||$[49]!==t15||$[50]!==t16?(t17=/* @__PURE__ */jsxs(Presentation,{$hasPrefix,$unstableDisableFocusRing:__unstable_disableFocusRing,$hasSuffix,$radius:radius,$scheme:rootTheme.scheme,$tone:rootTheme.tone,"data-border":t14,"data-scheme":rootTheme.scheme,"data-tone":rootTheme.tone,children:[t15,t16]}),$[42]=$hasPrefix,$[43]=$hasSuffix,$[44]=__unstable_disableFocusRing,$[45]=radius,$[46]=rootTheme.scheme,$[47]=rootTheme.tone,$[48]=t14,$[49]=t15,$[50]=t16,$[51]=t17):t17=$[51];const presentationNode=t17;let t18;$[52]!==padding?(t18=padding.map(_temp2),$[52]=padding,$[53]=t18):t18=$[53];const clearButtonBoxPadding=t18;let t19;$[54]!==padding?(t19=padding.map(_temp3),$[54]=padding,$[55]=t19):t19=$[55];const clearButtonPadding=t19,clearButtonProps=typeof clearButton=="object"?clearButton:EMPTY_RECORD;let t20;$[56]!==clearButton||$[57]!==clearButtonBoxPadding||$[58]!==clearButtonPadding||$[59]!==clearButtonProps||$[60]!==customValidity||$[61]!==disabled||$[62]!==fontSize2||$[63]!==handleClearClick||$[64]!==radius||$[65]!==readOnly?(t20=!disabled&&!readOnly&&clearButton&&/* @__PURE__ */jsx(RightCard,{forwardedAs:"span",padding:clearButtonBoxPadding,style:CLEAR_BUTTON_BOX_STYLE,tone:customValidity?"critical":"inherit",children:/* @__PURE__ */jsx(TextInputClearButton,_objectSpread(_objectSpread({"aria-label":"Clear","data-qa":"clear-button",fontSize:fontSize2,icon:CloseIcon,mode:"bleed",padding:clearButtonPadding,radius},clearButtonProps),{},{onClick:handleClearClick,onMouseDown:handleClearMouseDown}))}),$[56]=clearButton,$[57]=clearButtonBoxPadding,$[58]=clearButtonPadding,$[59]=clearButtonProps,$[60]=customValidity,$[61]=disabled,$[62]=fontSize2,$[63]=handleClearClick,$[64]=radius,$[65]=readOnly,$[66]=t20):t20=$[66];const clearButtonNode=t20;let t21;$[67]!==radius||$[68]!==suffix?(t21=suffix&&/* @__PURE__ */jsx(Suffix,{borderTop:!0,borderRight:!0,borderBottom:!0,radius,sizing:"border",tone:"inherit",children:/* @__PURE__ */jsx("span",{children:suffix})}),$[67]=radius,$[68]=suffix,$[69]=t21):t21=$[69];const suffixNode=t21,t22=$hasIconRight||$hasClearButton;let t23;$[70]!==$hasIcon||$[71]!==disabled||$[72]!==fontSize2||$[73]!==padding||$[74]!==readOnly||$[75]!==restProps||$[76]!==rootTheme.scheme||$[77]!==rootTheme.tone||$[78]!==space||$[79]!==t22||$[80]!==type||$[81]!==weight?(t23=/* @__PURE__ */jsx(Input,_objectSpread(_objectSpread({"data-as":"input","data-scheme":rootTheme.scheme,"data-tone":rootTheme.tone},restProps),{},{$fontSize:fontSize2,$iconLeft:$hasIcon,$iconRight:t22,$padding:padding,$scheme:rootTheme.scheme,$space:space,$tone:rootTheme.tone,$weight:weight,disabled,readOnly,ref,type})),$[70]=$hasIcon,$[71]=disabled,$[72]=fontSize2,$[73]=padding,$[74]=readOnly,$[75]=restProps,$[76]=rootTheme.scheme,$[77]=rootTheme.tone,$[78]=space,$[79]=t22,$[80]=type,$[81]=weight,$[82]=t23):t23=$[82];let t24;$[83]!==clearButtonNode||$[84]!==presentationNode||$[85]!==t23?(t24=/* @__PURE__ */jsxs(InputRoot,{children:[t23,presentationNode,clearButtonNode]}),$[83]=clearButtonNode,$[84]=presentationNode,$[85]=t23,$[86]=t24):t24=$[86];let t25;return $[87]!==prefixNode||$[88]!==rootTheme.tone||$[89]!==suffixNode||$[90]!==t24?(t25=/* @__PURE__ */jsxs(StyledTextInput,{"data-ui":"TextInput",tone:rootTheme.tone,children:[prefixNode,t24,suffixNode]}),$[87]=prefixNode,$[88]=rootTheme.tone,$[89]=suffixNode,$[90]=t24,$[91]=t25):t25=$[91],t25;});TextInput.displayName="ForwardRef(TextInput)";function _temp$2$1(event){event.preventDefault(),event.stopPropagation();}function _temp2(v){return v===0?0:v===1||v===2?1:v-2;}function _temp3(v_0){return v_0===0||v_0===1?0:v_0===2?1:v_0-1;}function useDelayedState(initialState){const $=dist.c(3),[state,setState]=useState(initialState),delayedAction=useRef$1(void 0);let t0;$[0]===Symbol.for("react.memo_cache_sentinel")?(t0=(nextState,delay)=>{const action=()=>{setState(nextState);};if(delayedAction.current&&(clearTimeout(delayedAction.current),delayedAction.current=void 0),!delay)return action();delayedAction.current=setTimeout(action,delay);},$[0]=t0):t0=$[0];const onStateChange=t0;let t1;return $[1]!==state?(t1=[state,onStateChange],$[1]=state,$[2]=t1):t1=$[2],t1;}const DEFAULT_TOOLTIP_ARROW_WIDTH=15,DEFAULT_TOOLTIP_ARROW_HEIGHT=6,DEFAULT_TOOLTIP_ARROW_RADIUS=2,DEFAULT_TOOLTIP_DISTANCE=4,DEFAULT_TOOLTIP_PADDING=4,DEFAULT_FALLBACK_PLACEMENTS={top:["top-end","top-start","bottom","left","right"],"top-start":["top","top-end","bottom-start","left-start","right-start"],"top-end":["top","top-start","bottom-end","left-end","right-end"],bottom:["bottom-end","bottom-start","top","left","right"],"bottom-start":["bottom","bottom-end","top-start","left-start","right-start"],"bottom-end":["bottom","bottom-start","top-end","left-end","right-end"],left:["left-end","left-start","right","top","bottom"],"left-start":["left","left-end","right-start","top-start","bottom-start"],"left-end":["left","left-start","right-end","top-end","bottom-end"],right:["right-end","right-start","left","top","bottom"],"right-start":["right","right-end","left-start","top-start","bottom-start"],"right-end":["right","right-start","left-end","top-end","bottom-end"]},MotionCard=styled(motion.create(Card)).withConfig({displayName:"MotionCard",componentId:"sc-1xn138w-0"})(_templateObject54||(_templateObject54=_taggedTemplateLiteral(["will-change:transform;"]))),TooltipCard=forwardRef(function(props,ref){var _props27;const $=dist.c(48);let animate,arrow2,arrowRef,arrowX,arrowY,children,originX,originY,padding,placement,radius,restProps,scheme,shadow,style;$[0]!==props?(_props27=props,{animate,arrow:arrow2,arrowRef,arrowX,arrowY,children,originX,originY,padding,placement,radius,scheme,shadow,style}=_props27,restProps=_objectWithoutProperties(_props27,_excluded45),_props27,$[0]=props,$[1]=animate,$[2]=arrow2,$[3]=arrowRef,$[4]=arrowX,$[5]=arrowY,$[6]=children,$[7]=originX,$[8]=originY,$[9]=padding,$[10]=placement,$[11]=radius,$[12]=restProps,$[13]=scheme,$[14]=shadow,$[15]=style):(animate=$[1],arrow2=$[2],arrowRef=$[3],arrowX=$[4],arrowY=$[5],children=$[6],originX=$[7],originY=$[8],padding=$[9],placement=$[10],radius=$[11],restProps=$[12],scheme=$[13],shadow=$[14],style=$[15]);const t0=animate?"transform":void 0;let t1;$[16]!==originX||$[17]!==originY||$[18]!==style||$[19]!==t0?(t1=_objectSpread({originX,originY,willChange:t0},style),$[16]=originX,$[17]=originY,$[18]=style,$[19]=t0,$[20]=t1):t1=$[20];const rootStyle2=t1,t2=arrowX!==null?arrowX:void 0,t3=arrowY!==null?arrowY:void 0;let t4;$[21]!==t2||$[22]!==t3?(t4={left:t2,top:t3,right:void 0,bottom:void 0},$[21]=t2,$[22]=t3,$[23]=t4):t4=$[23];const arrowStyle=t4,t5=restProps;let t6;$[24]!==animate?(t6=animate?["hidden","initial"]:void 0,$[24]=animate,$[25]=t6):t6=$[25];let t7;$[26]!==animate?(t7=animate?["visible","scaleIn"]:void 0,$[26]=animate,$[27]=t7):t7=$[27];let t8;$[28]!==animate?(t8=animate?["hidden","scaleOut"]:void 0,$[28]=animate,$[29]=t8):t8=$[29];let t9;$[30]!==arrow2||$[31]!==arrowRef||$[32]!==arrowStyle?(t9=arrow2&&/* @__PURE__ */jsx(Arrow,{ref:arrowRef,style:arrowStyle,width:DEFAULT_TOOLTIP_ARROW_WIDTH,height:DEFAULT_TOOLTIP_ARROW_HEIGHT,radius:DEFAULT_TOOLTIP_ARROW_RADIUS}),$[30]=arrow2,$[31]=arrowRef,$[32]=arrowStyle,$[33]=t9):t9=$[33];let t10;return $[34]!==children||$[35]!==padding||$[36]!==placement||$[37]!==radius||$[38]!==ref||$[39]!==rootStyle2||$[40]!==scheme||$[41]!==shadow||$[42]!==t5||$[43]!==t6||$[44]!==t7||$[45]!==t8||$[46]!==t9?(t10=/* @__PURE__ */jsxs(MotionCard,_objectSpread(_objectSpread({"data-ui":"Tooltip__card"},t5),{},{"data-placement":placement,padding,radius,ref,scheme,shadow,style:rootStyle2,variants:POPOVER_MOTION_PROPS.card,transition:POPOVER_MOTION_PROPS.transition,initial:t6,animate:t7,exit:t8,children:[children,t9]})),$[34]=children,$[35]=padding,$[36]=placement,$[37]=radius,$[38]=ref,$[39]=rootStyle2,$[40]=scheme,$[41]=shadow,$[42]=t5,$[43]=t6,$[44]=t7,$[45]=t8,$[46]=t9,$[47]=t10):t10=$[47],t10;});TooltipCard.displayName="ForwardRef(TooltipCard)";const TooltipDelayGroupContext=createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup",null);function useTooltipDelayGroup(){return useContext(TooltipDelayGroupContext);}const StyledTooltip=styled(Layer).withConfig({displayName:"StyledTooltip",componentId:"sc-13f2zvh-0"})(_templateObject55||(_templateObject55=_taggedTemplateLiteral(["pointer-events:none;"]))),Tooltip=forwardRef(function(props,forwardedRef){var _props28,_props$placement2,_portal$elements2,_middlewareData$arrow4,_middlewareData$arrow5,_middlewareData$Sani3,_middlewareData$Sani4,_delay2,_delay3,_childProp,_childProp3,_childProp4,_childProp6,_childProp7,_childProp9,_childProp0,_childProp10,_childProp11,_childProp13,_childProp14,_childProp16;const $=dist.c(137),boundaryElementContext=useBoundaryElement(),{layer}=useTheme_v2();let _boundaryElement,_fallbackPlacementsProp,_zOffset,childProp,content,delay,disabled,portalProp,restProps,scheme,t0,t1,t2,t3,t4,t5;$[0]!==props?(_props28=props,{animate:t0,arrow:t1,boundaryElement:_boundaryElement,children:childProp,content,disabled,fallbackPlacements:_fallbackPlacementsProp,padding:t2,placement:t3,portal:portalProp,radius:t4,scheme,shadow:t5,zOffset:_zOffset,delay}=_props28,restProps=_objectWithoutProperties(_props28,_excluded46),_props28,$[0]=props,$[1]=_boundaryElement,$[2]=_fallbackPlacementsProp,$[3]=_zOffset,$[4]=childProp,$[5]=content,$[6]=delay,$[7]=disabled,$[8]=portalProp,$[9]=restProps,$[10]=scheme,$[11]=t0,$[12]=t1,$[13]=t2,$[14]=t3,$[15]=t4,$[16]=t5):(_boundaryElement=$[1],_fallbackPlacementsProp=$[2],_zOffset=$[3],childProp=$[4],content=$[5],delay=$[6],disabled=$[7],portalProp=$[8],restProps=$[9],scheme=$[10],t0=$[11],t1=$[12],t2=$[13],t3=$[14],t4=$[15],t5=$[16]);const _animate=t0===void 0?!1:t0,arrowProp=t1===void 0?!1:t1,padding=t2===void 0?2:t2,placementProp=t3===void 0?"bottom":t3,radius=t4===void 0?2:t4,shadow=t5===void 0?2:t5,boundaryElement=_boundaryElement!==null&&_boundaryElement!==void 0?_boundaryElement:boundaryElementContext===null||boundaryElementContext===void 0?void 0:boundaryElementContext.element,fallbackPlacementsProp=_fallbackPlacementsProp!==null&&_fallbackPlacementsProp!==void 0?_fallbackPlacementsProp:DEFAULT_FALLBACK_PLACEMENTS[(_props$placement2=props.placement)!==null&&_props$placement2!==void 0?_props$placement2:"bottom"],zOffset=_zOffset!==null&&_zOffset!==void 0?_zOffset:layer.tooltip.zOffset,animate=usePrefersReducedMotion()?!1:_animate;let t6;$[17]!==fallbackPlacementsProp?(t6=_getArrayProp(fallbackPlacementsProp),$[17]=fallbackPlacementsProp,$[18]=t6):t6=$[18];const fallbackPlacements=t6,ref=useRef$1(null),[referenceElement,setReferenceElement]=useState(null),arrowRef=useRef$1(null),[tooltipMaxWidth,setTooltipMaxWidth]=useState(0);let t7;$[19]===Symbol.for("react.memo_cache_sentinel")?(t7=()=>ref.current,$[19]=t7):t7=$[19],useImperativeHandle(forwardedRef,t7);const portal=usePortal(),portalElement=typeof portalProp=="string"?((_portal$elements2=portal.elements)===null||_portal$elements2===void 0?void 0:_portal$elements2[portalProp])||null:portal.element;let t8;$[20]!==animate||$[21]!==arrowProp||$[22]!==boundaryElement||$[23]!==fallbackPlacements?(t8={animate,arrowProp,arrowRef,boundaryElement,fallbackPlacements,rootBoundary:"viewport"},$[20]=animate,$[21]=arrowProp,$[22]=boundaryElement,$[23]=fallbackPlacements,$[24]=t8):t8=$[24];const middleware=useMiddleware(t8);let t9;$[25]!==referenceElement?(t9={reference:referenceElement},$[25]=referenceElement,$[26]=t9):t9=$[26];let t10;$[27]!==middleware||$[28]!==placementProp||$[29]!==t9?(t10={middleware,placement:placementProp,whileElementsMounted:autoUpdate,elements:t9},$[27]=middleware,$[28]=placementProp,$[29]=t9,$[30]=t10):t10=$[30];const{floatingStyles,placement,middlewareData,refs,update}=useFloating(t10),arrowX=(_middlewareData$arrow4=middlewareData.arrow)===null||_middlewareData$arrow4===void 0?void 0:_middlewareData$arrow4.x,arrowY=(_middlewareData$arrow5=middlewareData.arrow)===null||_middlewareData$arrow5===void 0?void 0:_middlewareData$arrow5.y,originX=(_middlewareData$Sani3=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani3===void 0?void 0:_middlewareData$Sani3.originX,originY=(_middlewareData$Sani4=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani4===void 0?void 0:_middlewareData$Sani4.originY,tooltipId=useId(),[isOpen,setIsOpen]=useDelayedState(!1),delayGroupContext=useTooltipDelayGroup();let t11;$[31]!==delayGroupContext?(t11=delayGroupContext||{},$[31]=delayGroupContext,$[32]=t11):t11=$[32];const{setIsGroupActive,setOpenTooltipId}=t11,showTooltip=isOpen||(delayGroupContext===null||delayGroupContext===void 0?void 0:delayGroupContext.openTooltipId)===tooltipId,isInsideGroup=delayGroupContext!==null,openDelayProp=typeof delay=="number"?delay:((_delay2=delay)===null||_delay2===void 0?void 0:_delay2.open)||0,closeDelayProp=typeof delay=="number"?delay:((_delay3=delay)===null||_delay3===void 0?void 0:_delay3.close)||0,openDelay=isInsideGroup?delayGroupContext.openDelay:openDelayProp,closeDelay=isInsideGroup?delayGroupContext.closeDelay:closeDelayProp;let t12;$[33]!==closeDelay||$[34]!==isInsideGroup||$[35]!==openDelay||$[36]!==setIsGroupActive||$[37]!==setIsOpen||$[38]!==setOpenTooltipId||$[39]!==tooltipId?(t12=(open,immediate)=>{if(isInsideGroup){if(open){const groupedOpenDelay=immediate?0:openDelay;setIsGroupActive!==null&&setIsGroupActive!==void 0&&setIsGroupActive(open,groupedOpenDelay),setOpenTooltipId===null||setOpenTooltipId===void 0?void 0:setOpenTooltipId(tooltipId,groupedOpenDelay);}else{const groupDeactivateDelay=closeDelay>200?closeDelay:200;setIsGroupActive!==null&&setIsGroupActive!==void 0&&setIsGroupActive(open,groupDeactivateDelay),setOpenTooltipId===null||setOpenTooltipId===void 0?void 0:setOpenTooltipId(null,immediate?0:closeDelay);}}else setIsOpen(open,immediate?0:open?openDelay:closeDelay);},$[33]=closeDelay,$[34]=isInsideGroup,$[35]=openDelay,$[36]=setIsGroupActive,$[37]=setIsOpen,$[38]=setOpenTooltipId,$[39]=tooltipId,$[40]=t12):t12=$[40];const handleIsOpenChange=t12;let t13;$[41]!==((_childProp=childProp)===null||_childProp===void 0?void 0:_childProp.props)||$[42]!==handleIsOpenChange?(t13=e=>{var _childProp2,_childProp2$onBlur;handleIsOpenChange(!1),(_childProp2=childProp)===null||_childProp2===void 0||(_childProp2=_childProp2.props)===null||_childProp2===void 0||(_childProp2$onBlur=_childProp2.onBlur)===null||_childProp2$onBlur===void 0?void 0:_childProp2$onBlur.call(_childProp2,e);},$[41]=(_childProp3=childProp)===null||_childProp3===void 0?void 0:_childProp3.props,$[42]=handleIsOpenChange,$[43]=t13):t13=$[43];const handleBlur=t13;let t14;$[44]!==((_childProp4=childProp)===null||_childProp4===void 0?void 0:_childProp4.props)||$[45]!==handleIsOpenChange?(t14=e_0=>{var _childProp5,_childProp5$props$onC,_childProp5$props;handleIsOpenChange(!1,!0),(_childProp5=childProp)===null||_childProp5===void 0||(_childProp5$props$onC=(_childProp5$props=_childProp5.props).onClick)===null||_childProp5$props$onC===void 0?void 0:_childProp5$props$onC.call(_childProp5$props,e_0);},$[44]=(_childProp6=childProp)===null||_childProp6===void 0?void 0:_childProp6.props,$[45]=handleIsOpenChange,$[46]=t14):t14=$[46];const handleClick=t14;let t15;$[47]!==((_childProp7=childProp)===null||_childProp7===void 0?void 0:_childProp7.props)||$[48]!==handleIsOpenChange?(t15=e_1=>{var _childProp8,_childProp8$props$onC,_childProp8$props;handleIsOpenChange(!1,!0),(_childProp8=childProp)===null||_childProp8===void 0||(_childProp8$props$onC=(_childProp8$props=_childProp8.props).onContextMenu)===null||_childProp8$props$onC===void 0?void 0:_childProp8$props$onC.call(_childProp8$props,e_1);},$[47]=(_childProp9=childProp)===null||_childProp9===void 0?void 0:_childProp9.props,$[48]=handleIsOpenChange,$[49]=t15):t15=$[49];const handleContextMenu=t15;let t16;$[50]!==((_childProp0=childProp)===null||_childProp0===void 0?void 0:_childProp0.props)||$[51]!==handleIsOpenChange?(t16=e_2=>{var _childProp1,_childProp1$onFocus;handleIsOpenChange(!0),(_childProp1=childProp)===null||_childProp1===void 0||(_childProp1=_childProp1.props)===null||_childProp1===void 0||(_childProp1$onFocus=_childProp1.onFocus)===null||_childProp1$onFocus===void 0?void 0:_childProp1$onFocus.call(_childProp1,e_2);},$[50]=(_childProp10=childProp)===null||_childProp10===void 0?void 0:_childProp10.props,$[51]=handleIsOpenChange,$[52]=t16):t16=$[52];const handleFocus=t16;let t17;$[53]!==((_childProp11=childProp)===null||_childProp11===void 0?void 0:_childProp11.props)||$[54]!==handleIsOpenChange?(t17=e_3=>{var _childProp12,_childProp12$onMouseE;handleIsOpenChange(!0),(_childProp12=childProp)===null||_childProp12===void 0||(_childProp12=_childProp12.props)===null||_childProp12===void 0||(_childProp12$onMouseE=_childProp12.onMouseEnter)===null||_childProp12$onMouseE===void 0?void 0:_childProp12$onMouseE.call(_childProp12,e_3);},$[53]=(_childProp13=childProp)===null||_childProp13===void 0?void 0:_childProp13.props,$[54]=handleIsOpenChange,$[55]=t17):t17=$[55];const handleMouseEnter=t17;let t18;$[56]!==((_childProp14=childProp)===null||_childProp14===void 0?void 0:_childProp14.props)||$[57]!==handleIsOpenChange?(t18=e_4=>{var _childProp15,_childProp15$onMouseL;handleIsOpenChange(!1),(_childProp15=childProp)===null||_childProp15===void 0||(_childProp15=_childProp15.props)===null||_childProp15===void 0||(_childProp15$onMouseL=_childProp15.onMouseLeave)===null||_childProp15$onMouseL===void 0?void 0:_childProp15$onMouseL.call(_childProp15,e_4);},$[56]=(_childProp16=childProp)===null||_childProp16===void 0?void 0:_childProp16.props,$[57]=handleIsOpenChange,$[58]=t18):t18=$[58];const handleMouseLeave=t18;let t19;$[59]!==handleIsOpenChange||$[60]!==isInsideGroup||$[61]!==referenceElement||$[62]!==showTooltip?(t19={handleIsOpenChange,referenceElement,showTooltip,isInsideGroup},$[59]=handleIsOpenChange,$[60]=isInsideGroup,$[61]=referenceElement,$[62]=showTooltip,$[63]=t19):t19=$[63],useCloseOnMouseLeave(t19);let t20,t21;$[64]!==disabled||$[65]!==handleIsOpenChange||$[66]!==showTooltip?(t20=()=>{disabled&&showTooltip&&handleIsOpenChange(!1);},t21=[disabled,handleIsOpenChange,showTooltip],$[64]=disabled,$[65]=handleIsOpenChange,$[66]=showTooltip,$[67]=t20,$[68]=t21):(t20=$[67],t21=$[68]),useEffect$1(t20,t21);let t22,t23;$[69]!==content||$[70]!==handleIsOpenChange||$[71]!==showTooltip?(t22=()=>{!content&&showTooltip&&handleIsOpenChange(!1);},t23=[content,handleIsOpenChange,showTooltip],$[69]=content,$[70]=handleIsOpenChange,$[71]=showTooltip,$[72]=t22,$[73]=t23):(t22=$[72],t23=$[73]),useEffect$1(t22,t23);let t24,t25;$[74]!==handleIsOpenChange||$[75]!==showTooltip?(t24=()=>{if(!showTooltip)return;const handleWindowKeyDown=function(event){event.key==="Escape"&&handleIsOpenChange(!1,!0);};return window.addEventListener("keydown",handleWindowKeyDown),()=>{window.removeEventListener("keydown",handleWindowKeyDown);};},t25=[handleIsOpenChange,showTooltip],$[74]=handleIsOpenChange,$[75]=showTooltip,$[76]=t24,$[77]=t25):(t24=$[76],t25=$[77]),useEffect$1(t24,t25);let t26;$[78]!==boundaryElement||$[79]!==(portalElement===null||portalElement===void 0?void 0:portalElement.offsetWidth)?(t26=()=>{const availableWidths=[...(boundaryElement?[boundaryElement.offsetWidth]:[]),(portalElement===null||portalElement===void 0?void 0:portalElement.offsetWidth)||document.body.offsetWidth];setTooltipMaxWidth(Math.min(...availableWidths)-DEFAULT_TOOLTIP_PADDING*2);},$[78]=boundaryElement,$[79]=portalElement===null||portalElement===void 0?void 0:portalElement.offsetWidth,$[80]=t26):t26=$[80];let t27;$[81]!==boundaryElement||$[82]!==portalElement?(t27=[boundaryElement,portalElement],$[81]=boundaryElement,$[82]=portalElement,$[83]=t27):t27=$[83],useLayoutEffect(t26,t27);let t28;$[84]!==update?(t28=arrowEl=>{arrowRef.current=arrowEl,update();},$[84]=update,$[85]=t28):t28=$[85];const setArrow=t28;let t29;$[86]!==refs?(t29=node=>{ref.current=node,refs.setFloating(node);},$[86]=refs,$[87]=t29):t29=$[87];const setFloating=t29;let t30;bb0:{if(!childProp){t30=null;break bb0;}let t312;$[88]!==childProp||$[89]!==handleBlur||$[90]!==handleClick||$[91]!==handleContextMenu||$[92]!==handleFocus||$[93]!==handleMouseEnter||$[94]!==handleMouseLeave?(t312=cloneElement(childProp,{onBlur:handleBlur,onFocus:handleFocus,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,onContextMenu:handleContextMenu,ref:setReferenceElement}),$[88]=childProp,$[89]=handleBlur,$[90]=handleClick,$[91]=handleContextMenu,$[92]=handleFocus,$[93]=handleMouseEnter,$[94]=handleMouseLeave,$[95]=t312):t312=$[95],t30=t312;}const child=t30;let t31;$[96]!==childProp?(t31=childProp?getElementRef(childProp):null,$[96]=childProp,$[97]=t31):t31=$[97];let t32,t33;if($[98]!==referenceElement?(t32=()=>referenceElement,t33=[referenceElement],$[98]=referenceElement,$[99]=t32,$[100]=t33):(t32=$[99],t33=$[100]),useImperativeHandle(t31,t32,t33),!child){let t342;return $[101]===Symbol.for("react.memo_cache_sentinel")?(t342=/* @__PURE__ */jsx(Fragment,{}),$[101]=t342):t342=$[101],t342;}if(disabled)return child;const t34=tooltipMaxWidth>0?"".concat(tooltipMaxWidth,"px"):void 0;let t35;$[102]!==floatingStyles||$[103]!==t34?(t35=_objectSpread(_objectSpread({},floatingStyles),{},{maxWidth:t34}),$[102]=floatingStyles,$[103]=t34,$[104]=t35):t35=$[104];let t36;$[105]!==animate||$[106]!==arrowProp||$[107]!==arrowX||$[108]!==arrowY||$[109]!==content||$[110]!==originX||$[111]!==originY||$[112]!==padding||$[113]!==placement||$[114]!==radius||$[115]!==restProps||$[116]!==scheme||$[117]!==setArrow||$[118]!==setFloating||$[119]!==shadow?(t36=/* @__PURE__ */jsx(TooltipCard,_objectSpread(_objectSpread({},restProps),{},{animate,arrow:arrowProp,arrowRef:setArrow,arrowX,arrowY,originX,originY,padding,placement,radius,ref:setFloating,scheme,shadow,children:content})),$[105]=animate,$[106]=arrowProp,$[107]=arrowX,$[108]=arrowY,$[109]=content,$[110]=originX,$[111]=originY,$[112]=padding,$[113]=placement,$[114]=radius,$[115]=restProps,$[116]=scheme,$[117]=setArrow,$[118]=setFloating,$[119]=shadow,$[120]=t36):t36=$[120];let t37;$[121]!==restProps||$[122]!==setFloating||$[123]!==t35||$[124]!==t36||$[125]!==zOffset?(t37=/* @__PURE__ */jsx(StyledTooltip,_objectSpread(_objectSpread({"data-ui":"Tooltip"},restProps),{},{ref:setFloating,style:t35,zOffset,children:t36})),$[121]=restProps,$[122]=setFloating,$[123]=t35,$[124]=t36,$[125]=zOffset,$[126]=t37):t37=$[126];const tooltip=t37;let t38;$[127]!==portalProp||$[128]!==showTooltip||$[129]!==tooltip?(t38=showTooltip&&(portalProp?/* @__PURE__ */jsx(Portal,{__unstable_name:typeof portalProp=="string"?portalProp:void 0,children:tooltip}):tooltip),$[127]=portalProp,$[128]=showTooltip,$[129]=tooltip,$[130]=t38):t38=$[130];const children=t38;let t39;$[131]!==animate||$[132]!==children?(t39=animate?/* @__PURE__ */jsx(AnimatePresence,{children}):children,$[131]=animate,$[132]=children,$[133]=t39):t39=$[133];let t40;return $[134]!==child||$[135]!==t39?(t40=/* @__PURE__ */jsxs(Fragment,{children:[t39,child]}),$[134]=child,$[135]=t39,$[136]=t40):t40=$[136],t40;});Tooltip.displayName="ForwardRef(Tooltip)";function useMiddleware(t0){const $=dist.c(17),{animate,arrowProp,arrowRef,boundaryElement,fallbackPlacements,rootBoundary}=t0;let ret;if($[0]!==animate||$[1]!==arrowProp||$[2]!==arrowRef||$[3]!==boundaryElement||$[4]!==fallbackPlacements||$[5]!==rootBoundary){ret=[];const t1=boundaryElement||void 0;let t2;$[7]!==fallbackPlacements||$[8]!==rootBoundary||$[9]!==t1?(t2=flip({boundary:t1,fallbackPlacements,padding:DEFAULT_TOOLTIP_PADDING,rootBoundary}),$[7]=fallbackPlacements,$[8]=rootBoundary,$[9]=t1,$[10]=t2):t2=$[10],ret.push(t2);let t3;$[11]===Symbol.for("react.memo_cache_sentinel")?(t3=offset({mainAxis:DEFAULT_TOOLTIP_DISTANCE}),$[11]=t3):t3=$[11],ret.push(t3);const t4=boundaryElement||void 0;let t5;if($[12]!==rootBoundary||$[13]!==t4?(t5=shift({boundary:t4,rootBoundary,padding:DEFAULT_TOOLTIP_PADDING}),$[12]=rootBoundary,$[13]=t4,$[14]=t5):t5=$[14],ret.push(t5),arrowProp){let t6;$[15]!==arrowRef?(t6=arrow({element:arrowRef,padding:DEFAULT_TOOLTIP_PADDING}),$[15]=arrowRef,$[16]=t6):t6=$[16],ret.push(t6);}animate&&ret.push(origin),$[0]=animate,$[1]=arrowProp,$[2]=arrowRef,$[3]=boundaryElement,$[4]=fallbackPlacements,$[5]=rootBoundary,$[6]=ret;}else ret=$[6];return ret;}function useCloseOnMouseLeave(t0){const $=dist.c(10),{handleIsOpenChange,referenceElement,showTooltip,isInsideGroup}=t0;let t1;$[0]!==handleIsOpenChange||$[1]!==referenceElement?(t1=(target,teardown)=>{referenceElement&&(referenceElement===target||target instanceof Node&&referenceElement.contains(target)||(handleIsOpenChange(!1),teardown()));},$[0]=handleIsOpenChange,$[1]=referenceElement,$[2]=t1):t1=$[2];const onMouseMove=useEffectEvent(t1);let t2;$[3]!==isInsideGroup||$[4]!==onMouseMove||$[5]!==showTooltip?(t2=()=>{if(!showTooltip||isInsideGroup)return;const handleMouseMove=event=>{onMouseMove(event.target,()=>window.removeEventListener("mousemove",handleMouseMove));};return window.addEventListener("mousemove",handleMouseMove),()=>window.removeEventListener("mousemove",handleMouseMove);},$[3]=isInsideGroup,$[4]=onMouseMove,$[5]=showTooltip,$[6]=t2):t2=$[6];let t3;$[7]!==isInsideGroup||$[8]!==showTooltip?(t3=[isInsideGroup,showTooltip],$[7]=isInsideGroup,$[8]=showTooltip,$[9]=t3):t3=$[9],useEffect$1(t2,t3);}const StyledHotkeys=styled.kbd.withConfig({displayName:"StyledHotkeys",componentId:"sc-b37mge-0"})(_templateObject56||(_templateObject56=_taggedTemplateLiteral(["font:inherit;padding:1px;&:not([hidden]){display:block;}"]))),Key=styled(KBD).withConfig({displayName:"Key",componentId:"sc-b37mge-1"})(_templateObject57||(_templateObject57=_taggedTemplateLiteral(["&:not([hidden]){display:block;}"]))),Hotkeys=forwardRef(function(props,ref){var _props29;const $=dist.c(26);let fontSize2,keys,padding,radius,restProps,t0;$[0]!==props?(_props29=props,{fontSize:fontSize2,keys,padding,radius,space:t0}=_props29,restProps=_objectWithoutProperties(_props29,_excluded47),_props29,$[0]=props,$[1]=fontSize2,$[2]=keys,$[3]=padding,$[4]=radius,$[5]=restProps,$[6]=t0):(fontSize2=$[1],keys=$[2],padding=$[3],radius=$[4],restProps=$[5],t0=$[6]);const spaceProp=t0===void 0?0.5:t0;let t1;$[7]!==spaceProp?(t1=_getArrayProp(spaceProp),$[7]=spaceProp,$[8]=t1):t1=$[8];const space=t1;if(!keys||keys.length===0){let t22;return $[9]===Symbol.for("react.memo_cache_sentinel")?(t22=/* @__PURE__ */jsx(Fragment,{}),$[9]=t22):t22=$[9],t22;}let t2;if($[10]!==fontSize2||$[11]!==keys||$[12]!==padding||$[13]!==radius){let t32;$[15]!==fontSize2||$[16]!==padding||$[17]!==radius?(t32=(key2,i)=>/* @__PURE__ */jsx(Key,{fontSize:fontSize2,padding,radius,children:key2},i),$[15]=fontSize2,$[16]=padding,$[17]=radius,$[18]=t32):t32=$[18],t2=keys.map(t32),$[10]=fontSize2,$[11]=keys,$[12]=padding,$[13]=radius,$[14]=t2;}else t2=$[14];let t3;$[19]!==space||$[20]!==t2?(t3=/* @__PURE__ */jsx(Inline,{as:"span",space,children:t2}),$[19]=space,$[20]=t2,$[21]=t3):t3=$[21];let t4;return $[22]!==ref||$[23]!==restProps||$[24]!==t3?(t4=/* @__PURE__ */jsx(StyledHotkeys,_objectSpread(_objectSpread({"data-ui":"Hotkeys"},restProps),{},{ref,children:t3})),$[22]=ref,$[23]=restProps,$[24]=t3,$[25]=t4):t4=$[25],t4;});Hotkeys.displayName="ForwardRef(Hotkeys)";const MenuContext=createGlobalScopedContext("@sanity/ui/context/menu",null);function _isFocusable(element){return isHTMLAnchorElement(element)&&element.getAttribute("data-disabled")!=="true"||isHTMLButtonElement(element)&&!element.disabled;}function _getFocusableElements(elements){return elements.filter(_isFocusable);}function _getDOMPath(rootElement,el){const path=[];let e=el;for(;e!==rootElement;){const parentElement=e.parentElement;if(!parentElement)return path;const index=Array.from(parentElement.childNodes).indexOf(e);if(path.unshift(index),parentElement===rootElement)return path;e=parentElement;}return path;}const EMPTY_PATH=[];function _sortElements(rootElement,elements){if(!rootElement)return;const map=/* @__PURE__ */new WeakMap();for(const el of elements)map.set(el,_getDOMPath(rootElement,el));const _sort=(a,b)=>{const _a=map.get(a)||EMPTY_PATH,_b=map.get(b)||EMPTY_PATH,len=Math.max(_a.length,_b.length);for(let i=0;i<len;i+=1){const aIndex=_a[i]||-1,bIndex=_b[i]||-1;if(aIndex!==bIndex)return aIndex-bIndex;}return 0;};elements.sort(_sort);}function useMenuController(props){const $=dist.c(21),{onKeyDown,originElement,shouldFocus,rootElementRef}=props;let t0;$[0]===Symbol.for("react.memo_cache_sentinel")?(t0=[],$[0]=t0):t0=$[0];const elementsRef=useRef$1(t0),[activeIndex,_setActiveIndex]=useState(-1),activeIndexRef=useRef$1(activeIndex),[activeElement,setActiveElement]=useState(null);let t1;$[1]===Symbol.for("react.memo_cache_sentinel")?(t1=nextActiveIndex=>{_setActiveIndex(nextActiveIndex),activeIndexRef.current=nextActiveIndex,setActiveElement(elementsRef.current[nextActiveIndex]||null);},$[1]=t1):t1=$[1];const setActiveIndex=t1;let t2;$[2]!==rootElementRef?(t2=(element,selected)=>{if(!element)return _temp$1;if(elementsRef.current.indexOf(element)===-1&&(elementsRef.current.push(element),_sortElements(rootElementRef.current,elementsRef.current)),selected){const selectedIndex=elementsRef.current.indexOf(element);setActiveIndex(selectedIndex);}return()=>{const idx=elementsRef.current.indexOf(element);idx>-1&&elementsRef.current.splice(idx,1);};},$[2]=rootElementRef,$[3]=t2):t2=$[3];const mount=t2;let t3;$[4]!==onKeyDown||$[5]!==originElement?(t3=event=>{if(event.key==="Tab"){originElement&&originElement.focus();return;}if(event.key==="Home"){event.preventDefault(),event.stopPropagation();const el=_getFocusableElements(elementsRef.current)[0];if(!el)return;const currentIndex=elementsRef.current.indexOf(el);setActiveIndex(currentIndex);return;}if(event.key==="End"){event.preventDefault(),event.stopPropagation();const focusableElements_0=_getFocusableElements(elementsRef.current),el_0=focusableElements_0[focusableElements_0.length-1];if(!el_0)return;const currentIndex_0=elementsRef.current.indexOf(el_0);setActiveIndex(currentIndex_0);return;}if(event.key==="ArrowUp"){event.preventDefault(),event.stopPropagation();const focusableElements_1=_getFocusableElements(elementsRef.current),focusableLen=focusableElements_1.length;if(focusableLen===0)return;const focusedElement=elementsRef.current[activeIndexRef.current];let focusedIndex=focusableElements_1.indexOf(focusedElement);focusedIndex=(focusedIndex-1+focusableLen)%focusableLen;const el_1=focusableElements_1[focusedIndex],currentIndex_1=elementsRef.current.indexOf(el_1);setActiveIndex(currentIndex_1);return;}if(event.key==="ArrowDown"){event.preventDefault(),event.stopPropagation();const focusableElements_2=_getFocusableElements(elementsRef.current),focusableLen_0=focusableElements_2.length;if(focusableLen_0===0)return;const focusedElement_0=elementsRef.current[activeIndexRef.current];let focusedIndex_0=focusableElements_2.indexOf(focusedElement_0);focusedIndex_0=(focusedIndex_0+1)%focusableLen_0;const el_2=focusableElements_2[focusedIndex_0],currentIndex_2=elementsRef.current.indexOf(el_2);setActiveIndex(currentIndex_2);return;}onKeyDown&&onKeyDown(event);},$[4]=onKeyDown,$[5]=originElement,$[6]=t3):t3=$[6];const handleKeyDown=t3;let t4;$[7]===Symbol.for("react.memo_cache_sentinel")?(t4=event_0=>{const element_0=event_0.currentTarget,currentIndex_3=elementsRef.current.indexOf(element_0);setActiveIndex(currentIndex_3);},$[7]=t4):t4=$[7];const handleItemMouseEnter=t4;let t5;$[8]!==rootElementRef?(t5=()=>{var _rootElementRef$curre;setActiveIndex(-2),(_rootElementRef$curre=rootElementRef.current)===null||_rootElementRef$curre===void 0?void 0:_rootElementRef$curre.focus();},$[8]=rootElementRef,$[9]=t5):t5=$[9];const handleItemMouseLeave=t5;let t6,t7;$[10]!==activeIndex||$[11]!==rootElementRef||$[12]!==shouldFocus?(t6=()=>{if(!rootElementRef.current)return;const rafId=requestAnimationFrame(()=>{var _ref72;if(activeIndex===-1){if(shouldFocus==="first"){const el_3=_getFocusableElements(elementsRef.current)[0];if(el_3){const currentIndex_4=elementsRef.current.indexOf(el_3);setActiveIndex(currentIndex_4);}}if(shouldFocus==="last"){const focusableElements_4=_getFocusableElements(elementsRef.current),el_4=focusableElements_4[focusableElements_4.length-1];if(el_4){const currentIndex_5=elementsRef.current.indexOf(el_4);setActiveIndex(currentIndex_5);}}return;}(_ref72=elementsRef.current[activeIndex]||null)===null||_ref72===void 0||_ref72.focus();});return()=>cancelAnimationFrame(rafId);},t7=[activeIndex,rootElementRef,setActiveIndex,shouldFocus],$[10]=activeIndex,$[11]=rootElementRef,$[12]=shouldFocus,$[13]=t6,$[14]=t7):(t6=$[13],t7=$[14]),useEffect$1(t6,t7);let t8;return $[15]!==activeElement||$[16]!==activeIndex||$[17]!==handleItemMouseLeave||$[18]!==handleKeyDown||$[19]!==mount?(t8={activeElement,activeIndex,handleItemMouseEnter,handleItemMouseLeave,handleKeyDown,mount},$[15]=activeElement,$[16]=activeIndex,$[17]=handleItemMouseLeave,$[18]=handleKeyDown,$[19]=mount,$[20]=t8):t8=$[20],t8;}function _temp$1(){}const StyledMenu=styled(Box).withConfig({displayName:"StyledMenu",componentId:"sc-xt0tnv-0"})(_templateObject58||(_templateObject58=_taggedTemplateLiteral(["outline:none;overflow:auto;"]))),Menu=forwardRef(function(props,forwardedRef){const $=dist.c(49);let _shouldFocus,children,onClickOutside,onEscape,onItemClick,onItemSelect,onKeyDown,originElement,registerElement,restProps,t0,t1;if($[0]!==props){const{children:t22,focusFirst,focusLast,onClickOutside:t32,onEscape:t42,onItemClick:t52,onItemSelect:t62,onKeyDown:t72,originElement:t82,padding:t92,registerElement:t102,shouldFocus:t112,space:t122}=props,t13=_objectWithoutProperties(props,_excluded48);children=t22,onClickOutside=t32,onEscape=t42,onItemClick=t52,onItemSelect=t62,onKeyDown=t72,originElement=t82,t0=t92,registerElement=t102,_shouldFocus=t112,t1=t122,restProps=t13,$[0]=props,$[1]=_shouldFocus,$[2]=children,$[3]=onClickOutside,$[4]=onEscape,$[5]=onItemClick,$[6]=onItemSelect,$[7]=onKeyDown,$[8]=originElement,$[9]=registerElement,$[10]=restProps,$[11]=t0,$[12]=t1;}else _shouldFocus=$[1],children=$[2],onClickOutside=$[3],onEscape=$[4],onItemClick=$[5],onItemSelect=$[6],onKeyDown=$[7],originElement=$[8],registerElement=$[9],restProps=$[10],t0=$[11],t1=$[12];const padding=t0===void 0?1:t0,space=t1===void 0?1:t1,shouldFocus=_shouldFocus!==null&&_shouldFocus!==void 0?_shouldFocus:props.focusFirst&&"first"||props.focusLast&&"last"||null,ref=useRef$1(null);let t2;$[13]===Symbol.for("react.memo_cache_sentinel")?(t2=()=>ref.current,$[13]=t2):t2=$[13],useImperativeHandle(forwardedRef,t2);const{isTopLayer}=useLayer();let t3;$[14]!==onKeyDown||$[15]!==originElement||$[16]!==shouldFocus?(t3={onKeyDown,originElement,shouldFocus,rootElementRef:ref},$[14]=onKeyDown,$[15]=originElement,$[16]=shouldFocus,$[17]=t3):t3=$[17];const{activeElement,activeIndex,handleItemMouseEnter,handleItemMouseLeave,handleKeyDown,mount}=useMenuController(t3),unregisterElementRef=useRef$1(null);let t4;$[18]!==registerElement?(t4=el=>{unregisterElementRef.current&&(unregisterElementRef.current(),unregisterElementRef.current=null),ref.current=el,ref.current&®isterElement&&(unregisterElementRef.current=registerElement(ref.current));},$[18]=registerElement,$[19]=t4):t4=$[19];const handleRefChange=t4;let t5,t6;$[20]!==activeIndex||$[21]!==onItemSelect?(t5=()=>{onItemSelect&&onItemSelect(activeIndex);},t6=[activeIndex,onItemSelect],$[20]=activeIndex,$[21]=onItemSelect,$[22]=t5,$[23]=t6):(t5=$[22],t6=$[23]),useEffect$1(t5,t6);let t7;$[24]===Symbol.for("react.memo_cache_sentinel")?(t7=()=>[ref.current],$[24]=t7):t7=$[24],useClickOutsideEvent(isTopLayer&&onClickOutside,t7);let t8;$[25]!==isTopLayer||$[26]!==onEscape?(t8=event=>{isTopLayer&&event.key==="Escape"&&(event.stopPropagation(),onEscape&&onEscape());},$[25]=isTopLayer,$[26]=onEscape,$[27]=t8):t8=$[27],useGlobalKeyDown(t8);let t9;$[28]!==activeElement||$[29]!==handleItemMouseEnter||$[30]!==handleItemMouseLeave||$[31]!==mount||$[32]!==onClickOutside||$[33]!==onEscape||$[34]!==onItemClick||$[35]!==registerElement?(t9={version:2,activeElement,mount,onClickOutside,onEscape,onItemClick,onItemMouseEnter:handleItemMouseEnter,onItemMouseLeave:handleItemMouseLeave,registerElement},$[28]=activeElement,$[29]=handleItemMouseEnter,$[30]=handleItemMouseLeave,$[31]=mount,$[32]=onClickOutside,$[33]=onEscape,$[34]=onItemClick,$[35]=registerElement,$[36]=t9):t9=$[36];const value=t9;let t10;$[37]!==children||$[38]!==space?(t10=/* @__PURE__ */jsx(Stack,{space,children}),$[37]=children,$[38]=space,$[39]=t10):t10=$[39];let t11;$[40]!==handleKeyDown||$[41]!==handleRefChange||$[42]!==padding||$[43]!==restProps||$[44]!==t10?(t11=/* @__PURE__ */jsx(StyledMenu,_objectSpread(_objectSpread({"data-ui":"Menu"},restProps),{},{onKeyDown:handleKeyDown,padding,ref:handleRefChange,role:"menu",tabIndex:-1,children:t10})),$[40]=handleKeyDown,$[41]=handleRefChange,$[42]=padding,$[43]=restProps,$[44]=t10,$[45]=t11):t11=$[45];let t12;return $[46]!==t11||$[47]!==value?(t12=/* @__PURE__ */jsx(MenuContext.Provider,{value,children:t11}),$[46]=t11,$[47]=value,$[48]=t12):t12=$[48],t12;});Menu.displayName="ForwardRef(Menu)";const MenuDivider=styled.hr.withConfig({displayName:"MenuDivider",componentId:"sc-uhoxwu-0"})(_templateObject59||(_templateObject59=_taggedTemplateLiteral(["height:1px;border:0;background:var(--card-hairline-soft-color);margin:0;"])));MenuDivider.displayName="MenuDivider";function selectableBaseStyle(){return css(_templateObject60||(_templateObject60=_taggedTemplateLiteral(["\n background-color: inherit;\n color: inherit;\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n text-decoration: none;\n }\n "])));}function selectableColorStyle(props){var _style$card2;const{$tone}=props,{color,style}=getTheme_v2(props.theme),tone=color.selectable[$tone];return css(_templateObject61||(_templateObject61=_taggedTemplateLiteral(["\n ","\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ","\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ","\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ","\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ","\n }\n\n &[data-selected] {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n &:active {\n ","\n }\n }\n }\n }\n }\n\n ","\n "])),_cardColorStyle(color,tone.enabled),_cardColorStyle(color,tone.disabled),_cardColorStyle(color,tone.pressed),_cardColorStyle(color,tone.selected),_cardColorStyle(color,tone.hovered),_cardColorStyle(color,tone.pressed),_cardColorStyle(color,tone.disabled),_cardColorStyle(color,tone.pressed),_cardColorStyle(color,tone.selected),_cardColorStyle(color,tone.hovered),_cardColorStyle(color,tone.pressed),style===null||style===void 0||(_style$card2=style.card)===null||_style$card2===void 0?void 0:_style$card2.root);}const Selectable=/* @__PURE__ */styled(Box).withConfig({displayName:"Selectable",componentId:"sc-1w01ang-0"})(responsiveRadiusStyle,selectableBaseStyle,selectableColorStyle);Selectable.displayName="Selectable";function useMenu(){const value=useContext(MenuContext);if(!value)throw new Error("useMenu(): missing context value");if(!isRecord(value)||value.version!==2)throw new Error("useMenu(): the context value is not compatible");return value;}const MenuItem=forwardRef(function(props,forwardedRef){var _props30;const $=dist.c(75);let IconComponent,IconRightComponent,children,disabled,hotkeys,onClick,paddingBottom,paddingLeft,paddingRight,paddingTop,paddingX,paddingY,pressed,restProps,selectedProp,t0,t1,t2,t3,t4,t5,text;$[0]!==props?(_props30=props,{as:t0,children,disabled,fontSize:t1,hotkeys,icon:IconComponent,iconRight:IconRightComponent,onClick,padding:t2,paddingX,paddingY,paddingTop,paddingRight,paddingBottom,paddingLeft,pressed,radius:t3,selected:selectedProp,space:t4,text,tone:t5}=_props30,restProps=_objectWithoutProperties(_props30,_excluded49),_props30,$[0]=props,$[1]=IconComponent,$[2]=IconRightComponent,$[3]=children,$[4]=disabled,$[5]=hotkeys,$[6]=onClick,$[7]=paddingBottom,$[8]=paddingLeft,$[9]=paddingRight,$[10]=paddingTop,$[11]=paddingX,$[12]=paddingY,$[13]=pressed,$[14]=restProps,$[15]=selectedProp,$[16]=t0,$[17]=t1,$[18]=t2,$[19]=t3,$[20]=t4,$[21]=t5,$[22]=text):(IconComponent=$[1],IconRightComponent=$[2],children=$[3],disabled=$[4],hotkeys=$[5],onClick=$[6],paddingBottom=$[7],paddingLeft=$[8],paddingRight=$[9],paddingTop=$[10],paddingX=$[11],paddingY=$[12],pressed=$[13],restProps=$[14],selectedProp=$[15],t0=$[16],t1=$[17],t2=$[18],t3=$[19],t4=$[20],t5=$[21],text=$[22]);const as=t0===void 0?"button":t0,fontSize2=t1===void 0?1:t1,padding=t2===void 0?3:t2,radius=t3===void 0?2:t3,space=t4===void 0?3:t4,tone=t5===void 0?"default":t5,{scheme}=useRootTheme(),menu=useMenu(),{activeElement,mount,onItemClick,onItemMouseEnter:_onItemMouseEnter,onItemMouseLeave:_onItemMouseLeave}=menu,onItemMouseEnter=_onItemMouseEnter!==null&&_onItemMouseEnter!==void 0?_onItemMouseEnter:menu.onItemMouseEnter,onItemMouseLeave=_onItemMouseLeave!==null&&_onItemMouseLeave!==void 0?_onItemMouseLeave:menu.onItemMouseLeave,[rootElement,setRootElement]=useState(null),active=!!activeElement&&activeElement===rootElement,ref=useRef$1(null);let t6;$[23]===Symbol.for("react.memo_cache_sentinel")?(t6=()=>ref.current,$[23]=t6):t6=$[23],useImperativeHandle(forwardedRef,t6);let t7,t8;$[24]!==mount||$[25]!==rootElement||$[26]!==selectedProp?(t7=()=>mount(rootElement,selectedProp),t8=[mount,rootElement,selectedProp],$[24]=mount,$[25]=rootElement,$[26]=selectedProp,$[27]=t7,$[28]=t8):(t7=$[27],t8=$[28]),useEffect$1(t7,t8);let t9;$[29]!==disabled||$[30]!==onClick||$[31]!==onItemClick?(t9=event=>{disabled||(onClick&&onClick(event),onItemClick&&onItemClick());},$[29]=disabled,$[30]=onClick,$[31]=onItemClick,$[32]=t9):t9=$[32];const handleClick=t9;let t10;$[33]!==padding||$[34]!==paddingBottom||$[35]!==paddingLeft||$[36]!==paddingRight||$[37]!==paddingTop||$[38]!==paddingX||$[39]!==paddingY?(t10={padding,paddingX,paddingY,paddingTop,paddingRight,paddingBottom,paddingLeft},$[33]=padding,$[34]=paddingBottom,$[35]=paddingLeft,$[36]=paddingRight,$[37]=paddingTop,$[38]=paddingX,$[39]=paddingY,$[40]=t10):t10=$[40];const paddingProps=t10;let t11;$[41]!==fontSize2?(t11=_getArrayProp(fontSize2).map(_temp),$[41]=fontSize2,$[42]=t11):t11=$[42];const hotkeysFontSize=t11;let t12;$[43]===Symbol.for("react.memo_cache_sentinel")?(t12=el=>{ref.current=el,setRootElement(el);},$[43]=t12):t12=$[43];const setRef=t12,t13=as!=="button"&&pressed?"":void 0,t14=active?"":void 0,t15=disabled?"":void 0;let t16;$[44]!==radius?(t16=_getArrayProp(radius),$[44]=radius,$[45]=t16):t16=$[45];let t17;$[46]===Symbol.for("react.memo_cache_sentinel")?(t17=_getArrayProp(0),$[46]=t17):t17=$[46];const t18=disabled?"default":tone,t19=as==="button"?"button":void 0;let t20;$[47]!==IconComponent||$[48]!==IconRightComponent||$[49]!==fontSize2||$[50]!==hotkeys||$[51]!==hotkeysFontSize||$[52]!==paddingProps||$[53]!==space||$[54]!==text?(t20=(IconComponent||text||IconRightComponent)&&/* @__PURE__ */jsxs(Flex,_objectSpread(_objectSpread({as:"span",gap:space,align:"center"},paddingProps),{},{children:[IconComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconComponent)&&IconComponent,reactIsExports.isValidElementType(IconComponent)&&/* @__PURE__ */jsx(IconComponent,{})]}),text&&/* @__PURE__ */jsx(Box,{flex:1,children:/* @__PURE__ */jsx(Text,{size:fontSize2,textOverflow:"ellipsis",weight:"medium",children:text})}),hotkeys&&/* @__PURE__ */jsx(Hotkeys,{fontSize:hotkeysFontSize,keys:hotkeys,style:{marginTop:-4,marginBottom:-4}}),IconRightComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconRightComponent)&&IconRightComponent,reactIsExports.isValidElementType(IconRightComponent)&&/* @__PURE__ */jsx(IconRightComponent,{})]})]})),$[47]=IconComponent,$[48]=IconRightComponent,$[49]=fontSize2,$[50]=hotkeys,$[51]=hotkeysFontSize,$[52]=paddingProps,$[53]=space,$[54]=text,$[55]=t20):t20=$[55];let t21;$[56]!==children||$[57]!==paddingProps?(t21=children&&/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({as:"span"},paddingProps),{},{children})),$[56]=children,$[57]=paddingProps,$[58]=t21):t21=$[58];let t22;return $[59]!==as||$[60]!==disabled||$[61]!==handleClick||$[62]!==onItemMouseEnter||$[63]!==onItemMouseLeave||$[64]!==restProps||$[65]!==scheme||$[66]!==t13||$[67]!==t14||$[68]!==t15||$[69]!==t16||$[70]!==t18||$[71]!==t19||$[72]!==t20||$[73]!==t21?(t22=/* @__PURE__ */jsxs(Selectable,_objectSpread(_objectSpread({"data-ui":"MenuItem",role:"menuitem"},restProps),{},{"data-pressed":t13,"data-selected":t14,"data-disabled":t15,forwardedAs:as,$radius:t16,$padding:t17,$tone:t18,$scheme:scheme,disabled,onClick:handleClick,onMouseEnter:onItemMouseEnter,onMouseLeave:onItemMouseLeave,ref:setRef,tabIndex:-1,type:t19,children:[t20,t21]})),$[59]=as,$[60]=disabled,$[61]=handleClick,$[62]=onItemMouseEnter,$[63]=onItemMouseLeave,$[64]=restProps,$[65]=scheme,$[66]=t13,$[67]=t14,$[68]=t15,$[69]=t16,$[70]=t18,$[71]=t19,$[72]=t20,$[73]=t21,$[74]=t22):t22=$[74],t22;});MenuItem.displayName="ForwardRef(MenuItem)";function _temp(s){return s-1;}const CustomButton=styled(Button).withConfig({displayName:"CustomButton",componentId:"sc-1kns779-0"})(_templateObject62||(_templateObject62=_taggedTemplateLiteral(["max-width:100%;"]))),Tab=forwardRef(function(props,forwardedRef){var _props31;const $=dist.c(30);let focused,icon,id,label,onClick,onFocus,restProps,selected,t0,t1;$[0]!==props?(_props31=props,{icon,id,focused,fontSize:t0,label,onClick,onFocus,padding:t1,selected}=_props31,restProps=_objectWithoutProperties(_props31,_excluded50),_props31,$[0]=props,$[1]=focused,$[2]=icon,$[3]=id,$[4]=label,$[5]=onClick,$[6]=onFocus,$[7]=restProps,$[8]=selected,$[9]=t0,$[10]=t1):(focused=$[1],icon=$[2],id=$[3],label=$[4],onClick=$[5],onFocus=$[6],restProps=$[7],selected=$[8],t0=$[9],t1=$[10]);const fontSize2=t0===void 0?1:t0,padding=t1===void 0?2:t1,ref=useRef$1(null),focusedRef=useRef$1(!1);let t2;$[11]===Symbol.for("react.memo_cache_sentinel")?(t2=()=>ref.current,$[11]=t2):t2=$[11],useImperativeHandle(forwardedRef,t2);let t3;$[12]===Symbol.for("react.memo_cache_sentinel")?(t3=()=>{focusedRef.current=!1;},$[12]=t3):t3=$[12];const handleBlur=t3;let t4;$[13]!==onFocus?(t4=event=>{focusedRef.current=!0,onFocus&&onFocus(event);},$[13]=onFocus,$[14]=t4):t4=$[14];const handleFocus=t4;let t5,t6;$[15]!==focused?(t5=()=>{focused&&!focusedRef.current&&(ref.current&&ref.current.focus(),focusedRef.current=!0);},t6=[focused],$[15]=focused,$[16]=t5,$[17]=t6):(t5=$[16],t6=$[17]),useEffect$1(t5,t6);const t7=selected?"true":"false",t8=selected?0:-1;let t9;return $[18]!==fontSize2||$[19]!==handleFocus||$[20]!==icon||$[21]!==id||$[22]!==label||$[23]!==onClick||$[24]!==padding||$[25]!==restProps||$[26]!==selected||$[27]!==t7||$[28]!==t8?(t9=/* @__PURE__ */jsx(CustomButton,_objectSpread(_objectSpread({"data-ui":"Tab"},restProps),{},{"aria-selected":t7,fontSize:fontSize2,icon,id,mode:"bleed",onClick,onBlur:handleBlur,onFocus:handleFocus,padding,ref,role:"tab",selected,tabIndex:t8,text:label,type:"button"})),$[18]=fontSize2,$[19]=handleFocus,$[20]=icon,$[21]=id,$[22]=label,$[23]=onClick,$[24]=padding,$[25]=restProps,$[26]=selected,$[27]=t7,$[28]=t8,$[29]=t9):t9=$[29],t9;});Tab.displayName="ForwardRef(Tab)";const CustomInline=styled(Inline).withConfig({displayName:"CustomInline",componentId:"sc-5cm04m-0"})(_templateObject63||(_templateObject63=_taggedTemplateLiteral(["& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}"]))),TabList=forwardRef(function(props,ref){var _props32;const $=dist.c(15);let childrenProp,restProps;$[0]!==props?(_props32=props,{children:childrenProp}=_props32,restProps=_objectWithoutProperties(_props32,_excluded51),_props32,$[0]=props,$[1]=childrenProp,$[2]=restProps):(childrenProp=$[1],restProps=$[2]);const[focusedIndex,setFocusedIndex]=useState(-1);let t0;if($[3]!==childrenProp||$[4]!==focusedIndex){const children=Children.toArray(childrenProp).filter(isValidElement$1);let t12;$[6]!==focusedIndex?(t12=(child,childIndex)=>cloneElement(child,{focused:focusedIndex===childIndex,key:childIndex,onFocus:()=>setFocusedIndex(childIndex)}),$[6]=focusedIndex,$[7]=t12):t12=$[7],t0=children.map(t12),$[3]=childrenProp,$[4]=focusedIndex,$[5]=t0;}else t0=$[5];const tabs=t0,numTabs=tabs.length;let t1;$[8]!==numTabs?(t1=event=>{event.key==="ArrowLeft"&&setFocusedIndex(prevIndex=>(prevIndex+numTabs-1)%numTabs),event.key==="ArrowRight"&&setFocusedIndex(prevIndex_0=>(prevIndex_0+1)%numTabs);},$[8]=numTabs,$[9]=t1):t1=$[9];const handleKeyDown=t1;let t2;return $[10]!==handleKeyDown||$[11]!==ref||$[12]!==restProps||$[13]!==tabs?(t2=/* @__PURE__ */jsx(CustomInline,_objectSpread(_objectSpread({"data-ui":"TabList"},restProps),{},{onKeyDown:handleKeyDown,ref,role:"tablist",children:tabs})),$[10]=handleKeyDown,$[11]=ref,$[12]=restProps,$[13]=tabs,$[14]=t2):t2=$[14],t2;});TabList.displayName="ForwardRef(TabList)";function _raf(fn){const frameId=requestAnimationFrame(fn);return()=>{cancelAnimationFrame(frameId);};}function _hasFocus(element){return!!document.activeElement&&element.contains(document.activeElement);}function isFocusable(element){return element.tabIndex>0||element.tabIndex===0&&element.getAttribute("tabIndex")!==null?!0:isHTMLAnchorElement(element)?!!element.href&&element.rel!=="ignore":isHTMLInputElement(element)?element.type!=="hidden"&&element.type!=="file"&&!element.disabled:isHTMLButtonElement(element)||isHTMLSelectElement(element)||isHTMLTextAreaElement(element)?!element.disabled:!1;}function attemptFocus(element){if(!isFocusable(element))return!1;try{element.focus();}catch(_unused3){}return document.activeElement===element;}function focusFirstDescendant(element){for(let i=0;i<element.childNodes.length;i++){const child=element.childNodes[i];if(isHTMLElement(child)&&(attemptFocus(child)||focusFirstDescendant(child)))return!0;}return!1;}function focusLastDescendant(element){for(let i=element.childNodes.length-1;i>=0;i--){const child=element.childNodes[i];if(isHTMLElement(child)&&(attemptFocus(child)||focusLastDescendant(child)))return!0;}return!1;}const StyledAutocomplete=styled.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})(_templateObject64||(_templateObject64=_taggedTemplateLiteral(["line-height:0;"]))),ListBox=styled(Box).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})(_templateObject65||(_templateObject65=_taggedTemplateLiteral(["& > ul{list-style:none;padding:0;margin:0;}"]))),rotate=keyframes$1(_templateObject66||(_templateObject66=_taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"]))),AnimatedSpinnerIcon=styled(SpinnerIcon).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})(_templateObject67||(_templateObject67=_taggedTemplateLiteral(["animation:"," 500ms linear infinite;"])),rotate);function AutocompleteOption(props){const $=dist.c(11),{children,id,onSelect,selected,value}=props;let t0;$[0]!==onSelect||$[1]!==value?(t0=()=>{setTimeout(()=>{onSelect(value);},0);},$[0]=onSelect,$[1]=value,$[2]=t0):t0=$[2];const handleClick=t0;let t1;$[3]!==handleClick?(t1=event=>{event.key==="Enter"&&!_isEnterToClickElement(event.currentTarget)&&handleClick();},$[3]=handleClick,$[4]=t1):t1=$[4];const handleKeyDown=t1;let t2;return $[5]!==children||$[6]!==handleClick||$[7]!==handleKeyDown||$[8]!==id||$[9]!==selected?(t2=/* @__PURE__ */jsx("li",{"aria-selected":selected,"data-ui":"AutocompleteOption",id,role:"option",onClick:handleClick,onKeyDown:handleKeyDown,children}),$[5]=children,$[6]=handleClick,$[7]=handleKeyDown,$[8]=id,$[9]=selected,$[10]=t2):t2=$[10],t2;}function autocompleteReducer(state,msg){return msg.type==="input/change"?_objectSpread(_objectSpread({},state),{},{activeValue:null,focused:!0,query:msg.query}):msg.type==="input/focus"?_objectSpread(_objectSpread({},state),{},{focused:!0}):msg.type==="root/blur"?_objectSpread(_objectSpread({},state),{},{focused:!1,query:null}):msg.type==="root/clear"?_objectSpread(_objectSpread({},state),{},{activeValue:null,query:null,value:null}):msg.type==="root/escape"?_objectSpread(_objectSpread({},state),{},{focused:!1,query:null}):msg.type==="root/open"?_objectSpread(_objectSpread({},state),{},{query:state.query||msg.query}):msg.type==="root/setActiveValue"?_objectSpread(_objectSpread({},state),{},{activeValue:msg.value,listFocused:msg.listFocused||state.listFocused}):msg.type==="root/setListFocused"?_objectSpread(_objectSpread({},state),{},{listFocused:msg.listFocused}):msg.type==="value/change"?_objectSpread(_objectSpread({},state),{},{activeValue:msg.value,query:null,value:msg.value}):state;}const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],AUTOCOMPLETE_POPOVER_PLACEMENT="bottom-start",AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS=["bottom-start","top-start"],DEFAULT_RENDER_VALUE=(value,option)=>option?option.value:value,DEFAULT_FILTER_OPTION=(query,option)=>option.value.toLowerCase().indexOf(query.toLowerCase())>-1,InnerAutocomplete=forwardRef(function(props,forwardedRef){var _props33;const $=dist.c(181);let customValidity,disabled,filterOptionProp,icon,id,loading,onBlur,onChange,onFocus,onQueryChange,onSelect,openButton,openOnFocus,optionsProp,prefix,readOnly,relatedElements,renderOptionProp,renderPopover,restProps,suffix,t0,t1,t2,t3,t4,t5,t6,valueProp;$[0]!==props?(_props33=props,{border:t0,customValidity,disabled,filterOption:filterOptionProp,fontSize:t1,icon,id,listBox:t2,loading,onBlur,onChange,onFocus,onQueryChange,onSelect,openButton,openOnFocus,options:optionsProp,padding:t3,popover:t4,prefix,radius:t5,readOnly,relatedElements,renderOption:renderOptionProp,renderPopover,renderValue:t6,suffix,value:valueProp}=_props33,restProps=_objectWithoutProperties(_props33,_excluded52),_props33,$[0]=props,$[1]=customValidity,$[2]=disabled,$[3]=filterOptionProp,$[4]=icon,$[5]=id,$[6]=loading,$[7]=onBlur,$[8]=onChange,$[9]=onFocus,$[10]=onQueryChange,$[11]=onSelect,$[12]=openButton,$[13]=openOnFocus,$[14]=optionsProp,$[15]=prefix,$[16]=readOnly,$[17]=relatedElements,$[18]=renderOptionProp,$[19]=renderPopover,$[20]=restProps,$[21]=suffix,$[22]=t0,$[23]=t1,$[24]=t2,$[25]=t3,$[26]=t4,$[27]=t5,$[28]=t6,$[29]=valueProp):(customValidity=$[1],disabled=$[2],filterOptionProp=$[3],icon=$[4],id=$[5],loading=$[6],onBlur=$[7],onChange=$[8],onFocus=$[9],onQueryChange=$[10],onSelect=$[11],openButton=$[12],openOnFocus=$[13],optionsProp=$[14],prefix=$[15],readOnly=$[16],relatedElements=$[17],renderOptionProp=$[18],renderPopover=$[19],restProps=$[20],suffix=$[21],t0=$[22],t1=$[23],t2=$[24],t3=$[25],t4=$[26],t5=$[27],t6=$[28],valueProp=$[29]);const border=t0===void 0?!0:t0,fontSize=t1===void 0?2:t1,listBox=t2===void 0?EMPTY_RECORD:t2,paddingProp=t3===void 0?3:t3,popover=t4===void 0?EMPTY_RECORD:t4,radius=t5===void 0?2:t5,renderValue=t6===void 0?DEFAULT_RENDER_VALUE:t6,t7=valueProp||null,t8=valueProp||null;let t9;$[30]!==t7||$[31]!==t8?(t9={activeValue:t7,focused:!1,listFocused:!1,query:null,value:t8},$[30]=t7,$[31]=t8,$[32]=t9):t9=$[32];const[state,dispatch]=useReducer(autocompleteReducer,t9),{activeValue,focused,listFocused,query,value}=state;let t10;$[33]!==fontSize||$[34]!==paddingProp?(t10=t112=>{const{value:value_0}=t112;return/* @__PURE__ */jsx(Card,{"data-as":"button",padding:paddingProp,radius:2,tone:"inherit",children:/* @__PURE__ */jsx(Text,{size:fontSize,textOverflow:"ellipsis",children:value_0})});},$[33]=fontSize,$[34]=paddingProp,$[35]=t10):t10=$[35];const renderOption=typeof renderOptionProp=="function"?renderOptionProp:t10,filterOption=typeof filterOptionProp=="function"?filterOptionProp:DEFAULT_FILTER_OPTION,rootElementRef=useRef$1(null),resultsPopoverElementRef=useRef$1(null),inputElementRef=useRef$1(null),listBoxElementRef=useRef$1(null),[inputElement,_setInputElement]=useState(null);let t11;$[36]===Symbol.for("react.memo_cache_sentinel")?(t11=node=>{startTransition(()=>_setInputElement(node));},$[36]=t11):t11=$[36];const setInputElement=t11,listFocusedRef=useRef$1(!1),valueRef=useRef$1(value),valuePropRef=useRef$1(valueProp),popoverMouseWithinRef=useRef$1(!1);let t12,t13;$[37]!==inputElement?(t12=()=>inputElement,t13=[inputElement],$[37]=inputElement,$[38]=t12,$[39]=t13):(t12=$[38],t13=$[39]),useImperativeHandle(inputElementRef,t12,t13);let t14,t15;$[40]!==inputElement?(t14=()=>inputElement,t15=[inputElement],$[40]=inputElement,$[41]=t14,$[42]=t15):(t14=$[41],t15=$[42]),useImperativeHandle(forwardedRef,t14,t15);const listBoxId="".concat(id,"-listbox"),options=Array.isArray(optionsProp)?optionsProp:EMPTY_ARRAY,padding=_getArrayProp(paddingProp);let t16;$[43]!==options||$[44]!==value?(t16=value!==null?options.find(o=>o.value===value):void 0,$[43]=options,$[44]=value,$[45]=t16):t16=$[45];const currentOption=t16;let t17;if($[46]!==filterOption||$[47]!==options||$[48]!==query){let t182;$[50]!==filterOption||$[51]!==query?(t182=option=>query?filterOption(query,option):!0,$[50]=filterOption,$[51]=query,$[52]=t182):t182=$[52],t17=options.filter(t182),$[46]=filterOption,$[47]=options,$[48]=query,$[49]=t17;}else t17=$[49];const filteredOptions=t17,filteredOptionsLen=filteredOptions.length,activeItemId=activeValue?"".concat(id,"-option-").concat(activeValue):void 0,expanded=query!==null&&loading||focused&&query!==null;let t18;$[53]!==onBlur||$[54]!==onQueryChange||$[55]!==relatedElements?(t18=event=>{setTimeout(()=>{if(popoverMouseWithinRef.current)return;const elements=(relatedElements||[]).concat(rootElementRef.current?[rootElementRef.current]:[],resultsPopoverElementRef.current?[resultsPopoverElementRef.current]:[]);let focusInside=!1;if(document.activeElement){for(const e of elements)if(e===document.activeElement||e.contains(document.activeElement)){focusInside=!0;break;}}focusInside===!1&&(dispatch({type:"root/blur"}),popoverMouseWithinRef.current=!1,onQueryChange&&onQueryChange(null),onBlur&&onBlur(event));},0);},$[53]=onBlur,$[54]=onQueryChange,$[55]=relatedElements,$[56]=t18):t18=$[56];const handleRootBlur=t18;let t19;$[57]===Symbol.for("react.memo_cache_sentinel")?(t19=event_0=>{const listBoxElement=listBoxElementRef.current,focusedElement=event_0.target instanceof HTMLElement?event_0.target:null,listFocused_0=(listBoxElement===null||listBoxElement===void 0?void 0:listBoxElement.contains(focusedElement))||!1;listFocused_0!==listFocusedRef.current&&(listFocusedRef.current=listFocused_0,dispatch({type:"root/setListFocused",listFocused:listFocused_0}));},$[57]=t19):t19=$[57];const handleRootFocus=t19;let t20;$[58]!==onChange||$[59]!==onQueryChange||$[60]!==onSelect?(t20=v=>{var _inputElementRef$curr;dispatch({type:"value/change",value:v}),popoverMouseWithinRef.current=!1,onSelect&&onSelect(v),valueRef.current=v,onChange&&onChange(v),onQueryChange&&onQueryChange(null),(_inputElementRef$curr=inputElementRef.current)===null||_inputElementRef$curr===void 0?void 0:_inputElementRef$curr.focus();},$[58]=onChange,$[59]=onQueryChange,$[60]=onSelect,$[61]=t20):t20=$[61];const handleOptionSelect=t20;let t21;$[62]!==activeValue||$[63]!==filteredOptions||$[64]!==filteredOptionsLen||$[65]!==onQueryChange?(t21=event_1=>{if(event_1.key==="ArrowDown"){if(event_1.preventDefault(),!filteredOptionsLen)return;const activeOption=filteredOptions.find(o_0=>o_0.value===activeValue),activeIndex=activeOption?filteredOptions.indexOf(activeOption):-1,nextActiveOption=filteredOptions[(activeIndex+1)%filteredOptionsLen];nextActiveOption&&dispatch({type:"root/setActiveValue",value:nextActiveOption.value,listFocused:!0});return;}if(event_1.key==="ArrowUp"){if(event_1.preventDefault(),!filteredOptionsLen)return;const activeOption_0=filteredOptions.find(o_1=>o_1.value===activeValue),activeIndex_0=activeOption_0?filteredOptions.indexOf(activeOption_0):-1,nextActiveOption_0=filteredOptions[activeIndex_0===-1?filteredOptionsLen-1:(filteredOptionsLen+activeIndex_0-1)%filteredOptionsLen];nextActiveOption_0&&dispatch({type:"root/setActiveValue",value:nextActiveOption_0.value,listFocused:!0});return;}if(event_1.key==="Escape"){var _inputElementRef$curr2;dispatch({type:"root/escape"}),popoverMouseWithinRef.current=!1,onQueryChange&&onQueryChange(null),(_inputElementRef$curr2=inputElementRef.current)===null||_inputElementRef$curr2===void 0?void 0:_inputElementRef$curr2.focus();return;}const target=event_1.target,listEl=listBoxElementRef.current;if((listEl===target||listEl!==null&&listEl!==void 0&&listEl.contains(target))&&!AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)){var _inputElementRef$curr3;(_inputElementRef$curr3=inputElementRef.current)===null||_inputElementRef$curr3===void 0||_inputElementRef$curr3.focus();return;}},$[62]=activeValue,$[63]=filteredOptions,$[64]=filteredOptionsLen,$[65]=onQueryChange,$[66]=t21):t21=$[66];const handleRootKeyDown=t21;let t22;$[67]!==onQueryChange?(t22=event_2=>{const nextQuery=event_2.currentTarget.value;dispatch({type:"input/change",query:nextQuery}),onQueryChange&&onQueryChange(nextQuery);},$[67]=onQueryChange,$[68]=t22):t22=$[68];const handleInputChange=t22;let t23;$[69]!==currentOption||$[70]!==renderValue||$[71]!==value?(t23=()=>{dispatch({type:"root/open",query:value?renderValue(value,currentOption):""});},$[69]=currentOption,$[70]=renderValue,$[71]=value,$[72]=t23):t23=$[72];const dispatchOpen=t23;let t24;$[73]!==dispatchOpen||$[74]!==focused||$[75]!==onFocus||$[76]!==openOnFocus?(t24=event_3=>{focused||(dispatch({type:"input/focus"}),onFocus&&onFocus(event_3),openOnFocus&&dispatchOpen());},$[73]=dispatchOpen,$[74]=focused,$[75]=onFocus,$[76]=openOnFocus,$[77]=t24):t24=$[77];const handleInputFocus=t24;let t25;$[78]===Symbol.for("react.memo_cache_sentinel")?(t25=()=>{popoverMouseWithinRef.current=!0;},$[78]=t25):t25=$[78];const handlePopoverMouseEnter=t25;let t26;$[79]===Symbol.for("react.memo_cache_sentinel")?(t26=()=>{popoverMouseWithinRef.current=!1;},$[79]=t26):t26=$[79];const handlePopoverMouseLeave=t26;let t27;$[80]!==onChange||$[81]!==onQueryChange?(t27=()=>{var _inputElementRef$curr4;dispatch({type:"root/clear"}),valueRef.current="",onChange&&onChange(""),onQueryChange&&onQueryChange(null),(_inputElementRef$curr4=inputElementRef.current)===null||_inputElementRef$curr4===void 0?void 0:_inputElementRef$curr4.focus();},$[80]=onChange,$[81]=onQueryChange,$[82]=t27):t27=$[82];const handleClearButtonClick=t27;let t28;$[83]===Symbol.for("react.memo_cache_sentinel")?(t28=()=>{dispatch({type:"input/focus"});},$[83]=t28):t28=$[83];const handleClearButtonFocus=t28;let t29,t30;$[84]!==valueProp?(t29=()=>{if(valueProp!==valuePropRef.current){valuePropRef.current=valueProp,valueProp!==void 0&&(dispatch({type:"value/change",value:valueProp}),valueRef.current=valueProp);return;}valueProp!==valueRef.current&&(valueRef.current=valueProp||null,dispatch({type:"value/change",value:valueProp||null}));},t30=[valueProp],$[84]=valueProp,$[85]=t29,$[86]=t30):(t29=$[85],t30=$[86]),useEffect$1(t29,t30);let t31,t32;$[87]!==focused?(t31=()=>{!focused&&valueRef.current&&dispatch({type:"root/setActiveValue",value:valueRef.current});},t32=[focused],$[87]=focused,$[88]=t31,$[89]=t32):(t31=$[88],t32=$[89]),useEffect$1(t31,t32);let t33,t34;$[90]!==activeValue||$[91]!==filteredOptions?(t33=()=>{const listElement=listBoxElementRef.current;if(!listElement)return;const activeOption_1=filteredOptions.find(o_2=>o_2.value===activeValue);if(activeOption_1){const activeIndex_1=filteredOptions.indexOf(activeOption_1),activeItemElement=listElement.childNodes[activeIndex_1];if(activeItemElement){if(_hasFocus(activeItemElement))return;focusFirstDescendant(activeItemElement);}}},t34=[activeValue,filteredOptions],$[90]=activeValue,$[91]=filteredOptions,$[92]=t33,$[93]=t34):(t33=$[92],t34=$[93]),useEffect$1(t33,t34);let t35;bb0:{if(!loading&&!disabled&&value){let t362;$[94]===Symbol.for("react.memo_cache_sentinel")?(t362={"aria-label":"Clear",onFocus:handleClearButtonFocus},$[94]=t362):t362=$[94],t35=t362;break bb0;}t35=void 0;}const clearButton=t35,openButtonBoxPadding=padding.map(_temp$3),openButtonPadding=padding.map(_temp2$1),openButtonProps=typeof openButton=="object"?openButton:EMPTY_RECORD;let t36;$[95]!==dispatchOpen||$[96]!==openButtonProps?(t36=event_4=>{dispatchOpen(),openButtonProps.onClick&&openButtonProps.onClick(event_4),_raf(()=>{var _inputElementRef$curr5;return(_inputElementRef$curr5=inputElementRef.current)===null||_inputElementRef$curr5===void 0?void 0:_inputElementRef$curr5.focus();});},$[95]=dispatchOpen,$[96]=openButtonProps,$[97]=t36):t36=$[97];const handleOpenClick=t36;let t37;$[98]!==disabled||$[99]!==expanded||$[100]!==fontSize||$[101]!==handleOpenClick||$[102]!==openButton||$[103]!==openButtonBoxPadding||$[104]!==openButtonPadding||$[105]!==openButtonProps||$[106]!==readOnly?(t37=!disabled&&!readOnly&&openButton?/* @__PURE__ */jsx(Box,{"aria-hidden":expanded,padding:openButtonBoxPadding,children:/* @__PURE__ */jsx(Button,_objectSpread(_objectSpread({"aria-label":"Open",disabled:expanded,fontSize,icon:ChevronDownIcon,mode:"bleed",padding:openButtonPadding},openButtonProps),{},{onClick:handleOpenClick}))}):void 0,$[98]=disabled,$[99]=expanded,$[100]=fontSize,$[101]=handleOpenClick,$[102]=openButton,$[103]=openButtonBoxPadding,$[104]=openButtonPadding,$[105]=openButtonProps,$[106]=readOnly,$[107]=t37):t37=$[107];const openButtonNode=t37;let t38;bb1:{if(query===null){if(value!==null){let t392;$[108]!==currentOption||$[109]!==renderValue||$[110]!==value?(t392=renderValue(value,currentOption),$[108]=currentOption,$[109]=renderValue,$[110]=value,$[111]=t392):t392=$[111],t38=t392;break bb1;}t38="";break bb1;}t38=query;}const inputValue=t38;let t39;$[112]!==listFocused?(t39=event_5=>{var _inputElementRef$curr6;event_5.key==="Tab"&&listFocused&&((_inputElementRef$curr6=inputElementRef.current)===null||_inputElementRef$curr6===void 0?void 0:_inputElementRef$curr6.focus());},$[112]=listFocused,$[113]=t39):t39=$[113];const handleListBoxKeyDown=t39;let t40;bb2:{if(filteredOptions.length===0){t40=null;break bb2;}let t412;if($[114]!==activeValue||$[115]!==currentOption||$[116]!==filteredOptions||$[117]!==handleOptionSelect||$[118]!==id||$[119]!==listFocused||$[120]!==loading||$[121]!==renderOption){let t423;$[123]!==activeValue||$[124]!==currentOption||$[125]!==handleOptionSelect||$[126]!==id||$[127]!==listFocused||$[128]!==loading||$[129]!==renderOption?(t423=option_0=>{const active=activeValue!==null?option_0.value===activeValue:currentOption===option_0;return/* @__PURE__ */jsx(AutocompleteOption,{id:"".concat(id,"-option-").concat(option_0.value),onSelect:handleOptionSelect,selected:active,value:option_0.value,children:cloneElement(renderOption(option_0),{disabled:loading,selected:active,tabIndex:listFocused&&active?0:-1})},option_0.value);},$[123]=activeValue,$[124]=currentOption,$[125]=handleOptionSelect,$[126]=id,$[127]=listFocused,$[128]=loading,$[129]=renderOption,$[130]=t423):t423=$[130],t412=filteredOptions.map(t423),$[114]=activeValue,$[115]=currentOption,$[116]=filteredOptions,$[117]=handleOptionSelect,$[118]=id,$[119]=listFocused,$[120]=loading,$[121]=renderOption,$[122]=t412;}else t412=$[122];let t422;$[131]!==listBoxId||$[132]!==t412?(t422=/* @__PURE__ */jsx(Stack,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:listBoxId,ref:listBoxElementRef,role:"listbox",space:1,children:t412}),$[131]=listBoxId,$[132]=t412,$[133]=t422):t422=$[133];let t432;$[134]!==handleListBoxKeyDown||$[135]!==listBox||$[136]!==t422?(t432=/* @__PURE__ */jsx(ListBox,_objectSpread(_objectSpread({"data-ui":"AutoComplete__results",onKeyDown:handleListBoxKeyDown,padding:1},listBox),{},{tabIndex:-1,children:t422})),$[134]=handleListBoxKeyDown,$[135]=listBox,$[136]=t422,$[137]=t432):t432=$[137],t40=t432;}const content2=t40;let t41;bb3:{if(renderPopover){const t423=!expanded;let t432;$[138]!==content2||$[139]!==handlePopoverMouseEnter||$[140]!==handlePopoverMouseLeave||$[141]!==inputElement||$[142]!==renderPopover||$[143]!==t423?(t432=/* @__PURE__ */jsx(RenderPopover,{content:content2,hidden:t423,inputElement,onMouseEnter:handlePopoverMouseEnter,onMouseLeave:handlePopoverMouseLeave,resultsPopoverElementRef,renderPopover}),$[138]=content2,$[139]=handlePopoverMouseEnter,$[140]=handlePopoverMouseLeave,$[141]=inputElement,$[142]=renderPopover,$[143]=t423,$[144]=t432):t432=$[144],t41=t432;break bb3;}if(filteredOptionsLen===0){t41=null;break bb3;}let t422;$[145]!==content2||$[146]!==expanded||$[147]!==handlePopoverMouseEnter||$[148]!==handlePopoverMouseLeave||$[149]!==inputElement||$[150]!==popover||$[151]!==radius?(t422=/* @__PURE__ */jsx(Popover,_objectSpread({arrow:!1,constrainSize:!0,content:content2,fallbackPlacements:AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS,matchReferenceWidth:!0,onMouseEnter:handlePopoverMouseEnter,onMouseLeave:handlePopoverMouseLeave,open:expanded,overflow:"auto",placement:AUTOCOMPLETE_POPOVER_PLACEMENT,portal:!0,radius,ref:resultsPopoverElementRef,referenceElement:inputElement},popover)),$[145]=content2,$[146]=expanded,$[147]=handlePopoverMouseEnter,$[148]=handlePopoverMouseLeave,$[149]=inputElement,$[150]=popover,$[151]=radius,$[152]=t422):t422=$[152],t41=t422;}const results=t41,t42=loading&&AnimatedSpinnerIcon,t43=suffix||openButtonNode;let t44;$[153]!==activeItemId||$[154]!==border||$[155]!==clearButton||$[156]!==customValidity||$[157]!==disabled||$[158]!==expanded||$[159]!==fontSize||$[160]!==handleClearButtonClick||$[161]!==handleInputChange||$[162]!==handleInputFocus||$[163]!==icon||$[164]!==id||$[165]!==inputValue||$[166]!==listBoxId||$[167]!==padding||$[168]!==prefix||$[169]!==radius||$[170]!==readOnly||$[171]!==restProps||$[172]!==t42||$[173]!==t43?(t44=/* @__PURE__ */jsx(TextInput,_objectSpread(_objectSpread({},restProps),{},{"aria-activedescendant":activeItemId,"aria-autocomplete":"list","aria-expanded":expanded,"aria-owns":listBoxId,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border,clearButton,customValidity,disabled,fontSize,icon,iconRight:t42,id,inputMode:"search",onChange:handleInputChange,onClear:handleClearButtonClick,onFocus:handleInputFocus,padding,prefix,radius,readOnly,ref:setInputElement,role:"combobox",spellCheck:!1,suffix:t43,value:inputValue})),$[153]=activeItemId,$[154]=border,$[155]=clearButton,$[156]=customValidity,$[157]=disabled,$[158]=expanded,$[159]=fontSize,$[160]=handleClearButtonClick,$[161]=handleInputChange,$[162]=handleInputFocus,$[163]=icon,$[164]=id,$[165]=inputValue,$[166]=listBoxId,$[167]=padding,$[168]=prefix,$[169]=radius,$[170]=readOnly,$[171]=restProps,$[172]=t42,$[173]=t43,$[174]=t44):t44=$[174];let t45;return $[175]!==handleRootBlur||$[176]!==handleRootFocus||$[177]!==handleRootKeyDown||$[178]!==results||$[179]!==t44?(t45=/* @__PURE__ */jsxs(StyledAutocomplete,{"data-ui":"Autocomplete",onBlur:handleRootBlur,onFocus:handleRootFocus,onKeyDown:handleRootKeyDown,ref:rootElementRef,children:[t44,results]}),$[175]=handleRootBlur,$[176]=handleRootFocus,$[177]=handleRootKeyDown,$[178]=results,$[179]=t44,$[180]=t45):t45=$[180],t45;});function RenderPopover(_ref73){let{renderPopover,content:content2,hidden,inputElement,onMouseEnter,onMouseLeave,resultsPopoverElementRef}=_ref73;return renderPopover({content:content2,hidden,inputElement,onMouseEnter,onMouseLeave},resultsPopoverElementRef);}InnerAutocomplete.displayName="ForwardRef(Autocomplete)";function _temp$3(v_0){return v_0===0?0:v_0===1||v_0===2?1:v_0-2;}function _temp2$1(v_1){return Math.max(v_1-1,0);}const StyledBreadcrumbs=styled.ol.withConfig({displayName:"StyledBreadcrumbs",componentId:"sc-1es8h8q-0"})(_templateObject68||(_templateObject68=_taggedTemplateLiteral(["margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;"]))),ExpandButton=styled(Button).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})(_templateObject69||(_templateObject69=_taggedTemplateLiteral(["appearance:none;margin:-4px;"]))),Breadcrumbs=forwardRef(function(props,ref){var _props34;const $=dist.c(29);let children,maxLength,restProps,separator,t0;$[0]!==props?(_props34=props,{children,maxLength,separator,space:t0}=_props34,restProps=_objectWithoutProperties(_props34,_excluded53),_props34,$[0]=props,$[1]=children,$[2]=maxLength,$[3]=restProps,$[4]=separator,$[5]=t0):(children=$[1],maxLength=$[2],restProps=$[3],separator=$[4],t0=$[5]);const spaceRaw=t0===void 0?2:t0;let t1;$[6]!==spaceRaw?(t1=_getArrayProp(spaceRaw),$[6]=spaceRaw,$[7]=t1):t1=$[7];const space=t1,[open,setOpen]=useState(!1),expandElementRef=useRef$1(null),popoverElementRef=useRef$1(null);let t2;$[8]===Symbol.for("react.memo_cache_sentinel")?(t2=()=>setOpen(!1),$[8]=t2):t2=$[8];const collapse=t2;let t3;$[9]===Symbol.for("react.memo_cache_sentinel")?(t3=()=>setOpen(!0),$[9]=t3):t3=$[9];const expand=t3;let t4;$[10]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>[expandElementRef.current,popoverElementRef.current],$[10]=t4):t4=$[10],useClickOutsideEvent(collapse,t4);let t5;$[11]!==children?(t5=Children.toArray(children).filter(isValidElement$1),$[11]=children,$[12]=t5):t5=$[12];const rawItems=t5;let t6;$[13]!==maxLength||$[14]!==open||$[15]!==rawItems||$[16]!==space?(t6={collapse,expand,expandElementRef,maxLength,open,popoverElementRef,rawItems,space},$[13]=maxLength,$[14]=open,$[15]=rawItems,$[16]=space,$[17]=t6):t6=$[17];const items=useItems(t6);let t7;if($[18]!==items||$[19]!==separator||$[20]!==space){let t82;$[22]!==separator||$[23]!==space?(t82=(item,itemIndex)=>/* @__PURE__ */jsxs(Fragment$1,{children:[itemIndex>0&&/* @__PURE__ */jsx(Box,{"aria-hidden":!0,as:"li",paddingX:space,children:separator||/* @__PURE__ */jsx(Text,{muted:!0,children:"/"})}),/* @__PURE__ */jsx(Box,{as:"li",children:item})]},itemIndex),$[22]=separator,$[23]=space,$[24]=t82):t82=$[24],t7=items.map(t82),$[18]=items,$[19]=separator,$[20]=space,$[21]=t7;}else t7=$[21];let t8;return $[25]!==ref||$[26]!==restProps||$[27]!==t7?(t8=/* @__PURE__ */jsx(StyledBreadcrumbs,_objectSpread(_objectSpread({"data-ui":"Breadcrumbs"},restProps),{},{ref,children:t7})),$[25]=ref,$[26]=restProps,$[27]=t7,$[28]=t8):t8=$[28],t8;});Breadcrumbs.displayName="ForwardRef(Breadcrumbs)";function useItems(t0){const $=dist.c(28),{collapse,expand,expandElementRef,maxLength,open,popoverElementRef,rawItems,space}=t0,len=rawItems.length;if(maxLength&&len>maxLength){const beforeLength=Math.ceil(maxLength/2),afterLength=Math.floor(maxLength/2);let t1;if($[0]!==afterLength||$[1]!==beforeLength||$[2]!==collapse||$[3]!==expand||$[4]!==expandElementRef||$[5]!==len||$[6]!==open||$[7]!==popoverElementRef||$[8]!==rawItems||$[9]!==space){const t2=rawItems.slice(0,beforeLength-1);let t3;$[11]!==afterLength||$[12]!==beforeLength||$[13]!==len||$[14]!==rawItems?(t3=rawItems.slice(beforeLength-1,len-afterLength),$[11]=afterLength,$[12]=beforeLength,$[13]=len,$[14]=rawItems,$[15]=t3):t3=$[15];let t4;$[16]!==space||$[17]!==t3?(t4=/* @__PURE__ */jsx(Stack,{as:"ol",overflow:"auto",padding:space,space,children:t3}),$[16]=space,$[17]=t3,$[18]=t4):t4=$[18];const t5=open?collapse:expand;let t6;$[19]!==expandElementRef||$[20]!==open||$[21]!==t5?(t6=/* @__PURE__ */jsx(ExpandButton,{fontSize:1,mode:"bleed",onClick:t5,padding:1,ref:expandElementRef,selected:open,text:"\u2026"}),$[19]=expandElementRef,$[20]=open,$[21]=t5,$[22]=t6):t6=$[22];let t7;$[23]!==open||$[24]!==popoverElementRef||$[25]!==t4||$[26]!==t6?(t7=/* @__PURE__ */jsx(Popover,{constrainSize:!0,content:t4,open,placement:"top",portal:!0,ref:popoverElementRef,children:t6},"button"),$[23]=open,$[24]=popoverElementRef,$[25]=t4,$[26]=t6,$[27]=t7):t7=$[27],t1=[...t2,t7,...rawItems.slice(len-afterLength)],$[0]=afterLength,$[1]=beforeLength,$[2]=collapse,$[3]=expand,$[4]=expandElementRef,$[5]=len,$[6]=open,$[7]=popoverElementRef,$[8]=rawItems,$[9]=space,$[10]=t1;}else t1=$[10];return t1;}return rawItems;}function dialogStyle(_ref74){let{theme}=_ref74;const{color}=getTheme_v2(theme);return{"&:not([hidden])":{display:"flex"},top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center",outline:"none",background:color.backdrop};}function responsiveDialogPositionStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$position,position=>({"&&":{position}}));}function animationDialogStyle(props){return props.$animate?css(_templateObject70||(_templateObject70=_taggedTemplateLiteral(["\n @keyframes zoomIn {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n animation: fadeIn 200ms ease-out;\n // Animates the dialog card.\n & > [data-ui='DialogCard'] {\n animation: zoomIn 200ms ease-out;\n }\n "]))):css(_templateObject71||(_templateObject71=_taggedTemplateLiteral([""])));}const DialogContext=createGlobalScopedContext("@sanity/ui/context/dialog",{version:0});function useDialog(){return useContext(DialogContext);}function isTargetWithinScope(boundaryElement,portalElement,target){return!boundaryElement||!portalElement?!0:containsOrEqualsElement(boundaryElement,target)||containsOrEqualsElement(portalElement,target);}const StyledDialog=/* @__PURE__ */styled(Layer).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(responsivePaddingStyle,dialogStyle,responsiveDialogPositionStyle,animationDialogStyle),DialogContainer=styled(Container).withConfig({displayName:"DialogContainer",componentId:"sc-4n4xb3-1"})(_templateObject72||(_templateObject72=_taggedTemplateLiteral(["&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;"]))),DialogCardRoot=styled(Card).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})(_templateObject73||(_templateObject73=_taggedTemplateLiteral(["&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;"]))),DialogLayout=styled(Flex).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})(_templateObject74||(_templateObject74=_taggedTemplateLiteral(["flex:1;min-height:0;width:100%;"]))),DialogHeader=styled(Box).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})(_templateObject75||(_templateObject75=_taggedTemplateLiteral(["position:relative;z-index:2;"]))),DialogContent=styled(Box).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})(_templateObject76||(_templateObject76=_taggedTemplateLiteral(["position:relative;z-index:1;overflow:auto;outline:none;"]))),DialogFooter=styled(Box).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})(_templateObject77||(_templateObject77=_taggedTemplateLiteral(["position:relative;z-index:3;"]))),DialogCard=forwardRef(function(props,forwardedRef){var _portal$elements3;const $=dist.c(44),{__unstable_autoFocus:autoFocus,__unstable_hideCloseButton:hideCloseButton,children,contentRef:forwardedContentRef,footer,header,id,onClickOutside,onClose,portal:portalProp,radius:radiusProp,scheme,shadow:shadowProp,width:widthProp}=props,portal=usePortal(),portalElement=portalProp?((_portal$elements3=portal.elements)===null||_portal$elements3===void 0?void 0:_portal$elements3[portalProp])||null:portal.element,boundaryElement=useBoundaryElement().element;let t0;$[0]!==radiusProp?(t0=_getArrayProp(radiusProp),$[0]=radiusProp,$[1]=t0):t0=$[1];const radius=t0;let t1;$[2]!==shadowProp?(t1=_getArrayProp(shadowProp),$[2]=shadowProp,$[3]=t1):t1=$[3];const shadow=t1;let t2;$[4]!==widthProp?(t2=_getArrayProp(widthProp),$[4]=widthProp,$[5]=t2):t2=$[5];const width=t2,ref=useRef$1(null),contentRef=useRef$1(null),layer=useLayer(),{isTopLayer}=layer,labelId="".concat(id,"_label"),showCloseButton=!!onClose&&hideCloseButton===!1,showHeader=!!header||showCloseButton;let t3;$[6]===Symbol.for("react.memo_cache_sentinel")?(t3=()=>ref.current,$[6]=t3):t3=$[6],useImperativeHandle(forwardedRef,t3);let t4;$[7]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>contentRef.current,$[7]=t4):t4=$[7],useImperativeHandle(forwardedContentRef,t4);let t5,t6;$[8]!==autoFocus?(t5=()=>{autoFocus&&ref.current&&focusFirstDescendant(ref.current);},t6=[autoFocus,ref],$[8]=autoFocus,$[9]=t5,$[10]=t6):(t5=$[9],t6=$[10]),useEffect$1(t5,t6);let t7;$[11]!==boundaryElement||$[12]!==isTopLayer||$[13]!==onClose||$[14]!==portalElement?(t7=event=>{if(!isTopLayer||!onClose)return;const target=document.activeElement;target&&!isTargetWithinScope(boundaryElement,portalElement,target)||event.key==="Escape"&&(event.preventDefault(),event.stopPropagation(),onClose());},$[11]=boundaryElement,$[12]=isTopLayer,$[13]=onClose,$[14]=portalElement,$[15]=t7):t7=$[15],useGlobalKeyDown(t7);let t8;$[16]!==boundaryElement||$[17]!==isTopLayer||$[18]!==onClickOutside||$[19]!==portalElement?(t8=isTopLayer&&onClickOutside&&(event_0=>{const target_0=event_0.target;target_0&&!isTargetWithinScope(boundaryElement,portalElement,target_0)||onClickOutside();}),$[16]=boundaryElement,$[17]=isTopLayer,$[18]=onClickOutside,$[19]=portalElement,$[20]=t8):t8=$[20];let t9;$[21]===Symbol.for("react.memo_cache_sentinel")?(t9=()=>[ref.current],$[21]=t9):t9=$[21],useClickOutsideEvent(t8,t9);let t10;$[22]!==header||$[23]!==labelId||$[24]!==onClose||$[25]!==showCloseButton||$[26]!==showHeader?(t10=showHeader&&/* @__PURE__ */jsx(DialogHeader,{children:/* @__PURE__ */jsxs(Flex,{align:"flex-start",padding:3,children:[/* @__PURE__ */jsx(Box,{flex:1,padding:2,children:header&&/* @__PURE__ */jsx(Text,{id:labelId,size:1,weight:"semibold",children:header})}),showCloseButton&&/* @__PURE__ */jsx(Box,{flex:"none",children:/* @__PURE__ */jsx(Button,{"aria-label":"Close dialog",disabled:!onClose,icon:CloseIcon,mode:"bleed",onClick:onClose,padding:2})})]})}),$[22]=header,$[23]=labelId,$[24]=onClose,$[25]=showCloseButton,$[26]=showHeader,$[27]=t10):t10=$[27];let t11;$[28]!==children?(t11=/* @__PURE__ */jsx(DialogContent,{flex:1,ref:contentRef,tabIndex:-1,children}),$[28]=children,$[29]=t11):t11=$[29];let t12;$[30]!==footer?(t12=footer&&/* @__PURE__ */jsx(DialogFooter,{children:footer}),$[30]=footer,$[31]=t12):t12=$[31];let t13;$[32]!==t10||$[33]!==t11||$[34]!==t12?(t13=/* @__PURE__ */jsxs(DialogLayout,{direction:"column",children:[t10,t11,t12]}),$[32]=t10,$[33]=t11,$[34]=t12,$[35]=t13):t13=$[35];let t14;$[36]!==radius||$[37]!==scheme||$[38]!==shadow||$[39]!==t13?(t14=/* @__PURE__ */jsx(DialogCardRoot,{radius,ref,scheme,shadow,children:t13}),$[36]=radius,$[37]=scheme,$[38]=shadow,$[39]=t13,$[40]=t14):t14=$[40];let t15;return $[41]!==t14||$[42]!==width?(t15=/* @__PURE__ */jsx(DialogContainer,{"data-ui":"DialogCard",width,children:t14}),$[41]=t14,$[42]=width,$[43]=t15):t15=$[43],t15;});DialogCard.displayName="ForwardRef(DialogCard)";const Dialog=forwardRef(function(props,ref){var _props35,_portal$elements4;const $=dist.c(70),dialog=useDialog(),{layer}=useTheme_v2();let _positionProp,_zOffsetProp,children,contentRef,footer,header,id,onActivate,onClickOutside,onClose,onFocus,portalProp,restProps,scheme,t0,t1,t2,t3,t4,t5,t6;$[0]!==props?(_props35=props,{__unstable_autoFocus:t0,__unstable_hideCloseButton:t1,cardRadius:t2,cardShadow:t3,children,contentRef,footer,header,id,onActivate,onClickOutside,onClose,onFocus,padding:t4,portal:portalProp,position:_positionProp,scheme,width:t5,zOffset:_zOffsetProp,animate:t6}=_props35,restProps=_objectWithoutProperties(_props35,_excluded54),_props35,$[0]=props,$[1]=_positionProp,$[2]=_zOffsetProp,$[3]=children,$[4]=contentRef,$[5]=footer,$[6]=header,$[7]=id,$[8]=onActivate,$[9]=onClickOutside,$[10]=onClose,$[11]=onFocus,$[12]=portalProp,$[13]=restProps,$[14]=scheme,$[15]=t0,$[16]=t1,$[17]=t2,$[18]=t3,$[19]=t4,$[20]=t5,$[21]=t6):(_positionProp=$[1],_zOffsetProp=$[2],children=$[3],contentRef=$[4],footer=$[5],header=$[6],id=$[7],onActivate=$[8],onClickOutside=$[9],onClose=$[10],onFocus=$[11],portalProp=$[12],restProps=$[13],scheme=$[14],t0=$[15],t1=$[16],t2=$[17],t3=$[18],t4=$[19],t5=$[20],t6=$[21]);const autoFocus=t0===void 0?!0:t0,hideCloseButton=t1===void 0?!1:t1,cardRadiusProp=t2===void 0?4:t2,cardShadow=t3===void 0?3:t3,paddingProp=t4===void 0?3:t4,widthProp=t5===void 0?0:t5,_animate=t6===void 0?!1:t6,positionProp=_positionProp!==null&&_positionProp!==void 0?_positionProp:dialog.position||"fixed",zOffsetProp=_zOffsetProp!==null&&_zOffsetProp!==void 0?_zOffsetProp:dialog.zOffset||layer.dialog.zOffset,animate=usePrefersReducedMotion()?!1:_animate,portal=usePortal(),portalElement=portalProp?((_portal$elements4=portal.elements)===null||_portal$elements4===void 0?void 0:_portal$elements4[portalProp])||null:portal.element,boundaryElement=useBoundaryElement().element;let t7;$[22]!==cardRadiusProp?(t7=_getArrayProp(cardRadiusProp),$[22]=cardRadiusProp,$[23]=t7):t7=$[23];const cardRadius=t7;let t8;$[24]!==paddingProp?(t8=_getArrayProp(paddingProp),$[24]=paddingProp,$[25]=t8):t8=$[25];const padding=t8;let t9;$[26]!==positionProp?(t9=_getArrayProp(positionProp),$[26]=positionProp,$[27]=t9):t9=$[27];const position=t9;let t10;$[28]!==widthProp?(t10=_getArrayProp(widthProp),$[28]=widthProp,$[29]=t10):t10=$[29];const width=t10;let t11;$[30]!==zOffsetProp?(t11=_getArrayProp(zOffsetProp),$[30]=zOffsetProp,$[31]=t11):t11=$[31];const zOffset=t11,preDivRef=useRef$1(null),postDivRef=useRef$1(null),cardRef=useRef$1(null),focusedElementRef=useRef$1(null);let t12;$[32]!==onFocus?(t12=event=>{var _onFocus2;(_onFocus2=onFocus)===null||_onFocus2===void 0||_onFocus2(event);const target=event.target,cardElement=cardRef.current;if(cardElement&&target===preDivRef.current){focusLastDescendant(cardElement);return;}if(cardElement&&target===postDivRef.current){focusFirstDescendant(cardElement);return;}isHTMLElement(event.target)&&(focusedElementRef.current=event.target);},$[32]=onFocus,$[33]=t12):t12=$[33];const handleFocus=t12,labelId="".concat(id,"_label"),rootClickTimeoutRef=useRef$1(void 0);let t13;$[34]!==boundaryElement||$[35]!==portalElement?(t13=()=>{rootClickTimeoutRef.current&&clearTimeout(rootClickTimeoutRef.current),rootClickTimeoutRef.current=setTimeout(()=>{const activeElement=document.activeElement;if(activeElement&&!isTargetWithinScope(boundaryElement,portalElement,activeElement)){const target_0=focusedElementRef.current;if(!target_0||!document.body.contains(target_0)){const cardElement_0=cardRef.current;cardElement_0&&focusFirstDescendant(cardElement_0);return;}target_0.focus();}},0);},$[34]=boundaryElement,$[35]=portalElement,$[36]=t13):t13=$[36];const handleRootClick=t13;let t14;$[37]===Symbol.for("react.memo_cache_sentinel")?(t14=/* @__PURE__ */jsx("div",{ref:preDivRef,tabIndex:0}),$[37]=t14):t14=$[37];let t15;$[38]!==autoFocus||$[39]!==cardRadius||$[40]!==cardShadow||$[41]!==children||$[42]!==contentRef||$[43]!==footer||$[44]!==header||$[45]!==hideCloseButton||$[46]!==id||$[47]!==onClickOutside||$[48]!==onClose||$[49]!==portalProp||$[50]!==scheme||$[51]!==width?(t15=/* @__PURE__ */jsx(DialogCard,{__unstable_autoFocus:autoFocus,__unstable_hideCloseButton:hideCloseButton,contentRef,footer,header,id,onClickOutside,onClose,portal:portalProp,radius:cardRadius,ref:cardRef,scheme,shadow:cardShadow,width,children}),$[38]=autoFocus,$[39]=cardRadius,$[40]=cardShadow,$[41]=children,$[42]=contentRef,$[43]=footer,$[44]=header,$[45]=hideCloseButton,$[46]=id,$[47]=onClickOutside,$[48]=onClose,$[49]=portalProp,$[50]=scheme,$[51]=width,$[52]=t15):t15=$[52];let t16;$[53]===Symbol.for("react.memo_cache_sentinel")?(t16=/* @__PURE__ */jsx("div",{ref:postDivRef,tabIndex:0}),$[53]=t16):t16=$[53];let t17;$[54]!==animate||$[55]!==handleFocus||$[56]!==handleRootClick||$[57]!==id||$[58]!==labelId||$[59]!==onActivate||$[60]!==padding||$[61]!==position||$[62]!==ref||$[63]!==restProps||$[64]!==t15||$[65]!==zOffset?(t17=/* @__PURE__ */jsxs(StyledDialog,_objectSpread(_objectSpread({},restProps),{},{$animate:animate,$padding:padding,$position:position,"aria-labelledby":labelId,"aria-modal":!0,"data-ui":"Dialog",id,onActivate,onClick:handleRootClick,onFocus:handleFocus,ref,role:"dialog",zOffset,children:[t14,t15,t16]})),$[54]=animate,$[55]=handleFocus,$[56]=handleRootClick,$[57]=id,$[58]=labelId,$[59]=onActivate,$[60]=padding,$[61]=position,$[62]=ref,$[63]=restProps,$[64]=t15,$[65]=zOffset,$[66]=t17):t17=$[66];let t18;return $[67]!==portalProp||$[68]!==t17?(t18=/* @__PURE__ */jsx(Portal,{__unstable_name:portalProp,children:t17}),$[67]=portalProp,$[68]=t17,$[69]=t18):t18=$[69],t18;});Dialog.displayName="ForwardRef(Dialog)";const MenuButton=forwardRef(function(props,forwardedRef){var _buttonProp$props$sel;const $=dist.c(62),{__unstable_disableRestoreFocusOnClose:t0,boundaryElement:deprecated_boundaryElement,button:buttonProp,id,menu:menuProp,onClose,onOpen,placement:deprecated_placement,popoverScheme:deprecated_popoverScheme,portal:t1,popover,popoverRadius:deprecated_popoverRadius,preventOverflow:deprecated_preventOverflow}=props,disableRestoreFocusOnClose=t0===void 0?!1:t0,deprecated_portal=t1===void 0?!0:t1,[open,setOpen]=useState(!1),[shouldFocus,setShouldFocus]=useState(null),[buttonElement,setButtonElement]=useState(null);let t2;$[0]===Symbol.for("react.memo_cache_sentinel")?(t2=[],$[0]=t2):t2=$[0];const[menuElements,setChildMenuElements]=useState(t2),openRef=useRef$1(open);let t3,t4;$[1]!==onOpen||$[2]!==open?(t3=()=>{onOpen&&open&&!openRef.current&&onOpen();},t4=[onOpen,open],$[1]=onOpen,$[2]=open,$[3]=t3,$[4]=t4):(t3=$[3],t4=$[4]),useEffect$1(t3,t4);let t5,t6;$[5]!==onClose||$[6]!==open?(t5=()=>{onClose&&!open&&openRef.current&&onClose();},t6=[onClose,open],$[5]=onClose,$[6]=open,$[7]=t5,$[8]=t6):(t5=$[7],t6=$[8]),useEffect$1(t5,t6);let t7,t8;$[9]!==open?(t7=()=>{openRef.current=open;},t8=[open],$[9]=open,$[10]=t7,$[11]=t8):(t7=$[10],t8=$[11]),useEffect$1(t7,t8);let t9;$[12]===Symbol.for("react.memo_cache_sentinel")?(t9=()=>{setOpen(_temp$2),setShouldFocus(null);},$[12]=t9):t9=$[12];const handleButtonClick=t9;let t10;$[13]!==open?(t10=event=>{open&&event.preventDefault();},$[13]=open,$[14]=t10):t10=$[14];const handleMouseDown=t10;let t11;$[15]===Symbol.for("react.memo_cache_sentinel")?(t11=event_0=>{if(event_0.key==="ArrowDown"||event_0.key==="Enter"||event_0.key===" "){event_0.preventDefault(),setOpen(!0),setShouldFocus("first");return;}if(event_0.key==="ArrowUp"){event_0.preventDefault(),setOpen(!0),setShouldFocus("last");return;}},$[15]=t11):t11=$[15];const handleButtonKeyDown=t11;let t12;$[16]!==buttonElement||$[17]!==menuElements?(t12=event_1=>{const target=event_1.target;if(target instanceof Node&&!(buttonElement&&(target===buttonElement||buttonElement.contains(target)))){for(const el of menuElements)if(target===el||el.contains(target))return;setOpen(!1);}},$[16]=buttonElement,$[17]=menuElements,$[18]=t12):t12=$[18];const handleMenuClickOutside=t12;let t13;$[19]!==buttonElement||$[20]!==disableRestoreFocusOnClose?(t13=()=>{setOpen(!1),!disableRestoreFocusOnClose&&buttonElement&&buttonElement.focus();},$[19]=buttonElement,$[20]=disableRestoreFocusOnClose,$[21]=t13):t13=$[21];const handleMenuEscape=t13;let t14;$[22]!==menuElements?(t14=event_2=>{const target_0=event_2.relatedTarget;if(target_0 instanceof Node){for(const el_0 of menuElements)if(el_0===target_0||el_0.contains(target_0))return;setOpen(!1);}},$[22]=menuElements,$[23]=t14):t14=$[23];const handleBlur=t14;let t15;$[24]!==buttonElement||$[25]!==disableRestoreFocusOnClose?(t15=()=>{setOpen(!1),!disableRestoreFocusOnClose&&buttonElement&&buttonElement.focus();},$[24]=buttonElement,$[25]=disableRestoreFocusOnClose,$[26]=t15):t15=$[26];const handleItemClick=t15;let t16;$[27]===Symbol.for("react.memo_cache_sentinel")?(t16=el_1=>(setChildMenuElements(els=>els.concat([el_1])),()=>setChildMenuElements(els_0=>els_0.filter(_el=>_el!==el_1))),$[27]=t16):t16=$[27];const registerElement=t16;let t17;$[28]!==buttonElement||$[29]!==handleBlur||$[30]!==handleItemClick||$[31]!==handleMenuClickOutside||$[32]!==handleMenuEscape||$[33]!==id||$[34]!==menuProp||$[35]!==shouldFocus?(t17=menuProp&&cloneElement(menuProp,{"aria-labelledby":id,onBlurCapture:handleBlur,onClickOutside:handleMenuClickOutside,onEscape:handleMenuEscape,onItemClick:handleItemClick,originElement:buttonElement,registerElement,shouldFocus}),$[28]=buttonElement,$[29]=handleBlur,$[30]=handleItemClick,$[31]=handleMenuClickOutside,$[32]=handleMenuEscape,$[33]=id,$[34]=menuProp,$[35]=shouldFocus,$[36]=t17):t17=$[36];const menu=t17;let t18;$[37]!==buttonProp||$[38]!==handleMouseDown||$[39]!==id||$[40]!==open?(t18=buttonProp&&cloneElement(buttonProp,{"data-ui":"MenuButton",id,onClick:handleButtonClick,onKeyDown:handleButtonKeyDown,onMouseDown:handleMouseDown,"aria-haspopup":!0,"aria-expanded":open,ref:setButtonElement,selected:(_buttonProp$props$sel=buttonProp.props.selected)!==null&&_buttonProp$props$sel!==void 0?_buttonProp$props$sel:open}),$[37]=buttonProp,$[38]=handleMouseDown,$[39]=id,$[40]=open,$[41]=t18):t18=$[41];const button=t18;let t19,t20;$[42]!==buttonElement?(t19=()=>buttonElement,t20=[buttonElement],$[42]=buttonElement,$[43]=t19,$[44]=t20):(t19=$[43],t20=$[44]),useImperativeHandle(forwardedRef,t19,t20);let t21;$[45]!==popover?(t21=popover||{},$[45]=popover,$[46]=t21):t21=$[46];let t22;$[47]!==deprecated_boundaryElement||$[48]!==deprecated_placement||$[49]!==deprecated_popoverRadius||$[50]!==deprecated_popoverScheme||$[51]!==deprecated_portal||$[52]!==deprecated_preventOverflow||$[53]!==t21?(t22=_objectSpread({boundaryElement:deprecated_boundaryElement,overflow:"auto",placement:deprecated_placement,portal:deprecated_portal,preventOverflow:deprecated_preventOverflow,radius:deprecated_popoverRadius,scheme:deprecated_popoverScheme},t21),$[47]=deprecated_boundaryElement,$[48]=deprecated_placement,$[49]=deprecated_popoverRadius,$[50]=deprecated_popoverScheme,$[51]=deprecated_portal,$[52]=deprecated_preventOverflow,$[53]=t21,$[54]=t22):t22=$[54];const popoverProps=t22;let t23;$[55]!==button?(t23=button||/* @__PURE__ */jsx(Fragment,{}),$[55]=button,$[56]=t23):t23=$[56];let t24;return $[57]!==menu||$[58]!==open||$[59]!==popoverProps||$[60]!==t23?(t24=/* @__PURE__ */jsx(Popover,_objectSpread(_objectSpread({"data-ui":"MenuButton__popover"},popoverProps),{},{content:menu,open,children:t23})),$[57]=menu,$[58]=open,$[59]=popoverProps,$[60]=t23,$[61]=t24):t24=$[61],t24;});MenuButton.displayName="ForwardRef(MenuButton)";function _temp$2(v){return!v;}const keyframe=keyframes$1(_templateObject78||(_templateObject78=_taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"]))),animation=css(_templateObject79||(_templateObject79=_taggedTemplateLiteral(["\n background-image: linear-gradient(\n to right,\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-to),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from)\n );\n background-position: 100%;\n background-size: 200% 100%;\n background-attachment: fixed;\n animation-name: ",";\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n animation-duration: 2000ms;\n"])),keyframe),skeletonStyle=css(_templateObject80||(_templateObject80=_taggedTemplateLiteral(["\n opacity: ",";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ","\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])),_ref75=>{let{$visible}=_ref75;return $visible?1:0;},_ref76=>{let{$animated}=_ref76;return $animated?animation:css(_templateObject81||(_templateObject81=_taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));}),StyledSkeleton$1=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(responsiveRadiusStyle,skeletonStyle),Skeleton=forwardRef(function(props,ref){var _props36;const $=dist.c(16);let delay,radius,restProps,t0;$[0]!==props?(_props36=props,{animated:t0,delay,radius}=_props36,restProps=_objectWithoutProperties(_props36,_excluded55),_props36,$[0]=props,$[1]=delay,$[2]=radius,$[3]=restProps,$[4]=t0):(delay=$[1],radius=$[2],restProps=$[3],t0=$[4]);const animated=t0===void 0?!1:t0,[visible,setVisible]=useState(!delay);let t1,t2;$[5]!==delay?(t1=()=>{if(!delay)return;const timeout=setTimeout(()=>{setVisible(!0);},delay);return()=>{clearTimeout(timeout);};},t2=[delay],$[5]=delay,$[6]=t1,$[7]=t2):(t1=$[6],t2=$[7]),useEffect$1(t1,t2);let t3;$[8]!==radius?(t3=_getArrayProp(radius),$[8]=radius,$[9]=t3):t3=$[9];const t4=delay?visible:!0;let t5;return $[10]!==animated||$[11]!==ref||$[12]!==restProps||$[13]!==t3||$[14]!==t4?(t5=/* @__PURE__ */jsx(StyledSkeleton$1,_objectSpread(_objectSpread({},restProps),{},{$animated:animated,$radius:t3,$visible:t4,ref})),$[10]=animated,$[11]=ref,$[12]=restProps,$[13]=t3,$[14]=t4,$[15]=t5):t5=$[15],t5;});Skeleton.displayName="ForwardRef(Skeleton)";const StyledSkeleton=/* @__PURE__ */styled(Skeleton).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(props=>{const{$size,$style}=props,{font,media}=getTheme_v2(props.theme),fontStyle=font[$style];return _responsive(media,$size,sizeIndex=>{const fontSize=fontStyle.sizes[sizeIndex];return{height:fontSize.lineHeight-fontSize.ascenderHeight-fontSize.descenderHeight};});}),TextSkeleton=forwardRef(function(props,ref){var _props37;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props37=props,{size:t0}=_props37,restProps=_objectWithoutProperties(_props37,_excluded56),_props37,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"text"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});TextSkeleton.displayName="ForwardRef(TextSkeleton)";const LabelSkeleton=forwardRef(function(props,ref){var _props38;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props38=props,{size:t0}=_props38,restProps=_objectWithoutProperties(_props38,_excluded57),_props38,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"label"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});LabelSkeleton.displayName="ForwardRef(LabelSkeleton)";const HeadingSkeleton=forwardRef(function(props,ref){var _props39;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props39=props,{size:t0}=_props39,restProps=_objectWithoutProperties(_props39,_excluded58),_props39,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"heading"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});HeadingSkeleton.displayName="ForwardRef(HeadingSkeleton)";const CodeSkeleton=forwardRef(function(props,ref){var _props40;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props40=props,{size:t0}=_props40,restProps=_objectWithoutProperties(_props40,_excluded59),_props40,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"code"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});CodeSkeleton.displayName="ForwardRef(CodeSkeleton)";const TabPanel=forwardRef(function(props,ref){var _props41;const $=dist.c(9);let flex,restProps;$[0]!==props?(_props41=props,{flex}=_props41,restProps=_objectWithoutProperties(_props41,_excluded60),_props41,$[0]=props,$[1]=flex,$[2]=restProps):(flex=$[1],restProps=$[2]);const t0=props.tabIndex===void 0?0:props.tabIndex;let t1;return $[3]!==flex||$[4]!==props.children||$[5]!==ref||$[6]!==restProps||$[7]!==t0?(t1=/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({"data-ui":"TabPanel"},restProps),{},{flex,ref,role:"tabpanel",tabIndex:t0,children:props.children})),$[3]=flex,$[4]=props.children,$[5]=ref,$[6]=restProps,$[7]=t0,$[8]=t1):t1=$[8],t1;});TabPanel.displayName="ForwardRef(TabPanel)";const LOADING_BAR_HEIGHT=2;styled(Flex).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})(_templateObject82||(_templateObject82=_taggedTemplateLiteral(["overflow-x:auto;"])));const StyledToast=styled(Card).withConfig({displayName:"StyledToast",componentId:"sc-1rr7rxo-1"})(_templateObject83||(_templateObject83=_taggedTemplateLiteral(["pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(","px / 2);}"])),LOADING_BAR_HEIGHT),LoadingBar=styled.div.withConfig({displayName:"LoadingBar",componentId:"sc-1rr7rxo-2"})(_templateObject84||(_templateObject84=_taggedTemplateLiteral(["display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;"])));styled(Card).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})(_templateObject85||(_templateObject85=_taggedTemplateLiteral(["position:absolute;top:0;left:-","px;right:-","px;bottom:","px;z-index:1;"])),LOADING_BAR_HEIGHT,LOADING_BAR_HEIGHT,LOADING_BAR_HEIGHT);const LoadingBarProgress=styled(Card).withConfig({displayName:"LoadingBarProgress",componentId:"sc-1rr7rxo-4"})(_templateObject86||(_templateObject86=_taggedTemplateLiteral(["display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:",";"])),props=>{const{color}=getTheme_v2(props.theme);return color.button.default[props.tone].enabled.bg;});motion.create(StyledToast);motion.create(Flex);motion.create(Text);motion.create(LoadingBar);motion.create(LoadingBarProgress);createGlobalScopedContext("@sanity/ui/context/toast",null);styled(Grid).withConfig({displayName:"StyledLayer",componentId:"sc-1tbwn58-0"})(_templateObject87||(_templateObject87=_taggedTemplateLiteral(["box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;"])));function _findPrevItemElement(state,itemElements,focusedElement){const idx=itemElements.indexOf(focusedElement),els=itemElements.slice(0,idx),len=els.length;for(let i=len-1;i>=0;i-=1){const itemKey=els[i].getAttribute("data-tree-key");if(!itemKey)continue;const segments=itemKey.split("/");segments.pop();const p=[];let expanded=!0;for(let j=0;j<segments.length;j+=1){var _state$k;p.push(segments[j]);const k=p.join("/");if(!((_state$k=state[k])!==null&&_state$k!==void 0&&_state$k.expanded)){expanded=!1;break;}}if(expanded)return els[i];}return null;}function _findNextItemElement(state,itemElements,focusedElement){const idx=itemElements.indexOf(focusedElement),els=itemElements.slice(idx),len=itemElements.length;for(let i=1;i<len;i+=1){if(!els[i])continue;const itemKey=els[i].getAttribute("data-tree-key");if(!itemKey)continue;const segments=itemKey.split("/");segments.pop();const p=[];let expanded=!0;for(let j=0;j<segments.length;j+=1){var _state$k2;p.push(segments[j]);const k=p.join("/");if(!((_state$k2=state[k])!==null&&_state$k2!==void 0&&_state$k2.expanded)){expanded=!1;break;}}if(expanded)return els[i];}return null;}function _focusItemElement(el){if(el.getAttribute("role")==="treeitem"&&el.focus(),el.getAttribute("role")==="none"){const firstChild=el.firstChild;firstChild&&firstChild instanceof HTMLElement&&firstChild.focus();}}const TreeContext=createGlobalScopedContext("@sanity/ui/context/tree",null),Tree=forwardRef(function(props,forwardedRef){var _props42;const $=dist.c(37);let children,onFocus,restProps,t0;$[0]!==props?(_props42=props,{children,space:t0,onFocus}=_props42,restProps=_objectWithoutProperties(_props42,_excluded61),_props42,$[0]=props,$[1]=children,$[2]=onFocus,$[3]=restProps,$[4]=t0):(children=$[1],onFocus=$[2],restProps=$[3],t0=$[4]);const space=t0===void 0?1:t0,ref=useRef$1(null),[focusedElement,setFocusedElement]=useState(null),focusedElementRef=useRef$1(focusedElement);let t1;$[5]===Symbol.for("react.memo_cache_sentinel")?(t1=[],$[5]=t1):t1=$[5];const path=t1;let t2;$[6]===Symbol.for("react.memo_cache_sentinel")?(t2=[],$[6]=t2):t2=$[6];const[itemElements,setItemElements]=useState(t2);let t3;$[7]===Symbol.for("react.memo_cache_sentinel")?(t3={},$[7]=t3):t3=$[7];const[state,setState]=useState(t3),stateRef=useRef$1(state);let t4;$[8]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>ref.current,$[8]=t4):t4=$[8],useImperativeHandle(forwardedRef,t4);let t5,t6;$[9]!==focusedElement?(t5=()=>{focusedElementRef.current=focusedElement;},t6=[focusedElement],$[9]=focusedElement,$[10]=t5,$[11]=t6):(t5=$[10],t6=$[11]),useEffect$1(t5,t6);let t7,t8;$[12]!==state?(t7=()=>{stateRef.current=state;},t8=[state],$[12]=state,$[13]=t7,$[14]=t8):(t7=$[13],t8=$[14]),useEffect$1(t7,t8);let t9;$[15]===Symbol.for("react.memo_cache_sentinel")?(t9=(element,path_0,expanded,selected)=>(setState(s=>_objectSpread(_objectSpread({},s),{},{[path_0]:{element,expanded}})),selected&&setFocusedElement(element),()=>{setState(s_0=>{const newState=_objectSpread({},s_0);return delete newState[path_0],newState;});}),$[15]=t9):t9=$[15];const registerItem=t9;let t10;$[16]===Symbol.for("react.memo_cache_sentinel")?(t10=(path_1,expanded_0)=>{setState(s_1=>{const itemState=s_1[path_1];return itemState?_objectSpread(_objectSpread({},s_1),{},{[path_1]:_objectSpread(_objectSpread({},itemState),{},{expanded:expanded_0})}):s_1;});},$[16]=t10):t10=$[16];const setExpanded=t10,t11=focusedElement||itemElements[0]||null;let t12;$[17]!==space||$[18]!==state||$[19]!==t11?(t12={version:0,focusedElement:t11,level:0,path,registerItem,setExpanded,setFocusedElement,space,state},$[17]=space,$[18]=state,$[19]=t11,$[20]=t12):t12=$[20];const contextValue=t12;let t13;$[21]!==itemElements?(t13=event=>{if(focusedElementRef.current){if(event.key==="ArrowDown"){event.preventDefault();const nextEl=_findNextItemElement(stateRef.current,itemElements,focusedElementRef.current);nextEl&&(_focusItemElement(nextEl),setFocusedElement(nextEl));return;}if(event.key==="ArrowUp"){event.preventDefault();const prevEl=_findPrevItemElement(stateRef.current,itemElements,focusedElementRef.current);prevEl&&(_focusItemElement(prevEl),setFocusedElement(prevEl));return;}if(event.key==="ArrowLeft"){event.preventDefault();const itemKey=focusedElementRef.current.getAttribute("data-tree-key");if(!itemKey)return;const itemState_0=stateRef.current[itemKey];if(!itemState_0)return;if(itemState_0.expanded)setState(s_2=>{const itemState_1=s_2[itemKey];return itemState_1?_objectSpread(_objectSpread({},s_2),{},{[itemKey]:_objectSpread(_objectSpread({},itemState_1),{},{expanded:!1})}):s_2;});else{const itemPath=itemKey.split("/");itemPath.pop();const parentKey=itemPath.join("/"),parentState=parentKey&&stateRef.current[parentKey];parentState&&(parentState.element.focus(),setFocusedElement(parentState.element));}return;}if(event.key==="ArrowRight"){var _stateRef$current$foc;event.preventDefault();const focusedKey=focusedElementRef.current.getAttribute("data-tree-key");if(!focusedKey)return;((_stateRef$current$foc=stateRef.current[focusedKey])===null||_stateRef$current$foc===void 0?void 0:_stateRef$current$foc.expanded)||setState(s_3=>{const itemState_2=s_3[focusedKey];return itemState_2?_objectSpread(_objectSpread({},s_3),{},{[focusedKey]:_objectSpread(_objectSpread({},itemState_2),{},{expanded:!0})}):s_3;});return;}}},$[21]=itemElements,$[22]=t13):t13=$[22];const handleKeyDown=t13;let t14;$[23]!==onFocus?(t14=event_0=>{var _onFocus3;setFocusedElement(event_0.target),(_onFocus3=onFocus)===null||_onFocus3===void 0?void 0:_onFocus3(event_0);},$[23]=onFocus,$[24]=t14):t14=$[24];const handleFocus=t14;let t15;$[25]===Symbol.for("react.memo_cache_sentinel")?(t15=()=>{if(!ref.current)return;const _itemElements=Array.from(ref.current.querySelectorAll('[data-ui="TreeItem"]'));setItemElements(_itemElements);},$[25]=t15):t15=$[25];let t16;$[26]!==children?(t16=[children],$[26]=children,$[27]=t16):t16=$[27],useEffect$1(t15,t16);let t17;$[28]!==children||$[29]!==handleFocus||$[30]!==handleKeyDown||$[31]!==restProps||$[32]!==space?(t17=/* @__PURE__ */jsx(Stack,_objectSpread(_objectSpread({as:"ul","data-ui":"Tree"},restProps),{},{onFocus:handleFocus,onKeyDown:handleKeyDown,ref,role:"tree",space,children})),$[28]=children,$[29]=handleFocus,$[30]=handleKeyDown,$[31]=restProps,$[32]=space,$[33]=t17):t17=$[33];let t18;return $[34]!==contextValue||$[35]!==t17?(t18=/* @__PURE__ */jsx(TreeContext.Provider,{value:contextValue,children:t17}),$[34]=contextValue,$[35]=t17,$[36]=t18):t18=$[36],t18;});Tree.displayName="ForwardRef(Tree)";styled(Text).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})(_templateObject88||(_templateObject88=_taggedTemplateLiteral(["& > svg{transition:transform 100ms;}"])));const listenOptions={includeResult:false,includePreviousRevision:false,visibility:"query",events:["welcome","mutation","reconnect"]};function useClient(){return useClient$1({apiVersion:"2023-02-01"});}const isSchemaMulti=type=>{return type.jsonType!=="object";};const isSchemaReference=type=>{return"to"in type||"of"in type&&type.of[0]&&"to"in type.of[0];};const filterUniqueTags=function(){let tags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return tags.flat(Infinity).filter((firstTag,index)=>{const firstTagStringified=JSON.stringify({label:firstTag.label,value:firstTag.value});return index===tags.flat(Infinity).findIndex(secondTag=>{return JSON.stringify({label:secondTag.label,value:secondTag.value})===firstTagStringified;});});};const get=(object,path,defaultValue)=>{if(!object)return defaultValue;let props=false;let prop;if(Array.isArray(path))props=path.slice(0);if(typeof path==="string")props=path.split(".");if(!Array.isArray(props))throw new Error("path must be an array or a string");let obj=object;while(props.length){prop=props.shift();if(!prop)return defaultValue;if(!obj)return defaultValue;if(obj===null||typeof obj!=="object"||Array.isArray(obj))return defaultValue;if(!(prop in obj))return defaultValue;obj=obj[prop];}return obj;};function prototypeCheck(prop){if(prop==="__proto__"||prop==="constructor"||prop==="prototype")return false;return true;}const setAtPath=(object,path,value)=>{let props=false;if(Array.isArray(path))props=path.slice(0);if(typeof path==="string")props=path.split(".");if(!Array.isArray(props))throw new Error("path must be an array or a string");const lastProp=props.pop();if(!lastProp)return false;if(!prototypeCheck(lastProp))throw new Error("setting of prototype values not supported");let thisProp;let obj=object;while(thisProp=props.shift()){if(!prototypeCheck(thisProp))throw new Error("setting of prototype values not supported");if(!thisProp)return false;if(!(thisProp in obj))obj[thisProp]={};obj=obj[thisProp];if(!obj||typeof obj!=="object")return false;}obj[lastProp]=value;return true;};function isPlainObject(value){return typeof value==="object"&&value!==null&&value.constructor===Object&&Object.prototype.toString.call(value)==="[object Object]";}var __defProp$2=Object.defineProperty;var __getOwnPropSymbols$2=Object.getOwnPropertySymbols;var __hasOwnProp$2=Object.prototype.hasOwnProperty;var __propIsEnum$2=Object.prototype.propertyIsEnumerable;var __defNormalProp$2=(obj,key,value)=>key in obj?__defProp$2(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __spreadValues$2=(a,b)=>{for(var prop in b||(b={}))if(__hasOwnProp$2.call(b,prop))__defNormalProp$2(a,prop,b[prop]);if(__getOwnPropSymbols$2)for(var prop of __getOwnPropSymbols$2(b)){if(__propIsEnum$2.call(b,prop))__defNormalProp$2(a,prop,b[prop]);}return a;};const useLoading=_ref77=>{let{initialLoadingOptions={},initialState=true}=_ref77;const[loadingOptions,setLoadingOptions]=React__default.useState(initialLoadingOptions);const[isLoading,setIsLoading]=React__default.useState(initialState);React__default.useEffect(()=>{let loaded=false;if(Object.keys(loadingOptions).length){for(const option in loadingOptions){if(loadingOptions[option])loaded=true;}}setIsLoading(loaded);},[loadingOptions]);const setLoadOption=React__default.useCallback(properties=>{setLoadingOptions(oldValue=>{return __spreadValues$2(__spreadValues$2({},oldValue),properties);});},[]);return[isLoading,loadingOptions,setLoadOption];};const useOptions=_ref78=>{let{initialState=[]}=_ref78;const[options,setOptions]=React__default.useState(initialState);const[groupOptions,setGroupOptions]=React__default.useState({});React__default.useEffect(()=>{const opts=[];for(const group in groupOptions){if(Array.isArray(groupOptions[group]))opts.push(...groupOptions[group]);}setOptions(filterUniqueTags(opts));},[groupOptions]);const setTagOption=React__default.useCallback(properties=>{setGroupOptions(oldValue=>__spreadValues$2(__spreadValues$2({},oldValue),properties));},[]);return[options,groupOptions,setTagOption];};var __defProp$1=Object.defineProperty;var __defProps$1=Object.defineProperties;var __getOwnPropDescs$1=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols$1=Object.getOwnPropertySymbols;var __hasOwnProp$1=Object.prototype.hasOwnProperty;var __propIsEnum$1=Object.prototype.propertyIsEnumerable;var __defNormalProp$1=(obj,key,value)=>key in obj?__defProp$1(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __spreadValues$1=(a,b)=>{for(var prop in b||(b={}))if(__hasOwnProp$1.call(b,prop))__defNormalProp$1(a,prop,b[prop]);if(__getOwnPropSymbols$1)for(var prop of __getOwnPropSymbols$1(b)){if(__propIsEnum$1.call(b,prop))__defNormalProp$1(a,prop,b[prop]);}return a;};var __spreadProps$1=(a,b)=>__defProps$1(a,__getOwnPropDescs$1(b));const prepareTag=_ref79=>{let{customLabel="label",customValue="value"}=_ref79;return tag=>{const labelValue=get(tag,customLabel);const valueValue=get(tag,customValue);const labelSource=labelValue!=null?labelValue:tag.label;const valueSource=valueValue!=null?valueValue:tag.value;const label=labelSource===null?"":String(labelSource);const value=valueSource===null?"":String(valueSource);const tempTag=__spreadProps$1(__spreadValues$1({},tag),{_type:"tag",_key:value,_labelTemp:tag.label,_valueTemp:tag.value,label,value});return tempTag;};};function revertTag(_ref80){let{customLabel="label",customValue="value",isReference}=_ref80;return tag=>{if(isReference===true){const tempTag2={_ref:tag._id,_type:"reference"};return tempTag2;}const tempTag=__spreadProps$1(__spreadValues$1({},tag),{label:tag._labelTemp,value:tag._valueTemp});setAtPath(tempTag,customLabel,tag.label);setAtPath(tempTag,customValue,tag.value);delete tempTag._labelTemp;delete tempTag._valueTemp;if(tempTag.label===void 0)delete tempTag.label;if(tempTag.value===void 0)delete tempTag.value;return tempTag;};}const prepareTags=async _ref81=>{let{client,tags,customLabel="label",customValue="value"}=_ref81;const prepare=prepareTag({customLabel,customValue});if(tags===void 0||tags===null)return void 0;if(Array.isArray(tags)&&!tags.length)return[];if(Array.isArray(tags)&&tags.length&&!isPlainObject(tags[0])){const normalized=tags.map(tag=>{const value=String(tag);const tempTag={label:value,value};setAtPath(tempTag,customLabel,value);setAtPath(tempTag,customValue,value);return tempTag;});return normalized.map(prepare);}if(Array.isArray(tags)&&isPlainObject(tags[0])&&"_ref"in tags[0]&&"_type"in tags[0]){return(await client.fetch("*[_id in $refs]",{refs:tags.map(tag=>tag._ref)})).map(prepare);}if(Array.isArray(tags))return tags.map(prepare);if(!isPlainObject(tags)){const value=String(tags);const tempTag={label:value,value};setAtPath(tempTag,customLabel,value);setAtPath(tempTag,customValue,value);return prepare(tempTag);}if(isPlainObject(tags)&&"_ref"in tags&&"_type"in tags)return prepare(await client.fetch("*[_id == $ref][0]",{ref:tags._ref}));return prepare(tags);};const prepareTagsAsList=async preparedTagsOptions=>{const preparedTags=await prepareTags(preparedTagsOptions);if(preparedTags===void 0)return[];if(!Array.isArray(preparedTags))return[preparedTags];return preparedTags;};function revertTags(_ref82){let{tags,customLabel="label",customValue="value",isMulti,isReference}=_ref82;const revert=revertTag({customLabel,customValue,isReference});if(tags===void 0)return void 0;if(isMulti){const tagsArray=Array.isArray(tags)?tags:[tags];if(isReference)return tagsArray.map(revert);return tagsArray.map(revert);}const tag=Array.isArray(tags)?tags[0]:tags;if(isReference)return revert(tag);return revert(tag);}const refineTagsPipe=_ref83=>{let{client,customLabel="label",customValue="value"}=_ref83;return pipe$1(map(val=>Array.isArray(val)?val.flat(Infinity):val),switchMap(val=>prepareTagsAsList({client,tags:val,customLabel,customValue})),map(val=>filterUniqueTags(val)));};const getGeneralObservable=_ref84=>{let{client,query,params,customLabel="label",customValue="value"}=_ref84;return client.listen(query,params,listenOptions).pipe(switchMap(()=>client.fetch(query,params)),refineTagsPipe({client,customLabel,customValue}));};function getSelectedTags(_ref85){let{client,tags,isMulti,customLabel="label",customValue="value"}=_ref85;const tagFunction=async()=>tags;return defer(()=>from(tagFunction())).pipe(refineTagsPipe({client,customLabel,customValue}),map(val=>isMulti?val:val[0]));}const predefinedTagWrapper=async predefinedTags=>{const tags=await predefinedTags();if(!Array.isArray(tags))return[tags];return tags;};const getPredefinedTags=_ref86=>{let{client,predefinedTags,customLabel="label",customValue="value"}=_ref86;const tagFunction=predefinedTags instanceof Function?predefinedTags:async()=>predefinedTags;return defer(()=>from(predefinedTagWrapper(tagFunction)).pipe(refineTagsPipe({client,customLabel,customValue})));};const getTagsFromReference=_ref87=>{let{client,document,customLabel="label",customValue="value"}=_ref87;const query='\n *[ _type == $document && defined(@[$customLabel]) && defined(@[$customValue])] {\n _id,\n "value": coalesce(@[$customValue].current,@[$customValue]),\n "label": @[$customLabel]\n }\n ';const params={document,customLabel:customLabel.split(".")[0],customValue:customValue.split(".")[0]};return getGeneralObservable({client,query,params,customLabel,customValue});};const getTagsFromRelated=_ref88=>{let{client,documentType,field,isMulti,customLabel="label",customValue="value"}=_ref88;const query="\n *[\n _type == $documentType &&\n defined(@[$field]) &&\n defined(@[$field][]) == $isMulti &&\n (\n (!$isMulti && defined(@[$field]->[$customLabel]) && defined(@[$field]->[$customValue])) ||\n (!$isMulti && defined(@[$field][$customLabel]) && defined(@[$field][$customValue])) ||\n ($isMulti && defined(@[$field][]->[$customLabel]) && defined(@[$field][]->[$customValue])) ||\n ($isMulti && defined(@[$field][][$customLabel]) && defined(@[$field][][$customValue]))\n )\n ][$field]\n ";const params={documentType,field,isMulti,customLabel:customLabel.split(".")[0],customValue:customValue.split(".")[0]};return getGeneralObservable({client,query,params,customLabel,customValue});};const ReferenceCreateWarning=()=>/* @__PURE__ */jsxs(Card,{padding:[3,3,4],marginBottom:[3,3,4],radius:2,shadow:1,tone:"caution",children:["Tag References cannot be created inline. Please set the ",/* @__PURE__ */jsx("code",{children:"allowCreate"})," option explicitly to ",/* @__PURE__ */jsx("code",{children:"false"})," to remove this warning message."]});const ReferencePredefinedWarning=()=>/* @__PURE__ */jsxs(Card,{padding:[3,3,4],marginBottom:[3,3,4],radius:2,shadow:1,tone:"caution",children:["Tag References cannot have predefined tags. Please unset the ",/* @__PURE__ */jsx("code",{children:"predefinedTags"})," option to remove this warning message."]});function styleInject(css,ref){if(ref===void 0)ref={};var insertAt=ref.insertAt;if(!css||typeof document==='undefined'){return;}var head=document.head||document.getElementsByTagName('head')[0];var style=document.createElement('style');style.type='text/css';if(insertAt==='top'){if(head.firstChild){head.insertBefore(style,head.firstChild);}else{head.appendChild(style);}}else{head.appendChild(style);}if(style.styleSheet){style.styleSheet.cssText=css;}else{style.appendChild(document.createTextNode(css));}}var css_248z=".TagsInput-module_control__Om-kz {\n background-color: var(--card-bg-color) !important;\n border-color: var(--card-border-color) !important;\n transition: none !important;\n}\n\n.TagsInput-module_input__fdTrV {\n color: var(--input-fg-color) !important;\n}\n\n.TagsInput-module_control__Om-kz:hover {\n border-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_menu__l2H-i {\n background-color: var(--card-bg-color) !important;\n border: 1px solid var(--card-border-color) !important;\n}\n\n.TagsInput-module_option__cqS2H {\n background-color: var(--card-bg-color) !important;\n color: var(--input-fg-color) !important;\n}\n\n.TagsInput-module_option__cqS2H:hover {\n background-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_indicatorSeparator__koEIb {\n background-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_placeholder__ZjU5A,\n.TagsInput-module_singleValue__bIhOY {\n color: var(--input-fg-color) !important;\n}\n\n.TagsInput-module_multiValue__zq4m6 {\n background-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_multiValueLabel__R9vFQ {\n color: var(--card-fg-color) !important;\n}\n\n.TagsInput-module_multiValueRemove__2zX5H {\n color: var(--card-fg-color) !important;\n}\n\n.TagsInput-module_multiValueRemove__2zX5H:hover {\n color: #de350b !important;\n}\n";var styles={"control":"TagsInput-module_control__Om-kz","input":"TagsInput-module_input__fdTrV","menu":"TagsInput-module_menu__l2H-i","option":"TagsInput-module_option__cqS2H","indicatorSeparator":"TagsInput-module_indicatorSeparator__koEIb","placeholder":"TagsInput-module_placeholder__ZjU5A","singleValue":"TagsInput-module_singleValue__bIhOY","multiValue":"TagsInput-module_multiValue__zq4m6","multiValueLabel":"TagsInput-module_multiValueLabel__R9vFQ","multiValueRemove":"TagsInput-module_multiValueRemove__2zX5H"};styleInject(css_248z);var __defProp=Object.defineProperty;var __defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty;var __propIsEnum=Object.prototype.propertyIsEnumerable;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __spreadValues=(a,b)=>{for(var prop in b||(b={}))if(__hasOwnProp.call(b,prop))__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b)){if(__propIsEnum.call(b,prop))__defNormalProp(a,prop,b[prop]);}return a;};var __spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b));const TagsInput=forwardRef((props,ref)=>{const client=useClient();const documentType=useFormValue(["_type"]);const[selected,setSelected]=React__default.useState(void 0);const[isLoading,,setLoadOption]=useLoading({});const[options,,setTagOption]=useOptions({});const prefersDark=usePrefersDark();const{schemaType,// Schema information
|
|
2350
|
+
"--card-bg2-color":color.muted.bg,"--card-link-color":color.link.fg,"--card-hairline-soft-color":color.border,"--card-hairline-hard-color":color.border};}function buttonBaseStyles(props){const{$width}=props,{style}=getTheme_v2(props.theme);return css(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n ",";\n\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n vertical-align: top;\n\n ","\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])),style===null||style===void 0?void 0:style.button,$width==="fill"&&css(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n "]))));}function combineBoxShadow(){for(var _len7=arguments.length,boxShadows=new Array(_len7),_key7=0;_key7<_len7;_key7++){boxShadows[_key7]=arguments[_key7];}return boxShadows.filter(Boolean).join(",");}function buttonColorStyles(props){var _style$button;const{$mode}=props,{button,color:baseColor,style}=getTheme_v2(props.theme),shadow=props.$mode==="ghost",mode=baseColor.button[$mode]||baseColor.button.default,color=mode[props.$tone]||mode.default,border2={width:button.border.width,color:"var(--card-border-color)"},defaultBoxShadow=void 0;return[_cardColorStyle(baseColor,color.enabled),{backgroundColor:"var(--card-bg-color)",color:"var(--card-fg-color)",boxShadow:focusRingBorderStyle(border2),'&:disabled, &[data-disabled="true"]':_cardColorStyle(baseColor,color.disabled),"&:not([data-disabled='true'])":{boxShadow:combineBoxShadow(focusRingBorderStyle(border2),shadow?defaultBoxShadow:void 0),"&:focus":{boxShadow:focusRingStyle({base:baseColor,border:{width:2,color:baseColor.bg},focusRing:button.focusRing})},"&:focus:not(:focus-visible)":{boxShadow:combineBoxShadow(focusRingBorderStyle(border2),shadow?defaultBoxShadow:void 0)},"@media (hover: hover)":{"&:hover":_cardColorStyle(baseColor,color.hovered),"&:active":_cardColorStyle(baseColor,color.pressed),"&[data-hovered]":_cardColorStyle(baseColor,color.hovered)},"&[data-selected]":_cardColorStyle(baseColor,color.pressed)}},style===null||style===void 0||(_style$button=style.button)===null||_style$button===void 0?void 0:_style$button.root].filter(Boolean);}const StyledButton=/* @__PURE__ */styled.button.withConfig({displayName:"StyledButton",componentId:"sc-aaekt4-0"})(responsiveRadiusStyle,buttonBaseStyles,buttonColorStyles),LoadingBox=styled.div.withConfig({displayName:"LoadingBox",componentId:"sc-aaekt4-1"})(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;"]))),Button=forwardRef(function(props,ref){var _props8;const $=dist.c(86);let IconComponent,IconRightComponent,children,disabled,loading,paddingBottomProp,paddingLeftProp,paddingRightProp,paddingTopProp,paddingXProp,paddingYProp,restProps,selected,t0,t1,t2,t3,t4,t5,t6,t7,t8,text,textAlign,textWeight,width;$[0]!==props?(_props8=props,{children,disabled,fontSize:t0,icon:IconComponent,iconRight:IconRightComponent,justify:t1,loading,mode:t2,padding:t3,paddingX:paddingXProp,paddingY:paddingYProp,paddingTop:paddingTopProp,paddingBottom:paddingBottomProp,paddingLeft:paddingLeftProp,paddingRight:paddingRightProp,radius:t4,selected,space:t5,text,textAlign,textWeight,tone:t6,type:t7,muted:t8,width}=_props8,restProps=_objectWithoutProperties(_props8,_excluded23),_props8,$[0]=props,$[1]=IconComponent,$[2]=IconRightComponent,$[3]=children,$[4]=disabled,$[5]=loading,$[6]=paddingBottomProp,$[7]=paddingLeftProp,$[8]=paddingRightProp,$[9]=paddingTopProp,$[10]=paddingXProp,$[11]=paddingYProp,$[12]=restProps,$[13]=selected,$[14]=t0,$[15]=t1,$[16]=t2,$[17]=t3,$[18]=t4,$[19]=t5,$[20]=t6,$[21]=t7,$[22]=t8,$[23]=text,$[24]=textAlign,$[25]=textWeight,$[26]=width):(IconComponent=$[1],IconRightComponent=$[2],children=$[3],disabled=$[4],loading=$[5],paddingBottomProp=$[6],paddingLeftProp=$[7],paddingRightProp=$[8],paddingTopProp=$[9],paddingXProp=$[10],paddingYProp=$[11],restProps=$[12],selected=$[13],t0=$[14],t1=$[15],t2=$[16],t3=$[17],t4=$[18],t5=$[19],t6=$[20],t7=$[21],t8=$[22],text=$[23],textAlign=$[24],textWeight=$[25],width=$[26]);const fontSize2=t0===void 0?1:t0,justifyProp=t1===void 0?"center":t1,mode=t2===void 0?"default":t2,paddingProp=t3===void 0?3:t3,radiusProp=t4===void 0?2:t4,spaceProp=t5===void 0?3:t5,tone=t6===void 0?"default":t6,type=t7===void 0?"button":t7,muted=t8===void 0?!1:t8,{button}=useTheme_v2();let t9;$[27]!==justifyProp?(t9=_getArrayProp(justifyProp),$[27]=justifyProp,$[28]=t9):t9=$[28];const justify=t9;let t10;$[29]!==paddingProp?(t10=_getArrayProp(paddingProp),$[29]=paddingProp,$[30]=t10):t10=$[30];const padding=t10;let t11;$[31]!==paddingXProp?(t11=_getArrayProp(paddingXProp),$[31]=paddingXProp,$[32]=t11):t11=$[32];const paddingX=t11;let t12;$[33]!==paddingYProp?(t12=_getArrayProp(paddingYProp),$[33]=paddingYProp,$[34]=t12):t12=$[34];const paddingY=t12;let t13;$[35]!==paddingTopProp?(t13=_getArrayProp(paddingTopProp),$[35]=paddingTopProp,$[36]=t13):t13=$[36];const paddingTop=t13;let t14;$[37]!==paddingBottomProp?(t14=_getArrayProp(paddingBottomProp),$[37]=paddingBottomProp,$[38]=t14):t14=$[38];const paddingBottom=t14;let t15;$[39]!==paddingLeftProp?(t15=_getArrayProp(paddingLeftProp),$[39]=paddingLeftProp,$[40]=t15):t15=$[40];const paddingLeft=t15;let t16;$[41]!==paddingRightProp?(t16=_getArrayProp(paddingRightProp),$[41]=paddingRightProp,$[42]=t16):t16=$[42];const paddingRight=t16;let t17;$[43]!==radiusProp?(t17=_getArrayProp(radiusProp),$[43]=radiusProp,$[44]=t17):t17=$[44];const radius=t17;let t18;$[45]!==spaceProp?(t18=_getArrayProp(spaceProp),$[45]=spaceProp,$[46]=t18):t18=$[46];const space=t18;let t19;$[47]!==padding||$[48]!==paddingBottom||$[49]!==paddingLeft||$[50]!==paddingRight||$[51]!==paddingTop||$[52]!==paddingX||$[53]!==paddingY?(t19={padding,paddingX,paddingY,paddingTop,paddingBottom,paddingLeft,paddingRight},$[47]=padding,$[48]=paddingBottom,$[49]=paddingLeft,$[50]=paddingRight,$[51]=paddingTop,$[52]=paddingX,$[53]=paddingY,$[54]=t19):t19=$[54];const boxProps=t19,t20=!!(loading||disabled),t21=selected?"":void 0,t22=!!(loading||disabled);let t23;$[55]!==loading?(t23=!!loading&&/* @__PURE__ */jsx(LoadingBox,{children:/* @__PURE__ */jsx(Spinner,{})}),$[55]=loading,$[56]=t23):t23=$[56];let t24;$[57]!==IconComponent||$[58]!==IconRightComponent||$[59]!==boxProps||$[60]!==button||$[61]!==fontSize2||$[62]!==justify||$[63]!==muted||$[64]!==space||$[65]!==text||$[66]!==textAlign||$[67]!==textWeight?(t24=(IconComponent||text||IconRightComponent)&&/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({as:"span"},boxProps),{},{children:/* @__PURE__ */jsxs(Flex,{as:"span",justify,gap:space,children:[IconComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconComponent)&&IconComponent,reactIsExports.isValidElementType(IconComponent)&&/* @__PURE__ */jsx(IconComponent,{})]}),text&&/* @__PURE__ */jsx(Box,{children:/* @__PURE__ */jsx(Text,{muted,align:textAlign,size:fontSize2,textOverflow:"ellipsis",weight:textWeight!==null&&textWeight!==void 0?textWeight:button.textWeight,children:text})}),IconRightComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconRightComponent)&&IconRightComponent,reactIsExports.isValidElementType(IconRightComponent)&&/* @__PURE__ */jsx(IconRightComponent,{})]})]})})),$[57]=IconComponent,$[58]=IconRightComponent,$[59]=boxProps,$[60]=button,$[61]=fontSize2,$[62]=justify,$[63]=muted,$[64]=space,$[65]=text,$[66]=textAlign,$[67]=textWeight,$[68]=t24):t24=$[68];let t25;$[69]!==boxProps||$[70]!==children?(t25=children&&/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({as:"span"},boxProps),{},{children})),$[69]=boxProps,$[70]=children,$[71]=t25):t25=$[71];let t26;return $[72]!==mode||$[73]!==radius||$[74]!==ref||$[75]!==restProps||$[76]!==t20||$[77]!==t21||$[78]!==t22||$[79]!==t23||$[80]!==t24||$[81]!==t25||$[82]!==tone||$[83]!==type||$[84]!==width?(t26=/* @__PURE__ */jsxs(StyledButton,_objectSpread(_objectSpread({"data-ui":"Button"},restProps),{},{$mode:mode,$radius:radius,$tone:tone,"data-disabled":t20,"data-selected":t21,disabled:t22,ref,type,$width:width,children:[t23,t24,t25]})),$[72]=mode,$[73]=radius,$[74]=ref,$[75]=restProps,$[76]=t20,$[77]=t21,$[78]=t22,$[79]=t23,$[80]=t24,$[81]=t25,$[82]=tone,$[83]=type,$[84]=width,$[85]=t26):t26=$[85],t26;});Button.displayName="ForwardRef(Button)";function cardStyle(props){return[cardBaseStyle(props),cardColorStyle(props)];}function cardBaseStyle(props){const{$checkered}=props,{space}=getTheme_v2(props.theme);return css(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n ","\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n "])),$checkered&&css(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n background-size: ","px ","px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])),space[3],space[3]));}function cardColorStyle(props){var _style$card;const{$checkered,$focusRing,$muted}=props,{card,color,style}=getTheme_v2(props.theme),border2={width:card.border.width,color:"var(--card-border-color)"};return css(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n color-scheme: ",";\n\n ","\n\n background-color: ",";\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ","\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ","\n }\n\n &[data-selected] {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ",";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ","\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ","\n }\n\n &[data-selected] {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ",";\n }\n }\n }\n\n ","\n "])),color._dark?"dark":"light",_cardColorStyle(color,color,$checkered),$muted?"var(--card-muted-bg-color)":"var(--card-bg-color)",_cardColorStyle(color,color.selectable.default.disabled,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),_cardColorStyle(color,color.selectable.default.selected,$checkered),_cardColorStyle(color,color.selectable.default.hovered,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),$focusRing?focusRingStyle({base:color,border:border2,focusRing:card.focusRing}):void 0,_cardColorStyle(color,color.selectable.default.disabled,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),_cardColorStyle(color,color.selectable.default.selected,$checkered),_cardColorStyle(color,color.selectable.default.hovered,$checkered),_cardColorStyle(color,color.selectable.default.pressed,$checkered),$focusRing?focusRingStyle({base:color,border:border2,focusRing:card.focusRing}):void 0,style===null||style===void 0||(_style$card=style.card)===null||_style$card===void 0?void 0:_style$card.root);}const StyledCard=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledCard",componentId:"sc-osnro2-0"})(responsiveBorderStyle,responsiveRadiusStyle,responsiveShadowStyle,cardStyle),Card=forwardRef(function(props,ref){var _props9;const $=dist.c(56);let asProp,border2,borderBottom2,borderLeft2,borderRight2,borderTop2,muted,pressed,restProps,scheme,selected,shadow,t0,t1,t2,t3;$[0]!==props?(_props9=props,{__unstable_checkered:t0,__unstable_focusRing:t1,as:asProp,border:border2,borderTop:borderTop2,borderRight:borderRight2,borderBottom:borderBottom2,borderLeft:borderLeft2,muted,pressed,radius:t2,scheme,selected,shadow,tone:t3}=_props9,restProps=_objectWithoutProperties(_props9,_excluded24),_props9,$[0]=props,$[1]=asProp,$[2]=border2,$[3]=borderBottom2,$[4]=borderLeft2,$[5]=borderRight2,$[6]=borderTop2,$[7]=muted,$[8]=pressed,$[9]=restProps,$[10]=scheme,$[11]=selected,$[12]=shadow,$[13]=t0,$[14]=t1,$[15]=t2,$[16]=t3):(asProp=$[1],border2=$[2],borderBottom2=$[3],borderLeft2=$[4],borderRight2=$[5],borderTop2=$[6],muted=$[7],pressed=$[8],restProps=$[9],scheme=$[10],selected=$[11],shadow=$[12],t0=$[13],t1=$[14],t2=$[15],t3=$[16]);const checkered=t0===void 0?!1:t0,focusRing=t1===void 0?!1:t1,radius=t2===void 0?0:t2,toneProp=t3===void 0?"default":t3,as=reactIsExports.isValidElementType(asProp)?asProp:"div",rootTheme=useRootTheme(),tone=toneProp==="inherit"?rootTheme.tone:toneProp,t4=typeof as=="string"?as:void 0,t5=rootTheme.scheme;let t6;$[17]!==border2?(t6=_getArrayProp(border2),$[17]=border2,$[18]=t6):t6=$[18];let t7;$[19]!==borderTop2?(t7=_getArrayProp(borderTop2),$[19]=borderTop2,$[20]=t7):t7=$[20];let t8;$[21]!==borderRight2?(t8=_getArrayProp(borderRight2),$[21]=borderRight2,$[22]=t8):t8=$[22];let t9;$[23]!==borderBottom2?(t9=_getArrayProp(borderBottom2),$[23]=borderBottom2,$[24]=t9):t9=$[24];let t10;$[25]!==borderLeft2?(t10=_getArrayProp(borderLeft2),$[25]=borderLeft2,$[26]=t10):t10=$[26];let t11;$[27]!==radius?(t11=_getArrayProp(radius),$[27]=radius,$[28]=t11):t11=$[28];let t12;$[29]!==shadow?(t12=_getArrayProp(shadow),$[29]=shadow,$[30]=t12):t12=$[30];const t13=checkered?"":void 0,t14=pressed?"":void 0,t15=selected?"":void 0;let t16;$[31]!==as||$[32]!==checkered||$[33]!==focusRing||$[34]!==muted||$[35]!==ref||$[36]!==restProps||$[37]!==rootTheme.scheme||$[38]!==selected||$[39]!==t10||$[40]!==t11||$[41]!==t12||$[42]!==t13||$[43]!==t14||$[44]!==t15||$[45]!==t4||$[46]!==t6||$[47]!==t7||$[48]!==t8||$[49]!==t9||$[50]!==tone?(t16=/* @__PURE__ */jsx(StyledCard,_objectSpread(_objectSpread({"data-as":t4,"data-scheme":t5,"data-ui":"Card","data-tone":tone},restProps),{},{$border:t6,$borderTop:t7,$borderRight:t8,$borderBottom:t9,$borderLeft:t10,$checkered:checkered,$focusRing:focusRing,$muted:muted,$radius:t11,$shadow:t12,$tone:tone,"data-checkered":t13,"data-pressed":t14,"data-selected":t15,forwardedAs:as,ref,selected})),$[31]=as,$[32]=checkered,$[33]=focusRing,$[34]=muted,$[35]=ref,$[36]=restProps,$[37]=rootTheme.scheme,$[38]=selected,$[39]=t10,$[40]=t11,$[41]=t12,$[42]=t13,$[43]=t14,$[44]=t15,$[45]=t4,$[46]=t6,$[47]=t7,$[48]=t8,$[49]=t9,$[50]=tone,$[51]=t16):t16=$[51];let t17;return $[52]!==scheme||$[53]!==t16||$[54]!==tone?(t17=/* @__PURE__ */jsx(ThemeColorProvider,{scheme,tone,children:t16}),$[52]=scheme,$[53]=t16,$[54]=tone,$[55]=t17):t17=$[55],t17;});Card.displayName="ForwardRef(Card)";function useClickOutsideEvent(listener,t0,boundaryElement){const $=dist.c(9),elementsArg=t0===void 0?_temp$8:t0;let t1;$[0]!==boundaryElement||$[1]!==elementsArg||$[2]!==listener?(t1=evt=>{if(!listener)return;const target=evt.target;if(!(target instanceof Node))return;const resolvedBoundaryElement=boundaryElement===null||boundaryElement===void 0?void 0:boundaryElement();if(resolvedBoundaryElement&&!resolvedBoundaryElement.contains(target))return;const elements=elementsArg().flat();for(const el of elements)if(el&&(target===el||el.contains(target)))return;listener(evt);},$[0]=boundaryElement,$[1]=elementsArg,$[2]=listener,$[3]=t1):t1=$[3];const onEvent=useEffectEvent(t1),hasListener=!!listener;let t2;$[4]!==hasListener||$[5]!==onEvent?(t2=()=>{if(!hasListener)return;const handleEvent=evt_0=>onEvent(evt_0);return document.addEventListener("mousedown",handleEvent),()=>{document.removeEventListener("mousedown",handleEvent);};},$[4]=hasListener,$[5]=onEvent,$[6]=t2):t2=$[6];let t3;$[7]!==hasListener?(t3=[hasListener],$[7]=hasListener,$[8]=t3):t3=$[8],useEffect$1(t2,t3),useDebugValue(listener?"MouseDown On":"MouseDown Off");}function _temp$8(){return EMPTY_ARRAY;}function useCustomValidity(ref,customValidity){const $=dist.c(4);let t0,t1;$[0]!==customValidity||$[1]!==ref?(t0=()=>{var _ref$current;(_ref$current=ref.current)===null||_ref$current===void 0||_ref$current.setCustomValidity(customValidity||"");},t1=[customValidity,ref],$[0]=customValidity,$[1]=ref,$[2]=t0,$[3]=t1):(t0=$[2],t1=$[3]),useEffect$1(t0,t1);}const _ResizeObserver=typeof document<"u"&&typeof window<"u"&&window.ResizeObserver?window.ResizeObserver:ResizeObserver$1,_elementSizeObserver=_createElementSizeObserver();function _createElementRectValueListener(){return{subscribe(element,subscriber){const resizeObserver=new _ResizeObserver(_ref66=>{let[entry]=_ref66;subscriber({_contentRect:entry.contentRect,border:{width:entry.borderBoxSize[0].inlineSize,height:entry.borderBoxSize[0].blockSize},content:{width:entry.contentRect.width,height:entry.contentRect.height}});});return resizeObserver.observe(element),()=>{resizeObserver.unobserve(element),resizeObserver.disconnect();};}};}function _createElementSizeObserver(){const disposeCache=/* @__PURE__ */new WeakMap(),subscribersCache=/* @__PURE__ */new WeakMap();return{subscribe(element,subscriber){const subscribers=subscribersCache.get(element)||[];let dispose=disposeCache.get(element);return subscribersCache.has(element)||(subscribersCache.set(element,subscribers),dispose=_createElementRectValueListener().subscribe(element,elementRect=>{for(const sub of subscribers)sub(elementRect);})),subscribers.push(subscriber),()=>{const idx=subscribers.indexOf(subscriber);idx>-1&&subscribers.splice(idx,1),subscribers.length===0&&dispose&&dispose();};}};}function useElementSize(element){const $=dist.c(3),[size2,setSize]=useState(null);let t0,t1;return $[0]!==element?(t0=()=>{if(element)return _elementSizeObserver.subscribe(element,setSize);},t1=[element],$[0]=element,$[1]=t0,$[2]=t1):(t0=$[1],t1=$[2]),useEffect$1(t0,t1),size2;}function useGlobalKeyDown(onKeyDown,options){const $=dist.c(7);let t0;$[0]!==onKeyDown?(t0=event=>onKeyDown(event),$[0]=onKeyDown,$[1]=t0):t0=$[1];const handleKeyDown=useEffectEvent(t0);let t1;$[2]!==handleKeyDown||$[3]!==options?(t1=()=>{const handler=event_0=>handleKeyDown(event_0);return window.addEventListener("keydown",handler,options),()=>window.removeEventListener("keydown",handler,options);},$[2]=handleKeyDown,$[3]=options,$[4]=t1):t1=$[4];let t2;$[5]!==options?(t2=[options],$[5]=options,$[6]=t2):t2=$[6],useEffect$1(t1,t2);}function useMatchMedia(mediaQueryString,getServerSnapshot2){const $=dist.c(4);useDebugValue(mediaQueryString);let t0;$[0]!==mediaQueryString?(t0=onStoreChange=>{const media=window.matchMedia(mediaQueryString);return media.addEventListener("change",onStoreChange),()=>media.removeEventListener("change",onStoreChange);},$[0]=mediaQueryString,$[1]=t0):t0=$[1];let t1;return $[2]!==mediaQueryString?(t1=()=>window.matchMedia(mediaQueryString).matches,$[2]=mediaQueryString,$[3]=t1):t1=$[3],useSyncExternalStore(t0,t1,getServerSnapshot2);}function _getMediaQuery(media,index){return index===0?"screen and (max-width: ".concat(media[index]-1,"px)"):index===media.length?"screen and (min-width: ".concat(media[index-1],"px)"):"screen and (min-width: ".concat(media[index-1],"px) and (max-width: ").concat(media[index]-1,"px)");}function _createMediaStore(media){const mediaLen=media.length;let sizes;const getSizes=()=>{if(!sizes){sizes=[];for(let index=mediaLen;index>-1;index-=1){const mediaQuery=_getMediaQuery(media,index);sizes.push({index,mq:window.matchMedia(mediaQuery)});}}return sizes;};return{getSnapshot:()=>{for(const{index,mq}of getSizes())if(mq.matches)return index;return 0;},subscribe:onStoreChange=>{const disposeFns=[];for(const{mq}of getSizes()){const handleChange=()=>{mq.matches&&onStoreChange();};mq.addEventListener("change",handleChange),disposeFns.push(()=>mq.removeEventListener("change",handleChange));}return()=>{for(const disposeFn of disposeFns)disposeFn();};}};}function getServerSnapshot(){return 0;}function useMediaIndex(){const $=dist.c(2),{media}=useTheme_v2();let t0;$[0]!==media?(t0=_createMediaStore(media),$[0]=media,$[1]=t0):t0=$[1];const store=t0;return useSyncExternalStore(store.subscribe,store.getSnapshot,getServerSnapshot);}function usePrefersDark(t0){return useMatchMedia("(prefers-color-scheme: dark)",t0===void 0?_temp$7:t0);}function _temp$7(){return!1;}function usePrefersReducedMotion(t0){return useMatchMedia("(prefers-reduced-motion: reduce)",t0===void 0?_temp$6:t0);}function _temp$6(){return!1;}function checkboxBaseStyles(){return css(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n position: relative;\n display: inline-block;\n "])));}function inputElementStyles(props){const{color,input,radius}=getTheme_v2(props.theme),{focusRing}=input.checkbox;return css(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ",";\n width: ",";\n box-sizing: border-box;\n box-shadow: ",";\n border-radius: ",";\n line-height: 1;\n background-color: ",";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 1.5px !important;\n }\n }\n }\n\n &:checked + span {\n background: ",";\n box-shadow: ",";\n color: ",";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ",";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ",";\n }\n\n &[data-error] + span {\n background-color: ",";\n box-shadow: ",";\n color: ",";\n }\n &[data-error]&:checked + span {\n background-color: ",";\n color: ",";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ",";\n }\n\n &:disabled + span {\n background-color: ",";\n box-shadow: ",";\n color: ",";\n }\n &:disabled&:checked + span {\n background-color: ",";\n }\n\n &[data-read-only] + span {\n background-color: ",";\n box-shadow: ",";\n color: ",";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ",";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])),rem(input.checkbox.size),rem(input.checkbox.size),focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),rem(radius[2]),color.input.default.enabled.bg,color.input.default.enabled.fg,focusRingBorderStyle({color:color.input.default.enabled.fg,width:input.border.width}),color.input.default.enabled.bg,focusRingStyle({focusRing}),focusRingStyle({focusRing:{width:1,offset:1}}),color.input.invalid.enabled.border,focusRingBorderStyle({width:input.border.width,color:color.input.invalid.enabled.muted.bg}),color.input.default.disabled.fg,color.input.invalid.enabled.muted.bg,color.input.default.enabled.bg,focusRingStyle({border:{width:input.border.width,color:color.input.invalid.readOnly.muted.bg},focusRing:{width:1,offset:1}}),color.input.default.disabled.bg,focusRingBorderStyle({width:input.border.width,color:color.input.default.disabled.border}),color.input.default.disabled.fg,color.input.default.disabled.muted.bg,color.input.default.readOnly.bg,focusRingBorderStyle({width:input.border.width,color:color.input.default.readOnly.border}),color.input.default.readOnly.fg,color.input.default.readOnly.muted.bg);}const StyledCheckbox=/* @__PURE__ */styled.div.withConfig({displayName:"StyledCheckbox",componentId:"sc-1l5mt2l-0"})(checkboxBaseStyles),Input$5=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-1l5mt2l-1"})(inputElementStyles),Checkbox=forwardRef(function(props,forwardedRef){var _props0;const $=dist.c(25);let checked,className,customValidity,disabled,indeterminate,readOnly,restProps,style;$[0]!==props?(_props0=props,{checked,className,disabled,indeterminate,customValidity,readOnly,style}=_props0,restProps=_objectWithoutProperties(_props0,_excluded25),_props0,$[0]=props,$[1]=checked,$[2]=className,$[3]=customValidity,$[4]=disabled,$[5]=indeterminate,$[6]=readOnly,$[7]=restProps,$[8]=style):(checked=$[1],className=$[2],customValidity=$[3],disabled=$[4],indeterminate=$[5],readOnly=$[6],restProps=$[7],style=$[8]);const ref=useRef$1(null);let t0;$[9]===Symbol.for("react.memo_cache_sentinel")?(t0=()=>ref.current,$[9]=t0):t0=$[9],useImperativeHandle(forwardedRef,t0);let t1,t2;$[10]!==indeterminate?(t1=()=>{ref.current&&(ref.current.indeterminate=indeterminate||!1);},t2=[indeterminate],$[10]=indeterminate,$[11]=t1,$[12]=t2):(t1=$[11],t2=$[12]),useEffect$1(t1,t2),useCustomValidity(ref,customValidity);const t3=!disabled&&readOnly?"":void 0,t4=customValidity?"":void 0,t5=disabled||readOnly;let t6;$[13]!==checked||$[14]!==readOnly||$[15]!==restProps||$[16]!==t3||$[17]!==t4||$[18]!==t5?(t6=/* @__PURE__ */jsx(Input$5,_objectSpread(_objectSpread({"data-read-only":t3,"data-error":t4},restProps),{},{checked,disabled:t5,type:"checkbox",readOnly,ref})),$[13]=checked,$[14]=readOnly,$[15]=restProps,$[16]=t3,$[17]=t4,$[18]=t5,$[19]=t6):t6=$[19];let t7;$[20]===Symbol.for("react.memo_cache_sentinel")?(t7=/* @__PURE__ */jsxs("span",{children:[/* @__PURE__ */jsx(CheckmarkIcon,{}),/* @__PURE__ */jsx(RemoveIcon,{})]}),$[20]=t7):t7=$[20];let t8;return $[21]!==className||$[22]!==style||$[23]!==t6?(t8=/* @__PURE__ */jsxs(StyledCheckbox,{className,"data-ui":"Checkbox",style,children:[t6,t7]}),$[21]=className,$[22]=style,$[23]=t6,$[24]=t8):t8=$[24],t8;});Checkbox.displayName="ForwardRef(Checkbox)";function codeSyntaxHighlightingStyle(_ref67){let{theme}=_ref67;const{color:{syntax:color}}=getTheme_v2(theme);return{"&.atrule":{color:color.atrule},"&.attr-name":{color:color.attrName},"&.attr-value":{color:color.attrValue},"&.attribute":{color:color.attribute},"&.boolean":{color:color.boolean},"&.builtin":{color:color.builtin},"&.cdata":{color:color.cdata},"&.char":{color:color.char},"&.class":{color:color.class},"&.class-name":{color:color.className},"&.comment":{color:color.comment},"&.constant":{color:color.constant},"&.deleted":{color:color.deleted},"&.doctype":{color:color.doctype},"&.entity":{color:color.entity},"&.function":{color:color.function},"&.hexcode":{color:color.hexcode},"&.id":{color:color.id},"&.important":{color:color.important},"&.inserted":{color:color.inserted},"&.keyword":{color:color.keyword},"&.number":{color:color.number},"&.operator":{color:color.operator},"&.prolog":{color:color.prolog},"&.property":{color:color.property},"&.pseudo-class":{color:color.pseudoClass},"&.pseudo-element":{color:color.pseudoElement},"&.punctuation":{color:color.punctuation},"&.regex":{color:color.regex},"&.selector":{color:color.selector},"&.string":{color:color.string},"&.symbol":{color:color.symbol},"&.tag":{color:color.tag},"&.unit":{color:color.unit},"&.url":{color:color.url},"&.variable":{color:color.variable}};}function codeBaseStyle(){return css(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ","\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])),codeSyntaxHighlightingStyle);}const LazyRefractor=lazy(()=>import('./refractor-6bc5dd5c.js')),StyledCode=/* @__PURE__ */styled.pre.withConfig({displayName:"StyledCode",componentId:"sc-4dymyn-0"})(codeBaseStyle,responsiveCodeFontStyle),Code=forwardRef(function(props,ref){var _props1;const $=dist.c(22);let children,language,restProps,t0,weight;$[0]!==props?(_props1=props,{children,language,size:t0,weight}=_props1,restProps=_objectWithoutProperties(_props1,_excluded26),_props1,$[0]=props,$[1]=children,$[2]=language,$[3]=restProps,$[4]=t0,$[5]=weight):(children=$[1],language=$[2],restProps=$[3],t0=$[4],weight=$[5]);const size2=t0===void 0?2:t0;let t1;$[6]!==size2?(t1=_getArrayProp(size2),$[6]=size2,$[7]=t1):t1=$[7];let t2;$[8]!==children?(t2=/* @__PURE__ */jsx("code",{children}),$[8]=children,$[9]=t2):t2=$[9];let t3;$[10]!==children||$[11]!==language?(t3=/* @__PURE__ */jsx(LazyRefractor,{language,value:children}),$[10]=children,$[11]=language,$[12]=t3):t3=$[12];let t4;$[13]!==t2||$[14]!==t3?(t4=/* @__PURE__ */jsx(Suspense,{fallback:t2,children:t3}),$[13]=t2,$[14]=t3,$[15]=t4):t4=$[15];let t5;return $[16]!==ref||$[17]!==restProps||$[18]!==t1||$[19]!==t4||$[20]!==weight?(t5=/* @__PURE__ */jsx(StyledCode,_objectSpread(_objectSpread({"data-ui":"Code"},restProps),{},{$size:t1,$weight:weight,ref,children:t4})),$[16]=ref,$[17]=restProps,$[18]=t1,$[19]=t4,$[20]=weight,$[21]=t5):t5=$[21],t5;});Code.displayName="ForwardRef(Code)";const BASE_STYLE$1={width:"100%",margin:"0 auto"};function containerBaseStyle(){return BASE_STYLE$1;}function responsiveContainerWidthStyle(props){const{container,media}=getTheme_v2(props.theme);return _responsive(media,props.$width,val=>({maxWidth:val==="auto"?"none":rem(container[val])}));}const StyledContainer=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledContainer",componentId:"sc-wyroop-0"})(containerBaseStyle,responsiveContainerWidthStyle),Container=forwardRef(function(props,ref){var _props10;const $=dist.c(11);let as,restProps,t0;$[0]!==props?(_props10=props,{as,width:t0}=_props10,restProps=_objectWithoutProperties(_props10,_excluded27),_props10,$[0]=props,$[1]=as,$[2]=restProps,$[3]=t0):(as=$[1],restProps=$[2],t0=$[3]);const width=t0===void 0?2:t0;let t1;$[4]!==width?(t1=_getArrayProp(width),$[4]=width,$[5]=t1):t1=$[5];let t2;return $[6]!==as||$[7]!==ref||$[8]!==restProps||$[9]!==t1?(t2=/* @__PURE__ */jsx(StyledContainer,_objectSpread(_objectSpread({"data-ui":"Container"},restProps),{},{$width:t1,forwardedAs:as,ref})),$[6]=as,$[7]=ref,$[8]=restProps,$[9]=t1,$[10]=t2):t2=$[10],t2;});Container.displayName="ForwardRef(Container)";const StyledGrid=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledGrid",componentId:"sc-v8t8oz-0"})(responsiveGridStyle),Grid=forwardRef(function(props,ref){var _props11;const $=dist.c(42);let as,autoCols,autoFlow,autoRows,children,columns,gap,gapX,gapY,restProps,rows;$[0]!==props?(_props11=props,{as,autoRows,autoCols,autoFlow,columns,gap,gapX,gapY,rows,children}=_props11,restProps=_objectWithoutProperties(_props11,_excluded28),_props11,$[0]=props,$[1]=as,$[2]=autoCols,$[3]=autoFlow,$[4]=autoRows,$[5]=children,$[6]=columns,$[7]=gap,$[8]=gapX,$[9]=gapY,$[10]=restProps,$[11]=rows):(as=$[1],autoCols=$[2],autoFlow=$[3],autoRows=$[4],children=$[5],columns=$[6],gap=$[7],gapX=$[8],gapY=$[9],restProps=$[10],rows=$[11]);const t0=typeof as=="string"?as:void 0;let t1;$[12]!==autoRows?(t1=_getArrayProp(autoRows),$[12]=autoRows,$[13]=t1):t1=$[13];let t2;$[14]!==autoCols?(t2=_getArrayProp(autoCols),$[14]=autoCols,$[15]=t2):t2=$[15];let t3;$[16]!==autoFlow?(t3=_getArrayProp(autoFlow),$[16]=autoFlow,$[17]=t3):t3=$[17];let t4;$[18]!==columns?(t4=_getArrayProp(columns),$[18]=columns,$[19]=t4):t4=$[19];let t5;$[20]!==gap?(t5=_getArrayProp(gap),$[20]=gap,$[21]=t5):t5=$[21];let t6;$[22]!==gapX?(t6=_getArrayProp(gapX),$[22]=gapX,$[23]=t6):t6=$[23];let t7;$[24]!==gapY?(t7=_getArrayProp(gapY),$[24]=gapY,$[25]=t7):t7=$[25];let t8;$[26]!==rows?(t8=_getArrayProp(rows),$[26]=rows,$[27]=t8):t8=$[27];let t9;return $[28]!==as||$[29]!==children||$[30]!==ref||$[31]!==restProps||$[32]!==t0||$[33]!==t1||$[34]!==t2||$[35]!==t3||$[36]!==t4||$[37]!==t5||$[38]!==t6||$[39]!==t7||$[40]!==t8?(t9=/* @__PURE__ */jsx(StyledGrid,_objectSpread(_objectSpread({"data-as":t0,"data-ui":"Grid"},restProps),{},{$autoRows:t1,$autoCols:t2,$autoFlow:t3,$columns:t4,$gap:t5,$gapX:t6,$gapY:t7,$rows:t8,forwardedAs:as,ref,children})),$[28]=as,$[29]=children,$[30]=ref,$[31]=restProps,$[32]=t0,$[33]=t1,$[34]=t2,$[35]=t3,$[36]=t4,$[37]=t5,$[38]=t6,$[39]=t7,$[40]=t8,$[41]=t9):t9=$[41],t9;});Grid.displayName="ForwardRef(Grid)";function headingBaseStyle(props){const{$accent,$muted}=props,{font}=getTheme_v2(props.theme);return css(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n ","\n\n ","\n\n & code {\n font-family: ",";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ",";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])),$accent&&css(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))),$muted&&css(_templateObject24||(_templateObject24=_taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))),font.code.family,font.heading.weights.bold);}const StyledHeading=/* @__PURE__ */styled.div.withConfig({displayName:"StyledHeading",componentId:"sc-137lwim-0"})(headingBaseStyle,responsiveTextAlignStyle,responsiveHeadingFont),Heading=forwardRef(function(props,ref){var _props12;const $=dist.c(26);let align,childrenProp,restProps,t0,t1,t2,textOverflow,weight;$[0]!==props?(_props12=props,{accent:t0,align,children:childrenProp,muted:t1,size:t2,textOverflow,weight}=_props12,restProps=_objectWithoutProperties(_props12,_excluded29),_props12,$[0]=props,$[1]=align,$[2]=childrenProp,$[3]=restProps,$[4]=t0,$[5]=t1,$[6]=t2,$[7]=textOverflow,$[8]=weight):(align=$[1],childrenProp=$[2],restProps=$[3],t0=$[4],t1=$[5],t2=$[6],textOverflow=$[7],weight=$[8]);const accent=t0===void 0?!1:t0,muted=t1===void 0?!1:t1,size2=t2===void 0?2:t2;let children=childrenProp;if(textOverflow==="ellipsis"){let t32;$[9]!==children?(t32=/* @__PURE__ */jsx(SpanWithTextOverflow,{children}),$[9]=children,$[10]=t32):t32=$[10],children=t32;}let t3;$[11]!==align?(t3=_getArrayProp(align),$[11]=align,$[12]=t3):t3=$[12];let t4;$[13]!==size2?(t4=_getArrayProp(size2),$[13]=size2,$[14]=t4):t4=$[14];let t5;$[15]!==children?(t5=/* @__PURE__ */jsx("span",{children}),$[15]=children,$[16]=t5):t5=$[16];let t6;return $[17]!==accent||$[18]!==muted||$[19]!==ref||$[20]!==restProps||$[21]!==t3||$[22]!==t4||$[23]!==t5||$[24]!==weight?(t6=/* @__PURE__ */jsx(StyledHeading,_objectSpread(_objectSpread({"data-ui":"Heading"},restProps),{},{$accent:accent,$align:t3,$muted:muted,$size:t4,$weight:weight,ref,children:t5})),$[17]=accent,$[18]=muted,$[19]=ref,$[20]=restProps,$[21]=t3,$[22]=t4,$[23]=t5,$[24]=weight,$[25]=t6):t6=$[25],t6;});Heading.displayName="ForwardRef(Heading)";function inlineBaseStyle(){return{lineHeight:"0","&&:not([hidden])":{display:"block"},"& > div":{display:"inline-block",verticalAlign:"middle"}};}function inlineSpaceStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$space,spaceIndex=>{const _space=rem(spaceIndex===0.5?space[1]/2:space[spaceIndex]);return{margin:"-".concat(_space," 0 0 -").concat(_space),"& > div":{padding:"".concat(_space," 0 0 ").concat(_space)}};});}const StyledInline=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledInline",componentId:"sc-1pkiy6j-0"})(inlineBaseStyle,inlineSpaceStyle),Inline=forwardRef(function(props,ref){var _props13;const $=dist.c(15);let as,childrenProp,restProps,space;$[0]!==props?(_props13=props,{as,children:childrenProp,space}=_props13,restProps=_objectWithoutProperties(_props13,_excluded30),_props13,$[0]=props,$[1]=as,$[2]=childrenProp,$[3]=restProps,$[4]=space):(as=$[1],childrenProp=$[2],restProps=$[3],space=$[4]);let t0;$[5]!==childrenProp?(t0=Children.map(childrenProp,_temp$5),$[5]=childrenProp,$[6]=t0):t0=$[6];const children=t0;let t1;$[7]!==space?(t1=_getArrayProp(space),$[7]=space,$[8]=t1):t1=$[8];const t2=ref;let t3;return $[9]!==as||$[10]!==children||$[11]!==restProps||$[12]!==t1||$[13]!==t2?(t3=/* @__PURE__ */jsx(StyledInline,_objectSpread(_objectSpread({"data-ui":"Inline"},restProps),{},{$space:t1,forwardedAs:as,ref:t2,children})),$[9]=as,$[10]=children,$[11]=restProps,$[12]=t1,$[13]=t2,$[14]=t3):t3=$[14],t3;});Inline.displayName="ForwardRef(Inline)";function _temp$5(child){return child&&/* @__PURE__ */jsx("div",{children:child});}function kbdStyle(){return css(_templateObject25||(_templateObject25=_taggedTemplateLiteral(["\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));}const StyledKBD=/* @__PURE__ */styled.kbd.withConfig({displayName:"StyledKBD",componentId:"sc-1w7yd8w-0"})(responsiveRadiusStyle,kbdStyle),KBD=forwardRef(function(props,ref){var _props14;const $=dist.c(19);let children,restProps,t0,t1,t2;$[0]!==props?(_props14=props,{children,fontSize:t0,padding:t1,radius:t2}=_props14,restProps=_objectWithoutProperties(_props14,_excluded31),_props14,$[0]=props,$[1]=children,$[2]=restProps,$[3]=t0,$[4]=t1,$[5]=t2):(children=$[1],restProps=$[2],t0=$[3],t1=$[4],t2=$[5]);const fontSize2=t0===void 0?0:t0,padding=t1===void 0?1:t1,radius=t2===void 0?2:t2;let t3;$[6]!==radius?(t3=_getArrayProp(radius),$[6]=radius,$[7]=t3):t3=$[7];let t4;$[8]!==children||$[9]!==fontSize2?(t4=/* @__PURE__ */jsx(Text,{as:"span",size:fontSize2,weight:"semibold",children}),$[8]=children,$[9]=fontSize2,$[10]=t4):t4=$[10];let t5;$[11]!==padding||$[12]!==t4?(t5=/* @__PURE__ */jsx(Box,{as:"span",padding,children:t4}),$[11]=padding,$[12]=t4,$[13]=t5):t5=$[13];let t6;return $[14]!==ref||$[15]!==restProps||$[16]!==t3||$[17]!==t5?(t6=/* @__PURE__ */jsx(StyledKBD,_objectSpread(_objectSpread({"data-ui":"KBD"},restProps),{},{$radius:t3,ref,children:t5})),$[14]=ref,$[15]=restProps,$[16]=t3,$[17]=t5,$[18]=t6):t6=$[18],t6;});KBD.displayName="ForwardRef(KBD)";const origin={name:"@sanity/ui/origin",fn(_ref68){var _middlewareData$shift,_middlewareData$shift2;let{middlewareData,placement,rects}=_ref68;const[side]=placement.split("-"),floatingWidth=rects.floating.width,floatingHeight=rects.floating.height,shiftX=((_middlewareData$shift=middlewareData.shift)===null||_middlewareData$shift===void 0?void 0:_middlewareData$shift.x)||0,shiftY=((_middlewareData$shift2=middlewareData.shift)===null||_middlewareData$shift2===void 0?void 0:_middlewareData$shift2.y)||0;if(floatingWidth<=0||floatingHeight<=0)return{};const isVerticalPlacement=["bottom","top"].includes(side),{originX,originY}=isVerticalPlacement?{originX:clamp(0.5-shiftX/floatingWidth,0,1),originY:side==="bottom"?0:1}:{originX:side==="left"?1:0,originY:clamp(0.5-shiftY/floatingHeight,0,1)};return{data:{originX,originY}};}};function clamp(num,min,max){return Math.min(Math.max(num,min),max);}function moveTowardsLength(movingPoint,targetPoint,amount){const width=targetPoint.x-movingPoint.x,height=targetPoint.y-movingPoint.y,distance=Math.sqrt(width*width+height*height);return moveTowardsFractional(movingPoint,targetPoint,Math.min(1,amount/distance));}function moveTowardsFractional(movingPoint,targetPoint,fraction){return{x:movingPoint.x+(targetPoint.x-movingPoint.x)*fraction,y:movingPoint.y+(targetPoint.y-movingPoint.y)*fraction};}function getRoundedCommands(points){const len=points.length,cmds=[];for(let i=0;i<len;i+=1){const point=points[i],prevPoint=points[i-1],nextPoint=points[i+1];if(prevPoint&&point.radius){const curveStart=moveTowardsLength(point,prevPoint,point.radius),curveEnd=moveTowardsLength(point,nextPoint,point.radius),startControl=moveTowardsFractional(curveStart,point,0.5),endControl=moveTowardsFractional(point,curveEnd,0.5);cmds.push(_objectSpread({type:"point"},curveStart)),cmds.push({type:"curve",curveEnd,startControl,endControl});}else cmds.push(_objectSpread({type:"point"},point));}return cmds;}function compileCommands(cmds){return cmds.map((n,idx)=>n.type==="point"?"".concat(idx===0?"M":"L"," ").concat(n.x," ").concat(n.y):n.type==="curve"?"C ".concat(n.startControl.x," ").concat(n.startControl.y," ").concat(n.endControl.x," ").concat(n.endControl.y," ").concat(n.curveEnd.x," ").concat(n.curveEnd.y):"").join(" ");}const StyledArrow=/* @__PURE__ */styled.div.withConfig({displayName:"StyledArrow",componentId:"sc-12vzy6c-0"})(_ref69=>{let{$w:w}=_ref69;return css(_templateObject26||(_templateObject26=_taggedTemplateLiteral(["\n position: absolute;\n width: ","px;\n height: ","px;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n line-height: 0;\n transform-origin: ","px ","px;\n }\n\n [data-placement^='top'] > & {\n bottom: -","px;\n\n & > svg {\n transform: rotate(0);\n }\n }\n\n [data-placement^='right'] > & {\n left: -","px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -","px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -","px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n "])),w,w,w/2,w/2,w,w,w,w);}),StrokePath=styled.path.withConfig({displayName:"StrokePath",componentId:"sc-12vzy6c-1"})(_templateObject27||(_templateObject27=_taggedTemplateLiteral(["stroke:var(--card-shadow-outline-color);"]))),ShapePath=styled.path.withConfig({displayName:"ShapePath",componentId:"sc-12vzy6c-2"})(_templateObject28||(_templateObject28=_taggedTemplateLiteral(["fill:var(--card-bg-color);"]))),Arrow=forwardRef(function(props,ref){var _props15;const $=dist.c(29);let h,restProps,t0,w;$[0]!==props?(_props15=props,{width:w,height:h,radius:t0}=_props15,restProps=_objectWithoutProperties(_props15,_excluded32),_props15,$[0]=props,$[1]=h,$[2]=restProps,$[3]=t0,$[4]=w):(h=$[1],restProps=$[2],t0=$[3],w=$[4]);const radius=t0===void 0?0:t0,{card}=useTheme_v2(),strokeWidth=card.shadow.outline,center=w/2;let t1;if($[5]!==center||$[6]!==h||$[7]!==radius||$[8]!==w){const points=[{x:0,y:0},{x:radius,y:0,radius},{x:center,y:h-1,radius},{x:w-radius,y:0,radius},{x:w,y:0}],cmds=getRoundedCommands(points);t1=compileCommands(cmds),$[5]=center,$[6]=h,$[7]=radius,$[8]=w,$[9]=t1;}else t1=$[9];const path=t1,strokePath="".concat(path),fillPath="".concat(path," M ").concat(w," -1 M 0 -1 Z"),t2="0 0 ".concat(w," ").concat(w);let t3;$[10]!==strokeWidth||$[11]!==w?(t3=/* @__PURE__ */jsx("mask",{id:"stroke-mask",children:/* @__PURE__ */jsx("rect",{x:0,y:strokeWidth,width:w,height:w,fill:"white"})}),$[10]=strokeWidth,$[11]=w,$[12]=t3):t3=$[12];const t4=strokeWidth*2;let t5;$[13]!==strokePath||$[14]!==t4?(t5=/* @__PURE__ */jsx(StrokePath,{d:strokePath,mask:"url(#stroke-mask)",strokeWidth:t4}),$[13]=strokePath,$[14]=t4,$[15]=t5):t5=$[15];let t6;$[16]!==fillPath?(t6=/* @__PURE__ */jsx(ShapePath,{d:fillPath}),$[16]=fillPath,$[17]=t6):t6=$[17];let t7;$[18]!==t2||$[19]!==t3||$[20]!==t5||$[21]!==t6||$[22]!==w?(t7=/* @__PURE__ */jsxs("svg",{width:w,height:w,viewBox:t2,children:[t3,t5,t6]}),$[18]=t2,$[19]=t3,$[20]=t5,$[21]=t6,$[22]=w,$[23]=t7):t7=$[23];let t8;return $[24]!==ref||$[25]!==restProps||$[26]!==t7||$[27]!==w?(t8=/* @__PURE__ */jsx(StyledArrow,_objectSpread(_objectSpread({},restProps),{},{$w:w,ref,children:t7})),$[24]=ref,$[25]=restProps,$[26]=t7,$[27]=w,$[28]=t8):t8=$[28],t8;});Arrow.displayName="ForwardRef(Arrow)";const BoundaryElementContext=createGlobalScopedContext("@sanity/ui/context/boundaryElement",null);function isRecord(value){return!!(value&&typeof value=="object"&&!Array.isArray(value));}const DEFAULT_VALUE={version:0,element:null};function useBoundaryElement(){const value=useContext(BoundaryElementContext);if(value&&(!isRecord(value)||value.version!==0))throw new Error("useBoundaryElement(): the context value is not compatible");return value||DEFAULT_VALUE;}function findMaxBreakpoints(media,width){const ret=[];for(let i=0;i<media.length;i+=1)media[i]>width&&ret.push(i);return ret;}function findMinBreakpoints(media,width){const ret=[];for(let i=0;i<media.length;i+=1)media[i]<=width&&ret.push(i);return ret;}const ElementQuery=forwardRef(function(props,forwardedRef){var _props16,_useElementSize$borde,_useElementSize;const $=dist.c(18),theme=useTheme_v2();let _media,children,restProps;$[0]!==props?(_props16=props,{children,media:_media}=_props16,restProps=_objectWithoutProperties(_props16,_excluded33),_props16,$[0]=props,$[1]=_media,$[2]=children,$[3]=restProps):(_media=$[1],children=$[2],restProps=$[3]);const media=_media!==null&&_media!==void 0?_media:theme.media,[element,setElement]=useState(null),width=(_useElementSize$borde=(_useElementSize=useElementSize(element))===null||_useElementSize===void 0?void 0:_useElementSize.border.width)!==null&&_useElementSize$borde!==void 0?_useElementSize$borde:window.innerWidth;let t0;if($[4]!==media||$[5]!==width){const eq=findMaxBreakpoints(media,width);t0=eq.length?eq.join(" "):void 0,$[4]=media,$[5]=width,$[6]=t0;}else t0=$[6];const max=t0;let t1;if($[7]!==media||$[8]!==width){const eq_0=findMinBreakpoints(media,width);t1=eq_0.length?eq_0.join(" "):void 0,$[7]=media,$[8]=width,$[9]=t1;}else t1=$[9];const min=t1;let t2,t3;$[10]!==element?(t2=()=>element,t3=[element],$[10]=element,$[11]=t2,$[12]=t3):(t2=$[11],t3=$[12]),useImperativeHandle(forwardedRef,t2,t3);let t4;return $[13]!==children||$[14]!==max||$[15]!==min||$[16]!==restProps?(t4=/* @__PURE__ */jsx("div",_objectSpread(_objectSpread({"data-ui":"ElementQuery"},restProps),{},{"data-eq-max":max,"data-eq-min":min,ref:setElement,children})),$[13]=children,$[14]=max,$[15]=min,$[16]=restProps,$[17]=t4):t4=$[17],t4;});ElementQuery.displayName="ForwardRef(ElementQuery)";function getLayerContext(contextValue){if(!isRecord(contextValue)||contextValue.version!==0)throw new Error("the context value is not compatible");if(!contextValue)throw new Error("components using `useLayer()` should be wrapped in a <LayerProvider>.");if(contextValue.version===0)return contextValue;throw new Error("could not get layer context");}const LayerContext=createGlobalScopedContext("@sanity/ui/context/layer",null);function LayerProvider(props){var _parent$level;const $=dist.c(21),{children,zOffset:t0}=props,zOffsetProp=t0===void 0?0:t0,parentContextValue=useContext(LayerContext);let t1;$[0]!==parentContextValue?(t1=parentContextValue&&getLayerContext(parentContextValue),$[0]=parentContextValue,$[1]=t1):t1=$[1];const parent=t1,parentRegisterChild=parent===null||parent===void 0?void 0:parent.registerChild,level=((_parent$level=parent===null||parent===void 0?void 0:parent.level)!==null&&_parent$level!==void 0?_parent$level:0)+1;let t2;$[2]!==zOffsetProp?(t2=_getArrayProp(zOffsetProp),$[2]=zOffsetProp,$[3]=t2):t2=$[3];const zOffset=t2,maxMediaIndex=zOffset.length-1,mediaIndex=Math.min(useMediaIndex(),maxMediaIndex),zIndex=parent?parent.zIndex+zOffset[mediaIndex]:zOffset[mediaIndex];let t3;$[4]===Symbol.for("react.memo_cache_sentinel")?(t3={},$[4]=t3):t3=$[4];const[,setChildLayers]=useState(t3),[size2,setSize]=useState(0),isTopLayer=size2===0;let t4;$[5]!==parentRegisterChild||$[6]!==setChildLayers?(t4=childLevel=>{const parentDispose=parentRegisterChild===null||parentRegisterChild===void 0?void 0:parentRegisterChild(childLevel);return childLevel!==void 0?setChildLayers(state=>{var _state$childLevel;const prevLen=(_state$childLevel=state[childLevel])!==null&&_state$childLevel!==void 0?_state$childLevel:0,nextState=_objectSpread(_objectSpread({},state),{},{[childLevel]:prevLen+1});return setSize(Object.keys(nextState).length),nextState;}):setSize(_temp$4),()=>{childLevel!==void 0?setChildLayers(state_0=>{const nextState_0=_objectSpread({},state_0);return nextState_0[childLevel]===1?(delete nextState_0[childLevel],setSize(Object.keys(nextState_0).length)):nextState_0[childLevel]=nextState_0[childLevel]-1,nextState_0;}):setSize(_temp2$2),parentDispose===null||parentDispose===void 0?void 0:parentDispose();};},$[5]=parentRegisterChild,$[6]=setChildLayers,$[7]=t4):t4=$[7];const registerChild=t4;let t5,t6;$[8]!==level||$[9]!==parentRegisterChild?(t5=()=>parentRegisterChild===null||parentRegisterChild===void 0?void 0:parentRegisterChild(level),t6=[level,parentRegisterChild],$[8]=level,$[9]=parentRegisterChild,$[10]=t5,$[11]=t6):(t5=$[10],t6=$[11]),useEffect$1(t5,t6);let t7;$[12]!==isTopLayer||$[13]!==level||$[14]!==registerChild||$[15]!==size2||$[16]!==zIndex?(t7={version:0,isTopLayer,level,registerChild,size:size2,zIndex},$[12]=isTopLayer,$[13]=level,$[14]=registerChild,$[15]=size2,$[16]=zIndex,$[17]=t7):t7=$[17];const value=t7;let t8;return $[18]!==children||$[19]!==value?(t8=/* @__PURE__ */jsx(LayerContext.Provider,{value,children}),$[18]=children,$[19]=value,$[20]=t8):t8=$[20],t8;}function _temp2$2(v_0){return v_0-1;}function _temp$4(v){return v+1;}LayerProvider.displayName="LayerProvider";function useLayer(){const $=dist.c(2),value=useContext(LayerContext);if(!value)throw new Error("useLayer(): missing context value");try{let t1;return $[0]!==value?(t1=getLayerContext(value),$[0]=value,$[1]=t1):t1=$[1],t1;}catch(t0){const err=t0;throw err instanceof Error?new Error("useLayer(): ".concat(err.message)):new Error("useLayer(): ".concat(err));}}const StyledLayer=/* @__PURE__ */styled.div.withConfig({displayName:"StyledLayer",componentId:"sc-16kojrv-0"})({position:"relative"}),LayerChildren=forwardRef(function(props,forwardedRef){var _props17;const $=dist.c(22);let children,onActivate,onFocus,restProps,t0;$[0]!==props?(_props17=props,{children,onActivate,onFocus,style:t0}=_props17,restProps=_objectWithoutProperties(_props17,_excluded34),_props17,$[0]=props,$[1]=children,$[2]=onActivate,$[3]=onFocus,$[4]=restProps,$[5]=t0):(children=$[1],onActivate=$[2],onFocus=$[3],restProps=$[4],t0=$[5]);const style=t0===void 0?EMPTY_RECORD:t0,{zIndex,isTopLayer}=useLayer(),lastFocusedRef=useRef$1(null),ref=useRef$1(null),isTopLayerRef=useRef$1(isTopLayer);let t1;$[6]===Symbol.for("react.memo_cache_sentinel")?(t1=()=>ref.current,$[6]=t1):t1=$[6],useImperativeHandle(forwardedRef,t1);let t2,t3;$[7]!==isTopLayer||$[8]!==onActivate?(t2=()=>{var _onActivate;isTopLayerRef.current!==isTopLayer&&isTopLayer&&(_onActivate=onActivate)!==null&&_onActivate!==void 0&&_onActivate({activeElement:lastFocusedRef.current}),isTopLayerRef.current=isTopLayer;},t3=[isTopLayer,onActivate],$[7]=isTopLayer,$[8]=onActivate,$[9]=t2,$[10]=t3):(t2=$[9],t3=$[10]),useEffect$1(t2,t3);let t4;$[11]!==isTopLayer||$[12]!==onFocus?(t4=event=>{var _onFocus;(_onFocus=onFocus)===null||_onFocus===void 0||_onFocus(event);const rootElement=ref.current,target=document.activeElement;!isTopLayer||!rootElement||!target||isHTMLElement(target)&&containsOrEqualsElement(rootElement,target)&&(lastFocusedRef.current=target);},$[11]=isTopLayer,$[12]=onFocus,$[13]=t4):t4=$[13];const handleFocus=t4;let t5;$[14]!==style||$[15]!==zIndex?(t5=_objectSpread(_objectSpread({},style),{},{zIndex}),$[14]=style,$[15]=zIndex,$[16]=t5):t5=$[16];let t6;return $[17]!==children||$[18]!==handleFocus||$[19]!==restProps||$[20]!==t5?(t6=/* @__PURE__ */jsx(StyledLayer,_objectSpread(_objectSpread({},restProps),{},{"data-ui":"Layer",onFocus:handleFocus,ref,style:t5,children})),$[17]=children,$[18]=handleFocus,$[19]=restProps,$[20]=t5,$[21]=t6):t6=$[21],t6;}),Layer=forwardRef(function(props,ref){var _props18;const $=dist.c(11);let children,restProps,t0;$[0]!==props?(_props18=props,{children,zOffset:t0}=_props18,restProps=_objectWithoutProperties(_props18,_excluded35),_props18,$[0]=props,$[1]=children,$[2]=restProps,$[3]=t0):(children=$[1],restProps=$[2],t0=$[3]);const zOffset=t0===void 0?1:t0;let t1;$[4]!==children||$[5]!==ref||$[6]!==restProps?(t1=/* @__PURE__ */jsx(LayerChildren,_objectSpread(_objectSpread({},restProps),{},{ref,children})),$[4]=children,$[5]=ref,$[6]=restProps,$[7]=t1):t1=$[7];let t2;return $[8]!==t1||$[9]!==zOffset?(t2=/* @__PURE__ */jsx(LayerProvider,{zOffset,children:t1}),$[8]=t1,$[9]=zOffset,$[10]=t2):t2=$[10],t2;});Layer.displayName="ForwardRef(Layer)";const key="@sanity/ui/context/portal",elementKey=Symbol.for("".concat(key,"/element"));globalScope[elementKey]=null;const defaultContextValue={version:0,boundaryElement:null,get element(){return typeof document>"u"?null:(globalScope[elementKey]||(globalScope[elementKey]=document.createElement("div"),globalScope[elementKey].setAttribute("data-portal",""),document.body.appendChild(globalScope[elementKey])),globalScope[elementKey]);}},PortalContext=createGlobalScopedContext(key,defaultContextValue);function usePortal(){const value=useContext(PortalContext);if(!value)throw new Error("usePortal(): missing context value");if(!isRecord(value)||value.version!==0)throw new Error("usePortal(): the context value is not compatible");return value;}function Portal(props){var _portal$elements;const $=dist.c(3),{children,__unstable_name:name}=props,portal=usePortal(),portalElement=(name?portal.elements&&portal.elements[name]:portal.element)||((_portal$elements=portal.elements)===null||_portal$elements===void 0?void 0:_portal$elements.default);if(!portalElement)return null;let t0;return $[0]!==children||$[1]!==portalElement?(t0=createPortal(children,portalElement),$[0]=children,$[1]=portalElement,$[2]=t0):t0=$[2],t0;}Portal.displayName="Portal";const StyledSrOnly=styled.div.withConfig({displayName:"StyledSrOnly",componentId:"sc-mubr0c-0"})(_templateObject29||(_templateObject29=_taggedTemplateLiteral(["display:block;width:0;height:0;position:absolute;overflow:hidden;overflow:clip;"]))),SrOnly=forwardRef(function(props,ref){const $=dist.c(4),{as,children}=props;let t0;return $[0]!==as||$[1]!==children||$[2]!==ref?(t0=/* @__PURE__ */jsx(StyledSrOnly,{"aria-hidden":!0,as,"data-ui":"SrOnly",ref,children}),$[0]=as,$[1]=children,$[2]=ref,$[3]=t0):t0=$[3],t0;});SrOnly.displayName="ForwardRef(SrOnly)";const StyledVirtualList=styled.div.withConfig({displayName:"StyledVirtualList",componentId:"sc-dlqsj4-0"})(_templateObject30||(_templateObject30=_taggedTemplateLiteral(["position:relative;"]))),ItemWrapper=styled.div.withConfig({displayName:"ItemWrapper",componentId:"sc-dlqsj4-1"})(_templateObject31||(_templateObject31=_taggedTemplateLiteral(["position:absolute;left:0;right:0;"]))),VirtualList=forwardRef(function(props,forwardedRef){var _props19;const $=dist.c(44);let getItemKey,onChange,renderItem,restProps,t0,t1,t2;$[0]!==props?(_props19=props,{as:t0,gap:t1,getItemKey,items:t2,onChange,renderItem}=_props19,restProps=_objectWithoutProperties(_props19,_excluded36),_props19,$[0]=props,$[1]=getItemKey,$[2]=onChange,$[3]=renderItem,$[4]=restProps,$[5]=t0,$[6]=t1,$[7]=t2):(getItemKey=$[1],onChange=$[2],renderItem=$[3],restProps=$[4],t0=$[5],t1=$[6],t2=$[7]);const as=t0===void 0?"div":t0,gap=t1===void 0?0:t1;let t3;$[8]!==t2?(t3=t2===void 0?[]:t2,$[8]=t2,$[9]=t3):t3=$[9];const items=t3,{space}=useTheme_v2(),ref=useRef$1(null),wrapperRef=useRef$1(null),[scrollTop,setScrollTop]=useState(0),[scrollHeight,setScrollHeight]=useState(0),[itemHeight,setItemHeight]=useState(-1);let t4;$[10]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>ref.current,$[10]=t4):t4=$[10],useImperativeHandle(forwardedRef,t4);let t5;$[11]===Symbol.for("react.memo_cache_sentinel")?(t5=()=>{if(!wrapperRef.current)return;const firstElement=wrapperRef.current.firstChild;firstElement instanceof HTMLElement&&setItemHeight(firstElement.offsetHeight);},$[11]=t5):t5=$[11];let t6;$[12]!==renderItem?(t6=[renderItem],$[12]=renderItem,$[13]=t6):t6=$[13],useEffect$1(t5,t6);let t7,t8;$[14]===Symbol.for("react.memo_cache_sentinel")?(t7=()=>{if(!ref.current)return;const scrollEl=findScrollable(ref.current.parentNode);if(scrollEl){if(!(scrollEl instanceof HTMLElement))return;const handleScroll=()=>{setScrollTop(scrollEl.scrollTop);};scrollEl.addEventListener("scroll",handleScroll,{passive:!0});const ro=new _ResizeObserver(entries=>{setScrollHeight(entries[0].contentRect.height);});return ro.observe(scrollEl),handleScroll(),()=>{scrollEl.removeEventListener("scroll",handleScroll),ro.unobserve(scrollEl),ro.disconnect();};}const handleScroll_0=()=>{setScrollTop(window.scrollY);},handleResize=()=>{setScrollHeight(window.innerHeight);};return window.addEventListener("scroll",handleScroll_0,{passive:!0}),window.addEventListener("resize",handleResize),setScrollHeight(window.innerHeight),handleScroll_0(),()=>{window.removeEventListener("scroll",handleScroll_0),window.removeEventListener("resize",handleResize);};},t8=[],$[14]=t7,$[15]=t8):(t7=$[14],t8=$[15]),useEffect$1(t7,t8);const len=items.length,height=itemHeight?len*(itemHeight+space[gap])-space[gap]:0,fromIndex=height?Math.max(Math.floor(scrollTop/height*len)-2,0):0,toIndex=height?Math.ceil((scrollTop+scrollHeight)/height*len)+1:0;let t10,t9;$[16]!==fromIndex||$[17]!==gap||$[18]!==itemHeight||$[19]!==onChange||$[20]!==scrollHeight||$[21]!==scrollTop||$[22]!==space||$[23]!==toIndex?(t9=()=>{onChange&&onChange({fromIndex,gap:space[gap],itemHeight,scrollHeight,scrollTop,toIndex});},t10=[fromIndex,gap,itemHeight,onChange,scrollHeight,scrollTop,space,toIndex],$[16]=fromIndex,$[17]=gap,$[18]=itemHeight,$[19]=onChange,$[20]=scrollHeight,$[21]=scrollTop,$[22]=space,$[23]=toIndex,$[24]=t10,$[25]=t9):(t10=$[24],t9=$[25]),useEffect$1(t9,t10);let t11;$[26]!==fromIndex||$[27]!==gap||$[28]!==getItemKey||$[29]!==itemHeight||$[30]!==items||$[31]!==renderItem||$[32]!==space||$[33]!==toIndex?(t11={fromIndex,gap,itemHeight,space,toIndex,getItemKey,items,renderItem},$[26]=fromIndex,$[27]=gap,$[28]=getItemKey,$[29]=itemHeight,$[30]=items,$[31]=renderItem,$[32]=space,$[33]=toIndex,$[34]=t11):t11=$[34];const children=useChildren(t11);let t12;$[35]!==height?(t12={height},$[35]=height,$[36]=t12):t12=$[36];let t13;$[37]!==children||$[38]!==t12?(t13=/* @__PURE__ */jsx("div",{ref:wrapperRef,style:t12,children}),$[37]=children,$[38]=t12,$[39]=t13):t13=$[39];let t14;return $[40]!==as||$[41]!==restProps||$[42]!==t13?(t14=/* @__PURE__ */jsx(StyledVirtualList,_objectSpread(_objectSpread({as,"data-ui":"VirtualList"},restProps),{},{ref,children:t13})),$[40]=as,$[41]=restProps,$[42]=t13,$[43]=t14):t14=$[43],t14;});VirtualList.displayName="ForwardRef(VirtualList)";function useChildren(t0){const $=dist.c(21),{fromIndex,gap,getItemKey,itemHeight,items,renderItem,space,toIndex}=t0;if(!renderItem||items.length===0)return null;if(itemHeight===-1){let t12;$[0]!==items[0]||$[1]!==renderItem?(t12=renderItem(items[0]),$[0]=items[0],$[1]=renderItem,$[2]=t12):t12=$[2];let t2;return $[3]!==t12?(t2=[/* @__PURE__ */jsx(ItemWrapper,{children:t12},0)],$[3]=t12,$[4]=t2):t2=$[4],t2;}let t1;if($[5]!==fromIndex||$[6]!==gap||$[7]!==getItemKey||$[8]!==itemHeight||$[9]!==items||$[10]!==renderItem||$[11]!==space||$[12]!==toIndex){let t2;$[14]!==fromIndex||$[15]!==gap||$[16]!==getItemKey||$[17]!==itemHeight||$[18]!==renderItem||$[19]!==space?(t2=(item,_itemIndex)=>{const itemIndex=fromIndex+_itemIndex,node=renderItem(item),key2=getItemKey?getItemKey(item,itemIndex):itemIndex;return/* @__PURE__ */jsx(ItemWrapper,{style:{top:itemIndex*(itemHeight+space[gap])},children:node},key2);},$[14]=fromIndex,$[15]=gap,$[16]=getItemKey,$[17]=itemHeight,$[18]=renderItem,$[19]=space,$[20]=t2):t2=$[20],t1=items.slice(fromIndex,toIndex).map(t2),$[5]=fromIndex,$[6]=gap,$[7]=getItemKey,$[8]=itemHeight,$[9]=items,$[10]=renderItem,$[11]=space,$[12]=toIndex,$[13]=t1;}else t1=$[13];return t1;}function findScrollable(parentNode){let _scrollEl=parentNode;for(;_scrollEl&&!_isScrollable(_scrollEl);)_scrollEl=_scrollEl.parentNode;return _scrollEl;}function getElementRef(element){var _Object$getOwnPropert,_Object$getOwnPropert2;let getter=(_Object$getOwnPropert=Object.getOwnPropertyDescriptor(element.props,"ref"))===null||_Object$getOwnPropert===void 0?void 0:_Object$getOwnPropert.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;return mayWarn?element.ref:(getter=(_Object$getOwnPropert2=Object.getOwnPropertyDescriptor(element,"ref"))===null||_Object$getOwnPropert2===void 0?void 0:_Object$getOwnPropert2.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning,mayWarn?element.props.ref:element.props.ref||element.ref);}const DEFAULT_POPOVER_DISTANCE=4,DEFAULT_POPOVER_PADDING=4,DEFAULT_POPOVER_ARROW_WIDTH=19,DEFAULT_POPOVER_ARROW_HEIGHT=8,DEFAULT_POPOVER_ARROW_RADIUS=2,DEFAULT_POPOVER_MARGINS=[0,0,0,0],DEFAULT_FALLBACK_PLACEMENTS$1={top:["bottom","left","right"],"top-start":["bottom-start","left-start","right-start"],"top-end":["bottom-end","left-end","right-end"],bottom:["top","left","right"],"bottom-start":["top-start","left-start","right-start"],"bottom-end":["top-end","left-end","right-end"],left:["right","top","bottom"],"left-start":["right-start","top-start","bottom-start"],"left-end":["right-end","top-end","bottom-end"],right:["left","top","bottom"],"right-start":["left-start","top-start","bottom-start"],"right-end":["left-end","top-end","bottom-end"]};function size(options){const{constrainSize,margins,matchReferenceWidth,maxWidthRef,padding=0,referenceWidthRef,setReferenceWidth,widthRef}=options;return{name:"@sanity/ui/size",async fn(args){var _maxWidthRef$current;const{elements,placement,platform,rects}=args,{floating,reference}=rects,overflow=await detectOverflow(args,{altBoundary:!0,boundary:options.boundaryElement||void 0,elementContext:"floating",padding,rootBoundary:"viewport"});let maxWidth=1/0,maxHeight=1/0;const floatingW=floating.width,floatingH=floating.height;placement.includes("top")&&(maxWidth=floatingW-(overflow.left+overflow.right),maxHeight=floatingH-overflow.top),placement.includes("right")&&(maxWidth=floatingW-overflow.right,maxHeight=floatingH-(overflow.top+overflow.bottom)),placement.includes("bottom")&&(maxWidth=floatingW-(overflow.left+overflow.right),maxHeight=floatingH-overflow.bottom),placement.includes("left")&&(maxWidth=floatingW-overflow.left,maxHeight=floatingH-(overflow.top+overflow.bottom));const availableWidth=maxWidth-margins[1]-margins[3],availableHeight=maxHeight-margins[0]-margins[2],referenceWidth=reference.width-margins[1]-margins[3];referenceWidthRef.current=referenceWidth,setReferenceWidth(referenceWidth),matchReferenceWidth?elements.floating.style.width="".concat(referenceWidth,"px"):widthRef.current!==void 0&&(elements.floating.style.width="".concat(widthRef.current,"px")),constrainSize&&(elements.floating.style.maxWidth="".concat(Math.min(availableWidth,(_maxWidthRef$current=maxWidthRef.current)!==null&&_maxWidthRef$current!==void 0?_maxWidthRef$current:1/0),"px"),elements.floating.style.maxHeight="".concat(availableHeight,"px"));const nextDimensions=await platform.getDimensions(elements.floating),targetH=nextDimensions.height,targetW=nextDimensions.width;return floatingW!==targetW||floatingH!==targetH?{reset:{rects:!0}}:{};}};}function calcCurrentWidth(params){const{container,mediaIndex,width}=params,w=width[mediaIndex],currentWidth=w===void 0?width[width.length-1]:w;return typeof currentWidth=="number"?container[currentWidth]:void 0;}function calcMaxWidth(params){const{boundaryWidth,currentWidth}=params;if(!(currentWidth===void 0&&boundaryWidth===void 0))return Math.min(currentWidth!==null&¤tWidth!==void 0?currentWidth:1/0,(boundaryWidth||1/0)-DEFAULT_POPOVER_PADDING*2);}const MotionCard$1=styled(motion.create(Card)).withConfig({displayName:"MotionCard",componentId:"sc-ihg31s-0"})(_templateObject32||(_templateObject32=_taggedTemplateLiteral(["&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;"]))),MotionFlex=styled(motion.create(Flex)).withConfig({displayName:"MotionFlex",componentId:"sc-ihg31s-1"})(_templateObject33||(_templateObject33=_taggedTemplateLiteral(["will-change:opacity;"]))),PopoverCard=forwardRef(function(props,ref){var _props20;const $=dist.c(66);let animate,arrow2,arrowRef,arrowX,arrowY,children,marginsProp,originX,originY,overflow,padding,placement,radius,restProps,scheme,shadow,strategy,style,tone,width,xProp,yProp;$[0]!==props?(_props20=props,{__unstable_margins:marginsProp,animate,arrow:arrow2,arrowRef,arrowX,arrowY,children,padding,placement,originX,originY,overflow,radius,scheme,shadow,strategy,style,tone,width,x:xProp,y:yProp}=_props20,restProps=_objectWithoutProperties(_props20,_excluded37),_props20,$[0]=props,$[1]=animate,$[2]=arrow2,$[3]=arrowRef,$[4]=arrowX,$[5]=arrowY,$[6]=children,$[7]=marginsProp,$[8]=originX,$[9]=originY,$[10]=overflow,$[11]=padding,$[12]=placement,$[13]=radius,$[14]=restProps,$[15]=scheme,$[16]=shadow,$[17]=strategy,$[18]=style,$[19]=tone,$[20]=width,$[21]=xProp,$[22]=yProp):(animate=$[1],arrow2=$[2],arrowRef=$[3],arrowX=$[4],arrowY=$[5],children=$[6],marginsProp=$[7],originX=$[8],originY=$[9],overflow=$[10],padding=$[11],placement=$[12],radius=$[13],restProps=$[14],scheme=$[15],shadow=$[16],strategy=$[17],style=$[18],tone=$[19],width=$[20],xProp=$[21],yProp=$[22]);const{zIndex}=useLayer(),margins=marginsProp||DEFAULT_POPOVER_MARGINS,x=(xProp!==null&&xProp!==void 0?xProp:0)+margins[3],y=(yProp!==null&&yProp!==void 0?yProp:0)+margins[0],t0=animate?"transform":void 0;let t1;$[23]!==originX||$[24]!==originY||$[25]!==strategy||$[26]!==style||$[27]!==t0||$[28]!==width||$[29]!==x||$[30]!==y||$[31]!==zIndex?(t1=_objectSpread({left:x,originX,originY,position:strategy,top:y,width,zIndex,willChange:t0},style),$[23]=originX,$[24]=originY,$[25]=strategy,$[26]=style,$[27]=t0,$[28]=width,$[29]=x,$[30]=y,$[31]=zIndex,$[32]=t1):t1=$[32];const rootStyle2=t1,t2=arrowX!==null?arrowX:void 0,t3=arrowY!==null?arrowY:void 0;let t4;$[33]!==t2||$[34]!==t3?(t4={left:t2,top:t3,right:void 0,bottom:void 0},$[33]=t2,$[34]=t3,$[35]=t4):t4=$[35];const arrowStyle=t4,t5=restProps;let t6;$[36]!==animate?(t6=animate?["hidden","initial"]:void 0,$[36]=animate,$[37]=t6):t6=$[37];let t7;$[38]!==animate?(t7=animate?["visible","scaleIn"]:void 0,$[38]=animate,$[39]=t7):t7=$[39];let t8;$[40]!==animate?(t8=animate?["hidden","scaleOut"]:void 0,$[40]=animate,$[41]=t8):t8=$[41];let t9;$[42]!==children||$[43]!==padding?(t9=/* @__PURE__ */jsx(Flex,{direction:"column",flex:1,padding,children}),$[42]=children,$[43]=padding,$[44]=t9):t9=$[44];let t10;$[45]!==overflow||$[46]!==t9?(t10=/* @__PURE__ */jsx(MotionFlex,{"data-ui":"Popover__wrapper",direction:"column",flex:1,overflow,variants:POPOVER_MOTION_PROPS.children,transition:POPOVER_MOTION_PROPS.transition,children:t9}),$[45]=overflow,$[46]=t9,$[47]=t10):t10=$[47];let t11;$[48]!==arrow2||$[49]!==arrowRef||$[50]!==arrowStyle?(t11=arrow2&&/* @__PURE__ */jsx(Arrow,{ref:arrowRef,style:arrowStyle,width:DEFAULT_POPOVER_ARROW_WIDTH,height:DEFAULT_POPOVER_ARROW_HEIGHT,radius:DEFAULT_POPOVER_ARROW_RADIUS}),$[48]=arrow2,$[49]=arrowRef,$[50]=arrowStyle,$[51]=t11):t11=$[51];let t12;return $[52]!==placement||$[53]!==radius||$[54]!==ref||$[55]!==rootStyle2||$[56]!==scheme||$[57]!==shadow||$[58]!==t10||$[59]!==t11||$[60]!==t5||$[61]!==t6||$[62]!==t7||$[63]!==t8||$[64]!==tone?(t12=/* @__PURE__ */jsxs(MotionCard$1,_objectSpread(_objectSpread({"data-ui":"Popover"},t5),{},{"data-placement":placement,radius,ref,scheme,shadow,sizing:"border",style:rootStyle2,tone,variants:POPOVER_MOTION_PROPS.card,transition:POPOVER_MOTION_PROPS.transition,initial:t6,animate:t7,exit:t8,children:[t10,t11]})),$[52]=placement,$[53]=radius,$[54]=ref,$[55]=rootStyle2,$[56]=scheme,$[57]=shadow,$[58]=t10,$[59]=t11,$[60]=t5,$[61]=t6,$[62]=t7,$[63]=t8,$[64]=tone,$[65]=t12):t12=$[65],t12;});PopoverCard.displayName="ForwardRef(PopoverCard)";const ViewportOverlay=()=>{const $=dist.c(2),{zIndex}=useLayer();let t0;return $[0]!==zIndex?(t0=/* @__PURE__ */jsx("div",{style:{height:"100vh",inset:0,position:"fixed",width:"100vw",zIndex}}),$[0]=zIndex,$[1]=t0):t0=$[1],t0;},Popover=forwardRef(function(props,forwardedRef){var _props$placement,_ref70,_ref71,_useElementSize2,_middlewareData$hide,_middlewareData$arrow2,_middlewareData$arrow3,_middlewareData$Sani,_middlewareData$Sani2;const $=dist.c(126),{container,layer}=useTheme_v2(),boundaryElementContext=useBoundaryElement();let _boundaryElement,_fallbackPlacements,_floatingBoundary,_referenceBoundary,_zOffsetProp,childProp,content,disabled,matchReferenceWidth,modal,open,paddingProp,portal,referenceElement,restProps,scheme,t0,t1,t10,t11,t2,t3,t4,t5,t6,t7,t8,t9,updateRef;if($[0]!==props){const{__unstable_margins:t122,animate:t132,arrow:t142,boundaryElement:t152,children:t162,constrainSize:t172,content:t182,disabled:t192,fallbackPlacements:t202,matchReferenceWidth:t212,floatingBoundary:t222,modal:t232,onActivate,open:t242,overflow:t252,padding:t262,placement:t272,placementStrategy:t282,portal:t292,preventOverflow:t302,radius:t312,referenceBoundary:t322,referenceElement:t332,scheme:t342,shadow:t352,tone:t362,width:t372,zOffset:t382,updateRef:t392}=props,t402=_objectWithoutProperties(props,_excluded38);t0=t122,t1=t132,t2=t142,_boundaryElement=t152,childProp=t162,t3=t172,content=t182,disabled=t192,_fallbackPlacements=t202,matchReferenceWidth=t212,_floatingBoundary=t222,modal=t232,open=t242,t4=t252,paddingProp=t262,t5=t272,t6=t282,portal=t292,t7=t302,t8=t312,_referenceBoundary=t322,referenceElement=t332,scheme=t342,t9=t352,t10=t362,t11=t372,_zOffsetProp=t382,updateRef=t392,restProps=t402,$[0]=props,$[1]=_boundaryElement,$[2]=_fallbackPlacements,$[3]=_floatingBoundary,$[4]=_referenceBoundary,$[5]=_zOffsetProp,$[6]=childProp,$[7]=content,$[8]=disabled,$[9]=matchReferenceWidth,$[10]=modal,$[11]=open,$[12]=paddingProp,$[13]=portal,$[14]=referenceElement,$[15]=restProps,$[16]=scheme,$[17]=t0,$[18]=t1,$[19]=t10,$[20]=t11,$[21]=t2,$[22]=t3,$[23]=t4,$[24]=t5,$[25]=t6,$[26]=t7,$[27]=t8,$[28]=t9,$[29]=updateRef;}else _boundaryElement=$[1],_fallbackPlacements=$[2],_floatingBoundary=$[3],_referenceBoundary=$[4],_zOffsetProp=$[5],childProp=$[6],content=$[7],disabled=$[8],matchReferenceWidth=$[9],modal=$[10],open=$[11],paddingProp=$[12],portal=$[13],referenceElement=$[14],restProps=$[15],scheme=$[16],t0=$[17],t1=$[18],t10=$[19],t11=$[20],t2=$[21],t3=$[22],t4=$[23],t5=$[24],t6=$[25],t7=$[26],t8=$[27],t9=$[28],updateRef=$[29];const margins=t0===void 0?DEFAULT_POPOVER_MARGINS:t0,_animate=t1===void 0?!1:t1,arrowProp=t2===void 0?!1:t2,constrainSize=t3===void 0?!1:t3,overflow=t4===void 0?"hidden":t4,placementProp=t5===void 0?"bottom":t5,placementStrategy=t6===void 0?"flip":t6,preventOverflow=t7===void 0?!0:t7,radiusProp=t8===void 0?3:t8,shadowProp=t9===void 0?3:t9,tone=t10===void 0?"inherit":t10,widthProp=t11===void 0?"auto":t11,boundaryElement=_boundaryElement!==null&&_boundaryElement!==void 0?_boundaryElement:boundaryElementContext===null||boundaryElementContext===void 0?void 0:boundaryElementContext.element,fallbackPlacements=_fallbackPlacements!==null&&_fallbackPlacements!==void 0?_fallbackPlacements:DEFAULT_FALLBACK_PLACEMENTS$1[(_props$placement=props.placement)!==null&&_props$placement!==void 0?_props$placement:"bottom"],floatingBoundary=(_ref70=_floatingBoundary!==null&&_floatingBoundary!==void 0?_floatingBoundary:props.boundaryElement)!==null&&_ref70!==void 0?_ref70:boundaryElementContext.element,referenceBoundary=(_ref71=_referenceBoundary!==null&&_referenceBoundary!==void 0?_referenceBoundary:props.boundaryElement)!==null&&_ref71!==void 0?_ref71:boundaryElementContext.element,zOffsetProp=_zOffsetProp!==null&&_zOffsetProp!==void 0?_zOffsetProp:layer.popover.zOffset,animate=usePrefersReducedMotion()?!1:_animate,boundarySize=(_useElementSize2=useElementSize(boundaryElement))===null||_useElementSize2===void 0?void 0:_useElementSize2.border;let t12;$[30]!==paddingProp?(t12=_getArrayProp(paddingProp),$[30]=paddingProp,$[31]=t12):t12=$[31];const padding=t12;let t13;$[32]!==radiusProp?(t13=_getArrayProp(radiusProp),$[32]=radiusProp,$[33]=t13):t13=$[33];const radius=t13;let t14;$[34]!==shadowProp?(t14=_getArrayProp(shadowProp),$[34]=shadowProp,$[35]=t14):t14=$[35];const shadow=t14,widthArrayProp=_getArrayProp(widthProp);let t15;$[36]!==zOffsetProp?(t15=_getArrayProp(zOffsetProp),$[36]=zOffsetProp,$[37]=t15):t15=$[37];const zOffset=t15,ref=useRef$1(null),arrowRef=useRef$1(null);let t16;$[38]===Symbol.for("react.memo_cache_sentinel")?(t16=()=>ref.current,$[38]=t16):t16=$[38],useImperativeHandle(forwardedRef,t16);const mediaIndex=useMediaIndex(),boundaryWidth=constrainSize||preventOverflow?boundarySize===null||boundarySize===void 0?void 0:boundarySize.width:void 0,width=calcCurrentWidth({container,mediaIndex,width:widthArrayProp}),widthRef=useRef$1(width);let t17,t18;$[39]!==width?(t17=()=>{widthRef.current=width;},t18=[width],$[39]=width,$[40]=t17,$[41]=t18):(t17=$[40],t18=$[41]),useEffect$1(t17,t18);let t19;$[42]!==boundaryWidth||$[43]!==width?(t19=calcMaxWidth({boundaryWidth,currentWidth:width}),$[42]=boundaryWidth,$[43]=width,$[44]=t19):t19=$[44];const maxWidth=t19,maxWidthRef=useRef$1(maxWidth);let t20,t21;$[45]!==maxWidth?(t20=()=>{maxWidthRef.current=maxWidth;},t21=[maxWidth],$[45]=maxWidth,$[46]=t20,$[47]=t21):(t20=$[46],t21=$[47]),useEffect$1(t20,t21);const referenceWidthRef=useRef$1(void 0);let t22,t23;$[48]!==matchReferenceWidth||$[49]!==maxWidth||$[50]!==open||$[51]!==width?(t22=()=>{const floatingElement=ref.current;if(!open||!floatingElement)return;const referenceWidth=referenceWidthRef.current;matchReferenceWidth?referenceWidth!==void 0&&(floatingElement.style.width="".concat(referenceWidth,"px")):width!==void 0&&(floatingElement.style.width="".concat(width,"px")),typeof maxWidth=="number"&&(floatingElement.style.maxWidth="".concat(maxWidth,"px"));},t23=[width,matchReferenceWidth,maxWidth,open],$[48]=matchReferenceWidth,$[49]=maxWidth,$[50]=open,$[51]=width,$[52]=t22,$[53]=t23):(t22=$[52],t23=$[53]),useEffect$1(t22,t23);const[referenceWidth_0,setReferenceWidth]=useState(void 0);let t24;$[54]!==animate||$[55]!==arrowProp||$[56]!==constrainSize||$[57]!==fallbackPlacements||$[58]!==floatingBoundary||$[59]!==margins||$[60]!==matchReferenceWidth||$[61]!==placementProp||$[62]!==placementStrategy||$[63]!==preventOverflow||$[64]!==referenceBoundary?(t24={animate,arrowProp,arrowRef,constrainSize,fallbackPlacements,floatingBoundary,margins,matchReferenceWidth,maxWidthRef,placementProp,placementStrategy,preventOverflow,referenceBoundary,referenceWidthRef,rootBoundary:"viewport",setReferenceWidth,widthRef},$[54]=animate,$[55]=arrowProp,$[56]=constrainSize,$[57]=fallbackPlacements,$[58]=floatingBoundary,$[59]=margins,$[60]=matchReferenceWidth,$[61]=placementProp,$[62]=placementStrategy,$[63]=preventOverflow,$[64]=referenceBoundary,$[65]=t24):t24=$[65];const middleware=useMiddleware$1(t24);let t25;$[66]!==referenceElement?(t25=referenceElement?{reference:referenceElement}:void 0,$[66]=referenceElement,$[67]=t25):t25=$[67];let t26;$[68]!==middleware||$[69]!==placementProp||$[70]!==t25?(t26={middleware,placement:placementProp,whileElementsMounted:autoUpdate,elements:t25},$[68]=middleware,$[69]=placementProp,$[70]=t25,$[71]=t26):t26=$[71];const{x,y,middlewareData,placement,refs,strategy,update}=useFloating(t26),referenceHidden=(_middlewareData$hide=middlewareData.hide)===null||_middlewareData$hide===void 0?void 0:_middlewareData$hide.referenceHidden,arrowX=(_middlewareData$arrow2=middlewareData.arrow)===null||_middlewareData$arrow2===void 0?void 0:_middlewareData$arrow2.x,arrowY=(_middlewareData$arrow3=middlewareData.arrow)===null||_middlewareData$arrow3===void 0?void 0:_middlewareData$arrow3.y,originX=(_middlewareData$Sani=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani===void 0?void 0:_middlewareData$Sani.originX,originY=(_middlewareData$Sani2=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani2===void 0?void 0:_middlewareData$Sani2.originY;let t27;$[72]===Symbol.for("react.memo_cache_sentinel")?(t27=arrowEl=>{arrowRef.current=arrowEl;},$[72]=t27):t27=$[72];const setArrow=t27;let t28;$[73]!==refs?(t28=node=>{ref.current=node,refs.setFloating(node);},$[73]=refs,$[74]=t28):t28=$[74];const setFloating=t28;let t29;$[75]!==childProp?(t29=childProp?getElementRef(childProp):null,$[75]=childProp,$[76]=t29):t29=$[76];let t30;$[77]!==refs.reference.current?(t30=()=>refs.reference.current,$[77]=refs.reference.current,$[78]=t30):t30=$[78],useImperativeHandle(t29,t30);let t31;bb0:{if(referenceElement){t31=childProp;break bb0;}if(!childProp){t31=null;break bb0;}let t322;$[79]!==childProp||$[80]!==refs.setReference?(t322=cloneElement(childProp,{ref:refs.setReference}),$[79]=childProp,$[80]=refs.setReference,$[81]=t322):t322=$[81],t31=t322;}const child=t31;let t32,t33;if($[82]!==update?(t32=()=>update,t33=[update],$[82]=update,$[83]=t32,$[84]=t33):(t32=$[83],t33=$[84]),useImperativeHandle(updateRef,t32,t33),disabled){let t342;return $[85]!==childProp?(t342=childProp||/* @__PURE__ */jsx(Fragment,{}),$[85]=childProp,$[86]=t342):t342=$[86],t342;}let t34;$[87]!==modal?(t34=modal&&/* @__PURE__ */jsx(ViewportOverlay,{}),$[87]=modal,$[88]=t34):t34=$[88];const t35=matchReferenceWidth?referenceWidth_0:width;let t36;$[89]!==animate||$[90]!==arrowProp||$[91]!==arrowX||$[92]!==arrowY||$[93]!==content||$[94]!==margins||$[95]!==originX||$[96]!==originY||$[97]!==overflow||$[98]!==padding||$[99]!==placement||$[100]!==radius||$[101]!==referenceHidden||$[102]!==restProps||$[103]!==scheme||$[104]!==setFloating||$[105]!==shadow||$[106]!==strategy||$[107]!==t35||$[108]!==tone||$[109]!==x||$[110]!==y?(t36=/* @__PURE__ */jsx(PopoverCard,_objectSpread(_objectSpread({},restProps),{},{__unstable_margins:margins,animate,arrow:arrowProp,arrowRef:setArrow,arrowX,arrowY,hidden:referenceHidden,overflow,padding,placement,radius,ref:setFloating,scheme,shadow,originX,originY,strategy,tone,width:t35,x,y,children:content})),$[89]=animate,$[90]=arrowProp,$[91]=arrowX,$[92]=arrowY,$[93]=content,$[94]=margins,$[95]=originX,$[96]=originY,$[97]=overflow,$[98]=padding,$[99]=placement,$[100]=radius,$[101]=referenceHidden,$[102]=restProps,$[103]=scheme,$[104]=setFloating,$[105]=shadow,$[106]=strategy,$[107]=t35,$[108]=tone,$[109]=x,$[110]=y,$[111]=t36):t36=$[111];let t37;$[112]!==t34||$[113]!==t36||$[114]!==zOffset?(t37=/* @__PURE__ */jsxs(LayerProvider,{zOffset,children:[t34,t36]}),$[112]=t34,$[113]=t36,$[114]=zOffset,$[115]=t37):t37=$[115];const popover=t37;let t38;$[116]!==open||$[117]!==popover||$[118]!==portal?(t38=open&&(portal?/* @__PURE__ */jsx(Portal,{__unstable_name:typeof portal=="string"?portal:void 0,children:popover}):popover),$[116]=open,$[117]=popover,$[118]=portal,$[119]=t38):t38=$[119];const children=t38;let t39;$[120]!==animate||$[121]!==children?(t39=animate?/* @__PURE__ */jsx(AnimatePresence,{children}):children,$[120]=animate,$[121]=children,$[122]=t39):t39=$[122];let t40;return $[123]!==child||$[124]!==t39?(t40=/* @__PURE__ */jsxs(Fragment,{children:[t39,child]}),$[123]=child,$[124]=t39,$[125]=t40):t40=$[125],t40;});Popover.displayName="ForwardRef(Popover)";function useMiddleware$1(t0){const $=dist.c(42),{animate,arrowProp,arrowRef,constrainSize,fallbackPlacements,floatingBoundary,margins,matchReferenceWidth,maxWidthRef,placementProp,placementStrategy,preventOverflow,referenceBoundary,referenceWidthRef,rootBoundary,setReferenceWidth,widthRef}=t0;let ret;if($[0]!==animate||$[1]!==arrowProp||$[2]!==arrowRef||$[3]!==constrainSize||$[4]!==fallbackPlacements||$[5]!==floatingBoundary||$[6]!==margins||$[7]!==matchReferenceWidth||$[8]!==maxWidthRef||$[9]!==placementProp||$[10]!==placementStrategy||$[11]!==preventOverflow||$[12]!==referenceBoundary||$[13]!==referenceWidthRef||$[14]!==rootBoundary||$[15]!==setReferenceWidth||$[16]!==widthRef){if(ret=[],constrainSize||preventOverflow)if(placementStrategy==="autoPlacement"){let t12;$[18]!==fallbackPlacements||$[19]!==placementProp?(t12=autoPlacement({allowedPlacements:[placementProp].concat(fallbackPlacements)}),$[18]=fallbackPlacements,$[19]=placementProp,$[20]=t12):t12=$[20],ret.push(t12);}else{const t12=floatingBoundary||void 0;let t22;$[21]!==fallbackPlacements||$[22]!==rootBoundary||$[23]!==t12?(t22=flip({boundary:t12,fallbackPlacements,padding:DEFAULT_POPOVER_PADDING,rootBoundary}),$[21]=fallbackPlacements,$[22]=rootBoundary,$[23]=t12,$[24]=t22):t22=$[24],ret.push(t22);}let t1;if($[25]===Symbol.for("react.memo_cache_sentinel")?(t1=offset({mainAxis:DEFAULT_POPOVER_DISTANCE}),$[25]=t1):t1=$[25],ret.push(t1),constrainSize||matchReferenceWidth){const t22=floatingBoundary||void 0;let t32;$[26]!==constrainSize||$[27]!==margins||$[28]!==matchReferenceWidth||$[29]!==maxWidthRef||$[30]!==referenceWidthRef||$[31]!==setReferenceWidth||$[32]!==t22||$[33]!==widthRef?(t32=size({boundaryElement:t22,constrainSize,margins,matchReferenceWidth,maxWidthRef,padding:DEFAULT_POPOVER_PADDING,referenceWidthRef,setReferenceWidth,widthRef}),$[26]=constrainSize,$[27]=margins,$[28]=matchReferenceWidth,$[29]=maxWidthRef,$[30]=referenceWidthRef,$[31]=setReferenceWidth,$[32]=t22,$[33]=widthRef,$[34]=t32):t32=$[34],ret.push(t32);}if(preventOverflow){const t22=floatingBoundary||void 0;let t32;$[35]!==rootBoundary||$[36]!==t22?(t32=shift({boundary:t22,rootBoundary,padding:DEFAULT_POPOVER_PADDING}),$[35]=rootBoundary,$[36]=t22,$[37]=t32):t32=$[37],ret.push(t32);}if(arrowProp){let t22;$[38]!==arrowRef?(t22=arrow({element:arrowRef,padding:DEFAULT_POPOVER_PADDING}),$[38]=arrowRef,$[39]=t22):t22=$[39],ret.push(t22);}animate&&ret.push(origin);const t2=referenceBoundary||void 0;let t3;$[40]!==t2?(t3=hide({boundary:t2,padding:DEFAULT_POPOVER_PADDING,strategy:"referenceHidden"}),$[40]=t2,$[41]=t3):t3=$[41],ret.push(t3),$[0]=animate,$[1]=arrowProp,$[2]=arrowRef,$[3]=constrainSize,$[4]=fallbackPlacements,$[5]=floatingBoundary,$[6]=margins,$[7]=matchReferenceWidth,$[8]=maxWidthRef,$[9]=placementProp,$[10]=placementStrategy,$[11]=preventOverflow,$[12]=referenceBoundary,$[13]=referenceWidthRef,$[14]=rootBoundary,$[15]=setReferenceWidth,$[16]=widthRef,$[17]=ret;}else ret=$[17];return ret;}function radioBaseStyle(){return css(_templateObject34||(_templateObject34=_taggedTemplateLiteral(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));}function inputElementStyle(props){const{color,input}=getTheme_v2(props.theme),dist=(input.radio.size-input.radio.markSize)/2;return css(_templateObject35||(_templateObject35=_taggedTemplateLiteral(["\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n z-index: 1;\n padding: 0;\n margin: 0;\n border-radius: ",";\n border: none;\n\n /* enabled */\n & + span {\n display: block;\n position: relative;\n height: ",";\n width: ",";\n border-radius: ",";\n background: ",";\n box-shadow: ",";\n\n &::after {\n content: '';\n position: absolute;\n top: ",";\n left: ",";\n height: ",";\n width: ",";\n border-radius: ",";\n background: ",";\n opacity: 0;\n }\n }\n\n /* focused */\n &:not(:disabled):focus + span {\n box-shadow: ",";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ",";\n }\n\n &:checked + span::after {\n opacity: 1;\n }\n\n /* customValidity */\n &[data-error] + span {\n background-color: ",";\n box-shadow: ",";\n &::after {\n background: ",";\n }\n }\n\n /* read only */\n &[data-read-only] + span {\n box-shadow: 0 0 0 1px ",";\n background: ",";\n\n &::after {\n background: ",";\n }\n }\n\n /* disabled */\n &:not([data-read-only]):disabled + span {\n box-shadow: 0 0 0 1px ",";\n background: ",";\n\n &::after {\n background: ",";\n }\n }\n "])),rem(input.radio.size/2),rem(input.radio.size),rem(input.radio.size),rem(input.radio.size/2),color.input.default.enabled.bg,focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),rem(dist),rem(dist),rem(input.radio.markSize),rem(input.radio.markSize),rem(input.radio.markSize/2),color.input.default.enabled.fg,focusRingStyle({border:{width:input.border.width,color:color.input.default.enabled.border},focusRing:input.radio.focusRing}),focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),color.input.invalid.enabled.border,focusRingBorderStyle({width:input.border.width,color:color.input.invalid.enabled.muted.bg}),color.input.invalid.enabled.muted.bg,color.input.default.readOnly.border,color.input.default.readOnly.bg,color.input.default.readOnly.border,color.input.default.disabled.border,color.input.default.disabled.bg,color.input.default.disabled.border);}const StyledRadio=/* @__PURE__ */styled.div.withConfig({displayName:"StyledRadio",componentId:"sc-ccrwkf-0"})(radioBaseStyle),Input$4=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-ccrwkf-1"})(inputElementStyle),Radio=forwardRef(function(props,forwardedRef){var _props21;const $=dist.c(19);let className,customValidity,disabled,readOnly,restProps,style;$[0]!==props?(_props21=props,{className,disabled,style,customValidity,readOnly}=_props21,restProps=_objectWithoutProperties(_props21,_excluded39),_props21,$[0]=props,$[1]=className,$[2]=customValidity,$[3]=disabled,$[4]=readOnly,$[5]=restProps,$[6]=style):(className=$[1],customValidity=$[2],disabled=$[3],readOnly=$[4],restProps=$[5],style=$[6]);const ref=useRef$1(null);let t0;$[7]===Symbol.for("react.memo_cache_sentinel")?(t0=()=>ref.current,$[7]=t0):t0=$[7],useImperativeHandle(forwardedRef,t0),useCustomValidity(ref,customValidity);const t1=!disabled&&readOnly?"":void 0,t2=customValidity?"":void 0,t3=disabled||readOnly;let t4;$[8]!==readOnly||$[9]!==restProps||$[10]!==t1||$[11]!==t2||$[12]!==t3?(t4=/* @__PURE__ */jsx(Input$4,_objectSpread(_objectSpread({"data-read-only":t1,"data-error":t2},restProps),{},{disabled:t3,readOnly,ref,type:"radio"})),$[8]=readOnly,$[9]=restProps,$[10]=t1,$[11]=t2,$[12]=t3,$[13]=t4):t4=$[13];let t5;$[14]===Symbol.for("react.memo_cache_sentinel")?(t5=/* @__PURE__ */jsx("span",{}),$[14]=t5):t5=$[14];let t6;return $[15]!==className||$[16]!==style||$[17]!==t4?(t6=/* @__PURE__ */jsxs(StyledRadio,{className,"data-ui":"Radio",style,children:[t4,t5]}),$[15]=className,$[16]=style,$[17]=t4,$[18]=t6):t6=$[18],t6;});Radio.displayName="ForwardRef(Radio)";function rootStyle(){return css(_templateObject36||(_templateObject36=_taggedTemplateLiteral(["\n position: relative;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));}function inputBaseStyle(props){const{font}=getTheme_v2(props.theme);return css(_templateObject37||(_templateObject37=_taggedTemplateLiteral(["\n -webkit-font-smoothing: antialiased;\n appearance: none;\n border: 0;\n font-family: ",";\n color: inherit;\n width: 100%;\n outline: none;\n margin: 0;\n\n &:disabled {\n opacity: 1;\n }\n "])),font.text.family);}function inputColorStyle(props){const{color,input}=getTheme_v2(props.theme);return css(_templateObject38||(_templateObject38=_taggedTemplateLiteral(["\n /* enabled */\n background-color: ",";\n color: ",";\n box-shadow: ",";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ",";\n color: ",";\n box-shadow: ",";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ",";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ",";\n color: ",";\n box-shadow: ",";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ",";\n color: ",";\n box-shadow: ",";\n }\n "])),color.input.default.enabled.bg,color.input.default.enabled.fg,focusRingBorderStyle({color:color.input.default.enabled.border,width:input.border.width}),color.input.default.hovered.bg,color.input.default.hovered.fg,focusRingBorderStyle({color:color.input.default.hovered.border,width:input.border.width}),focusRingStyle({border:{width:input.border.width,color:color.input.default.enabled.border},focusRing:input.select.focusRing}),color.input.default.readOnly.bg,color.input.default.readOnly.fg,focusRingBorderStyle({color:color.input.default.readOnly.border,width:input.border.width}),color.input.default.disabled.bg,color.input.default.disabled.fg,focusRingBorderStyle({color:color.input.default.disabled.border,width:input.border.width}));}function textSize(size2){return{fontSize:rem(size2.fontSize),lineHeight:"".concat(rem(size2.lineHeight))};}function inputTextSizeStyle(props){const{$fontSize}=props,{font,media}=getTheme_v2(props.theme);return _responsive(media,$fontSize,sizeIndex=>textSize(font.text.sizes[sizeIndex]||font.text.sizes[2]));}function inputStyle(){return[responsiveRadiusStyle,inputBaseStyle,inputColorStyle,inputTextSizeStyle,responsiveInputPaddingIconRightStyle];}function iconBoxStyle(props){const{color}=getTheme_v2(props.theme);return css(_templateObject39||(_templateObject39=_taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n\n /* enabled */\n --card-fg-color: ",";\n\n /* hover */\n @media (hover: hover) {\n select:not(disabled):not(:read-only):hover + && {\n --card-fg-color: ",";\n }\n }\n\n /* disabled */\n select:disabled + && {\n --card-fg-color: ",";\n }\n\n /* read-only */\n select[data-read-only] + && {\n --card-fg-color: ",";\n }\n "])),color.input.default.enabled.fg,color.input.default.hovered.fg,color.input.default.disabled.fg,color.input.default.readOnly.fg);}const selectStyle={root:rootStyle,input:inputStyle,iconBox:iconBoxStyle},StyledSelect=/* @__PURE__ */styled.div.withConfig({displayName:"StyledSelect",componentId:"sc-5mxno7-0"})(selectStyle.root),Input$3=/* @__PURE__ */styled.select.withConfig({displayName:"Input",componentId:"sc-5mxno7-1"})(selectStyle.input),IconBox=/* @__PURE__ */styled(Box).withConfig({displayName:"IconBox",componentId:"sc-5mxno7-2"})(selectStyle.iconBox),Select=forwardRef(function(props,forwardedRef){var _props22;const $=dist.c(37);let children,customValidity,disabled,readOnly,restProps,t0,t1,t2,t3;$[0]!==props?(_props22=props,{children,customValidity,disabled,fontSize:t0,padding:t1,radius:t2,readOnly,space:t3}=_props22,restProps=_objectWithoutProperties(_props22,_excluded40),_props22,$[0]=props,$[1]=children,$[2]=customValidity,$[3]=disabled,$[4]=readOnly,$[5]=restProps,$[6]=t0,$[7]=t1,$[8]=t2,$[9]=t3):(children=$[1],customValidity=$[2],disabled=$[3],readOnly=$[4],restProps=$[5],t0=$[6],t1=$[7],t2=$[8],t3=$[9]);const fontSize2=t0===void 0?2:t0,padding=t1===void 0?3:t1,radius=t2===void 0?2:t2,space=t3===void 0?3:t3,ref=useRef$1(null);let t4;$[10]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>ref.current,$[10]=t4):t4=$[10],useImperativeHandle(forwardedRef,t4),useCustomValidity(ref,customValidity);const t5=!disabled&&readOnly?"":void 0;let t6;$[11]!==fontSize2?(t6=_getArrayProp(fontSize2),$[11]=fontSize2,$[12]=t6):t6=$[12];let t7;$[13]!==padding?(t7=_getArrayProp(padding),$[13]=padding,$[14]=t7):t7=$[14];let t8;$[15]!==radius?(t8=_getArrayProp(radius),$[15]=radius,$[16]=t8):t8=$[16];let t9;$[17]!==space?(t9=_getArrayProp(space),$[17]=space,$[18]=t9):t9=$[18];const t10=disabled||readOnly;let t11;$[19]!==children||$[20]!==restProps||$[21]!==t10||$[22]!==t5||$[23]!==t6||$[24]!==t7||$[25]!==t8||$[26]!==t9?(t11=/* @__PURE__ */jsx(Input$3,_objectSpread(_objectSpread({"data-read-only":t5,"data-ui":"Select"},restProps),{},{$fontSize:t6,$padding:t7,$radius:t8,$space:t9,disabled:t10,ref,children})),$[19]=children,$[20]=restProps,$[21]=t10,$[22]=t5,$[23]=t6,$[24]=t7,$[25]=t8,$[26]=t9,$[27]=t11):t11=$[27];let t12;$[28]===Symbol.for("react.memo_cache_sentinel")?(t12=/* @__PURE__ */jsx(ChevronDownIcon,{}),$[28]=t12):t12=$[28];let t13;$[29]!==fontSize2?(t13=/* @__PURE__ */jsx(Text,{size:fontSize2,children:t12}),$[29]=fontSize2,$[30]=t13):t13=$[30];let t14;$[31]!==padding||$[32]!==t13?(t14=/* @__PURE__ */jsx(IconBox,{padding,children:t13}),$[31]=padding,$[32]=t13,$[33]=t14):t14=$[33];let t15;return $[34]!==t11||$[35]!==t14?(t15=/* @__PURE__ */jsxs(StyledSelect,{"data-ui":"Select",children:[t11,t14]}),$[34]=t11,$[35]=t14,$[36]=t15):t15=$[36],t15;});Select.displayName="ForwardRef(Select)";const BASE_STYLE={"&&:not([hidden])":{display:"grid"},'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"},gridTemplateColumns:"minmax(0, 1fr)",gridAutoRows:"min-content"};function stackBaseStyle(){return BASE_STYLE;}function responsiveStackSpaceStyle(props){const{media,space}=getTheme_v2(props.theme);return _responsive(media,props.$space,spaceIndex=>({gridGap:rem(space[spaceIndex])}));}const StyledStack=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledStack",componentId:"sc-8dpfq2-0"})(stackBaseStyle,responsiveStackSpaceStyle),Stack=forwardRef(function(props,ref){var _props23;const $=dist.c(12);let as,restProps,space;$[0]!==props?(_props23=props,{as,space}=_props23,restProps=_objectWithoutProperties(_props23,_excluded41),_props23,$[0]=props,$[1]=as,$[2]=restProps,$[3]=space):(as=$[1],restProps=$[2],space=$[3]);const t0=typeof as=="string"?as:void 0;let t1;$[4]!==space?(t1=_getArrayProp(space),$[4]=space,$[5]=t1):t1=$[5];let t2;return $[6]!==as||$[7]!==ref||$[8]!==restProps||$[9]!==t0||$[10]!==t1?(t2=/* @__PURE__ */jsx(StyledStack,_objectSpread(_objectSpread({"data-as":t0,"data-ui":"Stack"},restProps),{},{$space:t1,forwardedAs:as,ref})),$[6]=as,$[7]=ref,$[8]=restProps,$[9]=t0,$[10]=t1,$[11]=t2):t2=$[11],t2;});Stack.displayName="ForwardRef(Stack)";function switchBaseStyles(){return css(_templateObject40||(_templateObject40=_taggedTemplateLiteral(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));}function switchInputStyles(){return css(_templateObject41||(_templateObject41=_taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n padding: 0;\n margin: 0;\n\n /* Place the input element above the representation element */\n z-index: 1;\n "])));}function switchRepresentationStyles(props){const{color,input}=getTheme_v2(props.theme);return css(_templateObject42||(_templateObject42=_taggedTemplateLiteral(["\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ",";\n height: ",";\n border-radius: ",";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ",";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n input[data-read-only]:disabled + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n\n input:checked[data-read-only]:disabled + && {\n --switch-bg-color: ",";\n --switch-fg-color: ",";\n }\n "])),color.input.default.enabled.border,color.input.default.enabled.bg,rem(input.switch.width),rem(input.switch.height),rem(input.switch.height/2),focusRingStyle({focusRing:input.switch.focusRing}),color.input.default.enabled.fg,color.input.default.enabled.bg,color.input.default.hovered.border,color.input.default.hovered.bg,color.input.default.enabled.fg,color.input.default.enabled.bg,color.input.default.disabled.border,color.input.default.disabled.bg,color.input.default.readOnly.border,color.input.default.readOnly.bg,color.input.default.readOnly.fg,color.input.default.readOnly.bg);}function switchTrackStyles(props){const{input}=getTheme_v2(props.theme);return css(_templateObject43||(_templateObject43=_taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n background-color: var(--switch-bg-color);\n position: absolute;\n left: 0;\n top: 0;\n width: ",";\n height: ",";\n border-radius: ",";\n "])),rem(input.switch.width),rem(input.switch.height),rem(input.switch.height/2));}function switchThumbStyles(props){const{$indeterminate}=props,{input}=getTheme_v2(props.theme),trackWidth=input.switch.width,trackHeight=input.switch.height,trackPadding=input.switch.padding,size2=trackHeight-input.switch.padding*2,checkedOffset=trackWidth-trackPadding*2-size2,indeterminateOffset=trackWidth/2-size2/2-trackPadding,checked=$indeterminate!==!0&&props.$checked===!0;return css(_templateObject44||(_templateObject44=_taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n position: absolute;\n left: ",";\n top: ",";\n height: ",";\n width: ",";\n border-radius: ",";\n transition-property: transform;\n transition-duration: ","ms;\n transition-timing-function: ",";\n background: var(--switch-fg-color);\n transform: translate3d(0, 0, 0);\n box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);\n\n ","\n\n ","\n "])),rem(trackPadding),rem(trackPadding),rem(size2),rem(size2),rem(size2/2),input.switch.transitionDurationMs,input.switch.transitionTimingFunction,checked&&css(_templateObject45||(_templateObject45=_taggedTemplateLiteral(["\n transform: translate3d(","px, 0, 0);\n "])),checkedOffset),$indeterminate&&css(_templateObject46||(_templateObject46=_taggedTemplateLiteral(["\n transform: translate3d(","px, 0, 0);\n "])),indeterminateOffset));}const StyledSwitch=/* @__PURE__ */styled.span.withConfig({displayName:"StyledSwitch",componentId:"sc-dw1foe-0"})(switchBaseStyles),Input$2=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-dw1foe-1"})(switchInputStyles),Representation=/* @__PURE__ */styled.span.withConfig({displayName:"Representation",componentId:"sc-dw1foe-2"})(switchRepresentationStyles),Track=/* @__PURE__ */styled.span.withConfig({displayName:"Track",componentId:"sc-dw1foe-3"})(switchTrackStyles),Thumb=/* @__PURE__ */styled.span.withConfig({displayName:"Thumb",componentId:"sc-dw1foe-4"})(switchThumbStyles),Switch=forwardRef(function(props,forwardedRef){var _props24;const $=dist.c(26);let checked,className,disabled,indeterminate,readOnly,restProps,style;$[0]!==props?(_props24=props,{checked,className,disabled,indeterminate,readOnly,style}=_props24,restProps=_objectWithoutProperties(_props24,_excluded42),_props24,$[0]=props,$[1]=checked,$[2]=className,$[3]=disabled,$[4]=indeterminate,$[5]=readOnly,$[6]=restProps,$[7]=style):(checked=$[1],className=$[2],disabled=$[3],indeterminate=$[4],readOnly=$[5],restProps=$[6],style=$[7]);const ref=useRef$1(null);let t0;$[8]===Symbol.for("react.memo_cache_sentinel")?(t0=()=>ref.current,$[8]=t0):t0=$[8],useImperativeHandle(forwardedRef,t0);let t1,t2;$[9]!==indeterminate?(t1=()=>{ref.current&&(ref.current.indeterminate=indeterminate||!1);},t2=[indeterminate],$[9]=indeterminate,$[10]=t1,$[11]=t2):(t1=$[10],t2=$[11]),useEffect$1(t1,t2);const t3=!disabled&&readOnly?"":void 0,t4=indeterminate!==!0&&checked,t5=disabled||readOnly;let t6;$[12]!==restProps||$[13]!==t3||$[14]!==t4||$[15]!==t5?(t6=/* @__PURE__ */jsx(Input$2,_objectSpread(_objectSpread({"data-read-only":t3},restProps),{},{checked:t4,disabled:t5,type:"checkbox",ref})),$[12]=restProps,$[13]=t3,$[14]=t4,$[15]=t5,$[16]=t6):t6=$[16];let t7;$[17]===Symbol.for("react.memo_cache_sentinel")?(t7=/* @__PURE__ */jsx(Track,{}),$[17]=t7):t7=$[17];let t8;$[18]!==checked||$[19]!==indeterminate?(t8=/* @__PURE__ */jsxs(Representation,{"aria-hidden":!0,"data-name":"representation",children:[t7,/* @__PURE__ */jsx(Thumb,{$checked:checked,$indeterminate:indeterminate})]}),$[18]=checked,$[19]=indeterminate,$[20]=t8):t8=$[20];let t9;return $[21]!==className||$[22]!==style||$[23]!==t6||$[24]!==t8?(t9=/* @__PURE__ */jsxs(StyledSwitch,{className,"data-ui":"Switch",style,children:[t6,t8]}),$[21]=className,$[22]=style,$[23]=t6,$[24]=t8,$[25]=t9):t9=$[25],t9;});Switch.displayName="ForwardRef(Switch)";const StyledTextArea=/* @__PURE__ */styled.span.withConfig({displayName:"StyledTextArea",componentId:"sc-1d6h1o8-0"})(textInputRootStyle),InputRoot$1=styled.span.withConfig({displayName:"InputRoot",componentId:"sc-1d6h1o8-1"})(_templateObject47||(_templateObject47=_taggedTemplateLiteral(["flex:1;min-width:0;display:block;position:relative;"]))),Input$1=/* @__PURE__ */styled.textarea.withConfig({displayName:"Input",componentId:"sc-1d6h1o8-2"})(responsiveInputPaddingStyle,textInputBaseStyle,textInputFontSizeStyle),Presentation$1=/* @__PURE__ */styled.div.withConfig({displayName:"Presentation",componentId:"sc-1d6h1o8-3"})(responsiveRadiusStyle,textInputRepresentationStyle),TextArea=forwardRef(function(props,forwardedRef){var _props25;const $=dist.c(35);let __unstable_disableFocusRing,customValidity,restProps,t0,t1,t2,t3,t4,weight;$[0]!==props?(_props25=props,{border:t0,customValidity,disabled:t1,fontSize:t2,padding:t3,radius:t4,weight,__unstable_disableFocusRing}=_props25,restProps=_objectWithoutProperties(_props25,_excluded43),_props25,$[0]=props,$[1]=__unstable_disableFocusRing,$[2]=customValidity,$[3]=restProps,$[4]=t0,$[5]=t1,$[6]=t2,$[7]=t3,$[8]=t4,$[9]=weight):(__unstable_disableFocusRing=$[1],customValidity=$[2],restProps=$[3],t0=$[4],t1=$[5],t2=$[6],t3=$[7],t4=$[8],weight=$[9]);const border2=t0===void 0?!0:t0,disabled=t1===void 0?!1:t1,fontSize2=t2===void 0?2:t2,padding=t3===void 0?3:t3,radius=t4===void 0?2:t4,ref=useRef$1(null),rootTheme=useRootTheme();let t5;$[10]===Symbol.for("react.memo_cache_sentinel")?(t5=()=>ref.current,$[10]=t5):t5=$[10],useImperativeHandle(forwardedRef,t5),useCustomValidity(ref,customValidity);const t6=rootTheme.scheme,t7=rootTheme.tone;let t8;$[11]!==fontSize2?(t8=_getArrayProp(fontSize2),$[11]=fontSize2,$[12]=t8):t8=$[12];let t9;$[13]!==padding?(t9=_getArrayProp(padding),$[13]=padding,$[14]=t9):t9=$[14];const t10=rootTheme.scheme;let t11;$[15]===Symbol.for("react.memo_cache_sentinel")?(t11=_getArrayProp(0),$[15]=t11):t11=$[15];let t12;$[16]!==disabled||$[17]!==restProps||$[18]!==rootTheme.scheme||$[19]!==rootTheme.tone||$[20]!==t8||$[21]!==t9||$[22]!==weight?(t12=/* @__PURE__ */jsx(Input$1,_objectSpread(_objectSpread({"data-as":"textarea","data-scheme":t6,"data-tone":t7},restProps),{},{$fontSize:t8,$padding:t9,$scheme:t10,$space:t11,$tone:rootTheme.tone,$weight:weight,disabled,ref})),$[16]=disabled,$[17]=restProps,$[18]=rootTheme.scheme,$[19]=rootTheme.tone,$[20]=t8,$[21]=t9,$[22]=weight,$[23]=t12):t12=$[23];let t13;$[24]!==radius?(t13=_getArrayProp(radius),$[24]=radius,$[25]=t13):t13=$[25];const t14=border2?"":void 0;let t15;$[26]!==__unstable_disableFocusRing||$[27]!==rootTheme.scheme||$[28]!==rootTheme.tone||$[29]!==t13||$[30]!==t14?(t15=/* @__PURE__ */jsx(Presentation$1,{$radius:t13,$unstableDisableFocusRing:__unstable_disableFocusRing,$scheme:rootTheme.scheme,$tone:rootTheme.tone,"data-border":t14,"data-scheme":rootTheme.scheme,"data-tone":rootTheme.tone}),$[26]=__unstable_disableFocusRing,$[27]=rootTheme.scheme,$[28]=rootTheme.tone,$[29]=t13,$[30]=t14,$[31]=t15):t15=$[31];let t16;return $[32]!==t12||$[33]!==t15?(t16=/* @__PURE__ */jsx(StyledTextArea,{"data-ui":"TextArea",children:/* @__PURE__ */jsxs(InputRoot$1,{children:[t12,t15]})}),$[32]=t12,$[33]=t15,$[34]=t16):t16=$[34],t16;});TextArea.displayName="ForwardRef(TextArea)";const CLEAR_BUTTON_BOX_STYLE={zIndex:2},StyledTextInput=/* @__PURE__ */styled(Card).attrs({forwardedAs:"span"}).withConfig({displayName:"StyledTextInput",componentId:"sc-h62wco-0"})(textInputRootStyle),InputRoot=styled.span.withConfig({displayName:"InputRoot",componentId:"sc-h62wco-1"})(_templateObject48||(_templateObject48=_taggedTemplateLiteral(["flex:1;min-width:0;display:block;position:relative;"]))),Prefix=styled(Card).attrs({forwardedAs:"span"}).withConfig({displayName:"Prefix",componentId:"sc-h62wco-2"})(_templateObject49||(_templateObject49=_taggedTemplateLiteral(["border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}"]))),Suffix=styled(Card).attrs({forwardedAs:"span"}).withConfig({displayName:"Suffix",componentId:"sc-h62wco-3"})(_templateObject50||(_templateObject50=_taggedTemplateLiteral(["border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}"]))),Input=/* @__PURE__ */styled.input.withConfig({displayName:"Input",componentId:"sc-h62wco-4"})(responsiveInputPaddingStyle,textInputBaseStyle,textInputFontSizeStyle),Presentation=/* @__PURE__ */styled.span.withConfig({displayName:"Presentation",componentId:"sc-h62wco-5"})(responsiveRadiusStyle,textInputRepresentationStyle),LeftBox=styled(Box).withConfig({displayName:"LeftBox",componentId:"sc-h62wco-6"})(_templateObject51||(_templateObject51=_taggedTemplateLiteral(["position:absolute;top:0;left:0;"]))),RightBox=styled(Box).withConfig({displayName:"RightBox",componentId:"sc-h62wco-7"})(_templateObject52||(_templateObject52=_taggedTemplateLiteral(["position:absolute;top:0;right:0;"]))),RightCard=styled(Card).withConfig({displayName:"RightCard",componentId:"sc-h62wco-8"})(_templateObject53||(_templateObject53=_taggedTemplateLiteral(["background-color:transparent;position:absolute;top:0;right:0;"]))),TextInputClearButton=/* @__PURE__ */styled(Button).withConfig({displayName:"TextInputClearButton",componentId:"sc-h62wco-9"})({"&:not([hidden])":{display:"block"}}),TextInput=forwardRef(function(props,forwardedRef){var _props26;const $=dist.c(92);let IconComponent,IconRightComponent,__unstable_disableFocusRing,clearButton,customValidity,onClear,prefix,readOnly,restProps,suffix,t0,t1,t2,t3,t4,t5,t6,weight;$[0]!==props?(_props26=props,{__unstable_disableFocusRing,border:t0,clearButton,disabled:t1,fontSize:t2,icon:IconComponent,iconRight:IconRightComponent,onClear,padding:t3,prefix,radius:t4,readOnly,space:t5,suffix,customValidity,type:t6,weight}=_props26,restProps=_objectWithoutProperties(_props26,_excluded44),_props26,$[0]=props,$[1]=IconComponent,$[2]=IconRightComponent,$[3]=__unstable_disableFocusRing,$[4]=clearButton,$[5]=customValidity,$[6]=onClear,$[7]=prefix,$[8]=readOnly,$[9]=restProps,$[10]=suffix,$[11]=t0,$[12]=t1,$[13]=t2,$[14]=t3,$[15]=t4,$[16]=t5,$[17]=t6,$[18]=weight):(IconComponent=$[1],IconRightComponent=$[2],__unstable_disableFocusRing=$[3],clearButton=$[4],customValidity=$[5],onClear=$[6],prefix=$[7],readOnly=$[8],restProps=$[9],suffix=$[10],t0=$[11],t1=$[12],t2=$[13],t3=$[14],t4=$[15],t5=$[16],t6=$[17],weight=$[18]);const border2=t0===void 0?!0:t0,disabled=t1===void 0?!1:t1,fontSizeProp=t2===void 0?2:t2,paddingProp=t3===void 0?3:t3,radiusProp=t4===void 0?2:t4,spaceProp=t5===void 0?3:t5,type=t6===void 0?"text":t6,ref=useRef$1(null),rootTheme=useRootTheme();let t7;$[19]!==fontSizeProp?(t7=_getArrayProp(fontSizeProp),$[19]=fontSizeProp,$[20]=t7):t7=$[20];const fontSize2=t7;let t8;$[21]!==paddingProp?(t8=_getArrayProp(paddingProp),$[21]=paddingProp,$[22]=t8):t8=$[22];const padding=t8;let t9;$[23]!==radiusProp?(t9=_getArrayProp(radiusProp),$[23]=radiusProp,$[24]=t9):t9=$[24];const radius=t9;let t10;$[25]!==spaceProp?(t10=_getArrayProp(spaceProp),$[25]=spaceProp,$[26]=t10):t10=$[26];const space=t10,$hasClearButton=!!clearButton,$hasIcon=!!IconComponent,$hasIconRight=!!IconRightComponent,$hasSuffix=!!suffix,$hasPrefix=!!prefix;let t11;$[27]===Symbol.for("react.memo_cache_sentinel")?(t11=()=>ref.current,$[27]=t11):t11=$[27],useImperativeHandle(forwardedRef,t11),useCustomValidity(ref,customValidity);const handleClearMouseDown=_temp$2$1;let t12;$[28]!==onClear?(t12=event_0=>{var _ref$current2;event_0.preventDefault(),event_0.stopPropagation(),onClear&&onClear(),(_ref$current2=ref.current)===null||_ref$current2===void 0?void 0:_ref$current2.focus();},$[28]=onClear,$[29]=t12):t12=$[29];const handleClearClick=t12;let t13;$[30]!==prefix||$[31]!==radius?(t13=prefix&&/* @__PURE__ */jsx(Prefix,{borderTop:!0,borderLeft:!0,borderBottom:!0,radius,sizing:"border",tone:"inherit",children:/* @__PURE__ */jsx("span",{children:prefix})}),$[30]=prefix,$[31]=radius,$[32]=t13):t13=$[32];const prefixNode=t13,t14=border2?"":void 0;let t15;$[33]!==IconComponent||$[34]!==fontSize2||$[35]!==padding?(t15=IconComponent&&/* @__PURE__ */jsx(LeftBox,{padding,children:/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconComponent)&&IconComponent,reactIsExports.isValidElementType(IconComponent)&&/* @__PURE__ */jsx(IconComponent,{})]})}),$[33]=IconComponent,$[34]=fontSize2,$[35]=padding,$[36]=t15):t15=$[36];let t16;$[37]!==$hasClearButton||$[38]!==IconRightComponent||$[39]!==fontSize2||$[40]!==padding?(t16=!$hasClearButton&&IconRightComponent&&/* @__PURE__ */jsx(RightBox,{padding,children:/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconRightComponent)&&IconRightComponent,reactIsExports.isValidElementType(IconRightComponent)&&/* @__PURE__ */jsx(IconRightComponent,{})]})}),$[37]=$hasClearButton,$[38]=IconRightComponent,$[39]=fontSize2,$[40]=padding,$[41]=t16):t16=$[41];let t17;$[42]!==$hasPrefix||$[43]!==$hasSuffix||$[44]!==__unstable_disableFocusRing||$[45]!==radius||$[46]!==rootTheme.scheme||$[47]!==rootTheme.tone||$[48]!==t14||$[49]!==t15||$[50]!==t16?(t17=/* @__PURE__ */jsxs(Presentation,{$hasPrefix,$unstableDisableFocusRing:__unstable_disableFocusRing,$hasSuffix,$radius:radius,$scheme:rootTheme.scheme,$tone:rootTheme.tone,"data-border":t14,"data-scheme":rootTheme.scheme,"data-tone":rootTheme.tone,children:[t15,t16]}),$[42]=$hasPrefix,$[43]=$hasSuffix,$[44]=__unstable_disableFocusRing,$[45]=radius,$[46]=rootTheme.scheme,$[47]=rootTheme.tone,$[48]=t14,$[49]=t15,$[50]=t16,$[51]=t17):t17=$[51];const presentationNode=t17;let t18;$[52]!==padding?(t18=padding.map(_temp2),$[52]=padding,$[53]=t18):t18=$[53];const clearButtonBoxPadding=t18;let t19;$[54]!==padding?(t19=padding.map(_temp3),$[54]=padding,$[55]=t19):t19=$[55];const clearButtonPadding=t19,clearButtonProps=typeof clearButton=="object"?clearButton:EMPTY_RECORD;let t20;$[56]!==clearButton||$[57]!==clearButtonBoxPadding||$[58]!==clearButtonPadding||$[59]!==clearButtonProps||$[60]!==customValidity||$[61]!==disabled||$[62]!==fontSize2||$[63]!==handleClearClick||$[64]!==radius||$[65]!==readOnly?(t20=!disabled&&!readOnly&&clearButton&&/* @__PURE__ */jsx(RightCard,{forwardedAs:"span",padding:clearButtonBoxPadding,style:CLEAR_BUTTON_BOX_STYLE,tone:customValidity?"critical":"inherit",children:/* @__PURE__ */jsx(TextInputClearButton,_objectSpread(_objectSpread({"aria-label":"Clear","data-qa":"clear-button",fontSize:fontSize2,icon:CloseIcon,mode:"bleed",padding:clearButtonPadding,radius},clearButtonProps),{},{onClick:handleClearClick,onMouseDown:handleClearMouseDown}))}),$[56]=clearButton,$[57]=clearButtonBoxPadding,$[58]=clearButtonPadding,$[59]=clearButtonProps,$[60]=customValidity,$[61]=disabled,$[62]=fontSize2,$[63]=handleClearClick,$[64]=radius,$[65]=readOnly,$[66]=t20):t20=$[66];const clearButtonNode=t20;let t21;$[67]!==radius||$[68]!==suffix?(t21=suffix&&/* @__PURE__ */jsx(Suffix,{borderTop:!0,borderRight:!0,borderBottom:!0,radius,sizing:"border",tone:"inherit",children:/* @__PURE__ */jsx("span",{children:suffix})}),$[67]=radius,$[68]=suffix,$[69]=t21):t21=$[69];const suffixNode=t21,t22=$hasIconRight||$hasClearButton;let t23;$[70]!==$hasIcon||$[71]!==disabled||$[72]!==fontSize2||$[73]!==padding||$[74]!==readOnly||$[75]!==restProps||$[76]!==rootTheme.scheme||$[77]!==rootTheme.tone||$[78]!==space||$[79]!==t22||$[80]!==type||$[81]!==weight?(t23=/* @__PURE__ */jsx(Input,_objectSpread(_objectSpread({"data-as":"input","data-scheme":rootTheme.scheme,"data-tone":rootTheme.tone},restProps),{},{$fontSize:fontSize2,$iconLeft:$hasIcon,$iconRight:t22,$padding:padding,$scheme:rootTheme.scheme,$space:space,$tone:rootTheme.tone,$weight:weight,disabled,readOnly,ref,type})),$[70]=$hasIcon,$[71]=disabled,$[72]=fontSize2,$[73]=padding,$[74]=readOnly,$[75]=restProps,$[76]=rootTheme.scheme,$[77]=rootTheme.tone,$[78]=space,$[79]=t22,$[80]=type,$[81]=weight,$[82]=t23):t23=$[82];let t24;$[83]!==clearButtonNode||$[84]!==presentationNode||$[85]!==t23?(t24=/* @__PURE__ */jsxs(InputRoot,{children:[t23,presentationNode,clearButtonNode]}),$[83]=clearButtonNode,$[84]=presentationNode,$[85]=t23,$[86]=t24):t24=$[86];let t25;return $[87]!==prefixNode||$[88]!==rootTheme.tone||$[89]!==suffixNode||$[90]!==t24?(t25=/* @__PURE__ */jsxs(StyledTextInput,{"data-ui":"TextInput",tone:rootTheme.tone,children:[prefixNode,t24,suffixNode]}),$[87]=prefixNode,$[88]=rootTheme.tone,$[89]=suffixNode,$[90]=t24,$[91]=t25):t25=$[91],t25;});TextInput.displayName="ForwardRef(TextInput)";function _temp$2$1(event){event.preventDefault(),event.stopPropagation();}function _temp2(v){return v===0?0:v===1||v===2?1:v-2;}function _temp3(v_0){return v_0===0||v_0===1?0:v_0===2?1:v_0-1;}function useDelayedState(initialState){const $=dist.c(3),[state,setState]=useState(initialState),delayedAction=useRef$1(void 0);let t0;$[0]===Symbol.for("react.memo_cache_sentinel")?(t0=(nextState,delay)=>{const action=()=>{setState(nextState);};if(delayedAction.current&&(clearTimeout(delayedAction.current),delayedAction.current=void 0),!delay)return action();delayedAction.current=setTimeout(action,delay);},$[0]=t0):t0=$[0];const onStateChange=t0;let t1;return $[1]!==state?(t1=[state,onStateChange],$[1]=state,$[2]=t1):t1=$[2],t1;}const DEFAULT_TOOLTIP_ARROW_WIDTH=15,DEFAULT_TOOLTIP_ARROW_HEIGHT=6,DEFAULT_TOOLTIP_ARROW_RADIUS=2,DEFAULT_TOOLTIP_DISTANCE=4,DEFAULT_TOOLTIP_PADDING=4,DEFAULT_FALLBACK_PLACEMENTS={top:["top-end","top-start","bottom","left","right"],"top-start":["top","top-end","bottom-start","left-start","right-start"],"top-end":["top","top-start","bottom-end","left-end","right-end"],bottom:["bottom-end","bottom-start","top","left","right"],"bottom-start":["bottom","bottom-end","top-start","left-start","right-start"],"bottom-end":["bottom","bottom-start","top-end","left-end","right-end"],left:["left-end","left-start","right","top","bottom"],"left-start":["left","left-end","right-start","top-start","bottom-start"],"left-end":["left","left-start","right-end","top-end","bottom-end"],right:["right-end","right-start","left","top","bottom"],"right-start":["right","right-end","left-start","top-start","bottom-start"],"right-end":["right","right-start","left-end","top-end","bottom-end"]},MotionCard=styled(motion.create(Card)).withConfig({displayName:"MotionCard",componentId:"sc-1xn138w-0"})(_templateObject54||(_templateObject54=_taggedTemplateLiteral(["will-change:transform;"]))),TooltipCard=forwardRef(function(props,ref){var _props27;const $=dist.c(48);let animate,arrow2,arrowRef,arrowX,arrowY,children,originX,originY,padding,placement,radius,restProps,scheme,shadow,style;$[0]!==props?(_props27=props,{animate,arrow:arrow2,arrowRef,arrowX,arrowY,children,originX,originY,padding,placement,radius,scheme,shadow,style}=_props27,restProps=_objectWithoutProperties(_props27,_excluded45),_props27,$[0]=props,$[1]=animate,$[2]=arrow2,$[3]=arrowRef,$[4]=arrowX,$[5]=arrowY,$[6]=children,$[7]=originX,$[8]=originY,$[9]=padding,$[10]=placement,$[11]=radius,$[12]=restProps,$[13]=scheme,$[14]=shadow,$[15]=style):(animate=$[1],arrow2=$[2],arrowRef=$[3],arrowX=$[4],arrowY=$[5],children=$[6],originX=$[7],originY=$[8],padding=$[9],placement=$[10],radius=$[11],restProps=$[12],scheme=$[13],shadow=$[14],style=$[15]);const t0=animate?"transform":void 0;let t1;$[16]!==originX||$[17]!==originY||$[18]!==style||$[19]!==t0?(t1=_objectSpread({originX,originY,willChange:t0},style),$[16]=originX,$[17]=originY,$[18]=style,$[19]=t0,$[20]=t1):t1=$[20];const rootStyle2=t1,t2=arrowX!==null?arrowX:void 0,t3=arrowY!==null?arrowY:void 0;let t4;$[21]!==t2||$[22]!==t3?(t4={left:t2,top:t3,right:void 0,bottom:void 0},$[21]=t2,$[22]=t3,$[23]=t4):t4=$[23];const arrowStyle=t4,t5=restProps;let t6;$[24]!==animate?(t6=animate?["hidden","initial"]:void 0,$[24]=animate,$[25]=t6):t6=$[25];let t7;$[26]!==animate?(t7=animate?["visible","scaleIn"]:void 0,$[26]=animate,$[27]=t7):t7=$[27];let t8;$[28]!==animate?(t8=animate?["hidden","scaleOut"]:void 0,$[28]=animate,$[29]=t8):t8=$[29];let t9;$[30]!==arrow2||$[31]!==arrowRef||$[32]!==arrowStyle?(t9=arrow2&&/* @__PURE__ */jsx(Arrow,{ref:arrowRef,style:arrowStyle,width:DEFAULT_TOOLTIP_ARROW_WIDTH,height:DEFAULT_TOOLTIP_ARROW_HEIGHT,radius:DEFAULT_TOOLTIP_ARROW_RADIUS}),$[30]=arrow2,$[31]=arrowRef,$[32]=arrowStyle,$[33]=t9):t9=$[33];let t10;return $[34]!==children||$[35]!==padding||$[36]!==placement||$[37]!==radius||$[38]!==ref||$[39]!==rootStyle2||$[40]!==scheme||$[41]!==shadow||$[42]!==t5||$[43]!==t6||$[44]!==t7||$[45]!==t8||$[46]!==t9?(t10=/* @__PURE__ */jsxs(MotionCard,_objectSpread(_objectSpread({"data-ui":"Tooltip__card"},t5),{},{"data-placement":placement,padding,radius,ref,scheme,shadow,style:rootStyle2,variants:POPOVER_MOTION_PROPS.card,transition:POPOVER_MOTION_PROPS.transition,initial:t6,animate:t7,exit:t8,children:[children,t9]})),$[34]=children,$[35]=padding,$[36]=placement,$[37]=radius,$[38]=ref,$[39]=rootStyle2,$[40]=scheme,$[41]=shadow,$[42]=t5,$[43]=t6,$[44]=t7,$[45]=t8,$[46]=t9,$[47]=t10):t10=$[47],t10;});TooltipCard.displayName="ForwardRef(TooltipCard)";const TooltipDelayGroupContext=createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup",null);function useTooltipDelayGroup(){return useContext(TooltipDelayGroupContext);}const StyledTooltip=styled(Layer).withConfig({displayName:"StyledTooltip",componentId:"sc-13f2zvh-0"})(_templateObject55||(_templateObject55=_taggedTemplateLiteral(["pointer-events:none;"]))),Tooltip=forwardRef(function(props,forwardedRef){var _props28,_props$placement2,_portal$elements2,_middlewareData$arrow4,_middlewareData$arrow5,_middlewareData$Sani3,_middlewareData$Sani4,_delay2,_delay3,_childProp,_childProp3,_childProp4,_childProp6,_childProp7,_childProp9,_childProp0,_childProp10,_childProp11,_childProp13,_childProp14,_childProp16;const $=dist.c(137),boundaryElementContext=useBoundaryElement(),{layer}=useTheme_v2();let _boundaryElement,_fallbackPlacementsProp,_zOffset,childProp,content,delay,disabled,portalProp,restProps,scheme,t0,t1,t2,t3,t4,t5;$[0]!==props?(_props28=props,{animate:t0,arrow:t1,boundaryElement:_boundaryElement,children:childProp,content,disabled,fallbackPlacements:_fallbackPlacementsProp,padding:t2,placement:t3,portal:portalProp,radius:t4,scheme,shadow:t5,zOffset:_zOffset,delay}=_props28,restProps=_objectWithoutProperties(_props28,_excluded46),_props28,$[0]=props,$[1]=_boundaryElement,$[2]=_fallbackPlacementsProp,$[3]=_zOffset,$[4]=childProp,$[5]=content,$[6]=delay,$[7]=disabled,$[8]=portalProp,$[9]=restProps,$[10]=scheme,$[11]=t0,$[12]=t1,$[13]=t2,$[14]=t3,$[15]=t4,$[16]=t5):(_boundaryElement=$[1],_fallbackPlacementsProp=$[2],_zOffset=$[3],childProp=$[4],content=$[5],delay=$[6],disabled=$[7],portalProp=$[8],restProps=$[9],scheme=$[10],t0=$[11],t1=$[12],t2=$[13],t3=$[14],t4=$[15],t5=$[16]);const _animate=t0===void 0?!1:t0,arrowProp=t1===void 0?!1:t1,padding=t2===void 0?2:t2,placementProp=t3===void 0?"bottom":t3,radius=t4===void 0?2:t4,shadow=t5===void 0?2:t5,boundaryElement=_boundaryElement!==null&&_boundaryElement!==void 0?_boundaryElement:boundaryElementContext===null||boundaryElementContext===void 0?void 0:boundaryElementContext.element,fallbackPlacementsProp=_fallbackPlacementsProp!==null&&_fallbackPlacementsProp!==void 0?_fallbackPlacementsProp:DEFAULT_FALLBACK_PLACEMENTS[(_props$placement2=props.placement)!==null&&_props$placement2!==void 0?_props$placement2:"bottom"],zOffset=_zOffset!==null&&_zOffset!==void 0?_zOffset:layer.tooltip.zOffset,animate=usePrefersReducedMotion()?!1:_animate;let t6;$[17]!==fallbackPlacementsProp?(t6=_getArrayProp(fallbackPlacementsProp),$[17]=fallbackPlacementsProp,$[18]=t6):t6=$[18];const fallbackPlacements=t6,ref=useRef$1(null),[referenceElement,setReferenceElement]=useState(null),arrowRef=useRef$1(null),[tooltipMaxWidth,setTooltipMaxWidth]=useState(0);let t7;$[19]===Symbol.for("react.memo_cache_sentinel")?(t7=()=>ref.current,$[19]=t7):t7=$[19],useImperativeHandle(forwardedRef,t7);const portal=usePortal(),portalElement=typeof portalProp=="string"?((_portal$elements2=portal.elements)===null||_portal$elements2===void 0?void 0:_portal$elements2[portalProp])||null:portal.element;let t8;$[20]!==animate||$[21]!==arrowProp||$[22]!==boundaryElement||$[23]!==fallbackPlacements?(t8={animate,arrowProp,arrowRef,boundaryElement,fallbackPlacements,rootBoundary:"viewport"},$[20]=animate,$[21]=arrowProp,$[22]=boundaryElement,$[23]=fallbackPlacements,$[24]=t8):t8=$[24];const middleware=useMiddleware(t8);let t9;$[25]!==referenceElement?(t9={reference:referenceElement},$[25]=referenceElement,$[26]=t9):t9=$[26];let t10;$[27]!==middleware||$[28]!==placementProp||$[29]!==t9?(t10={middleware,placement:placementProp,whileElementsMounted:autoUpdate,elements:t9},$[27]=middleware,$[28]=placementProp,$[29]=t9,$[30]=t10):t10=$[30];const{floatingStyles,placement,middlewareData,refs,update}=useFloating(t10),arrowX=(_middlewareData$arrow4=middlewareData.arrow)===null||_middlewareData$arrow4===void 0?void 0:_middlewareData$arrow4.x,arrowY=(_middlewareData$arrow5=middlewareData.arrow)===null||_middlewareData$arrow5===void 0?void 0:_middlewareData$arrow5.y,originX=(_middlewareData$Sani3=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani3===void 0?void 0:_middlewareData$Sani3.originX,originY=(_middlewareData$Sani4=middlewareData["@sanity/ui/origin"])===null||_middlewareData$Sani4===void 0?void 0:_middlewareData$Sani4.originY,tooltipId=useId(),[isOpen,setIsOpen]=useDelayedState(!1),delayGroupContext=useTooltipDelayGroup();let t11;$[31]!==delayGroupContext?(t11=delayGroupContext||{},$[31]=delayGroupContext,$[32]=t11):t11=$[32];const{setIsGroupActive,setOpenTooltipId}=t11,showTooltip=isOpen||(delayGroupContext===null||delayGroupContext===void 0?void 0:delayGroupContext.openTooltipId)===tooltipId,isInsideGroup=delayGroupContext!==null,openDelayProp=typeof delay=="number"?delay:((_delay2=delay)===null||_delay2===void 0?void 0:_delay2.open)||0,closeDelayProp=typeof delay=="number"?delay:((_delay3=delay)===null||_delay3===void 0?void 0:_delay3.close)||0,openDelay=isInsideGroup?delayGroupContext.openDelay:openDelayProp,closeDelay=isInsideGroup?delayGroupContext.closeDelay:closeDelayProp;let t12;$[33]!==closeDelay||$[34]!==isInsideGroup||$[35]!==openDelay||$[36]!==setIsGroupActive||$[37]!==setIsOpen||$[38]!==setOpenTooltipId||$[39]!==tooltipId?(t12=(open,immediate)=>{if(isInsideGroup){if(open){const groupedOpenDelay=immediate?0:openDelay;setIsGroupActive!==null&&setIsGroupActive!==void 0&&setIsGroupActive(open,groupedOpenDelay),setOpenTooltipId===null||setOpenTooltipId===void 0?void 0:setOpenTooltipId(tooltipId,groupedOpenDelay);}else{const groupDeactivateDelay=closeDelay>200?closeDelay:200;setIsGroupActive!==null&&setIsGroupActive!==void 0&&setIsGroupActive(open,groupDeactivateDelay),setOpenTooltipId===null||setOpenTooltipId===void 0?void 0:setOpenTooltipId(null,immediate?0:closeDelay);}}else setIsOpen(open,immediate?0:open?openDelay:closeDelay);},$[33]=closeDelay,$[34]=isInsideGroup,$[35]=openDelay,$[36]=setIsGroupActive,$[37]=setIsOpen,$[38]=setOpenTooltipId,$[39]=tooltipId,$[40]=t12):t12=$[40];const handleIsOpenChange=t12;let t13;$[41]!==((_childProp=childProp)===null||_childProp===void 0?void 0:_childProp.props)||$[42]!==handleIsOpenChange?(t13=e=>{var _childProp2,_childProp2$onBlur;handleIsOpenChange(!1),(_childProp2=childProp)===null||_childProp2===void 0||(_childProp2=_childProp2.props)===null||_childProp2===void 0||(_childProp2$onBlur=_childProp2.onBlur)===null||_childProp2$onBlur===void 0?void 0:_childProp2$onBlur.call(_childProp2,e);},$[41]=(_childProp3=childProp)===null||_childProp3===void 0?void 0:_childProp3.props,$[42]=handleIsOpenChange,$[43]=t13):t13=$[43];const handleBlur=t13;let t14;$[44]!==((_childProp4=childProp)===null||_childProp4===void 0?void 0:_childProp4.props)||$[45]!==handleIsOpenChange?(t14=e_0=>{var _childProp5,_childProp5$props$onC,_childProp5$props;handleIsOpenChange(!1,!0),(_childProp5=childProp)===null||_childProp5===void 0||(_childProp5$props$onC=(_childProp5$props=_childProp5.props).onClick)===null||_childProp5$props$onC===void 0?void 0:_childProp5$props$onC.call(_childProp5$props,e_0);},$[44]=(_childProp6=childProp)===null||_childProp6===void 0?void 0:_childProp6.props,$[45]=handleIsOpenChange,$[46]=t14):t14=$[46];const handleClick=t14;let t15;$[47]!==((_childProp7=childProp)===null||_childProp7===void 0?void 0:_childProp7.props)||$[48]!==handleIsOpenChange?(t15=e_1=>{var _childProp8,_childProp8$props$onC,_childProp8$props;handleIsOpenChange(!1,!0),(_childProp8=childProp)===null||_childProp8===void 0||(_childProp8$props$onC=(_childProp8$props=_childProp8.props).onContextMenu)===null||_childProp8$props$onC===void 0?void 0:_childProp8$props$onC.call(_childProp8$props,e_1);},$[47]=(_childProp9=childProp)===null||_childProp9===void 0?void 0:_childProp9.props,$[48]=handleIsOpenChange,$[49]=t15):t15=$[49];const handleContextMenu=t15;let t16;$[50]!==((_childProp0=childProp)===null||_childProp0===void 0?void 0:_childProp0.props)||$[51]!==handleIsOpenChange?(t16=e_2=>{var _childProp1,_childProp1$onFocus;handleIsOpenChange(!0),(_childProp1=childProp)===null||_childProp1===void 0||(_childProp1=_childProp1.props)===null||_childProp1===void 0||(_childProp1$onFocus=_childProp1.onFocus)===null||_childProp1$onFocus===void 0?void 0:_childProp1$onFocus.call(_childProp1,e_2);},$[50]=(_childProp10=childProp)===null||_childProp10===void 0?void 0:_childProp10.props,$[51]=handleIsOpenChange,$[52]=t16):t16=$[52];const handleFocus=t16;let t17;$[53]!==((_childProp11=childProp)===null||_childProp11===void 0?void 0:_childProp11.props)||$[54]!==handleIsOpenChange?(t17=e_3=>{var _childProp12,_childProp12$onMouseE;handleIsOpenChange(!0),(_childProp12=childProp)===null||_childProp12===void 0||(_childProp12=_childProp12.props)===null||_childProp12===void 0||(_childProp12$onMouseE=_childProp12.onMouseEnter)===null||_childProp12$onMouseE===void 0?void 0:_childProp12$onMouseE.call(_childProp12,e_3);},$[53]=(_childProp13=childProp)===null||_childProp13===void 0?void 0:_childProp13.props,$[54]=handleIsOpenChange,$[55]=t17):t17=$[55];const handleMouseEnter=t17;let t18;$[56]!==((_childProp14=childProp)===null||_childProp14===void 0?void 0:_childProp14.props)||$[57]!==handleIsOpenChange?(t18=e_4=>{var _childProp15,_childProp15$onMouseL;handleIsOpenChange(!1),(_childProp15=childProp)===null||_childProp15===void 0||(_childProp15=_childProp15.props)===null||_childProp15===void 0||(_childProp15$onMouseL=_childProp15.onMouseLeave)===null||_childProp15$onMouseL===void 0?void 0:_childProp15$onMouseL.call(_childProp15,e_4);},$[56]=(_childProp16=childProp)===null||_childProp16===void 0?void 0:_childProp16.props,$[57]=handleIsOpenChange,$[58]=t18):t18=$[58];const handleMouseLeave=t18;let t19;$[59]!==handleIsOpenChange||$[60]!==isInsideGroup||$[61]!==referenceElement||$[62]!==showTooltip?(t19={handleIsOpenChange,referenceElement,showTooltip,isInsideGroup},$[59]=handleIsOpenChange,$[60]=isInsideGroup,$[61]=referenceElement,$[62]=showTooltip,$[63]=t19):t19=$[63],useCloseOnMouseLeave(t19);let t20,t21;$[64]!==disabled||$[65]!==handleIsOpenChange||$[66]!==showTooltip?(t20=()=>{disabled&&showTooltip&&handleIsOpenChange(!1);},t21=[disabled,handleIsOpenChange,showTooltip],$[64]=disabled,$[65]=handleIsOpenChange,$[66]=showTooltip,$[67]=t20,$[68]=t21):(t20=$[67],t21=$[68]),useEffect$1(t20,t21);let t22,t23;$[69]!==content||$[70]!==handleIsOpenChange||$[71]!==showTooltip?(t22=()=>{!content&&showTooltip&&handleIsOpenChange(!1);},t23=[content,handleIsOpenChange,showTooltip],$[69]=content,$[70]=handleIsOpenChange,$[71]=showTooltip,$[72]=t22,$[73]=t23):(t22=$[72],t23=$[73]),useEffect$1(t22,t23);let t24,t25;$[74]!==handleIsOpenChange||$[75]!==showTooltip?(t24=()=>{if(!showTooltip)return;const handleWindowKeyDown=function(event){event.key==="Escape"&&handleIsOpenChange(!1,!0);};return window.addEventListener("keydown",handleWindowKeyDown),()=>{window.removeEventListener("keydown",handleWindowKeyDown);};},t25=[handleIsOpenChange,showTooltip],$[74]=handleIsOpenChange,$[75]=showTooltip,$[76]=t24,$[77]=t25):(t24=$[76],t25=$[77]),useEffect$1(t24,t25);let t26;$[78]!==boundaryElement||$[79]!==(portalElement===null||portalElement===void 0?void 0:portalElement.offsetWidth)?(t26=()=>{const availableWidths=[...(boundaryElement?[boundaryElement.offsetWidth]:[]),(portalElement===null||portalElement===void 0?void 0:portalElement.offsetWidth)||document.body.offsetWidth];setTooltipMaxWidth(Math.min(...availableWidths)-DEFAULT_TOOLTIP_PADDING*2);},$[78]=boundaryElement,$[79]=portalElement===null||portalElement===void 0?void 0:portalElement.offsetWidth,$[80]=t26):t26=$[80];let t27;$[81]!==boundaryElement||$[82]!==portalElement?(t27=[boundaryElement,portalElement],$[81]=boundaryElement,$[82]=portalElement,$[83]=t27):t27=$[83],useLayoutEffect(t26,t27);let t28;$[84]!==update?(t28=arrowEl=>{arrowRef.current=arrowEl,update();},$[84]=update,$[85]=t28):t28=$[85];const setArrow=t28;let t29;$[86]!==refs?(t29=node=>{ref.current=node,refs.setFloating(node);},$[86]=refs,$[87]=t29):t29=$[87];const setFloating=t29;let t30;bb0:{if(!childProp){t30=null;break bb0;}let t312;$[88]!==childProp||$[89]!==handleBlur||$[90]!==handleClick||$[91]!==handleContextMenu||$[92]!==handleFocus||$[93]!==handleMouseEnter||$[94]!==handleMouseLeave?(t312=cloneElement(childProp,{onBlur:handleBlur,onFocus:handleFocus,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,onContextMenu:handleContextMenu,ref:setReferenceElement}),$[88]=childProp,$[89]=handleBlur,$[90]=handleClick,$[91]=handleContextMenu,$[92]=handleFocus,$[93]=handleMouseEnter,$[94]=handleMouseLeave,$[95]=t312):t312=$[95],t30=t312;}const child=t30;let t31;$[96]!==childProp?(t31=childProp?getElementRef(childProp):null,$[96]=childProp,$[97]=t31):t31=$[97];let t32,t33;if($[98]!==referenceElement?(t32=()=>referenceElement,t33=[referenceElement],$[98]=referenceElement,$[99]=t32,$[100]=t33):(t32=$[99],t33=$[100]),useImperativeHandle(t31,t32,t33),!child){let t342;return $[101]===Symbol.for("react.memo_cache_sentinel")?(t342=/* @__PURE__ */jsx(Fragment,{}),$[101]=t342):t342=$[101],t342;}if(disabled)return child;const t34=tooltipMaxWidth>0?"".concat(tooltipMaxWidth,"px"):void 0;let t35;$[102]!==floatingStyles||$[103]!==t34?(t35=_objectSpread(_objectSpread({},floatingStyles),{},{maxWidth:t34}),$[102]=floatingStyles,$[103]=t34,$[104]=t35):t35=$[104];let t36;$[105]!==animate||$[106]!==arrowProp||$[107]!==arrowX||$[108]!==arrowY||$[109]!==content||$[110]!==originX||$[111]!==originY||$[112]!==padding||$[113]!==placement||$[114]!==radius||$[115]!==restProps||$[116]!==scheme||$[117]!==setArrow||$[118]!==setFloating||$[119]!==shadow?(t36=/* @__PURE__ */jsx(TooltipCard,_objectSpread(_objectSpread({},restProps),{},{animate,arrow:arrowProp,arrowRef:setArrow,arrowX,arrowY,originX,originY,padding,placement,radius,ref:setFloating,scheme,shadow,children:content})),$[105]=animate,$[106]=arrowProp,$[107]=arrowX,$[108]=arrowY,$[109]=content,$[110]=originX,$[111]=originY,$[112]=padding,$[113]=placement,$[114]=radius,$[115]=restProps,$[116]=scheme,$[117]=setArrow,$[118]=setFloating,$[119]=shadow,$[120]=t36):t36=$[120];let t37;$[121]!==restProps||$[122]!==setFloating||$[123]!==t35||$[124]!==t36||$[125]!==zOffset?(t37=/* @__PURE__ */jsx(StyledTooltip,_objectSpread(_objectSpread({"data-ui":"Tooltip"},restProps),{},{ref:setFloating,style:t35,zOffset,children:t36})),$[121]=restProps,$[122]=setFloating,$[123]=t35,$[124]=t36,$[125]=zOffset,$[126]=t37):t37=$[126];const tooltip=t37;let t38;$[127]!==portalProp||$[128]!==showTooltip||$[129]!==tooltip?(t38=showTooltip&&(portalProp?/* @__PURE__ */jsx(Portal,{__unstable_name:typeof portalProp=="string"?portalProp:void 0,children:tooltip}):tooltip),$[127]=portalProp,$[128]=showTooltip,$[129]=tooltip,$[130]=t38):t38=$[130];const children=t38;let t39;$[131]!==animate||$[132]!==children?(t39=animate?/* @__PURE__ */jsx(AnimatePresence,{children}):children,$[131]=animate,$[132]=children,$[133]=t39):t39=$[133];let t40;return $[134]!==child||$[135]!==t39?(t40=/* @__PURE__ */jsxs(Fragment,{children:[t39,child]}),$[134]=child,$[135]=t39,$[136]=t40):t40=$[136],t40;});Tooltip.displayName="ForwardRef(Tooltip)";function useMiddleware(t0){const $=dist.c(17),{animate,arrowProp,arrowRef,boundaryElement,fallbackPlacements,rootBoundary}=t0;let ret;if($[0]!==animate||$[1]!==arrowProp||$[2]!==arrowRef||$[3]!==boundaryElement||$[4]!==fallbackPlacements||$[5]!==rootBoundary){ret=[];const t1=boundaryElement||void 0;let t2;$[7]!==fallbackPlacements||$[8]!==rootBoundary||$[9]!==t1?(t2=flip({boundary:t1,fallbackPlacements,padding:DEFAULT_TOOLTIP_PADDING,rootBoundary}),$[7]=fallbackPlacements,$[8]=rootBoundary,$[9]=t1,$[10]=t2):t2=$[10],ret.push(t2);let t3;$[11]===Symbol.for("react.memo_cache_sentinel")?(t3=offset({mainAxis:DEFAULT_TOOLTIP_DISTANCE}),$[11]=t3):t3=$[11],ret.push(t3);const t4=boundaryElement||void 0;let t5;if($[12]!==rootBoundary||$[13]!==t4?(t5=shift({boundary:t4,rootBoundary,padding:DEFAULT_TOOLTIP_PADDING}),$[12]=rootBoundary,$[13]=t4,$[14]=t5):t5=$[14],ret.push(t5),arrowProp){let t6;$[15]!==arrowRef?(t6=arrow({element:arrowRef,padding:DEFAULT_TOOLTIP_PADDING}),$[15]=arrowRef,$[16]=t6):t6=$[16],ret.push(t6);}animate&&ret.push(origin),$[0]=animate,$[1]=arrowProp,$[2]=arrowRef,$[3]=boundaryElement,$[4]=fallbackPlacements,$[5]=rootBoundary,$[6]=ret;}else ret=$[6];return ret;}function useCloseOnMouseLeave(t0){const $=dist.c(10),{handleIsOpenChange,referenceElement,showTooltip,isInsideGroup}=t0;let t1;$[0]!==handleIsOpenChange||$[1]!==referenceElement?(t1=(target,teardown)=>{referenceElement&&(referenceElement===target||target instanceof Node&&referenceElement.contains(target)||(handleIsOpenChange(!1),teardown()));},$[0]=handleIsOpenChange,$[1]=referenceElement,$[2]=t1):t1=$[2];const onMouseMove=useEffectEvent(t1);let t2;$[3]!==isInsideGroup||$[4]!==onMouseMove||$[5]!==showTooltip?(t2=()=>{if(!showTooltip||isInsideGroup)return;const handleMouseMove=event=>{onMouseMove(event.target,()=>window.removeEventListener("mousemove",handleMouseMove));};return window.addEventListener("mousemove",handleMouseMove),()=>window.removeEventListener("mousemove",handleMouseMove);},$[3]=isInsideGroup,$[4]=onMouseMove,$[5]=showTooltip,$[6]=t2):t2=$[6];let t3;$[7]!==isInsideGroup||$[8]!==showTooltip?(t3=[isInsideGroup,showTooltip],$[7]=isInsideGroup,$[8]=showTooltip,$[9]=t3):t3=$[9],useEffect$1(t2,t3);}const StyledHotkeys=styled.kbd.withConfig({displayName:"StyledHotkeys",componentId:"sc-b37mge-0"})(_templateObject56||(_templateObject56=_taggedTemplateLiteral(["font:inherit;padding:1px;&:not([hidden]){display:block;}"]))),Key=styled(KBD).withConfig({displayName:"Key",componentId:"sc-b37mge-1"})(_templateObject57||(_templateObject57=_taggedTemplateLiteral(["&:not([hidden]){display:block;}"]))),Hotkeys=forwardRef(function(props,ref){var _props29;const $=dist.c(26);let fontSize2,keys,padding,radius,restProps,t0;$[0]!==props?(_props29=props,{fontSize:fontSize2,keys,padding,radius,space:t0}=_props29,restProps=_objectWithoutProperties(_props29,_excluded47),_props29,$[0]=props,$[1]=fontSize2,$[2]=keys,$[3]=padding,$[4]=radius,$[5]=restProps,$[6]=t0):(fontSize2=$[1],keys=$[2],padding=$[3],radius=$[4],restProps=$[5],t0=$[6]);const spaceProp=t0===void 0?0.5:t0;let t1;$[7]!==spaceProp?(t1=_getArrayProp(spaceProp),$[7]=spaceProp,$[8]=t1):t1=$[8];const space=t1;if(!keys||keys.length===0){let t22;return $[9]===Symbol.for("react.memo_cache_sentinel")?(t22=/* @__PURE__ */jsx(Fragment,{}),$[9]=t22):t22=$[9],t22;}let t2;if($[10]!==fontSize2||$[11]!==keys||$[12]!==padding||$[13]!==radius){let t32;$[15]!==fontSize2||$[16]!==padding||$[17]!==radius?(t32=(key2,i)=>/* @__PURE__ */jsx(Key,{fontSize:fontSize2,padding,radius,children:key2},i),$[15]=fontSize2,$[16]=padding,$[17]=radius,$[18]=t32):t32=$[18],t2=keys.map(t32),$[10]=fontSize2,$[11]=keys,$[12]=padding,$[13]=radius,$[14]=t2;}else t2=$[14];let t3;$[19]!==space||$[20]!==t2?(t3=/* @__PURE__ */jsx(Inline,{as:"span",space,children:t2}),$[19]=space,$[20]=t2,$[21]=t3):t3=$[21];let t4;return $[22]!==ref||$[23]!==restProps||$[24]!==t3?(t4=/* @__PURE__ */jsx(StyledHotkeys,_objectSpread(_objectSpread({"data-ui":"Hotkeys"},restProps),{},{ref,children:t3})),$[22]=ref,$[23]=restProps,$[24]=t3,$[25]=t4):t4=$[25],t4;});Hotkeys.displayName="ForwardRef(Hotkeys)";const MenuContext=createGlobalScopedContext("@sanity/ui/context/menu",null);function _isFocusable(element){return isHTMLAnchorElement(element)&&element.getAttribute("data-disabled")!=="true"||isHTMLButtonElement(element)&&!element.disabled;}function _getFocusableElements(elements){return elements.filter(_isFocusable);}function _getDOMPath(rootElement,el){const path=[];let e=el;for(;e!==rootElement;){const parentElement=e.parentElement;if(!parentElement)return path;const index=Array.from(parentElement.childNodes).indexOf(e);if(path.unshift(index),parentElement===rootElement)return path;e=parentElement;}return path;}const EMPTY_PATH=[];function _sortElements(rootElement,elements){if(!rootElement)return;const map=/* @__PURE__ */new WeakMap();for(const el of elements)map.set(el,_getDOMPath(rootElement,el));const _sort=(a,b)=>{const _a=map.get(a)||EMPTY_PATH,_b=map.get(b)||EMPTY_PATH,len=Math.max(_a.length,_b.length);for(let i=0;i<len;i+=1){const aIndex=_a[i]||-1,bIndex=_b[i]||-1;if(aIndex!==bIndex)return aIndex-bIndex;}return 0;};elements.sort(_sort);}function useMenuController(props){const $=dist.c(21),{onKeyDown,originElement,shouldFocus,rootElementRef}=props;let t0;$[0]===Symbol.for("react.memo_cache_sentinel")?(t0=[],$[0]=t0):t0=$[0];const elementsRef=useRef$1(t0),[activeIndex,_setActiveIndex]=useState(-1),activeIndexRef=useRef$1(activeIndex),[activeElement,setActiveElement]=useState(null);let t1;$[1]===Symbol.for("react.memo_cache_sentinel")?(t1=nextActiveIndex=>{_setActiveIndex(nextActiveIndex),activeIndexRef.current=nextActiveIndex,setActiveElement(elementsRef.current[nextActiveIndex]||null);},$[1]=t1):t1=$[1];const setActiveIndex=t1;let t2;$[2]!==rootElementRef?(t2=(element,selected)=>{if(!element)return _temp$1;if(elementsRef.current.indexOf(element)===-1&&(elementsRef.current.push(element),_sortElements(rootElementRef.current,elementsRef.current)),selected){const selectedIndex=elementsRef.current.indexOf(element);setActiveIndex(selectedIndex);}return()=>{const idx=elementsRef.current.indexOf(element);idx>-1&&elementsRef.current.splice(idx,1);};},$[2]=rootElementRef,$[3]=t2):t2=$[3];const mount=t2;let t3;$[4]!==onKeyDown||$[5]!==originElement?(t3=event=>{if(event.key==="Tab"){originElement&&originElement.focus();return;}if(event.key==="Home"){event.preventDefault(),event.stopPropagation();const el=_getFocusableElements(elementsRef.current)[0];if(!el)return;const currentIndex=elementsRef.current.indexOf(el);setActiveIndex(currentIndex);return;}if(event.key==="End"){event.preventDefault(),event.stopPropagation();const focusableElements_0=_getFocusableElements(elementsRef.current),el_0=focusableElements_0[focusableElements_0.length-1];if(!el_0)return;const currentIndex_0=elementsRef.current.indexOf(el_0);setActiveIndex(currentIndex_0);return;}if(event.key==="ArrowUp"){event.preventDefault(),event.stopPropagation();const focusableElements_1=_getFocusableElements(elementsRef.current),focusableLen=focusableElements_1.length;if(focusableLen===0)return;const focusedElement=elementsRef.current[activeIndexRef.current];let focusedIndex=focusableElements_1.indexOf(focusedElement);focusedIndex=(focusedIndex-1+focusableLen)%focusableLen;const el_1=focusableElements_1[focusedIndex],currentIndex_1=elementsRef.current.indexOf(el_1);setActiveIndex(currentIndex_1);return;}if(event.key==="ArrowDown"){event.preventDefault(),event.stopPropagation();const focusableElements_2=_getFocusableElements(elementsRef.current),focusableLen_0=focusableElements_2.length;if(focusableLen_0===0)return;const focusedElement_0=elementsRef.current[activeIndexRef.current];let focusedIndex_0=focusableElements_2.indexOf(focusedElement_0);focusedIndex_0=(focusedIndex_0+1)%focusableLen_0;const el_2=focusableElements_2[focusedIndex_0],currentIndex_2=elementsRef.current.indexOf(el_2);setActiveIndex(currentIndex_2);return;}onKeyDown&&onKeyDown(event);},$[4]=onKeyDown,$[5]=originElement,$[6]=t3):t3=$[6];const handleKeyDown=t3;let t4;$[7]===Symbol.for("react.memo_cache_sentinel")?(t4=event_0=>{const element_0=event_0.currentTarget,currentIndex_3=elementsRef.current.indexOf(element_0);setActiveIndex(currentIndex_3);},$[7]=t4):t4=$[7];const handleItemMouseEnter=t4;let t5;$[8]!==rootElementRef?(t5=()=>{var _rootElementRef$curre;setActiveIndex(-2),(_rootElementRef$curre=rootElementRef.current)===null||_rootElementRef$curre===void 0?void 0:_rootElementRef$curre.focus();},$[8]=rootElementRef,$[9]=t5):t5=$[9];const handleItemMouseLeave=t5;let t6,t7;$[10]!==activeIndex||$[11]!==rootElementRef||$[12]!==shouldFocus?(t6=()=>{if(!rootElementRef.current)return;const rafId=requestAnimationFrame(()=>{var _ref72;if(activeIndex===-1){if(shouldFocus==="first"){const el_3=_getFocusableElements(elementsRef.current)[0];if(el_3){const currentIndex_4=elementsRef.current.indexOf(el_3);setActiveIndex(currentIndex_4);}}if(shouldFocus==="last"){const focusableElements_4=_getFocusableElements(elementsRef.current),el_4=focusableElements_4[focusableElements_4.length-1];if(el_4){const currentIndex_5=elementsRef.current.indexOf(el_4);setActiveIndex(currentIndex_5);}}return;}(_ref72=elementsRef.current[activeIndex]||null)===null||_ref72===void 0||_ref72.focus();});return()=>cancelAnimationFrame(rafId);},t7=[activeIndex,rootElementRef,setActiveIndex,shouldFocus],$[10]=activeIndex,$[11]=rootElementRef,$[12]=shouldFocus,$[13]=t6,$[14]=t7):(t6=$[13],t7=$[14]),useEffect$1(t6,t7);let t8;return $[15]!==activeElement||$[16]!==activeIndex||$[17]!==handleItemMouseLeave||$[18]!==handleKeyDown||$[19]!==mount?(t8={activeElement,activeIndex,handleItemMouseEnter,handleItemMouseLeave,handleKeyDown,mount},$[15]=activeElement,$[16]=activeIndex,$[17]=handleItemMouseLeave,$[18]=handleKeyDown,$[19]=mount,$[20]=t8):t8=$[20],t8;}function _temp$1(){}const StyledMenu=styled(Box).withConfig({displayName:"StyledMenu",componentId:"sc-xt0tnv-0"})(_templateObject58||(_templateObject58=_taggedTemplateLiteral(["outline:none;overflow:auto;"]))),Menu=forwardRef(function(props,forwardedRef){const $=dist.c(49);let _shouldFocus,children,onClickOutside,onEscape,onItemClick,onItemSelect,onKeyDown,originElement,registerElement,restProps,t0,t1;if($[0]!==props){const{children:t22,focusFirst,focusLast,onClickOutside:t32,onEscape:t42,onItemClick:t52,onItemSelect:t62,onKeyDown:t72,originElement:t82,padding:t92,registerElement:t102,shouldFocus:t112,space:t122}=props,t13=_objectWithoutProperties(props,_excluded48);children=t22,onClickOutside=t32,onEscape=t42,onItemClick=t52,onItemSelect=t62,onKeyDown=t72,originElement=t82,t0=t92,registerElement=t102,_shouldFocus=t112,t1=t122,restProps=t13,$[0]=props,$[1]=_shouldFocus,$[2]=children,$[3]=onClickOutside,$[4]=onEscape,$[5]=onItemClick,$[6]=onItemSelect,$[7]=onKeyDown,$[8]=originElement,$[9]=registerElement,$[10]=restProps,$[11]=t0,$[12]=t1;}else _shouldFocus=$[1],children=$[2],onClickOutside=$[3],onEscape=$[4],onItemClick=$[5],onItemSelect=$[6],onKeyDown=$[7],originElement=$[8],registerElement=$[9],restProps=$[10],t0=$[11],t1=$[12];const padding=t0===void 0?1:t0,space=t1===void 0?1:t1,shouldFocus=_shouldFocus!==null&&_shouldFocus!==void 0?_shouldFocus:props.focusFirst&&"first"||props.focusLast&&"last"||null,ref=useRef$1(null);let t2;$[13]===Symbol.for("react.memo_cache_sentinel")?(t2=()=>ref.current,$[13]=t2):t2=$[13],useImperativeHandle(forwardedRef,t2);const{isTopLayer}=useLayer();let t3;$[14]!==onKeyDown||$[15]!==originElement||$[16]!==shouldFocus?(t3={onKeyDown,originElement,shouldFocus,rootElementRef:ref},$[14]=onKeyDown,$[15]=originElement,$[16]=shouldFocus,$[17]=t3):t3=$[17];const{activeElement,activeIndex,handleItemMouseEnter,handleItemMouseLeave,handleKeyDown,mount}=useMenuController(t3),unregisterElementRef=useRef$1(null);let t4;$[18]!==registerElement?(t4=el=>{unregisterElementRef.current&&(unregisterElementRef.current(),unregisterElementRef.current=null),ref.current=el,ref.current&®isterElement&&(unregisterElementRef.current=registerElement(ref.current));},$[18]=registerElement,$[19]=t4):t4=$[19];const handleRefChange=t4;let t5,t6;$[20]!==activeIndex||$[21]!==onItemSelect?(t5=()=>{onItemSelect&&onItemSelect(activeIndex);},t6=[activeIndex,onItemSelect],$[20]=activeIndex,$[21]=onItemSelect,$[22]=t5,$[23]=t6):(t5=$[22],t6=$[23]),useEffect$1(t5,t6);let t7;$[24]===Symbol.for("react.memo_cache_sentinel")?(t7=()=>[ref.current],$[24]=t7):t7=$[24],useClickOutsideEvent(isTopLayer&&onClickOutside,t7);let t8;$[25]!==isTopLayer||$[26]!==onEscape?(t8=event=>{isTopLayer&&event.key==="Escape"&&(event.stopPropagation(),onEscape&&onEscape());},$[25]=isTopLayer,$[26]=onEscape,$[27]=t8):t8=$[27],useGlobalKeyDown(t8);let t9;$[28]!==activeElement||$[29]!==handleItemMouseEnter||$[30]!==handleItemMouseLeave||$[31]!==mount||$[32]!==onClickOutside||$[33]!==onEscape||$[34]!==onItemClick||$[35]!==registerElement?(t9={version:2,activeElement,mount,onClickOutside,onEscape,onItemClick,onItemMouseEnter:handleItemMouseEnter,onItemMouseLeave:handleItemMouseLeave,registerElement},$[28]=activeElement,$[29]=handleItemMouseEnter,$[30]=handleItemMouseLeave,$[31]=mount,$[32]=onClickOutside,$[33]=onEscape,$[34]=onItemClick,$[35]=registerElement,$[36]=t9):t9=$[36];const value=t9;let t10;$[37]!==children||$[38]!==space?(t10=/* @__PURE__ */jsx(Stack,{space,children}),$[37]=children,$[38]=space,$[39]=t10):t10=$[39];let t11;$[40]!==handleKeyDown||$[41]!==handleRefChange||$[42]!==padding||$[43]!==restProps||$[44]!==t10?(t11=/* @__PURE__ */jsx(StyledMenu,_objectSpread(_objectSpread({"data-ui":"Menu"},restProps),{},{onKeyDown:handleKeyDown,padding,ref:handleRefChange,role:"menu",tabIndex:-1,children:t10})),$[40]=handleKeyDown,$[41]=handleRefChange,$[42]=padding,$[43]=restProps,$[44]=t10,$[45]=t11):t11=$[45];let t12;return $[46]!==t11||$[47]!==value?(t12=/* @__PURE__ */jsx(MenuContext.Provider,{value,children:t11}),$[46]=t11,$[47]=value,$[48]=t12):t12=$[48],t12;});Menu.displayName="ForwardRef(Menu)";const MenuDivider=styled.hr.withConfig({displayName:"MenuDivider",componentId:"sc-uhoxwu-0"})(_templateObject59||(_templateObject59=_taggedTemplateLiteral(["height:1px;border:0;background:var(--card-hairline-soft-color);margin:0;"])));MenuDivider.displayName="MenuDivider";function selectableBaseStyle(){return css(_templateObject60||(_templateObject60=_taggedTemplateLiteral(["\n background-color: inherit;\n color: inherit;\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n text-decoration: none;\n }\n "])));}function selectableColorStyle(props){var _style$card2;const{$tone}=props,{color,style}=getTheme_v2(props.theme),tone=color.selectable[$tone];return css(_templateObject61||(_templateObject61=_taggedTemplateLiteral(["\n ","\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ","\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ","\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ","\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ","\n }\n\n &[data-selected] {\n ","\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ","\n }\n &:active {\n ","\n }\n }\n }\n }\n }\n\n ","\n "])),_cardColorStyle(color,tone.enabled),_cardColorStyle(color,tone.disabled),_cardColorStyle(color,tone.pressed),_cardColorStyle(color,tone.selected),_cardColorStyle(color,tone.hovered),_cardColorStyle(color,tone.pressed),_cardColorStyle(color,tone.disabled),_cardColorStyle(color,tone.pressed),_cardColorStyle(color,tone.selected),_cardColorStyle(color,tone.hovered),_cardColorStyle(color,tone.pressed),style===null||style===void 0||(_style$card2=style.card)===null||_style$card2===void 0?void 0:_style$card2.root);}const Selectable=/* @__PURE__ */styled(Box).withConfig({displayName:"Selectable",componentId:"sc-1w01ang-0"})(responsiveRadiusStyle,selectableBaseStyle,selectableColorStyle);Selectable.displayName="Selectable";function useMenu(){const value=useContext(MenuContext);if(!value)throw new Error("useMenu(): missing context value");if(!isRecord(value)||value.version!==2)throw new Error("useMenu(): the context value is not compatible");return value;}const MenuItem=forwardRef(function(props,forwardedRef){var _props30;const $=dist.c(75);let IconComponent,IconRightComponent,children,disabled,hotkeys,onClick,paddingBottom,paddingLeft,paddingRight,paddingTop,paddingX,paddingY,pressed,restProps,selectedProp,t0,t1,t2,t3,t4,t5,text;$[0]!==props?(_props30=props,{as:t0,children,disabled,fontSize:t1,hotkeys,icon:IconComponent,iconRight:IconRightComponent,onClick,padding:t2,paddingX,paddingY,paddingTop,paddingRight,paddingBottom,paddingLeft,pressed,radius:t3,selected:selectedProp,space:t4,text,tone:t5}=_props30,restProps=_objectWithoutProperties(_props30,_excluded49),_props30,$[0]=props,$[1]=IconComponent,$[2]=IconRightComponent,$[3]=children,$[4]=disabled,$[5]=hotkeys,$[6]=onClick,$[7]=paddingBottom,$[8]=paddingLeft,$[9]=paddingRight,$[10]=paddingTop,$[11]=paddingX,$[12]=paddingY,$[13]=pressed,$[14]=restProps,$[15]=selectedProp,$[16]=t0,$[17]=t1,$[18]=t2,$[19]=t3,$[20]=t4,$[21]=t5,$[22]=text):(IconComponent=$[1],IconRightComponent=$[2],children=$[3],disabled=$[4],hotkeys=$[5],onClick=$[6],paddingBottom=$[7],paddingLeft=$[8],paddingRight=$[9],paddingTop=$[10],paddingX=$[11],paddingY=$[12],pressed=$[13],restProps=$[14],selectedProp=$[15],t0=$[16],t1=$[17],t2=$[18],t3=$[19],t4=$[20],t5=$[21],text=$[22]);const as=t0===void 0?"button":t0,fontSize2=t1===void 0?1:t1,padding=t2===void 0?3:t2,radius=t3===void 0?2:t3,space=t4===void 0?3:t4,tone=t5===void 0?"default":t5,{scheme}=useRootTheme(),menu=useMenu(),{activeElement,mount,onItemClick,onItemMouseEnter:_onItemMouseEnter,onItemMouseLeave:_onItemMouseLeave}=menu,onItemMouseEnter=_onItemMouseEnter!==null&&_onItemMouseEnter!==void 0?_onItemMouseEnter:menu.onItemMouseEnter,onItemMouseLeave=_onItemMouseLeave!==null&&_onItemMouseLeave!==void 0?_onItemMouseLeave:menu.onItemMouseLeave,[rootElement,setRootElement]=useState(null),active=!!activeElement&&activeElement===rootElement,ref=useRef$1(null);let t6;$[23]===Symbol.for("react.memo_cache_sentinel")?(t6=()=>ref.current,$[23]=t6):t6=$[23],useImperativeHandle(forwardedRef,t6);let t7,t8;$[24]!==mount||$[25]!==rootElement||$[26]!==selectedProp?(t7=()=>mount(rootElement,selectedProp),t8=[mount,rootElement,selectedProp],$[24]=mount,$[25]=rootElement,$[26]=selectedProp,$[27]=t7,$[28]=t8):(t7=$[27],t8=$[28]),useEffect$1(t7,t8);let t9;$[29]!==disabled||$[30]!==onClick||$[31]!==onItemClick?(t9=event=>{disabled||(onClick&&onClick(event),onItemClick&&onItemClick());},$[29]=disabled,$[30]=onClick,$[31]=onItemClick,$[32]=t9):t9=$[32];const handleClick=t9;let t10;$[33]!==padding||$[34]!==paddingBottom||$[35]!==paddingLeft||$[36]!==paddingRight||$[37]!==paddingTop||$[38]!==paddingX||$[39]!==paddingY?(t10={padding,paddingX,paddingY,paddingTop,paddingRight,paddingBottom,paddingLeft},$[33]=padding,$[34]=paddingBottom,$[35]=paddingLeft,$[36]=paddingRight,$[37]=paddingTop,$[38]=paddingX,$[39]=paddingY,$[40]=t10):t10=$[40];const paddingProps=t10;let t11;$[41]!==fontSize2?(t11=_getArrayProp(fontSize2).map(_temp),$[41]=fontSize2,$[42]=t11):t11=$[42];const hotkeysFontSize=t11;let t12;$[43]===Symbol.for("react.memo_cache_sentinel")?(t12=el=>{ref.current=el,setRootElement(el);},$[43]=t12):t12=$[43];const setRef=t12,t13=as!=="button"&&pressed?"":void 0,t14=active?"":void 0,t15=disabled?"":void 0;let t16;$[44]!==radius?(t16=_getArrayProp(radius),$[44]=radius,$[45]=t16):t16=$[45];let t17;$[46]===Symbol.for("react.memo_cache_sentinel")?(t17=_getArrayProp(0),$[46]=t17):t17=$[46];const t18=disabled?"default":tone,t19=as==="button"?"button":void 0;let t20;$[47]!==IconComponent||$[48]!==IconRightComponent||$[49]!==fontSize2||$[50]!==hotkeys||$[51]!==hotkeysFontSize||$[52]!==paddingProps||$[53]!==space||$[54]!==text?(t20=(IconComponent||text||IconRightComponent)&&/* @__PURE__ */jsxs(Flex,_objectSpread(_objectSpread({as:"span",gap:space,align:"center"},paddingProps),{},{children:[IconComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconComponent)&&IconComponent,reactIsExports.isValidElementType(IconComponent)&&/* @__PURE__ */jsx(IconComponent,{})]}),text&&/* @__PURE__ */jsx(Box,{flex:1,children:/* @__PURE__ */jsx(Text,{size:fontSize2,textOverflow:"ellipsis",weight:"medium",children:text})}),hotkeys&&/* @__PURE__ */jsx(Hotkeys,{fontSize:hotkeysFontSize,keys:hotkeys,style:{marginTop:-4,marginBottom:-4}}),IconRightComponent&&/* @__PURE__ */jsxs(Text,{size:fontSize2,children:[isValidElement$1(IconRightComponent)&&IconRightComponent,reactIsExports.isValidElementType(IconRightComponent)&&/* @__PURE__ */jsx(IconRightComponent,{})]})]})),$[47]=IconComponent,$[48]=IconRightComponent,$[49]=fontSize2,$[50]=hotkeys,$[51]=hotkeysFontSize,$[52]=paddingProps,$[53]=space,$[54]=text,$[55]=t20):t20=$[55];let t21;$[56]!==children||$[57]!==paddingProps?(t21=children&&/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({as:"span"},paddingProps),{},{children})),$[56]=children,$[57]=paddingProps,$[58]=t21):t21=$[58];let t22;return $[59]!==as||$[60]!==disabled||$[61]!==handleClick||$[62]!==onItemMouseEnter||$[63]!==onItemMouseLeave||$[64]!==restProps||$[65]!==scheme||$[66]!==t13||$[67]!==t14||$[68]!==t15||$[69]!==t16||$[70]!==t18||$[71]!==t19||$[72]!==t20||$[73]!==t21?(t22=/* @__PURE__ */jsxs(Selectable,_objectSpread(_objectSpread({"data-ui":"MenuItem",role:"menuitem"},restProps),{},{"data-pressed":t13,"data-selected":t14,"data-disabled":t15,forwardedAs:as,$radius:t16,$padding:t17,$tone:t18,$scheme:scheme,disabled,onClick:handleClick,onMouseEnter:onItemMouseEnter,onMouseLeave:onItemMouseLeave,ref:setRef,tabIndex:-1,type:t19,children:[t20,t21]})),$[59]=as,$[60]=disabled,$[61]=handleClick,$[62]=onItemMouseEnter,$[63]=onItemMouseLeave,$[64]=restProps,$[65]=scheme,$[66]=t13,$[67]=t14,$[68]=t15,$[69]=t16,$[70]=t18,$[71]=t19,$[72]=t20,$[73]=t21,$[74]=t22):t22=$[74],t22;});MenuItem.displayName="ForwardRef(MenuItem)";function _temp(s){return s-1;}const CustomButton=styled(Button).withConfig({displayName:"CustomButton",componentId:"sc-1kns779-0"})(_templateObject62||(_templateObject62=_taggedTemplateLiteral(["max-width:100%;"]))),Tab=forwardRef(function(props,forwardedRef){var _props31;const $=dist.c(30);let focused,icon,id,label,onClick,onFocus,restProps,selected,t0,t1;$[0]!==props?(_props31=props,{icon,id,focused,fontSize:t0,label,onClick,onFocus,padding:t1,selected}=_props31,restProps=_objectWithoutProperties(_props31,_excluded50),_props31,$[0]=props,$[1]=focused,$[2]=icon,$[3]=id,$[4]=label,$[5]=onClick,$[6]=onFocus,$[7]=restProps,$[8]=selected,$[9]=t0,$[10]=t1):(focused=$[1],icon=$[2],id=$[3],label=$[4],onClick=$[5],onFocus=$[6],restProps=$[7],selected=$[8],t0=$[9],t1=$[10]);const fontSize2=t0===void 0?1:t0,padding=t1===void 0?2:t1,ref=useRef$1(null),focusedRef=useRef$1(!1);let t2;$[11]===Symbol.for("react.memo_cache_sentinel")?(t2=()=>ref.current,$[11]=t2):t2=$[11],useImperativeHandle(forwardedRef,t2);let t3;$[12]===Symbol.for("react.memo_cache_sentinel")?(t3=()=>{focusedRef.current=!1;},$[12]=t3):t3=$[12];const handleBlur=t3;let t4;$[13]!==onFocus?(t4=event=>{focusedRef.current=!0,onFocus&&onFocus(event);},$[13]=onFocus,$[14]=t4):t4=$[14];const handleFocus=t4;let t5,t6;$[15]!==focused?(t5=()=>{focused&&!focusedRef.current&&(ref.current&&ref.current.focus(),focusedRef.current=!0);},t6=[focused],$[15]=focused,$[16]=t5,$[17]=t6):(t5=$[16],t6=$[17]),useEffect$1(t5,t6);const t7=selected?"true":"false",t8=selected?0:-1;let t9;return $[18]!==fontSize2||$[19]!==handleFocus||$[20]!==icon||$[21]!==id||$[22]!==label||$[23]!==onClick||$[24]!==padding||$[25]!==restProps||$[26]!==selected||$[27]!==t7||$[28]!==t8?(t9=/* @__PURE__ */jsx(CustomButton,_objectSpread(_objectSpread({"data-ui":"Tab"},restProps),{},{"aria-selected":t7,fontSize:fontSize2,icon,id,mode:"bleed",onClick,onBlur:handleBlur,onFocus:handleFocus,padding,ref,role:"tab",selected,tabIndex:t8,text:label,type:"button"})),$[18]=fontSize2,$[19]=handleFocus,$[20]=icon,$[21]=id,$[22]=label,$[23]=onClick,$[24]=padding,$[25]=restProps,$[26]=selected,$[27]=t7,$[28]=t8,$[29]=t9):t9=$[29],t9;});Tab.displayName="ForwardRef(Tab)";const CustomInline=styled(Inline).withConfig({displayName:"CustomInline",componentId:"sc-5cm04m-0"})(_templateObject63||(_templateObject63=_taggedTemplateLiteral(["& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}"]))),TabList=forwardRef(function(props,ref){var _props32;const $=dist.c(15);let childrenProp,restProps;$[0]!==props?(_props32=props,{children:childrenProp}=_props32,restProps=_objectWithoutProperties(_props32,_excluded51),_props32,$[0]=props,$[1]=childrenProp,$[2]=restProps):(childrenProp=$[1],restProps=$[2]);const[focusedIndex,setFocusedIndex]=useState(-1);let t0;if($[3]!==childrenProp||$[4]!==focusedIndex){const children=Children.toArray(childrenProp).filter(isValidElement$1);let t12;$[6]!==focusedIndex?(t12=(child,childIndex)=>cloneElement(child,{focused:focusedIndex===childIndex,key:childIndex,onFocus:()=>setFocusedIndex(childIndex)}),$[6]=focusedIndex,$[7]=t12):t12=$[7],t0=children.map(t12),$[3]=childrenProp,$[4]=focusedIndex,$[5]=t0;}else t0=$[5];const tabs=t0,numTabs=tabs.length;let t1;$[8]!==numTabs?(t1=event=>{event.key==="ArrowLeft"&&setFocusedIndex(prevIndex=>(prevIndex+numTabs-1)%numTabs),event.key==="ArrowRight"&&setFocusedIndex(prevIndex_0=>(prevIndex_0+1)%numTabs);},$[8]=numTabs,$[9]=t1):t1=$[9];const handleKeyDown=t1;let t2;return $[10]!==handleKeyDown||$[11]!==ref||$[12]!==restProps||$[13]!==tabs?(t2=/* @__PURE__ */jsx(CustomInline,_objectSpread(_objectSpread({"data-ui":"TabList"},restProps),{},{onKeyDown:handleKeyDown,ref,role:"tablist",children:tabs})),$[10]=handleKeyDown,$[11]=ref,$[12]=restProps,$[13]=tabs,$[14]=t2):t2=$[14],t2;});TabList.displayName="ForwardRef(TabList)";function _raf(fn){const frameId=requestAnimationFrame(fn);return()=>{cancelAnimationFrame(frameId);};}function _hasFocus(element){return!!document.activeElement&&element.contains(document.activeElement);}function isFocusable(element){return element.tabIndex>0||element.tabIndex===0&&element.getAttribute("tabIndex")!==null?!0:isHTMLAnchorElement(element)?!!element.href&&element.rel!=="ignore":isHTMLInputElement(element)?element.type!=="hidden"&&element.type!=="file"&&!element.disabled:isHTMLButtonElement(element)||isHTMLSelectElement(element)||isHTMLTextAreaElement(element)?!element.disabled:!1;}function attemptFocus(element){if(!isFocusable(element))return!1;try{element.focus();}catch(_unused3){}return document.activeElement===element;}function focusFirstDescendant(element){for(let i=0;i<element.childNodes.length;i++){const child=element.childNodes[i];if(isHTMLElement(child)&&(attemptFocus(child)||focusFirstDescendant(child)))return!0;}return!1;}function focusLastDescendant(element){for(let i=element.childNodes.length-1;i>=0;i--){const child=element.childNodes[i];if(isHTMLElement(child)&&(attemptFocus(child)||focusLastDescendant(child)))return!0;}return!1;}const StyledAutocomplete=styled.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})(_templateObject64||(_templateObject64=_taggedTemplateLiteral(["line-height:0;"]))),ListBox=styled(Box).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})(_templateObject65||(_templateObject65=_taggedTemplateLiteral(["& > ul{list-style:none;padding:0;margin:0;}"]))),rotate=keyframes$1(_templateObject66||(_templateObject66=_taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"]))),AnimatedSpinnerIcon=styled(SpinnerIcon).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})(_templateObject67||(_templateObject67=_taggedTemplateLiteral(["animation:"," 500ms linear infinite;"])),rotate);function AutocompleteOption(props){const $=dist.c(11),{children,id,onSelect,selected,value}=props;let t0;$[0]!==onSelect||$[1]!==value?(t0=()=>{setTimeout(()=>{onSelect(value);},0);},$[0]=onSelect,$[1]=value,$[2]=t0):t0=$[2];const handleClick=t0;let t1;$[3]!==handleClick?(t1=event=>{event.key==="Enter"&&!_isEnterToClickElement(event.currentTarget)&&handleClick();},$[3]=handleClick,$[4]=t1):t1=$[4];const handleKeyDown=t1;let t2;return $[5]!==children||$[6]!==handleClick||$[7]!==handleKeyDown||$[8]!==id||$[9]!==selected?(t2=/* @__PURE__ */jsx("li",{"aria-selected":selected,"data-ui":"AutocompleteOption",id,role:"option",onClick:handleClick,onKeyDown:handleKeyDown,children}),$[5]=children,$[6]=handleClick,$[7]=handleKeyDown,$[8]=id,$[9]=selected,$[10]=t2):t2=$[10],t2;}function autocompleteReducer(state,msg){return msg.type==="input/change"?_objectSpread(_objectSpread({},state),{},{activeValue:null,focused:!0,query:msg.query}):msg.type==="input/focus"?_objectSpread(_objectSpread({},state),{},{focused:!0}):msg.type==="root/blur"?_objectSpread(_objectSpread({},state),{},{focused:!1,query:null}):msg.type==="root/clear"?_objectSpread(_objectSpread({},state),{},{activeValue:null,query:null,value:null}):msg.type==="root/escape"?_objectSpread(_objectSpread({},state),{},{focused:!1,query:null}):msg.type==="root/open"?_objectSpread(_objectSpread({},state),{},{query:state.query||msg.query}):msg.type==="root/setActiveValue"?_objectSpread(_objectSpread({},state),{},{activeValue:msg.value,listFocused:msg.listFocused||state.listFocused}):msg.type==="root/setListFocused"?_objectSpread(_objectSpread({},state),{},{listFocused:msg.listFocused}):msg.type==="value/change"?_objectSpread(_objectSpread({},state),{},{activeValue:msg.value,query:null,value:msg.value}):state;}const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],AUTOCOMPLETE_POPOVER_PLACEMENT="bottom-start",AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS=["bottom-start","top-start"],DEFAULT_RENDER_VALUE=(value,option)=>option?option.value:value,DEFAULT_FILTER_OPTION=(query,option)=>option.value.toLowerCase().indexOf(query.toLowerCase())>-1,InnerAutocomplete=forwardRef(function(props,forwardedRef){var _props33;const $=dist.c(181);let customValidity,disabled,filterOptionProp,icon,id,loading,onBlur,onChange,onFocus,onQueryChange,onSelect,openButton,openOnFocus,optionsProp,prefix,readOnly,relatedElements,renderOptionProp,renderPopover,restProps,suffix,t0,t1,t2,t3,t4,t5,t6,valueProp;$[0]!==props?(_props33=props,{border:t0,customValidity,disabled,filterOption:filterOptionProp,fontSize:t1,icon,id,listBox:t2,loading,onBlur,onChange,onFocus,onQueryChange,onSelect,openButton,openOnFocus,options:optionsProp,padding:t3,popover:t4,prefix,radius:t5,readOnly,relatedElements,renderOption:renderOptionProp,renderPopover,renderValue:t6,suffix,value:valueProp}=_props33,restProps=_objectWithoutProperties(_props33,_excluded52),_props33,$[0]=props,$[1]=customValidity,$[2]=disabled,$[3]=filterOptionProp,$[4]=icon,$[5]=id,$[6]=loading,$[7]=onBlur,$[8]=onChange,$[9]=onFocus,$[10]=onQueryChange,$[11]=onSelect,$[12]=openButton,$[13]=openOnFocus,$[14]=optionsProp,$[15]=prefix,$[16]=readOnly,$[17]=relatedElements,$[18]=renderOptionProp,$[19]=renderPopover,$[20]=restProps,$[21]=suffix,$[22]=t0,$[23]=t1,$[24]=t2,$[25]=t3,$[26]=t4,$[27]=t5,$[28]=t6,$[29]=valueProp):(customValidity=$[1],disabled=$[2],filterOptionProp=$[3],icon=$[4],id=$[5],loading=$[6],onBlur=$[7],onChange=$[8],onFocus=$[9],onQueryChange=$[10],onSelect=$[11],openButton=$[12],openOnFocus=$[13],optionsProp=$[14],prefix=$[15],readOnly=$[16],relatedElements=$[17],renderOptionProp=$[18],renderPopover=$[19],restProps=$[20],suffix=$[21],t0=$[22],t1=$[23],t2=$[24],t3=$[25],t4=$[26],t5=$[27],t6=$[28],valueProp=$[29]);const border=t0===void 0?!0:t0,fontSize=t1===void 0?2:t1,listBox=t2===void 0?EMPTY_RECORD:t2,paddingProp=t3===void 0?3:t3,popover=t4===void 0?EMPTY_RECORD:t4,radius=t5===void 0?2:t5,renderValue=t6===void 0?DEFAULT_RENDER_VALUE:t6,t7=valueProp||null,t8=valueProp||null;let t9;$[30]!==t7||$[31]!==t8?(t9={activeValue:t7,focused:!1,listFocused:!1,query:null,value:t8},$[30]=t7,$[31]=t8,$[32]=t9):t9=$[32];const[state,dispatch]=useReducer(autocompleteReducer,t9),{activeValue,focused,listFocused,query,value}=state;let t10;$[33]!==fontSize||$[34]!==paddingProp?(t10=t112=>{const{value:value_0}=t112;return/* @__PURE__ */jsx(Card,{"data-as":"button",padding:paddingProp,radius:2,tone:"inherit",children:/* @__PURE__ */jsx(Text,{size:fontSize,textOverflow:"ellipsis",children:value_0})});},$[33]=fontSize,$[34]=paddingProp,$[35]=t10):t10=$[35];const renderOption=typeof renderOptionProp=="function"?renderOptionProp:t10,filterOption=typeof filterOptionProp=="function"?filterOptionProp:DEFAULT_FILTER_OPTION,rootElementRef=useRef$1(null),resultsPopoverElementRef=useRef$1(null),inputElementRef=useRef$1(null),listBoxElementRef=useRef$1(null),[inputElement,_setInputElement]=useState(null);let t11;$[36]===Symbol.for("react.memo_cache_sentinel")?(t11=node=>{startTransition(()=>_setInputElement(node));},$[36]=t11):t11=$[36];const setInputElement=t11,listFocusedRef=useRef$1(!1),valueRef=useRef$1(value),valuePropRef=useRef$1(valueProp),popoverMouseWithinRef=useRef$1(!1);let t12,t13;$[37]!==inputElement?(t12=()=>inputElement,t13=[inputElement],$[37]=inputElement,$[38]=t12,$[39]=t13):(t12=$[38],t13=$[39]),useImperativeHandle(inputElementRef,t12,t13);let t14,t15;$[40]!==inputElement?(t14=()=>inputElement,t15=[inputElement],$[40]=inputElement,$[41]=t14,$[42]=t15):(t14=$[41],t15=$[42]),useImperativeHandle(forwardedRef,t14,t15);const listBoxId="".concat(id,"-listbox"),options=Array.isArray(optionsProp)?optionsProp:EMPTY_ARRAY,padding=_getArrayProp(paddingProp);let t16;$[43]!==options||$[44]!==value?(t16=value!==null?options.find(o=>o.value===value):void 0,$[43]=options,$[44]=value,$[45]=t16):t16=$[45];const currentOption=t16;let t17;if($[46]!==filterOption||$[47]!==options||$[48]!==query){let t182;$[50]!==filterOption||$[51]!==query?(t182=option=>query?filterOption(query,option):!0,$[50]=filterOption,$[51]=query,$[52]=t182):t182=$[52],t17=options.filter(t182),$[46]=filterOption,$[47]=options,$[48]=query,$[49]=t17;}else t17=$[49];const filteredOptions=t17,filteredOptionsLen=filteredOptions.length,activeItemId=activeValue?"".concat(id,"-option-").concat(activeValue):void 0,expanded=query!==null&&loading||focused&&query!==null;let t18;$[53]!==onBlur||$[54]!==onQueryChange||$[55]!==relatedElements?(t18=event=>{setTimeout(()=>{if(popoverMouseWithinRef.current)return;const elements=(relatedElements||[]).concat(rootElementRef.current?[rootElementRef.current]:[],resultsPopoverElementRef.current?[resultsPopoverElementRef.current]:[]);let focusInside=!1;if(document.activeElement){for(const e of elements)if(e===document.activeElement||e.contains(document.activeElement)){focusInside=!0;break;}}focusInside===!1&&(dispatch({type:"root/blur"}),popoverMouseWithinRef.current=!1,onQueryChange&&onQueryChange(null),onBlur&&onBlur(event));},0);},$[53]=onBlur,$[54]=onQueryChange,$[55]=relatedElements,$[56]=t18):t18=$[56];const handleRootBlur=t18;let t19;$[57]===Symbol.for("react.memo_cache_sentinel")?(t19=event_0=>{const listBoxElement=listBoxElementRef.current,focusedElement=event_0.target instanceof HTMLElement?event_0.target:null,listFocused_0=(listBoxElement===null||listBoxElement===void 0?void 0:listBoxElement.contains(focusedElement))||!1;listFocused_0!==listFocusedRef.current&&(listFocusedRef.current=listFocused_0,dispatch({type:"root/setListFocused",listFocused:listFocused_0}));},$[57]=t19):t19=$[57];const handleRootFocus=t19;let t20;$[58]!==onChange||$[59]!==onQueryChange||$[60]!==onSelect?(t20=v=>{var _inputElementRef$curr;dispatch({type:"value/change",value:v}),popoverMouseWithinRef.current=!1,onSelect&&onSelect(v),valueRef.current=v,onChange&&onChange(v),onQueryChange&&onQueryChange(null),(_inputElementRef$curr=inputElementRef.current)===null||_inputElementRef$curr===void 0?void 0:_inputElementRef$curr.focus();},$[58]=onChange,$[59]=onQueryChange,$[60]=onSelect,$[61]=t20):t20=$[61];const handleOptionSelect=t20;let t21;$[62]!==activeValue||$[63]!==filteredOptions||$[64]!==filteredOptionsLen||$[65]!==onQueryChange?(t21=event_1=>{if(event_1.key==="ArrowDown"){if(event_1.preventDefault(),!filteredOptionsLen)return;const activeOption=filteredOptions.find(o_0=>o_0.value===activeValue),activeIndex=activeOption?filteredOptions.indexOf(activeOption):-1,nextActiveOption=filteredOptions[(activeIndex+1)%filteredOptionsLen];nextActiveOption&&dispatch({type:"root/setActiveValue",value:nextActiveOption.value,listFocused:!0});return;}if(event_1.key==="ArrowUp"){if(event_1.preventDefault(),!filteredOptionsLen)return;const activeOption_0=filteredOptions.find(o_1=>o_1.value===activeValue),activeIndex_0=activeOption_0?filteredOptions.indexOf(activeOption_0):-1,nextActiveOption_0=filteredOptions[activeIndex_0===-1?filteredOptionsLen-1:(filteredOptionsLen+activeIndex_0-1)%filteredOptionsLen];nextActiveOption_0&&dispatch({type:"root/setActiveValue",value:nextActiveOption_0.value,listFocused:!0});return;}if(event_1.key==="Escape"){var _inputElementRef$curr2;dispatch({type:"root/escape"}),popoverMouseWithinRef.current=!1,onQueryChange&&onQueryChange(null),(_inputElementRef$curr2=inputElementRef.current)===null||_inputElementRef$curr2===void 0?void 0:_inputElementRef$curr2.focus();return;}const target=event_1.target,listEl=listBoxElementRef.current;if((listEl===target||listEl!==null&&listEl!==void 0&&listEl.contains(target))&&!AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)){var _inputElementRef$curr3;(_inputElementRef$curr3=inputElementRef.current)===null||_inputElementRef$curr3===void 0||_inputElementRef$curr3.focus();return;}},$[62]=activeValue,$[63]=filteredOptions,$[64]=filteredOptionsLen,$[65]=onQueryChange,$[66]=t21):t21=$[66];const handleRootKeyDown=t21;let t22;$[67]!==onQueryChange?(t22=event_2=>{const nextQuery=event_2.currentTarget.value;dispatch({type:"input/change",query:nextQuery}),onQueryChange&&onQueryChange(nextQuery);},$[67]=onQueryChange,$[68]=t22):t22=$[68];const handleInputChange=t22;let t23;$[69]!==currentOption||$[70]!==renderValue||$[71]!==value?(t23=()=>{dispatch({type:"root/open",query:value?renderValue(value,currentOption):""});},$[69]=currentOption,$[70]=renderValue,$[71]=value,$[72]=t23):t23=$[72];const dispatchOpen=t23;let t24;$[73]!==dispatchOpen||$[74]!==focused||$[75]!==onFocus||$[76]!==openOnFocus?(t24=event_3=>{focused||(dispatch({type:"input/focus"}),onFocus&&onFocus(event_3),openOnFocus&&dispatchOpen());},$[73]=dispatchOpen,$[74]=focused,$[75]=onFocus,$[76]=openOnFocus,$[77]=t24):t24=$[77];const handleInputFocus=t24;let t25;$[78]===Symbol.for("react.memo_cache_sentinel")?(t25=()=>{popoverMouseWithinRef.current=!0;},$[78]=t25):t25=$[78];const handlePopoverMouseEnter=t25;let t26;$[79]===Symbol.for("react.memo_cache_sentinel")?(t26=()=>{popoverMouseWithinRef.current=!1;},$[79]=t26):t26=$[79];const handlePopoverMouseLeave=t26;let t27;$[80]!==onChange||$[81]!==onQueryChange?(t27=()=>{var _inputElementRef$curr4;dispatch({type:"root/clear"}),valueRef.current="",onChange&&onChange(""),onQueryChange&&onQueryChange(null),(_inputElementRef$curr4=inputElementRef.current)===null||_inputElementRef$curr4===void 0?void 0:_inputElementRef$curr4.focus();},$[80]=onChange,$[81]=onQueryChange,$[82]=t27):t27=$[82];const handleClearButtonClick=t27;let t28;$[83]===Symbol.for("react.memo_cache_sentinel")?(t28=()=>{dispatch({type:"input/focus"});},$[83]=t28):t28=$[83];const handleClearButtonFocus=t28;let t29,t30;$[84]!==valueProp?(t29=()=>{if(valueProp!==valuePropRef.current){valuePropRef.current=valueProp,valueProp!==void 0&&(dispatch({type:"value/change",value:valueProp}),valueRef.current=valueProp);return;}valueProp!==valueRef.current&&(valueRef.current=valueProp||null,dispatch({type:"value/change",value:valueProp||null}));},t30=[valueProp],$[84]=valueProp,$[85]=t29,$[86]=t30):(t29=$[85],t30=$[86]),useEffect$1(t29,t30);let t31,t32;$[87]!==focused?(t31=()=>{!focused&&valueRef.current&&dispatch({type:"root/setActiveValue",value:valueRef.current});},t32=[focused],$[87]=focused,$[88]=t31,$[89]=t32):(t31=$[88],t32=$[89]),useEffect$1(t31,t32);let t33,t34;$[90]!==activeValue||$[91]!==filteredOptions?(t33=()=>{const listElement=listBoxElementRef.current;if(!listElement)return;const activeOption_1=filteredOptions.find(o_2=>o_2.value===activeValue);if(activeOption_1){const activeIndex_1=filteredOptions.indexOf(activeOption_1),activeItemElement=listElement.childNodes[activeIndex_1];if(activeItemElement){if(_hasFocus(activeItemElement))return;focusFirstDescendant(activeItemElement);}}},t34=[activeValue,filteredOptions],$[90]=activeValue,$[91]=filteredOptions,$[92]=t33,$[93]=t34):(t33=$[92],t34=$[93]),useEffect$1(t33,t34);let t35;bb0:{if(!loading&&!disabled&&value){let t362;$[94]===Symbol.for("react.memo_cache_sentinel")?(t362={"aria-label":"Clear",onFocus:handleClearButtonFocus},$[94]=t362):t362=$[94],t35=t362;break bb0;}t35=void 0;}const clearButton=t35,openButtonBoxPadding=padding.map(_temp$3),openButtonPadding=padding.map(_temp2$1),openButtonProps=typeof openButton=="object"?openButton:EMPTY_RECORD;let t36;$[95]!==dispatchOpen||$[96]!==openButtonProps?(t36=event_4=>{dispatchOpen(),openButtonProps.onClick&&openButtonProps.onClick(event_4),_raf(()=>{var _inputElementRef$curr5;return(_inputElementRef$curr5=inputElementRef.current)===null||_inputElementRef$curr5===void 0?void 0:_inputElementRef$curr5.focus();});},$[95]=dispatchOpen,$[96]=openButtonProps,$[97]=t36):t36=$[97];const handleOpenClick=t36;let t37;$[98]!==disabled||$[99]!==expanded||$[100]!==fontSize||$[101]!==handleOpenClick||$[102]!==openButton||$[103]!==openButtonBoxPadding||$[104]!==openButtonPadding||$[105]!==openButtonProps||$[106]!==readOnly?(t37=!disabled&&!readOnly&&openButton?/* @__PURE__ */jsx(Box,{"aria-hidden":expanded,padding:openButtonBoxPadding,children:/* @__PURE__ */jsx(Button,_objectSpread(_objectSpread({"aria-label":"Open",disabled:expanded,fontSize,icon:ChevronDownIcon,mode:"bleed",padding:openButtonPadding},openButtonProps),{},{onClick:handleOpenClick}))}):void 0,$[98]=disabled,$[99]=expanded,$[100]=fontSize,$[101]=handleOpenClick,$[102]=openButton,$[103]=openButtonBoxPadding,$[104]=openButtonPadding,$[105]=openButtonProps,$[106]=readOnly,$[107]=t37):t37=$[107];const openButtonNode=t37;let t38;bb1:{if(query===null){if(value!==null){let t392;$[108]!==currentOption||$[109]!==renderValue||$[110]!==value?(t392=renderValue(value,currentOption),$[108]=currentOption,$[109]=renderValue,$[110]=value,$[111]=t392):t392=$[111],t38=t392;break bb1;}t38="";break bb1;}t38=query;}const inputValue=t38;let t39;$[112]!==listFocused?(t39=event_5=>{var _inputElementRef$curr6;event_5.key==="Tab"&&listFocused&&((_inputElementRef$curr6=inputElementRef.current)===null||_inputElementRef$curr6===void 0?void 0:_inputElementRef$curr6.focus());},$[112]=listFocused,$[113]=t39):t39=$[113];const handleListBoxKeyDown=t39;let t40;bb2:{if(filteredOptions.length===0){t40=null;break bb2;}let t412;if($[114]!==activeValue||$[115]!==currentOption||$[116]!==filteredOptions||$[117]!==handleOptionSelect||$[118]!==id||$[119]!==listFocused||$[120]!==loading||$[121]!==renderOption){let t423;$[123]!==activeValue||$[124]!==currentOption||$[125]!==handleOptionSelect||$[126]!==id||$[127]!==listFocused||$[128]!==loading||$[129]!==renderOption?(t423=option_0=>{const active=activeValue!==null?option_0.value===activeValue:currentOption===option_0;return/* @__PURE__ */jsx(AutocompleteOption,{id:"".concat(id,"-option-").concat(option_0.value),onSelect:handleOptionSelect,selected:active,value:option_0.value,children:cloneElement(renderOption(option_0),{disabled:loading,selected:active,tabIndex:listFocused&&active?0:-1})},option_0.value);},$[123]=activeValue,$[124]=currentOption,$[125]=handleOptionSelect,$[126]=id,$[127]=listFocused,$[128]=loading,$[129]=renderOption,$[130]=t423):t423=$[130],t412=filteredOptions.map(t423),$[114]=activeValue,$[115]=currentOption,$[116]=filteredOptions,$[117]=handleOptionSelect,$[118]=id,$[119]=listFocused,$[120]=loading,$[121]=renderOption,$[122]=t412;}else t412=$[122];let t422;$[131]!==listBoxId||$[132]!==t412?(t422=/* @__PURE__ */jsx(Stack,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:listBoxId,ref:listBoxElementRef,role:"listbox",space:1,children:t412}),$[131]=listBoxId,$[132]=t412,$[133]=t422):t422=$[133];let t432;$[134]!==handleListBoxKeyDown||$[135]!==listBox||$[136]!==t422?(t432=/* @__PURE__ */jsx(ListBox,_objectSpread(_objectSpread({"data-ui":"AutoComplete__results",onKeyDown:handleListBoxKeyDown,padding:1},listBox),{},{tabIndex:-1,children:t422})),$[134]=handleListBoxKeyDown,$[135]=listBox,$[136]=t422,$[137]=t432):t432=$[137],t40=t432;}const content2=t40;let t41;bb3:{if(renderPopover){const t423=!expanded;let t432;$[138]!==content2||$[139]!==handlePopoverMouseEnter||$[140]!==handlePopoverMouseLeave||$[141]!==inputElement||$[142]!==renderPopover||$[143]!==t423?(t432=/* @__PURE__ */jsx(RenderPopover,{content:content2,hidden:t423,inputElement,onMouseEnter:handlePopoverMouseEnter,onMouseLeave:handlePopoverMouseLeave,resultsPopoverElementRef,renderPopover}),$[138]=content2,$[139]=handlePopoverMouseEnter,$[140]=handlePopoverMouseLeave,$[141]=inputElement,$[142]=renderPopover,$[143]=t423,$[144]=t432):t432=$[144],t41=t432;break bb3;}if(filteredOptionsLen===0){t41=null;break bb3;}let t422;$[145]!==content2||$[146]!==expanded||$[147]!==handlePopoverMouseEnter||$[148]!==handlePopoverMouseLeave||$[149]!==inputElement||$[150]!==popover||$[151]!==radius?(t422=/* @__PURE__ */jsx(Popover,_objectSpread({arrow:!1,constrainSize:!0,content:content2,fallbackPlacements:AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS,matchReferenceWidth:!0,onMouseEnter:handlePopoverMouseEnter,onMouseLeave:handlePopoverMouseLeave,open:expanded,overflow:"auto",placement:AUTOCOMPLETE_POPOVER_PLACEMENT,portal:!0,radius,ref:resultsPopoverElementRef,referenceElement:inputElement},popover)),$[145]=content2,$[146]=expanded,$[147]=handlePopoverMouseEnter,$[148]=handlePopoverMouseLeave,$[149]=inputElement,$[150]=popover,$[151]=radius,$[152]=t422):t422=$[152],t41=t422;}const results=t41,t42=loading&&AnimatedSpinnerIcon,t43=suffix||openButtonNode;let t44;$[153]!==activeItemId||$[154]!==border||$[155]!==clearButton||$[156]!==customValidity||$[157]!==disabled||$[158]!==expanded||$[159]!==fontSize||$[160]!==handleClearButtonClick||$[161]!==handleInputChange||$[162]!==handleInputFocus||$[163]!==icon||$[164]!==id||$[165]!==inputValue||$[166]!==listBoxId||$[167]!==padding||$[168]!==prefix||$[169]!==radius||$[170]!==readOnly||$[171]!==restProps||$[172]!==t42||$[173]!==t43?(t44=/* @__PURE__ */jsx(TextInput,_objectSpread(_objectSpread({},restProps),{},{"aria-activedescendant":activeItemId,"aria-autocomplete":"list","aria-expanded":expanded,"aria-owns":listBoxId,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border,clearButton,customValidity,disabled,fontSize,icon,iconRight:t42,id,inputMode:"search",onChange:handleInputChange,onClear:handleClearButtonClick,onFocus:handleInputFocus,padding,prefix,radius,readOnly,ref:setInputElement,role:"combobox",spellCheck:!1,suffix:t43,value:inputValue})),$[153]=activeItemId,$[154]=border,$[155]=clearButton,$[156]=customValidity,$[157]=disabled,$[158]=expanded,$[159]=fontSize,$[160]=handleClearButtonClick,$[161]=handleInputChange,$[162]=handleInputFocus,$[163]=icon,$[164]=id,$[165]=inputValue,$[166]=listBoxId,$[167]=padding,$[168]=prefix,$[169]=radius,$[170]=readOnly,$[171]=restProps,$[172]=t42,$[173]=t43,$[174]=t44):t44=$[174];let t45;return $[175]!==handleRootBlur||$[176]!==handleRootFocus||$[177]!==handleRootKeyDown||$[178]!==results||$[179]!==t44?(t45=/* @__PURE__ */jsxs(StyledAutocomplete,{"data-ui":"Autocomplete",onBlur:handleRootBlur,onFocus:handleRootFocus,onKeyDown:handleRootKeyDown,ref:rootElementRef,children:[t44,results]}),$[175]=handleRootBlur,$[176]=handleRootFocus,$[177]=handleRootKeyDown,$[178]=results,$[179]=t44,$[180]=t45):t45=$[180],t45;});function RenderPopover(_ref73){let{renderPopover,content:content2,hidden,inputElement,onMouseEnter,onMouseLeave,resultsPopoverElementRef}=_ref73;return renderPopover({content:content2,hidden,inputElement,onMouseEnter,onMouseLeave},resultsPopoverElementRef);}InnerAutocomplete.displayName="ForwardRef(Autocomplete)";function _temp$3(v_0){return v_0===0?0:v_0===1||v_0===2?1:v_0-2;}function _temp2$1(v_1){return Math.max(v_1-1,0);}const StyledBreadcrumbs=styled.ol.withConfig({displayName:"StyledBreadcrumbs",componentId:"sc-1es8h8q-0"})(_templateObject68||(_templateObject68=_taggedTemplateLiteral(["margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;"]))),ExpandButton=styled(Button).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})(_templateObject69||(_templateObject69=_taggedTemplateLiteral(["appearance:none;margin:-4px;"]))),Breadcrumbs=forwardRef(function(props,ref){var _props34;const $=dist.c(29);let children,maxLength,restProps,separator,t0;$[0]!==props?(_props34=props,{children,maxLength,separator,space:t0}=_props34,restProps=_objectWithoutProperties(_props34,_excluded53),_props34,$[0]=props,$[1]=children,$[2]=maxLength,$[3]=restProps,$[4]=separator,$[5]=t0):(children=$[1],maxLength=$[2],restProps=$[3],separator=$[4],t0=$[5]);const spaceRaw=t0===void 0?2:t0;let t1;$[6]!==spaceRaw?(t1=_getArrayProp(spaceRaw),$[6]=spaceRaw,$[7]=t1):t1=$[7];const space=t1,[open,setOpen]=useState(!1),expandElementRef=useRef$1(null),popoverElementRef=useRef$1(null);let t2;$[8]===Symbol.for("react.memo_cache_sentinel")?(t2=()=>setOpen(!1),$[8]=t2):t2=$[8];const collapse=t2;let t3;$[9]===Symbol.for("react.memo_cache_sentinel")?(t3=()=>setOpen(!0),$[9]=t3):t3=$[9];const expand=t3;let t4;$[10]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>[expandElementRef.current,popoverElementRef.current],$[10]=t4):t4=$[10],useClickOutsideEvent(collapse,t4);let t5;$[11]!==children?(t5=Children.toArray(children).filter(isValidElement$1),$[11]=children,$[12]=t5):t5=$[12];const rawItems=t5;let t6;$[13]!==maxLength||$[14]!==open||$[15]!==rawItems||$[16]!==space?(t6={collapse,expand,expandElementRef,maxLength,open,popoverElementRef,rawItems,space},$[13]=maxLength,$[14]=open,$[15]=rawItems,$[16]=space,$[17]=t6):t6=$[17];const items=useItems(t6);let t7;if($[18]!==items||$[19]!==separator||$[20]!==space){let t82;$[22]!==separator||$[23]!==space?(t82=(item,itemIndex)=>/* @__PURE__ */jsxs(Fragment$1,{children:[itemIndex>0&&/* @__PURE__ */jsx(Box,{"aria-hidden":!0,as:"li",paddingX:space,children:separator||/* @__PURE__ */jsx(Text,{muted:!0,children:"/"})}),/* @__PURE__ */jsx(Box,{as:"li",children:item})]},itemIndex),$[22]=separator,$[23]=space,$[24]=t82):t82=$[24],t7=items.map(t82),$[18]=items,$[19]=separator,$[20]=space,$[21]=t7;}else t7=$[21];let t8;return $[25]!==ref||$[26]!==restProps||$[27]!==t7?(t8=/* @__PURE__ */jsx(StyledBreadcrumbs,_objectSpread(_objectSpread({"data-ui":"Breadcrumbs"},restProps),{},{ref,children:t7})),$[25]=ref,$[26]=restProps,$[27]=t7,$[28]=t8):t8=$[28],t8;});Breadcrumbs.displayName="ForwardRef(Breadcrumbs)";function useItems(t0){const $=dist.c(28),{collapse,expand,expandElementRef,maxLength,open,popoverElementRef,rawItems,space}=t0,len=rawItems.length;if(maxLength&&len>maxLength){const beforeLength=Math.ceil(maxLength/2),afterLength=Math.floor(maxLength/2);let t1;if($[0]!==afterLength||$[1]!==beforeLength||$[2]!==collapse||$[3]!==expand||$[4]!==expandElementRef||$[5]!==len||$[6]!==open||$[7]!==popoverElementRef||$[8]!==rawItems||$[9]!==space){const t2=rawItems.slice(0,beforeLength-1);let t3;$[11]!==afterLength||$[12]!==beforeLength||$[13]!==len||$[14]!==rawItems?(t3=rawItems.slice(beforeLength-1,len-afterLength),$[11]=afterLength,$[12]=beforeLength,$[13]=len,$[14]=rawItems,$[15]=t3):t3=$[15];let t4;$[16]!==space||$[17]!==t3?(t4=/* @__PURE__ */jsx(Stack,{as:"ol",overflow:"auto",padding:space,space,children:t3}),$[16]=space,$[17]=t3,$[18]=t4):t4=$[18];const t5=open?collapse:expand;let t6;$[19]!==expandElementRef||$[20]!==open||$[21]!==t5?(t6=/* @__PURE__ */jsx(ExpandButton,{fontSize:1,mode:"bleed",onClick:t5,padding:1,ref:expandElementRef,selected:open,text:"\u2026"}),$[19]=expandElementRef,$[20]=open,$[21]=t5,$[22]=t6):t6=$[22];let t7;$[23]!==open||$[24]!==popoverElementRef||$[25]!==t4||$[26]!==t6?(t7=/* @__PURE__ */jsx(Popover,{constrainSize:!0,content:t4,open,placement:"top",portal:!0,ref:popoverElementRef,children:t6},"button"),$[23]=open,$[24]=popoverElementRef,$[25]=t4,$[26]=t6,$[27]=t7):t7=$[27],t1=[...t2,t7,...rawItems.slice(len-afterLength)],$[0]=afterLength,$[1]=beforeLength,$[2]=collapse,$[3]=expand,$[4]=expandElementRef,$[5]=len,$[6]=open,$[7]=popoverElementRef,$[8]=rawItems,$[9]=space,$[10]=t1;}else t1=$[10];return t1;}return rawItems;}function dialogStyle(_ref74){let{theme}=_ref74;const{color}=getTheme_v2(theme);return{"&:not([hidden])":{display:"flex"},top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center",outline:"none",background:color.backdrop};}function responsiveDialogPositionStyle(props){const{media}=getTheme_v2(props.theme);return _responsive(media,props.$position,position=>({"&&":{position}}));}function animationDialogStyle(props){return props.$animate?css(_templateObject70||(_templateObject70=_taggedTemplateLiteral(["\n @keyframes zoomIn {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n animation: fadeIn 200ms ease-out;\n // Animates the dialog card.\n & > [data-ui='DialogCard'] {\n animation: zoomIn 200ms ease-out;\n }\n "]))):css(_templateObject71||(_templateObject71=_taggedTemplateLiteral([""])));}const DialogContext=createGlobalScopedContext("@sanity/ui/context/dialog",{version:0});function useDialog(){return useContext(DialogContext);}function isTargetWithinScope(boundaryElement,portalElement,target){return!boundaryElement||!portalElement?!0:containsOrEqualsElement(boundaryElement,target)||containsOrEqualsElement(portalElement,target);}const StyledDialog=/* @__PURE__ */styled(Layer).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(responsivePaddingStyle,dialogStyle,responsiveDialogPositionStyle,animationDialogStyle),DialogContainer=styled(Container).withConfig({displayName:"DialogContainer",componentId:"sc-4n4xb3-1"})(_templateObject72||(_templateObject72=_taggedTemplateLiteral(["&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;"]))),DialogCardRoot=styled(Card).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})(_templateObject73||(_templateObject73=_taggedTemplateLiteral(["&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;"]))),DialogLayout=styled(Flex).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})(_templateObject74||(_templateObject74=_taggedTemplateLiteral(["flex:1;min-height:0;width:100%;"]))),DialogHeader=styled(Box).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})(_templateObject75||(_templateObject75=_taggedTemplateLiteral(["position:relative;z-index:2;"]))),DialogContent=styled(Box).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})(_templateObject76||(_templateObject76=_taggedTemplateLiteral(["position:relative;z-index:1;overflow:auto;outline:none;"]))),DialogFooter=styled(Box).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})(_templateObject77||(_templateObject77=_taggedTemplateLiteral(["position:relative;z-index:3;"]))),DialogCard=forwardRef(function(props,forwardedRef){var _portal$elements3;const $=dist.c(44),{__unstable_autoFocus:autoFocus,__unstable_hideCloseButton:hideCloseButton,children,contentRef:forwardedContentRef,footer,header,id,onClickOutside,onClose,portal:portalProp,radius:radiusProp,scheme,shadow:shadowProp,width:widthProp}=props,portal=usePortal(),portalElement=portalProp?((_portal$elements3=portal.elements)===null||_portal$elements3===void 0?void 0:_portal$elements3[portalProp])||null:portal.element,boundaryElement=useBoundaryElement().element;let t0;$[0]!==radiusProp?(t0=_getArrayProp(radiusProp),$[0]=radiusProp,$[1]=t0):t0=$[1];const radius=t0;let t1;$[2]!==shadowProp?(t1=_getArrayProp(shadowProp),$[2]=shadowProp,$[3]=t1):t1=$[3];const shadow=t1;let t2;$[4]!==widthProp?(t2=_getArrayProp(widthProp),$[4]=widthProp,$[5]=t2):t2=$[5];const width=t2,ref=useRef$1(null),contentRef=useRef$1(null),layer=useLayer(),{isTopLayer}=layer,labelId="".concat(id,"_label"),showCloseButton=!!onClose&&hideCloseButton===!1,showHeader=!!header||showCloseButton;let t3;$[6]===Symbol.for("react.memo_cache_sentinel")?(t3=()=>ref.current,$[6]=t3):t3=$[6],useImperativeHandle(forwardedRef,t3);let t4;$[7]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>contentRef.current,$[7]=t4):t4=$[7],useImperativeHandle(forwardedContentRef,t4);let t5,t6;$[8]!==autoFocus?(t5=()=>{autoFocus&&ref.current&&focusFirstDescendant(ref.current);},t6=[autoFocus,ref],$[8]=autoFocus,$[9]=t5,$[10]=t6):(t5=$[9],t6=$[10]),useEffect$1(t5,t6);let t7;$[11]!==boundaryElement||$[12]!==isTopLayer||$[13]!==onClose||$[14]!==portalElement?(t7=event=>{if(!isTopLayer||!onClose)return;const target=document.activeElement;target&&!isTargetWithinScope(boundaryElement,portalElement,target)||event.key==="Escape"&&(event.preventDefault(),event.stopPropagation(),onClose());},$[11]=boundaryElement,$[12]=isTopLayer,$[13]=onClose,$[14]=portalElement,$[15]=t7):t7=$[15],useGlobalKeyDown(t7);let t8;$[16]!==boundaryElement||$[17]!==isTopLayer||$[18]!==onClickOutside||$[19]!==portalElement?(t8=isTopLayer&&onClickOutside&&(event_0=>{const target_0=event_0.target;target_0&&!isTargetWithinScope(boundaryElement,portalElement,target_0)||onClickOutside();}),$[16]=boundaryElement,$[17]=isTopLayer,$[18]=onClickOutside,$[19]=portalElement,$[20]=t8):t8=$[20];let t9;$[21]===Symbol.for("react.memo_cache_sentinel")?(t9=()=>[ref.current],$[21]=t9):t9=$[21],useClickOutsideEvent(t8,t9);let t10;$[22]!==header||$[23]!==labelId||$[24]!==onClose||$[25]!==showCloseButton||$[26]!==showHeader?(t10=showHeader&&/* @__PURE__ */jsx(DialogHeader,{children:/* @__PURE__ */jsxs(Flex,{align:"flex-start",padding:3,children:[/* @__PURE__ */jsx(Box,{flex:1,padding:2,children:header&&/* @__PURE__ */jsx(Text,{id:labelId,size:1,weight:"semibold",children:header})}),showCloseButton&&/* @__PURE__ */jsx(Box,{flex:"none",children:/* @__PURE__ */jsx(Button,{"aria-label":"Close dialog",disabled:!onClose,icon:CloseIcon,mode:"bleed",onClick:onClose,padding:2})})]})}),$[22]=header,$[23]=labelId,$[24]=onClose,$[25]=showCloseButton,$[26]=showHeader,$[27]=t10):t10=$[27];let t11;$[28]!==children?(t11=/* @__PURE__ */jsx(DialogContent,{flex:1,ref:contentRef,tabIndex:-1,children}),$[28]=children,$[29]=t11):t11=$[29];let t12;$[30]!==footer?(t12=footer&&/* @__PURE__ */jsx(DialogFooter,{children:footer}),$[30]=footer,$[31]=t12):t12=$[31];let t13;$[32]!==t10||$[33]!==t11||$[34]!==t12?(t13=/* @__PURE__ */jsxs(DialogLayout,{direction:"column",children:[t10,t11,t12]}),$[32]=t10,$[33]=t11,$[34]=t12,$[35]=t13):t13=$[35];let t14;$[36]!==radius||$[37]!==scheme||$[38]!==shadow||$[39]!==t13?(t14=/* @__PURE__ */jsx(DialogCardRoot,{radius,ref,scheme,shadow,children:t13}),$[36]=radius,$[37]=scheme,$[38]=shadow,$[39]=t13,$[40]=t14):t14=$[40];let t15;return $[41]!==t14||$[42]!==width?(t15=/* @__PURE__ */jsx(DialogContainer,{"data-ui":"DialogCard",width,children:t14}),$[41]=t14,$[42]=width,$[43]=t15):t15=$[43],t15;});DialogCard.displayName="ForwardRef(DialogCard)";const Dialog=forwardRef(function(props,ref){var _props35,_portal$elements4;const $=dist.c(70),dialog=useDialog(),{layer}=useTheme_v2();let _positionProp,_zOffsetProp,children,contentRef,footer,header,id,onActivate,onClickOutside,onClose,onFocus,portalProp,restProps,scheme,t0,t1,t2,t3,t4,t5,t6;$[0]!==props?(_props35=props,{__unstable_autoFocus:t0,__unstable_hideCloseButton:t1,cardRadius:t2,cardShadow:t3,children,contentRef,footer,header,id,onActivate,onClickOutside,onClose,onFocus,padding:t4,portal:portalProp,position:_positionProp,scheme,width:t5,zOffset:_zOffsetProp,animate:t6}=_props35,restProps=_objectWithoutProperties(_props35,_excluded54),_props35,$[0]=props,$[1]=_positionProp,$[2]=_zOffsetProp,$[3]=children,$[4]=contentRef,$[5]=footer,$[6]=header,$[7]=id,$[8]=onActivate,$[9]=onClickOutside,$[10]=onClose,$[11]=onFocus,$[12]=portalProp,$[13]=restProps,$[14]=scheme,$[15]=t0,$[16]=t1,$[17]=t2,$[18]=t3,$[19]=t4,$[20]=t5,$[21]=t6):(_positionProp=$[1],_zOffsetProp=$[2],children=$[3],contentRef=$[4],footer=$[5],header=$[6],id=$[7],onActivate=$[8],onClickOutside=$[9],onClose=$[10],onFocus=$[11],portalProp=$[12],restProps=$[13],scheme=$[14],t0=$[15],t1=$[16],t2=$[17],t3=$[18],t4=$[19],t5=$[20],t6=$[21]);const autoFocus=t0===void 0?!0:t0,hideCloseButton=t1===void 0?!1:t1,cardRadiusProp=t2===void 0?4:t2,cardShadow=t3===void 0?3:t3,paddingProp=t4===void 0?3:t4,widthProp=t5===void 0?0:t5,_animate=t6===void 0?!1:t6,positionProp=_positionProp!==null&&_positionProp!==void 0?_positionProp:dialog.position||"fixed",zOffsetProp=_zOffsetProp!==null&&_zOffsetProp!==void 0?_zOffsetProp:dialog.zOffset||layer.dialog.zOffset,animate=usePrefersReducedMotion()?!1:_animate,portal=usePortal(),portalElement=portalProp?((_portal$elements4=portal.elements)===null||_portal$elements4===void 0?void 0:_portal$elements4[portalProp])||null:portal.element,boundaryElement=useBoundaryElement().element;let t7;$[22]!==cardRadiusProp?(t7=_getArrayProp(cardRadiusProp),$[22]=cardRadiusProp,$[23]=t7):t7=$[23];const cardRadius=t7;let t8;$[24]!==paddingProp?(t8=_getArrayProp(paddingProp),$[24]=paddingProp,$[25]=t8):t8=$[25];const padding=t8;let t9;$[26]!==positionProp?(t9=_getArrayProp(positionProp),$[26]=positionProp,$[27]=t9):t9=$[27];const position=t9;let t10;$[28]!==widthProp?(t10=_getArrayProp(widthProp),$[28]=widthProp,$[29]=t10):t10=$[29];const width=t10;let t11;$[30]!==zOffsetProp?(t11=_getArrayProp(zOffsetProp),$[30]=zOffsetProp,$[31]=t11):t11=$[31];const zOffset=t11,preDivRef=useRef$1(null),postDivRef=useRef$1(null),cardRef=useRef$1(null),focusedElementRef=useRef$1(null);let t12;$[32]!==onFocus?(t12=event=>{var _onFocus2;(_onFocus2=onFocus)===null||_onFocus2===void 0||_onFocus2(event);const target=event.target,cardElement=cardRef.current;if(cardElement&&target===preDivRef.current){focusLastDescendant(cardElement);return;}if(cardElement&&target===postDivRef.current){focusFirstDescendant(cardElement);return;}isHTMLElement(event.target)&&(focusedElementRef.current=event.target);},$[32]=onFocus,$[33]=t12):t12=$[33];const handleFocus=t12,labelId="".concat(id,"_label"),rootClickTimeoutRef=useRef$1(void 0);let t13;$[34]!==boundaryElement||$[35]!==portalElement?(t13=()=>{rootClickTimeoutRef.current&&clearTimeout(rootClickTimeoutRef.current),rootClickTimeoutRef.current=setTimeout(()=>{const activeElement=document.activeElement;if(activeElement&&!isTargetWithinScope(boundaryElement,portalElement,activeElement)){const target_0=focusedElementRef.current;if(!target_0||!document.body.contains(target_0)){const cardElement_0=cardRef.current;cardElement_0&&focusFirstDescendant(cardElement_0);return;}target_0.focus();}},0);},$[34]=boundaryElement,$[35]=portalElement,$[36]=t13):t13=$[36];const handleRootClick=t13;let t14;$[37]===Symbol.for("react.memo_cache_sentinel")?(t14=/* @__PURE__ */jsx("div",{ref:preDivRef,tabIndex:0}),$[37]=t14):t14=$[37];let t15;$[38]!==autoFocus||$[39]!==cardRadius||$[40]!==cardShadow||$[41]!==children||$[42]!==contentRef||$[43]!==footer||$[44]!==header||$[45]!==hideCloseButton||$[46]!==id||$[47]!==onClickOutside||$[48]!==onClose||$[49]!==portalProp||$[50]!==scheme||$[51]!==width?(t15=/* @__PURE__ */jsx(DialogCard,{__unstable_autoFocus:autoFocus,__unstable_hideCloseButton:hideCloseButton,contentRef,footer,header,id,onClickOutside,onClose,portal:portalProp,radius:cardRadius,ref:cardRef,scheme,shadow:cardShadow,width,children}),$[38]=autoFocus,$[39]=cardRadius,$[40]=cardShadow,$[41]=children,$[42]=contentRef,$[43]=footer,$[44]=header,$[45]=hideCloseButton,$[46]=id,$[47]=onClickOutside,$[48]=onClose,$[49]=portalProp,$[50]=scheme,$[51]=width,$[52]=t15):t15=$[52];let t16;$[53]===Symbol.for("react.memo_cache_sentinel")?(t16=/* @__PURE__ */jsx("div",{ref:postDivRef,tabIndex:0}),$[53]=t16):t16=$[53];let t17;$[54]!==animate||$[55]!==handleFocus||$[56]!==handleRootClick||$[57]!==id||$[58]!==labelId||$[59]!==onActivate||$[60]!==padding||$[61]!==position||$[62]!==ref||$[63]!==restProps||$[64]!==t15||$[65]!==zOffset?(t17=/* @__PURE__ */jsxs(StyledDialog,_objectSpread(_objectSpread({},restProps),{},{$animate:animate,$padding:padding,$position:position,"aria-labelledby":labelId,"aria-modal":!0,"data-ui":"Dialog",id,onActivate,onClick:handleRootClick,onFocus:handleFocus,ref,role:"dialog",zOffset,children:[t14,t15,t16]})),$[54]=animate,$[55]=handleFocus,$[56]=handleRootClick,$[57]=id,$[58]=labelId,$[59]=onActivate,$[60]=padding,$[61]=position,$[62]=ref,$[63]=restProps,$[64]=t15,$[65]=zOffset,$[66]=t17):t17=$[66];let t18;return $[67]!==portalProp||$[68]!==t17?(t18=/* @__PURE__ */jsx(Portal,{__unstable_name:portalProp,children:t17}),$[67]=portalProp,$[68]=t17,$[69]=t18):t18=$[69],t18;});Dialog.displayName="ForwardRef(Dialog)";const MenuButton=forwardRef(function(props,forwardedRef){var _buttonProp$props$sel;const $=dist.c(62),{__unstable_disableRestoreFocusOnClose:t0,boundaryElement:deprecated_boundaryElement,button:buttonProp,id,menu:menuProp,onClose,onOpen,placement:deprecated_placement,popoverScheme:deprecated_popoverScheme,portal:t1,popover,popoverRadius:deprecated_popoverRadius,preventOverflow:deprecated_preventOverflow}=props,disableRestoreFocusOnClose=t0===void 0?!1:t0,deprecated_portal=t1===void 0?!0:t1,[open,setOpen]=useState(!1),[shouldFocus,setShouldFocus]=useState(null),[buttonElement,setButtonElement]=useState(null);let t2;$[0]===Symbol.for("react.memo_cache_sentinel")?(t2=[],$[0]=t2):t2=$[0];const[menuElements,setChildMenuElements]=useState(t2),openRef=useRef$1(open);let t3,t4;$[1]!==onOpen||$[2]!==open?(t3=()=>{onOpen&&open&&!openRef.current&&onOpen();},t4=[onOpen,open],$[1]=onOpen,$[2]=open,$[3]=t3,$[4]=t4):(t3=$[3],t4=$[4]),useEffect$1(t3,t4);let t5,t6;$[5]!==onClose||$[6]!==open?(t5=()=>{onClose&&!open&&openRef.current&&onClose();},t6=[onClose,open],$[5]=onClose,$[6]=open,$[7]=t5,$[8]=t6):(t5=$[7],t6=$[8]),useEffect$1(t5,t6);let t7,t8;$[9]!==open?(t7=()=>{openRef.current=open;},t8=[open],$[9]=open,$[10]=t7,$[11]=t8):(t7=$[10],t8=$[11]),useEffect$1(t7,t8);let t9;$[12]===Symbol.for("react.memo_cache_sentinel")?(t9=()=>{setOpen(_temp$2),setShouldFocus(null);},$[12]=t9):t9=$[12];const handleButtonClick=t9;let t10;$[13]!==open?(t10=event=>{open&&event.preventDefault();},$[13]=open,$[14]=t10):t10=$[14];const handleMouseDown=t10;let t11;$[15]===Symbol.for("react.memo_cache_sentinel")?(t11=event_0=>{if(event_0.key==="ArrowDown"||event_0.key==="Enter"||event_0.key===" "){event_0.preventDefault(),setOpen(!0),setShouldFocus("first");return;}if(event_0.key==="ArrowUp"){event_0.preventDefault(),setOpen(!0),setShouldFocus("last");return;}},$[15]=t11):t11=$[15];const handleButtonKeyDown=t11;let t12;$[16]!==buttonElement||$[17]!==menuElements?(t12=event_1=>{const target=event_1.target;if(target instanceof Node&&!(buttonElement&&(target===buttonElement||buttonElement.contains(target)))){for(const el of menuElements)if(target===el||el.contains(target))return;setOpen(!1);}},$[16]=buttonElement,$[17]=menuElements,$[18]=t12):t12=$[18];const handleMenuClickOutside=t12;let t13;$[19]!==buttonElement||$[20]!==disableRestoreFocusOnClose?(t13=()=>{setOpen(!1),!disableRestoreFocusOnClose&&buttonElement&&buttonElement.focus();},$[19]=buttonElement,$[20]=disableRestoreFocusOnClose,$[21]=t13):t13=$[21];const handleMenuEscape=t13;let t14;$[22]!==menuElements?(t14=event_2=>{const target_0=event_2.relatedTarget;if(target_0 instanceof Node){for(const el_0 of menuElements)if(el_0===target_0||el_0.contains(target_0))return;setOpen(!1);}},$[22]=menuElements,$[23]=t14):t14=$[23];const handleBlur=t14;let t15;$[24]!==buttonElement||$[25]!==disableRestoreFocusOnClose?(t15=()=>{setOpen(!1),!disableRestoreFocusOnClose&&buttonElement&&buttonElement.focus();},$[24]=buttonElement,$[25]=disableRestoreFocusOnClose,$[26]=t15):t15=$[26];const handleItemClick=t15;let t16;$[27]===Symbol.for("react.memo_cache_sentinel")?(t16=el_1=>(setChildMenuElements(els=>els.concat([el_1])),()=>setChildMenuElements(els_0=>els_0.filter(_el=>_el!==el_1))),$[27]=t16):t16=$[27];const registerElement=t16;let t17;$[28]!==buttonElement||$[29]!==handleBlur||$[30]!==handleItemClick||$[31]!==handleMenuClickOutside||$[32]!==handleMenuEscape||$[33]!==id||$[34]!==menuProp||$[35]!==shouldFocus?(t17=menuProp&&cloneElement(menuProp,{"aria-labelledby":id,onBlurCapture:handleBlur,onClickOutside:handleMenuClickOutside,onEscape:handleMenuEscape,onItemClick:handleItemClick,originElement:buttonElement,registerElement,shouldFocus}),$[28]=buttonElement,$[29]=handleBlur,$[30]=handleItemClick,$[31]=handleMenuClickOutside,$[32]=handleMenuEscape,$[33]=id,$[34]=menuProp,$[35]=shouldFocus,$[36]=t17):t17=$[36];const menu=t17;let t18;$[37]!==buttonProp||$[38]!==handleMouseDown||$[39]!==id||$[40]!==open?(t18=buttonProp&&cloneElement(buttonProp,{"data-ui":"MenuButton",id,onClick:handleButtonClick,onKeyDown:handleButtonKeyDown,onMouseDown:handleMouseDown,"aria-haspopup":!0,"aria-expanded":open,ref:setButtonElement,selected:(_buttonProp$props$sel=buttonProp.props.selected)!==null&&_buttonProp$props$sel!==void 0?_buttonProp$props$sel:open}),$[37]=buttonProp,$[38]=handleMouseDown,$[39]=id,$[40]=open,$[41]=t18):t18=$[41];const button=t18;let t19,t20;$[42]!==buttonElement?(t19=()=>buttonElement,t20=[buttonElement],$[42]=buttonElement,$[43]=t19,$[44]=t20):(t19=$[43],t20=$[44]),useImperativeHandle(forwardedRef,t19,t20);let t21;$[45]!==popover?(t21=popover||{},$[45]=popover,$[46]=t21):t21=$[46];let t22;$[47]!==deprecated_boundaryElement||$[48]!==deprecated_placement||$[49]!==deprecated_popoverRadius||$[50]!==deprecated_popoverScheme||$[51]!==deprecated_portal||$[52]!==deprecated_preventOverflow||$[53]!==t21?(t22=_objectSpread({boundaryElement:deprecated_boundaryElement,overflow:"auto",placement:deprecated_placement,portal:deprecated_portal,preventOverflow:deprecated_preventOverflow,radius:deprecated_popoverRadius,scheme:deprecated_popoverScheme},t21),$[47]=deprecated_boundaryElement,$[48]=deprecated_placement,$[49]=deprecated_popoverRadius,$[50]=deprecated_popoverScheme,$[51]=deprecated_portal,$[52]=deprecated_preventOverflow,$[53]=t21,$[54]=t22):t22=$[54];const popoverProps=t22;let t23;$[55]!==button?(t23=button||/* @__PURE__ */jsx(Fragment,{}),$[55]=button,$[56]=t23):t23=$[56];let t24;return $[57]!==menu||$[58]!==open||$[59]!==popoverProps||$[60]!==t23?(t24=/* @__PURE__ */jsx(Popover,_objectSpread(_objectSpread({"data-ui":"MenuButton__popover"},popoverProps),{},{content:menu,open,children:t23})),$[57]=menu,$[58]=open,$[59]=popoverProps,$[60]=t23,$[61]=t24):t24=$[61],t24;});MenuButton.displayName="ForwardRef(MenuButton)";function _temp$2(v){return!v;}const keyframe=keyframes$1(_templateObject78||(_templateObject78=_taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"]))),animation=css(_templateObject79||(_templateObject79=_taggedTemplateLiteral(["\n background-image: linear-gradient(\n to right,\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-to),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from)\n );\n background-position: 100%;\n background-size: 200% 100%;\n background-attachment: fixed;\n animation-name: ",";\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n animation-duration: 2000ms;\n"])),keyframe),skeletonStyle=css(_templateObject80||(_templateObject80=_taggedTemplateLiteral(["\n opacity: ",";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ","\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])),_ref75=>{let{$visible}=_ref75;return $visible?1:0;},_ref76=>{let{$animated}=_ref76;return $animated?animation:css(_templateObject81||(_templateObject81=_taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));}),StyledSkeleton$1=/* @__PURE__ */styled(Box).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(responsiveRadiusStyle,skeletonStyle),Skeleton=forwardRef(function(props,ref){var _props36;const $=dist.c(16);let delay,radius,restProps,t0;$[0]!==props?(_props36=props,{animated:t0,delay,radius}=_props36,restProps=_objectWithoutProperties(_props36,_excluded55),_props36,$[0]=props,$[1]=delay,$[2]=radius,$[3]=restProps,$[4]=t0):(delay=$[1],radius=$[2],restProps=$[3],t0=$[4]);const animated=t0===void 0?!1:t0,[visible,setVisible]=useState(!delay);let t1,t2;$[5]!==delay?(t1=()=>{if(!delay)return;const timeout=setTimeout(()=>{setVisible(!0);},delay);return()=>{clearTimeout(timeout);};},t2=[delay],$[5]=delay,$[6]=t1,$[7]=t2):(t1=$[6],t2=$[7]),useEffect$1(t1,t2);let t3;$[8]!==radius?(t3=_getArrayProp(radius),$[8]=radius,$[9]=t3):t3=$[9];const t4=delay?visible:!0;let t5;return $[10]!==animated||$[11]!==ref||$[12]!==restProps||$[13]!==t3||$[14]!==t4?(t5=/* @__PURE__ */jsx(StyledSkeleton$1,_objectSpread(_objectSpread({},restProps),{},{$animated:animated,$radius:t3,$visible:t4,ref})),$[10]=animated,$[11]=ref,$[12]=restProps,$[13]=t3,$[14]=t4,$[15]=t5):t5=$[15],t5;});Skeleton.displayName="ForwardRef(Skeleton)";const StyledSkeleton=/* @__PURE__ */styled(Skeleton).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(props=>{const{$size,$style}=props,{font,media}=getTheme_v2(props.theme),fontStyle=font[$style];return _responsive(media,$size,sizeIndex=>{const fontSize=fontStyle.sizes[sizeIndex];return{height:fontSize.lineHeight-fontSize.ascenderHeight-fontSize.descenderHeight};});}),TextSkeleton=forwardRef(function(props,ref){var _props37;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props37=props,{size:t0}=_props37,restProps=_objectWithoutProperties(_props37,_excluded56),_props37,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"text"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});TextSkeleton.displayName="ForwardRef(TextSkeleton)";const LabelSkeleton=forwardRef(function(props,ref){var _props38;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props38=props,{size:t0}=_props38,restProps=_objectWithoutProperties(_props38,_excluded57),_props38,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"label"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});LabelSkeleton.displayName="ForwardRef(LabelSkeleton)";const HeadingSkeleton=forwardRef(function(props,ref){var _props39;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props39=props,{size:t0}=_props39,restProps=_objectWithoutProperties(_props39,_excluded58),_props39,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"heading"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});HeadingSkeleton.displayName="ForwardRef(HeadingSkeleton)";const CodeSkeleton=forwardRef(function(props,ref){var _props40;const $=dist.c(9);let restProps,t0;$[0]!==props?(_props40=props,{size:t0}=_props40,restProps=_objectWithoutProperties(_props40,_excluded59),_props40,$[0]=props,$[1]=restProps,$[2]=t0):(restProps=$[1],t0=$[2]);const size=t0===void 0?2:t0;let t1;$[3]!==size?(t1=_getArrayProp(size),$[3]=size,$[4]=t1):t1=$[4];const $size=t1;let t2;return $[5]!==$size||$[6]!==ref||$[7]!==restProps?(t2=/* @__PURE__ */jsx(StyledSkeleton,_objectSpread(_objectSpread({},restProps),{},{$size,ref,$style:"code"})),$[5]=$size,$[6]=ref,$[7]=restProps,$[8]=t2):t2=$[8],t2;});CodeSkeleton.displayName="ForwardRef(CodeSkeleton)";const TabPanel=forwardRef(function(props,ref){var _props41;const $=dist.c(9);let flex,restProps;$[0]!==props?(_props41=props,{flex}=_props41,restProps=_objectWithoutProperties(_props41,_excluded60),_props41,$[0]=props,$[1]=flex,$[2]=restProps):(flex=$[1],restProps=$[2]);const t0=props.tabIndex===void 0?0:props.tabIndex;let t1;return $[3]!==flex||$[4]!==props.children||$[5]!==ref||$[6]!==restProps||$[7]!==t0?(t1=/* @__PURE__ */jsx(Box,_objectSpread(_objectSpread({"data-ui":"TabPanel"},restProps),{},{flex,ref,role:"tabpanel",tabIndex:t0,children:props.children})),$[3]=flex,$[4]=props.children,$[5]=ref,$[6]=restProps,$[7]=t0,$[8]=t1):t1=$[8],t1;});TabPanel.displayName="ForwardRef(TabPanel)";const LOADING_BAR_HEIGHT=2;styled(Flex).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})(_templateObject82||(_templateObject82=_taggedTemplateLiteral(["overflow-x:auto;"])));const StyledToast=styled(Card).withConfig({displayName:"StyledToast",componentId:"sc-1rr7rxo-1"})(_templateObject83||(_templateObject83=_taggedTemplateLiteral(["pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(","px / 2);}"])),LOADING_BAR_HEIGHT),LoadingBar=styled.div.withConfig({displayName:"LoadingBar",componentId:"sc-1rr7rxo-2"})(_templateObject84||(_templateObject84=_taggedTemplateLiteral(["display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;"])));styled(Card).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})(_templateObject85||(_templateObject85=_taggedTemplateLiteral(["position:absolute;top:0;left:-","px;right:-","px;bottom:","px;z-index:1;"])),LOADING_BAR_HEIGHT,LOADING_BAR_HEIGHT,LOADING_BAR_HEIGHT);const LoadingBarProgress=styled(Card).withConfig({displayName:"LoadingBarProgress",componentId:"sc-1rr7rxo-4"})(_templateObject86||(_templateObject86=_taggedTemplateLiteral(["display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:",";"])),props=>{const{color}=getTheme_v2(props.theme);return color.button.default[props.tone].enabled.bg;});motion.create(StyledToast);motion.create(Flex);motion.create(Text);motion.create(LoadingBar);motion.create(LoadingBarProgress);createGlobalScopedContext("@sanity/ui/context/toast",null);styled(Grid).withConfig({displayName:"StyledLayer",componentId:"sc-1tbwn58-0"})(_templateObject87||(_templateObject87=_taggedTemplateLiteral(["box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;"])));function _findPrevItemElement(state,itemElements,focusedElement){const idx=itemElements.indexOf(focusedElement),els=itemElements.slice(0,idx),len=els.length;for(let i=len-1;i>=0;i-=1){const itemKey=els[i].getAttribute("data-tree-key");if(!itemKey)continue;const segments=itemKey.split("/");segments.pop();const p=[];let expanded=!0;for(let j=0;j<segments.length;j+=1){var _state$k;p.push(segments[j]);const k=p.join("/");if(!((_state$k=state[k])!==null&&_state$k!==void 0&&_state$k.expanded)){expanded=!1;break;}}if(expanded)return els[i];}return null;}function _findNextItemElement(state,itemElements,focusedElement){const idx=itemElements.indexOf(focusedElement),els=itemElements.slice(idx),len=itemElements.length;for(let i=1;i<len;i+=1){if(!els[i])continue;const itemKey=els[i].getAttribute("data-tree-key");if(!itemKey)continue;const segments=itemKey.split("/");segments.pop();const p=[];let expanded=!0;for(let j=0;j<segments.length;j+=1){var _state$k2;p.push(segments[j]);const k=p.join("/");if(!((_state$k2=state[k])!==null&&_state$k2!==void 0&&_state$k2.expanded)){expanded=!1;break;}}if(expanded)return els[i];}return null;}function _focusItemElement(el){if(el.getAttribute("role")==="treeitem"&&el.focus(),el.getAttribute("role")==="none"){const firstChild=el.firstChild;firstChild&&firstChild instanceof HTMLElement&&firstChild.focus();}}const TreeContext=createGlobalScopedContext("@sanity/ui/context/tree",null),Tree=forwardRef(function(props,forwardedRef){var _props42;const $=dist.c(37);let children,onFocus,restProps,t0;$[0]!==props?(_props42=props,{children,space:t0,onFocus}=_props42,restProps=_objectWithoutProperties(_props42,_excluded61),_props42,$[0]=props,$[1]=children,$[2]=onFocus,$[3]=restProps,$[4]=t0):(children=$[1],onFocus=$[2],restProps=$[3],t0=$[4]);const space=t0===void 0?1:t0,ref=useRef$1(null),[focusedElement,setFocusedElement]=useState(null),focusedElementRef=useRef$1(focusedElement);let t1;$[5]===Symbol.for("react.memo_cache_sentinel")?(t1=[],$[5]=t1):t1=$[5];const path=t1;let t2;$[6]===Symbol.for("react.memo_cache_sentinel")?(t2=[],$[6]=t2):t2=$[6];const[itemElements,setItemElements]=useState(t2);let t3;$[7]===Symbol.for("react.memo_cache_sentinel")?(t3={},$[7]=t3):t3=$[7];const[state,setState]=useState(t3),stateRef=useRef$1(state);let t4;$[8]===Symbol.for("react.memo_cache_sentinel")?(t4=()=>ref.current,$[8]=t4):t4=$[8],useImperativeHandle(forwardedRef,t4);let t5,t6;$[9]!==focusedElement?(t5=()=>{focusedElementRef.current=focusedElement;},t6=[focusedElement],$[9]=focusedElement,$[10]=t5,$[11]=t6):(t5=$[10],t6=$[11]),useEffect$1(t5,t6);let t7,t8;$[12]!==state?(t7=()=>{stateRef.current=state;},t8=[state],$[12]=state,$[13]=t7,$[14]=t8):(t7=$[13],t8=$[14]),useEffect$1(t7,t8);let t9;$[15]===Symbol.for("react.memo_cache_sentinel")?(t9=(element,path_0,expanded,selected)=>(setState(s=>_objectSpread(_objectSpread({},s),{},{[path_0]:{element,expanded}})),selected&&setFocusedElement(element),()=>{setState(s_0=>{const newState=_objectSpread({},s_0);return delete newState[path_0],newState;});}),$[15]=t9):t9=$[15];const registerItem=t9;let t10;$[16]===Symbol.for("react.memo_cache_sentinel")?(t10=(path_1,expanded_0)=>{setState(s_1=>{const itemState=s_1[path_1];return itemState?_objectSpread(_objectSpread({},s_1),{},{[path_1]:_objectSpread(_objectSpread({},itemState),{},{expanded:expanded_0})}):s_1;});},$[16]=t10):t10=$[16];const setExpanded=t10,t11=focusedElement||itemElements[0]||null;let t12;$[17]!==space||$[18]!==state||$[19]!==t11?(t12={version:0,focusedElement:t11,level:0,path,registerItem,setExpanded,setFocusedElement,space,state},$[17]=space,$[18]=state,$[19]=t11,$[20]=t12):t12=$[20];const contextValue=t12;let t13;$[21]!==itemElements?(t13=event=>{if(focusedElementRef.current){if(event.key==="ArrowDown"){event.preventDefault();const nextEl=_findNextItemElement(stateRef.current,itemElements,focusedElementRef.current);nextEl&&(_focusItemElement(nextEl),setFocusedElement(nextEl));return;}if(event.key==="ArrowUp"){event.preventDefault();const prevEl=_findPrevItemElement(stateRef.current,itemElements,focusedElementRef.current);prevEl&&(_focusItemElement(prevEl),setFocusedElement(prevEl));return;}if(event.key==="ArrowLeft"){event.preventDefault();const itemKey=focusedElementRef.current.getAttribute("data-tree-key");if(!itemKey)return;const itemState_0=stateRef.current[itemKey];if(!itemState_0)return;if(itemState_0.expanded)setState(s_2=>{const itemState_1=s_2[itemKey];return itemState_1?_objectSpread(_objectSpread({},s_2),{},{[itemKey]:_objectSpread(_objectSpread({},itemState_1),{},{expanded:!1})}):s_2;});else{const itemPath=itemKey.split("/");itemPath.pop();const parentKey=itemPath.join("/"),parentState=parentKey&&stateRef.current[parentKey];parentState&&(parentState.element.focus(),setFocusedElement(parentState.element));}return;}if(event.key==="ArrowRight"){var _stateRef$current$foc;event.preventDefault();const focusedKey=focusedElementRef.current.getAttribute("data-tree-key");if(!focusedKey)return;((_stateRef$current$foc=stateRef.current[focusedKey])===null||_stateRef$current$foc===void 0?void 0:_stateRef$current$foc.expanded)||setState(s_3=>{const itemState_2=s_3[focusedKey];return itemState_2?_objectSpread(_objectSpread({},s_3),{},{[focusedKey]:_objectSpread(_objectSpread({},itemState_2),{},{expanded:!0})}):s_3;});return;}}},$[21]=itemElements,$[22]=t13):t13=$[22];const handleKeyDown=t13;let t14;$[23]!==onFocus?(t14=event_0=>{var _onFocus3;setFocusedElement(event_0.target),(_onFocus3=onFocus)===null||_onFocus3===void 0?void 0:_onFocus3(event_0);},$[23]=onFocus,$[24]=t14):t14=$[24];const handleFocus=t14;let t15;$[25]===Symbol.for("react.memo_cache_sentinel")?(t15=()=>{if(!ref.current)return;const _itemElements=Array.from(ref.current.querySelectorAll('[data-ui="TreeItem"]'));setItemElements(_itemElements);},$[25]=t15):t15=$[25];let t16;$[26]!==children?(t16=[children],$[26]=children,$[27]=t16):t16=$[27],useEffect$1(t15,t16);let t17;$[28]!==children||$[29]!==handleFocus||$[30]!==handleKeyDown||$[31]!==restProps||$[32]!==space?(t17=/* @__PURE__ */jsx(Stack,_objectSpread(_objectSpread({as:"ul","data-ui":"Tree"},restProps),{},{onFocus:handleFocus,onKeyDown:handleKeyDown,ref,role:"tree",space,children})),$[28]=children,$[29]=handleFocus,$[30]=handleKeyDown,$[31]=restProps,$[32]=space,$[33]=t17):t17=$[33];let t18;return $[34]!==contextValue||$[35]!==t17?(t18=/* @__PURE__ */jsx(TreeContext.Provider,{value:contextValue,children:t17}),$[34]=contextValue,$[35]=t17,$[36]=t18):t18=$[36],t18;});Tree.displayName="ForwardRef(Tree)";styled(Text).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})(_templateObject88||(_templateObject88=_taggedTemplateLiteral(["& > svg{transition:transform 100ms;}"])));const listenOptions={includeResult:false,includePreviousRevision:false,visibility:"query",events:["welcome","mutation","reconnect"]};function useClient(){return useClient$1({apiVersion:"2023-02-01"});}const isSchemaMulti=type=>{return type.jsonType!=="object";};const isSchemaReference=type=>{return"to"in type||"of"in type&&type.of[0]&&"to"in type.of[0];};const filterUniqueTags=function(){let tags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return tags.flat(Infinity).filter((firstTag,index)=>{const firstTagStringified=JSON.stringify({label:firstTag.label,value:firstTag.value});return index===tags.flat(Infinity).findIndex(secondTag=>{return JSON.stringify({label:secondTag.label,value:secondTag.value})===firstTagStringified;});});};const get=(object,path,defaultValue)=>{if(!object)return defaultValue;let props=false;let prop;if(Array.isArray(path))props=path.slice(0);if(typeof path==="string")props=path.split(".");if(!Array.isArray(props))throw new Error("path must be an array or a string");let obj=object;while(props.length){prop=props.shift();if(!prop)return defaultValue;if(!obj)return defaultValue;if(obj===null||typeof obj!=="object"||Array.isArray(obj))return defaultValue;if(!(prop in obj))return defaultValue;obj=obj[prop];}return obj;};function prototypeCheck(prop){if(prop==="__proto__"||prop==="constructor"||prop==="prototype")return false;return true;}const setAtPath=(object,path,value)=>{let props=false;if(Array.isArray(path))props=path.slice(0);if(typeof path==="string")props=path.split(".");if(!Array.isArray(props))throw new Error("path must be an array or a string");const lastProp=props.pop();if(!lastProp)return false;if(!prototypeCheck(lastProp))throw new Error("setting of prototype values not supported");let thisProp;let obj=object;while(thisProp=props.shift()){if(!prototypeCheck(thisProp))throw new Error("setting of prototype values not supported");if(!thisProp)return false;if(!(thisProp in obj))obj[thisProp]={};obj=obj[thisProp];if(!obj||typeof obj!=="object")return false;}obj[lastProp]=value;return true;};function isPlainObject(value){return typeof value==="object"&&value!==null&&value.constructor===Object&&Object.prototype.toString.call(value)==="[object Object]";}var __defProp$2=Object.defineProperty;var __getOwnPropSymbols$2=Object.getOwnPropertySymbols;var __hasOwnProp$2=Object.prototype.hasOwnProperty;var __propIsEnum$2=Object.prototype.propertyIsEnumerable;var __defNormalProp$2=(obj,key,value)=>key in obj?__defProp$2(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __spreadValues$2=(a,b)=>{for(var prop in b||(b={}))if(__hasOwnProp$2.call(b,prop))__defNormalProp$2(a,prop,b[prop]);if(__getOwnPropSymbols$2)for(var prop of __getOwnPropSymbols$2(b)){if(__propIsEnum$2.call(b,prop))__defNormalProp$2(a,prop,b[prop]);}return a;};const useLoading=_ref77=>{let{initialLoadingOptions={},initialState=true}=_ref77;const[loadingOptions,setLoadingOptions]=React__default.useState(initialLoadingOptions);const[isLoading,setIsLoading]=React__default.useState(initialState);React__default.useEffect(()=>{let loaded=false;if(Object.keys(loadingOptions).length){for(const option in loadingOptions){if(loadingOptions[option])loaded=true;}}setIsLoading(loaded);},[loadingOptions]);const setLoadOption=React__default.useCallback(properties=>{setLoadingOptions(oldValue=>{return __spreadValues$2(__spreadValues$2({},oldValue),properties);});},[]);return[isLoading,loadingOptions,setLoadOption];};const useOptions=_ref78=>{let{initialState=[]}=_ref78;const[options,setOptions]=React__default.useState(initialState);const[groupOptions,setGroupOptions]=React__default.useState({});React__default.useEffect(()=>{const opts=[];for(const group in groupOptions){if(Array.isArray(groupOptions[group]))opts.push(...groupOptions[group]);}setOptions(filterUniqueTags(opts));},[groupOptions]);const setTagOption=React__default.useCallback(properties=>{setGroupOptions(oldValue=>__spreadValues$2(__spreadValues$2({},oldValue),properties));},[]);return[options,groupOptions,setTagOption];};var __defProp$1=Object.defineProperty;var __defProps$1=Object.defineProperties;var __getOwnPropDescs$1=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols$1=Object.getOwnPropertySymbols;var __hasOwnProp$1=Object.prototype.hasOwnProperty;var __propIsEnum$1=Object.prototype.propertyIsEnumerable;var __defNormalProp$1=(obj,key,value)=>key in obj?__defProp$1(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __spreadValues$1=(a,b)=>{for(var prop in b||(b={}))if(__hasOwnProp$1.call(b,prop))__defNormalProp$1(a,prop,b[prop]);if(__getOwnPropSymbols$1)for(var prop of __getOwnPropSymbols$1(b)){if(__propIsEnum$1.call(b,prop))__defNormalProp$1(a,prop,b[prop]);}return a;};var __spreadProps$1=(a,b)=>__defProps$1(a,__getOwnPropDescs$1(b));const prepareTag=_ref79=>{let{customLabel="label",customValue="value"}=_ref79;return tag=>{const labelValue=get(tag,customLabel);const valueValue=get(tag,customValue);const labelSource=labelValue!=null?labelValue:tag.label;const valueSource=valueValue!=null?valueValue:tag.value;const label=labelSource===null?"":String(labelSource);const value=valueSource===null?"":String(valueSource);const tempTag=__spreadProps$1(__spreadValues$1({},tag),{_type:"tag",_key:value,_labelTemp:tag.label,_valueTemp:tag.value,label,value});return tempTag;};};function revertTag(_ref80){let{customLabel="label",customValue="value",isReference}=_ref80;return tag=>{if(isReference===true){const tempTag2={_ref:tag._id,_type:"reference"};return tempTag2;}const tempTag=__spreadProps$1(__spreadValues$1({},tag),{label:tag._labelTemp,value:tag._valueTemp});setAtPath(tempTag,customLabel,tag.label);setAtPath(tempTag,customValue,tag.value);delete tempTag._labelTemp;delete tempTag._valueTemp;if(tempTag.label===void 0)delete tempTag.label;if(tempTag.value===void 0)delete tempTag.value;return tempTag;};}const prepareTags=async _ref81=>{let{client,tags,customLabel="label",customValue="value"}=_ref81;const prepare=prepareTag({customLabel,customValue});if(tags===void 0||tags===null)return void 0;if(Array.isArray(tags)&&!tags.length)return[];if(Array.isArray(tags)&&tags.length&&!isPlainObject(tags[0])){const normalized=tags.map(tag=>{const value=String(tag);const tempTag={label:value,value};setAtPath(tempTag,customLabel,value);setAtPath(tempTag,customValue,value);return tempTag;});return normalized.map(prepare);}if(Array.isArray(tags)&&isPlainObject(tags[0])&&"_ref"in tags[0]&&"_type"in tags[0]){return(await client.fetch("*[_id in $refs]",{refs:tags.map(tag=>tag._ref)})).map(prepare);}if(Array.isArray(tags))return tags.map(prepare);if(!isPlainObject(tags)){const value=String(tags);const tempTag={label:value,value};setAtPath(tempTag,customLabel,value);setAtPath(tempTag,customValue,value);return prepare(tempTag);}if(isPlainObject(tags)&&"_ref"in tags&&"_type"in tags)return prepare(await client.fetch("*[_id == $ref][0]",{ref:tags._ref}));return prepare(tags);};const prepareTagsAsList=async preparedTagsOptions=>{const preparedTags=await prepareTags(preparedTagsOptions);if(preparedTags===void 0)return[];if(!Array.isArray(preparedTags))return[preparedTags];return preparedTags;};function revertTags(_ref82){let{tags,customLabel="label",customValue="value",isMulti,isReference}=_ref82;const revert=revertTag({customLabel,customValue,isReference});if(tags===void 0||tags===null)return void 0;if(isMulti){const tagsArray=Array.isArray(tags)?tags:[tags];if(isReference)return tagsArray.map(revert);return tagsArray.map(revert);}const tag=Array.isArray(tags)?tags[0]:tags;if(isReference)return revert(tag);return revert(tag);}const refineTagsPipe=_ref83=>{let{client,customLabel="label",customValue="value"}=_ref83;return pipe$1(map(val=>Array.isArray(val)?val.flat(Infinity):val),switchMap(val=>prepareTagsAsList({client,tags:val,customLabel,customValue})),map(val=>filterUniqueTags(val)));};const getGeneralObservable=_ref84=>{let{client,query,params,customLabel="label",customValue="value"}=_ref84;return client.listen(query,params,listenOptions).pipe(switchMap(()=>client.fetch(query,params)),refineTagsPipe({client,customLabel,customValue}));};function getSelectedTags(_ref85){let{client,tags,isMulti,customLabel="label",customValue="value"}=_ref85;const tagFunction=async()=>tags;return defer(()=>from(tagFunction())).pipe(refineTagsPipe({client,customLabel,customValue}),map(val=>isMulti?val:val[0]));}const predefinedTagWrapper=async predefinedTags=>{const tags=await predefinedTags();if(!Array.isArray(tags))return[tags];return tags;};const getPredefinedTags=_ref86=>{let{client,predefinedTags,customLabel="label",customValue="value"}=_ref86;const tagFunction=predefinedTags instanceof Function?predefinedTags:async()=>predefinedTags;return defer(()=>from(predefinedTagWrapper(tagFunction)).pipe(refineTagsPipe({client,customLabel,customValue})));};const getTagsFromReference=_ref87=>{let{client,document,customLabel="label",customValue="value"}=_ref87;const query='\n *[ _type == $document && defined(@[$customLabel]) && defined(@[$customValue])] {\n _id,\n "value": coalesce(@[$customValue].current,@[$customValue]),\n "label": @[$customLabel]\n }\n ';const params={document,customLabel:customLabel.split(".")[0],customValue:customValue.split(".")[0]};return getGeneralObservable({client,query,params,customLabel,customValue});};const getTagsFromRelated=_ref88=>{let{client,documentType,field,isMulti,customLabel="label",customValue="value"}=_ref88;const query="\n *[\n _type == $documentType &&\n defined(@[$field]) &&\n defined(@[$field][]) == $isMulti &&\n (\n (!$isMulti && defined(@[$field]->[$customLabel]) && defined(@[$field]->[$customValue])) ||\n (!$isMulti && defined(@[$field][$customLabel]) && defined(@[$field][$customValue])) ||\n ($isMulti && defined(@[$field][]->[$customLabel]) && defined(@[$field][]->[$customValue])) ||\n ($isMulti && defined(@[$field][][$customLabel]) && defined(@[$field][][$customValue]))\n )\n ][$field]\n ";const params={documentType,field,isMulti,customLabel:customLabel.split(".")[0],customValue:customValue.split(".")[0]};return getGeneralObservable({client,query,params,customLabel,customValue});};const ReferenceCreateWarning=()=>/* @__PURE__ */jsxs(Card,{padding:[3,3,4],marginBottom:[3,3,4],radius:2,shadow:1,tone:"caution",children:["Tag References cannot be created inline. Please set the ",/* @__PURE__ */jsx("code",{children:"allowCreate"})," option explicitly to ",/* @__PURE__ */jsx("code",{children:"false"})," to remove this warning message."]});const ReferencePredefinedWarning=()=>/* @__PURE__ */jsxs(Card,{padding:[3,3,4],marginBottom:[3,3,4],radius:2,shadow:1,tone:"caution",children:["Tag References cannot have predefined tags. Please unset the ",/* @__PURE__ */jsx("code",{children:"predefinedTags"})," option to remove this warning message."]});function styleInject(css,ref){if(ref===void 0)ref={};var insertAt=ref.insertAt;if(!css||typeof document==='undefined'){return;}var head=document.head||document.getElementsByTagName('head')[0];var style=document.createElement('style');style.type='text/css';if(insertAt==='top'){if(head.firstChild){head.insertBefore(style,head.firstChild);}else{head.appendChild(style);}}else{head.appendChild(style);}if(style.styleSheet){style.styleSheet.cssText=css;}else{style.appendChild(document.createTextNode(css));}}var css_248z=".TagsInput-module_control__Om-kz {\n background-color: var(--card-bg-color) !important;\n border-color: var(--card-border-color) !important;\n transition: none !important;\n}\n\n.TagsInput-module_input__fdTrV {\n color: var(--input-fg-color) !important;\n}\n\n.TagsInput-module_control__Om-kz:hover {\n border-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_menu__l2H-i {\n background-color: var(--card-bg-color) !important;\n border: 1px solid var(--card-border-color) !important;\n}\n\n.TagsInput-module_option__cqS2H {\n background-color: var(--card-bg-color) !important;\n color: var(--input-fg-color) !important;\n}\n\n.TagsInput-module_option__cqS2H:hover {\n background-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_indicatorSeparator__koEIb {\n background-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_placeholder__ZjU5A,\n.TagsInput-module_singleValue__bIhOY {\n color: var(--input-fg-color) !important;\n}\n\n.TagsInput-module_multiValue__zq4m6 {\n background-color: var(--card-border-color) !important;\n}\n\n.TagsInput-module_multiValueLabel__R9vFQ {\n color: var(--card-fg-color) !important;\n}\n\n.TagsInput-module_multiValueRemove__2zX5H {\n color: var(--card-fg-color) !important;\n}\n\n.TagsInput-module_multiValueRemove__2zX5H:hover {\n color: #de350b !important;\n}\n";var styles={"control":"TagsInput-module_control__Om-kz","input":"TagsInput-module_input__fdTrV","menu":"TagsInput-module_menu__l2H-i","option":"TagsInput-module_option__cqS2H","indicatorSeparator":"TagsInput-module_indicatorSeparator__koEIb","placeholder":"TagsInput-module_placeholder__ZjU5A","singleValue":"TagsInput-module_singleValue__bIhOY","multiValue":"TagsInput-module_multiValue__zq4m6","multiValueLabel":"TagsInput-module_multiValueLabel__R9vFQ","multiValueRemove":"TagsInput-module_multiValueRemove__2zX5H"};styleInject(css_248z);var __defProp=Object.defineProperty;var __defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty;var __propIsEnum=Object.prototype.propertyIsEnumerable;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __spreadValues=(a,b)=>{for(var prop in b||(b={}))if(__hasOwnProp.call(b,prop))__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b)){if(__propIsEnum.call(b,prop))__defNormalProp(a,prop,b[prop]);}return a;};var __spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b));const TagsInput=forwardRef((props,ref)=>{const client=useClient();const documentType=useFormValue(["_type"]);const[selected,setSelected]=React__default.useState(void 0);const[isLoading,,setLoadOption]=useLoading({});const[options,,setTagOption]=useOptions({});const prefersDark=usePrefersDark();const{schemaType,// Schema information
|
|
2351
2351
|
value,// Current field value
|
|
2352
2352
|
readOnly,// Boolean if field is not editable
|
|
2353
2353
|
onChange// Method to handle patch events
|
|
2354
2354
|
}=props;const isMulti=isSchemaMulti(schemaType);const isReference=isSchemaReference(schemaType);const{predefinedTags=void 0,includeFromReference=false,includeFromRelated=false,customLabel="label",customValue="value",allowCreate=true,onCreate=async val=>{const tag={};setAtPath(tag,customLabel,val);setAtPath(tag,customValue,val);return tag;},checkValid=(inputValue,currentValues)=>!currentValues.includes(inputValue)&&!!inputValue&&inputValue.trim()===inputValue,reactSelectOptions={}}=schemaType.options?schemaType.options:{};const resolvedPredefinedTags=Array.isArray(predefinedTags)&&!predefinedTags.length?void 0:predefinedTags;const isReferenceCreateWarning=schemaType.options&&allowCreate&&isReference;const isReferencePredefinedWarning=schemaType.options&&!!resolvedPredefinedTags&&isReference;useEffect$1(()=>{const defaultSubscription={// eslint-disable-next-line no-empty-function
|
|
2355
|
-
unsubscribe:()=>{}};let selectedSubscription=defaultSubscription;let predefinedSubscription=defaultSubscription;let relatedSubscription=defaultSubscription;let referenceSubscription=defaultSubscription;setLoadOption({selectedTags:true,predefinedTags:true,referenceTags:true,relatedTags:true});selectedSubscription=getSelectedTags({client,tags:value,customLabel,customValue,isMulti}).subscribe(tags=>{setSelected(tags);setLoadOption({selectedTags:false});});if(resolvedPredefinedTags===void 0){setTagOption({predefinedTags:[]});setLoadOption({predefinedTags:false});}else{predefinedSubscription=getPredefinedTags({client,predefinedTags:resolvedPredefinedTags,customLabel,customValue}).subscribe(tags=>{setTagOption({predefinedTags:tags});setLoadOption({predefinedTags:false});});}if(typeof includeFromReference==="string"){referenceSubscription=getTagsFromReference({client,document:includeFromReference,customLabel,customValue}).subscribe(tags=>{setTagOption({referenceTags:tags});setLoadOption({referenceTags:false});});}else{setLoadOption({referenceTags:false});}if(typeof includeFromRelated==="string"){relatedSubscription=getTagsFromRelated({client,documentType,field:includeFromRelated,isMulti,customLabel,customValue}).subscribe(tags=>{setTagOption({relatedTags:tags});setLoadOption({relatedTags:false});});}else{setLoadOption({relatedTags:false});}return()=>{selectedSubscription.unsubscribe();predefinedSubscription.unsubscribe();relatedSubscription.unsubscribe();referenceSubscription.unsubscribe();};},[client,value,customLabel,customValue,isMulti,resolvedPredefinedTags,includeFromReference,includeFromRelated,documentType,setLoadOption,setTagOption]);const handleChange=useCallback(inputValue=>{setSelected(
|
|
2355
|
+
unsubscribe:()=>{}};let selectedSubscription=defaultSubscription;let predefinedSubscription=defaultSubscription;let relatedSubscription=defaultSubscription;let referenceSubscription=defaultSubscription;setLoadOption({selectedTags:true,predefinedTags:true,referenceTags:true,relatedTags:true});selectedSubscription=getSelectedTags({client,tags:value,customLabel,customValue,isMulti}).subscribe(tags=>{setSelected(tags);setLoadOption({selectedTags:false});});if(resolvedPredefinedTags===void 0){setTagOption({predefinedTags:[]});setLoadOption({predefinedTags:false});}else{predefinedSubscription=getPredefinedTags({client,predefinedTags:resolvedPredefinedTags,customLabel,customValue}).subscribe(tags=>{setTagOption({predefinedTags:tags});setLoadOption({predefinedTags:false});});}if(typeof includeFromReference==="string"){referenceSubscription=getTagsFromReference({client,document:includeFromReference,customLabel,customValue}).subscribe(tags=>{setTagOption({referenceTags:tags});setLoadOption({referenceTags:false});});}else{setLoadOption({referenceTags:false});}if(typeof includeFromRelated==="string"){relatedSubscription=getTagsFromRelated({client,documentType,field:includeFromRelated,isMulti,customLabel,customValue}).subscribe(tags=>{setTagOption({relatedTags:tags});setLoadOption({relatedTags:false});});}else{setLoadOption({relatedTags:false});}return()=>{selectedSubscription.unsubscribe();predefinedSubscription.unsubscribe();relatedSubscription.unsubscribe();referenceSubscription.unsubscribe();};},[client,value,customLabel,customValue,isMulti,resolvedPredefinedTags,includeFromReference,includeFromRelated,documentType,setLoadOption,setTagOption]);const handleChange=useCallback(inputValue=>{const normalizedInput=inputValue!=null?inputValue:void 0;setSelected(normalizedInput);const tagsForEvent=revertTags({tags:normalizedInput,customLabel,customValue,isMulti,isReference});onChange(tagsForEvent?set(tagsForEvent):unset(tagsForEvent));},[onChange,customLabel,customValue,isMulti,isReference]);const handleCreate=React__default.useCallback(async inputValue=>{setLoadOption({handleCreate:true});const newCreateValue=await prepareTags({client,customLabel,customValue,tags:await onCreate(inputValue)});if(Array.isArray(selected)){handleChange([...selected,newCreateValue]);}else{handleChange(newCreateValue);}setLoadOption({handleCreate:false});},[client,customLabel,customValue,onCreate,selected,handleChange,setLoadOption]);const selectOptions=__spreadValues({isLoading,ref,isMulti,options,value:selected,isValidNewOption:(inputValue,selectedValues,selectedOptions)=>{return checkValid(inputValue,[...selectedOptions.map(opt=>opt.value),...selectedValues.map(val=>val.value)]);},onCreateOption:handleCreate,onChange:handleChange,isDisabled:readOnly||isLoading,styles:{menu:base=>__spreadProps(__spreadValues({},base),{zIndex:15// Adjusted dropdown menu z-index to prevent overlap with background items
|
|
2356
2356
|
})},classNames:prefersDark?{container:()=>styles.container,control:()=>styles.control,input:()=>styles.input,menu:()=>styles.menu,option:()=>styles.option,indicatorSeparator:()=>styles.indicatorSeparator,placeholder:()=>styles.placeholder,singleValue:()=>styles.singleValue,multiValue:()=>styles.multiValue,multiValueLabel:()=>styles.multiValueLabel,multiValueRemove:()=>styles.multiValueRemove}:{container:()=>styles.container,control:()=>styles.control,input:()=>styles.input,menu:()=>styles.menu,option:()=>styles.option,indicatorSeparator:()=>styles.indicatorSeparator,placeholder:()=>styles.placeholder,singleValue:()=>styles.singleValue,multiValue:()=>styles.multiValue,multiValueLabel:()=>styles.multiValueLabel,multiValueRemove:()=>styles.multiValueRemove}},reactSelectOptions);return/* @__PURE__ */jsxs(Fragment,{children:[isReferenceCreateWarning&&/* @__PURE__ */jsx(ReferenceCreateWarning,{}),isReferencePredefinedWarning&&/* @__PURE__ */jsx(ReferencePredefinedWarning,{}),allowCreate&&!isReference?/* @__PURE__ */jsx(CreatableSelect,__spreadValues({},selectOptions)):/* @__PURE__ */jsx(Select$1,__spreadValues({},selectOptions))]});});TagsInput.displayName="TagsInput";const tagSchema={name:"tag",title:"Tag",type:"object",components:{input:TagsInput},fields:[{name:"value",type:"string"},{name:"label",type:"string"}]};const tagsSchema={name:"tags",title:"Tags",type:"array",components:{input:TagsInput},of:[{type:"tag"}]};const tags=definePlugin(()=>({name:"sanity-plugin-tags",schema:{types:[tagSchema,tagsSchema]}}));export{dist,tags};
|
|
2357
|
-
//# sourceMappingURL=index-
|
|
2357
|
+
//# sourceMappingURL=index-50487dd3.js.map
|