@puddle-code/cli 0.3.7 → 0.3.9
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 +11 -4
- package/dist/host-control.mjs +60 -0
- package/dist/index.js +65 -3
- package/dist/public/assets/App-BaLhdtWg.js +2 -0
- package/dist/public/assets/Dashboard-LVU8bCcQ.js +1 -0
- package/dist/public/assets/EditorTabClose-BolUnwz9.js +1 -0
- package/dist/public/assets/FindWidget-BUmuGtbd.js +1 -0
- package/dist/public/assets/{LazyTerminal-Bw2e95Rk.js → LazyTerminal-BRPy9Nm5.js} +2 -2
- package/dist/public/assets/{ModelRefcount-CnZh2UXX.js → ModelRefcount-DdSmsCyg.js} +1 -1
- package/dist/public/assets/NewProjectDialog-BFguzZCI.js +1 -0
- package/dist/public/assets/PaneEditorBody-DBW-O4q7.js +303 -0
- package/dist/public/assets/{PdfViewer-CfWAV5F2.js → PdfViewer-Q6yROHsM.js} +1 -1
- package/dist/public/assets/SettingsDialog-DoVdLwtQ.js +8 -0
- package/dist/public/assets/{Terminal-DehlgjA9.js → Terminal-WzMZyNl-.js} +4 -4
- package/dist/public/assets/Workspace-BxGgvBCU.js +20 -0
- package/dist/public/assets/{auth-B4b-NPwe.js → auth-ngM0Ffss.js} +1 -1
- package/dist/public/assets/{buffer-store-DI-PLEdj.js → buffer-store-BcKRO2bQ.js} +1 -1
- package/dist/public/assets/command-CaE1P1RF.js +1 -0
- package/dist/public/assets/context-menu-BTe3xVbd.js +1 -0
- package/dist/public/assets/copy-CGsu8426.js +1 -0
- package/dist/public/assets/dialog-yvLGI8FJ.js +41 -0
- package/dist/public/assets/{disclosure-BQ-uiP85.js → disclosure-0ZiECVHr.js} +1 -1
- package/dist/public/assets/dist-BYGE8AQe.js +1 -0
- package/dist/public/assets/{dist-BCwJL3w9.js → dist-CYLjuW55.js} +1 -1
- package/dist/public/assets/{dist-Rswij5M_.js → dist-CwwiP1WN.js} +1 -1
- package/dist/public/assets/{dist-DmyIHyF9.js → dist-gLP0NXk8.js} +1 -1
- package/dist/public/assets/{errors-C-GJcBJ-.js → errors-yaab6YK_.js} +1 -1
- package/dist/public/assets/forward-link-kfVuUsZP.js +1 -0
- package/dist/public/assets/index-CItoWyyj.css +2 -0
- package/dist/public/assets/{index-fldNIah5.js → index-Dp8dqiUy.js} +3 -3
- package/dist/public/assets/{input-Dx89yXF4.js → input-DDhYsCUG.js} +1 -1
- package/dist/public/assets/{markdown-mermaid-CxLp87MP.js → markdown-mermaid-BX4brFyy.js} +1 -1
- package/dist/public/assets/media-refresh-store-D3rBSq4q.js +1 -0
- package/dist/public/assets/{notification-delivery-Cmpcrn_p.js → notification-delivery-B__ASJZR.js} +1 -1
- package/dist/public/assets/{popover-CTPDNtFu.js → popover-C20E0SGw.js} +1 -1
- package/dist/public/assets/preview-kind-DiWpvEc0.js +1 -0
- package/dist/public/assets/protocol-support-BNUfFPAF.js +1 -0
- package/dist/public/assets/{scroll-restoration-hslkZdX5.js → scroll-restoration-DTBzWrDT.js} +1 -1
- package/dist/public/assets/{select-iSqC2X51.js → select-DQmSVYUL.js} +1 -1
- package/dist/public/assets/{selection-actions-DmuKya-K.js → selection-actions-JLWPcaUH.js} +1 -1
- package/dist/public/assets/session-order-iDEtZwje.js +1 -0
- package/dist/public/assets/{switch-CeNFnG6w.js → switch-B1uGC2PW.js} +1 -1
- package/dist/public/assets/use-ui-state-jAfsiEpt.js +1 -0
- package/dist/public/assets/{ws-CT7jDKHs.js → ws-DfRorDqa.js} +1 -1
- package/dist/public/index.html +3 -3
- package/dist/pudl.js +61 -1
- package/package.json +1 -1
- package/dist/public/assets/App-3pe09sB2.js +0 -2
- package/dist/public/assets/Dashboard-D9xlDbdg.js +0 -1
- package/dist/public/assets/EditorTabClose-CXw4HBAH.js +0 -1
- package/dist/public/assets/FindWidget-BSK2PIfO.js +0 -1
- package/dist/public/assets/NewProjectDialog-C3INf-Ll.js +0 -1
- package/dist/public/assets/PaneEditorBody-CpAHfSEe.js +0 -302
- package/dist/public/assets/SettingsDialog-DYHZOJul.js +0 -8
- package/dist/public/assets/Workspace-CfqiBKYr.js +0 -20
- package/dist/public/assets/context-menu-BEfTGRZA.js +0 -1
- package/dist/public/assets/copy-DD43yC2P.js +0 -1
- package/dist/public/assets/dialog-Bnex_wlx.js +0 -1
- package/dist/public/assets/dist-Cg-J2BAP.js +0 -1
- package/dist/public/assets/es2015-CrC2hHeB.js +0 -41
- package/dist/public/assets/index-CjRY8Crm.css +0 -2
- package/dist/public/assets/media-refresh-store-WCjZVi4Y.js +0 -1
- package/dist/public/assets/preview-kind-CJ9RTgbs.js +0 -1
- package/dist/public/assets/project-abbrev-DhiE8lDE.js +0 -1
- package/dist/public/assets/protocol-support-Q_1mBit9.js +0 -1
- package/dist/public/assets/use-ui-state-xScqhALU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n,t as r}from"./jsx-runtime-ffCh33zF.js";import{f as i,h as a,l as o,p as s}from"./es2015-CrC2hHeB.js";import{c,n as l}from"./x-DCpy1q13.js";var u=e(t(),1),d=[`top`,`right`,`bottom`,`left`],f=Math.min,p=Math.max,m=Math.round,h=Math.floor,g=e=>({x:e,y:e}),_={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function v(e,t,n){return p(e,f(t,n))}function y(e,t){return typeof e==`function`?e(t):e}function b(e){return e.split(`-`)[0]}function x(e){return e.split(`-`)[1]}function S(e){return e===`x`?`y`:`x`}function C(e){return e===`y`?`height`:`width`}function w(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function T(e){return S(w(e))}function E(e,t,n){n===void 0&&(n=!1);let r=x(e),i=T(e),a=C(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=F(o)),[o,F(o)]}function D(e){let t=F(e);return[O(e),t,O(t)]}function O(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var k=[`left`,`right`],A=[`right`,`left`],j=[`top`,`bottom`],M=[`bottom`,`top`];function N(e,t,n){switch(e){case`top`:case`bottom`:return n?t?A:k:t?k:A;case`left`:case`right`:return t?j:M;default:return[]}}function P(e,t,n,r){let i=x(e),a=N(b(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(O)))),a}function F(e){let t=b(e);return _[t]+e.slice(t.length)}function I(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function L(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:I(e)}function R(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 z(e,t,n){let{reference:r,floating:i}=e,a=w(t),o=T(t),s=C(o),c=b(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=x(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function B(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}=y(t,e),p=L(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=R(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},b=R(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-b.top+p.top)/v.y,bottom:(b.bottom-h.bottom+p.bottom)/v.y,left:(h.left-b.left+p.left)/v.x,right:(b.right-h.right+p.right)/v.x}}var ee=50,te=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:B},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=z(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<ee&&(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}=z(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ne=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}=y(e,t)||{};if(l==null)return{};let d=L(u),p={x:n,y:r},m=T(i),h=C(m),g=await o.getDimensions(l),_=m===`y`,b=_?`top`:`left`,S=_?`bottom`:`right`,w=_?`clientHeight`:`clientWidth`,E=a.reference[h]+a.reference[m]-p[m]-a.floating[h],D=p[m]-a.reference[m],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[w]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=s.floating[w]||a.floating[h]);let A=E/2-D/2,j=k/2-g[h]/2-1,M=f(d[b],j),N=f(d[S],j),P=k-g[h]-N,F=k/2-g[h]/2+A,I=v(M,F,P),R=!c.arrow&&x(i)!=null&&F!==I&&a.reference[h]/2-(F<M?M:N)-g[h]/2<0,z=R?F<M?F-M:F-P:0;return{[m]:p[m]+z,data:{[m]:I,centerOffset:F-I-z,...R&&{alignmentOffset:z}},reset:R}}}),re=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}=y(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=b(r),_=w(o),v=b(o)===o,x=await(s.isRTL==null?void 0:s.isRTL(c.floating)),S=d||(v||!m?[F(o)]:D(o)),C=p!==`none`;!d&&C&&S.push(...P(o,m,p,x));let T=[o,...S],O=await s.detectOverflow(t,h),k=[],A=i.flip?.overflows||[];if(l&&k.push(O[g]),u){let e=E(r,a,x);k.push(O[e[0]],O[e[1]])}if(A=[...A,{placement:r,overflows:k}],!k.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=T[e];if(t&&(!(u===`alignment`&&_!==w(t))||A.every(e=>w(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=w(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 ie(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ae(e){return d.some(t=>e[t]>=0)}var oe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=y(e,t);switch(i){case`referenceHidden`:{let e=ie(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ae(e)}}}case`escaped`:{let e=ie(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ae(e)}}}default:return{}}}}},se=new Set([`left`,`top`]);async function ce(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=b(n),s=x(n),c=w(n)===`y`,l=se.has(o)?-1:1,u=a&&c?-1:1,d=y(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 le=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 ce(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}}}}},ue=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}=y(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=w(i),p=S(f),m=u[p],h=u[f],g=(e,t)=>v(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}}}}}},de=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}=y(e,t),u={x:n,y:r},d=w(i),f=S(d),p=u[f],m=u[d],h=y(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=se.has(b(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}}}},fe=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}=y(e,t),c=await i.detectOverflow(t,s),l=b(n),u=x(n),d=w(n)===`y`,{width:m,height:h}=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=h-c.top-c.bottom,S=m-c.left-c.right,C=f(h-c[g],v),T=f(m-c[_],S),E=t.middlewareData.shift,D=!E,O=C,k=T;E!=null&&E.enabled.x&&(k=S),E!=null&&E.enabled.y&&(O=v),D&&!u&&(d?k=m-2*p(c.left,c.right):O=h-2*p(c.top,c.bottom)),await o({...t,availableWidth:k,availableHeight:O});let A=await i.getDimensions(a.floating);return m!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function pe(){return typeof window<`u`}function V(e){return me(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((me(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function me(e){return pe()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return pe()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return pe()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function he(e){return!pe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function ge(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 _e(e){return/^(table|td|th)$/.test(V(e))}function ve(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ye=/transform|translate|scale|rotate|perspective|filter/,be=/paint|layout|strict|content/,K=e=>!!e&&e!==`none`,xe;function Se(e){let t=W(e)?J(e):e;return K(t.transform)||K(t.translate)||K(t.scale)||K(t.rotate)||K(t.perspective)||!we()&&(K(t.backdropFilter)||K(t.filter))||ye.test(t.willChange||``)||be.test(t.contain||``)}function Ce(e){let t=Y(e);for(;G(t)&&!q(t);){if(Se(t))return t;if(ve(t))return null;t=Y(t)}return null}function we(){return xe??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),xe}function q(e){return/^(html|body|#document)$/.test(V(e))}function J(e){return H(e).getComputedStyle(e)}function Te(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||he(e)&&e.host||U(e);return he(t)?t.host:t}function Ee(e){let t=Y(e);return q(t)?(e.ownerDocument||e).body:G(t)&&ge(t)?t:Ee(t)}function X(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ee(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=De(a);return t.concat(a,a.visualViewport||[],ge(r)?r:[],e&&n?X(e):[])}else return t.concat(r,X(r,[],n))}function De(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oe(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=m(n)!==a||m(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ke(e){return W(e)?e:e.contextElement}function Z(e){let t=ke(e);if(!G(t))return g(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Oe(t),o=(a?m(n.width):n.width)/r,s=(a?m(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ae=g(0);function je(e){let t=H(e);return!we()||!t.visualViewport?Ae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Me(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=ke(e),o=g(1);t&&(r?W(r)&&(o=Z(r)):o=Z(e));let s=Me(a,n,r)?je(a):g(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=De(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=De(n)}}return R({width:u,height:d,x:c,y:l})}function Ne(e,t){let n=Te(e).scrollLeft;return t?t.left+n:Q(U(e)).left+n}function Pe(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ne(e,n),y:n.top+t.scrollTop}}function Fe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?ve(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=g(1),u=g(0),d=G(r);if((d||!a)&&((V(r)!==`body`||ge(o))&&(c=Te(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?Pe(o,c):g(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 Ie(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Le(e){let t=Te(e),n=e.ownerDocument.body,r=p(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=p(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ne(e),o=-t.scrollTop;return J(n).direction===`rtl`&&(a+=p(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Re=25;function ze(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=!we()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ne(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<=Re&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Be(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 Ve(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ze(e,n,t);else if(t===`document`)r=Le(U(e));else if(W(t))r=Be(t,n);else{let n=je(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return R(r)}function He(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=Se(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 Ue(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ve(t)?[]:He(t,this._c):[].concat(n),r],o=Ve(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=Ve(t,a[e],i);s=p(n.top,s),c=f(n.right,c),l=f(n.bottom,l),u=p(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function We(e){let{width:t,height:n}=Oe(e);return{width:t,height:n}}function Ge(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=g(0);if((r||!a)&&((V(t)!==`body`||ge(i))&&(s=Te(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=Ne(i));let l=i&&!r&&!a?Pe(i,s):g(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 Ke(e){return J(e).position===`static`}function qe(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 Je(e,t){let n=H(e);if(ve(e))return n;if(!G(e)){let t=Y(e);for(;t&&!q(t);){if(W(t)&&!Ke(t))return t;t=Y(t)}return n}let r=qe(e,t);for(;r&&_e(r)&&Ke(r);)r=qe(r,t);return r&&q(r)&&Ke(r)&&!Se(r)?n:r||Ce(e)||n}var Ye=async function(e){let t=this.getOffsetParent||Je,n=this.getDimensions,r=await n(e.floating);return{reference:Ge(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xe(e){return J(e).direction===`rtl`}var Ze={convertOffsetParentRelativeRectToViewportRelativeRect:Fe,getDocumentElement:U,getClippingRect:Ue,getOffsetParent:Je,getElementRects:Ye,getClientRects:Ie,getDimensions:We,getScale:Z,isElement:W,isRTL:Xe};function Qe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $e(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:m,height:g}=l;if(n||t(),!m||!g)return;let _=h(d),v=h(a.clientWidth-(u+m)),y=h(a.clientHeight-(d+g)),b=h(u),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:p(0,f(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!Qe(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 et(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=ke(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?$e(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&&!Qe(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 tt=le,nt=ue,rt=re,it=fe,at=oe,ot=ne,st=de,ct=(e,t,n)=>{let r=new Map,i=n??{},a={...Ze,...i.platform,_c:r};return te(e,t,{...i,platform:a})},lt=e(n(),1),ut=typeof document<`u`?u.useLayoutEffect:function(){};function dt(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(!dt(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)&&!dt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ft(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pt(e,t){let n=ft(e);return Math.round(t*n)/n}function mt(e){let t=u.useRef(e);return ut(()=>{t.current=e}),t}function ht(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,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=u.useState(r);dt(p,r)||m(r);let[h,g]=u.useState(null),[_,v]=u.useState(null),y=u.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=u.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=u.useRef(null),w=u.useRef(null),T=u.useRef(d),E=c!=null,D=mt(c),O=mt(i),k=mt(l),A=u.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),ct(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!dt(T.current,t)&&(T.current=t,lt.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);ut(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=u.useRef(!1);ut(()=>(j.current=!0,()=>{j.current=!1}),[]),ut(()=>{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=u.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=u.useMemo(()=>({reference:x,floating:S}),[x,S]),P=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=pt(N.floating,d.x),r=pt(N.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ft(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:A,refs:M,elements:N,floatingStyles:P}),[d,A,M,N,P])}var gt=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?{}:ot({element:r.current,padding:i}).fn(n):r?ot({element:r,padding:i}).fn(n):{}}}},_t=(e,t)=>{let n=tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},vt=(e,t)=>{let n=nt(e);return{name:n.name,fn:n.fn,options:[e,t]}},yt=(e,t)=>({fn:st(e).fn,options:[e,t]}),bt=(e,t)=>{let n=rt(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>{let n=it(e);return{name:n.name,fn:n.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=gt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$=r(),wt=`Arrow`,Tt=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,$.jsx)(s.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`})})});Tt.displayName=wt;var Et=Tt;function Dt(e){let[t,n]=u.useState(void 0);return o(()=>{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 Ot=`Popper`,[kt,At]=a(Ot),[jt,Mt]=kt(Ot),Nt=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null),[a,o]=u.useState(void 0);return(0,$.jsx)(jt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Nt.displayName=Ot;var Pt=`PopperAnchor`,Ft=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Mt(Pt,n),o=u.useRef(null),l=a.onAnchorChange,d=c(t,u.useCallback(e=>{o.current=e,e&&l(e)},[l])),f=u.useRef(null);u.useEffect(()=>{if(!r)return;let e=f.current;f.current=r.current,e!==f.current&&l(f.current)});let p=a.placementState&&Gt(a.placementState),m=p?.[0],h=p?.[1];return r?null:(0,$.jsx)(s.div,{"data-radix-popper-side":m,"data-radix-popper-align":h,...i,ref:d})});Ft.displayName=Pt;var It=`PopperContent`,[Lt,Rt]=kt(It),zt=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:l=`center`,alignOffset:d=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g=`partial`,hideWhenDetached:_=!1,updatePositionStrategy:v=`optimized`,onPlaced:y,...b}=e,x=Mt(It,n),[S,C]=u.useState(null),w=c(t,C),[T,E]=u.useState(null),D=Dt(T),O=D?.width??0,k=D?.height??0,A=r+(l===`center`?``:`-`+l),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(Ut),altBoundary:N},{refs:F,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=ht({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>et(...e,{animationFrame:v===`always`}),elements:{reference:x.anchor},middleware:[_t({mainAxis:a+k,alignmentAxis:d}),p&&vt({mainAxis:!0,crossAxis:!1,limiter:g===`partial`?yt():void 0,...P}),p&&bt({...P}),xt({...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&&Ct({element:T,padding:f}),Wt({arrowWidth:O,arrowHeight:k}),_&&St({strategy:`referenceHidden`,...P,boundary:N?P.boundary:void 0})]}),B=x.setPlacementState;o(()=>(B(L),()=>{B(void 0)}),[L,B]);let[ee,te]=Gt(L),ne=i(y);o(()=>{R&&ne?.()},[R,ne]);let re=z.arrow?.x,ie=z.arrow?.y,ae=z.arrow?.centerOffset!==0,[oe,se]=u.useState();return o(()=>{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)(Lt,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:E,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,$.jsx)(s.div,{"data-side":ee,"data-align":te,...b,ref:w,style:{...b.style,animation:R?void 0:`none`}})})})});zt.displayName=It;var Bt=`PopperArrow`,Vt={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ht=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Rt(Bt,n),a=Vt[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)(Et,{...r,ref:t,style:{...r.style,display:`block`}})})});Ht.displayName=Bt;function Ut(e){return e!==null}var Wt=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]=Gt(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 Gt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Kt=Nt,qt=Ft,Jt=zt,Yt=Ht,Xt=`rounded-md 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`,Zt=`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg outline-none transition-colors`,Qt=`data-[highlighted]:bg-action data-[highlighted]:text-action-ink data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,$t=`data-[selected=true]:bg-action data-[selected=true]:text-action-ink data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`;function en({className:e,type:t,...n}){return(0,$.jsx)(`input`,{type:t,className:l(`flex h-8 w-full px-2.5`,Xt,e),...n})}function tn({className:e,...t}){return(0,$.jsx)(`textarea`,{className:l(`flex min-h-16 w-full px-2.5 py-2`,Xt,e),...t})}export{Qt as a,Yt as c,At as d,Dt as f,$t as i,Jt as l,tn as n,Zt as o,Xt as r,qt as s,en as t,Kt as u};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n,t as r}from"./jsx-runtime-ffCh33zF.js";import{S as i,w as a,x as o,y as s}from"./dialog-yvLGI8FJ.js";import{c,n as l}from"./x-DCpy1q13.js";var u=e(t(),1),d=[`top`,`right`,`bottom`,`left`],f=Math.min,p=Math.max,m=Math.round,h=Math.floor,g=e=>({x:e,y:e}),_={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function v(e,t,n){return p(e,f(t,n))}function y(e,t){return typeof e==`function`?e(t):e}function b(e){return e.split(`-`)[0]}function x(e){return e.split(`-`)[1]}function S(e){return e===`x`?`y`:`x`}function C(e){return e===`y`?`height`:`width`}function w(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function T(e){return S(w(e))}function E(e,t,n){n===void 0&&(n=!1);let r=x(e),i=T(e),a=C(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=F(o)),[o,F(o)]}function D(e){let t=F(e);return[O(e),t,O(t)]}function O(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var k=[`left`,`right`],A=[`right`,`left`],j=[`top`,`bottom`],M=[`bottom`,`top`];function N(e,t,n){switch(e){case`top`:case`bottom`:return n?t?A:k:t?k:A;case`left`:case`right`:return t?j:M;default:return[]}}function P(e,t,n,r){let i=x(e),a=N(b(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(O)))),a}function F(e){let t=b(e);return _[t]+e.slice(t.length)}function I(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function L(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:I(e)}function R(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 z(e,t,n){let{reference:r,floating:i}=e,a=w(t),o=T(t),s=C(o),c=b(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=x(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function B(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}=y(t,e),p=L(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=R(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},b=R(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-b.top+p.top)/v.y,bottom:(b.bottom-h.bottom+p.bottom)/v.y,left:(h.left-b.left+p.left)/v.x,right:(b.right-h.right+p.right)/v.x}}var ee=50,te=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:B},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=z(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<ee&&(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}=z(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ne=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}=y(e,t)||{};if(l==null)return{};let d=L(u),p={x:n,y:r},m=T(i),h=C(m),g=await o.getDimensions(l),_=m===`y`,b=_?`top`:`left`,S=_?`bottom`:`right`,w=_?`clientHeight`:`clientWidth`,E=a.reference[h]+a.reference[m]-p[m]-a.floating[h],D=p[m]-a.reference[m],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[w]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=s.floating[w]||a.floating[h]);let A=E/2-D/2,j=k/2-g[h]/2-1,M=f(d[b],j),N=f(d[S],j),P=k-g[h]-N,F=k/2-g[h]/2+A,I=v(M,F,P),R=!c.arrow&&x(i)!=null&&F!==I&&a.reference[h]/2-(F<M?M:N)-g[h]/2<0,z=R?F<M?F-M:F-P:0;return{[m]:p[m]+z,data:{[m]:I,centerOffset:F-I-z,...R&&{alignmentOffset:z}},reset:R}}}),re=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}=y(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=b(r),_=w(o),v=b(o)===o,x=await(s.isRTL==null?void 0:s.isRTL(c.floating)),S=d||(v||!m?[F(o)]:D(o)),C=p!==`none`;!d&&C&&S.push(...P(o,m,p,x));let T=[o,...S],O=await s.detectOverflow(t,h),k=[],A=i.flip?.overflows||[];if(l&&k.push(O[g]),u){let e=E(r,a,x);k.push(O[e[0]],O[e[1]])}if(A=[...A,{placement:r,overflows:k}],!k.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=T[e];if(t&&(!(u===`alignment`&&_!==w(t))||A.every(e=>w(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=w(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 ie(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ae(e){return d.some(t=>e[t]>=0)}var oe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=y(e,t);switch(i){case`referenceHidden`:{let e=ie(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ae(e)}}}case`escaped`:{let e=ie(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ae(e)}}}default:return{}}}}},se=new Set([`left`,`top`]);async function ce(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=b(n),s=x(n),c=w(n)===`y`,l=se.has(o)?-1:1,u=a&&c?-1:1,d=y(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 le=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 ce(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}}}}},ue=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}=y(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=w(i),p=S(f),m=u[p],h=u[f],g=(e,t)=>v(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}}}}}},de=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}=y(e,t),u={x:n,y:r},d=w(i),f=S(d),p=u[f],m=u[d],h=y(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=se.has(b(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}}}},fe=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}=y(e,t),c=await i.detectOverflow(t,s),l=b(n),u=x(n),d=w(n)===`y`,{width:m,height:h}=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=h-c.top-c.bottom,S=m-c.left-c.right,C=f(h-c[g],v),T=f(m-c[_],S),E=t.middlewareData.shift,D=!E,O=C,k=T;E!=null&&E.enabled.x&&(k=S),E!=null&&E.enabled.y&&(O=v),D&&!u&&(d?k=m-2*p(c.left,c.right):O=h-2*p(c.top,c.bottom)),await o({...t,availableWidth:k,availableHeight:O});let A=await i.getDimensions(a.floating);return m!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function pe(){return typeof window<`u`}function V(e){return me(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((me(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function me(e){return pe()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return pe()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return pe()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function he(e){return!pe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function ge(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 _e(e){return/^(table|td|th)$/.test(V(e))}function ve(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ye=/transform|translate|scale|rotate|perspective|filter/,be=/paint|layout|strict|content/,K=e=>!!e&&e!==`none`,xe;function Se(e){let t=W(e)?J(e):e;return K(t.transform)||K(t.translate)||K(t.scale)||K(t.rotate)||K(t.perspective)||!we()&&(K(t.backdropFilter)||K(t.filter))||ye.test(t.willChange||``)||be.test(t.contain||``)}function Ce(e){let t=Y(e);for(;G(t)&&!q(t);){if(Se(t))return t;if(ve(t))return null;t=Y(t)}return null}function we(){return xe??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),xe}function q(e){return/^(html|body|#document)$/.test(V(e))}function J(e){return H(e).getComputedStyle(e)}function Te(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||he(e)&&e.host||U(e);return he(t)?t.host:t}function Ee(e){let t=Y(e);return q(t)?(e.ownerDocument||e).body:G(t)&&ge(t)?t:Ee(t)}function X(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ee(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=De(a);return t.concat(a,a.visualViewport||[],ge(r)?r:[],e&&n?X(e):[])}else return t.concat(r,X(r,[],n))}function De(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oe(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=m(n)!==a||m(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ke(e){return W(e)?e:e.contextElement}function Z(e){let t=ke(e);if(!G(t))return g(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Oe(t),o=(a?m(n.width):n.width)/r,s=(a?m(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ae=g(0);function je(e){let t=H(e);return!we()||!t.visualViewport?Ae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Me(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=ke(e),o=g(1);t&&(r?W(r)&&(o=Z(r)):o=Z(e));let s=Me(a,n,r)?je(a):g(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=De(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=De(n)}}return R({width:u,height:d,x:c,y:l})}function Ne(e,t){let n=Te(e).scrollLeft;return t?t.left+n:Q(U(e)).left+n}function Pe(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ne(e,n),y:n.top+t.scrollTop}}function Fe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?ve(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=g(1),u=g(0),d=G(r);if((d||!a)&&((V(r)!==`body`||ge(o))&&(c=Te(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?Pe(o,c):g(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 Ie(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Le(e){let t=Te(e),n=e.ownerDocument.body,r=p(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=p(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ne(e),o=-t.scrollTop;return J(n).direction===`rtl`&&(a+=p(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Re=25;function ze(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=!we()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ne(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<=Re&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Be(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 Ve(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ze(e,n,t);else if(t===`document`)r=Le(U(e));else if(W(t))r=Be(t,n);else{let n=je(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return R(r)}function He(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=Se(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 Ue(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ve(t)?[]:He(t,this._c):[].concat(n),r],o=Ve(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=Ve(t,a[e],i);s=p(n.top,s),c=f(n.right,c),l=f(n.bottom,l),u=p(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function We(e){let{width:t,height:n}=Oe(e);return{width:t,height:n}}function Ge(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=g(0);if((r||!a)&&((V(t)!==`body`||ge(i))&&(s=Te(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=Ne(i));let l=i&&!r&&!a?Pe(i,s):g(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 Ke(e){return J(e).position===`static`}function qe(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 Je(e,t){let n=H(e);if(ve(e))return n;if(!G(e)){let t=Y(e);for(;t&&!q(t);){if(W(t)&&!Ke(t))return t;t=Y(t)}return n}let r=qe(e,t);for(;r&&_e(r)&&Ke(r);)r=qe(r,t);return r&&q(r)&&Ke(r)&&!Se(r)?n:r||Ce(e)||n}var Ye=async function(e){let t=this.getOffsetParent||Je,n=this.getDimensions,r=await n(e.floating);return{reference:Ge(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xe(e){return J(e).direction===`rtl`}var Ze={convertOffsetParentRelativeRectToViewportRelativeRect:Fe,getDocumentElement:U,getClippingRect:Ue,getOffsetParent:Je,getElementRects:Ye,getClientRects:Ie,getDimensions:We,getScale:Z,isElement:W,isRTL:Xe};function Qe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $e(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:m,height:g}=l;if(n||t(),!m||!g)return;let _=h(d),v=h(a.clientWidth-(u+m)),y=h(a.clientHeight-(d+g)),b=h(u),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:p(0,f(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!Qe(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 et(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=ke(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?$e(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&&!Qe(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 tt=le,nt=ue,rt=re,it=fe,at=oe,ot=ne,st=de,ct=(e,t,n)=>{let r=new Map,i=n??{},a={...Ze,...i.platform,_c:r};return te(e,t,{...i,platform:a})},lt=e(n(),1),ut=typeof document<`u`?u.useLayoutEffect:function(){};function dt(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(!dt(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)&&!dt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ft(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pt(e,t){let n=ft(e);return Math.round(t*n)/n}function mt(e){let t=u.useRef(e);return ut(()=>{t.current=e}),t}function ht(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,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=u.useState(r);dt(p,r)||m(r);let[h,g]=u.useState(null),[_,v]=u.useState(null),y=u.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=u.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=u.useRef(null),w=u.useRef(null),T=u.useRef(d),E=c!=null,D=mt(c),O=mt(i),k=mt(l),A=u.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),ct(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!dt(T.current,t)&&(T.current=t,lt.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);ut(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=u.useRef(!1);ut(()=>(j.current=!0,()=>{j.current=!1}),[]),ut(()=>{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=u.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=u.useMemo(()=>({reference:x,floating:S}),[x,S]),P=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=pt(N.floating,d.x),r=pt(N.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ft(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:A,refs:M,elements:N,floatingStyles:P}),[d,A,M,N,P])}var gt=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?{}:ot({element:r.current,padding:i}).fn(n):r?ot({element:r,padding:i}).fn(n):{}}}},_t=(e,t)=>{let n=tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},vt=(e,t)=>{let n=nt(e);return{name:n.name,fn:n.fn,options:[e,t]}},yt=(e,t)=>({fn:st(e).fn,options:[e,t]}),bt=(e,t)=>{let n=rt(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>{let n=it(e);return{name:n.name,fn:n.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=gt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$=r(),wt=`Arrow`,Tt=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:a=5,...o}=e;return(0,$.jsx)(i.svg,{...o,ref:t,width:r,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,$.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Tt.displayName=wt;var Et=Tt;function Dt(e){let[t,n]=u.useState(void 0);return s(()=>{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 Ot=`Popper`,[kt,At]=a(Ot),[jt,Mt]=kt(Ot),Nt=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null),[a,o]=u.useState(void 0);return(0,$.jsx)(jt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Nt.displayName=Ot;var Pt=`PopperAnchor`,Ft=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...a}=e,o=Mt(Pt,n),s=u.useRef(null),l=o.onAnchorChange,d=c(t,u.useCallback(e=>{s.current=e,e&&l(e)},[l])),f=u.useRef(null);u.useEffect(()=>{if(!r)return;let e=f.current;f.current=r.current,e!==f.current&&l(f.current)});let p=o.placementState&&Gt(o.placementState),m=p?.[0],h=p?.[1];return r?null:(0,$.jsx)(i.div,{"data-radix-popper-side":m,"data-radix-popper-align":h,...a,ref:d})});Ft.displayName=Pt;var It=`PopperContent`,[Lt,Rt]=kt(It),zt=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:l=`center`,alignOffset:d=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g=`partial`,hideWhenDetached:_=!1,updatePositionStrategy:v=`optimized`,onPlaced:y,...b}=e,x=Mt(It,n),[S,C]=u.useState(null),w=c(t,C),[T,E]=u.useState(null),D=Dt(T),O=D?.width??0,k=D?.height??0,A=r+(l===`center`?``:`-`+l),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(Ut),altBoundary:N},{refs:F,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=ht({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>et(...e,{animationFrame:v===`always`}),elements:{reference:x.anchor},middleware:[_t({mainAxis:a+k,alignmentAxis:d}),p&&vt({mainAxis:!0,crossAxis:!1,limiter:g===`partial`?yt():void 0,...P}),p&&bt({...P}),xt({...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&&Ct({element:T,padding:f}),Wt({arrowWidth:O,arrowHeight:k}),_&&St({strategy:`referenceHidden`,...P,boundary:N?P.boundary:void 0})]}),B=x.setPlacementState;s(()=>(B(L),()=>{B(void 0)}),[L,B]);let[ee,te]=Gt(L),ne=o(y);s(()=>{R&&ne?.()},[R,ne]);let re=z.arrow?.x,ie=z.arrow?.y,ae=z.arrow?.centerOffset!==0,[oe,se]=u.useState();return s(()=>{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)(Lt,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:E,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,$.jsx)(i.div,{"data-side":ee,"data-align":te,...b,ref:w,style:{...b.style,animation:R?void 0:`none`}})})})});zt.displayName=It;var Bt=`PopperArrow`,Vt={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ht=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Rt(Bt,n),a=Vt[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)(Et,{...r,ref:t,style:{...r.style,display:`block`}})})});Ht.displayName=Bt;function Ut(e){return e!==null}var Wt=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]=Gt(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 Gt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Kt=Nt,qt=Ft,Jt=zt,Yt=Ht,Xt=`rounded-md 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`,Zt=`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg outline-none transition-colors`,Qt=`data-[highlighted]:bg-action data-[highlighted]:text-action-ink data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,$t=`data-[selected=true]:bg-action data-[selected=true]:text-action-ink data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`;function en({className:e,type:t,...n}){return(0,$.jsx)(`input`,{type:t,className:l(`flex h-8 w-full px-2.5`,Xt,e),...n})}function tn({className:e,...t}){return(0,$.jsx)(`textarea`,{className:l(`flex min-h-16 w-full px-2.5 py-2`,Xt,e),...t})}export{Qt as a,Yt as c,At as d,Dt as f,$t as i,Jt as l,tn as n,Zt as o,Xt as r,qt as s,en as t,Kt as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-D2QzpYEE.js","assets/preload-helper-Czpn1I53.js","assets/purify.es-D8QhFVkO.js","assets/rolldown-runtime-QTnfLwEv.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-_wZywoZs.js","assets/chunk-DU6HZSFF-1ZoT19aa.js","assets/chunk-75Z2AOVW-CYC6lmPG.js","assets/dist-D9sYb5Oa.js","assets/chunk-CLGD4ZFX-85mvsF4F.js","assets/chunk-PWAF6VOD-CTSTb7zN.js","assets/chunk-GMAD6QVW-BzDEhlK8.js","assets/chunk-P2QGCYS3-C5-f0Lvg.js","assets/chunk-4HAMMTFA-eolw8o4c.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-CZrUjjq3.js","assets/chunk-OSK3NFVY-Cs_K17E_.js","assets/line-D4r_bmlv.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-L3NEJ4N5-BW3s5_r9.js","assets/chunk-TLUHSLCS-CcE5HWjm.js","assets/chunk-2E4U76K2-3abpRZU5.js","assets/graphlib-DS17s2tU.js","assets/chunk-LNGE3PJU-DNNNwF8Y.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./preload-helper-Czpn1I53.js";import{n}from"./index-
|
|
2
|
+
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./preload-helper-Czpn1I53.js";import{n}from"./index-Dp8dqiUy.js";var r=e({MERMAID_SELECTOR:()=>i,renderMermaidDiagrams:()=>s}),i=`[data-puddle-mermaid]`,a=0,o=Promise.resolve();function s(e,t,n,r=!1){let i=o.then(()=>c(e,t,n,r));return o=i.catch(()=>void 0),i}async function c(e,r,o,s=!1){if(o?.aborted)return;let c=[...e.querySelectorAll(i)];if(c.length===0)return;let d;try{({default:d}=await t(()=>import(`./mermaid.core-D2QzpYEE.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))}catch{if(!o?.aborted)for(let e of c)l(e,`Mermaid could not be loaded`);return}if(!o?.aborted){try{let t=n(),i=getComputedStyle(e).fontSize,a=Number.parseFloat(i);d.initialize({startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,theme:`base`,htmlLabels:!1,fontFamily:t(`--font-sans`),...s&&Number.isFinite(a)?{flowchart:{nodeSpacing:a,rankSpacing:a*2,padding:a/2,subGraphTitleMargin:{top:a/2,bottom:a}},sequence:{diagramMarginY:a/2,messageMargin:a,actorMargin:a}}:{},secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`maxEdges`,`suppressErrorRendering`,`theme`,`themeCSS`,`themeVariables`,`fontFamily`],themeVariables:{darkMode:r===`dark`,background:t(`--bg-base`),primaryColor:t(`--bg-elevated`),primaryTextColor:t(`--text-primary`),primaryBorderColor:t(`--border`),secondaryColor:t(`--bg-surface`),secondaryTextColor:t(`--text-primary`),secondaryBorderColor:t(`--border`),tertiaryColor:t(`--bg-base`),tertiaryTextColor:t(`--text-secondary`),tertiaryBorderColor:t(`--border`),lineColor:t(`--text-muted`),textColor:t(`--text-primary`),fontFamily:t(`--font-sans`),fontSize:i}})}catch(e){if(!o?.aborted)for(let t of c)l(t,u(e));return}for(let e of c){if(o?.aborted||!e.isConnected)return;let t=e.textContent??``,n=`puddle-mermaid-${a++}`;try{let{svg:r}=await d.render(n,t);if(o?.aborted||!e.isConnected)continue;e.innerHTML=r,e.removeAttribute(`data-puddle-mermaid`)}catch(t){document.getElementById(n)?.remove(),!o?.aborted&&e.isConnected&&l(e,u(t))}}}}function l(e,t){if(e.querySelector(`.mermaid-error`))return;let n=document.createElement(`p`);n.className=`mermaid-error`,n.textContent=`Unable to render Mermaid diagram.`,n.title=t,e.prepend(n)}function u(e){return e instanceof Error?e.message:String(e)}export{s as n,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{a as r,i,n as a}from"./dist-CwwiP1WN.js";import{Ft as o,It as s,Lt as c,Pt as l,Ut as u,Vt as d,Wt as ee,zt as f}from"./protocol-support-BNUfFPAF.js";import{S as p,T as m,h,v as g,w as te}from"./dialog-yvLGI8FJ.js";import{c as ne,n as _}from"./x-DCpy1q13.js";import{a as v,o as y}from"./input-DDhYsCUG.js";import{t as b}from"./createLucideIcon-DyMAgLa3.js";import{r as re}from"./dist-gLP0NXk8.js";import{_ as ie,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-BYGE8AQe.js";var xe=class extends d{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:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,d=i&&c===`forward`,f=o&&c===`backward`,p=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:u(t,n.data),hasPreviousPage:ee(t,n.data),isFetchNextPageError:l,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:s&&!l&&!f,isRefetching:a&&!d&&!p}}};function Se(e,t){return c(e,xe,t)}var Ce=b(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),we=b(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Te=b(`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=b(`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=b(`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=b(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),x=50;function S(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function C(e){return e?{placeholderData:e=>e}:{}}function ke(e,t,n){let r=e!==void 0;return s({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${S(n)}`),enabled:r,...C(r)})}function Ae(e,t,n){let r=n?.root;return s({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${S(r)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:l(3e3),refetchOnWindowFocus:!0}:{}})}function je(e,t){let n=f();return o({mutationFn:({path:n,...r})=>i(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${S(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`,r=t?.area,a=t?.root,o=e!==void 0&&(t?.enabled??!0);return s({queryKey:a===void 0?[`wt-diff`,e,n,r]:[`wt-diff`,e,n,r,a],queryFn:()=>{let t=r===void 0?``:`&area=${r}`;return i(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${S(a)}`)},enabled:o,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...C(o)})}function Ne(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return s({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-repositories${w(n)}`),enabled:r,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...C(r)})}function Pe(e,t,n){let r=n?.root,a=e!==void 0&&(n?.enabled??!0);return s({queryKey:[`git-original`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${S(r)}`),enabled:a,refetchInterval:l(1e4),refetchOnWindowFocus:!0})}function Fe(e,t,n){let r=n?.root;return s({queryKey:[`git-index-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${S(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function Ie(e,t){let n=f();return o({mutationFn:({action:n,...r})=>i(`POST`,`/api/worktrees/${e}/git-${n}${w(t)}`,r),onSuccess:()=>{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,r=e!==void 0&&(t?.enabled??!0);return s({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-status${w(n)}`),enabled:r,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...C(r)})}function w(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function Re(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/create${w(r)}`,{path:t,kind:n})}function ze(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/rename${w(r)}`,{from:t,to:n})}function Be(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/copy${w(r)}`,{from:t,to:n})}function Ve(e,t,n){return i(`POST`,`/api/worktrees/${e}/transfer${w(n)}`,t)}function He(e,t,n){return i(`POST`,`/api/worktrees/${e}/delete${w(n)}`,{path:t})}function Ue(e,t,n){let{query:r,regex:a,caseSensitive:o,wholeWord:c}=t;return s({queryKey:[`wt-search`,e,r,a,o,c,n],queryFn:()=>{let t=new URLSearchParams({q:r});return a&&t.set(`regex`,`1`),o&&t.set(`case`,`1`),c&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),i(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function We(e,t,n,r){let a=r?.root;return s({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${S(a)}`),enabled:e!==void 0&&(r?.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})=>i(`GET`,`/api/worktrees/${e}/log?limit=${x}&skip=${t}${S(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*x:void 0,enabled:r,...C(r)})}function Ke(e,t,n){return s({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/show/${t}${w(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,i){let a=[];for(let o of Je(n,qe)){let n=new FormData;for(let e of o)n.append(`files`,e,e.name);let s=await r(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${S(i)}`,{body:n});a.push(...(await s.json()).files)}return{files:a}}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 i=await r(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${S(n)}`),a=await i.blob(),o=t.split(`/`).filter(Boolean).pop()??`worktree`,s=Xe(i.headers.get(`content-disposition`),o),c=URL.createObjectURL(a);try{let e=document.createElement(`a`);e.href=c,e.download=s,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(c)}}var T=e(t(),1),E=[],D=new Map,O=new Map,k=new Map;function A(e,t){let n=D.get(e)??E;t.length===0?D.delete(e):D.set(e,t);let r=new Set([...n.map(e=>j(e.source)),...t.map(e=>j(e.source))]);for(let e of r)tt(e)}function Qe(e){A(e,E)}function $e(e,t,n){let r=j({session:e,path:t,...n===void 0?{}:{root:n}});return(0,T.useSyncExternalStore)((0,T.useCallback)(e=>nt(r,e),[r]),()=>et({session:e,path:t,...n===void 0?{}:{root:n}}))}function et(e){return O.get(j(e))??E}function tt(e){let t=[...D.values()].flatMap(t=>t.filter(t=>j(t.source)===e));t.length===0?O.delete(e):O.set(e,t);for(let t of k.get(e)??[])t()}function nt(e,t){let n=k.get(e)??new Set;return n.add(t),k.set(e,n),()=>{n.delete(t),n.size===0&&k.delete(e)}}function j(e){return JSON.stringify([e.session,e.root??null,e.path])}var M=n();function N(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var P=new Map;function rt(e,t,n){let r={save:t,...n?{target:n}:{}};return P.set(e,r),()=>{P.get(e)===r&&P.delete(e)}}function it(e){if(e===null)return!1;let t=P.get(e);return t?(t.save(),!0):!1}async function at(e,t){let n=N(e.session,e.path,e.root),r=[...P.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 F=60,I=60*F,L=24*I,lt=7*L;function ut(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<F?`just now`:r<I?`${Math.floor(r/F)} m ago`:r<L?`${Math.floor(r/I)} h ago`:r<lt?`${Math.floor(r/L)} d ago`:ct(n)}function dt(e,t){return t?`added`:e}function ft(e){return i(`POST`,`/api/profiles/${e}/untitled`)}function R(e,t){return[`untitled`,e,t]}function pt(e,t){return s({queryKey:R(e,t),queryFn:()=>i(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function mt(e,t,n,r){e.setQueryData(R(t,n),e=>e===void 0?e:{...e,content:r})}function ht(e,t,n){return i(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function gt(e,t){return i(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var z=null,B=new Map;function _t(e){z=e}function vt(e){z?.(e)}function yt(e,t){B.set(e,t)}function bt(e){return B.get(e)}function xt(e){B.delete(e)}var V=(0,T.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function St({children:e}){let[t,n]=(0,T.useState)(null),r=(0,T.useCallback)(e=>n(()=>e),[]),i=(0,T.useCallback)((e,n,r,i)=>{if(!t){a(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),o=(0,T.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,M.jsx)(V.Provider,{value:o,children:e})}function Ct(){let{openFile:e}=(0,T.useContext)(V);return{openFile:e}}function wt(e){let{setHandler:t}=(0,T.useContext)(V),n=(0,T.useRef)(e);n.current=e,(0,T.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var H=new Map;function Tt(e,t){let n=N(e.session,e.path,e.root),r=H.get(n)??new Set;return r.add(t),H.set(n,r),()=>{r.delete(t),r.size||H.delete(n)}}function Et(e){let t=H.get(N(e.session,e.path,e.root))?.values().next().value;return t?(t(),!0):!1}var U=`DropdownMenu`,[Dt,Ot]=te(U,[ie]),W=ie(),[kt,G]=Dt(U),K=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=W(t),l=T.useRef(null),[u,d]=h({prop:i,defaultProp:a??!1,onChange:o,caller:U});return(0,M.jsx)(kt,{scope:t,triggerId:g(),triggerRef:l,contentId:g(),open:u,onOpenChange:d,onOpenToggle:T.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,M.jsx)(ce,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};K.displayName=U;var q=`DropdownMenuTrigger`,J=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=G(q,n),o=W(n),s=ne(t,a.triggerRef);return(0,M.jsx)(ye,{asChild:!0,...o,children:(0,M.jsx)(p.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:m(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:m(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});J.displayName=q;var At=`DropdownMenuPortal`,Y=e=>{let{__scopeDropdownMenu:t,...n}=e,r=W(t);return(0,M.jsx)(fe,{...r,...n})};Y.displayName=At;var X=`DropdownMenuContent`,Z=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=G(X,n),a=W(n),o=T.useRef(!1);return(0,M.jsx)(de,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:m(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:m(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)`}})});Z.displayName=X;var jt=`DropdownMenuGroup`,Mt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(ae,{...i,...r,ref:t})});Mt.displayName=jt;var Nt=`DropdownMenuLabel`,Pt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(oe,{...i,...r,ref:t})});Pt.displayName=Nt;var Ft=`DropdownMenuItem`,It=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(he,{...i,...r,ref:t})});It.displayName=Ft;var Lt=`DropdownMenuCheckboxItem`,Rt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(_e,{...i,...r,ref:t})});Rt.displayName=Lt;var zt=`DropdownMenuRadioGroup`,Bt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(be,{...i,...r,ref:t})});Bt.displayName=zt;var Vt=`DropdownMenuRadioItem`,Ht=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(se,{...i,...r,ref:t})});Ht.displayName=Vt;var Ut=`DropdownMenuItemIndicator`,Wt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(ve,{...i,...r,ref:t})});Wt.displayName=Ut;var Gt=`DropdownMenuSeparator`,Kt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(ge,{...i,...r,ref:t})});Kt.displayName=Gt;var qt=`DropdownMenuArrow`,Jt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(me,{...i,...r,ref:t})});Jt.displayName=qt;var Yt=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=W(t),[s,c]=h({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,M.jsx)(pe,{...o,open:s,onOpenChange:c,children:n})},Xt=`DropdownMenuSubTrigger`,Zt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(le,{...i,...r,ref:t})});Zt.displayName=Xt;var Qt=`DropdownMenuSubContent`,$t=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.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)`}})});$t.displayName=Qt;var en=K,tn=J,nn=Y,rn=Z,an=It,on=Kt,sn=Yt,cn=Zt,ln=$t,un=en,dn=tn,fn=sn;function pn({className:e,sideOffset:t=4,...n}){return(0,M.jsx)(nn,{children:(0,M.jsx)(rn,{sideOffset:t,className:_(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...n})})}function mn({className:e,...t}){return(0,M.jsx)(an,{className:_(y,v,`[&_svg]:size-3.5`,e),...t})}function hn({className:e,children:t,...n}){return(0,M.jsxs)(cn,{className:_(y,v,`data-[state=open]:bg-action data-[state=open]:text-action-ink [&_svg]:size-3.5`,e),...n,children:[t,(0,M.jsx)(re,{className:`ml-auto`})]})}function gn({className:e,...t}){return(0,M.jsx)(nn,{children:(0,M.jsx)(ln,{className:_(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...t})})}function _n({className:e,...t}){return(0,M.jsx)(on,{className:_(`-mx-1 my-1 h-px bg-border`,e),...t})}var Q=new Map,$=new Map;function vn(e,t,n){let r=xn(e,t,n);Q.set(r,(Q.get(r)??0)+1);for(let e of $.get(r)??[])e()}function yn(e,t,n){let r=xn(e,t,n),i=(0,T.useCallback)(e=>bn(r,e),[r]),a=(0,T.useCallback)(()=>Q.get(r)??0,[r]);return(0,T.useSyncExternalStore)(i,a,a)}function bn(e,t){let n=$.get(e);return n||(n=new Set,$.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&$.delete(e)}}function xn(e,t,n){return JSON.stringify([e,n??null,t])}export{Ge as $,at as A,S 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,A 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 _,mn as a,Te as at,bt as b,gn as c,Tt as d,Ue as et,Et as f,xt as g,wt as h,pn as i,Ee as it,N as j,it as k,hn as l,Ct as m,yn as n,Oe as nt,_n as o,we as ot,St as p,Ne as q,un as r,De as rt,fn as s,Ce as st,vn as t,ke as tt,dn as u,vt as v,mt as w,ft as x,_t as y,ze as z};
|
package/dist/public/assets/{notification-delivery-Cmpcrn_p.js → notification-delivery-B__ASJZR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{z as r}from"./auth-B4b-NPwe.js";import{a as i,d as a,o,t as s}from"./LazyTerminal-Bw2e95Rk.js";import{o as c}from"./dist-Rswij5M_.js";import{Lt as l,Nt as u,Pt as d,nn as f}from"./protocol-support-Q_1mBit9.js";import{n as ee}from"./x-DCpy1q13.js";import{t as p}from"./createLucideIcon-DyMAgLa3.js";import{l as te,o as ne,s as re,u as ie}from"./switch-CeNFnG6w.js";import{a as ae,n as oe,o as se,r as ce,t as le}from"./dialog-Bnex_wlx.js";function ue(e,t){return`[${a(t)}] ${e}`.slice(0,160)}var de=p(`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`}]]),fe=p(`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`}]]),pe=p(`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`}]]),me=p(`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`}]]),he=p(`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`}]]),ge=p(`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`}]]),_e=p(`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`}]]),ve=p(`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`}]]),m=p(`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`}]]),h=p(`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`}]]),g=p(`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`}]]),_=p(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),v=p(`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`}]]),y=p(`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`}]]),b=p(`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`}]]),x=p(`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`}]]),S=p(`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`}]]),C=p(`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`}]]),w=p(`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`}]]),T=p(`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`}]]),E=p(`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`}]]),D=p(`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`}]]),O=p(`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`}]]),k=p(`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`}]]),A=p(`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`}]]),j=p(`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`}]]),M=p(`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`}]]),N=p(`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`}]]),P=p(`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`}]]),F=p(`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`}]]),ye=p(`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`}]]),be=p(`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`}]]),xe=p(`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`}]]),Se=p(`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`}]]),I=p(`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`}]]),Ce=p(`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`}]]),we=p(`mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),Te=p(`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`}]]),Ee=p(`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`}]]),De=p(`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`}]]),Oe=p(`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`}]]),ke=p(`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`}]]),Ae=p(`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`}]]),je=p(`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`}]]),Me=p(`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`}]]),Ne=p(`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`}]]),Pe=p(`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`}]]),Fe=p(`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`}]]),Ie=p(`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`}]]),Le=p(`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`}]]),Re=p(`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`}]]),ze=p(`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`}]]),L=p(`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`}]]),Be=p(`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`}]]),Ve=p(`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`}]]),He=p(`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`}]]),Ue=p(`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`}]]),We=p(`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`}]]),Ge=p(`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`}]]),Ke=p(`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`}]]),R=[{name:`mountain`,Icon:we},{name:`mountain-snow`,Icon:Ce},{name:`tree-pine`,Icon:He},{name:`trees`,Icon:Ue},{name:`leaf`,Icon:xe},{name:`flower`,Icon:D},{name:`flower-2`,Icon:E},{name:`sprout`,Icon:Re},{name:`sun`,Icon:L},{name:`moon`,Icon:I},{name:`star`,Icon:ze},{name:`cloud`,Icon:_},{name:`snowflake`,Icon:Ie},{name:`zap`,Icon:ne},{name:`flame`,Icon:T},{name:`droplet`,Icon:S},{name:`rainbow`,Icon:je},{name:`wind`,Icon:Ke},{name:`bird`,Icon:pe},{name:`fish`,Icon:w},{name:`cat`,Icon:g},{name:`dog`,Icon:x},{name:`rabbit`,Icon:Ae},{name:`turtle`,Icon:Ge},{name:`bug`,Icon:_e},{name:`snail`,Icon:Fe},{name:`paw-print`,Icon:Ee},{name:`feather`,Icon:C},{name:`rocket`,Icon:Me},{name:`anchor`,Icon:de},{name:`compass`,Icon:y},{name:`map`,Icon:Se},{name:`tent`,Icon:Be},{name:`camera`,Icon:m},{name:`music`,Icon:Te},{name:`headphones`,Icon:P},{name:`palette`,Icon:te},{name:`brush`,Icon:ge},{name:`pencil`,Icon:o},{name:`book`,Icon:he},{name:`book-open`,Icon:me},{name:`coffee`,Icon:v},{name:`pizza`,Icon:De},{name:`ice-cream-cone`,Icon:ye},{name:`cake`,Icon:ve},{name:`gift`,Icon:j},{name:`gamepad-2`,Icon:O},{name:`puzzle`,Icon:ke},{name:`bike`,Icon:fe},{name:`car`,Icon:h},{name:`plane`,Icon:Oe},{name:`ship`,Icon:Pe},{name:`sailboat`,Icon:Ne},{name:`train-front`,Icon:Ve},{name:`heart`,Icon:F},{name:`sparkles`,Icon:Le},{name:`crown`,Icon:b},{name:`gem`,Icon:k},{name:`trophy`,Icon:We},{name:`ghost`,Icon:A},{name:`bot`,Icon:ie},{name:`globe`,Icon:M},{name:`guitar`,Icon:N}],qe=Object.fromEntries(R.map(e=>[e.name,e.Icon])),z=n();function Je({icon:e,colour:t,className:n}){let r=ee(`size-4 shrink-0`,t?i(t):`text-fg-muted`,n);return(0,z.jsx)(e&&qe[e]||re,{className:r})}var B=e(t(),1);function Ye({stream:e,label:t,hint:n,onClose:r}){let[i,a]=(0,B.useState)(null);return(0,z.jsx)(le,{open:!0,onOpenChange:e=>!e&&r(),children:(0,z.jsxs)(oe,{className:`h-[85vh] max-w-[calc(100vw-4rem)]`,children:[(0,z.jsxs)(ae,{children:[(0,z.jsxs)(se,{children:[t,` — login`]}),(0,z.jsx)(ce,{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,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md bg-ground p-1`,children:(0,z.jsx)(s,{stream:e,onExit:e=>e===0?r():a(e)})})]})})}var V=e=>e&&typeof e==`object`?e:{},H=[{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:`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}=V(e);return{desktop:t,sound:n,...r===void 0?{}:{when_focused:r}}},mergeInto:(e,t)=>({...V(t),...V(e)})}]},{id:`scratchpad`,label:`Scratchpad (profile-wide entries)`,fields:[{key:`entries`,store:`scratchpad`}]}];function U(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 W(e){return JSON.stringify([e.title??``,e.body,e.tags,e.agent_type??``])}function Xe(e,t){if(!Array.isArray(e))return[];let n=new Set(U(t).map(W)),r=new Set,i=[];for(let t of e){let e=V(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=W(a);n.has(o)||r.has(o)||(r.add(o),i.push(a))}return i}function Ze(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 U(t.scratchpad)}}function Qe(e,t){let n={};for(let r of H){if(!e.includes(r.id))continue;let i={};for(let e of r.fields){let n=Ze(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 $e(e,t,n,r){if(!e||typeof e!=`object`)return[];let i=e,a={},o={},s={},c=[];for(let e of H){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=Xe(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 G={version:1,profiles:{}};function et(e,t){return e.profiles[t]??{enabled:!0,groups:H.map(e=>e.id),doc:{},updatedAt:new Date(0).toISOString()}}async function tt(){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:G}}catch{return{available:!1,file:G}}}function nt(){return d({queryKey:[`local-sync`],queryFn:tt,staleTime:5e3,refetchOnWindowFocus:!0,retry:!1})}function rt(){let e=l();return u({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 it(){return f()?.showNotification?`unverified`:typeof Notification>`u`?`unsupported`:Notification.permission}async function at(e,t){let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(t)),1e4)})])}finally{clearTimeout(n)}}var K;async function ot(){return!(`serviceWorker`in navigator)||!window.isSecureContext?null:(K||=st().catch(e=>{throw K=void 0,e}),K)}async function st(){let e=await at(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 q(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 J={state:`unverified`,message:null},Y=new Set,X=new Map,Z=!1,ct=!1;function Q(e,t){X.set(e,t),X.size>64&&X.delete(X.keys().next().value)}function $(e){J=e;for(let e of Y)e();return e}function lt(){return(0,B.useSyncExternalStore)(e=>(Y.add(e),()=>{Y.delete(e)}),()=>J)}async function ut(){let e=f();if(e?.notificationStatus)try{$(r.parse(await e.notificationStatus()))}catch{$({state:`failed`,message:`Could not read desktop notification delivery status.`})}}async function dt(e,t,n){try{let i=f();if(i?.showNotification){!Z&&i.onNotificationClick&&(i.onNotificationClick((e,t)=>{t||X.get(e)?.(),X.delete(e)}),Z=!0),Q(e.id,t);let{target:a,...o}=e;return $(r.parse(await i.showNotification({...o,...i.notificationTargets?{target:a}:{},...i.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 a=n?{...e,title:ue(e.title,n.project)}:e,o=await ot();return o?(ct||=(navigator.serviceWorker.addEventListener(`message`,e=>{e.data?.t!==`notification-click`||typeof e.data.id!=`string`||(e.data.target||X.get(e.data.id)?.(),X.delete(e.data.id))}),!0),Q(e.id,t),await q(o,a),$({state:`shown`,message:null})):await new Promise(n=>{let r=new Notification(a.title,{body:e.body,tag:e.id,silent:!0}),i=setTimeout(()=>n($({state:`unverified`,message:`Delivery has not been confirmed. Check system notification settings.`})),5e3);r.onshow=()=>{clearTimeout(i),n($({state:`shown`,message:null}))},r.onerror=()=>{clearTimeout(i),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{et as a,H as c,Ye as d,Je as f,be as g,I as h,it as i,$e as l,L as m,ut as n,nt as o,R as p,lt as r,rt as s,dt as t,Qe as u};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{z as r}from"./auth-ngM0Ffss.js";import{a as i,d as a,o,t as s}from"./LazyTerminal-BRPy9Nm5.js";import{o as c}from"./dist-CwwiP1WN.js";import{Ft as l,It as u,in as d,zt as ee}from"./protocol-support-BNUfFPAF.js";import{a as te,n as ne,o as re,r as ie,t as ae}from"./dialog-yvLGI8FJ.js";import{n as oe}from"./x-DCpy1q13.js";import{t as f}from"./createLucideIcon-DyMAgLa3.js";import{l as se,o as ce,s as le,u as ue}from"./switch-B1uGC2PW.js";function de(e,t){return`[${a(t)}] ${e}`.slice(0,160)}var fe=f(`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`}]]),pe=f(`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`}]]),me=f(`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`}]]),he=f(`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`}]]),ge=f(`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`}]]),_e=f(`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`}]]),ve=f(`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`}]]),p=f(`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`}]]),m=f(`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`}]]),h=f(`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`}]]),g=f(`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`}]]),_=f(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),v=f(`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`}]]),y=f(`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`}]]),b=f(`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`}]]),x=f(`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`}]]),S=f(`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`}]]),C=f(`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`}]]),w=f(`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`}]]),T=f(`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`}]]),E=f(`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`}]]),D=f(`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`}]]),O=f(`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`}]]),k=f(`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`}]]),A=f(`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`}]]),j=f(`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`}]]),M=f(`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`}]]),N=f(`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`}]]),P=f(`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`}]]),F=f(`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`}]]),ye=f(`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`}]]),be=f(`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`}]]),xe=f(`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`}]]),Se=f(`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`}]]),I=f(`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`}]]),Ce=f(`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`}]]),we=f(`mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),Te=f(`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`}]]),Ee=f(`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`}]]),De=f(`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`}]]),Oe=f(`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`}]]),ke=f(`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`}]]),Ae=f(`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`}]]),je=f(`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`}]]),Me=f(`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`}]]),Ne=f(`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`}]]),Pe=f(`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`}]]),Fe=f(`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`}]]),Ie=f(`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`}]]),Le=f(`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`}]]),Re=f(`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`}]]),ze=f(`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`}]]),L=f(`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`}]]),Be=f(`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`}]]),Ve=f(`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`}]]),He=f(`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`}]]),Ue=f(`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`}]]),We=f(`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`}]]),Ge=f(`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`}]]),Ke=f(`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`}]]),R=[{name:`mountain`,Icon:we},{name:`mountain-snow`,Icon:Ce},{name:`tree-pine`,Icon:He},{name:`trees`,Icon:Ue},{name:`leaf`,Icon:xe},{name:`flower`,Icon:D},{name:`flower-2`,Icon:E},{name:`sprout`,Icon:Re},{name:`sun`,Icon:L},{name:`moon`,Icon:I},{name:`star`,Icon:ze},{name:`cloud`,Icon:_},{name:`snowflake`,Icon:Ie},{name:`zap`,Icon:ce},{name:`flame`,Icon:T},{name:`droplet`,Icon:S},{name:`rainbow`,Icon:je},{name:`wind`,Icon:Ke},{name:`bird`,Icon:me},{name:`fish`,Icon:w},{name:`cat`,Icon:g},{name:`dog`,Icon:x},{name:`rabbit`,Icon:Ae},{name:`turtle`,Icon:Ge},{name:`bug`,Icon:ve},{name:`snail`,Icon:Fe},{name:`paw-print`,Icon:Ee},{name:`feather`,Icon:C},{name:`rocket`,Icon:Me},{name:`anchor`,Icon:fe},{name:`compass`,Icon:y},{name:`map`,Icon:Se},{name:`tent`,Icon:Be},{name:`camera`,Icon:m},{name:`music`,Icon:Te},{name:`headphones`,Icon:P},{name:`palette`,Icon:se},{name:`brush`,Icon:_e},{name:`pencil`,Icon:o},{name:`book`,Icon:ge},{name:`book-open`,Icon:he},{name:`coffee`,Icon:v},{name:`pizza`,Icon:De},{name:`ice-cream-cone`,Icon:ye},{name:`cake`,Icon:p},{name:`gift`,Icon:j},{name:`gamepad-2`,Icon:O},{name:`puzzle`,Icon:ke},{name:`bike`,Icon:pe},{name:`car`,Icon:h},{name:`plane`,Icon:Oe},{name:`ship`,Icon:Pe},{name:`sailboat`,Icon:Ne},{name:`train-front`,Icon:Ve},{name:`heart`,Icon:F},{name:`sparkles`,Icon:Le},{name:`crown`,Icon:b},{name:`gem`,Icon:k},{name:`trophy`,Icon:We},{name:`ghost`,Icon:A},{name:`bot`,Icon:ue},{name:`globe`,Icon:M},{name:`guitar`,Icon:N}],qe=Object.fromEntries(R.map(e=>[e.name,e.Icon])),z=n();function Je({icon:e,colour:t,className:n}){let r=oe(`size-4 shrink-0`,t?i(t):`text-fg-muted`,n);return(0,z.jsx)(e&&qe[e]||le,{className:r})}var B=e(t(),1);function Ye({stream:e,label:t,hint:n,onClose:r}){let[i,a]=(0,B.useState)(null);return(0,z.jsx)(ae,{open:!0,onOpenChange:e=>!e&&r(),children:(0,z.jsxs)(ne,{className:`h-[85vh] max-w-[calc(100vw-4rem)]`,children:[(0,z.jsxs)(te,{children:[(0,z.jsxs)(re,{children:[t,` — login`]}),(0,z.jsx)(ie,{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,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md bg-ground p-1`,children:(0,z.jsx)(s,{stream:e,onExit:e=>e===0?r():a(e)})})]})})}var V=e=>e&&typeof e==`object`?e:{},H=[{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:`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}=V(e);return{desktop:t,sound:n,...r===void 0?{}:{when_focused:r}}},mergeInto:(e,t)=>({...V(t),...V(e)})}]},{id:`scratchpad`,label:`Scratchpad (profile-wide entries)`,fields:[{key:`entries`,store:`scratchpad`}]}];function U(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 W(e){return JSON.stringify([e.title??``,e.body,e.tags,e.agent_type??``])}function Xe(e,t){if(!Array.isArray(e))return[];let n=new Set(U(t).map(W)),r=new Set,i=[];for(let t of e){let e=V(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=W(a);n.has(o)||r.has(o)||(r.add(o),i.push(a))}return i}function Ze(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 U(t.scratchpad)}}function Qe(e,t){let n={};for(let r of H){if(!e.includes(r.id))continue;let i={};for(let e of r.fields){let n=Ze(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 $e(e,t,n,r){if(!e||typeof e!=`object`)return[];let i=e,a={},o={},s={},c=[];for(let e of H){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=Xe(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 G={version:1,profiles:{}};function et(e,t){return e.profiles[t]??{enabled:!0,groups:H.map(e=>e.id),doc:{},updatedAt:new Date(0).toISOString()}}async function tt(){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:G}}catch{return{available:!1,file:G}}}function nt(){return u({queryKey:[`local-sync`],queryFn:tt,staleTime:5e3,refetchOnWindowFocus:!0,retry:!1})}function rt(){let e=ee();return l({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 it(){return d()?.showNotification?`unverified`:typeof Notification>`u`?`unsupported`:Notification.permission}async function at(e,t){let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(t)),1e4)})])}finally{clearTimeout(n)}}var K;async function ot(){return!(`serviceWorker`in navigator)||!window.isSecureContext?null:(K||=st().catch(e=>{throw K=void 0,e}),K)}async function st(){let e=await at(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 q(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 J={state:`unverified`,message:null},Y=new Set,X=new Map,Z=!1,ct=!1;function Q(e,t){X.set(e,t),X.size>64&&X.delete(X.keys().next().value)}function $(e){J=e;for(let e of Y)e();return e}function lt(){return(0,B.useSyncExternalStore)(e=>(Y.add(e),()=>{Y.delete(e)}),()=>J)}async function ut(){let e=d();if(e?.notificationStatus)try{$(r.parse(await e.notificationStatus()))}catch{$({state:`failed`,message:`Could not read desktop notification delivery status.`})}}async function dt(e,t,n){try{let i=d();if(i?.showNotification){!Z&&i.onNotificationClick&&(i.onNotificationClick((e,t)=>{t||X.get(e)?.(),X.delete(e)}),Z=!0),Q(e.id,t);let{target:a,...o}=e;return $(r.parse(await i.showNotification({...o,...i.notificationTargets?{target:a}:{},...i.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 a=n?{...e,title:de(e.title,n.project)}:e,o=await ot();return o?(ct||=(navigator.serviceWorker.addEventListener(`message`,e=>{e.data?.t!==`notification-click`||typeof e.data.id!=`string`||(e.data.target||X.get(e.data.id)?.(),X.delete(e.data.id))}),!0),Q(e.id,t),await q(o,a),$({state:`shown`,message:null})):await new Promise(n=>{let r=new Notification(a.title,{body:e.body,tag:e.id,silent:!0}),i=setTimeout(()=>n($({state:`unverified`,message:`Delivery has not been confirmed. Check system notification settings.`})),5e3);r.onshow=()=>{clearTimeout(i),n($({state:`shown`,message:null}))},r.onerror=()=>{clearTimeout(i),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{et as a,H as c,Ye as d,Je as f,be as g,I as h,it as i,$e as l,L as m,ut as n,nt as o,R as p,lt as r,rt as s,dt as t,Qe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{S as r,T as i,_ as a,b as o,d as s,f as c,g as l,h as u,m as d,p as f,v as p,w as m}from"./dialog-yvLGI8FJ.js";import{a as h,c as g,n as _}from"./x-DCpy1q13.js";import{c as v,d as y,l as b,s as x,u as S}from"./input-DDhYsCUG.js";var C=e(t(),1),w=n(),T=`Popover`,[E,ee]=m(T,[y]),D=y(),[O,k]=E(T),A=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=D(t),c=C.useRef(null),[l,d]=C.useState(!1),[f,m]=u({prop:r,defaultProp:i??!1,onChange:a,caller:T});return(0,w.jsx)(S,{...s,children:(0,w.jsx)(O,{scope:t,contentId:p(),triggerRef:c,open:f,onOpenChange:m,onOpenToggle:C.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:l,onCustomAnchorAdd:C.useCallback(()=>d(!0),[]),onCustomAnchorRemove:C.useCallback(()=>d(!1),[]),modal:o,children:n})})};A.displayName=T;var j=`PopoverAnchor`,M=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(j,n),a=D(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return C.useEffect(()=>(o(),()=>s()),[o,s]),(0,w.jsx)(x,{...a,...r,ref:t})});M.displayName=j;var N=`PopoverTrigger`,P=C.forwardRef((e,t)=>{let{__scopePopover:n,...a}=e,o=k(N,n),s=D(n),c=g(t,o.triggerRef),l=(0,w.jsx)(r.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Y(o.open),...a,ref:c,onClick:i(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,w.jsx)(x,{asChild:!0,...s,children:l})});P.displayName=N;var F=`PopoverPortal`,[I,L]=E(F,{forceMount:void 0}),R=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=k(F,t);return(0,w.jsx)(I,{scope:t,forceMount:n,children:(0,w.jsx)(l,{present:n||o.open,children:(0,w.jsx)(a,{asChild:!0,container:i,children:r})})})};R.displayName=F;var z=`PopoverContent`,B=C.forwardRef((e,t)=>{let n=L(z,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=k(z,e.__scopePopover);return(0,w.jsx)(l,{present:r||a.open,children:a.modal?(0,w.jsx)(H,{...i,ref:t}):(0,w.jsx)(U,{...i,ref:t})})});B.displayName=z;var V=h(`PopoverContent.RemoveScroll`),H=C.forwardRef((e,t)=>{let n=k(z,e.__scopePopover),r=C.useRef(null),a=g(t,r),o=C.useRef(!1);return C.useEffect(()=>{let e=r.current;if(e)return s(e)},[]),(0,w.jsx)(c,{as:V,allowPinchZoom:!0,children:(0,w.jsx)(W,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:i(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:i(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:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),U=C.forwardRef((e,t)=>{let n=k(z,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(W,{...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()}})}),W=C.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:p,...m}=e,h=k(z,n),g=D(n);return f(),(0,w.jsx)(d,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(o,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,w.jsx)(b,{"data-state":Y(h.open),role:`dialog`,id:h.contentId,...g,...m,ref:t,style:{...m.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)`}})})})}),G=`PopoverClose`,K=C.forwardRef((e,t)=>{let{__scopePopover:n,...a}=e,o=k(G,n);return(0,w.jsx)(r.button,{type:`button`,...a,ref:t,onClick:i(e.onClick,()=>o.onOpenChange(!1))})});K.displayName=G;var q=`PopoverArrow`,J=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=D(n);return(0,w.jsx)(v,{...i,...r,ref:t})});J.displayName=q;function Y(e){return e?`open`:`closed`}var X=A,Z=P,Q=R,$=B,te=X,ne=Z;function re({className:e,align:t=`end`,sideOffset:n=8,...r}){return(0,w.jsx)(Q,{children:(0,w.jsx)($,{align:t,sideOffset:n,className:_(`z-50 rounded-lg bg-elevated p-5 shadow-2xl outline-none`,e),...r})})}export{re as n,ne as r,te as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-DyMAgLa3.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);function n(e){return e.kind??`file`}function r(e){if(e.view===`linked`||e.view===`locked`)return e.view;let t=`${n(e)}:${e.session}:${e.sha??``}:${e.root??``}:${e.path}`;return e.git_area===void 0?t:`${t}:git-${e.git_area}`}var i={ipynb:`notebook`,md:`markdown`,markdown:`markdown`,mdown:`markdown`,html:`html`,htm:`html`};function a(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0?null:i[t.slice(n+1).toLowerCase()]??null}function o(e,t){if(t===``||t.startsWith(`#`)||t.startsWith(`//`)||/^[a-z][a-z0-9+.-]*:/i.test(t))return null;let n=t.split(`#`)[0].split(`?`)[0];if(n===``||n===`/`)return null;let r=[...n.startsWith(`/`)?[]:e.split(`/`).slice(0,-1)];for(let e of decodeURI(n).split(`/`))if(!(e===``||e===`.`))if(e===`..`){if(r.length===0)return null;r.pop()}else r.push(e);return r.length>0?r.join(`/`):null}function s(e){let t=[],n=0,r=e=>/[\t\n\f\r ]/.test(e);for(;n<e.length;){for(;n<e.length&&(r(e[n])||e[n]===`,`);)n+=1;if(n>=e.length)break;let i=n;for(;n<e.length&&!r(e[n]);)n+=1;let a=e.slice(i,n);if(a.endsWith(`,`)){a=a.replace(/,+$/,``),a!==``&&t.push({ref:a,descriptor:``});continue}for(;n<e.length&&r(e[n]);)n+=1;let o=n;for(;n<e.length&&e[n]!==`,`;)n+=1;let s=e.slice(o,n).trim();n<e.length&&(n+=1),a!==``&&t.push({ref:a,descriptor:s})}return t}function c(e){return e.map(({ref:e,descriptor:t})=>`${e}${t===``?``:` ${t}`}`).join(`, `)}export{r as a,c as i,a as n,n as o,o as r,t as s,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{i as r}from"./auth-ngM0Ffss.js";import{i}from"./dist-CwwiP1WN.js";var a=n(),o=e(t(),1);function s(){return window.puddleDesktop}function c(){let[e,t]=(0,o.useState)({fullScreen:!1,animate:!1});return(0,o.useEffect)(()=>{let e=s();if(!e)return;let n=!0;e.isFullScreen?.()?.then(e=>{n&&t({fullScreen:e,animate:!1})});let r=e.onFullScreenChange?.(e=>t({fullScreen:e,animate:!0}));return()=>{n=!1,r?.()}},[]),e}var l=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},u=new class extends l{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},f=new class{#e=d;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function p(e){setTimeout(e,0)}var m=typeof window>`u`||`Deno`in globalThis;function h(){}function g(e,t){return typeof e==`function`?e(t):e}function _(e){return typeof e==`number`&&e>=0&&e!==1/0}function v(e,t){return Math.max(e+(t||0)-Date.now(),0)}function y(e,t){return typeof e==`function`?e(t):e}function b(e,t){return typeof e==`function`?e(t):e}function x(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ee(o,t.options))return!1}else if(!w(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function S(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(C(t.options.mutationKey)!==C(a))return!1}else if(!w(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ee(e,t){return(t?.queryKeyHashFn||C)(e)}function C(e){return JSON.stringify(e,(e,t)=>D(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function w(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>w(e[n],t[n])):!1}var te=Object.prototype.hasOwnProperty;function T(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ne(e)&&ne(t);if(!r&&!(D(e)&&D(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:te.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=T(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function E(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ne(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function D(e){if(!re(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!re(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function re(e){return Object.prototype.toString.call(e)===`[object Object]`}function ie(e){return new Promise(t=>{f.setTimeout(t,e)})}function O(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:T(e,t)}function ae(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function oe(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function se(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function A(e,t){return typeof e==`function`?e(...t):!!e}function ce(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var j=(()=>{let e=()=>m;return{isServer(){return e()},setIsServer(t){e=t}}})();function M(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var le=p;function ue(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=le,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var N=ue(),P=new class extends l{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function de(e){return Math.min(1e3*2**e,3e4)}function fe(e){return(e??`online`)!==`online`||P.isOnline()}var F=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function pe(e){let t=!1,n=0,r,i=M(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new F(t);p(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>u.isFocused()&&(e.networkMode===`always`||P.isOnline())&&e.canRun(),d=()=>fe(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(j.isServer()?0:3),o=e.retryDelay??de,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ie(s).then(()=>l()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:d,start:()=>(d()?h():m().then(h),i)}}var I=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_(this.gcTime)&&(this.#e=f.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(j.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(f.clearTimeout(this.#e),this.#e=void 0)}};function me(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ce(e,()=>t.signal,()=>n=!0)},u=se(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?oe:ae;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?he:L,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:L(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function L(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function he(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ge(e,t){return t?L(e,t)!=null:!1}function _e(e,t){return!t||!e.getPreviousPageParam?!1:he(e,t)!=null}var ve=class extends I{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=xe(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=xe(this.options);e.data!==void 0&&(this.setState(be(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=O(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(h).catch(h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>b(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>y(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!v(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=se(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?me(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=pe({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof F&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof F){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ye(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...be(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),N.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ye(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fe(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function be(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function xe(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Se=class extends l{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=M(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),we(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof b(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!E(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Te(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||b(this.options.enabled,this.#t)!==b(t.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||b(this.options.enabled,this.#t)!==b(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ee(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(h)),t}#g(){this.#b();let e=y(this.options.staleTime,this.#t);if(j.isServer()||this.#r.isStale||!_(e))return;let t=v(this.#r.dataUpdatedAt,e)+1;this.#d=f.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(j.isServer()||b(this.options.enabled,this.#t)===!1||!_(this.#p)||this.#p===0)&&(this.#f=f.setInterval(()=>{(this.options.refetchIntervalInBackground||u.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(f.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(f.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&we(e,t),o=i&&Te(e,n,t,r);(a||o)&&(l={...l,...ye(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=O(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=O(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&x,isStale:z(e,t),refetch:this.refetch,promise:this.#o,isEnabled:b(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{let e=this.#o=S.promise=M();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!E(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){N.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ce(e,t){return b(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&b(t.retryOnMount,e)===!1)}function we(e,t){return Ce(e,t)||e.state.data!==void 0&&R(e,t,t.refetchOnMount)}function R(e,t,n){if(b(t.enabled,e)!==!1&&y(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&z(e,t)}return!1}function Te(e,t,n,r){return(e!==t||b(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&z(e,n)}function z(e,t){return b(t.enabled,e)!==!1&&e.isStaleByTime(y(t.staleTime,e))}function Ee(e,t){return!E(e.getCurrentResult(),t)}var De=class extends I{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||B(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=pe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),N.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function B(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Oe=class extends l{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),E(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&C(t.mutationKey)!==C(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??B();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){N.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},V=o.createContext(void 0),H=e=>{let t=o.useContext(V);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ke=({client:e,children:t})=>(o.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,a.jsx)(V.Provider,{value:e,children:t})),Ae=o.createContext(!1),je=()=>o.useContext(Ae);Ae.Provider;function Me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ne=o.createContext(Me()),Pe=()=>o.useContext(Ne),Fe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?A(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Ie=e=>{o.useEffect(()=>{e.clearReset()},[e])},Le=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||A(n,[e.error,r])),Re=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ze=(e,t)=>e.isLoading&&e.isFetching&&!t,Be=(e,t)=>e?.suspense&&t.isPending,Ve=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function He(e,t,n){let r=je(),i=Pe(),a=H(n),s=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=a.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,Re(s),Fe(s,i,c),Ie(i);let u=!a.getQueryCache().get(s.queryHash),[d]=o.useState(()=>new t(a,s)),f=d.getOptimisticResult(s),p=!r&&l;if(o.useSyncExternalStore(o.useCallback(e=>{let t=p?d.subscribe(N.batchCalls(e)):h;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),o.useEffect(()=>{d.setOptions(s)},[s,d]),Be(s,f))throw Ve(s,d,i);if(Le({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(s,f),s.experimental_prefetchInRender&&!j.isServer()&&ze(f,r)&&(u?Ve(s,d,i):c?.promise)?.catch(h).finally(()=>{d.updateResult()}),s.notifyOnChangeProps?f:d.trackResult(f)}function U(e,t){return He(e,Se,t)}function W(e,t){let n=H(t),[r]=o.useState(()=>new Oe(n,e));o.useEffect(()=>{r.setOptions(e)},[r,e]);let i=o.useSyncExternalStore(o.useCallback(e=>r.subscribe(N.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=o.useCallback((e,t)=>{r.mutate(e,t).catch(h)},[r]);if(i.error&&A(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Ue=12,G=typeof document<`u`?document.hasFocus():!0;typeof window<`u`&&(window.addEventListener(`focus`,()=>{G=!0}),window.addEventListener(`blur`,()=>{G=!1}),u.setEventListener(e=>{let t=()=>e(void 0);return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}));function K(e){return()=>G?e:e*Ue}function We(){return U({queryKey:[`profiles`],queryFn:()=>i(`GET`,`/api/profiles`)})}function Ge(e){return U({queryKey:[`profile-settings`,e],queryFn:()=>i(`GET`,`/api/profiles/${e}/settings`),enabled:e!==void 0})}function Ke(e){return U({queryKey:[`accounts`,e],queryFn:()=>i(`GET`,`/api/accounts?profile=${e}`),enabled:e!==void 0})}function qe(e){return U({queryKey:[`account-usage`,e],queryFn:()=>i(`GET`,`/api/accounts/${e}/usage`),enabled:e!==void 0,staleTime:15e3})}function Je(){return U({queryKey:[`repos`],queryFn:()=>i(`GET`,`/api/repos`)})}function Ye(e,t=!0){return U({queryKey:[`projects`,e??`all`],queryFn:()=>i(`GET`,e===void 0?`/api/projects`:`/api/projects?profile=${e}`),enabled:t})}function Xe(e){return U({queryKey:[`project`,e],queryFn:()=>i(`GET`,`/api/projects/${e}`),enabled:e!==void 0,placeholderData:e=>e})}function Ze(e){return i(`POST`,`/api/projects/${e}/conversations/refresh`)}function Qe(e){return U({queryKey:[`sessions`,e],queryFn:()=>i(`GET`,`/api/sessions?project=${e}`),enabled:e!==void 0})}var $e={queryKey:[`sessions`,`all`],queryFn:()=>i(`GET`,`/api/sessions`)};function et(e=!0){return U({...$e,enabled:e})}function tt(e){return e.fetchQuery($e)}function nt(){return U({queryKey:[`config`],queryFn:()=>i(`GET`,`/api/config`)})}function rt(e){return U({queryKey:[`repo-branches`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/branches`),enabled:e!==void 0,staleTime:3e4})}function it(e,t=1e4){return U({queryKey:[`repo-worktrees`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/worktrees`),enabled:e!==void 0,staleTime:t})}function at(e,t){let n=H();return W({mutationFn:t=>i(`DELETE`,`/api/repos/${e}/worktrees?path=${encodeURIComponent(t)}`),onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function ot(e,t){let n=H();return W({mutationFn:({name:t,confirm:n})=>{let r=new URLSearchParams({name:t});return n&&r.set(`confirm`,`1`),i(`DELETE`,`/api/repos/${e}/branches?${r.toString()}`)},onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function st(e){return U({queryKey:[`fs-dirs`,e],queryFn:()=>i(`GET`,`/api/fs/dirs?prefix=${encodeURIComponent(e)}`),enabled:e.startsWith(`/`)||e.startsWith(`~`),placeholderData:e=>e,staleTime:1e4})}function ct(){return U({queryKey:[`version`],queryFn:()=>i(`GET`,`/api/version`),staleTime:1/0})}function lt(){return U({queryKey:[`host`],queryFn:()=>i(`GET`,`/api/host`),staleTime:1/0})}function ut(e){return e?e.displayName||e.hostname:void 0}function dt(){return U({queryKey:[`agents`],queryFn:()=>i(`GET`,`/api/agents`),staleTime:3e4,refetchOnWindowFocus:!0})}function ft(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/profiles`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function pt(e){let t=H();return W({mutationFn:t=>i(`PATCH`,`/api/profiles/${e}/settings`,t),onSuccess:n=>t.setQueryData([`profile-settings`,e],n)})}function mt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/profiles/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function ht(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/accounts/${e}`,t),onSuccess:t=>{e.invalidateQueries({queryKey:[`accounts`,t.profile_id]}),e.invalidateQueries({queryKey:[`account-usage`,t.id]})}})}function gt(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/profiles/${e}`),onSuccess:()=>e.clear()})}function _t(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/accounts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`accounts`]})})}function vt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/accounts`,e),onSuccess:t=>void e.invalidateQueries({queryKey:[`accounts`,t.profile_id]})})}function yt(){return W({mutationFn:e=>i(`POST`,`/api/accounts/${e}/login`)})}function bt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/repos`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function xt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/repos/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function St(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/repos/${e}/fetch`),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function Ct(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/projects`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function wt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/projects/${e}`,t),onSuccess:t=>{e.setQueryData([`project`,t.id],e=>e&&{...e,project:t}),e.invalidateQueries({queryKey:[`projects`]})}})}function Tt(e,t){return U({queryKey:[`scratchpad`,e,t??`none`],queryFn:()=>i(`GET`,`/api/scratchpad?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function Et(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/scratchpad`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Dt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/scratchpad/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Ot(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/scratchpad/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function kt(e,t){return U({queryKey:[`layouts`,e,t??`none`],queryFn:()=>i(`GET`,`/api/layouts?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function At(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/layouts`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function jt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/layouts/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function Mt(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/layouts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function q(e,t){e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`project`,t.project_id]})}function Nt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/sessions`,e),onSuccess:t=>q(e,t)})}function Pt(e){let t=H();return W({mutationFn:t=>i(`POST`,`/api/sessions/${t}/${e}`),onSuccess:e=>q(t,e)})}function Ft(){let e=H();return W({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/migrate`,{account_id:t}),onSuccess:t=>q(e,t)})}function It(){let e=H();return W({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/handoff`,{account_id:t}),onSuccess:(t,{sessionId:n})=>{q(e,t),e.invalidateQueries({queryKey:[`session`,n]})}})}function Lt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/sessions/${e}/archive`),onSuccess:t=>q(e,t)})}function Rt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/sessions/${e}/unarchive`),onSuccess:t=>q(e,t)})}function zt(){let e=H();return W({mutationFn:({sessionId:e,title:t})=>i(`PATCH`,`/api/sessions/${e}`,{title:t}),onSuccess:t=>q(e,t)})}function Bt(){let e=H();return W({mutationFn:e=>i(`PATCH`,`/api/config`,e),onSuccess:(t,n)=>{e.setQueryData([`config`],t),`displayName`in n&&e.invalidateQueries({queryKey:[`host`]})}})}async function Vt(e){try{return await i(`GET`,`/api/profiles/${e}/state`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`no_state`)return null;throw e}}function Ht(e,t){return i(`PUT`,`/api/profiles/${e}/state`,{ui_state:t})}function Ut(e,t){return U({queryKey:[`ports`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/ports`),enabled:e!==void 0&&t,refetchInterval:K(5e3),refetchIntervalInBackground:!1})}function Wt(e,t){return U({queryKey:[`session-env`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/env`),enabled:e!==void 0&&t,refetchInterval:K(5e3),refetchIntervalInBackground:!1})}function Gt(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/sessions/${e}/env`),onSuccess:(t,n)=>{e.setQueryData([`session-env`,n],{vars:[]})}})}var J=r(`puddle.profile-id`);function Kt(){let e=(0,o.useSyncExternalStore)(J.subscribe,J.get);return e!==null&&/^[0-9a-f]{10}$/.test(e)?e:null}function qt(e){window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),J.set(e)}var Jt=[`Layout & tabs`,`Editor`,`Left sidebar`,`Right sidebar`],Y=[{id:`palette.toggle`,label:`Command palette`,group:`Layout & tabs`,defaultBinding:`meta+KeyK`},{id:`tab.close`,label:`Close current tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyW`,desktopBinding:`meta+KeyW`},{id:`tab.reopen`,label:`Reopen last closed tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyT`,desktopBinding:`shift+meta+KeyT`},{id:`tab.newUntitled`,label:`New untitled file`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyN`,desktopBinding:`meta+KeyN`},{id:`tab.next`,label:`Next tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketRight`,desktopBinding:`ctrl+Tab`},{id:`tab.prev`,label:`Previous tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketLeft`,desktopBinding:`ctrl+shift+Tab`},{id:`window.close`,label:`Close window`,group:`Layout & tabs`,defaultBinding:`meta+KeyW`,desktopBinding:`shift+meta+KeyW`},{id:`sidebar.left`,label:`Toggle left sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Comma`,desktopBinding:`meta+KeyB`},{id:`sidebar.right`,label:`Toggle right sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Period`,desktopBinding:`shift+meta+KeyB`},{id:`editor.save`,label:`Save`,group:`Editor`,defaultBinding:`meta+KeyS`,editor:!0},{id:`editor.wordWrap`,label:`Toggle word wrap`,group:`Editor`,defaultBinding:`alt+KeyZ`,editor:!0},{id:`nav.files`,label:`Open Files`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyE`},{id:`nav.search`,label:`Open Search`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyF`},{id:`nav.changes`,label:`Open Changes`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyV`},{id:`nav.worktrees`,label:`Open Worktrees`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyB`},{id:`session.newAgent`,label:`New agent`,group:`Right sidebar`,defaultBinding:`ctrl+alt+Backquote`,desktopBinding:`meta+KeyT`},{id:`session.newTerminal`,label:`New terminal`,group:`Right sidebar`,defaultBinding:`ctrl+Backquote`},{id:`scratchpad.toggle`,label:`Toggle Scratchpad`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyS`},{id:`layouts.toggle`,label:`Toggle Layouts`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyL`}],Yt=new Map(Y.map(e=>[e.id,e])),Xt=typeof window<`u`&&s()!==void 0;function Zt(e,t=Xt){return t&&e.desktopBinding?e.desktopBinding:e.defaultBinding}function Qt(e){let t=e.code;if(!t||/^(Control|Alt|Shift|Meta)(Left|Right)$/.test(t))return null;let n=[];return e.ctrlKey&&n.push(`ctrl`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`meta`),n.length===0?null:(n.push(t),n.join(`+`))}var $t={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`},en={Comma:`,`,Period:`.`,Backquote:"`",Slash:`/`,Backslash:`\\`,Minus:`-`,Equal:`=`,Space:`␣`,Enter:`↵`,Escape:`Esc`,Tab:`⇥`,BracketLeft:`[`,BracketRight:`]`};function tn(e){return e.startsWith(`Key`)?e.slice(3):e.startsWith(`Digit`)?e.slice(5):en[e]??e}function nn(e){if(!e)return`—`;let t=e.split(`+`),n=t.pop()??``;return t.map(e=>$t[e]??e).join(``)+tn(n)}var X=new Map;function rn(e,t){return X.set(e,t),()=>{X.get(e)===t&&X.delete(e)}}var an=e=>X.get(e),on=e=>Yt.get(e);function sn(e,t){return e.id===`editor.save`||t&&e.editor!==!0}var cn={},Z=new Set,Q=ln();function ln(){let e={};for(let t of Y)e[t.id]=cn[t.id]||Zt(t);return e}function un(e){cn=e??{},Q=ln(),Z.forEach(e=>e())}var dn=e=>Q[e]??``;function fn(e){for(let[t,n]of Object.entries(Q))if(n===e)return t}function pn(e){return nn(mn()[e]??``)}function mn(){return(0,o.useSyncExternalStore)(e=>(Z.add(e),()=>Z.delete(e)),()=>Q)}function $(e,t,n){return!e||e.major>t||e.major===t&&e.minor>=n}var hn=e=>e!==void 0&&$(e,21,3),gn=e=>e!==void 0&&$(e,24,5);function _n(e){return $(e,17,1)}function vn(e){return $(e,17,3)}var yn=e=>e!==void 0&&$(e,24,4),bn=e=>$(e,10,3),xn=e=>$(e,12,3),Sn=e=>$(e,12,4),Cn=e=>$(e,15,3),wn=e=>e!==void 0&&$(e,16,3),Tn=e=>$(e,16,4),En=e=>$(e,14,1),Dn=e=>e!==void 0&&$(e,24,6),On=e=>e!==void 0&&$(e,25,1),kn=e=>e!==void 0&&$(e,25,2),An=e=>e!==void 0&&$(e,25,3);export{_t as $,w as $t,J as A,Wt as At,dt as B,De as Bt,an as C,at as Ct,un as D,Je as Dt,rn as E,it as Et,ut as F,W as Ft,vt as G,P as Gt,Lt as H,ve as Ht,Ht as I,U as It,Ct as J,C as Jt,At as K,N as Kt,Ze as L,He as Lt,Kt as M,Qe as Mt,tt as N,Rt as Nt,Zt as O,Tt as Ot,Vt as P,K as Pt,ct as Q,h as Qt,qe as R,ke as Rt,on as S,Ye as St,sn as T,rt as Tt,Gt as U,ge as Ut,et as V,Se as Vt,nt as W,_e as Wt,Et as X,S as Xt,bt as Y,ee as Yt,Nt as Z,x as Zt,Y as _,xt as _t,wn as a,c as an,St as at,Qt as b,We as bt,hn as c,kt as ct,kn as d,ht as dt,y as en,ot as et,An as f,Bt as ft,bn as g,wt as gt,Cn as h,pt as ht,_n as i,s as in,st as it,qt as j,Ut as jt,pn as k,Pt as kt,Tn as l,yt as lt,gn as m,mt,yn as n,u as nn,gt as nt,En as o,It as ot,Dn as p,jt as pt,ft as q,g as qt,vn as r,l as rn,Ot as rt,Sn as s,lt as st,xn as t,k as tn,Mt as tt,On as u,Ft as ut,Jt as v,Dt as vt,dn as w,zt as wt,nn as x,Xe as xt,fn as y,Ge as yt,Ke as z,H as zt};
|
package/dist/public/assets/{scroll-restoration-hslkZdX5.js → scroll-restoration-DTBzWrDT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{a as n}from"./auth-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{a as n}from"./auth-ngM0Ffss.js";var r=e(t(),1),i=(0,r.createContext)(``);function a(e,t){let a=(0,r.useContext)(i);return n(JSON.stringify([a,e,t]))}var o=class{limit;entries=new Map;constructor(e=500){this.limit=e}get(e){let t=this.entries.get(e);return t!==void 0&&(this.entries.delete(e),this.entries.set(e,t)),t}set(e,t){for(this.entries.delete(e),this.entries.set(e,t);this.entries.size>this.limit;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}},s=new o;function c(e,t,n,r=()=>!0){let i=s.get(n),a=-1,o=-1,c=()=>({height:Math.max(0,e.scrollHeight-e.clientHeight),width:Math.max(0,e.scrollWidth-e.clientWidth)}),l=()=>{!r()||!e.clientHeight||!e.clientWidth||({height:a,width:o}=c(),i&&(e.scrollTop=i.height?i.top/i.height*a:0,e.scrollLeft=i.width?i.left/i.width*o:0))},u=()=>{if(!r()||!e.clientHeight||!e.clientWidth)return;let t=c();({height:a,width:o}=t),i={top:e.scrollTop,left:e.scrollLeft,...t},s.set(n,i)},d=()=>{if(!r()||!e.clientHeight||!e.clientWidth)return;let t=c();if(t.height!==a||t.width!==o){l();return}u()};l(),e.addEventListener(`scroll`,d,{passive:!0});let f=new ResizeObserver(l);f.observe(e),f.observe(t);let p=new MutationObserver(l);return p.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-scroll-ready`]}),{capture:u,dispose:()=>{d(),e.removeEventListener(`scroll`,d),f.disconnect(),p.disconnect()}}}export{a as i,o as n,i as r,c as t};
|