@tresjs/nuxt 5.0.1 → 5.0.2

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.
@@ -0,0 +1,5 @@
1
+ import{i as Ki,f as Rs,g as sl,h as k,j as ac,r as O,k as na,l as _e,m as Lr,n as qn,p as Ga,q as ni,s as Ye,v as gt,x as oc,y as Hr,z as al,A as ol,B as Ai,C as ll,D as Re,E as pt,F as z,G as De,H as rt,I as vt,J as A,K as f,L as Y,M as C,o as v,w as _,N as H,P as re,O as lc,Q as ra,R as uc,S as pi,T as ts,U as cc,V as dc,W as is,X as Wa,b as F,Y as kn,Z as sn,$ as $t,a0 as R,a1 as oe,a2 as le,a3 as En,a4 as sa,a5 as Fn,a6 as On,c as V,a7 as we,a8 as Xe,a9 as ht,aa as fe,ab as an,ac as ul,ad as tt,ae as hc,af as fc,ag as Ei,ah as cl,ai as pc,aj as qt,ak as Ce,al as mc,am as zn,an as gc,ao as dl,ap as yc,aq as hl,ar as vc,as as aa,at as bc,au as Ge,av as xc,d as ce,t as Z,aw as Tn,ax as Nr,ay as wc,az as _c,aA as Ar,aB as Pt,aC as Cc,aD as oa,aE as Sc,aF as Ac,aG as Mc,aH as fl,aI as Bc,aJ as qc,aK as kc,aL as Ec,aM as Fc,aN as Ka,aO as la,aP as je,aQ as Oc,aR as zc,aS as Tc,aT as Ic,aU as Te,aV as lt,a as I,aW as de,aX as T,aY as Ft,aZ as on,a_ as In,a$ as Pc,b0 as Rc,b1 as Dc,b2 as qr,b3 as ua,b4 as $c,b5 as pl,b6 as Lc,_ as ml,b7 as ca,b8 as gl,b9 as Pe,ba as ln,bb as da,bc as Hc,bd as Nc,be as Vc,bf as yl,bg as Uc,bh as xi,bi as vl,bj as jc,bk as Gc,bl as Wc,bm as ns}from"#entry";function Kc(n,e=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY){return Math.min(t,Math.max(e,n))}function Jn(n,e){let t=n;const i=e.toString(),r=i.indexOf("."),s=r>=0?i.length-r:0;if(s>0){const a=10**s;t=Math.round(t*a)/a}return t}function Xc(n,e,t,i){e=Number(e),t=Number(t);const r=(n-(Number.isNaN(e)?0:e))%i;let s=Jn(Math.abs(r)*2>=i?n+Math.sign(r)*(i-Math.abs(r)):n-r,i);return Number.isNaN(e)?!Number.isNaN(t)&&s>t&&(s=Math.floor(Jn(t/i,i))*i):s<e?s=e:!Number.isNaN(t)&&s>t&&(s=e+Math.floor(Jn((t-e)/i,i))*i),s=Jn(s,i),s}function Xa(n,e){return Ki(n)?!1:Array.isArray(n)?n.some(t=>Rs(t,e)):Rs(n,e)}const Yc=["INPUT","TEXTAREA"];function Jc(n,e,t,i={}){if(!e||i.enableIgnoredElement&&Yc.includes(e.nodeName))return null;const{arrowKeyOptions:r="both",attributeName:s="[data-reka-collection-item]",itemsArray:a=[],loop:o=!0,dir:l="ltr",preventScroll:u=!0,focus:c=!1}=i,[d,h,p,m,g,y]=[n.key==="ArrowRight",n.key==="ArrowLeft",n.key==="ArrowUp",n.key==="ArrowDown",n.key==="Home",n.key==="End"],x=p||m,b=d||h;if(!g&&!y&&(!x&&!b||r==="vertical"&&b||r==="horizontal"&&x))return null;const w=t?Array.from(t.querySelectorAll(s)):a;if(!w.length)return null;u&&n.preventDefault();let S=null;return b||x?S=bl(w,e,{goForward:x?m:l==="ltr"?d:h,loop:o}):g?S=w.at(0)||null:y&&(S=w.at(-1)||null),c&&S?.focus(),S}function bl(n,e,t,i=n.length){if(--i===0)return null;const r=n.indexOf(e),s=t.goForward?r+1:r-1;if(!t.loop&&(s<0||s>=n.length))return null;const a=(s+n.length)%n.length,o=n[a];return o?o.hasAttribute("disabled")&&o.getAttribute("disabled")!=="false"?bl(n,o,t,i):o:null}const Zc=sl(()=>{const n=O(new Map),e=O(),t=k(()=>{for(const a of n.value.values())if(a)return!0;return!1}),i=na({scrollBody:O(!0)});let r=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",Ga&&r?.(),e.value=void 0};return _e(t,(a,o)=>{if(!Lr)return;if(!a){o&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=i.scrollBody?.value?typeof i.scrollBody.value=="object"?qn({padding:i.scrollBody.value.padding===!0?l:i.scrollBody.value.padding,margin:i.scrollBody.value.margin===!0?l:i.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),Ga&&(r=ni(document,"touchmove",d=>Qc(d),{passive:!1})),Ye(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),n});function ha(n){const e=Math.random().toString(36).substring(2,7),t=Zc();t.value.set(e,n??!1);const i=k({get:()=>t.value.get(e)??!1,set:r=>t.value.set(e,r)});return ac(()=>{t.value.delete(e)}),i}function xl(n){const e=window.getComputedStyle(n);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&n.clientWidth<n.scrollWidth||e.overflowY==="auto"&&n.clientHeight<n.scrollHeight)return!0;{const t=n.parentNode;return!(t instanceof Element)||t.tagName==="BODY"?!1:xl(t)}}function Qc(n){const e=n||window.event,t=e.target;return t instanceof Element&&xl(t)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function Vr(n){const e=na({dir:O("ltr")});return k(()=>n?.value||e.dir?.value||"ltr")}let rs=0;function wl(){gt(n=>{if(!Lr)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??Ya()),document.body.insertAdjacentElement("beforeend",e[1]??Ya()),rs++,n(()=>{rs===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(t=>t.remove()),rs--})})}function Ya(){const n=document.createElement("span");return n.setAttribute("data-reka-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}function _l(n){return k(()=>oc(n)?!!Hr(n)?.closest("form"):!0)}function Cl(n,e){const t=al(!1,300),i=O(null),r=ol();function s(){i.value=null,t.value=!1}function a(o,l){const u=o.currentTarget,c={x:o.clientX,y:o.clientY},d=ed(c,u.getBoundingClientRect()),h=td(c,d),p=id(l.getBoundingClientRect()),m=rd([...h,...p]);i.value=m,t.value=!0}return gt(o=>{if(n.value&&e.value){const l=c=>a(c,e.value),u=c=>a(c,n.value);n.value.addEventListener("pointerleave",l),e.value.addEventListener("pointerleave",u),o(()=>{n.value?.removeEventListener("pointerleave",l),e.value?.removeEventListener("pointerleave",u)})}}),gt(o=>{if(i.value){const l=u=>{if(!i.value||!(u.target instanceof HTMLElement))return;const c=u.target,d={x:u.clientX,y:u.clientY},h=n.value?.contains(c)||e.value?.contains(c),p=!nd(d,i.value),m=!!c.closest("[data-grace-area-trigger]");h?s():(p||m)&&(s(),r.trigger())};n.value?.ownerDocument.addEventListener("pointermove",l),o(()=>n.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:t,onPointerExit:r.on}}function ed(n,e){const t=Math.abs(e.top-n.y),i=Math.abs(e.bottom-n.y),r=Math.abs(e.right-n.x),s=Math.abs(e.left-n.x);switch(Math.min(t,i,r,s)){case s:return"left";case r:return"right";case t:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function td(n,e,t=5){const i=[];switch(e){case"top":i.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":i.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":i.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":i.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return i}function id(n){const{top:e,right:t,bottom:i,left:r}=n;return[{x:r,y:e},{x:t,y:e},{x:t,y:i},{x:r,y:i}]}function nd(n,e){const{x:t,y:i}=n;let r=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const o=e[s].x,l=e[s].y,u=e[a].x,c=e[a].y;l>i!=c>i&&t<(u-o)*(i-l)/(c-l)+o&&(r=!r)}return r}function rd(n){const e=n.slice();return e.sort((t,i)=>t.x<i.x?-1:t.x>i.x?1:t.y<i.y?-1:t.y>i.y?1:0),sd(e)}function sd(n){if(n.length<=1)return n.slice();const e=[];for(let i=0;i<n.length;i++){const r=n[i];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))e.pop();else break}e.push(r)}e.pop();const t=[];for(let i=n.length-1;i>=0;i--){const r=n[i];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var ad=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},Fi=new WeakMap,Zn=new WeakMap,Qn={},ss=0,Sl=function(n){return n&&(n.host||Sl(n.parentNode))},od=function(n,e){return e.map(function(t){if(n.contains(t))return t;var i=Sl(t);return i&&n.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",n,". Doing nothing"),null)}).filter(function(t){return!!t})},ld=function(n,e,t,i){var r=od(e,Array.isArray(n)?n:[n]);Qn[t]||(Qn[t]=new WeakMap);var s=Qn[t],a=[],o=new Set,l=new Set(r),u=function(d){!d||o.has(d)||(o.add(d),u(d.parentNode))};r.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(o.has(h))c(h);else try{var p=h.getAttribute(i),m=p!==null&&p!=="false",g=(Fi.get(h)||0)+1,y=(s.get(h)||0)+1;Fi.set(h,g),s.set(h,y),a.push(h),g===1&&m&&Zn.set(h,!0),y===1&&h.setAttribute(t,"true"),m||h.setAttribute(i,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return c(e),o.clear(),ss++,function(){a.forEach(function(d){var h=Fi.get(d)-1,p=s.get(d)-1;Fi.set(d,h),s.set(d,p),h||(Zn.has(d)||d.removeAttribute(i),Zn.delete(d)),p||d.removeAttribute(t)}),ss--,ss||(Fi=new WeakMap,Fi=new WeakMap,Zn=new WeakMap,Qn={})}},ud=function(n,e,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),r=ad(n);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),ld(i,r,t,"aria-hidden")):function(){return null}};function fa(n){let e;_e(()=>Hr(n),t=>{t?e=ud(t):e&&e()}),Ai(()=>{e&&e()})}function yt(n,e="reka"){return`${e}-${ll?.()}`}function cd(n){const e=na({locale:O("en")});return k(()=>n?.value||e.locale?.value||"en")}function dd(n){const e=O(),t=k(()=>e.value?.width??0),i=k(()=>e.value?.height??0);return Re(()=>{const r=Hr(n);if(r){e.value={width:r.offsetWidth,height:r.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=r.offsetWidth,u=r.offsetHeight;e.value={width:l,height:u}});return s.observe(r,{box:"border-box"}),()=>s.unobserve(r)}else e.value=void 0}),{width:t,height:i}}function hd(n){const e=al("",1e3);return{search:e,handleTypeaheadSearch:(r,s)=>{e.value=e.value+r;{const a=pt(),o=s.map(h=>({...h,textValue:h.value?.textValue??h.ref.textContent?.trim()??""})),l=o.find(h=>h.ref===a),u=o.map(h=>h.textValue),c=pd(u,e.value,l?.textValue),d=o.find(h=>h.textValue===c);return d&&d.ref.focus(),d?.ref}},resetTypeahead:()=>{e.value=""}}}function fd(n,e){return n.map((t,i)=>n[(e+i)%n.length])}function pd(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=t?n.indexOf(t):-1;let a=fd(n,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==t));const l=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==t?l:void 0}const[Lt,md]=De("DialogRoot");var gd=z({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(n,{emit:e}){const t=n,r=rt(t,"open",e,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=O(),a=O(),{modal:o}=vt(t);return md({open:r,modal:o,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:a}),(l,u)=>A(l.$slots,"default",{open:f(r),close:()=>r.value=!1})}}),pa=gd,yd=z({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n;Y();const t=Lt();return(i,r)=>(v(),C(f(re),H(e,{type:i.as==="button"?"button":void 0,onClick:r[0]||(r[0]=s=>f(t).onOpenChange(!1))}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["type"]))}}),Al=yd;const vd=lc(()=>O([]));function bd(){const n=vd();return{add(e){const t=n.value[0];e!==t&&t?.pause(),n.value=Ja(n.value,e),n.value.unshift(e)},remove(e){n.value=Ja(n.value,e),n.value[0]?.resume()}}}function Ja(n,e){const t=[...n],i=t.indexOf(e);return i!==-1&&t.splice(i,1),t}function xd(n){return n.filter(e=>e.tagName!=="A")}var wd=z({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(n,{emit:e}){const t=n,i=e,{currentRef:r,currentElement:s}=Y(),a=O(null),o=bd(),l=ra({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});gt(c=>{if(!Lr)return;const d=s.value;if(!t.trapped)return;function h(y){if(l.paused||!d)return;const x=y.target;d.contains(x)?a.value=x:pi(a.value,{select:!0})}function p(y){if(l.paused||!d)return;const x=y.relatedTarget;x!==null&&(d.contains(x)||pi(a.value,{select:!0}))}function m(y){d.contains(a.value)||pi(d)}document.addEventListener("focusin",h),document.addEventListener("focusout",p);const g=new MutationObserver(m);d&&g.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",p),g.disconnect()})}),gt(async c=>{const d=s.value;if(await Ye(),!d)return;o.add(l);const h=pt();if(!d.contains(h)){const m=new CustomEvent(ts,Wa);d.addEventListener(ts,g=>i("mountAutoFocus",g)),d.dispatchEvent(m),m.defaultPrevented||(cc(xd(dc(d)),{select:!0}),pt()===h&&pi(d))}c(()=>{d.removeEventListener(ts,y=>i("mountAutoFocus",y));const m=new CustomEvent(is,Wa),g=y=>{i("unmountAutoFocus",y)};d.addEventListener(is,g),d.dispatchEvent(m),setTimeout(()=>{m.defaultPrevented||pi(h??document.body,{select:!0}),d.removeEventListener(is,g),o.remove(l)},0)})});function u(c){if(!t.loop&&!t.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,h=pt();if(d&&h){const p=c.currentTarget,[m,g]=uc(p);m&&g?!c.shiftKey&&h===g?(c.preventDefault(),t.loop&&pi(m,{select:!0})):c.shiftKey&&h===m&&(c.preventDefault(),t.loop&&pi(g,{select:!0})):h===p&&c.preventDefault()}}return(c,d)=>(v(),C(f(re),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:_(()=>[A(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),ma=wd;const _d="menu.itemSelect",Ds=["Enter"," "],Cd=["ArrowDown","PageUp","Home"],Ml=["ArrowUp","PageDown","End"],Sd=[...Cd,...Ml],Ad={ltr:[...Ds,"ArrowRight"],rtl:[...Ds,"ArrowLeft"]},Md={ltr:["ArrowLeft"],rtl:["ArrowRight"]};function ga(n){return n?"open":"closed"}function kr(n){return n==="indeterminate"}function ya(n){return kr(n)?"indeterminate":n?"checked":"unchecked"}function Bd(n){const e=pt();for(const t of n)if(t===e||(t.focus(),pt()!==e))return}function qd(n,e){const{x:t,y:i}=n;let r=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const o=e[s].x,l=e[s].y,u=e[a].x,c=e[a].y;l>i!=c>i&&t<(u-o)*(i-l)/(c-l)+o&&(r=!r)}return r}function kd(n,e){if(!e)return!1;const t={x:n.clientX,y:n.clientY};return qd(t,e)}function Cn(n){return n.pointerType==="mouse"}var Ed=z({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=Lt(),{forwardRef:s,currentElement:a}=Y();return r.titleId||=yt(void 0,"reka-dialog-title"),r.descriptionId||=yt(void 0,"reka-dialog-description"),Re(()=>{r.contentElement=a,pt()!==document.body&&(r.triggerElement.value=pt())}),(o,l)=>(v(),C(f(ma),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>i("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>i("closeAutoFocus",u))},{default:_(()=>[F(f(kn),H({id:f(r).contentId,ref:f(s),as:o.as,"as-child":o.asChild,"disable-outside-pointer-events":o.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(r).descriptionId,"aria-labelledby":f(r).titleId,"data-state":f(ga)(f(r).open.value)},o.$attrs,{onDismiss:l[0]||(l[0]=u=>f(r).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>i("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>i("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>i("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>i("pointerDownOutside",u))}),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Bl=Ed,Fd=z({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=Lt(),s=sn(i),{forwardRef:a,currentElement:o}=Y();return fa(o),(l,u)=>(v(),C(Bl,H({...t,...f(s)},{ref:f(a),"trap-focus":f(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(c.preventDefault(),f(r).triggerElement.value?.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),Od=Fd,zd=z({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,r=sn(e);Y();const s=Lt(),a=O(!1),o=O(!1);return(l,u)=>(v(),C(Bl,H({...t,...f(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(a.value||f(s).triggerElement.value?.focus(),c.preventDefault()),a.value=!1,o.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{c.defaultPrevented||(a.value=!0,c.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const d=c.target;f(s).triggerElement.value?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.value&&c.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16))}}),Td=zd,Id=z({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=Lt(),s=sn(i),{forwardRef:a}=Y();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(r).open.value},{default:_(()=>[f(r).modal.value?(v(),C(Od,H({key:0,ref:f(a)},{...t,...f(s),...o.$attrs}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(Td,H({key:1,ref:f(a)},{...t,...f(s),...o.$attrs}),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),va=Id,Pd=z({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(n){const e=n;Y();const t=Lt();return(i,r)=>(v(),C(f(re),H(e,{id:f(t).descriptionId}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["id"]))}}),en=Pd,Rd=z({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=Lt();return ha(!0),Y(),(t,i)=>(v(),C(f(re),{as:t.as,"as-child":t.asChild,"data-state":f(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:_(()=>[A(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Dd=Rd,$d=z({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=Lt(),{forwardRef:t}=Y();return(i,r)=>f(e)?.modal.value?(v(),C(f($t),{key:0,present:i.forceMount||f(e).open.value},{default:_(()=>[F(Dd,H(i.$attrs,{ref:f(t),as:i.as,"as-child":i.asChild}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):R("v-if",!0)}}),ba=$d,Ld=z({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(En),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),xa=Ld,Hd=z({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(n){const e=n,t=Lt();return Y(),(i,r)=>(v(),C(f(re),H(e,{id:f(t).titleId}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["id"]))}}),tn=Hd,Nd=z({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n,t=Lt(),{forwardRef:i,currentElement:r}=Y();return t.contentId||=yt(void 0,"reka-dialog-content"),Re(()=>{t.triggerElement.value=r.value}),(s,a)=>(v(),C(f(re),H(e,{ref:f(i),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":f(t).open.value||!1,"aria-controls":f(t).open.value?f(t).contentId:void 0,"data-state":f(t).open.value?"open":"closed",onClick:f(t).onOpenToggle}),{default:_(()=>[A(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),wa=Nd;const Vd="rovingFocusGroup.onEntryFocus",Ud={bubbles:!1,cancelable:!0},jd={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Gd(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Wd(n,e,t){const i=Gd(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return jd[i]}function ql(n,e=!1){const t=pt();for(const i of n)if(i===t||(i.focus({preventScroll:e}),pt()!==t))return}function Kd(n,e){return n.map((t,i)=>n[(e+i)%n.length])}const[Xd,Yd]=De("RovingFocusGroup");var Jd=z({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(n,{expose:e,emit:t}){const i=n,r=t,{loop:s,orientation:a,dir:o}=vt(i),l=Vr(o),u=rt(i,"currentTabStopId",r,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),c=O(!1),d=O(!1),h=O(0),{getItems:p,CollectionSlot:m}=sa({isProvider:!0});function g(x){const b=!d.value;if(x.currentTarget&&x.target===x.currentTarget&&b&&!c.value){const w=new CustomEvent(Vd,Ud);if(x.currentTarget.dispatchEvent(w),r("entryFocus",w),!w.defaultPrevented){const S=p().map(E=>E.ref).filter(E=>E.dataset.disabled!==""),q=S.find(E=>E.getAttribute("data-active")===""),M=S.find(E=>E.getAttribute("data-highlighted")===""),B=S.find(E=>E.id===u.value),L=[q,M,B,...S].filter(Boolean);ql(L,i.preventScrollOnEntryFocus)}}d.value=!1}function y(){setTimeout(()=>{d.value=!1},1)}return e({getItems:p}),Yd({loop:s,dir:l,orientation:a,currentTabStopId:u,onItemFocus:x=>{u.value=x},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{h.value++},onFocusableItemRemove:()=>{h.value--}}),(x,b)=>(v(),C(f(m),null,{default:_(()=>[F(f(re),{tabindex:c.value||h.value===0?-1:0,"data-orientation":f(a),as:x.as,"as-child":x.asChild,dir:f(l),style:{outline:"none"},onMousedown:b[0]||(b[0]=w=>d.value=!0),onMouseup:y,onFocus:g,onBlur:b[1]||(b[1]=w=>c.value=!1)},{default:_(()=>[A(x.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),kl=Jd,Zd=z({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(n){const e=n,t=Xd(),i=yt(),r=k(()=>e.tabStopId||i),s=k(()=>t.currentTabStopId.value===r.value),{getItems:a,CollectionItem:o}=sa();Re(()=>{e.focusable&&t.onFocusableItemAdd()}),Ai(()=>{e.focusable&&t.onFocusableItemRemove()});function l(u){if(u.key==="Tab"&&u.shiftKey){t.onItemShiftTab();return}if(u.target!==u.currentTarget)return;const c=Wd(u,t.orientation.value,t.dir.value);if(c!==void 0){if(u.metaKey||u.ctrlKey||u.altKey||!e.allowShiftKey&&u.shiftKey)return;u.preventDefault();let d=[...a().map(h=>h.ref).filter(h=>h.dataset.disabled!=="")];if(c==="last")d.reverse();else if(c==="prev"||c==="next"){c==="prev"&&d.reverse();const h=d.indexOf(u.currentTarget);d=t.loop.value?Kd(d,h+1):d.slice(h+1)}Ye(()=>ql(d))}}return(u,c)=>(v(),C(f(o),null,{default:_(()=>[F(f(re),{tabindex:s.value?0:-1,"data-orientation":f(t).orientation.value,"data-active":u.active?"":void 0,"data-disabled":u.focusable?void 0:"",as:u.as,"as-child":u.asChild,onMousedown:c[0]||(c[0]=d=>{u.focusable?f(t).onItemFocus(r.value):d.preventDefault()}),onFocus:c[1]||(c[1]=d=>f(t).onItemFocus(r.value)),onKeydown:l},{default:_(()=>[A(u.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),El=Zd,Qd=z({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(n){const e=n,{primitiveElement:t,currentElement:i}=Fn(),r=k(()=>e.checked??e.value);return _e(r,(s,a)=>{if(!i.value)return;const o=i.value,l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(c&&s!==a){const d=new Event("input",{bubbles:!0}),h=new Event("change",{bubbles:!0});c.call(o,s),o.dispatchEvent(d),o.dispatchEvent(h)}}),(s,a)=>(v(),C(On,H({ref_key:"primitiveElement",ref:t},{...e,...s.$attrs},{as:"input"}),null,16))}}),Za=Qd,eh=z({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(n){const e=n,t=k(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=k(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((r,s)=>typeof r=="object"?Object.entries(r).map(([a,o])=>({name:`${e.name}[${s}][${a}]`,value:o})):{name:`${e.name}[${s}]`,value:r}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([r,s])=>({name:`${e.name}[${r}]`,value:s})):[]);return(r,s)=>(v(),V(we,null,[R(" We render single input if it's required "),t.value?(v(),C(Za,H({key:r.name},{...e,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(v(!0),V(we,{key:1},Xe(i.value,a=>(v(),C(Za,H({key:a.name},{ref_for:!0},{...e,...r.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))],2112))}}),Fl=eh;const[th]=De("CheckboxGroupRoot");function Er(n){return n==="indeterminate"}function Ol(n){return Er(n)?"indeterminate":n?"checked":"unchecked"}const[ih,nh]=De("CheckboxRoot");var rh=z({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:[Boolean,String],required:!1},modelValue:{type:[Boolean,String,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,{forwardRef:r,currentElement:s}=Y(),a=th(null),o=rt(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),l=k(()=>a?.disabled.value||t.disabled),u=k(()=>Ki(a?.modelValue.value)?o.value==="indeterminate"?"indeterminate":o.value:Xa(a.modelValue.value,t.value));function c(){if(Ki(a?.modelValue.value))o.value=Er(o.value)?!0:!o.value;else{const p=[...a.modelValue.value||[]];if(Xa(p,t.value)){const m=p.findIndex(g=>Rs(g,t.value));p.splice(m,1)}else p.push(t.value);a.modelValue.value=p}}const d=_l(s),h=k(()=>t.id&&s.value?document.querySelector(`[for="${t.id}"]`)?.innerText:void 0);return nh({disabled:l,state:u}),(p,m)=>(v(),C(an(f(a)?.rovingFocus.value?f(El):f(re)),H(p.$attrs,{id:p.id,ref:f(r),role:"checkbox","as-child":p.asChild,as:p.as,type:p.as==="button"?"button":void 0,"aria-checked":f(Er)(u.value)?"mixed":u.value,"aria-required":p.required,"aria-label":p.$attrs["aria-label"]||h.value,"data-state":f(Ol)(u.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:f(a)?.rovingFocus.value?!l.value:void 0,onKeydown:ht(fe(()=>{},["prevent"]),["enter"]),onClick:c}),{default:_(()=>[A(p.$slots,"default",{modelValue:f(o),state:u.value}),f(d)&&p.name&&!f(a)?(v(),C(f(Fl),{key:0,type:"checkbox",checked:!!u.value,name:p.name,value:p.value,disabled:l.value,required:p.required},null,8,["checked","name","value","disabled","required"])):R("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"]))}}),sh=rh,ah=z({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(n){const{forwardRef:e}=Y(),t=ih();return(i,r)=>(v(),C(f($t),{present:i.forceMount||f(Er)(f(t).state.value)||f(t).state.value===!0},{default:_(()=>[F(f(re),H({ref:f(e),"data-state":f(Ol)(f(t).state.value),"data-disabled":f(t).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),oh=ah;const[zl,lh]=De("PopperRoot");var uh=z({inheritAttrs:!1,__name:"PopperRoot",setup(n){const e=O();return lh({anchor:e,onAnchorChange:t=>e.value=t}),(t,i)=>A(t.$slots,"default")}}),Pn=uh,ch=z({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n,{forwardRef:t,currentElement:i}=Y(),r=zl();return ul(()=>{r.onAnchorChange(e.reference??i.value)}),(s,a)=>(v(),C(f(re),{ref:f(t),as:s.as,"as-child":s.asChild},{default:_(()=>[A(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),Rn=ch;const dh={key:0,d:"M0 0L6 6L12 0"},hh={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var fh=z({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(re),H(e,{width:t.width,height:t.height,viewBox:t.asChild?void 0:"0 0 12 6",preserveAspectRatio:t.asChild?void 0:"none"}),{default:_(()=>[A(t.$slots,"default",{},()=>[t.rounded?(v(),V("path",hh)):(v(),V("path",dh))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),ph=fh;function mh(n){return n!==null}function gh(n){return{name:"transformOrigin",options:n,fn(e){const{placement:t,rects:i,middlewareData:r}=e,a=r.arrow?.centerOffset!==0,o=a?0:n.arrowWidth,l=a?0:n.arrowHeight,[u,c]=$s(t),d={start:"0%",center:"50%",end:"100%"}[c],h=(r.arrow?.x??0)+o/2,p=(r.arrow?.y??0)+l/2;let m="",g="";return u==="bottom"?(m=a?d:`${h}px`,g=`${-l}px`):u==="top"?(m=a?d:`${h}px`,g=`${i.floating.height+l}px`):u==="right"?(m=`${-l}px`,g=a?d:`${p}px`):u==="left"&&(m=`${i.floating.width+l}px`,g=a?d:`${p}px`),{data:{x:m,y:g}}}}}function $s(n){const[e,t="center"]=n.split("-");return[e,t]}const yh=["top","right","bottom","left"],si=Math.min,ot=Math.max,Fr=Math.round,er=Math.floor,Rt=n=>({x:n,y:n}),vh={left:"right",right:"left",bottom:"top",top:"bottom"},bh={start:"end",end:"start"};function Ls(n,e,t){return ot(n,si(e,t))}function Xt(n,e){return typeof n=="function"?n(e):n}function Yt(n){return n.split("-")[0]}function un(n){return n.split("-")[1]}function _a(n){return n==="x"?"y":"x"}function Ca(n){return n==="y"?"height":"width"}const xh=new Set(["top","bottom"]);function It(n){return xh.has(Yt(n))?"y":"x"}function Sa(n){return _a(It(n))}function wh(n,e,t){t===void 0&&(t=!1);const i=un(n),r=Sa(n),s=Ca(r);let a=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Or(a)),[a,Or(a)]}function _h(n){const e=Or(n);return[Hs(n),e,Hs(e)]}function Hs(n){return n.replace(/start|end/g,e=>bh[e])}const Qa=["left","right"],eo=["right","left"],Ch=["top","bottom"],Sh=["bottom","top"];function Ah(n,e,t){switch(n){case"top":case"bottom":return t?e?eo:Qa:e?Qa:eo;case"left":case"right":return e?Ch:Sh;default:return[]}}function Mh(n,e,t,i){const r=un(n);let s=Ah(Yt(n),t==="start",i);return r&&(s=s.map(a=>a+"-"+r),e&&(s=s.concat(s.map(Hs)))),s}function Or(n){return n.replace(/left|right|bottom|top/g,e=>vh[e])}function Bh(n){return{top:0,right:0,bottom:0,left:0,...n}}function Tl(n){return typeof n!="number"?Bh(n):{top:n,right:n,bottom:n,left:n}}function zr(n){const{x:e,y:t,width:i,height:r}=n;return{width:i,height:r,top:t,left:e,right:e+i,bottom:t+r,x:e,y:t}}function to(n,e,t){let{reference:i,floating:r}=n;const s=It(e),a=Sa(e),o=Ca(a),l=Yt(e),u=s==="y",c=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,h=i[o]/2-r[o]/2;let p;switch(l){case"top":p={x:c,y:i.y-r.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-r.width,y:d};break;default:p={x:i.x,y:i.y}}switch(un(e)){case"start":p[a]-=h*(t&&u?-1:1);break;case"end":p[a]+=h*(t&&u?-1:1);break}return p}const qh=async(n,e,t)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=t,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:n,floating:e,strategy:r}),{x:c,y:d}=to(u,i,l),h=i,p={},m=0;for(let g=0;g<o.length;g++){const{name:y,fn:x}=o[g],{x:b,y:w,data:S,reset:q}=await x({x:c,y:d,initialPlacement:i,placement:h,strategy:r,middlewareData:p,rects:u,platform:a,elements:{reference:n,floating:e}});c=b??c,d=w??d,p={...p,[y]:{...p[y],...S}},q&&m<=50&&(m++,typeof q=="object"&&(q.placement&&(h=q.placement),q.rects&&(u=q.rects===!0?await a.getElementRects({reference:n,floating:e,strategy:r}):q.rects),{x:c,y:d}=to(u,h,l)),g=-1)}return{x:c,y:d,placement:h,strategy:r,middlewareData:p}};async function Sn(n,e){var t;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:a,elements:o,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Xt(e,n),m=Tl(p),y=o[h?d==="floating"?"reference":"floating":d],x=zr(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},q=zr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:b,offsetParent:w,strategy:l}):b);return{top:(x.top-q.top+m.top)/S.y,bottom:(q.bottom-x.bottom+m.bottom)/S.y,left:(x.left-q.left+m.left)/S.x,right:(q.right-x.right+m.right)/S.x}}const kh=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:i,placement:r,rects:s,platform:a,elements:o,middlewareData:l}=e,{element:u,padding:c=0}=Xt(n,e)||{};if(u==null)return{};const d=Tl(c),h={x:t,y:i},p=Sa(r),m=Ca(p),g=await a.getDimensions(u),y=p==="y",x=y?"top":"left",b=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[p]-h[p]-s.floating[m],q=h[p]-s.reference[p],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let B=M?M[w]:0;(!B||!await(a.isElement==null?void 0:a.isElement(M)))&&(B=o.floating[w]||s.floating[m]);const L=S/2-q/2,E=B/2-g[m]/2-1,D=si(d[x],E),U=si(d[b],E),G=D,ee=B-g[m]-U,te=B/2-g[m]/2+L,ne=Ls(G,te,ee),K=!l.arrow&&un(r)!=null&&te!==ne&&s.reference[m]/2-(te<G?D:U)-g[m]/2<0,Q=K?te<G?te-G:te-ee:0;return{[p]:h[p]+Q,data:{[p]:ne,centerOffset:te-ne-Q,...K&&{alignmentOffset:Q}},reset:K}}}),Eh=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,i;const{placement:r,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Xt(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const x=Yt(r),b=It(o),w=Yt(o)===o,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),q=h||(w||!g?[Or(o)]:_h(o)),M=m!=="none";!h&&M&&q.push(...Mh(o,g,m,S));const B=[o,...q],L=await Sn(e,y),E=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(c&&E.push(L[x]),d){const te=wh(r,a,S);E.push(L[te[0]],L[te[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(te=>te<=0)){var U,G;const te=(((U=s.flip)==null?void 0:U.index)||0)+1,ne=B[te];if(ne&&(!(d==="alignment"?b!==It(ne):!1)||D.every(J=>It(J.placement)===b?J.overflows[0]>0:!0)))return{data:{index:te,overflows:D},reset:{placement:ne}};let K=(G=D.filter(Q=>Q.overflows[0]<=0).sort((Q,J)=>Q.overflows[1]-J.overflows[1])[0])==null?void 0:G.placement;if(!K)switch(p){case"bestFit":{var ee;const Q=(ee=D.filter(J=>{if(M){const he=It(J.placement);return he===b||he==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(he=>he>0).reduce((he,ae)=>he+ae,0)]).sort((J,he)=>J[1]-he[1])[0])==null?void 0:ee[0];Q&&(K=Q);break}case"initialPlacement":K=o;break}if(r!==K)return{reset:{placement:K}}}return{}}}};function io(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function no(n){return yh.some(e=>n[e]>=0)}const Fh=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:i="referenceHidden",...r}=Xt(n,e);switch(i){case"referenceHidden":{const s=await Sn(e,{...r,elementContext:"reference"}),a=io(s,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:no(a)}}}case"escaped":{const s=await Sn(e,{...r,altBoundary:!0}),a=io(s,t.floating);return{data:{escapedOffsets:a,escaped:no(a)}}}default:return{}}}}},Il=new Set(["left","top"]);async function Oh(n,e){const{placement:t,platform:i,elements:r}=n,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),a=Yt(t),o=un(t),l=It(t)==="y",u=Il.has(a)?-1:1,c=s&&l?-1:1,d=Xt(e,n);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const zh=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,i;const{x:r,y:s,placement:a,middlewareData:o}=e,l=await Oh(e,n);return a===((t=o.offset)==null?void 0:t.placement)&&(i=o.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:a}}}}},Th=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:y=>{let{x,y:b}=y;return{x,y:b}}},...l}=Xt(n,e),u={x:t,y:i},c=await Sn(e,l),d=It(Yt(r)),h=_a(d);let p=u[h],m=u[d];if(s){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=p+c[y],w=p-c[x];p=Ls(b,p,w)}if(a){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=m+c[y],w=m-c[x];m=Ls(b,m,w)}const g=o.fn({...e,[h]:p,[d]:m});return{...g,data:{x:g.x-t,y:g.y-i,enabled:{[h]:s,[d]:a}}}}}},Ih=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:i,placement:r,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=Xt(n,e),c={x:t,y:i},d=It(r),h=_a(d);let p=c[h],m=c[d];const g=Xt(o,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=h==="y"?"height":"width",S=s.reference[h]-s.floating[w]+y.mainAxis,q=s.reference[h]+s.reference[w]-y.mainAxis;p<S?p=S:p>q&&(p=q)}if(u){var x,b;const w=h==="y"?"width":"height",S=Il.has(Yt(r)),q=s.reference[d]-s.floating[w]+(S&&((x=a.offset)==null?void 0:x[d])||0)+(S?0:y.crossAxis),M=s.reference[d]+s.reference[w]+(S?0:((b=a.offset)==null?void 0:b[d])||0)-(S?y.crossAxis:0);m<q?m=q:m>M&&(m=M)}return{[h]:p,[d]:m}}}},Ph=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,i;const{placement:r,rects:s,platform:a,elements:o}=e,{apply:l=()=>{},...u}=Xt(n,e),c=await Sn(e,u),d=Yt(r),h=un(r),p=It(r)==="y",{width:m,height:g}=s.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=h===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(x=d,y=h==="end"?"top":"bottom");const b=g-c.top-c.bottom,w=m-c.left-c.right,S=si(g-c[y],b),q=si(m-c[x],w),M=!e.middlewareData.shift;let B=S,L=q;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(L=w),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(B=b),M&&!h){const D=ot(c.left,0),U=ot(c.right,0),G=ot(c.top,0),ee=ot(c.bottom,0);p?L=m-2*(D!==0||U!==0?D+U:ot(c.left,c.right)):B=g-2*(G!==0||ee!==0?G+ee:ot(c.top,c.bottom))}await l({...e,availableWidth:L,availableHeight:B});const E=await a.getDimensions(o.floating);return m!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function Ur(){return typeof window<"u"}function Mi(n){return Aa(n)?(n.nodeName||"").toLowerCase():"#document"}function ut(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Ht(n){var e;return(e=(Aa(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Aa(n){return Ur()?n instanceof Node||n instanceof ut(n).Node:!1}function Ot(n){return Ur()?n instanceof Element||n instanceof ut(n).Element:!1}function Dt(n){return Ur()?n instanceof HTMLElement||n instanceof ut(n).HTMLElement:!1}function ro(n){return!Ur()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof ut(n).ShadowRoot}const Rh=new Set(["inline","contents"]);function Dn(n){const{overflow:e,overflowX:t,overflowY:i,display:r}=zt(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!Rh.has(r)}const Dh=new Set(["table","td","th"]);function $h(n){return Dh.has(Mi(n))}const Lh=[":popover-open",":modal"];function jr(n){return Lh.some(e=>{try{return n.matches(e)}catch{return!1}})}const Hh=["transform","translate","scale","rotate","perspective"],Nh=["transform","translate","scale","rotate","perspective","filter"],Vh=["paint","layout","strict","content"];function Ma(n){const e=Ba(),t=Ot(n)?zt(n):n;return Hh.some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||Nh.some(i=>(t.willChange||"").includes(i))||Vh.some(i=>(t.contain||"").includes(i))}function Uh(n){let e=ai(n);for(;Dt(e)&&!nn(e);){if(Ma(e))return e;if(jr(e))return null;e=ai(e)}return null}function Ba(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const jh=new Set(["html","body","#document"]);function nn(n){return jh.has(Mi(n))}function zt(n){return ut(n).getComputedStyle(n)}function Gr(n){return Ot(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function ai(n){if(Mi(n)==="html")return n;const e=n.assignedSlot||n.parentNode||ro(n)&&n.host||Ht(n);return ro(e)?e.host:e}function Pl(n){const e=ai(n);return nn(e)?n.ownerDocument?n.ownerDocument.body:n.body:Dt(e)&&Dn(e)?e:Pl(e)}function An(n,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Pl(n),s=r===((i=n.ownerDocument)==null?void 0:i.body),a=ut(r);if(s){const o=Ns(a);return e.concat(a,a.visualViewport||[],Dn(r)?r:[],o&&t?An(o):[])}return e.concat(r,An(r,[],t))}function Ns(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Rl(n){const e=zt(n);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Dt(n),s=r?n.offsetWidth:t,a=r?n.offsetHeight:i,o=Fr(t)!==s||Fr(i)!==a;return o&&(t=s,i=a),{width:t,height:i,$:o}}function qa(n){return Ot(n)?n:n.contextElement}function Xi(n){const e=qa(n);if(!Dt(e))return Rt(1);const t=e.getBoundingClientRect(),{width:i,height:r,$:s}=Rl(e);let a=(s?Fr(t.width):t.width)/i,o=(s?Fr(t.height):t.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const Gh=Rt(0);function Dl(n){const e=ut(n);return!Ba()||!e.visualViewport?Gh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Wh(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==ut(n)?!1:e}function Ci(n,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),s=qa(n);let a=Rt(1);e&&(i?Ot(i)&&(a=Xi(i)):a=Xi(n));const o=Wh(s,t,i)?Dl(s):Rt(0);let l=(r.left+o.x)/a.x,u=(r.top+o.y)/a.y,c=r.width/a.x,d=r.height/a.y;if(s){const h=ut(s),p=i&&Ot(i)?ut(i):i;let m=h,g=Ns(m);for(;g&&i&&p!==m;){const y=Xi(g),x=g.getBoundingClientRect(),b=zt(g),w=x.left+(g.clientLeft+parseFloat(b.paddingLeft))*y.x,S=x.top+(g.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=w,u+=S,m=ut(g),g=Ns(m)}}return zr({width:c,height:d,x:l,y:u})}function Wr(n,e){const t=Gr(n).scrollLeft;return e?e.left+t:Ci(Ht(n)).left+t}function $l(n,e){const t=n.getBoundingClientRect(),i=t.left+e.scrollLeft-Wr(n,t),r=t.top+e.scrollTop;return{x:i,y:r}}function Kh(n){let{elements:e,rect:t,offsetParent:i,strategy:r}=n;const s=r==="fixed",a=Ht(i),o=e?jr(e.floating):!1;if(i===a||o&&s)return t;let l={scrollLeft:0,scrollTop:0},u=Rt(1);const c=Rt(0),d=Dt(i);if((d||!d&&!s)&&((Mi(i)!=="body"||Dn(a))&&(l=Gr(i)),Dt(i))){const p=Ci(i);u=Xi(i),c.x=p.x+i.clientLeft,c.y=p.y+i.clientTop}const h=a&&!d&&!s?$l(a,l):Rt(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:t.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Xh(n){return Array.from(n.getClientRects())}function Yh(n){const e=Ht(n),t=Gr(n),i=n.ownerDocument.body,r=ot(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=ot(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-t.scrollLeft+Wr(n);const o=-t.scrollTop;return zt(i).direction==="rtl"&&(a+=ot(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:o}}const so=25;function Jh(n,e){const t=ut(n),i=Ht(n),r=t.visualViewport;let s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(r){s=r.width,a=r.height;const c=Ba();(!c||c&&e==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}const u=Wr(i);if(u<=0){const c=i.ownerDocument,d=c.body,h=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-p);m<=so&&(s-=m)}else u<=so&&(s+=u);return{width:s,height:a,x:o,y:l}}const Zh=new Set(["absolute","fixed"]);function Qh(n,e){const t=Ci(n,!0,e==="fixed"),i=t.top+n.clientTop,r=t.left+n.clientLeft,s=Dt(n)?Xi(n):Rt(1),a=n.clientWidth*s.x,o=n.clientHeight*s.y,l=r*s.x,u=i*s.y;return{width:a,height:o,x:l,y:u}}function ao(n,e,t){let i;if(e==="viewport")i=Jh(n,t);else if(e==="document")i=Yh(Ht(n));else if(Ot(e))i=Qh(e,t);else{const r=Dl(n);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return zr(i)}function Ll(n,e){const t=ai(n);return t===e||!Ot(t)||nn(t)?!1:zt(t).position==="fixed"||Ll(t,e)}function ef(n,e){const t=e.get(n);if(t)return t;let i=An(n,[],!1).filter(o=>Ot(o)&&Mi(o)!=="body"),r=null;const s=zt(n).position==="fixed";let a=s?ai(n):n;for(;Ot(a)&&!nn(a);){const o=zt(a),l=Ma(a);!l&&o.position==="fixed"&&(r=null),(s?!l&&!r:!l&&o.position==="static"&&!!r&&Zh.has(r.position)||Dn(a)&&!l&&Ll(n,a))?i=i.filter(c=>c!==a):r=o,a=ai(a)}return e.set(n,i),i}function tf(n){let{element:e,boundary:t,rootBoundary:i,strategy:r}=n;const a=[...t==="clippingAncestors"?jr(e)?[]:ef(e,this._c):[].concat(t),i],o=a[0],l=a.reduce((u,c)=>{const d=ao(e,c,r);return u.top=ot(d.top,u.top),u.right=si(d.right,u.right),u.bottom=si(d.bottom,u.bottom),u.left=ot(d.left,u.left),u},ao(e,o,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nf(n){const{width:e,height:t}=Rl(n);return{width:e,height:t}}function rf(n,e,t){const i=Dt(e),r=Ht(e),s=t==="fixed",a=Ci(n,!0,s,e);let o={scrollLeft:0,scrollTop:0};const l=Rt(0);function u(){l.x=Wr(r)}if(i||!i&&!s)if((Mi(e)!=="body"||Dn(r))&&(o=Gr(e)),i){const p=Ci(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else r&&u();s&&!i&&r&&u();const c=r&&!i&&!s?$l(r,o):Rt(0),d=a.left+o.scrollLeft-l.x-c.x,h=a.top+o.scrollTop-l.y-c.y;return{x:d,y:h,width:a.width,height:a.height}}function as(n){return zt(n).position==="static"}function oo(n,e){if(!Dt(n)||zt(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Ht(n)===t&&(t=t.ownerDocument.body),t}function Hl(n,e){const t=ut(n);if(jr(n))return t;if(!Dt(n)){let r=ai(n);for(;r&&!nn(r);){if(Ot(r)&&!as(r))return r;r=ai(r)}return t}let i=oo(n,e);for(;i&&$h(i)&&as(i);)i=oo(i,e);return i&&nn(i)&&as(i)&&!Ma(i)?t:i||Uh(n)||t}const sf=async function(n){const e=this.getOffsetParent||Hl,t=this.getDimensions,i=await t(n.floating);return{reference:rf(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function af(n){return zt(n).direction==="rtl"}const of={convertOffsetParentRelativeRectToViewportRelativeRect:Kh,getDocumentElement:Ht,getClippingRect:tf,getOffsetParent:Hl,getElementRects:sf,getClientRects:Xh,getDimensions:nf,getScale:Xi,isElement:Ot,isRTL:af};function Nl(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function lf(n,e){let t=null,i;const r=Ht(n);function s(){var o;clearTimeout(i),(o=t)==null||o.disconnect(),t=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const u=n.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(o||e(),!h||!p)return;const m=er(d),g=er(r.clientWidth-(c+h)),y=er(r.clientHeight-(d+p)),x=er(c),w={rootMargin:-m+"px "+-g+"px "+-y+"px "+-x+"px",threshold:ot(0,si(1,l))||1};let S=!0;function q(M){const B=M[0].intersectionRatio;if(B!==l){if(!S)return a();B?a(!1,B):i=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!Nl(u,n.getBoundingClientRect())&&a(),S=!1}try{t=new IntersectionObserver(q,{...w,root:r.ownerDocument})}catch{t=new IntersectionObserver(q,w)}t.observe(n)}return a(!0),s}function uf(n,e,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=qa(n),c=r||s?[...u?An(u):[],...An(e)]:[];c.forEach(x=>{r&&x.addEventListener("scroll",t,{passive:!0}),s&&x.addEventListener("resize",t)});const d=u&&o?lf(u,t):null;let h=-1,p=null;a&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),t()}),u&&!l&&p.observe(u),p.observe(e));let m,g=l?Ci(n):null;l&&y();function y(){const x=Ci(n);g&&!Nl(g,x)&&t(),g=x,m=requestAnimationFrame(y)}return t(),()=>{var x;c.forEach(b=>{r&&b.removeEventListener("scroll",t),s&&b.removeEventListener("resize",t)}),d?.(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const cf=zh,df=Th,lo=Eh,hf=Ph,ff=Fh,pf=kh,mf=Ih,gf=(n,e,t)=>{const i=new Map,r={platform:of,...t},s={...r.platform,_c:i};return qh(n,e,{...r,platform:s})};function yf(n){return n!=null&&typeof n=="object"&&"$el"in n}function Vs(n){if(yf(n)){const e=n.$el;return Aa(e)&&Mi(e)==="#comment"?null:e}return n}function ji(n){return typeof n=="function"?n():f(n)}function vf(n){return{name:"arrow",options:n,fn(e){const t=Vs(ji(n.element));return t==null?{}:pf({element:t,padding:n.padding}).fn(e)}}}function Vl(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function uo(n,e){const t=Vl(n);return Math.round(e*t)/t}function bf(n,e,t){t===void 0&&(t={});const i=t.whileElementsMounted,r=k(()=>{var B;return(B=ji(t.open))!=null?B:!0}),s=k(()=>ji(t.middleware)),a=k(()=>{var B;return(B=ji(t.placement))!=null?B:"bottom"}),o=k(()=>{var B;return(B=ji(t.strategy))!=null?B:"absolute"}),l=k(()=>{var B;return(B=ji(t.transform))!=null?B:!0}),u=k(()=>Vs(n.value)),c=k(()=>Vs(e.value)),d=O(0),h=O(0),p=O(o.value),m=O(a.value),g=tt({}),y=O(!1),x=k(()=>{const B={position:p.value,left:"0",top:"0"};if(!c.value)return B;const L=uo(c.value,d.value),E=uo(c.value,h.value);return l.value?{...B,transform:"translate("+L+"px, "+E+"px)",...Vl(c.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:L+"px",top:E+"px"}});let b;function w(){if(u.value==null||c.value==null)return;const B=r.value;gf(u.value,c.value,{middleware:s.value,placement:a.value,strategy:o.value}).then(L=>{d.value=L.x,h.value=L.y,p.value=L.strategy,m.value=L.placement,g.value=L.middlewareData,y.value=B!==!1})}function S(){typeof b=="function"&&(b(),b=void 0)}function q(){if(S(),i===void 0){w();return}if(u.value!=null&&c.value!=null){b=i(u.value,c.value,w);return}}function M(){r.value||(y.value=!1)}return _e([s,a,o,r],w,{flush:"sync"}),_e([u,c],q,{flush:"sync"}),_e(r,M,{flush:"sync"}),hc()&&fc(S),{x:Ei(d),y:Ei(h),strategy:Ei(p),placement:Ei(m),middlewareData:Ei(g),isPositioned:Ei(y),floatingStyles:x,update:w}}const Ul={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[xf,wf]=De("PopperContent");var _f=z({inheritAttrs:!1,__name:"PopperContent",props:cl({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Ul}),emits:["placed"],setup(n,{emit:e}){const t=n,i=e,r=zl(),{forwardRef:s,currentElement:a}=Y(),o=O(),l=O(),{width:u,height:c}=dd(l),d=k(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),h=k(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),p=k(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),m=k(()=>({padding:h.value,boundary:p.value.filter(mh),altBoundary:p.value.length>0})),g=k(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),y=pc(()=>[cf({mainAxis:t.sideOffset+c.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&lo({...m.value,...g.value}),t.avoidCollisions&&df({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?mf():void 0,...m.value}),!t.prioritizePosition&&t.avoidCollisions&&lo({...m.value,...g.value}),hf({...m.value,apply:({elements:G,rects:ee,availableWidth:te,availableHeight:ne})=>{const{width:K,height:Q}=ee.reference,J=G.floating.style;J.setProperty("--reka-popper-available-width",`${te}px`),J.setProperty("--reka-popper-available-height",`${ne}px`),J.setProperty("--reka-popper-anchor-width",`${K}px`),J.setProperty("--reka-popper-anchor-height",`${Q}px`)}}),l.value&&vf({element:l.value,padding:t.arrowPadding}),gh({arrowWidth:u.value,arrowHeight:c.value}),t.hideWhenDetached&&ff({strategy:"referenceHidden",...m.value})]),x=k(()=>t.reference??r.anchor.value),{floatingStyles:b,placement:w,isPositioned:S,middlewareData:q}=bf(x,o,{strategy:t.positionStrategy,placement:d,whileElementsMounted:(...G)=>uf(...G,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:y}),M=k(()=>$s(w.value)[0]),B=k(()=>$s(w.value)[1]);ul(()=>{S.value&&i("placed")});const L=k(()=>q.value.arrow?.centerOffset!==0),E=O("");gt(()=>{a.value&&(E.value=window.getComputedStyle(a.value).zIndex)});const D=k(()=>q.value.arrow?.x??0),U=k(()=>q.value.arrow?.y??0);return wf({placedSide:M,onArrowChange:G=>l.value=G,arrowX:D,arrowY:U,shouldHideArrow:L}),(G,ee)=>(v(),V("div",{ref_key:"floatingRef",ref:o,"data-reka-popper-content-wrapper":"",style:qt({...f(b),transform:f(S)?f(b).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:E.value,"--reka-popper-transform-origin":[f(q).transformOrigin?.x,f(q).transformOrigin?.y].join(" "),...f(q).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[F(f(re),H({ref:f(s)},G.$attrs,{"as-child":t.asChild,as:G.as,"data-side":M.value,"data-align":B.value,style:{animation:f(S)?void 0:"none"}}),{default:_(()=>[A(G.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),Kr=_f;const Cf={top:"bottom",right:"left",bottom:"top",left:"right"};var Sf=z({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(n){const{forwardRef:e}=Y(),t=xf(),i=k(()=>Cf[t.placedSide.value]);return(r,s)=>(v(),V("span",{ref:a=>{f(t).onArrowChange(a)},style:qt({position:"absolute",left:f(t).arrowX?.value?`${f(t).arrowX?.value}px`:void 0,top:f(t).arrowY?.value?`${f(t).arrowY?.value}px`:void 0,[i.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f(t).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f(t).placedSide.value],visibility:f(t).shouldHideArrow.value?"hidden":void 0})},[F(ph,H(r.$attrs,{ref:f(e),style:{display:"block"},as:r.as,"as-child":r.asChild,rounded:r.rounded,width:r.width,height:r.height}),{default:_(()=>[A(r.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Xr=Sf,Af=z({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(Rn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),jl=Af,Mf=z({__name:"MenuArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(Xr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Bf=Mf;function qf(){const n=O(!1);return Re(()=>{ni("keydown",()=>{n.value=!0},{capture:!0,passive:!0}),ni(["pointerdown","pointermove"],()=>{n.value=!1},{capture:!0,passive:!0})}),n}const kf=sl(qf),[Bi,Gl]=De(["MenuRoot","MenuSub"],"MenuContext"),[$n,Ef]=De("MenuRoot");var Ff=z({__name:"MenuRoot",props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e,{modal:r,dir:s}=vt(t),a=Vr(s),o=rt(t,"open",i),l=O(),u=kf();return Gl({open:o,onOpenChange:c=>{o.value=c},content:l,onContentChange:c=>{l.value=c}}),Ef({onClose:()=>{o.value=!1},isUsingKeyboardRef:u,dir:a,modal:r}),(c,d)=>(v(),C(f(Pn),null,{default:_(()=>[A(c.$slots,"default")]),_:3}))}}),Of=Ff;const[ka,zf]=De("MenuContent");var Tf=z({__name:"MenuContentImpl",props:cl({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Ul}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(n,{emit:e}){const t=n,i=e,r=Bi(),s=$n(),{trapFocus:a,disableOutsidePointerEvents:o,loop:l}=vt(t);wl(),ha(o.value);const u=O(""),c=O(0),d=O(0),h=O(null),p=O("right"),m=O(0),g=O(null),y=O(),{forwardRef:x,currentElement:b}=Y(),{handleTypeaheadSearch:w}=hd();_e(b,E=>{r.onContentChange(E)}),Ai(()=>{window.clearTimeout(c.value)});function S(E){return p.value===h.value?.side&&kd(E,h.value?.area)}async function q(E){i("openAutoFocus",E),!E.defaultPrevented&&(E.preventDefault(),b.value?.focus({preventScroll:!0}))}function M(E){if(E.defaultPrevented)return;const U=E.target.closest("[data-reka-menu-content]")===E.currentTarget,G=E.ctrlKey||E.altKey||E.metaKey,ee=E.key.length===1,te=Jc(E,pt(),b.value,{loop:l.value,arrowKeyOptions:"vertical",dir:s?.dir.value,focus:!0,attributeName:"[data-reka-collection-item]:not([data-disabled])"});if(te)return te?.focus();if(E.code==="Space")return;const ne=y.value?.getItems()??[];if(U&&(E.key==="Tab"&&E.preventDefault(),!G&&ee&&w(E.key,ne)),E.target!==b.value||!Sd.includes(E.key))return;E.preventDefault();const K=[...ne.map(Q=>Q.ref)];Ml.includes(E.key)&&K.reverse(),Bd(K)}function B(E){E?.currentTarget?.contains?.(E.target)||(window.clearTimeout(c.value),u.value="")}function L(E){if(!Cn(E))return;const D=E.target,U=m.value!==E.clientX;if(E?.currentTarget?.contains(D)&&U){const G=E.clientX>m.value?"right":"left";p.value=G,m.value=E.clientX}}return zf({onItemEnter:E=>!!S(E),onItemLeave:E=>{S(E)||(b.value?.focus(),g.value=null)},onTriggerLeave:E=>!!S(E),searchRef:u,pointerGraceTimerRef:d,onPointerGraceIntentChange:E=>{h.value=E}}),(E,D)=>(v(),C(f(ma),{"as-child":"",trapped:f(a),onMountAutoFocus:q,onUnmountAutoFocus:D[7]||(D[7]=U=>i("closeAutoFocus",U))},{default:_(()=>[F(f(kn),{"as-child":"","disable-outside-pointer-events":f(o),onEscapeKeyDown:D[2]||(D[2]=U=>i("escapeKeyDown",U)),onPointerDownOutside:D[3]||(D[3]=U=>i("pointerDownOutside",U)),onFocusOutside:D[4]||(D[4]=U=>i("focusOutside",U)),onInteractOutside:D[5]||(D[5]=U=>i("interactOutside",U)),onDismiss:D[6]||(D[6]=U=>i("dismiss"))},{default:_(()=>[F(f(kl),{ref_key:"rovingFocusGroupRef",ref:y,"current-tab-stop-id":g.value,"onUpdate:currentTabStopId":D[0]||(D[0]=U=>g.value=U),"as-child":"",orientation:"vertical",dir:f(s).dir.value,loop:f(l),onEntryFocus:D[1]||(D[1]=U=>{i("entryFocus",U),f(s).isUsingKeyboardRef.value||U.preventDefault()})},{default:_(()=>[F(f(Kr),{ref:f(x),role:"menu",as:E.as,"as-child":E.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":f(ga)(f(r).open.value),dir:f(s).dir.value,side:E.side,"side-offset":E.sideOffset,align:E.align,"align-offset":E.alignOffset,"avoid-collisions":E.avoidCollisions,"collision-boundary":E.collisionBoundary,"collision-padding":E.collisionPadding,"arrow-padding":E.arrowPadding,"prioritize-position":E.prioritizePosition,"position-strategy":E.positionStrategy,"update-position-strategy":E.updatePositionStrategy,sticky:E.sticky,"hide-when-detached":E.hideWhenDetached,reference:E.reference,onKeydown:M,onBlur:B,onPointermove:L},{default:_(()=>[A(E.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","position-strategy","update-position-strategy","sticky","hide-when-detached","reference"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Ea=Tf,If=z({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n,t=ka(),{forwardRef:i}=Y(),{CollectionItem:r}=sa(),s=O(!1);async function a(l){l.defaultPrevented||Cn(l)&&(e.disabled?t.onItemLeave(l):t.onItemEnter(l)||l.currentTarget?.focus({preventScroll:!0}))}async function o(l){await Ye(),!l.defaultPrevented&&Cn(l)&&t.onItemLeave(l)}return(l,u)=>(v(),C(f(r),{value:{textValue:l.textValue}},{default:_(()=>[F(f(re),H({ref:f(i),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":s.value?"":void 0,onPointermove:a,onPointerleave:o,onFocus:u[0]||(u[0]=async c=>{await Ye(),!(c.defaultPrevented||l.disabled)&&(s.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await Ye(),!c.defaultPrevented&&(s.value=!1)})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),Wl=If,Pf=z({__name:"MenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(n,{emit:e}){const t=n,i=e,{forwardRef:r,currentElement:s}=Y(),a=$n(),o=ka(),l=O(!1);async function u(){const c=s.value;if(!t.disabled&&c){const d=new CustomEvent(_d,{bubbles:!0,cancelable:!0});i("select",d),await Ye(),d.defaultPrevented?l.value=!1:a.onClose()}}return(c,d)=>(v(),C(Wl,H(t,{ref:f(r),onClick:u,onPointerdown:d[0]||(d[0]=()=>{l.value=!0}),onPointerup:d[1]||(d[1]=async h=>{await Ye(),!h.defaultPrevented&&(l.value||h.currentTarget?.click())}),onKeydown:d[2]||(d[2]=async h=>{const p=f(o).searchRef.value!=="";c.disabled||p&&h.key===" "||f(Ds).includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})}),{default:_(()=>[A(c.$slots,"default")]),_:3},16))}}),Fa=Pf;const[Rf,Kl]=De(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var Df=z({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(n){const e=Rf({modelValue:O(!1)});return(t,i)=>(v(),C(f($t),{present:t.forceMount||f(kr)(f(e).modelValue.value)||f(e).modelValue.value===!0},{default:_(()=>[F(f(re),{as:t.as,"as-child":t.asChild,"data-state":f(ya)(f(e).modelValue.value)},{default:_(()=>[A(t.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),$f=Df,Lf=z({__name:"MenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1,default:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=rt(t,"modelValue",i);return Kl({modelValue:r}),(s,a)=>(v(),C(Fa,H({role:"menuitemcheckbox"},t,{"aria-checked":f(kr)(f(r))?"mixed":f(r),"data-state":f(ya)(f(r)),onSelect:a[0]||(a[0]=async o=>{i("select",o),f(kr)(f(r))?r.value=!0:r.value=!f(r)})}),{default:_(()=>[A(s.$slots,"default",{modelValue:f(r)})]),_:3},16,["aria-checked","data-state"]))}}),Hf=Lf,Nf=z({__name:"MenuRootContentModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=Ce(t,i),s=Bi(),{forwardRef:a,currentElement:o}=Y();return fa(o),(l,u)=>(v(),C(Ea,H(f(r),{ref:f(a),"trap-focus":f(s).open.value,"disable-outside-pointer-events":f(s).open.value,"disable-outside-scroll":!0,onDismiss:u[0]||(u[0]=c=>f(s).onOpenChange(!1)),onFocusOutside:u[1]||(u[1]=fe(c=>i("focusOutside",c),["prevent"]))}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),Vf=Nf,Uf=z({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const r=Ce(n,e),s=Bi();return(a,o)=>(v(),C(Ea,H(f(r),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:o[0]||(o[0]=l=>f(s).onOpenChange(!1))}),{default:_(()=>[A(a.$slots,"default")]),_:3},16))}}),jf=Uf,Gf=z({__name:"MenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const r=Ce(n,e),s=Bi(),a=$n();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(s).open.value},{default:_(()=>[f(a).modal.value?(v(),C(Vf,oe(H({key:0},{...o.$attrs,...f(r)})),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(jf,oe(H({key:1},{...o.$attrs,...f(r)})),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Wf=Gf,Kf=z({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(re),H({role:"group"},e),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Xl=Kf,Xf=z({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(n){const e=n;return(t,i)=>(v(),C(f(re),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Yf=Xf,Jf=z({__name:"MenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(En),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Zf=Jf;const[Qf,ep]=De("MenuRadioGroup");var tp=z({__name:"MenuRadioGroup",props:{modelValue:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=rt(t,"modelValue",e);return ep({modelValue:r,onValueChange:s=>{r.value=s}}),(s,a)=>(v(),C(Xl,oe(le(t)),{default:_(()=>[A(s.$slots,"default",{modelValue:f(r)})]),_:3},16))}}),ip=tp,np=z({__name:"MenuRadioItem",props:{value:{type:String,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(n,{emit:e}){const t=n,i=e,{value:r}=vt(t),s=Qf(),a=k(()=>s.modelValue.value===r?.value);return Kl({modelValue:a}),(o,l)=>(v(),C(Fa,H({role:"menuitemradio"},t,{"aria-checked":a.value,"data-state":f(ya)(a.value),onSelect:l[0]||(l[0]=async u=>{i("select",u),f(s).onValueChange(f(r))})}),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),rp=np,sp=z({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(re),H(e,{role:"separator","aria-orientation":"horizontal"}),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),ap=sp;const[Yl,op]=De("MenuSub");var lp=z({__name:"MenuSub",props:{open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(n,{emit:e}){const t=n,r=rt(t,"open",e,{defaultValue:!1,passive:t.open===void 0}),s=Bi(),a=O(),o=O();return gt(l=>{s?.open.value===!1&&(r.value=!1),l(()=>r.value=!1)}),Gl({open:r,onOpenChange:l=>{r.value=l},content:o,onContentChange:l=>{o.value=l}}),op({triggerId:"",contentId:"",trigger:a,onTriggerChange:l=>{a.value=l}}),(l,u)=>(v(),C(f(Pn),null,{default:_(()=>[A(l.$slots,"default")]),_:3}))}}),up=lp,cp=z({__name:"MenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1,default:!0},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const r=Ce(n,e),s=Bi(),a=$n(),o=Yl(),{forwardRef:l,currentElement:u}=Y();return o.contentId||=yt(void 0,"reka-menu-sub-content"),(c,d)=>(v(),C(f($t),{present:c.forceMount||f(s).open.value},{default:_(()=>[F(Ea,H(f(r),{id:f(o).contentId,ref:f(l),"aria-labelledby":f(o).triggerId,align:"start",side:f(a).dir.value==="rtl"?"left":"right","disable-outside-pointer-events":!1,"disable-outside-scroll":!1,"trap-focus":!1,onOpenAutoFocus:d[0]||(d[0]=fe(h=>{f(a).isUsingKeyboardRef.value&&f(u)?.focus()},["prevent"])),onCloseAutoFocus:d[1]||(d[1]=fe(()=>{},["prevent"])),onFocusOutside:d[2]||(d[2]=h=>{h.defaultPrevented||h.target!==f(o).trigger.value&&f(s).onOpenChange(!1)}),onEscapeKeyDown:d[3]||(d[3]=h=>{f(a).onClose(),h.preventDefault()}),onKeydown:d[4]||(d[4]=h=>{const p=h.currentTarget?.contains(h.target),m=f(Md)[f(a).dir.value].includes(h.key);p&&m&&(f(s).onOpenChange(!1),f(o).trigger.value?.focus(),h.preventDefault())})}),{default:_(()=>[A(c.$slots,"default")]),_:3},16,["id","aria-labelledby","side"])]),_:3},8,["present"]))}}),dp=cp,hp=z({__name:"MenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n,t=Bi(),i=$n(),r=Yl(),s=ka(),a=O(null);r.triggerId||=yt(void 0,"reka-menu-sub-trigger");function o(){a.value&&window.clearTimeout(a.value),a.value=null}Ai(()=>{o()});function l(d){!Cn(d)||s.onItemEnter(d)||!e.disabled&&!t.open.value&&!a.value&&(s.onPointerGraceIntentChange(null),a.value=window.setTimeout(()=>{t.onOpenChange(!0),o()},100))}async function u(d){if(!Cn(d))return;o();const h=t.content.value?.getBoundingClientRect();if(h?.width){const p=t.content.value?.dataset.side,m=p==="right",g=m?-5:5,y=h[m?"left":"right"],x=h[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:y,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:y,y:h.bottom}],side:p}),window.clearTimeout(s.pointerGraceTimerRef.value),s.pointerGraceTimerRef.value=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d))return;s.onPointerGraceIntentChange(null)}}async function c(d){const h=s.searchRef.value!=="";e.disabled||h&&d.key===" "||Ad[i.dir.value].includes(d.key)&&(t.onOpenChange(!0),await Ye(),t.content.value?.focus(),d.preventDefault())}return(d,h)=>(v(),C(jl,{"as-child":""},{default:_(()=>[F(Wl,H(e,{id:f(r).triggerId,ref:p=>{f(r)?.onTriggerChange(p?.$el)},"aria-haspopup":"menu","aria-expanded":f(t).open.value,"aria-controls":f(r).contentId,"data-state":f(ga)(f(t).open.value),onClick:h[0]||(h[0]=async p=>{e.disabled||p.defaultPrevented||(p.currentTarget.focus(),f(t).open.value||f(t).onOpenChange(!0))}),onPointermove:l,onPointerleave:u,onKeydown:c}),{default:_(()=>[A(d.$slots,"default")]),_:3},16,["id","aria-expanded","aria-controls","data-state"])]),_:3}))}}),fp=hp;const[qi,pp]=De("PopoverRoot");var mp=z({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e,{modal:r}=vt(t),s=rt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),a=O(),o=O(!1);return pp({contentId:"",triggerId:"",modal:r,open:s,onOpenChange:l=>{s.value=l},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:o}),(l,u)=>(v(),C(f(Pn),null,{default:_(()=>[A(l.$slots,"default",{open:f(s),close:()=>s.value=!1})]),_:3}))}}),gp=mp,yp=z({__name:"PopoverAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;Y();const t=qi();return mc(()=>{t.hasCustomAnchor.value=!0}),Ai(()=>{t.hasCustomAnchor.value=!1}),(i,r)=>(v(),C(f(Rn),oe(le(e)),{default:_(()=>[A(i.$slots,"default")]),_:3},16))}}),vp=yp,bp=z({__name:"PopoverArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(Xr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),xp=bp,wp=z({__name:"PopoverClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n;Y();const t=qi();return(i,r)=>(v(),C(f(re),{type:i.as==="button"?"button":void 0,as:i.as,"as-child":e.asChild,onClick:r[0]||(r[0]=s=>f(t).onOpenChange(!1))},{default:_(()=>[A(i.$slots,"default")]),_:3},8,["type","as","as-child"]))}}),_p=wp,Cp=z({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=zn(gc(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:s}=Y(),a=qi();return wl(),(o,l)=>(v(),C(f(ma),{"as-child":"",loop:"",trapped:o.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>i("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>i("closeAutoFocus",u))},{default:_(()=>[F(f(kn),{"as-child":"","disable-outside-pointer-events":o.disableOutsidePointerEvents,onPointerDownOutside:l[0]||(l[0]=u=>i("pointerDownOutside",u)),onInteractOutside:l[1]||(l[1]=u=>i("interactOutside",u)),onEscapeKeyDown:l[2]||(l[2]=u=>i("escapeKeyDown",u)),onFocusOutside:l[3]||(l[3]=u=>i("focusOutside",u)),onDismiss:l[4]||(l[4]=u=>f(a).onOpenChange(!1))},{default:_(()=>[F(f(Kr),H(f(r),{id:f(a).contentId,ref:f(s),"data-state":f(a).open.value?"open":"closed","aria-labelledby":f(a).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Jl=Cp,Sp=z({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=qi(),s=O(!1);ha(!0);const a=Ce(t,i),{forwardRef:o,currentElement:l}=Y();return fa(l),(u,c)=>(v(),C(Jl,H(f(a),{ref:f(o),"trap-focus":f(r).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=fe(d=>{i("closeAutoFocus",d),s.value||f(r).triggerElement.value?.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=d=>{i("pointerDownOutside",d);const h=d.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,m=h.button===2||p;s.value=m}),onFocusOutside:c[2]||(c[2]=fe(()=>{},["prevent"]))}),{default:_(()=>[A(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),Ap=Sp,Mp=z({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=qi(),s=O(!1),a=O(!1),o=Ce(t,i);return(l,u)=>(v(),C(Jl,H(f(o),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{i("closeAutoFocus",c),c.defaultPrevented||(s.value||f(r).triggerElement.value?.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=async c=>{i("interactOutside",c),c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const d=c.target;f(r).triggerElement.value?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16))}}),Bp=Mp,qp=z({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=qi(),s=Ce(t,i),{forwardRef:a}=Y();return r.contentId||=yt(void 0,"reka-popover-content"),(o,l)=>(v(),C(f($t),{present:o.forceMount||f(r).open.value},{default:_(()=>[f(r).modal.value?(v(),C(Ap,H({key:0},f(s),{ref:f(a)}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(Bp,H({key:1},f(s),{ref:f(a)}),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),kp=qp,Ep=z({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(En),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Fp=Ep,Op=z({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n,t=qi(),{forwardRef:i,currentElement:r}=Y();return t.triggerId||=yt(void 0,"reka-popover-trigger"),Re(()=>{t.triggerElement.value=r.value}),(s,a)=>(v(),C(an(f(t).hasCustomAnchor.value?f(re):f(Rn)),{"as-child":""},{default:_(()=>[F(f(re),{id:f(t).triggerId,ref:f(i),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":f(t).open.value,"aria-controls":f(t).contentId,"data-state":f(t).open.value?"open":"closed",as:s.as,"as-child":e.asChild,onClick:f(t).onOpenToggle},{default:_(()=>[A(s.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),zp=Op,Tp=z({__name:"DropdownMenuArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(Bf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Zl=Tp,Ip=z({__name:"DropdownMenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(n,{emit:e}){const t=n,r=sn(e);return Y(),(s,a)=>(v(),C(f(Hf),oe(le({...t,...f(r)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Pp=Ip;const[Ql,Rp]=De("DropdownMenuRoot");var Dp=z({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e;Y();const r=rt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=O(),{modal:a,dir:o}=vt(t),l=Vr(o);return Rp({open:r,onOpenChange:u=>{r.value=u},onOpenToggle:()=>{r.value=!r.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:l}),(u,c)=>(v(),C(f(Of),{open:f(r),"onUpdate:open":c[0]||(c[0]=d=>dl(r)?r.value=d:null),dir:f(l),modal:f(a)},{default:_(()=>[A(u.$slots,"default",{open:f(r)})]),_:3},8,["open","dir","modal"]))}}),eu=Dp,$p=z({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(n,{emit:e}){const r=Ce(n,e);Y();const s=Ql(),a=O(!1);function o(l){l.defaultPrevented||(a.value||setTimeout(()=>{s.triggerElement.value?.focus()},0),a.value=!1,l.preventDefault())}return s.contentId||=yt(void 0,"reka-dropdown-menu-content"),(l,u)=>(v(),C(f(Wf),H(f(r),{id:f(s).contentId,"aria-labelledby":f(s)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"},onCloseAutoFocus:o,onInteractOutside:u[0]||(u[0]=c=>{if(c.defaultPrevented)return;const d=c.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,p=d.button===2||h;(!f(s).modal.value||p)&&(a.value=!0),f(s).triggerElement.value?.contains(c.target)&&c.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),Lp=$p,Hp=z({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(Xl),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Np=Hp,Vp=z({__name:"DropdownMenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(n,{emit:e}){const t=n,r=sn(e);return Y(),(s,a)=>(v(),C(f(Fa),oe(le({...t,...f(r)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Up=Vp,jp=z({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f($f),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Gp=jp,Wp=z({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(Yf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Kp=Wp,Xp=z({__name:"DropdownMenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(Zf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Yp=Xp,Jp=z({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=sn(e);return Y(),(s,a)=>(v(),C(f(ip),oe(le({...t,...f(r)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Zp=Jp,Qp=z({__name:"DropdownMenuRadioItem",props:{value:{type:String,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(n,{emit:e}){const r=Ce(n,e);return Y(),(s,a)=>(v(),C(f(rp),oe(le(f(r))),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),em=Qp,tm=z({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(ap),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),im=tm,nm=z({__name:"DropdownMenuSub",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(n,{emit:e}){const t=n,r=rt(t,"open",e,{passive:t.open===void 0,defaultValue:t.defaultOpen??!1});return Y(),(s,a)=>(v(),C(f(up),{open:f(r),"onUpdate:open":a[0]||(a[0]=o=>dl(r)?r.value=o:null)},{default:_(()=>[A(s.$slots,"default",{open:f(r)})]),_:3},8,["open"]))}}),rm=nm,sm=z({__name:"DropdownMenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const r=Ce(n,e);return Y(),(s,a)=>(v(),C(f(dp),H(f(r),{style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),am=sm,om=z({__name:"DropdownMenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(fp),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),lm=om,um=z({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n,t=Ql(),{forwardRef:i,currentElement:r}=Y();return Re(()=>{t.triggerElement=r}),t.triggerId||=yt(void 0,"reka-dropdown-menu-trigger"),(s,a)=>(v(),C(f(jl),{"as-child":""},{default:_(()=>[F(f(re),{id:f(t).triggerId,ref:f(i),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":f(t).open.value,"aria-controls":f(t).open.value?f(t).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":f(t).open.value?"open":"closed",onClick:a[0]||(a[0]=async o=>{!s.disabled&&o.button===0&&o.ctrlKey===!1&&(f(t)?.onOpenToggle(),await Ye(),f(t).open.value&&o.preventDefault())}),onKeydown:a[1]||(a[1]=ht(o=>{s.disabled||(["Enter"," "].includes(o.key)&&f(t).onOpenToggle(),o.key==="ArrowDown"&&f(t).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())},["enter","space","arrow-down"]))},{default:_(()=>[A(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),tu=um,cm=z({__name:"HoverCardArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(Xr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),dm=cm;const[Oa,hm]=De("HoverCardRoot");var fm=z({__name:"HoverCardRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},openDelay:{type:Number,required:!1,default:700},closeDelay:{type:Number,required:!1,default:300}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e,{openDelay:r,closeDelay:s}=vt(t);Y();const a=rt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),o=O(0),l=O(0),u=O(!1),c=O(!1),d=O(!1),h=O();function p(){clearTimeout(l.value),o.value=window.setTimeout(()=>a.value=!0,r.value)}function m(){clearTimeout(o.value),!u.value&&!c.value&&(l.value=window.setTimeout(()=>a.value=!1,s.value))}function g(){a.value=!1}return hm({open:a,onOpenChange(y){a.value=y},onOpen:p,onClose:m,onDismiss:g,hasSelectionRef:u,isPointerDownOnContentRef:c,isPointerInTransitRef:d,triggerElement:h}),(y,x)=>(v(),C(f(Pn),null,{default:_(()=>[A(y.$slots,"default",{open:f(a)})]),_:3}))}}),pm=fm;function Us(n){return e=>e.pointerType==="touch"?void 0:n()}function mm(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var gm=z({__name:"HoverCardContentImpl",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(n,{emit:e}){const t=n,i=e,r=zn(t),{forwardRef:s,currentElement:a}=Y(),o=Oa(),{isPointerInTransit:l,onPointerExit:u}=Cl(o.triggerElement,a);yc(o.isPointerInTransitRef,l,{direction:"rtl"}),u(()=>{o.onClose()});const c=O(!1);let d;gt(p=>{if(c.value){const m=document.body;d=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",p(()=>{m.style.userSelect=d,m.style.webkitUserSelect=d})}});function h(){c.value=!1,o.isPointerDownOnContentRef.value=!1,Ye(()=>{document.getSelection()?.toString()!==""&&(o.hasSelectionRef.value=!0)})}return Re(()=>{a.value&&(document.addEventListener("pointerup",h),mm(a.value).forEach(m=>m.setAttribute("tabindex","-1")))}),Ai(()=>{document.removeEventListener("pointerup",h),o.hasSelectionRef.value=!1,o.isPointerDownOnContentRef.value=!1}),(p,m)=>(v(),C(f(kn),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:m[1]||(m[1]=g=>i("escapeKeyDown",g)),onPointerDownOutside:m[2]||(m[2]=g=>i("pointerDownOutside",g)),onFocusOutside:m[3]||(m[3]=fe(g=>i("focusOutside",g),["prevent"])),onDismiss:f(o).onDismiss},{default:_(()=>[F(f(Kr),H({...f(r),...p.$attrs},{ref:f(s),"data-state":f(o).open.value?"open":"closed",style:{userSelect:c.value?"text":void 0,WebkitUserSelect:c.value?"text":void 0,"--reka-hover-card-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-hover-card-content-available-width":"var(--reka-popper-available-width)","--reka-hover-card-content-available-height":"var(--reka-popper-available-height)","--reka-hover-card-trigger-width":"var(--reka-popper-anchor-width)","--reka-hover-card-trigger-height":"var(--reka-popper-anchor-height)"},onPointerdown:m[0]||(m[0]=g=>{g.currentTarget.contains(g.target)&&(c.value=!0),f(o).hasSelectionRef.value=!1,f(o).isPointerDownOnContentRef.value=!0})}),{default:_(()=>[A(p.$slots,"default")]),_:3},16,["data-state","style"])]),_:3},8,["onDismiss"]))}}),ym=gm,vm=z({__name:"HoverCardContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(n,{emit:e}){const r=Ce(n,e),{forwardRef:s}=Y(),a=Oa();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(a).open.value},{default:_(()=>[F(ym,H(f(r),{ref:f(s),onPointerenter:l[0]||(l[0]=u=>f(Us)(f(a).onOpen)(u))}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),bm=vm,xm=z({__name:"HoverCardPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(En),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),wm=xm,_m=z({__name:"HoverCardTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"a"}},setup(n){const{forwardRef:e,currentElement:t}=Y(),i=Oa();i.triggerElement=t;function r(){setTimeout(()=>{!i.isPointerInTransitRef.value&&!i.open.value&&i.onClose()},0)}return(s,a)=>(v(),C(f(Rn),{"as-child":"",reference:s.reference},{default:_(()=>[F(f(re),{ref:f(e),"as-child":s.asChild,as:s.as,"data-state":f(i).open.value?"open":"closed","data-grace-area-trigger":"",onPointerenter:a[0]||(a[0]=o=>f(Us)(f(i).onOpen)(o)),onPointerleave:a[1]||(a[1]=o=>f(Us)(r)(o)),onFocus:a[2]||(a[2]=o=>f(i).onOpen()),onBlur:a[3]||(a[3]=o=>f(i).onClose())},{default:_(()=>[A(s.$slots,"default")]),_:3},8,["as-child","as","data-state"])]),_:3},8,["reference"]))}}),Cm=_m,Sm=z({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(re),H(e,{onMousedown:i[0]||(i[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),co=Sm;let os=new Map,js=!1;try{js=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Tr=!1;try{Tr=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const iu={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class nu{format(e){let t="";if(!js&&this.options.signDisplay!=null?t=Mm(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!Tr){var i;let{unit:r,unitDisplay:s="short",locale:a}=this.resolvedOptions();if(!r)return t;let o=(i=iu[r])===null||i===void 0?void 0:i[s];t+=o[a]||o.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let i=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...i.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!js&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Tr&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Am(e,t),this.options=t}}function Am(n,e={}){let{numberingSystem:t}=e;if(t&&n.includes("-nu-")&&(n.includes("-u-")||(n+="-u-"),n+=`-nu-${t}`),e.style==="unit"&&!Tr){var i;let{unit:a,unitDisplay:o="short"}=e;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=iu[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);e={...e,style:"decimal"}}let r=n+(e?Object.entries(e).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(os.has(r))return os.get(r);let s=new Intl.NumberFormat(n,e);return os.set(r,s),s}function Mm(n,e,t){if(e==="auto")return n.format(t);if(e==="never")return n.format(Math.abs(t));{let i=!1;if(e==="always"?i=t>0||Object.is(t,0):e==="exceptZero"&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):i=t>0),i){let r=n.format(-t),s=n.format(t),a=r.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return n.format(t)}}const Bm=new RegExp("^.*\\(.*\\).*$"),qm=["latn","arab","hanidec","deva","beng","fullwide"];class ru{parse(e){return ls(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,i){return ls(this.locale,this.options,e).isValidPartialNumber(e,t,i)}getNumberingSystem(e){return ls(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}const ho=new Map;function ls(n,e,t){let i=fo(n,e);if(!n.includes("-nu-")&&!i.isValidPartialNumber(t)){for(let r of qm)if(r!==i.options.numberingSystem){let s=fo(n+(n.includes("-u-")?"-nu-":"-u-nu-")+r,e);if(s.isValidPartialNumber(t))return s}}return i}function fo(n,e){let t=n+(e?Object.entries(e).sort((r,s)=>r[0]<s[0]?-1:1).join():""),i=ho.get(t);return i||(i=new km(n,e),ho.set(t,i)),i}class km{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Oi(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let a=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let o=t.indexOf(".");o===-1&&(o=t.length),t=t.replace(".",""),o-2===0?t=`0.${t}`:o-2===-1?t=`0.0${t}`:o-2===-2?t="0.00":t=`${t.slice(0,o-2)}.${t.slice(o-2)}`,a>-1&&(t=`-${t}`)}let i=t?+t:NaN;if(isNaN(i))return NaN;if(this.options.style==="percent"){var r,s;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)+2,20),maximumFractionDigits:Math.min(((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)+2,20)};return new ru(this.locale,a).parse(new nu(this.locale,a).format(i))}return this.options.currencySign==="accounting"&&Bm.test(e)&&(i=-1*i),i}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=Oi(e,".",this.symbols.group))),this.symbols.group==="’"&&e.includes("'")&&(e=Oi(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Oi(e," ",this.symbols.group),e=Oi(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,i=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&i>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Oi(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits==null&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=Fm(e,this.formatter,this.options,t);var i,r;this.options.style==="percent"&&(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)>18||((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const po=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),Em=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Fm(n,e,t,i){var r,s,a,o;let l=new Intl.NumberFormat(n,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=Em.map(D=>l.formatToParts(D));var h;let p=(h=(r=u.find(D=>D.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&h!==void 0?h:"-",m=(s=c.find(D=>D.type==="plusSign"))===null||s===void 0?void 0:s.value;!m&&(i?.signDisplay==="exceptZero"||i?.signDisplay==="always")&&(m="+");let y=(a=new Intl.NumberFormat(n,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(D=>D.type==="decimal"))===null||a===void 0?void 0:a.value,x=(o=u.find(D=>D.type==="group"))===null||o===void 0?void 0:o.value,b=u.filter(D=>!po.has(D.type)).map(D=>mo(D.value)),w=d.flatMap(D=>D.filter(U=>!po.has(U.type)).map(U=>mo(U.value))),S=[...new Set([...b,...w])].sort((D,U)=>U.length-D.length),q=S.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${S.join("|")}|[\\p{White_Space}]`,"gu"),M=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),B=new Map(M.map((D,U)=>[D,U])),L=new RegExp(`[${M.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:y,group:x,literals:q,numeral:L,index:D=>String(B.get(D))}}function Oi(n,e,t){return n.replaceAll?n.replaceAll(e,t):n.split(e).join(t)}function mo(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function su(n){const{disabled:e}=n,t=O(),i=ol(),r=()=>window.clearTimeout(t.value),s=h=>{r(),!e.value&&(i.trigger(),t.value=window.setTimeout(()=>{s(60)},h))},a=()=>{s(400)},o=()=>{r()},l=O(!1),u=k(()=>Hr(n.target)),c=h=>{h.button!==0||l.value||(h.preventDefault(),l.value=!0,a())},d=()=>{l.value=!1,o()};return Lr&&(ni(u||window,"pointerdown",c),ni(window,"pointerup",d),ni(window,"pointercancel",d)),{isPressed:l,onTrigger:i.on}}function go(n,e=O({})){return hl(()=>new nu(n.value,e.value))}function Om(n,e=O({})){return hl(()=>new ru(n.value,e.value))}function yo(n,e,t){let i=n==="+"?e+t:e-t;if(e%1!==0||t%1!==0){const r=e.toString().split("."),s=t.toString().split("."),a=r[1]&&r[1].length||0,o=s[1]&&s[1].length||0,l=10**Math.max(a,o);e=Math.round(e*l),t=Math.round(t*l),i=n==="+"?e+t:e-t,i/=l}return i}const[za,zm]=De("NumberFieldRoot");var Tm=z({inheritAttrs:!1,__name:"NumberFieldRoot",props:{defaultValue:{type:Number,required:!1,default:void 0},modelValue:{type:[Number,null],required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1,default:1},stepSnapping:{type:Boolean,required:!1,default:!0},formatOptions:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,{disabled:r,readonly:s,disableWheelChange:a,invertWheelChange:o,min:l,max:u,step:c,stepSnapping:d,formatOptions:h,id:p,locale:m}=vt(t),g=rt(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),{primitiveElement:y,currentElement:x}=Fn(),b=cd(m),w=_l(x),S=O(),q=k(()=>!Ki(g.value)&&(J(g.value)===l.value||l.value&&!isNaN(g.value)?yo("-",g.value,c.value)<l.value:!1)),M=k(()=>!Ki(g.value)&&(J(g.value)===u.value||u.value&&!isNaN(g.value)?yo("+",g.value,c.value)>u.value:!1));function B(ae,ye=1){if(S.value?.focus(),t.disabled||t.readonly)return;const hn=G.parse(S.value?.value??"");isNaN(hn)?g.value=l.value??0:ae==="increase"?g.value=J(hn+(c.value??1)*ye):g.value=J(hn-(c.value??1)*ye)}function L(ae=1){B("increase",ae)}function E(ae=1){B("decrease",ae)}function D(ae){ae==="min"&&l.value!==void 0?g.value=J(l.value):ae==="max"&&u.value!==void 0&&(g.value=J(u.value))}const U=go(b,h),G=Om(b,h),ee=k(()=>U.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),te=go(b,h),ne=k(()=>Ki(g.value)||isNaN(g.value)?"":te.format(g.value));function K(ae){return G.isValidPartialNumber(ae,l.value,u.value)}function Q(ae){S.value&&(S.value.value=ae)}function J(ae){let ye;return c.value===void 0||isNaN(c.value)||!d.value?ye=Kc(ae,l.value,u.value):ye=Xc(ae,l.value,u.value,c.value),ye=G.parse(U.format(ye)),ye}function he(ae){const ye=G.parse(ae);return g.value=isNaN(ye)?void 0:J(ye),ae.length?(isNaN(ye),Q(ne.value)):Q(ae)}return zm({modelValue:g,handleDecrease:E,handleIncrease:L,handleMinMaxValue:D,inputMode:ee,inputEl:S,onInputElement:ae=>S.value=ae,textValue:ne,validate:K,applyInputValue:he,disabled:r,readonly:s,disableWheelChange:a,invertWheelChange:o,max:u,min:l,isDecreaseDisabled:q,isIncreaseDisabled:M,id:p}),(ae,ye)=>(v(),C(f(re),H(ae.$attrs,{ref_key:"primitiveElement",ref:y,role:"group",as:ae.as,"as-child":ae.asChild,"data-disabled":f(r)?"":void 0,"data-readonly":f(s)?"":void 0}),{default:_(()=>[A(ae.$slots,"default",{modelValue:f(g),textValue:ne.value}),f(w)&&ae.name?(v(),C(f(Fl),{key:0,type:"text",value:f(g),name:ae.name,disabled:f(r),readonly:f(s),required:ae.required},null,8,["value","name","disabled","readonly","required"])):R("v-if",!0)]),_:3},16,["as","as-child","data-disabled","data-readonly"]))}}),Im=Tm,Pm=z({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n,t=za(),i=k(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isDecreaseDisabled.value),{primitiveElement:r,currentElement:s}=Fn(),{isPressed:a,onTrigger:o}=su({target:s,disabled:i});return o(()=>{t.handleDecrease()}),(l,u)=>(v(),C(f(re),H(e,{ref_key:"primitiveElement",ref:r,tabindex:"-1","aria-label":"Decrease",type:l.as==="button"?"button":void 0,style:{userSelect:f(a)?"none":void 0},disabled:i.value?"":void 0,"data-disabled":i.value?"":void 0,"data-pressed":f(a)?"true":void 0,onContextmenu:u[0]||(u[0]=fe(()=>{},["prevent"]))}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),Rm=Pm,Dm=z({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n,t=za(),i=k(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isIncreaseDisabled.value),{primitiveElement:r,currentElement:s}=Fn(),{isPressed:a,onTrigger:o}=su({target:s,disabled:i});return o(()=>{t.handleIncrease()}),(l,u)=>(v(),C(f(re),H(e,{ref_key:"primitiveElement",ref:r,tabindex:"-1","aria-label":"Increase",type:l.as==="button"?"button":void 0,style:{userSelect:f(a)?"none":void 0},disabled:i.value?"":void 0,"data-disabled":i.value?"":void 0,"data-pressed":f(a)?"true":void 0,onContextmenu:u[0]||(u[0]=fe(()=>{},["prevent"]))}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),$m=Dm,Lm=z({__name:"NumberFieldInput",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(n){const e=n,{primitiveElement:t,currentElement:i}=Fn(),r=za();function s(l){r.disableWheelChange.value||l.target===pt()&&(Math.abs(l.deltaY)<=Math.abs(l.deltaX)||(l.preventDefault(),l.deltaY>0?r.invertWheelChange.value?r.handleDecrease():r.handleIncrease():l.deltaY<0&&(r.invertWheelChange.value?r.handleIncrease():r.handleDecrease())))}Re(()=>{r.onInputElement(i.value)});const a=O(r.textValue.value);_e(()=>r.textValue.value,()=>{a.value=r.textValue.value},{immediate:!0,deep:!0});function o(){requestAnimationFrame(()=>{a.value=r.textValue.value})}return(l,u)=>(v(),C(f(re),H(e,{id:f(r).id.value,ref_key:"primitiveElement",ref:t,value:a.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:f(r).inputMode.value,disabled:f(r).disabled.value?"":void 0,"data-disabled":f(r).disabled.value?"":void 0,readonly:f(r).readonly.value?"":void 0,"data-readonly":f(r).readonly.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":f(r).modelValue.value,"aria-valuemin":f(r).min.value,"aria-valuemax":f(r).max.value,onKeydown:[u[0]||(u[0]=ht(fe(c=>f(r).handleIncrease(),["prevent"]),["up"])),u[1]||(u[1]=ht(fe(c=>f(r).handleDecrease(),["prevent"]),["down"])),u[2]||(u[2]=ht(fe(c=>f(r).handleIncrease(10),["prevent"]),["page-up"])),u[3]||(u[3]=ht(fe(c=>f(r).handleDecrease(10),["prevent"]),["page-down"])),u[4]||(u[4]=ht(fe(c=>f(r).handleMinMaxValue("min"),["prevent"]),["home"])),u[5]||(u[5]=ht(fe(c=>f(r).handleMinMaxValue("max"),["prevent"]),["end"])),u[8]||(u[8]=ht(c=>f(r).applyInputValue(c.target?.value),["enter"]))],onWheel:s,onBeforeinput:u[6]||(u[6]=c=>{const d=c.target;let h=d.value.slice(0,d.selectionStart??void 0)+(c.data??"")+d.value.slice(d.selectionEnd??void 0);f(r).validate(h)||c.preventDefault()}),onInput:u[7]||(u[7]=c=>{const d=c.target;a.value=d.value}),onChange:o,onBlur:u[9]||(u[9]=c=>f(r).applyInputValue(c.target?.value))}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["id","value","inputmode","disabled","data-disabled","readonly","data-readonly","aria-valuenow","aria-valuemin","aria-valuemax"]))}}),Hm=Lm,Nm=z({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n,t=["horizontal","vertical"];function i(o){return t.includes(o)}const r=k(()=>i(e.orientation)?e.orientation:"horizontal"),s=k(()=>r.value==="vertical"?e.orientation:void 0),a=k(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(o,l)=>(v(),C(f(re),H({as:o.as,"as-child":o.asChild,"data-orientation":r.value},a.value),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),Vm=Nm,Um=z({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(Vm,oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),jm=Um;const[Yr,Gm]=De("TabsRoot");var Wm=z({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,{orientation:r,unmountOnHide:s,dir:a}=vt(t),o=Vr(a);Y();const l=rt(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),u=O();return Gm({modelValue:l,changeModelValue:c=>{l.value=c},orientation:r,dir:o,unmountOnHide:s,activationMode:t.activationMode,baseId:yt(void 0,"reka-tabs"),tabsList:u}),(c,d)=>(v(),C(f(re),{dir:f(o),"data-orientation":f(r),"as-child":c.asChild,as:c.as},{default:_(()=>[A(c.$slots,"default",{modelValue:f(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),Km=Wm;function au(n,e){return`${n}-trigger-${e}`}function ou(n,e){return`${n}-content-${e}`}var Xm=z({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n,{forwardRef:t}=Y(),i=Yr(),r=k(()=>au(i.baseId,e.value)),s=k(()=>ou(i.baseId,e.value)),a=k(()=>e.value===i.modelValue.value),o=O(a.value);return Re(()=>{requestAnimationFrame(()=>{o.value=!1})}),(l,u)=>(v(),C(f($t),{present:l.forceMount||a.value,"force-mount":""},{default:_(({present:c})=>[F(f(re),{id:s.value,ref:f(t),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":f(i).orientation.value,"aria-labelledby":r.value,hidden:!c,tabindex:"0",style:qt({animationDuration:o.value?"0s":void 0})},{default:_(()=>[!f(i).unmountOnHide.value||c?A(l.$slots,"default",{key:0}):R("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),Ym=Xm,Jm=z({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n,t=Yr();Y();const i=O(),r=O({size:null,position:null});_e(()=>[t.modelValue.value,t?.dir.value],async()=>{await Ye(),s()},{immediate:!0}),vc([t.tabsList,i],s);function s(){i.value=t.tabsList.value?.querySelector('[role="tab"][data-state="active"]'),i.value&&(t.orientation.value==="horizontal"?r.value={size:i.value.offsetWidth,position:i.value.offsetLeft}:r.value={size:i.value.offsetHeight,position:i.value.offsetTop})}return(a,o)=>typeof r.value.size=="number"?(v(),C(f(re),H({key:0},e,{style:{"--reka-tabs-indicator-size":`${r.value.size}px`,"--reka-tabs-indicator-position":`${r.value.position}px`}}),{default:_(()=>[A(a.$slots,"default")]),_:3},16,["style"])):R("v-if",!0)}}),Zm=Jm,Qm=z({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const e=n,{loop:t}=vt(e),{forwardRef:i,currentElement:r}=Y(),s=Yr();return s.tabsList=r,(a,o)=>(v(),C(f(kl),{"as-child":"",orientation:f(s).orientation.value,dir:f(s).dir.value,loop:f(t)},{default:_(()=>[F(f(re),{ref:f(i),role:"tablist","as-child":a.asChild,as:a.as,"aria-orientation":f(s).orientation.value},{default:_(()=>[A(a.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),eg=Qm,tg=z({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n,{forwardRef:t}=Y(),i=Yr(),r=k(()=>au(i.baseId,e.value)),s=k(()=>ou(i.baseId,e.value)),a=k(()=>e.value===i.modelValue.value);return(o,l)=>(v(),C(f(El),{"as-child":"",focusable:!o.disabled,active:a.value},{default:_(()=>[F(f(re),{id:r.value,ref:f(t),role:"tab",type:o.as==="button"?"button":void 0,as:o.as,"as-child":o.asChild,"aria-selected":a.value?"true":"false","aria-controls":s.value,"data-state":a.value?"active":"inactive",disabled:o.disabled,"data-disabled":o.disabled?"":void 0,"data-orientation":f(i).orientation.value,onMousedown:l[0]||(l[0]=fe(u=>{!o.disabled&&u.ctrlKey===!1?f(i).changeModelValue(o.value):u.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=ht(u=>f(i).changeModelValue(o.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const u=f(i).activationMode!=="manual";!a.value&&!o.disabled&&u&&f(i).changeModelValue(o.value)})},{default:_(()=>[A(o.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),ig=tg,ng=z({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(n){const e=n;return Y(),(t,i)=>(v(),C(f(Xr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),rg=ng;const lu="tooltip.open",[Jr,sg]=De("TooltipRoot");var ag=z({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e;Y();const r=aa(),s=k(()=>t.disableHoverableContent??r.disableHoverableContent.value),a=k(()=>t.disableClosingTrigger??r.disableClosingTrigger.value),o=k(()=>t.disabled??r.disabled.value),l=k(()=>t.delayDuration??r.delayDuration.value),u=k(()=>t.ignoreNonKeyboardFocus??r.ignoreNonKeyboardFocus.value),c=rt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0});_e(c,w=>{r.onClose&&(w?(r.onOpen(),document.dispatchEvent(new CustomEvent(lu))):r.onClose())});const d=O(!1),h=O(),p=k(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:g}=bc(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function y(){g(),d.value=!1,c.value=!0}function x(){g(),c.value=!1}function b(){m()}return sg({contentId:"",open:c,stateAttribute:p,trigger:h,onTriggerChange(w){h.value=w},onTriggerEnter(){r.isOpenDelayed.value?b():y()},onTriggerLeave(){s.value?x():g()},onOpen:y,onClose:x,disableHoverableContent:s,disableClosingTrigger:a,disabled:o,ignoreNonKeyboardFocus:u}),(w,S)=>(v(),C(f(Pn),null,{default:_(()=>[A(w.$slots,"default",{open:f(c)})]),_:3}))}}),og=ag,lg=z({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:"top"},sideOffset:{type:Number,required:!1,default:0},align:{type:null,required:!1,default:"center"},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:!0},collisionBoundary:{type:null,required:!1,default:()=>[]},collisionPadding:{type:[Number,Object],required:!1,default:0},arrowPadding:{type:Number,required:!1,default:0},sticky:{type:String,required:!1,default:"partial"},hideWhenDetached:{type:Boolean,required:!1,default:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(n,{emit:e}){const t=n,i=e,r=Jr(),{forwardRef:s}=Y(),a=Ge(),o=k(()=>a.default?.({})),l=k(()=>{if(t.ariaLabel)return t.ariaLabel;let c="";function d(h){typeof h.children=="string"&&h.type!==xc?c+=h.children:Array.isArray(h.children)&&h.children.forEach(p=>d(p))}return o.value?.forEach(h=>d(h)),c}),u=k(()=>{const{ariaLabel:c,...d}=t;return d});return Re(()=>{ni(window,"scroll",c=>{c.target?.contains(r.trigger.value)&&r.onClose()}),ni(window,lu,r.onClose)}),(c,d)=>(v(),C(f(kn),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=h=>i("escapeKeyDown",h)),onPointerDownOutside:d[1]||(d[1]=h=>{f(r).disableClosingTrigger.value&&f(r).trigger.value?.contains(h.target)&&h.preventDefault(),i("pointerDownOutside",h)}),onFocusOutside:d[2]||(d[2]=fe(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=h=>f(r).onClose())},{default:_(()=>[F(f(Kr),H({ref:f(s),"data-state":f(r).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:_(()=>[A(c.$slots,"default"),F(f(On),{id:f(r).contentId,role:"tooltip"},{default:_(()=>[ce(Z(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),uu=lg,ug=z({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(n){const t=zn(n),{forwardRef:i,currentElement:r}=Y(),{trigger:s,onClose:a}=Jr(),o=aa(),{isPointerInTransit:l,onPointerExit:u}=Cl(s,r);return o.isPointerInTransitRef=l,u(()=>{a()}),(c,d)=>(v(),C(uu,H({ref:f(i)},f(t)),{default:_(()=>[A(c.$slots,"default")]),_:3},16))}}),cg=ug,dg=z({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:"top"},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(n,{emit:e}){const t=n,i=e,r=Jr(),s=Ce(t,i),{forwardRef:a}=Y();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(r).open.value},{default:_(()=>[(v(),C(an(f(r).disableHoverableContent.value?uu:cg),H({ref:f(a)},f(s)),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),hg=dg,fg=z({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(n){const e=n;return(t,i)=>(v(),C(f(En),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),pg=fg,mg=z({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const e=n,t=Jr(),i=aa();t.contentId||=yt(void 0,"reka-tooltip-content");const{forwardRef:r,currentElement:s}=Y(),a=O(!1),o=O(!1),l=k(()=>t.disabled.value?{}:{click:g,focus:p,pointermove:d,pointerleave:h,pointerdown:c,blur:m});Re(()=>{t.onTriggerChange(s.value)});function u(){setTimeout(()=>{a.value=!1},1)}function c(){t.open&&!t.disableClosingTrigger.value&&t.onClose(),a.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(y){y.pointerType!=="touch"&&!o.value&&!i.isPointerInTransitRef.value&&(t.onTriggerEnter(),o.value=!0)}function h(){t.onTriggerLeave(),o.value=!1}function p(y){a.value||t.ignoreNonKeyboardFocus.value&&!y.target.matches?.(":focus-visible")||t.onOpen()}function m(){t.onClose()}function g(){t.disableClosingTrigger.value||t.onClose()}return(y,x)=>(v(),C(f(Rn),{"as-child":"",reference:y.reference},{default:_(()=>[F(f(re),H({ref:f(r),"aria-describedby":f(t).open.value?f(t).contentId:void 0,"data-state":f(t).stateAttribute.value,as:y.as,"as-child":e.asChild,"data-grace-area-trigger":""},Tn(l.value)),{default:_(()=>[A(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),gg=mg;function Mr(n={}){const{inheritAttrs:e=!0}=n,t=tt(),i=z({setup(s,{slots:a}){return()=>{t.value=a.default}}}),r=z({inheritAttrs:e,props:n.props,setup(s,{attrs:a,slots:o}){return()=>{var l;t.value;const u=(l=t.value)==null?void 0:l.call(t,{...n.props==null?yg(a):s,$slots:o});return e&&u?.length===1?u[0]:u}}});return wc({define:i,reuse:r},[i,r])}function yg(n){const e={};for(const t in n)e[Ac(t)]=n[t];return e}const Ta=fl?window:void 0;function rn(n){var e;const t=Pt(n);return(e=t?.$el)!=null?e:t}function wn(...n){const e=[],t=()=>{e.forEach(o=>o()),e.length=0},i=(o,l,u,c)=>(o.addEventListener(l,u,c),()=>o.removeEventListener(l,u,c)),r=k(()=>{const o=Ar(Pt(n[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),s=Cc(()=>{var o,l;return[(l=(o=r.value)==null?void 0:o.map(u=>rn(u)))!=null?l:[Ta].filter(u=>u!=null),Ar(Pt(r.value?n[1]:n[0])),Ar(f(r.value?n[2]:n[1])),Pt(r.value?n[3]:n[2])]},([o,l,u,c])=>{if(t(),!o?.length||!l?.length||!u?.length)return;const d=Bc(c)?{...c}:c;e.push(...o.flatMap(h=>l.flatMap(p=>u.map(m=>i(h,p,m,d)))))},{flush:"post"}),a=()=>{s(),t()};return oa(t),a}function vg(){const n=tt(!1),e=Nr();return e&&Re(()=>{n.value=!0},e),n}function cu(n){const e=vg();return k(()=>(e.value,!!n()))}function bg(n,e,t={}){const{window:i=Ta,...r}=t;let s;const a=cu(()=>i&&"MutationObserver"in i),o=()=>{s&&(s.disconnect(),s=void 0)},l=k(()=>{const h=Pt(n),p=Ar(h).map(rn).filter(Mc);return new Set(p)}),u=_e(l,h=>{o(),a.value&&h.size&&(s=new MutationObserver(e),h.forEach(p=>s.observe(p,r)))},{immediate:!0,flush:"post"}),c=()=>s?.takeRecords(),d=()=>{u(),o()};return oa(d),{isSupported:a,stop:d,takeRecords:c}}function xg(n){return JSON.parse(JSON.stringify(n))}function wg(n,e,t={}){const{window:i=Ta,...r}=t;let s;const a=cu(()=>i&&"ResizeObserver"in i),o=()=>{s&&(s.disconnect(),s=void 0)},l=k(()=>{const d=Pt(n);return Array.isArray(d)?d.map(h=>rn(h)):[rn(d)]}),u=_e(l,d=>{if(o(),a.value&&i){s=new ResizeObserver(e);for(const h of d)h&&s.observe(h,r)}},{immediate:!0,flush:"post"}),c=()=>{o(),u()};return oa(c),{isSupported:a,stop:c}}function vo(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:r=!0,immediate:s=!0,updateTiming:a="sync"}=e,o=tt(0),l=tt(0),u=tt(0),c=tt(0),d=tt(0),h=tt(0),p=tt(0),m=tt(0);function g(){const x=rn(n);if(!x){t&&(o.value=0,l.value=0,u.value=0,c.value=0,d.value=0,h.value=0,p.value=0,m.value=0);return}const b=x.getBoundingClientRect();o.value=b.height,l.value=b.bottom,u.value=b.left,c.value=b.right,d.value=b.top,h.value=b.width,p.value=b.x,m.value=b.y}function y(){a==="sync"?g():a==="next-frame"&&requestAnimationFrame(()=>g())}return wg(n,y),_e(()=>rn(n),x=>!x&&y()),bg(n,y,{attributeFilter:["style","class"]}),r&&wn("scroll",y,{capture:!0,passive:!0}),i&&wn("resize",y,{passive:!0}),_c(()=>{s&&y()}),{height:o,bottom:l,left:u,right:c,top:d,width:h,x:p,y:m,update:y}}function _g(n,e,t,i={}){var r,s,a;const{clone:o=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:h}=i,p=Nr(),m=t||p?.emit||((r=p?.$emit)==null?void 0:r.bind(p))||((a=(s=p?.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(p?.proxy));let g=u;g=g||`update:${e.toString()}`;const y=w=>o?typeof o=="function"?o(w):xg(w):w,x=()=>Sc(n[e])?y(n[e]):d,b=w=>{h?h(w)&&m(g,w):m(g,w)};if(l){const w=x(),S=O(w);let q=!1;return _e(()=>n[e],M=>{q||(q=!0,S.value=y(M),Ye(()=>q=!1))}),_e(S,M=>{!q&&(M!==n[e]||c)&&b(M)},{deep:c}),S}else return k({get(){return x()},set(w){b(w)}})}const Cg=Symbol.for("nuxt:client-only"),Sg=z({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(n,{slots:e,attrs:t}){const i=tt(!1);Re(()=>{i.value=!0});const r=Nr();return r&&(r._nuxtClientOnly=!0),Ec(Cg,!0),()=>{if(i.value){const l=e.default?.();return l&&l.length===1?[qc(l[0],t)]:l}const s=e.fallback||e.placeholder;if(s)return kc(s);const a=n.fallback||n.placeholder||"",o=n.fallbackTag||n.placeholderTag||"span";return V(o,t,a)}}}),bo=Fc({...Ka,messages:{...Ka.messages,authForm:{submit:"Continue",hidePassword:"Hide password",showPassword:"Show password"},banner:{close:"Close"},chatPrompt:{placeholder:"Type your message here..."},chatPromptSubmit:{label:"Send prompt"},colorMode:{system:"System",light:"Light",dark:"Dark",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode"},contentSearch:{links:"Links",theme:"Theme"},contentSearchButton:{label:"Search..."},contentToc:{title:"On this page"},dashboardSearch:{theme:"Theme"},dashboardSearchButton:{label:"Search..."},dashboardSidebarCollapse:{expand:"Expand sidebar",collapse:"Collapse sidebar"},dashboardSidebarToggle:{close:"Close sidebar",open:"Open sidebar"},error:{clear:"Back to home"},header:{close:"Close menu",open:"Open menu"},pricingTable:{caption:"Pricing plan comparison"},prose:{codeCollapse:{name:"code",openText:"Expand",closeText:"Collapse"},collapsible:{name:"properties",openText:"Show",closeText:"Hide"},pre:{copy:"Copy code to clipboard"}}}}),Ag=n=>{const e=n||je(Oc(zc,bo));return Tc(k(()=>e.value||bo))},du=la(Ag),Mg=()=>Ic("color-mode").value,Bg=Object.assign({inheritAttrs:!1},{__name:"UColorModeButton",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"}},setup(n){const{t:e}=du(),t=Mg(),i=Te(),r=k({get(){return t.value==="dark"},set(s){t.preference=s?"dark":"light"}});return(s,a)=>{const o=Sg;return f(t)?.forced?R("",!0):(v(),C(o,{key:0},{fallback:_(()=>[A(s.$slots,"fallback",{},()=>[a[1]||(a[1]=I("div",{class:"size-8"},null,-1))])]),default:_(()=>[F(lt,H({icon:r.value?f(i).ui.icons.dark:f(i).ui.icons.light,color:n.color,variant:n.variant,"aria-label":r.value?f(e)("colorMode.switchToLight"):f(e)("colorMode.switchToDark")},s.$attrs,{onClick:a[0]||(a[0]=l=>r.value=!r.value)}),null,16,["icon","color","variant","aria-label"])]),_:3}))}}}),tr={meta:"",ctrl:"",alt:"",win:"⊞",command:"⌘",shift:"⇧",control:"⌃",option:"⌥",enter:"↵",delete:"⌦",backspace:"⌫",escape:"⎋",tab:"⇥",capslock:"⇪",arrowup:"↑",arrowright:"→",arrowdown:"↓",arrowleft:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘"},qg=()=>{const n=k(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),e=ra({meta:" ",alt:" ",ctrl:" "});Re(()=>{e.meta=n.value?tr.command:"Ctrl",e.ctrl=n.value?tr.control:"Ctrl",e.alt=n.value?tr.option:"Alt"});function t(i){if(i)return["meta","alt","ctrl"].includes(i)?e[i]:tr[i]||i.toUpperCase()}return{macOS:n,getKbdKey:t}},kg=la(qg),Eg={base:"inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans",variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{sm:"h-4 min-w-[16px] text-[10px]",md:"h-5 min-w-[20px] text-[11px]",lg:"h-6 min-w-[24px] text-[12px]"}},compoundVariants:[{color:"primary",variant:"solid",class:"text-inverted bg-primary"},{color:"secondary",variant:"solid",class:"text-inverted bg-secondary"},{color:"success",variant:"solid",class:"text-inverted bg-success"},{color:"info",variant:"solid",class:"text-inverted bg-info"},{color:"warning",variant:"solid",class:"text-inverted bg-warning"},{color:"error",variant:"solid",class:"text-inverted bg-error"},{color:"primary",variant:"outline",class:"ring ring-inset ring-primary/50 text-primary"},{color:"secondary",variant:"outline",class:"ring ring-inset ring-secondary/50 text-secondary"},{color:"success",variant:"outline",class:"ring ring-inset ring-success/50 text-success"},{color:"info",variant:"outline",class:"ring ring-inset ring-info/50 text-info"},{color:"warning",variant:"outline",class:"ring ring-inset ring-warning/50 text-warning"},{color:"error",variant:"outline",class:"ring ring-inset ring-error/50 text-error"},{color:"primary",variant:"soft",class:"text-primary bg-primary/10"},{color:"secondary",variant:"soft",class:"text-secondary bg-secondary/10"},{color:"success",variant:"soft",class:"text-success bg-success/10"},{color:"info",variant:"soft",class:"text-info bg-info/10"},{color:"warning",variant:"soft",class:"text-warning bg-warning/10"},{color:"error",variant:"soft",class:"text-error bg-error/10"},{color:"primary",variant:"subtle",class:"text-primary ring ring-inset ring-primary/25 bg-primary/10"},{color:"secondary",variant:"subtle",class:"text-secondary ring ring-inset ring-secondary/25 bg-secondary/10"},{color:"success",variant:"subtle",class:"text-success ring ring-inset ring-success/25 bg-success/10"},{color:"info",variant:"subtle",class:"text-info ring ring-inset ring-info/25 bg-info/10"},{color:"warning",variant:"subtle",class:"text-warning ring ring-inset ring-warning/25 bg-warning/10"},{color:"error",variant:"subtle",class:"text-error ring ring-inset ring-error/25 bg-error/10"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"}],defaultVariants:{variant:"outline",color:"neutral",size:"md"}},hu={__name:"UKbd",props:{as:{type:null,required:!1,default:"kbd"},value:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},class:{type:null,required:!1}},setup(n){const e=n,{getKbdKey:t}=kg(),i=Te(),r=k(()=>de({extend:de(Eg),...i.ui?.kbd||{}}));return(s,a)=>(v(),C(f(re),{as:n.as,class:T(r.value({class:e.class,color:e.color,variant:e.variant,size:e.size}))},{default:_(()=>[A(s.$slots,"default",{},()=>[ce(Z(f(t)(n.value)),1)])]),_:3},8,["as","class"]))}},Fg={slots:{content:"flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2.5 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",arrow:"fill-default",text:"truncate",kbds:"hidden lg:inline-flex items-center shrink-0 gap-0.5 not-first-of-type:before:content-['·'] not-first-of-type:before:me-0.5",kbdsSize:"sm"}},Og={__name:"UTooltip",props:{text:{type:String,required:!1},kbds:{type:Array,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},delayDuration:{type:Number,required:!1},disableHoverableContent:{type:Boolean,required:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),s=Te(),a=Ce(Ft(t,"defaultOpen","open","delayDuration","disableHoverableContent","disableClosingTrigger","ignoreNonKeyboardFocus"),i),o=on(je(()=>t.portal)),l=je(()=>qn(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),u=je(()=>t.arrow),c=k(()=>de({extend:de(Fg),...s.ui?.tooltip||{}})({side:l.value.side}));return(d,h)=>(v(),C(f(og),H(f(a),{disabled:!(n.text||n.kbds?.length||r.content)||t.disabled}),{default:_(({open:p})=>[r.default||n.reference?(v(),C(f(gg),H({key:0},d.$attrs,{"as-child":"",reference:n.reference,class:t.class}),{default:_(()=>[A(d.$slots,"default",{open:p})]),_:2},1040,["reference","class"])):R("",!0),F(f(pg),oe(le(f(o))),{default:_(()=>[F(f(hg),H(l.value,{class:c.value.content({class:[!r.default&&t.class,t.ui?.content]})}),{default:_(()=>[A(d.$slots,"content",{},()=>[n.text?(v(),V("span",{key:0,class:T(c.value.text({class:t.ui?.text}))},Z(n.text),3)):R("",!0),n.kbds?.length?(v(),V("span",{key:1,class:T(c.value.kbds({class:t.ui?.kbds}))},[(v(!0),V(we,null,Xe(n.kbds,(m,g)=>(v(),C(hu,H({key:g,size:t.ui?.kbdsSize||c.value.kbdsSize()},{ref_for:!0},typeof m=="string"?{value:m}:m),null,16,["size"]))),128))],2)):R("",!0)]),n.arrow?(v(),C(f(rg),H({key:0},u.value,{class:c.value.arrow({class:t.ui?.arrow})}),null,16,["class"])):R("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["disabled"]))}},zg={base:"w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"},Tg={__name:"UContainer",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(n){const e=n,t=Te(),i=k(()=>de({extend:de(zg),...t.ui?.container||{}}));return(r,s)=>(v(),C(f(re),{as:n.as,class:T(i.value({class:e.class}))},{default:_(()=>[A(r.$slots,"default")]),_:3},8,["as","class"]))}},Ig={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none",header:"flex items-center gap-1.5 p-4 sm:px-6 min-h-16",wrapper:"",body:"flex-1 overflow-y-auto p-4 sm:p-6",footer:"flex items-center gap-1.5 p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",close:"absolute top-4 end-4"},variants:{side:{top:{content:"inset-x-0 top-0 max-h-full"},right:{content:"right-0 inset-y-0 w-full max-w-md"},bottom:{content:"inset-x-0 bottom-0 max-h-full"},left:{content:"left-0 inset-y-0 w-full max-w-md"}},transition:{true:{overlay:"data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]"}}},compoundVariants:[{transition:!0,side:"top",class:{content:"data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-top_200ms_ease-in-out]"}},{transition:!0,side:"right",class:{content:"data-[state=open]:animate-[slide-in-from-right_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-right_200ms_ease-in-out]"}},{transition:!0,side:"bottom",class:{content:"data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-bottom_200ms_ease-in-out]"}},{transition:!0,side:"left",class:{content:"data-[state=open]:animate-[slide-in-from-left_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-left_200ms_ease-in-out]"}}]},Pg={__name:"USlideover",props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:"right"},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:String,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["after:leave","after:enter","close:prevent","update:open"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),{t:s}=In(),a=Te(),o=Ce(Ft(t,"open","defaultOpen","modal"),i),l=on(je(()=>t.portal)),u=je(()=>t.content),c=k(()=>{const h={closeAutoFocus:p=>p.preventDefault()};return t.dismissible?h:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((m,g)=>(m[g]=y=>{y.preventDefault(),i("close:prevent")},m),h)}),d=k(()=>de({extend:de(Ig),...a.ui?.slideover||{}})({transition:t.transition,side:t.side}));return(h,p)=>(v(),C(f(pa),oe(le(f(o))),{default:_(({open:m,close:g})=>[r.default?(v(),C(f(wa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(h.$slots,"default",{open:m})]),_:2},1032,["class"])):R("",!0),F(f(xa),oe(le(f(l))),{default:_(()=>[n.overlay?(v(),C(f(ba),{key:0,class:T(d.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(va),H({"data-side":n.side,class:d.value.content({class:[!r.default&&t.class,t.ui?.content]})},u.value,{onAfterEnter:p[0]||(p[0]=y=>i("after:enter")),onAfterLeave:p[1]||(p[1]=y=>i("after:leave"))},Tn(c.value)),{default:_(()=>[r.content&&(n.title||r.title||n.description||r.description)?(v(),C(f(On),{key:0},{default:_(()=>[n.title||r.title?(v(),C(f(tn),{key:0},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(n.title),1)])]),_:3})):R("",!0),n.description||r.description?(v(),C(f(en),{key:1},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(n.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(h.$slots,"content",{close:g},()=>[r.header||n.title||r.title||n.description||r.description||t.close||r.close?(v(),V("div",{key:0,class:T(d.value.header({class:t.ui?.header}))},[A(h.$slots,"header",{close:g},()=>[I("div",{class:T(d.value.wrapper({class:t.ui?.wrapper}))},[n.title||r.title?(v(),C(f(tn),{key:0,class:T(d.value.title({class:t.ui?.title}))},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(n.title),1)])]),_:3},8,["class"])):R("",!0),n.description||r.description?(v(),C(f(en),{key:1,class:T(d.value.description({class:t.ui?.description}))},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(n.description),1)])]),_:3},8,["class"])):R("",!0)],2),A(h.$slots,"actions"),t.close||r.close?(v(),C(f(Al),{key:0,"as-child":""},{default:_(()=>[A(h.$slots,"close",{close:g,ui:d.value},()=>[t.close?(v(),C(lt,H({key:0,icon:n.closeIcon||f(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":f(s)("slideover.close")},typeof t.close=="object"?t.close:{},{class:d.value.close({class:t.ui?.close})}),null,16,["icon","aria-label","class"])):R("",!0)])]),_:2},1024)):R("",!0)])],2)):R("",!0),I("div",{class:T(d.value.body({class:t.ui?.body}))},[A(h.$slots,"body",{close:g})],2),r.footer?(v(),V("div",{key:1,class:T(d.value.footer({class:t.ui?.footer}))},[A(h.$slots,"footer",{close:g})],2)):R("",!0)])]),_:2},1040,["data-side","class"])]),_:2},1040)]),_:3},16))}},Rg={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default divide-y divide-default flex flex-col focus:outline-none",header:"flex items-center gap-1.5 p-4 sm:px-6 min-h-16",wrapper:"",body:"flex-1 overflow-y-auto p-4 sm:p-6",footer:"flex items-center gap-1.5 p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",close:"absolute top-4 end-4"},variants:{transition:{true:{overlay:"data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]",content:"data-[state=open]:animate-[scale-in_200ms_ease-out] data-[state=closed]:animate-[scale-out_200ms_ease-in]"}},fullscreen:{true:{content:"inset-0"},false:{content:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-2rem)] max-w-lg max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] rounded-lg shadow-lg ring ring-default overflow-hidden"}}}},Dg={__name:"UModal",props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},fullscreen:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:String,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["after:leave","after:enter","close:prevent","update:open"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),{t:s}=In(),a=Te(),o=Ce(Ft(t,"open","defaultOpen","modal"),i),l=on(je(()=>t.portal)),u=je(()=>t.content),c=k(()=>{const h={closeAutoFocus:p=>p.preventDefault()};return t.dismissible?h:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((m,g)=>(m[g]=y=>{y.preventDefault(),i("close:prevent")},m),h)}),d=k(()=>de({extend:de(Rg),...a.ui?.modal||{}})({transition:t.transition,fullscreen:t.fullscreen}));return(h,p)=>(v(),C(f(pa),oe(le(f(o))),{default:_(({open:m,close:g})=>[r.default?(v(),C(f(wa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(h.$slots,"default",{open:m})]),_:2},1032,["class"])):R("",!0),F(f(xa),oe(le(f(l))),{default:_(()=>[n.overlay?(v(),C(f(ba),{key:0,class:T(d.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(va),H({class:d.value.content({class:[!r.default&&t.class,t.ui?.content]})},u.value,{onAfterEnter:p[0]||(p[0]=y=>i("after:enter")),onAfterLeave:p[1]||(p[1]=y=>i("after:leave"))},Tn(c.value)),{default:_(()=>[r.content&&(n.title||r.title||n.description||r.description)?(v(),C(f(On),{key:0},{default:_(()=>[n.title||r.title?(v(),C(f(tn),{key:0},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(n.title),1)])]),_:3})):R("",!0),n.description||r.description?(v(),C(f(en),{key:1},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(n.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(h.$slots,"content",{close:g},()=>[r.header||n.title||r.title||n.description||r.description||t.close||r.close?(v(),V("div",{key:0,class:T(d.value.header({class:t.ui?.header}))},[A(h.$slots,"header",{close:g},()=>[I("div",{class:T(d.value.wrapper({class:t.ui?.wrapper}))},[n.title||r.title?(v(),C(f(tn),{key:0,class:T(d.value.title({class:t.ui?.title}))},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(n.title),1)])]),_:3},8,["class"])):R("",!0),n.description||r.description?(v(),C(f(en),{key:1,class:T(d.value.description({class:t.ui?.description}))},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(n.description),1)])]),_:3},8,["class"])):R("",!0)],2),A(h.$slots,"actions"),t.close||r.close?(v(),C(f(Al),{key:0,"as-child":""},{default:_(()=>[A(h.$slots,"close",{close:g,ui:d.value},()=>[t.close?(v(),C(lt,H({key:0,icon:n.closeIcon||f(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":f(s)("modal.close")},typeof t.close=="object"?t.close:{},{class:d.value.close({class:t.ui?.close})}),null,16,["icon","aria-label","class"])):R("",!0)])]),_:2},1024)):R("",!0)])],2)):R("",!0),r.body?(v(),V("div",{key:1,class:T(d.value.body({class:t.ui?.body}))},[A(h.$slots,"body",{close:g})],2)):R("",!0),r.footer?(v(),V("div",{key:2,class:T(d.value.footer({class:t.ui?.footer}))},[A(h.$slots,"footer",{close:g})],2)):R("",!0)])]),_:2},1040,["class"])]),_:2},1040)]),_:3},16))}};(function(){var n;try{if(typeof document<"u"){var e=document.createElement("style");e.nonce=(n=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:n.content,e.appendChild(document.createTextNode('[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const $g=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Lg=n=>typeof n<"u";function Hg(n){return JSON.parse(JSON.stringify(n))}function xo(n,e,t,i={}){var r,s,a;const{clone:o=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:h}=i,p=Nr(),m=t||p?.emit||((r=p?.$emit)==null?void 0:r.bind(p))||((a=(s=p?.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(p?.proxy));let g=u;e||(e="modelValue"),g=g||`update:${e.toString()}`;const y=w=>o?typeof o=="function"?o(w):Hg(w):w,x=()=>Lg(n[e])?y(n[e]):d,b=w=>{h?h(w)&&m(g,w):m(g,w)};if(l){const w=x(),S=O(w);let q=!1;return _e(()=>n[e],M=>{q||(q=!0,S.value=y(M),Ye(()=>q=!1))}),_e(S,M=>{!q&&(M!==n[e]||c)&&b(M)},{deep:c}),S}else return k({get(){return x()},set(w){b(w)}})}const[Ln,Ng]=De("DrawerRoot"),fu=new WeakMap;function He(n,e,t=!1){if(!n||!(n instanceof HTMLElement)||!e)return;const i={};Object.entries(e).forEach(([r,s])=>{if(r.startsWith("--")){n.style.setProperty(r,s);return}i[r]=n.style[r],n.style[r]=s}),!t&&fu.set(n,i)}function Vg(n,e){if(!n||!(n instanceof HTMLElement))return;const t=fu.get(n);t&&Object.entries(t).forEach(([i,r])=>{n.style[i]=r})}function ir(n,e){const t=window.getComputedStyle(n),i=t.transform||t.webkitTransform||t.mozTransform;let r=i.match(/^matrix3d\((.+)\)$/);return r?Number.parseFloat(r[1].split(", ")[Fe(e)?13:12]):(r=i.match(/^matrix\((.+)\)$/),r?Number.parseFloat(r[1].split(", ")[Fe(e)?5:4]):null)}function Ug(n){return 8*(Math.log(n+1)-2)}function Fe(n){switch(n){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return n}}function us(n,e){if(!n)return()=>{};const t=n.style.cssText;return Object.assign(n.style,e),()=>{n.style.cssText=t}}function jg(...n){return(...e)=>{for(const t of n)typeof t=="function"&&t(...e)}}const ve={DURATION:.5,EASE:[.32,.72,0,1]},pu=.4,Gg=.25,Wg=100,mu=8,nr=16,gu=26,wo="vaul-dragging";function Kg({activeSnapPoint:n,snapPoints:e,drawerRef:t,overlayRef:i,fadeFromIndex:r,onSnapPointChange:s,direction:a}){const o=O(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function l(){o.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Re(()=>{typeof window<"u"&&window.addEventListener("resize",l)}),Pc(()=>{typeof window<"u"&&window.removeEventListener("resize",l)});const u=k(()=>(e.value&&n.value===e.value[e.value.length-1])??null),c=k(()=>e.value&&e.value.length>0&&(r?.value||r?.value===0)&&!Number.isNaN(r?.value)&&e.value[r?.value??-1]===n.value||!e.value),d=k(()=>{var b;return((b=e.value)==null?void 0:b.findIndex(w=>w===n.value))??null}),h=k(()=>{var b;return((b=e.value)==null?void 0:b.map(w=>{const S=typeof w=="string";let q=0;if(S&&(q=Number.parseInt(w,10)),Fe(a.value)){const B=S?q:o.value?w*o.value.innerHeight:0;return o.value?a.value==="bottom"?o.value.innerHeight-B:-o.value.innerHeight+B:B}const M=S?q:o.value?w*o.value.innerWidth:0;return o.value?a.value==="right"?o.value.innerWidth-M:-o.value.innerWidth+M:M}))??[]}),p=k(()=>{var b;return d.value!==null?(b=h.value)==null?void 0:b[d.value]:null}),m=b=>{var w,S,q,M;const B=((w=h.value)==null?void 0:w.findIndex(L=>L===b))??null;Ye(()=>{var L;s(B,h.value),He((L=t.value)==null?void 0:L.$el,{transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,transform:Fe(a.value)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`})}),h.value&&B!==h.value.length-1&&B!==r?.value?He((S=i.value)==null?void 0:S.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,opacity:"0"}):He((q=i.value)==null?void 0:q.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,opacity:"1"}),n.value=B!==null?((M=e.value)==null?void 0:M[B])??null:null};_e([n,h,e],()=>{var b;if(n.value){const w=((b=e.value)==null?void 0:b.findIndex(S=>S===n.value))??-1;h.value&&w!==-1&&typeof h.value[w]=="number"&&m(h.value[w])}},{immediate:!0});function g({draggedDistance:b,closeDrawer:w,velocity:S,dismissible:q}){var M,B,L;if(r.value===void 0)return;const E=a.value==="bottom"||a.value==="right"?(p.value??0)-b:(p.value??0)+b,D=d.value===r.value-1,U=d.value===0,G=b>0;if(D&&He((M=i.value)==null?void 0:M.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`}),S>2&&!G){q?w():m(h.value[0]);return}if(S>2&&G&&h&&e.value){m(h.value[e.value.length-1]);return}const ee=(B=h.value)==null?void 0:B.reduce((ne,K)=>typeof ne!="number"||typeof K!="number"?ne:Math.abs(K-E)<Math.abs(ne-E)?K:ne),te=Fe(a.value)?window.innerHeight:window.innerWidth;if(S>pu&&Math.abs(b)<te*.4){const ne=G?1:-1;if(ne>0&&u){m(h.value[(((L=e.value)==null?void 0:L.length)??0)-1]);return}if(U&&ne<0&&q&&w(),d.value===null)return;m(h.value[d.value+ne]);return}m(ee)}function y({draggedDistance:b}){var w;if(p.value===null)return;const S=a.value==="bottom"||a.value==="right"?p.value-b:p.value+b;(a.value==="bottom"||a.value==="right")&&S<h.value[h.value.length-1]||(a.value==="top"||a.value==="left")&&S>h.value[h.value.length-1]||He((w=t.value)==null?void 0:w.$el,{transform:Fe(a.value)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`})}function x(b,w){if(!e.value||typeof d.value!="number"||!h.value||r.value===void 0)return null;const S=d.value===r.value-1;if(d.value>=r.value&&w)return 0;if(S&&!w)return 1;if(!c.value&&!S)return null;const q=S?d.value+1:d.value-1,M=S?h.value[q]-h.value[q-1]:h.value[q+1]-h.value[q],B=b/Math.abs(M);return S?1-B:B}return{isLastSnapPoint:u,shouldFade:c,getPercentageDragged:x,activeSnapPointIndex:d,onRelease:g,onDrag:y,snapPointsOffset:h}}function _o(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let pn=null;function Xg(n){const{isOpen:e,modal:t,nested:i,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:a}=n,o=O(typeof window<"u"?window.location.href:""),l=O(0);function u(){if(_o()&&pn===null&&e.value&&!a.value){pn={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:d,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.value}px`,left:`${-d}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const p=h-window.innerHeight;p&&l.value>=h&&(document.body.style.top=`-${l.value+p}px`)})},300)}}function c(){if(_o()&&pn!==null&&!a.value){const d=-Number.parseInt(document.body.style.top,10),h=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,pn),window.requestAnimationFrame(()=>{if(s.value&&o.value!==window.location.href){o.value=window.location.href;return}window.scrollTo(h,d)}),pn=null}}return Re(()=>{function d(){l.value=window.scrollY}d(),window.addEventListener("scroll",d),Ai(()=>{window.removeEventListener("scroll",d)})}),_e([e,r,o],()=>{i.value||!r.value||(e.value?(window.matchMedia("(display-mode: standalone)").matches||u(),t.value||setTimeout(()=>{c()},500)):c())}),{restorePositionSetting:c}}function Yg(n,e){return n&&n.value?n:e}function Jg(n){const{emitDrag:e,emitRelease:t,emitClose:i,emitOpenChange:r,open:s,dismissible:a,nested:o,modal:l,shouldScaleBackground:u,setBackgroundColorOnScale:c,scrollLockTimeout:d,closeThreshold:h,activeSnapPoint:p,fadeFromIndex:m,direction:g,noBodyStyles:y,handleOnly:x,preventScrollRestoration:b}=n,w=O(s.value??!1),S=O(!1),q=O(!1),M=O(!1),B=O(null),L=O(null),E=O(null),D=O(null),U=O(null),G=O(!1),ee=O(null),te=O(0),ne=O(!1);O(0);const K=O(null);O(0);const Q=k(()=>{var ie;return((ie=K.value)==null?void 0:ie.$el.getBoundingClientRect().height)||0}),J=Yg(n.snapPoints,O(void 0)),he=k(()=>{var ie;return J&&(((ie=J.value)==null?void 0:ie.length)??0)>0}),ae=O(null),{activeSnapPointIndex:ye,onRelease:hn,snapPointsOffset:Xu,onDrag:Yu,shouldFade:$a,getPercentageDragged:Ju}=Kg({snapPoints:J,activeSnapPoint:p,drawerRef:K,fadeFromIndex:m,overlayRef:B,onSnapPointChange:Zu,direction:g});function Zu(ie,Se){J.value&&ie===Se.length-1&&(L.value=new Date)}Xg({isOpen:w,modal:l,nested:o,hasBeenOpened:S,noBodyStyles:y,preventScrollRestoration:b});function Wn(){return(window.innerWidth-gu)/window.innerWidth}function La(ie,Se){var Ie;if(!ie)return!1;let ge=ie;const Ne=(Ie=window.getSelection())==null?void 0:Ie.toString(),Je=K.value?ir(K.value.$el,g.value):null,bt=new Date;if(ge.hasAttribute("data-vaul-no-drag")||ge.closest("[data-vaul-no-drag]"))return!1;if(g.value==="right"||g.value==="left")return!0;if(L.value&&bt.getTime()-L.value.getTime()<500)return!1;if(Je!==null&&(g.value==="bottom"?Je>0:Je<0))return!0;if(Ne&&Ne.length>0)return!1;if(U.value&&bt.getTime()-U.value.getTime()<d.value&&Je===0||Se)return U.value=bt,!1;for(;ge;){if(ge.scrollHeight>ge.clientHeight){if(ge.scrollTop!==0)return U.value=new Date,!1;if(ge.getAttribute("role")==="dialog")return!0}ge=ge.parentNode}return!0}function Qu(ie){!a.value&&!J.value||K.value&&!K.value.$el.contains(ie.target)||(q.value=!0,E.value=new Date,ie.target.setPointerCapture(ie.pointerId),te.value=Fe(g.value)?ie.clientY:ie.clientX)}function ec(ie){var Se,Ie,ge,Ne,Je,bt;if(K.value&&q.value){const ki=g.value==="bottom"||g.value==="right"?1:-1,Kn=(te.value-(Fe(g.value)?ie.clientY:ie.clientX))*ki,Xn=Kn>0,Na=J.value&&!a.value&&!Xn;if(Na&&ye.value===0)return;const es=Math.abs(Kn),Va=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let hi=es/Q.value;const Ua=Ju(es,Xn);if(Ua!==null&&(hi=Ua),Na&&hi>=1||!G.value&&!La(ie.target,Xn))return;if((Se=K?.value)==null||Se.$el.classList.add(wo),G.value=!0,He((Ie=K.value)==null?void 0:Ie.$el,{transition:"none"}),He((ge=B.value)==null?void 0:ge.$el,{transition:"none"}),J.value&&Yu({draggedDistance:Kn}),Xn&&!J.value){const fi=Ug(Kn),Yn=Math.min(fi*-1,0)*ki;He((Ne=K.value)==null?void 0:Ne.$el,{transform:Fe(g.value)?`translate3d(0, ${Yn}px, 0)`:`translate3d(${Yn}px, 0, 0)`});return}const sc=1-hi;if(($a.value||m.value&&ye.value===m.value-1)&&(e(hi),He((Je=B.value)==null?void 0:Je.$el,{opacity:`${sc}`,transition:"none"},!0)),Va&&B.value&&u.value){const fi=Math.min(Wn()+hi*(1-Wn()),1),Yn=8-hi*8,ja=Math.max(0,14-hi*14);He(Va,{borderRadius:`${Yn}px`,transform:Fe(g.value)?`scale(${fi}) translate3d(0, ${ja}px, 0)`:`scale(${fi}) translate3d(${ja}px, 0, 0)`,transition:"none"},!0)}if(!J.value){const fi=es*ki;He((bt=K.value)==null?void 0:bt.$el,{transform:Fe(g.value)?`translate3d(0, ${fi}px, 0)`:`translate3d(${fi}px, 0, 0)`})}}}function Ha(){var ie;if(!K.value)return;const Se=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),Ie=ir(K.value.$el,g.value);He(K.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`}),He((ie=B.value)==null?void 0:ie.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,opacity:"1"}),u.value&&Ie&&Ie>0&&w.value&&He(Se,{borderRadius:`${mu}px`,overflow:"hidden",...Fe(g.value)?{transform:`scale(${Wn()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Wn()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${ve.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ve.EASE.join(",")})`},!0)}function fn(ie){K.value&&(i(),ie||(w.value=!1),window.setTimeout(()=>{J.value&&(p.value=J.value[0])},ve.DURATION*1e3))}gt(()=>{if(!w.value&&u.value&&$g){const ie=setTimeout(()=>{Vg(document.body)},200);return()=>clearTimeout(ie)}}),_e(s,()=>{w.value=s.value,s.value||fn()});function tc(ie){if(!q.value||!K.value)return;K.value.$el.classList.remove(wo),G.value=!1,q.value=!1,D.value=new Date;const Se=ir(K.value.$el,g.value);if(!La(ie.target,!1)||!Se||Number.isNaN(Se)||E.value===null)return;const Ie=D.value.getTime()-E.value.getTime(),ge=te.value-(Fe(g.value)?ie.clientY:ie.clientX),Ne=Math.abs(ge)/Ie;if(Ne>.05&&(M.value=!0,window.setTimeout(()=>{M.value=!1},200)),J.value){const bt=g.value==="bottom"||g.value==="right"?1:-1;hn({draggedDistance:ge*bt,closeDrawer:fn,velocity:Ne,dismissible:a.value}),t(!0);return}if(g.value==="bottom"||g.value==="right"?ge>0:ge<0){Ha(),t(!0);return}if(Ne>pu){fn(),t(!1);return}const Je=Math.min(K.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(Se>=Je*h.value){fn(),t(!1);return}t(!0),Ha()}_e(w,ie=>{ie&&(L.value=new Date),r(ie)},{immediate:!0});function ic(ie){var Se,Ie;const ge=ie?(window.innerWidth-nr)/window.innerWidth:1,Ne=ie?-16:0;ee.value&&window.clearTimeout(ee.value),He((Se=K.value)==null?void 0:Se.$el,{transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,transform:`scale(${ge}) translate3d(0, ${Ne}px, 0)`}),!ie&&(Ie=K.value)!=null&&Ie.$el&&(ee.value=window.setTimeout(()=>{var Je,bt;const ki=ir((Je=K.value)==null?void 0:Je.$el,g.value);He((bt=K.value)==null?void 0:bt.$el,{transition:"none",transform:Fe(g.value)?`translate3d(0, ${ki}px, 0)`:`translate3d(${ki}px, 0, 0)`})},500))}function nc(ie){var Se;if(ie<0)return;const Ie=Fe(g.value)?window.innerHeight:window.innerWidth,ge=(Ie-nr)/Ie,Ne=ge+ie*(1-ge),Je=-16+ie*nr;He((Se=K.value)==null?void 0:Se.$el,{transform:Fe(g.value)?`scale(${Ne}) translate3d(0, ${Je}px, 0)`:`scale(${Ne}) translate3d(${Je}px, 0, 0)`,transition:"none"})}function rc(ie){var Se;const Ie=Fe(g.value)?window.innerHeight:window.innerWidth,ge=ie?(Ie-nr)/Ie:1,Ne=ie?-16:0;ie&&He((Se=K.value)==null?void 0:Se.$el,{transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,transform:Fe(g.value)?`scale(${ge}) translate3d(0, ${Ne}px, 0)`:`scale(${ge}) translate3d(${Ne}px, 0, 0)`})}return{open:s,isOpen:w,modal:l,keyboardIsOpen:ne,hasBeenOpened:S,drawerRef:K,drawerHeightRef:Q,overlayRef:B,handleRef:ae,isDragging:q,dragStartTime:E,isAllowedToDrag:G,snapPoints:J,activeSnapPoint:p,hasSnapPoints:he,pointerStart:te,dismissible:a,snapPointsOffset:Xu,direction:g,shouldFade:$a,fadeFromIndex:m,shouldScaleBackground:u,setBackgroundColorOnScale:c,onPress:Qu,onDrag:ec,onRelease:tc,closeDrawer:fn,onNestedDrag:nc,onNestedRelease:rc,onNestedOpenChange:ic,emitClose:i,emitDrag:e,emitRelease:t,emitOpenChange:r,nested:o,handleOnly:x,noBodyStyles:y}}const yu=z({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Gg},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:Wg},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(n,{expose:e,emit:t}){const i=n,r=t;Ge();const s=k(()=>i.fadeFromIndex??(i.snapPoints&&i.snapPoints.length-1)),a=xo(i,"open",r,{defaultValue:i.defaultOpen,passive:i.open===void 0}),o=xo(i,"activeSnapPoint",r,{passive:i.activeSnapPoint===void 0}),l={emitDrag:m=>r("drag",m),emitRelease:m=>r("release",m),emitClose:()=>r("close"),emitOpenChange:m=>{r("update:open",m),setTimeout(()=>{r("animationEnd",m)},ve.DURATION*1e3)}},{closeDrawer:u,hasBeenOpened:c,modal:d,isOpen:h}=Ng(Jg({...l,...vt(i),activeSnapPoint:o,fadeFromIndex:s,open:a}));function p(m){if(a.value!==void 0){l.emitOpenChange(m);return}h.value=m,m?c.value=!0:u()}return e({open:h}),(m,g)=>(v(),C(f(pa),{open:f(h),modal:f(d),"onUpdate:open":p},{default:_(()=>[A(m.$slots,"default",{open:f(h)})]),_:3},8,["open","modal"]))}}),Zg=z({__name:"DrawerRootNested",props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(n,{emit:e}){const t=n,i=e,{onNestedDrag:r,onNestedOpenChange:s,onNestedRelease:a}=Ln();function o(){s(!1)}function l(d){r(d)}function u(d){d&&s(d),i("update:open",d)}const c=Ce(t,i);return(d,h)=>(v(),C(yu,H(f(c),{nested:"",onClose:o,onDrag:l,onRelease:f(a),"onUpdate:open":u}),{default:_(()=>[A(d.$slots,"default")]),_:3},16,["onRelease"]))}}),Qg=z({__name:"DrawerOverlay",setup(n){const{overlayRef:e,hasSnapPoints:t,isOpen:i,shouldFade:r}=Ln();return(s,a)=>(v(),C(f(ba),{ref_key:"overlayRef",ref:e,"data-vaul-overlay":"","data-vaul-snap-points":f(i)&&f(t)?"true":"false","data-vaul-snap-points-overlay":f(i)&&f(r)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),ey=()=>()=>{};function ty(){const{direction:n,isOpen:e,shouldScaleBackground:t,setBackgroundColorOnScale:i,noBodyStyles:r}=Ln(),s=O(null),a=O(document.body.style.backgroundColor);function o(){return(window.innerWidth-gu)/window.innerWidth}gt(l=>{if(e.value&&t.value){s.value&&clearTimeout(s.value);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;jg(i.value&&!r.value?us(document.body,{background:"black"}):ey,us(u,{transformOrigin:Fe(n.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${ve.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ve.EASE.join(",")})`}));const c=us(u,{borderRadius:`${mu}px`,overflow:"hidden",...Fe(n.value)?{transform:`scale(${o()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${o()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});l(()=>{c(),s.value=window.setTimeout(()=>{a.value?document.body.style.background=a.value:document.body.style.removeProperty("background")},ve.DURATION*1e3)})}},{flush:"pre"})}const iy=z({__name:"DrawerContent",setup(n){const{open:e,isOpen:t,snapPointsOffset:i,hasSnapPoints:r,drawerRef:s,onPress:a,onDrag:o,onRelease:l,modal:u,emitOpenChange:c,dismissible:d,keyboardIsOpen:h,closeDrawer:p,direction:m,handleOnly:g}=Ln();ty();const y=O(!1),x=k(()=>i.value&&i.value.length>0?`${i.value[0]}px`:"0");function b(q){if(!u.value||q.defaultPrevented){q.preventDefault();return}h.value&&(h.value=!1),d.value?c(!1):q.preventDefault()}function w(q){g.value||a(q)}function S(q){g.value||o(q)}return gt(()=>{r.value&&window.requestAnimationFrame(()=>{y.value=!0})}),(q,M)=>(v(),C(f(va),{ref_key:"drawerRef",ref:s,"data-vaul-drawer":"","data-vaul-drawer-direction":f(m),"data-vaul-delayed-snap-points":y.value?"true":"false","data-vaul-snap-points":f(t)&&f(r)?"true":"false",style:qt({"--snap-point-height":x.value}),onPointerdown:w,onPointermove:S,onPointerup:f(l),onPointerDownOutside:b,onOpenAutoFocus:M[0]||(M[0]=fe(()=>{},["prevent"])),onEscapeKeyDown:M[1]||(M[1]=B=>{f(d)||B.preventDefault()})},{default:_(()=>[A(q.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),ny=["data-vaul-drawer-visible"],ry={"data-vaul-handle-hitarea":"","aria-hidden":"true"},sy=250,ay=120,oy=z({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(n){const e=n,{onPress:t,onDrag:i,handleRef:r,handleOnly:s,isOpen:a,snapPoints:o,activeSnapPoint:l,isDragging:u,dismissible:c,closeDrawer:d}=Ln(),h=O(null),p=O(!1);function m(){if(p.value){x();return}window.setTimeout(()=>{g()},ay)}function g(){if(u.value||e.preventCycle||p.value){x();return}if(x(),!o.value||o.value.length===0){c.value||d();return}const S=l.value===o.value[o.value.length-1];if(S&&c.value){d();return}const q=o.value.findIndex(B=>B===l.value);if(q===-1)return;const M=S?0:q+1;l.value=o.value[M]}function y(){h.value=window.setTimeout(()=>{p.value=!0},sy)}function x(){h.value&&window.clearTimeout(h.value),p.value=!1}function b(S){s.value&&t(S),y()}function w(S){s.value&&i(S)}return(S,q)=>(v(),V("div",{ref_key:"handleRef",ref:r,"data-vaul-drawer-visible":f(a)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:m,onPointercancel:x,onPointerdown:b,onPointermove:w},[I("span",ry,[A(S.$slots,"default")])],40,ny))}}),ly={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},uy={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),s=Te(),a=Ce(Ft(t,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),i),o=on(je(()=>t.portal)),l=je(()=>t.content),u={closeAutoFocus:d=>d.preventDefault()},c=k(()=>de({extend:de(ly),...s.ui?.drawer||{}})({direction:t.direction,inset:t.inset}));return(d,h)=>(v(),C(an(n.nested?f(Zg):f(yu)),oe(le(f(a))),{default:_(()=>[r.default?(v(),C(f(wa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(d.$slots,"default")]),_:3},8,["class"])):R("",!0),F(f(xa),oe(le(f(o))),{default:_(()=>[n.overlay?(v(),C(f(Qg),{key:0,class:T(c.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(iy),H({class:c.value.content({class:[!r.default&&t.class,t.ui?.content]})},l.value,Tn(u)),{default:_(()=>[n.handle?(v(),C(f(oy),{key:0,class:T(c.value.handle({class:t.ui?.handle}))},null,8,["class"])):R("",!0),r.content&&(n.title||r.title||n.description||r.description)?(v(),C(f(On),{key:1},{default:_(()=>[n.title||r.title?(v(),C(f(tn),{key:0},{default:_(()=>[A(d.$slots,"title",{},()=>[ce(Z(n.title),1)])]),_:3})):R("",!0),n.description||r.description?(v(),C(f(en),{key:1},{default:_(()=>[A(d.$slots,"description",{},()=>[ce(Z(n.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(d.$slots,"content",{},()=>[I("div",{class:T(c.value.container({class:t.ui?.container}))},[r.header||n.title||r.title||n.description||r.description?(v(),V("div",{key:0,class:T(c.value.header({class:t.ui?.header}))},[A(d.$slots,"header",{},()=>[n.title||r.title?(v(),C(f(tn),{key:0,class:T(c.value.title({class:t.ui?.title}))},{default:_(()=>[A(d.$slots,"title",{},()=>[ce(Z(n.title),1)])]),_:3},8,["class"])):R("",!0),n.description||r.description?(v(),C(f(en),{key:1,class:T(c.value.description({class:t.ui?.description}))},{default:_(()=>[A(d.$slots,"description",{},()=>[ce(Z(n.description),1)])]),_:3},8,["class"])):R("",!0)])],2)):R("",!0),r.body?(v(),V("div",{key:1,class:T(c.value.body({class:t.ui?.body}))},[A(d.$slots,"body")],2)):R("",!0),r.footer?(v(),V("div",{key:2,class:T(c.value.footer({class:t.ui?.footer}))},[A(d.$slots,"footer")],2)):R("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}};function Gs(n){return n.map(e=>{if(!e.children||typeof e.children=="string")return e.children||"";if(Array.isArray(e.children))return Gs(e.children);if(e.children.default)return Gs(e.children.default())}).join("")}const cy=Dc,Co=Rc(cy.ui?.tv),dy={slots:{root:"bg-default/75 backdrop-blur border-b border-default h-(--ui-header-height) sticky top-0 z-50",container:"flex items-center justify-between gap-3 h-full",left:"lg:flex-1 flex items-center gap-1.5",center:"hidden lg:flex",right:"flex items-center justify-end lg:flex-1 gap-1.5",title:"shrink-0 font-bold text-xl text-highlighted flex items-end gap-1.5",toggle:"lg:hidden",content:"lg:hidden",overlay:"lg:hidden",header:"px-4 sm:px-6 h-(--ui-header-height) shrink-0 flex items-center justify-between gap-3",body:"p-4 sm:p-6 overflow-y-auto"},variants:{toggleSide:{left:{toggle:"-ms-1.5"},right:{toggle:"-me-1.5"}}}},hy=Object.assign({inheritAttrs:!1},{__name:"UHeader",props:qr({as:{type:null,required:!1,default:"header"},title:{type:String,required:!1,default:"Nuxt UI Pro"},to:{type:String,required:!1,default:"/"},mode:{type:null,required:!1,default:"modal"},menu:{type:null,required:!1},toggle:{type:[Boolean,Object],required:!1,default:!0},toggleSide:{type:String,required:!1,default:"right"},class:{type:null,required:!1},ui:{type:null,required:!1}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(n){const e=n,t=Ge(),i=ua(n,"open",{type:Boolean,default:!1}),r=$c(),{t:s}=du(),a=Te(),[o,l]=Mr(),[u,c]=Mr(),[d,h]=Mr(),p=k(()=>(t.title&&Gs(t.title())||e.title||"Nuxt UI Pro").trim());_e(()=>r.fullPath,()=>{i.value=!1});const m=k(()=>Co({extend:Co(dy),...a.uiPro?.header||{}})()),g=k(()=>({slideover:Pg,modal:Dg,drawer:uy})[e.mode]),y=je(()=>qn(e.menu,{content:{onOpenAutoFocus:b=>b.preventDefault()}},e.mode==="modal"?{fullscreen:!0,transition:!1}:{}));function x(){i.value=!i.value}return(b,w)=>(v(),V(we,null,[F(f(d),null,{default:_(()=>[A(b.$slots,"toggle",{open:i.value,toggle:x},()=>[n.toggle?(v(),C(lt,H({key:0,color:"neutral",variant:"ghost","aria-label":i.value?f(s)("header.close"):f(s)("header.open"),icon:i.value?f(a).ui.icons.close:f(a).ui.icons.menu},typeof n.toggle=="object"?n.toggle:{},{class:m.value.toggle({class:e.ui?.toggle,toggleSide:n.toggleSide}),onClick:x}),null,16,["aria-label","icon","class"])):R("",!0)])]),_:3}),F(f(o),null,{default:_(()=>[I("div",{class:T(m.value.left({class:e.ui?.left}))},[n.toggleSide==="left"?(v(),C(f(h),{key:0})):R("",!0),A(b.$slots,"left",{},()=>[F(pl,{to:n.to,"aria-label":p.value,class:T(m.value.title({class:e.ui?.title}))},{default:_(()=>[A(b.$slots,"title",{},()=>[ce(Z(n.title),1)])]),_:3},8,["to","aria-label","class"])])],2)]),_:3}),F(f(u),null,{default:_(()=>[I("div",{class:T(m.value.right({class:e.ui?.right}))},[A(b.$slots,"right"),n.toggleSide==="right"?(v(),C(f(h),{key:0})):R("",!0)],2)]),_:3}),F(f(re),H({as:n.as},b.$attrs,{class:m.value.root({class:[e.ui?.root,e.class]})}),{default:_(()=>[A(b.$slots,"top"),F(Tg,{class:T(m.value.container({class:e.ui?.container}))},{default:_(()=>[F(f(l)),I("div",{class:T(m.value.center({class:e.ui?.center}))},[A(b.$slots,"default")],2),F(f(c))]),_:3},8,["class"]),A(b.$slots,"bottom")]),_:3},16,["as","class"]),F(f(g),H({open:i.value,"onUpdate:open":w[0]||(w[0]=S=>i.value=S),title:f(s)("header.title"),description:f(s)("header.description")},y.value,{ui:{overlay:m.value.overlay({class:e.ui?.overlay}),content:m.value.content({class:e.ui?.content})}}),{content:_(()=>[A(b.$slots,"content",{},()=>[n.mode!=="drawer"?(v(),V("div",{key:0,class:T(m.value.header({class:e.ui?.header}))},[F(f(l)),F(f(c))],2)):R("",!0),I("div",{class:T(m.value.body({class:e.ui?.body}))},[A(b.$slots,"body")],2)])]),_:3},16,["open","title","description","ui"])],64))}}),fy=Lc("/logo.svg"),py={};function my(n,e){const t=Bg,i=lt,r=Og,s=hy;return v(),C(s,null,{title:_(()=>[...e[0]||(e[0]=[I("div",{class:"flex items-center"},[I("img",{src:fy,alt:"Tres.js",class:"h-3 mr-4"}),I("a",{class:"font-bold text-dark font-sans text-sm",href:"/",title:"Home"},[ce("Tres"),I("span",{class:"text-primary-400"},"DevTools")])],-1)])]),right:_(()=>[F(t),F(r,{text:"Open on GitHub",kbds:["meta","G"]},{default:_(()=>[F(i,{color:"neutral",variant:"ghost",size:"xs",to:"https://github.com/nuxt/ui",target:"_blank",icon:"i-simple-icons-github","aria-label":"GitHub"})]),_:1})]),_:1})}const gy=Object.assign(ml(py,[["render",my]]),{__name:"TheHeader"}),yy={slots:{base:"font-medium inline-flex items-center",label:"truncate",leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailingIcon:"shrink-0"},variants:{buttonGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{xs:{base:"text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},sm:{base:"text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},md:{base:"text-xs px-2 py-1 gap-1 rounded-md",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},lg:{base:"text-sm px-2 py-1 gap-1.5 rounded-md",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"text-base px-2.5 py-1 gap-1.5 rounded-md",leadingIcon:"size-6",leadingAvatarSize:"2xs",trailingIcon:"size-6"}},square:{true:""}},compoundVariants:[{color:"primary",variant:"solid",class:"bg-primary text-inverted"},{color:"secondary",variant:"solid",class:"bg-secondary text-inverted"},{color:"success",variant:"solid",class:"bg-success text-inverted"},{color:"info",variant:"solid",class:"bg-info text-inverted"},{color:"warning",variant:"solid",class:"bg-warning text-inverted"},{color:"error",variant:"solid",class:"bg-error text-inverted"},{color:"primary",variant:"outline",class:"text-primary ring ring-inset ring-primary/50"},{color:"secondary",variant:"outline",class:"text-secondary ring ring-inset ring-secondary/50"},{color:"success",variant:"outline",class:"text-success ring ring-inset ring-success/50"},{color:"info",variant:"outline",class:"text-info ring ring-inset ring-info/50"},{color:"warning",variant:"outline",class:"text-warning ring ring-inset ring-warning/50"},{color:"error",variant:"outline",class:"text-error ring ring-inset ring-error/50"},{color:"primary",variant:"soft",class:"bg-primary/10 text-primary"},{color:"secondary",variant:"soft",class:"bg-secondary/10 text-secondary"},{color:"success",variant:"soft",class:"bg-success/10 text-success"},{color:"info",variant:"soft",class:"bg-info/10 text-info"},{color:"warning",variant:"soft",class:"bg-warning/10 text-warning"},{color:"error",variant:"soft",class:"bg-error/10 text-error"},{color:"primary",variant:"subtle",class:"bg-primary/10 text-primary ring ring-inset ring-primary/25"},{color:"secondary",variant:"subtle",class:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"},{color:"success",variant:"subtle",class:"bg-success/10 text-success ring ring-inset ring-success/25"},{color:"info",variant:"subtle",class:"bg-info/10 text-info ring ring-inset ring-info/25"},{color:"warning",variant:"subtle",class:"bg-warning/10 text-warning ring ring-inset ring-warning/25"},{color:"error",variant:"subtle",class:"bg-error/10 text-error ring ring-inset ring-error/25"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"},{size:"xs",square:!0,class:"p-0.5"},{size:"sm",square:!0,class:"p-1"},{size:"md",square:!0,class:"p-1"},{size:"lg",square:!0,class:"p-1"},{size:"xl",square:!0,class:"p-1"}],defaultVariants:{color:"primary",variant:"solid",size:"md"}},ci={__name:"UBadge",props:{as:{type:null,required:!1,default:"span"},label:{type:[String,Number],required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:String,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:String,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:String,required:!1}},setup(n){const e=n,t=Ge(),i=Te(),{orientation:r,size:s}=ca(e),{isLeading:a,isTrailing:o,leadingIconName:l,trailingIconName:u}=gl(e),c=k(()=>de({extend:de(yy),...i.ui?.badge||{}})({color:e.color,variant:e.variant,size:s.value||e.size,square:e.square||!t.default&&!e.label,buttonGroup:r.value}));return(d,h)=>(v(),C(f(re),{as:n.as,class:T(c.value.base({class:[e.ui?.base,e.class]}))},{default:_(()=>[A(d.$slots,"leading",{},()=>[f(a)&&f(l)?(v(),C(Pe,{key:0,name:f(l),class:T(c.value.leadingIcon({class:e.ui?.leadingIcon}))},null,8,["name","class"])):n.avatar?(v(),C(ln,H({key:1,size:e.ui?.leadingAvatarSize||c.value.leadingAvatarSize()},n.avatar,{class:c.value.leadingAvatar({class:e.ui?.leadingAvatar})}),null,16,["size","class"])):R("",!0)]),A(d.$slots,"default",{},()=>[n.label!==void 0&&n.label!==null?(v(),V("span",{key:0,class:T(c.value.label({class:e.ui?.label}))},Z(n.label),3)):R("",!0)]),A(d.$slots,"trailing",{},()=>[f(o)&&f(u)?(v(),C(Pe,{key:0,name:f(u),class:T(c.value.trailingIcon({class:e.ui?.trailingIcon}))},null,8,["name","class"])):R("",!0)])]),_:3},8,["as","class"]))}},vy={class:"font-mono text-xs"},by={key:1,class:"mr-1 w-4 h-4"},xy={class:"flex items-center gap-2 flex-1 min-w-0"},wy={class:"text-gray-700 font-medium"},_y=z({__name:"TreeGraph",props:{item:{},level:{default:0}},emits:["select-object"],setup(n,{emit:e}){const t=n,i=e,r=O(t.item.defaultExpanded??!1),s=()=>{r.value=!r.value},a=()=>{i("select-object",t.item.value)},o=k(()=>t.item.children&&t.item.children.length>0),l=k(()=>({paddingLeft:`${t.level*16}px`}));return(u,c)=>{const d=Pe,h=ci,p=vu;return v(),V("div",vy,[I("div",{style:qt(f(l)),class:"flex items-center py-1 hover:bg-gray-50 group cursor-pointer",onClick:a},[f(o)?(v(),V("div",{key:0,class:"mr-1 w-4 h-4 flex items-center justify-center",onClick:fe(s,["stop"])},[F(d,{name:f(r)?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-gray-400"},null,8,["name"])])):(v(),V("div",by)),I("div",xy,[F(d,{name:n.item.icon,class:"w-4 h-4 text-gray-600 flex-shrink-0"},null,8,["name"]),I("span",wy,Z(n.item.label),1),n.item.name?(v(),C(h,{key:0,color:"primary",size:"sm",variant:"soft"},{default:_(()=>[ce(Z(n.item.name),1)]),_:1})):R("",!0),n.item.memorySize>0?(v(),C(h,{key:1,color:"warning",size:"sm",variant:"soft"},{default:_(()=>[ce(Z(n.item.memorySize)+" KB ",1)]),_:1})):R("",!0)])],4),f(o)&&f(r)?(v(!0),V(we,{key:0},Xe(n.item.children,m=>(v(),C(p,{key:m.key,item:m,level:n.level+1,onSelectObject:c[0]||(c[0]=g=>i("select-object",g))},null,8,["item","level"]))),128)):R("",!0)])}}}),vu=Object.assign(_y,{__name:"TreeGraph"}),Cy={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},bu={__name:"UAlert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:String,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:String,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),{t:s}=In(),a=Te(),o=k(()=>de({extend:de(Cy),...a.ui?.alert||{}})({color:t.color,variant:t.variant,orientation:t.orientation,title:!!t.title||!!r.title}));return(l,u)=>(v(),C(f(re),{as:n.as,"data-orientation":n.orientation,class:T(o.value.root({class:[t.ui?.root,t.class]}))},{default:_(()=>[A(l.$slots,"leading",{},()=>[n.avatar?(v(),C(ln,H({key:0,size:t.ui?.avatarSize||o.value.avatarSize()},n.avatar,{class:o.value.avatar({class:t.ui?.avatar})}),null,16,["size","class"])):n.icon?(v(),C(Pe,{key:1,name:n.icon,class:T(o.value.icon({class:t.ui?.icon}))},null,8,["name","class"])):R("",!0)]),I("div",{class:T(o.value.wrapper({class:t.ui?.wrapper}))},[n.title||r.title?(v(),V("div",{key:0,class:T(o.value.title({class:t.ui?.title}))},[A(l.$slots,"title",{},()=>[ce(Z(n.title),1)])],2)):R("",!0),n.description||r.description?(v(),V("div",{key:1,class:T(o.value.description({class:t.ui?.description}))},[A(l.$slots,"description",{},()=>[ce(Z(n.description),1)])],2)):R("",!0),n.orientation==="vertical"&&(n.actions?.length||r.actions)?(v(),V("div",{key:2,class:T(o.value.actions({class:t.ui?.actions}))},[A(l.$slots,"actions",{},()=>[(v(!0),V(we,null,Xe(n.actions,(c,d)=>(v(),C(lt,H({key:d,size:"xs"},{ref_for:!0},c),null,16))),128))])],2)):R("",!0)],2),n.orientation==="horizontal"&&(n.actions?.length||r.actions)||n.close?(v(),V("div",{key:0,class:T(o.value.actions({class:t.ui?.actions,orientation:"horizontal"}))},[n.orientation==="horizontal"&&(n.actions?.length||r.actions)?A(l.$slots,"actions",{key:0},()=>[(v(!0),V(we,null,Xe(n.actions,(c,d)=>(v(),C(lt,H({key:d,size:"xs"},{ref_for:!0},c),null,16))),128))]):R("",!0),A(l.$slots,"close",{ui:o.value},()=>[n.close?(v(),C(lt,H({key:0,icon:n.closeIcon||f(a).ui.icons.close,color:"neutral",variant:"link","aria-label":f(s)("alert.close")},typeof n.close=="object"?n.close:{},{class:o.value.close({class:t.ui?.close}),onClick:u[0]||(u[0]=c=>i("update:open",!1))}),null,16,["icon","aria-label","class"])):R("",!0)])],2)):R("",!0)]),_:3},8,["as","data-orientation","class"]))}},Sy={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],increment:"absolute flex items-center",decrement:"absolute flex items-center"},variants:{buttonGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},size:{xs:"px-2 py-1 text-xs gap-1",sm:"px-2.5 py-1.5 text-xs gap-1.5",md:"px-2.5 py-1.5 text-sm gap-1.5",lg:"px-3 py-2 text-sm gap-2",xl:"px-3 py-2 text-base gap-2"},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},disabled:{true:{increment:"opacity-75 cursor-not-allowed",decrement:"opacity-75 cursor-not-allowed"}},orientation:{horizontal:{base:"text-center",increment:"inset-y-0 end-0 pe-1",decrement:"inset-y-0 start-0 ps-1"},vertical:{increment:"top-0 end-0 pe-1 [&>button]:py-0 scale-80",decrement:"bottom-0 end-0 pe-1 [&>button]:py-0 scale-80"}},highlight:{true:""}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{orientation:"horizontal",size:"xs",class:"px-7"},{orientation:"horizontal",size:"sm",class:"px-8"},{orientation:"horizontal",size:"md",class:"px-9"},{orientation:"horizontal",size:"lg",class:"px-10"},{orientation:"horizontal",size:"xl",class:"px-11"},{orientation:"vertical",size:"xs",class:"pe-7"},{orientation:"vertical",size:"sm",class:"pe-8"},{orientation:"vertical",size:"md",class:"pe-9"},{orientation:"vertical",size:"lg",class:"pe-10"},{orientation:"vertical",size:"xl",class:"pe-11"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},xu=Object.assign({inheritAttrs:!1},{__name:"UInputNumber",props:{as:{type:null,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},highlight:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"horizontal"},increment:{type:Object,required:!1},incrementIcon:{type:String,required:!1},incrementDisabled:{type:Boolean,required:!1},decrement:{type:Object,required:!1},decrementIcon:{type:String,required:!1},decrementDisabled:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1},locale:{type:String,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},modelValue:{type:[Number,null],required:!1},defaultValue:{type:Number,required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1},stepSnapping:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},formatOptions:{type:null,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1}},emits:["update:modelValue","blur","change"],setup(n,{expose:e,emit:t}){const i=n,r=t,{t:s,code:a}=In(),o=Te(),l=Ce(Ft(i,"as","modelValue","defaultValue","min","max","step","stepSnapping","formatOptions","disableWheelChange","invertWheelChange","readonly"),r),{emitFormBlur:u,emitFormFocus:c,emitFormChange:d,emitFormInput:h,id:p,color:m,size:g,name:y,highlight:x,disabled:b,ariaAttrs:w}=da(i),{orientation:S,size:q}=ca(i),M=k(()=>i.locale||a.value),B=k(()=>q.value||g.value),L=k(()=>de({extend:de(Sy),...o.ui?.inputNumber||{}})({color:m.value,variant:i.variant,size:B.value,highlight:x.value,orientation:i.orientation,buttonGroup:S.value})),E=k(()=>i.incrementIcon||(i.orientation==="horizontal"?o.ui.icons.plus:o.ui.icons.chevronUp)),D=k(()=>i.decrementIcon||(i.orientation==="horizontal"?o.ui.icons.minus:o.ui.icons.chevronDown)),U=O(null);function G(ne){const K=new Event("change",{target:{value:ne}});r("change",K),d(),h()}function ee(ne){u(),r("blur",ne)}function te(){i.autofocus&&U.value?.$el?.focus()}return Re(()=>{setTimeout(()=>{te()},i.autofocusDelay)}),e({inputRef:U}),(ne,K)=>(v(),C(f(Im),H(f(l),{id:f(p),class:L.value.root({class:[i.ui?.root,i.class]}),name:f(y),disabled:f(b),locale:M.value,"onUpdate:modelValue":G}),{default:_(()=>[F(f(Hm),H({...ne.$attrs,...f(w)},{ref_key:"inputRef",ref:U,placeholder:n.placeholder,required:n.required,class:L.value.base({class:i.ui?.base}),onBlur:ee,onFocus:f(c)}),null,16,["placeholder","required","class","onFocus"]),I("div",{class:T(L.value.increment({class:i.ui?.increment}))},[F(f($m),{"as-child":"",disabled:f(b)||n.incrementDisabled},{default:_(()=>[A(ne.$slots,"increment",{},()=>[F(lt,H({icon:E.value,color:f(m),size:n.size,variant:"link","aria-label":f(s)("inputNumber.increment")},typeof n.increment=="object"?n.increment:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2),I("div",{class:T(L.value.decrement({class:i.ui?.decrement}))},[F(f(Rm),{"as-child":"",disabled:f(b)||n.decrementDisabled},{default:_(()=>[A(ne.$slots,"decrement",{},()=>[F(lt,H({icon:D.value,color:f(m),size:n.size,variant:"link","aria-label":f(s)("inputNumber.decrement")},typeof n.decrement=="object"?n.decrement:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2)]),_:3},16,["id","class","name","disabled","locale"]))}}),Ay=z({__name:"EditableNumber",props:{modelValue:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=O(!1),s=O(0),a=O(),o=k(()=>Number(t.modelValue).toFixed(2)),l=()=>{r.value=!0,s.value=t.modelValue},u=()=>{i("update:modelValue",s.value),r.value=!1},c=()=>{s.value=t.modelValue,r.value=!1};return(d,h)=>{const p=ci,m=xu;return r.value?(v(),C(m,{key:1,ref_key:"inputRef",ref:a,modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=g=>s.value=g),step:.01,variant:"soft",size:"xs",orientation:"vertical","format-options":{minimumFractionDigits:0,maximumFractionDigits:2},class:"w-20 font-mono",onBlur:u,onKeyup:[ht(u,["enter"]),ht(c,["escape"])]},null,8,["modelValue"])):(v(),C(p,{key:0,variant:"soft",color:"neutral",size:"sm",class:"font-mono cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700",onClick:l},{default:_(()=>[ce(Z(o.value),1)]),_:1}))}}}),My=Object.assign(Ay,{__name:"EditableNumber"}),X=255,ft=100,ri=125,Yi=150;var j,Mt,Ze,Ir;(function(n){n.HEX="HEX",n.RGB="RGB",n.HWB="HWB",n.HSL="HSL",n.CIELab="CIELab",n.LCH="LCH",n.CMYK="CMYK"})(j||(j={})),(function(n){n.ANALOGOUS="ANALOGOUS",n.COMPLEMENTARY="COMPLEMENTARY",n.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",n.TRIADIC="TRIADIC",n.TETRADIC="TETRADIC",n.SQUARE="SQUARE"})(Mt||(Mt={})),(function(n){n.ADDITIVE="ADDITIVE",n.SUBTRACTIVE="SUBTRACTIVE"})(Ze||(Ze={})),(function(n){n.black="#000000",n.silver="#C0C0C0",n.gray="#808080",n.white="#FFFFFF",n.maroon="#800000",n.red="#FF0000",n.purple="#800080",n.fuchsia="#FF00FF",n.green="#008000",n.lime="#00FF00",n.olive="#808000",n.yellow="#FFFF00",n.navy="#000080",n.blue="#0000FF",n.teal="#008080",n.aqua="#00FFFF",n.orange="#FFA500",n.aliceblue="#F0F8FF",n.antiquewhite="#FAEBD7",n.aquamarine="#7FFFD4",n.azure="#F0FFFF",n.beige="#F5F5DC",n.bisque="#FFE4C4",n.blanchedalmond="#FFEBCD",n.blueviolet="#8A2BE2",n.brown="#A52A2A",n.burlywood="#DEB887",n.cadetblue="#5F9EA0",n.chartreuse="#7FFF00",n.chocolate="#D2691E",n.coral="#FF7F50",n.cornflowerblue="#6495ED",n.cornsilk="#FFF8DC",n.crimson="#DC143C",n.cyan="#00FFFF",n.darkblue="#00008B",n.darkcyan="#008B8B",n.darkgoldenrod="#B8860B",n.darkgray="#A9A9A9",n.darkgreen="#006400",n.darkgrey="#A9A9A9",n.darkkhaki="#BDB76B",n.darkmagenta="#8B008B",n.darkolivegreen="#556B2F",n.darkorange="#FF8C00",n.darkorchid="#9932CC",n.darkred="#8B0000",n.darksalmon="#E9967A",n.darkseagreen="#8FBC8F",n.darkslateblue="#483D8B",n.darkslategray="#2F4F4F",n.darkslategrey="#2F4F4F",n.darkturquoise="#00CED1",n.darkviolet="#9400D3",n.deeppink="#FF1493",n.deepskyblue="#00BFFF",n.dimgray="#696969",n.dimgrey="#696969",n.dodgerblue="#1E90FF",n.firebrick="#B22222",n.floralwhite="#FFFAF0",n.forestgreen="#228B22",n.gainsboro="#DCDCDC",n.ghostwhite="#F8F8FF",n.gold="#FFD700",n.goldenrod="#DAA520",n.greenyellow="#ADFF2F",n.grey="#808080",n.honeydew="#F0FFF0",n.hotpink="#FF69B4",n.indianred="#CD5C5C",n.indigo="#4B0082",n.ivory="#FFFFF0",n.khaki="#F0E68C",n.lavender="#E6E6FA",n.lavenderblush="#FFF0F5",n.lawngreen="#7CFC00",n.lemonchiffon="#FFFACD",n.lightblue="#ADD8E6",n.lightcoral="#F08080",n.lightcyan="#E0FFFF",n.lightgoldenrodyellow="#FAFAD2",n.lightgray="#D3D3D3",n.lightgreen="#90EE90",n.lightgrey="#D3D3D3",n.lightpink="#FFB6C1",n.lightsalmon="#FFA07A",n.lightseagreen="#20B2AA",n.lightskyblue="#87CEFA",n.lightslategray="#778899",n.lightslategrey="#778899",n.lightsteelblue="#B0C4DE",n.lightyellow="#FFFFE0",n.limegreen="#32CD32",n.linen="#FAF0E6",n.magenta="#FF00FF",n.mediumaquamarine="#66CDAA",n.mediumblue="#0000CD",n.mediumorchid="#BA55D3",n.mediumpurple="#9370DB",n.mediumseagreen="#3CB371",n.mediumslateblue="#7B68EE",n.mediumspringgreen="#00FA9A",n.mediumturquoise="#48D1CC",n.mediumvioletred="#C71585",n.midnightblue="#191970",n.mintcream="#F5FFFA",n.mistyrose="#FFE4E1",n.moccasin="#FFE4B5",n.navajowhite="#FFDEAD",n.oldlace="#FDF5E6",n.olivedrab="#6B8E23",n.orangered="#FF4500",n.orchid="#DA70D6",n.palegoldenrod="#EEE8AA",n.palegreen="#98FB98",n.paleturquoise="#AFEEEE",n.palevioletred="#DB7093",n.papayawhip="#FFEFD5",n.peachpuff="#FFDAB9",n.peru="#CD853F",n.pink="#FFC0CB",n.plum="#DDA0DD",n.powderblue="#B0E0E6",n.rosybrown="#BC8F8F",n.royalblue="#4169E1",n.saddlebrown="#8B4513",n.salmon="#FA8072",n.sandybrown="#F4A460",n.seagreen="#2E8B57",n.seashell="#FFF5EE",n.sienna="#A0522D",n.skyblue="#87CEEB",n.slateblue="#6A5ACD",n.slategray="#708090",n.slategrey="#708090",n.snow="#FFFAFA",n.springgreen="#00FF7F",n.steelblue="#4682B4",n.tan="#D2B48C",n.thistle="#D8BFD8",n.tomato="#FF6347",n.turquoise="#40E0D0",n.violet="#EE82EE",n.wheat="#F5DEB3",n.whitesmoke="#F5F5F5",n.yellowgreen="#9ACD32",n.rebeccapurple="#663399"})(Ir||(Ir={}));const wu=Object.keys(Ir),By={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],HWB:["H","W","B","A"],CIELab:["L","a","b","A"],LCH:["L","C","H","A"],CMYK:["C","M","Y","K","A"]},Ws={ABGR:j.RGB,ABHW:j.HWB,ACHL:j.LCH,ACKMY:j.CMYK,AHLS:j.HSL,ALAB:j.CIELab,BGR:j.RGB,BHW:j.HWB,CHL:j.LCH,CKMY:j.CMYK,HLS:j.HSL,LAB:j.CIELab};var _n;(function(n){n.NUMBER="number",n.BOOLEAN="boolean"})(_n||(_n={}));const nt={[j.HEX]:/^#(?:(?<r>[a-f\d])(?<g>[a-f\d])(?<b>[a-f\d])(?<a>[a-f\d])?|(?<rr>[a-f\d]{2})(?<gg>[a-f\d]{2})(?<bb>[a-f\d]{2})(?<aa>[a-f\d]{2})?)$/i,[j.RGB]:/^rgba?\s*\(\s*(?:(?<r_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<g_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<b_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<r>(?:\d*\.)?\d+%?)\s+(?<g>(?:\d*\.)?\d+%?)\s+(?<b>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_r>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_g>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[j.HWB]:/^hwb\s*\(\s*(?:(?<h>(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<w>(?:\d*\.)?\d+)%\s+(?<b>(?:\d*\.)?\d+)%(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))\s+(?<relative_w>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?\s+(?<relative_b>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[j.HSL]:/^hsla?\s*\(\s*(?:(?<h_legacy>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*(?<s_legacy>(?:\d*\.)?\d+)%\s*,\s*(?<l_legacy>(?:\d*\.)?\d+)%(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<s>(?:\d*\.)?\d+)%?\s+(?<l>(?:\d*\.)?\d+)%?(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))\s+(?<relative_s>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?\s+(?<relative_l>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[j.CIELab]:/^lab\s*\(\s*(?:(?<L>(?:\d*\.)?\d+%?)\s+(?<a>-?(?:\d*\.)?\d+%?)\s+(?<b>-?(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<A>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_L>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_a>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_A>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[j.LCH]:/^lch\s*\(\s*(?:(?<l>(?:\d*\.)?\d+%?)\s+(?<c>-?(?:\d*\.)?\d+%?)\s+(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_l>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_c>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_h>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[j.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:(?<c_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<m_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<y_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<k_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<c>(?:\d*\.)?\d+%?)\s+(?<m>(?:\d*\.)?\d+%?)\s+(?<y>(?:\d*\.)?\d+%?)\s+(?<k>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?)\s*\)$/},ct={REGEXP:/^calc\(\s*(?<operation>[\d./*+-\w\s]+)\s*\)$/,SCOPED:/\(\s*([^()]+)\s*\)/g,DIVISION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\/\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,MULTIPLICATION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\*\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,SUM:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\+\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,REST:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*-\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/},_u=/^(?<number>-?(?:\d*\.)?\d+)(?<units>(?:deg|grad|rad|turn)?)$/,Me=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,Ks=/^0x([a-f\d]{1,2})$/i,qy=/\{(\d+)\}/g,ky=/,( +|\d+)/g,Ey=/ +/,Fy="The provided string color doesn't have a correct format",Oy="The provided color object doesn't have the proper keys or format",zy="is not a valid operation for a relative color";var Ve,Oe,Mn;(function(n){n.NONE="none",n.DEGREES="deg",n.GRADIANS="grad",n.RADIANS="rad",n.TURNS="turn"})(Ve||(Ve={})),(function(n){n.NONE="none",n.PERCENT="percent"})(Oe||(Oe={})),(function(n){n.DEVICE_CMYK="device-cmyk",n.CMYK="cmyk"})(Mn||(Mn={}));const Tt={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:Ve.NONE,rgbUnit:Oe.NONE,labUnit:Oe.NONE,lchUnit:Oe.NONE,cmykUnit:Oe.PERCENT,alphaUnit:Oe.NONE,cmykFunction:Mn.DEVICE_CMYK},be=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),cn=n=>+`${n}`.replace(Me,"$1"),it=n=>Me.test(`${n}`)?cn(n):Math.min(+n,100),rr=n=>(n.length===1&&(n+=n),parseInt(n,16)),sr=n=>{const e=$(n,0).toString(16).toUpperCase();return e.length===1?`0x0${e}`:`0x${e}`},wi=(n,e=!1)=>!e&&Me.test(n)?Math.min(X*cn(n)/100,X):Ks.test(n)?(n.length===3&&(n+=n.slice(-1)),e?$(n)/X:$(n)):Math.min(+n,e?1:X),Pr=n=>Me.test(n)?se(ri*cn(n)/100,-125,ri):se(+n,-125,ri),Cu=n=>Me.test(n)?se(Yi*cn(n)/100,-150,Yi):se(+n,-150,Yi),ii=n=>Math.min(Me.test(n)?cn(n)/100:+n,1),Su=n=>[...n].sort().join("").toUpperCase(),$=(n,e=6)=>{const t=Math.pow(10,e);return Math.round(+n*t)/t},se=(n,e,t)=>Math.max(e,Math.min(n,t)),Au=n=>180*n/Math.PI,Mu=n=>n*Math.PI/180,Br=360,mt=n=>{if(typeof n=="string"){const e=n.match(_u).groups,t=+e.number;switch(e.units){case Ve.RADIANS:n=$(Au(t));break;case Ve.TURNS:n=$(t*Br);break;case Ve.GRADIANS:n=$(.9*t);break;case Ve.DEGREES:default:n=t}}return(n>360||n<0)&&(n-=Math.floor(n/Br)*Br),n},me=n=>(typeof n=="string"&&(n=Me.test(n)?cn(n)/100:+n),isNaN(+n)||n>1?1:$(n)),Bu=(n,e)=>{let t;switch(e){case Ve.RADIANS:t=$(Mu(n));break;case Ve.TURNS:t=$(n/Br);break;case Ve.GRADIANS:t=$(10/9*n);break;case Ve.DEGREES:case Ve.NONE:default:t=n}return t},cs=n=>`${n}`in Ze,qu=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],Ty=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],Ji=qu.map((n=>n.reduce(((e,t)=>e+t),0))),ds=(n,e,t)=>(t<0&&(t+=6),t>=6&&(t-=6),$(t<1?((e-n)*t+n)*X:t<3?e*X:t<4?((e-n)*(4-t)+n)*X:n*X)),Iy=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4,Py=n=>n<=.0031308?12.92*n:1.055*n**(1/2.4)-.055,ku=(n,e,t,i)=>{const r=[0,0,0],s=[n,e,t];return i.forEach(((a,o)=>{a.forEach(((l,u)=>{r[o]+=l*s[u]}))})),r},pe=(n,e,t)=>{e/=100;const i=(t/=100)<=.5?t*(e+1):t+e-t*e,r=2*t-i;return{R:ds(r,i,(n/=60)+2),G:ds(r,i,n),B:ds(r,i,n-2)}},oi=(n,e,t,i=1)=>{n/=X,e/=X,t/=X,i=Math.min(i,1);const r=Math.max(n,e,t),s=Math.min(n,e,t),a=r-s;let o=0,l=0;const u=(r+s)/2;if(a!==0){switch(r){case n:o=(e-t)/a%6;break;case e:o=(t-n)/a+2;break;case t:o=(n-e)/a+4}o=$(60*o),o<0&&(o+=360),l=a/(1-Math.abs(2*u-1))}return{H:o,S:$(100*l),L:$(100*u),A:i}},li=(n,e,t)=>{const i=[n/X,e/X,t/X].map(Iy),r=ku(i[0],i[1],i[2],qu),s=((a,o,l)=>{const u=h=>h>.008856451679035631?Math.cbrt(h):h/.12841854934601665+.13793103448275862,c=u(a/Ji[0]),d=u(o/Ji[1]);return[116*d-16,500*(c-d),200*(d-u(l/Ji[2]))]})(r[0],r[1],r[2]);return{L:s[0],a:s[1],b:s[2]}},Bn=(n,e,t)=>{const i=((s,a,o)=>{const l=h=>h>.20689655172413793?h**3:.12841854934601665*(h-.13793103448275862),u=(s+16)/116,c=a/500,d=o/200;return[Ji[0]*l(u+c),Ji[1]*l(u),Ji[2]*l(u-d)]})(n,e,t),r=ku(i[0],i[1],i[2],Ty).map(Py);return{R:se(r[0]*X,0,X),G:se(r[1]*X,0,X),B:se(r[2]*X,0,X)}},Eu=(n,e,t)=>{const i=Math.sqrt(e**2+t**2),r=Au(Math.atan2(t,e));return{L:n,C:i,H:mt(r)}},Fu=(n,e,t)=>{const i=Mu(t);return{L:n,a:e*Math.cos(i),b:e*Math.sin(i)}},ui=(n,e,t)=>{const i=li(n,e,t);return Eu(i.L,i.a,i.b)},Rr=(n,e,t)=>{const i=Fu(n,e,t);return Bn(i.L,i.a,i.b)},Si=(n,e,t,i=1)=>({H:oi(n,e,t,i).H,W:$(Math.min(n,e,t)/X*100),B:$(100*(1-Math.max(n,e,t)/X)),A:i}),Dr=(n,e,t)=>{const i=1-(t/=100)-(e/=100),r=i*(1-Math.abs(n/60%2-1));let s=0,a=0,o=0;return n<60?(s=i,a=r,o=0):n>=60&&n<120?(s=r,a=i,o=0):n>=120&&n<180?(s=0,a=i,o=r):n>=180&&n<240?(s=0,a=r,o=i):n>=240&&n<300?(s=r,a=0,o=i):n>=300&&(s=i,a=0,o=r),s+=e,a+=e,o+=e,{R:se(s*X,0,X),G:se(a*X,0,X),B:se(o*X,0,X)}},Ia=(n,e,t,i)=>({R:$(X*(1-n)*(i=1-i)),G:$(X*(1-e)*i),B:$(X*(1-t)*i)}),Ou=(n,e,t)=>{n/=X,e/=X,t/=X;const i=1-Math.max(n,e,t),r=1-i,s=r&&(r-e)/r,a=r&&(r-t)/r;return{C:$(100*(r&&(r-n)/r)),M:$(100*s),Y:$(100*a),K:$(100*i)}},So=(n,e)=>{if(n<0&&(n+=360),n>360&&(n-=360),n===360||n===0)return n;const t=[[0,120],[120,180],[180,240],[240,360]],i=[[0,60],[60,120],[120,240],[240,360]],r=e?i:t;let s=0,a=0,o=0,l=0;return(e?t:i).find(((u,c)=>n>=u[0]&&n<u[1]&&(s=u[0],a=u[1],o=r[c][0],l=r[c][1],!0))),o+(l-o)/(a-s)*(n-s)};class zu{get rgb(){return this._rgb}}class Ry extends zu{constructor(e){super();const t=e.match(nt.HEX).groups;this._r=t.r??t.rr,this._g=t.g??t.gg,this._b=t.b??t.bb,this._a=t.a??t.aa;const i={R:rr(this._r),G:rr(this._g),B:rr(this._b)};this._a!==void 0&&(i.A=rr(this._a)/X),this._rgb=i}}class ze{constructor(e,t,i){this._operations=new Map([[ct.DIVISION,this._division],[ct.MULTIPLICATION,this._multiplication],[ct.SUM,this._sum],[ct.REST,this._rest]]),this._colorIndex=e;let r=t,s=0;if(Number.isNaN(+t))if(t in i)this._result=i[t];else if(ct.REGEXP.test(r))ct.REGEXP.lastIndex=0,this._result=this._getCalcValue(r,i);else{for(;ct.SCOPED.test(r)&&s<100;){if(ct.SCOPED.lastIndex=0,r=r.replace(ct.SCOPED,((a,o)=>this._calculate(o,i).toString())),ct.REGEXP.test(r)){ct.REGEXP.lastIndex=0;break}s++}this._result=this._getCalcValue(r,i)}else this._result=+t}_division(e,t){return e/t}_multiplication(e,t){return e*t}_sum(e,t){return e+t}_rest(e,t){return e-t}_getCalcValue(e,t){const i=e.match(ct.REGEXP).groups.operation,r=this._calculate(i,t);if(Number.isNaN(r))throw new Error(`Invalid value for ${this._colorIndex}. ${i} ${zy}`);return r}_calculate(e,t){return this._operations.forEach(((i,r)=>{let s=0;for(;r.test(e)&&s<100;)e=e.replace(r,((a,o,l)=>i(t[o]??+o,t[l]??+l).toString())),s++})),+e}get result(){return this._result}}class Zr extends zu{get hasPercentageAlpha(){return Me.test(this._a)}}class Xs extends Zr{constructor(e,t){super();const i=e.match(nt.RGB).groups,{r_legacy:r,g_legacy:s,b_legacy:a,a_legacy:o,r:l,g:u,b:c,a:d,from:h,relative_r:p,relative_g:m,relative_b:g,relative_a:y}=i;if(h){const x=t(h),b={r:x.R,g:x.G,b:x.B,alpha:x.A??1},w=new ze("r",p,b).result,S=new ze("g",m,b).result,q=new ze("b",g,b).result,M={R:Math.min(w,X),G:Math.min(S,X),B:Math.min(q,X)};if(y){const B=new ze("alpha",y,b).result;M.A=Math.min(B,1)}this._rgb=M}else{this._r=r??l,this._g=s??u,this._b=a??c,this._a=o??d;const x={R:Math.min(wi(this._r),X),G:Math.min(wi(this._g),X),B:Math.min(wi(this._b),X)};this._a!==void 0&&(x.A=me(this._a)),this._rgb=x}}get hasPercentageValues(){return Me.test(this._r)&&Me.test(this._g)&&Me.test(this._b)}static test(e){return nt.RGB.test(e)}}class Pa extends Zr{get angleUnit(){if(this._h){const e=this._h.match(_u).groups.units;return e===""?Ve.NONE:e}return Ve.NONE}}class Ys extends Pa{constructor(e,t){super();const i=e.match(nt.HSL).groups,{h_legacy:r,s_legacy:s,l_legacy:a,a_legacy:o,h:l,s:u,l:c,a:d,from:h,relative_h:p,relative_s:m,relative_l:g,relative_a:y}=i;if(h){const x=t(h),b=oi(x.R,x.G,x.B,x.A),w={h:b.H,s:b.S,l:b.L,alpha:b.A},S=new ze("h",p,w).result,q=new ze("s",m,w).result,M=new ze("l",g,w).result,B=pe(se(S,0,360),se(q,0,ft),se(M,0,ft));if(y){const L=new ze("alpha",y,w).result;B.A=se(L,0,1)}this._rgb=B}else{this._h=r??l,this._s=s??u,this._l=a??c,this._a=o??d;const x=pe(mt(this._h),it(this._s),it(this._l));this._a!==void 0&&(x.A=me(this._a)),this._rgb=x}}static test(e){return nt.HSL.test(e)}}class Js extends Pa{constructor(e,t){super();const i=e.match(nt.HWB).groups,{h:r,w:s,b:a,a:o,from:l,relative_h:u,relative_w:c,relative_b:d,relative_a:h}=i;if(l){const p=t(l),m=Si(p.R,p.G,p.B,p.A),g={h:m.H,w:m.W,b:m.B,alpha:m.A},y=new ze("h",u,g).result,x=new ze("w",c,g).result,b=new ze("b",d,g).result,w=Dr(se(y,0,360),se(x,0,ft),se(b,0,ft));if(h){const S=new ze("alpha",h,g).result;w.A=se(S,0,1)}this._rgb=w}else{this._h=r,this._w=s,this._b=a,this._a=o;const p=Dr(mt(this._h),it(this._w),it(this._b));this._a!==void 0&&(p.A=me(this._a)),this._rgb=p}}static test(e){return nt.HWB.test(e)}}class Zs extends Zr{constructor(e,t){super();const i=e.match(nt.CIELab).groups,{L:r,a:s,b:a,A:o,from:l,relative_L:u,relative_a:c,relative_b:d,relative_A:h}=i;if(l){const p=t(l),m=li(p.R,p.G,p.B),g={l:m.L,a:m.a,b:m.b,alpha:p.A??1},y=new ze("l",u,g).result,x=new ze("a",c,g).result,b=new ze("b",d,g).result,w=Bn(se(y,0,ft),se(x,-125,ri),se(b,-125,ri));if(h){const S=new ze("alpha",h,g).result;w.A=se(S,0,1)}this._rgb=w}else{this._L=r,this._A=s,this._B=a,this._a=o;const p=Bn(it(this._L),Pr(this._A),Pr(this._B));this._a!==void 0&&(p.A=me(this._a)),this._rgb=p}}get hasPercentageValues(){return Me.test(this._L)&&Me.test(this._A)&&Me.test(this._B)}static test(e){return nt.CIELab.test(e)}}class Qs extends Pa{constructor(e,t){super();const i=e.match(nt.LCH).groups,{l:r,c:s,h:a,a:o,from:l,relative_l:u,relative_c:c,relative_h:d,relative_a:h}=i;if(l){const p=t(l),m=ui(p.R,p.G,p.B),g={l:m.L,c:m.C,h:m.H,alpha:p.A??1},y=new ze("l",u,g).result,x=new ze("c",c,g).result,b=new ze("h",d,g).result,w=Rr(se(y,0,ft),se(x,-150,Yi),mt(b));if(h){const S=new ze("alpha",h,g).result;w.A=se(S,0,1)}this._rgb=w}else{this._l=r,this._c=s,this._h=a,this._a=o;const p=Rr(it(this._l),Cu(this._c),mt(this._h));this._a!==void 0&&(p.A=me(this._a)),this._rgb=p}}get hasPercentageValues(){return Me.test(this._l)&&Me.test(this._c)}static test(e){return nt.LCH.test(e)}}class ea extends Zr{constructor(e){super();const t=e.match(nt.CMYK).groups;this._c=t.c_legacy??t.c,this._m=t.m_legacy??t.m,this._y=t.y_legacy??t.y,this._k=t.k_legacy??t.k,this._a=t.a_legacy??t.a;const i=Ia(ii(this._c),ii(this._m),ii(this._y),ii(this._k));this._a!==void 0&&(i.A=me(this._a)),this._rgb=i}get hasPercentageValues(){return Me.test(this._c)&&Me.test(this._m)&&Me.test(this._y)&&Me.test(this._k)}static test(e){return nt.CMYK.test(e)}}const Le=n=>typeof n=="string"?(e=>{let t;if(Object.keys(j).some((i=>{if(nt[i].test(e))return t=i,!0})),!t&&~wu.indexOf(e)&&(t=j.HEX),!t)throw new Error(Fy);return t})(n):(e=>{let t,i=!1;const r=Su(Object.keys(e));if(Ws[r]&&(t=Ws[r]),t&&t===j.RGB){const s=Object.entries(e).some((o=>!Ks.test(`${o[1]}`))),a=Object.entries(e).some((o=>!(Me.test(`${o[1]}`)||!Ks.test(`${o[1]}`)&&!isNaN(+o[1])&&+o[1]<=X)));s&&a&&(i=!0),s||(t=j.HEX)}if(!t||i)throw new Error(Oy);return t})(n),Dy={[j.HEX](n){const e=~wu.indexOf(n)?Ir[n]:n;return new Ry(e).rgb},[j.RGB]:n=>new Xs(n,Ue).rgb,[j.HSL]:n=>new Ys(n,Ue).rgb,[j.HWB]:n=>new Js(n,Ue).rgb,[j.CIELab]:n=>new Zs(n,Ue).rgb,[j.LCH]:n=>new Qs(n,Ue).rgb,[j.CMYK]:n=>new ea(n).rgb},$y={[j.HEX](n){const e={R:wi(`${n.R}`),G:wi(`${n.G}`),B:wi(`${n.B}`)};return be(n,"A")&&(e.A=Math.min(wi(`${n.A}`,!0),1)),e},[j.RGB](n){return this.HEX(n)},[j.HSL](n){const e=it(`${n.S}`),t=it(`${n.L}`),i=pe(mt(n.H),e,t);return be(n,"A")&&(i.A=me(n.A)),i},[j.HWB](n){const e=it(`${n.W}`),t=it(`${n.B}`),i=Dr(mt(n.H),e,t);return be(n,"A")&&(i.A=me(n.A)),i},[j.CIELab](n){const e=it(`${n.L}`),t=Pr(`${n.a}`),i=Pr(`${n.b}`),r=Bn(e,t,i);return be(n,"A")&&(r.A=me(n.A)),r},[j.LCH](n){const e=it(`${n.L}`),t=Cu(`${n.C}`),i=mt(`${n.H}`),r=Rr(e,t,i);return be(n,"A")&&(r.A=me(n.A)),r},[j.CMYK](n){const e=ii(`${n.C}`),t=ii(`${n.M}`),i=ii(`${n.Y}`),r=ii(`${n.K}`),s=Ia(e,t,i,r);return be(n,"A")&&(s.A=me(n.A)),s}},Ue=(n,e=Le(n))=>typeof n=="string"?Dy[e](n):$y[e](n),xe=(n,...e)=>{const t=[],i=[],r=[],s=[],a=[],o=[],l=[],u=Object.values(Ve),c=Object.values(Oe),d=Object.values(Mn),h={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const p of e)if(typeof p=="string"){if(t.push(p),p.includes(",")){h.legacyCSS++;const m=p.match(ky);new Set(m).size===1&&Ey.test(m[0].slice(1))&&h.spacesAfterCommas++}if(Ys.test(p)){const m=new Ys(p,Ue);i.push(m.angleUnit),l.push(m.hasPercentageAlpha);continue}if(Js.test(p)){const m=new Js(p,Ue);i.push(m.angleUnit),l.push(m.hasPercentageAlpha);continue}if(Xs.test(p)){const m=new Xs(p,Ue);r.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Zs.test(p)){const m=new Zs(p,Ue);s.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Qs.test(p)){const m=new Qs(p,Ue);i.push(m.angleUnit),a.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(ea.test(p)){const m=new ea(p);o.push(m.hasPercentageValues),p.startsWith("cmyk")&&h.cmykFunction++,l.push(m.hasPercentageAlpha)}}return{decimals:typeof n.decimals===_n.NUMBER?n.decimals:Tt.decimals,legacyCSS:typeof n.legacyCSS===_n.BOOLEAN?n.legacyCSS:!!(t.length&&h.legacyCSS===t.length)||Tt.legacyCSS,spacesAfterCommas:typeof n.spacesAfterCommas===_n.BOOLEAN?n.spacesAfterCommas:!!(t.length&&h.spacesAfterCommas===t.length)||Tt.spacesAfterCommas,anglesUnit:n.anglesUnit&&u.includes(n.anglesUnit)?n.anglesUnit:new Set(i).size===1?i[0]:Tt.anglesUnit,rgbUnit:n.rgbUnit&&c.includes(n.rgbUnit)?n.rgbUnit:new Set(r).size===1&&r[0]?Oe.PERCENT:Tt.rgbUnit,labUnit:n.labUnit&&c.includes(n.labUnit)?n.labUnit:new Set(s).size===1&&s[0]?Oe.PERCENT:Tt.labUnit,lchUnit:n.lchUnit&&c.includes(n.lchUnit)?n.lchUnit:new Set(a).size===1&&a[0]?Oe.PERCENT:Tt.lchUnit,cmykUnit:n.cmykUnit&&c.includes(n.cmykUnit)?n.cmykUnit:new Set(o).size!==1||o[0]?Tt.cmykUnit:Oe.NONE,alphaUnit:n.alphaUnit&&c.includes(n.alphaUnit)?n.alphaUnit:new Set(l).size===1&&l[0]?Oe.PERCENT:Tt.alphaUnit,cmykFunction:n.cmykFunction&&d.includes(n.cmykFunction)?n.cmykFunction:o.length&&o.length===h.cmykFunction?Mn.CMYK:Tt.cmykFunction}},ta=(n,e)=>({H:$(n.H,e),S:$(n.S,e),L:$(n.L,e)}),hs=n=>n?", ":",",mi=(n,e)=>{const t=Su(Object.keys(n));return By[Ws[t]].reduce(((i,r,s)=>{const a=n[r];return a!==void 0&&i.push(e(a,s)),i}),[])},gi=(n,e)=>n.replace(qy,((t,i)=>`${e[+i-1]}`)),xn=(n,e,t=!1)=>{const{alphaUnit:i,legacyCSS:r,decimals:s}=e;return i!==Oe.PERCENT||r&&!t?$(n,s):`${$(100*n,s)}%`},Ao=n=>{const{anglesUnit:e,decimals:t}=n;return(i,r)=>r===0&&e!==Ve.NONE?`${$(Bu(i,e),t)}${e}`:r===3?xn(i,n):$(i,t)},W={[j.HEX]:n=>{const e=mi(n,(i=>(r=>{let s=$(r,0).toString(16).toUpperCase();return s.length===1&&(s=`0${s}`),s})($(i)))),t=e.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return gi(t,e)},[j.RGB]:(n,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:r,rgbUnit:s}=e,a=hs(r),o=mi(n,((u,c)=>s===Oe.PERCENT&&c<3?`${((d,h)=>$(d/X*100,h))(u,t)}%`:c===3?xn(u,e):$(u,t))),l=i?o.length===4?`rgba({1}${a}{2}${a}{3}${a}{4})`:`rgb({1}${a}{2}${a}{3})`:o.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return gi(l,o)},[j.HSL]:(n,e)=>{const{legacyCSS:t,spacesAfterCommas:i}=e,r=hs(i),s=Ao(e),a=mi(n,s),o=t?a.length===4?`hsla({1}${r}{2}%${r}{3}%${r}{4})`:`hsl({1}${r}{2}%${r}{3}%)`:a.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return gi(o,a)},[j.HWB]:(n,e)=>{const t=Ao(e),i=mi(n,t),r=i.length===4?"hwb({1} {2}% {3}% / {4})":"hwb({1} {2}% {3}%)";return gi(r,i)},[j.CIELab]:(n,e)=>{const{decimals:t,labUnit:i}=e,r=mi(n,((a,o)=>{if(o===0){const l=$(it(a),t);return i===Oe.PERCENT?`${l}%`:`${l}`}return o<3?i===Oe.PERCENT?`${((l,u)=>$(l/ri*100,u))(a,t)}%`:$(a,t):xn(a,e,!0)})),s=r.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return gi(s,r)},[j.LCH]:(n,e)=>{const{decimals:t,lchUnit:i,anglesUnit:r}=e,s=mi(n,((o,l)=>{if(l===0){const u=$(it(o),t);return i===Oe.PERCENT?`${u}%`:`${u}`}return l===1?i===Oe.PERCENT?`${((u,c)=>$(u/Yi*100,c))(o,t)}%`:$(o,t):l===2?r!==Ve.NONE?`${$(Bu(o,r),t)}${r}`:$(o,t):xn(o,e,!0)})),a=s.length===4?"lch({1} {2} {3} / {4})":"lch({1} {2} {3})";return gi(a,s)},[j.CMYK]:(n,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:r,cmykUnit:s,cmykFunction:a}=e,o=hs(r),l=mi(n,((c,d)=>s===Oe.PERCENT&&d<4?`${$(c,t)}%`:d===4?xn(c,e):$(c/100,t))),u=i?l.length===5?`${a}({1}${o}{2}${o}{3}${o}{4}${o}{5})`:`${a}({1}${o}{2}${o}{3}${o}{4})`:l.length===5?`${a}({1} {2} {3} {4} / {5})`:`${a}({1} {2} {3} {4})`;return gi(u,l)}},dn=(n,e,t)=>e.reduce(((i,r)=>[...i,{...n,H:t===Ze.ADDITIVE?mt(n.H+r):mt(So(So(n.H,!1)+r,!0))}]),[{...n}]),Ly=(n,e)=>dn(n,[30,-30],e),Hy=(n,e)=>dn(n,[180],e),Ny=(n,e)=>dn(n,[150,-150],e),Vy=(n,e)=>dn(n,[120,-120],e),Uy=(n,e)=>dn(n,[60,-120,180],e),jy=(n,e)=>dn(n,[90,-90,180],e),N={[j.HEX]:n=>({R:sr(n.R),G:sr(n.G),B:sr(n.B)}),HEXA(n){const e=N.HEX(n);return e.A=be(n,"A")?sr(n.A*X):"0xFF",e},[j.RGB](n,e){const t=Gy(n,e);return be(t,"A")&&delete t.A,t},RGBA(n,e){const t=N.RGB(n,e);return t.A=be(n,"A")?$(n.A):1,t},[j.HSL](n,e){const t=oi(n.R,n.G,n.B);return delete t.A,ta(t,e)},HSLA(n,e){const t=N.HSL(n,e);return t.A=be(n,"A")?$(n.A,e):1,t},[j.HWB](n,e){const t=Si(n.R,n.G,n.B);return delete t.A,((i,r)=>({H:$(i.H,r),W:$(i.W,r),B:$(i.B,r)}))(t,e)},HWBA(n,e){const t=N.HWB(n,e);return t.A=be(n,"A")?$(n.A,e):1,t},[j.CIELab]:(n,e)=>((t,i)=>({L:$(t.L,i),a:$(t.a,i),b:$(t.b,i)}))(li(n.R,n.G,n.B),e),CIELabA(n,e){const t=N.CIELab(n,e);return t.A=be(n,"A")?$(n.A,e):1,t},[j.LCH]:(n,e)=>((t,i)=>({L:$(t.L,i),C:$(t.C,i),H:$(t.H,i)}))(ui(n.R,n.G,n.B),e),LCHA(n,e){const t=N.LCH(n,e);return t.A=be(n,"A")?$(n.A,e):1,t},[j.CMYK]:(n,e)=>((t,i)=>({C:$(t.C,i),M:$(t.M,i),Y:$(t.Y,i),K:$(t.K,i)}))(Ou(n.R,n.G,n.B),e),CMYKA(n,e){const t=N.CMYK(n,e);return t.A=be(n,"A")?$(n.A,e):1,t}},ar=(n,e,t,i)=>{const r=Le(n),s=typeof n=="string",a=Ue(n,r),o=typeof n=="string"&&be(a,"A")||typeof n!="string"&&be(n,"A"),l=oi(a.R,a.G,a.B,a.A);o||delete l.A;const u=t?l.L/(e+1):(100-l.L)/(e+1),c=Array(e).fill(null).map(((d,h)=>({...l,L:l.L+u*(h+1)*(1-2*+t)})));switch(r){case j.HEX:default:return c.map((d=>{const h=pe(d.H,d.S,d.L);return o&&(h.A=d.A),s?o?W.HEX({...h,A:$(h.A*X)}):W.HEX(h):o?N.HEXA(h):N.HEX(h)}));case j.RGB:return c.map((d=>{const h=pe(d.H,d.S,d.L);return o&&(h.A=d.A),s?W.RGB(h,i):o?N.RGBA(h,i.decimals):N.RGB(h,i.decimals)}));case j.HSL:return c.map((d=>s?W.HSL(d,i):o?N.HSLA({...pe(d.H,d.S,d.L),A:d.A},i.decimals):N.HSL(pe(d.H,d.S,d.L),i.decimals)));case j.HWB:return c.map((d=>{const h=pe(d.H,d.S,d.L);o&&(h.A=d.A);const p=o?N.HWBA(h,i.decimals):N.HWB(h,i.decimals);return s?W.HWB(p,i):p}));case j.CIELab:return c.map((d=>{const h=pe(d.H,d.S,d.L);o&&(h.A=d.A);const p=o?N.CIELabA(h,i.decimals):N.CIELab(h,i.decimals);return s?W.CIELab(p,i):p}));case j.LCH:return c.map((d=>{const h=pe(d.H,d.S,d.L),p=ui(h.R,h.G,h.B);return o&&(p.A=d.A),s?W.LCH(p,i):o?N.LCHA({...h,A:d.A},i.decimals):N.LCH(h,i.decimals)}))}},zi={buildHarmony(n,e,t,i){const r=Le(n),s=Ue(n,r),a=oi(s.R,s.G,s.B,s.A),o=typeof n=="string"&&be(s,"A")||typeof n!="string"&&be(n,"A"),l=typeof n=="string";switch(r){case j.HEX:default:return o?this.HEXA(ta(a,0),e,t,l):this.HEX(ta(a,0),e,t,l);case j.HSL:return o?this.HSLA(a,e,t,l,i):this.HSL(a,e,t,l,i);case j.HWB:return o?this.HWBA(a,e,t,l,i):this.HWB(a,e,t,l,i);case j.RGB:return o?this.RGBA(a,e,t,l,i):this.RGB(a,e,t,l,i);case j.CIELab:return o?this.CIELabA(a,e,t,l,i):this.CIELab(a,e,t,l,i);case j.LCH:return o?this.LCHA(a,e,t,l,i):this.LCH(a,e,t,l,i)}},[j.HEX]:(n,e,t,i)=>e(n,t).map((r=>i?W.HEX(pe(r.H,r.S,r.L)):N.HEX(pe(r.H,r.S,r.L)))),HEXA:(n,e,t,i)=>e(n,t).map((r=>i?W.HEX({...pe(r.H,r.S,r.L),A:me(r.A)*X}):N.HEXA({...pe(r.H,r.S,r.L),A:me(r.A)}))),[j.RGB]:(n,e,t,i,r)=>e(n,t).map((s=>i?W.RGB(pe(s.H,s.S,s.L),r):N.RGB(pe(s.H,s.S,s.L),r.decimals))),RGBA:(n,e,t,i,r)=>e(n,t).map((s=>i?W.RGB({...pe(s.H,s.S,s.L),A:me(s.A)},r):N.RGBA({...pe(s.H,s.S,s.L),A:me(s.A)},r.decimals))),[j.HSL]:(n,e,t,i,r)=>e(n,t).map((s=>i?W.HSL({H:s.H,S:s.S,L:s.L},r):N.HSL(pe(s.H,s.S,s.L),r.decimals))),HSLA:(n,e,t,i,r)=>e(n,t).map((s=>i?W.HSL({...s,A:me(s.A)},r):N.HSLA({...pe(s.H,s.S,s.L),A:me(s.A)},r.decimals))),[j.HWB]:(n,e,t,i,r)=>e(n,t).map((s=>{const a=pe(s.H,s.S,s.L),o=Si(a.R,a.G,a.B);return i?W.HWB({H:o.H,W:o.W,B:o.B},r):N.HWB(a,r.decimals)})),HWBA:(n,e,t,i,r)=>e(n,t).map((s=>{const a=pe(s.H,s.S,s.L),o=Si(a.R,a.G,a.B);return i?W.HWB({...o,A:me(s.A)},r):N.HWBA({...a,A:me(s.A)},r.decimals)})),[j.CIELab]:(n,e,t,i,r)=>e(n,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.CIELab(li(a.R,a.G,a.B),r):N.CIELab(a,r.decimals)})),CIELabA:(n,e,t,i,r)=>e(n,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.CIELab({...li(a.R,a.G,a.B),A:me(s.A)},r):N.CIELabA({...a,A:me(s.A)},r.decimals)})),[j.LCH]:(n,e,t,i,r)=>e(n,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.LCH(ui(a.R,a.G,a.B),r):N.LCH(a,r.decimals)})),LCHA:(n,e,t,i,r)=>e(n,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.LCH({...ui(a.R,a.G,a.B),A:me(s.A)},r):N.LCHA({...a,A:me(s.A)},r.decimals)}))},Wi={mix(n,e){const t=n.map((a=>{const o=Le(a);return Ue(a,o)})),i=e===Ze.SUBTRACTIVE?t.map((a=>{const o=((l,u,c)=>{const d=Math.min(l,u,c),h=Math.min(X-l,X-u,X-c),p=l-d,m=u-d,g=c-d,y=Math.min(p,m),x=p-y,b=(m+y)/2,w=(g+m-y)/2,S=Math.max(x,b,w)/Math.max(p,m,g),q=isNaN(S)||S===1/0||S<=0?1:S;return{R:x/q+h,Y:b/q+h,B:w/q+h}})(a.R,a.G,a.B);return be(a,"A")&&(o.A=a.A),o})):null;function r(a){const o=e===Ze.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return a.reduce(((l,u)=>{const c=be(u,"A")?u.A:1,d={R:Math.min(l.R+u.R*c,X),B:Math.min(l.B+u.B*c,X),A:1-(1-c)*(1-l.A)},h="G"in l?l.G:l.Y,p="G"in u?u.G:u.Y;return{...d,...e===Ze.ADDITIVE?{G:Math.min(h+p*c,X)}:{Y:Math.min(h+p*c,X)}}}),o)}let s;if(e===Ze.ADDITIVE)s=r(t);else{const a=r(i);s=((o,l,u)=>{const c=Math.min(o,l,u),d=Math.min(X-o,X-l,X-u),h=o-c,p=l-c,m=u-c,g=Math.min(p,m),y=h+p-g,x=p+g,b=2*(m-g),w=Math.max(y,x,b)/Math.max(h,p,m),S=isNaN(w)||w===1/0||w<=0?1:w;return{R:y/S+d,G:x/S+d,B:b/S+d}})(a.R,a.Y,a.B),s.A=a.A}return{R:$(s.R),G:$(s.G),B:$(s.B),A:se(s.A,0,1)}},[j.HEX](n,e,t){const i=this.mix(n,e);return delete i.A,t?W.HEX(i):N.HEX(i)},HEXA(n,e,t){const i=this.mix(n,e);return i.A=t?me(i.A)*X:me(i.A),t?W.HEX(i):N.HEXA(i)},[j.RGB](n,e,t,i){const r=this.mix(n,e);return delete r.A,t?W.RGB(r,i):N.RGB(r,i.decimals)},RGBA(n,e,t,i){const r=this.mix(n,e);return t?W.RGB(r,i):N.RGBA(r,i.decimals)},[j.HSL](n,e,t,i){const r=this.mix(n,e),s=oi(r.R,r.G,r.B);return delete r.A,delete s.A,t?W.HSL(s,i):N.HSL(r,i.decimals)},HSLA(n,e,t,i){const r=this.mix(n,e),s=oi(r.R,r.G,r.B,r.A);return t?W.HSL(s,i):N.HSLA(r,i.decimals)},[j.HWB](n,e,t,i){const r=this.mix(n,e),s=Si(r.R,r.G,r.B);return delete r.A,delete s.A,t?W.HWB(s,i):N.HWB(r,i.decimals)},HWBA(n,e,t,i){const r=this.mix(n,e),s=Si(r.R,r.G,r.B,r.A);return t?W.HWB(s,i):N.HWBA(r,i.decimals)},[j.CIELab](n,e,t,i){const r=this.mix(n,e),s=li(r.R,r.G,r.B);return delete r.A,t?W.CIELab(s,i):N.CIELab(r,i.decimals)},CIELabA(n,e,t,i){const r=this.mix(n,e),s=li(r.R,r.G,r.B);return be(r,"A")&&(s.A=r.A),t?W.CIELab(s,i):N.CIELabA(r,i.decimals)},[j.LCH](n,e,t,i){const r=this.mix(n,e),s=ui(r.R,r.G,r.B);return delete r.A,t?W.LCH(s,i):N.LCH(r,i.decimals)},LCHA(n,e,t,i){const r=this.mix(n,e),s=ui(r.R,r.G,r.B);return be(r,"A")&&(s.A=r.A),t?W.LCH(s,i):N.LCHA(r,i.decimals)}},Gy=(n,e)=>({R:$(n.R,e),G:$(n.G,e),B:$(n.B,e),...be(n,"A")?{A:$(n.A,e)}:{}}),Qe=(n,e,t,i)=>i(Ue(n,e),t),$r=(n,e,t,i,r)=>(t<1&&(t=5),((a,o,l)=>{const u=l-1,c=(o.R-a.R)/u,d=(o.G-a.G)/u,h=(o.B-a.B)/u,p=me(a.A),m=(me(o.A)-p)/u;return Array(l).fill(null).map(((g,y)=>y===0?a:y===u?o:{R:$(a.R+c*y),G:$(a.G+d*y),B:$(a.B+h*y),A:$(p+m*y)}))})(Ue(n),Ue(e),t).map((a=>r(a,i))));function Be(n){const{from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:s,cssFunction:a}=n,o=typeof i=="number"?$r(e,t,i,r?.decimals,s):$r(e,t,5,i?.decimals,s);return a?o.map((l=>a(l,xe((typeof i=="number"?r:i)??{},e,t)))):o}function qe(n){const{colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:r,css:s}=n,a=xe((typeof t=="string"?i:t)??{},...e);return r(e,typeof t=="string"?t:Ze.ADDITIVE,s,a)}const fs=(n,e,t,i)=>({[Mt.ANALOGOUS]:zi.buildHarmony(e,Ly,t,i),[Mt.COMPLEMENTARY]:zi.buildHarmony(e,Hy,t,i),[Mt.SPLIT_COMPLEMENTARY]:zi.buildHarmony(e,Ny,t,i),[Mt.TRIADIC]:zi.buildHarmony(e,Vy,t,i),[Mt.TETRADIC]:zi.buildHarmony(e,Uy,t,i),[Mt.SQUARE]:zi.buildHarmony(e,jy,t,i)})[n],ke=Object.fromEntries(Object.entries(Wi).map((n=>{const[e,t]=n;return[e,t.bind(Wi)]})));class Ae{constructor(e,t={}){this._options=xe(t,e),this.rgb=Ue(e),this.update("rgb")}update(...e){e.includes("rgb")||this.updateRGB(),e.includes("hsl")||this.updateHSL(),e.includes("hwb")||this.updateHWB(),e.includes("lab")||this.updateLAB(),e.includes("lch")||this.updateLCH(),e.includes("cmyk")||this.updateCMYK()}updateRGB(){this.rgb={...pe(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateHSL(){this.hsl=oi(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateHWB(){this.hwb=Si(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLAB(){this.lab={...li(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateLCH(){this.lch={...ui(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=Ou(this.rgb.R,this.rgb.G,this.rgb.B)}updateRGBFromHWB(){this.rgb={...Dr(this.hwb.H,this.hwb.W,this.hwb.B),A:this.rgb.A}}updateRGBFromLCH(){this.rgb={...Rr(this.lch.L,this.lch.C,this.lch.H),A:this.rgb.A}}updateRGBFromCMYK(){this.rgb={...Ia(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLAB(){this.rgb={...Bn(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateLCHFromLAB(){this.lch={...Eu(this.lab.L,this.lab.a,this.lab.b),A:this.lab.A}}updateLABromLCH(){this.lab={...Fu(this.lch.L,this.lch.C,this.lch.H),A:this.lch.A}}setOptions(e={}){return this._options={...this._options,...e},this}setR(e){this.rgb.R=se(e,0,X),this.update("rgb")}setG(e){return this.rgb.G=se(e,0,X),this.update("rgb"),this}setB(e){return this.rgb.B=se(e,0,X),this.update("rgb"),this}setH(e){return this.hsl.H=mt(e),this.update("hsl"),this}setS(e){return this.hsl.S=se(e,0,ft),this.update("hsl"),this}setL(e){return this.hsl.L=se(e,0,ft),this.update("hsl"),this}setWhiteness(e){return this.hwb.W=se(e,0,ft),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setBlackness(e){return this.hwb.B=se(e,0,ft),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setCIEL(e){return this.lab.L=se(e,0,ft),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEa(e){return this.lab.a=se(e,-125,ri),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEb(e){return this.lab.b=se(e,-125,ri),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setLCHL(e){return this.lch.L=se(e,0,ft),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHC(e){return this.lch.C=se(e,0,Yi),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHH(e){return this.lch.H=mt(e),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setA(e){const t=se(e,0,1);return this.rgb.A=t,this.hsl.A=t,this.hwb.A=t,this.lab.A=t,this.lch.A=t,this.cmyk.A=t,this}setC(e){return this.cmyk.C=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setM(e){return this.cmyk.M=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setY(e){return this.cmyk.Y=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setK(e){return this.cmyk.K=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}get options(){return this._options}get R(){return $(this.rgb.R,this.options.decimals)}get G(){return $(this.rgb.G,this.options.decimals)}get B(){return $(this.rgb.B,this.options.decimals)}get H(){return $(this.hsl.H,this.options.decimals)}get S(){return $(this.hsl.S,this.options.decimals)}get L(){return $(this.hsl.L,this.options.decimals)}get Whiteness(){return $(this.hwb.W,this.options.decimals)}get Blackness(){return $(this.hwb.B,this.options.decimals)}get CIEL(){return $(this.lab.L,this.options.decimals)}get CIEa(){return $(this.lab.a,this.options.decimals)}get CIEb(){return $(this.lab.b,this.options.decimals)}get LCHL(){return $(this.lch.L,this.options.decimals)}get LCHC(){return $(this.lch.C,this.options.decimals)}get LCHH(){return $(this.lch.H,this.options.decimals)}get A(){return $(this.hsl.A,this.options.decimals)}get C(){return $(this.cmyk.C,this.options.decimals)}get M(){return $(this.cmyk.M,this.options.decimals)}get Y(){return $(this.cmyk.Y,this.options.decimals)}get K(){return $(this.cmyk.K,this.options.decimals)}get HEXObject(){return N.HEX(this.rgb)}get HEXAObject(){return N.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get HWBObject(){return{H:this.H,W:this.Whiteness,B:this.Blackness}}get HWBAObject(){return{...this.HWBObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get LCHObject(){return{L:this.LCHL,C:this.LCHC,H:this.LCHH}}get LCHAObject(){return{...this.LCHObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return W.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return W.HEX({R:this.R,G:this.G,B:this.B,A:this.A*X})}get RGB(){return W.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return W.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return W.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return W.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get HWB(){return W.HWB({H:this.H,W:this.Whiteness,B:this.Blackness},this.options)}get HWBA(){return W.HWB({H:this.H,W:this.Whiteness,B:this.Blackness,A:this.A},this.options)}get CIELab(){return W.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return W.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get LCH(){return W.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH},this.options)}get LCHA(){return W.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH,A:this.A},this.options)}get CMYK(){return W.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return W.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(e){const t=Le(e);return Qe(e,t,0,N.HEX)}static toHEX(e){return W.HEX(Ae.toHEXObject(e))}static toHEXAObject(e){const t=Le(e);return Qe(e,t,0,N.HEXA)}static toHEXA(e){return W.HEX(Ae.toHEXAObject(e))}static toRGBObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.RGB)}static toRGB(e,t={}){const i=Ae.toRGBObject(e,t),r=xe(t,e);return W.RGB(i,r)}static toRGBAObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.RGBA)}static toRGBA(e,t={}){const i=Ae.toRGBAObject(e,t),r=xe(t,e);return W.RGB(i,r)}static toHSLObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.HSL)}static toHSL(e,t={}){const i=Ae.toHSLObject(e,t),r=xe(t,e);return W.HSL(i,r)}static toHSLAObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.HSLA)}static toHSLA(e,t={}){const i=Ae.toHSLAObject(e,t),r=xe(t,e);return W.HSL(i,r)}static toHWBObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.HWB)}static toHWB(e,t={}){const i=Ae.toHWBObject(e,t),r=xe(t,e);return W.HWB(i,r)}static toHWBAObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.HWBA)}static toHWBA(e,t={}){const i=Ae.toHWBAObject(e,t),r=xe(t,e);return W.HWB(i,r)}static toCIELabObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.CIELab)}static toCIELab(e,t={}){const i=Ae.toCIELabObject(e,t),r=xe(t,e);return W.CIELab(i,r)}static toCIELabAObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.CIELabA)}static toCIELabA(e,t={}){const i=Ae.toCIELabAObject(e,t),r=xe(t,e);return W.CIELab(i,r)}static toLCHObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.LCH)}static toLCH(e,t={}){const i=Ae.toLCHObject(e,t),r=xe(t,e);return W.LCH(i,r)}static toLCHAObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.LCHA)}static toLCHA(e,t={}){const i=Ae.toLCHAObject(e,t),r=xe(t,e);return W.LCH(i,r)}static toCMYKObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.CMYK)}static toCMYK(e,t={}){const i=Ae.toCMYKObject(e,t),r=xe(t,e);return W.CMYK(i,r)}static toCMYKAObject(e,t={}){const i=Le(e);return Qe(e,i,t.decimals,N.CMYKA)}static toCMYKA(e,t={}){const i=Ae.toCMYKAObject(e,t),r=xe(t,e);return W.CMYK(i,r)}static getBlendHEXObject(e,t,i=5){return $r(e,t,i,0,N.HEX)}static getBlendHEX(e,t,i=5){return Ae.getBlendHEXObject(e,t,i).map((r=>W.HEX(r)))}static getBlendHEXAObject(e,t,i=5){return $r(e,t,i,0,N.HEXA)}static getBlendHEXA(e,t,i=5){return Ae.getBlendHEXAObject(e,t,i).map((r=>W.HEX(r)))}static getBlendRGBObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.RGB})}static getBlendRGB(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.RGB,cssFunction:W.RGB})}static getBlendRGBAObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.RGBA})}static getBlendRGBA(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.RGBA,cssFunction:W.RGB})}static getBlendHSLObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HSL})}static getBlendHSL(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HSL,cssFunction:W.HSL})}static getBlendHSLAObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HSLA})}static getBlendHSLA(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HSLA,cssFunction:W.HSL})}static getBlendHWBObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HWB})}static getBlendHWB(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HWB,cssFunction:W.HWB})}static getBlendHWBAObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HWBA})}static getBlendHWBA(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.HWBA,cssFunction:W.HWB})}static getBlendCIELabObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.CIELab})}static getBlendCIELab(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.CIELab,cssFunction:W.CIELab})}static getBlendCIELabAObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.CIELabA})}static getBlendCIELabA(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.CIELabA,cssFunction:W.CIELab})}static getBlendLCHObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.LCH})}static getBlendLCH(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.LCH,cssFunction:W.LCH})}static getBlendLCHAObject(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.LCHA})}static getBlendLCHA(e,t,i,r){return Be({from:e,to:t,thirdParameter:i,fourthParameter:r,translateFunction:N.LCHA,cssFunction:W.LCH})}static getMixHEXObject(e,t=Ze.ADDITIVE){return Wi.HEX(e,t,!1)}static getMixHEX(e,t=Ze.ADDITIVE){return Wi.HEX(e,t,!0)}static getMixHEXAObject(e,t=Ze.ADDITIVE){return Wi.HEXA(e,t,!1)}static getMixHEXA(e,t=Ze.ADDITIVE){return Wi.HEXA(e,t,!0)}static getMixRGBObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGB,css:!1})}static getMixRGB(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGB,css:!0})}static getMixRGBAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGBA,css:!1})}static getMixRGBA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGBA,css:!0})}static getMixHSLObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSL,css:!1})}static getMixHSL(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSL,css:!0})}static getMixHSLAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSLA,css:!1})}static getMixHSLA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSLA,css:!0})}static getMixHWBObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWB,css:!1})}static getMixHWB(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWB,css:!0})}static getMixHWBAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWBA,css:!1})}static getMixHWBA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWBA,css:!0})}static getMixCIELabObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELab,css:!1})}static getMixCIELab(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELab,css:!0})}static getMixCIELabAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELabA,css:!1})}static getMixCIELabA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELabA,css:!0})}static getMixLCHObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCH,css:!1})}static getMixLCH(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCH,css:!0})}static getMixLCHAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCHA,css:!1})}static getMixLCHA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCHA,css:!0})}static getShades(e,t,i){return typeof t=="number"?ar(e,t,!0,xe(i||{},e)):ar(e,5,!0,xe(t||{},e))}static getTints(e,t,i){return typeof t=="number"?ar(e,t,!1,xe(i||{},e)):ar(e,5,!1,xe(t||{},e))}static getHarmony(e,t,i,r){return`${t}`in Mt?fs(t,e,cs(i)?i:Ze.ADDITIVE,xe(cs(i)?r||{}:i||{},e)):cs(t)?fs(Mt.COMPLEMENTARY,e,t,xe(i||{},e)):fs(Mt.COMPLEMENTARY,e,Ze.ADDITIVE,xe(t||{},e))}}const Wy={slots:{root:"data-[disabled]:opacity-75",picker:"flex gap-4",selector:"rounded-md touch-none",selectorBackground:"w-full h-full relative rounded-md",selectorThumb:"-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-(--color-white) rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",track:"w-[8px] relative rounded-md touch-none",trackThumb:"absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-(--color-white) cursor-pointer data-[disabled]:cursor-not-allowed"},variants:{size:{xs:{selector:"w-38 h-38",track:"h-38"},sm:{selector:"w-40 h-40",track:"h-40"},md:{selector:"w-42 h-42",track:"h-42"},lg:{selector:"w-44 h-44",track:"h-44"},xl:{selector:"w-46 h-46",track:"h-46"}}},compoundVariants:[],defaultVariants:{size:"md"}},Ky=["data-disabled"],Xy=["data-disabled"];function Yy(n){const e=n.S*(n.L<50?n.L:100-n.L),t=n.L+e/100;return{h:n.H,s:n.L===0?n.S:2*e/t,v:t}}function Mo(n){const e=(200-n.s)*n.v/100;return{H:n.h,S:e===0||e===200?0:Math.round(n.s*n.v/(e<=100?e:200-e)),L:e/2}}const Jy={__name:"UColorPicker",props:qr({as:{type:null,required:!1},throttle:{type:Number,required:!1,default:50},disabled:{type:Boolean,required:!1},defaultValue:{type:String,required:!1,default:"#FFFFFF"},format:{type:String,required:!1,default:"hex"},size:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=n,t=ua(n,"modelValue",{type:String}),i=Te(),r=k(()=>de({extend:de(Wy),...i.ui?.colorPicker||{}})({size:e.size})),s=k({get(){try{const M=new Ae(t.value||e.defaultValue);return Yy(M.HSLObject)}catch{return{h:0,s:0,v:100}}},set(M){const B=new Ae(Mo(M),{labUnit:"percent",cmykUnit:"percent",cmykFunction:"cmyk"});switch(e.format){case"rgb":t.value=B.RGB;break;case"hsl":t.value=B.HSL;break;case"cmyk":t.value=B.CMYK;break;case"lab":t.value=B.CIELab;break;case"hex":default:t.value=B.HEX}}});function a(M,B,L="both",E={x:0,y:0},D){const U=O(E),G=O(),ee=vo(M),te=vo(B);function ne(J){if(Pt(D))return J.preventDefault();const he=Pt(B);G.value={x:J.clientX-(he?J.clientX-te.left.value+he.scrollLeft:ee.left.value),y:J.clientY-(he?J.clientY-te.top.value+he.scrollTop:ee.top.value)},K(J)}function K(J){if(!G.value)return;const he=Pt(B);let{x:ae,y:ye}=U.value;he&&(L==="x"||L==="both")&&(ae=Math.min(Math.max(0,(J.clientX-G.value.x)/he.scrollWidth*100),100)),he&&(L==="y"||L==="both")&&(ye=Math.min(Math.max(0,(J.clientY-G.value.y)/he.scrollHeight*100),100)),U.value={x:ae,y:ye}}function Q(){G.value&&(G.value=void 0)}return fl&&(wn(B,"pointerdown",ne),wn(window,"pointermove",K),wn(window,"pointerup",Q)),{position:U}}function o(M,B="left"){return B==="right"?M*100/360:M/100*360}function l(M){return 100-M}const u=O(null),c=O(null),d=O(null),h=O(null),p=k(()=>e.disabled),{position:m}=a(c,u,"both",{x:s.value.s,y:l(s.value.v)},p),{position:g}=a(h,d,"y",{x:0,y:o(s.value.h,"right")},p),{pause:y,resume:x}=Hc(s,M=>{m.value={x:M.s,y:l(M.v)},g.value={x:0,y:o(M.h,"right")}});Nc([m,g],()=>{y(),s.value={h:o(g.value.y),s:m.value.x,v:l(m.value.y)},Ye(x)},{throttle:()=>e.throttle});const b=k(()=>new Ae(Mo({h:o(g.value.y),s:100,v:100})).HEX),w=k(()=>({backgroundColor:b.value})),S=k(()=>({backgroundColor:new Ae(t.value||e.defaultValue).HEX,left:`${m.value.x}%`,top:`${m.value.y}%`})),q=k(()=>({backgroundColor:b.value,top:`${g.value.y}%`}));return(M,B)=>(v(),C(f(re),{as:n.as,class:T(r.value.root({class:[e.ui?.root,e.class]})),"data-disabled":p.value?!0:void 0},{default:_(()=>[I("div",{class:T(r.value.picker({class:e.ui?.picker}))},[I("div",{ref_key:"selectorRef",ref:u,class:T(r.value.selector({class:e.ui?.selector})),style:qt(w.value)},[I("div",{class:T(r.value.selectorBackground({class:e.ui?.selectorBackground})),"data-color-picker-background":""},[I("div",{ref_key:"selectorThumbRef",ref:c,class:T(r.value.selectorThumb({class:e.ui?.selectorThumb})),style:qt(S.value),"data-disabled":p.value?!0:void 0},null,14,Ky)],2)],6),I("div",{ref_key:"trackRef",ref:d,class:T(r.value.track({class:e.ui?.track})),"data-color-picker-track":""},[I("div",{ref_key:"trackThumbRef",ref:h,class:T(r.value.trackThumb({class:e.ui?.trackThumb})),style:qt(q.value),"data-disabled":p.value?!0:void 0},null,14,Xy)],2)],2)]),_:1},8,["as","class","data-disabled"]))}},Zy=ml(Jy,[["__scopeId","data-v-4c7c69c0"]]),xt={Root:eu,Trigger:tu,Portal:Yp,Content:Lp,Arrow:Zl,Item:Up,Group:Np,Separator:im,CheckboxItem:Pp,ItemIndicator:Gp,Label:Kp,RadioGroup:Zp,RadioItem:em,Sub:rm,SubContent:am,SubTrigger:lm},Qy={Root:pm,Trigger:Cm,Portal:wm,Content:bm,Arrow:dm},ev={Root:gp,Trigger:zp,Portal:Fp,Content:kp,Arrow:xp,Close:_p,Anchor:vp},tv={slots:{content:"bg-default shadow-lg rounded-md ring ring-default data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-popover-content-transform-origin) focus:outline-none pointer-events-auto",arrow:"fill-default"}},iv={__name:"UPopover",props:{mode:{type:String,required:!1,default:"click"},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1},openDelay:{type:Number,required:!1,default:0},closeDelay:{type:Number,required:!1,default:0}},emits:["close:prevent","update:open"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),s=Te(),a=t.mode==="hover"?Ft(t,"defaultOpen","open","openDelay","closeDelay"):Ft(t,"defaultOpen","open","modal"),o=Ce(a,i),l=on(je(()=>t.portal)),u=je(()=>qn(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),c=k(()=>t.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((g,y)=>(g[y]=x=>{x.preventDefault(),i("close:prevent")},g),{})),d=je(()=>t.arrow),h=k(()=>de({extend:de(tv),...s.ui?.popover||{}})({side:u.value.side})),p=k(()=>t.mode==="hover"?Qy:ev);return(m,g)=>(v(),C(f(p).Root,oe(le(f(o))),{default:_(({open:y})=>[r.default||n.reference?(v(),C(f(p).Trigger,{key:0,"as-child":"",reference:n.reference,class:T(t.class)},{default:_(()=>[A(m.$slots,"default",{open:y})]),_:2},1032,["reference","class"])):R("",!0),"Anchor"in p.value&&r.anchor?(v(),C(f(p).Anchor,{key:1,"as-child":""},{default:_(()=>[A(m.$slots,"anchor")]),_:3})):R("",!0),F(f(p).Portal,oe(le(f(l))),{default:_(()=>[F(f(p).Content,H(u.value,{class:h.value.content({class:[!r.default&&t.class,t.ui?.content]})},Tn(c.value)),{default:_(()=>[A(m.$slots,"content"),n.arrow?(v(),C(f(p).Arrow,H({key:0},d.value,{class:h.value.arrow({class:t.ui?.arrow})}),null,16,["class"])):R("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16))}},nv=z({__name:"EditableColor",props:{modelValue:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=O(t.modelValue),s=()=>{i("update:modelValue",r.value)};return(a,o)=>{const l=lt,u=Zy,c=iv;return v(),C(c,{onBlur:s},{content:_(()=>[F(u,{modelValue:r.value,"onUpdate:modelValue":[o[0]||(o[0]=d=>r.value=d),s],class:"p-2"},null,8,["modelValue"])]),default:_(()=>[F(l,{label:r.value,color:"neutral",size:"xs",variant:"soft"},{leading:_(()=>[I("span",{style:qt({backgroundColor:r.value}),class:"size-3 rounded-full"},null,4)]),_:1},8,["label"])]),_:1})}}}),rv=Object.assign(nv,{__name:"EditableColor"}),Tu={__name:"UDropdownMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},checkedIcon:{type:String,required:!1},loadingIcon:{type:String,required:!1},externalIcon:{type:[Boolean,String],required:!1},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),{dir:s}=In(),a=Te(),o=on(je(()=>t.portal)),l=Ce(Vc(t,"sub","items","portal","labelKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),u=yl(r,["default"]),[c,d]=Mr(),h=k(()=>s.value==="rtl"?a.ui.icons.chevronLeft:a.ui.icons.chevronRight),p=k(()=>t.items?.length?Uc(t.items)?t.items:[t.items]:[]);return(m,g)=>(v(),V(we,null,[F(f(c),null,{default:_(({item:y,active:x,index:b})=>[A(m.$slots,y.slot||"item",{item:y,index:b},()=>[A(m.$slots,y.slot?`${y.slot}-leading`:"item-leading",{item:y,active:x,index:b},()=>[y.loading?(v(),C(Pe,{key:0,name:n.loadingIcon||f(a).ui.icons.loading,class:T(n.ui.itemLeadingIcon({class:[n.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,loading:!0}))},null,8,["name","class"])):y.icon?(v(),C(Pe,{key:1,name:y.icon,class:T(n.ui.itemLeadingIcon({class:[n.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,active:x}))},null,8,["name","class"])):y.avatar?(v(),C(ln,H({key:2,size:y.ui?.itemLeadingAvatarSize||n.uiOverride?.itemLeadingAvatarSize||n.ui.itemLeadingAvatarSize()},y.avatar,{class:n.ui.itemLeadingAvatar({class:[n.uiOverride?.itemLeadingAvatar,y.ui?.itemLeadingAvatar],active:x})}),null,16,["size","class"])):R("",!0)]),f(xi)(y,t.labelKey)||r[y.slot?`${y.slot}-label`:"item-label"]?(v(),V("span",{key:0,class:T(n.ui.itemLabel({class:[n.uiOverride?.itemLabel,y.ui?.itemLabel],active:x}))},[A(m.$slots,y.slot?`${y.slot}-label`:"item-label",{item:y,active:x,index:b},()=>[ce(Z(f(xi)(y,t.labelKey)),1)]),y.target==="_blank"&&n.externalIcon!==!1?(v(),C(Pe,{key:0,name:typeof n.externalIcon=="string"?n.externalIcon:f(a).ui.icons.external,class:T(n.ui.itemLabelExternalIcon({class:[n.uiOverride?.itemLabelExternalIcon,y.ui?.itemLabelExternalIcon],color:y?.color,active:x}))},null,8,["name","class"])):R("",!0)],2)):R("",!0),I("span",{class:T(n.ui.itemTrailing({class:[n.uiOverride?.itemTrailing,y.ui?.itemTrailing]}))},[A(m.$slots,y.slot?`${y.slot}-trailing`:"item-trailing",{item:y,active:x,index:b},()=>[y.children?.length?(v(),C(Pe,{key:0,name:h.value,class:T(n.ui.itemTrailingIcon({class:[n.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color,active:x}))},null,8,["name","class"])):y.kbds?.length?(v(),V("span",{key:1,class:T(n.ui.itemTrailingKbds({class:[n.uiOverride?.itemTrailingKbds,y.ui?.itemTrailingKbds]}))},[(v(!0),V(we,null,Xe(y.kbds,(w,S)=>(v(),C(hu,H({key:S,size:y.ui?.itemTrailingKbdsSize||n.uiOverride?.itemTrailingKbdsSize||n.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof w=="string"?{value:w}:w),null,16,["size"]))),128))],2)):R("",!0)]),F(f(xt).ItemIndicator,{"as-child":""},{default:_(()=>[F(Pe,{name:n.checkedIcon||f(a).ui.icons.check,class:T(n.ui.itemTrailingIcon({class:[n.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),F(f(xt).Portal,oe(le(f(o))),{default:_(()=>[(v(),C(an(n.sub?f(xt).SubContent:f(xt).Content),H({class:t.class},f(l)),{default:_(()=>[A(m.$slots,"content-top"),I("div",{role:"presentation",class:T(n.ui.viewport({class:n.uiOverride?.viewport}))},[(v(!0),V(we,null,Xe(p.value,(y,x)=>(v(),C(f(xt).Group,{key:`group-${x}`,class:T(n.ui.group({class:n.uiOverride?.group}))},{default:_(()=>[(v(!0),V(we,null,Xe(y,(b,w)=>(v(),V(we,{key:`group-${x}-${w}`},[b.type==="label"?(v(),C(f(xt).Label,{key:0,class:T(n.ui.label({class:[n.uiOverride?.label,b.ui?.label,b.class]}))},{default:_(()=>[F(f(d),{item:b,index:w},null,8,["item","index"])]),_:2},1032,["class"])):b.type==="separator"?(v(),C(f(xt).Separator,{key:1,class:T(n.ui.separator({class:[n.uiOverride?.separator,b.ui?.separator,b.class]}))},null,8,["class"])):b?.children?.length?(v(),C(f(xt).Sub,{key:2,open:b.open,"default-open":b.defaultOpen},{default:_(()=>[F(f(xt).SubTrigger,{as:"button",type:"button",disabled:b.disabled,"text-value":f(xi)(b,t.labelKey),class:T(n.ui.item({class:[n.uiOverride?.item,b.ui?.item,b.class],color:b?.color}))},{default:_(()=>[F(f(d),{item:b,index:w},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),F(Tu,H({sub:"",class:t.class,ui:n.ui,"ui-override":n.uiOverride,portal:n.portal,items:b.children,align:"start","align-offset":-4,"side-offset":3,"label-key":n.labelKey,"checked-icon":n.checkedIcon,"loading-icon":n.loadingIcon,"external-icon":n.externalIcon},{ref_for:!0},b.content),vl({_:2},[Xe(f(u),(S,q)=>({name:q,fn:_(M=>[A(m.$slots,q,H({ref_for:!0},M))])}))]),1040,["class","ui","ui-override","portal","items","label-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):b.type==="checkbox"?(v(),C(f(xt).CheckboxItem,{key:3,"model-value":b.checked,disabled:b.disabled,"text-value":f(xi)(b,t.labelKey),class:T(n.ui.item({class:[n.uiOverride?.item,b.ui?.item,b.class],color:b?.color})),"onUpdate:modelValue":b.onUpdateChecked,onSelect:b.onSelect},{default:_(()=>[F(f(d),{item:b,index:w},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(v(),C(f(xt).Item,{key:4,"as-child":"",disabled:b.disabled,"text-value":f(xi)(b,t.labelKey),onSelect:b.onSelect},{default:_(()=>[F(pl,H({ref_for:!0},f(jc)(b),{custom:""}),{default:_(({active:S,...q})=>[F(Gc,H({ref_for:!0},q,{class:n.ui.item({class:[n.uiOverride?.item,b.ui?.item,b.class],color:b?.color,active:S})}),{default:_(()=>[F(f(d),{item:b,active:S,index:w},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040)]),_:2},1032,["disabled","text-value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))],2),A(m.$slots,"default"),A(m.$slots,"content-bottom")]),_:3},16,["class"]))]),_:3},16)],64))}},sv={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-dropdown-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",arrow:"fill-default",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemLabel:"truncate",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},Iu={__name:"UDropdownMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:String,required:!1},loadingIcon:{type:String,required:!1},externalIcon:{type:[Boolean,String],required:!1,default:!0},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(n,{emit:e}){const t=n,i=e,r=Ge(),s=Te(),a=Ce(Ft(t,"defaultOpen","open","modal"),i),o=je(()=>qn(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),l=je(()=>t.arrow),u=yl(r,["default"]),c=k(()=>de({extend:de(sv),...s.ui?.dropdownMenu||{}})({size:t.size}));return(d,h)=>(v(),C(f(eu),oe(le(f(a))),{default:_(({open:p})=>[r.default?(v(),C(f(tu),{key:0,"as-child":"",class:T(t.class),disabled:n.disabled},{default:_(()=>[A(d.$slots,"default",{open:p})]),_:2},1032,["class","disabled"])):R("",!0),F(Tu,H({class:c.value.content({class:[!r.default&&t.class,t.ui?.content]}),ui:c.value,"ui-override":t.ui},o.value,{items:n.items,portal:n.portal,"label-key":n.labelKey,"checked-icon":n.checkedIcon,"loading-icon":n.loadingIcon,"external-icon":n.externalIcon}),vl({default:_(()=>[n.arrow?(v(),C(f(Zl),H({key:0},l.value,{class:c.value.arrow({class:t.ui?.arrow})}),null,16,["class"])):R("",!0)]),_:2},[Xe(f(u),(m,g)=>({name:g,fn:_(y=>[A(d.$slots,g,oe(le(y)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}},Bo=async n=>{try{await navigator.clipboard.writeText(n)}catch(e){console.error("Failed to copy path:",e)}},Pu=async n=>{try{const e=`:${n.path.replace(/\./g,"-")}="${JSON.stringify(n.value)}"`;await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy prop:",e)}},av=async n=>{try{const e=n.children?.map(i=>i.value)||[],t=`:${n.path.replace(/\./g,"-")}='[${e.map(i=>typeof i=="string"?`"${i}"`:i).join(", ")}]'`;await navigator.clipboard.writeText(t)}catch(e){console.error("Failed to copy prop as array:",e)}},Ru=async n=>{try{const e=JSON.stringify(n);await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy value:",e)}},Du=async n=>{try{if(!n.children||n.children.length<3)return;await navigator.clipboard.writeText(`new Vector3(${n.children[0].value}, ${n.children[1].value}, ${n.children[2].value})`)}catch(e){console.error("Failed to copy prop as Vector3:",e)}},ov=async n=>{try{const t=`[${(n.children?.map(i=>i.value)||[]).map(i=>typeof i=="string"?`"${i}"`:i).join(", ")}]`;await navigator.clipboard.writeText(t)}catch(e){console.error("Failed to copy prop as array:",e)}},lv=async n=>{try{let e={};n.children&&n.children.length>0&&(e=n.children.reduce((t,i)=>(t[i.label]=i.value,t),{})),await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(e){console.error("Failed to copy value as JSON:",e)}},$u=async n=>{try{const e=n.children?.find(u=>u.label==="x"),t=n.children?.find(u=>u.label==="y"),i=n.children?.find(u=>u.label==="z"),r=n.children?.find(u=>u.label==="order"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=r?.value||"XYZ";await navigator.clipboard.writeText(`new Euler(${s}, ${a}, ${o}, '${l}')`)}catch(e){console.error("Failed to copy value as Euler:",e)}},Lu=async n=>{try{const e=n.children?.find(u=>u.label==="x"),t=n.children?.find(u=>u.label==="y"),i=n.children?.find(u=>u.label==="z"),r=n.children?.find(u=>u.label==="w"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=r?.value||1;await navigator.clipboard.writeText(`new Quaternion(${s}, ${a}, ${o}, ${l})`)}catch(e){console.error("Failed to copy value as Quaternion:",e)}};function uv(n){let e=0,t=n;return n.scene&&(t=n.scene),t.traverse(i=>{if(i.isMesh&&i.geometry){const r=i.geometry,s=r.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,a=r.index?r.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=r.attributes.normal?r.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,l=r.attributes.uv?r.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,u=s+a+o+l;e+=u}}),e}function cv(n){return(n/1024).toFixed(2)}/**
2
+ * @license
3
+ * Copyright 2010-2025 Three.js Authors
4
+ * SPDX-License-Identifier: MIT
5
+ */const Hu="180",ia=0,dv=1,hv=2,qo=1,ko=100,Eo=204,Fo=205,Oo=3,fv=0,Nu=300,zo=1e3,or=1001,To=1002,pv=1006,mv=1008,gv=1009,yv=1015,vv=1023,Vu="",At="srgb",Io="srgb-linear",Po="linear",ps="srgb",Ti=7680,Ro=519,Do=35044,lr=2e3,$o=2001;class Qr{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners;if(i===void 0)return;const r=i[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const i=t[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,a=r.length;s<a;s++)r[s].call(this,e);e.target=null}}}const We=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];function Hn(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(We[n&255]+We[n>>8&255]+We[n>>16&255]+We[n>>24&255]+"-"+We[e&255]+We[e>>8&255]+"-"+We[e>>16&15|64]+We[e>>24&255]+"-"+We[t&63|128]+We[t>>8&255]+"-"+We[t>>16&255]+We[t>>24&255]+We[i&255]+We[i>>8&255]+We[i>>16&255]+We[i>>24&255]).toLowerCase()}function ue(n,e,t){return Math.max(e,Math.min(t,n))}function bv(n,e){return(n%e+e)%e}function ms(n,e,t){return(1-t)*n+t*e}function mn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function et(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}class kt{constructor(e=0,t=0){kt.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=ue(this.x,e.x,t.x),this.y=ue(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=ue(this.x,e,t),this.y=ue(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ue(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(ue(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*i-a*r+e.x,this.y=s*r+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Nn{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,s,a,o){let l=i[r+0],u=i[r+1],c=i[r+2],d=i[r+3];const h=s[a+0],p=s[a+1],m=s[a+2],g=s[a+3];if(o===0){e[t+0]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d;return}if(o===1){e[t+0]=h,e[t+1]=p,e[t+2]=m,e[t+3]=g;return}if(d!==g||l!==h||u!==p||c!==m){let y=1-o;const x=l*h+u*p+c*m+d*g,b=x>=0?1:-1,w=1-x*x;if(w>Number.EPSILON){const q=Math.sqrt(w),M=Math.atan2(q,x*b);y=Math.sin(y*M)/q,o=Math.sin(o*M)/q}const S=o*b;if(l=l*y+h*S,u=u*y+p*S,c=c*y+m*S,d=d*y+g*S,y===1-o){const q=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=q,u*=q,c*=q,d*=q}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,a){const o=i[r],l=i[r+1],u=i[r+2],c=i[r+3],d=s[a],h=s[a+1],p=s[a+2],m=s[a+3];return e[t]=o*m+c*d+l*p-u*h,e[t+1]=l*m+c*h+u*d-o*p,e[t+2]=u*m+c*p+o*h-l*d,e[t+3]=c*m-o*d-l*h-u*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,r=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,u=o(i/2),c=o(r/2),d=o(s/2),h=l(i/2),p=l(r/2),m=l(s/2);switch(a){case"XYZ":this._x=h*c*d+u*p*m,this._y=u*p*d-h*c*m,this._z=u*c*m+h*p*d,this._w=u*c*d-h*p*m;break;case"YXZ":this._x=h*c*d+u*p*m,this._y=u*p*d-h*c*m,this._z=u*c*m-h*p*d,this._w=u*c*d+h*p*m;break;case"ZXY":this._x=h*c*d-u*p*m,this._y=u*p*d+h*c*m,this._z=u*c*m+h*p*d,this._w=u*c*d-h*p*m;break;case"ZYX":this._x=h*c*d-u*p*m,this._y=u*p*d+h*c*m,this._z=u*c*m-h*p*d,this._w=u*c*d+h*p*m;break;case"YZX":this._x=h*c*d+u*p*m,this._y=u*p*d+h*c*m,this._z=u*c*m-h*p*d,this._w=u*c*d-h*p*m;break;case"XZY":this._x=h*c*d-u*p*m,this._y=u*p*d-h*c*m,this._z=u*c*m+h*p*d,this._w=u*c*d+h*p*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],a=t[1],o=t[5],l=t[9],u=t[2],c=t[6],d=t[10],h=i+o+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(c-l)*p,this._y=(s-u)*p,this._z=(a-r)*p}else if(i>o&&i>d){const p=2*Math.sqrt(1+i-o-d);this._w=(c-l)/p,this._x=.25*p,this._y=(r+a)/p,this._z=(s+u)/p}else if(o>d){const p=2*Math.sqrt(1+o-i-d);this._w=(s-u)/p,this._x=(r+a)/p,this._y=.25*p,this._z=(l+c)/p}else{const p=2*Math.sqrt(1+d-i-o);this._w=(a-r)/p,this._x=(s+u)/p,this._y=(l+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ue(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,s=e._z,a=e._w,o=t._x,l=t._y,u=t._z,c=t._w;return this._x=i*c+a*o+r*u-s*l,this._y=r*c+a*l+s*o-i*u,this._z=s*c+a*u+i*l-r*o,this._w=a*c-i*o-r*l-s*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,a=this._w;let o=a*e._w+i*e._x+r*e._y+s*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=i,this._y=r,this._z=s,this;const l=1-o*o;if(l<=Number.EPSILON){const p=1-t;return this._w=p*a+t*this._w,this._x=p*i+t*this._x,this._y=p*r+t*this._y,this._z=p*s+t*this._z,this.normalize(),this}const u=Math.sqrt(l),c=Math.atan2(u,o),d=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=a*d+this._w*h,this._x=i*d+this._x*h,this._y=r*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class P{constructor(e=0,t=0,i=0){P.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Lo.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Lo.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,a=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*a,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*a,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,a=e.y,o=e.z,l=e.w,u=2*(a*r-o*i),c=2*(o*t-s*r),d=2*(s*i-a*t);return this.x=t+l*u+a*d-o*c,this.y=i+l*c+o*u-s*d,this.z=r+l*d+s*c-a*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=ue(this.x,e.x,t.x),this.y=ue(this.y,e.y,t.y),this.z=ue(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=ue(this.x,e,t),this.y=ue(this.y,e,t),this.z=ue(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ue(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=r*l-s*o,this.y=s*a-i*l,this.z=i*o-r*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return gs.copy(this).projectOnVector(e),this.sub(gs)}reflect(e){return this.sub(gs.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(ue(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const gs=new P,Lo=new Nn;class di{constructor(e,t,i,r,s,a,o,l,u){di.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,a,o,l,u)}set(e,t,i,r,s,a,o,l,u){const c=this.elements;return c[0]=e,c[1]=r,c[2]=o,c[3]=t,c[4]=s,c[5]=l,c[6]=i,c[7]=a,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,a=i[0],o=i[3],l=i[6],u=i[1],c=i[4],d=i[7],h=i[2],p=i[5],m=i[8],g=r[0],y=r[3],x=r[6],b=r[1],w=r[4],S=r[7],q=r[2],M=r[5],B=r[8];return s[0]=a*g+o*b+l*q,s[3]=a*y+o*w+l*M,s[6]=a*x+o*S+l*B,s[1]=u*g+c*b+d*q,s[4]=u*y+c*w+d*M,s[7]=u*x+c*S+d*B,s[2]=h*g+p*b+m*q,s[5]=h*y+p*w+m*M,s[8]=h*x+p*S+m*B,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8];return t*a*c-t*o*u-i*s*c+i*o*l+r*s*u-r*a*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],d=c*a-o*u,h=o*l-c*s,p=u*s-a*l,m=t*d+i*h+r*p;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/m;return e[0]=d*g,e[1]=(r*u-c*i)*g,e[2]=(o*i-r*a)*g,e[3]=h*g,e[4]=(c*t-r*l)*g,e[5]=(r*s-o*t)*g,e[6]=p*g,e[7]=(i*l-u*t)*g,e[8]=(a*t-i*s)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,a,o){const l=Math.cos(s),u=Math.sin(s);return this.set(i*l,i*u,-i*(l*a+u*o)+a+e,-r*u,r*l,-r*(-u*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(ys.makeScale(e,t)),this}rotate(e){return this.premultiply(ys.makeRotation(-e)),this}translate(e,t){return this.premultiply(ys.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const ys=new di;function xv(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function Ho(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}const No={};function Vo(n){n in No||(No[n]=!0,console.warn(n))}const Uo=new di().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),jo=new di().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function wv(){const n={enabled:!0,workingColorSpace:Io,spaces:{},convert:function(r,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===ps&&(r.r=Wt(r.r),r.g=Wt(r.g),r.b=Wt(r.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===ps&&(r.r=Zi(r.r),r.g=Zi(r.g),r.b=Zi(r.b))),r},workingToColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},colorSpaceToWorking:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Vu?Po:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,a){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,s){return Vo("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,s)},toWorkingColorSpace:function(r,s){return Vo("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(r,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Io]:{primaries:e,whitePoint:i,transfer:Po,toXYZ:Uo,fromXYZ:jo,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:At},outputColorSpaceConfig:{drawingBufferColorSpace:At}},[At]:{primaries:e,whitePoint:i,transfer:ps,toXYZ:Uo,fromXYZ:jo,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:At}}}),n}const wt=wv();function Wt(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Zi(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Ii;class _v{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Ii===void 0&&(Ii=Ho("canvas")),Ii.width=e.width,Ii.height=e.height;const r=Ii.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=Ii}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Ho("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let a=0;a<s.length;a++)s[a]=Wt(s[a]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(Wt(t[i]/255)*255):t[i]=Wt(t[i]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let Cv=0;class Sv{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Cv++}),this.uuid=Hn(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let a=0,o=r.length;a<o;a++)r[a].isDataTexture?s.push(vs(r[a].image)):s.push(vs(r[a]))}else s=vs(r);i.url=s}return t||(e.images[this.uuid]=i),i}}function vs(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?_v.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Av=0;const bs=new P;class _i extends Qr{constructor(e=_i.DEFAULT_IMAGE,t=_i.DEFAULT_MAPPING,i=or,r=or,s=pv,a=mv,o=vv,l=gv,u=_i.DEFAULT_ANISOTROPY,c=Vu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Av++}),this.uuid=Hn(),this.name="",this.source=new Sv(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=a,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=l,this.offset=new kt(0,0),this.repeat=new kt(1,1),this.center=new kt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new di,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(bs).x}get height(){return this.source.getSize(bs).y}get depth(){return this.source.getSize(bs).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}r&&i&&r.isVector2&&i.isVector2||r&&i&&r.isVector3&&i.isVector3||r&&i&&r.isMatrix3&&i.isMatrix3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Nu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case zo:e.x=e.x-Math.floor(e.x);break;case or:e.x=e.x<0?0:1;break;case To:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case zo:e.y=e.y-Math.floor(e.y);break;case or:e.y=e.y<0?0:1;break;case To:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}_i.DEFAULT_IMAGE=null;_i.DEFAULT_MAPPING=Nu;_i.DEFAULT_ANISOTROPY=1;class Vn{constructor(e=0,t=0,i=0,r=1){Vn.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*r+a[12]*s,this.y=a[1]*t+a[5]*i+a[9]*r+a[13]*s,this.z=a[2]*t+a[6]*i+a[10]*r+a[14]*s,this.w=a[3]*t+a[7]*i+a[11]*r+a[15]*s,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,u=l[0],c=l[4],d=l[8],h=l[1],p=l[5],m=l[9],g=l[2],y=l[6],x=l[10];if(Math.abs(c-h)<.01&&Math.abs(d-g)<.01&&Math.abs(m-y)<.01){if(Math.abs(c+h)<.1&&Math.abs(d+g)<.1&&Math.abs(m+y)<.1&&Math.abs(u+p+x-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(u+1)/2,S=(p+1)/2,q=(x+1)/2,M=(c+h)/4,B=(d+g)/4,L=(m+y)/4;return w>S&&w>q?w<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(w),r=M/i,s=B/i):S>q?S<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(S),i=M/r,s=L/r):q<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(q),i=B/s,r=L/s),this.set(i,r,s,t),this}let b=Math.sqrt((y-m)*(y-m)+(d-g)*(d-g)+(h-c)*(h-c));return Math.abs(b)<.001&&(b=1),this.x=(y-m)/b,this.y=(d-g)/b,this.z=(h-c)/b,this.w=Math.acos((u+p+x-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=ue(this.x,e.x,t.x),this.y=ue(this.y,e.y,t.y),this.z=ue(this.z,e.z,t.z),this.w=ue(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=ue(this.x,e,t),this.y=ue(this.y,e,t),this.z=ue(this.z,e,t),this.w=ue(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ue(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Un{constructor(e=new P(1/0,1/0,1/0),t=new P(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(_t.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(_t.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=_t.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let a=0,o=s.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,_t):_t.fromBufferAttribute(s,a),_t.applyMatrix4(e.matrixWorld),this.expandByPoint(_t);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),ur.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),ur.copy(i.boundingBox)),ur.applyMatrix4(e.matrixWorld),this.union(ur)}const r=e.children;for(let s=0,a=r.length;s<a;s++)this.expandByObject(r[s],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,_t),_t.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(gn),cr.subVectors(this.max,gn),Pi.subVectors(e.a,gn),Ri.subVectors(e.b,gn),Di.subVectors(e.c,gn),Jt.subVectors(Ri,Pi),Zt.subVectors(Di,Ri),yi.subVectors(Pi,Di);let t=[0,-Jt.z,Jt.y,0,-Zt.z,Zt.y,0,-yi.z,yi.y,Jt.z,0,-Jt.x,Zt.z,0,-Zt.x,yi.z,0,-yi.x,-Jt.y,Jt.x,0,-Zt.y,Zt.x,0,-yi.y,yi.x,0];return!xs(t,Pi,Ri,Di,cr)||(t=[1,0,0,0,1,0,0,0,1],!xs(t,Pi,Ri,Di,cr))?!1:(dr.crossVectors(Jt,Zt),t=[dr.x,dr.y,dr.z],xs(t,Pi,Ri,Di,cr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,_t).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(_t).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Nt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Nt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Nt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Nt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Nt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Nt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Nt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Nt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Nt),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Nt=[new P,new P,new P,new P,new P,new P,new P,new P],_t=new P,ur=new Un,Pi=new P,Ri=new P,Di=new P,Jt=new P,Zt=new P,yi=new P,gn=new P,cr=new P,dr=new P,vi=new P;function xs(n,e,t,i,r){for(let s=0,a=n.length-3;s<=a;s+=3){vi.fromArray(n,s);const o=r.x*Math.abs(vi.x)+r.y*Math.abs(vi.y)+r.z*Math.abs(vi.z),l=e.dot(vi),u=t.dot(vi),c=i.dot(vi);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>o)return!1}return!0}const Mv=new Un,yn=new P,ws=new P;class Uu{constructor(e=new P,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):Mv.setFromPoints(e).getCenter(i);let r=0;for(let s=0,a=e.length;s<a;s++)r=Math.max(r,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;yn.subVectors(e,this.center);const t=yn.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(yn,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(ws.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(yn.copy(e.center).add(ws)),this.expandByPoint(yn.copy(e.center).sub(ws))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const Vt=new P,_s=new P,hr=new P,Qt=new P,Cs=new P,fr=new P,Ss=new P;class Bv{constructor(e=new P,t=new P(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Vt)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Vt.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Vt.copy(this.origin).addScaledVector(this.direction,t),Vt.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){_s.copy(e).add(t).multiplyScalar(.5),hr.copy(t).sub(e).normalize(),Qt.copy(this.origin).sub(_s);const s=e.distanceTo(t)*.5,a=-this.direction.dot(hr),o=Qt.dot(this.direction),l=-Qt.dot(hr),u=Qt.lengthSq(),c=Math.abs(1-a*a);let d,h,p,m;if(c>0)if(d=a*l-o,h=a*o-l,m=s*c,d>=0)if(h>=-m)if(h<=m){const g=1/c;d*=g,h*=g,p=d*(d+a*h+2*o)+h*(a*d+h+2*l)+u}else h=s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;else h=-s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;else h<=-m?(d=Math.max(0,-(-a*s+o)),h=d>0?-s:Math.min(Math.max(-s,-l),s),p=-d*d+h*(h+2*l)+u):h<=m?(d=0,h=Math.min(Math.max(-s,-l),s),p=h*(h+2*l)+u):(d=Math.max(0,-(a*s+o)),h=d>0?s:Math.min(Math.max(-s,-l),s),p=-d*d+h*(h+2*l)+u);else h=a>0?-s:s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(_s).addScaledVector(hr,h),p}intersectSphere(e,t){Vt.subVectors(e.center,this.origin);const i=Vt.dot(this.direction),r=Vt.dot(Vt)-i*i,s=e.radius*e.radius;if(r>s)return null;const a=Math.sqrt(s-r),o=i-a,l=i+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,a,o,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,h=this.origin;return u>=0?(i=(e.min.x-h.x)*u,r=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,r=(e.min.x-h.x)*u),c>=0?(s=(e.min.y-h.y)*c,a=(e.max.y-h.y)*c):(s=(e.max.y-h.y)*c,a=(e.min.y-h.y)*c),i>a||s>r||((s>i||isNaN(i))&&(i=s),(a<r||isNaN(r))&&(r=a),d>=0?(o=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(o=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),i>l||o>r)||((o>i||i!==i)&&(i=o),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,Vt)!==null}intersectTriangle(e,t,i,r,s){Cs.subVectors(t,e),fr.subVectors(i,e),Ss.crossVectors(Cs,fr);let a=this.direction.dot(Ss),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Qt.subVectors(this.origin,e);const l=o*this.direction.dot(fr.crossVectors(Qt,fr));if(l<0)return null;const u=o*this.direction.dot(Cs.cross(Qt));if(u<0||l+u>a)return null;const c=-o*Qt.dot(Ss);return c<0?null:this.at(c/a,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Et{constructor(e,t,i,r,s,a,o,l,u,c,d,h,p,m,g,y){Et.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,a,o,l,u,c,d,h,p,m,g,y)}set(e,t,i,r,s,a,o,l,u,c,d,h,p,m,g,y){const x=this.elements;return x[0]=e,x[4]=t,x[8]=i,x[12]=r,x[1]=s,x[5]=a,x[9]=o,x[13]=l,x[2]=u,x[6]=c,x[10]=d,x[14]=h,x[3]=p,x[7]=m,x[11]=g,x[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Et().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/$i.setFromMatrixColumn(e,0).length(),s=1/$i.setFromMatrixColumn(e,1).length(),a=1/$i.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(r),u=Math.sin(r),c=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const h=a*c,p=a*d,m=o*c,g=o*d;t[0]=l*c,t[4]=-l*d,t[8]=u,t[1]=p+m*u,t[5]=h-g*u,t[9]=-o*l,t[2]=g-h*u,t[6]=m+p*u,t[10]=a*l}else if(e.order==="YXZ"){const h=l*c,p=l*d,m=u*c,g=u*d;t[0]=h+g*o,t[4]=m*o-p,t[8]=a*u,t[1]=a*d,t[5]=a*c,t[9]=-o,t[2]=p*o-m,t[6]=g+h*o,t[10]=a*l}else if(e.order==="ZXY"){const h=l*c,p=l*d,m=u*c,g=u*d;t[0]=h-g*o,t[4]=-a*d,t[8]=m+p*o,t[1]=p+m*o,t[5]=a*c,t[9]=g-h*o,t[2]=-a*u,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const h=a*c,p=a*d,m=o*c,g=o*d;t[0]=l*c,t[4]=m*u-p,t[8]=h*u+g,t[1]=l*d,t[5]=g*u+h,t[9]=p*u-m,t[2]=-u,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const h=a*l,p=a*u,m=o*l,g=o*u;t[0]=l*c,t[4]=g-h*d,t[8]=m*d+p,t[1]=d,t[5]=a*c,t[9]=-o*c,t[2]=-u*c,t[6]=p*d+m,t[10]=h-g*d}else if(e.order==="XZY"){const h=a*l,p=a*u,m=o*l,g=o*u;t[0]=l*c,t[4]=-d,t[8]=u*c,t[1]=h*d+g,t[5]=a*c,t[9]=p*d-m,t[2]=m*d-p,t[6]=o*c,t[10]=g*d+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(qv,e,kv)}lookAt(e,t,i){const r=this.elements;return st.subVectors(e,t),st.lengthSq()===0&&(st.z=1),st.normalize(),ei.crossVectors(i,st),ei.lengthSq()===0&&(Math.abs(i.z)===1?st.x+=1e-4:st.z+=1e-4,st.normalize(),ei.crossVectors(i,st)),ei.normalize(),pr.crossVectors(st,ei),r[0]=ei.x,r[4]=pr.x,r[8]=st.x,r[1]=ei.y,r[5]=pr.y,r[9]=st.y,r[2]=ei.z,r[6]=pr.z,r[10]=st.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,a=i[0],o=i[4],l=i[8],u=i[12],c=i[1],d=i[5],h=i[9],p=i[13],m=i[2],g=i[6],y=i[10],x=i[14],b=i[3],w=i[7],S=i[11],q=i[15],M=r[0],B=r[4],L=r[8],E=r[12],D=r[1],U=r[5],G=r[9],ee=r[13],te=r[2],ne=r[6],K=r[10],Q=r[14],J=r[3],he=r[7],ae=r[11],ye=r[15];return s[0]=a*M+o*D+l*te+u*J,s[4]=a*B+o*U+l*ne+u*he,s[8]=a*L+o*G+l*K+u*ae,s[12]=a*E+o*ee+l*Q+u*ye,s[1]=c*M+d*D+h*te+p*J,s[5]=c*B+d*U+h*ne+p*he,s[9]=c*L+d*G+h*K+p*ae,s[13]=c*E+d*ee+h*Q+p*ye,s[2]=m*M+g*D+y*te+x*J,s[6]=m*B+g*U+y*ne+x*he,s[10]=m*L+g*G+y*K+x*ae,s[14]=m*E+g*ee+y*Q+x*ye,s[3]=b*M+w*D+S*te+q*J,s[7]=b*B+w*U+S*ne+q*he,s[11]=b*L+w*G+S*K+q*ae,s[15]=b*E+w*ee+S*Q+q*ye,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],a=e[1],o=e[5],l=e[9],u=e[13],c=e[2],d=e[6],h=e[10],p=e[14],m=e[3],g=e[7],y=e[11],x=e[15];return m*(+s*l*d-r*u*d-s*o*h+i*u*h+r*o*p-i*l*p)+g*(+t*l*p-t*u*h+s*a*h-r*a*p+r*u*c-s*l*c)+y*(+t*u*d-t*o*p-s*a*d+i*a*p+s*o*c-i*u*c)+x*(-r*o*c-t*l*d+t*o*h+r*a*d-i*a*h+i*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],p=e[11],m=e[12],g=e[13],y=e[14],x=e[15],b=d*y*u-g*h*u+g*l*p-o*y*p-d*l*x+o*h*x,w=m*h*u-c*y*u-m*l*p+a*y*p+c*l*x-a*h*x,S=c*g*u-m*d*u+m*o*p-a*g*p-c*o*x+a*d*x,q=m*d*l-c*g*l-m*o*h+a*g*h+c*o*y-a*d*y,M=t*b+i*w+r*S+s*q;if(M===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const B=1/M;return e[0]=b*B,e[1]=(g*h*s-d*y*s-g*r*p+i*y*p+d*r*x-i*h*x)*B,e[2]=(o*y*s-g*l*s+g*r*u-i*y*u-o*r*x+i*l*x)*B,e[3]=(d*l*s-o*h*s-d*r*u+i*h*u+o*r*p-i*l*p)*B,e[4]=w*B,e[5]=(c*y*s-m*h*s+m*r*p-t*y*p-c*r*x+t*h*x)*B,e[6]=(m*l*s-a*y*s-m*r*u+t*y*u+a*r*x-t*l*x)*B,e[7]=(a*h*s-c*l*s+c*r*u-t*h*u-a*r*p+t*l*p)*B,e[8]=S*B,e[9]=(m*d*s-c*g*s-m*i*p+t*g*p+c*i*x-t*d*x)*B,e[10]=(a*g*s-m*o*s+m*i*u-t*g*u-a*i*x+t*o*x)*B,e[11]=(c*o*s-a*d*s-c*i*u+t*d*u+a*i*p-t*o*p)*B,e[12]=q*B,e[13]=(c*g*r-m*d*r+m*i*h-t*g*h-c*i*y+t*d*y)*B,e[14]=(m*o*r-a*g*r-m*i*l+t*g*l+a*i*y-t*o*y)*B,e[15]=(a*d*r-c*o*r+c*i*l-t*d*l-a*i*h+t*o*h)*B,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,a=e.x,o=e.y,l=e.z,u=s*a,c=s*o;return this.set(u*a+i,u*o-r*l,u*l+r*o,0,u*o+r*l,c*o+i,c*l-r*a,0,u*l-r*o,c*l+r*a,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,a){return this.set(1,i,s,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,u=s+s,c=a+a,d=o+o,h=s*u,p=s*c,m=s*d,g=a*c,y=a*d,x=o*d,b=l*u,w=l*c,S=l*d,q=i.x,M=i.y,B=i.z;return r[0]=(1-(g+x))*q,r[1]=(p+S)*q,r[2]=(m-w)*q,r[3]=0,r[4]=(p-S)*M,r[5]=(1-(h+x))*M,r[6]=(y+b)*M,r[7]=0,r[8]=(m+w)*B,r[9]=(y-b)*B,r[10]=(1-(h+g))*B,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=$i.set(r[0],r[1],r[2]).length();const a=$i.set(r[4],r[5],r[6]).length(),o=$i.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Ct.copy(this);const u=1/s,c=1/a,d=1/o;return Ct.elements[0]*=u,Ct.elements[1]*=u,Ct.elements[2]*=u,Ct.elements[4]*=c,Ct.elements[5]*=c,Ct.elements[6]*=c,Ct.elements[8]*=d,Ct.elements[9]*=d,Ct.elements[10]*=d,t.setFromRotationMatrix(Ct),i.x=s,i.y=a,i.z=o,this}makePerspective(e,t,i,r,s,a,o=lr,l=!1){const u=this.elements,c=2*s/(t-e),d=2*s/(i-r),h=(t+e)/(t-e),p=(i+r)/(i-r);let m,g;if(l)m=s/(a-s),g=a*s/(a-s);else if(o===lr)m=-(a+s)/(a-s),g=-2*a*s/(a-s);else if(o===$o)m=-a/(a-s),g=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return u[0]=c,u[4]=0,u[8]=h,u[12]=0,u[1]=0,u[5]=d,u[9]=p,u[13]=0,u[2]=0,u[6]=0,u[10]=m,u[14]=g,u[3]=0,u[7]=0,u[11]=-1,u[15]=0,this}makeOrthographic(e,t,i,r,s,a,o=lr,l=!1){const u=this.elements,c=2/(t-e),d=2/(i-r),h=-(t+e)/(t-e),p=-(i+r)/(i-r);let m,g;if(l)m=1/(a-s),g=a/(a-s);else if(o===lr)m=-2/(a-s),g=-(a+s)/(a-s);else if(o===$o)m=-1/(a-s),g=-s/(a-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return u[0]=c,u[4]=0,u[8]=0,u[12]=h,u[1]=0,u[5]=d,u[9]=0,u[13]=p,u[2]=0,u[6]=0,u[10]=m,u[14]=g,u[3]=0,u[7]=0,u[11]=0,u[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const $i=new P,Ct=new Et,qv=new P(0,0,0),kv=new P(1,1,1),ei=new P,pr=new P,st=new P,Go=new Et,Wo=new Nn;class jn{constructor(e=0,t=0,i=0,r=jn.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],a=r[4],o=r[8],l=r[1],u=r[5],c=r[9],d=r[2],h=r[6],p=r[10];switch(t){case"XYZ":this._y=Math.asin(ue(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,u),this._z=0);break;case"YXZ":this._x=Math.asin(-ue(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(ue(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-ue(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(ue(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-ue(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,u),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-c,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return Go.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Go,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Wo.setFromEuler(this),this.setFromQuaternion(Wo,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}jn.DEFAULT_ORDER="XYZ";class Ev{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let Fv=0;const Ko=new P,Li=new Nn,Ut=new Et,mr=new P,vn=new P,Ov=new P,zv=new Nn,Xo=new P(1,0,0),Yo=new P(0,1,0),Jo=new P(0,0,1),Zo={type:"added"},Tv={type:"removed"},Hi={type:"childadded",child:null},As={type:"childremoved",child:null};class Kt extends Qr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Fv++}),this.uuid=Hn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Kt.DEFAULT_UP.clone();const e=new P,t=new jn,i=new Nn,r=new P(1,1,1);function s(){i.setFromEuler(t,!1)}function a(){t.setFromQuaternion(i,void 0,!1)}t._onChange(s),i._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Et},normalMatrix:{value:new di}}),this.matrix=new Et,this.matrixWorld=new Et,this.matrixAutoUpdate=Kt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Ev,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Li.setFromAxisAngle(e,t),this.quaternion.multiply(Li),this}rotateOnWorldAxis(e,t){return Li.setFromAxisAngle(e,t),this.quaternion.premultiply(Li),this}rotateX(e){return this.rotateOnAxis(Xo,e)}rotateY(e){return this.rotateOnAxis(Yo,e)}rotateZ(e){return this.rotateOnAxis(Jo,e)}translateOnAxis(e,t){return Ko.copy(e).applyQuaternion(this.quaternion),this.position.add(Ko.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Xo,e)}translateY(e){return this.translateOnAxis(Yo,e)}translateZ(e){return this.translateOnAxis(Jo,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Ut.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?mr.copy(e):mr.set(e,t,i);const r=this.parent;this.updateWorldMatrix(!0,!1),vn.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ut.lookAt(vn,mr,this.up):Ut.lookAt(mr,vn,this.up),this.quaternion.setFromRotationMatrix(Ut),r&&(Ut.extractRotation(r.matrixWorld),Li.setFromRotationMatrix(Ut),this.quaternion.premultiply(Li.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Zo),Hi.child=e,this.dispatchEvent(Hi),Hi.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Tv),As.child=e,this.dispatchEvent(As),As.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Ut.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Ut.multiply(e.parent.matrixWorld)),e.applyMatrix4(Ut),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Zo),Hi.child=e,this.dispatchEvent(Hi),Hi.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let i=0,r=this.children.length;i<r;i++){const a=this.children[i].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const r=this.children;for(let s=0,a=r.length;s<a;s++)r[s].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(vn,e,Ov),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(vn,zv,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const r=this.children;for(let s=0,a=r.length;s<a;s++)r[s].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(o=>({...o})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const d=l[u];s(e.shapes,d)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let l=0,u=this.material.length;l<u;l++)o.push(s(e.materials,this.material[l]));r.material=o}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let o=0;o<this.children.length;o++)r.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];r.animations.push(s(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),u=a(e.textures),c=a(e.images),d=a(e.shapes),h=a(e.skeletons),p=a(e.animations),m=a(e.nodes);o.length>0&&(i.geometries=o),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),c.length>0&&(i.images=c),d.length>0&&(i.shapes=d),h.length>0&&(i.skeletons=h),p.length>0&&(i.animations=p),m.length>0&&(i.nodes=m)}return i.object=r,i;function a(o){const l=[];for(const u in o){const c=o[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}Kt.DEFAULT_UP=new P(0,1,0);Kt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const St=new P,jt=new P,Ms=new P,Gt=new P,Ni=new P,Vi=new P,Qo=new P,Bs=new P,qs=new P,ks=new P,Es=new Vn,Fs=new Vn,Os=new Vn;class Bt{constructor(e=new P,t=new P,i=new P){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),St.subVectors(e,t),r.cross(St);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){St.subVectors(r,t),jt.subVectors(i,t),Ms.subVectors(e,t);const a=St.dot(St),o=St.dot(jt),l=St.dot(Ms),u=jt.dot(jt),c=jt.dot(Ms),d=a*u-o*o;if(d===0)return s.set(0,0,0),null;const h=1/d,p=(u*l-o*c)*h,m=(a*c-o*l)*h;return s.set(1-p-m,m,p)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Gt)===null?!1:Gt.x>=0&&Gt.y>=0&&Gt.x+Gt.y<=1}static getInterpolation(e,t,i,r,s,a,o,l){return this.getBarycoord(e,t,i,r,Gt)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Gt.x),l.addScaledVector(a,Gt.y),l.addScaledVector(o,Gt.z),l)}static getInterpolatedAttribute(e,t,i,r,s,a){return Es.setScalar(0),Fs.setScalar(0),Os.setScalar(0),Es.fromBufferAttribute(e,t),Fs.fromBufferAttribute(e,i),Os.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(Es,s.x),a.addScaledVector(Fs,s.y),a.addScaledVector(Os,s.z),a}static isFrontFacing(e,t,i,r){return St.subVectors(i,t),jt.subVectors(e,t),St.cross(jt).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return St.subVectors(this.c,this.b),jt.subVectors(this.a,this.b),St.cross(jt).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Bt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Bt.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return Bt.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Bt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Bt.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let a,o;Ni.subVectors(r,i),Vi.subVectors(s,i),Bs.subVectors(e,i);const l=Ni.dot(Bs),u=Vi.dot(Bs);if(l<=0&&u<=0)return t.copy(i);qs.subVectors(e,r);const c=Ni.dot(qs),d=Vi.dot(qs);if(c>=0&&d<=c)return t.copy(r);const h=l*d-c*u;if(h<=0&&l>=0&&c<=0)return a=l/(l-c),t.copy(i).addScaledVector(Ni,a);ks.subVectors(e,s);const p=Ni.dot(ks),m=Vi.dot(ks);if(m>=0&&p<=m)return t.copy(s);const g=p*u-l*m;if(g<=0&&u>=0&&m<=0)return o=u/(u-m),t.copy(i).addScaledVector(Vi,o);const y=c*m-p*d;if(y<=0&&d-c>=0&&p-m>=0)return Qo.subVectors(s,r),o=(d-c)/(d-c+(p-m)),t.copy(r).addScaledVector(Qo,o);const x=1/(y+g+h);return a=g*x,o=h*x,t.copy(i).addScaledVector(Ni,a).addScaledVector(Vi,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const ju={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ti={h:0,s:0,l:0},gr={h:0,s:0,l:0};function zs(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Gn{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=At){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,wt.colorSpaceToWorking(this,t),this}setRGB(e,t,i,r=wt.workingColorSpace){return this.r=e,this.g=t,this.b=i,wt.colorSpaceToWorking(this,r),this}setHSL(e,t,i,r=wt.workingColorSpace){if(e=bv(e,1),t=ue(t,0,1),i=ue(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,a=2*i-s;this.r=zs(a,s,e+1/3),this.g=zs(a,s,e),this.b=zs(a,s,e-1/3)}return wt.colorSpaceToWorking(this,r),this}setStyle(e,t=At){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=r[1],o=r[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=At){const i=ju[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Wt(e.r),this.g=Wt(e.g),this.b=Wt(e.b),this}copyLinearToSRGB(e){return this.r=Zi(e.r),this.g=Zi(e.g),this.b=Zi(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=At){return wt.workingToColorSpace(Ke.copy(this),e),Math.round(ue(Ke.r*255,0,255))*65536+Math.round(ue(Ke.g*255,0,255))*256+Math.round(ue(Ke.b*255,0,255))}getHexString(e=At){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=wt.workingColorSpace){wt.workingToColorSpace(Ke.copy(this),t);const i=Ke.r,r=Ke.g,s=Ke.b,a=Math.max(i,r,s),o=Math.min(i,r,s);let l,u;const c=(o+a)/2;if(o===a)l=0,u=0;else{const d=a-o;switch(u=c<=.5?d/(a+o):d/(2-a-o),a){case i:l=(r-s)/d+(r<s?6:0);break;case r:l=(s-i)/d+2;break;case s:l=(i-r)/d+4;break}l/=6}return e.h=l,e.s=u,e.l=c,e}getRGB(e,t=wt.workingColorSpace){return wt.workingToColorSpace(Ke.copy(this),t),e.r=Ke.r,e.g=Ke.g,e.b=Ke.b,e}getStyle(e=At){wt.workingToColorSpace(Ke.copy(this),e);const t=Ke.r,i=Ke.g,r=Ke.b;return e!==At?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(ti),this.setHSL(ti.h+e,ti.s+t,ti.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(ti),e.getHSL(gr);const i=ms(ti.h,gr.h,t),r=ms(ti.s,gr.s,t),s=ms(ti.l,gr.l,t);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*t+s[3]*i+s[6]*r,this.g=s[1]*t+s[4]*i+s[7]*r,this.b=s[2]*t+s[5]*i+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ke=new Gn;Gn.NAMES=ju;let Iv=0;class Pv extends Qr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Iv++}),this.uuid=Hn(),this.name="",this.type="Material",this.blending=qo,this.side=ia,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Eo,this.blendDst=Fo,this.blendEquation=ko,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Gn(0,0,0),this.blendAlpha=0,this.depthFunc=Oo,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Ro,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ti,this.stencilZFail=Ti,this.stencilZPass=Ti,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==qo&&(i.blending=this.blending),this.side!==ia&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Eo&&(i.blendSrc=this.blendSrc),this.blendDst!==Fo&&(i.blendDst=this.blendDst),this.blendEquation!==ko&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Oo&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Ro&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ti&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Ti&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Ti&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=r(e.textures),a=r(e.images);s.length>0&&(i.textures=s),a.length>0&&(i.images=a)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Gu extends Pv{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new jn,this.combine=fv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Ee=new P,yr=new kt;let Rv=0;class Qi{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:Rv++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Do,this.updateRanges=[],this.gpuType=yv,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)yr.fromBufferAttribute(this,t),yr.applyMatrix3(e),this.setXY(t,yr.x,yr.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Ee.fromBufferAttribute(this,t),Ee.applyMatrix3(e),this.setXYZ(t,Ee.x,Ee.y,Ee.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Ee.fromBufferAttribute(this,t),Ee.applyMatrix4(e),this.setXYZ(t,Ee.x,Ee.y,Ee.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Ee.fromBufferAttribute(this,t),Ee.applyNormalMatrix(e),this.setXYZ(t,Ee.x,Ee.y,Ee.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Ee.fromBufferAttribute(this,t),Ee.transformDirection(e),this.setXYZ(t,Ee.x,Ee.y,Ee.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=mn(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=et(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=mn(t,this.array)),t}setX(e,t){return this.normalized&&(t=et(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=mn(t,this.array)),t}setY(e,t){return this.normalized&&(t=et(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=mn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=et(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=mn(t,this.array)),t}setW(e,t){return this.normalized&&(t=et(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=et(t,this.array),i=et(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=et(t,this.array),i=et(i,this.array),r=et(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,s){return e*=this.itemSize,this.normalized&&(t=et(t,this.array),i=et(i,this.array),r=et(r,this.array),s=et(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Do&&(e.usage=this.usage),e}}class Dv extends Qi{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class $v extends Qi{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class Lv extends Qi{constructor(e,t,i){super(new Float32Array(e),t,i)}}let Hv=0;const dt=new Et,Ts=new Kt,Ui=new P,at=new Un,bn=new Un,$e=new P;class Ra extends Qr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Hv++}),this.uuid=Hn(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(xv(e)?$v:Dv)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new di().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return dt.makeRotationFromQuaternion(e),this.applyMatrix4(dt),this}rotateX(e){return dt.makeRotationX(e),this.applyMatrix4(dt),this}rotateY(e){return dt.makeRotationY(e),this.applyMatrix4(dt),this}rotateZ(e){return dt.makeRotationZ(e),this.applyMatrix4(dt),this}translate(e,t,i){return dt.makeTranslation(e,t,i),this.applyMatrix4(dt),this}scale(e,t,i){return dt.makeScale(e,t,i),this.applyMatrix4(dt),this}lookAt(e){return Ts.lookAt(e),Ts.updateMatrix(),this.applyMatrix4(Ts.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ui).negate(),this.translate(Ui.x,Ui.y,Ui.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const i=[];for(let r=0,s=e.length;r<s;r++){const a=e[r];i.push(a.x,a.y,a.z||0)}this.setAttribute("position",new Lv(i,3))}else{const i=Math.min(e.length,t.count);for(let r=0;r<i;r++){const s=e[r];t.setXYZ(r,s.x,s.y,s.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Un);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new P(-1/0,-1/0,-1/0),new P(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){const s=t[i];at.setFromBufferAttribute(s),this.morphTargetsRelative?($e.addVectors(this.boundingBox.min,at.min),this.boundingBox.expandByPoint($e),$e.addVectors(this.boundingBox.max,at.max),this.boundingBox.expandByPoint($e)):(this.boundingBox.expandByPoint(at.min),this.boundingBox.expandByPoint(at.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Uu);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new P,1/0);return}if(e){const i=this.boundingSphere.center;if(at.setFromBufferAttribute(e),t)for(let s=0,a=t.length;s<a;s++){const o=t[s];bn.setFromBufferAttribute(o),this.morphTargetsRelative?($e.addVectors(at.min,bn.min),at.expandByPoint($e),$e.addVectors(at.max,bn.max),at.expandByPoint($e)):(at.expandByPoint(bn.min),at.expandByPoint(bn.max))}at.getCenter(i);let r=0;for(let s=0,a=e.count;s<a;s++)$e.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared($e));if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s],l=this.morphTargetsRelative;for(let u=0,c=o.count;u<c;u++)$e.fromBufferAttribute(o,u),l&&(Ui.fromBufferAttribute(e,u),$e.add(Ui)),r=Math.max(r,i.distanceToSquared($e))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=t.position,r=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Qi(new Float32Array(4*i.count),4));const a=this.getAttribute("tangent"),o=[],l=[];for(let L=0;L<i.count;L++)o[L]=new P,l[L]=new P;const u=new P,c=new P,d=new P,h=new kt,p=new kt,m=new kt,g=new P,y=new P;function x(L,E,D){u.fromBufferAttribute(i,L),c.fromBufferAttribute(i,E),d.fromBufferAttribute(i,D),h.fromBufferAttribute(s,L),p.fromBufferAttribute(s,E),m.fromBufferAttribute(s,D),c.sub(u),d.sub(u),p.sub(h),m.sub(h);const U=1/(p.x*m.y-m.x*p.y);isFinite(U)&&(g.copy(c).multiplyScalar(m.y).addScaledVector(d,-p.y).multiplyScalar(U),y.copy(d).multiplyScalar(p.x).addScaledVector(c,-m.x).multiplyScalar(U),o[L].add(g),o[E].add(g),o[D].add(g),l[L].add(y),l[E].add(y),l[D].add(y))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let L=0,E=b.length;L<E;++L){const D=b[L],U=D.start,G=D.count;for(let ee=U,te=U+G;ee<te;ee+=3)x(e.getX(ee+0),e.getX(ee+1),e.getX(ee+2))}const w=new P,S=new P,q=new P,M=new P;function B(L){q.fromBufferAttribute(r,L),M.copy(q);const E=o[L];w.copy(E),w.sub(q.multiplyScalar(q.dot(E))).normalize(),S.crossVectors(M,E);const U=S.dot(l[L])<0?-1:1;a.setXYZW(L,w.x,w.y,w.z,U)}for(let L=0,E=b.length;L<E;++L){const D=b[L],U=D.start,G=D.count;for(let ee=U,te=U+G;ee<te;ee+=3)B(e.getX(ee+0)),B(e.getX(ee+1)),B(e.getX(ee+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Qi(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let h=0,p=i.count;h<p;h++)i.setXYZ(h,0,0,0);const r=new P,s=new P,a=new P,o=new P,l=new P,u=new P,c=new P,d=new P;if(e)for(let h=0,p=e.count;h<p;h+=3){const m=e.getX(h+0),g=e.getX(h+1),y=e.getX(h+2);r.fromBufferAttribute(t,m),s.fromBufferAttribute(t,g),a.fromBufferAttribute(t,y),c.subVectors(a,s),d.subVectors(r,s),c.cross(d),o.fromBufferAttribute(i,m),l.fromBufferAttribute(i,g),u.fromBufferAttribute(i,y),o.add(c),l.add(c),u.add(c),i.setXYZ(m,o.x,o.y,o.z),i.setXYZ(g,l.x,l.y,l.z),i.setXYZ(y,u.x,u.y,u.z)}else for(let h=0,p=t.count;h<p;h+=3)r.fromBufferAttribute(t,h+0),s.fromBufferAttribute(t,h+1),a.fromBufferAttribute(t,h+2),c.subVectors(a,s),d.subVectors(r,s),c.cross(d),i.setXYZ(h+0,c.x,c.y,c.z),i.setXYZ(h+1,c.x,c.y,c.z),i.setXYZ(h+2,c.x,c.y,c.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)$e.fromBufferAttribute(e,t),$e.normalize(),e.setXYZ(t,$e.x,$e.y,$e.z)}toNonIndexed(){function e(o,l){const u=o.array,c=o.itemSize,d=o.normalized,h=new u.constructor(l.length*c);let p=0,m=0;for(let g=0,y=l.length;g<y;g++){o.isInterleavedBufferAttribute?p=l[g]*o.data.stride+o.offset:p=l[g]*c;for(let x=0;x<c;x++)h[m++]=u[p++]}return new Qi(h,c,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Ra,i=this.index.array,r=this.attributes;for(const o in r){const l=r[o],u=e(l,i);t.setAttribute(o,u)}const s=this.morphAttributes;for(const o in s){const l=[],u=s[o];for(let c=0,d=u.length;c<d;c++){const h=u[c],p=e(h,i);l.push(p)}t.morphAttributes[o]=l}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,l=a.length;o<l;o++){const u=a[o];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,h=u.length;d<h;d++){const p=u[d];c.push(p.toJSON(e.data))}c.length>0&&(r[l]=c,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const r=e.attributes;for(const u in r){const c=r[u];this.setAttribute(u,c.clone(t))}const s=e.morphAttributes;for(const u in s){const c=[],d=s[u];for(let h=0,p=d.length;h<p;h++)c.push(d[h].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let u=0,c=a.length;u<c;u++){const d=a[u];this.addGroup(d.start,d.count,d.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const el=new Et,bi=new Bv,vr=new Uu,tl=new P,br=new P,xr=new P,wr=new P,Is=new P,_r=new P,il=new P,Cr=new P;class Nv extends Kt{constructor(e=new Ra,t=new Gu){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=r.length;s<a;s++){const o=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}getVertexPosition(e,t){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,a=i.morphTargetsRelative;t.fromBufferAttribute(r,e);const o=this.morphTargetInfluences;if(s&&o){_r.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const c=o[l],d=s[l];c!==0&&(Is.fromBufferAttribute(d,e),a?_r.addScaledVector(Is,c):_r.addScaledVector(Is.sub(t),c))}t.add(_r)}return t}raycast(e,t){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),vr.copy(i.boundingSphere),vr.applyMatrix4(s),bi.copy(e.ray).recast(e.near),!(vr.containsPoint(bi.origin)===!1&&(bi.intersectSphere(vr,tl)===null||bi.origin.distanceToSquared(tl)>(e.far-e.near)**2))&&(el.copy(s).invert(),bi.copy(e.ray).applyMatrix4(el),!(i.boundingBox!==null&&bi.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,bi)))}_computeIntersections(e,t,i){let r;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,u=s.attributes.uv,c=s.attributes.uv1,d=s.attributes.normal,h=s.groups,p=s.drawRange;if(o!==null)if(Array.isArray(a))for(let m=0,g=h.length;m<g;m++){const y=h[m],x=a[y.materialIndex],b=Math.max(y.start,p.start),w=Math.min(o.count,Math.min(y.start+y.count,p.start+p.count));for(let S=b,q=w;S<q;S+=3){const M=o.getX(S),B=o.getX(S+1),L=o.getX(S+2);r=Sr(this,x,e,i,u,c,d,M,B,L),r&&(r.faceIndex=Math.floor(S/3),r.face.materialIndex=y.materialIndex,t.push(r))}}else{const m=Math.max(0,p.start),g=Math.min(o.count,p.start+p.count);for(let y=m,x=g;y<x;y+=3){const b=o.getX(y),w=o.getX(y+1),S=o.getX(y+2);r=Sr(this,a,e,i,u,c,d,b,w,S),r&&(r.faceIndex=Math.floor(y/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(a))for(let m=0,g=h.length;m<g;m++){const y=h[m],x=a[y.materialIndex],b=Math.max(y.start,p.start),w=Math.min(l.count,Math.min(y.start+y.count,p.start+p.count));for(let S=b,q=w;S<q;S+=3){const M=S,B=S+1,L=S+2;r=Sr(this,x,e,i,u,c,d,M,B,L),r&&(r.faceIndex=Math.floor(S/3),r.face.materialIndex=y.materialIndex,t.push(r))}}else{const m=Math.max(0,p.start),g=Math.min(l.count,p.start+p.count);for(let y=m,x=g;y<x;y+=3){const b=y,w=y+1,S=y+2;r=Sr(this,a,e,i,u,c,d,b,w,S),r&&(r.faceIndex=Math.floor(y/3),t.push(r))}}}}function Vv(n,e,t,i,r,s,a,o){let l;if(e.side===dv?l=i.intersectTriangle(a,s,r,!0,o):l=i.intersectTriangle(r,s,a,e.side===ia,o),l===null)return null;Cr.copy(o),Cr.applyMatrix4(n.matrixWorld);const u=t.ray.origin.distanceTo(Cr);return u<t.near||u>t.far?null:{distance:u,point:Cr.clone(),object:n}}function Sr(n,e,t,i,r,s,a,o,l,u){n.getVertexPosition(o,br),n.getVertexPosition(l,xr),n.getVertexPosition(u,wr);const c=Vv(n,e,t,i,br,xr,wr,il);if(c){const d=new P;Bt.getBarycoord(il,br,xr,wr,d),r&&(c.uv=Bt.getInterpolatedAttribute(r,o,l,u,d,new kt)),s&&(c.uv1=Bt.getInterpolatedAttribute(s,o,l,u,d,new kt)),a&&(c.normal=Bt.getInterpolatedAttribute(a,o,l,u,d,new P),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const h={a:o,b:l,c:u,normal:new P,materialIndex:0};Bt.getNormal(br,xr,wr,h.normal),c.face=h,c.barycoord=d}return c}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Hu}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Hu);class Uv extends Nv{type="HighlightMesh";createTime;constructor(...e){super(...e),this.createTime=Date.now()}onBeforeRender(){const t=(Date.now()-this.createTime)/1e3,s=1+.07*Math.sin(2.5*t);this.scale.set(s,s,s)}}const Wu={scene:"i-carbon-web-services-container",perspectivecamera:"i-carbon-video",mesh:"i-carbon-cube",group:"i-carbon-group-objects",ambientlight:"i-carbon-light",directionallight:"i-carbon-light",spotlight:"i-iconoir-project-curve-3d",position:"i-iconoir-axes",rotation:"i-carbon-rotate-clockwise",scale:"i-iconoir-ellipse-3d-three-points",bone:"i-ph-bone",skinnedmesh:"carbon:3d-print-mesh"};function nl(n){return{name:n.name,value:n,key:n.uuid,label:n.type,type:n.type,icon:Wu[n.type.toLowerCase()]||"i-carbon-cube",defaultExpanded:n.isScene,memorySize:Math.round(uv(n)/1024),children:[]}}function jv(n){function e(i,r){i.children.forEach(s=>{if(s.type==="HighlightMesh")return;const a=nl(s);r.children.push(a),e(s,a)})}const t=nl(n);return e(n,t),t}function Gi(n,e="root",t="root",i=new WeakSet){const r=typeof n;if(n===null||r!=="object")return{label:e,type:r,path:t,value:n,defaultExpanded:t==="root"};if(i.has(n))return{label:e,type:"circular",path:t,value:"[Circular]",defaultExpanded:t==="root"};if(i.add(n),Array.isArray(n))return{label:e,type:"array",path:t,value:`Array[${n.length}]`,defaultExpanded:t==="root",children:n.map((o,l)=>Gi(o,String(l),`${t}[${l}]`,i))};const s=[],a=n.constructor?.name||"Object";if(a==="_Euler"){const o=n,l=["x","y","z","order"];for(const u of l){const c=o[u],d=t==="root"?u:`${t}.${u}`;s.push(Gi(c,u,d,i))}}else if(a==="Quaternion"){const o=n,l=["x","y","z","w"];for(const u of l){const c=o[u],d=t==="root"?u:`${t}.${u}`;s.push(Gi(c,u,d,i))}}else if(a==="_Vector3"){const o=n,l=["x","y","z"];for(const u of l){const c=o[u],d=t==="root"?u:`${t}.${u}`;s.push(Gi(c,u,d,i))}}else for(const o of Object.keys(n)){if(o.startsWith("_")||o.startsWith("$")||o==="__v_isRef"||o==="__v_isReactive"||o==="__v_isShallow"||o==="__v_raw"||o==="__v_isReadonly")continue;const l=n[o];if(typeof l=="function")continue;const u=t==="root"?o:`${t}.${o}`;s.push(Gi(l,o,u,i))}return{label:e,type:"object",path:t,value:a==="Euler"?"Euler":a==="Quaternion"?"Quaternion":a==="Vector3"?"Vector3":a,defaultExpanded:t==="root",children:s}}function Gv(n){const e=new Gu({color:11003607,transparent:!0,opacity:.2,depthTest:!1,side:hv});return new Uv(n.geometry.clone(),e)}const Wv={key:1,class:"w-3 h-3 rounded-full border border-gray-300 dark:border-gray-600",style:{background:"linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)"}},Kv={key:2,class:"w-3 h-3 rounded-full border border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700"},Xv=z({__name:"MaterialBadge",props:{material:{},displayValue:{}},setup(n){function e(s){return s!==null&&typeof s=="object"&&s.constructor?.name?.includes("Material")}function t(s){if(!s||typeof s!="object")return null;if("color"in s&&s.color&&typeof s.color=="object"){const a=s.color;if("getHexString"in a&&typeof a.getHexString=="function")return`#${a.getHexString()}`}return null}function i(s){return s!==null&&typeof s=="object"&&(s.constructor?.name==="MeshNormalMaterial"||s.constructor?.name==="MeshStandardMaterial"||s.constructor?.name==="MeshBasicMaterial")}function r(s){return typeof s=="boolean"?"text-blue-500":typeof s=="number"?"text-primary-500":typeof s=="string"?"text-red-500":typeof s>"u"?"text-gray-400":"text-gray-600"}return(s,a)=>{const o=ci;return e(n.material)?(v(),C(o,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:_(()=>[t(n.material)?(v(),V("div",{key:0,class:"w-3 h-3 rounded-full border border-gray-300 dark:border-gray-600",style:qt({backgroundColor:t(n.material)})},null,4)):i(n.material)?(v(),V("div",Wv)):(v(),V("div",Kv)),I("span",{class:T(r(n.material))},Z(n.displayValue),3)]),_:1})):R("",!0)}}}),Yv=Object.assign(Xv,{__name:"InspectorMaterialBadge"}),Jv=z({__name:"GeometryBadge",props:{geometry:{},displayValue:{}},setup(n){const e={box:"i-carbon-cube",sphere:"i-tabler-circle",plane:"i-tabler-square",cylinder:"i-tabler-cylinder",cone:"i-tabler-cone",torus:"i-tabler-circle-dashed",circle:"i-tabler-circle-filled",ring:"i-tabler-circle",dodecahedron:"i-carbon-polygon",icosahedron:"i-carbon-polygon",octahedron:"i-carbon-polygon",tetrahedron:"i-carbon-polygon",tube:"i-tabler-pipe",extrude:"i-tabler-box",lathe:"i-tabler-rotate-3d"};function t(s){return s!==null&&typeof s=="object"&&s.constructor?.name?.includes("Geometry")}function i(s){if(!s||typeof s!="object")return"i-carbon-cube";const o=(s.constructor?.name?.toLowerCase()||"").replace(/geometry$/,"").replace(/^_+/,"");return e[o]||"i-carbon-cube"}function r(s){return typeof s=="boolean"?"text-blue-500":typeof s=="number"?"text-primary-500":typeof s=="string"?"text-red-500":typeof s>"u"?"text-gray-400":"text-gray-600"}return(s,a)=>{const o=Pe,l=ci;return t(n.geometry)?(v(),C(l,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:_(()=>[F(o,{name:i(n.geometry),class:"w-3 h-3 text-gray-600"},null,8,["name"]),I("span",{class:T(r(n.geometry))},Z(n.displayValue),3)]),_:1})):R("",!0)}}}),Zv=Object.assign(Jv,{__name:"InspectorGeometryBadge"}),Qv={class:"text-sm text-gray-500 pt-2 pb-8"},eb={class:"flex items-center gap-1 py-0.5 mb-4 hover:bg-gray-50 group"},tb={class:"text-gray-600 font-semibold"},ib={class:"pl-5 flex flex-col gap-1"},nb={class:"flex items-center gap-1 min-w-0"},rb={key:0,class:"flex items-center gap-1 ml-1"},sb=z({__name:"Props",props:{object:{}},emits:["update-value"],setup(n,{emit:e}){const t=e,i=n,r=k(()=>Wu[i.object.type.toLowerCase()]||"i-carbon-cube"),s={PerspectiveCamera:["fov","position","rotation","far","near","aspect"],OrthographicCamera:["position","rotation","left","right","top","bottom","near","far"],DirectionalLight:["color","intensity","position"],PointLight:["color","intensity","position","distance","decay"],SpotLight:["color","intensity","position","target","angle","penumbra"],AmbientLight:["color","intensity"],Mesh:["position","rotation","scale","material","geometry","visible"],SkinnedMesh:["position","rotation","scale","material","geometry","skeleton"],Group:["position","rotation","scale","visible"],Object3D:["position","rotation","scale","visible"],Scene:["background","environment","fog"]};function a(m,g){return g&&typeof g=="object"&&"r"in g&&"g"in g&&"b"in g&&"getHexString"in g?`#${g.getHexString()}`:g}const o=k(()=>{const m=i.object.type;return(s[m]||["position","rotation","scale"]).map(y=>{const x=l(i.object,y);return{key:y,value:a(y,x),displayValue:u(y,x)}}).filter(y=>y.value!==void 0)});function l(m,g){return g.split(".").reduce((y,x)=>y&&typeof y=="object"&&x in y?y[x]:void 0,m)}function u(m,g){return g==null?"undefined":c(g)?"vector":d(g)?g.constructor?.name||"Material":h(g)?(g.constructor?.name||"Geometry").replace(/Geometry$/,"").replace(/^_+/,""):g&&typeof g=="object"&&"r"in g&&"g"in g&&"b"in g&&"getHexString"in g?`#${g.getHexString()}`:typeof g=="number"?Number.isInteger(g)?g.toString():g.toFixed(2):typeof g=="boolean"?g?"true":"false":typeof g=="object"?g.constructor?.name||"Object":String(g)}function c(m){return m!==null&&typeof m=="object"&&"x"in m&&"y"in m&&"z"in m&&typeof m.x=="number"&&typeof m.y=="number"&&typeof m.z=="number"}function d(m){return m!==null&&typeof m=="object"&&m.constructor?.name?.includes("Material")}function h(m){return m!==null&&typeof m=="object"&&m.constructor?.name?.includes("Geometry")}function p(m){return typeof m=="boolean"?"text-blue-500":typeof m=="number"?"text-green-500":typeof m=="string"?"text-red-500":typeof m>"u"?"text-gray-400":"text-gray-600"}return(m,g)=>{const y=Pe,x=ci,b=My,w=lt,S=rv,q=Iu;return v(),V("div",Qv,[I("div",eb,[F(y,{name:r.value,class:"w-4 h-4 text-gray-600 flex-shrink-0"},null,8,["name"]),I("span",tb,Z(n.object.type),1),n.object.name?(v(),C(x,{key:0,variant:"soft",size:"xs",class:"ml-2"},{default:_(()=>[ce(Z(n.object.name),1)]),_:1})):R("",!0)]),I("div",ib,[(v(!0),V(we,null,Xe(o.value,M=>(v(),V("div",{key:M.key,class:"flex items-center justify-between py-0.5 hover:bg-gray-50 group"},[I("div",nb,[I("span",null,Z(M.key)+" :",1),c(M.value)?(v(),V("div",rb,[F(b,{modelValue:M.value.x,"onUpdate:modelValue":[B=>M.value.x=B,B=>t("update-value",M.key+".x",B)]},null,8,["modelValue","onUpdate:modelValue"]),F(b,{modelValue:M.value.y,"onUpdate:modelValue":[B=>M.value.y=B,B=>t("update-value",M.key+".y",B)]},null,8,["modelValue","onUpdate:modelValue"]),F(b,{modelValue:M.value.z,"onUpdate:modelValue":[B=>M.value.z=B,B=>t("update-value",M.key+".z",B)]},null,8,["modelValue","onUpdate:modelValue"])])):d(M.value)?(v(),C(Yv,{key:1,material:M.value,"display-value":M.displayValue},null,8,["material","display-value"])):h(M.value)?(v(),C(Zv,{key:2,geometry:M.value,"display-value":M.displayValue},null,8,["geometry","display-value"])):M.key==="visible"?(v(),C(w,{key:3,size:"xs",class:"ml-1 mr-1",variant:"soft",icon:M.value?"i-lucide-eye":"i-lucide-eye-closed",onClick:()=>t("update-value",M.key,!M.value)},null,8,["icon","onClick"])):M.key==="color"?(v(),C(S,{key:4,modelValue:M.value,"onUpdate:modelValue":[B=>M.value=B,B=>t("update-value",M.key,B)]},null,8,["modelValue","onUpdate:modelValue"])):typeof M.value=="number"?(v(),C(b,{key:5,modelValue:M.value,"onUpdate:modelValue":[B=>M.value=B,B=>t("update-value",M.key,B)],class:"ml-1"},null,8,["modelValue","onUpdate:modelValue"])):(v(),V("span",{key:6,class:T([p(M.value),"ml-1"])},Z(M.displayValue),3))]),I("div",{class:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",onClick:g[0]||(g[0]=fe(()=>{},["stop"]))},[F(q,{size:"xs",items:[{label:"Copy Value",icon:"i-lucide:copy",onSelect:()=>f(Ru)(M.value)},M.displayValue==="vector"&&{label:"Copy as prop",icon:"i-material-symbols:data-array",onSelect:()=>f(Pu)({path:M.key,value:Object.values(M.value)})},M.displayValue==="vector"&&M.key==="rotation"&&{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>f($u)({children:[{label:"x",value:M.value.x},{label:"y",value:M.value.y},{label:"z",value:M.value.z},{label:"order",value:M.value.order||"XYZ"}]})},M.displayValue==="vector"&&M.key!=="rotation"&&{label:"Copy as Vector3",icon:"i-lucide:pen-line",onSelect:()=>f(Du)({children:Object.values(M.value).map(B=>({value:B}))})},M.displayValue==="vector"&&M.key==="quaternion"&&{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>f(Lu)({children:[{label:"x",value:M.value.x},{label:"y",value:M.value.y},{label:"z",value:M.value.z},{label:"w",value:M.value.w||1}]})}].filter(Boolean),ui:{content:"w-48"}},{default:_(()=>[F(w,{size:"xs",variant:"ghost",color:"gray",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])])]))),128))])])}}}),ab=Object.assign(sb,{__name:"InspectorProps"}),ob={slots:{root:"flex items-center align-center text-center",border:"",container:"font-medium text-default flex",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xs",label:"text-sm"},variants:{color:{primary:{border:"border-primary"},secondary:{border:"border-secondary"},success:{border:"border-success"},info:{border:"border-info"},warning:{border:"border-warning"},error:{border:"border-error"},neutral:{border:"border-default"}},orientation:{horizontal:{root:"w-full flex-row",border:"w-full",container:"mx-3 whitespace-nowrap"},vertical:{root:"h-full flex-col",border:"h-full",container:"my-2"}},size:{xs:"",sm:"",md:"",lg:"",xl:""},type:{solid:{border:"border-solid"},dashed:{border:"border-dashed"},dotted:{border:"border-dotted"}}},compoundVariants:[{orientation:"horizontal",size:"xs",class:{border:"border-t"}},{orientation:"horizontal",size:"sm",class:{border:"border-t-[2px]"}},{orientation:"horizontal",size:"md",class:{border:"border-t-[3px]"}},{orientation:"horizontal",size:"lg",class:{border:"border-t-[4px]"}},{orientation:"horizontal",size:"xl",class:{border:"border-t-[5px]"}},{orientation:"vertical",size:"xs",class:{border:"border-s"}},{orientation:"vertical",size:"sm",class:{border:"border-s-[2px]"}},{orientation:"vertical",size:"md",class:{border:"border-s-[3px]"}},{orientation:"vertical",size:"lg",class:{border:"border-s-[4px]"}},{orientation:"vertical",size:"xl",class:{border:"border-s-[5px]"}}],defaultVariants:{color:"neutral",size:"xs",type:"solid"}},lb={__name:"USeparator",props:{as:{type:null,required:!1},label:{type:String,required:!1},icon:{type:String,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},type:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},class:{type:null,required:!1},ui:{type:null,required:!1},decorative:{type:Boolean,required:!1}},setup(n){const e=n,t=Ge(),i=Te(),r=zn(Ft(e,"as","decorative","orientation")),s=k(()=>de({extend:de(ob),...i.ui?.separator||{}})({color:e.color,orientation:e.orientation,size:e.size,type:e.type}));return(a,o)=>(v(),C(f(jm),H(f(r),{class:s.value.root({class:[e.ui?.root,e.class]})}),{default:_(()=>[I("div",{class:T(s.value.border({class:e.ui?.border}))},null,2),n.label||n.icon||n.avatar||t.default?(v(),V(we,{key:0},[I("div",{class:T(s.value.container({class:e.ui?.container}))},[A(a.$slots,"default",{},()=>[n.label?(v(),V("span",{key:0,class:T(s.value.label({class:e.ui?.label}))},Z(n.label),3)):n.icon?(v(),C(Pe,{key:1,name:n.icon,class:T(s.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):n.avatar?(v(),C(ln,H({key:2,size:e.ui?.avatarSize||s.value.avatarSize()},n.avatar,{class:s.value.avatar({class:e.ui?.avatar})}),null,16,["size","class"])):R("",!0)])],2),I("div",{class:T(s.value.border({class:e.ui?.border}))},null,2)],64)):R("",!0)]),_:3},16,["class"]))}},ub={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-2 focus-visible:outline-offset-2",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"focus-visible:outline-primary",indicator:"bg-primary"},secondary:{base:"focus-visible:outline-secondary",indicator:"bg-secondary"},success:{base:"focus-visible:outline-success",indicator:"bg-success"},info:{base:"focus-visible:outline-info",indicator:"bg-info"},warning:{base:"focus-visible:outline-warning",indicator:"bg-warning"},error:{base:"focus-visible:outline-error",indicator:"bg-error"},neutral:{base:"focus-visible:outline-inverted",indicator:"bg-inverted"}},variant:{list:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{base:"cursor-not-allowed opacity-75",label:"cursor-not-allowed opacity-75",description:"cursor-not-allowed opacity-75"}},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"cursor-not-allowed opacity-75"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},cb=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:qr({as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},icon:{type:String,required:!1},indeterminateIcon:{type:String,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:[Boolean,String],required:!1}},{modelValue:{type:[Boolean,String],default:void 0},modelModifiers:{}}),emits:qr(["change"],["update:modelValue"]),setup(n,{emit:e}){const t=n,i=Ge(),r=e,s=ua(n,"modelValue",{type:[Boolean,String],default:void 0}),a=Te(),o=zn(Ft(t,"required","value","defaultValue")),{id:l,emitFormChange:u,emitFormInput:c,size:d,color:h,name:p,disabled:m,ariaAttrs:g}=da(t),y=l.value??ll(),x=k(()=>de({extend:de(ub),...a.ui?.checkbox||{}})({size:d.value,color:h.value,variant:t.variant,indicator:t.indicator,required:t.required,disabled:m.value}));function b(w){const S=new Event("change",{target:{value:w}});r("change",S),u(),c()}return(w,S)=>(v(),C(f(re),{as:!n.variant||n.variant==="list"?n.as:f(co),class:T(x.value.root({class:[t.ui?.root,t.class]}))},{default:_(()=>[I("div",{class:T(x.value.container({class:t.ui?.container}))},[F(f(sh),H({id:f(y)},{...f(o),...w.$attrs,...f(g)},{modelValue:s.value,"onUpdate:modelValue":[S[0]||(S[0]=q=>s.value=q),b],name:f(p),disabled:f(m),class:x.value.base({class:t.ui?.base})}),{default:_(({modelValue:q})=>[F(f(oh),{class:T(x.value.indicator({class:t.ui?.indicator}))},{default:_(()=>[q==="indeterminate"?(v(),C(Pe,{key:0,name:n.indeterminateIcon||f(a).ui.icons.minus,class:T(x.value.icon({class:t.ui?.icon}))},null,8,["name","class"])):(v(),C(Pe,{key:1,name:n.icon||f(a).ui.icons.check,class:T(x.value.icon({class:t.ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","modelValue","name","disabled","class"])],2),n.label||i.label||n.description||i.description?(v(),V("div",{key:0,class:T(x.value.wrapper({class:t.ui?.wrapper}))},[n.label||i.label?(v(),C(an(!n.variant||n.variant==="list"?f(co):"p"),{key:0,for:f(y),class:T(x.value.label({class:t.ui?.label}))},{default:_(()=>[A(w.$slots,"label",{label:n.label},()=>[ce(Z(n.label),1)])]),_:3},8,["for","class"])):R("",!0),n.description||i.description?(v(),V("p",{key:1,class:T(x.value.description({class:t.ui?.description}))},[A(w.$slots,"description",{description:n.description},()=>[ce(Z(n.description),1)])],2)):R("",!0)],2)):R("",!0)]),_:3},8,["as","class"]))}}),db={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed"},variants:{buttonGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},hb=["id","type","value","name","placeholder","disabled","required","autocomplete"],fb=Object.assign({inheritAttrs:!1},{__name:"UInput",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},type:{type:null,required:!1,default:"text"},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autocomplete:{type:null,required:!1,default:"off"},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:String,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:String,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:String,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:String,required:!1}},emits:["update:modelValue","blur","change"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=Ge(),a=_g(i,"modelValue",r,{defaultValue:i.defaultValue}),o=Te(),{emitFormBlur:l,emitFormInput:u,emitFormChange:c,size:d,color:h,id:p,name:m,highlight:g,disabled:y,emitFormFocus:x,ariaAttrs:b}=da(i,{deferInputValidation:!0}),{orientation:w,size:S}=ca(i),{isLeading:q,isTrailing:M,leadingIconName:B,trailingIconName:L}=gl(i),E=k(()=>S.value||d.value),D=k(()=>de({extend:de(db),...o.ui?.input||{}})({type:i.type,color:h.value,variant:i.variant,size:E?.value,loading:i.loading,highlight:g.value,leading:q.value||!!i.avatar||!!s.leading,trailing:M.value||!!s.trailing,buttonGroup:w.value})),U=O(null);function G(Q){i.modelModifiers?.trim&&(Q=Q?.trim()??null),(i.modelModifiers?.number||i.type==="number")&&(Q=Wc(Q)),i.modelModifiers?.nullify&&(Q||=null),a.value=Q,u()}function ee(Q){i.modelModifiers?.lazy||G(Q.target.value)}function te(Q){const J=Q.target.value;i.modelModifiers?.lazy&&G(J),i.modelModifiers?.trim&&(Q.target.value=J.trim()),c(),r("change",Q)}function ne(Q){l(),r("blur",Q)}function K(){i.autofocus&&U.value?.focus()}return Re(()=>{setTimeout(()=>{K()},i.autofocusDelay)}),e({inputRef:U}),(Q,J)=>(v(),C(f(re),{as:n.as,class:T(D.value.root({class:[i.ui?.root,i.class]}))},{default:_(()=>[I("input",H({id:f(p),ref_key:"inputRef",ref:U,type:n.type,value:f(a),name:f(m),placeholder:n.placeholder,class:D.value.base({class:i.ui?.base}),disabled:f(y),required:n.required,autocomplete:n.autocomplete},{...Q.$attrs,...f(b)},{onInput:ee,onBlur:ne,onChange:te,onFocus:J[0]||(J[0]=(...he)=>f(x)&&f(x)(...he))}),null,16,hb),A(Q.$slots,"default"),f(q)||n.avatar||s.leading?(v(),V("span",{key:0,class:T(D.value.leading({class:i.ui?.leading}))},[A(Q.$slots,"leading",{},()=>[f(q)&&f(B)?(v(),C(Pe,{key:0,name:f(B),class:T(D.value.leadingIcon({class:i.ui?.leadingIcon}))},null,8,["name","class"])):n.avatar?(v(),C(ln,H({key:1,size:i.ui?.leadingAvatarSize||D.value.leadingAvatarSize()},n.avatar,{class:D.value.leadingAvatar({class:i.ui?.leadingAvatar})}),null,16,["size","class"])):R("",!0)])],2)):R("",!0),f(M)||s.trailing?(v(),V("span",{key:1,class:T(D.value.trailing({class:i.ui?.trailing}))},[A(Q.$slots,"trailing",{},()=>[f(L)?(v(),C(Pe,{key:0,name:f(L),class:T(D.value.trailingIcon({class:i.ui?.trailingIcon}))},null,8,["name","class"])):R("",!0)])],2)):R("",!0)]),_:3},8,["as","class"]))}}),pb={class:"font-mono text-xs text-gray-500"},mb={key:1,class:"mr-1 w-4 h-4"},gb={class:"flex items-center gap-1 flex-1 min-w-0"},yb={class:"text-gray-600 font-semibold"},vb=z({__name:"Tree",props:{node:{},level:{default:0},selectedObject:{}},emits:["update-value"],setup(n,{emit:e}){const t=n,i=e,r=O(t.node.defaultExpanded??!1),s=O(null),a=()=>{r.value=!r.value},o=w=>typeof w=="boolean"?"text-blue-500":typeof w=="number"?"text-green-500":typeof w=="string"?"text-red-500":typeof w>"u"?"text-gray-400":"text-gray-600",l=w=>typeof w=="boolean"?w?"true":"false":typeof w=="number"?w.toString():typeof w=="string"?`"${w}"`:w===null?"null":typeof w>"u"?"undefined":"object",u=()=>{if(typeof t.node.value=="number"){const w=t.node.value+1;i("update-value",t.node.path,w)}},c=()=>{if(typeof t.node.value=="number"){const w=t.node.value-1;i("update-value",t.node.path,w)}},d=w=>{i("update-value",t.node.path,w)},h=()=>{const w=typeof t.node.value=="string"?t.node.value:JSON.stringify(t.node.value);s.value={path:t.node.path,value:w}},p=()=>{if(s.value)try{const{value:w}=s.value;let S=w;Number.isNaN(Number(w))?(w.toLowerCase()==="true"||w.toLowerCase()==="false")&&(S=w.toLowerCase()==="true"):S=Number(w),i("update-value",t.node.path,S)}catch(w){console.error("Failed to apply edit:",w)}finally{s.value=null}},m=()=>{s.value=null},g=w=>{w.key==="Enter"?p():w.key==="Escape"&&m()},y=k(()=>t.node.children&&t.node.children.length>0),x=k(()=>!y.value),b=k(()=>({paddingLeft:`${t.level*16}px`}));return(w,S)=>{const q=Pe,M=lt,B=Iu,L=cb,E=fb,D=xu,U=Ku;return v(),V("div",pb,[I("div",{style:qt(b.value),class:T(["flex items-center py-0.5 hover:bg-gray-50 group",{"cursor-pointer":y.value}])},[y.value?(v(),V("div",{key:0,class:"mr-1 w-4 h-4 flex items-center justify-center",onClick:a},[F(q,{name:r.value?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-gray-400"},null,8,["name"])])):(v(),V("div",mb)),I("div",gb,[n.node.type==="object"||n.node.type==="array"?(v(),V(we,{key:0},[I("span",{class:"cursor-pointer select-none",onClick:S[0]||(S[0]=G=>y.value?a():void 0)},[ce(Z(n.node.label)+" : ",1),I("span",yb,Z(n.node.value),1)]),n.node.type!=="array"?(v(),C(B,{key:0,size:"xs",items:[{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>f(Bo)(n.node.path)},{label:"Copy value as Array",icon:"i-material-symbols:data-array",onSelect:()=>f(ov)(n.node)},n.node.value==="_Vector3"?{label:"Copy value as Vector3",icon:"i-lucide:pen-line",onSelect:()=>f(Du)(n.node)}:null,n.node.value==="_Euler"?{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>f($u)(n.node)}:null,n.node.value==="_Quaternion"?{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>f(Lu)(n.node)}:null,{label:"Copy value as JSON",icon:"i-material-symbols:data-object",onSelect:()=>f(lv)(n.node)},n.node.value==="_Vector3"||n.node.value==="_Euler"||n.node.value==="_Quaternion"?{label:"Copy as Prop",icon:"i-lucide:code",onSelect:()=>f(av)(n.node)}:null].filter(Boolean),ui:{content:"w-48"}},{default:_(()=>[F(M,{size:"xs",variant:"ghost",color:"gray",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])):R("",!0)],64)):(v(),V(we,{key:1},[I("span",null,Z(n.node.label)+" :",1),typeof n.node.value=="boolean"?(v(),C(L,{key:0,"model-value":n.node.value,size:"xs","onUpdate:modelValue":d,onClick:S[1]||(S[1]=fe(()=>{},["stop"]))},null,8,["model-value"])):s.value?.path===n.node.path&&typeof n.node.value!="number"&&typeof n.node.value!="boolean"?(v(),C(E,{key:1,modelValue:s.value.value,"onUpdate:modelValue":S[2]||(S[2]=G=>s.value.value=G),size:"xs",class:"w-20",variant:"soft",onKeydown:fe(g,["stop"]),onBlur:p,onFocus:S[3]||(S[3]=G=>G.target?.select()),onClick:S[4]||(S[4]=fe(()=>{},["stop"]))},null,8,["modelValue"])):s.value?.path===n.node.path&&typeof n.node.value=="number"?(v(),C(D,{key:2,modelValue:s.value.value,"onUpdate:modelValue":S[5]||(S[5]=G=>s.value.value=G),size:"xs",variant:"subtle",orientation:"vertical","format-options":{minimumFractionDigits:0,maximumFractionDigits:2},class:"w-20",onKeydown:fe(g,["stop"]),onBlur:p,onFocus:S[6]||(S[6]=G=>G.target?.select()),onClick:S[7]||(S[7]=fe(()=>{},["stop"]))},null,8,["modelValue"])):typeof n.node.value!="boolean"?(v(),V("span",{key:3,class:T([o(n.node.value),"cursor-pointer hover:bg-gray-100 px-1 py-0.5 rounded"]),onClick:fe(h,["stop"])},Z(l(n.node.value)),3)):R("",!0)],64)),x.value?(v(),V("div",{key:2,class:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",onClick:S[8]||(S[8]=fe(()=>{},["stop"]))},[typeof n.node.value=="number"?(v(),V(we,{key:0},[F(M,{size:"xs",variant:"ghost",color:"gray",icon:"i-tabler:minus",title:"Decrease value",onClick:fe(c,["stop"])}),F(M,{size:"xs",variant:"ghost",color:"gray",icon:"i-tabler:plus",title:"Increase value",onClick:fe(u,["stop"])})],64)):R("",!0),F(B,{size:"xs",items:[{label:"Copy Value",icon:"i-lucide:copy",onSelect:()=>f(Ru)(n.node.value)},{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>f(Bo)(n.node.path)},{label:"Copy as prop",icon:"i-lucide:pen-line",onSelect:()=>f(Pu)(n.node)}],ui:{content:"w-48"}},{default:_(()=>[F(M,{size:"xs",variant:"ghost",color:"gray",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])])):R("",!0)])],6),y.value&&r.value?(v(!0),V(we,{key:0},Xe(n.node.children,G=>(v(),C(U,{key:`${G.path}-${G.label}`,node:G,level:n.level+1,"selected-object":n.selectedObject,onUpdateValue:S[9]||(S[9]=(ee,te)=>i("update-value",ee,te))},null,8,["node","level","selected-object"]))),128)):R("",!0)])}}}),Ku=Object.assign(vb,{__name:"InspectorTree"});function bb(n){let e=0;return n.traverse(t=>{t.isObject3D&&e++}),e}function xb(){const n={scene:ns({objects:0,graph:null,value:void 0,selected:void 0,assets:[]}),fps:ns({value:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),memory:ns({currentMem:0,averageMem:0,maxMemory:0,allocatedMem:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),renderer:ra({info:{render:{frame:0,calls:0,triangles:0,points:0,lines:0},memory:{geometries:0,textures:0},programs:[]}})};let e=null;return typeof window<"u"&&window.parent.parent.__TRES__DEVTOOLS__&&window.parent.parent.__TRES__DEVTOOLS__.subscribe(t=>{if(t.type==="context"){const i=t.data;if(i.scene.value.children.length>0){const r=i.scene.value.uuid;r!==e&&(n.scene.value=i.scene.value,n.scene.objects=bb(i.scene.value),n.scene.graph=jv(i.scene.value),e=r)}else n.scene.value=void 0,n.scene.graph=null,e=null;i.renderer?.instance?.info&&(Object.assign(n.renderer.info.render,i.renderer.instance.info.render),Object.assign(n.renderer.info.memory,i.renderer.instance.info.memory),n.renderer.info.programs=[...i.renderer.instance.info.programs||[]])}else if(t.type==="performance"){const i=t.data;Object.assign(n.fps,i.fps),n.fps.accumulator=[...i.fps.accumulator],Object.assign(n.memory,i.memory),n.memory.accumulator=[...i.memory.accumulator]}}),n}const Da=la(xb),wb={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},_b={key:0,class:"relative isolate"},Cb=z({__name:"index",setup(n){const{scene:e}=Da(),t=tt(null),i=tt(null),r=O(0);function s(c){t.value&&t.value.remove(i.value),c&&c.isMesh&&(i.value=Gv(c),c.add(Pt(i))),t.value=c,r.value++}const a=k(()=>(r.value,Gi(t.value))),o=(c,d)=>{t.value&&(l(t.value,c,d),c.includes("color")||r.value++)},l=(c,d,h)=>{if(!c||typeof c!="object")return;const p=d.split(".");let m=c;for(let b=0;b<p.length-1;b++){const w=p[b];if(m[w]&&typeof m[w]=="object")m=m[w];else return}const g=p[p.length-1],y=b=>typeof b=="string"&&/^#[0-9a-f]{6}$/i.test(b);m[g]=y(h)?new Gn(h):h;const x=c;x.isCamera&&u(d)&&x.updateProjectionMatrix()},u=c=>{const d=["fov","aspect","near","far","left","right","top","bottom"],h=c.split(".").pop();return d.includes(h||"")};return(c,d)=>{const h=vu,p=bu,m=ab,g=lb,y=Ku;return v(),V("div",wb,[I("div",null,[f(e).value&&f(e).graph?(v(),C(h,{key:f(e).graph.key,item:f(e).graph,onSelectObject:s},null,8,["item"])):(v(),C(p,{key:1,color:"neutral",variant:"subtle",title:"No scene available",description:"Please open a view with a scene to view its graph.",icon:"i-lucide-terminal"}))]),I("div",null,[t.value?(v(),V("div",_b,[(v(),C(m,{key:r.value,object:t.value,onUpdateValue:o},null,8,["object"])),F(g),F(y,{class:"pt-4",node:a.value,"selected-object":t.value,onUpdateValue:o},null,8,["node","selected-object"])])):R("",!0)])])}}}),Sb=Object.assign(Cb,{__name:"SceneGraph"}),Ab=["points"],Ps=40,rl=2,Mb=z({__name:"DevtoolsGraph",props:{points:{default:()=>[]},value:{default:0},unit:{default:""},label:{default:""},color:{default:"primary"}},setup(n){const e=n,t=O(140);gt(()=>{const r=Math.max(...e.points,30);t.value=Math.max(r,t.value)});const i=k(()=>e.points.map((r,s)=>`${s*rl},${Ps-r*Ps/t.value}`).join(" "));return(r,s)=>(v(),V("div",{class:T(["graph relative p-1 rounded text-right text-xs outline-none border-none font-sans",`graph-${n.color}`])},[I("div",{class:T(["absolute bottom-0.5 right-1 font-mono text-xs",`text-${n.color}`])},Z(Math.round(n.value))+" "+Z(n.unit),3),(v(),V("svg",{width:"100%",height:Ps,xmlns:"http://www.w3.org/2000/svg"},[I("polyline",{points:f(i),fill:"none","stroke-width":rl,"stroke-linecap":"round","stroke-linejoin":"round",class:T(n.color)},null,10,Ab)]))],2))}}),Bb=Object.assign(Mb,{__name:"DevtoolsGraph"}),qb={slots:{root:"rounded-lg overflow-hidden",header:"p-4 sm:px-6",body:"p-4 sm:p-6",footer:"p-4 sm:px-6"},variants:{variant:{solid:{root:"bg-inverted text-inverted"},outline:{root:"bg-default ring ring-default divide-y divide-default"},soft:{root:"bg-elevated/50 divide-y divide-default"},subtle:{root:"bg-elevated/50 ring ring-default divide-y divide-default"}}},defaultVariants:{variant:"outline"}},kb={__name:"UCard",props:{as:{type:null,required:!1},variant:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(n){const e=n,t=Ge(),i=Te(),r=k(()=>de({extend:de(qb),...i.ui?.card||{}})({variant:e.variant}));return(s,a)=>(v(),C(f(re),{as:n.as,class:T(r.value.root({class:[e.ui?.root,e.class]}))},{default:_(()=>[t.header?(v(),V("div",{key:0,class:T(r.value.header({class:e.ui?.header}))},[A(s.$slots,"header")],2)):R("",!0),t.default?(v(),V("div",{key:1,class:T(r.value.body({class:e.ui?.body}))},[A(s.$slots,"default")],2)):R("",!0),t.footer?(v(),V("div",{key:2,class:T(r.value.footer({class:e.ui?.footer}))},[A(s.$slots,"footer")],2)):R("",!0)]),_:3},8,["as","class"]))}},Eb={class:"text-sm dark:text-gray-400 text-gray-500 font-mono"},Fb={key:0,class:"h-1 border-b dark:border-gray-400 border-gray-500 w-4"},Ob={class:"flex gap-2 items-center -mb2.5"},zb={key:0},Tb={class:"p4 dark:text-gray-400 text-gray-500 text-xs font-mono"},Ib=z({__name:"ProgramsModuleItem",props:{item:{},depth:{default:0}},setup(n){const e=O(!1);return(t,i)=>{const r=ci;return v(),V("div",Eb,[I("div",{class:"flex gap-2 items-end cursor-pointer pt2 mb2",onClick:i[0]||(i[0]=s=>e.value=!f(e))},[n.depth>0?(v(),V("span",Fb)):R("",!0),I("div",Ob,[I("i",{class:T(n.item.icon)},null,2),ce(" "+Z(n.item.type)+" ",1),n.item.name?(v(),C(r,{key:0,variant:"soft"},{default:_(()=>[ce(Z(n.item.name),1)]),_:1})):R("",!0)])]),f(e)?(v(),V("div",zb,[I("div",Tb,[i[1]||(i[1]=I("p",{class:"text-xs font-bold dark:text-gray-300/80 text-gray-700/80 mb2 op-80"}," Uniforms ",-1)),(v(!0),V(we,null,Xe(Object.entries(n.item.uniforms.map),([s,a])=>(v(),V("div",{key:s},[ce(Z(s)+" ",1),F(r,{color:"gray",variant:"soft"},{default:_(()=>[ce(Z(a?.cache[a?.cache.length-1]),1)]),_:2},1024)]))),128))])])):R("",!0)])}}}),Pb=Object.assign(Ib,{__name:"ProgramsModuleItem"}),Rb=z({__name:"ProgramsModule",setup(n){const{renderer:e}=Da(),t={shaderMaterial:"i-file-icons-vertexshader"},i=k(()=>e.info.programs.map(r=>({...r,icon:t[r.type]||"i-file-icons-vertexshader",uniforms:r.getUniforms(),attributes:r.getAttributes()})));return(r,s)=>{const a=Pb;return v(!0),V(we,null,Xe(f(i),o=>(v(),C(a,{key:o.id,item:o},null,8,["item"]))),128)}}}),Db=Object.assign(Rb,{__name:"ProgramsModule"}),$b={class:"space-y-6"},Lb={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Hb={class:"flex items-center justify-between"},Nb={class:"flex items-center gap-2"},Vb={class:"space-y-4"},Ub={class:"flex items-center justify-between"},jb={class:"flex items-center gap-2"},Gb={class:"space-y-4"},Wb={class:"grid grid-cols-2 gap-4 text-sm"},Kb={class:"font-mono font-semibold"},Xb={class:"font-mono font-semibold"},Yb={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},Jb={class:"flex items-center gap-2"},Zb={class:"space-y-4"},Qb={class:"grid grid-cols-2 gap-4"},e0={class:"text-center p-4 bg-gray-50 dark:bg-gray-800 rounded-lg"},t0={class:"flex items-center justify-center gap-2 mb-2"},i0={class:"font-mono text-sm font-bold"},n0={class:"text-center p-4 bg-gray-50 dark:bg-gray-800 rounded-lg"},r0={class:"flex items-center justify-center gap-2 mb-2"},s0={class:"font-mono text-sm font-bold"},a0={class:"flex items-center gap-2"},o0={class:"grid grid-cols-2 gap-3"},l0={class:"text-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg"},u0={class:"flex items-center justify-center gap-2 mb-2"},c0={class:"font-mono font-bold"},d0={class:"text-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg"},h0={class:"flex items-center justify-center gap-2 mb-2"},f0={class:"font-mono font-bold"},p0={class:"text-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg"},m0={class:"flex items-center justify-center gap-2 mb-2"},g0={class:"font-mono font-bold"},y0={class:"text-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg"},v0={class:"flex items-center justify-center gap-2 mb-2"},b0={class:"font-mono font-bold"},x0={class:"flex items-center gap-2"},w0=z({__name:"PerformanceMonitor",setup(n){const{fps:e,memory:t,renderer:i}=Da(),r=k(()=>e.value>=50?{color:"primary",label:"Excellent"}:e.value>=30?{color:"warning",label:"Good"}:{color:"error",label:"Poor"}),s=k(()=>{const a=t.currentMem;return a<100?{color:"primary",label:"Low"}:a<500?{color:"warning",label:"Moderate"}:{color:"error",label:"High"}});return(a,o)=>{const l=Pe,u=ci,c=Bb,d=kb,h=bu,p=Db;return v(),V("div",$b,[I("div",Lb,[F(d,null,{header:_(()=>[I("div",Hb,[I("div",Nb,[F(l,{name:"i-tabler:activity",class:"w-5 h-5"}),o[0]||(o[0]=I("h3",{class:"text-sm font-semibold"}," Frame Rate ",-1))]),F(u,{color:f(r).color,variant:"soft",size:"sm"},{default:_(()=>[ce(Z(f(r).label),1)]),_:1},8,["color"])])]),default:_(()=>[I("div",Vb,[F(c,{points:f(e).accumulator,value:f(e).value,color:"primary",unit:"FPS",label:"FPS"},null,8,["points","value"])])]),_:1}),F(d,null,{header:_(()=>[I("div",Ub,[I("div",jb,[F(l,{name:"i-tabler:cpu",class:"w-5 h-5"}),o[1]||(o[1]=I("h3",{class:"text-sm font-semibold"}," Memory Usage ",-1))]),F(u,{color:f(s).color,variant:"soft",size:"sm"},{default:_(()=>[ce(Z(f(s).label),1)]),_:1},8,["color"])])]),default:_(()=>[I("div",Gb,[F(c,{points:f(t).accumulator,value:f(t).currentMem,color:"warning",unit:"MB",label:"Memory"},null,8,["points","value"]),I("div",Wb,[I("div",null,[o[2]||(o[2]=I("div",{class:"text-gray-600 dark:text-gray-400"}," Current ",-1)),I("div",Kb,Z(Math.round(f(t).currentMem))+" MB ",1)]),I("div",null,[o[3]||(o[3]=I("div",{class:"text-gray-600 dark:text-gray-400"}," Peak ",-1)),I("div",Xb,Z(Math.round(f(t).maxMemory))+" MB ",1)])])])]),_:1})]),I("div",Yb,[F(d,null,{header:_(()=>[I("div",Jb,[F(l,{name:"i-tabler:database",class:"w-5 h-5"}),o[4]||(o[4]=I("h3",{class:"font-semibold"}," Memory Details ",-1))])]),default:_(()=>[I("div",Zb,[I("div",Qb,[I("div",e0,[I("div",t0,[F(l,{name:"i-tabler:box",class:"w-5 h-5"}),I("span",i0,Z(f(i).info?.memory?.geometries||0),1)]),o[5]||(o[5]=I("div",{class:"text-xs text-gray-600 dark:text-gray-400"}," Geometries ",-1))]),I("div",n0,[I("div",r0,[F(l,{name:"i-tabler:photo",class:"w-5 h-5"}),I("span",s0,Z(f(i).info?.memory?.textures||0),1)]),o[6]||(o[6]=I("div",{class:"text-xs text-gray-600 dark:text-gray-400"}," Textures ",-1))])]),F(h,{icon:"i-tabler:info-circle",color:"primary",variant:"soft",title:"Memory Allocation",description:`Approximately ${f(cv)(f(t).allocatedMem)} KB allocated by 3D objects`},null,8,["description"])])]),_:1}),F(d,null,{header:_(()=>[I("div",a0,[F(l,{name:"i-tabler:chart-bar",class:"w-5 h-5"}),o[7]||(o[7]=I("h3",{class:"font-semibold"}," Render Statistics ",-1))])]),default:_(()=>[I("div",o0,[I("div",l0,[I("div",u0,[F(l,{name:"i-tabler:refresh",class:"w-4 h-4 text-primary-500"}),I("span",c0,Z(f(i)?.info?.render?.calls||0),1)]),o[8]||(o[8]=I("div",{class:"text-xs text-gray-600 dark:text-gray-400"}," Draw Calls ",-1))]),I("div",d0,[I("div",h0,[F(l,{name:"i-tabler:triangle",class:"w-4 h-4 text-orange-500"}),I("span",f0,Z(f(i)?.info?.render?.triangles||0),1)]),o[9]||(o[9]=I("div",{class:"text-xs text-gray-600 dark:text-gray-400"}," Triangles ",-1))]),I("div",p0,[I("div",m0,[F(l,{name:"i-tabler:point",class:"w-4 h-4 text-blue-500"}),I("span",g0,Z(f(i)?.info?.render?.points||0),1)]),o[10]||(o[10]=I("div",{class:"text-xs text-gray-600 dark:text-gray-400"}," Points ",-1))]),I("div",y0,[I("div",v0,[F(l,{name:"i-tabler:line",class:"w-4 h-4 text-red-500"}),I("span",b0,Z(f(i)?.info?.render?.lines||0),1)]),o[11]||(o[11]=I("div",{class:"text-xs text-gray-600 dark:text-gray-400"}," Lines ",-1))])])]),_:1})]),F(d,null,{header:_(()=>[I("div",x0,[F(l,{name:"i-tabler:code",class:"w-5 h-5"}),o[12]||(o[12]=I("h3",{class:"font-semibold"}," Shader Programs ",-1))])]),default:_(()=>[F(p)]),_:1})])}}}),_0=Object.assign(w0,{__name:"PerformanceMonitor"}),C0={slots:{root:"flex items-center gap-2",list:"relative flex p-1 group",indicator:"absolute transition-[translate,width] duration-200",trigger:["group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",label:"truncate",trailingBadge:"shrink-0",trailingBadgeSize:"sm",content:"focus:outline-none w-full"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{pill:{list:"bg-elevated rounded-lg",trigger:"grow",indicator:"rounded-md shadow-xs"},link:{list:"border-default",indicator:"rounded-full",trigger:"focus:outline-none"}},orientation:{horizontal:{root:"flex-col",list:"w-full",indicator:"left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",trigger:"justify-center"},vertical:{list:"flex-col",indicator:"top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"}},size:{xs:{trigger:"px-2 py-1 text-xs gap-1",leadingIcon:"size-4",leadingAvatarSize:"3xs"},sm:{trigger:"px-2.5 py-1.5 text-xs gap-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs"},md:{trigger:"px-3 py-1.5 text-sm gap-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs"},lg:{trigger:"px-3 py-2 text-sm gap-2",leadingIcon:"size-5",leadingAvatarSize:"2xs"},xl:{trigger:"px-3 py-2 text-base gap-2",leadingIcon:"size-6",leadingAvatarSize:"xs"}}},compoundVariants:[{orientation:"horizontal",variant:"pill",class:{indicator:"inset-y-1"}},{orientation:"horizontal",variant:"link",class:{list:"border-b -mb-px",indicator:"-bottom-px h-px"}},{orientation:"vertical",variant:"pill",class:{indicator:"inset-x-1",list:"items-center"}},{orientation:"vertical",variant:"link",class:{list:"border-s -ms-px",indicator:"-start-px w-px"}},{color:"primary",variant:"pill",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"}},{color:"secondary",variant:"pill",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"}},{color:"success",variant:"pill",class:{indicator:"bg-success",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success"}},{color:"info",variant:"pill",class:{indicator:"bg-info",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"}},{color:"warning",variant:"pill",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"}},{color:"error",variant:"pill",class:{indicator:"bg-error",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-error"}},{color:"neutral",variant:"pill",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"}},{color:"primary",variant:"link",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-primary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"}},{color:"secondary",variant:"link",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-secondary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"}},{color:"success",variant:"link",class:{indicator:"bg-success",trigger:"data-[state=active]:text-success focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"}},{color:"info",variant:"link",class:{indicator:"bg-info",trigger:"data-[state=active]:text-info focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"}},{color:"warning",variant:"link",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-warning focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"}},{color:"error",variant:"link",class:{indicator:"bg-error",trigger:"data-[state=active]:text-error focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"}},{color:"neutral",variant:"link",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-highlighted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"}}],defaultVariants:{color:"primary",variant:"pill",size:"md"}},S0={__name:"UTabs",props:{as:{type:null,required:!1},items:{type:Array,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},content:{type:Boolean,required:!1,default:!0},labelKey:{type:String,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:null,required:!1},defaultValue:{type:null,required:!1,default:"0"},modelValue:{type:null,required:!1},activationMode:{type:String,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=Ge(),a=Te(),o=Ce(Ft(i,"as","modelValue","defaultValue","orientation","activationMode","unmountOnHide"),r),l=k(()=>de({extend:de(C0),...a.ui?.tabs||{}})({color:i.color,variant:i.variant,size:i.size,orientation:i.orientation})),u=O([]);return e({triggersRef:u}),(c,d)=>(v(),C(f(Km),H(f(o),{class:l.value.root({class:[i.ui?.root,i.class]})}),{default:_(()=>[F(f(eg),{class:T(l.value.list({class:i.ui?.list}))},{default:_(()=>[F(f(Zm),{class:T(l.value.indicator({class:i.ui?.indicator}))},null,8,["class"]),A(c.$slots,"list-leading"),(v(!0),V(we,null,Xe(n.items,(h,p)=>(v(),C(f(ig),{key:p,ref_for:!0,ref:m=>u.value[p]=m,value:h.value??String(p),disabled:h.disabled,class:T(l.value.trigger({class:[i.ui?.trigger,h.ui?.trigger]}))},{default:_(()=>[A(c.$slots,"leading",{item:h,index:p},()=>[h.icon?(v(),C(Pe,{key:0,name:h.icon,class:T(l.value.leadingIcon({class:[i.ui?.leadingIcon,h.ui?.leadingIcon]}))},null,8,["name","class"])):h.avatar?(v(),C(ln,H({key:1,size:h.ui?.leadingAvatarSize||i.ui?.leadingAvatarSize||l.value.leadingAvatarSize()},{ref_for:!0},h.avatar,{class:l.value.leadingAvatar({class:[i.ui?.leadingAvatar,h.ui?.leadingAvatar]})}),null,16,["size","class"])):R("",!0)]),f(xi)(h,i.labelKey)||s.default?(v(),V("span",{key:0,class:T(l.value.label({class:[i.ui?.label,h.ui?.label]}))},[A(c.$slots,"default",{item:h,index:p},()=>[ce(Z(f(xi)(h,i.labelKey)),1)])],2)):R("",!0),A(c.$slots,"trailing",{item:h,index:p},()=>[h.badge!==void 0?(v(),C(ci,H({key:0,color:"neutral",variant:"outline",size:h.ui?.trailingBadgeSize||i.ui?.trailingBadgeSize||l.value.trailingBadgeSize()},{ref_for:!0},typeof h.badge=="string"||typeof h.badge=="number"?{label:h.badge}:h.badge,{class:l.value.trailingBadge({class:[i.ui?.trailingBadge,h.ui?.trailingBadge]})}),null,16,["size","class"])):R("",!0)])]),_:2},1032,["value","disabled","class"]))),128)),A(c.$slots,"list-trailing")]),_:3},8,["class"]),n.content?(v(!0),V(we,{key:0},Xe(n.items,(h,p)=>(v(),C(f(Ym),{key:p,value:h.value??String(p),class:T(l.value.content({class:[i.ui?.content,h.ui?.content,h.class]}))},{default:_(()=>[A(c.$slots,h.slot||"content",{item:h,index:p},()=>[ce(Z(h.content),1)])]),_:2},1032,["value","class"]))),128)):R("",!0)]),_:3},16,["class"]))}},A0={class:"pattern-bg"},M0={class:"bg-(--ui-bg) p-8 min-h-[calc(100vh-var(--ui-header-height))] max-w-screen-xl mx-auto pt-2 bg-default"},q0=z({__name:"index",setup(n){const e=[{label:"Scene Graph",description:"Explore and inspect the 3D scene hierarchy and object properties.",icon:"i-lucide-film",slot:"scene-graph"},{label:"Performance",description:"Monitor frame rate, memory usage, and rendering statistics.",icon:"i-lucide-chart-line",slot:"performance"}];return(t,i)=>{const r=gy,s=Sb,a=_0,o=S0;return v(),V("div",A0,[F(r),I("main",M0,[F(o,{items:e,color:"primary",size:"lg",variant:"link",ui:{trigger:"grow"},class:"gap-4 w-full"},{"scene-graph":_(()=>[F(s)]),performance:_(()=>[F(a)]),_:1})])])}}});export{q0 as default};