@puddle-code/cli 0.4.10 → 0.4.13
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/CHANGELOG.md +8 -48
- package/README.md +1 -1
- package/dist/index.js +13 -3
- package/dist/public/assets/App-BOGDHWlW.js +23 -0
- package/dist/public/assets/{CompilationCommandForm-B-CEimt-.js → CompilationCommandForm-DQjUhaHj.js} +1 -1
- package/dist/public/assets/Dashboard-DyNOxwSR.js +1 -0
- package/dist/public/assets/{EditorTabClose-DoclvCbs.js → EditorTabClose-CQnXn4Ha.js} +1 -1
- package/dist/public/assets/{FindWidget-CNxi2b9L.js → FindWidget-Bh_7yWNg.js} +1 -1
- package/dist/public/assets/{LazyTerminal-BffV6rzu.js → LazyTerminal-BjT3haSN.js} +2 -2
- package/dist/public/assets/{NotebookWidget-CpzrWj4z.js → NotebookWidget-CPhHup1W.js} +1 -1
- package/dist/public/assets/PaneEditorBody-DCGP8CyB.js +284 -0
- package/dist/public/assets/{ReleaseNotesDialog-CN7W2Evg.js → ReleaseNotesDialog-BD0uYU6B.js} +1 -1
- package/dist/public/assets/Ripple-B-wG6_Xj.js +7 -0
- package/dist/public/assets/Ripple-V2kU3kad.css +1 -0
- package/dist/public/assets/SettingsDialog-DwWcTOGl.js +8 -0
- package/dist/public/assets/Terminal-DzImIFH4.js +65 -0
- package/dist/public/assets/Workspace-CjOdyZwS.js +20 -0
- package/dist/public/assets/{_virtual_notebook-widget-runtime-Dro422xS.js → _virtual_notebook-widget-runtime-BDEYw1H-.js} +88 -88
- package/dist/public/assets/arrow-down-CtYa-Aya.js +1 -0
- package/dist/public/assets/button-DtByPSFL.js +1 -0
- package/dist/public/assets/client-settings-BdKglwtW.js +1 -0
- package/dist/public/assets/command--8Svn0Z-.js +1 -0
- package/dist/public/assets/desktop-Bl69_YmL.js +1 -0
- package/dist/public/assets/dialog-DtvE8ATK.js +41 -0
- package/dist/public/assets/dist-B8heQ9Kq.js +1 -0
- package/dist/public/assets/{dist-DDTfSNTu.js → dist-BeQvHdsz.js} +1 -1
- package/dist/public/assets/dist-DZg8Dwbr.js +1 -0
- package/dist/public/assets/dist-Dac0re_p.js +1 -0
- package/dist/public/assets/{expanding-content-Bens1wCS.js → expanding-content-xApnlOBO.js} +1 -1
- package/dist/public/assets/forward-link-CAXhnLYS.js +1 -0
- package/dist/public/assets/{index-CHGSBAX2.css → index-BfQvnKtf.css} +1 -1
- package/dist/public/assets/{index-OKzoyhKK.js → index-MjsHIzAR.js} +3 -3
- package/dist/public/assets/link-buffer-DcFk9vqt.js +1 -0
- package/dist/public/assets/{markdown-CMSzQtLp.js → markdown-BaCjN652.js} +1 -1
- package/dist/public/assets/media-refresh-store-CYiYB60R.js +1 -0
- package/dist/public/assets/{motion-CxPWS8Fa.js → motion-Bd_MB9cH.js} +1 -1
- package/dist/public/assets/notification-delivery-14yN_sWJ.js +1 -0
- package/dist/public/assets/popover-D5HmbdQ7.js +1 -0
- package/dist/public/assets/preferences-DC7PJ3Go.js +1 -0
- package/dist/public/assets/render-rich-content-Dvum-lQy.js +4 -0
- package/dist/public/assets/select-CGxTz4dh.js +1 -0
- package/dist/public/assets/{session-order-rnLHD6HV.js → session-order-iVRWTB-C.js} +1 -1
- package/dist/public/assets/square-terminal-CIkfNq3I.js +1 -0
- package/dist/public/assets/switch-DYr-iPWY.js +1 -0
- package/dist/public/assets/use-ui-state-CyfRHVgg.js +1 -0
- package/dist/public/assets/waves-horizontal-CLDJf7Dd.js +1 -0
- package/dist/public/assets/ws-CS9chtfK.js +1 -0
- package/dist/public/assets/x-DV6-RYI2.js +1 -0
- package/dist/public/index.html +3 -3
- package/package.json +1 -1
- package/dist/public/assets/App-DZPlytdY.js +0 -63
- package/dist/public/assets/Dashboard-D0qSbNc_.js +0 -1
- package/dist/public/assets/PaneEditorBody-C5SVOXKv.js +0 -284
- package/dist/public/assets/SettingsDialog-D5CH5-vH.js +0 -8
- package/dist/public/assets/Terminal-D7rw4Zu8.js +0 -67
- package/dist/public/assets/Workspace-Cvhx3oi9.js +0 -20
- package/dist/public/assets/button-C-dovHYo.js +0 -1
- package/dist/public/assets/client-settings-Cy225e3b.js +0 -1
- package/dist/public/assets/command-klU_3huY.js +0 -1
- package/dist/public/assets/dialog-B0poBDCr.js +0 -41
- package/dist/public/assets/dist-C4YjL9GW.js +0 -1
- package/dist/public/assets/dist-Duc5nm48.js +0 -1
- package/dist/public/assets/forward-link-DWN_hZ7A.js +0 -1
- package/dist/public/assets/media-refresh-store-odkzJbkh.js +0 -1
- package/dist/public/assets/notification-delivery-BHHCcyI1.js +0 -1
- package/dist/public/assets/popover-Cv4S_Eut.js +0 -1
- package/dist/public/assets/select-C0AnT3e9.js +0 -1
- package/dist/public/assets/selection-actions-gU_r-7v_.js +0 -1
- package/dist/public/assets/switch-DllF_QQT.js +0 -1
- package/dist/public/assets/use-ui-state-2r7YwqCy.js +0 -1
- package/dist/public/assets/ws-B_QsPbsD.js +0 -1
- package/dist/public/assets/x-Dq6POV20.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-QTnfLwEv.js";import{t as e}from"./react-CZI7_Jkm.js";import{t}from"./jsx-runtime-By8HlURe.js";import{n,r}from"./createLucideIcon-C9A1vLE-.js";import{n as i}from"./x-Dq6POV20.js";var a=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,o=r,s=(e,t)=>n=>{if(t?.variants==null)return o(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,s=Object.keys(r).map(e=>{let t=n?.[e],o=i?.[e];if(t===null)return null;let s=a(t)||a(o);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return o(e,s,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};e();var c=t(),l=s(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[var(--ui-radius)] font-normal transition-colors duration-150 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3.5 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-action text-action-ink hover:bg-action-hover active:opacity-85`,secondary:`bg-elevated text-fg hover:bg-border/70 active:bg-border`,ghost:`text-fg-secondary hover:bg-elevated hover:text-fg active:bg-border/70`,danger:`bg-danger text-danger-ink hover:opacity-90 active:opacity-80`},size:{default:`h-[var(--ui-field-height)] px-3 text-sm`,sm:`h-[var(--ui-control-height)] px-2 text-xs`,lg:`h-[var(--ui-large-control-height)] px-4 text-sm`,icon:`size-[var(--ui-control-height)]`}},defaultVariants:{variant:`default`,size:`default`}});function u({className:e,variant:t,size:r,asChild:a=!1,...o}){return(0,c.jsx)(a?i:`button`,{className:n(l({variant:t,size:r}),e),...o})}export{l as n,u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";var n=e(t(),1),r=[{id:`system`,label:`System`},{id:`rangefinder`,label:`Rangefinder`},{id:`drafting`,label:`Drafting`},{id:`invert`,label:`Invert`}],i=`system`;function a(e){return r.some(t=>t.id===e)?e:i}var o={uiFontSize:16,reduceMotion:!1,showHostOnFocus:!1,cursorPackage:i,terminalFontSize:13,editorFontSize:14,density:`compact`,terminalScrollback:2e4,editorTabSize:2,editorWordWrap:!1,editorLinkSshHost:``,projectBasedLayout:!0,showAllProjectSessions:!0},s=`puddle.client-settings`,c=new Set,l=null;function u(e){let t={...e};return t.projectBasedLayout===void 0&&t.showAllProjectSessions!==void 0&&(t.projectBasedLayout=!t.showAllProjectSessions),t.showAllProjectSessions===void 0&&t.projectBasedLayout!==void 0&&(t.showAllProjectSessions=!t.projectBasedLayout),t}function d(e){return e.terminalScrollback===5e3?{...e,terminalScrollback:o.terminalScrollback}:e}function f(){if(l)return l;let e={};try{e=JSON.parse(localStorage.getItem(s)??`{}`)}catch{}let t={...o,...d(u(e))};return l={...t,cursorPackage:a(t.cursorPackage)},l}function p(e){document.documentElement.style.setProperty(`--ui-font-size`,`${e.uiFontSize}px`),document.documentElement.dataset.density=e.density,document.documentElement.dataset.reduceMotion=String(e.reduceMotion||matchMedia(`(prefers-reduced-motion: reduce)`).matches),document.documentElement.dataset.cursorPackage=e.cursorPackage}function m(){return f()}function h(e){let t={...f(),...e};l={...t,cursorPackage:a(t.cursorPackage)},localStorage.setItem(s,JSON.stringify(l)),p(l);for(let e of c)e()}function g(){p(f()),matchMedia(`(prefers-reduced-motion: reduce)`).addEventListener(`change`,()=>p(f()))}function _(){return(0,n.useSyncExternalStore)(e=>(c.add(e),()=>c.delete(e)),()=>f())}export{r as a,_ as i,g as n,h as r,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{n as r}from"./createLucideIcon-C9A1vLE-.js";import{C as i,c as a,d as o,l as s,r as c,t as l,u,y as d}from"./dialog-B0poBDCr.js";import{a as f}from"./x-Dq6POV20.js";import{d as p,l as m}from"./dist-C4YjL9GW.js";import{s as h}from"./preview-kind-CPkO-rSz.js";var g=1,_=.9,v=.8,y=.17,b=.1,x=.999,S=.9999,C=.99,w=/[\\\/_+.#"@\[\(\{&]/,T=/[\\\/_+.#"@\[\(\{&]/g,E=/[\s-]/,D=/[\s-]/g;function O(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?g:C;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=O(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=g:w.test(e.charAt(l-1))?(d*=v,p=e.slice(i,l-1).match(T),p&&i>0&&(d*=x**+p.length)):E.test(e.charAt(l-1))?(d*=_,m=e.slice(i,l-1).match(D),m&&i>0&&(d*=x**+m.length)):(d*=y,i>0&&(d*=x**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=S)),(d<b&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=O(e,t,n,r,l+1,a+2,o),f*b>d&&(d=f*b)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function k(e){return e.toLowerCase().replace(D,` `)}function A(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,O(e,t,k(e),k(t),0,0,{})}var j=e(t(),1),M=`[cmdk-group=""]`,N=`[cmdk-group-items=""]`,ee=`[cmdk-group-heading=""]`,te=`[cmdk-item=""]`,ne=`${te}:not([aria-disabled="true"])`,P=`cmdk-item-select`,F=`data-value`,re=(e,t,n)=>A(e,t,n),I=j.createContext(void 0),L=()=>j.useContext(I),R=j.createContext(void 0),z=()=>j.useContext(R),B=j.createContext(void 0),V=j.forwardRef((e,t)=>{let n=X(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=X(()=>new Set),a=X(()=>new Map),o=X(()=>new Map),s=X(()=>new Set),c=J(e),{label:l,children:u,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=d(),x=d(),S=d(),C=j.useRef(null),w=ue();Y(()=>{if(f!==void 0){let e=f.trim();n.current.value=e,T.emit()}},[f]),Y(()=>{w(6,L)},[]);let T=j.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)A(),O(),w(1,k);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(S);e?e.focus():(i=document.getElementById(b))==null||i.focus()}if(w(7,()=>{n.current.selectedItemId=z()?.id,T.emit()}),r||w(5,L),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}T.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),E=j.useMemo(()=>({value:(e,t,r)=>{t!==o.current.get(e)?.value&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,D(t,r)),w(2,()=>{O(),T.emit()}))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),w(3,()=>{A(),O(),n.current.value||k(),T.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=z();w(4,()=>{A(),t?.getAttribute(`id`)===e&&k(),T.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:b,inputId:S,labelId:x,listInnerRef:C}),[]);function D(e,t){let r=c.current?.filter??re;return e?r(e,n.current.search,t):0}function O(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),i=0;r.forEach(t=>{let n=e.get(t);i=Math.max(n,i)}),t.push([n,i])});let r=C.current;B().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(N);t?t.appendChild(e.parentElement===t?e:e.closest(`${N} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${N} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=C.current?.querySelector(`${M}[${F}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function k(){let e=B().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(F);T.setState(`value`,e||void 0)}function A(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=D(o.current.get(t)?.value??``,o.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function L(){var e;let t=z();t&&(t.parentElement?.firstChild===t&&((e=t.closest(M)?.querySelector(ee))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function z(){return C.current?.querySelector(`${te}[aria-selected="true"]`)}function B(){return Array.from(C.current?.querySelectorAll(ne)||[])}function V(e){let t=B()[e];t&&T.setState(`value`,t.getAttribute(F))}function H(e){var t;let n=z(),r=B(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&T.setState(`value`,a.getAttribute(F))}function U(e){let t=z()?.closest(M),n;for(;t&&!n;)t=e>0?se(t,M):ce(t,M),n=t?.querySelector(ne);n?T.setState(`value`,n.getAttribute(F)):H(e)}let W=()=>V(B().length-1),G=e=>{e.preventDefault(),e.metaKey?W():e.altKey?U(1):H(1)},K=e=>{e.preventDefault(),e.metaKey?V(0):e.altKey?U(-1):H(-1)};return j.createElement(i.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&G(e);break;case`ArrowDown`:G(e);break;case`p`:case`k`:v&&e.ctrlKey&&K(e);break;case`ArrowUp`:K(e);break;case`Home`:e.preventDefault(),V(0);break;case`End`:e.preventDefault(),W();break;case`Enter`:{e.preventDefault();let t=z();if(t){let e=new Event(P);t.dispatchEvent(e)}}}}},j.createElement(`label`,{"cmdk-label":``,htmlFor:E.inputId,id:E.labelId,style:fe},l),Q(e,e=>j.createElement(R.Provider,{value:T},j.createElement(I.Provider,{value:E},e))))}),H=j.forwardRef((e,t)=>{let n=d(),r=j.useRef(null),a=j.useContext(B),o=L(),s=J(e),c=s.current?.forceMount??a?.forceMount;Y(()=>{if(!c)return o.item(n,a?.id)},[c]);let l=le(n,r,[e.value,e.children,r],e.keywords),u=z(),p=Z(e=>e.value&&e.value===l.current),m=Z(e=>c||o.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);j.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(P,h),()=>t.removeEventListener(P,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=s.current).onSelect)==null||t.call(e,l.current)}function g(){u.setState(`value`,l.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:y,forceMount:b,keywords:x,...S}=e;return j.createElement(i.div,{ref:f(r,t),...S,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||o.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),U=j.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,s=d(),c=j.useRef(null),l=j.useRef(null),u=d(),p=L(),m=Z(e=>a||p.filter()===!1?!0:!e.search||e.filtered.groups.has(s));Y(()=>p.group(s),[]),le(s,c,[e.value,e.heading,l]);let h=j.useMemo(()=>({id:s,forceMount:a}),[a]);return j.createElement(i.div,{ref:f(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:!m||void 0},n&&j.createElement(`div`,{ref:l,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),Q(e,e=>j.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},j.createElement(B.Provider,{value:h},e))))}),W=j.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=j.useRef(null),o=Z(e=>!e.search);return!n&&!o?null:j.createElement(i.div,{ref:f(a,t),...r,"cmdk-separator":``,role:`separator`})}),G=j.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=z(),s=Z(e=>e.search),c=Z(e=>e.selectedItemId),l=L();return j.useEffect(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),j.createElement(i.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:a?e.value:s,onChange:e=>{a||o.setState(`search`,e.target.value),n?.(e.target.value)}})}),K=j.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...a}=e,o=j.useRef(null),s=j.useRef(null),c=Z(e=>e.selectedItemId),l=L();return j.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),j.createElement(i.div,{ref:f(o,t),...a,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},Q(e,e=>j.createElement(`div`,{ref:f(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),ie=j.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:c,container:l,...d}=e;return j.createElement(a,{open:n,onOpenChange:r},j.createElement(o,{container:l},j.createElement(u,{"cmdk-overlay":``,className:i}),j.createElement(s,{"aria-label":e.label,"cmdk-dialog":``,className:c},j.createElement(V,{ref:t,...d}))))}),ae=j.forwardRef((e,t)=>Z(e=>e.filtered.count===0)?j.createElement(i.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),oe=j.forwardRef((e,t)=>{let{progress:n,children:r,label:a=`Loading...`,...o}=e;return j.createElement(i.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Q(e,e=>j.createElement(`div`,{"aria-hidden":!0},e)))}),q=Object.assign(V,{List:K,Item:H,Input:G,Group:U,Separator:W,Dialog:ie,Empty:ae,Loading:oe});function se(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ce(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function J(e){let t=j.useRef(e);return Y(()=>{t.current=e}),t}var Y=typeof window>`u`?j.useEffect:j.useLayoutEffect;function X(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function Z(e){let t=z(),n=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,n,n)}function le(e,t,n,r=[]){let i=j.useRef(),a=L();return Y(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(F,s),i.current=s}),i}var ue=()=>{let[e,t]=j.useState(),n=X(()=>new Map);return Y(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function de(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Q({asChild:e,children:t},n){return e&&j.isValidElement(t)?j.cloneElement(de(t),{ref:t.ref},n(t.props.children)):n(t)}var fe={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},$=n();function pe({className:e,...t}){return(0,$.jsx)(q,{className:r(`flex size-full flex-col overflow-hidden rounded-lg bg-elevated`,e),...t})}function me({open:e,onOpenChange:t,children:n}){return(0,$.jsx)(l,{open:e,onOpenChange:t,children:(0,$.jsx)(c,{className:`max-w-lg overflow-hidden p-0 [&>button]:hidden`,children:(0,$.jsx)(pe,{loop:!0,children:n})})})}function he({className:e,...t}){return(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pt-1`,children:[(0,$.jsx)(h,{className:`size-4 shrink-0 text-fg-muted`}),(0,$.jsx)(q.Input,{className:r(`flex h-10 w-full bg-transparent text-sm text-fg outline-none placeholder:text-fg-muted`,e),...t})]})}function ge({className:e,...t}){return(0,$.jsx)(q.List,{className:r(`max-h-72 overflow-y-auto p-1`,e),...t})}function _e(e){return(0,$.jsx)(q.Empty,{className:`py-6 text-center text-sm text-fg-muted`,...e})}function ve({className:e,...t}){return(0,$.jsx)(q.Group,{className:r(`overflow-hidden [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-2xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-fg-muted`,e),...t})}function ye({className:e,...t}){return(0,$.jsx)(q.Item,{className:r(p,m,`[&_svg]:size-3.5 [&_svg]:text-fg-muted data-[selected=true]:[&_svg]:text-action-ink`,e),...t})}function be({className:e,...t}){return(0,$.jsx)(`span`,{className:r(`ml-auto font-mono text-2xs tracking-widest text-fg-muted`,e),...t})}export{he as a,be as c,ve as i,me as n,ye as o,_e as r,ge as s,pe as t};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./react-dom-cJyBB_A4.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{n as i}from"./createLucideIcon-C9A1vLE-.js";import{o as a,r as o,t as s}from"./x-Dq6POV20.js";var c=e(t(),1);typeof window<`u`&&window.document&&window.document.createElement;function l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}var u=r();function d(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,u.jsx)(s.Provider,{value:l,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>c.createContext(e));return function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,f(i,...t)]}function f(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var p=e(n(),1),m=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=o(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function h(e,t){e&&p.flushSync(()=>e.dispatchEvent(t))}function g(e){let t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}var _=`DismissableLayer`,v=`dismissableLayer.update`,y=`dismissableLayer.pointerDownOutside`,b=`dismissableLayer.focusOutside`,ee,x=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),S=c.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:d,onDismiss:f,...p}=e,h=c.useContext(x),[_,y]=c.useState(null),b=_?.ownerDocument??globalThis?.document,[,S]=c.useState({}),C=a(t,y),w=Array.from(h.layers),[te]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),ne=te?w.indexOf(te):-1,T=_?w.indexOf(_):-1,E=h.layersWithOutsidePointerEventsDisabled.size>0,D=T>=ne,oe=c.useRef(!1),O=re(e=>{o?.(e),d?.(e),e.defaultPrevented||f?.()},{ownerDocument:b,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:oe,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...h.branches].some(t=>t.contains(e));return D&&!t},[h.branches,D])}),se=ie(e=>{if(r&&oe.current)return;let t=e.target;[...h.branches].some(e=>e.contains(t))||(s?.(e),d?.(e),e.defaultPrevented||f?.())},b),k=_?T===w.length-1:!1,A=g(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&f&&(e.preventDefault(),f()))});return c.useEffect(()=>{if(k)return b.addEventListener(`keydown`,A,{capture:!0}),()=>b.removeEventListener(`keydown`,A,{capture:!0})},[b,k,A]),c.useEffect(()=>{if(_)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ee=b.body.style.pointerEvents,b.body.style.pointerEvents=`none`),h.layersWithOutsidePointerEventsDisabled.add(_)),h.layers.add(_),ae(),()=>{n&&(h.layersWithOutsidePointerEventsDisabled.delete(_),h.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=ee))}},[_,b,n,h]),c.useEffect(()=>()=>{_&&(h.layers.delete(_),h.layersWithOutsidePointerEventsDisabled.delete(_),ae())},[_,h]),c.useEffect(()=>{let e=()=>S({});return document.addEventListener(v,e),()=>document.removeEventListener(v,e)},[]),(0,u.jsx)(m.div,{...p,ref:C,style:{pointerEvents:E?D?`auto`:`none`:void 0,...e.style},onFocusCapture:l(e.onFocusCapture,se.onFocusCapture),onBlurCapture:l(e.onBlurCapture,se.onBlurCapture),onPointerDownCapture:l(e.onPointerDownCapture,O.onPointerDownCapture)})});S.displayName=_;var C=`DismissableLayerBranch`,w=c.forwardRef((e,t)=>{let n=c.useContext(x),r=c.useRef(null),i=a(t,r);return c.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(m.div,{...e,ref:i})});w.displayName=C;function te(){let e=c.useContext(x),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var ne=()=>!0;function re(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=ne}=t,s=g(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(e){u.current&&d.current.set(e.type,!1)}let m=a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||T(y,s,p,{discrete:!0})};if(!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:()=>l.current=!0}}function ie(e,t=globalThis?.document){let n=g(e),r=c.useRef(!1);return c.useEffect(()=>{let e=e=>{e.target&&!r.current&&T(b,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ae(){let e=new CustomEvent(v);document.dispatchEvent(e)}function T(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?h(i,a):i.dispatchEvent(a)}var E=globalThis?.document?c.useLayoutEffect:()=>{},D=c.useId||(()=>void 0),oe=0;function O(e){let[t,n]=c.useState(D());return E(()=>{e||n(e=>e??String(oe++))},[e]),e||(t?`radix-${t}`:``)}var se=`Portal`,k=c.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=c.useState(!1);E(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?p.createPortal((0,u.jsx)(m.div,{...r,ref:t}),o):null});k.displayName=se;function A(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}var j=e=>{let{present:t,children:n}=e,r=ce(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=ue(r.ref,de(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null};j.displayName=`Presence`;function ce(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=A(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??M(r.current),o.current=void 0):a.current=`none`},[s]),E(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=M(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),E(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=M(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=M(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=M(t)}else r.current=null;n(e)},[])}}function le(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ue(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=le(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():le(n[e],null)}}},[])}function M(e){return e?.animationName||`none`}function de(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fe=c.useInsertionEffect||E;function pe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=me({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{let t=c.useRef(e!==void 0);c.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[l,c.useCallback(t=>{if(s){let n=he(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function me({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return fe(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function he(e){return typeof e==`function`}var N=0,P=null;function ge(){c.useEffect(()=>{P||={start:_e(),end:_e()};let{start:e,end:t}=P;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),N++,()=>{N===1&&(P?.start.remove(),P?.end.remove(),P=null),N=Math.max(0,N-1)}},[])}function _e(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var ve=`focusScope.autoFocusOnMount`,F=`focusScope.autoFocusOnUnmount`,ye={bubbles:!1,cancelable:!0},be=`FocusScope`,xe=c.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[l,d]=c.useState(null),f=g(i),p=g(o),h=c.useRef(null),_=a(t,d),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(v.paused||!l)return;let t=e.target;l.contains(t)?h.current=t:I(h.current,{select:!0})},t=function(e){if(v.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||I(h.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&I(l)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,v.paused]),c.useEffect(()=>{if(l){Oe.add(v);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(ve,ye);l.addEventListener(ve,f),l.dispatchEvent(t),t.defaultPrevented||(Se(je(we(l)),{select:!0}),document.activeElement===e&&I(l))}return()=>{l.removeEventListener(ve,f),setTimeout(()=>{let t=new CustomEvent(F,ye);l.addEventListener(F,p),l.dispatchEvent(t),t.defaultPrevented||I(e??document.body,{select:!0}),l.removeEventListener(F,p),Oe.remove(v)},0)}}},[l,f,p,v]);let y=c.useCallback(e=>{if(!n&&!r||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ce(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&I(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&I(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,v.paused]);return(0,u.jsx)(m.div,{tabIndex:-1,...s,ref:_,onKeyDown:y})});xe.displayName=be;function Se(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(I(r,{select:t}),document.activeElement!==n)return}function Ce(e){let t=we(e);return[Te(t,e),Te(t.reverse(),e)]}function we(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Te(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ee(r,{upTo:t})))return r}function Ee(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function De(e){return e instanceof HTMLInputElement&&`select`in e}function I(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&De(e)&&t&&e.select()}}var Oe=ke();function ke(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ae(e,t),e.unshift(t)},remove(t){e=Ae(e,t),e[0]?.resume()}}}function Ae(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function je(e){return e.filter(e=>e.tagName!==`A`)}var Me=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},L=new WeakMap,R=new WeakMap,z={},Ne=0,Pe=function(e){return e&&(e.host||Pe(e.parentNode))},Fe=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Pe(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ie=function(e,t,n,r){var i=Fe(t,Array.isArray(e)?e:[e]);z[n]||(z[n]=new WeakMap);var a=z[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(L.get(e)||0)+1,l=(a.get(e)||0)+1;L.set(e,c),a.set(e,l),o.push(e),c===1&&i&&R.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ne++,function(){o.forEach(function(e){var t=L.get(e)-1,i=a.get(e)-1;L.set(e,t),a.set(e,i),t||(R.has(e)||e.removeAttribute(r),R.delete(e)),i||e.removeAttribute(n)}),Ne--,Ne||(L=new WeakMap,L=new WeakMap,R=new WeakMap,z={})}},Le=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Me(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ie(r,i,n,`aria-hidden`)):function(){return null}},B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B.apply(this,arguments)};function Re(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ze(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var V=`right-scroll-bar-position`,H=`width-before-scroll-bar`,Be=`with-scroll-bars-hidden`,Ve=`--removed-body-scroll-bar-size`;function He(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ue(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var We=typeof window<`u`?c.useLayoutEffect:c.useEffect,Ge=new WeakMap;function Ke(e,t){var n=Ue(t||null,function(t){return e.forEach(function(e){return He(e,t)})});return We(function(){var t=Ge.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||He(e,null)}),i.forEach(function(e){r.has(e)||He(e,a)})}Ge.set(n,e)},[e]),n}function qe(e){return e}function Je(e,t){t===void 0&&(t=qe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ye(e){e===void 0&&(e={});var t=Je(null);return t.options=B({async:!0,ssr:!1},e),t}var Xe=function(e){var t=e.sideCar,n=Re(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,B({},n))};Xe.isSideCarExport=!0;function Ze(e,t){return e.useMedium(t),Xe}var Qe=Ye(),$e=function(){},U=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:$e,onWheelCapture:$e,onTouchMoveCapture:$e}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,ee=Re(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=p,S=Ke([n,t]),C=B(B({},ee),i);return c.createElement(c.Fragment,null,d&&c.createElement(x,{sideCar:Qe,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),B(B({},C),{ref:S})):c.createElement(y,B({},C,{className:l,ref:S}),s))});U.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},U.classNames={fullWidth:H,zeroRight:V};var et,tt=function(){if(et)return et;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function nt(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=tt();return t&&e.setAttribute(`nonce`,t),e}function rt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function it(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var at=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nt())&&(rt(t,n),it(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ot=function(){var e=at();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},st=function(){var e=ot();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ct={left:0,top:0,right:0,gap:0},lt=function(e){return parseInt(e||``,10)||0},ut=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[lt(n),lt(r),lt(i)]},dt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ct;var t=ut(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ft=st(),W=`data-scroll-locked`,pt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${Be} {
|
|
3
|
-
overflow: hidden ${r};
|
|
4
|
-
padding-right: ${s}px ${r};
|
|
5
|
-
}
|
|
6
|
-
body[${W}] {
|
|
7
|
-
overflow: hidden ${r};
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
-
padding-left: ${i}px;
|
|
11
|
-
padding-top: ${a}px;
|
|
12
|
-
padding-right: ${o}px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: ${s}px ${r};
|
|
16
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.${V} {
|
|
20
|
-
right: ${s}px ${r};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.${H} {
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${V} .${V} {
|
|
28
|
-
right: 0 ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${H} .${H} {
|
|
32
|
-
margin-right: 0 ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[${W}] {
|
|
36
|
-
${Ve}: ${s}px;
|
|
37
|
-
}
|
|
38
|
-
`},mt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ht=function(){c.useEffect(function(){return document.body.setAttribute(W,(mt()+1).toString()),function(){var e=mt()-1;e<=0?document.body.removeAttribute(W):document.body.setAttribute(W,e.toString())}},[])},gt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ht();var a=c.useMemo(function(){return dt(i)},[i]);return c.createElement(ft,{styles:pt(a,!t,i,n?``:`!important`)})},_t=!1;if(typeof window<`u`)try{var G=Object.defineProperty({},"passive",{get:function(){return _t=!0,!0}});window.addEventListener(`test`,G,G),window.removeEventListener(`test`,G,G)}catch{_t=!1}var K=_t?{passive:!1}:!1,vt=function(e){return e.tagName===`TEXTAREA`},yt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!vt(e)&&n[t]===`visible`)},bt=function(e){return yt(e,`overflowY`)},xt=function(e){return yt(e,`overflowX`)},St=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Tt(e,r)){var i=Et(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ct=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},wt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Tt=function(e,t){return e===`v`?bt(t):xt(t)},Et=function(e,t){return e===`v`?Ct(t):wt(t)},Dt=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ot=function(e,t,n,r,i){var a=Dt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Et(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Tt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},q=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kt=function(e){return[e.deltaX,e.deltaY]},At=function(e){return e&&`current`in e?e.current:e},jt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mt=function(e){return`
|
|
39
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},Nt=0,J=[];function Pt(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(Nt++)[0],a=c.useState(st)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ze([e.lockRef.current],(e.shards||[]).map(At),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=q(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=St(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=St(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Ot(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(!(!J.length||J[J.length-1]!==a)){var r=`deltaY`in n?kt(n):q(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&jt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(At).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ft(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=q(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,kt(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,q(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return J.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,K),document.addEventListener(`touchmove`,l,K),document.addEventListener(`touchstart`,d,K),function(){J=J.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,K),document.removeEventListener(`touchmove`,l,K),document.removeEventListener(`touchstart`,d,K)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Mt(i)}):null,m?c.createElement(gt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ft(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var It=Ze(Qe,Pt),Lt=c.forwardRef(function(e,t){return c.createElement(U,B({},e,{ref:t,sideCar:It}))});Lt.classNames=U.classNames;var Y=`Dialog`,[Rt,zt]=d(Y),[Bt,X]=Rt(Y),Vt=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=c.useRef(null),l=c.useRef(null),[d,f]=pe({prop:r,defaultProp:i??!1,onChange:a,caller:Y});return(0,u.jsx)(Bt,{scope:t,triggerRef:s,contentRef:l,contentId:O(),titleId:O(),descriptionId:O(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:o,children:n})};Vt.displayName=Y;var Ht=`DialogTrigger`,Ut=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(Ht,n),o=a(t,i.triggerRef);return(0,u.jsx)(m.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":sn(i.open),...r,ref:o,onClick:l(e.onClick,i.onOpenToggle)})});Ut.displayName=Ht;var Wt=`DialogPortal`,[Gt,Kt]=Rt(Wt,{forceMount:void 0}),qt=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=X(Wt,t);return(0,u.jsx)(Gt,{scope:t,forceMount:n,children:c.Children.map(r,e=>(0,u.jsx)(j,{present:n||a.open,children:(0,u.jsx)(k,{asChild:!0,container:i,children:e})}))})};qt.displayName=Wt;var Z=`DialogOverlay`,Q=c.forwardRef((e,t)=>{let n=Kt(Z,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=X(Z,e.__scopeDialog);return a.modal?(0,u.jsx)(j,{present:r||a.open,children:(0,u.jsx)(Yt,{...i,ref:t})}):null});Q.displayName=Z;var Jt=o(`DialogOverlay.RemoveScroll`),Yt=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(Z,n),o=a(t,te());return(0,u.jsx)(Lt,{as:Jt,allowPinchZoom:!0,shards:[i.contentRef],children:(0,u.jsx)(m.div,{"data-state":sn(i.open),...r,ref:o,style:{pointerEvents:`auto`,...r.style}})})}),$=`DialogContent`,Xt=c.forwardRef((e,t)=>{let n=Kt($,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=X($,e.__scopeDialog);return(0,u.jsx)(j,{present:r||a.open,children:a.modal?(0,u.jsx)(Zt,{...i,ref:t}):(0,u.jsx)(Qt,{...i,ref:t})})});Xt.displayName=$;var Zt=c.forwardRef((e,t)=>{let n=X($,e.__scopeDialog),r=c.useRef(null),i=a(t,n.contentRef,r);return c.useEffect(()=>{let e=r.current;if(e)return Le(e)},[]),(0,u.jsx)($t,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:l(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:l(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:l(e.onFocusOutside,e=>e.preventDefault())})}),Qt=c.forwardRef((e,t)=>{let n=X($,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,u.jsx)($t,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),$t=c.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=X($,n);return ge(),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(xe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,u.jsx)(S,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":sn(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),en=`DialogTitle`,tn=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(en,n);return(0,u.jsx)(m.h2,{id:i.titleId,...r,ref:t})});tn.displayName=en;var nn=`DialogDescription`,rn=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(nn,n);return(0,u.jsx)(m.p,{id:i.descriptionId,...r,ref:t})});rn.displayName=nn;var an=`DialogClose`,on=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(an,n);return(0,u.jsx)(m.button,{type:`button`,...r,ref:t,onClick:l(e.onClick,()=>i.onOpenChange(!1))})});on.displayName=an;function sn(e){return e?`open`:`closed`}var cn=Vt,ln=on;function un({className:e,children:t,wide:n=!1,surface:r=!0,showCloseButton:a=!0,...o}){return(0,u.jsxs)(qt,{children:[(0,u.jsx)(Q,{className:`overlay-backdrop-motion fixed inset-0 z-50 bg-ground/70 backdrop-blur-[2px]`}),(0,u.jsxs)(Xt,{className:i(`overlay-content-motion fixed left-1/2 top-[calc(var(--phone-top,0px)+var(--phone-height,100dvh)/2)] z-50 grid max-h-[calc(var(--phone-height,100dvh)-2rem)] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-[var(--ui-surface-radius)] p-5`,r&&`island-outline bg-surface shadow-[var(--ui-overlay-shadow)]`,n?`max-w-3xl`:`max-w-md`,e),...o,children:[t,a&&(0,u.jsxs)(on,{className:`absolute right-3.5 top-3.5 rounded-sm text-fg-muted transition-colors hover:text-fg`,children:[(0,u.jsx)(s,{className:`size-4`}),(0,u.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function dn({className:e,...t}){return(0,u.jsx)(`div`,{className:i(`flex flex-col gap-1`,e),...t})}function fn({className:e,...t}){return(0,u.jsx)(tn,{className:i(`text-lg font-semibold text-fg`,e),...t})}function pn({className:e,...t}){return(0,u.jsx)(rn,{className:i(`text-sm text-fg-secondary`,e),...t})}function mn({className:e,...t}){return(0,u.jsx)(`div`,{className:i(`flex justify-end gap-2`,e),...t})}export{m as C,l as E,g as S,d as T,j as _,mn as a,E as b,Vt as c,qt as d,Lt as f,pe as g,ge as h,pn as i,Xt as l,xe as m,ln as n,dn as o,Le as p,un as r,fn as s,cn as t,Q as u,k as v,h as w,S as x,O as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./react-dom-cJyBB_A4.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{n as i,t as a}from"./createLucideIcon-C9A1vLE-.js";import{C as o,S as s,T as c,b as l}from"./dialog-B0poBDCr.js";import{o as u,r as d}from"./x-Dq6POV20.js";var f=e(t(),1),p=[`top`,`right`,`bottom`,`left`],m=Math.min,h=Math.max,g=Math.round,_=Math.floor,v=e=>({x:e,y:e}),y={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function b(e,t,n){return h(e,m(t,n))}function x(e,t){return typeof e==`function`?e(t):e}function S(e){return e.split(`-`)[0]}function C(e){return e.split(`-`)[1]}function w(e){return e===`x`?`y`:`x`}function T(e){return e===`y`?`height`:`width`}function E(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function D(e){return w(E(e))}function O(e,t,n){n===void 0&&(n=!1);let r=C(e),i=D(e),a=T(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=L(o)),[o,L(o)]}function k(e){let t=L(e);return[A(e),t,A(t)]}function A(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var j=[`left`,`right`],M=[`right`,`left`],N=[`top`,`bottom`],P=[`bottom`,`top`];function F(e,t,n){switch(e){case`top`:case`bottom`:return n?t?M:j:t?j:M;case`left`:case`right`:return t?N:P;default:return[]}}function I(e,t,n,r){let i=C(e),a=F(S(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(A)))),a}function L(e){let t=S(e);return y[t]+e.slice(t.length)}function R(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function z(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:R(e)}function B(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ee(e,t,n){let{reference:r,floating:i}=e,a=E(t),o=D(t),s=T(o),c=S(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=C(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function te(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=x(t,e),p=z(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=B(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=B(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ne=50,re=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:te},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ee(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ne&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ee(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ie=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=x(e,t)||{};if(l==null)return{};let d=z(u),f={x:n,y:r},p=D(i),h=T(p),g=await o.getDimensions(l),_=p===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,S=_?`clientHeight`:`clientWidth`,w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],E=f[p]-a.reference[p],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[S]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=s.floating[S]||a.floating[h]);let A=w/2-E/2,j=k/2-g[h]/2-1,M=m(d[v],j),N=m(d[y],j),P=k-g[h]-N,F=k/2-g[h]/2+A,I=b(M,F,P),L=!c.arrow&&C(i)!=null&&F!==I&&a.reference[h]/2-(F<M?M:N)-g[h]/2<0,R=L?F<M?F-M:F-P:0;return{[p]:f[p]+R,data:{[p]:I,centerOffset:F-I-R,...L&&{alignmentOffset:R}},reset:L}}}),ae=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=x(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=S(r),_=E(o),v=S(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[L(o)]:k(o)),C=p!==`none`;!d&&C&&b.push(...I(o,m,p,y));let w=[o,...b],T=await s.detectOverflow(t,h),D=[],A=i.flip?.overflows||[];if(l&&D.push(T[g]),u){let e=O(r,a,y);D.push(T[e[0]],T[e[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=w[e];if(t&&(!(u===`alignment`&&_!==E(t))||A.every(e=>E(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:A},reset:{placement:t}};let n=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=A.filter(e=>{if(C){let t=E(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function oe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function se(e){return p.some(t=>e[t]>=0)}var ce=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=x(e,t);switch(i){case`referenceHidden`:{let e=oe(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:se(e)}}}case`escaped`:{let e=oe(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:se(e)}}}default:return{}}}}},le=new Set([`left`,`top`]);async function ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=S(n),s=C(n),c=E(n)===`y`,l=le.has(o)?-1:1,u=a&&c?-1:1,d=x(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var de=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ue(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},fe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=x(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=E(i),p=w(f),m=u[p],h=u[f],g=(e,t)=>b(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},pe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=x(e,t),u={x:n,y:r},d=E(i),f=w(d),p=u[f],m=u[d],h=x(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=le.has(S(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},me=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=x(e,t),c=await i.detectOverflow(t,s),l=S(n),u=C(n),d=E(n)===`y`,{width:f,height:p}=r.floating,g,_;l===`top`||l===`bottom`?(g=l,_=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(_=l,g=u===`end`?`top`:`bottom`);let v=p-c.top-c.bottom,y=f-c.left-c.right,b=m(p-c[g],v),w=m(f-c[_],y),T=t.middlewareData.shift,D=!T,O=b,k=w;T!=null&&T.enabled.x&&(k=y),T!=null&&T.enabled.y&&(O=v),D&&!u&&(d?k=f-2*h(c.left,c.right):O=p-2*h(c.top,c.bottom)),await o({...t,availableWidth:k,availableHeight:O});let A=await i.getDimensions(a.floating);return f!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function he(){return typeof window<`u`}function V(e){return ge(e)?(e.nodeName||``).toLowerCase():`#document`}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){return((ge(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ge(e){return he()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return he()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return he()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function _e(e){return!he()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function ve(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ye(e){return/^(table|td|th)$/.test(V(e))}function be(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xe=/transform|translate|scale|rotate|perspective|filter/,Se=/paint|layout|strict|content/,K=e=>!!e&&e!==`none`,Ce;function we(e){let t=W(e)?J(e):e;return K(t.transform)||K(t.translate)||K(t.scale)||K(t.rotate)||K(t.perspective)||!Ee()&&(K(t.backdropFilter)||K(t.filter))||xe.test(t.willChange||``)||Se.test(t.contain||``)}function Te(e){let t=Y(e);for(;G(t)&&!q(t);){if(we(t))return t;if(be(t))return null;t=Y(t)}return null}function Ee(){return Ce??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ce}function q(e){return/^(html|body|#document)$/.test(V(e))}function J(e){return H(e).getComputedStyle(e)}function De(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Y(e){if(V(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_e(e)&&e.host||U(e);return _e(t)?t.host:t}function Oe(e){let t=Y(e);return q(t)?(e.ownerDocument||e).body:G(t)&&ve(t)?t:Oe(t)}function X(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Oe(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=ke(a);return t.concat(a,a.visualViewport||[],ve(r)?r:[],e&&n?X(e):[])}else return t.concat(r,X(r,[],n))}function ke(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ae(e){let t=J(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=G(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=g(n)!==a||g(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function je(e){return W(e)?e:e.contextElement}function Z(e){let t=je(e);if(!G(t))return v(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ae(t),o=(a?g(n.width):n.width)/r,s=(a?g(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Me=v(0);function Ne(e){let t=H(e);return!Ee()||!t.visualViewport?Me:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pe(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===H(e)}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=je(e),o=v(1);t&&(r?W(r)&&(o=Z(r)):o=Z(e));let s=Pe(a,n,r)?Ne(a):v(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=H(a),t=W(r)?H(r):r,n=e,i=ke(n);for(;i&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=J(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=H(i),i=ke(n)}}return B({width:u,height:d,x:c,y:l})}function Fe(e,t){let n=De(e).scrollLeft;return t?t.left+n:Q(U(e)).left+n}function Ie(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fe(e,n),y:n.top+t.scrollTop}}function Le(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?be(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=v(1),u=v(0),d=G(r);if((d||!a)&&((V(r)!==`body`||ve(o))&&(c=De(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ie(o,c):v(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Re(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ze(e){let t=De(e),n=e.ownerDocument.body,r=h(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=h(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Fe(e),o=-t.scrollTop;return J(n).direction===`rtl`&&(a+=h(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Be=25;function Ve(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=H(e),a=U(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ee()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Fe(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Be&&(s-=o)}return{width:s,height:c,x:l,y:u}}function He(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Z(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ue(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ve(e,n,t);else if(t===`document`)r=ze(U(e));else if(W(t))r=He(t,n);else{let n=Ne(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return B(r)}function We(e,t){let n=t.get(e);if(n)return n;let r=X(e,[],!1).filter(e=>W(e)&&V(e)!==`body`),i=null,a=J(e).position===`fixed`,o=a?Y(e):e;for(;W(o)&&!q(o);){let e=J(o),t=we(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Y(o)}return t.set(e,r),r}function Ge(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?be(t)?[]:We(t,this._c):[].concat(n),r],o=Ue(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ue(t,a[e],i);s=h(n.top,s),c=m(n.right,c),l=m(n.bottom,l),u=h(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ke(e){let{width:t,height:n}=Ae(e);return{width:t,height:n}}function qe(e,t,n){let r=G(t),i=U(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=v(0);if((r||!a)&&((V(t)!==`body`||ve(i))&&(s=De(t)),r)){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Fe(i));let l=i&&!r&&!a?Ie(i,s):v(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Je(e){return J(e).position===`static`}function Ye(e,t){if(!G(e)||J(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function Xe(e,t){let n=H(e);if(be(e))return n;if(!G(e)){let t=Y(e);for(;t&&!q(t);){if(W(t)&&!Je(t))return t;t=Y(t)}return n}let r=Ye(e,t);for(;r&&ye(r)&&Je(r);)r=Ye(r,t);return r&&q(r)&&Je(r)&&!we(r)?n:r||Te(e)||n}var Ze=async function(e){let t=this.getOffsetParent||Xe,n=this.getDimensions,r=await n(e.floating);return{reference:qe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qe(e){return J(e).direction===`rtl`}var $e={convertOffsetParentRelativeRectToViewportRelativeRect:Le,getDocumentElement:U,getClippingRect:Ge,getOffsetParent:Xe,getElementRects:Ze,getClientRects:Re,getDimensions:Ke,getScale:Z,isElement:W,isRTL:Qe};function et(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tt(e,t,n){let r=null,i,a=U(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let g=_(d),v=_(a.clientWidth-(u+f)),y=_(a.clientHeight-(d+p)),b=_(u),x={rootMargin:-g+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:h(0,m(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!et(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=H(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function nt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=je(e),u=i||a?[...l?X(l):[],...t?X(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?tt(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!et(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rt=de,it=fe,at=ae,ot=me,st=ce,ct=ie,lt=pe,ut=(e,t,n)=>{let r=new Map,i=n??{},a={...$e,...i.platform,_c:r};return re(e,t,{...i,platform:a})},dt=e(n(),1),ft=typeof document<`u`?f.useLayoutEffect:function(){};function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!pt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function mt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ht(e,t){let n=mt(e);return Math.round(t*n)/n}function gt(e){let t=f.useRef(e);return ft(()=>{t.current=e}),t}function _t(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=f.useState(r);pt(p,r)||m(r);let[h,g]=f.useState(null),[_,v]=f.useState(null),y=f.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=f.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=f.useRef(null),w=f.useRef(null),T=f.useRef(u),E=c!=null,D=gt(c),O=gt(i),k=gt(l),A=f.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),ut(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!pt(T.current,t)&&(T.current=t,dt.flushSync(()=>{d(t)}))})},[p,t,n,O,k]);ft(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=f.useRef(!1);ft(()=>(j.current=!0,()=>{j.current=!1}),[]),ft(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=f.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=f.useMemo(()=>({reference:x,floating:S}),[x,S]),P=f.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ht(N.floating,u.x),r=ht(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...mt(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ct({element:r.current,padding:i}).fn(n):r?ct({element:r,padding:i}).fn(n):{}}}},yt=(e,t)=>{let n=rt(e);return{name:n.name,fn:n.fn,options:[e,t]}},bt=(e,t)=>{let n=it(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>({fn:lt(e).fn,options:[e,t]}),St=(e,t)=>{let n=at(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ct=(e,t)=>{let n=ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt=(e,t)=>{let n=st(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tt=(e,t)=>{let n=vt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$=r(),Et=`Arrow`,Dt=f.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,$.jsx)(o.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,$.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Dt.displayName=Et;var Ot=Dt;function kt(e){let[t,n]=f.useState(void 0);return l(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var At=`Popper`,[jt,Mt]=c(At),[Nt,Pt]=jt(At),Ft=e=>{let{__scopePopper:t,children:n}=e,[r,i]=f.useState(null),[a,o]=f.useState(void 0);return(0,$.jsx)(Nt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Ft.displayName=At;var It=`PopperAnchor`,Lt=f.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Pt(It,n),s=f.useRef(null),c=a.onAnchorChange,l=u(t,f.useCallback(e=>{s.current=e,e&&c(e)},[c])),d=f.useRef(null);f.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&c(d.current)});let p=a.placementState&&qt(a.placementState),m=p?.[0],h=p?.[1];return r?null:(0,$.jsx)(o.div,{"data-radix-popper-side":m,"data-radix-popper-align":h,...i,ref:l})});Lt.displayName=It;var Rt=`PopperContent`,[zt,Bt]=jt(Rt),Vt=f.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g=`partial`,hideWhenDetached:_=!1,updatePositionStrategy:v=`optimized`,onPlaced:y,...b}=e,x=Pt(Rt,n),[S,C]=f.useState(null),w=u(t,C),[T,E]=f.useState(null),D=kt(T),O=D?.width??0,k=D?.height??0,A=r+(a===`center`?``:`-`+a),j=typeof h==`number`?h:{top:0,right:0,bottom:0,left:0,...h},M=Array.isArray(m)?m:[m],N=M.length>0,P={padding:j,boundary:M.filter(Gt),altBoundary:N},{refs:F,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=_t({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>nt(...e,{animationFrame:v===`always`}),elements:{reference:x.anchor},middleware:[yt({mainAxis:i+k,alignmentAxis:c}),p&&bt({mainAxis:!0,crossAxis:!1,limiter:g===`partial`?xt():void 0,...P}),p&&St({...P}),Ct({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&Tt({element:T,padding:d}),Kt({arrowWidth:O,arrowHeight:k}),_&&wt({strategy:`referenceHidden`,...P,boundary:N?P.boundary:void 0})]}),B=x.setPlacementState;l(()=>(B(L),()=>{B(void 0)}),[L,B]);let[ee,te]=qt(L),ne=s(y);l(()=>{R&&ne?.()},[R,ne]);let re=z.arrow?.x,ie=z.arrow?.y,ae=z.arrow?.centerOffset!==0,[oe,se]=f.useState();return l(()=>{S&&se(window.getComputedStyle(S).zIndex)},[S]),(0,$.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:R?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,$.jsx)(zt,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:E,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,$.jsx)(o.div,{"data-side":ee,"data-align":te,...b,ref:w,style:{...b.style,animation:R?void 0:`none`}})})})});Vt.displayName=Rt;var Ht=`PopperArrow`,Ut={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Wt=f.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Bt(Ht,n),a=Ut[i.placedSide];return(0,$.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,$.jsx)(Ot,{...r,ref:t,style:{...r.style,display:`block`}})})});Wt.displayName=Ht;function Gt(e){return e!==null}var Kt=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=qt(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function qt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Jt=Ft,Yt=Lt,Xt=Vt,Zt=Wt,Qt=`rounded-[var(--ui-radius)] bg-border/50 text-sm text-fg placeholder:text-fg-muted transition-colors hover:bg-border/80 focus:bg-border/80 disabled:cursor-not-allowed disabled:opacity-50`,$t=`relative flex cursor-pointer select-none items-center gap-2 rounded-[var(--ui-menu-radius)] px-2 py-1.5 text-sm text-fg outline-none transition-colors`,en=`data-[highlighted]:bg-action data-[highlighted]:text-action-ink data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,tn=`data-[selected=true]:bg-action data-[selected=true]:text-action-ink data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,nn=`overlay-surface rounded-[var(--ui-surface-radius)] bg-elevated`,rn=`overlay-content-motion`,an=`${nn} ${rn} p-1`,on=`overlay-surface rounded-[var(--ui-radius)] bg-elevated`,sn=`inline-flex size-[var(--ui-control-height)] shrink-0 cursor-pointer items-center justify-center rounded-[var(--ui-radius)] text-fg transition-colors hover:bg-elevated disabled:pointer-events-none disabled:opacity-50`,cn=`cursor-pointer rounded-[var(--ui-menu-radius)] px-1 py-0.5 text-xs text-fg transition-colors hover:bg-elevated`;function ln({className:e,type:t,...n}){return(0,$.jsx)(`input`,{type:t,className:i(`flex h-[var(--ui-field-height)] w-full px-2.5`,Qt,e),...n})}function un({className:e,...t}){return(0,$.jsx)(`textarea`,{className:i(`flex min-h-16 w-full px-2.5 py-2`,Qt,e),...t})}var dn=a(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);function fn(e){let t=e+`CollectionProvider`,[n,r]=c(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=f.useRef(null),a=f.useRef(new Map).current;return(0,$.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,l=d(s),p=f.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=u(t,a(s,n).collectionRef);return(0,$.jsx)(l,{ref:i,children:r})});p.displayName=s;let m=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=d(m),_=f.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=f.useRef(null),s=u(t,o),c=a(m,n);return f.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,$.jsx)(g,{[h]:``,ref:s,children:r})});_.displayName=m;function v(t){let n=a(e+`CollectionConsumer`,t);return f.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:p,ItemSlot:_},v,r]}var pn=f.createContext(void 0);function mn(e){let t=f.useContext(pn);return e||t||`ltr`}export{Zt as _,un as a,Mt as b,Qt as c,$t as d,an as f,Yt as g,cn as h,ln as i,tn as l,nn as m,fn as n,sn as o,rn as p,dn as r,on as s,mn as t,en as u,Xt as v,kt as x,Jt as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{C as r,E as i,S as a,T as o,_ as s,b as c,f as l,g as u,h as d,m as f,p,v as m,w as h,x as g,y as _}from"./dialog-B0poBDCr.js";import{o as v,r as y}from"./x-Dq6POV20.js";import{_ as b,b as x,g as S,n as C,t as w,v as T,y as E}from"./dist-C4YjL9GW.js";var D=e(t(),1),O=!1;function ee(){let[e,t]=D.useState(O);return D.useEffect(()=>{O||(O=!0,t(!0))},[]),e}var k=D.useSyncExternalStore;function A(){return()=>{}}function te(){return k(A,()=>!0,()=>!1)}var j=typeof k==`function`?te:ee,M=n(),N=`rovingFocusGroup.onEntryFocus`,ne={bubbles:!1,cancelable:!0},P=`RovingFocusGroup`,[F,I,re]=C(P),[ie,L]=o(P,[re]),[R,ae]=ie(P),oe=D.forwardRef((e,t)=>(0,M.jsx)(F.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(F.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(se,{...e,ref:t})})}));oe.displayName=P;var se=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:o,loop:s=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...h}=e,g=D.useRef(null),_=v(t,g),y=w(c),[b,x]=u({prop:l,defaultProp:d??null,onChange:f,caller:P}),[S,C]=D.useState(!1),T=a(p),E=I(n),O=D.useRef(!1),[ee,k]=D.useState(0);return D.useEffect(()=>{let e=g.current;if(e)return e.addEventListener(N,T),()=>e.removeEventListener(N,T)},[T]),(0,M.jsx)(R,{scope:n,orientation:o,dir:y,loop:s,currentTabStopId:b,onItemFocus:D.useCallback(e=>x(e),[x]),onItemShiftTab:D.useCallback(()=>C(!0),[]),onFocusableItemAdd:D.useCallback(()=>k(e=>e+1),[]),onFocusableItemRemove:D.useCallback(()=>k(e=>e-1),[]),children:(0,M.jsx)(r.div,{tabIndex:S||ee===0?-1:0,"data-orientation":o,...h,ref:_,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{O.current=!0}),onFocus:i(e.onFocus,e=>{let t=!O.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(N,ne);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=E().filter(e=>e.focusable);pe([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),m)}}O.current=!1}),onBlur:i(e.onBlur,()=>C(!1))})})}),ce=`RovingFocusGroupItem`,le=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:s,children:l,...u}=e,d=_(),f=s||d,p=ae(ce,n),m=p.currentTabStopId===f,h=I(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:y}=p,b=j();return c(()=>{if(!(!b||!a))return g(),()=>v()},[b,a,g,v]),D.useEffect(()=>{if(!(b||!a))return g(),()=>v()},[b,a,g,v]),(0,M.jsx)(F.ItemSlot,{scope:n,id:f,focusable:a,active:o,children:(0,M.jsx)(r.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:i(e.onMouseDown,e=>{a?p.onItemFocus(f):e.preventDefault()}),onFocus:i(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=fe(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?me(n,r+1):n.slice(r+1)}setTimeout(()=>pe(n))}}),children:typeof l==`function`?l({isCurrentTabStop:m,hasTabStop:y!=null}):l})})});le.displayName=ce;var ue={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function de(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function fe(e,t,n){let r=de(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return ue[r]}function pe(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function me(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var he=oe,ge=le,z=[`Enter`,` `],_e=[`ArrowDown`,`PageUp`,`Home`],ve=[`ArrowUp`,`PageDown`,`End`],ye=[..._e,...ve],be={ltr:[...z,`ArrowRight`],rtl:[...z,`ArrowLeft`]},xe={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},B=`Menu`,[V,Se,Ce]=C(B),[H,we]=o(B,[Ce,x,L]),U=x(),Te=L(),[Ee,W]=H(B),[De,G]=H(B),Oe=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,c=U(t),[l,u]=D.useState(null),d=D.useRef(!1),f=a(o),p=w(i);return D.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),D.useEffect(()=>{if(!n)return;let e=()=>f(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,M.jsx)(E,{...c,children:(0,M.jsx)(Ee,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,M.jsx)(De,{scope:t,onClose:D.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:r})})})};Oe.displayName=B;var ke=`MenuAnchor`,K=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,M.jsx)(S,{...i,...r,ref:t})});K.displayName=ke;var q=`MenuPortal`,[Ae,je]=H(q,{forceMount:void 0}),Me=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=W(q,t);return(0,M.jsx)(Ae,{scope:t,forceMount:n,children:(0,M.jsx)(s,{present:n||a.open,children:(0,M.jsx)(m,{asChild:!0,container:i,children:r})})})};Me.displayName=q;var J=`MenuContent`,[Ne,Pe]=H(J),Fe=D.forwardRef((e,t)=>{let n=je(J,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=W(J,e.__scopeMenu),o=G(J,e.__scopeMenu);return(0,M.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(s,{present:r||a.open,children:(0,M.jsx)(V.Slot,{scope:e.__scopeMenu,children:o.modal?(0,M.jsx)(Ie,{...i,ref:t}):(0,M.jsx)(Le,{...i,ref:t})})})})}),Ie=D.forwardRef((e,t)=>{let n=W(J,e.__scopeMenu),r=D.useRef(null),a=v(t,r);return D.useEffect(()=>{let e=r.current;if(e)return p(e)},[]),(0,M.jsx)(ze,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Le=D.forwardRef((e,t)=>{let n=W(J,e.__scopeMenu);return(0,M.jsx)(ze,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Re=y(`MenuContent.ScrollLock`),ze=D.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:_,onDismiss:y,disableOutsideScroll:b,...x}=e,S=W(J,n),C=G(J,n),w=U(n),E=Te(n),O=Se(n),[ee,k]=D.useState(null),A=D.useRef(null),te=v(t,A,S.onContentChange),j=D.useRef(0),N=D.useRef(``),ne=D.useRef(0),P=D.useRef(null),F=D.useRef(`right`),I=D.useRef(0),re=b?l:D.Fragment,ie=b?{as:Re,allowPinchZoom:!0}:void 0,L=e=>{let t=N.current+e,n=O().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=yt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){N.current=t,window.clearTimeout(j.current),t!==``&&(j.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};D.useEffect(()=>()=>window.clearTimeout(j.current),[]),d();let R=D.useCallback(e=>F.current===P.current?.side&&xt(e,P.current?.area),[]);return(0,M.jsx)(Ne,{scope:n,searchRef:N,onItemEnter:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:D.useCallback(e=>{R(e)||(A.current?.focus(),k(null))},[R]),onTriggerLeave:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:D.useCallback(e=>{P.current=e},[]),children:(0,M.jsx)(re,{...ie,children:(0,M.jsx)(f,{asChild:!0,trapped:a,onMountAutoFocus:i(o,e=>{e.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,M.jsx)(g,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:_,onDismiss:y,children:(0,M.jsx)(he,{asChild:!0,...E,dir:C.dir,orientation:`vertical`,loop:r,currentTabStopId:ee,onCurrentTabStopIdChange:k,onEntryFocus:i(u,e=>{C.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,M.jsx)(T,{role:`menu`,"aria-orientation":`vertical`,"data-state":ht(S.open),"data-radix-menu-content":``,dir:C.dir,...w,...x,ref:te,style:{outline:`none`,...x.style},onKeyDown:i(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=A.current;if(e.target!==i||!ye.includes(e.key))return;e.preventDefault();let a=O().filter(e=>!e.disabled).map(e=>e.ref.current);ve.includes(e.key)&&a.reverse(),_t(a)}),onBlur:i(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),N.current=``)}),onPointerMove:i(e.onPointerMove,$(e=>{let t=e.target,n=I.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>I.current?`right`:`left`;F.current=t,I.current=e.clientX}}))})})})})})})});Fe.displayName=J;var Be=`MenuGroup`,Ve=D.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,M.jsx)(r.div,{role:`group`,...i,ref:t})});Ve.displayName=Be;var He=`MenuLabel`,Ue=D.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,M.jsx)(r.div,{...i,ref:t})});Ue.displayName=He;var Y=`MenuItem`,We=`menu.itemSelect`,X=D.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,o=D.useRef(null),s=G(Y,e.__scopeMenu),c=Pe(Y,e.__scopeMenu),l=v(t,o),u=D.useRef(!1),d=()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(We,{bubbles:!0,cancelable:!0});e.addEventListener(We,e=>r?.(e),{once:!0}),h(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return(0,M.jsx)(Ge,{...a,ref:l,disabled:n,onClick:i(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:i(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:i(e.onKeyDown,e=>{n||e.target!==e.currentTarget||c.searchRef.current!==``&&e.key===` `||z.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});X.displayName=Y;var Ge=D.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:a=!1,textValue:o,...s}=e,c=Pe(Y,n),l=Te(n),u=D.useRef(null),d=v(t,u),[f,p]=D.useState(!1),[m,h]=D.useState(``);return D.useEffect(()=>{let e=u.current;e&&h((e.textContent??``).trim())},[s.children]),(0,M.jsx)(V.ItemSlot,{scope:n,disabled:a,textValue:o??m,children:(0,M.jsx)(ge,{asChild:!0,...l,focusable:!a,children:(0,M.jsx)(r.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,...s,ref:d,onPointerMove:i(e.onPointerMove,$(e=>{a?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:i(e.onPointerLeave,$(e=>c.onItemLeave(e))),onFocus:i(e.onFocus,()=>p(!0)),onBlur:i(e.onBlur,()=>p(!1))})})})}),Ke=`MenuCheckboxItem`,qe=D.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,M.jsx)(tt,{scope:e.__scopeMenu,checked:n,children:(0,M.jsx)(X,{role:`menuitemcheckbox`,"aria-checked":Q(n)?`mixed`:n,...a,ref:t,"data-state":gt(n),onSelect:i(a.onSelect,()=>r?.(Q(n)?!0:!n),{checkForDefaultPrevented:!1})})})});qe.displayName=Ke;var Je=`MenuRadioGroup`,[Ye,Xe]=H(Je,{value:void 0,onValueChange:()=>{}}),Ze=D.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,o=a(r);return(0,M.jsx)(Ye,{scope:e.__scopeMenu,value:n,onValueChange:o,children:(0,M.jsx)(Ve,{...i,ref:t})})});Ze.displayName=Je;var Qe=`MenuRadioItem`,$e=D.forwardRef((e,t)=>{let{value:n,...r}=e,a=Xe(Qe,e.__scopeMenu),o=n===a.value;return(0,M.jsx)(tt,{scope:e.__scopeMenu,checked:o,children:(0,M.jsx)(X,{role:`menuitemradio`,"aria-checked":o,...r,ref:t,"data-state":gt(o),onSelect:i(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});$e.displayName=Qe;var et=`MenuItemIndicator`,[tt,nt]=H(et,{checked:!1}),rt=D.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:i,...a}=e,o=nt(et,n);return(0,M.jsx)(s,{present:i||Q(o.checked)||o.checked===!0,children:(0,M.jsx)(r.span,{...a,ref:t,"data-state":gt(o.checked)})})});rt.displayName=et;var it=`MenuSeparator`,at=D.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,M.jsx)(r.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});at.displayName=it;var ot=`MenuArrow`,st=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,M.jsx)(b,{...i,...r,ref:t})});st.displayName=ot;var ct=`MenuSub`,[lt,ut]=H(ct),dt=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,o=W(ct,t),s=U(t),[c,l]=D.useState(null),[u,d]=D.useState(null),f=a(i);return D.useEffect(()=>(o.open===!1&&f(!1),()=>f(!1)),[o.open,f]),(0,M.jsx)(E,{...s,children:(0,M.jsx)(Ee,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:(0,M.jsx)(lt,{scope:t,contentId:_(),triggerId:_(),trigger:c,onTriggerChange:l,children:n})})})};dt.displayName=ct;var Z=`MenuSubTrigger`,ft=D.forwardRef((e,t)=>{let n=W(Z,e.__scopeMenu),r=G(Z,e.__scopeMenu),a=ut(Z,e.__scopeMenu),o=Pe(Z,e.__scopeMenu),s=D.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=D.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);D.useEffect(()=>d,[d]),D.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]);let f=v(t,a.onTriggerChange);return(0,M.jsx)(K,{asChild:!0,...u,children:(0,M.jsx)(Ge,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?a.contentId:void 0,"data-state":ht(n.open),...e,ref:f,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:i(e.onPointerMove,$(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:i(e.onPointerLeave,$(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:i(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||o.searchRef.current!==``&&t.key===` `||be[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});ft.displayName=Z;var pt=`MenuSubContent`,mt=D.forwardRef((e,t)=>{let n=je(J,e.__scopeMenu),{forceMount:r=n.forceMount,align:a=`start`,...o}=e,c=W(J,e.__scopeMenu),l=G(J,e.__scopeMenu),u=ut(pt,e.__scopeMenu),d=D.useRef(null),f=v(t,d);return(0,M.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(s,{present:r||c.open,children:(0,M.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,M.jsx)(ze,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:f,align:a,side:l.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i(e.onFocusOutside,e=>{e.target!==u.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:i(e.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:i(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=xe[l.dir].includes(e.key);t&&n&&(c.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});mt.displayName=pt;function ht(e){return e?`open`:`closed`}function Q(e){return e===`indeterminate`}function gt(e){return Q(e)?`indeterminate`:e?`checked`:`unchecked`}function _t(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function vt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function yt(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=vt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function bt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function xt(e,t){return t?bt({x:e.clientX,y:e.clientY},t):!1}function $(e){return t=>t.pointerType===`mouse`?e(t):void 0}var St=Oe,Ct=K,wt=Me,Tt=Fe,Et=Ve,Dt=Ue,Ot=X,kt=qe,At=Ze,jt=$e,Mt=rt,Nt=at,Pt=st,Ft=dt,It=ft,Lt=mt;export{we as _,Et as a,Dt as c,jt as d,St as f,It as g,Lt as h,Tt as i,wt as l,Ft as m,Pt as n,Ot as o,Nt as p,kt as r,Mt as s,Ct as t,At as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as e}from"./auth-C3ruG3fE.js";import{n as t}from"./api-CULxlzTe.js";import{y as n}from"./ws-B_QsPbsD.js";async function r(n){let r=/^\/forward\/([^/]+)\/(\d+)$/.exec(n.pathname);if(!r)throw Error(`This forwarding link is invalid.`);let i=await t(`POST`,`/cockpit/proxy-grant`,{session:r[1],port:Number(r[2]),path:n.searchParams.get(`path`)??`/`});return e.parse(i).url}async function i(e){let t=e,i=new URL(e,window.location.href);n()&&i.origin===window.location.origin&&i.pathname.startsWith(`/forward/`)&&(t=await r(i)),window.open(t,`_blank`,`noopener,noreferrer`)}export{i as n,r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{Dt as n,Et as r,Nt as i,Pt as a,Tt as o,jt as s,kt as c,wt as l}from"./protocol-support-BwRR1kRO.js";import{t as u}from"./jsx-runtime-By8HlURe.js";import{n as d,r as f}from"./api-CULxlzTe.js";import{n as p,t as m}from"./createLucideIcon-C9A1vLE-.js";import{C as ee,E as h,T as te,g,y as _}from"./dialog-B0poBDCr.js";import{n as ne}from"./dist-BOS6OKSE.js";import{o as re}from"./x-Dq6POV20.js";import{d as v,f as y,r as ie,u as b}from"./dist-C4YjL9GW.js";import{_ as x,a as ae,c as oe,d as se,f as ce,g as le,h as ue,i as de,l as fe,m as pe,n as me,o as he,p as ge,r as _e,s as ve,t as ye,u as be}from"./dist-Duc5nm48.js";var xe=class extends s{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,n.data),hasPreviousPage:a(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function Se(e,t){return n(e,xe,t)}var Ce=m(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),we=m(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Te=m(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Ee=m(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),De=m(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Oe=m(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]);function S(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);try{r.href=n,r.download=t,document.body.appendChild(r),r.click()}finally{r.remove(),setTimeout(()=>URL.revokeObjectURL(n),6e4)}}var C=50;function w(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function T(e){return e?{placeholderData:e=>e}:{}}function ke(e,t,n){let i=e!==void 0;return r({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>d(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${w(n)}`),enabled:i,...T(i)})}function Ae(e,t,n){let i=n?.root;return r({queryKey:i===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,i],queryFn:()=>d(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${w(i)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:l(3e3),refetchOnWindowFocus:!0}:{}})}function je(e,t){let n=c();return o({mutationFn:({path:n,...r})=>d(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${w(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function Me(e,t){let n=t?.against??`base`,i=t?.area,a=t?.root,o=e!==void 0&&(t?.enabled??!0);return r({queryKey:a===void 0?[`wt-diff`,e,n,i]:[`wt-diff`,e,n,i,a],queryFn:()=>{let t=i===void 0?``:`&area=${i}`;return d(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${w(a)}`)},enabled:o,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...T(o)})}function Ne(e,t){let n=t?.root,i=e!==void 0&&(t?.enabled??!0);return r({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>d(`GET`,`/api/worktrees/${e}/git-repositories${E(n)}`),enabled:i,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...T(i)})}function Pe(e,t,n){let i=n?.root,a=e!==void 0&&(n?.enabled??!0);return r({queryKey:[`git-original`,e,t,i],queryFn:()=>d(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${w(i)}`),enabled:a,refetchInterval:l(1e4),refetchOnWindowFocus:!0})}function Fe(e,t,n){let i=n?.root;return r({queryKey:[`git-index-file`,e,t,i],queryFn:()=>d(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${w(i)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function Ie(e,t){let n=c();return o({mutationFn:({action:n,...r})=>d(`POST`,`/api/worktrees/${e}/git-${n}${E(t)}`,r),onSuccess:(t,r)=>{r.action===`restore`&&(n.invalidateQueries({queryKey:[`wt-file`,e]}),n.invalidateQueries({queryKey:[`wt-tree`,e]})),n.invalidateQueries({queryKey:[`git-repositories`,e]}),n.invalidateQueries({queryKey:[`wt-git-status`,e]}),n.invalidateQueries({queryKey:[`wt-diff`,e]}),n.invalidateQueries({queryKey:[`wt-log`,e]}),n.invalidateQueries({queryKey:[`wt-show`,e]}),n.invalidateQueries({queryKey:[`git-original`,e]}),n.invalidateQueries({queryKey:[`git-index-file`,e]})}})}function Le(e,t){let n=t?.root,i=e!==void 0&&(t?.enabled??!0);return r({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>d(`GET`,`/api/worktrees/${e}/git-status${E(n)}`),enabled:i,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...T(i)})}function E(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function Re(e,t,n,r){return d(`POST`,`/api/worktrees/${e}/create${E(r)}`,{path:t,kind:n})}function ze(e,t,n,r){return d(`POST`,`/api/worktrees/${e}/rename${E(r)}`,{from:t,to:n})}function Be(e,t,n,r){return d(`POST`,`/api/worktrees/${e}/copy${E(r)}`,{from:t,to:n})}function Ve(e,t,n){return d(`POST`,`/api/worktrees/${e}/transfer${E(n)}`,t)}function He(e,t,n){return d(`POST`,`/api/worktrees/${e}/delete${E(n)}`,{path:t})}function Ue(e,t,n){let{query:i,regex:a,caseSensitive:o,wholeWord:s}=t;return r({queryKey:[`wt-search`,e,i,a,o,s,n],queryFn:()=>{let t=new URLSearchParams({q:i});return a&&t.set(`regex`,`1`),o&&t.set(`case`,`1`),s&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),d(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&i.length>0,staleTime:2e3})}function We(e,t,n,i){let a=i?.root;return r({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>d(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${w(a)}`),enabled:e!==void 0&&(i?.enabled??!0),staleTime:1/0})}function Ge(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return Se({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>d(`GET`,`/api/worktrees/${e}/log?limit=${C}&skip=${t}${w(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*C:void 0,enabled:r,...T(r)})}function Ke(e,t,n){return r({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>d(`GET`,`/api/worktrees/${e}/show/${t}${E(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var qe=64*1024*1024;function Je(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function Ye(e,t,n,r){let i=[];for(let a of Je(n,qe)){let n=new FormData;for(let e of a)n.append(`files`,e,e.name);let o=await f(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${w(r)}`,{body:n});i.push(...(await o.json()).files)}return{files:i}}function Xe(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function Ze(e,t,n){let r=await f(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${w(n)}`),i=await r.blob(),a=t.split(`/`).filter(Boolean).pop()??`worktree`;S(i,Xe(r.headers.get(`content-disposition`),a))}var D=e(t(),1),O=[],k=new Map,A=new Map,j=new Map;function M(e,t){let n=k.get(e)??O;t.length===0?k.delete(e):k.set(e,t);let r=new Set([...n.map(e=>N(e.source)),...t.map(e=>N(e.source))]);for(let e of r)tt(e)}function Qe(e){M(e,O)}function $e(e,t,n){let r=N({session:e,path:t,...n===void 0?{}:{root:n}});return(0,D.useSyncExternalStore)((0,D.useCallback)(e=>nt(r,e),[r]),()=>et({session:e,path:t,...n===void 0?{}:{root:n}}))}function et(e){return A.get(N(e))??O}function tt(e){let t=[...k.values()].flatMap(t=>t.filter(t=>N(t.source)===e));t.length===0?A.delete(e):A.set(e,t);for(let t of j.get(e)??[])t()}function nt(e,t){let n=j.get(e)??new Set;return n.add(t),j.set(e,n),()=>{n.delete(t),n.size===0&&j.delete(e)}}function N(e){return JSON.stringify([e.session,e.root??null,e.path])}var P=u();function F(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var I=new Map;function rt(e,t,n){let r={save:t,...n?{target:n}:{}};return I.set(e,r),()=>{I.get(e)===r&&I.delete(e)}}function it(e){if(e===null)return!1;let t=I.get(e);return t?(t.save(),!0):!1}async function at(e,t){let n=F(e.session,e.path,e.root),r=[...I.entries()].flatMap(([r,i])=>{let a=i.target;if(!a||a.session!==e.session||a.root!==e.root)return[];let o=ot(a.path);return r!==n&&!t.has(o)?[]:[Promise.resolve(i.save())]});return(await Promise.all(r)).every(e=>e!==!1)}function ot(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1).toLowerCase()}var st=`UTC`;function ct(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:st})}var L=60,R=60*L,z=24*R,lt=7*z;function ut(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<L?`just now`:r<R?`${Math.floor(r/L)} m ago`:r<z?`${Math.floor(r/R)} h ago`:r<lt?`${Math.floor(r/z)} d ago`:ct(n)}function dt(e,t){return t?`added`:e}function ft(e){return d(`POST`,`/api/profiles/${e}/untitled`)}function B(e,t){return[`untitled`,e,t]}function pt(e,t){return r({queryKey:B(e,t),queryFn:()=>d(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function mt(e,t,n,r){e.setQueryData(B(t,n),e=>e===void 0?e:{...e,content:r})}function ht(e,t,n){return d(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function gt(e,t){return d(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var V=null,H=new Map;function _t(e){V=e}function vt(e){V?.(e)}function yt(e,t){H.set(e,t)}function bt(e){return H.get(e)}function xt(e){H.delete(e)}var U=(0,D.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function St({children:e}){let[t,n]=(0,D.useState)(null),r=(0,D.useCallback)(e=>n(()=>e),[]),i=(0,D.useCallback)((e,n,r,i)=>{if(!t){ne(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),a=(0,D.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,P.jsx)(U.Provider,{value:a,children:e})}function Ct(){let{openFile:e}=(0,D.useContext)(U);return{openFile:e}}function wt(e){let{setHandler:t}=(0,D.useContext)(U),n=(0,D.useRef)(e);n.current=e,(0,D.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var W=new Map;function Tt(e,t){let n=F(e.session,e.path,e.root),r=W.get(n)??new Set;return r.add(t),W.set(n,r),()=>{r.delete(t),r.size||W.delete(n)}}function Et(e){let t=W.get(F(e.session,e.path,e.root))?.values().next().value;return t?(t(),!0):!1}var G=`DropdownMenu`,[Dt,Ot]=te(G,[x]),K=x(),[kt,q]=Dt(G),J=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=K(t),l=D.useRef(null),[u,d]=g({prop:i,defaultProp:a??!1,onChange:o,caller:G});return(0,P.jsx)(kt,{scope:t,triggerId:_(),triggerRef:l,contentId:_(),open:u,onOpenChange:d,onOpenToggle:D.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,P.jsx)(ce,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};J.displayName=G;var Y=`DropdownMenuTrigger`,X=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=q(Y,n),o=K(n),s=re(t,a.triggerRef);return(0,P.jsx)(ye,{asChild:!0,...o,children:(0,P.jsx)(ee.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:h(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:h(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});X.displayName=Y;var At=`DropdownMenuPortal`,jt=e=>{let{__scopeDropdownMenu:t,...n}=e,r=K(t);return(0,P.jsx)(fe,{...r,...n})};jt.displayName=At;var Mt=`DropdownMenuContent`,Nt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=q(Mt,n),a=K(n),o=D.useRef(!1);return(0,P.jsx)(de,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:h(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:h(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Nt.displayName=Mt;var Pt=`DropdownMenuGroup`,Ft=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(ae,{...i,...r,ref:t})});Ft.displayName=Pt;var It=`DropdownMenuLabel`,Lt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(oe,{...i,...r,ref:t})});Lt.displayName=It;var Rt=`DropdownMenuItem`,zt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(he,{...i,...r,ref:t})});zt.displayName=Rt;var Bt=`DropdownMenuCheckboxItem`,Vt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(_e,{...i,...r,ref:t})});Vt.displayName=Bt;var Ht=`DropdownMenuRadioGroup`,Ut=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(be,{...i,...r,ref:t})});Ut.displayName=Ht;var Wt=`DropdownMenuRadioItem`,Gt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(se,{...i,...r,ref:t})});Gt.displayName=Wt;var Kt=`DropdownMenuItemIndicator`,qt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(ve,{...i,...r,ref:t})});qt.displayName=Kt;var Jt=`DropdownMenuSeparator`,Yt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(ge,{...i,...r,ref:t})});Yt.displayName=Jt;var Xt=`DropdownMenuArrow`,Zt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(me,{...i,...r,ref:t})});Zt.displayName=Xt;var Qt=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=K(t),[s,c]=g({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,P.jsx)(pe,{...o,open:s,onOpenChange:c,children:n})},$t=`DropdownMenuSubTrigger`,en=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(le,{...i,...r,ref:t})});en.displayName=$t;var tn=`DropdownMenuSubContent`,nn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=K(n);return(0,P.jsx)(ue,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});nn.displayName=tn;var rn=J,an=X,on=jt,sn=Nt,cn=zt,ln=Yt,un=Qt,dn=en,fn=nn,pn=rn,mn=an,hn=un;function gn({className:e,sideOffset:t=4,...n}){return(0,P.jsx)(on,{children:(0,P.jsx)(sn,{sideOffset:t,className:p(`z-50 min-w-36 overflow-hidden`,y,`overlay-dropdown-menu-motion`,e),...n})})}function _n({className:e,...t}){return(0,P.jsx)(cn,{className:p(v,b,`[&_svg]:size-3.5`,e),...t})}function vn({className:e,children:t,...n}){return(0,P.jsxs)(dn,{className:p(v,b,`data-[state=open]:bg-action data-[state=open]:text-action-ink [&_svg]:size-3.5`,e),...n,children:[t,(0,P.jsx)(ie,{className:`ml-auto`})]})}function yn({className:e,...t}){return(0,P.jsx)(on,{children:(0,P.jsx)(fn,{className:p(`z-50 min-w-36 overflow-hidden`,y,`overlay-dropdown-menu-motion`,e),...t})})}function bn({className:e,...t}){return(0,P.jsx)(ln,{className:p(`-mx-1 my-1 h-px bg-border`,e),...t})}var Z=new Map,Q=new Map;function xn(e,t,n){let r=$(e,t,n);Z.set(r,(Z.get(r)??0)+1);for(let e of Q.get(r)??[])e()}function Sn(e,t,n){let r=$(e,t,n),i=(0,D.useCallback)(e=>Cn(r,e),[r]),a=(0,D.useCallback)(()=>Z.get(r)??0,[r]);return(0,D.useSyncExternalStore)(i,a,a)}function Cn(e,t){let n=Q.get(e);return n||(n=new Set,Q.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&Q.delete(e)}}function $(e,t,n){return JSON.stringify([e,n??null,t])}export{Ge as $,at as A,w as B,ht as C,ut as D,dt as E,Be as F,Ie as G,Ye as H,Re as I,Fe as J,Pe as K,He as L,Qe as M,M as N,rt as O,$e as P,Le as Q,Ze as R,gt as S,pt as T,Ke as U,Ve as V,We as W,Me as X,je as Y,Ae as Z,yt as _,_n as a,Ee as at,bt as b,yn as c,Ce as ct,Tt as d,Ue as et,Et as f,xt as g,wt as h,gn as i,De as it,F as j,it as k,vn as l,Ct as m,Sn as n,S as nt,bn as o,Te as ot,St as p,Ne as q,pn as r,Oe as rt,hn as s,we as st,xn as t,ke as tt,mn as u,vt as v,mt as w,ft as x,_t as y,ze as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{Et as n,It as r,T as i,Tt as a,Wt as o,Yt as s,Z as c,kt as l,lt as u}from"./protocol-support-BwRR1kRO.js";import{C as d,J as f,S as p,W as m,X as h,Z as g,o as _,q as v,x as y}from"./auth-C3ruG3fE.js";import{a as b,c as ee,o as te,p as ne,s as x,t as re}from"./LazyTerminal-BffV6rzu.js";import{n as ie,o as S,r as ae,s as oe}from"./theme-swfNLod9.js";import{t as se}from"./jsx-runtime-By8HlURe.js";import{i as C,n as w,t as ce}from"./api-CULxlzTe.js";import{t as T,v as le,y as E}from"./ws-B_QsPbsD.js";import{n as ue,t as D}from"./createLucideIcon-C9A1vLE-.js";import{i as de,o as fe,r as pe,s as me,t as he}from"./dialog-B0poBDCr.js";import{c as ge,d as _e,s as ve,u as ye}from"./switch-DllF_QQT.js";function be(e,t){return`[${ne(t)}] ${e}`.slice(0,160)}function xe(e){return e}var O=e(t(),1);function Se(e,t){let n=l(t);return Ce({filters:{...e,status:`pending`}},n).length}function k(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function Ce(e={},t){let n=l(t).getMutationCache(),i=O.useRef(e),a=O.useRef(null);return a.current===null&&(a.current=k(n,e)),O.useEffect(()=>{i.current=e}),O.useSyncExternalStore(O.useCallback(e=>n.subscribe(()=>{let t=o(a.current,k(n,i.current));a.current!==t&&(a.current=t,r.schedule(e))}),[n]),()=>a.current,()=>a.current)}var we=D(`alarm-clock`,[[`circle`,{cx:`12`,cy:`13`,r:`8`,key:`3y4lt7`}],[`path`,{d:`M12 9v4l2 2`,key:`1c63tq`}],[`path`,{d:`M5 3 2 6`,key:`18tl5t`}],[`path`,{d:`m22 6-3-3`,key:`1opdir`}],[`path`,{d:`M6.38 18.7 4 21`,key:`17xu3x`}],[`path`,{d:`M17.64 18.67 20 21`,key:`kv2oe2`}]]),Te=D(`amphora`,[[`path`,{d:`M10 2v5.632c0 .424-.272.795-.653.982A6 6 0 0 0 6 14c.006 4 3 7 5 8`,key:`1h8rid`}],[`path`,{d:`M10 5H8a2 2 0 0 0 0 4h.68`,key:`3ezsi6`}],[`path`,{d:`M14 2v5.632c0 .424.272.795.652.982A6 6 0 0 1 18 14c0 4-3 7-5 8`,key:`yt6q09`}],[`path`,{d:`M14 5h2a2 2 0 0 1 0 4h-.68`,key:`8f95yk`}],[`path`,{d:`M18 22H6`,key:`mg6kv4`}],[`path`,{d:`M9 2h6`,key:`1jrp98`}]]),Ee=D(`anchor`,[[`path`,{d:`M12 6v16`,key:`nqf5sj`}],[`path`,{d:`m19 13 2-1a9 9 0 0 1-18 0l2 1`,key:`y7qv08`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}]]),De=D(`anvil`,[[`path`,{d:`M7 10H6a4 4 0 0 1-4-4 1 1 0 0 1 1-1h4`,key:`1hjpb6`}],[`path`,{d:`M7 5a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1 7 7 0 0 1-7 7H8a1 1 0 0 1-1-1z`,key:`1qn45f`}],[`path`,{d:`M9 12v5`,key:`3anwtq`}],[`path`,{d:`M15 12v5`,key:`5xh3zn`}],[`path`,{d:`M5 20a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3 1 1 0 0 1-1 1H6a1 1 0 0 1-1-1`,key:`1fi4x8`}]]),Oe=D(`apple`,[[`path`,{d:`M12 6.528V3a1 1 0 0 1 1-1h0`,key:`11qiee`}],[`path`,{d:`M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21`,key:`110c12`}]]),ke=D(`armchair`,[[`path`,{d:`M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3`,key:`irtipd`}],[`path`,{d:`M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z`,key:`1qyhux`}],[`path`,{d:`M5 18v2`,key:`ppbyun`}],[`path`,{d:`M19 18v2`,key:`gy7782`}]]),Ae=D(`axe`,[[`path`,{d:`m14 12-8.381 8.38a1 1 0 0 1-3.001-3L11 9`,key:`5z9253`}],[`path`,{d:`M15 15.5a.5.5 0 0 0 .5.5A6.5 6.5 0 0 0 22 9.5a.5.5 0 0 0-.5-.5h-1.672a2 2 0 0 1-1.414-.586l-5.062-5.062a1.205 1.205 0 0 0-1.704 0L9.352 5.648a1.205 1.205 0 0 0 0 1.704l5.062 5.062A2 2 0 0 1 15 13.828z`,key:`19zklq`}]]),je=D(`banana`,[[`path`,{d:`M4 13c3.5-2 8-2 10 2a5.5 5.5 0 0 1 8 5`,key:`1cscit`}],[`path`,{d:`M5.15 17.89c5.52-1.52 8.65-6.89 7-12C11.55 4 11.5 2 13 2c3.22 0 5 5.5 5 8 0 6.5-4.2 12-10.49 12C5.11 22 2 22 2 20c0-1.5 1.14-1.55 3.15-2.11Z`,key:`1y1nbv`}]]),Me=D(`bath`,[[`path`,{d:`M10 4 8 6`,key:`1rru8s`}],[`path`,{d:`M17 19v2`,key:`ts1sot`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}],[`path`,{d:`M7 19v2`,key:`12npes`}],[`path`,{d:`M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5`,key:`14ym8i`}]]),Ne=D(`beef`,[[`path`,{d:`M16.4 13.7A6.5 6.5 0 1 0 6.28 6.6c-1.1 3.13-.78 3.9-3.18 6.08A3 3 0 0 0 5 18c4 0 8.4-1.8 11.4-4.3`,key:`cisjcv`}],[`path`,{d:`m18.5 6 2.19 4.5a6.48 6.48 0 0 1-2.29 7.2C15.4 20.2 11 22 7 22a3 3 0 0 1-2.68-1.66L2.4 16.5`,key:`5byaag`}],[`circle`,{cx:`12.5`,cy:`8.5`,r:`2.5`,key:`9738u8`}]]),Pe=D(`beer`,[[`path`,{d:`M17 11h1a3 3 0 0 1 0 6h-1`,key:`1yp76v`}],[`path`,{d:`M9 12v6`,key:`1u1cab`}],[`path`,{d:`M13 12v6`,key:`1sugkk`}],[`path`,{d:`M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z`,key:`1510fo`}],[`path`,{d:`M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`19jb7n`}]]),Fe=D(`biceps-flexed`,[[`path`,{d:`M12.409 13.017A5 5 0 0 1 22 15c0 3.866-4 7-9 7-4.077 0-8.153-.82-10.371-2.462-.426-.316-.631-.832-.62-1.362C2.118 12.723 2.627 2 10 2a3 3 0 0 1 3 3 2 2 0 0 1-2 2c-1.105 0-1.64-.444-2-1`,key:`1pmlyh`}],[`path`,{d:`M15 14a5 5 0 0 0-7.584 2`,key:`5rb254`}],[`path`,{d:`M9.964 6.825C8.019 7.977 9.5 13 8 15`,key:`kbvsx9`}]]),Ie=D(`bike`,[[`circle`,{cx:`18.5`,cy:`17.5`,r:`3.5`,key:`15x4ox`}],[`circle`,{cx:`5.5`,cy:`17.5`,r:`3.5`,key:`1noe27`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`path`,{d:`M12 17.5V14l-3-3 4-3 2 3h2`,key:`1npguv`}]]),Le=D(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),Re=D(`bone`,[[`path`,{d:`M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z`,key:`w610uw`}]]),ze=D(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Be=D(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),Ve=D(`boom-box`,[[`path`,{d:`M4 9V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4`,key:`vvzvr1`}],[`path`,{d:`M8 8v1`,key:`xcqmfk`}],[`path`,{d:`M12 8v1`,key:`1rj8u4`}],[`path`,{d:`M16 8v1`,key:`1q12zr`}],[`rect`,{width:`20`,height:`12`,x:`2`,y:`9`,rx:`2`,key:`igpb89`}],[`circle`,{cx:`8`,cy:`15`,r:`2`,key:`fa4a8s`}],[`circle`,{cx:`16`,cy:`15`,r:`2`,key:`14c3ya`}]]),He=D(`briefcase-business`,[[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2`,key:`1ksdt3`}],[`path`,{d:`M22 13a18.15 18.15 0 0 1-20 0`,key:`12hx5q`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]),Ue=D(`brush`,[[`path`,{d:`m11 10 3 3`,key:`fzmg1i`}],[`path`,{d:`M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z`,key:`p4q2r7`}],[`path`,{d:`M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031`,key:`wy6l02`}]]),We=D(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Ge=D(`cake`,[[`path`,{d:`M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8`,key:`1w3rig`}],[`path`,{d:`M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1`,key:`n2jgmb`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}],[`path`,{d:`M7 8v3`,key:`1qtyvj`}],[`path`,{d:`M12 8v3`,key:`hwp4zt`}],[`path`,{d:`M17 8v3`,key:`1i6e5u`}],[`path`,{d:`M7 4h.01`,key:`1bh4kh`}],[`path`,{d:`M12 4h.01`,key:`1ujb9j`}],[`path`,{d:`M17 4h.01`,key:`1upcoc`}]]),Ke=D(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),qe=D(`candy-cane`,[[`path`,{d:`m10.8 5 2.111 4.223`,key:`11kb8w`}],[`path`,{d:`M17.75 7 15 2.1`,key:`12x7e8`}],[`path`,{d:`m4.874 14.647 2.12 4.24`,key:`ccpt4b`}],[`path`,{d:`M5.7 21a2 2 0 0 1-3.5-2l8.6-14a6 6 0 0 1 10.4 6 2 2 0 1 1-3.464-2 2 2 0 1 0-3.464-2z`,key:`u5e8z4`}],[`path`,{d:`m7.906 9.712 2.005 4.411`,key:`1k0qph`}]]),Je=D(`candy`,[[`path`,{d:`M10 7v10.9`,key:`1gynux`}],[`path`,{d:`M14 6.1V17`,key:`116kdf`}],[`path`,{d:`M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4`,key:`gpb6xx`}],[`path`,{d:`M16.536 7.465a5 5 0 0 0-7.072 0l-2 2a5 5 0 0 0 0 7.07 5 5 0 0 0 7.072 0l2-2a5 5 0 0 0 0-7.07`,key:`1tsln4`}],[`path`,{d:`M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4`,key:`qexcha`}]]),Ye=D(`car`,[[`path`,{d:`M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2`,key:`5owen`}],[`circle`,{cx:`7`,cy:`17`,r:`2`,key:`u2ysq9`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}],[`circle`,{cx:`17`,cy:`17`,r:`2`,key:`axvx0g`}]]),Xe=D(`carrot`,[[`path`,{d:`M15 16a1 1 0 0 0-7-7q-4 4-5.987 12.385a.5.5 0 0 0 .602.602Q11 20 15 16l-3-3`,key:`1ta62j`}],[`path`,{d:`M15 9q4 4 7 0-3-4-7 0 4-4 0-7-4 3 0 7`,key:`1svf7i`}],[`path`,{d:`m8 15-2.58-2.58`,key:`7t238r`}]]),Ze=D(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),Qe=D(`chef-hat`,[[`path`,{d:`M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z`,key:`1qvrer`}],[`path`,{d:`M6 17h12`,key:`1jwigz`}]]),$e=D(`cherry`,[[`path`,{d:`M2 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z`,key:`cvxqlc`}],[`path`,{d:`M12 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z`,key:`1ostrc`}],[`path`,{d:`M7 14c3.22-2.91 4.29-8.75 5-12 1.66 2.38 4.94 9 5 12`,key:`hqx58h`}],[`path`,{d:`M22 9c-4.29 0-7.14-2.33-10-7 5.71 0 10 4.67 10 7Z`,key:`eykp1o`}]]),et=D(`citrus`,[[`path`,{d:`M21.66 17.67a1.08 1.08 0 0 1-.04 1.6A12 12 0 0 1 4.73 2.38a1.1 1.1 0 0 1 1.61-.04z`,key:`4ite01`}],[`path`,{d:`M19.65 15.66A8 8 0 0 1 8.35 4.34`,key:`1gxipu`}],[`path`,{d:`m14 10-5.5 5.5`,key:`92pfem`}],[`path`,{d:`M14 17.85V10H6.15`,key:`xqmtsk`}]]),tt=D(`clapperboard`,[[`path`,{d:`m12.296 3.464 3.02 3.956`,key:`qash78`}],[`path`,{d:`M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z`,key:`1h7j8b`}],[`path`,{d:`M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`4lm6w1`}],[`path`,{d:`m6.18 5.276 3.1 3.899`,key:`zjj9t3`}]]),nt=D(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),rt=D(`clover`,[[`path`,{d:`M16.17 7.83 2 22`,key:`t58vo8`}],[`path`,{d:`M4.02 12a2.827 2.827 0 1 1 3.81-4.17A2.827 2.827 0 1 1 12 4.02a2.827 2.827 0 1 1 4.17 3.81A2.827 2.827 0 1 1 19.98 12a2.827 2.827 0 1 1-3.81 4.17A2.827 2.827 0 1 1 12 19.98a2.827 2.827 0 1 1-4.17-3.81A1 1 0 1 1 4 12`,key:`17k36q`}],[`path`,{d:`m7.83 7.83 8.34 8.34`,key:`1d7sxk`}]]),it=D(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),at=D(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),ot=D(`cookie`,[[`path`,{d:`M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5`,key:`laymnq`}],[`path`,{d:`M8.5 8.5v.01`,key:`ue8clq`}],[`path`,{d:`M16 15.5v.01`,key:`14dtrp`}],[`path`,{d:`M12 12v.01`,key:`u5ubse`}],[`path`,{d:`M11 17v.01`,key:`1hyl5a`}],[`path`,{d:`M7 14v.01`,key:`uct60s`}]]),st=D(`croissant`,[[`path`,{d:`M10.2 18H4.774a1.5 1.5 0 0 1-1.352-.97 11 11 0 0 1 .132-6.487`,key:`14kkz9`}],[`path`,{d:`M18 10.2V4.774a1.5 1.5 0 0 0-.97-1.352 11 11 0 0 0-6.486.132`,key:`1g7v07`}],[`path`,{d:`M18 5a4 3 0 0 1 4 3 2 2 0 0 1-2 2 10 10 0 0 0-5.139 1.42`,key:`ratg6b`}],[`path`,{d:`M5 18a3 4 0 0 0 3 4 2 2 0 0 0 2-2 10 10 0 0 1 1.42-5.14`,key:`4454f0`}],[`path`,{d:`M8.709 2.554a10 10 0 0 0-6.155 6.155 1.5 1.5 0 0 0 .676 1.626l9.807 5.42a2 2 0 0 0 2.718-2.718l-5.42-9.807a1.5 1.5 0 0 0-1.626-.676`,key:`qmemie`}]]),ct=D(`crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),lt=D(`dice-5`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M16 8h.01`,key:`cr5u4v`}],[`path`,{d:`M8 8h.01`,key:`1e4136`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}]]),ut=D(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),dt=D(`drama`,[[`path`,{d:`M10 11h.01`,key:`d2at3l`}],[`path`,{d:`M14 6h.01`,key:`k028ub`}],[`path`,{d:`M18 6h.01`,key:`1v4wsw`}],[`path`,{d:`M6.5 13.1h.01`,key:`1748ia`}],[`path`,{d:`M22 5c0 9-4 12-6 12s-6-3-6-12c0-2 2-3 6-3s6 1 6 3`,key:`172yzv`}],[`path`,{d:`M17.4 9.9c-.8.8-2 .8-2.8 0`,key:`1obv0w`}],[`path`,{d:`M10.1 7.1C9 7.2 7.7 7.7 6 8.6c-3.5 2-4.7 3.9-3.7 5.6 4.5 7.8 9.5 8.4 11.2 7.4.9-.5 1.9-2.1 1.9-4.7`,key:`rqjl8i`}],[`path`,{d:`M9.1 16.5c.3-1.1 1.4-1.7 2.4-1.4`,key:`1mr6wy`}]]),ft=D(`droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),pt=D(`drum`,[[`path`,{d:`m2 2 8 8`,key:`1v6059`}],[`path`,{d:`m22 2-8 8`,key:`173r8a`}],[`ellipse`,{cx:`12`,cy:`9`,rx:`10`,ry:`5`,key:`liohsx`}],[`path`,{d:`M7 13.4v7.9`,key:`1yi6u9`}],[`path`,{d:`M12 14v8`,key:`1tn2tj`}],[`path`,{d:`M17 13.4v7.9`,key:`eqz2v3`}],[`path`,{d:`M2 9v8a10 5 0 0 0 20 0V9`,key:`1750ul`}]]),mt=D(`dumbbell`,[[`path`,{d:`M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z`,key:`9m4mmf`}],[`path`,{d:`m2.5 21.5 1.4-1.4`,key:`17g3f0`}],[`path`,{d:`m20.1 3.9 1.4-1.4`,key:`1qn309`}],[`path`,{d:`M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z`,key:`1t2c92`}],[`path`,{d:`m9.6 14.4 4.8-4.8`,key:`6umqxw`}]]),ht=D(`egg`,[[`path`,{d:`M12 2C8 2 4 8 4 14a8 8 0 0 0 16 0c0-6-4-12-8-12`,key:`1le142`}]]),gt=D(`feather`,[[`path`,{d:`M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z`,key:`18jl4k`}],[`path`,{d:`M16 8 2 22`,key:`vp34q`}],[`path`,{d:`M17.5 15H9`,key:`1oz8nu`}]]),_t=D(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),vt=D(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),yt=D(`flower-2`,[[`path`,{d:`M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1`,key:`3pnvol`}],[`circle`,{cx:`12`,cy:`8`,r:`2`,key:`1822b1`}],[`path`,{d:`M12 10v12`,key:`6ubwww`}],[`path`,{d:`M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z`,key:`9hd38g`}],[`path`,{d:`M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z`,key:`ufn41s`}]]),bt=D(`flower`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5`,key:`14wa3c`}],[`path`,{d:`M12 7.5V9`,key:`1oy5b0`}],[`path`,{d:`M7.5 12H9`,key:`eltsq1`}],[`path`,{d:`M16.5 12H15`,key:`vk5kw4`}],[`path`,{d:`M12 16.5V15`,key:`k7eayi`}],[`path`,{d:`m8 8 1.88 1.88`,key:`nxy4qf`}],[`path`,{d:`M14.12 9.88 16 8`,key:`1lst6k`}],[`path`,{d:`m8 16 1.88-1.88`,key:`h2eex1`}],[`path`,{d:`M14.12 14.12 16 16`,key:`uqkrx3`}]]),xt=D(`footprints`,[[`path`,{d:`M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z`,key:`1dudjm`}],[`path`,{d:`M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z`,key:`l2t8xc`}],[`path`,{d:`M16 17h4`,key:`1dejxt`}],[`path`,{d:`M4 13h4`,key:`1bwh8b`}]]),St=D(`forklift`,[[`path`,{d:`M12 12H5a2 2 0 0 0-2 2v5`,key:`7zsz91`}],[`path`,{d:`M15 19h7`,key:`1askl3`}],[`path`,{d:`M16 19V2`,key:`1gf9nk`}],[`path`,{d:`M6 12V7a2 2 0 0 1 2-2h2.172a2 2 0 0 1 1.414.586l3.828 3.828A2 2 0 0 1 16 10.828`,key:`enx9tf`}],[`path`,{d:`M7 19h4`,key:`fumhkk`}],[`circle`,{cx:`13`,cy:`19`,r:`2`,key:`wjnkru`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}]]),Ct=D(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),wt=D(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),Tt=D(`gavel`,[[`path`,{d:`m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381`,key:`pgg06f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m21.5 10.5-8-8`,key:`a17d9x`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m8.5 7.5 8 8`,key:`1oyaui`}]]),Et=D(`ghost`,[[`path`,{d:`M9 10h.01`,key:`qbtxuw`}],[`path`,{d:`M15 10h.01`,key:`1qmjsl`}],[`path`,{d:`M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z`,key:`uwwb07`}]]),Dt=D(`gift`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]),Ot=D(`glasses`,[[`circle`,{cx:`6`,cy:`15`,r:`4`,key:`vux9w4`}],[`circle`,{cx:`18`,cy:`15`,r:`4`,key:`18o8ve`}],[`path`,{d:`M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2`,key:`1ag4bs`}],[`path`,{d:`M2.5 13 5 7c.7-1.3 1.4-2 3-2`,key:`1hm1gs`}],[`path`,{d:`M21.5 13 19 7c-.7-1.3-1.5-2-3-2`,key:`1r31ai`}]]),kt=D(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),At=D(`graduation-cap`,[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]),jt=D(`guitar`,[[`path`,{d:`m11.9 12.1 4.514-4.514`,key:`109xqo`}],[`path`,{d:`M20.1 2.3a1 1 0 0 0-1.4 0l-1.114 1.114A2 2 0 0 0 17 4.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 17.828 7h1.344a2 2 0 0 0 1.414-.586L21.7 5.3a1 1 0 0 0 0-1.4z`,key:`txyc8t`}],[`path`,{d:`m6 16 2 2`,key:`16qmzd`}],[`path`,{d:`M8.23 9.85A3 3 0 0 1 11 8a5 5 0 0 1 5 5 3 3 0 0 1-1.85 2.77l-.92.38A2 2 0 0 0 12 18a4 4 0 0 1-4 4 6 6 0 0 1-6-6 4 4 0 0 1 4-4 2 2 0 0 0 1.85-1.23z`,key:`1de1vg`}]]),Mt=D(`ham`,[[`path`,{d:`M13.144 21.144A7.274 10.445 45 1 0 2.856 10.856`,key:`1k1t7q`}],[`path`,{d:`M13.144 21.144A7.274 4.365 45 0 0 2.856 10.856a7.274 4.365 45 0 0 10.288 10.288`,key:`153t1g`}],[`path`,{d:`M16.565 10.435 18.6 8.4a2.501 2.501 0 1 0 1.65-4.65 2.5 2.5 0 1 0-4.66 1.66l-2.024 2.025`,key:`gzrt0n`}],[`path`,{d:`m8.5 16.5-1-1`,key:`otr954`}]]),Nt=D(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),Pt=D(`hand-metal`,[[`path`,{d:`M18 12.5V10a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4`,key:`wc6myp`}],[`path`,{d:`M14 11V9a2 2 0 1 0-4 0v2`,key:`94qvcw`}],[`path`,{d:`M10 10.5V5a2 2 0 1 0-4 0v9`,key:`m1ah89`}],[`path`,{d:`m7 15-1.76-1.76a2 2 0 0 0-2.83 2.82l3.6 3.6C7.5 21.14 9.2 22 12 22h2a8 8 0 0 0 8-8V7a2 2 0 1 0-4 0v5`,key:`t1skq1`}]]),Ft=D(`headphones`,[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`,key:`1xhozi`}]]),It=D(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Lt=D(`ice-cream-bowl`,[[`path`,{d:`M12 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6m-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0`,key:`1uxfcu`}],[`path`,{d:`M12.14 11a3.5 3.5 0 1 1 6.71 0`,key:`4k3m1s`}],[`path`,{d:`M15.5 6.5a3.5 3.5 0 1 0-7 0`,key:`zmuahr`}]]),Rt=D(`ice-cream-cone`,[[`path`,{d:`m7 11 4.08 10.35a1 1 0 0 0 1.84 0L17 11`,key:`1v6356`}],[`path`,{d:`M17 7A5 5 0 0 0 7 7`,key:`151p3v`}],[`path`,{d:`M17 7a2 2 0 0 1 0 4H7a2 2 0 0 1 0-4`,key:`1sdaij`}]]),A=D(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),zt=D(`lamp-desk`,[[`path`,{d:`M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5 5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994-2.5-2.5a1 1 0 0 1 0-1.414z`,key:`sb8slu`}],[`path`,{d:`m14.207 4.793-3.414 3.414`,key:`m2x3oj`}],[`path`,{d:`M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z`,key:`8b3myj`}],[`path`,{d:`m9.086 6.5-4.793 4.793a1 1 0 0 0-.18 1.17L7 18`,key:`43s6cu`}]]),Bt=D(`lasso`,[[`path`,{d:`M3.704 14.467a10 8 0 1 1 3.115 2.375`,key:`wxgc5m`}],[`path`,{d:`M7 22a5 5 0 0 1-2-3.994`,key:`1xp6a4`}],[`circle`,{cx:`5`,cy:`16`,r:`2`,key:`18csp3`}]]),Vt=D(`leaf`,[[`path`,{d:`M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z`,key:`nnexq3`}],[`path`,{d:`M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12`,key:`mt58a7`}]]),Ht=D(`lollipop`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}],[`path`,{d:`M11 11a2 2 0 0 0 4 0 4 4 0 0 0-8 0 6 6 0 0 0 12 0`,key:`107gwy`}]]),Ut=D(`magnet`,[[`path`,{d:`m12 15 4 4`,key:`lnac28`}],[`path`,{d:`M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z`,key:`nlhkjb`}],[`path`,{d:`m5 8 4 4`,key:`j6kj7e`}]]),Wt=D(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),j=D(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Gt=D(`mountain-snow`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}],[`path`,{d:`M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19`,key:`1pvmmp`}]]),Kt=D(`mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),qt=D(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),Jt=D(`origami`,[[`path`,{d:`M12 12V4a1 1 0 0 1 1-1h6.297a1 1 0 0 1 .651 1.759l-4.696 4.025`,key:`1bx4vc`}],[`path`,{d:`m12 21-7.414-7.414A2 2 0 0 1 4 12.172V6.415a1.002 1.002 0 0 1 1.707-.707L20 20.009`,key:`1h3km6`}],[`path`,{d:`m12.214 3.381 8.414 14.966a1 1 0 0 1-.167 1.199l-1.168 1.163a1 1 0 0 1-.706.291H6.351a1 1 0 0 1-.625-.219L3.25 18.8a1 1 0 0 1 .631-1.781l4.165.027`,key:`1hj4wg`}]]),Yt=D(`panda`,[[`path`,{d:`M11.25 17.25h1.5L12 18z`,key:`1wmwwj`}],[`path`,{d:`m15 12 2 2`,key:`k60wz4`}],[`path`,{d:`M18 6.5a.5.5 0 0 0-.5-.5`,key:`1ch4h4`}],[`path`,{d:`M20.69 9.67a4.5 4.5 0 1 0-7.04-5.5 8.35 8.35 0 0 0-3.3 0 4.5 4.5 0 1 0-7.04 5.5C2.49 11.2 2 12.88 2 14.5 2 19.47 6.48 22 12 22s10-2.53 10-7.5c0-1.62-.48-3.3-1.3-4.83`,key:`1c660l`}],[`path`,{d:`M6 6.5a.495.495 0 0 1 .5-.5`,key:`eviuep`}],[`path`,{d:`m9 12-2 2`,key:`326nkw`}]]),Xt=D(`party-popper`,[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`,key:`gwxi1d`}],[`path`,{d:`M4 3h.01`,key:`1vcuye`}],[`path`,{d:`M22 8h.01`,key:`1mrtc2`}],[`path`,{d:`M15 2h.01`,key:`1cjtqr`}],[`path`,{d:`M22 20h.01`,key:`1mrys2`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`,key:`hbicv8`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`,key:`1i94pl`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`,key:`1cofks`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`,key:`4kbmks`}]]),Zt=D(`paw-print`,[[`circle`,{cx:`11`,cy:`4`,r:`2`,key:`vol9p0`}],[`circle`,{cx:`18`,cy:`8`,r:`2`,key:`17gozi`}],[`circle`,{cx:`20`,cy:`16`,r:`2`,key:`1v9bxh`}],[`path`,{d:`M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z`,key:`1ydw1z`}]]),Qt=D(`pickaxe`,[[`path`,{d:`m14 13-8.381 8.38a1 1 0 0 1-3.001-3L11 9.999`,key:`1lw9ds`}],[`path`,{d:`M15.973 4.027A13 13 0 0 0 5.902 2.373c-1.398.342-1.092 2.158.277 2.601a19.9 19.9 0 0 1 5.822 3.024`,key:`ffj4ej`}],[`path`,{d:`M16.001 11.999a19.9 19.9 0 0 1 3.024 5.824c.444 1.369 2.26 1.676 2.603.278A13 13 0 0 0 20 8.069`,key:`8tj4zw`}],[`path`,{d:`M18.352 3.352a1.205 1.205 0 0 0-1.704 0l-5.296 5.296a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l5.296-5.296a1.205 1.205 0 0 0 0-1.704z`,key:`hh6h97`}]]),$t=D(`pizza`,[[`path`,{d:`m12 14-1 1`,key:`11onhr`}],[`path`,{d:`m13.75 18.25-1.25 1.42`,key:`1yisr3`}],[`path`,{d:`M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12`,key:`1qtqk6`}],[`path`,{d:`M18.8 9.3a1 1 0 0 0 2.1 7.7`,key:`fbbbr2`}],[`path`,{d:`M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z`,key:`1hyfdd`}]]),en=D(`plane`,[[`path`,{d:`M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z`,key:`1v9wt8`}]]),tn=D(`popcorn`,[[`path`,{d:`M18 8a2 2 0 0 0 0-4 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0 0 4`,key:`10td1f`}],[`path`,{d:`M10 22 9 8`,key:`yjptiv`}],[`path`,{d:`m14 22 1-14`,key:`8jwc8b`}],[`path`,{d:`M20 8c.5 0 .9.4.8 1l-2.6 12c-.1.5-.7 1-1.2 1H7c-.6 0-1.1-.4-1.2-1L3.2 9c-.1-.6.3-1 .8-1Z`,key:`1qo33t`}]]),nn=D(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),rn=D(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),an=D(`rainbow`,[[`path`,{d:`M22 17a10 10 0 0 0-20 0`,key:`ozegv`}],[`path`,{d:`M6 17a6 6 0 0 1 12 0`,key:`5giftw`}],[`path`,{d:`M10 17a2 2 0 0 1 4 0`,key:`gnsikk`}]]),on=D(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),sn=D(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),cn=D(`rocking-chair`,[[`path`,{d:`m15 13 3.708 7.416`,key:`1edxn9`}],[`path`,{d:`M3 19a15 15 0 0 0 18 0`,key:`d0d1c4`}],[`path`,{d:`m3 2 3.21 9.633A2 2 0 0 0 8.109 13H18`,key:`tpa4et`}],[`path`,{d:`m9 13-3.708 7.416`,key:`1oplxx`}]]),ln=D(`sailboat`,[[`path`,{d:`M10 2v15`,key:`1qf71f`}],[`path`,{d:`M7 22a4 4 0 0 1-4-4 1 1 0 0 1 1-1h16a1 1 0 0 1 1 1 4 4 0 0 1-4 4z`,key:`1pxcvx`}],[`path`,{d:`M9.159 2.46a1 1 0 0 1 1.521-.193l9.977 8.98A1 1 0 0 1 20 13H4a1 1 0 0 1-.824-1.567z`,key:`5oog16`}]]),un=D(`sandwich`,[[`path`,{d:`m2.37 11.223 8.372-6.777a2 2 0 0 1 2.516 0l8.371 6.777`,key:`f1wd0e`}],[`path`,{d:`M21 15a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-5.25`,key:`1pfu07`}],[`path`,{d:`M3 15a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h9`,key:`1oq9qw`}],[`path`,{d:`m6.67 15 6.13 4.6a2 2 0 0 0 2.8-.4l3.15-4.2`,key:`1fnwu5`}],[`rect`,{width:`20`,height:`4`,x:`2`,y:`11`,rx:`1`,key:`itshg`}]]),dn=D(`scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),M=D(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),fn=D(`shell`,[[`path`,{d:`M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44`,key:`1cn552`}]]),pn=D(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),mn=D(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),hn=D(`skull`,[[`path`,{d:`m12.5 17-.5-1-.5 1h1z`,key:`3me087`}],[`path`,{d:`M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z`,key:`1o5pge`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}]]),gn=D(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),_n=D(`snowflake`,[[`path`,{d:`m10 20-1.25-2.5L6 18`,key:`18frcb`}],[`path`,{d:`M10 4 8.75 6.5 6 6`,key:`7mghy3`}],[`path`,{d:`m14 20 1.25-2.5L18 18`,key:`1chtki`}],[`path`,{d:`m14 4 1.25 2.5L18 6`,key:`1b4wsy`}],[`path`,{d:`m17 21-3-6h-4`,key:`15hhxa`}],[`path`,{d:`m17 3-3 6 1.5 3`,key:`11697g`}],[`path`,{d:`M2 12h6.5L10 9`,key:`kv9z4n`}],[`path`,{d:`m20 10-1.5 2 1.5 2`,key:`1swlpi`}],[`path`,{d:`M22 12h-6.5L14 15`,key:`1mxi28`}],[`path`,{d:`m4 10 1.5 2L4 14`,key:`k9enpj`}],[`path`,{d:`m7 21 3-6-1.5-3`,key:`j8hb9u`}],[`path`,{d:`m7 3 3 6h4`,key:`1otusx`}]]),vn=D(`soup`,[[`path`,{d:`M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z`,key:`4rw317`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}],[`path`,{d:`M19.5 12 22 6`,key:`shfsr5`}],[`path`,{d:`M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62`,key:`rpc6vp`}],[`path`,{d:`M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62`,key:`1lf63m`}],[`path`,{d:`M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62`,key:`97tijn`}]]),yn=D(`spade`,[[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5`,key:`1aw2pz`}]]),bn=D(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),xn=D(`sprout`,[[`path`,{d:`M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3`,key:`139s4v`}],[`path`,{d:`M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4`,key:`1dlkgp`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Sn=D(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),Cn=D(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),wn=D(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Tn=D(`swords`,[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`,key:`1hfsw2`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`,key:`1vrmhu`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`,key:`1bron3`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`,key:`13pww6`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`,key:`hbey2j`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`,key:`1hf58s`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`,key:`pidxm4`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`,key:`1pehsh`}]]),En=D(`tent`,[[`path`,{d:`M3.5 21 14 3`,key:`1szst5`}],[`path`,{d:`M20.5 21 10 3`,key:`1310c3`}],[`path`,{d:`M15.5 21 12 15l-3.5 6`,key:`1ddtfw`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}]]),Dn=D(`train-front`,[[`path`,{d:`M8 3.1V7a4 4 0 0 0 8 0V3.1`,key:`1v71zp`}],[`path`,{d:`m9 15-1-1`,key:`1yrq24`}],[`path`,{d:`m15 15 1-1`,key:`1t0d6s`}],[`path`,{d:`M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z`,key:`1p0hjs`}],[`path`,{d:`m8 19-2 3`,key:`13i0xs`}],[`path`,{d:`m16 19 2 3`,key:`xo31yx`}]]),On=D(`tree-pine`,[[`path`,{d:`m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z`,key:`cpyugq`}],[`path`,{d:`M12 22v-3`,key:`kmzjlo`}]]),kn=D(`trees`,[[`path`,{d:`M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z`,key:`1l6gj6`}],[`path`,{d:`M7 16v6`,key:`1a82de`}],[`path`,{d:`M13 19v3`,key:`13sx9i`}],[`path`,{d:`M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5`,key:`1sj9kv`}]]),An=D(`trophy`,[[`path`,{d:`M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978`,key:`1n3hpd`}],[`path`,{d:`M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978`,key:`rfe1zi`}],[`path`,{d:`M18 9h1.5a1 1 0 0 0 0-5H18`,key:`7xy6bh`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6 9H4.5a1 1 0 0 1 0-5H6`,key:`tex48p`}]]),jn=D(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),Mn=D(`umbrella`,[[`path`,{d:`M12 13v7a2 2 0 0 0 4 0`,key:`rpgb42`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z`,key:`124nyo`}]]),Nn=D(`volleyball`,[[`path`,{d:`M11 7a16 16 20 0 1 10.98 4.362`,key:`1mmfx7`}],[`path`,{d:`M12 12a13 13 0 0 1-8.66 5`,key:`14sm5y`}],[`path`,{d:`M16.83 13.634a16 16 0 0 1-9.267 7.328`,key:`j0eyj5`}],[`path`,{d:`M20.66 17A13 13 0 0 0 12 12a13 13 0 0 1 0-10`,key:`qaetsw`}],[`path`,{d:`M8.17 15.366a16 16 0 0 1-1.713-11.69`,key:`17ewdd`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Pn=D(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Fn=D(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),In=D(`worm`,[[`path`,{d:`m19 12-1.5 3`,key:`9bcu4o`}],[`path`,{d:`M19.63 18.81 22 20`,key:`121v98`}],[`path`,{d:`M6.47 8.23a1.68 1.68 0 0 1 2.44 1.93l-.64 2.08a6.76 6.76 0 0 0 10.16 7.67l.42-.27a1 1 0 1 0-2.73-4.21l-.42.27a1.76 1.76 0 0 1-2.63-1.99l.64-2.08A6.66 6.66 0 0 0 3.94 3.9l-.7.4a1 1 0 1 0 2.55 4.34z`,key:`1tij6q`}]]),N=[{name:`mountain`,Icon:Kt},{name:`mountain-snow`,Icon:Gt},{name:`tree-pine`,Icon:On},{name:`trees`,Icon:kn},{name:`leaf`,Icon:Vt},{name:`flower`,Icon:bt},{name:`flower-2`,Icon:yt},{name:`sprout`,Icon:xn},{name:`sun`,Icon:wn},{name:`moon`,Icon:j},{name:`star`,Icon:Cn},{name:`cloud`,Icon:nt},{name:`snowflake`,Icon:_n},{name:`zap`,Icon:ve},{name:`flame`,Icon:vt},{name:`droplet`,Icon:ft},{name:`rainbow`,Icon:an},{name:`wind`,Icon:Fn},{name:`bird`,Icon:Le},{name:`fish`,Icon:_t},{name:`cat`,Icon:Ze},{name:`dog`,Icon:ut},{name:`rabbit`,Icon:rn},{name:`turtle`,Icon:jn},{name:`bug`,Icon:We},{name:`snail`,Icon:gn},{name:`paw-print`,Icon:Zt},{name:`feather`,Icon:gt},{name:`rocket`,Icon:sn},{name:`anchor`,Icon:Ee},{name:`compass`,Icon:at},{name:`map`,Icon:Wt},{name:`tent`,Icon:En},{name:`camera`,Icon:Ke},{name:`music`,Icon:qt},{name:`headphones`,Icon:Ft},{name:`palette`,Icon:ye},{name:`brush`,Icon:Ue},{name:`pencil`,Icon:ee},{name:`book`,Icon:Be},{name:`book-open`,Icon:ze},{name:`coffee`,Icon:it},{name:`pizza`,Icon:$t},{name:`ice-cream-cone`,Icon:Rt},{name:`cake`,Icon:Ge},{name:`gift`,Icon:Dt},{name:`gamepad-2`,Icon:Ct},{name:`puzzle`,Icon:nn},{name:`bike`,Icon:Ie},{name:`car`,Icon:Ye},{name:`plane`,Icon:en},{name:`ship`,Icon:pn},{name:`sailboat`,Icon:ln},{name:`train-front`,Icon:Dn},{name:`heart`,Icon:It},{name:`sparkles`,Icon:bn},{name:`crown`,Icon:ct},{name:`gem`,Icon:wt},{name:`trophy`,Icon:An},{name:`ghost`,Icon:Et},{name:`bot`,Icon:_e},{name:`globe`,Icon:kt},{name:`guitar`,Icon:jt}],Ln=Object.fromEntries(N.map(e=>[e.name,e.Icon])),P=se();function Rn({icon:e,colour:t,className:n}){let r=ue(`size-4 shrink-0`,t?b(t):`text-fg-muted`,n);return(0,P.jsx)(e&&Ln[e]||ge,{className:r,style:te(t)})}function F(e,t,n){let r=e=>[1,3,5].map(t=>parseInt(e.slice(t,t+2),16)),i=r(t);return`#`+r(e).map((e,t)=>Math.round(e*n+i[t]*(1-n)).toString(16).padStart(2,`0`)).join(``)}var zn={navy:`--identity-navy`,gold:`--identity-gold`,blue:`--ansi-blue`,green:`--ansi-green`,red:`--ansi-red`,violet:`--ansi-magenta`,cyan:`--ansi-cyan`};function I(e){return[1,3,5].reduce((t,n,r)=>{let i=parseInt(e.slice(n,n+2),16)/255;return t+(i<=.04045?i/12.92:((i+.055)/1.055)**2.4)*[.2126,.7152,.0722][r]},0)}function L(e,t,n,r=4.5){let i=t.map(I);for(let t=0;t<=100;t++){let a=F(e,n,1-t/100),o=I(a);if(i.every(e=>(Math.max(o,e)+.05)/(Math.min(o,e)+.05)>=r))return a}return n}function Bn(e,t,n){let r=[1,3,5].map(t=>parseInt(e.slice(t,t+2),16)/255),i=Math.min(...r),a=Math.max(...r),o=a-i,s=o===0?0:o/(1-Math.abs(a+i-1)),c=I(t),l=n?1.3:1.2;for(let e=1;e<=100;e++){let t=n?e/100:1-e/100,a=(1-Math.abs(2*t-1))*s,u=t-a/2,d=`#`+r.map(e=>Math.round(255*(u+(o===0?0:a*(e-i)/o))).toString(16).padStart(2,`0`)).join(``),f=I(d);if((Math.max(f,c)+.05)/(Math.min(f,c)+.05)>=l)return d}return e}function Vn(e,t,n){let r=zn[e],i=x(e);if(!r&&!i)return{};let a=i?e:n(r),o=n(`--host-shade`),s=n(`--host-paper`),c=t===`dark`,l=c?o:s,u=c?F(a,s,.18):F(a,o,.45),d=c?F(a,s,.4):F(a,o,.65),f=c?a:F(a,o,.75),p=c?F(a,l,.055):s,m=c?F(a,s,.55):F(u,s,.76),h=F(a,l,c?.105:.025),g=F(a,l,c?.16:.065),_=F(a,l,c?.16:.04),v=c?s:o,y=Bn(a,p,c),b=[l,p,h,y,g,_];return u=L(u,b,v),d=L(d,b,v),m=L(m,b,v),f=L(f,b,v),{"--bg-base":p,"--bg-surface":h,"--bg-pane":y,"--bg-elevated":g,"--bg-tray":_,"--border":F(a,l,c?.28:.14),"--text-primary":u,"--text-secondary":d,"--text-muted":m,"--text-gold":f,"--explorer-foreground":u,"--explorer-folder":u,"--accent":f,"--accent-hover":u,"--focus-ring":f,"--nav-selection":f,"--nav-selection-ink":l,"--action":u,"--action-hover":d,"--action-ink":l,"--selection":f+(c?`4d`:`33`),"--explorer-selection":f+`2e`,"--explorer-hover":f+`0d`}}var R=[{name:`alarm-clock`,Icon:we},{name:`amphora`,Icon:Te},{name:`apple`,Icon:Oe},{name:`armchair`,Icon:ke},{name:`axe`,Icon:Ae},{name:`banana`,Icon:je},{name:`bath`,Icon:Me},{name:`beef`,Icon:Ne},{name:`beer`,Icon:Pe},{name:`biceps-flexed`,Icon:Fe},{name:`bone`,Icon:Re},{name:`boom-box`,Icon:Ve},{name:`briefcase-business`,Icon:He},{name:`candy`,Icon:Je},{name:`candy-cane`,Icon:qe},{name:`carrot`,Icon:Xe},{name:`cherry`,Icon:$e},{name:`chef-hat`,Icon:Qe},{name:`citrus`,Icon:et},{name:`clapperboard`,Icon:tt},{name:`clover`,Icon:rt},{name:`cookie`,Icon:ot},{name:`croissant`,Icon:st},{name:`dice5`,Icon:lt},{name:`drama`,Icon:dt},{name:`drum`,Icon:pt},{name:`dumbbell`,Icon:mt},{name:`egg`,Icon:ht},{name:`footprints`,Icon:xt},{name:`forklift`,Icon:St},{name:`gavel`,Icon:Tt},{name:`glasses`,Icon:Ot},{name:`graduation-cap`,Icon:At},{name:`ham`,Icon:Mt},{name:`hammer`,Icon:Nt},{name:`hand-metal`,Icon:Pt},{name:`ice-cream-bowl`,Icon:Lt},{name:`key-round`,Icon:A},{name:`lamp-desk`,Icon:zt},{name:`lasso`,Icon:Bt},{name:`lollipop`,Icon:Ht},{name:`magnet`,Icon:Ut},{name:`origami`,Icon:Jt},{name:`panda`,Icon:Yt},{name:`party-popper`,Icon:Xt},{name:`pickaxe`,Icon:Qt},{name:`popcorn`,Icon:tn},{name:`rat`,Icon:on},{name:`rocking-chair`,Icon:cn},{name:`sandwich`,Icon:un},{name:`scissors`,Icon:dn},{name:`shell`,Icon:fn},{name:`shrimp`,Icon:mn},{name:`skull`,Icon:hn},{name:`soup`,Icon:vn},{name:`spade`,Icon:yn},{name:`squirrel`,Icon:Sn},{name:`swords`,Icon:Tn},{name:`umbrella`,Icon:Mn},{name:`volleyball`,Icon:Nn},{name:`wand-sparkles`,Icon:Pn},{name:`worm`,Icon:In},{name:`anvil`,Icon:De}],z=Object.fromEntries(R.map(({name:e,Icon:t})=>[e,t]));function B(e=!0){let t=le(),n=u(e?t??void 0:void 0),r=n.data?.hostColour;return{ready:e&&n.isSuccess,icon:n.data?.hostIcon,colour:m.some(e=>e===r)||x(r)?r:null}}function V({icon:e,className:t=`size-4 shrink-0`}){return(0,P.jsx)(e&&Object.hasOwn(z,e)&&z[e]||M,{className:t,"aria-hidden":`true`})}function Hn({enabled:e=!0}){let{colour:t}=B(e);return(0,O.useLayoutEffect)(()=>{let e=document.documentElement,n=[],r=()=>{for(let t of n)e.style.removeProperty(t);n=[],delete e.dataset.hostColour},i=()=>{if(r(),!t)return;let i=Vn(t,ae(),ie());n=Object.keys(i);for(let[t,n]of Object.entries(i))e.style.setProperty(t,n);e.dataset.hostColour=t};i();let a=oe(i,{first:!0});return S(),()=>{a(),r(),S()}},[t]),null}function Un(){let e=c(),{icon:t,colour:n,ready:r}=B(),a=i(e.data),o=(0,O.useRef)(null);return(0,O.useLayoutEffect)(()=>{let e=document.documentElement,t=o.current?.querySelector(`svg`);if(!(!r||!a||!t))return e.dataset.desktopHostIdentity=JSON.stringify({name:a,colour:n,icon:[...t.children].map(e=>({tag:e.localName,attrs:Object.fromEntries([...e.attributes].filter(e=>e.name!==`class`).map(e=>[e.name,e.value]))}))}),()=>{delete e.dataset.desktopHostIdentity}},[r,a,t,n]),(0,P.jsx)(`span`,{hidden:!0,ref:o,children:(0,P.jsx)(V,{icon:t})})}function Wn({stream:e,label:t,hint:n,onClose:r}){let[i,a]=(0,O.useState)(null);return(0,P.jsx)(he,{open:!0,onOpenChange:e=>!e&&r(),children:(0,P.jsxs)(pe,{className:`h-[85vh] max-w-[calc(100vw-4rem)]`,children:[(0,P.jsxs)(fe,{children:[(0,P.jsxs)(me,{children:[t,` — login`]}),(0,P.jsx)(de,{children:i===null?`Complete the agent’s login flow below.${n===void 0?` The account shows as logged in once it finishes cleanly.`:` ${n}`}`:`The login exited with code ${i} without completing. The output above may say why; close this and try again.`})]}),(0,P.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md bg-ground p-1`,children:(0,P.jsx)(re,{stream:e,onExit:e=>e===0?r():a(e)})})]})})}function Gn(e){let t=e?.catalogue,n=t?.releases.latest;if(e?.availability!==`ready`||!t)return[];let r=[],i=t.releases.components?.daemon??n,a=t.releases.components?.runtime??n;return i?.host_asset&&f(i.version,t.daemon_version)&&r.push({component:`daemon`,version:i.version}),a?.host_asset&&t.runtime_default&&f(a.version,t.runtime_default.version)&&r.push({component:`runtime`,version:a.version}),r}function H(e){return e.staged&&!e.dispatched&&[`staged`,`preflight`,`approved`].includes(e.phase)}function Kn(e,t){let n=e?.result?.operation;if(e?.availability!==`ready`||!e.result?.ok||!n||!H(n)||!t?.ok||t.operation?.id!==n.id||t.operation.revision!==n.revision)return null;let r=t.review;if(!r)return null;let i=r.interruption_fingerprint,a=r.fingerprint??i;return!a||!r.can_apply&&!i||i&&!e.capabilities.interruption_approval?null:{action:`apply`,reference:{id:n.id,revision:n.revision},fingerprint:a,...i?{interruption_approval:i}:{}}}function qn(e){let t=e?.result?.operation;return!!t&&!v(t.phase)}function Jn(e){let t=e.result?.operation;return e.availability===`unavailable`&&e.observation===`recorded`&&e.capabilities.offline_continuation&&e.result?.ok&&t?.dispatched&&!v(t.phase)?{action:`continue-offline`,reference:{id:t.id,revision:t.revision}}:null}var Yn={checking:`Checking update`,downloading:`Downloading`,staged:`Downloaded and verified`,preflight:`Ready for review`,approved:`Approved`,dispatching:`Starting update`,applying:`Applying update`,verifying:`Verifying update`,complete:`Update complete`,blocked:`Update blocked`,cancelled:`Update cancelled`,superseded:`Update replaced`,failed:`Update failed`,recovery_required:`Recovery required`,rolled_back:`Update rolled back`},Xn=class{offered=new Set;take(e,t){return t.filter(({component:t,version:n})=>{let r=JSON.stringify([e,t,n]);return this.offered.has(r)?!1:(this.offered.add(r),!0)})}};function U(){return _()?.scope??`local`}function W(e){let t=_(),n=t?.generation,r=t?`/api/host/updates`:`/cockpit/updates`,i=()=>{if(!e)throw Error(`Host updates require host-approved device access.`);if(_()!==t||t?.generation!==n)throw Error(`Host update connection changed. Refresh status before continuing.`)};return async(e,n)=>{i(),t&&e&&d.parse(e);let a=r;e||(!t||s(h.parse(await w(`GET`,`/api/version`,void 0,n)).protocol,{major:26,minor:2}))&&(a+=`?components=1`);let o;try{o=e?await w(`POST`,r,e,n):await w(`GET`,a,void 0,n)}catch(t){if(e||a===r||!(t instanceof ce)||![400,403].includes(t.status))throw t;o=await w(`GET`,r,void 0,n)}return i(),o}}function Zn(e,t){let n=[`cockpit-host-updates`,t],r,i=()=>{let t=e.getQueryData(n);if(t?.availability!==`ready`||t.observation===`recorded`||!t.catalogue)return;let i=JSON.stringify([t.catalogue.daemon_version,t.catalogue.runtime_default?.version??null]);i!==r&&(r=i,e.invalidateQueries({queryKey:[`release-notes`]}))},a=e.getQueryCache().subscribe(e=>{e.type===`updated`&&e.query.queryKey[0]===n[0]&&e.query.queryKey[1]===t&&i()});return i(),a}function G(){return[`cockpit-host-updates`,U()]}function K(){let e=_(),t=n({queryKey:[`host-update-access`,U(),e?.generation],queryFn:async({signal:e})=>{let t=h.parse(await w(`GET`,`/api/version`,void 0,e));return t.protocol.major>=26&&t.remote_host_updates===!0},enabled:!!e,staleTime:1/0,retry:!1});return!e||t.data===!0}function Qn(e=!_()){let t=W(e);return xe({queryKey:G(),queryFn:async({signal:e})=>p.parse(await t(void 0,e)),enabled:e,retry:!1,staleTime:5e3,refetchInterval:e=>e.state.error instanceof ce&&e.state.error.status===404?!1:[`checking`,`downloading`,`dispatching`,`applying`,`verifying`].includes(e.state.data?.result?.operation?.phase??``)||e.state.data?.catalogue?.releases.state===`checking`?2e3:6e4})}function $n(e,t=!_()){let n=G(),r=W(t);return{mutationKey:[`cockpit-host-update-action`,U()],retry:!1,networkMode:`always`,mutationFn:async e=>y.parse(await r(e)),onMutate:async()=>{await e.cancelQueries({queryKey:n})},onSuccess:t=>{e.setQueryData(n,e=>e&&{...e,result:t})},onSettled:async()=>{await e.invalidateQueries({queryKey:n})}}}function er(){return n(Qn(K()))}function tr(){let e=l(),t=K(),n=[`cockpit-host-update-action`,U()],r=Se({mutationKey:n}),i=a($n(e,t));return{...i,busy:r>0,act:t=>{e.isMutating({mutationKey:n})||i.mutate(t)}}}function nr(){let e=l(),t=U();(0,O.useEffect)(()=>{let n=[`cockpit-host-updates`,t],r=()=>{e.invalidateQueries({queryKey:n}),e.invalidateQueries({queryKey:[`release-notes`]})},i=T.onHostUpdatesChanged(r),a=Zn(e,t),o=T.onConnectionChange(e=>{e&&r()});return()=>{i(),a(),o()}},[e,t])}var q=e=>e&&typeof e==`object`?e:{},J=[{id:`appearance`,label:`Appearance`,fields:[{key:`theme`,store:`theme`},{key:`cursorPackage`,store:`client`},{key:`uiFontSize`,store:`client`},{key:`terminalFontSize`,store:`client`},{key:`editorFontSize`,store:`client`},{key:`density`,store:`client`},{key:`reduceMotion`,store:`client`},{key:`showHostOnFocus`,store:`client`},{key:`terminalScrollback`,store:`client`},{key:`projectBasedLayout`,store:`client`},{key:`showAllProjectSessions`,store:`client`}]},{id:`profile`,label:`Profile`,fields:[{key:`branch_prefix`,store:`profileColumn`},{key:`icon`,store:`profileColumn`},{key:`icon_colour`,store:`profileColumn`}]},{id:`sessions`,label:`Sessions`,fields:[{key:`onboardingTemplate`,store:`profileSettings`},{key:`concurrentTemplate`,store:`profileSettings`},{key:`restartTemplate`,store:`profileSettings`},{key:`tabTitleTemplate`,store:`profileSettings`},{key:`sessionDefaults`,store:`profileSettings`},{key:`allowSkipPermissions`,store:`profileSettings`},{key:`captureSessionEnv`,store:`profileSettings`}]},{id:`editor`,label:`Editor`,fields:[{key:`editorTabSize`,store:`client`},{key:`editorWordWrap`,store:`client`},{key:`editorLinkSshHost`,store:`client`}]},{id:`hotkeys`,label:`Hotkeys`,fields:[{key:`hotkeys`,store:`profileSettings`}]},{id:`notifications`,label:`Notifications`,fields:[{key:`notifications`,store:`profileSettings`,pick:e=>{let{desktop:t,sound:n,when_focused:r}=q(e);return{desktop:t,sound:n,...r===void 0?{}:{when_focused:r}}},mergeInto:(e,t)=>({...q(t),...q(e)})}]},{id:`scratchpad`,label:`Scratchpad (profile-wide entries)`,fields:[{key:`entries`,store:`scratchpad`}]}];function Y(e){return e.filter(e=>e.scope===`profile`).map(e=>({title:e.title,body:e.body,tags:e.tags,agent_type:e.agent_type}))}function rr(e){return JSON.stringify([e.title??``,e.body,e.tags,e.agent_type??``])}function ir(e,t){if(!Array.isArray(e))return[];let n=new Set(Y(t).map(rr)),r=new Set,i=[];for(let t of e){let e=q(t);if(typeof e.body!=`string`||e.body.length===0)continue;let a={title:typeof e.title==`string`&&e.title!==``?e.title:null,body:e.body,tags:Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):[],agent_type:typeof e.agent_type==`string`?e.agent_type:null},o=rr(a);n.has(o)||r.has(o)||(r.add(o),i.push(a))}return i}function ar(e,t){switch(e.store){case`client`:return t.client[e.key];case`theme`:return t.theme;case`profileSettings`:return t.profileSettings[e.key];case`profileColumn`:return t.profile[e.key];case`scratchpad`:return Y(t.scratchpad)}}function or(e,t){let n={};for(let r of J){if(!e.includes(r.id))continue;let i={};for(let e of r.fields){let n=ar(e,t);n!==void 0&&(i[e.key]=e.pick?e.pick(n):n)}Object.keys(i).length>0&&(n[r.id]=i)}return n}function sr(e,t,n,r){if(!e||typeof e!=`object`)return[];let i=e,a={},o={},s={},c=[];for(let e of J){if(r&&!r.includes(e.id))continue;let l=i[e.id];if(!l||typeof l!=`object`)continue;let u=l,d=!1;for(let r of e.fields){if(!(r.key in u))continue;let e=u[r.key];if(r.store===`scratchpad`){let r=ir(e,n.scratchpad);r.length>0&&(t.createScratchpad(r),d=!0);continue}d=!0;let i=r.mergeInto?r.mergeInto(e,r.store===`profileSettings`?n.profileSettings[r.key]:void 0):e;r.store===`client`?a[r.key]=i:r.store===`theme`?t.setTheme(i):r.store===`profileSettings`?o[r.key]=i:s[r.key]=i}d&&c.push(e.label)}return Object.keys(a).length>0&&t.setClient(a),Object.keys(o).length>0&&t.patchProfileSettings(o),Object.keys(s).length>0&&t.patchProfileColumns(s),c}var cr={version:1,profiles:{}};function lr(e,t){return e.profiles[t]??{enabled:!0,groups:J.map(e=>e.id),doc:{},updatedAt:new Date(0).toISOString()}}async function ur(){try{let e=await fetch(`/cockpit/local-sync`,{headers:C(),cache:`no-store`});return e.ok?{available:!0,file:await e.json()}:{available:!1,file:cr}}catch{return{available:!1,file:cr}}}function dr(){return n({queryKey:[`local-sync`],queryFn:ur,staleTime:5e3,refetchOnWindowFocus:!0,retry:!1})}function fr(){let e=l();return a({mutationFn:async e=>{let t=await fetch(`/cockpit/local-sync`,{method:`PUT`,headers:{...C(),"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`The local sync store did not accept the write.`);return await t.json()},onSuccess:t=>e.setQueryData([`local-sync`],{available:!0,file:t})})}function pr(){return E()?.showNotification?`unverified`:typeof Notification>`u`?`unsupported`:Notification.permission}async function mr(e,t){let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(t)),1e4)})])}finally{clearTimeout(n)}}var X;async function hr(){return!(`serviceWorker`in navigator)||!window.isSecureContext?null:(X||=gr().catch(e=>{throw X=void 0,e}),X)}async function gr(){let e=await mr(navigator.serviceWorker.register(`/notification-worker.js`),`Notification support did not respond. Reload Puddle and try again.`);if(e.active)return e;let t=e.installing??e.waiting;if(!t)throw Error(`Notification support could not start. Reload and try again.`);return await new Promise((e,n)=>{let r=r=>{clearTimeout(a),t.removeEventListener(`statechange`,i),r?n(r):e()},i=()=>{t.state===`activated`?r():t.state===`redundant`&&r(Error(`Notification support could not start.`))},a=setTimeout(()=>r(Error(`Notification support timed out.`)),1e4);t.addEventListener(`statechange`,i),i()}),e}async function _r(e,t){if(!e.active)throw Error(`Notification support is not active.`);await new Promise((n,r)=>{let i=new MessageChannel,a=e=>{clearTimeout(o),i.port1.close(),e?r(e):n()},o=setTimeout(()=>a(Error(`Notification delivery timed out.`)),1e4);i.port1.onmessage=e=>a(e.data?.ok?void 0:Error(`The browser could not deliver the notification. Check system permissions.`)),e.active.postMessage({t:`show-notification`,request:t},[i.port2])})}var vr={state:`unverified`,message:null},Z=new Set,Q=new Map,yr=!1,br=!1;function xr(e,t){Q.set(e,t),Q.size>64&&Q.delete(Q.keys().next().value)}function $(e){vr=e;for(let e of Z)e();return e}function Sr(){return(0,O.useSyncExternalStore)(e=>(Z.add(e),()=>{Z.delete(e)}),()=>vr)}async function Cr(){let e=E();if(e?.notificationStatus)try{$(g.parse(await e.notificationStatus()))}catch{$({state:`failed`,message:`Could not read desktop notification delivery status.`})}}async function wr(e,t,n){try{let r=E();if(r?.showNotification){!yr&&r.onNotificationClick&&(r.onNotificationClick((e,t)=>{t||Q.get(e)?.(),Q.delete(e)}),yr=!0),xr(e.id,t);let{target:i,...a}=e;return $(g.parse(await r.showNotification({...a,...r.notificationTargets?{target:i}:{},...r.notificationSubtitles&&n?{title:`${n.host} · ${n.project.name}`.slice(0,160),subtitle:e.title}:{}})))}if(typeof Notification>`u`)return $({state:`unsupported`,message:`This browser cannot show notifications.`});if(Notification.permission!==`granted`)return $({state:`failed`,message:`Allow notifications for Puddle in browser settings.`});let i=n?{...e,title:be(e.title,n.project)}:e,a=await hr();return a?(br||=(navigator.serviceWorker.addEventListener(`message`,e=>{e.data?.t!==`notification-click`||typeof e.data.id!=`string`||(e.data.target||Q.get(e.data.id)?.(),Q.delete(e.data.id))}),!0),xr(e.id,t),await _r(a,i),$({state:`shown`,message:null})):await new Promise(n=>{let r=new Notification(i.title,{body:e.body,tag:e.id,silent:!0}),a=setTimeout(()=>n($({state:`unverified`,message:`Delivery has not been confirmed. Check system notification settings.`})),5e3);r.onshow=()=>{clearTimeout(a),n($({state:`shown`,message:null}))},r.onerror=()=>{clearTimeout(a),n($({state:`failed`,message:`The browser could not deliver the notification. Check system permissions.`}))},r.onclick=()=>{window.focus(),t(),r.close()}})}catch(e){return $({state:`failed`,message:e instanceof Error?e.message:`Notification delivery failed.`})}}export{N as A,Wn as C,B as D,V as E,M,j as N,R as O,A as P,qn as S,Hn as T,Gn as _,lr as a,Yn as b,J as c,K as d,tr as f,Xn as g,U as h,pr as i,wn as j,Rn as k,sr as l,er as m,Cr as n,dr as o,nr as p,Sr as r,fr as s,wr as t,or as u,H as v,Un as w,Kn as x,Jn as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{n as r}from"./createLucideIcon-C9A1vLE-.js";import{C as i,E as a,T as o,_ as s,f as c,g as l,h as u,m as d,p as f,v as p,x as m,y as h}from"./dialog-B0poBDCr.js";import{o as g,r as _}from"./x-Dq6POV20.js";import{_ as v,b as y,g as b,m as x,p as S,v as C,y as w}from"./dist-C4YjL9GW.js";var T=e(t(),1),E=n(),D=`Popover`,[O,ee]=o(D,[y]),k=y(),[A,j]=O(D),M=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=k(t),c=T.useRef(null),[u,d]=T.useState(!1),[f,p]=l({prop:r,defaultProp:i??!1,onChange:a,caller:D});return(0,E.jsx)(w,{...s,children:(0,E.jsx)(A,{scope:t,contentId:h(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:T.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:T.useCallback(()=>d(!0),[]),onCustomAnchorRemove:T.useCallback(()=>d(!1),[]),modal:o,children:n})})};M.displayName=D;var N=`PopoverAnchor`,P=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=j(N,n),a=k(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return T.useEffect(()=>(o(),()=>s()),[o,s]),(0,E.jsx)(b,{...a,...r,ref:t})});P.displayName=N;var F=`PopoverTrigger`,I=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=j(F,n),s=k(n),c=g(t,o.triggerRef),l=(0,E.jsx)(i.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Z(o.open),...r,ref:c,onClick:a(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,E.jsx)(b,{asChild:!0,...s,children:l})});I.displayName=F;var L=`PopoverPortal`,[R,z]=O(L,{forceMount:void 0}),B=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=j(L,t);return(0,E.jsx)(R,{scope:t,forceMount:n,children:(0,E.jsx)(s,{present:n||a.open,children:(0,E.jsx)(p,{asChild:!0,container:i,children:r})})})};B.displayName=L;var V=`PopoverContent`,H=T.forwardRef((e,t)=>{let n=z(V,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=j(V,e.__scopePopover);return(0,E.jsx)(s,{present:r||a.open,children:a.modal?(0,E.jsx)(W,{...i,ref:t}):(0,E.jsx)(G,{...i,ref:t})})});H.displayName=V;var U=_(`PopoverContent.RemoveScroll`),W=T.forwardRef((e,t)=>{let n=j(V,e.__scopePopover),r=T.useRef(null),i=g(t,r),o=T.useRef(!1);return T.useEffect(()=>{let e=r.current;if(e)return f(e)},[]),(0,E.jsx)(c,{as:U,allowPinchZoom:!0,children:(0,E.jsx)(K,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;o.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),G=T.forwardRef((e,t)=>{let n=j(V,e.__scopePopover),r=T.useRef(!1),i=T.useRef(!1);return(0,E.jsx)(K,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),K=T.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...p}=e,h=j(V,n),g=k(n);return u(),(0,E.jsx)(d,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,E.jsx)(m,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,E.jsx)(C,{"data-state":Z(h.open),role:`dialog`,id:h.contentId,...g,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),q=`PopoverClose`,J=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=j(q,n);return(0,E.jsx)(i.button,{type:`button`,...r,ref:t,onClick:a(e.onClick,()=>o.onOpenChange(!1))})});J.displayName=q;var Y=`PopoverArrow`,X=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(n);return(0,E.jsx)(v,{...i,...r,ref:t})});X.displayName=Y;function Z(e){return e?`open`:`closed`}var Q=M,$=I,te=B,ne=H,re=Q,ie=$;function ae({className:e,align:t=`end`,sideOffset:n=8,...i}){return(0,E.jsx)(te,{children:(0,E.jsx)(ne,{align:t,sideOffset:n,className:r(`overlay-popover-motion z-50 p-5`,x,S,e),...i})})}export{ae as n,ie as r,re as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./react-dom-cJyBB_A4.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{n as i,t as a}from"./createLucideIcon-C9A1vLE-.js";import{C as o,E as s,S as c,T as l,_ as u,b as d,f,g as p,h as m,m as h,p as g,v as _,x as v,y}from"./dialog-B0poBDCr.js";import{o as b,r as x}from"./x-Dq6POV20.js";import{_ as S,b as C,c as w,d as T,f as E,g as D,n as O,t as k,u as A,v as j,y as ee}from"./dist-C4YjL9GW.js";import{a as te,t as M}from"./dist-DDTfSNTu.js";import{t as N}from"./chevron-down-HQLVE6o5.js";var P=a(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),F=e(t(),1),I=e(n(),1);function L(e,[t,n]){return Math.min(n,Math.max(t,e))}var R=r(),z=[` `,`Enter`,`ArrowUp`,`ArrowDown`],B=[` `,`Enter`],V=`Select`,[H,U,ne]=O(V),[W,re]=l(V,[ne,C]),G=C(),[ie,K]=W(V),[ae,oe]=W(V),se=`SelectProvider`;function ce(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:m,form:h,internal_do_not_use_render:g}=e,_=G(t),[v,b]=F.useState(null),[x,S]=F.useState(null),[C,w]=F.useState(!1),T=k(l),[E,D]=p({prop:r,defaultProp:i??!1,onChange:a,caller:V}),[O,A]=p({prop:o,defaultProp:s,onChange:c,caller:V}),j=F.useRef(null),te=F.useRef(O);F.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=()=>A(te.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,A]);let M=!v||!!h||!!v.closest(`form`),[N,P]=F.useState(new Set),I=y(),L=Array.from(N).map(e=>e.props.value).join(`;`),z=F.useCallback(e=>{P(t=>new Set(t).add(e))},[]),B=F.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),U={required:m,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:I,value:O,onValueChange:A,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:j,disabled:f,name:u,autoComplete:d,form:h,nativeOptions:N,nativeSelectKey:L,isFormControl:M};return(0,R.jsx)(ee,{..._,children:(0,R.jsx)(ie,{scope:t,...U,children:(0,R.jsx)(H.Provider,{scope:t,children:(0,R.jsx)(ae,{scope:t,onNativeOptionAdd:z,onNativeOptionRemove:B,children:nt(g)?g(U):n})})})})}ce.displayName=se;var le=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,R.jsx)(ce,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,R.jsxs)(R.Fragment,{children:[n,e?(0,R.jsx)(tt,{__scopeSelect:t}):null]})})};le.displayName=V;var ue=`SelectTrigger`,de=F.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=G(n),c=K(ue,n),l=c.disabled||r,u=b(t,c.onTriggerChange),d=U(n),f=F.useRef(`touch`),[p,m,h]=rt(e=>{let t=d().filter(e=>!e.disabled),n=it(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),g=e=>{l||(c.onOpenChange(!0),h()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,R.jsx)(D,{asChild:!0,...a,children:(0,R.jsx)(o.button,{type:`button`,role:`combobox`,"aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":$(c.value)?``:void 0,...i,ref:u,onClick:s(i.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:s(i.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:s(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&z.includes(e.key)&&(g(),e.preventDefault())})})})});de.displayName=ue;var fe=`SelectValue`,pe=F.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:s=``,...c}=e,l=K(fe,n),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,p=b(t,l.onValueNodeChange);d(()=>{u(f)},[u,f]);let m=$(l.value);return(0,R.jsx)(o.span,{...c,asChild:!m&&c.asChild,ref:p,style:{pointerEvents:`none`},children:(0,R.jsx)(F.Fragment,{children:m?s:a},m?`placeholder`:`value`)})});pe.displayName=fe;var me=`SelectIcon`,he=F.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,R.jsx)(o.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});he.displayName=me;var ge=`SelectPortal`,[_e,ve]=W(ge,{forceMount:void 0}),ye=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,R.jsx)(_e,{scope:e.__scopeSelect,forceMount:n,children:(0,R.jsx)(_,{asChild:!0,...r})})};ye.displayName=ge;var q=`SelectContent`,be=F.forwardRef((e,t)=>{let n=ve(q,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=K(q,e.__scopeSelect),[o,s]=F.useState();return d(()=>{s(new DocumentFragment)},[]),(0,R.jsx)(u,{present:r||a.open,children:({present:e})=>e?(0,R.jsx)(Te,{...i,ref:t}):(0,R.jsx)(xe,{...i,fragment:o})})});be.displayName=q;var xe=F.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?I.createPortal((0,R.jsx)(Se,{scope:n,children:(0,R.jsx)(H.Slot,{scope:n,children:(0,R.jsx)(`div`,{ref:t,children:r})})}),i):null});xe.displayName=`SelectContentFragment`;var J=10,[Se,Y]=W(q),Ce=`SelectContentImpl`,we=x(`SelectContent.RemoveScroll`),Te=F.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:_,collisionPadding:y,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=K(q,n),[E,D]=F.useState(null),[O,k]=F.useState(null),A=b(t,D),[j,ee]=F.useState(null),[te,M]=F.useState(null),N=U(n),[P,I]=F.useState(!1),L=F.useRef(!1);F.useEffect(()=>{if(E)return g(E)},[E]),m();let z=F.useCallback(e=>{let[t,...n]=N().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[N,O]),B=F.useCallback(()=>z([j,E]),[z,j,E]);F.useEffect(()=>{P&&B()},[P,B]);let{onOpenChange:V,triggerPointerDownPosRef:H}=T;F.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(H.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(E)||V(!1),document.removeEventListener(`pointermove`,t),H.current=null};return H.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,V,H]),F.useEffect(()=>{let e=()=>V(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[V]);let[ne,W]=rt(e=>{let t=N().filter(e=>!e.disabled),n=it(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),re=F.useCallback((e,t,n)=>{let r=!L.current&&!n;(T.value!==void 0&&T.value===t||r)&&(ee(e),r&&(L.current=!0))},[T.value]),G=F.useCallback(()=>E?.focus(),[E]),ie=F.useCallback((e,t,n)=>{let r=!L.current&&!n;(T.value!==void 0&&T.value===t||r)&&M(e)},[T.value]),ae=r===`popper`?X:De,oe=ae===X?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:_,collisionPadding:y,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,R.jsx)(Se,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:re,selectedItem:j,onItemLeave:G,itemTextRefCallback:ie,focusSelectedItem:B,selectedItemText:te,position:r,isPositioned:P,searchRef:ne,children:(0,R.jsx)(f,{as:we,allowPinchZoom:!0,children:(0,R.jsx)(h,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:s(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,R.jsx)(v,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,R.jsx)(ae,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...oe,onPlaced:()=>I(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:s(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&W(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=N().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});Te.displayName=Ce;var Ee=`SelectItemAlignedPosition`,De=F.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=K(q,n),s=Y(q,n),[c,l]=F.useState(null),[u,f]=F.useState(null),p=b(t,f),m=U(n),h=F.useRef(!1),g=F.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=s,S=F.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&u&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-J,d=L(a,[J,Math.max(J,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-J,d=L(a,[J,Math.max(J,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-J*2,l=_.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+p+l+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-J,D=s-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=u.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}c.style.margin=`${J}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,u,_,v,y,a.dir,r]);d(()=>S(),[S]);let[C,w]=F.useState();return d(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]),(0,R.jsx)(ke,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:F.useCallback(e=>{e&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]),children:(0,R.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,R.jsx)(o.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});De.displayName=Ee;var Oe=`SelectPopperPosition`,X=F.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=J,...a}=e,o=G(n);return(0,R.jsx)(j,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});X.displayName=Oe;var[ke,Ae]=W(q,{}),je=`SelectViewport`,Me=F.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Y(je,n),c=Ae(je,n),l=b(t,a.onViewportChange),u=F.useRef(0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,R.jsx)(H.Slot,{scope:n,children:(0,R.jsx)(o.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:s(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-J*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});Me.displayName=je;var Ne=`SelectGroup`,[Pe,Fe]=W(Ne),Ie=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=y();return(0,R.jsx)(Pe,{scope:n,id:i,children:(0,R.jsx)(o.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Ie.displayName=Ne;var Le=`SelectLabel`,Re=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Fe(Le,n);return(0,R.jsx)(o.div,{id:i.id,...r,ref:t})});Re.displayName=Le;var Z=`SelectItem`,[ze,Be]=W(Z),Ve=F.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...l}=e,u=K(Z,n),d=Y(Z,n),f=u.value===r,[p,m]=F.useState(a??``),[h,g]=F.useState(!1),_=b(t,c(e=>d.itemRefCallback?.(e,r,i))),v=y(),x=F.useRef(`touch`),S=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};return(0,R.jsx)(ze,{scope:n,value:r,disabled:i,textId:v,isSelected:f,onItemTextChange:F.useCallback(e=>{m(t=>t||(e?.textContent??``).trim())},[]),children:(0,R.jsx)(H.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:(0,R.jsx)(o.div,{role:`option`,"aria-labelledby":v,"data-highlighted":h?``:void 0,"aria-selected":f&&h,"data-state":f?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...l,ref:_,onFocus:s(l.onFocus,()=>g(!0)),onBlur:s(l.onBlur,()=>g(!1)),onClick:s(l.onClick,()=>{x.current!==`mouse`&&S()}),onPointerUp:s(l.onPointerUp,()=>{x.current===`mouse`&&S()}),onPointerDown:s(l.onPointerDown,e=>{x.current=e.pointerType}),onPointerMove:s(l.onPointerMove,e=>{x.current=e.pointerType,i?d.onItemLeave?.():x.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:s(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:s(l.onKeyDown,e=>{i||e.target!==e.currentTarget||d.searchRef?.current!==``&&e.key===` `||(B.includes(e.key)&&S(),e.key===` `&&e.preventDefault())})})})})});Ve.displayName=Z;var Q=`SelectItemText`,He=F.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,s=K(Q,n),l=Y(Q,n),u=Be(Q,n),f=oe(Q,n),[p,m]=F.useState(null),h=c(e=>l.itemTextRefCallback?.(e,u.value,u.disabled)),g=b(t,m,u.onItemTextChange,h),_=p?.textContent,v=F.useMemo(()=>(0,R.jsx)(`option`,{value:u.value,disabled:u.disabled,children:_},u.value),[u.disabled,u.value,_]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=f;return d(()=>(y(v),()=>x(v)),[y,x,v]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(o.span,{id:u.textId,...a,ref:g}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!$(s.value)?I.createPortal(a.children,s.valueNode):null]})});He.displayName=Q;var Ue=`SelectItemIndicator`,We=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Be(Ue,n).isSelected?(0,R.jsx)(o.span,{"aria-hidden":!0,...r,ref:t}):null});We.displayName=Ue;var Ge=`SelectScrollUpButton`,Ke=F.forwardRef((e,t)=>{let n=Y(Ge,e.__scopeSelect),r=Ae(Ge,e.__scopeSelect),[i,a]=F.useState(!1),o=b(t,r.onScrollButtonChange);return d(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,R.jsx)(Ye,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ke.displayName=Ge;var qe=`SelectScrollDownButton`,Je=F.forwardRef((e,t)=>{let n=Y(qe,e.__scopeSelect),r=Ae(qe,e.__scopeSelect),[i,a]=F.useState(!1),o=b(t,r.onScrollButtonChange);return d(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,R.jsx)(Ye,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Je.displayName=qe;var Ye=F.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Y(`SelectScrollButton`,n),c=F.useRef(null),l=U(n),u=F.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return F.useEffect(()=>()=>u(),[u]),d(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,R.jsx)(o.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:s(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:s(i.onPointerMove,()=>{a.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:s(i.onPointerLeave,()=>{u()})})}),Xe=`SelectSeparator`,Ze=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,R.jsx)(o.div,{"aria-hidden":!0,...r,ref:t})});Ze.displayName=Xe;var Qe=`SelectArrow`,$e=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=G(n);return Y(Qe,n).position===`popper`?(0,R.jsx)(S,{...i,...r,ref:t}):null});$e.displayName=Qe;var et=`SelectBubbleInput`,tt=F.forwardRef(({__scopeSelect:e,...t},n)=>{let r=K(et,e),{value:i,onValueChange:a,required:s,disabled:c,name:l,autoComplete:u,form:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=F.useRef(null),h=b(n,m),g=i??``,_=M(g),v=Array.from(f).some(e=>(e.props.value??``)===``);return F.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(_!==g&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[_,g]),(0,R.jsxs)(o.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:l,autoComplete:u,disabled:c,form:d,onChange:e=>a(e.target.value),...t,style:{...te,...t.style},ref:h,defaultValue:g,children:[$(i)&&!v?(0,R.jsx)(`option`,{value:``}):null,Array.from(f)]},p)});tt.displayName=et;function nt(e){return typeof e==`function`}function $(e){return e===``||e===void 0}function rt(e){let t=c(e),n=F.useRef(``),r=F.useRef(0),i=F.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=F.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return F.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function it(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=at(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function at(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ot=le,st=pe;function ct({className:e,children:t,...n}){return(0,R.jsxs)(de,{className:i(`flex h-[var(--ui-field-height)] w-full cursor-pointer items-center justify-between gap-2 px-2.5 [&>span]:truncate`,w,e),...n,children:[t,(0,R.jsx)(he,{asChild:!0,children:(0,R.jsx)(N,{className:`size-3.5 shrink-0 text-fg-muted`})})]})}function lt({className:e,children:t,position:n=`popper`,...r}){return(0,R.jsx)(ye,{children:(0,R.jsx)(be,{position:n,sideOffset:4,className:i(`z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] overflow-y-auto`,E,`overlay-select-motion`,e),...r,children:(0,R.jsx)(Me,{children:t})})})}function ut({className:e,children:t,detail:n,...r}){return(0,R.jsxs)(Ve,{className:i(T,A,`py-1.5 pl-7 pr-2`,e),...r,children:[(0,R.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,R.jsx)(We,{children:(0,R.jsx)(P,{className:`size-3.5`})})}),(0,R.jsx)(He,{children:t}),n]})}export{st as a,ct as i,lt as n,P as o,ut as r,ot as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{A as n,X as r,a as i,d as a,et as o,f as s,j as c,o as l,v as u}from"./auth-C3ruG3fE.js";import{t as d}from"./jsx-runtime-By8HlURe.js";import{r as f}from"./index-OKzoyhKK.js";import{n as p}from"./api-CULxlzTe.js";import{t as m}from"./ws-B_QsPbsD.js";import{t as h}from"./createLucideIcon-C9A1vLE-.js";import{n as g}from"./dist-BOS6OKSE.js";import{t as _}from"./x-Dq6POV20.js";import{t as v}from"./button-C-dovHYo.js";import{t as y}from"./copy-D0Theg4Q.js";var b=h(`clipboard-paste`,[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]),x=h(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);function ee(){return f.get()}var S=32,C=2048;function w(e,t,n){let r=e.getLine(t);if(!r)return null;let i=e.getNullCell(),a=``,o=[];for(let s=0;s<Math.min(n,r.length);s++){if(!r.getCell(s,i)||i.getWidth()===0)continue;if(s===n-1&&i.getChars()===``){let n=e.getLine(t+1);if(n?.isWrapped&&n.getCell(0)?.getWidth()===2)continue}let c=i.getChars()||` `;a+=c;for(let e=0;e<c.length;e++)o.push({row:t,col:s})}return{text:a,cells:o,isWrapped:r.isWrapped}}function te(e,t,n){return{...e,text:e.text.slice(t,n),cells:e.cells.slice(t,n)}}function T(e,t,n,r,i){if(t<0||n<1)return[];let a=Math.max(0,t-S+1),o=new Map;for(let r=a;r<t+S;r++){let t=w(e,r,n);if(!t)break;o.set(r,t)}let s=new Set,c=[];for(let l of[!0,!1])for(let u=a;u<=t;u++){if(o.get(u)?.isWrapped&&u>a)continue;let d=``,f=[];for(let a=u;a<u+S;a++){let p=o.get(a);if(!p)break;let m=o.get(a-1);if(a>u&&!p.isWrapped&&!(l&&m&&i(m,p,n,d)))break;let h=o.get(a+1),g=te(p,a>u&&!p.isWrapped?p.text.length-p.text.trimStart().length:0,h?.isWrapped?p.text.length:p.text.trimEnd().length);if(d.length+g.text.length>C)break;if(d+=g.text,f.push(...g.cells),!(a<t))for(let n of r(d)){let r=f[n.start],i=f[n.end-1];if(!r||!i||r.row>t||i.row<t)continue;let a=`${d.slice(n.start,n.end)}\0${r.row}:${r.col}-${i.row}:${i.col}`;if(s.has(a))continue;s.add(a);let o=e.getLine(i.row)?.getCell(i.col)?.getWidth()??1;c.push({candidate:n,start:r,end:{row:i.row,col:i.col+Math.max(1,o)-1},text:d.slice(n.start,n.end)})}}}return c.sort((e,t)=>t.text.length-e.text.length)}var E=n.options.join(`,`),D=a.imageBytes,O=20*1024*1024;async function ne(e,t,r){r?.throwIfAborted();let i=n.safeParse(e.type);if(!i.success)throw Error(`Choose a PNG, JPEG, GIF or WebP image.`);if(e.size===0)throw Error(`This image is empty.`);if(e.size>O)throw Error(`Choose an image smaller than 20 MiB.`);if(!t||e.size<=D)return{blob:e,mime:i.data,resized:!1};if(i.data===`image/gif`)throw Error(`Choose a GIF no larger than 4 MiB for remote access.`);let a=await createImageBitmap(e);try{r?.throwIfAborted();let e=document.createElement(`canvas`),t=e.getContext(`2d`);if(!t)throw Error(`Could not prepare this image.`);let o=i.data===`image/jpeg`?`image/jpeg`:`image/webp`,s=Math.min(1,2048/Math.max(a.width,a.height));for(let i=0;i<8;i++){e.width=Math.max(1,Math.round(a.width*s)),e.height=Math.max(1,Math.round(a.height*s)),t.drawImage(a,0,0,e.width,e.height);for(let t of[.85,.7,.55]){let i=await new Promise(n=>e.toBlob(n,o,t));if(r?.throwIfAborted(),i&&i.size<=D)return{blob:i,mime:n.parse(i.type),resized:!0}}s*=.75}throw Error(`This image is too large to attach remotely. Choose a smaller image.`)}finally{a.close()}}var k=new WeakSet,re=Math.floor((u.requestBytes-1024)*3/4);async function ie(e,t,n,i,l,u,d){let f=e.generation,p=()=>{if(u?.throwIfAborted(),l(),e.generation!==f)throw Error(`The connection changed; the image upload was interrupted.`)};if(p(),!n.size||n.size>a.imageBytes)throw Error(`The prepared image must be no larger than 4 MiB.`);if(k.has(e))throw Error(`An image upload is already in progress.`);k.add(e);let m=crypto.randomUUID(),h=`/api/worktrees/${t}/paste-upload`,g=!1,_=!1,v=async(t,n,r)=>{p();let i=await e.request(t,n,r,u),a=await i.json();if(p(),!i.ok){let e=o.safeParse(a);throw Error(e.success?e.data.error.message:`The image upload failed.`)}return a},y=e=>v(`POST`,h,e),b=async e=>{let t=new Uint8Array(await e.arrayBuffer());return p(),btoa(Array.from(t,e=>String.fromCharCode(e)).join(``))};try{let e=r.parse(await v(`GET`,`/api/version`));if(d?.(0,n.size),!e.remote_image_uploads){if(n.size>re)throw Error(`Update the host connector to upload images larger than 191 KiB.`);let e=await b(n),r=c.parse(await v(`POST`,`/api/worktrees/${t}/paste`,{mime:i,data:e}));return d?.(n.size,n.size),r}if(g=!0,s.parse(await y({action:`start`,upload:m,mime:i,size:n.size})).received!==0)throw Error(`Invalid image upload acknowledgement.`);for(let e=0;e<n.size;e+=a.chunkBytes){let t=n.slice(e,e+a.chunkBytes),r=await b(t),i=s.parse(await y({action:`chunk`,upload:m,offset:e,data:r}));if(i.received!==e+t.size)throw Error(`Invalid image upload acknowledgement.`);d?.(i.received,n.size)}let o=c.parse(await y({action:`finish`,upload:m}));return _=!0,o}finally{if(g&&!_&&e.generation===f)try{l(),e.request(`POST`,h,{action:`cancel`,upload:m}).catch(()=>{})}catch{}k.delete(e)}}function ae(e,t,n){if(t.startsWith(`login-`)||t===`home`)return!1;let r=Array.from(e.clipboardData?.items??[]);if(r.some(e=>e.type===`text/plain`))return!1;let i=r.find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!i)return!1;let a=i.getAsFile();return a?(A(a,t,n).then(({resized:e})=>{e&&g(`Image resized for remote access`)}).catch(e=>{g.error(e instanceof Error?`Image paste failed: ${e.message}`:`Image paste failed`)}),!0):!1}async function A(e,t,n,r={}){if(t.startsWith(`login-`)||t===`home`)throw Error(`Open a project terminal to attach an image.`);let i=l(),a=i?.generation,o=()=>{if(l()!==i||i?.generation!==a||!m.isConnected())throw Error(`The terminal connection changed; the image was not inserted.`)};r.signal?.throwIfAborted(),o(),r.onProgress?.({stage:`preparing`});let{blob:s,mime:u,resized:d}=await ne(e,i!==null,r.signal);o();let f=i?await ie(i,t,s,u,o,r.signal,(e,t)=>r.onProgress?.(e===t?{stage:`saving`}:{stage:`uploading`,received:e,total:t})):await(async()=>{let e=await oe(s);return o(),r.signal?.throwIfAborted(),c.parse(await p(`POST`,`/api/worktrees/${t}/paste`,{mime:u,data:e}))})();return r.signal?.throwIfAborted(),o(),r.onProgress?.({stage:`inserting`}),r.insert?r.insert(`${f.path} `):i?await i.input(t,n,`${f.path} `):m.write(t,n,`${f.path} `),{resized:d}}function oe(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^,]*,/,``)),r.onerror=()=>n(r.error??Error(`could not read the clipboard image`)),r.readAsDataURL(e)})}var se=/(?:^|[\s"'`([<])((?:(?:\/|\.{1,2}\/|~\/)(?:[\w.+@~-]+\/)*[\w.+@~-]+|(?:[\w.+@~-]+\/)+[\w.+@~-]*|[\w.+@~-]+\.[A-Za-z]\w{0,11}))(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,ce=/(?:^|[\s"'`([<])((?:~?\/|\.{1,2}\/|[\w.+@~-]+\/)(?:[\w.+@~-]+(?: [\w.+@~-]+)*\/)*[\w.+@~-]+)(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,le=/"([^"\r\n]+)"|'([^'\r\n]+)'|`([^`\r\n]+)`|\(([^()\r\n]+)\)|\[([^\]\r\n[]+)\]/dg,ue=new Set([`.`,`,`,`;`,`:`,`)`,`]`,`'`,`"`]);function de(e){let t=[];for(let n of e.matchAll(le)){let e=n.slice(1).findIndex(e=>e!==void 0)+1,r=n[e];if(!r.includes(` `))continue;let i=/^(@?)(.+?)(?::(\d{1,6})(?::(\d{1,6}))?)?$/.exec(r);if(!i)continue;let a=i[2];if(!a.includes(`/`)&&!/\.[A-Za-z]\w{0,11}$/.test(a))continue;let o=n.indices[e][0]+i[1].length;t.push({path:a,line:i[3]===void 0?void 0:Number(i[3]),column:i[4]===void 0?void 0:Number(i[4]),start:o,end:n.indices[e][1]})}for(let n of[ce,se]){let r=new RegExp(n.source,n.flags),i;for(;i=r.exec(e);){let e=i.indices,n=i[1];if(!e?.[1]||n===void 0)continue;let r=e[1][0],a=e[1][1],o=n;for(o.startsWith(`@`)&&(o=o.slice(1),r++);o.length>0&&ue.has(o[o.length-1]);)o=o.slice(0,-1),a--;if(o.length===0)continue;let s=i[2]===void 0?void 0:Number.parseInt(i[2],10),c=i[3]===void 0?void 0:Number.parseInt(i[3],10),l=c!==void 0&&e[3]?e[3][1]:s!==void 0&&e[2]?e[2][1]:a;t.push({path:o,line:s,column:c,start:r,end:l})}}let n=new Set;return t.filter(e=>{let t=`${e.start}:${e.end}:${e.path}`;return n.has(t)?!1:(n.add(t),!0)}).sort((e,t)=>e.start-t.start||t.end-e.end)}function fe(e,t,n){let r=e.text.trimEnd(),i=t.text.trimStart();if(!/[\w.+@~/:-]$/.test(r)||!/^[\w.+@~/:-]/.test(i)||/^(?:~\/|\.{1,2}\/)/.test(i))return!1;let a=e.cells[r.length-1];return r.endsWith(`/`)||i.startsWith(`/`)||a!==void 0&&a.col>=n-9}function pe(e,t,n){return T(e,t,n,de,fe)}function me(e,t){return e.kind===`file`&&e.root!==void 0&&e.root!==t?e.root:null}var j=class{fetcher;now;positiveTtlMs;negativeTtlMs;maxEntries;maxConcurrent;entries=new Map;inflight=new Map;inUse=0;waiters=[];constructor(e){this.fetcher=e.fetcher,this.now=e.now??Date.now,this.positiveTtlMs=e.positiveTtlMs??15e3,this.negativeTtlMs=e.negativeTtlMs??5e3,this.maxEntries=e.maxEntries??500,this.maxConcurrent=e.maxConcurrent??4}resolve(e,t,n){let r=`${e}\0${t}`,i=this.entries.get(r);if(i){if(this.now()<i.expiresAt)return Promise.resolve(i.value);this.entries.delete(r)}let a=this.inflight.get(r);if(a)return a;let o=this.withSlot(()=>this.fetcher(e,t,n)).then(e=>(this.store(r,e),e)).finally(()=>{this.inflight.delete(r)});return this.inflight.set(r,o),o}store(e,t){let n=t?this.positiveTtlMs:this.negativeTtlMs;for(this.entries.set(e,{value:t,expiresAt:this.now()+n});this.entries.size>this.maxEntries;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}async withSlot(e){this.inUse>=this.maxConcurrent&&await new Promise(e=>this.waiters.push(e)),this.inUse++;try{return await e()}finally{this.inUse--,this.waiters.shift()?.()}}};async function M(e,t,n,r){let i=new URLSearchParams({path:t});return n!==void 0&&i.set(`line`,String(n)),r!==void 0&&i.set(`root`,r),p(`GET`,`/api/worktrees/${e}/resolve?${i}`)}function N(e,t,n){let r=e.kind??`file`;return{kind:r,path:e.path,...e.root===void 0?{}:{root:e.root},...e.relative_path===void 0?{}:{relativePath:e.relative_path},...r===`file`&&t!==void 0?{line:Math.max(1,t)}:{},...r===`file`&&n!==void 0?{column:n}:{}}}async function P(e,t,n){return N(await M(e,t,n?.line,n?.root),n?.line,n?.column)}async function F(e,t,n){try{return await M(e,t,n)}catch{return null}}function I(e,t,n){let r=new j({fetcher:F});return e.registerLinkProvider({provideLinks(i,a){let o=e.buffer.active,s=pe(o,i-1,e.cols);if(s.length===0){a(void 0);return}Promise.all(s.map(async({candidate:e,start:i,end:a,text:o})=>{let s=await r.resolve(t,e.path,e.line);return s?{range:{start:{x:i.col+1,y:i.row+1},end:{x:a.col+1,y:a.row+1}},text:o,decorations:{underline:!0,pointerCursor:!0},activate:t=>{!t.metaKey&&!t.ctrlKey||n(N(s,e.line,e.column))}}:null})).then(e=>{let t=e.filter(e=>e!==null);a(t.length>0?t:void 0)})}})}var L=e(t(),1),R={ctrl:1,alt:2,shift:4},he=/^(?:\[[ABCD]|O[ABCD]|\[1;([2-8])[ABCD])$/,z=e=>e.startsWith(`\x1B`)?he.exec(e.slice(1)):null;function B(e){return!e.startsWith(`\x1B`)||e===`\x1B`||z(e)!==null||e===`\x1B[Z`}function ge(e,t){if(!t)return e;let n=(t&R.ctrl)!==0,r=(t&R.alt)!==0,i=(t&R.shift)!==0,a=!!i|(r?2:0)|(n?4:0),o=z(e);if(o)return`\x1b[1;${1+(a|(o[1]?Number(o[1])-1:0))}${e.slice(-1)}`;if(!B(e))return e;if(e===` `||e===`\x1B[Z`)return i||e===`\x1B[Z`?`\x1B[Z`:` `;if(e===`\r`&&i)return`\x1b[13;${1+a}u`;if(i&&e.length===1){let t="`1234567890-=[]\\;',./".indexOf(e);t===-1?/[a-z]/.test(e)&&(e=e.toUpperCase()):e=`~!@#$%^&*()_+{}|:"<>?`[t]}if(n&&e.length===1){let t=e.toUpperCase().charCodeAt(0);t>=64&&t<=95?e=String.fromCharCode(t-64):e===` `?e=`\0`:e===`?`&&(e=``)}return r?`\x1b${e}`:e}function _e(e){return e.length===3&&(e.startsWith(`\x1B[`)||e.startsWith(`\x1BO`))&&`ABCD`.includes(e[2])}var V=new Map,H=new Map,U=new Map,W=new Map,G=new Set,K=e=>(G.add(e),()=>{G.delete(e)}),q=()=>{for(let e of G)e()},J=(e,t)=>i(JSON.stringify([e,t]));function ve(e,t){return(0,L.useSyncExternalStore)(K,()=>V.has(J(e,t)))}function ye(e,t,n,r,i){let a=J(e,t);return V.set(a,n),r&&H.set(a,r),i?U.set(a,i):U.delete(a),q(),()=>{V.get(a)===n&&(V.delete(a),H.delete(a),U.delete(a),W.delete(a),q())}}function Y(e,t){H.get(J(e,t))?.()}function X(e,t){return(0,L.useSyncExternalStore)(K,()=>W.get(J(e,t))??0)}function be(e,t,n){let r=J(e,t);W.set(r,(W.get(r)??0)^n),q()}function Z(e,t,n){let r=J(e,t),i=W.get(r)??0;return!i||!B(n)?n:(W.delete(r),q(),ge(n,i))}async function xe(e,t,n,r=!1){let i=J(e,t),a=V.get(i);if(!a)throw Error(`Wait for the terminal to attach; nothing was sent`);let o=r?`${a(n)}\r`:Z(e,t,n);!r&&_e(o)&&U.get(i)?.()&&(o=`\x1bO${o.slice(-1)}`),await Q(e,t,o)}async function Se(e,t,n){let r=J(e,t),i=V.get(r),a=l(),o=a?.generation;if(!i||!n()||!m.isConnected())throw Error(`Wait for the terminal to attach; nothing was pasted.`);let s;try{let n=navigator.clipboard.readText();Y(e,t),s=await n}catch{throw Error(`Could not read the clipboard. Allow clipboard access or use your keyboard’s Paste action.`)}if(!n()||V.get(r)!==i||l()!==a||a?.generation!==o||!m.isConnected())throw Error(`The terminal changed; nothing was pasted. Try again in the active terminal.`);s&&await Q(e,t,i(s))}async function Q(e,t,n){let r=l();if(r)await r.input(e,t,n);else{if(!m.isConnected())throw Error(`Terminal is disconnected; nothing was sent`);m.write(e,t,n)}}var $=d();function Ce({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,L.useState)(!1);return(0,$.jsxs)(`div`,{role:`toolbar`,"aria-label":t,onPointerDown:e=>e.preventDefault(),className:`absolute right-2 top-2 z-20 flex gap-1 rounded-md bg-elevated p-1 shadow-lg`,children:[(0,$.jsxs)(v,{variant:`ghost`,size:`sm`,disabled:!e||i,onClick:async()=>{try{await navigator.clipboard.writeText(e),n()}catch{g.error(`Could not copy the selection. Try again.`)}},children:[(0,$.jsx)(y,{}),` Copy`]}),r&&(0,$.jsxs)(v,{variant:`ghost`,size:`sm`,disabled:i,onClick:async()=>{if(!i){a(!0);try{await r(),n()}catch(e){g.error(e instanceof Error?e.message:`Could not paste. Try again.`)}finally{a(!1)}}},children:[(0,$.jsx)(b,{}),` Paste`]}),(0,$.jsx)(v,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(_,{})})]})}export{T as _,ye as a,x as b,ve as c,me as d,I as f,E as g,A as h,Se as i,X as l,ae as m,Z as n,xe as o,P as p,Y as r,be as s,Ce as t,R as u,w as v,ee as y};
|