zdashboard 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +153 -22
- package/dist/cli.js.map +1 -1
- package/dist/web/assets/{CodeViewer-yUtAi1hT.js → CodeViewer-B7R0ZVR6.js} +51 -51
- package/dist/web/assets/FileIcon-gTgtllQ_.js +1 -0
- package/dist/web/assets/FilterPills-BG7PY8Ts.js +1 -0
- package/dist/web/assets/Sidebar-BFf7prry.js +1 -0
- package/dist/web/assets/Sidebar-Bv_jdwYG.js +1 -0
- package/dist/web/assets/Workspace-B7_x75Fc.js +1 -0
- package/dist/web/assets/Workspace-BimPBKII.js +1 -0
- package/dist/web/assets/Workspace-D42j59Cc.js +5 -0
- package/dist/web/assets/Workspace-DXhpVGbA.js +1 -0
- package/dist/web/assets/fetchJson-D-dWeu1j.js +1 -0
- package/dist/web/assets/index-B4hHecQs.js +316 -0
- package/dist/web/assets/index-Bfe1AHR3.css +1 -0
- package/dist/web/assets/usePluginData-Dhhi3YQs.js +1 -0
- package/dist/web/assets/vendor-react-CDaMBvJU.js +40 -0
- package/dist/web/assets/vendor-ui-dpI0b3Ao.js +42 -0
- package/dist/web/assets/web-B3RuriWk.js +2 -0
- package/dist/web/assets/web-BJPSRqva.js +2 -0
- package/dist/web/assets/web-BugMZG5x.js +2 -0
- package/dist/web/assets/web-D-lPF0OX.js +2 -0
- package/dist/web/index.html +25 -2
- package/package.json +1 -1
- package/dist/web/assets/FileIcon-DCL9OD6I.js +0 -1
- package/dist/web/assets/FilterPills-BD2vsIx2.js +0 -1
- package/dist/web/assets/Sidebar-CsmNxVjL.js +0 -1
- package/dist/web/assets/Sidebar-DxeR1Shk.js +0 -1
- package/dist/web/assets/Workspace-BGj3n613.js +0 -1
- package/dist/web/assets/Workspace-CUepnOlM.js +0 -1
- package/dist/web/assets/Workspace-D0rSzljF.js +0 -1
- package/dist/web/assets/Workspace-DUK4Lm-v.js +0 -5
- package/dist/web/assets/index--t_ijYil.css +0 -1
- package/dist/web/assets/index-veTBv7Qv.js +0 -7816
- package/dist/web/assets/usePluginData-mjHueOjf.js +0 -1
- package/dist/web/assets/web-BODcUPmi.js +0 -2
- package/dist/web/assets/web-CsCyTuDw.js +0 -2
- package/dist/web/assets/web-D6VGQFbH.js +0 -2
- package/dist/web/assets/web-DIZjnUb4.js +0 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var mr=e=>{throw TypeError(e)};var hr=(e,t,n)=>t.has(e)||mr("Cannot "+n);var re=(e,t,n)=>(hr(e,t,"read from private field"),n?n.call(e):t.get(e)),vr=(e,t,n)=>t.has(e)?mr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),cn=(e,t,n,r)=>(hr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{r as l,R as lt,a as R,v as js,j as S,b as Bn}from"./vendor-react-CDaMBvJU.js";var $s=Object.defineProperty,Wn=(e,t)=>$s(e,"name",{value:t,configurable:!0});function xn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Wn(xn,"setRef");function zr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=xn(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():xn(e[o],null)}}}}Wn(zr,"composeRefs");function Q(...e){return l.useCallback(zr(...e),e)}Wn(Q,"useComposedRefs");var Bs=Object.defineProperty,be=(e,t)=>Bs(e,"name",{value:t,configurable:!0});function je(e){const t=l.forwardRef((n,r)=>{let{children:o,...s}=n,i=null,a=!1;const u=[];Cn(o)&&typeof Mt=="function"&&(o=Mt(o._payload)),l.Children.forEach(o,p=>{var c;if(Gr(p)){a=!0;const v=p;let m="child"in v.props?v.props.child:v.props.children;Cn(m)&&typeof Mt=="function"&&(m=Mt(m._payload)),i=Ws(v,m),u.push((c=i==null?void 0:i.props)==null?void 0:c.children)}else u.push(p)}),i?i=l.cloneElement(i,void 0,u):!a&&l.Children.count(o)===1&&l.isValidElement(o)&&(i=o);const d=i?Kr(i):void 0,h=Q(r,d);if(!i){if(o||o===0)throw new Error(a?Vs(e):zs(e));return o}const f=Yr(s,i.props??{});return i.type!==l.Fragment&&(f.ref=r?h:d),l.cloneElement(i,f)});return t.displayName=`${e}.Slot`,t}be(je,"createSlot");var Eu=je("Slot"),Vr=Symbol.for("radix.slottable");function Ur(e){const t=be(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Vr,t}be(Ur,"createSlottable");var Ws=be((e,t)=>{if("child"in e.props){const n=e.props.child;return l.isValidElement(n)?l.cloneElement(n,void 0,e.props.children(n.props.children)):null}return l.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Yr(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const u=s(...a);return o(...a),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}be(Yr,"mergeProps");function Kr(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}be(Kr,"getElementRef");function Gr(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vr}be(Gr,"isSlottable");var Hs=Symbol.for("react.lazy");function Cn(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Hs&&"_payload"in e&&Xr(e._payload)}be(Cn,"isLazyComponent");function Xr(e){return typeof e=="object"&&e!==null&&"then"in e}be(Xr,"isPromiseLike");var zs=be(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Vs=be(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Mt=lt[" use ".trim().toString()],Us=e=>{switch(e){case"success":return Gs;case"info":return qs;case"warning":return Xs;case"error":return Zs;default:return null}},Ys=Array(12).fill(0),Ks=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},Ys.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Gs=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Xs=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),qs=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Zs=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Qs=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Js=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},En=1,ei=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:En++,s=this.toasts.find(a=>a.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async u=>{if(s=["resolve",u],R.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(ni(u)&&!u.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:d,description:h})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(u):t.success,h=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:d,description:h})}}).catch(async u=>{if(s=["reject",u],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(u):t.error,h=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:d,description:h})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),a=()=>new Promise((u,d)=>i.then(()=>s[0]==="reject"?d(s[1]):u(s[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||En++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},se=new ei,ti=(e,t)=>{let n=(t==null?void 0:t.id)||En++;return se.addToast({title:e,...t,id:n}),n},ni=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ri=ti,oi=()=>se.toasts,si=()=>se.getActiveToasts(),Su=Object.assign(ri,{success:se.success,info:se.info,warning:se.warning,error:se.error,custom:se.custom,message:se.message,promise:se.promise,dismiss:se.dismiss,loading:se.loading},{getHistory:oi,getToasts:si});function ii(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}ii(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
2
|
+
`);function At(e){return e.label!==void 0}var ai=3,ci="32px",li="16px",gr=4e3,ui=356,di=14,fi=20,pi=200;function we(...e){return e.filter(Boolean).join(" ")}function mi(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var hi=e=>{var t,n,r,o,s,i,a,u,d,h,f;let{invert:p,toast:c,unstyled:v,interacting:m,setHeights:g,visibleToasts:y,heights:w,index:b,toasts:x,expanded:E,removeToast:C,defaultRichColors:P,closeButton:I,style:M,cancelButtonStyle:_,actionButtonStyle:B,className:A="",descriptionClassName:k="",duration:F,position:Y,gap:W,loadingIcon:D,expandByDefault:j,classNames:O,icons:T,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:L}=e,[$,V]=R.useState(null),[X,pe]=R.useState(null),[z,ce]=R.useState(!1),[me,ne]=R.useState(!1),[he,Qe]=R.useState(!1),[ht,St]=R.useState(!1),[Rt,Je]=R.useState(!1),[Pt,vt]=R.useState(0),[on,Tt]=R.useState(0),ze=R.useRef(c.duration||F||gr),Ve=R.useRef(null),Ue=R.useRef(null),Ms=b===0,As=b+1<=y,le=c.type,et=c.dismissible!==!1,Is=c.className||"",_s=c.descriptionClassName||"",Ot=R.useMemo(()=>w.findIndex(N=>N.toastId===c.id)||0,[w,c.id]),Ds=R.useMemo(()=>{var N;return(N=c.closeButton)!=null?N:I},[c.closeButton,I]),ur=R.useMemo(()=>c.duration||F||gr,[c.duration,F]),sn=R.useRef(0),tt=R.useRef(0),dr=R.useRef(0),nt=R.useRef(null),[Ns,ks]=Y.split("-"),fr=R.useMemo(()=>w.reduce((N,U,G)=>G>=Ot?N:N+U.height,0),[w,Ot]),pr=Js(),Ls=c.invert||p,an=le==="loading";tt.current=R.useMemo(()=>Ot*W+fr,[Ot,fr]),R.useEffect(()=>{ze.current=ur},[ur]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{let N=Ue.current;if(N){let U=N.getBoundingClientRect().height;return Tt(U),g(G=>[{toastId:c.id,height:U,position:c.position},...G]),()=>g(G=>G.filter(ve=>ve.toastId!==c.id))}},[g,c.id]),R.useLayoutEffect(()=>{if(!z)return;let N=Ue.current,U=N.style.height;N.style.height="auto";let G=N.getBoundingClientRect().height;N.style.height=U,Tt(G),g(ve=>ve.find(ge=>ge.toastId===c.id)?ve.map(ge=>ge.toastId===c.id?{...ge,height:G}:ge):[{toastId:c.id,height:G,position:c.position},...ve])},[z,c.title,c.description,g,c.id]);let De=R.useCallback(()=>{ne(!0),vt(tt.current),g(N=>N.filter(U=>U.toastId!==c.id)),setTimeout(()=>{C(c)},pi)},[c,C,g,tt]);R.useEffect(()=>{if(c.promise&&le==="loading"||c.duration===1/0||c.type==="loading")return;let N;return E||m||L&&pr?(()=>{if(dr.current<sn.current){let U=new Date().getTime()-sn.current;ze.current=ze.current-U}dr.current=new Date().getTime()})():ze.current!==1/0&&(sn.current=new Date().getTime(),N=setTimeout(()=>{var U;(U=c.onAutoClose)==null||U.call(c,c),De()},ze.current)),()=>clearTimeout(N)},[E,m,c,le,L,pr,De]),R.useEffect(()=>{c.delete&&De()},[De,c.delete]);function Fs(){var N,U,G;return T!=null&&T.loading?R.createElement("div",{className:we(O==null?void 0:O.loader,(N=c==null?void 0:c.classNames)==null?void 0:N.loader,"sonner-loader"),"data-visible":le==="loading"},T.loading):D?R.createElement("div",{className:we(O==null?void 0:O.loader,(U=c==null?void 0:c.classNames)==null?void 0:U.loader,"sonner-loader"),"data-visible":le==="loading"},D):R.createElement(Ks,{className:we(O==null?void 0:O.loader,(G=c==null?void 0:c.classNames)==null?void 0:G.loader),visible:le==="loading"})}return R.createElement("li",{tabIndex:0,ref:Ue,className:we(A,Is,O==null?void 0:O.toast,(t=c==null?void 0:c.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[le],(n=c==null?void 0:c.classNames)==null?void 0:n[le]),"data-sonner-toast":"","data-rich-colors":(r=c.richColors)!=null?r:P,"data-styled":!(c.jsx||c.unstyled||v),"data-mounted":z,"data-promise":!!c.promise,"data-swiped":Rt,"data-removed":me,"data-visible":As,"data-y-position":Ns,"data-x-position":ks,"data-index":b,"data-front":Ms,"data-swiping":he,"data-dismissible":et,"data-type":le,"data-invert":Ls,"data-swipe-out":ht,"data-swipe-direction":X,"data-expanded":!!(E||j&&z),style:{"--index":b,"--toasts-before":b,"--z-index":x.length-b,"--offset":`${me?Pt:tt.current}px`,"--initial-height":j?"auto":`${on}px`,...M,...c.style},onDragEnd:()=>{Qe(!1),V(null),nt.current=null},onPointerDown:N=>{an||!et||(Ve.current=new Date,vt(tt.current),N.target.setPointerCapture(N.pointerId),N.target.tagName!=="BUTTON"&&(Qe(!0),nt.current={x:N.clientX,y:N.clientY}))},onPointerUp:()=>{var N,U,G,ve;if(ht||!et)return;nt.current=null;let ge=Number(((N=Ue.current)==null?void 0:N.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ne=Number(((U=Ue.current)==null?void 0:U.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ye=new Date().getTime()-((G=Ve.current)==null?void 0:G.getTime()),ye=$==="x"?ge:Ne,ke=Math.abs(ye)/Ye;if(Math.abs(ye)>=fi||ke>.11){vt(tt.current),(ve=c.onDismiss)==null||ve.call(c,c),pe($==="x"?ge>0?"right":"left":Ne>0?"down":"up"),De(),St(!0),Je(!1);return}Qe(!1),V(null)},onPointerMove:N=>{var U,G,ve,ge;if(!nt.current||!et||((U=window.getSelection())==null?void 0:U.toString().length)>0)return;let Ne=N.clientY-nt.current.y,Ye=N.clientX-nt.current.x,ye=(G=e.swipeDirections)!=null?G:mi(Y);!$&&(Math.abs(Ye)>1||Math.abs(Ne)>1)&&V(Math.abs(Ye)>Math.abs(Ne)?"x":"y");let ke={x:0,y:0};$==="y"?(ye.includes("top")||ye.includes("bottom"))&&(ye.includes("top")&&Ne<0||ye.includes("bottom")&&Ne>0)&&(ke.y=Ne):$==="x"&&(ye.includes("left")||ye.includes("right"))&&(ye.includes("left")&&Ye<0||ye.includes("right")&&Ye>0)&&(ke.x=Ye),(Math.abs(ke.x)>0||Math.abs(ke.y)>0)&&Je(!0),(ve=Ue.current)==null||ve.style.setProperty("--swipe-amount-x",`${ke.x}px`),(ge=Ue.current)==null||ge.style.setProperty("--swipe-amount-y",`${ke.y}px`)}},Ds&&!c.jsx?R.createElement("button",{"aria-label":Z,"data-disabled":an,"data-close-button":!0,onClick:an||!et?()=>{}:()=>{var N;De(),(N=c.onDismiss)==null||N.call(c,c)},className:we(O==null?void 0:O.closeButton,(o=c==null?void 0:c.classNames)==null?void 0:o.closeButton)},(s=T==null?void 0:T.close)!=null?s:Qs):null,c.jsx||l.isValidElement(c.title)?c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title:R.createElement(R.Fragment,null,le||c.icon||c.promise?R.createElement("div",{"data-icon":"",className:we(O==null?void 0:O.icon,(i=c==null?void 0:c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Fs():null,c.type!=="loading"?c.icon||(T==null?void 0:T[le])||Us(le):null):null,R.createElement("div",{"data-content":"",className:we(O==null?void 0:O.content,(a=c==null?void 0:c.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:we(O==null?void 0:O.title,(u=c==null?void 0:c.classNames)==null?void 0:u.title)},typeof c.title=="function"?c.title():c.title),c.description?R.createElement("div",{"data-description":"",className:we(k,_s,O==null?void 0:O.description,(d=c==null?void 0:c.classNames)==null?void 0:d.description)},typeof c.description=="function"?c.description():c.description):null),l.isValidElement(c.cancel)?c.cancel:c.cancel&&At(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||_,onClick:N=>{var U,G;At(c.cancel)&&et&&((G=(U=c.cancel).onClick)==null||G.call(U,N),De())},className:we(O==null?void 0:O.cancelButton,(h=c==null?void 0:c.classNames)==null?void 0:h.cancelButton)},c.cancel.label):null,l.isValidElement(c.action)?c.action:c.action&&At(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||B,onClick:N=>{var U,G;At(c.action)&&((G=(U=c.action).onClick)==null||G.call(U,N),!N.defaultPrevented&&De())},className:we(O==null?void 0:O.actionButton,(f=c==null?void 0:c.classNames)==null?void 0:f.actionButton)},c.action.label):null))};function yr(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function vi(e,t){let n={};return[e,t].forEach((r,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",a=s?li:ci;function u(d){["top","right","bottom","left"].forEach(h=>{n[`${i}-${h}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?u(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=a:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):u(a)}),n}var Ru=l.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:a,offset:u,mobileOffset:d,theme:h="light",richColors:f,duration:p,style:c,visibleToasts:v=ai,toastOptions:m,dir:g=yr(),gap:y=di,loadingIcon:w,icons:b,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E}=e,[C,P]=R.useState([]),I=R.useMemo(()=>Array.from(new Set([r].concat(C.filter(L=>L.position).map(L=>L.position)))),[C,r]),[M,_]=R.useState([]),[B,A]=R.useState(!1),[k,F]=R.useState(!1),[Y,W]=R.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=R.useRef(null),j=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),T=R.useRef(!1),Z=R.useCallback(L=>{P($=>{var V;return(V=$.find(X=>X.id===L.id))!=null&&V.delete||se.dismiss(L.id),$.filter(({id:X})=>X!==L.id)})},[]);return R.useEffect(()=>se.subscribe(L=>{if(L.dismiss){P($=>$.map(V=>V.id===L.id?{...V,delete:!0}:V));return}setTimeout(()=>{js.flushSync(()=>{P($=>{let V=$.findIndex(X=>X.id===L.id);return V!==-1?[...$.slice(0,V),{...$[V],...L},...$.slice(V+1)]:[L,...$]})})})}),[]),R.useEffect(()=>{if(h!=="system"){W(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:$})=>{W($?"dark":"light")})}catch{L.addListener(({matches:V})=>{try{W(V?"dark":"light")}catch(X){console.error(X)}})}},[h]),R.useEffect(()=>{C.length<=1&&A(!1)},[C]),R.useEffect(()=>{let L=$=>{var V,X;o.every(pe=>$[pe]||$.code===pe)&&(A(!0),(V=D.current)==null||V.focus()),$.code==="Escape"&&(document.activeElement===D.current||(X=D.current)!=null&&X.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[o]),R.useEffect(()=>{if(D.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,T.current=!1)}},[D.current]),R.createElement("section",{ref:t,"aria-label":`${x} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((L,$)=>{var V;let[X,pe]=L.split("-");return C.length?R.createElement("ol",{key:L,dir:g==="auto"?yr():g,tabIndex:-1,ref:D,className:a,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":X,"data-lifted":B&&C.length>1&&!s,"data-x-position":pe,style:{"--front-toast-height":`${((V=M[0])==null?void 0:V.height)||0}px`,"--width":`${ui}px`,"--gap":`${y}px`,...c,...vi(u,d)},onBlur:z=>{T.current&&!z.currentTarget.contains(z.relatedTarget)&&(T.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||T.current||(T.current=!0,O.current=z.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{k||A(!1)},onDragEnd:()=>A(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},C.filter(z=>!z.position&&$===0||z.position===L).map((z,ce)=>{var me,ne;return R.createElement(hi,{key:z.id,icons:b,index:ce,toast:z,defaultRichColors:f,duration:(me=m==null?void 0:m.duration)!=null?me:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ne=m==null?void 0:m.closeButton)!=null?ne:i,interacting:k,position:L,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:Z,toasts:C.filter(he=>he.position==z.position),heights:M.filter(he=>he.position==z.position),setHeights:_,expandByDefault:s,gap:y,loadingIcon:w,expanded:B,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))}),gi=Object.defineProperty,ut=(e,t)=>gi(e,"name",{value:t,configurable:!0}),qr=!!(typeof window<"u"&&window.document&&window.document.createElement);function H(e,t,{checkForDefaultPrevented:n=!0}={}){return ut(function(o){if(e==null||e(o),n===!1||!o||!o.defaultPrevented)return t==null?void 0:t(o)},"handleEvent")}ut(H,"composeEventHandlers");function yi(e){var t;if(!qr)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}ut(yi,"getOwnerWindow");function Sn(e){if(!qr)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}ut(Sn,"getOwnerDocument");function Zr(e,t=!1){const{activeElement:n}=Sn(e);if(!(n!=null&&n.nodeName))return null;if(Qr(n)&&n.contentDocument)return Zr(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=Sn(n).getElementById(r);if(o)return o}}return n}ut(Zr,"getActiveElement");function Qr(e){return e.tagName==="IFRAME"}ut(Qr,"isFrame");var wi=Object.defineProperty,ue=(e,t)=>wi(e,"name",{value:t,configurable:!0});function bi(e,t){const n=l.createContext(t);n.displayName=e+"Context";const r=ue(s=>{const{children:i,...a}=s,u=l.useMemo(()=>a,Object.values(a));return S.jsx(n.Provider,{value:u,children:i})},"Provider");r.displayName=e+"Provider";function o(s,i={}){const{optional:a=!1}=i,u=l.useContext(n);if(u)return u;if(t!==void 0)return t;if(!a)throw new Error(`\`${s}\` must be used within \`${e}\``)}return ue(o,"useContext"),[r,o]}ue(bi,"createContext");function We(e,t=[]){let n=[];function r(s,i){const a=l.createContext(i);a.displayName=s+"Context";const u=n.length;n=[...n,i];const d=ue(f=>{var y;const{scope:p,children:c,...v}=f,m=((y=p==null?void 0:p[e])==null?void 0:y[u])||a,g=l.useMemo(()=>v,Object.values(v));return S.jsx(m.Provider,{value:g,children:c})},"Provider");d.displayName=s+"Provider";function h(f,p,c={}){var y;const{optional:v=!1}=c,m=((y=p==null?void 0:p[e])==null?void 0:y[u])||a,g=l.useContext(m);if(g)return g;if(i!==void 0)return i;if(!v)throw new Error(`\`${f}\` must be used within \`${s}\``)}return ue(h,"useContext"),[d,h]}ue(r,"createContext");const o=ue(()=>{const s=n.map(i=>l.createContext(i));return ue(function(a){const u=(a==null?void 0:a[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])},"useScope")},"createScope");return o.scopeName=e,[r,Jr(o,...t)]}ue(We,"createContextScope");function Jr(...e){const t=e[0];if(e.length===1)return t;const n=ue(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return ue(function(s){const i=r.reduce((a,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...a,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}ue(Jr,"composeContextScopes");var xi=Object.defineProperty,Ci=(e,t)=>xi(e,"name",{value:t,configurable:!0}),Ei=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fe=Ei.reduce((e,t)=>{const n=je(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...a}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(u,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Hn(e,t){e&&Bn.flushSync(()=>e.dispatchEvent(t))}Ci(Hn,"dispatchDiscreteCustomEvent");var Si=Object.defineProperty,Ri=(e,t)=>Si(e,"name",{value:t,configurable:!0});function Me(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}Ri(Me,"useCallbackRef");var Pi=Object.defineProperty,J=(e,t)=>Pi(e,"name",{value:t,configurable:!0}),Rn="dismissableLayer.update",Ti="dismissableLayer.pointerDownOutside",Oi="dismissableLayer.focusOutside",wr,eo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),to=l.forwardRef(J(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:u,onDismiss:d,...h}=t,f=l.useContext(eo),[p,c]=l.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=l.useState({}),g=Q(n,c),y=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w?y.indexOf(w):-1,x=p?y.indexOf(p):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,P=l.useRef(!1),I=no(A=>{i==null||i(A),u==null||u(A),A.defaultPrevented||d==null||d()},{ownerDocument:v,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:l.useCallback(A=>{if(!(A instanceof Node))return!1;const k=[...f.branches].some(F=>F.contains(A));return C&&!k},[f.branches,C])}),M=ro(A=>{if(o&&P.current)return;const k=A.target;[...f.branches].some(Y=>Y.contains(k))||(a==null||a(A),u==null||u(A),A.defaultPrevented||d==null||d())},v),_=p?x===y.length-1:!1,B=Me(A=>{A.key==="Escape"&&(s==null||s(A),!A.defaultPrevented&&d&&(A.preventDefault(),d()))});return l.useEffect(()=>{if(_)return v.addEventListener("keydown",B,{capture:!0}),()=>v.removeEventListener("keydown",B,{capture:!0})},[v,_,B]),l.useEffect(()=>{if(p)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(wr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Pn(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(v.body.style.pointerEvents=wr))}},[p,v,r,f]),l.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Pn())},[p,f]),l.useEffect(()=>{const A=J(()=>m({}),"handleUpdate");return document.addEventListener(Rn,A),()=>document.removeEventListener(Rn,A)},[]),S.jsx(fe.div,{...h,ref:g,style:{pointerEvents:E?C?"auto":"none":void 0,...t.style},onFocusCapture:H(t.onFocusCapture,M.onFocusCapture),onBlurCapture:H(t.onBlurCapture,M.onBlurCapture),onPointerDownCapture:H(t.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function Mi(){const e=l.useContext(eo),[t,n]=l.useState(null);return l.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}J(Mi,"useDismissableLayerSurface");var Ai=J(()=>!0,"IS_TRUE");function no(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=Ai}=t,a=Me(e),u=l.useRef(!1),d=l.useRef(!1),h=l.useRef(new Map),f=l.useRef(()=>{});return l.useEffect(()=>{function p(){d.current=!1,o.current=!1,h.current.clear()}J(p,"resetOutsideInteraction");function c(){return Array.from(h.current.values()).some(Boolean)}J(c,"isOutsideInteractionIntercepted");function v(b){if(!d.current)return;const x=b.target;x instanceof Node&&[...s].some(C=>C.contains(x))||h.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{d.current&&f.current()},0)}J(v,"handleInteractionCapture");function m(b){d.current&&h.current.set(b.type,!1)}J(m,"handleInteractionBubble");const g=J(b=>{if(b.target&&!u.current){let x=function(){n.removeEventListener("click",f.current);const C=c();p(),C||zn(Ti,a,E,{discrete:!0})};if(J(x,"handleAndDispatchPointerDownOutsideEvent"),!i(b.target)){n.removeEventListener("click",f.current),p(),u.current=!1;return}const E={originalEvent:b};d.current=!0,o.current=r&&b.button===0,h.current.clear(),!r||b.button!==0?x():(n.removeEventListener("click",f.current),f.current=x,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),p();u.current=!1},"handlePointerDown"),y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of y)n.addEventListener(b,v,!0),n.addEventListener(b,m);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",g),n.removeEventListener("click",f.current);for(const b of y)n.removeEventListener(b,v,!0),n.removeEventListener(b,m)}},[n,a,r,o,s,i]),{onPointerDownCapture:J(()=>u.current=!0,"onPointerDownCapture")}}J(no,"usePointerDownOutside");function ro(e,t=globalThis==null?void 0:globalThis.document){const n=Me(e),r=l.useRef(!1);return l.useEffect(()=>{const o=J(s=>{s.target&&!r.current&&zn(Oi,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:J(()=>r.current=!0,"onFocusCapture"),onBlurCapture:J(()=>r.current=!1,"onBlurCapture")}}J(ro,"useFocusOutside");function Pn(){const e=new CustomEvent(Rn);document.dispatchEvent(e)}J(Pn,"dispatchUpdate");function zn(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Hn(o,s):o.dispatchEvent(s)}J(zn,"handleAndDispatchCustomEvent");var de=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Ii=Object.defineProperty,_i=(e,t)=>Ii(e,"name",{value:t,configurable:!0}),Di=lt[" useId ".trim().toString()]||(()=>{}),Ni=0;function gt(e){const[t,n]=l.useState(Di());return de(()=>{e||n(r=>r??String(Ni++))},[e]),e||(t?`radix-${t}`:"")}_i(gt,"useId");const ki=["top","right","bottom","left"],$e=Math.min,Te=Math.max,Wt=Math.round,It=Math.floor,Oe=e=>({x:e,y:e}),Li={left:"right",right:"left",bottom:"top",top:"bottom"};function oo(e,t,n){return Te(e,$e(t,n))}function Ae(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function dt(e){return e.split("-")[1]}function Vn(e){return e==="x"?"y":"x"}function Un(e){return e==="y"?"height":"width"}function Ee(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Yn(e){return Vn(Ee(e))}function Fi(e,t,n){n===void 0&&(n=!1);const r=dt(e),o=Yn(e),s=Un(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ht(i)),[i,Ht(i)]}function ji(e){const t=Ht(e);return[Tn(e),t,Tn(t)]}function Tn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const br=["left","right"],xr=["right","left"],$i=["top","bottom"],Bi=["bottom","top"];function Wi(e,t,n){switch(e){case"top":case"bottom":return n?t?xr:br:t?br:xr;case"left":case"right":return t?$i:Bi;default:return[]}}function Hi(e,t,n,r){const o=dt(e);let s=Wi(Be(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Tn)))),s}function Ht(e){const t=Be(e);return Li[t]+e.slice(t.length)}function zi(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function so(e){return typeof e!="number"?zi(e):{top:e,right:e,bottom:e,left:e}}function zt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Cr(e,t,n){let{reference:r,floating:o}=e;const s=Ee(t),i=Yn(t),a=Un(i),u=Be(t),d=s==="y",h=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let c;switch(u){case"top":c={x:h,y:r.y-o.height};break;case"bottom":c={x:h,y:r.y+r.height};break;case"right":c={x:r.x+r.width,y:f};break;case"left":c={x:r.x-o.width,y:f};break;default:c={x:r.x,y:r.y}}const v=dt(t);return v&&(c[i]+=p*(v==="end"?1:-1)*(n&&d?-1:1)),c}async function Vi(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:c=0}=Ae(t,e),v=so(c),g=a[p?f==="floating"?"reference":"floating":f],y=zt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:u})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),x=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},E=zt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:u}):w);return{top:(y.top-E.top+v.top)/x.y,bottom:(E.bottom-y.bottom+v.bottom)/x.y,left:(y.left-E.left+v.left)/x.x,right:(E.right-y.right+v.right)/x.x}}const Ui=50,Yi=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Vi},u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:f}=Cr(d,r,u),p=r,c=0;const v={};for(let m=0;m<s.length;m++){const g=s[m];if(!g)continue;const{name:y,fn:w}=g,{x:b,y:x,data:E,reset:C}=await w({x:h,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:v,rects:d,platform:a,elements:{reference:e,floating:t}});h=b??h,f=x??f,v[y]={...v[y],...E},C&&c<Ui&&(c++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:h,y:f}=Cr(d,p,u)),m=-1)}return{x:h,y:f,placement:p,strategy:o,middlewareData:v}},Ki=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:u}=t,{element:d,padding:h=0}=Ae(e,t)||{};if(d==null)return{};const f=so(h),p={x:n,y:r},c=Yn(o),v=Un(c),m=await i.getDimensions(d),g=c==="y",y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=s.reference[v]+s.reference[c]-p[c]-s.floating[v],E=p[c]-s.reference[c],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let P=C?C[b]:0;(!P||!await(i.isElement==null?void 0:i.isElement(C)))&&(P=a.floating[b]||s.floating[v]);const I=x/2-E/2,M=P/2-m[v]/2-1,_=$e(f[y],M),B=$e(f[w],M),A=P-m[v]-B,k=P/2-m[v]/2+I,F=oo(_,k,A),Y=!u.arrow&&dt(o)!=null&&k!==F&&s.reference[v]/2-(k<_?_:B)-m[v]/2<0,W=Y?k<_?k-_:k-A:0;return{[c]:p[c]+W,data:{[c]:F,centerOffset:k-F-W,...Y&&{alignmentOffset:W}},reset:Y}}}),Gi=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:u,elements:d}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:c="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=Ae(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Be(o),w=Ee(a),b=Be(a)===a,x=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=p||(b||!m?[Ht(a)]:ji(a)),C=v!=="none";!p&&C&&E.push(...Hi(a,m,v,x));const P=[a,...E],I=await u.detectOverflow(t,g),M=[];let _=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&M.push(I[y]),f){const F=Fi(o,i,x);M.push(I[F[0]],I[F[1]])}if(_=[..._,{placement:o,overflows:M}],!M.every(F=>F<=0)){var B,A;const F=(((B=s.flip)==null?void 0:B.index)||0)+1,Y=P[F];if(Y&&(!(f==="alignment"?w!==Ee(Y):!1)||_.every(j=>Ee(j.placement)===w?j.overflows[0]>0:!0)))return{data:{index:F,overflows:_},reset:{placement:Y}};let W=(A=_.filter(D=>D.overflows[0]<=0).sort((D,j)=>D.overflows[1]-j.overflows[1])[0])==null?void 0:A.placement;if(!W)switch(c){case"bestFit":{var k;const D=(k=_.filter(j=>{if(C){const O=Ee(j.placement);return O===w||O==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(O=>O>0).reduce((O,T)=>O+T,0)]).sort((j,O)=>j[1]-O[1])[0])==null?void 0:k[0];D&&(W=D);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Er(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sr(e){return ki.some(t=>e[t]>=0)}const Xi=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Ae(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Er(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Sr(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Er(i,n.floating);return{data:{escapedOffsets:a,escaped:Sr(a)}}}default:return{}}}}},io=new Set(["left","top"]);async function qi(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Be(n),a=dt(n),u=Ee(n)==="y",d=io.has(i)?-1:1,h=s&&u?-1:1,f=Ae(t,e);let{mainAxis:p,crossAxis:c,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(c=a==="end"?v*-1:v),u?{x:c*h,y:p*d}:{x:p*d,y:c*h}}const Zi=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,u=await qi(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},Qi=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:w=>{let{x:b,y:x}=w;return{x:b,y:x}}},...d}=Ae(e,t),h={x:n,y:r},f=await s.detectOverflow(t,d),p=Ee(o),c=Vn(p);let v=h[c],m=h[p];const g=(w,b)=>oo(b+f[w==="y"?"top":"left"],b,b-f[w==="y"?"bottom":"right"]);i&&(v=g(c,v)),a&&(m=g(p,m));const y=u.fn({...t,[c]:v,[p]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[c]:i,[p]:a}}}}}},Ji=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:s,placement:i,rects:a,middlewareData:u}=t,{offset:d=0,mainAxis:h=!0,crossAxis:f=!0}=Ae(e,t),p={x:o,y:s},c=Ee(i),v=Vn(c);let m=p[v],g=p[c];const y=Ae(d,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(n=y.mainAxis)!=null?n:0,crossAxis:(r=y.crossAxis)!=null?r:0};if(h){const E=v==="y"?"height":"width",C=a.reference[v]-a.floating[E]+w.mainAxis,P=a.reference[v]+a.reference[E]-w.mainAxis;m<C?m=C:m>P&&(m=P)}if(f){var b,x;const E=v==="y"?"width":"height",C=io.has(Be(i)),P=a.reference[c]-a.floating[E]+(C&&((b=u.offset)==null?void 0:b[c])||0)+(C?0:w.crossAxis),I=a.reference[c]+a.reference[E]+(C?0:((x=u.offset)==null?void 0:x[c])||0)-(C?w.crossAxis:0);g<P?g=P:g>I&&(g=I)}return{[v]:m,[c]:g}}}},ea=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=Ae(e,t),u=await o.detectOverflow(t,a),d=Be(n),h=dt(n),f=Ee(n)==="y",{width:p,height:c}=r.floating;let v,m;d==="top"||d==="bottom"?(v=d,m=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=d,v=h==="end"?"top":"bottom");const g=c-u.top-u.bottom,y=p-u.left-u.right,w=$e(c-u[v],g),b=$e(p-u[m],y),x=t.middlewareData.shift,E=!x;let C=w,P=b;x!=null&&x.enabled.x&&(P=y),x!=null&&x.enabled.y&&(C=g),E&&!h&&(f?P=p-2*Te(u.left,u.right):C=c-2*Te(u.top,u.bottom)),await i({...t,availableWidth:P,availableHeight:C});const I=await o.getDimensions(s.floating);return p!==I.width||c!==I.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ft(e){return ao(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _e(e){var t;return(t=(ao(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ao(e){return Yt()?e instanceof Node||e instanceof ie(e).Node:!1}function Se(e){return Yt()?e instanceof Element||e instanceof ie(e).Element:!1}function He(e){return Yt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Rr(e){return!Yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function Kt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Re(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ta(e){return/^(table|td|th)$/.test(ft(e))}function Gt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const na=/transform|translate|scale|rotate|perspective|filter/,ra=/paint|layout|strict|content/,Ke=e=>!!e&&e!=="none";let ln;function Kn(e){const t=Se(e)?Re(e):e;return Ke(t.transform)||Ke(t.translate)||Ke(t.scale)||Ke(t.rotate)||Ke(t.perspective)||!Gn()&&(Ke(t.backdropFilter)||Ke(t.filter))||na.test(t.willChange||"")||ra.test(t.contain||"")}function oa(e){let t=Ge(e);for(;He(t)&&!yt(t);){if(Kn(t))return t;if(Gt(t))return null;t=Ge(t)}return null}function Gn(){return ln==null&&(ln=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ln}function yt(e){return/^(html|body|#document)$/.test(ft(e))}function Re(e){return ie(e).getComputedStyle(e)}function Xt(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ge(e){if(ft(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rr(e)&&e.host||_e(e);return Rr(t)?t.host:t}function co(e){const t=Ge(e);return yt(t)?(e.ownerDocument||e).body:He(t)&&Kt(t)?t:co(t)}function wt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=co(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ie(o);if(s){const a=On(i);return t.concat(i,i.visualViewport||[],Kt(o)?o:[],a&&n?wt(a):[])}else return t.concat(o,wt(o,[],n))}function On(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lo(e){const t=Re(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=He(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Wt(n)!==s||Wt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Xn(e){return Se(e)?e:e.contextElement}function at(e){const t=Xn(e);if(!He(t))return Oe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=lo(t);let i=(s?Wt(n.width):n.width)/r,a=(s?Wt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const sa=Oe(0);function uo(e){const t=ie(e);return!Gn()||!t.visualViewport?sa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ia(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ie(e)}function Xe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Xn(e);let i=Oe(1);t&&(r?Se(r)&&(i=at(r)):i=at(e));const a=ia(s,n,r)?uo(s):Oe(0);let u=(o.left+a.x)/i.x,d=(o.top+a.y)/i.y,h=o.width/i.x,f=o.height/i.y;if(s&&r){const p=ie(s),c=Se(r)?ie(r):r;let v=p,m=On(v);for(;m&&c!==v;){const g=at(m),y=m.getBoundingClientRect(),w=Re(m),b=y.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,x=y.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,h*=g.x,f*=g.y,u+=b,d+=x,v=ie(m),m=On(v)}}return zt({width:h,height:f,x:u,y:d})}function qt(e,t){const n=Xt(e).scrollLeft;return t?t.left+n:Xe(_e(e)).left+n}function fo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function aa(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=_e(r),a=t?Gt(t.floating):!1;if(r===i||a&&s)return n;let u={scrollLeft:0,scrollTop:0},d=Oe(1);const h=Oe(0),f=He(r);if((f||!s)&&((ft(r)!=="body"||Kt(i))&&(u=Xt(r)),f)){const c=Xe(r);d=at(r),h.x=c.x+r.clientLeft,h.y=c.y+r.clientTop}const p=i&&!f&&!s?fo(i,u):Oe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+p.x,y:n.y*d.y-u.scrollTop*d.y+h.y+p.y}}function ca(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function la(e){const t=Xt(e),n=e.ownerDocument.body,r=Te(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Te(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+qt(e);const i=-t.scrollTop;return Re(n).direction==="rtl"&&(s+=Te(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:s,y:i}}const ua=25;function da(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",o=ie(e),s=_e(e),i=o.visualViewport;let a=s.clientWidth,u=s.clientHeight,d=0,h=0;if(i){const p=!Gn()||t==="fixed";r?p||(d=-i.offsetLeft,h=-i.offsetTop):(a=i.width,u=i.height,p&&(d=i.offsetLeft,h=i.offsetTop))}if(qt(s)<=0){const p=s.ownerDocument,c=p.body,v=getComputedStyle(c),m=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,g=Math.abs(s.clientWidth-c.clientWidth-m),y=getComputedStyle(s).scrollbarGutter==="stable both-edges"?g/2:g;y<=ua&&(a-=y)}return{width:a,height:u,x:d,y:h}}function fa(e,t){const n=Xe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=at(e),i=e.clientWidth*s.x,a=e.clientHeight*s.y,u=o*s.x,d=r*s.y;return{width:i,height:a,x:u,y:d}}function Pr(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=da(e,n,t);else if(t==="document")r=la(_e(e));else if(Se(t))r=fa(t,n);else{const o=uo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zt(r)}function pa(e,t){const n=t.get(e);if(n)return n;let r=wt(e,[],!1).filter(a=>Se(a)&&ft(a)!=="body"),o=null;const s=Re(e).position==="fixed";let i=s?Ge(e):e;for(;Se(i)&&!yt(i);){const a=Re(i),u=Kn(i),d=o?o.position:s?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&a.position==="static")?r=r.filter(f=>f!==i):o=a,i=Ge(i)}return t.set(e,r),r}function ma(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Gt(t)?[]:pa(t,this._c):[].concat(n),r],a=Pr(t,i[0],o);let u=a.top,d=a.right,h=a.bottom,f=a.left;for(let p=1;p<i.length;p++){const c=Pr(t,i[p],o);u=Te(c.top,u),d=$e(c.right,d),h=$e(c.bottom,h),f=Te(c.left,f)}return{width:d-f,height:h-u,x:f,y:u}}function ha(e){const{width:t,height:n}=lo(e);return{width:t,height:n}}function va(e,t,n){const r=He(t),o=_e(t),s=n==="fixed",i=Xe(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const u=Oe(0);if((r||!s)&&((ft(t)!=="body"||Kt(o))&&(a=Xt(t)),r)){const p=Xe(t,!0,s,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}!r&&o&&(u.x=qt(o));const d=o&&!r&&!s?fo(o,a):Oe(0),h=i.left+a.scrollLeft-u.x-d.x,f=i.top+a.scrollTop-u.y-d.y;return{x:h,y:f,width:i.width,height:i.height}}function un(e){return Re(e).position==="static"}function Tr(e,t){if(!He(e)||Re(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _e(e)===n&&(n=n.ownerDocument.body),n}function po(e,t){const n=ie(e);if(Gt(e))return n;if(!He(e)){let o=Ge(e);for(;o&&!yt(o);){if(Se(o)&&!un(o))return o;o=Ge(o)}return n}let r=Tr(e,t);for(;r&&ta(r)&&un(r);)r=Tr(r,t);return r&&yt(r)&&un(r)&&!Kn(r)?n:r||oa(e)||n}const ga=async function(e){const t=this.getOffsetParent||po,n=this.getDimensions,r=await n(e.floating);return{reference:va(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ya(e){return Re(e).direction==="rtl"}const wa={convertOffsetParentRelativeRectToViewportRelativeRect:aa,getDocumentElement:_e,getClippingRect:ma,getOffsetParent:po,getElementRects:ga,getClientRects:ca,getDimensions:ha,getScale:at,isElement:Se,isRTL:ya};function mo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ba(e,t,n){let r=null,o;const s=_e(e);function i(){var h;clearTimeout(o),(h=r)==null||h.disconnect(),r=null}function a(h,f){h===void 0&&(h=!1),f===void 0&&(f=1),i();const p=e.getBoundingClientRect(),{left:c,top:v,width:m,height:g}=p;if(h||t(),!m||!g)return;const y=It(v),w=It(s.clientWidth-(c+m)),b=It(s.clientHeight-(v+g)),x=It(c),C={rootMargin:-y+"px "+-w+"px "+-b+"px "+-x+"px",threshold:Te(0,$e(1,f))||1};let P=!0;function I(M){const _=M[0].intersectionRatio;if(!mo(p,e.getBoundingClientRect()))return a();if(_!==f){if(!P)return a();_?a(!1,_):o=setTimeout(()=>{a(!1,1e-7)},1e3)}P=!1}try{r=new IntersectionObserver(I,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(I,C)}r.observe(e)}const u=ie(e),d=()=>a(n);return u.addEventListener("resize",d),a(!0),()=>{u.removeEventListener("resize",d),i()}}function xa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Xn(e),h=o||s?[...d?wt(d):[],...t?wt(t):[]]:[];h.forEach(y=>{o&&y.addEventListener("scroll",n),s&&y.addEventListener("resize",n)});const f=d&&a?ba(d,n,s):null;let p=-1,c=null;i&&(c=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&c&&t&&(c.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=c)==null||b.observe(t)})),n()}),d&&!u&&c.observe(d),t&&c.observe(t));let v,m=u?Xe(e):null;u&&g();function g(){const y=Xe(e);m&&!mo(m,y)&&n(),m=y,v=requestAnimationFrame(g)}return n(),()=>{var y;h.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(y=c)==null||y.disconnect(),c=null,u&&cancelAnimationFrame(v)}}const Ca=Zi,Ea=Qi,Sa=Gi,Ra=ea,Pa=Xi,Or=Ki,Ta=Ji,Oa=(e,t,n)=>{const r=new Map,o=n??{},s={...wa,...o.platform,_c:r};return Yi(e,t,{...o,platform:s})};var Ma=typeof document<"u",Aa=function(){},Ft=Ma?l.useLayoutEffect:Aa;function Vt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Vt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ho(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mr(e,t){const n=ho(e);return Math.round(t*n)/n}function dn(e){const t=l.useRef(e);return Ft(()=>{t.current=e}),t}function Ia(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:u,open:d}=e,[h,f]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,c]=l.useState(r);Vt(p,r)||c(r);const[v,m]=l.useState(null),[g,y]=l.useState(null),w=l.useCallback(j=>{j!==C.current&&(C.current=j,m(j))},[]),b=l.useCallback(j=>{j!==P.current&&(P.current=j,y(j))},[]),x=s||v,E=i||g,C=l.useRef(null),P=l.useRef(null),I=l.useRef(h),M=u!=null,_=dn(u),B=dn(o),A=dn(d),k=l.useCallback(()=>{if(!C.current||!P.current)return;const j={placement:t,strategy:n,middleware:p};B.current&&(j.platform=B.current),Oa(C.current,P.current,j).then(O=>{const T={...O,isPositioned:A.current!==!1};F.current&&!Vt(I.current,T)&&(I.current=T,Bn.flushSync(()=>{f(T)}))})},[p,t,n,B,A]);Ft(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[d]);const F=l.useRef(!1);Ft(()=>(F.current=!0,()=>{F.current=!1}),[]),Ft(()=>{if(x&&(C.current=x),E&&(P.current=E),x&&E){if(_.current)return _.current(x,E,k);k()}},[x,E,k,_,M]);const Y=l.useMemo(()=>({reference:C,floating:P,setReference:w,setFloating:b}),[w,b]),W=l.useMemo(()=>({reference:x,floating:E}),[x,E]),D=l.useMemo(()=>{const j={position:n,left:0,top:0};if(!W.floating)return j;const O=Mr(W.floating,h.x),T=Mr(W.floating,h.y);return a?{...j,transform:"translate("+O+"px, "+T+"px)",...ho(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:T}},[n,a,W.floating,h.x,h.y]);return l.useMemo(()=>({...h,update:k,refs:Y,elements:W,floatingStyles:D}),[h,k,Y,W,D])}const _a=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Or({element:r.current,padding:o}).fn(n):{}:r?Or({element:r,padding:o}).fn(n):{}}}},Da=(e,t)=>{const n=Ca(e);return{name:n.name,fn:n.fn,options:[e,t]}},Na=(e,t)=>{const n=Ea(e);return{name:n.name,fn:n.fn,options:[e,t]}},ka=(e,t)=>({fn:Ta(e).fn,options:[e,t]}),La=(e,t)=>{const n=Sa(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fa=(e,t)=>{const n=Ra(e);return{name:n.name,fn:n.fn,options:[e,t]}},ja=(e,t)=>{const n=Pa(e);return{name:n.name,fn:n.fn,options:[e,t]}},$a=(e,t)=>{const n=_a(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ba=Object.defineProperty,Wa=(e,t)=>Ba(e,"name",{value:t,configurable:!0});function vo(e){const[t,n]=l.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,a=d.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}Wa(vo,"useSize");var Ha=Object.defineProperty,Le=(e,t)=>Ha(e,"name",{value:t,configurable:!0}),go="Popper",[yo,Zt]=We(go),[za,wo]=yo(go),Va=Le(e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null),[s,i]=l.useState(void 0);return S.jsx(za,{scope:t,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),Ua="PopperAnchor",Ya=l.forwardRef(Le(function(t,n){const{__scopePopper:r,virtualRef:o,...s}=t,i=wo(Ua,r),a=l.useRef(null),u=i.onAnchorChange,d=l.useCallback(m=>{a.current=m,m&&u(m)},[u]),h=Q(n,d),f=l.useRef(null);l.useEffect(()=>{if(!o)return;const m=f.current;f.current=o.current,m!==f.current&&u(f.current)});const p=i.placementState&&Qt(i.placementState),c=p==null?void 0:p[0],v=p==null?void 0:p[1];return o?null:S.jsx(fe.div,{"data-radix-popper-side":c,"data-radix-popper-align":v,...s,ref:h})},"PopperAnchor")),bo="PopperContent",[Ka,Pu]=yo(bo),Ga=l.forwardRef(Le(function(t,n){var me,ne,he,Qe,ht,St,Rt;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:c=!1,updatePositionStrategy:v="optimized",onPlaced:m,...g}=t,y=wo(bo,r),[w,b]=l.useState(null),x=Q(n,b),[E,C]=l.useState(null),P=vo(E),I=(P==null?void 0:P.width)??0,M=(P==null?void 0:P.height)??0,_=o+(i!=="center"?"-"+i:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(h)?h:[h],k=A.length>0,F={padding:B,boundary:A.filter(xo),altBoundary:k},{refs:Y,floatingStyles:W,placement:D,isPositioned:j,middlewareData:O}=Ia({strategy:"fixed",placement:_,whileElementsMounted:Le((...Je)=>xa(...Je,{animationFrame:v==="always"}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[Da({mainAxis:s+M,alignmentAxis:a}),d&&Na({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?ka():void 0,...F}),d&&La({...F}),Fa({...F,apply:Le(({elements:Je,rects:Pt,availableWidth:vt,availableHeight:on})=>{const{width:Tt,height:ze}=Pt.reference,Ve=Je.floating.style;Ve.setProperty("--radix-popper-available-width",`${vt}px`),Ve.setProperty("--radix-popper-available-height",`${on}px`),Ve.setProperty("--radix-popper-anchor-width",`${Tt}px`),Ve.setProperty("--radix-popper-anchor-height",`${ze}px`)},"apply")}),E&&$a({element:E,padding:u}),Xa({arrowWidth:I,arrowHeight:M}),c&&ja({strategy:"referenceHidden",...F,boundary:k?F.boundary:void 0})]}),T=y.setPlacementState;de(()=>(T(D),()=>{T(void 0)}),[D,T]);const[Z,L]=Qt(D),$=Me(m);de(()=>{j&&($==null||$())},[j,$]);const V=(me=O.arrow)==null?void 0:me.x,X=(ne=O.arrow)==null?void 0:ne.y,pe=((he=O.arrow)==null?void 0:he.centerOffset)!==0,[z,ce]=l.useState();return de(()=>{w&&ce(window.getComputedStyle(w).zIndex)},[w]),S.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:j?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(Qe=O.transformOrigin)==null?void 0:Qe.x,(ht=O.transformOrigin)==null?void 0:ht.y].join(" "),...((St=O.hide)==null?void 0:St.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:S.jsx(Ka,{scope:r,placedSide:Z,placedAlign:L,onArrowChange:C,arrowX:V,arrowY:X,shouldHideArrow:pe,children:S.jsx(fe.div,{"data-side":Z,"data-align":L,...g,ref:x,style:{...g.style,animation:j?(Rt=g.style)==null?void 0:Rt.animation:"none"}})})})},"PopperContent"));function xo(e){return e!==null}Le(xo,"isNotNull");var Xa=Le(e=>({name:"transformOrigin",options:e,fn(t){var g,y,w;const{placement:n,rects:r,middlewareData:o}=t,i=((g=o.arrow)==null?void 0:g.centerOffset)!==0,a=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,h]=Qt(n),f={start:"0%",center:"50%",end:"100%"}[h],p=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,c=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let v="",m="";return d==="bottom"?(v=i?f:`${p}px`,m=`${-u}px`):d==="top"?(v=i?f:`${p}px`,m=`${r.floating.height+u}px`):d==="right"?(v=`${-u}px`,m=i?f:`${c}px`):d==="left"&&(v=`${r.floating.width+u}px`,m=i?f:`${c}px`),{data:{x:v,y:m}}}}),"transformOrigin");function Qt(e){const[t,n="center"]=e.split("-");return[t,n]}Le(Qt,"getSideAndAlignFromPlacement");var Co=Va,Eo=Ya,So=Ga,qa=Object.defineProperty,Za=(e,t)=>qa(e,"name",{value:t,configurable:!0}),Ro=l.forwardRef(Za(function(t,n){var u;const{container:r,...o}=t,[s,i]=l.useState(!1);de(()=>i(!0),[]);const a=r||s&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?Bn.createPortal(S.jsx(fe.div,{...o,ref:n}),a):null},"Portal")),Qa=Object.defineProperty,Ie=(e,t)=>Qa(e,"name",{value:t,configurable:!0});function Po(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}Ie(Po,"useStateMachine");var Jt=Ie(e=>{const{present:t,children:n}=e,r=To(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=Oo(r.ref,Mo(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null},"Presence");function To(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=l.useRef(void 0),a=e?"mounted":"unmounted",[u,d]=Po(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{u==="mounted"?(s.current=i.current??it(r.current),i.current=void 0):s.current="none"},[u]),de(()=>{const h=r.current,f=o.current;if(f!==e){const c=s.current,v=it(h);e?(i.current=v,d("MOUNT")):v==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(f&&c!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),de(()=>{if(t){let h;const f=t.ownerDocument.defaultView??window,p=Ie(v=>{const g=it(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&g&&(d("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",h=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},"handleAnimationEnd"),c=Ie(v=>{v.target===t&&(s.current=it(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(h),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:l.useCallback(h=>{if(h){const f=getComputedStyle(h);r.current=f,i.current=it(f)}else r.current=null;n(h)},[])}}Ie(To,"usePresence");function Mn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Ie(Mn,"setRef");function Oo(...e){const t=l.useRef(e);return t.current=e,l.useCallback(n=>{const r=t.current;let o=!1;const s=r.map(i=>{const a=Mn(i,n);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():Mn(r[i],null)}}},[])}Ie(Oo,"useStableComposedRefs");function it(e){return(e==null?void 0:e.animationName)||"none"}Ie(it,"getAnimationName");function Mo(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ie(Mo,"getElementRef");var Ja=Object.defineProperty,ec=(e,t)=>Ja(e,"name",{value:t,configurable:!0}),Ar=lt[" useEffectEvent ".trim().toString()],Ir=lt[" useInsertionEffect ".trim().toString()];function Ao(e){if(typeof Ar=="function")return Ar(e);const t=l.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Ir=="function"?Ir(()=>{t.current=e}):de(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}ec(Ao,"useEffectEvent");var tc=Object.defineProperty,xt=(e,t)=>tc(e,"name",{value:t,configurable:!0}),nc=lt[" useInsertionEffect ".trim().toString()]||de;function en({prop:e,defaultProp:t,onChange:n=xt(()=>{},"onChange"),caller:r}){const[o,s,i]=Io({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:o,d=l.useCallback(h=>{var f;if(a){const p=_o(h)?h(e):h;p!==e&&((f=i.current)==null||f.call(i,p))}else s(h)},[a,e,s,i]);return[u,d]}xt(en,"useControllableState");function Io({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return nc(()=>{s.current=t},[t]),l.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}xt(Io,"useUncontrolledState");function _o(e){return typeof e=="function"}xt(_o,"isFunction");var _r=Symbol("RADIX:SYNC_STATE");function rc(e,t,n,r){const{prop:o,defaultProp:s,onChange:i,caller:a}=t,u=o!==void 0,d=Ao(i),h=[{...n,state:s}];r&&h.push(r);const[f,p]=l.useReducer((g,y)=>{if(y.type===_r)return{...g,state:y.state};const w=e(g,y);return u&&!Object.is(w.state,g.state)&&d(w.state),w},...h),c=f.state,v=l.useRef(c);l.useEffect(()=>{v.current!==c&&(v.current=c,u||d(c))},[c,v,u]);const m=l.useMemo(()=>o!==void 0?{...f,state:o}:f,[f,o]);return l.useEffect(()=>{u&&!Object.is(o,f.state)&&p({type:_r,state:o})},[o,f.state,u]),[m,p]}xt(rc,"useControllableStateReducer");var oc=Object.defineProperty,sc=(e,t)=>oc(e,"name",{value:t,configurable:!0}),ic=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ac=l.forwardRef(sc(function(t,n){return S.jsx(fe.span,{...t,ref:n,style:{...ic,...t.style}})},"VisuallyHidden")),cc=ac,lc=Object.defineProperty,te=(e,t)=>lc(e,"name",{value:t,configurable:!0}),[qn,Tu]=We("Tooltip",[Zt]),Zn=Zt(),uc="TooltipProvider",dc=700,An="tooltip.open",[fc,Qn]=qn(uc),pc=te(e=>{const{__scopeTooltip:t,delayDuration:n=dc,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=l.useRef(!0),a=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),S.jsx(fc,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{r<=0||(window.clearTimeout(u.current),i.current=!1)},[r]),onClose:l.useCallback(()=>{r<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:l.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),In="Tooltip",[mc,Ct]=qn(In),hc=te(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,u=Qn(In,e.__scopeTooltip),d=Zn(t),[h,f]=l.useState(null),[p,c]=l.useState(void 0),v=gt(),m=l.useRef(0),g=i??u.disableHoverableContent,y=a??u.delayDuration,w=l.useRef(!1),[b,x]=en({prop:r,defaultProp:o??!1,onChange:te(_=>{_?(u.onOpen(),document.dispatchEvent(new CustomEvent(An))):u.onClose(),s==null||s(_)},"onChange"),caller:In}),E=l.useMemo(()=>b?w.current?"delayed-open":"instant-open":"closed",[b]),C=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w.current=!1,x(!0)},[x]),P=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),I=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,x(!0),m.current=0},y)},[y,x]);l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]);const M=p??v;return S.jsx(Co,{...d,children:S.jsx(mc,{scope:t,contentId:M,setContentId:c,open:b,stateAttribute:E,trigger:h,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{u.isOpenDelayedRef.current?I():C()},[u.isOpenDelayedRef,I,C]),onTriggerLeave:l.useCallback(()=>{g?P():(window.clearTimeout(m.current),m.current=0)},[P,g]),onOpen:C,onClose:P,disableHoverableContent:g,children:n})})},"Tooltip"),Dr="TooltipTrigger",vc=l.forwardRef(te(function(t,n){const{__scopeTooltip:r,...o}=t,s=Ct(Dr,r),i=Qn(Dr,r),a=Zn(r),u=l.useRef(null),d=Q(n,u,s.onTriggerChange),h=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>h.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),S.jsx(Eo,{asChild:!0,...a,children:S.jsx(fe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:d,onPointerMove:H(t.onPointerMove,c=>{c.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:H(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:H(t.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:H(t.onFocus,()=>{h.current||s.onOpen()}),onBlur:H(t.onBlur,s.onClose),onClick:H(t.onClick,s.onClose)})})},"TooltipTrigger")),Do="TooltipPortal",[gc,yc]=qn(Do,{forceMount:void 0}),wc=te(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Ct(Do,t);return S.jsx(gc,{scope:t,forceMount:n,children:S.jsx(Jt,{present:n||s.open,children:S.jsx(Ro,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),bt="TooltipContent",bc=l.forwardRef(te(function(t,n){const r=yc(bt,t.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...i}=t,a=Ct(bt,t.__scopeTooltip);return S.jsx(Jt,{present:o||a.open,children:a.disableHoverableContent?S.jsx(No,{side:s,...i,ref:n}):S.jsx(xc,{side:s,...i,ref:n})})},"TooltipContent")),xc=l.forwardRef(te(function(t,n){const r=Ct(bt,t.__scopeTooltip),o=Qn(bt,t.__scopeTooltip),s=l.useRef(null),i=Q(n,s),[a,u]=l.useState(null),{trigger:d,onClose:h}=r,f=s.current,{onPointerInTransitChange:p}=o,c=l.useCallback(()=>{u(null),p(!1)},[p]),v=l.useCallback((m,g)=>{const y=m.currentTarget,w={x:m.clientX,y:m.clientY},b=ko(w,y.getBoundingClientRect()),x=Lo(w,b),E=Fo(g.getBoundingClientRect()),C=$o([...x,...E]);u(C),p(!0)},[p]);return l.useEffect(()=>()=>c(),[c]),l.useEffect(()=>{if(d&&f){const m=te(y=>v(y,f),"handleTriggerLeave"),g=te(y=>v(y,d),"handleContentLeave");return d.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{d.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[d,f,v,c]),l.useEffect(()=>{if(a){const m=te(g=>{const y=g.target,w={x:g.clientX,y:g.clientY},b=(d==null?void 0:d.contains(y))||(f==null?void 0:f.contains(y)),x=!jo(w,a);b?c():x&&(c(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[d,f,a,h,c]),S.jsx(No,{...t,ref:i})},"TooltipContentHoverable")),Cc=Ur("TooltipContent"),No=l.forwardRef(te(function(t,n){const{__scopeTooltip:r,children:o,"aria-label":s,id:i,onEscapeKeyDown:a,onPointerDownOutside:u,...d}=t,h=Ct(bt,r),f=Zn(r),{onClose:p}=h;l.useEffect(()=>(document.addEventListener(An,p),()=>document.removeEventListener(An,p)),[p]),l.useEffect(()=>{if(h.trigger){const v=te(m=>{m.target instanceof Node&&m.target.contains(h.trigger)&&p()},"handleScroll");return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[h.trigger,p]);const{setContentId:c}=h;return de(()=>(c(i),()=>{c(void 0)}),[i,c]),S.jsx(to,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:v=>v.preventDefault(),onDismiss:p,children:S.jsxs(So,{"data-state":h.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:h.contentId,...f,...d,ref:n,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[S.jsx(Cc,{children:o}),s?S.jsx(cc,{id:h.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function ko(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}te(ko,"getExitSideFromRect");function Lo(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}te(Lo,"getPaddedExitPoints");function Fo(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}te(Fo,"getPointsFromRect");function jo(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],u=t[i],d=a.x,h=a.y,f=u.x,p=u.y;h>r!=p>r&&n<(f-d)*(r-h)/(p-h)+d&&(o=!o)}return o}te(jo,"isPointInPolygon");function $o(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Bo(t)}te($o,"getHull");function Bo(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}te(Bo,"getHullPresorted");var Ou=pc,Mu=hc,Au=vc,Iu=wc,_u=bc,Ec=Object.defineProperty,ee=(e,t)=>Ec(e,"name",{value:t,configurable:!0});function Jn(e){const t=e+"CollectionProvider",[n,r]=We(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=ee(m=>{const{scope:g,children:y}=m,w=l.useRef(null),b=l.useRef(new Map).current;return S.jsx(o,{scope:g,itemMap:b,collectionRef:w,children:y})},"CollectionProvider");i.displayName=t;const a=e+"CollectionSlot",u=je(a),d=l.forwardRef((m,g)=>{const{scope:y,children:w}=m,b=s(a,y),x=Q(g,b.collectionRef);return S.jsx(u,{ref:x,children:w})});d.displayName=a;const h=e+"CollectionItemSlot",f="data-radix-collection-item",p=je(h),c=l.forwardRef((m,g)=>{const{scope:y,children:w,...b}=m,x=l.useRef(null),E=Q(g,x),C=s(h,y);return l.useEffect(()=>(C.itemMap.set(x,{ref:x,...b}),()=>void C.itemMap.delete(x))),S.jsx(p,{[f]:"",ref:E,children:w})});c.displayName=h;function v(m){const g=s(e+"CollectionConsumer",m);return l.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((C,P)=>b.indexOf(C.ref.current)-b.indexOf(P.ref.current))},[g.collectionRef,g.itemMap])}return ee(v,"useCollection"),[{Provider:i,Slot:d,ItemSlot:c},v,r]}ee(Jn,"createCollection");var Nr=new WeakMap,q,ae,fn=(ae=class extends Map{constructor(n){super(n);vr(this,q);cn(this,q,[...super.keys()]),Nr.set(this,!0)}set(n,r){return Nr.get(this)&&(this.has(n)?re(this,q)[re(this,q).indexOf(n)]=n:re(this,q).push(n)),super.set(n,r),this}insert(n,r,o){const s=this.has(r),i=re(this,q).length,a=er(n);let u=a>=0?a:i+a;const d=u<0||u>=i?-1:u;if(d===this.size||s&&d===this.size-1||d===-1)return this.set(r,o),this;const h=this.size+(s?0:1);a<0&&u++;const f=[...re(this,q)];let p,c=!1;for(let v=u;v<h;v++)if(u===v){let m=f[v];f[v]===r&&(m=f[v+1]),s&&this.delete(r),p=this.get(m),this.set(r,o)}else{!c&&f[v-1]===r&&(c=!0);const m=f[c?v:v-1],g=p;p=this.get(m),this.delete(m),this.set(m,g)}return this}with(n,r,o){const s=new ae(this);return s.insert(n,r,o),s}before(n){const r=re(this,q).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const s=re(this,q).indexOf(n);return s===-1?this:this.insert(s,r,o)}after(n){let r=re(this,q).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,o){const s=re(this,q).indexOf(n);return s===-1?this:this.insert(s+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return cn(this,q,[]),super.clear()}delete(n){const r=super.delete(n);return r&&re(this,q).splice(re(this,q).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=jt(re(this,q),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=jt(re(this,q),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return re(this,q).indexOf(n)}keyAt(n){return jt(re(this,q),n)}from(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return s;o++}}findIndex(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return o;o++}return-1}filter(n,r){const o=[];let s=0;for(const i of this)Reflect.apply(n,r,[i,s,this])&&o.push(i),s++;return new ae(o)}map(n,r){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(n,r,[i,s,this])]),s++;return new ae(o)}reduce(...n){const[r,o]=n;let s=0,i=o??this.at(0);for(const a of this)s===0&&n.length===1?i=a:i=Reflect.apply(r,this,[i,a,s,this]),s++;return i}reduceRight(...n){const[r,o]=n;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&n.length===1?s=a:s=Reflect.apply(r,this,[s,a,i,this])}return s}toSorted(n){const r=[...this.entries()].sort(n);return new ae(r)}toReversed(){const n=new ae;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),s=this.get(o);n.set(o,s)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new ae(r)}slice(n,r){const o=new ae;let s=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),r!==void 0&&r>0&&(s=r-1);for(let i=n;i<=s;i++){const a=this.keyAt(i),u=this.get(a);o.set(a,u)}return o}every(n,r){let o=0;for(const s of this){if(!Reflect.apply(n,r,[s,o,this]))return!1;o++}return!0}some(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return!0;o++}return!1}},q=new WeakMap,ee(ae,"OrderedDict"),ae);function jt(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=Wo(e,t);return n===-1?void 0:e[n]}ee(jt,"at");function Wo(e,t){const n=e.length,r=er(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}ee(Wo,"toSafeIndex");function er(e){return e!==e||e===0?0:Math.trunc(e)}ee(er,"toSafeInteger");function Sc(e){const t=e+"CollectionProvider",[n,r]=We(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new fn,setItemMap:ee(()=>{},"setItemMap")}),i=ee(({state:b,...x})=>b?S.jsx(u,{...x,state:b}):S.jsx(a,{...x}),"CollectionProvider");i.displayName=t;const a=ee(b=>{const x=g();return S.jsx(u,{...b,state:x})},"CollectionInit");a.displayName=t+"Init";const u=ee(b=>{const{scope:x,children:E,state:C}=b,P=l.useRef(null),[I,M]=l.useState(null),_=Q(P,M),[B,A]=C;return l.useEffect(()=>{if(!I)return;const k=Vo(()=>{});return k.observe(I,{childList:!0,subtree:!0}),()=>{k.disconnect()}},[I]),S.jsx(o,{scope:x,itemMap:B,setItemMap:A,collectionRef:_,collectionRefObject:P,collectionElement:I,children:E})},"CollectionProviderImpl");u.displayName=t+"Impl";const d=e+"CollectionSlot",h=je(d),f=l.forwardRef((b,x)=>{const{scope:E,children:C}=b,P=s(d,E),I=Q(x,P.collectionRef);return S.jsx(h,{ref:I,children:C})});f.displayName=d;const p=e+"CollectionItemSlot",c="data-radix-collection-item",v=je(p),m=l.forwardRef((b,x)=>{const{scope:E,children:C,...P}=b,I=l.useRef(null),[M,_]=l.useState(null),B=Q(x,I,_),A=s(p,E),{setItemMap:k}=A,F=l.useRef(P);Ho(F.current,P)||(F.current=P);const Y=F.current;return l.useEffect(()=>{const W=Y;return k(D=>M?D.has(M)?D.set(M,{...W,element:M}).toSorted(_n):(D.set(M,{...W,element:M}),D.toSorted(_n)):D),()=>{k(D=>!M||!D.has(M)?D:(D.delete(M),new fn(D)))}},[M,Y,k]),S.jsx(v,{[c]:"",ref:B,children:C})});m.displayName=p;function g(){return l.useState(new fn)}ee(g,"useInitCollection");function y(b){const{itemMap:x}=s(e+"CollectionConsumer",b);return x}return ee(y,"useCollection"),[{Provider:i,Slot:f,ItemSlot:m},{createCollectionScope:r,useCollection:y,useInitCollection:g}]}ee(Sc,"createCollection");function Ho(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||e[o]!==t[o])return!1;return!0}ee(Ho,"shallowEqual");function zo(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}ee(zo,"isElementPreceding");function _n(e,t){return!e[1].element||!t[1].element?0:zo(e[1].element,t[1].element)?-1:1}ee(_n,"sortByDocumentPosition");function Vo(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}ee(Vo,"getChildListObserver");var Rc=Object.defineProperty,Pc=(e,t)=>Rc(e,"name",{value:t,configurable:!0}),Tc=l.createContext(void 0);function tr(e){const t=l.useContext(Tc);return e||t||"ltr"}Pc(tr,"useDirection");var Oc=Object.defineProperty,nr=(e,t)=>Oc(e,"name",{value:t,configurable:!0}),_t=0,xe=null;function Mc(e){return rr(),e.children}nr(Mc,"FocusGuards");function rr(){l.useEffect(()=>{xe||(xe={start:Dn(),end:Dn()});const{start:e,end:t}=xe;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),_t++,()=>{_t===1&&(xe==null||xe.start.remove(),xe==null||xe.end.remove(),xe=null),_t=Math.max(0,_t-1)}},[])}nr(rr,"useFocusGuards");function Dn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}nr(Dn,"createFocusGuard");var Ac=Object.defineProperty,oe=(e,t)=>Ac(e,"name",{value:t,configurable:!0}),pn="focusScope.autoFocusOnMount",mn="focusScope.autoFocusOnUnmount",kr={bubbles:!1,cancelable:!0},Ic=l.forwardRef(oe(function(t,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[u,d]=l.useState(null),h=Me(s),f=Me(i),p=l.useRef(null),c=Q(n,d),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(o){let g=function(x){if(v.paused||!u)return;const E=x.target;u.contains(E)?p.current=E:Pe(p.current,{select:!0})},y=function(x){if(v.paused||!u)return;const E=x.relatedTarget;E!==null&&(u.contains(E)||Pe(p.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Pe(u)};oe(g,"handleFocusIn"),oe(y,"handleFocusOut"),oe(w,"handleMutations"),document.addEventListener("focusin",g),document.addEventListener("focusout",y);const b=new MutationObserver(w);return u&&b.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),b.disconnect()}}},[o,u,v.paused]),l.useEffect(()=>{if(u){Lr.add(v);const g=document.activeElement;if(!u.contains(g)){const w=new CustomEvent(pn,kr);u.addEventListener(pn,h),u.dispatchEvent(w),w.defaultPrevented||(Uo(qo(or(u)),{select:!0}),document.activeElement===g&&Pe(u))}return()=>{u.removeEventListener(pn,h),setTimeout(()=>{const w=new CustomEvent(mn,kr);u.addEventListener(mn,f),u.dispatchEvent(w),w.defaultPrevented||Pe(g??document.body,{select:!0}),u.removeEventListener(mn,f),Lr.remove(v)},0)}}},[u,h,f,v]);const m=l.useCallback(g=>{if(!r&&!o||v.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(y&&w){const b=g.currentTarget,[x,E]=Yo(b);x&&E?!g.shiftKey&&w===E?(g.preventDefault(),r&&Pe(x,{select:!0})):g.shiftKey&&w===x&&(g.preventDefault(),r&&Pe(E,{select:!0})):w===b&&g.preventDefault()}},[r,o,v.paused]);return S.jsx(fe.div,{tabIndex:-1,...a,ref:c,onKeyDown:m})},"FocusScope"));function Uo(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pe(r,{select:t}),document.activeElement!==n)return}oe(Uo,"focusFirst");function Yo(e){const t=or(e),n=Nn(t,e),r=Nn(t.reverse(),e);return[n,r]}oe(Yo,"getTabbableEdges");function or(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:oe(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}oe(or,"getTabbableCandidates");function Nn(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ko(r,{upTo:t})))return r}oe(Nn,"findVisible");function Ko(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}oe(Ko,"isHidden");function Go(e){return e instanceof HTMLInputElement&&"select"in e}oe(Go,"isSelectableInput");function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Go(e)&&t&&e.select()}}oe(Pe,"focus");var Lr=Xo();function Xo(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=kn(e,t),e.unshift(t)},remove(t){var n;e=kn(e,t),(n=e[0])==null||n.resume()}}}oe(Xo,"createFocusScopesStack");function kn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}oe(kn,"arrayRemove");function qo(e){return e.filter(t=>t.tagName!=="A")}oe(qo,"removeLinks");var _c=Object.defineProperty,sr=(e,t)=>_c(e,"name",{value:t,configurable:!0}),hn=!1;function Zo(){const[e,t]=l.useState(hn);return l.useEffect(()=>{hn||(hn=!0,t(!0))},[]),e}sr(Zo,"useIsHydrated");var Qo=lt[" useSyncExternalStore ".trim().toString()];function Jo(){return()=>{}}sr(Jo,"subscribe");function es(){return Qo(Jo,()=>!0,()=>!1)}sr(es,"useIsHydratedModern");var Dc=typeof Qo=="function"?es:Zo,Nc=Object.defineProperty,qe=(e,t)=>Nc(e,"name",{value:t,configurable:!0}),vn="rovingFocusGroup.onEntryFocus",kc={bubbles:!1,cancelable:!0},tn="RovingFocusGroup",[Ln,ts,Lc]=Jn(tn),[Fc,ns]=We(tn,[Lc]),[jc,$c]=Fc(tn),Bc=l.forwardRef(qe(function(t,n){return S.jsx(Ln.Provider,{scope:t.__scopeRovingFocusGroup,children:S.jsx(Ln.Slot,{scope:t.__scopeRovingFocusGroup,children:S.jsx(Wc,{...t,ref:n})})})},"RovingFocusGroup")),Wc=l.forwardRef(qe(function(t,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:f=!1,...p}=t,c=l.useRef(null),v=Q(n,c),m=tr(i),[g,y]=en({prop:a,defaultProp:u??null,onChange:d,caller:tn}),[w,b]=l.useState(!1),x=Me(h),E=ts(r),C=l.useRef(!1),[P,I]=l.useState(0);return l.useEffect(()=>{const M=c.current;if(M)return M.addEventListener(vn,x),()=>M.removeEventListener(vn,x)},[x]),S.jsx(jc,{scope:r,orientation:o,dir:m,loop:s,currentTabStopId:g,onItemFocus:l.useCallback(M=>y(M),[y]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>I(M=>M+1),[]),onFocusableItemRemove:l.useCallback(()=>I(M=>M-1),[]),children:S.jsx(fe.div,{tabIndex:w||P===0?-1:0,"data-orientation":o,...p,ref:v,style:{outline:"none",...t.style},onMouseDown:H(t.onMouseDown,()=>{C.current=!0}),onFocus:H(t.onFocus,M=>{const _=!C.current;if(M.target===M.currentTarget&&_&&!w){const B=new CustomEvent(vn,kc);if(M.currentTarget.dispatchEvent(B),!B.defaultPrevented){const A=E().filter(D=>D.focusable),k=A.find(D=>D.active),F=A.find(D=>D.id===g),W=[k,F,...A].filter(Boolean).map(D=>D.ref.current);ir(W,f)}}C.current=!1}),onBlur:H(t.onBlur,()=>b(!1))})})},"RovingFocusGroupImpl")),Hc="RovingFocusGroupItem",zc=l.forwardRef(qe(function(t,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...u}=t,d=gt(),h=i||d,f=$c(Hc,r),p=f.currentTabStopId===h,c=ts(r),{onFocusableItemAdd:v,onFocusableItemRemove:m,currentTabStopId:g}=f,y=Dc();return de(()=>{if(!(!y||!o))return v(),()=>m()},[y,o,v,m]),l.useEffect(()=>{if(!(y||!o))return v(),()=>m()},[y,o,v,m]),S.jsx(Ln.ItemSlot,{scope:r,id:h,focusable:o,active:s,children:S.jsx(fe.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...u,ref:n,onMouseDown:H(t.onMouseDown,w=>{o?f.onItemFocus(h):w.preventDefault()}),onFocus:H(t.onFocus,()=>f.onItemFocus(h)),onKeyDown:H(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const b=os(w,f.orientation,f.dir);if(b!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=c().filter(C=>C.focusable).map(C=>C.ref.current);if(b==="last")E.reverse();else if(b==="prev"||b==="next"){b==="prev"&&E.reverse();const C=E.indexOf(w.currentTarget);E=f.loop?ss(E,C+1):E.slice(C+1)}setTimeout(()=>ir(E))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:g!=null}):a})})},"RovingFocusGroupItem")),Vc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rs(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}qe(rs,"getDirectionAwareKey");function os(e,t,n){const r=rs(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Vc[r]}qe(os,"getFocusIntent");function ir(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}qe(ir,"focusFirst");function ss(e,t){return e.map((n,r)=>e[(t+r)%e.length])}qe(ss,"wrapArray");var Uc=Bc,Yc=zc,Kc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rt=new WeakMap,Dt=new WeakMap,Nt={},gn=0,is=function(e){return e&&(e.host||is(e.parentNode))},Gc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=is(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Xc=function(e,t,n,r){var o=Gc(t,Array.isArray(e)?e:[e]);Nt[n]||(Nt[n]=new WeakMap);var s=Nt[n],i=[],a=new Set,u=new Set(o),d=function(f){!f||a.has(f)||(a.add(f),d(f.parentNode))};o.forEach(d);var h=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))h(p);else try{var c=p.getAttribute(r),v=c!==null&&c!=="false",m=(rt.get(p)||0)+1,g=(s.get(p)||0)+1;rt.set(p,m),s.set(p,g),i.push(p),m===1&&v&&Dt.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return h(t),a.clear(),gn++,function(){i.forEach(function(f){var p=rt.get(f)-1,c=s.get(f)-1;rt.set(f,p),s.set(f,c),p||(Dt.has(f)||f.removeAttribute(r),Dt.delete(f)),c||f.removeAttribute(n)}),gn--,gn||(rt=new WeakMap,rt=new WeakMap,Dt=new WeakMap,Nt={})}},qc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Kc(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Xc(r,o,n,"aria-hidden")):function(){return null}},Ce=function(){return Ce=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ce.apply(this,arguments)};function as(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Zc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var $t="right-scroll-bar-position",Bt="width-before-scroll-bar",Qc="with-scroll-bars-hidden",Jc="--removed-body-scroll-bar-size";function yn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function el(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var tl=typeof window<"u"?l.useLayoutEffect:l.useEffect,Fr=new WeakMap;function nl(e,t){var n=el(null,function(r){return e.forEach(function(o){return yn(o,r)})});return tl(function(){var r=Fr.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||yn(a,null)}),s.forEach(function(a){o.has(a)||yn(a,i)})}Fr.set(n,e)},[e]),n}function rl(e){return e}function ol(e,t){t===void 0&&(t=rl);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var u=function(){var h=i;i=[],h.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(h){i.push(h),d()},filter:function(h){return i=i.filter(h),n}}}};return o}function sl(e){e===void 0&&(e={});var t=ol(null);return t.options=Ce({async:!0,ssr:!1},e),t}var cs=function(e){var t=e.sideCar,n=as(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ce({},n))};cs.isSideCarExport=!0;function il(e,t){return e.useMedium(t),cs}var ls=sl(),wn=function(){},nn=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,u=e.className,d=e.removeScrollBar,h=e.enabled,f=e.shards,p=e.sideCar,c=e.noRelative,v=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,x=as(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,C=nl([n,t]),P=Ce(Ce({},x),o);return l.createElement(l.Fragment,null,h&&l.createElement(E,{sideCar:ls,removeScrollBar:d,shards:f,noRelative:c,noIsolation:v,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?l.cloneElement(l.Children.only(a),Ce(Ce({},P),{ref:C})):l.createElement(w,Ce({},P,{className:u,ref:C}),a))});nn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nn.classNames={fullWidth:Bt,zeroRight:$t};var al=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=al();return t&&e.setAttribute("nonce",t),e}function ll(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ul(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=cl())&&(ll(t,n),ul(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fl=function(){var e=dl();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},us=function(){var e=fl(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},pl={left:0,top:0,right:0,gap:0},bn=function(e){return parseInt(e||"",10)||0},ml=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[bn(n),bn(r),bn(o)]},hl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pl;var t=ml(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},vl=us(),ct="data-scroll-locked",gl=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
3
|
+
.`.concat(Qc,` {
|
|
4
|
+
overflow: hidden `).concat(r,`;
|
|
5
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
6
|
+
}
|
|
7
|
+
body[`).concat(ct,`] {
|
|
8
|
+
overflow: hidden `).concat(r,`;
|
|
9
|
+
overscroll-behavior: contain;
|
|
10
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
11
|
+
padding-left: `.concat(o,`px;
|
|
12
|
+
padding-top: `).concat(s,`px;
|
|
13
|
+
padding-right: `).concat(i,`px;
|
|
14
|
+
margin-left:0;
|
|
15
|
+
margin-top:0;
|
|
16
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
17
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.`).concat($t,` {
|
|
21
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.`).concat(Bt,` {
|
|
25
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.`).concat($t," .").concat($t,` {
|
|
29
|
+
right: 0 `).concat(r,`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.`).concat(Bt," .").concat(Bt,` {
|
|
33
|
+
margin-right: 0 `).concat(r,`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body[`).concat(ct,`] {
|
|
37
|
+
`).concat(Jc,": ").concat(a,`px;
|
|
38
|
+
}
|
|
39
|
+
`)},jr=function(){var e=parseInt(document.body.getAttribute(ct)||"0",10);return isFinite(e)?e:0},yl=function(){l.useEffect(function(){return document.body.setAttribute(ct,(jr()+1).toString()),function(){var e=jr()-1;e<=0?document.body.removeAttribute(ct):document.body.setAttribute(ct,e.toString())}},[])},wl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;yl();var s=l.useMemo(function(){return hl(o)},[o]);return l.createElement(vl,{styles:gl(s,!t,o,n?"":"!important")})},Fn=!1;if(typeof window<"u")try{var kt=Object.defineProperty({},"passive",{get:function(){return Fn=!0,!0}});window.addEventListener("test",kt,kt),window.removeEventListener("test",kt,kt)}catch{Fn=!1}var ot=Fn?{passive:!1}:!1,bl=function(e){return e.tagName==="TEXTAREA"},ds=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bl(e)&&n[t]==="visible")},xl=function(e){return ds(e,"overflowY")},Cl=function(e){return ds(e,"overflowX")},$r=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=fs(e,r);if(o){var s=ps(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},El=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Sl=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fs=function(e,t){return e==="v"?xl(t):Cl(t)},ps=function(e,t){return e==="v"?El(t):Sl(t)},Rl=function(e,t){return e==="h"&&t==="rtl"?-1:1},Pl=function(e,t,n,r,o){var s=Rl(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,u=t.contains(a),d=!1,h=i>0,f=0,p=0;do{if(!a)break;var c=ps(e,a),v=c[0],m=c[1],g=c[2],y=m-g-s*v;(v||y)&&fs(e,a)&&(f+=y,p+=v);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(h&&Math.abs(f)<1||!h&&Math.abs(p)<1)&&(d=!0),d},Lt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Br=function(e){return[e.deltaX,e.deltaY]},Wr=function(e){return e&&"current"in e?e.current:e},Tl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ol=function(e){return`
|
|
40
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
41
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
42
|
+
`)},Ml=0,st=[];function Al(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Ml++)[0],s=l.useState(us)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Zc([e.lockRef.current],(e.shards||[]).map(Wr),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Lt(m),w=n.current,b="deltaX"in m?m.deltaX:w[0]-y[0],x="deltaY"in m?m.deltaY:w[1]-y[1],E,C=m.target,P=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in m&&P==="h"&&C.type==="range")return!1;var I=window.getSelection(),M=I&&I.anchorNode,_=M?M===C||M.contains(C):!1;if(_)return!1;var B=$r(P,C);if(!B)return!0;if(B?E=P:(E=P==="v"?"h":"v",B=$r(P,C)),!B)return!1;if(!r.current&&"changedTouches"in m&&(b||x)&&(r.current=E),!E)return!0;var A=r.current||E;return Pl(A,g,m,A==="h"?b:x)},[]),u=l.useCallback(function(m){var g=m;if(!(!st.length||st[st.length-1]!==s)){var y="deltaY"in g?Br(g):Lt(g),w=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&Tl(E.delta,y)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var b=(i.current.shards||[]).map(Wr).filter(Boolean).filter(function(E){return E.contains(g.target)}),x=b.length>0?a(g,b[0]):!i.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),d=l.useCallback(function(m,g,y,w){var b={name:m,delta:g,target:y,should:w,shadowParent:Il(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),h=l.useCallback(function(m){n.current=Lt(m),r.current=void 0},[]),f=l.useCallback(function(m){d(m.type,Br(m),m.target,a(m,e.lockRef.current))},[]),p=l.useCallback(function(m){d(m.type,Lt(m),m.target,a(m,e.lockRef.current))},[]);l.useEffect(function(){return st.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,ot),document.addEventListener("touchmove",u,ot),document.addEventListener("touchstart",h,ot),function(){st=st.filter(function(m){return m!==s}),document.removeEventListener("wheel",u,ot),document.removeEventListener("touchmove",u,ot),document.removeEventListener("touchstart",h,ot)}},[]);var c=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(s,{styles:Ol(o)}):null,c?l.createElement(wl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Il(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _l=il(ls,Al);var ms=l.forwardRef(function(e,t){return l.createElement(nn,Ce({},e,{ref:t,sideCar:_l}))});ms.classNames=nn.classNames;var Dl=Object.defineProperty,K=(e,t)=>Dl(e,"name",{value:t,configurable:!0}),Nl=["Enter"," "],kl=["ArrowDown","PageUp","Home"],hs=["ArrowUp","PageDown","End"],Ll=[...kl,...hs],rn="Menu",[jn,Fl,jl]=Jn(rn),[Ze,vs]=We(rn,[jl,Zt,ns]),ar=Zt(),gs=ns(),[$l,Et]=Ze(rn),[Bl,cr]=Ze(rn),Wl=K(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=ar(t),[u,d]=l.useState(null),h=l.useRef(!1),f=Me(s),p=tr(o);return l.useEffect(()=>{const c=K(()=>{h.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},"handleKeyDown"),v=K(()=>h.current=!1,"handlePointer");return document.addEventListener("keydown",c,{capture:!0}),()=>{document.removeEventListener("keydown",c,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.useEffect(()=>{if(!n)return;const c=K(()=>f(!1),"handleBlur");return window.addEventListener("blur",c),()=>window.removeEventListener("blur",c)},[n,f]),S.jsx(Co,{...a,children:S.jsx($l,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:S.jsx(Bl,{scope:t,onClose:l.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:h,dir:p,modal:i,children:r})})})},"Menu"),Hl=l.forwardRef(K(function(t,n){const{__scopeMenu:r,...o}=t,s=ar(r);return S.jsx(Eo,{...s,...o,ref:n})},"MenuAnchor")),ys="MenuPortal",[zl,Vl]=Ze(ys,{forceMount:void 0}),Ul=K(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Et(ys,t);return S.jsx(zl,{scope:t,forceMount:n,children:S.jsx(Jt,{present:n||s.open,children:S.jsx(Ro,{asChild:!0,container:o,children:r})})})},"MenuPortal"),Fe="MenuContent",[Yl,ws]=Ze(Fe),Kl=l.forwardRef(K(function(t,n){const r=Vl(Fe,t.__scopeMenu),{forceMount:o=r.forceMount,...s}=t,i=Et(Fe,t.__scopeMenu),a=cr(Fe,t.__scopeMenu);return S.jsx(jn.Provider,{scope:t.__scopeMenu,children:S.jsx(Jt,{present:o||i.open,children:S.jsx(jn.Slot,{scope:t.__scopeMenu,children:a.modal?S.jsx(Gl,{...s,ref:n}):S.jsx(Xl,{...s,ref:n})})})})},"MenuContent")),Gl=l.forwardRef(K(function(t,n){const r=Et(Fe,t.__scopeMenu),o=l.useRef(null),s=Q(n,o);return l.useEffect(()=>{const i=o.current;if(i)return qc(i)},[]),S.jsx(bs,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:H(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),Xl=l.forwardRef(K(function(t,n){const r=Et(Fe,t.__scopeMenu);return S.jsx(bs,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),ql=je("MenuContent.ScrollLock"),bs=l.forwardRef(K(function(t,n){const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:c,onDismiss:v,disableOutsideScroll:m,...g}=t,y=Et(Fe,r),w=cr(Fe,r),b=ar(r),x=gs(r),E=Fl(r),[C,P]=l.useState(null),I=l.useRef(null),M=Q(n,I,y.onContentChange),_=l.useRef(0),B=l.useRef(""),A=l.useRef(0),k=l.useRef(null),F=l.useRef("right"),Y=l.useRef(0),W=m?ms:l.Fragment,D=m?{as:ql,allowPinchZoom:!0}:void 0,j=K(T=>{var ce,me;const Z=B.current+T,L=E().filter(ne=>!ne.disabled),$=document.activeElement,V=(ce=L.find(ne=>ne.ref.current===$))==null?void 0:ce.textValue,X=L.map(ne=>ne.textValue),pe=Rs(X,Z,V),z=(me=L.find(ne=>ne.textValue===pe))==null?void 0:me.ref.current;K(function ne(he){B.current=he,window.clearTimeout(_.current),he!==""&&(_.current=window.setTimeout(()=>ne(""),1e3))},"updateSearch")(Z),z&&setTimeout(()=>z.focus())},"handleTypeaheadSearch");l.useEffect(()=>()=>window.clearTimeout(_.current),[]),rr();const O=l.useCallback(T=>{var L,$;return F.current===((L=k.current)==null?void 0:L.side)&&Ts(T,($=k.current)==null?void 0:$.area)},[]);return S.jsx(Yl,{scope:r,searchRef:B,onItemEnter:l.useCallback(T=>{O(T)&&T.preventDefault()},[O]),onItemLeave:l.useCallback(T=>{var Z;O(T)||((Z=I.current)==null||Z.focus(),P(null))},[O]),onTriggerLeave:l.useCallback(T=>{O(T)&&T.preventDefault()},[O]),pointerGraceTimerRef:A,onPointerGraceIntentChange:l.useCallback(T=>{k.current=T},[]),children:S.jsx(W,{...D,children:S.jsx(Ic,{asChild:!0,trapped:s,onMountAutoFocus:H(i,T=>{var Z;T.preventDefault(),(Z=I.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:S.jsx(to,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:c,onDismiss:v,children:S.jsx(Uc,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:H(d,T=>{w.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:S.jsx(So,{role:"menu","aria-orientation":"vertical","data-state":xs(y.open),"data-radix-menu-content":"",dir:w.dir,...b,...g,ref:M,style:{outline:"none",...g.style},onKeyDown:H(g.onKeyDown,T=>{const L=T.target.closest("[data-radix-menu-content]")===T.currentTarget,$=T.ctrlKey||T.altKey||T.metaKey,V=T.key.length===1;L&&(T.key==="Tab"&&T.preventDefault(),!$&&V&&j(T.key));const X=I.current;if(T.target!==X||!Ll.includes(T.key))return;T.preventDefault();const z=E().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);hs.includes(T.key)&&z.reverse(),Es(z)}),onBlur:H(t.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(_.current),B.current="")}),onPointerMove:H(t.onPointerMove,Ut(T=>{const Z=T.target,L=Y.current!==T.clientX;if(T.currentTarget.contains(Z)&&L){const $=T.clientX>Y.current?"right":"left";F.current=$,Y.current=T.clientX}}))})})})})})})},"MenuContentImpl")),$n="MenuItem",Hr="menu.itemSelect",Zl=l.forwardRef(K(function(t,n){const{disabled:r=!1,onSelect:o,...s}=t,i=l.useRef(null),a=cr($n,t.__scopeMenu),u=ws($n,t.__scopeMenu),d=Q(n,i),h=l.useRef(!1),f=K(()=>{const p=i.current;if(!r&&p){const c=new CustomEvent(Hr,{bubbles:!0,cancelable:!0});p.addEventListener(Hr,v=>o==null?void 0:o(v),{once:!0}),Hn(p,c),c.defaultPrevented?h.current=!1:a.onClose()}},"handleSelect");return S.jsx(Ql,{...s,ref:d,disabled:r,onClick:H(t.onClick,f),onPointerDown:p=>{var c;(c=t.onPointerDown)==null||c.call(t,p),h.current=!0},onPointerUp:H(t.onPointerUp,p=>{var c;h.current||(c=p.currentTarget)==null||c.click()}),onKeyDown:H(t.onKeyDown,p=>{r||p.target!==p.currentTarget||u.searchRef.current!==""&&p.key===" "||Nl.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})},"MenuItem")),Ql=l.forwardRef(K(function(t,n){const{__scopeMenu:r,disabled:o=!1,textValue:s,...i}=t,a=ws($n,r),u=gs(r),d=l.useRef(null),h=Q(n,d),[f,p]=l.useState(!1),[c,v]=l.useState("");return l.useEffect(()=>{const m=d.current;m&&v((m.textContent??"").trim())},[i.children]),S.jsx(jn.ItemSlot,{scope:r,disabled:o,textValue:s??c,children:S.jsx(Yc,{asChild:!0,...u,focusable:!o,children:S.jsx(fe.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:h,onPointerMove:H(t.onPointerMove,Ut(m=>{o?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:H(t.onPointerLeave,Ut(m=>a.onItemLeave(m))),onFocus:H(t.onFocus,()=>p(!0)),onBlur:H(t.onBlur,()=>p(!1))})})})},"MenuItemImpl")),Jl="MenuRadioGroup",[Du,Nu]=Ze(Jl,{value:void 0,onValueChange:K(()=>{},"onValueChange")}),eu="MenuItemIndicator",[ku,Lu]=Ze(eu,{checked:!1}),tu=l.forwardRef(K(function(t,n){const{__scopeMenu:r,...o}=t;return S.jsx(fe.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),nu="MenuSub",[Fu,ju]=Ze(nu);function xs(e){return e?"open":"closed"}K(xs,"getOpenState");function Cs(e){return e==="indeterminate"}K(Cs,"isIndeterminate");function ru(e){return Cs(e)?"indeterminate":e?"checked":"unchecked"}K(ru,"getCheckedState");function Es(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}K(Es,"focusFirst");function Ss(e,t){return e.map((n,r)=>e[(t+r)%e.length])}K(Ss,"wrapArray");function Rs(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Ss(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}K(Rs,"getNextMatch");function Ps(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],u=t[i],d=a.x,h=a.y,f=u.x,p=u.y;h>r!=p>r&&n<(f-d)*(r-h)/(p-h)+d&&(o=!o)}return o}K(Ps,"isPointInPolygon");function Ts(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ps(n,t)}K(Ts,"isPointerInGraceArea");function Ut(e){return t=>t.pointerType==="mouse"?e(t):void 0}K(Ut,"whenMouse");var ou=Wl,su=Hl,iu=Ul,au=Kl,cu=Zl,lu=tu,uu=Object.defineProperty,pt=(e,t)=>uu(e,"name",{value:t,configurable:!0}),lr="DropdownMenu",[du,$u]=We(lr,[vs]),mt=vs(),[fu,Os]=du(lr),pu=pt(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,u=mt(t),d=l.useRef(null),[h,f]=en({prop:o,defaultProp:s??!1,onChange:i,caller:lr});return S.jsx(fu,{scope:t,triggerId:gt(),triggerRef:d,contentId:gt(),open:h,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(p=>!p),[f]),modal:a,children:S.jsx(ou,{...u,open:h,onOpenChange:f,dir:r,modal:a,children:n})})},"DropdownMenu"),mu="DropdownMenuTrigger",hu=l.forwardRef(pt(function(t,n){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=t,i=Os(mu,r),a=mt(r),u=Q(n,i.triggerRef);return S.jsx(su,{asChild:!0,...a,children:S.jsx(fe.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:u,onPointerDown:H(t.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(i.onOpenToggle(),i.open||d.preventDefault())}),onKeyDown:H(t.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&i.onOpenToggle(),d.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})},"DropdownMenuTrigger")),vu=pt(e=>{const{__scopeDropdownMenu:t,...n}=e,r=mt(t);return S.jsx(iu,{...r,...n})},"DropdownMenuPortal"),gu="DropdownMenuContent",yu=l.forwardRef(pt(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=Os(gu,r),i=mt(r),a=l.useRef(!1);return S.jsx(au,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:n,onCloseAutoFocus:H(t.onCloseAutoFocus,u=>{var d;a.current||(d=s.triggerRef.current)==null||d.focus(),a.current=!1,u.preventDefault()}),onInteractOutside:H(t.onInteractOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,f=d.button===2||h;(!s.modal||f)&&(a.current=!0)}),style:{...t.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)"}})},"DropdownMenuContent")),wu=l.forwardRef(pt(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=mt(r);return S.jsx(cu,{...s,...o,ref:n})},"DropdownMenuItem")),bu=l.forwardRef(pt(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=mt(r);return S.jsx(lu,{...s,...o,ref:n})},"DropdownMenuSeparator")),Bu=pu,Wu=hu,Hu=vu,zu=yu,Vu=wu,Uu=bu;export{Ru as $,_u as C,Vu as I,Iu as P,Mu as R,Eu as S,Au as T,Ou as a,Hu as b,zu as c,Uu as d,Bu as e,Wu as f,Su as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-D42j59Cc.js","assets/vendor-react-CDaMBvJU.js","assets/index-B4hHecQs.js","assets/vendor-ui-dpI0b3Ao.js","assets/index-Bfe1AHR3.css","assets/FilterPills-BG7PY8Ts.js","assets/usePluginData-Dhhi3YQs.js","assets/fetchJson-D-dWeu1j.js","assets/client-Cw4K1Nx3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"./index-B4hHecQs.js";import{r as t}from"./vendor-react-CDaMBvJU.js";import{d as r}from"./client-Cw4K1Nx3.js";const o={mode:"just",label:"Just Runner",icon:"📜",description:"Just 任务日志与执行",order:50},i=[{name:"recipe",label:"Recipe",type:"string",description:"选中的 recipe 名"},{name:"task",label:"任务",type:"string",description:"活跃任务 id"}],s=r({manifest:o,params:i,workspace:t.lazy(()=>e(()=>import("./Workspace-D42j59Cc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))}),c=Object.freeze(Object.defineProperty({__proto__:null,default:s},Symbol.toStringTag,{value:"Module"}));export{o as m,c as w};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-DXhpVGbA.js","assets/vendor-react-CDaMBvJU.js","assets/CodeViewer-B7R0ZVR6.js","assets/vendor-ui-dpI0b3Ao.js","assets/fetchJson-D-dWeu1j.js","assets/index-B4hHecQs.js","assets/index-Bfe1AHR3.css","assets/CodeViewer-BTcE7LSd.css","assets/client-Cw4K1Nx3.js","assets/Sidebar-BFf7prry.js","assets/FileIcon-gTgtllQ_.js","assets/usePluginData-Dhhi3YQs.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"./index-B4hHecQs.js";import{r}from"./vendor-react-CDaMBvJU.js";import{d as t}from"./client-Cw4K1Nx3.js";const o={mode:"view",label:"项目浏览",icon:"👁️",description:"openspec / docs / 文档预览",order:20},i=[{name:"wt",label:"Worktree 路径",type:"string",description:"worktree 绝对路径"},{name:"file",label:"文件路径",type:"string",description:"预览文件相对路径"},{name:"filter",label:"过滤词",type:"string",description:"文件树过滤词"}],a=t({manifest:o,params:i,workspace:r.lazy(()=>e(()=>import("./Workspace-DXhpVGbA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),sidebar:r.lazy(()=>e(()=>import("./Sidebar-BFf7prry.js"),__vite__mapDeps([9,1,5,3,6,10,11,4])))}),p=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{o as m,p as w};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-B7_x75Fc.js","assets/vendor-react-CDaMBvJU.js","assets/index-B4hHecQs.js","assets/vendor-ui-dpI0b3Ao.js","assets/index-Bfe1AHR3.css","assets/usePluginData-Dhhi3YQs.js","assets/fetchJson-D-dWeu1j.js","assets/client-Cw4K1Nx3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"./index-B4hHecQs.js";import{r}from"./vendor-react-CDaMBvJU.js";import{d as t}from"./client-Cw4K1Nx3.js";const o={mode:"stats",label:"项目统计",icon:"📊",description:"项目文件统计 · 扫描生成",order:10},a=[{name:"card",label:"钻取来源",type:"string",description:"钻取来源(worktree/dirty),view 侧读取后高亮"}],i=t({manifest:o,params:a,workspace:r.lazy(()=>e(()=>import("./Workspace-B7_x75Fc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])))}),l=Object.freeze(Object.defineProperty({__proto__:null,default:i},Symbol.toStringTag,{value:"Module"}));export{o as m,l as w};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-BimPBKII.js","assets/vendor-react-CDaMBvJU.js","assets/FilterPills-BG7PY8Ts.js","assets/index-B4hHecQs.js","assets/vendor-ui-dpI0b3Ao.js","assets/index-Bfe1AHR3.css","assets/CodeViewer-B7R0ZVR6.js","assets/fetchJson-D-dWeu1j.js","assets/CodeViewer-BTcE7LSd.css","assets/client-Cw4K1Nx3.js","assets/Sidebar-Bv_jdwYG.js","assets/FileIcon-gTgtllQ_.js","assets/usePluginData-Dhhi3YQs.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"./index-B4hHecQs.js";import{r as o}from"./vendor-react-CDaMBvJU.js";import{d as t}from"./client-Cw4K1Nx3.js";const r={mode:"design",label:"设计资产",icon:"🎨",description:"设计资产分类浏览 · zdesign",order:30},i=[{name:"type",label:"资产类型",type:"string",description:"page/component/icon/token/md/video/audio/pdf/font"},{name:"asset",label:"选中资产",type:"string",description:"资产相对路径"},{name:"folder",label:"当前文件夹",type:"string",description:"限定展示的资产路径前缀"}],n=t({manifest:r,params:i,workspace:o.lazy(()=>e(()=>import("./Workspace-BimPBKII.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),sidebar:o.lazy(()=>e(()=>import("./Sidebar-Bv_jdwYG.js"),__vite__mapDeps([10,1,11,3,4,5,12,7])))}),p=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"}));export{r as m,p as w};
|
package/dist/web/index.html
CHANGED
|
@@ -5,8 +5,31 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
7
7
|
<title>zdashboard · 项目洞察</title>
|
|
8
|
-
<script
|
|
9
|
-
|
|
8
|
+
<script>
|
|
9
|
+
/* FOUC 预置:赶在首帧前写入 data-mode/data-theme。
|
|
10
|
+
判定逻辑单源 src/web/lib/themeBoot.ts(resolveThemeBoot),此处为内联镜像,改动需同步。 */
|
|
11
|
+
(function () {
|
|
12
|
+
try {
|
|
13
|
+
var m = localStorage.getItem('zd-mode');
|
|
14
|
+
if (!m) {
|
|
15
|
+
var legacy = localStorage.getItem('zdashboard-theme');
|
|
16
|
+
m = legacy === 'light' ? 'light' : 'dark';
|
|
17
|
+
localStorage.setItem('zd-mode', m);
|
|
18
|
+
localStorage.removeItem('zdashboard-theme');
|
|
19
|
+
}
|
|
20
|
+
if (m !== 'light' && m !== 'dark') m = 'dark';
|
|
21
|
+
var t = localStorage.getItem('zd-theme');
|
|
22
|
+
if (t !== 'default' && t !== 'pixel' && t !== 'slate') t = 'default';
|
|
23
|
+
var d = document.documentElement;
|
|
24
|
+
d.dataset.mode = m;
|
|
25
|
+
d.dataset.theme = t;
|
|
26
|
+
} catch (e) { /* localStorage 不可用时放弃预置,交由 bundle 侧兜底 */ }
|
|
27
|
+
})();
|
|
28
|
+
</script>
|
|
29
|
+
<script type="module" crossorigin src="/assets/index-B4hHecQs.js"></script>
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-CDaMBvJU.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-ui-dpI0b3Ao.js">
|
|
32
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Bfe1AHR3.css">
|
|
10
33
|
</head>
|
|
11
34
|
<body>
|
|
12
35
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as o,j as c}from"./index-veTBv7Qv.js";const m={".md":"md",".markdown":"md",".mdx":"md",".ts":"ts",".tsx":"tsx",".js":"js",".jsx":"jsx",".mjs":"mjs",".cjs":"mjs",".mts":"mjs",".cts":"mjs",".css":"css",".scss":"css",".less":"css",".html":"html",".htm":"html",".json":"json",".yaml":"json",".yml":"json",".toml":"json",".csv":"csv",".tsv":"csv",".sh":"sh",".bash":"sh",".zsh":"sh",".sql":"sh",".py":"py",".go":"py",".rs":"py",".java":"py",".svg":"svg",".png":"svg",".jpg":"svg",".jpeg":"svg",".gif":"svg",".webp":"svg",".ico":"svg"};function r(s){const t=s.toLowerCase();if(t==="justfile"||t==="makefile")return t;const n=s.lastIndexOf("."),e=n>=0?s.slice(n).toLowerCase():"";return m[e]??"unknown"}function i({name:s,active:t}){const{icon:n}=o(),e=n(r(s));return e?c.jsx("span",{className:`h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center ${t?"text-primary":"text-muted-foreground"}`,children:e}):null}export{i as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,e as n}from"./index-veTBv7Qv.js";function b({items:l,value:d,onChange:c,ariaLabel:p,renderExtra:a,renderLabel:o,className:t,...u}){return e.jsx("div",{role:"group","aria-label":p,className:n("inline-flex items-center gap-1.5 flex-wrap",t),...u,children:l.map(r=>{const s=r.key===d;return e.jsxs("button",{type:"button","aria-pressed":s,onClick:()=>c(r.key),className:n("inline-flex items-center gap-1.5 h-7 px-2.5 rounded-[var(--radius-full)] border text-xs transition-colors",s?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-foreground hover:border-muted-foreground/40",r.className),children:[r.renderLabel?r.renderLabel(r):o?o(r):e.jsx("span",{children:r.label}),r.badge&&e.jsx("span",{className:"opacity-80",children:r.badge}),r.renderExtra?r.renderExtra(r):a==null?void 0:a(r)]},r.key)})})}export{b as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as W,u as S,r as v,j as e}from"./index-veTBv7Qv.js";import{F as D}from"./FileIcon-DCL9OD6I.js";import{u as I}from"./usePluginData-mjHueOjf.js";function h(r,s){return!s||r.name.toLowerCase().includes(s)?!0:(r.children??[]).some(o=>h(o,s))}async function E(){const r=await fetch("/__worktrees",{cache:"no-store"}).then(a=>a.json()).catch(()=>[]),s={};await Promise.all(r.map(async a=>{try{const l=await fetch(`/__files?wt=${encodeURIComponent(a.path)}`,{cache:"no-store"}).then(i=>i.json());s[a.path]=l.tree??[]}catch{s[a.path]=[]}}));const o=await fetch("/__files",{cache:"no-store"}).then(a=>a.json()).then(a=>a.tree??[]).catch(()=>[]);return{worktrees:r,wtTrees:s,rootTree:o}}function y({node:r,depth:s,filter:o,current:a,onSelectFile:l}){const{icon:i}=S(),c=r.children??[],f=!!o&&r.name.toLowerCase().includes(o)?c:c.filter(n=>h(n,o)),[x,b]=v.useState(!r.defaultCollapsed),d=o?!0:x;return!f.length&&o?null:e.jsxs("div",{children:[(()=>{const n=r.name.match(/^([a-z]+)(?: \((\d+)\))?$/),p=n?i(n[1]):void 0;return e.jsxs("button",{onClick:()=>b(m=>!m),className:"w-full flex items-center gap-1.5 px-2 py-1 text-sm text-foreground hover:bg-muted rounded-md mx-1",style:{paddingLeft:8+s*14,width:"calc(100% - 8px)"},children:[e.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${d?"rotate-90":""}`,children:i("chevron-right")}),p?e.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:p}):e.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-colors",children:i(d?"folder-open":"folder")}),e.jsx("span",{className:"font-medium truncate",children:n?n[1]:r.name}),(n==null?void 0:n[2])&&e.jsx("span",{className:"ml-auto mr-1 shrink-0 rounded-full bg-muted px-1.5 text-xs font-mono text-muted-foreground",children:n[2]})]})})(),d&&f.map(n=>n.kind==="dir"?e.jsx(y,{node:n,depth:s+1,filter:o,current:a,onSelectFile:l},n.name+s):e.jsxs("button",{onClick:()=>n.path&&l(n.path),className:`w-full flex items-center gap-1.5 pr-2 py-1 text-sm hover:bg-muted rounded-md mx-1 ${a===n.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,style:{paddingLeft:20+s*14,width:"calc(100% - 8px)"},children:[e.jsx(D,{name:n.name,active:a===n.path}),e.jsx("span",{className:"truncate",children:n.name})]},n.path))]})}function O(){var N,k,C;const r=W(),s=r.params,o=s.get("file"),a=s.get("wt"),l=(s.get("filter")??"").toLowerCase(),i=s.get("card")==="dirty",{icon:c}=S(),[w,f]=v.useState(new Set),[x,b]=v.useState(!1),d=I("view:sidebar-trees",E,{subscribe:"files"}),n=((N=d.data)==null?void 0:N.worktrees)??[],p=((k=d.data)==null?void 0:k.wtTrees)??{},m=((C=d.data)==null?void 0:C.rootTree)??[],R=t=>{f(g=>{const u=new Set(g);return u.has(t)?u.delete(t):u.add(t),u})},_=()=>b(t=>!t),$=t=>{r.navigate({filter:t.trim()?t:null},{replace:!0})},F=n.length>0;return e.jsx("div",{className:"p-2 flex flex-col h-full",children:e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[e.jsx("input",{value:l,onChange:t=>$(t.target.value),placeholder:"过滤…","data-testid":"view-filter-input",className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),e.jsxs("div",{className:"py-1 flex-1 min-h-0 overflow-auto","data-testid":"view-tree-scroller",children:[F&&n.map(t=>{const u=(p[t.path]??[]).filter(j=>h(j,l));if(!u.length&&l)return null;const T=i&&t.dirty;return e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:()=>R(t.path),"data-drill-dirty":T?"true":void 0,className:`w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md ${T?"bg-warning/10 ring-1 ring-warning":""}`,children:[e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform",children:c("chevron-right",w.has(t.path)?"":"rotate-90")}),e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:c("git-branch")}),e.jsx("span",{className:"truncate",children:t.branch}),t.dirty&&e.jsx("span",{className:"ml-auto flex-none h-2 w-2 rounded-full bg-destructive shrink-0",title:"有未提交变更"})]}),!w.has(t.path)&&e.jsx("div",{className:"ml-2",children:u.map(j=>e.jsx(y,{node:j,depth:1,filter:l,current:a===t.path?o:null,onSelectFile:L=>r.navigate({wt:t.path,file:L})},j.name))})]},t.path)}),m.length>0&&(!l||m.some(t=>h(t,l)))&&e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:_,className:"w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md",children:[e.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${x?"":"rotate-90"}`,children:c("chevron-right")}),e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:c("git-branch")}),e.jsx("span",{children:"当前分支"})]}),!x&&e.jsx("div",{className:"ml-2",children:m.filter(t=>h(t,l)).map(t=>e.jsx(y,{node:t,depth:1,filter:l,current:a?null:o,onSelectFile:g=>r.navigate({wt:null,file:g})},t.name))})]})]})]})})}export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as x,u as d,r as m,j as s}from"./index-veTBv7Qv.js";import{F as f}from"./FileIcon-DCL9OD6I.js";import{u as h}from"./usePluginData-mjHueOjf.js";const b={page:"monitor",component:"blocks",icon:"shapes",token:"palette",md:"book-open",video:"video",audio:"audio-lines",pdf:"file-text",font:"type"},k=[{key:"page",label:"页面"},{key:"component",label:"组件"},{key:"icon",label:"图标"},{key:"token",label:"Tokens"},{key:"md",label:"文档"},{key:"video",label:"视频"},{key:"audio",label:"音频"},{key:"pdf",label:"PDF"},{key:"font",label:"字体"}];function N(){const n=x(),o=n.params,l=o.get("asset"),c=o.get("type"),a=o.get("folder");d();const r=h("design:/__design/assets",()=>fetch("/__design/assets",{cache:"no-store"}).then(t=>t.json()),{subscribe:"files"}),i=m.useMemo(()=>{const t=r.data;return t?k.map(u=>({...u,items:(t[u.key]??[]).filter(p=>!a||p.path.startsWith(a))})).filter(u=>u.items.length>0):[]},[r.data,a]),e=t=>n.navigate({type:t.type,asset:t.path});return s.jsxs("div",{children:[s.jsx("div",{className:"p-3 text-xs text-muted-foreground truncate",children:"设计资产"}),i.map(t=>s.jsx(g,{group:t,current:l&&c===t.key?l:null,onSelect:e},t.key))]})}function g({group:n,current:o,onSelect:l}){const[c,a]=m.useState(!0),{icon:r}=d(),i=b[n.key];return s.jsxs("div",{className:"mb-1.5 px-1",children:[s.jsxs("button",{onClick:()=>a(e=>!e),className:"w-full flex items-center gap-1.5 pt-2 pb-1 text-sm font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground rounded-md",children:[r("chevron-right",`h-3 w-3 shrink-0 transition-transform ${c?"rotate-90":""}`),i&&r(i,"h-3.5 w-3.5 shrink-0"),s.jsx("span",{className:"truncate",children:n.label}),s.jsx("span",{className:"ml-auto shrink-0 rounded-full bg-muted px-1.5 font-mono text-xs font-normal",children:n.items.length})]}),c&&n.items.map(e=>s.jsxs("button",{onClick:()=>l(e),className:`w-full text-left flex items-center gap-2 px-2.5 py-1.5 text-xs hover:bg-muted rounded-md ${o===e.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,children:[s.jsx(f,{name:e.name,active:o===e.path}),s.jsx("span",{className:"truncate",children:e.name}),e.ext&&s.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground/60",children:e.ext})]},e.path))]})}export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,e as g,u as b,a as p,b as j,f as v,P as N}from"./index-veTBv7Qv.js";import{u}from"./usePluginData-mjHueOjf.js";import{m as n}from"./web-DIZjnUb4.js";import"./client-Cw4K1Nx3.js";function y({value:o,className:l}){const r=Math.max(0,Math.min(100,o));return t.jsx("div",{className:g("rounded-[var(--radius-full)] bg-muted overflow-hidden",l),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuetext":`${r}%`,children:t.jsx("div",{className:"h-full rounded-[var(--radius-full)] bg-primary transition-all",style:{width:`${r}%`}})})}function P(o){var d,c;const{icon:l}=b(),r=p(n.mode,"h-5 w-5"),m=j(),a=u("stats:/__stats/data",()=>fetch("/__stats/data",{cache:"no-store"}).then(e=>e.json()),{subscribe:"files"}),i=u("stats:/__detect",()=>fetch("/__detect",{cache:"no-store"}).then(e=>e.json()));if(a.error)return t.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:t.jsxs("p",{children:["加载失败: ",a.error]})});if(!a.data)return t.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:t.jsx("p",{children:"加载中…"})});const s=a.data,x=Math.max(...s.byExt.map(e=>e.count),1),f=[{label:"文件",value:String(s.files),iconName:"file-text",drill:null},{label:"目录",value:String(s.dirs),iconName:"folder-tree",drill:null},{label:"总大小",value:v(s.totalSize),iconName:null,drill:null},{label:"Worktree",value:String(s.worktrees),iconName:"git-branch",drill:"worktree"},{label:"未提交",value:String(s.dirty??0),iconName:null,drill:"dirty"}],h=e=>m.navigate({p:"view",card:e});return t.jsx(N,{manifest:n,icon:r,breadcrumb:["插件",n.mode],children:t.jsxs("div",{className:"mx-auto h-full max-w-6xl overflow-auto rounded-lg border bg-background p-6 shadow-sm",children:[t.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"后端 fs 扫描 + 前端渲染 · 改文件即时刷新 · 点击卡片跳转"}),t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 mb-6",children:f.map(e=>t.jsxs("button",{type:"button",onClick:()=>e.drill&&h(e.drill),disabled:!e.drill,title:e.drill?`点击跳转至 ${e.label}`:void 0,className:`rounded-lg border bg-background p-4 text-left transition-colors ${e.drill?"hover:bg-muted/70 cursor-pointer":"cursor-default opacity-80"}`,children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xl font-bold",children:e.value}),e.iconName&&l(e.iconName,"h-4 w-4 text-muted-foreground/50")]}),t.jsx("div",{className:"text-sm text-muted-foreground mt-1",children:e.label})]},e.label))}),t.jsx("h2",{className:"text-xs font-medium text-muted-foreground mb-3",children:"文件类型 Top 10"}),t.jsx("div",{className:"space-y-2",children:s.byExt.map(e=>t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsx("span",{className:"w-16 font-mono text-foreground truncate",children:e.ext}),t.jsx(y,{value:parseFloat((e.count/x*100).toFixed(1)),className:"flex-1 h-2"}),t.jsx("span",{className:"w-8 text-right font-mono text-muted-foreground",children:e.count})]},e.ext))}),t.jsxs("div",{className:"mt-5 flex items-center gap-2 text-xs",children:[t.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded border ${(d=i.data)!=null&&d.hasJust?"text-success border-success/30 bg-success/10":"text-muted-foreground border-border"}`,children:["justfile ",(c=i.data)!=null&&c.hasJust?"✓":"✗"]}),typeof s.dirty=="number"&&t.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded border ${s.dirty?"text-warning border-warning/30 bg-warning/10":"text-success border-success/30 bg-success/10"}`,children:s.dirty?`${s.dirty} 未提交`:"clean"}),t.jsxs("span",{className:"text-muted-foreground",children:["root: ",s.root]})]})]})})}export{P as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as g,j as e,r as f,a as w,P as j,E as y}from"./index-veTBv7Qv.js";import{C as p,M as I,I as k}from"./CodeViewer-yUtAi1hT.js";import{m as b}from"./web-CsCyTuDw.js";import"./client-Cw4K1Nx3.js";function N({path:s}){const{icon:o}=g();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[o("file-question","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:s})]})})}function S({containerRef:s}){const{icon:o}=g(),[r,n]=f.useState([]),[h,x]=f.useState(null);f.useEffect(()=>{const t=s.current;if(!t)return;let i=!1;const l=()=>{if(i)return;const d=t.querySelectorAll("h1[id], h2[id], h3[id]"),u=[];d.forEach(a=>{var v;u.push({id:a.id,text:((v=a.textContent)==null?void 0:v.trim())??"",level:parseInt(a.tagName[1],10)})}),n(u)};l();const c=new MutationObserver(l);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{i=!0,c.disconnect()}},[s]),f.useEffect(()=>{const t=s.current;if(!t||!r.length)return;const i=new IntersectionObserver(l=>{const c=l.filter(d=>d.isIntersecting);if(c.length){const d=c.reduce((u,a)=>u.boundingClientRect.top<a.boundingClientRect.top?u:a);x(d.target.id)}},{root:t,rootMargin:"-60px 0px -70% 0px",threshold:0});return r.forEach(({id:l})=>{const c=t.querySelector(`#${CSS.escape(l)}`);c&&i.observe(c)}),()=>i.disconnect()},[r,s]);const m=t=>{var l;const i=(l=s.current)==null?void 0:l.querySelector(`#${CSS.escape(t)}`);i==null||i.scrollIntoView({behavior:"smooth",block:"start"})};return r.length?e.jsxs("nav",{className:"hidden md:flex w-44 shrink-0 flex-col border-l pl-3 py-2 overflow-y-auto","aria-label":"文档大纲",children:[e.jsxs("div",{className:"flex items-center gap-1 mb-2 text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[o("file-text","h-3 w-3"),e.jsx("span",{children:"大纲"})]}),e.jsx("ul",{className:"space-y-0.5",children:r.map(t=>e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>m(t.id),className:`w-full text-left text-sm leading-snug py-0.5 px-1.5 rounded truncate transition-colors ${h===t.id?"bg-primary/10 text-foreground font-medium":"text-muted-foreground hover:bg-muted/70"}`,style:{paddingLeft:6+(t.level-1)*10},children:t.text||t.id})},t.id))})]}):null}function C(s){const o=s.slice(s.lastIndexOf("/")+1).toLowerCase();if(o==="justfile"||o==="makefile")return p;const r=o.lastIndexOf("."),n=r>=0?o.slice(r):"";return n===".md"||n===".markdown"?I:[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(n)?k:[".sql",".txt",".csv",".tsv",".json",".yaml",".yml",".xml",".py",".js",".ts",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".cs",".swift",".kt",".scala",".sh",".bash",".zsh",".fish",".env",".gitignore",".dockerfile"].includes(n)?p:r===-1?p:N}function O({params:s}){const{icon:o}=g(),r=w(b.mode,"h-5 w-5"),n=s.get("file"),h=s.get("wt"),x=f.useRef(null),m=n?C(n):null;return e.jsx(j,{manifest:b,icon:r,breadcrumb:["插件",h??"当前分支",...n?[n]:[]],children:e.jsx("div",{className:"mx-auto h-full max-w-5xl bg-background border rounded-lg shadow-sm overflow-hidden flex flex-col",children:n&&m?e.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[e.jsx("div",{ref:x,className:"flex-1 min-h-0 overflow-auto",children:e.jsx(m,{path:n})}),e.jsx(S,{containerRef:x})]}):e.jsx(y,{icon:o("eye","h-6 w-6"),title:"从左侧选择文件预览",hint:"支持 Markdown、图片、代码等格式"})})})}export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as u,u as j,a as _,b as I,P as R,E as F}from"./index-veTBv7Qv.js";import{F as S}from"./FilterPills-BD2vsIx2.js";import{C as U,M as L,I as E}from"./CodeViewer-yUtAi1hT.js";import{m as v}from"./web-BODcUPmi.js";import"./client-Cw4K1Nx3.js";function $({path:t}){return e.jsx("iframe",{src:"/__design/asset?path="+encodeURIComponent(t),title:"预览",className:"w-full h-full border-0 bg-white"})}const k=/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i,y=/font|family|type/i;function A({path:t}){const[m,d]=u.useState([]),[i,a]=u.useState(!0);return u.useEffect(()=>{let s=!1;return a(!0),d([]),fetch("/__design/asset?path="+encodeURIComponent(t),{cache:"no-store"}).then(o=>o.text()).then(o=>{if(s)return;const c=o.match(/--[A-Za-z0-9_-]+\s*:\s*[^;}\n]+/g)??[];if(!c.length){d([]),a(!1);return}const r=l=>{const N=l.indexOf(":"),V=l.slice(0,N).trim(),C=l.slice(N+1).trim();return{name:V,value:C}},n=l=>/^(#([0-9a-fA-F]{3,8})\b|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(l),p=l=>y.test(l),x=c.map(r),f=x.filter(l=>n(l.value)),g=x.filter(l=>!n(l.value)&&p(l.name)),b=x.filter(l=>!n(l.value)&&!p(l.name)),h=[];f.length&&h.push({label:`配色 · ${f.length}`,items:f}),g.length&&h.push({label:`字体 · ${g.length}`,items:g}),b.length&&h.push({label:`其他 · ${b.length}`,items:b}),d(h),a(!1)}).catch(()=>{s||(d([]),a(!1))}),()=>{s=!0}},[t]),i?e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"解析中…"}):m.length?e.jsx("div",{className:"p-8 flex flex-col gap-7",children:m.map(s=>{const o=s.items.some(r=>k.test(r.value)),c=s.items.some(r=>y.test(r.name));return e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 text-sm font-semibold uppercase text-muted-foreground",children:s.label}),o?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.filter(r=>k.test(r.value)).map(({name:r,value:n})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"h-[var(--design-preview-h)] border-b",style:{background:n}}),e.jsx("div",{className:"px-2.5 pt-2 font-mono text-sm break-all",children:r}),e.jsx("div",{className:"px-2.5 pb-2 text-xs text-muted-foreground",children:n})]},r))}):c?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.map(({name:r,value:n})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"grid h-[var(--design-preview-h)] place-items-center text-2xl",style:{fontFamily:n},children:"Aa"}),e.jsx("div",{className:"px-2.5 font-mono text-sm",children:r})]},r))}):e.jsx("div",{className:"flex flex-col gap-1",children:s.items.map(({name:r,value:n})=>e.jsxs("div",{className:"flex justify-between gap-3 px-2.5 py-1.5 rounded border bg-background text-xs",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx("span",{className:"text-muted-foreground",children:n})]},r))})]},s.label)})}):e.jsx("p",{className:"p-3 text-xs",children:"未发现 CSS 变量"})}const w=t=>"/__design/asset?path="+encodeURIComponent(t);function O({path:t}){return e.jsx(L,{path:t,resolve:w})}function M({path:t}){return e.jsx(E,{path:t,resolve:w})}function P({path:t}){return e.jsx(U,{path:t,resolve:w})}function W({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("video",{src:"/__design/asset?path="+encodeURIComponent(t),controls:!0,className:"max-w-full max-h-[80vh] rounded border"})})}function z({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("audio",{src:"/__design/asset?path="+encodeURIComponent(t),controls:!0,className:"w-full max-w-2xl"})})}function T({path:t}){return e.jsx("div",{className:"grid place-items-center p-8 h-full",children:e.jsx("iframe",{src:"/__design/asset?path="+encodeURIComponent(t),title:"PDF",className:"w-full h-full max-h-[80vh] rounded border bg-white"})})}function D({path:t}){const[m,d]=u.useState("");return u.useEffect(()=>{let i=!1,a="",s=null;return fetch("/__design/asset?path="+encodeURIComponent(t)).then(o=>o.blob()).then(async o=>{var c;if(!i){if(a=URL.createObjectURL(o),s=new FontFace("zd-font-preview",`url(${a})`),await s.load(),i){(c=s.dispose)==null||c.call(s);return}document.fonts.add(s),d(t.split("/").pop()??t)}}).catch(()=>{i||d(t.split("/").pop()??t)}),()=>{var o;if(i=!0,s)try{document.fonts.delete(s),(o=s.dispose)==null||o.call(s)}catch{}a&&URL.revokeObjectURL(a)}},[t]),e.jsxs("div",{className:"h-full overflow-auto p-8 grid gap-6 place-content-center text-center",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-mono break-all",children:t}),e.jsx("div",{className:"text-5xl",style:{fontFamily:m?"'zd-font-preview', serif":"serif"},children:"Aa 字体预览 0123"})]})}function H({path:t}){const{icon:m}=j();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[m("image-off","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:t})]})})}const K={page:$,icon:M,token:A,md:O,video:W,audio:z,pdf:T,component:P,font:D};function Z(t){return K[t]??H}function q({mode:t,onMode:m,w:d,h:i,onW:a,onH:s}){const{icon:o}=j(),c=[{v:0,icon:o("monitor","h-3.5 w-3.5"),label:"桌面"},{v:768,icon:o("tablet","h-3.5 w-3.5"),label:"768"},{v:375,icon:o("smartphone","h-3.5 w-3.5"),label:"375"},{v:"custom",icon:o("sliders-horizontal","h-3.5 w-3.5"),label:"自定义"}],r="w-[var(--design-input-w)] h-7 px-1 text-center text-xs rounded border border-border bg-background text-foreground [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none focus:outline-none focus:border-primary";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-muted",children:e.jsx(S,{items:c.map(n=>({key:String(n.v),label:n.label,renderLabel:()=>e.jsxs(e.Fragment,{children:[n.icon,e.jsx("span",{className:"hidden sm:inline",children:n.label})]})})),value:String(t),onChange:n=>m(n==="0"?0:n==="custom"?"custom":Number(n)),ariaLabel:"视口模式"})}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx("input",{type:"number",value:d,min:280,max:3e3,step:8,onChange:n=>a(Number(n.target.value)),"aria-label":"自定义宽度",className:r}),e.jsx("span",{className:"text-muted-foreground/70",children:"×"}),e.jsx("input",{type:"number",value:i,min:400,max:3e3,step:8,onChange:n=>s(Number(n.target.value)),"aria-label":"自定义高度",className:r}),e.jsx("span",{className:"text-sm text-muted-foreground/70",children:"px"})]})]})}function Y({params:t}){const{icon:m}=j(),d=_(v.mode,"h-5 w-5");I();const i=t.get("type")??"",a=t.get("asset"),[s,o]=u.useState(0),[c,r]=u.useState(1024),[n,p]=u.useState(768),x=a?Z(i):null,f=s===0?"桌面":s==="custom"?`${c} × ${n}`:`${s}px`;return e.jsx(R,{manifest:v,icon:d,breadcrumb:["插件",v.mode,...i?[i]:[],...a?[a]:[]],children:e.jsx("div",{className:"mx-auto h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:a&&x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"h-[var(--design-toolbar-h)] flex-none flex items-center justify-between px-3.5 border-b bg-background text-xs",children:[e.jsx("span",{className:"font-mono truncate",children:a}),e.jsx("span",{className:"text-muted-foreground ml-3 flex-none",children:f}),e.jsx(q,{mode:s,onMode:o,w:c,h:n,onW:r,onH:p})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:i==="page"?e.jsx("div",{className:"mx-auto bg-background overflow-hidden",style:{maxWidth:s===0?void 0:s==="custom"?c:s,height:s==="custom"?n:"100%"},children:e.jsx(x,{path:a})}):e.jsx("div",{className:"mx-auto max-w-5xl h-full overflow-auto",children:e.jsx(x,{path:a})})})]}):e.jsx(F,{icon:m("palette","h-6 w-6"),title:"从左侧选择一个资产预览",hint:"点左侧折叠钮展开资产树 · 改文件即时刷新"})})})}export{Y as default};
|