@tresjs/nuxt 5.0.0-rc.1 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{BjbAJzab.js → BQUQfMjh.js} +2 -2
- package/dist/client/_nuxt/{BR8-gIus.js → C-m61Xzp.js} +1 -1
- package/dist/client/_nuxt/{BLdB7K76.js → C2c_z123.js} +1 -1
- package/dist/client/_nuxt/{COamW0up.js → Vfglixjy.js} +14 -14
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/e19d2d4f-feb9-4c0a-96f2-6814b3a5abe7.json +1 -0
- package/dist/client/_nuxt/{entry.DA9u3B6W.css → entry.Du1JYu2Z.css} +1 -1
- package/dist/client/_nuxt/error-404.DGeHdVHq.css +1 -0
- package/dist/client/_nuxt/error-500.BMk1V5Qx.css +1 -0
- package/dist/client/_nuxt/{index.BdtMEckI.css → index.C8f9ThyS.css} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/package.json +10 -10
- package/dist/client/_nuxt/builds/meta/2013868c-00fd-47ba-9938-f55d6aa0518c.json +0 -1
- package/dist/client/_nuxt/error-404.C26rWYme.css +0 -1
- package/dist/client/_nuxt/error-500.DtLnvliX.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{i as Ki,f as Ps,g as nl,h as k,j as nc,r as O,k as ia,l as _e,m as Ln,n as Br,p as Ga,q as ri,s as Xe,v as gt,x as sc,y as Hn,z as sl,A as al,B as Ai,C as ol,D as Re,E as pt,F as z,G as De,H as nt,I as vt,J as A,K as f,L as X,M as C,o as v,w as _,N as H,P as ne,O as ac,Q as ra,R as oc,S as pi,T as es,U as lc,V as uc,W as ts,X as Wa,b as F,Y as qr,Z as nr,$ as $t,a0 as R,a1 as oe,a2 as le,a3 as kr,a4 as na,a5 as Er,a6 as Fr,c as V,a7 as we,a8 as Ye,a9 as ht,aa as fe,ab as sr,ac as ll,ad as tt,ae as cc,af as dc,ag as Ei,ah as ul,ai as hc,aj as qt,ak as Ce,al as fc,am as Or,an as pc,ao as cl,ap as mc,aq as dl,ar as gc,as as sa,at as yc,au as Ge,av as vc,d as ce,t as Z,aw as zr,ax as Nn,ay as bc,az as xc,aA as An,aB as Pt,aC as wc,aD as aa,aE as _c,aF as Cc,aG as Sc,aH as Ac,aI as Mc,aJ as Bc,aK as qc,aL as kc,aM as Ec,aN as Ka,aO as oa,aP as je,aQ as Fc,aR as Oc,aS as zc,aT as Tc,aU as Te,aV as lt,a as I,aW as de,aX as T,aY as Ft,aZ as ar,a_ as Tr,a$ as Ic,b0 as Pc,b1 as Rc,b2 as qn,b3 as la,b4 as Dc,b5 as hl,b6 as $c,_ as fl,b7 as ua,b8 as pl,b9 as Pe,ba as or,bb as ca,bc as Lc,bd as Hc,be as Nc,bf as ml,bg as Vc,bh as xi,bi as gl,bj as Uc,bk as jc,bl as Gc,bm as is}from"#entry";function Wc(r,e=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY){return Math.min(t,Math.max(e,r))}function Xr(r,e){let t=r;const i=e.toString(),n=i.indexOf("."),s=n>=0?i.length-n:0;if(s>0){const a=10**s;t=Math.round(t*a)/a}return t}function Kc(r,e,t,i){e=Number(e),t=Number(t);const n=(r-(Number.isNaN(e)?0:e))%i;let s=Xr(Math.abs(n)*2>=i?r+Math.sign(n)*(i-Math.abs(n)):r-n,i);return Number.isNaN(e)?!Number.isNaN(t)&&s>t&&(s=Math.floor(Xr(t/i,i))*i):s<e?s=e:!Number.isNaN(t)&&s>t&&(s=e+Math.floor(Xr((t-e)/i,i))*i),s=Xr(s,i),s}function Ya(r,e){return Ki(r)?!1:Array.isArray(r)?r.some(t=>Ps(t,e)):Ps(r,e)}const Yc=["INPUT","TEXTAREA"];function Xc(r,e,t,i={}){if(!e||i.enableIgnoredElement&&Yc.includes(e.nodeName))return null;const{arrowKeyOptions:n="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]=[r.key==="ArrowRight",r.key==="ArrowLeft",r.key==="ArrowUp",r.key==="ArrowDown",r.key==="Home",r.key==="End"],w=p||m,x=d||h;if(!g&&!y&&(!w&&!x||n==="vertical"&&x||n==="horizontal"&&w))return null;const b=t?Array.from(t.querySelectorAll(s)):a;if(!b.length)return null;u&&r.preventDefault();let S=null;return x||w?S=yl(b,e,{goForward:w?m:l==="ltr"?d:h,loop:o}):g?S=b.at(0)||null:y&&(S=b.at(-1)||null),c&&S?.focus(),S}function yl(r,e,t,i=r.length){if(--i===0)return null;const n=r.indexOf(e),s=t.goForward?n+1:n-1;if(!t.loop&&(s<0||s>=r.length))return null;const a=(s+r.length)%r.length,o=r[a];return o?o.hasAttribute("disabled")&&o.getAttribute("disabled")!=="false"?yl(r,o,t,i):o:null}const Jc=nl(()=>{const r=O(new Map),e=O(),t=k(()=>{for(const a of r.value.values())if(a)return!0;return!1}),i=ia({scrollBody:O(!0)});let n=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&&n?.(),e.value=void 0};return _e(t,(a,o)=>{if(!Ln)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"?Br({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&&(n=ri(document,"touchmove",d=>Zc(d),{passive:!1})),Xe(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),r});function da(r){const e=Math.random().toString(36).substring(2,7),t=Jc();t.value.set(e,r??!1);const i=k({get:()=>t.value.get(e)??!1,set:n=>t.value.set(e,n)});return nc(()=>{t.value.delete(e)}),i}function vl(r){const e=window.getComputedStyle(r);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&r.clientWidth<r.scrollWidth||e.overflowY==="auto"&&r.clientHeight<r.scrollHeight)return!0;{const t=r.parentNode;return!(t instanceof Element)||t.tagName==="BODY"?!1:vl(t)}}function Zc(r){const e=r||window.event,t=e.target;return t instanceof Element&&vl(t)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function Vn(r){const e=ia({dir:O("ltr")});return k(()=>r?.value||e.dir?.value||"ltr")}let rs=0;function bl(){gt(r=>{if(!Ln)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??Xa()),document.body.insertAdjacentElement("beforeend",e[1]??Xa()),rs++,r(()=>{rs===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(t=>t.remove()),rs--})})}function Xa(){const r=document.createElement("span");return r.setAttribute("data-reka-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}function xl(r){return k(()=>sc(r)?!!Hn(r)?.closest("form"):!0)}function wl(r,e){const t=sl(!1,300),i=O(null),n=al();function s(){i.value=null,t.value=!1}function a(o,l){const u=o.currentTarget,c={x:o.clientX,y:o.clientY},d=Qc(c,u.getBoundingClientRect()),h=ed(c,d),p=td(l.getBoundingClientRect()),m=rd([...h,...p]);i.value=m,t.value=!0}return gt(o=>{if(r.value&&e.value){const l=c=>a(c,e.value),u=c=>a(c,r.value);r.value.addEventListener("pointerleave",l),e.value.addEventListener("pointerleave",u),o(()=>{r.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=r.value?.contains(c)||e.value?.contains(c),p=!id(d,i.value),m=!!c.closest("[data-grace-area-trigger]");h?s():(p||m)&&(s(),n.trigger())};r.value?.ownerDocument.addEventListener("pointermove",l),o(()=>r.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:t,onPointerExit:n.on}}function Qc(r,e){const t=Math.abs(e.top-r.y),i=Math.abs(e.bottom-r.y),n=Math.abs(e.right-r.x),s=Math.abs(e.left-r.x);switch(Math.min(t,i,n,s)){case s:return"left";case n:return"right";case t:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function ed(r,e,t=5){const i=[];switch(e){case"top":i.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":i.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":i.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":i.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return i}function td(r){const{top:e,right:t,bottom:i,left:n}=r;return[{x:n,y:e},{x:t,y:e},{x:t,y:i},{x:n,y:i}]}function id(r,e){const{x:t,y:i}=r;let n=!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&&(n=!n)}return n}function rd(r){const e=r.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),nd(e)}function nd(r){if(r.length<=1)return r.slice();const e=[];for(let i=0;i<r.length;i++){const n=r[i];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let i=r.length-1;i>=0;i--){const n=r[i];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}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 sd=function(r){if(typeof document>"u")return null;var e=Array.isArray(r)?r[0]:r;return e.ownerDocument.body},Fi=new WeakMap,Jr=new WeakMap,Zr={},ns=0,_l=function(r){return r&&(r.host||_l(r.parentNode))},ad=function(r,e){return e.map(function(t){if(r.contains(t))return t;var i=_l(t);return i&&r.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",r,". Doing nothing"),null)}).filter(function(t){return!!t})},od=function(r,e,t,i){var n=ad(e,Array.isArray(r)?r:[r]);Zr[t]||(Zr[t]=new WeakMap);var s=Zr[t],a=[],o=new Set,l=new Set(n),u=function(d){!d||o.has(d)||(o.add(d),u(d.parentNode))};n.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&&Jr.set(h,!0),y===1&&h.setAttribute(t,"true"),m||h.setAttribute(i,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(e),o.clear(),ns++,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||(Jr.has(d)||d.removeAttribute(i),Jr.delete(d)),p||d.removeAttribute(t)}),ns--,ns||(Fi=new WeakMap,Fi=new WeakMap,Jr=new WeakMap,Zr={})}},ld=function(r,e,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(r)?r:[r]),n=sd(r);return n?(i.push.apply(i,Array.from(n.querySelectorAll("[aria-live], script"))),od(i,n,t,"aria-hidden")):function(){return null}};function ha(r){let e;_e(()=>Hn(r),t=>{t?e=ld(t):e&&e()}),Ai(()=>{e&&e()})}function yt(r,e="reka"){return`${e}-${ol?.()}`}function ud(r){const e=ia({locale:O("en")});return k(()=>r?.value||e.locale?.value||"en")}function cd(r){const e=O(),t=k(()=>e.value?.width??0),i=k(()=>e.value?.height??0);return Re(()=>{const n=Hn(r);if(n){e.value={width:n.offsetWidth,height:n.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=n.offsetWidth,u=n.offsetHeight;e.value={width:l,height:u}});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else e.value=void 0}),{width:t,height:i}}function dd(r){const e=sl("",1e3);return{search:e,handleTypeaheadSearch:(n,s)=>{e.value=e.value+n;{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=fd(u,e.value,l?.textValue),d=o.find(h=>h.textValue===c);return d&&d.ref.focus(),d?.ref}},resetTypeahead:()=>{e.value=""}}}function hd(r,e){return r.map((t,i)=>r[(e+i)%r.length])}function fd(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=t?r.indexOf(t):-1;let a=hd(r,Math.max(s,0));n.length===1&&(a=a.filter(u=>u!==t));const l=a.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==t?l:void 0}const[Lt,pd]=De("DialogRoot");var md=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(r,{emit:e}){const t=r,n=nt(t,"open",e,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=O(),a=O(),{modal:o}=vt(t);return pd({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:l=>{n.value=l},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:a}),(l,u)=>A(l.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),fa=md,gd=z({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r;X();const t=Lt();return(i,n)=>(v(),C(f(ne),H(e,{type:i.as==="button"?"button":void 0,onClick:n[0]||(n[0]=s=>f(t).onOpenChange(!1))}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["type"]))}}),Cl=gd;const yd=ac(()=>O([]));function vd(){const r=yd();return{add(e){const t=r.value[0];e!==t&&t?.pause(),r.value=Ja(r.value,e),r.value.unshift(e)},remove(e){r.value=Ja(r.value,e),r.value[0]?.resume()}}}function Ja(r,e){const t=[...r],i=t.indexOf(e);return i!==-1&&t.splice(i,1),t}function bd(r){return r.filter(e=>e.tagName!=="A")}var xd=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(r,{emit:e}){const t=r,i=e,{currentRef:n,currentElement:s}=X(),a=O(null),o=vd(),l=ra({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});gt(c=>{if(!Ln)return;const d=s.value;if(!t.trapped)return;function h(y){if(l.paused||!d)return;const w=y.target;d.contains(w)?a.value=w:pi(a.value,{select:!0})}function p(y){if(l.paused||!d)return;const w=y.relatedTarget;w!==null&&(d.contains(w)||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 Xe(),!d)return;o.add(l);const h=pt();if(!d.contains(h)){const m=new CustomEvent(es,Wa);d.addEventListener(es,g=>i("mountAutoFocus",g)),d.dispatchEvent(m),m.defaultPrevented||(lc(bd(uc(d)),{select:!0}),pt()===h&&pi(d))}c(()=>{d.removeEventListener(es,y=>i("mountAutoFocus",y));const m=new CustomEvent(ts,Wa),g=y=>{i("unmountAutoFocus",y)};d.addEventListener(ts,g),d.dispatchEvent(m),setTimeout(()=>{m.defaultPrevented||pi(h??document.body,{select:!0}),d.removeEventListener(ts,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]=oc(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(ne),{ref_key:"currentRef",ref:n,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:_(()=>[A(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),pa=xd;const wd="menu.itemSelect",Rs=["Enter"," "],_d=["ArrowDown","PageUp","Home"],Sl=["ArrowUp","PageDown","End"],Cd=[..._d,...Sl],Sd={ltr:[...Rs,"ArrowRight"],rtl:[...Rs,"ArrowLeft"]},Ad={ltr:["ArrowLeft"],rtl:["ArrowRight"]};function ma(r){return r?"open":"closed"}function kn(r){return r==="indeterminate"}function ga(r){return kn(r)?"indeterminate":r?"checked":"unchecked"}function Md(r){const e=pt();for(const t of r)if(t===e||(t.focus(),pt()!==e))return}function Bd(r,e){const{x:t,y:i}=r;let n=!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&&(n=!n)}return n}function qd(r,e){if(!e)return!1;const t={x:r.clientX,y:r.clientY};return Bd(t,e)}function _r(r){return r.pointerType==="mouse"}var kd=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(r,{emit:e}){const t=r,i=e,n=Lt(),{forwardRef:s,currentElement:a}=X();return n.titleId||=yt(void 0,"reka-dialog-title"),n.descriptionId||=yt(void 0,"reka-dialog-description"),Re(()=>{n.contentElement=a,pt()!==document.body&&(n.triggerElement.value=pt())}),(o,l)=>(v(),C(f(pa),{"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(qr),H({id:f(n).contentId,ref:f(s),as:o.as,"as-child":o.asChild,"disable-outside-pointer-events":o.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(n).descriptionId,"aria-labelledby":f(n).titleId,"data-state":f(ma)(f(n).open.value)},o.$attrs,{onDismiss:l[0]||(l[0]=u=>f(n).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"]))}}),Al=kd,Ed=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(r,{emit:e}){const t=r,i=e,n=Lt(),s=nr(i),{forwardRef:a,currentElement:o}=X();return ha(o),(l,u)=>(v(),C(Al,H({...t,...f(s)},{ref:f(a),"trap-focus":f(n).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(c.preventDefault(),f(n).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"]))}}),Fd=Ed,Od=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(r,{emit:e}){const t=r,n=nr(e);X();const s=Lt(),a=O(!1),o=O(!1);return(l,u)=>(v(),C(Al,H({...t,...f(n)},{"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))}}),zd=Od,Td=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(r,{emit:e}){const t=r,i=e,n=Lt(),s=nr(i),{forwardRef:a}=X();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(n).open.value},{default:_(()=>[f(n).modal.value?(v(),C(Fd,H({key:0,ref:f(a)},{...t,...f(s),...o.$attrs}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(zd,H({key:1,ref:f(a)},{...t,...f(s),...o.$attrs}),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),ya=Td,Id=z({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(r){const e=r;X();const t=Lt();return(i,n)=>(v(),C(f(ne),H(e,{id:f(t).descriptionId}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["id"]))}}),er=Id,Pd=z({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Lt();return da(!0),X(),(t,i)=>(v(),C(f(ne),{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"]))}}),Rd=Pd,Dd=z({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Lt(),{forwardRef:t}=X();return(i,n)=>f(e)?.modal.value?(v(),C(f($t),{key:0,present:i.forceMount||f(e).open.value},{default:_(()=>[F(Rd,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)}}),va=Dd,$d=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),ba=$d,Ld=z({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(r){const e=r,t=Lt();return X(),(i,n)=>(v(),C(f(ne),H(e,{id:f(t).titleId}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["id"]))}}),tr=Ld,Hd=z({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Lt(),{forwardRef:i,currentElement:n}=X();return t.contentId||=yt(void 0,"reka-dialog-content"),Re(()=>{t.triggerElement.value=n.value}),(s,a)=>(v(),C(f(ne),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"]))}}),xa=Hd;const Nd="rovingFocusGroup.onEntryFocus",Vd={bubbles:!1,cancelable:!0},Ud={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jd(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function Gd(r,e,t){const i=jd(r.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Ud[i]}function Ml(r,e=!1){const t=pt();for(const i of r)if(i===t||(i.focus({preventScroll:e}),pt()!==t))return}function Wd(r,e){return r.map((t,i)=>r[(e+i)%r.length])}const[Kd,Yd]=De("RovingFocusGroup");var Xd=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(r,{expose:e,emit:t}){const i=r,n=t,{loop:s,orientation:a,dir:o}=vt(i),l=Vn(o),u=nt(i,"currentTabStopId",n,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),c=O(!1),d=O(!1),h=O(0),{getItems:p,CollectionSlot:m}=na({isProvider:!0});function g(w){const x=!d.value;if(w.currentTarget&&w.target===w.currentTarget&&x&&!c.value){const b=new CustomEvent(Nd,Vd);if(w.currentTarget.dispatchEvent(b),n("entryFocus",b),!b.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);Ml(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:w=>{u.value=w},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{h.value++},onFocusableItemRemove:()=>{h.value--}}),(w,x)=>(v(),C(f(m),null,{default:_(()=>[F(f(ne),{tabindex:c.value||h.value===0?-1:0,"data-orientation":f(a),as:w.as,"as-child":w.asChild,dir:f(l),style:{outline:"none"},onMousedown:x[0]||(x[0]=b=>d.value=!0),onMouseup:y,onFocus:g,onBlur:x[1]||(x[1]=b=>c.value=!1)},{default:_(()=>[A(w.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Bl=Xd,Jd=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(r){const e=r,t=Kd(),i=yt(),n=k(()=>e.tabStopId||i),s=k(()=>t.currentTabStopId.value===n.value),{getItems:a,CollectionItem:o}=na();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=Gd(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?Wd(d,h+1):d.slice(h+1)}Xe(()=>Ml(d))}}return(u,c)=>(v(),C(f(o),null,{default:_(()=>[F(f(ne),{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(n.value):d.preventDefault()}),onFocus:c[1]||(c[1]=d=>f(t).onItemFocus(n.value)),onKeydown:l},{default:_(()=>[A(u.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),ql=Jd,Zd=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(r){const e=r,{primitiveElement:t,currentElement:i}=Er(),n=k(()=>e.checked??e.value);return _e(n,(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(Fr,H({ref_key:"primitiveElement",ref:t},{...e,...s.$attrs},{as:"input"}),null,16))}}),Za=Zd,Qd=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(r){const e=r,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((n,s)=>typeof n=="object"?Object.entries(n).map(([a,o])=>({name:`${e.name}[${s}][${a}]`,value:o})):{name:`${e.name}[${s}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,s])=>({name:`${e.name}[${n}]`,value:s})):[]);return(n,s)=>(v(),V(we,null,[R(" We render single input if it's required "),t.value?(v(),C(Za,H({key:n.name},{...e,...n.$attrs},{name:n.name,value:n.value}),null,16,["name","value"])):(v(!0),V(we,{key:1},Ye(i.value,a=>(v(),C(Za,H({key:a.name},{ref_for:!0},{...e,...n.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))],2112))}}),kl=Qd;const[eh,q0]=De("CheckboxGroupRoot");function En(r){return r==="indeterminate"}function El(r){return En(r)?"indeterminate":r?"checked":"unchecked"}const[th,ih]=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(r,{emit:e}){const t=r,i=e,{forwardRef:n,currentElement:s}=X(),a=eh(null),o=nt(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:Ya(a.modelValue.value,t.value));function c(){if(Ki(a?.modelValue.value))o.value=En(o.value)?!0:!o.value;else{const p=[...a.modelValue.value||[]];if(Ya(p,t.value)){const m=p.findIndex(g=>Ps(g,t.value));p.splice(m,1)}else p.push(t.value);a.modelValue.value=p}}const d=xl(s),h=k(()=>t.id&&s.value?document.querySelector(`[for="${t.id}"]`)?.innerText:void 0);return ih({disabled:l,state:u}),(p,m)=>(v(),C(sr(f(a)?.rovingFocus.value?f(ql):f(ne)),H(p.$attrs,{id:p.id,ref:f(n),role:"checkbox","as-child":p.asChild,as:p.as,type:p.as==="button"?"button":void 0,"aria-checked":f(En)(u.value)?"mixed":u.value,"aria-required":p.required,"aria-label":p.$attrs["aria-label"]||h.value,"data-state":f(El)(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(kl),{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"]))}}),nh=rh,sh=z({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const{forwardRef:e}=X(),t=th();return(i,n)=>(v(),C(f($t),{present:i.forceMount||f(En)(f(t).state.value)||f(t).state.value===!0},{default:_(()=>[F(f(ne),H({ref:f(e),"data-state":f(El)(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"]))}}),ah=sh;const[Fl,oh]=De("PopperRoot");var lh=z({inheritAttrs:!1,__name:"PopperRoot",setup(r){const e=O();return oh({anchor:e,onAnchorChange:t=>e.value=t}),(t,i)=>A(t.$slots,"default")}}),Ir=lh,uh=z({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{forwardRef:t,currentElement:i}=X(),n=Fl();return ll(()=>{n.onAnchorChange(e.reference??i.value)}),(s,a)=>(v(),C(f(ne),{ref:f(t),as:s.as,"as-child":s.asChild},{default:_(()=>[A(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),Pr=uh;const ch={key:0,d:"M0 0L6 6L12 0"},dh={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var hh=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(r){const e=r;return X(),(t,i)=>(v(),C(f(ne),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",dh)):(v(),V("path",ch))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),fh=hh;function ph(r){return r!==null}function mh(r){return{name:"transformOrigin",options:r,fn(e){const{placement:t,rects:i,middlewareData:n}=e,a=n.arrow?.centerOffset!==0,o=a?0:r.arrowWidth,l=a?0:r.arrowHeight,[u,c]=Ds(t),d={start:"0%",center:"50%",end:"100%"}[c],h=(n.arrow?.x??0)+o/2,p=(n.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 Ds(r){const[e,t="center"]=r.split("-");return[e,t]}const gh=["top","right","bottom","left"],si=Math.min,ot=Math.max,Fn=Math.round,Qr=Math.floor,Rt=r=>({x:r,y:r}),yh={left:"right",right:"left",bottom:"top",top:"bottom"},vh={start:"end",end:"start"};function $s(r,e,t){return ot(r,si(e,t))}function Yt(r,e){return typeof r=="function"?r(e):r}function Xt(r){return r.split("-")[0]}function lr(r){return r.split("-")[1]}function wa(r){return r==="x"?"y":"x"}function _a(r){return r==="y"?"height":"width"}const bh=new Set(["top","bottom"]);function It(r){return bh.has(Xt(r))?"y":"x"}function Ca(r){return wa(It(r))}function xh(r,e,t){t===void 0&&(t=!1);const i=lr(r),n=Ca(r),s=_a(n);let a=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=On(a)),[a,On(a)]}function wh(r){const e=On(r);return[Ls(r),e,Ls(e)]}function Ls(r){return r.replace(/start|end/g,e=>vh[e])}const Qa=["left","right"],eo=["right","left"],_h=["top","bottom"],Ch=["bottom","top"];function Sh(r,e,t){switch(r){case"top":case"bottom":return t?e?eo:Qa:e?Qa:eo;case"left":case"right":return e?_h:Ch;default:return[]}}function Ah(r,e,t,i){const n=lr(r);let s=Sh(Xt(r),t==="start",i);return n&&(s=s.map(a=>a+"-"+n),e&&(s=s.concat(s.map(Ls)))),s}function On(r){return r.replace(/left|right|bottom|top/g,e=>yh[e])}function Mh(r){return{top:0,right:0,bottom:0,left:0,...r}}function Ol(r){return typeof r!="number"?Mh(r):{top:r,right:r,bottom:r,left:r}}function zn(r){const{x:e,y:t,width:i,height:n}=r;return{width:i,height:n,top:t,left:e,right:e+i,bottom:t+n,x:e,y:t}}function to(r,e,t){let{reference:i,floating:n}=r;const s=It(e),a=Ca(e),o=_a(a),l=Xt(e),u=s==="y",c=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,h=i[o]/2-n[o]/2;let p;switch(l){case"top":p={x:c,y:i.y-n.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-n.width,y:d};break;default:p={x:i.x,y:i.y}}switch(lr(e)){case"start":p[a]-=h*(t&&u?-1:1);break;case"end":p[a]+=h*(t&&u?-1:1);break}return p}const Bh=async(r,e,t)=>{const{placement:i="bottom",strategy:n="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:r,floating:e,strategy:n}),{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:w}=o[g],{x,y:b,data:S,reset:q}=await w({x:c,y:d,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:u,platform:a,elements:{reference:r,floating:e}});c=x??c,d=b??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:r,floating:e,strategy:n}):q.rects),{x:c,y:d}=to(u,h,l)),g=-1)}return{x:c,y:d,placement:h,strategy:n,middlewareData:p}};async function Cr(r,e){var t;e===void 0&&(e={});const{x:i,y:n,platform:s,rects:a,elements:o,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Yt(e,r),m=Ol(p),y=o[h?d==="floating"?"reference":"floating":d],w=zn(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})),x=d==="floating"?{x:i,y:n,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),S=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},q=zn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:x,offsetParent:b,strategy:l}):x);return{top:(w.top-q.top+m.top)/S.y,bottom:(q.bottom-w.bottom+m.bottom)/S.y,left:(w.left-q.left+m.left)/S.x,right:(q.right-w.right+m.right)/S.x}}const qh=r=>({name:"arrow",options:r,async fn(e){const{x:t,y:i,placement:n,rects:s,platform:a,elements:o,middlewareData:l}=e,{element:u,padding:c=0}=Yt(r,e)||{};if(u==null)return{};const d=Ol(c),h={x:t,y:i},p=Ca(n),m=_a(p),g=await a.getDimensions(u),y=p==="y",w=y?"top":"left",x=y?"bottom":"right",b=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[b]:0;(!B||!await(a.isElement==null?void 0:a.isElement(M)))&&(B=o.floating[b]||s.floating[m]);const L=S/2-q/2,E=B/2-g[m]/2-1,D=si(d[w],E),U=si(d[x],E),G=D,ee=B-g[m]-U,te=B/2-g[m]/2+L,re=$s(G,te,ee),K=!l.arrow&&lr(n)!=null&&te!==re&&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]:re,centerOffset:te-re-Q,...K&&{alignmentOffset:Q}},reset:K}}}),kh=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,i;const{placement:n,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}=Yt(r,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const w=Xt(n),x=It(o),b=Xt(o)===o,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),q=h||(b||!g?[On(o)]:wh(o)),M=m!=="none";!h&&M&&q.push(...Ah(o,g,m,S));const B=[o,...q],L=await Cr(e,y),E=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(c&&E.push(L[w]),d){const te=xh(n,a,S);E.push(L[te[0]],L[te[1]])}if(D=[...D,{placement:n,overflows:E}],!E.every(te=>te<=0)){var U,G;const te=(((U=s.flip)==null?void 0:U.index)||0)+1,re=B[te];if(re&&(!(d==="alignment"?x!==It(re):!1)||D.every(J=>It(J.placement)===x?J.overflows[0]>0:!0)))return{data:{index:te,overflows:D},reset:{placement:re}};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===x||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(n!==K)return{reset:{placement:K}}}return{}}}};function io(r,e){return{top:r.top-e.height,right:r.right-e.width,bottom:r.bottom-e.height,left:r.left-e.width}}function ro(r){return gh.some(e=>r[e]>=0)}const Eh=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(e){const{rects:t}=e,{strategy:i="referenceHidden",...n}=Yt(r,e);switch(i){case"referenceHidden":{const s=await Cr(e,{...n,elementContext:"reference"}),a=io(s,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ro(a)}}}case"escaped":{const s=await Cr(e,{...n,altBoundary:!0}),a=io(s,t.floating);return{data:{escapedOffsets:a,escaped:ro(a)}}}default:return{}}}}},zl=new Set(["left","top"]);async function Fh(r,e){const{placement:t,platform:i,elements:n}=r,s=await(i.isRTL==null?void 0:i.isRTL(n.floating)),a=Xt(t),o=lr(t),l=It(t)==="y",u=zl.has(a)?-1:1,c=s&&l?-1:1,d=Yt(e,r);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 Oh=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,i;const{x:n,y:s,placement:a,middlewareData:o}=e,l=await Fh(e,r);return a===((t=o.offset)==null?void 0:t.placement)&&(i=o.arrow)!=null&&i.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:a}}}}},zh=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:i,placement:n}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:y=>{let{x:w,y:x}=y;return{x:w,y:x}}},...l}=Yt(r,e),u={x:t,y:i},c=await Cr(e,l),d=It(Xt(n)),h=wa(d);let p=u[h],m=u[d];if(s){const y=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+c[y],b=p-c[w];p=$s(x,p,b)}if(a){const y=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=m+c[y],b=m-c[w];m=$s(x,m,b)}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}}}}}},Th=function(r){return r===void 0&&(r={}),{options:r,fn(e){const{x:t,y:i,placement:n,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=Yt(r,e),c={x:t,y:i},d=It(n),h=wa(d);let p=c[h],m=c[d];const g=Yt(o,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=h==="y"?"height":"width",S=s.reference[h]-s.floating[b]+y.mainAxis,q=s.reference[h]+s.reference[b]-y.mainAxis;p<S?p=S:p>q&&(p=q)}if(u){var w,x;const b=h==="y"?"width":"height",S=zl.has(Xt(n)),q=s.reference[d]-s.floating[b]+(S&&((w=a.offset)==null?void 0:w[d])||0)+(S?0:y.crossAxis),M=s.reference[d]+s.reference[b]+(S?0:((x=a.offset)==null?void 0:x[d])||0)-(S?y.crossAxis:0);m<q?m=q:m>M&&(m=M)}return{[h]:p,[d]:m}}}},Ih=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){var t,i;const{placement:n,rects:s,platform:a,elements:o}=e,{apply:l=()=>{},...u}=Yt(r,e),c=await Cr(e,u),d=Xt(n),h=lr(n),p=It(n)==="y",{width:m,height:g}=s.floating;let y,w;d==="top"||d==="bottom"?(y=d,w=h===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(w=d,y=h==="end"?"top":"bottom");const x=g-c.top-c.bottom,b=m-c.left-c.right,S=si(g-c[y],x),q=si(m-c[w],b),M=!e.middlewareData.shift;let B=S,L=q;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(L=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(B=x),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 Un(){return typeof window<"u"}function Mi(r){return Sa(r)?(r.nodeName||"").toLowerCase():"#document"}function ut(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Ht(r){var e;return(e=(Sa(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Sa(r){return Un()?r instanceof Node||r instanceof ut(r).Node:!1}function Ot(r){return Un()?r instanceof Element||r instanceof ut(r).Element:!1}function Dt(r){return Un()?r instanceof HTMLElement||r instanceof ut(r).HTMLElement:!1}function no(r){return!Un()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof ut(r).ShadowRoot}const Ph=new Set(["inline","contents"]);function Rr(r){const{overflow:e,overflowX:t,overflowY:i,display:n}=zt(r);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!Ph.has(n)}const Rh=new Set(["table","td","th"]);function Dh(r){return Rh.has(Mi(r))}const $h=[":popover-open",":modal"];function jn(r){return $h.some(e=>{try{return r.matches(e)}catch{return!1}})}const Lh=["transform","translate","scale","rotate","perspective"],Hh=["transform","translate","scale","rotate","perspective","filter"],Nh=["paint","layout","strict","content"];function Aa(r){const e=Ma(),t=Ot(r)?zt(r):r;return Lh.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)||Hh.some(i=>(t.willChange||"").includes(i))||Nh.some(i=>(t.contain||"").includes(i))}function Vh(r){let e=ai(r);for(;Dt(e)&&!ir(e);){if(Aa(e))return e;if(jn(e))return null;e=ai(e)}return null}function Ma(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Uh=new Set(["html","body","#document"]);function ir(r){return Uh.has(Mi(r))}function zt(r){return ut(r).getComputedStyle(r)}function Gn(r){return Ot(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function ai(r){if(Mi(r)==="html")return r;const e=r.assignedSlot||r.parentNode||no(r)&&r.host||Ht(r);return no(e)?e.host:e}function Tl(r){const e=ai(r);return ir(e)?r.ownerDocument?r.ownerDocument.body:r.body:Dt(e)&&Rr(e)?e:Tl(e)}function Sr(r,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=Tl(r),s=n===((i=r.ownerDocument)==null?void 0:i.body),a=ut(n);if(s){const o=Hs(a);return e.concat(a,a.visualViewport||[],Rr(n)?n:[],o&&t?Sr(o):[])}return e.concat(n,Sr(n,[],t))}function Hs(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Il(r){const e=zt(r);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const n=Dt(r),s=n?r.offsetWidth:t,a=n?r.offsetHeight:i,o=Fn(t)!==s||Fn(i)!==a;return o&&(t=s,i=a),{width:t,height:i,$:o}}function Ba(r){return Ot(r)?r:r.contextElement}function Yi(r){const e=Ba(r);if(!Dt(e))return Rt(1);const t=e.getBoundingClientRect(),{width:i,height:n,$:s}=Il(e);let a=(s?Fn(t.width):t.width)/i,o=(s?Fn(t.height):t.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const jh=Rt(0);function Pl(r){const e=ut(r);return!Ma()||!e.visualViewport?jh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Gh(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==ut(r)?!1:e}function Ci(r,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=r.getBoundingClientRect(),s=Ba(r);let a=Rt(1);e&&(i?Ot(i)&&(a=Yi(i)):a=Yi(r));const o=Gh(s,t,i)?Pl(s):Rt(0);let l=(n.left+o.x)/a.x,u=(n.top+o.y)/a.y,c=n.width/a.x,d=n.height/a.y;if(s){const h=ut(s),p=i&&Ot(i)?ut(i):i;let m=h,g=Hs(m);for(;g&&i&&p!==m;){const y=Yi(g),w=g.getBoundingClientRect(),x=zt(g),b=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=b,u+=S,m=ut(g),g=Hs(m)}}return zn({width:c,height:d,x:l,y:u})}function qa(r,e){const t=Gn(r).scrollLeft;return e?e.left+t:Ci(Ht(r)).left+t}function Rl(r,e,t){t===void 0&&(t=!1);const i=r.getBoundingClientRect(),n=i.left+e.scrollLeft-(t?0:qa(r,i)),s=i.top+e.scrollTop;return{x:n,y:s}}function Wh(r){let{elements:e,rect:t,offsetParent:i,strategy:n}=r;const s=n==="fixed",a=Ht(i),o=e?jn(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"||Rr(a))&&(l=Gn(i)),Dt(i))){const p=Ci(i);u=Yi(i),c.x=p.x+i.clientLeft,c.y=p.y+i.clientTop}const h=a&&!d&&!s?Rl(a,l,!0):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 Kh(r){return Array.from(r.getClientRects())}function Yh(r){const e=Ht(r),t=Gn(r),i=r.ownerDocument.body,n=ot(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=ot(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-t.scrollLeft+qa(r);const o=-t.scrollTop;return zt(i).direction==="rtl"&&(a+=ot(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:a,y:o}}function Xh(r,e){const t=ut(r),i=Ht(r),n=t.visualViewport;let s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){s=n.width,a=n.height;const u=Ma();(!u||u&&e==="fixed")&&(o=n.offsetLeft,l=n.offsetTop)}return{width:s,height:a,x:o,y:l}}const Jh=new Set(["absolute","fixed"]);function Zh(r,e){const t=Ci(r,!0,e==="fixed"),i=t.top+r.clientTop,n=t.left+r.clientLeft,s=Dt(r)?Yi(r):Rt(1),a=r.clientWidth*s.x,o=r.clientHeight*s.y,l=n*s.x,u=i*s.y;return{width:a,height:o,x:l,y:u}}function so(r,e,t){let i;if(e==="viewport")i=Xh(r,t);else if(e==="document")i=Yh(Ht(r));else if(Ot(e))i=Zh(e,t);else{const n=Pl(r);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return zn(i)}function Dl(r,e){const t=ai(r);return t===e||!Ot(t)||ir(t)?!1:zt(t).position==="fixed"||Dl(t,e)}function Qh(r,e){const t=e.get(r);if(t)return t;let i=Sr(r,[],!1).filter(o=>Ot(o)&&Mi(o)!=="body"),n=null;const s=zt(r).position==="fixed";let a=s?ai(r):r;for(;Ot(a)&&!ir(a);){const o=zt(a),l=Aa(a);!l&&o.position==="fixed"&&(n=null),(s?!l&&!n:!l&&o.position==="static"&&!!n&&Jh.has(n.position)||Rr(a)&&!l&&Dl(r,a))?i=i.filter(c=>c!==a):n=o,a=ai(a)}return e.set(r,i),i}function ef(r){let{element:e,boundary:t,rootBoundary:i,strategy:n}=r;const a=[...t==="clippingAncestors"?jn(e)?[]:Qh(e,this._c):[].concat(t),i],o=a[0],l=a.reduce((u,c)=>{const d=so(e,c,n);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},so(e,o,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tf(r){const{width:e,height:t}=Il(r);return{width:e,height:t}}function rf(r,e,t){const i=Dt(e),n=Ht(e),s=t==="fixed",a=Ci(r,!0,s,e);let o={scrollLeft:0,scrollTop:0};const l=Rt(0);function u(){l.x=qa(n)}if(i||!i&&!s)if((Mi(e)!=="body"||Rr(n))&&(o=Gn(e)),i){const p=Ci(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else n&&u();s&&!i&&n&&u();const c=n&&!i&&!s?Rl(n,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 ss(r){return zt(r).position==="static"}function ao(r,e){if(!Dt(r)||zt(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return Ht(r)===t&&(t=t.ownerDocument.body),t}function $l(r,e){const t=ut(r);if(jn(r))return t;if(!Dt(r)){let n=ai(r);for(;n&&!ir(n);){if(Ot(n)&&!ss(n))return n;n=ai(n)}return t}let i=ao(r,e);for(;i&&Dh(i)&&ss(i);)i=ao(i,e);return i&&ir(i)&&ss(i)&&!Aa(i)?t:i||Vh(r)||t}const nf=async function(r){const e=this.getOffsetParent||$l,t=this.getDimensions,i=await t(r.floating);return{reference:rf(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function sf(r){return zt(r).direction==="rtl"}const af={convertOffsetParentRelativeRectToViewportRelativeRect:Wh,getDocumentElement:Ht,getClippingRect:ef,getOffsetParent:$l,getElementRects:nf,getClientRects:Kh,getDimensions:tf,getScale:Yi,isElement:Ot,isRTL:sf};function Ll(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function of(r,e){let t=null,i;const n=Ht(r);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=r.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(o||e(),!h||!p)return;const m=Qr(d),g=Qr(n.clientWidth-(c+h)),y=Qr(n.clientHeight-(d+p)),w=Qr(c),b={rootMargin:-m+"px "+-g+"px "+-y+"px "+-w+"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&&!Ll(u,r.getBoundingClientRect())&&a(),S=!1}try{t=new IntersectionObserver(q,{...b,root:n.ownerDocument})}catch{t=new IntersectionObserver(q,b)}t.observe(r)}return a(!0),s}function lf(r,e,t,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=Ba(r),c=n||s?[...u?Sr(u):[],...Sr(e)]:[];c.forEach(w=>{n&&w.addEventListener("scroll",t,{passive:!0}),s&&w.addEventListener("resize",t)});const d=u&&o?of(u,t):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),t()}),u&&!l&&p.observe(u),p.observe(e));let m,g=l?Ci(r):null;l&&y();function y(){const w=Ci(r);g&&!Ll(g,w)&&t(),g=w,m=requestAnimationFrame(y)}return t(),()=>{var w;c.forEach(x=>{n&&x.removeEventListener("scroll",t),s&&x.removeEventListener("resize",t)}),d?.(),(w=p)==null||w.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const uf=Oh,cf=zh,oo=kh,df=Ih,hf=Eh,ff=qh,pf=Th,mf=(r,e,t)=>{const i=new Map,n={platform:af,...t},s={...n.platform,_c:i};return Bh(r,e,{...n,platform:s})};function gf(r){return r!=null&&typeof r=="object"&&"$el"in r}function Ns(r){if(gf(r)){const e=r.$el;return Sa(e)&&Mi(e)==="#comment"?null:e}return r}function ji(r){return typeof r=="function"?r():f(r)}function yf(r){return{name:"arrow",options:r,fn(e){const t=Ns(ji(r.element));return t==null?{}:ff({element:t,padding:r.padding}).fn(e)}}}function Hl(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(r,e){const t=Hl(r);return Math.round(e*t)/t}function vf(r,e,t){t===void 0&&(t={});const i=t.whileElementsMounted,n=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(()=>Ns(r.value)),c=k(()=>Ns(e.value)),d=O(0),h=O(0),p=O(o.value),m=O(a.value),g=tt({}),y=O(!1),w=k(()=>{const B={position:p.value,left:"0",top:"0"};if(!c.value)return B;const L=lo(c.value,d.value),E=lo(c.value,h.value);return l.value?{...B,transform:"translate("+L+"px, "+E+"px)",...Hl(c.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:L+"px",top:E+"px"}});let x;function b(){if(u.value==null||c.value==null)return;const B=n.value;mf(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 x=="function"&&(x(),x=void 0)}function q(){if(S(),i===void 0){b();return}if(u.value!=null&&c.value!=null){x=i(u.value,c.value,b);return}}function M(){n.value||(y.value=!1)}return _e([s,a,o,n],b,{flush:"sync"}),_e([u,c],q,{flush:"sync"}),_e(n,M,{flush:"sync"}),cc()&&dc(S),{x:Ei(d),y:Ei(h),strategy:Ei(p),placement:Ei(m),middlewareData:Ei(g),isPositioned:Ei(y),floatingStyles:w,update:b}}const Nl={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},[bf,xf]=De("PopperContent");var wf=z({inheritAttrs:!1,__name:"PopperContent",props:ul({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}},{...Nl}),emits:["placed"],setup(r,{emit:e}){const t=r,i=e,n=Fl(),{forwardRef:s,currentElement:a}=X(),o=O(),l=O(),{width:u,height:c}=cd(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(ph),altBoundary:p.value.length>0})),g=k(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),y=hc(()=>[uf({mainAxis:t.sideOffset+c.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&oo({...m.value,...g.value}),t.avoidCollisions&&cf({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?pf():void 0,...m.value}),!t.prioritizePosition&&t.avoidCollisions&&oo({...m.value,...g.value}),df({...m.value,apply:({elements:G,rects:ee,availableWidth:te,availableHeight:re})=>{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",`${re}px`),J.setProperty("--reka-popper-anchor-width",`${K}px`),J.setProperty("--reka-popper-anchor-height",`${Q}px`)}}),l.value&&yf({element:l.value,padding:t.arrowPadding}),mh({arrowWidth:u.value,arrowHeight:c.value}),t.hideWhenDetached&&hf({strategy:"referenceHidden",...m.value})]),w=k(()=>t.reference??n.anchor.value),{floatingStyles:x,placement:b,isPositioned:S,middlewareData:q}=vf(w,o,{strategy:t.positionStrategy,placement:d,whileElementsMounted:(...G)=>lf(...G,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:y}),M=k(()=>Ds(b.value)[0]),B=k(()=>Ds(b.value)[1]);ll(()=>{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 xf({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(x),transform:f(S)?f(x).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(ne),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))}}),Wn=wf;const _f={top:"bottom",right:"left",bottom:"top",left:"right"};var Cf=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(r){const{forwardRef:e}=X(),t=bf(),i=k(()=>_f[t.placedSide.value]);return(n,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(fh,H(n.$attrs,{ref:f(e),style:{display:"block"},as:n.as,"as-child":n.asChild,rounded:n.rounded,width:n.width,height:n.height}),{default:_(()=>[A(n.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Kn=Cf,Sf=z({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),C(f(Pr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Vl=Sf,Af=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(r){const e=r;return(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Mf=Af;function Bf(){const r=O(!1);return Re(()=>{ri("keydown",()=>{r.value=!0},{capture:!0,passive:!0}),ri(["pointerdown","pointermove"],()=>{r.value=!1},{capture:!0,passive:!0})}),r}const qf=nl(Bf),[Bi,Ul]=De(["MenuRoot","MenuSub"],"MenuContext"),[Dr,kf]=De("MenuRoot");var Ef=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(r,{emit:e}){const t=r,i=e,{modal:n,dir:s}=vt(t),a=Vn(s),o=nt(t,"open",i),l=O(),u=qf();return Ul({open:o,onOpenChange:c=>{o.value=c},content:l,onContentChange:c=>{l.value=c}}),kf({onClose:()=>{o.value=!1},isUsingKeyboardRef:u,dir:a,modal:n}),(c,d)=>(v(),C(f(Ir),null,{default:_(()=>[A(c.$slots,"default")]),_:3}))}}),Ff=Ef;const[ka,Of]=De("MenuContent");var zf=z({__name:"MenuContentImpl",props:ul({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}},{...Nl}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(r,{emit:e}){const t=r,i=e,n=Bi(),s=Dr(),{trapFocus:a,disableOutsidePointerEvents:o,loop:l}=vt(t);bl(),da(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:w,currentElement:x}=X(),{handleTypeaheadSearch:b}=dd();_e(x,E=>{n.onContentChange(E)}),Ai(()=>{window.clearTimeout(c.value)});function S(E){return p.value===h.value?.side&&qd(E,h.value?.area)}async function q(E){i("openAutoFocus",E),!E.defaultPrevented&&(E.preventDefault(),x.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=Xc(E,pt(),x.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 re=y.value?.getItems()??[];if(U&&(E.key==="Tab"&&E.preventDefault(),!G&&ee&&b(E.key,re)),E.target!==x.value||!Cd.includes(E.key))return;E.preventDefault();const K=[...re.map(Q=>Q.ref)];Sl.includes(E.key)&&K.reverse(),Md(K)}function B(E){E?.currentTarget?.contains?.(E.target)||(window.clearTimeout(c.value),u.value="")}function L(E){if(!_r(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 Of({onItemEnter:E=>!!S(E),onItemLeave:E=>{S(E)||(x.value?.focus(),g.value=null)},onTriggerLeave:E=>!!S(E),searchRef:u,pointerGraceTimerRef:d,onPointerGraceIntentChange:E=>{h.value=E}}),(E,D)=>(v(),C(f(pa),{"as-child":"",trapped:f(a),onMountAutoFocus:q,onUnmountAutoFocus:D[7]||(D[7]=U=>i("closeAutoFocus",U))},{default:_(()=>[F(f(qr),{"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(Bl),{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(Wn),{ref:f(w),role:"menu",as:E.as,"as-child":E.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":f(ma)(f(n).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=zf,Tf=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(r){const e=r,t=ka(),{forwardRef:i}=X(),{CollectionItem:n}=na(),s=O(!1);async function a(l){l.defaultPrevented||_r(l)&&(e.disabled?t.onItemLeave(l):t.onItemEnter(l)||l.currentTarget?.focus({preventScroll:!0}))}async function o(l){await Xe(),!l.defaultPrevented&&_r(l)&&t.onItemLeave(l)}return(l,u)=>(v(),C(f(n),{value:{textValue:l.textValue}},{default:_(()=>[F(f(ne),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 Xe(),!(c.defaultPrevented||l.disabled)&&(s.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await Xe(),!c.defaultPrevented&&(s.value=!1)})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),jl=Tf,If=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(r,{emit:e}){const t=r,i=e,{forwardRef:n,currentElement:s}=X(),a=Dr(),o=ka(),l=O(!1);async function u(){const c=s.value;if(!t.disabled&&c){const d=new CustomEvent(wd,{bubbles:!0,cancelable:!0});i("select",d),await Xe(),d.defaultPrevented?l.value=!1:a.onClose()}}return(c,d)=>(v(),C(jl,H(t,{ref:f(n),onClick:u,onPointerdown:d[0]||(d[0]=()=>{l.value=!0}),onPointerup:d[1]||(d[1]=async h=>{await Xe(),!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(Rs).includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})}),{default:_(()=>[A(c.$slots,"default")]),_:3},16))}}),Fa=If;const[Pf,Gl]=De(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var Rf=z({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const e=Pf({modelValue:O(!1)});return(t,i)=>(v(),C(f($t),{present:t.forceMount||f(kn)(f(e).modelValue.value)||f(e).modelValue.value===!0},{default:_(()=>[F(f(ne),{as:t.as,"as-child":t.asChild,"data-state":f(ga)(f(e).modelValue.value)},{default:_(()=>[A(t.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),Df=Rf,$f=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(r,{emit:e}){const t=r,i=e,n=nt(t,"modelValue",i);return Gl({modelValue:n}),(s,a)=>(v(),C(Fa,H({role:"menuitemcheckbox"},t,{"aria-checked":f(kn)(f(n))?"mixed":f(n),"data-state":f(ga)(f(n)),onSelect:a[0]||(a[0]=async o=>{i("select",o),f(kn)(f(n))?n.value=!0:n.value=!f(n)})}),{default:_(()=>[A(s.$slots,"default",{modelValue:f(n)})]),_:3},16,["aria-checked","data-state"]))}}),Lf=$f,Hf=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(r,{emit:e}){const t=r,i=e,n=Ce(t,i),s=Bi(),{forwardRef:a,currentElement:o}=X();return ha(o),(l,u)=>(v(),C(Ea,H(f(n),{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"]))}}),Nf=Hf,Vf=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(r,{emit:e}){const n=Ce(r,e),s=Bi();return(a,o)=>(v(),C(Ea,H(f(n),{"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))}}),Uf=Vf,jf=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(r,{emit:e}){const n=Ce(r,e),s=Bi(),a=Dr();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(s).open.value},{default:_(()=>[f(a).modal.value?(v(),C(Nf,oe(H({key:0},{...o.$attrs,...f(n)})),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(Uf,oe(H({key:1},{...o.$attrs,...f(n)})),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Gf=jf,Wf=z({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),C(f(ne),H({role:"group"},e),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Wl=Wf,Kf=z({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(r){const e=r;return(t,i)=>(v(),C(f(ne),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Yf=Kf,Xf=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Jf=Xf;const[Zf,Qf]=De("MenuRadioGroup");var ep=z({__name:"MenuRadioGroup",props:{modelValue:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=nt(t,"modelValue",e);return Qf({modelValue:n,onValueChange:s=>{n.value=s}}),(s,a)=>(v(),C(Wl,oe(le(t)),{default:_(()=>[A(s.$slots,"default",{modelValue:f(n)})]),_:3},16))}}),tp=ep,ip=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(r,{emit:e}){const t=r,i=e,{value:n}=vt(t),s=Zf(),a=k(()=>s.modelValue.value===n?.value);return Gl({modelValue:a}),(o,l)=>(v(),C(Fa,H({role:"menuitemradio"},t,{"aria-checked":a.value,"data-state":f(ga)(a.value),onSelect:l[0]||(l[0]=async u=>{i("select",u),f(s).onValueChange(f(n))})}),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),rp=ip,np=z({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),C(f(ne),H(e,{role:"separator","aria-orientation":"horizontal"}),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),sp=np;const[Kl,ap]=De("MenuSub");var op=z({__name:"MenuSub",props:{open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=nt(t,"open",e,{defaultValue:!1,passive:t.open===void 0}),s=Bi(),a=O(),o=O();return gt(l=>{s?.open.value===!1&&(n.value=!1),l(()=>n.value=!1)}),Ul({open:n,onOpenChange:l=>{n.value=l},content:o,onContentChange:l=>{o.value=l}}),ap({triggerId:"",contentId:"",trigger:a,onTriggerChange:l=>{a.value=l}}),(l,u)=>(v(),C(f(Ir),null,{default:_(()=>[A(l.$slots,"default")]),_:3}))}}),lp=op,up=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(r,{emit:e}){const n=Ce(r,e),s=Bi(),a=Dr(),o=Kl(),{forwardRef:l,currentElement:u}=X();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(n),{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(Ad)[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"]))}}),cp=up,dp=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(r){const e=r,t=Bi(),i=Dr(),n=Kl(),s=ka(),a=O(null);n.triggerId||=yt(void 0,"reka-menu-sub-trigger");function o(){a.value&&window.clearTimeout(a.value),a.value=null}Ai(()=>{o()});function l(d){!_r(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(!_r(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"],w=h[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:y,y:h.top},{x:w,y:h.top},{x:w,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===" "||Sd[i.dir.value].includes(d.key)&&(t.onOpenChange(!0),await Xe(),t.content.value?.focus(),d.preventDefault())}return(d,h)=>(v(),C(Vl,{"as-child":""},{default:_(()=>[F(jl,H(e,{id:f(n).triggerId,ref:p=>{f(n)?.onTriggerChange(p?.$el)},"aria-haspopup":"menu","aria-expanded":f(t).open.value,"aria-controls":f(n).contentId,"data-state":f(ma)(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}))}}),hp=dp;const[qi,fp]=De("PopoverRoot");var pp=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(r,{emit:e}){const t=r,i=e,{modal:n}=vt(t),s=nt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),a=O(),o=O(!1);return fp({contentId:"",triggerId:"",modal:n,open:s,onOpenChange:l=>{s.value=l},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:o}),(l,u)=>(v(),C(f(Ir),null,{default:_(()=>[A(l.$slots,"default",{open:f(s),close:()=>s.value=!1})]),_:3}))}}),mp=pp,gp=z({__name:"PopoverAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;X();const t=qi();return fc(()=>{t.hasCustomAnchor.value=!0}),Ai(()=>{t.hasCustomAnchor.value=!1}),(i,n)=>(v(),C(f(Pr),oe(le(e)),{default:_(()=>[A(i.$slots,"default")]),_:3},16))}}),yp=gp,vp=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),bp=vp,xp=z({__name:"PopoverClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r;X();const t=qi();return(i,n)=>(v(),C(f(ne),{type:i.as==="button"?"button":void 0,as:i.as,"as-child":e.asChild,onClick:n[0]||(n[0]=s=>f(t).onOpenChange(!1))},{default:_(()=>[A(i.$slots,"default")]),_:3},8,["type","as","as-child"]))}}),wp=xp,_p=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(r,{emit:e}){const t=r,i=e,n=Or(pc(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:s}=X(),a=qi();return bl(),(o,l)=>(v(),C(f(pa),{"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(qr),{"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(Wn),H(f(n),{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"]))}}),Yl=_p,Cp=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(r,{emit:e}){const t=r,i=e,n=qi(),s=O(!1);da(!0);const a=Ce(t,i),{forwardRef:o,currentElement:l}=X();return ha(l),(u,c)=>(v(),C(Yl,H(f(a),{ref:f(o),"trap-focus":f(n).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=fe(d=>{i("closeAutoFocus",d),s.value||f(n).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"]))}}),Sp=Cp,Ap=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(r,{emit:e}){const t=r,i=e,n=qi(),s=O(!1),a=O(!1),o=Ce(t,i);return(l,u)=>(v(),C(Yl,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(n).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(n).triggerElement.value?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16))}}),Mp=Ap,Bp=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(r,{emit:e}){const t=r,i=e,n=qi(),s=Ce(t,i),{forwardRef:a}=X();return n.contentId||=yt(void 0,"reka-popover-content"),(o,l)=>(v(),C(f($t),{present:o.forceMount||f(n).open.value},{default:_(()=>[f(n).modal.value?(v(),C(Sp,H({key:0},f(s),{ref:f(a)}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(Mp,H({key:1},f(s),{ref:f(a)}),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),qp=Bp,kp=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Ep=kp,Fp=z({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=qi(),{forwardRef:i,currentElement:n}=X();return t.triggerId||=yt(void 0,"reka-popover-trigger"),Re(()=>{t.triggerElement.value=n.value}),(s,a)=>(v(),C(sr(f(t).hasCustomAnchor.value?f(ne):f(Pr)),{"as-child":""},{default:_(()=>[F(f(ne),{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}))}}),Op=Fp,zp=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Mf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Xl=zp,Tp=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(r,{emit:e}){const t=r,n=nr(e);return X(),(s,a)=>(v(),C(f(Lf),oe(le({...t,...f(n)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Ip=Tp;const[Jl,Pp]=De("DropdownMenuRoot");var Rp=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(r,{emit:e}){const t=r,i=e;X();const n=nt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=O(),{modal:a,dir:o}=vt(t),l=Vn(o);return Pp({open:n,onOpenChange:u=>{n.value=u},onOpenToggle:()=>{n.value=!n.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:l}),(u,c)=>(v(),C(f(Ff),{open:f(n),"onUpdate:open":c[0]||(c[0]=d=>cl(n)?n.value=d:null),dir:f(l),modal:f(a)},{default:_(()=>[A(u.$slots,"default",{open:f(n)})]),_:3},8,["open","dir","modal"]))}}),Zl=Rp,Dp=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(r,{emit:e}){const n=Ce(r,e);X();const s=Jl(),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(Gf),H(f(n),{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"]))}}),$p=Dp,Lp=z({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(Wl),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Hp=Lp,Np=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(r,{emit:e}){const t=r,n=nr(e);return X(),(s,a)=>(v(),C(f(Fa),oe(le({...t,...f(n)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Vp=Np,Up=z({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(Df),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),jp=Up,Gp=z({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(Yf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Wp=Gp,Kp=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(r){const e=r;return(t,i)=>(v(),C(f(Jf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Yp=Kp,Xp=z({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=nr(e);return X(),(s,a)=>(v(),C(f(tp),oe(le({...t,...f(n)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Jp=Xp,Zp=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(r,{emit:e}){const n=Ce(r,e);return X(),(s,a)=>(v(),C(f(rp),oe(le(f(n))),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Qp=Zp,em=z({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(sp),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),tm=em,im=z({__name:"DropdownMenuSub",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=nt(t,"open",e,{passive:t.open===void 0,defaultValue:t.defaultOpen??!1});return X(),(s,a)=>(v(),C(f(lp),{open:f(n),"onUpdate:open":a[0]||(a[0]=o=>cl(n)?n.value=o:null)},{default:_(()=>[A(s.$slots,"default",{open:f(n)})]),_:3},8,["open"]))}}),rm=im,nm=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(r,{emit:e}){const n=Ce(r,e);return X(),(s,a)=>(v(),C(f(cp),H(f(n),{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))}}),sm=nm,am=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(r){const e=r;return X(),(t,i)=>(v(),C(f(hp),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),om=am,lm=z({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Jl(),{forwardRef:i,currentElement:n}=X();return Re(()=>{t.triggerElement=n}),t.triggerId||=yt(void 0,"reka-dropdown-menu-trigger"),(s,a)=>(v(),C(f(Vl),{"as-child":""},{default:_(()=>[F(f(ne),{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 Xe(),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}))}}),Ql=lm,um=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),cm=um;const[Oa,dm]=De("HoverCardRoot");var hm=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(r,{emit:e}){const t=r,i=e,{openDelay:n,closeDelay:s}=vt(t);X();const a=nt(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,n.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 dm({open:a,onOpenChange(y){a.value=y},onOpen:p,onClose:m,onDismiss:g,hasSelectionRef:u,isPointerDownOnContentRef:c,isPointerInTransitRef:d,triggerElement:h}),(y,w)=>(v(),C(f(Ir),null,{default:_(()=>[A(y.$slots,"default",{open:f(a)})]),_:3}))}}),fm=hm;function Vs(r){return e=>e.pointerType==="touch"?void 0:r()}function pm(r){const e=[],t=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var mm=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(r,{emit:e}){const t=r,i=e,n=Or(t),{forwardRef:s,currentElement:a}=X(),o=Oa(),{isPointerInTransit:l,onPointerExit:u}=wl(o.triggerElement,a);mc(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,Xe(()=>{document.getSelection()?.toString()!==""&&(o.hasSelectionRef.value=!0)})}return Re(()=>{a.value&&(document.addEventListener("pointerup",h),pm(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(qr),{"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(Wn),H({...f(n),...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"]))}}),gm=mm,ym=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(r,{emit:e}){const n=Ce(r,e),{forwardRef:s}=X(),a=Oa();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(a).open.value},{default:_(()=>[F(gm,H(f(n),{ref:f(s),onPointerenter:l[0]||(l[0]=u=>f(Vs)(f(a).onOpen)(u))}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),vm=ym,bm=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),xm=bm,wm=z({__name:"HoverCardTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"a"}},setup(r){const{forwardRef:e,currentElement:t}=X(),i=Oa();i.triggerElement=t;function n(){setTimeout(()=>{!i.isPointerInTransitRef.value&&!i.open.value&&i.onClose()},0)}return(s,a)=>(v(),C(f(Pr),{"as-child":"",reference:s.reference},{default:_(()=>[F(f(ne),{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(Vs)(f(i).onOpen)(o)),onPointerleave:a[1]||(a[1]=o=>f(Vs)(n)(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"]))}}),_m=wm,Cm=z({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(ne),H(e,{onMousedown:i[0]||(i[0]=n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})}),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),uo=Cm;let as=new Map,Us=!1;try{Us=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Tn=!1;try{Tn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const eu={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class tu{format(e){let t="";if(!Us&&this.options.signDisplay!=null?t=Am(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!Tn){var i;let{unit:n,unitDisplay:s="short",locale:a}=this.resolvedOptions();if(!n)return t;let o=(i=eu[n])===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),n=this.numberFormatter.formatToParts(t);return[...i.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Us&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Tn&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Sm(e,t),this.options=t}}function Sm(r,e={}){let{numberingSystem:t}=e;if(t&&r.includes("-nu-")&&(r.includes("-u-")||(r+="-u-"),r+=`-nu-${t}`),e.style==="unit"&&!Tn){var i;let{unit:a,unitDisplay:o="short"}=e;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=eu[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);e={...e,style:"decimal"}}let n=r+(e?Object.entries(e).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(as.has(n))return as.get(n);let s=new Intl.NumberFormat(r,e);return as.set(n,s),s}function Am(r,e,t){if(e==="auto")return r.format(t);if(e==="never")return r.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 n=r.format(-t),s=r.format(t),a=n.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),n.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return r.format(t)}}const Mm=new RegExp("^.*\\(.*\\).*$"),Bm=["latn","arab","hanidec","deva","beng","fullwide"];class iu{parse(e){return os(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,i){return os(this.locale,this.options,e).isValidPartialNumber(e,t,i)}getNumberingSystem(e){return os(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}const co=new Map;function os(r,e,t){let i=ho(r,e);if(!r.includes("-nu-")&&!i.isValidPartialNumber(t)){for(let n of Bm)if(n!==i.options.numberingSystem){let s=ho(r+(r.includes("-u-")?"-nu-":"-u-nu-")+n,e);if(s.isValidPartialNumber(t))return s}}return i}function ho(r,e){let t=r+(e?Object.entries(e).sort((n,s)=>n[0]<s[0]?-1:1).join():""),i=co.get(t);return i||(i=new qm(r,e),co.set(t,i)),i}class qm{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 n,s;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)+2,20),maximumFractionDigits:Math.min(((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)+2,20)};return new iu(this.locale,a).parse(new tu(this.locale,a).format(i))}return this.options.currencySign==="accounting"&&Mm.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=Em(e,this.formatter,this.options,t);var i,n;this.options.style==="percent"&&(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)>18||((n=this.options.maximumFractionDigits)!==null&&n!==void 0?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const fo=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),km=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Em(r,e,t,i){var n,s,a,o;let l=new Intl.NumberFormat(r,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=km.map(D=>l.formatToParts(D));var h;let p=(h=(n=u.find(D=>D.type==="minusSign"))===null||n===void 0?void 0:n.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(r,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(D=>D.type==="decimal"))===null||a===void 0?void 0:a.value,w=(o=u.find(D=>D.type==="group"))===null||o===void 0?void 0:o.value,x=u.filter(D=>!fo.has(D.type)).map(D=>po(D.value)),b=d.flatMap(D=>D.filter(U=>!fo.has(U.type)).map(U=>po(U.value))),S=[...new Set([...x,...b])].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:w,literals:q,numeral:L,index:D=>String(B.get(D))}}function Oi(r,e,t){return r.replaceAll?r.replaceAll(e,t):r.split(e).join(t)}function po(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ru(r){const{disabled:e}=r,t=O(),i=al(),n=()=>window.clearTimeout(t.value),s=h=>{n(),!e.value&&(i.trigger(),t.value=window.setTimeout(()=>{s(60)},h))},a=()=>{s(400)},o=()=>{n()},l=O(!1),u=k(()=>Hn(r.target)),c=h=>{h.button!==0||l.value||(h.preventDefault(),l.value=!0,a())},d=()=>{l.value=!1,o()};return Ln&&(ri(u||window,"pointerdown",c),ri(window,"pointerup",d),ri(window,"pointercancel",d)),{isPressed:l,onTrigger:i.on}}function mo(r,e=O({})){return dl(()=>new tu(r.value,e.value))}function Fm(r,e=O({})){return dl(()=>new iu(r.value,e.value))}function go(r,e,t){let i=r==="+"?e+t:e-t;if(e%1!==0||t%1!==0){const n=e.toString().split("."),s=t.toString().split("."),a=n[1]&&n[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=r==="+"?e+t:e-t,i/=l}return i}const[za,Om]=De("NumberFieldRoot");var zm=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(r,{emit:e}){const t=r,i=e,{disabled:n,readonly:s,disableWheelChange:a,invertWheelChange:o,min:l,max:u,step:c,stepSnapping:d,formatOptions:h,id:p,locale:m}=vt(t),g=nt(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),{primitiveElement:y,currentElement:w}=Er(),x=ud(m),b=xl(w),S=O(),q=k(()=>!Ki(g.value)&&(J(g.value)===l.value||l.value&&!isNaN(g.value)?go("-",g.value,c.value)<l.value:!1)),M=k(()=>!Ki(g.value)&&(J(g.value)===u.value||u.value&&!isNaN(g.value)?go("+",g.value,c.value)>u.value:!1));function B(ae,ye=1){if(S.value?.focus(),t.disabled||t.readonly)return;const dr=G.parse(S.value?.value??"");isNaN(dr)?g.value=l.value??0:ae==="increase"?g.value=J(dr+(c.value??1)*ye):g.value=J(dr-(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=mo(x,h),G=Fm(x,h),ee=k(()=>U.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),te=mo(x,h),re=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=Wc(ae,l.value,u.value):ye=Kc(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(re.value)):Q(ae)}return Om({modelValue:g,handleDecrease:E,handleIncrease:L,handleMinMaxValue:D,inputMode:ee,inputEl:S,onInputElement:ae=>S.value=ae,textValue:re,validate:K,applyInputValue:he,disabled:n,readonly:s,disableWheelChange:a,invertWheelChange:o,max:u,min:l,isDecreaseDisabled:q,isIncreaseDisabled:M,id:p}),(ae,ye)=>(v(),C(f(ne),H(ae.$attrs,{ref_key:"primitiveElement",ref:y,role:"group",as:ae.as,"as-child":ae.asChild,"data-disabled":f(n)?"":void 0,"data-readonly":f(s)?"":void 0}),{default:_(()=>[A(ae.$slots,"default",{modelValue:f(g),textValue:re.value}),f(b)&&ae.name?(v(),C(f(kl),{key:0,type:"text",value:f(g),name:ae.name,disabled:f(n),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"]))}}),Tm=zm,Im=z({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=za(),i=k(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isDecreaseDisabled.value),{primitiveElement:n,currentElement:s}=Er(),{isPressed:a,onTrigger:o}=ru({target:s,disabled:i});return o(()=>{t.handleDecrease()}),(l,u)=>(v(),C(f(ne),H(e,{ref_key:"primitiveElement",ref:n,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"]))}}),Pm=Im,Rm=z({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=za(),i=k(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isIncreaseDisabled.value),{primitiveElement:n,currentElement:s}=Er(),{isPressed:a,onTrigger:o}=ru({target:s,disabled:i});return o(()=>{t.handleIncrease()}),(l,u)=>(v(),C(f(ne),H(e,{ref_key:"primitiveElement",ref:n,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"]))}}),Dm=Rm,$m=z({__name:"NumberFieldInput",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(r){const e=r,{primitiveElement:t,currentElement:i}=Er(),n=za();function s(l){n.disableWheelChange.value||l.target===pt()&&(Math.abs(l.deltaY)<=Math.abs(l.deltaX)||(l.preventDefault(),l.deltaY>0?n.invertWheelChange.value?n.handleDecrease():n.handleIncrease():l.deltaY<0&&(n.invertWheelChange.value?n.handleIncrease():n.handleDecrease())))}Re(()=>{n.onInputElement(i.value)});const a=O(n.textValue.value);_e(()=>n.textValue.value,()=>{a.value=n.textValue.value},{immediate:!0,deep:!0});function o(){requestAnimationFrame(()=>{a.value=n.textValue.value})}return(l,u)=>(v(),C(f(ne),H(e,{id:f(n).id.value,ref_key:"primitiveElement",ref:t,value:a.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:f(n).inputMode.value,disabled:f(n).disabled.value?"":void 0,"data-disabled":f(n).disabled.value?"":void 0,readonly:f(n).readonly.value?"":void 0,"data-readonly":f(n).readonly.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":f(n).modelValue.value,"aria-valuemin":f(n).min.value,"aria-valuemax":f(n).max.value,onKeydown:[u[0]||(u[0]=ht(fe(c=>f(n).handleIncrease(),["prevent"]),["up"])),u[1]||(u[1]=ht(fe(c=>f(n).handleDecrease(),["prevent"]),["down"])),u[2]||(u[2]=ht(fe(c=>f(n).handleIncrease(10),["prevent"]),["page-up"])),u[3]||(u[3]=ht(fe(c=>f(n).handleDecrease(10),["prevent"]),["page-down"])),u[4]||(u[4]=ht(fe(c=>f(n).handleMinMaxValue("min"),["prevent"]),["home"])),u[5]||(u[5]=ht(fe(c=>f(n).handleMinMaxValue("max"),["prevent"]),["end"])),u[8]||(u[8]=ht(c=>f(n).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(n).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(n).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"]))}}),Lm=$m,Hm=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(r){const e=r,t=["horizontal","vertical"];function i(o){return t.includes(o)}const n=k(()=>i(e.orientation)?e.orientation:"horizontal"),s=k(()=>n.value==="vertical"?e.orientation:void 0),a=k(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(o,l)=>(v(),C(f(ne),H({as:o.as,"as-child":o.asChild,"data-orientation":n.value},a.value),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),Nm=Hm,Vm=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(r){const e=r;return(t,i)=>(v(),C(Nm,oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Um=Vm;const[Yn,jm]=De("TabsRoot");var Gm=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(r,{emit:e}){const t=r,i=e,{orientation:n,unmountOnHide:s,dir:a}=vt(t),o=Vn(a);X();const l=nt(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),u=O();return jm({modelValue:l,changeModelValue:c=>{l.value=c},orientation:n,dir:o,unmountOnHide:s,activationMode:t.activationMode,baseId:yt(void 0,"reka-tabs"),tabsList:u}),(c,d)=>(v(),C(f(ne),{dir:f(o),"data-orientation":f(n),"as-child":c.asChild,as:c.as},{default:_(()=>[A(c.$slots,"default",{modelValue:f(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),Wm=Gm;function nu(r,e){return`${r}-trigger-${e}`}function su(r,e){return`${r}-content-${e}`}var Km=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(r){const e=r,{forwardRef:t}=X(),i=Yn(),n=k(()=>nu(i.baseId,e.value)),s=k(()=>su(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(ne),{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":n.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=Km,Xm=z({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,t=Yn();X();const i=O(),n=O({size:null,position:null});_e(()=>[t.modelValue.value,t?.dir.value],async()=>{await Xe(),s()},{immediate:!0}),gc([t.tabsList,i],s);function s(){i.value=t.tabsList.value?.querySelector('[role="tab"][data-state="active"]'),i.value&&(t.orientation.value==="horizontal"?n.value={size:i.value.offsetWidth,position:i.value.offsetLeft}:n.value={size:i.value.offsetHeight,position:i.value.offsetTop})}return(a,o)=>typeof n.value.size=="number"?(v(),C(f(ne),H({key:0},e,{style:{"--reka-tabs-indicator-size":`${n.value.size}px`,"--reka-tabs-indicator-position":`${n.value.position}px`}}),{default:_(()=>[A(a.$slots,"default")]),_:3},16,["style"])):R("v-if",!0)}}),Jm=Xm,Zm=z({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{loop:t}=vt(e),{forwardRef:i,currentElement:n}=X(),s=Yn();return s.tabsList=n,(a,o)=>(v(),C(f(Bl),{"as-child":"",orientation:f(s).orientation.value,dir:f(s).dir.value,loop:f(t)},{default:_(()=>[F(f(ne),{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"]))}}),Qm=Zm,eg=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(r){const e=r,{forwardRef:t}=X(),i=Yn(),n=k(()=>nu(i.baseId,e.value)),s=k(()=>su(i.baseId,e.value)),a=k(()=>e.value===i.modelValue.value);return(o,l)=>(v(),C(f(ql),{"as-child":"",focusable:!o.disabled,active:a.value},{default:_(()=>[F(f(ne),{id:n.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"]))}}),tg=eg,ig=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),rg=ig;const au="tooltip.open",[Xn,ng]=De("TooltipRoot");var sg=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(r,{emit:e}){const t=r,i=e;X();const n=sa(),s=k(()=>t.disableHoverableContent??n.disableHoverableContent.value),a=k(()=>t.disableClosingTrigger??n.disableClosingTrigger.value),o=k(()=>t.disabled??n.disabled.value),l=k(()=>t.delayDuration??n.delayDuration.value),u=k(()=>t.ignoreNonKeyboardFocus??n.ignoreNonKeyboardFocus.value),c=nt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0});_e(c,b=>{n.onClose&&(b?(n.onOpen(),document.dispatchEvent(new CustomEvent(au))):n.onClose())});const d=O(!1),h=O(),p=k(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:g}=yc(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function y(){g(),d.value=!1,c.value=!0}function w(){g(),c.value=!1}function x(){m()}return ng({contentId:"",open:c,stateAttribute:p,trigger:h,onTriggerChange(b){h.value=b},onTriggerEnter(){n.isOpenDelayed.value?x():y()},onTriggerLeave(){s.value?w():g()},onOpen:y,onClose:w,disableHoverableContent:s,disableClosingTrigger:a,disabled:o,ignoreNonKeyboardFocus:u}),(b,S)=>(v(),C(f(Ir),null,{default:_(()=>[A(b.$slots,"default",{open:f(c)})]),_:3}))}}),ag=sg,og=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(r,{emit:e}){const t=r,i=e,n=Xn(),{forwardRef:s}=X(),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!==vc?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(()=>{ri(window,"scroll",c=>{c.target?.contains(n.trigger.value)&&n.onClose()}),ri(window,au,n.onClose)}),(c,d)=>(v(),C(f(qr),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=h=>i("escapeKeyDown",h)),onPointerDownOutside:d[1]||(d[1]=h=>{f(n).disableClosingTrigger.value&&f(n).trigger.value?.contains(h.target)&&h.preventDefault(),i("pointerDownOutside",h)}),onFocusOutside:d[2]||(d[2]=fe(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=h=>f(n).onClose())},{default:_(()=>[F(f(Wn),H({ref:f(s),"data-state":f(n).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(Fr),{id:f(n).contentId,role:"tooltip"},{default:_(()=>[ce(Z(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),ou=og,lg=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(r){const t=Or(r),{forwardRef:i,currentElement:n}=X(),{trigger:s,onClose:a}=Xn(),o=sa(),{isPointerInTransit:l,onPointerExit:u}=wl(s,n);return o.isPointerInTransitRef=l,u(()=>{a()}),(c,d)=>(v(),C(ou,H({ref:f(i)},f(t)),{default:_(()=>[A(c.$slots,"default")]),_:3},16))}}),ug=lg,cg=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(r,{emit:e}){const t=r,i=e,n=Xn(),s=Ce(t,i),{forwardRef:a}=X();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(n).open.value},{default:_(()=>[(v(),C(sr(f(n).disableHoverableContent.value?ou:ug),H({ref:f(a)},f(s)),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),dg=cg,hg=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),fg=hg,pg=z({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Xn(),i=sa();t.contentId||=yt(void 0,"reka-tooltip-content");const{forwardRef:n,currentElement:s}=X(),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,w)=>(v(),C(f(Pr),{"as-child":"",reference:y.reference},{default:_(()=>[F(f(ne),H({ref:f(n),"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":""},zr(l.value)),{default:_(()=>[A(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),mg=pg;function Mn(r={}){const{inheritAttrs:e=!0}=r,t=tt(),i=z({setup(s,{slots:a}){return()=>{t.value=a.default}}}),n=z({inheritAttrs:e,props:r.props,setup(s,{attrs:a,slots:o}){return()=>{var l;t.value;const u=(l=t.value)==null?void 0:l.call(t,{...r.props==null?gg(a):s,$slots:o});return e&&u?.length===1?u[0]:u}}});return bc({define:i,reuse:n},[i,n])}function gg(r){const e={};for(const t in r)e[Cc(t)]=r[t];return e}const Ta=Ac?window:void 0;function rr(r){var e;const t=Pt(r);return(e=t?.$el)!=null?e:t}function xr(...r){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)),n=k(()=>{const o=An(Pt(r[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),s=wc(()=>{var o,l;return[(l=(o=n.value)==null?void 0:o.map(u=>rr(u)))!=null?l:[Ta].filter(u=>u!=null),An(Pt(n.value?r[1]:r[0])),An(f(n.value?r[2]:r[1])),Pt(n.value?r[3]:r[2])]},([o,l,u,c])=>{if(t(),!o?.length||!l?.length||!u?.length)return;const d=Mc(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 aa(t),a}function yg(){const r=tt(!1),e=Nn();return e&&Re(()=>{r.value=!0},e),r}function lu(r){const e=yg();return k(()=>(e.value,!!r()))}function vg(r,e,t={}){const{window:i=Ta,...n}=t;let s;const a=lu(()=>i&&"MutationObserver"in i),o=()=>{s&&(s.disconnect(),s=void 0)},l=k(()=>{const h=Pt(r),p=An(h).map(rr).filter(Sc);return new Set(p)}),u=_e(l,h=>{o(),a.value&&h.size&&(s=new MutationObserver(e),h.forEach(p=>s.observe(p,n)))},{immediate:!0,flush:"post"}),c=()=>s?.takeRecords(),d=()=>{u(),o()};return aa(d),{isSupported:a,stop:d,takeRecords:c}}function bg(r){return JSON.parse(JSON.stringify(r))}function xg(r,e,t={}){const{window:i=Ta,...n}=t;let s;const a=lu(()=>i&&"ResizeObserver"in i),o=()=>{s&&(s.disconnect(),s=void 0)},l=k(()=>{const d=Pt(r);return Array.isArray(d)?d.map(h=>rr(h)):[rr(d)]}),u=_e(l,d=>{if(o(),a.value&&i){s=new ResizeObserver(e);for(const h of d)h&&s.observe(h,n)}},{immediate:!0,flush:"post"}),c=()=>{o(),u()};return aa(c),{isSupported:a,stop:c}}function yo(r,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:n=!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 w=rr(r);if(!w){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 x=w.getBoundingClientRect();o.value=x.height,l.value=x.bottom,u.value=x.left,c.value=x.right,d.value=x.top,h.value=x.width,p.value=x.x,m.value=x.y}function y(){a==="sync"?g():a==="next-frame"&&requestAnimationFrame(()=>g())}return xg(r,y),_e(()=>rr(r),w=>!w&&y()),vg(r,y,{attributeFilter:["style","class"]}),n&&xr("scroll",y,{capture:!0,passive:!0}),i&&xr("resize",y,{passive:!0}),xc(()=>{s&&y()}),{height:o,bottom:l,left:u,right:c,top:d,width:h,x:p,y:m,update:y}}function wg(r,e,t,i={}){var n,s,a;const{clone:o=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:h}=i,p=Nn(),m=t||p?.emit||((n=p?.$emit)==null?void 0:n.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=b=>o?typeof o=="function"?o(b):bg(b):b,w=()=>_c(r[e])?y(r[e]):d,x=b=>{h?h(b)&&m(g,b):m(g,b)};if(l){const b=w(),S=O(b);let q=!1;return _e(()=>r[e],M=>{q||(q=!0,S.value=y(M),Xe(()=>q=!1))}),_e(S,M=>{!q&&(M!==r[e]||c)&&x(M)},{deep:c}),S}else return k({get(){return w()},set(b){x(b)}})}const _g=Symbol.for("nuxt:client-only"),Cg=z({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(r,{slots:e,attrs:t}){const i=tt(!1);Re(()=>{i.value=!0});const n=Nn();return n&&(n._nuxtClientOnly=!0),kc(_g,!0),()=>{if(i.value){const l=e.default?.();return l&&l.length===1?[Bc(l[0],t)]:l}const s=e.fallback||e.placeholder;if(s)return qc(s);const a=r.fallback||r.placeholder||"",o=r.fallbackTag||r.placeholderTag||"span";return V(o,t,a)}}}),vo=Ec({...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"}}}}),Sg=r=>{const e=r||je(Fc(Oc,vo));return zc(k(()=>e.value||vo))},uu=oa(Sg),Ag=()=>Tc("color-mode").value,Mg=Object.assign({inheritAttrs:!1},{__name:"UColorModeButton",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"}},setup(r){const{t:e}=uu(),t=Ag(),i=Te(),n=k({get(){return t.value==="dark"},set(s){t.preference=s?"dark":"light"}});return(s,a)=>{const o=Cg;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:n.value?f(i).ui.icons.dark:f(i).ui.icons.light,color:r.color,variant:r.variant,"aria-label":n.value?f(e)("colorMode.switchToLight"):f(e)("colorMode.switchToDark")},s.$attrs,{onClick:a[0]||(a[0]=l=>n.value=!n.value)}),null,16,["icon","color","variant","aria-label"])]),_:3}))}}}),en={meta:"",ctrl:"",alt:"",win:"⊞",command:"⌘",shift:"⇧",control:"⌃",option:"⌥",enter:"↵",delete:"⌦",backspace:"⌫",escape:"⎋",tab:"⇥",capslock:"⇪",arrowup:"↑",arrowright:"→",arrowdown:"↓",arrowleft:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘"},Bg=()=>{const r=k(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),e=ra({meta:" ",alt:" ",ctrl:" "});Re(()=>{e.meta=r.value?en.command:"Ctrl",e.ctrl=r.value?en.control:"Ctrl",e.alt=r.value?en.option:"Alt"});function t(i){if(i)return["meta","alt","ctrl"].includes(i)?e[i]:en[i]||i.toUpperCase()}return{macOS:r,getKbdKey:t}},qg=oa(Bg),kg={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"}},cu={__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(r){const e=r,{getKbdKey:t}=qg(),i=Te(),n=k(()=>de({extend:de(kg),...i.ui?.kbd||{}}));return(s,a)=>(v(),C(f(ne),{as:r.as,class:T(n.value({class:e.class,color:e.color,variant:e.variant,size:e.size}))},{default:_(()=>[A(s.$slots,"default",{},()=>[ce(Z(f(t)(r.value)),1)])]),_:3},8,["as","class"]))}},Eg={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"}},Fg={__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(r,{emit:e}){const t=r,i=e,n=Ge(),s=Te(),a=Ce(Ft(t,"defaultOpen","open","delayDuration","disableHoverableContent","disableClosingTrigger","ignoreNonKeyboardFocus"),i),o=ar(je(()=>t.portal)),l=je(()=>Br(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),u=je(()=>t.arrow),c=k(()=>de({extend:de(Eg),...s.ui?.tooltip||{}})({side:l.value.side}));return(d,h)=>(v(),C(f(ag),H(f(a),{disabled:!(r.text||r.kbds?.length||n.content)||t.disabled}),{default:_(({open:p})=>[n.default||r.reference?(v(),C(f(mg),H({key:0},d.$attrs,{"as-child":"",reference:r.reference,class:t.class}),{default:_(()=>[A(d.$slots,"default",{open:p})]),_:2},1040,["reference","class"])):R("",!0),F(f(fg),oe(le(f(o))),{default:_(()=>[F(f(dg),H(l.value,{class:c.value.content({class:[!n.default&&t.class,t.ui?.content]})}),{default:_(()=>[A(d.$slots,"content",{},()=>[r.text?(v(),V("span",{key:0,class:T(c.value.text({class:t.ui?.text}))},Z(r.text),3)):R("",!0),r.kbds?.length?(v(),V("span",{key:1,class:T(c.value.kbds({class:t.ui?.kbds}))},[(v(!0),V(we,null,Ye(r.kbds,(m,g)=>(v(),C(cu,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)]),r.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"]))}},Og={base:"w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"},zg={__name:"UContainer",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(r){const e=r,t=Te(),i=k(()=>de({extend:de(Og),...t.ui?.container||{}}));return(n,s)=>(v(),C(f(ne),{as:r.as,class:T(i.value({class:e.class}))},{default:_(()=>[A(n.$slots,"default")]),_:3},8,["as","class"]))}},Tg={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]"}}]},Ig={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{t:s}=Tr(),a=Te(),o=Ce(Ft(t,"open","defaultOpen","modal"),i),l=ar(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(Tg),...a.ui?.slideover||{}})({transition:t.transition,side:t.side}));return(h,p)=>(v(),C(f(fa),oe(le(f(o))),{default:_(({open:m,close:g})=>[n.default?(v(),C(f(xa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(h.$slots,"default",{open:m})]),_:2},1032,["class"])):R("",!0),F(f(ba),oe(le(f(l))),{default:_(()=>[r.overlay?(v(),C(f(va),{key:0,class:T(d.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(ya),H({"data-side":r.side,class:d.value.content({class:[!n.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"))},zr(c.value)),{default:_(()=>[n.content&&(r.title||n.title||r.description||n.description)?(v(),C(f(Fr),{key:0},{default:_(()=>[r.title||n.title?(v(),C(f(tr),{key:0},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),C(f(er),{key:1},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(h.$slots,"content",{close:g},()=>[n.header||r.title||n.title||r.description||n.description||t.close||n.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}))},[r.title||n.title?(v(),C(f(tr),{key:0,class:T(d.value.title({class:t.ui?.title}))},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),C(f(er),{key:1,class:T(d.value.description({class:t.ui?.description}))},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(r.description),1)])]),_:3},8,["class"])):R("",!0)],2),A(h.$slots,"actions"),t.close||n.close?(v(),C(f(Cl),{key:0,"as-child":""},{default:_(()=>[A(h.$slots,"close",{close:g,ui:d.value},()=>[t.close?(v(),C(lt,H({key:0,icon:r.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),n.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))}},Pg={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"}}}},Rg={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{t:s}=Tr(),a=Te(),o=Ce(Ft(t,"open","defaultOpen","modal"),i),l=ar(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(Pg),...a.ui?.modal||{}})({transition:t.transition,fullscreen:t.fullscreen}));return(h,p)=>(v(),C(f(fa),oe(le(f(o))),{default:_(({open:m,close:g})=>[n.default?(v(),C(f(xa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(h.$slots,"default",{open:m})]),_:2},1032,["class"])):R("",!0),F(f(ba),oe(le(f(l))),{default:_(()=>[r.overlay?(v(),C(f(va),{key:0,class:T(d.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(ya),H({class:d.value.content({class:[!n.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"))},zr(c.value)),{default:_(()=>[n.content&&(r.title||n.title||r.description||n.description)?(v(),C(f(Fr),{key:0},{default:_(()=>[r.title||n.title?(v(),C(f(tr),{key:0},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),C(f(er),{key:1},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(h.$slots,"content",{close:g},()=>[n.header||r.title||n.title||r.description||n.description||t.close||n.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}))},[r.title||n.title?(v(),C(f(tr),{key:0,class:T(d.value.title({class:t.ui?.title}))},{default:_(()=>[A(h.$slots,"title",{},()=>[ce(Z(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),C(f(er),{key:1,class:T(d.value.description({class:t.ui?.description}))},{default:_(()=>[A(h.$slots,"description",{},()=>[ce(Z(r.description),1)])]),_:3},8,["class"])):R("",!0)],2),A(h.$slots,"actions"),t.close||n.close?(v(),C(f(Cl),{key:0,"as-child":""},{default:_(()=>[A(h.$slots,"close",{close:g,ui:d.value},()=>[t.close?(v(),C(lt,H({key:0,icon:r.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),n.body?(v(),V("div",{key:1,class:T(d.value.body({class:t.ui?.body}))},[A(h.$slots,"body",{close:g})],2)):R("",!0),n.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 r;try{if(typeof document<"u"){var e=document.createElement("style");e.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.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 Dg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $g=r=>typeof r<"u";function Lg(r){return JSON.parse(JSON.stringify(r))}function bo(r,e,t,i={}){var n,s,a;const{clone:o=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:h}=i,p=Nn(),m=t||p?.emit||((n=p?.$emit)==null?void 0:n.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=b=>o?typeof o=="function"?o(b):Lg(b):b,w=()=>$g(r[e])?y(r[e]):d,x=b=>{h?h(b)&&m(g,b):m(g,b)};if(l){const b=w(),S=O(b);let q=!1;return _e(()=>r[e],M=>{q||(q=!0,S.value=y(M),Xe(()=>q=!1))}),_e(S,M=>{!q&&(M!==r[e]||c)&&x(M)},{deep:c}),S}else return k({get(){return w()},set(b){x(b)}})}const[$r,Hg]=De("DrawerRoot"),du=new WeakMap;function He(r,e,t=!1){if(!r||!(r instanceof HTMLElement)||!e)return;const i={};Object.entries(e).forEach(([n,s])=>{if(n.startsWith("--")){r.style.setProperty(n,s);return}i[n]=r.style[n],r.style[n]=s}),!t&&du.set(r,i)}function Ng(r,e){if(!r||!(r instanceof HTMLElement))return;const t=du.get(r);t&&Object.entries(t).forEach(([i,n])=>{r.style[i]=n})}function tn(r,e){const t=window.getComputedStyle(r),i=t.transform||t.webkitTransform||t.mozTransform;let n=i.match(/^matrix3d\((.+)\)$/);return n?Number.parseFloat(n[1].split(", ")[Fe(e)?13:12]):(n=i.match(/^matrix\((.+)\)$/),n?Number.parseFloat(n[1].split(", ")[Fe(e)?5:4]):null)}function Vg(r){return 8*(Math.log(r+1)-2)}function Fe(r){switch(r){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return r}}function ls(r,e){if(!r)return()=>{};const t=r.style.cssText;return Object.assign(r.style,e),()=>{r.style.cssText=t}}function Ug(...r){return(...e)=>{for(const t of r)typeof t=="function"&&t(...e)}}const ve={DURATION:.5,EASE:[.32,.72,0,1]},hu=.4,jg=.25,Gg=100,fu=8,rn=16,pu=26,xo="vaul-dragging";function Wg({activeSnapPoint:r,snapPoints:e,drawerRef:t,overlayRef:i,fadeFromIndex:n,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)}),Ic(()=>{typeof window<"u"&&window.removeEventListener("resize",l)});const u=k(()=>(e.value&&r.value===e.value[e.value.length-1])??null),c=k(()=>e.value&&e.value.length>0&&(n?.value||n?.value===0)&&!Number.isNaN(n?.value)&&e.value[n?.value??-1]===r.value||!e.value),d=k(()=>{var x;return((x=e.value)==null?void 0:x.findIndex(b=>b===r.value))??null}),h=k(()=>{var x;return((x=e.value)==null?void 0:x.map(b=>{const S=typeof b=="string";let q=0;if(S&&(q=Number.parseInt(b,10)),Fe(a.value)){const B=S?q:o.value?b*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?b*o.value.innerWidth:0;return o.value?a.value==="right"?o.value.innerWidth-M:-o.value.innerWidth+M:M}))??[]}),p=k(()=>{var x;return d.value!==null?(x=h.value)==null?void 0:x[d.value]:null}),m=x=>{var b,S,q,M;const B=((b=h.value)==null?void 0:b.findIndex(L=>L===x))??null;Xe(()=>{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, ${x}px, 0)`:`translate3d(${x}px, 0, 0)`})}),h.value&&B!==h.value.length-1&&B!==n?.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"}),r.value=B!==null?((M=e.value)==null?void 0:M[B])??null:null};_e([r,h,e],()=>{var x;if(r.value){const b=((x=e.value)==null?void 0:x.findIndex(S=>S===r.value))??-1;h.value&&b!==-1&&typeof h.value[b]=="number"&&m(h.value[b])}},{immediate:!0});function g({draggedDistance:x,closeDrawer:b,velocity:S,dismissible:q}){var M,B,L;if(n.value===void 0)return;const E=a.value==="bottom"||a.value==="right"?(p.value??0)-x:(p.value??0)+x,D=d.value===n.value-1,U=d.value===0,G=x>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?b():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((re,K)=>typeof re!="number"||typeof K!="number"?re:Math.abs(K-E)<Math.abs(re-E)?K:re),te=Fe(a.value)?window.innerHeight:window.innerWidth;if(S>hu&&Math.abs(x)<te*.4){const re=G?1:-1;if(re>0&&u){m(h.value[(((L=e.value)==null?void 0:L.length)??0)-1]);return}if(U&&re<0&&q&&b(),d.value===null)return;m(h.value[d.value+re]);return}m(ee)}function y({draggedDistance:x}){var b;if(p.value===null)return;const S=a.value==="bottom"||a.value==="right"?p.value-x:p.value+x;(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((b=t.value)==null?void 0:b.$el,{transform:Fe(a.value)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`})}function w(x,b){if(!e.value||typeof d.value!="number"||!h.value||n.value===void 0)return null;const S=d.value===n.value-1;if(d.value>=n.value&&b)return 0;if(S&&!b)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=x/Math.abs(M);return S?1-B:B}return{isLastSnapPoint:u,shouldFade:c,getPercentageDragged:w,activeSnapPointIndex:d,onRelease:g,onDrag:y,snapPointsOffset:h}}function wo(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let fr=null;function Kg(r){const{isOpen:e,modal:t,nested:i,hasBeenOpened:n,preventScrollRestoration:s,noBodyStyles:a}=r,o=O(typeof window<"u"?window.location.href:""),l=O(0);function u(){if(wo()&&fr===null&&e.value&&!a.value){fr={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(wo()&&fr!==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,fr),window.requestAnimationFrame(()=>{if(s.value&&o.value!==window.location.href){o.value=window.location.href;return}window.scrollTo(h,d)}),fr=null}}return Re(()=>{function d(){l.value=window.scrollY}d(),window.addEventListener("scroll",d),Ai(()=>{window.removeEventListener("scroll",d)})}),_e([e,n,o],()=>{i.value||!n.value||(e.value?(window.matchMedia("(display-mode: standalone)").matches||u(),t.value||setTimeout(()=>{c()},500)):c())}),{restorePositionSetting:c}}function Yg(r,e){return r&&r.value?r:e}function Xg(r){const{emitDrag:e,emitRelease:t,emitClose:i,emitOpenChange:n,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:w,preventScrollRestoration:x}=r,b=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),re=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(r.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:dr,snapPointsOffset:Wu,onDrag:Ku,shouldFade:$a,getPercentageDragged:Yu}=Wg({snapPoints:J,activeSnapPoint:p,drawerRef:K,fadeFromIndex:m,overlayRef:B,onSnapPointChange:Xu,direction:g});function Xu(ie,Se){J.value&&ie===Se.length-1&&(L.value=new Date)}Kg({isOpen:b,modal:l,nested:o,hasBeenOpened:S,noBodyStyles:y,preventScrollRestoration:x});function Gr(){return(window.innerWidth-pu)/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?tn(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 Ju(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 Zu(ie){var Se,Ie,ge,Ne,Je,bt;if(K.value&&q.value){const ki=g.value==="bottom"||g.value==="right"?1:-1,Wr=(te.value-(Fe(g.value)?ie.clientY:ie.clientX))*ki,Kr=Wr>0,Na=J.value&&!a.value&&!Kr;if(Na&&ye.value===0)return;const Qn=Math.abs(Wr),Va=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let hi=Qn/Q.value;const Ua=Yu(Qn,Kr);if(Ua!==null&&(hi=Ua),Na&&hi>=1||!G.value&&!La(ie.target,Kr))return;if((Se=K?.value)==null||Se.$el.classList.add(xo),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&&Ku({draggedDistance:Wr}),Kr&&!J.value){const fi=Vg(Wr),Yr=Math.min(fi*-1,0)*ki;He((Ne=K.value)==null?void 0:Ne.$el,{transform:Fe(g.value)?`translate3d(0, ${Yr}px, 0)`:`translate3d(${Yr}px, 0, 0)`});return}const rc=1-hi;if(($a.value||m.value&&ye.value===m.value-1)&&(e(hi),He((Je=B.value)==null?void 0:Je.$el,{opacity:`${rc}`,transition:"none"},!0)),Va&&B.value&&u.value){const fi=Math.min(Gr()+hi*(1-Gr()),1),Yr=8-hi*8,ja=Math.max(0,14-hi*14);He(Va,{borderRadius:`${Yr}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=Qn*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=tn(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&&b.value&&He(Se,{borderRadius:`${fu}px`,overflow:"hidden",...Fe(g.value)?{transform:`scale(${Gr()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Gr()}) 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 hr(ie){K.value&&(i(),ie||(b.value=!1),window.setTimeout(()=>{J.value&&(p.value=J.value[0])},ve.DURATION*1e3))}gt(()=>{if(!b.value&&u.value&&Dg){const ie=setTimeout(()=>{Ng(document.body)},200);return()=>clearTimeout(ie)}}),_e(s,()=>{b.value=s.value,s.value||hr()});function Qu(ie){if(!q.value||!K.value)return;K.value.$el.classList.remove(xo),G.value=!1,q.value=!1,D.value=new Date;const Se=tn(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;dr({draggedDistance:ge*bt,closeDrawer:hr,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>hu){hr(),t(!1);return}const Je=Math.min(K.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(Se>=Je*h.value){hr(),t(!1);return}t(!0),Ha()}_e(b,ie=>{ie&&(L.value=new Date),n(ie)},{immediate:!0});function ec(ie){var Se,Ie;const ge=ie?(window.innerWidth-rn)/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=tn((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 tc(ie){var Se;if(ie<0)return;const Ie=Fe(g.value)?window.innerHeight:window.innerWidth,ge=(Ie-rn)/Ie,Ne=ge+ie*(1-ge),Je=-16+ie*rn;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 ic(ie){var Se;const Ie=Fe(g.value)?window.innerHeight:window.innerWidth,ge=ie?(Ie-rn)/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:b,modal:l,keyboardIsOpen:re,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:Wu,direction:g,shouldFade:$a,fadeFromIndex:m,shouldScaleBackground:u,setBackgroundColorOnScale:c,onPress:Ju,onDrag:Zu,onRelease:Qu,closeDrawer:hr,onNestedDrag:tc,onNestedRelease:ic,onNestedOpenChange:ec,emitClose:i,emitDrag:e,emitRelease:t,emitOpenChange:n,nested:o,handleOnly:w,noBodyStyles:y}}const mu=z({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:jg},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:Gg},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(r,{expose:e,emit:t}){const i=r,n=t;Ge();const s=k(()=>i.fadeFromIndex??(i.snapPoints&&i.snapPoints.length-1)),a=bo(i,"open",n,{defaultValue:i.defaultOpen,passive:i.open===void 0}),o=bo(i,"activeSnapPoint",n,{passive:i.activeSnapPoint===void 0}),l={emitDrag:m=>n("drag",m),emitRelease:m=>n("release",m),emitClose:()=>n("close"),emitOpenChange:m=>{n("update:open",m),setTimeout(()=>{n("animationEnd",m)},ve.DURATION*1e3)}},{closeDrawer:u,hasBeenOpened:c,modal:d,isOpen:h}=Hg(Xg({...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(fa),{open:f(h),modal:f(d),"onUpdate:open":p},{default:_(()=>[A(m.$slots,"default",{open:f(h)})]),_:3},8,["open","modal"]))}}),Jg=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(r,{emit:e}){const t=r,i=e,{onNestedDrag:n,onNestedOpenChange:s,onNestedRelease:a}=$r();function o(){s(!1)}function l(d){n(d)}function u(d){d&&s(d),i("update:open",d)}const c=Ce(t,i);return(d,h)=>(v(),C(mu,H(f(c),{nested:"",onClose:o,onDrag:l,onRelease:f(a),"onUpdate:open":u}),{default:_(()=>[A(d.$slots,"default")]),_:3},16,["onRelease"]))}}),Zg=z({__name:"DrawerOverlay",setup(r){const{overlayRef:e,hasSnapPoints:t,isOpen:i,shouldFade:n}=$r();return(s,a)=>(v(),C(f(va),{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(n)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),Qg=()=>()=>{};function ey(){const{direction:r,isOpen:e,shouldScaleBackground:t,setBackgroundColorOnScale:i,noBodyStyles:n}=$r(),s=O(null),a=O(document.body.style.backgroundColor);function o(){return(window.innerWidth-pu)/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;Ug(i.value&&!n.value?ls(document.body,{background:"black"}):Qg,ls(u,{transformOrigin:Fe(r.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${ve.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ve.EASE.join(",")})`}));const c=ls(u,{borderRadius:`${fu}px`,overflow:"hidden",...Fe(r.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 ty=z({__name:"DrawerContent",setup(r){const{open:e,isOpen:t,snapPointsOffset:i,hasSnapPoints:n,drawerRef:s,onPress:a,onDrag:o,onRelease:l,modal:u,emitOpenChange:c,dismissible:d,keyboardIsOpen:h,closeDrawer:p,direction:m,handleOnly:g}=$r();ey();const y=O(!1),w=k(()=>i.value&&i.value.length>0?`${i.value[0]}px`:"0");function x(q){if(!u.value||q.defaultPrevented){q.preventDefault();return}h.value&&(h.value=!1),d.value?c(!1):q.preventDefault()}function b(q){g.value||a(q)}function S(q){g.value||o(q)}return gt(()=>{n.value&&window.requestAnimationFrame(()=>{y.value=!0})}),(q,M)=>(v(),C(f(ya),{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(n)?"true":"false",style:qt({"--snap-point-height":w.value}),onPointerdown:b,onPointermove:S,onPointerup:f(l),onPointerDownOutside:x,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"]))}}),iy=["data-vaul-drawer-visible"],ry={"data-vaul-handle-hitarea":"","aria-hidden":"true"},ny=250,sy=120,ay=z({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(r){const e=r,{onPress:t,onDrag:i,handleRef:n,handleOnly:s,isOpen:a,snapPoints:o,activeSnapPoint:l,isDragging:u,dismissible:c,closeDrawer:d}=$r(),h=O(null),p=O(!1);function m(){if(p.value){w();return}window.setTimeout(()=>{g()},sy)}function g(){if(u.value||e.preventCycle||p.value){w();return}if(w(),!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},ny)}function w(){h.value&&window.clearTimeout(h.value),p.value=!1}function x(S){s.value&&t(S),y()}function b(S){s.value&&i(S)}return(S,q)=>(v(),V("div",{ref_key:"handleRef",ref:n,"data-vaul-drawer-visible":f(a)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:m,onPointercancel:w,onPointerdown:x,onPointermove:b},[I("span",ry,[A(S.$slots,"default")])],40,iy))}}),oy={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"}}]},ly={__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(r,{emit:e}){const t=r,i=e,n=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=ar(je(()=>t.portal)),l=je(()=>t.content),u={closeAutoFocus:d=>d.preventDefault()},c=k(()=>de({extend:de(oy),...s.ui?.drawer||{}})({direction:t.direction,inset:t.inset}));return(d,h)=>(v(),C(sr(r.nested?f(Jg):f(mu)),oe(le(f(a))),{default:_(()=>[n.default?(v(),C(f(xa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(d.$slots,"default")]),_:3},8,["class"])):R("",!0),F(f(ba),oe(le(f(o))),{default:_(()=>[r.overlay?(v(),C(f(Zg),{key:0,class:T(c.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(ty),H({class:c.value.content({class:[!n.default&&t.class,t.ui?.content]})},l.value,zr(u)),{default:_(()=>[r.handle?(v(),C(f(ay),{key:0,class:T(c.value.handle({class:t.ui?.handle}))},null,8,["class"])):R("",!0),n.content&&(r.title||n.title||r.description||n.description)?(v(),C(f(Fr),{key:1},{default:_(()=>[r.title||n.title?(v(),C(f(tr),{key:0},{default:_(()=>[A(d.$slots,"title",{},()=>[ce(Z(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),C(f(er),{key:1},{default:_(()=>[A(d.$slots,"description",{},()=>[ce(Z(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(d.$slots,"content",{},()=>[I("div",{class:T(c.value.container({class:t.ui?.container}))},[n.header||r.title||n.title||r.description||n.description?(v(),V("div",{key:0,class:T(c.value.header({class:t.ui?.header}))},[A(d.$slots,"header",{},()=>[r.title||n.title?(v(),C(f(tr),{key:0,class:T(c.value.title({class:t.ui?.title}))},{default:_(()=>[A(d.$slots,"title",{},()=>[ce(Z(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),C(f(er),{key:1,class:T(c.value.description({class:t.ui?.description}))},{default:_(()=>[A(d.$slots,"description",{},()=>[ce(Z(r.description),1)])]),_:3},8,["class"])):R("",!0)])],2)):R("",!0),n.body?(v(),V("div",{key:1,class:T(c.value.body({class:t.ui?.body}))},[A(d.$slots,"body")],2)):R("",!0),n.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 js(r){return r.map(e=>{if(!e.children||typeof e.children=="string")return e.children||"";if(Array.isArray(e.children))return js(e.children);if(e.children.default)return js(e.children.default())}).join("")}const uy=Rc,_o=Pc(uy.ui?.tv),cy={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"}}}},dy=Object.assign({inheritAttrs:!1},{__name:"UHeader",props:qn({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(r){const e=r,t=Ge(),i=la(r,"open",{type:Boolean,default:!1}),n=Dc(),{t:s}=uu(),a=Te(),[o,l]=Mn(),[u,c]=Mn(),[d,h]=Mn(),p=k(()=>(t.title&&js(t.title())||e.title||"Nuxt UI Pro").trim());_e(()=>n.fullPath,()=>{i.value=!1});const m=k(()=>_o({extend:_o(cy),...a.uiPro?.header||{}})()),g=k(()=>({slideover:Ig,modal:Rg,drawer:ly})[e.mode]),y=je(()=>Br(e.menu,{content:{onOpenAutoFocus:x=>x.preventDefault()}},e.mode==="modal"?{fullscreen:!0,transition:!1}:{}));function w(){i.value=!i.value}return(x,b)=>(v(),V(we,null,[F(f(d),null,{default:_(()=>[A(x.$slots,"toggle",{open:i.value,toggle:w},()=>[r.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 r.toggle=="object"?r.toggle:{},{class:m.value.toggle({class:e.ui?.toggle,toggleSide:r.toggleSide}),onClick:w}),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}))},[r.toggleSide==="left"?(v(),C(f(h),{key:0})):R("",!0),A(x.$slots,"left",{},()=>[F(hl,{to:r.to,"aria-label":p.value,class:T(m.value.title({class:e.ui?.title}))},{default:_(()=>[A(x.$slots,"title",{},()=>[ce(Z(r.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(x.$slots,"right"),r.toggleSide==="right"?(v(),C(f(h),{key:0})):R("",!0)],2)]),_:3}),F(f(ne),H({as:r.as},x.$attrs,{class:m.value.root({class:[e.ui?.root,e.class]})}),{default:_(()=>[A(x.$slots,"top"),F(zg,{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(x.$slots,"default")],2),F(f(c))]),_:3},8,["class"]),A(x.$slots,"bottom")]),_:3},16,["as","class"]),F(f(g),H({open:i.value,"onUpdate:open":b[0]||(b[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(x.$slots,"content",{},()=>[r.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(x.$slots,"body")],2)])]),_:3},16,["open","title","description","ui"])],64))}}),hy=$c("/logo.svg"),fy={};function py(r,e){const t=Mg,i=lt,n=Fg,s=dy;return v(),C(s,null,{title:_(()=>[...e[0]||(e[0]=[I("div",{class:"flex items-center"},[I("img",{src:hy,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(n,{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 my=Object.assign(fl(fy,[["render",py]]),{__name:"TheHeader"}),gy={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(r){const e=r,t=Ge(),i=Te(),{orientation:n,size:s}=ua(e),{isLeading:a,isTrailing:o,leadingIconName:l,trailingIconName:u}=pl(e),c=k(()=>de({extend:de(gy),...i.ui?.badge||{}})({color:e.color,variant:e.variant,size:s.value||e.size,square:e.square||!t.default&&!e.label,buttonGroup:n.value}));return(d,h)=>(v(),C(f(ne),{as:r.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"])):r.avatar?(v(),C(or,H({key:1,size:e.ui?.leadingAvatarSize||c.value.leadingAvatarSize()},r.avatar,{class:c.value.leadingAvatar({class:e.ui?.leadingAvatar})}),null,16,["size","class"])):R("",!0)]),A(d.$slots,"default",{},()=>[r.label!==void 0&&r.label!==null?(v(),V("span",{key:0,class:T(c.value.label({class:e.ui?.label}))},Z(r.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"]))}},yy={class:"font-mono text-xs"},vy={key:1,class:"mr-1 w-4 h-4"},by={class:"flex items-center gap-2 flex-1 min-w-0"},xy={class:"text-gray-700 font-medium"},wy=z({__name:"TreeGraph",props:{item:{},level:{default:0}},emits:["select-object"],setup(r,{emit:e}){const t=r,i=e,n=O(t.item.defaultExpanded??!1),s=()=>{n.value=!n.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=gu;return v(),V("div",yy,[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(n)?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-gray-400"},null,8,["name"])])):(v(),V("div",vy)),I("div",by,[F(d,{name:u.item.icon,class:"w-4 h-4 text-gray-600 flex-shrink-0"},null,8,["name"]),I("span",xy,Z(u.item.label),1),u.item.name?(v(),C(h,{key:0,color:"primary",size:"sm",variant:"soft"},{default:_(()=>[ce(Z(u.item.name),1)]),_:1})):R("",!0),u.item.memorySize>0?(v(),C(h,{key:1,color:"warning",size:"sm",variant:"soft"},{default:_(()=>[ce(Z(u.item.memorySize)+" KB ",1)]),_:1})):R("",!0)])],4),f(o)&&f(n)?(v(!0),V(we,{key:0},Ye(u.item.children,m=>(v(),C(p,{key:m.key,item:m,level:u.level+1,onSelectObject:c[0]||(c[0]=g=>i("select-object",g))},null,8,["item","level"]))),128)):R("",!0)])}}}),gu=Object.assign(wy,{__name:"TreeGraph"}),_y={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"}},yu={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{t:s}=Tr(),a=Te(),o=k(()=>de({extend:de(_y),...a.ui?.alert||{}})({color:t.color,variant:t.variant,orientation:t.orientation,title:!!t.title||!!n.title}));return(l,u)=>(v(),C(f(ne),{as:r.as,"data-orientation":r.orientation,class:T(o.value.root({class:[t.ui?.root,t.class]}))},{default:_(()=>[A(l.$slots,"leading",{},()=>[r.avatar?(v(),C(or,H({key:0,size:t.ui?.avatarSize||o.value.avatarSize()},r.avatar,{class:o.value.avatar({class:t.ui?.avatar})}),null,16,["size","class"])):r.icon?(v(),C(Pe,{key:1,name:r.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}))},[r.title||n.title?(v(),V("div",{key:0,class:T(o.value.title({class:t.ui?.title}))},[A(l.$slots,"title",{},()=>[ce(Z(r.title),1)])],2)):R("",!0),r.description||n.description?(v(),V("div",{key:1,class:T(o.value.description({class:t.ui?.description}))},[A(l.$slots,"description",{},()=>[ce(Z(r.description),1)])],2)):R("",!0),r.orientation==="vertical"&&(r.actions?.length||n.actions)?(v(),V("div",{key:2,class:T(o.value.actions({class:t.ui?.actions}))},[A(l.$slots,"actions",{},()=>[(v(!0),V(we,null,Ye(r.actions,(c,d)=>(v(),C(lt,H({key:d,size:"xs"},{ref_for:!0},c),null,16))),128))])],2)):R("",!0)],2),r.orientation==="horizontal"&&(r.actions?.length||n.actions)||r.close?(v(),V("div",{key:0,class:T(o.value.actions({class:t.ui?.actions,orientation:"horizontal"}))},[r.orientation==="horizontal"&&(r.actions?.length||n.actions)?A(l.$slots,"actions",{key:0},()=>[(v(!0),V(we,null,Ye(r.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},()=>[r.close?(v(),C(lt,H({key:0,icon:r.closeIcon||f(a).ui.icons.close,color:"neutral",variant:"link","aria-label":f(s)("alert.close")},typeof r.close=="object"?r.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"]))}},Cy={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"}},vu=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(r,{expose:e,emit:t}){const i=r,n=t,{t:s,code:a}=Tr(),o=Te(),l=Ce(Ft(i,"as","modelValue","defaultValue","min","max","step","stepSnapping","formatOptions","disableWheelChange","invertWheelChange","readonly"),n),{emitFormBlur:u,emitFormFocus:c,emitFormChange:d,emitFormInput:h,id:p,color:m,size:g,name:y,highlight:w,disabled:x,ariaAttrs:b}=ca(i),{orientation:S,size:q}=ua(i),M=k(()=>i.locale||a.value),B=k(()=>q.value||g.value),L=k(()=>de({extend:de(Cy),...o.ui?.inputNumber||{}})({color:m.value,variant:i.variant,size:B.value,highlight:w.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(re){const K=new Event("change",{target:{value:re}});n("change",K),d(),h()}function ee(re){u(),n("blur",re)}function te(){i.autofocus&&U.value?.$el?.focus()}return Re(()=>{setTimeout(()=>{te()},i.autofocusDelay)}),e({inputRef:U}),(re,K)=>(v(),C(f(Tm),H(f(l),{id:f(p),class:L.value.root({class:[i.ui?.root,i.class]}),name:f(y),disabled:f(x),locale:M.value,"onUpdate:modelValue":G}),{default:_(()=>[F(f(Lm),H({...re.$attrs,...f(b)},{ref_key:"inputRef",ref:U,placeholder:r.placeholder,required:r.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(Dm),{"as-child":"",disabled:f(x)||r.incrementDisabled},{default:_(()=>[A(re.$slots,"increment",{},()=>[F(lt,H({icon:E.value,color:f(m),size:r.size,variant:"link","aria-label":f(s)("inputNumber.increment")},typeof r.increment=="object"?r.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(Pm),{"as-child":"",disabled:f(x)||r.decrementDisabled},{default:_(()=>[A(re.$slots,"decrement",{},()=>[F(lt,H({icon:D.value,color:f(m),size:r.size,variant:"link","aria-label":f(s)("inputNumber.decrement")},typeof r.decrement=="object"?r.decrement:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2)]),_:3},16,["id","class","name","disabled","locale"]))}}),Sy=z({__name:"EditableNumber",props:{modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=O(!1),s=O(0),a=O(),o=k(()=>Number(t.modelValue).toFixed(2)),l=()=>{n.value=!0,s.value=t.modelValue},u=()=>{i("update:modelValue",s.value),n.value=!1},c=()=>{s.value=t.modelValue,n.value=!1};return(d,h)=>{const p=ci,m=vu;return n.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}))}}}),Ay=Object.assign(Sy,{__name:"EditableNumber"}),My=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Y=255,ft=100,ni=125,Xi=150;var j,Mt,Ze,In;(function(r){r.HEX="HEX",r.RGB="RGB",r.HWB="HWB",r.HSL="HSL",r.CIELab="CIELab",r.LCH="LCH",r.CMYK="CMYK"})(j||(j={})),(function(r){r.ANALOGOUS="ANALOGOUS",r.COMPLEMENTARY="COMPLEMENTARY",r.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",r.TRIADIC="TRIADIC",r.TETRADIC="TETRADIC",r.SQUARE="SQUARE"})(Mt||(Mt={})),(function(r){r.ADDITIVE="ADDITIVE",r.SUBTRACTIVE="SUBTRACTIVE"})(Ze||(Ze={})),(function(r){r.black="#000000",r.silver="#C0C0C0",r.gray="#808080",r.white="#FFFFFF",r.maroon="#800000",r.red="#FF0000",r.purple="#800080",r.fuchsia="#FF00FF",r.green="#008000",r.lime="#00FF00",r.olive="#808000",r.yellow="#FFFF00",r.navy="#000080",r.blue="#0000FF",r.teal="#008080",r.aqua="#00FFFF",r.orange="#FFA500",r.aliceblue="#F0F8FF",r.antiquewhite="#FAEBD7",r.aquamarine="#7FFFD4",r.azure="#F0FFFF",r.beige="#F5F5DC",r.bisque="#FFE4C4",r.blanchedalmond="#FFEBCD",r.blueviolet="#8A2BE2",r.brown="#A52A2A",r.burlywood="#DEB887",r.cadetblue="#5F9EA0",r.chartreuse="#7FFF00",r.chocolate="#D2691E",r.coral="#FF7F50",r.cornflowerblue="#6495ED",r.cornsilk="#FFF8DC",r.crimson="#DC143C",r.cyan="#00FFFF",r.darkblue="#00008B",r.darkcyan="#008B8B",r.darkgoldenrod="#B8860B",r.darkgray="#A9A9A9",r.darkgreen="#006400",r.darkgrey="#A9A9A9",r.darkkhaki="#BDB76B",r.darkmagenta="#8B008B",r.darkolivegreen="#556B2F",r.darkorange="#FF8C00",r.darkorchid="#9932CC",r.darkred="#8B0000",r.darksalmon="#E9967A",r.darkseagreen="#8FBC8F",r.darkslateblue="#483D8B",r.darkslategray="#2F4F4F",r.darkslategrey="#2F4F4F",r.darkturquoise="#00CED1",r.darkviolet="#9400D3",r.deeppink="#FF1493",r.deepskyblue="#00BFFF",r.dimgray="#696969",r.dimgrey="#696969",r.dodgerblue="#1E90FF",r.firebrick="#B22222",r.floralwhite="#FFFAF0",r.forestgreen="#228B22",r.gainsboro="#DCDCDC",r.ghostwhite="#F8F8FF",r.gold="#FFD700",r.goldenrod="#DAA520",r.greenyellow="#ADFF2F",r.grey="#808080",r.honeydew="#F0FFF0",r.hotpink="#FF69B4",r.indianred="#CD5C5C",r.indigo="#4B0082",r.ivory="#FFFFF0",r.khaki="#F0E68C",r.lavender="#E6E6FA",r.lavenderblush="#FFF0F5",r.lawngreen="#7CFC00",r.lemonchiffon="#FFFACD",r.lightblue="#ADD8E6",r.lightcoral="#F08080",r.lightcyan="#E0FFFF",r.lightgoldenrodyellow="#FAFAD2",r.lightgray="#D3D3D3",r.lightgreen="#90EE90",r.lightgrey="#D3D3D3",r.lightpink="#FFB6C1",r.lightsalmon="#FFA07A",r.lightseagreen="#20B2AA",r.lightskyblue="#87CEFA",r.lightslategray="#778899",r.lightslategrey="#778899",r.lightsteelblue="#B0C4DE",r.lightyellow="#FFFFE0",r.limegreen="#32CD32",r.linen="#FAF0E6",r.magenta="#FF00FF",r.mediumaquamarine="#66CDAA",r.mediumblue="#0000CD",r.mediumorchid="#BA55D3",r.mediumpurple="#9370DB",r.mediumseagreen="#3CB371",r.mediumslateblue="#7B68EE",r.mediumspringgreen="#00FA9A",r.mediumturquoise="#48D1CC",r.mediumvioletred="#C71585",r.midnightblue="#191970",r.mintcream="#F5FFFA",r.mistyrose="#FFE4E1",r.moccasin="#FFE4B5",r.navajowhite="#FFDEAD",r.oldlace="#FDF5E6",r.olivedrab="#6B8E23",r.orangered="#FF4500",r.orchid="#DA70D6",r.palegoldenrod="#EEE8AA",r.palegreen="#98FB98",r.paleturquoise="#AFEEEE",r.palevioletred="#DB7093",r.papayawhip="#FFEFD5",r.peachpuff="#FFDAB9",r.peru="#CD853F",r.pink="#FFC0CB",r.plum="#DDA0DD",r.powderblue="#B0E0E6",r.rosybrown="#BC8F8F",r.royalblue="#4169E1",r.saddlebrown="#8B4513",r.salmon="#FA8072",r.sandybrown="#F4A460",r.seagreen="#2E8B57",r.seashell="#FFF5EE",r.sienna="#A0522D",r.skyblue="#87CEEB",r.slateblue="#6A5ACD",r.slategray="#708090",r.slategrey="#708090",r.snow="#FFFAFA",r.springgreen="#00FF7F",r.steelblue="#4682B4",r.tan="#D2B48C",r.thistle="#D8BFD8",r.tomato="#FF6347",r.turquoise="#40E0D0",r.violet="#EE82EE",r.wheat="#F5DEB3",r.whitesmoke="#F5F5F5",r.yellowgreen="#9ACD32",r.rebeccapurple="#663399"})(In||(In={}));const bu=Object.keys(In),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"]},Gs={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 wr;(function(r){r.NUMBER="number",r.BOOLEAN="boolean"})(wr||(wr={}));const rt={[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*/},xu=/^(?<number>-?(?:\d*\.)?\d+)(?<units>(?:deg|grad|rad|turn)?)$/,Me=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,Ws=/^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,Ar;(function(r){r.NONE="none",r.DEGREES="deg",r.GRADIANS="grad",r.RADIANS="rad",r.TURNS="turn"})(Ve||(Ve={})),(function(r){r.NONE="none",r.PERCENT="percent"})(Oe||(Oe={})),(function(r){r.DEVICE_CMYK="device-cmyk",r.CMYK="cmyk"})(Ar||(Ar={}));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:Ar.DEVICE_CMYK},be=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),ur=r=>+`${r}`.replace(Me,"$1"),it=r=>Me.test(`${r}`)?ur(r):Math.min(+r,100),nn=r=>(r.length===1&&(r+=r),parseInt(r,16)),sn=r=>{const e=$(r,0).toString(16).toUpperCase();return e.length===1?`0x0${e}`:`0x${e}`},wi=(r,e=!1)=>!e&&Me.test(r)?Math.min(Y*ur(r)/100,Y):Ws.test(r)?(r.length===3&&(r+=r.slice(-1)),e?$(r)/Y:$(r)):Math.min(+r,e?1:Y),Pn=r=>Me.test(r)?se(ni*ur(r)/100,-125,ni):se(+r,-125,ni),wu=r=>Me.test(r)?se(Xi*ur(r)/100,-150,Xi):se(+r,-150,Xi),ii=r=>Math.min(Me.test(r)?ur(r)/100:+r,1),_u=r=>[...r].sort().join("").toUpperCase(),$=(r,e=6)=>{const t=Math.pow(10,e);return Math.round(+r*t)/t},se=(r,e,t)=>Math.max(e,Math.min(r,t)),Cu=r=>180*r/Math.PI,Su=r=>r*Math.PI/180,Bn=360,mt=r=>{if(typeof r=="string"){const e=r.match(xu).groups,t=+e.number;switch(e.units){case Ve.RADIANS:r=$(Cu(t));break;case Ve.TURNS:r=$(t*Bn);break;case Ve.GRADIANS:r=$(.9*t);break;case Ve.DEGREES:default:r=t}}return(r>360||r<0)&&(r-=Math.floor(r/Bn)*Bn),r},me=r=>(typeof r=="string"&&(r=Me.test(r)?ur(r)/100:+r),isNaN(+r)||r>1?1:$(r)),Au=(r,e)=>{let t;switch(e){case Ve.RADIANS:t=$(Su(r));break;case Ve.TURNS:t=$(r/Bn);break;case Ve.GRADIANS:t=$(10/9*r);break;case Ve.DEGREES:case Ve.NONE:default:t=r}return t},us=r=>`${r}`in Ze,Mu=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],Ty=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],Ji=Mu.map((r=>r.reduce(((e,t)=>e+t),0))),cs=(r,e,t)=>(t<0&&(t+=6),t>=6&&(t-=6),$(t<1?((e-r)*t+r)*Y:t<3?e*Y:t<4?((e-r)*(4-t)+r)*Y:r*Y)),Iy=r=>r<=.04045?r/12.92:((r+.055)/1.055)**2.4,Py=r=>r<=.0031308?12.92*r:1.055*r**(1/2.4)-.055,Bu=(r,e,t,i)=>{const n=[0,0,0],s=[r,e,t];return i.forEach(((a,o)=>{a.forEach(((l,u)=>{n[o]+=l*s[u]}))})),n},pe=(r,e,t)=>{e/=100;const i=(t/=100)<=.5?t*(e+1):t+e-t*e,n=2*t-i;return{R:cs(n,i,(r/=60)+2),G:cs(n,i,r),B:cs(n,i,r-2)}},oi=(r,e,t,i=1)=>{r/=Y,e/=Y,t/=Y,i=Math.min(i,1);const n=Math.max(r,e,t),s=Math.min(r,e,t),a=n-s;let o=0,l=0;const u=(n+s)/2;if(a!==0){switch(n){case r:o=(e-t)/a%6;break;case e:o=(t-r)/a+2;break;case t:o=(r-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=(r,e,t)=>{const i=[r/Y,e/Y,t/Y].map(Iy),n=Bu(i[0],i[1],i[2],Mu),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]))]})(n[0],n[1],n[2]);return{L:s[0],a:s[1],b:s[2]}},Mr=(r,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)]})(r,e,t),n=Bu(i[0],i[1],i[2],Ty).map(Py);return{R:se(n[0]*Y,0,Y),G:se(n[1]*Y,0,Y),B:se(n[2]*Y,0,Y)}},qu=(r,e,t)=>{const i=Math.sqrt(e**2+t**2),n=Cu(Math.atan2(t,e));return{L:r,C:i,H:mt(n)}},ku=(r,e,t)=>{const i=Su(t);return{L:r,a:e*Math.cos(i),b:e*Math.sin(i)}},ui=(r,e,t)=>{const i=li(r,e,t);return qu(i.L,i.a,i.b)},Rn=(r,e,t)=>{const i=ku(r,e,t);return Mr(i.L,i.a,i.b)},Si=(r,e,t,i=1)=>({H:oi(r,e,t,i).H,W:$(Math.min(r,e,t)/Y*100),B:$(100*(1-Math.max(r,e,t)/Y)),A:i}),Dn=(r,e,t)=>{const i=1-(t/=100)-(e/=100),n=i*(1-Math.abs(r/60%2-1));let s=0,a=0,o=0;return r<60?(s=i,a=n,o=0):r>=60&&r<120?(s=n,a=i,o=0):r>=120&&r<180?(s=0,a=i,o=n):r>=180&&r<240?(s=0,a=n,o=i):r>=240&&r<300?(s=n,a=0,o=i):r>=300&&(s=i,a=0,o=n),s+=e,a+=e,o+=e,{R:se(s*Y,0,Y),G:se(a*Y,0,Y),B:se(o*Y,0,Y)}},Ia=(r,e,t,i)=>({R:$(Y*(1-r)*(i=1-i)),G:$(Y*(1-e)*i),B:$(Y*(1-t)*i)}),Eu=(r,e,t)=>{r/=Y,e/=Y,t/=Y;const i=1-Math.max(r,e,t),n=1-i,s=n&&(n-e)/n,a=n&&(n-t)/n;return{C:$(100*(n&&(n-r)/n)),M:$(100*s),Y:$(100*a),K:$(100*i)}},Co=(r,e)=>{if(r<0&&(r+=360),r>360&&(r-=360),r===360||r===0)return r;const t=[[0,120],[120,180],[180,240],[240,360]],i=[[0,60],[60,120],[120,240],[240,360]],n=e?i:t;let s=0,a=0,o=0,l=0;return(e?t:i).find(((u,c)=>r>=u[0]&&r<u[1]&&(s=u[0],a=u[1],o=n[c][0],l=n[c][1],!0))),o+(l-o)/(a-s)*(r-s)};class Fu{get rgb(){return this._rgb}}class Ry extends Fu{constructor(e){super();const t=e.match(rt.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:nn(this._r),G:nn(this._g),B:nn(this._b)};this._a!==void 0&&(i.A=nn(this._a)/Y),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 n=t,s=0;if(Number.isNaN(+t))if(t in i)this._result=i[t];else if(ct.REGEXP.test(n))ct.REGEXP.lastIndex=0,this._result=this._getCalcValue(n,i);else{for(;ct.SCOPED.test(n)&&s<100;){if(ct.SCOPED.lastIndex=0,n=n.replace(ct.SCOPED,((a,o)=>this._calculate(o,i).toString())),ct.REGEXP.test(n)){ct.REGEXP.lastIndex=0;break}s++}this._result=this._getCalcValue(n,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,n=this._calculate(i,t);if(Number.isNaN(n))throw new Error(`Invalid value for ${this._colorIndex}. ${i} ${zy}`);return n}_calculate(e,t){return this._operations.forEach(((i,n)=>{let s=0;for(;n.test(e)&&s<100;)e=e.replace(n,((a,o,l)=>i(t[o]??+o,t[l]??+l).toString())),s++})),+e}get result(){return this._result}}class Jn extends Fu{get hasPercentageAlpha(){return Me.test(this._a)}}class Ks extends Jn{constructor(e,t){super();const i=e.match(rt.RGB).groups,{r_legacy:n,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 w=t(h),x={r:w.R,g:w.G,b:w.B,alpha:w.A??1},b=new ze("r",p,x).result,S=new ze("g",m,x).result,q=new ze("b",g,x).result,M={R:Math.min(b,Y),G:Math.min(S,Y),B:Math.min(q,Y)};if(y){const B=new ze("alpha",y,x).result;M.A=Math.min(B,1)}this._rgb=M}else{this._r=n??l,this._g=s??u,this._b=a??c,this._a=o??d;const w={R:Math.min(wi(this._r),Y),G:Math.min(wi(this._g),Y),B:Math.min(wi(this._b),Y)};this._a!==void 0&&(w.A=me(this._a)),this._rgb=w}}get hasPercentageValues(){return Me.test(this._r)&&Me.test(this._g)&&Me.test(this._b)}static test(e){return rt.RGB.test(e)}}class Pa extends Jn{get angleUnit(){if(this._h){const e=this._h.match(xu).groups.units;return e===""?Ve.NONE:e}return Ve.NONE}}class Ys extends Pa{constructor(e,t){super();const i=e.match(rt.HSL).groups,{h_legacy:n,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 w=t(h),x=oi(w.R,w.G,w.B,w.A),b={h:x.H,s:x.S,l:x.L,alpha:x.A},S=new ze("h",p,b).result,q=new ze("s",m,b).result,M=new ze("l",g,b).result,B=pe(se(S,0,360),se(q,0,ft),se(M,0,ft));if(y){const L=new ze("alpha",y,b).result;B.A=se(L,0,1)}this._rgb=B}else{this._h=n??l,this._s=s??u,this._l=a??c,this._a=o??d;const w=pe(mt(this._h),it(this._s),it(this._l));this._a!==void 0&&(w.A=me(this._a)),this._rgb=w}}static test(e){return rt.HSL.test(e)}}class Xs extends Pa{constructor(e,t){super();const i=e.match(rt.HWB).groups,{h:n,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,w=new ze("w",c,g).result,x=new ze("b",d,g).result,b=Dn(se(y,0,360),se(w,0,ft),se(x,0,ft));if(h){const S=new ze("alpha",h,g).result;b.A=se(S,0,1)}this._rgb=b}else{this._h=n,this._w=s,this._b=a,this._a=o;const p=Dn(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 rt.HWB.test(e)}}class Js extends Jn{constructor(e,t){super();const i=e.match(rt.CIELab).groups,{L:n,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,w=new ze("a",c,g).result,x=new ze("b",d,g).result,b=Mr(se(y,0,ft),se(w,-125,ni),se(x,-125,ni));if(h){const S=new ze("alpha",h,g).result;b.A=se(S,0,1)}this._rgb=b}else{this._L=n,this._A=s,this._B=a,this._a=o;const p=Mr(it(this._L),Pn(this._A),Pn(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 rt.CIELab.test(e)}}class Zs extends Pa{constructor(e,t){super();const i=e.match(rt.LCH).groups,{l:n,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,w=new ze("c",c,g).result,x=new ze("h",d,g).result,b=Rn(se(y,0,ft),se(w,-150,Xi),mt(x));if(h){const S=new ze("alpha",h,g).result;b.A=se(S,0,1)}this._rgb=b}else{this._l=n,this._c=s,this._h=a,this._a=o;const p=Rn(it(this._l),wu(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 rt.LCH.test(e)}}class Qs extends Jn{constructor(e){super();const t=e.match(rt.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 rt.CMYK.test(e)}}const Le=r=>typeof r=="string"?(e=>{let t;if(Object.keys(j).some((i=>{if(rt[i].test(e))return t=i,!0})),!t&&~bu.indexOf(e)&&(t=j.HEX),!t)throw new Error(Fy);return t})(r):(e=>{let t,i=!1;const n=_u(Object.keys(e));if(Gs[n]&&(t=Gs[n]),t&&t===j.RGB){const s=Object.entries(e).some((o=>!Ws.test(`${o[1]}`))),a=Object.entries(e).some((o=>!(Me.test(`${o[1]}`)||!Ws.test(`${o[1]}`)&&!isNaN(+o[1])&&+o[1]<=Y)));s&&a&&(i=!0),s||(t=j.HEX)}if(!t||i)throw new Error(Oy);return t})(r),Dy={[j.HEX](r){const e=~bu.indexOf(r)?In[r]:r;return new Ry(e).rgb},[j.RGB]:r=>new Ks(r,Ue).rgb,[j.HSL]:r=>new Ys(r,Ue).rgb,[j.HWB]:r=>new Xs(r,Ue).rgb,[j.CIELab]:r=>new Js(r,Ue).rgb,[j.LCH]:r=>new Zs(r,Ue).rgb,[j.CMYK]:r=>new Qs(r).rgb},$y={[j.HEX](r){const e={R:wi(`${r.R}`),G:wi(`${r.G}`),B:wi(`${r.B}`)};return be(r,"A")&&(e.A=Math.min(wi(`${r.A}`,!0),1)),e},[j.RGB](r){return this.HEX(r)},[j.HSL](r){const e=it(`${r.S}`),t=it(`${r.L}`),i=pe(mt(r.H),e,t);return be(r,"A")&&(i.A=me(r.A)),i},[j.HWB](r){const e=it(`${r.W}`),t=it(`${r.B}`),i=Dn(mt(r.H),e,t);return be(r,"A")&&(i.A=me(r.A)),i},[j.CIELab](r){const e=it(`${r.L}`),t=Pn(`${r.a}`),i=Pn(`${r.b}`),n=Mr(e,t,i);return be(r,"A")&&(n.A=me(r.A)),n},[j.LCH](r){const e=it(`${r.L}`),t=wu(`${r.C}`),i=mt(`${r.H}`),n=Rn(e,t,i);return be(r,"A")&&(n.A=me(r.A)),n},[j.CMYK](r){const e=ii(`${r.C}`),t=ii(`${r.M}`),i=ii(`${r.Y}`),n=ii(`${r.K}`),s=Ia(e,t,i,n);return be(r,"A")&&(s.A=me(r.A)),s}},Ue=(r,e=Le(r))=>typeof r=="string"?Dy[e](r):$y[e](r),xe=(r,...e)=>{const t=[],i=[],n=[],s=[],a=[],o=[],l=[],u=Object.values(Ve),c=Object.values(Oe),d=Object.values(Ar),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(Xs.test(p)){const m=new Xs(p,Ue);i.push(m.angleUnit),l.push(m.hasPercentageAlpha);continue}if(Ks.test(p)){const m=new Ks(p,Ue);n.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Js.test(p)){const m=new Js(p,Ue);s.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Zs.test(p)){const m=new Zs(p,Ue);i.push(m.angleUnit),a.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Qs.test(p)){const m=new Qs(p);o.push(m.hasPercentageValues),p.startsWith("cmyk")&&h.cmykFunction++,l.push(m.hasPercentageAlpha)}}return{decimals:typeof r.decimals===wr.NUMBER?r.decimals:Tt.decimals,legacyCSS:typeof r.legacyCSS===wr.BOOLEAN?r.legacyCSS:!!(t.length&&h.legacyCSS===t.length)||Tt.legacyCSS,spacesAfterCommas:typeof r.spacesAfterCommas===wr.BOOLEAN?r.spacesAfterCommas:!!(t.length&&h.spacesAfterCommas===t.length)||Tt.spacesAfterCommas,anglesUnit:r.anglesUnit&&u.includes(r.anglesUnit)?r.anglesUnit:new Set(i).size===1?i[0]:Tt.anglesUnit,rgbUnit:r.rgbUnit&&c.includes(r.rgbUnit)?r.rgbUnit:new Set(n).size===1&&n[0]?Oe.PERCENT:Tt.rgbUnit,labUnit:r.labUnit&&c.includes(r.labUnit)?r.labUnit:new Set(s).size===1&&s[0]?Oe.PERCENT:Tt.labUnit,lchUnit:r.lchUnit&&c.includes(r.lchUnit)?r.lchUnit:new Set(a).size===1&&a[0]?Oe.PERCENT:Tt.lchUnit,cmykUnit:r.cmykUnit&&c.includes(r.cmykUnit)?r.cmykUnit:new Set(o).size!==1||o[0]?Tt.cmykUnit:Oe.NONE,alphaUnit:r.alphaUnit&&c.includes(r.alphaUnit)?r.alphaUnit:new Set(l).size===1&&l[0]?Oe.PERCENT:Tt.alphaUnit,cmykFunction:r.cmykFunction&&d.includes(r.cmykFunction)?r.cmykFunction:o.length&&o.length===h.cmykFunction?Ar.CMYK:Tt.cmykFunction}},ea=(r,e)=>({H:$(r.H,e),S:$(r.S,e),L:$(r.L,e)}),ds=r=>r?", ":",",mi=(r,e)=>{const t=_u(Object.keys(r));return By[Gs[t]].reduce(((i,n,s)=>{const a=r[n];return a!==void 0&&i.push(e(a,s)),i}),[])},gi=(r,e)=>r.replace(qy,((t,i)=>`${e[+i-1]}`)),br=(r,e,t=!1)=>{const{alphaUnit:i,legacyCSS:n,decimals:s}=e;return i!==Oe.PERCENT||n&&!t?$(r,s):`${$(100*r,s)}%`},So=r=>{const{anglesUnit:e,decimals:t}=r;return(i,n)=>n===0&&e!==Ve.NONE?`${$(Au(i,e),t)}${e}`:n===3?br(i,r):$(i,t)},W={[j.HEX]:r=>{const e=mi(r,(i=>(n=>{let s=$(n,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]:(r,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:n,rgbUnit:s}=e,a=ds(n),o=mi(r,((u,c)=>s===Oe.PERCENT&&c<3?`${((d,h)=>$(d/Y*100,h))(u,t)}%`:c===3?br(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]:(r,e)=>{const{legacyCSS:t,spacesAfterCommas:i}=e,n=ds(i),s=So(e),a=mi(r,s),o=t?a.length===4?`hsla({1}${n}{2}%${n}{3}%${n}{4})`:`hsl({1}${n}{2}%${n}{3}%)`:a.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return gi(o,a)},[j.HWB]:(r,e)=>{const t=So(e),i=mi(r,t),n=i.length===4?"hwb({1} {2}% {3}% / {4})":"hwb({1} {2}% {3}%)";return gi(n,i)},[j.CIELab]:(r,e)=>{const{decimals:t,labUnit:i}=e,n=mi(r,((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/ni*100,u))(a,t)}%`:$(a,t):br(a,e,!0)})),s=n.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return gi(s,n)},[j.LCH]:(r,e)=>{const{decimals:t,lchUnit:i,anglesUnit:n}=e,s=mi(r,((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/Xi*100,c))(o,t)}%`:$(o,t):l===2?n!==Ve.NONE?`${$(Au(o,n),t)}${n}`:$(o,t):br(o,e,!0)})),a=s.length===4?"lch({1} {2} {3} / {4})":"lch({1} {2} {3})";return gi(a,s)},[j.CMYK]:(r,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:n,cmykUnit:s,cmykFunction:a}=e,o=ds(n),l=mi(r,((c,d)=>s===Oe.PERCENT&&d<4?`${$(c,t)}%`:d===4?br(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)}},cr=(r,e,t)=>e.reduce(((i,n)=>[...i,{...r,H:t===Ze.ADDITIVE?mt(r.H+n):mt(Co(Co(r.H,!1)+n,!0))}]),[{...r}]),Ly=(r,e)=>cr(r,[30,-30],e),Hy=(r,e)=>cr(r,[180],e),Ny=(r,e)=>cr(r,[150,-150],e),Vy=(r,e)=>cr(r,[120,-120],e),Uy=(r,e)=>cr(r,[60,-120,180],e),jy=(r,e)=>cr(r,[90,-90,180],e),N={[j.HEX]:r=>({R:sn(r.R),G:sn(r.G),B:sn(r.B)}),HEXA(r){const e=N.HEX(r);return e.A=be(r,"A")?sn(r.A*Y):"0xFF",e},[j.RGB](r,e){const t=Gy(r,e);return be(t,"A")&&delete t.A,t},RGBA(r,e){const t=N.RGB(r,e);return t.A=be(r,"A")?$(r.A):1,t},[j.HSL](r,e){const t=oi(r.R,r.G,r.B);return delete t.A,ea(t,e)},HSLA(r,e){const t=N.HSL(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.HWB](r,e){const t=Si(r.R,r.G,r.B);return delete t.A,((i,n)=>({H:$(i.H,n),W:$(i.W,n),B:$(i.B,n)}))(t,e)},HWBA(r,e){const t=N.HWB(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.CIELab]:(r,e)=>((t,i)=>({L:$(t.L,i),a:$(t.a,i),b:$(t.b,i)}))(li(r.R,r.G,r.B),e),CIELabA(r,e){const t=N.CIELab(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.LCH]:(r,e)=>((t,i)=>({L:$(t.L,i),C:$(t.C,i),H:$(t.H,i)}))(ui(r.R,r.G,r.B),e),LCHA(r,e){const t=N.LCH(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.CMYK]:(r,e)=>((t,i)=>({C:$(t.C,i),M:$(t.M,i),Y:$(t.Y,i),K:$(t.K,i)}))(Eu(r.R,r.G,r.B),e),CMYKA(r,e){const t=N.CMYK(r,e);return t.A=be(r,"A")?$(r.A,e):1,t}},an=(r,e,t,i)=>{const n=Le(r),s=typeof r=="string",a=Ue(r,n),o=typeof r=="string"&&be(a,"A")||typeof r!="string"&&be(r,"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(n){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*Y)}):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(r,e,t,i){const n=Le(r),s=Ue(r,n),a=oi(s.R,s.G,s.B,s.A),o=typeof r=="string"&&be(s,"A")||typeof r!="string"&&be(r,"A"),l=typeof r=="string";switch(n){case j.HEX:default:return o?this.HEXA(ea(a,0),e,t,l):this.HEX(ea(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]:(r,e,t,i)=>e(r,t).map((n=>i?W.HEX(pe(n.H,n.S,n.L)):N.HEX(pe(n.H,n.S,n.L)))),HEXA:(r,e,t,i)=>e(r,t).map((n=>i?W.HEX({...pe(n.H,n.S,n.L),A:me(n.A)*Y}):N.HEXA({...pe(n.H,n.S,n.L),A:me(n.A)}))),[j.RGB]:(r,e,t,i,n)=>e(r,t).map((s=>i?W.RGB(pe(s.H,s.S,s.L),n):N.RGB(pe(s.H,s.S,s.L),n.decimals))),RGBA:(r,e,t,i,n)=>e(r,t).map((s=>i?W.RGB({...pe(s.H,s.S,s.L),A:me(s.A)},n):N.RGBA({...pe(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[j.HSL]:(r,e,t,i,n)=>e(r,t).map((s=>i?W.HSL({H:s.H,S:s.S,L:s.L},n):N.HSL(pe(s.H,s.S,s.L),n.decimals))),HSLA:(r,e,t,i,n)=>e(r,t).map((s=>i?W.HSL({...s,A:me(s.A)},n):N.HSLA({...pe(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[j.HWB]:(r,e,t,i,n)=>e(r,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},n):N.HWB(a,n.decimals)})),HWBA:(r,e,t,i,n)=>e(r,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)},n):N.HWBA({...a,A:me(s.A)},n.decimals)})),[j.CIELab]:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.CIELab(li(a.R,a.G,a.B),n):N.CIELab(a,n.decimals)})),CIELabA:(r,e,t,i,n)=>e(r,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)},n):N.CIELabA({...a,A:me(s.A)},n.decimals)})),[j.LCH]:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.LCH(ui(a.R,a.G,a.B),n):N.LCH(a,n.decimals)})),LCHA:(r,e,t,i,n)=>e(r,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)},n):N.LCHA({...a,A:me(s.A)},n.decimals)}))},Wi={mix(r,e){const t=r.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(Y-l,Y-u,Y-c),p=l-d,m=u-d,g=c-d,y=Math.min(p,m),w=p-y,x=(m+y)/2,b=(g+m-y)/2,S=Math.max(w,x,b)/Math.max(p,m,g),q=isNaN(S)||S===1/0||S<=0?1:S;return{R:w/q+h,Y:x/q+h,B:b/q+h}})(a.R,a.G,a.B);return be(a,"A")&&(o.A=a.A),o})):null;function n(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,Y),B:Math.min(l.B+u.B*c,Y),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,Y)}:{Y:Math.min(h+p*c,Y)}}}),o)}let s;if(e===Ze.ADDITIVE)s=n(t);else{const a=n(i);s=((o,l,u)=>{const c=Math.min(o,l,u),d=Math.min(Y-o,Y-l,Y-u),h=o-c,p=l-c,m=u-c,g=Math.min(p,m),y=h+p-g,w=p+g,x=2*(m-g),b=Math.max(y,w,x)/Math.max(h,p,m),S=isNaN(b)||b===1/0||b<=0?1:b;return{R:y/S+d,G:w/S+d,B:x/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](r,e,t){const i=this.mix(r,e);return delete i.A,t?W.HEX(i):N.HEX(i)},HEXA(r,e,t){const i=this.mix(r,e);return i.A=t?me(i.A)*Y:me(i.A),t?W.HEX(i):N.HEXA(i)},[j.RGB](r,e,t,i){const n=this.mix(r,e);return delete n.A,t?W.RGB(n,i):N.RGB(n,i.decimals)},RGBA(r,e,t,i){const n=this.mix(r,e);return t?W.RGB(n,i):N.RGBA(n,i.decimals)},[j.HSL](r,e,t,i){const n=this.mix(r,e),s=oi(n.R,n.G,n.B);return delete n.A,delete s.A,t?W.HSL(s,i):N.HSL(n,i.decimals)},HSLA(r,e,t,i){const n=this.mix(r,e),s=oi(n.R,n.G,n.B,n.A);return t?W.HSL(s,i):N.HSLA(n,i.decimals)},[j.HWB](r,e,t,i){const n=this.mix(r,e),s=Si(n.R,n.G,n.B);return delete n.A,delete s.A,t?W.HWB(s,i):N.HWB(n,i.decimals)},HWBA(r,e,t,i){const n=this.mix(r,e),s=Si(n.R,n.G,n.B,n.A);return t?W.HWB(s,i):N.HWBA(n,i.decimals)},[j.CIELab](r,e,t,i){const n=this.mix(r,e),s=li(n.R,n.G,n.B);return delete n.A,t?W.CIELab(s,i):N.CIELab(n,i.decimals)},CIELabA(r,e,t,i){const n=this.mix(r,e),s=li(n.R,n.G,n.B);return be(n,"A")&&(s.A=n.A),t?W.CIELab(s,i):N.CIELabA(n,i.decimals)},[j.LCH](r,e,t,i){const n=this.mix(r,e),s=ui(n.R,n.G,n.B);return delete n.A,t?W.LCH(s,i):N.LCH(n,i.decimals)},LCHA(r,e,t,i){const n=this.mix(r,e),s=ui(n.R,n.G,n.B);return be(n,"A")&&(s.A=n.A),t?W.LCH(s,i):N.LCHA(n,i.decimals)}},Gy=(r,e)=>({R:$(r.R,e),G:$(r.G,e),B:$(r.B,e),...be(r,"A")?{A:$(r.A,e)}:{}}),Qe=(r,e,t,i)=>i(Ue(r,e),t),$n=(r,e,t,i,n)=>(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(r),Ue(e),t).map((a=>n(a,i))));function Be(r){const{from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:s,cssFunction:a}=r,o=typeof i=="number"?$n(e,t,i,n?.decimals,s):$n(e,t,5,i?.decimals,s);return a?o.map((l=>a(l,xe((typeof i=="number"?n:i)??{},e,t)))):o}function qe(r){const{colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:n,css:s}=r,a=xe((typeof t=="string"?i:t)??{},...e);return n(e,typeof t=="string"?t:Ze.ADDITIVE,s,a)}const hs=(r,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)})[r],ke=Object.fromEntries(Object.entries(Wi).map((r=>{const[e,t]=r;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=Eu(this.rgb.R,this.rgb.G,this.rgb.B)}updateRGBFromHWB(){this.rgb={...Dn(this.hwb.H,this.hwb.W,this.hwb.B),A:this.rgb.A}}updateRGBFromLCH(){this.rgb={...Rn(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={...Mr(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateLCHFromLAB(){this.lch={...qu(this.lab.L,this.lab.a,this.lab.b),A:this.lab.A}}updateLABromLCH(){this.lab={...ku(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,Y),this.update("rgb")}setG(e){return this.rgb.G=se(e,0,Y),this.update("rgb"),this}setB(e){return this.rgb.B=se(e,0,Y),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,ni),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEb(e){return this.lab.b=se(e,-125,ni),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,Xi),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*Y})}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),n=xe(t,e);return W.RGB(i,n)}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),n=xe(t,e);return W.RGB(i,n)}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),n=xe(t,e);return W.HSL(i,n)}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),n=xe(t,e);return W.HSL(i,n)}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),n=xe(t,e);return W.HWB(i,n)}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),n=xe(t,e);return W.HWB(i,n)}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),n=xe(t,e);return W.CIELab(i,n)}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),n=xe(t,e);return W.CIELab(i,n)}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),n=xe(t,e);return W.LCH(i,n)}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),n=xe(t,e);return W.LCH(i,n)}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),n=xe(t,e);return W.CMYK(i,n)}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),n=xe(t,e);return W.CMYK(i,n)}static getBlendHEXObject(e,t,i=5){return $n(e,t,i,0,N.HEX)}static getBlendHEX(e,t,i=5){return Ae.getBlendHEXObject(e,t,i).map((n=>W.HEX(n)))}static getBlendHEXAObject(e,t,i=5){return $n(e,t,i,0,N.HEXA)}static getBlendHEXA(e,t,i=5){return Ae.getBlendHEXAObject(e,t,i).map((n=>W.HEX(n)))}static getBlendRGBObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGB})}static getBlendRGB(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGB,cssFunction:W.RGB})}static getBlendRGBAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGBA})}static getBlendRGBA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGBA,cssFunction:W.RGB})}static getBlendHSLObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSL})}static getBlendHSL(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSL,cssFunction:W.HSL})}static getBlendHSLAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSLA})}static getBlendHSLA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSLA,cssFunction:W.HSL})}static getBlendHWBObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWB})}static getBlendHWB(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWB,cssFunction:W.HWB})}static getBlendHWBAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWBA})}static getBlendHWBA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWBA,cssFunction:W.HWB})}static getBlendCIELabObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELab})}static getBlendCIELab(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELab,cssFunction:W.CIELab})}static getBlendCIELabAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELabA})}static getBlendCIELabA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELabA,cssFunction:W.CIELab})}static getBlendLCHObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.LCH})}static getBlendLCH(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.LCH,cssFunction:W.LCH})}static getBlendLCHAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.LCHA})}static getBlendLCHA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,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"?an(e,t,!0,xe(i||{},e)):an(e,5,!0,xe(t||{},e))}static getTints(e,t,i){return typeof t=="number"?an(e,t,!1,xe(i||{},e)):an(e,5,!1,xe(t||{},e))}static getHarmony(e,t,i,n){return`${t}`in Mt?hs(t,e,us(i)?i:Ze.ADDITIVE,xe(us(i)?n||{}:i||{},e)):us(t)?hs(Mt.COMPLEMENTARY,e,t,xe(i||{},e)):hs(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"],Yy=["data-disabled"];function Xy(r){const e=r.S*(r.L<50?r.L:100-r.L),t=r.L+e/100;return{h:r.H,s:r.L===0?r.S:2*e/t,v:t}}function Ao(r){const e=(200-r.s)*r.v/100;return{H:r.h,S:e===0||e===200?0:Math.round(r.s*r.v/(e<=100?e:200-e)),L:e/2}}const Jy={__name:"UColorPicker",props:qn({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(r){const e=r,t=la(r,"modelValue",{type:String}),i=Te(),n=k(()=>de({extend:de(Wy),...i.ui?.colorPicker||{}})({size:e.size})),s=k({get(){try{const M=new Ae(t.value||e.defaultValue);return Xy(M.HSLObject)}catch{return{h:0,s:0,v:100}}},set(M){const B=new Ae(Ao(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=yo(M),te=yo(B);function re(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 My&&(xr(B,"pointerdown",re),xr(window,"pointermove",K),xr(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:w}=Lc(s,M=>{m.value={x:M.s,y:l(M.v)},g.value={x:0,y:o(M.h,"right")}});Hc([m,g],()=>{y(),s.value={h:o(g.value.y),s:m.value.x,v:l(m.value.y)},Xe(w)},{throttle:()=>e.throttle});const x=k(()=>new Ae(Ao({h:o(g.value.y),s:100,v:100})).HEX),b=k(()=>({backgroundColor:x.value})),S=k(()=>({backgroundColor:new Ae(t.value||e.defaultValue).HEX,left:`${m.value.x}%`,top:`${m.value.y}%`})),q=k(()=>({backgroundColor:x.value,top:`${g.value.y}%`}));return(M,B)=>(v(),C(f(ne),{as:r.as,class:T(n.value.root({class:[e.ui?.root,e.class]})),"data-disabled":p.value?!0:void 0},{default:_(()=>[I("div",{class:T(n.value.picker({class:e.ui?.picker}))},[I("div",{ref_key:"selectorRef",ref:u,class:T(n.value.selector({class:e.ui?.selector})),style:qt(b.value)},[I("div",{class:T(n.value.selectorBackground({class:e.ui?.selectorBackground})),"data-color-picker-background":""},[I("div",{ref_key:"selectorThumbRef",ref:c,class:T(n.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(n.value.track({class:e.ui?.track})),"data-color-picker-track":""},[I("div",{ref_key:"trackThumbRef",ref:h,class:T(n.value.trackThumb({class:e.ui?.trackThumb})),style:qt(q.value),"data-disabled":p.value?!0:void 0},null,14,Yy)],2)],2)]),_:1},8,["as","class","data-disabled"]))}},Zy=fl(Jy,[["__scopeId","data-v-7fb04091"]]),xt={Root:Zl,Trigger:Ql,Portal:Yp,Content:$p,Arrow:Xl,Item:Vp,Group:Hp,Separator:tm,CheckboxItem:Ip,ItemIndicator:jp,Label:Wp,RadioGroup:Jp,RadioItem:Qp,Sub:rm,SubContent:sm,SubTrigger:om},Qy={Root:fm,Trigger:_m,Portal:xm,Content:vm,Arrow:cm},ev={Root:mp,Trigger:Op,Portal:Ep,Content:qp,Arrow:bp,Close:wp,Anchor:yp},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(r,{emit:e}){const t=r,i=e,n=Ge(),s=Te(),a=t.mode==="hover"?Ft(t,"defaultOpen","open","openDelay","closeDelay"):Ft(t,"defaultOpen","open","modal"),o=Ce(a,i),l=ar(je(()=>t.portal)),u=je(()=>Br(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),c=k(()=>t.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((g,y)=>(g[y]=w=>{w.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})=>[n.default||r.reference?(v(),C(f(p).Trigger,{key:0,"as-child":"",reference:r.reference,class:T(t.class)},{default:_(()=>[A(m.$slots,"default",{open:y})]),_:2},1032,["reference","class"])):R("",!0),"Anchor"in p.value&&n.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:[!n.default&&t.class,t.ui?.content]})},zr(c.value)),{default:_(()=>[A(m.$slots,"content"),r.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))}},rv=z({__name:"EditableColor",props:{modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=O(t.modelValue),s=()=>{i("update:modelValue",n.value)};return(a,o)=>{const l=lt,u=Zy,c=iv;return v(),C(c,{onBlur:s},{content:_(()=>[F(u,{modelValue:n.value,"onUpdate:modelValue":[o[0]||(o[0]=d=>n.value=d),s],class:"p-2"},null,8,["modelValue"])]),default:_(()=>[F(l,{label:n.value,color:"neutral",size:"xs",variant:"soft"},{leading:_(()=>[I("span",{style:qt({backgroundColor:n.value}),class:"size-3 rounded-full"},null,4)]),_:1},8,["label"])]),_:1})}}}),nv=Object.assign(rv,{__name:"EditableColor"}),Ou={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{dir:s}=Tr(),a=Te(),o=ar(je(()=>t.portal)),l=Ce(Nc(t,"sub","items","portal","labelKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),u=ml(n,["default"]),[c,d]=Mn(),h=k(()=>s.value==="rtl"?a.ui.icons.chevronLeft:a.ui.icons.chevronRight),p=k(()=>t.items?.length?Vc(t.items)?t.items:[t.items]:[]);return(m,g)=>(v(),V(we,null,[F(f(c),null,{default:_(({item:y,active:w,index:x})=>[A(m.$slots,y.slot||"item",{item:y,index:x},()=>[A(m.$slots,y.slot?`${y.slot}-leading`:"item-leading",{item:y,active:w,index:x},()=>[y.loading?(v(),C(Pe,{key:0,name:r.loadingIcon||f(a).ui.icons.loading,class:T(r.ui.itemLeadingIcon({class:[r.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(r.ui.itemLeadingIcon({class:[r.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,active:w}))},null,8,["name","class"])):y.avatar?(v(),C(or,H({key:2,size:y.ui?.itemLeadingAvatarSize||r.uiOverride?.itemLeadingAvatarSize||r.ui.itemLeadingAvatarSize()},y.avatar,{class:r.ui.itemLeadingAvatar({class:[r.uiOverride?.itemLeadingAvatar,y.ui?.itemLeadingAvatar],active:w})}),null,16,["size","class"])):R("",!0)]),f(xi)(y,t.labelKey)||n[y.slot?`${y.slot}-label`:"item-label"]?(v(),V("span",{key:0,class:T(r.ui.itemLabel({class:[r.uiOverride?.itemLabel,y.ui?.itemLabel],active:w}))},[A(m.$slots,y.slot?`${y.slot}-label`:"item-label",{item:y,active:w,index:x},()=>[ce(Z(f(xi)(y,t.labelKey)),1)]),y.target==="_blank"&&r.externalIcon!==!1?(v(),C(Pe,{key:0,name:typeof r.externalIcon=="string"?r.externalIcon:f(a).ui.icons.external,class:T(r.ui.itemLabelExternalIcon({class:[r.uiOverride?.itemLabelExternalIcon,y.ui?.itemLabelExternalIcon],color:y?.color,active:w}))},null,8,["name","class"])):R("",!0)],2)):R("",!0),I("span",{class:T(r.ui.itemTrailing({class:[r.uiOverride?.itemTrailing,y.ui?.itemTrailing]}))},[A(m.$slots,y.slot?`${y.slot}-trailing`:"item-trailing",{item:y,active:w,index:x},()=>[y.children?.length?(v(),C(Pe,{key:0,name:h.value,class:T(r.ui.itemTrailingIcon({class:[r.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color,active:w}))},null,8,["name","class"])):y.kbds?.length?(v(),V("span",{key:1,class:T(r.ui.itemTrailingKbds({class:[r.uiOverride?.itemTrailingKbds,y.ui?.itemTrailingKbds]}))},[(v(!0),V(we,null,Ye(y.kbds,(b,S)=>(v(),C(cu,H({key:S,size:y.ui?.itemTrailingKbdsSize||r.uiOverride?.itemTrailingKbdsSize||r.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof b=="string"?{value:b}:b),null,16,["size"]))),128))],2)):R("",!0)]),F(f(xt).ItemIndicator,{"as-child":""},{default:_(()=>[F(Pe,{name:r.checkedIcon||f(a).ui.icons.check,class:T(r.ui.itemTrailingIcon({class:[r.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(sr(r.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(r.ui.viewport({class:r.uiOverride?.viewport}))},[(v(!0),V(we,null,Ye(p.value,(y,w)=>(v(),C(f(xt).Group,{key:`group-${w}`,class:T(r.ui.group({class:r.uiOverride?.group}))},{default:_(()=>[(v(!0),V(we,null,Ye(y,(x,b)=>(v(),V(we,{key:`group-${w}-${b}`},[x.type==="label"?(v(),C(f(xt).Label,{key:0,class:T(r.ui.label({class:[r.uiOverride?.label,x.ui?.label,x.class]}))},{default:_(()=>[F(f(d),{item:x,index:b},null,8,["item","index"])]),_:2},1032,["class"])):x.type==="separator"?(v(),C(f(xt).Separator,{key:1,class:T(r.ui.separator({class:[r.uiOverride?.separator,x.ui?.separator,x.class]}))},null,8,["class"])):x?.children?.length?(v(),C(f(xt).Sub,{key:2,open:x.open,"default-open":x.defaultOpen},{default:_(()=>[F(f(xt).SubTrigger,{as:"button",type:"button",disabled:x.disabled,"text-value":f(xi)(x,t.labelKey),class:T(r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color}))},{default:_(()=>[F(f(d),{item:x,index:b},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),F(Ou,H({sub:"",class:t.class,ui:r.ui,"ui-override":r.uiOverride,portal:r.portal,items:x.children,align:"start","align-offset":-4,"side-offset":3,"label-key":r.labelKey,"checked-icon":r.checkedIcon,"loading-icon":r.loadingIcon,"external-icon":r.externalIcon},{ref_for:!0},x.content),gl({_:2},[Ye(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"])):x.type==="checkbox"?(v(),C(f(xt).CheckboxItem,{key:3,"model-value":x.checked,disabled:x.disabled,"text-value":f(xi)(x,t.labelKey),class:T(r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color})),"onUpdate:modelValue":x.onUpdateChecked,onSelect:x.onSelect},{default:_(()=>[F(f(d),{item:x,index:b},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:x.disabled,"text-value":f(xi)(x,t.labelKey),onSelect:x.onSelect},{default:_(()=>[F(hl,H({ref_for:!0},f(Uc)(x),{custom:""}),{default:_(({active:S,...q})=>[F(jc,H({ref_for:!0},q,{class:r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color,active:S})}),{default:_(()=>[F(f(d),{item:x,active:S,index:b},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"}},zu={__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(r,{emit:e}){const t=r,i=e,n=Ge(),s=Te(),a=Ce(Ft(t,"defaultOpen","open","modal"),i),o=je(()=>Br(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),l=je(()=>t.arrow),u=ml(n,["default"]),c=k(()=>de({extend:de(sv),...s.ui?.dropdownMenu||{}})({size:t.size}));return(d,h)=>(v(),C(f(Zl),oe(le(f(a))),{default:_(({open:p})=>[n.default?(v(),C(f(Ql),{key:0,"as-child":"",class:T(t.class),disabled:r.disabled},{default:_(()=>[A(d.$slots,"default",{open:p})]),_:2},1032,["class","disabled"])):R("",!0),F(Ou,H({class:c.value.content({class:[!n.default&&t.class,t.ui?.content]}),ui:c.value,"ui-override":t.ui},o.value,{items:r.items,portal:r.portal,"label-key":r.labelKey,"checked-icon":r.checkedIcon,"loading-icon":r.loadingIcon,"external-icon":r.externalIcon}),gl({default:_(()=>[r.arrow?(v(),C(f(Xl),H({key:0},l.value,{class:c.value.arrow({class:t.ui?.arrow})}),null,16,["class"])):R("",!0)]),_:2},[Ye(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))}},Mo=async r=>{try{await navigator.clipboard.writeText(r)}catch(e){console.error("Failed to copy path:",e)}},Tu=async r=>{try{const e=`:${r.path.replace(/\./g,"-")}="${JSON.stringify(r.value)}"`;await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy prop:",e)}},av=async r=>{try{const e=r.children?.map(i=>i.value)||[],t=`:${r.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)}},Iu=async r=>{try{const e=JSON.stringify(r);await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy value:",e)}},Pu=async r=>{try{if(!r.children||r.children.length<3)return;await navigator.clipboard.writeText(`new Vector3(${r.children[0].value}, ${r.children[1].value}, ${r.children[2].value})`)}catch(e){console.error("Failed to copy prop as Vector3:",e)}},ov=async r=>{try{const t=`[${(r.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 r=>{try{let e={};r.children&&r.children.length>0&&(e=r.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)}},Ru=async r=>{try{const e=r.children?.find(u=>u.label==="x"),t=r.children?.find(u=>u.label==="y"),i=r.children?.find(u=>u.label==="z"),n=r.children?.find(u=>u.label==="order"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=n?.value||"XYZ";await navigator.clipboard.writeText(`new Euler(${s}, ${a}, ${o}, '${l}')`)}catch(e){console.error("Failed to copy value as Euler:",e)}},Du=async r=>{try{const e=r.children?.find(u=>u.label==="x"),t=r.children?.find(u=>u.label==="y"),i=r.children?.find(u=>u.label==="z"),n=r.children?.find(u=>u.label==="w"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=n?.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(r){let e=0,t=r;return r.scene&&(t=r.scene),t.traverse(i=>{if(i.isMesh&&i.geometry){const n=i.geometry,s=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,a=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,l=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,u=s+a+o+l;e+=u}}),e}function cv(r){return(r/1024).toFixed(2)}/**
|
|
1
|
+
import{i as Ki,f as Ps,g as nl,h as k,j as nd,r as O,k as ia,l as _e,m as Ln,n as Br,p as Ga,q as ri,s as Xe,v as gt,x as sd,y as Hn,z as sl,A as al,B as Ai,C as ol,D as Re,E as pt,F as z,G as De,H as nt,I as vt,J as A,K as f,L as X,M as C,o as v,w as _,N as H,P as ne,O as ad,Q as ra,R as od,S as pi,T as es,U as ld,V as ud,W as ts,X as Wa,b as F,Y as qr,Z as nr,$ as $t,a0 as R,a1 as oe,a2 as le,a3 as kr,a4 as na,a5 as Er,a6 as Fr,c as V,a7 as we,a8 as Ye,a9 as ht,aa as fe,ab as sr,ac as ll,ad as tt,ae as dd,af as cd,ag as Ei,ah as ul,ai as hd,aj as qt,ak as Ce,al as fd,am as Or,an as pd,ao as dl,ap as md,aq as cl,ar as gd,as as sa,at as yd,au as Ge,av as vd,d as de,t as Z,aw as zr,ax as Nn,ay as bd,az as xd,aA as An,aB as Pt,aC as wd,aD as aa,aE as _d,aF as Cd,aG as Sd,aH as Ad,aI as Md,aJ as Bd,aK as qd,aL as kd,aM as Ed,aN as Ka,aO as oa,aP as je,aQ as Fd,aR as Od,aS as zd,aT as Td,aU as Te,aV as lt,a as I,aW as ce,aX as T,aY as Ft,aZ as ar,a_ as Tr,a$ as Id,b0 as Pd,b1 as Rd,b2 as qn,b3 as la,b4 as Dd,b5 as hl,b6 as $d,_ as fl,b7 as ua,b8 as pl,b9 as Pe,ba as or,bb as da,bc as Ld,bd as Hd,be as Nd,bf as ml,bg as Vd,bh as xi,bi as gl,bj as Ud,bk as jd,bl as Gd,bm as is}from"#entry";function Wd(r,e=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY){return Math.min(t,Math.max(e,r))}function Xr(r,e){let t=r;const i=e.toString(),n=i.indexOf("."),s=n>=0?i.length-n:0;if(s>0){const a=10**s;t=Math.round(t*a)/a}return t}function Kd(r,e,t,i){e=Number(e),t=Number(t);const n=(r-(Number.isNaN(e)?0:e))%i;let s=Xr(Math.abs(n)*2>=i?r+Math.sign(n)*(i-Math.abs(n)):r-n,i);return Number.isNaN(e)?!Number.isNaN(t)&&s>t&&(s=Math.floor(Xr(t/i,i))*i):s<e?s=e:!Number.isNaN(t)&&s>t&&(s=e+Math.floor(Xr((t-e)/i,i))*i),s=Xr(s,i),s}function Ya(r,e){return Ki(r)?!1:Array.isArray(r)?r.some(t=>Ps(t,e)):Ps(r,e)}const Yd=["INPUT","TEXTAREA"];function Xd(r,e,t,i={}){if(!e||i.enableIgnoredElement&&Yd.includes(e.nodeName))return null;const{arrowKeyOptions:n="both",attributeName:s="[data-reka-collection-item]",itemsArray:a=[],loop:o=!0,dir:l="ltr",preventScroll:u=!0,focus:d=!1}=i,[c,h,p,m,g,y]=[r.key==="ArrowRight",r.key==="ArrowLeft",r.key==="ArrowUp",r.key==="ArrowDown",r.key==="Home",r.key==="End"],w=p||m,x=c||h;if(!g&&!y&&(!w&&!x||n==="vertical"&&x||n==="horizontal"&&w))return null;const b=t?Array.from(t.querySelectorAll(s)):a;if(!b.length)return null;u&&r.preventDefault();let S=null;return x||w?S=yl(b,e,{goForward:w?m:l==="ltr"?c:h,loop:o}):g?S=b.at(0)||null:y&&(S=b.at(-1)||null),d&&S?.focus(),S}function yl(r,e,t,i=r.length){if(--i===0)return null;const n=r.indexOf(e),s=t.goForward?n+1:n-1;if(!t.loop&&(s<0||s>=r.length))return null;const a=(s+r.length)%r.length,o=r[a];return o?o.hasAttribute("disabled")&&o.getAttribute("disabled")!=="false"?yl(r,o,t,i):o:null}const Jd=nl(()=>{const r=O(new Map),e=O(),t=k(()=>{for(const a of r.value.values())if(a)return!0;return!1}),i=ia({scrollBody:O(!0)});let n=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&&n?.(),e.value=void 0};return _e(t,(a,o)=>{if(!Ln)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},d=i.scrollBody?.value?typeof i.scrollBody.value=="object"?Br({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 d.padding=="number"?`${d.padding}px`:String(d.padding),document.body.style.marginRight=typeof d.margin=="number"?`${d.margin}px`:String(d.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),Ga&&(n=ri(document,"touchmove",c=>Zd(c),{passive:!1})),Xe(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),r});function ca(r){const e=Math.random().toString(36).substring(2,7),t=Jd();t.value.set(e,r??!1);const i=k({get:()=>t.value.get(e)??!1,set:n=>t.value.set(e,n)});return nd(()=>{t.value.delete(e)}),i}function vl(r){const e=window.getComputedStyle(r);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&r.clientWidth<r.scrollWidth||e.overflowY==="auto"&&r.clientHeight<r.scrollHeight)return!0;{const t=r.parentNode;return!(t instanceof Element)||t.tagName==="BODY"?!1:vl(t)}}function Zd(r){const e=r||window.event,t=e.target;return t instanceof Element&&vl(t)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function Vn(r){const e=ia({dir:O("ltr")});return k(()=>r?.value||e.dir?.value||"ltr")}let rs=0;function bl(){gt(r=>{if(!Ln)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??Xa()),document.body.insertAdjacentElement("beforeend",e[1]??Xa()),rs++,r(()=>{rs===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(t=>t.remove()),rs--})})}function Xa(){const r=document.createElement("span");return r.setAttribute("data-reka-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}function xl(r){return k(()=>sd(r)?!!Hn(r)?.closest("form"):!0)}function wl(r,e){const t=sl(!1,300),i=O(null),n=al();function s(){i.value=null,t.value=!1}function a(o,l){const u=o.currentTarget,d={x:o.clientX,y:o.clientY},c=Qd(d,u.getBoundingClientRect()),h=ec(d,c),p=tc(l.getBoundingClientRect()),m=rc([...h,...p]);i.value=m,t.value=!0}return gt(o=>{if(r.value&&e.value){const l=d=>a(d,e.value),u=d=>a(d,r.value);r.value.addEventListener("pointerleave",l),e.value.addEventListener("pointerleave",u),o(()=>{r.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 d=u.target,c={x:u.clientX,y:u.clientY},h=r.value?.contains(d)||e.value?.contains(d),p=!ic(c,i.value),m=!!d.closest("[data-grace-area-trigger]");h?s():(p||m)&&(s(),n.trigger())};r.value?.ownerDocument.addEventListener("pointermove",l),o(()=>r.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:t,onPointerExit:n.on}}function Qd(r,e){const t=Math.abs(e.top-r.y),i=Math.abs(e.bottom-r.y),n=Math.abs(e.right-r.x),s=Math.abs(e.left-r.x);switch(Math.min(t,i,n,s)){case s:return"left";case n:return"right";case t:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function ec(r,e,t=5){const i=[];switch(e){case"top":i.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":i.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":i.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":i.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return i}function tc(r){const{top:e,right:t,bottom:i,left:n}=r;return[{x:n,y:e},{x:t,y:e},{x:t,y:i},{x:n,y:i}]}function ic(r,e){const{x:t,y:i}=r;let n=!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,d=e[a].y;l>i!=d>i&&t<(u-o)*(i-l)/(d-l)+o&&(n=!n)}return n}function rc(r){const e=r.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),nc(e)}function nc(r){if(r.length<=1)return r.slice();const e=[];for(let i=0;i<r.length;i++){const n=r[i];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let i=r.length-1;i>=0;i--){const n=r[i];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}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 sc=function(r){if(typeof document>"u")return null;var e=Array.isArray(r)?r[0]:r;return e.ownerDocument.body},Fi=new WeakMap,Jr=new WeakMap,Zr={},ns=0,_l=function(r){return r&&(r.host||_l(r.parentNode))},ac=function(r,e){return e.map(function(t){if(r.contains(t))return t;var i=_l(t);return i&&r.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",r,". Doing nothing"),null)}).filter(function(t){return!!t})},oc=function(r,e,t,i){var n=ac(e,Array.isArray(r)?r:[r]);Zr[t]||(Zr[t]=new WeakMap);var s=Zr[t],a=[],o=new Set,l=new Set(n),u=function(c){!c||o.has(c)||(o.add(c),u(c.parentNode))};n.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(o.has(h))d(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&&Jr.set(h,!0),y===1&&h.setAttribute(t,"true"),m||h.setAttribute(i,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return d(e),o.clear(),ns++,function(){a.forEach(function(c){var h=Fi.get(c)-1,p=s.get(c)-1;Fi.set(c,h),s.set(c,p),h||(Jr.has(c)||c.removeAttribute(i),Jr.delete(c)),p||c.removeAttribute(t)}),ns--,ns||(Fi=new WeakMap,Fi=new WeakMap,Jr=new WeakMap,Zr={})}},lc=function(r,e,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(r)?r:[r]),n=sc(r);return n?(i.push.apply(i,Array.from(n.querySelectorAll("[aria-live], script"))),oc(i,n,t,"aria-hidden")):function(){return null}};function ha(r){let e;_e(()=>Hn(r),t=>{t?e=lc(t):e&&e()}),Ai(()=>{e&&e()})}function yt(r,e="reka"){return`${e}-${ol?.()}`}function uc(r){const e=ia({locale:O("en")});return k(()=>r?.value||e.locale?.value||"en")}function dc(r){const e=O(),t=k(()=>e.value?.width??0),i=k(()=>e.value?.height??0);return Re(()=>{const n=Hn(r);if(n){e.value={width:n.offsetWidth,height:n.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 d=o.borderBoxSize,c=Array.isArray(d)?d[0]:d;l=c.inlineSize,u=c.blockSize}else l=n.offsetWidth,u=n.offsetHeight;e.value={width:l,height:u}});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else e.value=void 0}),{width:t,height:i}}function cc(r){const e=sl("",1e3);return{search:e,handleTypeaheadSearch:(n,s)=>{e.value=e.value+n;{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),d=fc(u,e.value,l?.textValue),c=o.find(h=>h.textValue===d);return c&&c.ref.focus(),c?.ref}},resetTypeahead:()=>{e.value=""}}}function hc(r,e){return r.map((t,i)=>r[(e+i)%r.length])}function fc(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=t?r.indexOf(t):-1;let a=hc(r,Math.max(s,0));n.length===1&&(a=a.filter(u=>u!==t));const l=a.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==t?l:void 0}const[Lt,pc]=De("DialogRoot");var mc=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(r,{emit:e}){const t=r,n=nt(t,"open",e,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=O(),a=O(),{modal:o}=vt(t);return pc({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:l=>{n.value=l},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:a}),(l,u)=>A(l.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),fa=mc,gc=z({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r;X();const t=Lt();return(i,n)=>(v(),C(f(ne),H(e,{type:i.as==="button"?"button":void 0,onClick:n[0]||(n[0]=s=>f(t).onOpenChange(!1))}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["type"]))}}),Cl=gc;const yc=ad(()=>O([]));function vc(){const r=yc();return{add(e){const t=r.value[0];e!==t&&t?.pause(),r.value=Ja(r.value,e),r.value.unshift(e)},remove(e){r.value=Ja(r.value,e),r.value[0]?.resume()}}}function Ja(r,e){const t=[...r],i=t.indexOf(e);return i!==-1&&t.splice(i,1),t}function bc(r){return r.filter(e=>e.tagName!=="A")}var xc=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(r,{emit:e}){const t=r,i=e,{currentRef:n,currentElement:s}=X(),a=O(null),o=vc(),l=ra({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});gt(d=>{if(!Ln)return;const c=s.value;if(!t.trapped)return;function h(y){if(l.paused||!c)return;const w=y.target;c.contains(w)?a.value=w:pi(a.value,{select:!0})}function p(y){if(l.paused||!c)return;const w=y.relatedTarget;w!==null&&(c.contains(w)||pi(a.value,{select:!0}))}function m(y){c.contains(a.value)||pi(c)}document.addEventListener("focusin",h),document.addEventListener("focusout",p);const g=new MutationObserver(m);c&&g.observe(c,{childList:!0,subtree:!0}),d(()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",p),g.disconnect()})}),gt(async d=>{const c=s.value;if(await Xe(),!c)return;o.add(l);const h=pt();if(!c.contains(h)){const m=new CustomEvent(es,Wa);c.addEventListener(es,g=>i("mountAutoFocus",g)),c.dispatchEvent(m),m.defaultPrevented||(ld(bc(ud(c)),{select:!0}),pt()===h&&pi(c))}d(()=>{c.removeEventListener(es,y=>i("mountAutoFocus",y));const m=new CustomEvent(ts,Wa),g=y=>{i("unmountAutoFocus",y)};c.addEventListener(ts,g),c.dispatchEvent(m),setTimeout(()=>{m.defaultPrevented||pi(h??document.body,{select:!0}),c.removeEventListener(ts,g),o.remove(l)},0)})});function u(d){if(!t.loop&&!t.trapped||l.paused)return;const c=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,h=pt();if(c&&h){const p=d.currentTarget,[m,g]=od(p);m&&g?!d.shiftKey&&h===g?(d.preventDefault(),t.loop&&pi(m,{select:!0})):d.shiftKey&&h===m&&(d.preventDefault(),t.loop&&pi(g,{select:!0})):h===p&&d.preventDefault()}}return(d,c)=>(v(),C(f(ne),{ref_key:"currentRef",ref:n,tabindex:"-1","as-child":d.asChild,as:d.as,onKeydown:u},{default:_(()=>[A(d.$slots,"default")]),_:3},8,["as-child","as"]))}}),pa=xc;const wc="menu.itemSelect",Rs=["Enter"," "],_c=["ArrowDown","PageUp","Home"],Sl=["ArrowUp","PageDown","End"],Cc=[..._c,...Sl],Sc={ltr:[...Rs,"ArrowRight"],rtl:[...Rs,"ArrowLeft"]},Ac={ltr:["ArrowLeft"],rtl:["ArrowRight"]};function ma(r){return r?"open":"closed"}function kn(r){return r==="indeterminate"}function ga(r){return kn(r)?"indeterminate":r?"checked":"unchecked"}function Mc(r){const e=pt();for(const t of r)if(t===e||(t.focus(),pt()!==e))return}function Bc(r,e){const{x:t,y:i}=r;let n=!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,d=e[a].y;l>i!=d>i&&t<(u-o)*(i-l)/(d-l)+o&&(n=!n)}return n}function qc(r,e){if(!e)return!1;const t={x:r.clientX,y:r.clientY};return Bc(t,e)}function _r(r){return r.pointerType==="mouse"}var kc=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(r,{emit:e}){const t=r,i=e,n=Lt(),{forwardRef:s,currentElement:a}=X();return n.titleId||=yt(void 0,"reka-dialog-title"),n.descriptionId||=yt(void 0,"reka-dialog-description"),Re(()=>{n.contentElement=a,pt()!==document.body&&(n.triggerElement.value=pt())}),(o,l)=>(v(),C(f(pa),{"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(qr),H({id:f(n).contentId,ref:f(s),as:o.as,"as-child":o.asChild,"disable-outside-pointer-events":o.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(n).descriptionId,"aria-labelledby":f(n).titleId,"data-state":f(ma)(f(n).open.value)},o.$attrs,{onDismiss:l[0]||(l[0]=u=>f(n).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"]))}}),Al=kc,Ec=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(r,{emit:e}){const t=r,i=e,n=Lt(),s=nr(i),{forwardRef:a,currentElement:o}=X();return ha(o),(l,u)=>(v(),C(Al,H({...t,...f(s)},{ref:f(a),"trap-focus":f(n).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=d=>{d.defaultPrevented||(d.preventDefault(),f(n).triggerElement.value?.focus())}),onPointerDownOutside:u[1]||(u[1]=d=>{const c=d.detail.originalEvent,h=c.button===0&&c.ctrlKey===!0;(c.button===2||h)&&d.preventDefault()}),onFocusOutside:u[2]||(u[2]=d=>{d.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),Fc=Ec,Oc=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(r,{emit:e}){const t=r,n=nr(e);X();const s=Lt(),a=O(!1),o=O(!1);return(l,u)=>(v(),C(Al,H({...t,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=d=>{d.defaultPrevented||(a.value||f(s).triggerElement.value?.focus(),d.preventDefault()),a.value=!1,o.value=!1}),onInteractOutside:u[1]||(u[1]=d=>{d.defaultPrevented||(a.value=!0,d.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const c=d.target;f(s).triggerElement.value?.contains(c)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&o.value&&d.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16))}}),zc=Oc,Tc=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(r,{emit:e}){const t=r,i=e,n=Lt(),s=nr(i),{forwardRef:a}=X();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(n).open.value},{default:_(()=>[f(n).modal.value?(v(),C(Fc,H({key:0,ref:f(a)},{...t,...f(s),...o.$attrs}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(zc,H({key:1,ref:f(a)},{...t,...f(s),...o.$attrs}),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),ya=Tc,Ic=z({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(r){const e=r;X();const t=Lt();return(i,n)=>(v(),C(f(ne),H(e,{id:f(t).descriptionId}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["id"]))}}),er=Ic,Pc=z({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Lt();return ca(!0),X(),(t,i)=>(v(),C(f(ne),{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"]))}}),Rc=Pc,Dc=z({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Lt(),{forwardRef:t}=X();return(i,n)=>f(e)?.modal.value?(v(),C(f($t),{key:0,present:i.forceMount||f(e).open.value},{default:_(()=>[F(Rc,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)}}),va=Dc,$c=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),ba=$c,Lc=z({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(r){const e=r,t=Lt();return X(),(i,n)=>(v(),C(f(ne),H(e,{id:f(t).titleId}),{default:_(()=>[A(i.$slots,"default")]),_:3},16,["id"]))}}),tr=Lc,Hc=z({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Lt(),{forwardRef:i,currentElement:n}=X();return t.contentId||=yt(void 0,"reka-dialog-content"),Re(()=>{t.triggerElement.value=n.value}),(s,a)=>(v(),C(f(ne),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"]))}}),xa=Hc;const Nc="rovingFocusGroup.onEntryFocus",Vc={bubbles:!1,cancelable:!0},Uc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jc(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function Gc(r,e,t){const i=jc(r.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Uc[i]}function Ml(r,e=!1){const t=pt();for(const i of r)if(i===t||(i.focus({preventScroll:e}),pt()!==t))return}function Wc(r,e){return r.map((t,i)=>r[(e+i)%r.length])}const[Kc,Yc]=De("RovingFocusGroup");var Xc=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(r,{expose:e,emit:t}){const i=r,n=t,{loop:s,orientation:a,dir:o}=vt(i),l=Vn(o),u=nt(i,"currentTabStopId",n,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),d=O(!1),c=O(!1),h=O(0),{getItems:p,CollectionSlot:m}=na({isProvider:!0});function g(w){const x=!c.value;if(w.currentTarget&&w.target===w.currentTarget&&x&&!d.value){const b=new CustomEvent(Nc,Vc);if(w.currentTarget.dispatchEvent(b),n("entryFocus",b),!b.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);Ml(L,i.preventScrollOnEntryFocus)}}c.value=!1}function y(){setTimeout(()=>{c.value=!1},1)}return e({getItems:p}),Yc({loop:s,dir:l,orientation:a,currentTabStopId:u,onItemFocus:w=>{u.value=w},onItemShiftTab:()=>{d.value=!0},onFocusableItemAdd:()=>{h.value++},onFocusableItemRemove:()=>{h.value--}}),(w,x)=>(v(),C(f(m),null,{default:_(()=>[F(f(ne),{tabindex:d.value||h.value===0?-1:0,"data-orientation":f(a),as:w.as,"as-child":w.asChild,dir:f(l),style:{outline:"none"},onMousedown:x[0]||(x[0]=b=>c.value=!0),onMouseup:y,onFocus:g,onBlur:x[1]||(x[1]=b=>d.value=!1)},{default:_(()=>[A(w.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Bl=Xc,Jc=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(r){const e=r,t=Kc(),i=yt(),n=k(()=>e.tabStopId||i),s=k(()=>t.currentTabStopId.value===n.value),{getItems:a,CollectionItem:o}=na();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 d=Gc(u,t.orientation.value,t.dir.value);if(d!==void 0){if(u.metaKey||u.ctrlKey||u.altKey||!e.allowShiftKey&&u.shiftKey)return;u.preventDefault();let c=[...a().map(h=>h.ref).filter(h=>h.dataset.disabled!=="")];if(d==="last")c.reverse();else if(d==="prev"||d==="next"){d==="prev"&&c.reverse();const h=c.indexOf(u.currentTarget);c=t.loop.value?Wc(c,h+1):c.slice(h+1)}Xe(()=>Ml(c))}}return(u,d)=>(v(),C(f(o),null,{default:_(()=>[F(f(ne),{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:d[0]||(d[0]=c=>{u.focusable?f(t).onItemFocus(n.value):c.preventDefault()}),onFocus:d[1]||(d[1]=c=>f(t).onItemFocus(n.value)),onKeydown:l},{default:_(()=>[A(u.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),ql=Jc,Zc=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(r){const e=r,{primitiveElement:t,currentElement:i}=Er(),n=k(()=>e.checked??e.value);return _e(n,(s,a)=>{if(!i.value)return;const o=i.value,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(d&&s!==a){const c=new Event("input",{bubbles:!0}),h=new Event("change",{bubbles:!0});d.call(o,s),o.dispatchEvent(c),o.dispatchEvent(h)}}),(s,a)=>(v(),C(Fr,H({ref_key:"primitiveElement",ref:t},{...e,...s.$attrs},{as:"input"}),null,16))}}),Za=Zc,Qc=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(r){const e=r,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((n,s)=>typeof n=="object"?Object.entries(n).map(([a,o])=>({name:`${e.name}[${s}][${a}]`,value:o})):{name:`${e.name}[${s}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,s])=>({name:`${e.name}[${n}]`,value:s})):[]);return(n,s)=>(v(),V(we,null,[R(" We render single input if it's required "),t.value?(v(),C(Za,H({key:n.name},{...e,...n.$attrs},{name:n.name,value:n.value}),null,16,["name","value"])):(v(!0),V(we,{key:1},Ye(i.value,a=>(v(),C(Za,H({key:a.name},{ref_for:!0},{...e,...n.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))],2112))}}),kl=Qc;const[eh,q0]=De("CheckboxGroupRoot");function En(r){return r==="indeterminate"}function El(r){return En(r)?"indeterminate":r?"checked":"unchecked"}const[th,ih]=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(r,{emit:e}){const t=r,i=e,{forwardRef:n,currentElement:s}=X(),a=eh(null),o=nt(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:Ya(a.modelValue.value,t.value));function d(){if(Ki(a?.modelValue.value))o.value=En(o.value)?!0:!o.value;else{const p=[...a.modelValue.value||[]];if(Ya(p,t.value)){const m=p.findIndex(g=>Ps(g,t.value));p.splice(m,1)}else p.push(t.value);a.modelValue.value=p}}const c=xl(s),h=k(()=>t.id&&s.value?document.querySelector(`[for="${t.id}"]`)?.innerText:void 0);return ih({disabled:l,state:u}),(p,m)=>(v(),C(sr(f(a)?.rovingFocus.value?f(ql):f(ne)),H(p.$attrs,{id:p.id,ref:f(n),role:"checkbox","as-child":p.asChild,as:p.as,type:p.as==="button"?"button":void 0,"aria-checked":f(En)(u.value)?"mixed":u.value,"aria-required":p.required,"aria-label":p.$attrs["aria-label"]||h.value,"data-state":f(El)(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:d}),{default:_(()=>[A(p.$slots,"default",{modelValue:f(o),state:u.value}),f(c)&&p.name&&!f(a)?(v(),C(f(kl),{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"]))}}),nh=rh,sh=z({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const{forwardRef:e}=X(),t=th();return(i,n)=>(v(),C(f($t),{present:i.forceMount||f(En)(f(t).state.value)||f(t).state.value===!0},{default:_(()=>[F(f(ne),H({ref:f(e),"data-state":f(El)(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"]))}}),ah=sh;const[Fl,oh]=De("PopperRoot");var lh=z({inheritAttrs:!1,__name:"PopperRoot",setup(r){const e=O();return oh({anchor:e,onAnchorChange:t=>e.value=t}),(t,i)=>A(t.$slots,"default")}}),Ir=lh,uh=z({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{forwardRef:t,currentElement:i}=X(),n=Fl();return ll(()=>{n.onAnchorChange(e.reference??i.value)}),(s,a)=>(v(),C(f(ne),{ref:f(t),as:s.as,"as-child":s.asChild},{default:_(()=>[A(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),Pr=uh;const dh={key:0,d:"M0 0L6 6L12 0"},ch={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var hh=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(r){const e=r;return X(),(t,i)=>(v(),C(f(ne),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",ch)):(v(),V("path",dh))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),fh=hh;function ph(r){return r!==null}function mh(r){return{name:"transformOrigin",options:r,fn(e){const{placement:t,rects:i,middlewareData:n}=e,a=n.arrow?.centerOffset!==0,o=a?0:r.arrowWidth,l=a?0:r.arrowHeight,[u,d]=Ds(t),c={start:"0%",center:"50%",end:"100%"}[d],h=(n.arrow?.x??0)+o/2,p=(n.arrow?.y??0)+l/2;let m="",g="";return u==="bottom"?(m=a?c:`${h}px`,g=`${-l}px`):u==="top"?(m=a?c:`${h}px`,g=`${i.floating.height+l}px`):u==="right"?(m=`${-l}px`,g=a?c:`${p}px`):u==="left"&&(m=`${i.floating.width+l}px`,g=a?c:`${p}px`),{data:{x:m,y:g}}}}}function Ds(r){const[e,t="center"]=r.split("-");return[e,t]}const gh=["top","right","bottom","left"],si=Math.min,ot=Math.max,Fn=Math.round,Qr=Math.floor,Rt=r=>({x:r,y:r}),yh={left:"right",right:"left",bottom:"top",top:"bottom"},vh={start:"end",end:"start"};function $s(r,e,t){return ot(r,si(e,t))}function Yt(r,e){return typeof r=="function"?r(e):r}function Xt(r){return r.split("-")[0]}function lr(r){return r.split("-")[1]}function wa(r){return r==="x"?"y":"x"}function _a(r){return r==="y"?"height":"width"}const bh=new Set(["top","bottom"]);function It(r){return bh.has(Xt(r))?"y":"x"}function Ca(r){return wa(It(r))}function xh(r,e,t){t===void 0&&(t=!1);const i=lr(r),n=Ca(r),s=_a(n);let a=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=On(a)),[a,On(a)]}function wh(r){const e=On(r);return[Ls(r),e,Ls(e)]}function Ls(r){return r.replace(/start|end/g,e=>vh[e])}const Qa=["left","right"],eo=["right","left"],_h=["top","bottom"],Ch=["bottom","top"];function Sh(r,e,t){switch(r){case"top":case"bottom":return t?e?eo:Qa:e?Qa:eo;case"left":case"right":return e?_h:Ch;default:return[]}}function Ah(r,e,t,i){const n=lr(r);let s=Sh(Xt(r),t==="start",i);return n&&(s=s.map(a=>a+"-"+n),e&&(s=s.concat(s.map(Ls)))),s}function On(r){return r.replace(/left|right|bottom|top/g,e=>yh[e])}function Mh(r){return{top:0,right:0,bottom:0,left:0,...r}}function Ol(r){return typeof r!="number"?Mh(r):{top:r,right:r,bottom:r,left:r}}function zn(r){const{x:e,y:t,width:i,height:n}=r;return{width:i,height:n,top:t,left:e,right:e+i,bottom:t+n,x:e,y:t}}function to(r,e,t){let{reference:i,floating:n}=r;const s=It(e),a=Ca(e),o=_a(a),l=Xt(e),u=s==="y",d=i.x+i.width/2-n.width/2,c=i.y+i.height/2-n.height/2,h=i[o]/2-n[o]/2;let p;switch(l){case"top":p={x:d,y:i.y-n.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:c};break;case"left":p={x:i.x-n.width,y:c};break;default:p={x:i.x,y:i.y}}switch(lr(e)){case"start":p[a]-=h*(t&&u?-1:1);break;case"end":p[a]+=h*(t&&u?-1:1);break}return p}const Bh=async(r,e,t)=>{const{placement:i="bottom",strategy:n="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:r,floating:e,strategy:n}),{x:d,y:c}=to(u,i,l),h=i,p={},m=0;for(let g=0;g<o.length;g++){const{name:y,fn:w}=o[g],{x,y:b,data:S,reset:q}=await w({x:d,y:c,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:u,platform:a,elements:{reference:r,floating:e}});d=x??d,c=b??c,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:r,floating:e,strategy:n}):q.rects),{x:d,y:c}=to(u,h,l)),g=-1)}return{x:d,y:c,placement:h,strategy:n,middlewareData:p}};async function Cr(r,e){var t;e===void 0&&(e={});const{x:i,y:n,platform:s,rects:a,elements:o,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=Yt(e,r),m=Ol(p),y=o[h?c==="floating"?"reference":"floating":c],w=zn(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:d,strategy:l})),x=c==="floating"?{x:i,y:n,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),S=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},q=zn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:x,offsetParent:b,strategy:l}):x);return{top:(w.top-q.top+m.top)/S.y,bottom:(q.bottom-w.bottom+m.bottom)/S.y,left:(w.left-q.left+m.left)/S.x,right:(q.right-w.right+m.right)/S.x}}const qh=r=>({name:"arrow",options:r,async fn(e){const{x:t,y:i,placement:n,rects:s,platform:a,elements:o,middlewareData:l}=e,{element:u,padding:d=0}=Yt(r,e)||{};if(u==null)return{};const c=Ol(d),h={x:t,y:i},p=Ca(n),m=_a(p),g=await a.getDimensions(u),y=p==="y",w=y?"top":"left",x=y?"bottom":"right",b=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[b]:0;(!B||!await(a.isElement==null?void 0:a.isElement(M)))&&(B=o.floating[b]||s.floating[m]);const L=S/2-q/2,E=B/2-g[m]/2-1,D=si(c[w],E),U=si(c[x],E),G=D,ee=B-g[m]-U,te=B/2-g[m]/2+L,re=$s(G,te,ee),K=!l.arrow&&lr(n)!=null&&te!==re&&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]:re,centerOffset:te-re-Q,...K&&{alignmentOffset:Q}},reset:K}}}),kh=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,i;const{placement:n,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Yt(r,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const w=Xt(n),x=It(o),b=Xt(o)===o,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),q=h||(b||!g?[On(o)]:wh(o)),M=m!=="none";!h&&M&&q.push(...Ah(o,g,m,S));const B=[o,...q],L=await Cr(e,y),E=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&E.push(L[w]),c){const te=xh(n,a,S);E.push(L[te[0]],L[te[1]])}if(D=[...D,{placement:n,overflows:E}],!E.every(te=>te<=0)){var U,G;const te=(((U=s.flip)==null?void 0:U.index)||0)+1,re=B[te];if(re&&(!(c==="alignment"?x!==It(re):!1)||D.every(J=>It(J.placement)===x?J.overflows[0]>0:!0)))return{data:{index:te,overflows:D},reset:{placement:re}};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===x||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(n!==K)return{reset:{placement:K}}}return{}}}};function io(r,e){return{top:r.top-e.height,right:r.right-e.width,bottom:r.bottom-e.height,left:r.left-e.width}}function ro(r){return gh.some(e=>r[e]>=0)}const Eh=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(e){const{rects:t}=e,{strategy:i="referenceHidden",...n}=Yt(r,e);switch(i){case"referenceHidden":{const s=await Cr(e,{...n,elementContext:"reference"}),a=io(s,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ro(a)}}}case"escaped":{const s=await Cr(e,{...n,altBoundary:!0}),a=io(s,t.floating);return{data:{escapedOffsets:a,escaped:ro(a)}}}default:return{}}}}},zl=new Set(["left","top"]);async function Fh(r,e){const{placement:t,platform:i,elements:n}=r,s=await(i.isRTL==null?void 0:i.isRTL(n.floating)),a=Xt(t),o=lr(t),l=It(t)==="y",u=zl.has(a)?-1:1,d=s&&l?-1:1,c=Yt(e,r);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Oh=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,i;const{x:n,y:s,placement:a,middlewareData:o}=e,l=await Fh(e,r);return a===((t=o.offset)==null?void 0:t.placement)&&(i=o.arrow)!=null&&i.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:a}}}}},zh=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:i,placement:n}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:y=>{let{x:w,y:x}=y;return{x:w,y:x}}},...l}=Yt(r,e),u={x:t,y:i},d=await Cr(e,l),c=It(Xt(n)),h=wa(c);let p=u[h],m=u[c];if(s){const y=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+d[y],b=p-d[w];p=$s(x,p,b)}if(a){const y=c==="y"?"top":"left",w=c==="y"?"bottom":"right",x=m+d[y],b=m-d[w];m=$s(x,m,b)}const g=o.fn({...e,[h]:p,[c]:m});return{...g,data:{x:g.x-t,y:g.y-i,enabled:{[h]:s,[c]:a}}}}}},Th=function(r){return r===void 0&&(r={}),{options:r,fn(e){const{x:t,y:i,placement:n,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=Yt(r,e),d={x:t,y:i},c=It(n),h=wa(c);let p=d[h],m=d[c];const g=Yt(o,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=h==="y"?"height":"width",S=s.reference[h]-s.floating[b]+y.mainAxis,q=s.reference[h]+s.reference[b]-y.mainAxis;p<S?p=S:p>q&&(p=q)}if(u){var w,x;const b=h==="y"?"width":"height",S=zl.has(Xt(n)),q=s.reference[c]-s.floating[b]+(S&&((w=a.offset)==null?void 0:w[c])||0)+(S?0:y.crossAxis),M=s.reference[c]+s.reference[b]+(S?0:((x=a.offset)==null?void 0:x[c])||0)-(S?y.crossAxis:0);m<q?m=q:m>M&&(m=M)}return{[h]:p,[c]:m}}}},Ih=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){var t,i;const{placement:n,rects:s,platform:a,elements:o}=e,{apply:l=()=>{},...u}=Yt(r,e),d=await Cr(e,u),c=Xt(n),h=lr(n),p=It(n)==="y",{width:m,height:g}=s.floating;let y,w;c==="top"||c==="bottom"?(y=c,w=h===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(w=c,y=h==="end"?"top":"bottom");const x=g-d.top-d.bottom,b=m-d.left-d.right,S=si(g-d[y],x),q=si(m-d[w],b),M=!e.middlewareData.shift;let B=S,L=q;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(L=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(B=x),M&&!h){const D=ot(d.left,0),U=ot(d.right,0),G=ot(d.top,0),ee=ot(d.bottom,0);p?L=m-2*(D!==0||U!==0?D+U:ot(d.left,d.right)):B=g-2*(G!==0||ee!==0?G+ee:ot(d.top,d.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 Un(){return typeof window<"u"}function Mi(r){return Sa(r)?(r.nodeName||"").toLowerCase():"#document"}function ut(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Ht(r){var e;return(e=(Sa(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Sa(r){return Un()?r instanceof Node||r instanceof ut(r).Node:!1}function Ot(r){return Un()?r instanceof Element||r instanceof ut(r).Element:!1}function Dt(r){return Un()?r instanceof HTMLElement||r instanceof ut(r).HTMLElement:!1}function no(r){return!Un()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof ut(r).ShadowRoot}const Ph=new Set(["inline","contents"]);function Rr(r){const{overflow:e,overflowX:t,overflowY:i,display:n}=zt(r);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!Ph.has(n)}const Rh=new Set(["table","td","th"]);function Dh(r){return Rh.has(Mi(r))}const $h=[":popover-open",":modal"];function jn(r){return $h.some(e=>{try{return r.matches(e)}catch{return!1}})}const Lh=["transform","translate","scale","rotate","perspective"],Hh=["transform","translate","scale","rotate","perspective","filter"],Nh=["paint","layout","strict","content"];function Aa(r){const e=Ma(),t=Ot(r)?zt(r):r;return Lh.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)||Hh.some(i=>(t.willChange||"").includes(i))||Nh.some(i=>(t.contain||"").includes(i))}function Vh(r){let e=ai(r);for(;Dt(e)&&!ir(e);){if(Aa(e))return e;if(jn(e))return null;e=ai(e)}return null}function Ma(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Uh=new Set(["html","body","#document"]);function ir(r){return Uh.has(Mi(r))}function zt(r){return ut(r).getComputedStyle(r)}function Gn(r){return Ot(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function ai(r){if(Mi(r)==="html")return r;const e=r.assignedSlot||r.parentNode||no(r)&&r.host||Ht(r);return no(e)?e.host:e}function Tl(r){const e=ai(r);return ir(e)?r.ownerDocument?r.ownerDocument.body:r.body:Dt(e)&&Rr(e)?e:Tl(e)}function Sr(r,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=Tl(r),s=n===((i=r.ownerDocument)==null?void 0:i.body),a=ut(n);if(s){const o=Hs(a);return e.concat(a,a.visualViewport||[],Rr(n)?n:[],o&&t?Sr(o):[])}return e.concat(n,Sr(n,[],t))}function Hs(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Il(r){const e=zt(r);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const n=Dt(r),s=n?r.offsetWidth:t,a=n?r.offsetHeight:i,o=Fn(t)!==s||Fn(i)!==a;return o&&(t=s,i=a),{width:t,height:i,$:o}}function Ba(r){return Ot(r)?r:r.contextElement}function Yi(r){const e=Ba(r);if(!Dt(e))return Rt(1);const t=e.getBoundingClientRect(),{width:i,height:n,$:s}=Il(e);let a=(s?Fn(t.width):t.width)/i,o=(s?Fn(t.height):t.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const jh=Rt(0);function Pl(r){const e=ut(r);return!Ma()||!e.visualViewport?jh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Gh(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==ut(r)?!1:e}function Ci(r,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=r.getBoundingClientRect(),s=Ba(r);let a=Rt(1);e&&(i?Ot(i)&&(a=Yi(i)):a=Yi(r));const o=Gh(s,t,i)?Pl(s):Rt(0);let l=(n.left+o.x)/a.x,u=(n.top+o.y)/a.y,d=n.width/a.x,c=n.height/a.y;if(s){const h=ut(s),p=i&&Ot(i)?ut(i):i;let m=h,g=Hs(m);for(;g&&i&&p!==m;){const y=Yi(g),w=g.getBoundingClientRect(),x=zt(g),b=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,u*=y.y,d*=y.x,c*=y.y,l+=b,u+=S,m=ut(g),g=Hs(m)}}return zn({width:d,height:c,x:l,y:u})}function qa(r,e){const t=Gn(r).scrollLeft;return e?e.left+t:Ci(Ht(r)).left+t}function Rl(r,e,t){t===void 0&&(t=!1);const i=r.getBoundingClientRect(),n=i.left+e.scrollLeft-(t?0:qa(r,i)),s=i.top+e.scrollTop;return{x:n,y:s}}function Wh(r){let{elements:e,rect:t,offsetParent:i,strategy:n}=r;const s=n==="fixed",a=Ht(i),o=e?jn(e.floating):!1;if(i===a||o&&s)return t;let l={scrollLeft:0,scrollTop:0},u=Rt(1);const d=Rt(0),c=Dt(i);if((c||!c&&!s)&&((Mi(i)!=="body"||Rr(a))&&(l=Gn(i)),Dt(i))){const p=Ci(i);u=Yi(i),d.x=p.x+i.clientLeft,d.y=p.y+i.clientTop}const h=a&&!c&&!s?Rl(a,l,!0):Rt(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:t.y*u.y-l.scrollTop*u.y+d.y+h.y}}function Kh(r){return Array.from(r.getClientRects())}function Yh(r){const e=Ht(r),t=Gn(r),i=r.ownerDocument.body,n=ot(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=ot(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-t.scrollLeft+qa(r);const o=-t.scrollTop;return zt(i).direction==="rtl"&&(a+=ot(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:a,y:o}}function Xh(r,e){const t=ut(r),i=Ht(r),n=t.visualViewport;let s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){s=n.width,a=n.height;const u=Ma();(!u||u&&e==="fixed")&&(o=n.offsetLeft,l=n.offsetTop)}return{width:s,height:a,x:o,y:l}}const Jh=new Set(["absolute","fixed"]);function Zh(r,e){const t=Ci(r,!0,e==="fixed"),i=t.top+r.clientTop,n=t.left+r.clientLeft,s=Dt(r)?Yi(r):Rt(1),a=r.clientWidth*s.x,o=r.clientHeight*s.y,l=n*s.x,u=i*s.y;return{width:a,height:o,x:l,y:u}}function so(r,e,t){let i;if(e==="viewport")i=Xh(r,t);else if(e==="document")i=Yh(Ht(r));else if(Ot(e))i=Zh(e,t);else{const n=Pl(r);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return zn(i)}function Dl(r,e){const t=ai(r);return t===e||!Ot(t)||ir(t)?!1:zt(t).position==="fixed"||Dl(t,e)}function Qh(r,e){const t=e.get(r);if(t)return t;let i=Sr(r,[],!1).filter(o=>Ot(o)&&Mi(o)!=="body"),n=null;const s=zt(r).position==="fixed";let a=s?ai(r):r;for(;Ot(a)&&!ir(a);){const o=zt(a),l=Aa(a);!l&&o.position==="fixed"&&(n=null),(s?!l&&!n:!l&&o.position==="static"&&!!n&&Jh.has(n.position)||Rr(a)&&!l&&Dl(r,a))?i=i.filter(d=>d!==a):n=o,a=ai(a)}return e.set(r,i),i}function ef(r){let{element:e,boundary:t,rootBoundary:i,strategy:n}=r;const a=[...t==="clippingAncestors"?jn(e)?[]:Qh(e,this._c):[].concat(t),i],o=a[0],l=a.reduce((u,d)=>{const c=so(e,d,n);return u.top=ot(c.top,u.top),u.right=si(c.right,u.right),u.bottom=si(c.bottom,u.bottom),u.left=ot(c.left,u.left),u},so(e,o,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tf(r){const{width:e,height:t}=Il(r);return{width:e,height:t}}function rf(r,e,t){const i=Dt(e),n=Ht(e),s=t==="fixed",a=Ci(r,!0,s,e);let o={scrollLeft:0,scrollTop:0};const l=Rt(0);function u(){l.x=qa(n)}if(i||!i&&!s)if((Mi(e)!=="body"||Rr(n))&&(o=Gn(e)),i){const p=Ci(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else n&&u();s&&!i&&n&&u();const d=n&&!i&&!s?Rl(n,o):Rt(0),c=a.left+o.scrollLeft-l.x-d.x,h=a.top+o.scrollTop-l.y-d.y;return{x:c,y:h,width:a.width,height:a.height}}function ss(r){return zt(r).position==="static"}function ao(r,e){if(!Dt(r)||zt(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return Ht(r)===t&&(t=t.ownerDocument.body),t}function $l(r,e){const t=ut(r);if(jn(r))return t;if(!Dt(r)){let n=ai(r);for(;n&&!ir(n);){if(Ot(n)&&!ss(n))return n;n=ai(n)}return t}let i=ao(r,e);for(;i&&Dh(i)&&ss(i);)i=ao(i,e);return i&&ir(i)&&ss(i)&&!Aa(i)?t:i||Vh(r)||t}const nf=async function(r){const e=this.getOffsetParent||$l,t=this.getDimensions,i=await t(r.floating);return{reference:rf(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function sf(r){return zt(r).direction==="rtl"}const af={convertOffsetParentRelativeRectToViewportRelativeRect:Wh,getDocumentElement:Ht,getClippingRect:ef,getOffsetParent:$l,getElementRects:nf,getClientRects:Kh,getDimensions:tf,getScale:Yi,isElement:Ot,isRTL:sf};function Ll(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function of(r,e){let t=null,i;const n=Ht(r);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=r.getBoundingClientRect(),{left:d,top:c,width:h,height:p}=u;if(o||e(),!h||!p)return;const m=Qr(c),g=Qr(n.clientWidth-(d+h)),y=Qr(n.clientHeight-(c+p)),w=Qr(d),b={rootMargin:-m+"px "+-g+"px "+-y+"px "+-w+"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&&!Ll(u,r.getBoundingClientRect())&&a(),S=!1}try{t=new IntersectionObserver(q,{...b,root:n.ownerDocument})}catch{t=new IntersectionObserver(q,b)}t.observe(r)}return a(!0),s}function lf(r,e,t,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=Ba(r),d=n||s?[...u?Sr(u):[],...Sr(e)]:[];d.forEach(w=>{n&&w.addEventListener("scroll",t,{passive:!0}),s&&w.addEventListener("resize",t)});const c=u&&o?of(u,t):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),t()}),u&&!l&&p.observe(u),p.observe(e));let m,g=l?Ci(r):null;l&&y();function y(){const w=Ci(r);g&&!Ll(g,w)&&t(),g=w,m=requestAnimationFrame(y)}return t(),()=>{var w;d.forEach(x=>{n&&x.removeEventListener("scroll",t),s&&x.removeEventListener("resize",t)}),c?.(),(w=p)==null||w.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const uf=Oh,df=zh,oo=kh,cf=Ih,hf=Eh,ff=qh,pf=Th,mf=(r,e,t)=>{const i=new Map,n={platform:af,...t},s={...n.platform,_c:i};return Bh(r,e,{...n,platform:s})};function gf(r){return r!=null&&typeof r=="object"&&"$el"in r}function Ns(r){if(gf(r)){const e=r.$el;return Sa(e)&&Mi(e)==="#comment"?null:e}return r}function ji(r){return typeof r=="function"?r():f(r)}function yf(r){return{name:"arrow",options:r,fn(e){const t=Ns(ji(r.element));return t==null?{}:ff({element:t,padding:r.padding}).fn(e)}}}function Hl(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(r,e){const t=Hl(r);return Math.round(e*t)/t}function vf(r,e,t){t===void 0&&(t={});const i=t.whileElementsMounted,n=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(()=>Ns(r.value)),d=k(()=>Ns(e.value)),c=O(0),h=O(0),p=O(o.value),m=O(a.value),g=tt({}),y=O(!1),w=k(()=>{const B={position:p.value,left:"0",top:"0"};if(!d.value)return B;const L=lo(d.value,c.value),E=lo(d.value,h.value);return l.value?{...B,transform:"translate("+L+"px, "+E+"px)",...Hl(d.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:L+"px",top:E+"px"}});let x;function b(){if(u.value==null||d.value==null)return;const B=n.value;mf(u.value,d.value,{middleware:s.value,placement:a.value,strategy:o.value}).then(L=>{c.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 x=="function"&&(x(),x=void 0)}function q(){if(S(),i===void 0){b();return}if(u.value!=null&&d.value!=null){x=i(u.value,d.value,b);return}}function M(){n.value||(y.value=!1)}return _e([s,a,o,n],b,{flush:"sync"}),_e([u,d],q,{flush:"sync"}),_e(n,M,{flush:"sync"}),dd()&&cd(S),{x:Ei(c),y:Ei(h),strategy:Ei(p),placement:Ei(m),middlewareData:Ei(g),isPositioned:Ei(y),floatingStyles:w,update:b}}const Nl={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},[bf,xf]=De("PopperContent");var wf=z({inheritAttrs:!1,__name:"PopperContent",props:ul({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}},{...Nl}),emits:["placed"],setup(r,{emit:e}){const t=r,i=e,n=Fl(),{forwardRef:s,currentElement:a}=X(),o=O(),l=O(),{width:u,height:d}=dc(l),c=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(ph),altBoundary:p.value.length>0})),g=k(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),y=hd(()=>[uf({mainAxis:t.sideOffset+d.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&oo({...m.value,...g.value}),t.avoidCollisions&&df({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?pf():void 0,...m.value}),!t.prioritizePosition&&t.avoidCollisions&&oo({...m.value,...g.value}),cf({...m.value,apply:({elements:G,rects:ee,availableWidth:te,availableHeight:re})=>{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",`${re}px`),J.setProperty("--reka-popper-anchor-width",`${K}px`),J.setProperty("--reka-popper-anchor-height",`${Q}px`)}}),l.value&&yf({element:l.value,padding:t.arrowPadding}),mh({arrowWidth:u.value,arrowHeight:d.value}),t.hideWhenDetached&&hf({strategy:"referenceHidden",...m.value})]),w=k(()=>t.reference??n.anchor.value),{floatingStyles:x,placement:b,isPositioned:S,middlewareData:q}=vf(w,o,{strategy:t.positionStrategy,placement:c,whileElementsMounted:(...G)=>lf(...G,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:y}),M=k(()=>Ds(b.value)[0]),B=k(()=>Ds(b.value)[1]);ll(()=>{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 xf({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(x),transform:f(S)?f(x).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(ne),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))}}),Wn=wf;const _f={top:"bottom",right:"left",bottom:"top",left:"right"};var Cf=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(r){const{forwardRef:e}=X(),t=bf(),i=k(()=>_f[t.placedSide.value]);return(n,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(fh,H(n.$attrs,{ref:f(e),style:{display:"block"},as:n.as,"as-child":n.asChild,rounded:n.rounded,width:n.width,height:n.height}),{default:_(()=>[A(n.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Kn=Cf,Sf=z({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),C(f(Pr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Vl=Sf,Af=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(r){const e=r;return(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Mf=Af;function Bf(){const r=O(!1);return Re(()=>{ri("keydown",()=>{r.value=!0},{capture:!0,passive:!0}),ri(["pointerdown","pointermove"],()=>{r.value=!1},{capture:!0,passive:!0})}),r}const qf=nl(Bf),[Bi,Ul]=De(["MenuRoot","MenuSub"],"MenuContext"),[Dr,kf]=De("MenuRoot");var Ef=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(r,{emit:e}){const t=r,i=e,{modal:n,dir:s}=vt(t),a=Vn(s),o=nt(t,"open",i),l=O(),u=qf();return Ul({open:o,onOpenChange:d=>{o.value=d},content:l,onContentChange:d=>{l.value=d}}),kf({onClose:()=>{o.value=!1},isUsingKeyboardRef:u,dir:a,modal:n}),(d,c)=>(v(),C(f(Ir),null,{default:_(()=>[A(d.$slots,"default")]),_:3}))}}),Ff=Ef;const[ka,Of]=De("MenuContent");var zf=z({__name:"MenuContentImpl",props:ul({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}},{...Nl}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(r,{emit:e}){const t=r,i=e,n=Bi(),s=Dr(),{trapFocus:a,disableOutsidePointerEvents:o,loop:l}=vt(t);bl(),ca(o.value);const u=O(""),d=O(0),c=O(0),h=O(null),p=O("right"),m=O(0),g=O(null),y=O(),{forwardRef:w,currentElement:x}=X(),{handleTypeaheadSearch:b}=cc();_e(x,E=>{n.onContentChange(E)}),Ai(()=>{window.clearTimeout(d.value)});function S(E){return p.value===h.value?.side&&qc(E,h.value?.area)}async function q(E){i("openAutoFocus",E),!E.defaultPrevented&&(E.preventDefault(),x.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=Xd(E,pt(),x.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 re=y.value?.getItems()??[];if(U&&(E.key==="Tab"&&E.preventDefault(),!G&&ee&&b(E.key,re)),E.target!==x.value||!Cc.includes(E.key))return;E.preventDefault();const K=[...re.map(Q=>Q.ref)];Sl.includes(E.key)&&K.reverse(),Mc(K)}function B(E){E?.currentTarget?.contains?.(E.target)||(window.clearTimeout(d.value),u.value="")}function L(E){if(!_r(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 Of({onItemEnter:E=>!!S(E),onItemLeave:E=>{S(E)||(x.value?.focus(),g.value=null)},onTriggerLeave:E=>!!S(E),searchRef:u,pointerGraceTimerRef:c,onPointerGraceIntentChange:E=>{h.value=E}}),(E,D)=>(v(),C(f(pa),{"as-child":"",trapped:f(a),onMountAutoFocus:q,onUnmountAutoFocus:D[7]||(D[7]=U=>i("closeAutoFocus",U))},{default:_(()=>[F(f(qr),{"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(Bl),{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(Wn),{ref:f(w),role:"menu",as:E.as,"as-child":E.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":f(ma)(f(n).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=zf,Tf=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(r){const e=r,t=ka(),{forwardRef:i}=X(),{CollectionItem:n}=na(),s=O(!1);async function a(l){l.defaultPrevented||_r(l)&&(e.disabled?t.onItemLeave(l):t.onItemEnter(l)||l.currentTarget?.focus({preventScroll:!0}))}async function o(l){await Xe(),!l.defaultPrevented&&_r(l)&&t.onItemLeave(l)}return(l,u)=>(v(),C(f(n),{value:{textValue:l.textValue}},{default:_(()=>[F(f(ne),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 d=>{await Xe(),!(d.defaultPrevented||l.disabled)&&(s.value=!0)}),onBlur:u[1]||(u[1]=async d=>{await Xe(),!d.defaultPrevented&&(s.value=!1)})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),jl=Tf,If=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(r,{emit:e}){const t=r,i=e,{forwardRef:n,currentElement:s}=X(),a=Dr(),o=ka(),l=O(!1);async function u(){const d=s.value;if(!t.disabled&&d){const c=new CustomEvent(wc,{bubbles:!0,cancelable:!0});i("select",c),await Xe(),c.defaultPrevented?l.value=!1:a.onClose()}}return(d,c)=>(v(),C(jl,H(t,{ref:f(n),onClick:u,onPointerdown:c[0]||(c[0]=()=>{l.value=!0}),onPointerup:c[1]||(c[1]=async h=>{await Xe(),!h.defaultPrevented&&(l.value||h.currentTarget?.click())}),onKeydown:c[2]||(c[2]=async h=>{const p=f(o).searchRef.value!=="";d.disabled||p&&h.key===" "||f(Rs).includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})}),{default:_(()=>[A(d.$slots,"default")]),_:3},16))}}),Fa=If;const[Pf,Gl]=De(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var Rf=z({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const e=Pf({modelValue:O(!1)});return(t,i)=>(v(),C(f($t),{present:t.forceMount||f(kn)(f(e).modelValue.value)||f(e).modelValue.value===!0},{default:_(()=>[F(f(ne),{as:t.as,"as-child":t.asChild,"data-state":f(ga)(f(e).modelValue.value)},{default:_(()=>[A(t.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),Df=Rf,$f=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(r,{emit:e}){const t=r,i=e,n=nt(t,"modelValue",i);return Gl({modelValue:n}),(s,a)=>(v(),C(Fa,H({role:"menuitemcheckbox"},t,{"aria-checked":f(kn)(f(n))?"mixed":f(n),"data-state":f(ga)(f(n)),onSelect:a[0]||(a[0]=async o=>{i("select",o),f(kn)(f(n))?n.value=!0:n.value=!f(n)})}),{default:_(()=>[A(s.$slots,"default",{modelValue:f(n)})]),_:3},16,["aria-checked","data-state"]))}}),Lf=$f,Hf=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(r,{emit:e}){const t=r,i=e,n=Ce(t,i),s=Bi(),{forwardRef:a,currentElement:o}=X();return ha(o),(l,u)=>(v(),C(Ea,H(f(n),{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]=d=>f(s).onOpenChange(!1)),onFocusOutside:u[1]||(u[1]=fe(d=>i("focusOutside",d),["prevent"]))}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),Nf=Hf,Vf=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(r,{emit:e}){const n=Ce(r,e),s=Bi();return(a,o)=>(v(),C(Ea,H(f(n),{"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))}}),Uf=Vf,jf=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(r,{emit:e}){const n=Ce(r,e),s=Bi(),a=Dr();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(s).open.value},{default:_(()=>[f(a).modal.value?(v(),C(Nf,oe(H({key:0},{...o.$attrs,...f(n)})),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(Uf,oe(H({key:1},{...o.$attrs,...f(n)})),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Gf=jf,Wf=z({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),C(f(ne),H({role:"group"},e),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Wl=Wf,Kf=z({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(r){const e=r;return(t,i)=>(v(),C(f(ne),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Yf=Kf,Xf=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Jf=Xf;const[Zf,Qf]=De("MenuRadioGroup");var ep=z({__name:"MenuRadioGroup",props:{modelValue:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=nt(t,"modelValue",e);return Qf({modelValue:n,onValueChange:s=>{n.value=s}}),(s,a)=>(v(),C(Wl,oe(le(t)),{default:_(()=>[A(s.$slots,"default",{modelValue:f(n)})]),_:3},16))}}),tp=ep,ip=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(r,{emit:e}){const t=r,i=e,{value:n}=vt(t),s=Zf(),a=k(()=>s.modelValue.value===n?.value);return Gl({modelValue:a}),(o,l)=>(v(),C(Fa,H({role:"menuitemradio"},t,{"aria-checked":a.value,"data-state":f(ga)(a.value),onSelect:l[0]||(l[0]=async u=>{i("select",u),f(s).onValueChange(f(n))})}),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),rp=ip,np=z({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),C(f(ne),H(e,{role:"separator","aria-orientation":"horizontal"}),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),sp=np;const[Kl,ap]=De("MenuSub");var op=z({__name:"MenuSub",props:{open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=nt(t,"open",e,{defaultValue:!1,passive:t.open===void 0}),s=Bi(),a=O(),o=O();return gt(l=>{s?.open.value===!1&&(n.value=!1),l(()=>n.value=!1)}),Ul({open:n,onOpenChange:l=>{n.value=l},content:o,onContentChange:l=>{o.value=l}}),ap({triggerId:"",contentId:"",trigger:a,onTriggerChange:l=>{a.value=l}}),(l,u)=>(v(),C(f(Ir),null,{default:_(()=>[A(l.$slots,"default")]),_:3}))}}),lp=op,up=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(r,{emit:e}){const n=Ce(r,e),s=Bi(),a=Dr(),o=Kl(),{forwardRef:l,currentElement:u}=X();return o.contentId||=yt(void 0,"reka-menu-sub-content"),(d,c)=>(v(),C(f($t),{present:d.forceMount||f(s).open.value},{default:_(()=>[F(Ea,H(f(n),{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:c[0]||(c[0]=fe(h=>{f(a).isUsingKeyboardRef.value&&f(u)?.focus()},["prevent"])),onCloseAutoFocus:c[1]||(c[1]=fe(()=>{},["prevent"])),onFocusOutside:c[2]||(c[2]=h=>{h.defaultPrevented||h.target!==f(o).trigger.value&&f(s).onOpenChange(!1)}),onEscapeKeyDown:c[3]||(c[3]=h=>{f(a).onClose(),h.preventDefault()}),onKeydown:c[4]||(c[4]=h=>{const p=h.currentTarget?.contains(h.target),m=f(Ac)[f(a).dir.value].includes(h.key);p&&m&&(f(s).onOpenChange(!1),f(o).trigger.value?.focus(),h.preventDefault())})}),{default:_(()=>[A(d.$slots,"default")]),_:3},16,["id","aria-labelledby","side"])]),_:3},8,["present"]))}}),dp=up,cp=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(r){const e=r,t=Bi(),i=Dr(),n=Kl(),s=ka(),a=O(null);n.triggerId||=yt(void 0,"reka-menu-sub-trigger");function o(){a.value&&window.clearTimeout(a.value),a.value=null}Ai(()=>{o()});function l(c){!_r(c)||s.onItemEnter(c)||!e.disabled&&!t.open.value&&!a.value&&(s.onPointerGraceIntentChange(null),a.value=window.setTimeout(()=>{t.onOpenChange(!0),o()},100))}async function u(c){if(!_r(c))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"],w=h[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:c.clientX+g,y:c.clientY},{x:y,y:h.top},{x:w,y:h.top},{x:w,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(c))return;s.onPointerGraceIntentChange(null)}}async function d(c){const h=s.searchRef.value!=="";e.disabled||h&&c.key===" "||Sc[i.dir.value].includes(c.key)&&(t.onOpenChange(!0),await Xe(),t.content.value?.focus(),c.preventDefault())}return(c,h)=>(v(),C(Vl,{"as-child":""},{default:_(()=>[F(jl,H(e,{id:f(n).triggerId,ref:p=>{f(n)?.onTriggerChange(p?.$el)},"aria-haspopup":"menu","aria-expanded":f(t).open.value,"aria-controls":f(n).contentId,"data-state":f(ma)(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:d}),{default:_(()=>[A(c.$slots,"default")]),_:3},16,["id","aria-expanded","aria-controls","data-state"])]),_:3}))}}),hp=cp;const[qi,fp]=De("PopoverRoot");var pp=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(r,{emit:e}){const t=r,i=e,{modal:n}=vt(t),s=nt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),a=O(),o=O(!1);return fp({contentId:"",triggerId:"",modal:n,open:s,onOpenChange:l=>{s.value=l},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:o}),(l,u)=>(v(),C(f(Ir),null,{default:_(()=>[A(l.$slots,"default",{open:f(s),close:()=>s.value=!1})]),_:3}))}}),mp=pp,gp=z({__name:"PopoverAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;X();const t=qi();return fd(()=>{t.hasCustomAnchor.value=!0}),Ai(()=>{t.hasCustomAnchor.value=!1}),(i,n)=>(v(),C(f(Pr),oe(le(e)),{default:_(()=>[A(i.$slots,"default")]),_:3},16))}}),yp=gp,vp=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),bp=vp,xp=z({__name:"PopoverClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r;X();const t=qi();return(i,n)=>(v(),C(f(ne),{type:i.as==="button"?"button":void 0,as:i.as,"as-child":e.asChild,onClick:n[0]||(n[0]=s=>f(t).onOpenChange(!1))},{default:_(()=>[A(i.$slots,"default")]),_:3},8,["type","as","as-child"]))}}),wp=xp,_p=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(r,{emit:e}){const t=r,i=e,n=Or(pd(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:s}=X(),a=qi();return bl(),(o,l)=>(v(),C(f(pa),{"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(qr),{"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(Wn),H(f(n),{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"]))}}),Yl=_p,Cp=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(r,{emit:e}){const t=r,i=e,n=qi(),s=O(!1);ca(!0);const a=Ce(t,i),{forwardRef:o,currentElement:l}=X();return ha(l),(u,d)=>(v(),C(Yl,H(f(a),{ref:f(o),"trap-focus":f(n).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:d[0]||(d[0]=fe(c=>{i("closeAutoFocus",c),s.value||f(n).triggerElement.value?.focus()},["prevent"])),onPointerDownOutside:d[1]||(d[1]=c=>{i("pointerDownOutside",c);const h=c.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,m=h.button===2||p;s.value=m}),onFocusOutside:d[2]||(d[2]=fe(()=>{},["prevent"]))}),{default:_(()=>[A(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),Sp=Cp,Ap=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(r,{emit:e}){const t=r,i=e,n=qi(),s=O(!1),a=O(!1),o=Ce(t,i);return(l,u)=>(v(),C(Yl,H(f(o),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=d=>{i("closeAutoFocus",d),d.defaultPrevented||(s.value||f(n).triggerElement.value?.focus(),d.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=async d=>{i("interactOutside",d),d.defaultPrevented||(s.value=!0,d.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const c=d.target;f(n).triggerElement.value?.contains(c)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&a.value&&d.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16))}}),Mp=Ap,Bp=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(r,{emit:e}){const t=r,i=e,n=qi(),s=Ce(t,i),{forwardRef:a}=X();return n.contentId||=yt(void 0,"reka-popover-content"),(o,l)=>(v(),C(f($t),{present:o.forceMount||f(n).open.value},{default:_(()=>[f(n).modal.value?(v(),C(Sp,H({key:0},f(s),{ref:f(a)}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)):(v(),C(Mp,H({key:1},f(s),{ref:f(a)}),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),qp=Bp,kp=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Ep=kp,Fp=z({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=qi(),{forwardRef:i,currentElement:n}=X();return t.triggerId||=yt(void 0,"reka-popover-trigger"),Re(()=>{t.triggerElement.value=n.value}),(s,a)=>(v(),C(sr(f(t).hasCustomAnchor.value?f(ne):f(Pr)),{"as-child":""},{default:_(()=>[F(f(ne),{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}))}}),Op=Fp,zp=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Mf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Xl=zp,Tp=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(r,{emit:e}){const t=r,n=nr(e);return X(),(s,a)=>(v(),C(f(Lf),oe(le({...t,...f(n)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Ip=Tp;const[Jl,Pp]=De("DropdownMenuRoot");var Rp=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(r,{emit:e}){const t=r,i=e;X();const n=nt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=O(),{modal:a,dir:o}=vt(t),l=Vn(o);return Pp({open:n,onOpenChange:u=>{n.value=u},onOpenToggle:()=>{n.value=!n.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:l}),(u,d)=>(v(),C(f(Ff),{open:f(n),"onUpdate:open":d[0]||(d[0]=c=>dl(n)?n.value=c:null),dir:f(l),modal:f(a)},{default:_(()=>[A(u.$slots,"default",{open:f(n)})]),_:3},8,["open","dir","modal"]))}}),Zl=Rp,Dp=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(r,{emit:e}){const n=Ce(r,e);X();const s=Jl(),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(Gf),H(f(n),{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]=d=>{if(d.defaultPrevented)return;const c=d.detail.originalEvent,h=c.button===0&&c.ctrlKey===!0,p=c.button===2||h;(!f(s).modal.value||p)&&(a.value=!0),f(s).triggerElement.value?.contains(d.target)&&d.preventDefault()})}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),$p=Dp,Lp=z({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(Wl),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Hp=Lp,Np=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(r,{emit:e}){const t=r,n=nr(e);return X(),(s,a)=>(v(),C(f(Fa),oe(le({...t,...f(n)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Vp=Np,Up=z({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(Df),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),jp=Up,Gp=z({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(Yf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Wp=Gp,Kp=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(r){const e=r;return(t,i)=>(v(),C(f(Jf),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Yp=Kp,Xp=z({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=nr(e);return X(),(s,a)=>(v(),C(f(tp),oe(le({...t,...f(n)})),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Jp=Xp,Zp=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(r,{emit:e}){const n=Ce(r,e);return X(),(s,a)=>(v(),C(f(rp),oe(le(f(n))),{default:_(()=>[A(s.$slots,"default")]),_:3},16))}}),Qp=Zp,em=z({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(sp),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),tm=em,im=z({__name:"DropdownMenuSub",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=nt(t,"open",e,{passive:t.open===void 0,defaultValue:t.defaultOpen??!1});return X(),(s,a)=>(v(),C(f(lp),{open:f(n),"onUpdate:open":a[0]||(a[0]=o=>dl(n)?n.value=o:null)},{default:_(()=>[A(s.$slots,"default",{open:f(n)})]),_:3},8,["open"]))}}),rm=im,nm=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(r,{emit:e}){const n=Ce(r,e);return X(),(s,a)=>(v(),C(f(dp),H(f(n),{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))}}),sm=nm,am=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(r){const e=r;return X(),(t,i)=>(v(),C(f(hp),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),om=am,lm=z({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Jl(),{forwardRef:i,currentElement:n}=X();return Re(()=>{t.triggerElement=n}),t.triggerId||=yt(void 0,"reka-dropdown-menu-trigger"),(s,a)=>(v(),C(f(Vl),{"as-child":""},{default:_(()=>[F(f(ne),{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 Xe(),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}))}}),Ql=lm,um=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),dm=um;const[Oa,cm]=De("HoverCardRoot");var hm=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(r,{emit:e}){const t=r,i=e,{openDelay:n,closeDelay:s}=vt(t);X();const a=nt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),o=O(0),l=O(0),u=O(!1),d=O(!1),c=O(!1),h=O();function p(){clearTimeout(l.value),o.value=window.setTimeout(()=>a.value=!0,n.value)}function m(){clearTimeout(o.value),!u.value&&!d.value&&(l.value=window.setTimeout(()=>a.value=!1,s.value))}function g(){a.value=!1}return cm({open:a,onOpenChange(y){a.value=y},onOpen:p,onClose:m,onDismiss:g,hasSelectionRef:u,isPointerDownOnContentRef:d,isPointerInTransitRef:c,triggerElement:h}),(y,w)=>(v(),C(f(Ir),null,{default:_(()=>[A(y.$slots,"default",{open:f(a)})]),_:3}))}}),fm=hm;function Vs(r){return e=>e.pointerType==="touch"?void 0:r()}function pm(r){const e=[],t=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var mm=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(r,{emit:e}){const t=r,i=e,n=Or(t),{forwardRef:s,currentElement:a}=X(),o=Oa(),{isPointerInTransit:l,onPointerExit:u}=wl(o.triggerElement,a);md(o.isPointerInTransitRef,l,{direction:"rtl"}),u(()=>{o.onClose()});const d=O(!1);let c;gt(p=>{if(d.value){const m=document.body;c=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",p(()=>{m.style.userSelect=c,m.style.webkitUserSelect=c})}});function h(){d.value=!1,o.isPointerDownOnContentRef.value=!1,Xe(()=>{document.getSelection()?.toString()!==""&&(o.hasSelectionRef.value=!0)})}return Re(()=>{a.value&&(document.addEventListener("pointerup",h),pm(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(qr),{"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(Wn),H({...f(n),...p.$attrs},{ref:f(s),"data-state":f(o).open.value?"open":"closed",style:{userSelect:d.value?"text":void 0,WebkitUserSelect:d.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)&&(d.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"]))}}),gm=mm,ym=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(r,{emit:e}){const n=Ce(r,e),{forwardRef:s}=X(),a=Oa();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(a).open.value},{default:_(()=>[F(gm,H(f(n),{ref:f(s),onPointerenter:l[0]||(l[0]=u=>f(Vs)(f(a).onOpen)(u))}),{default:_(()=>[A(o.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),vm=ym,bm=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),xm=bm,wm=z({__name:"HoverCardTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"a"}},setup(r){const{forwardRef:e,currentElement:t}=X(),i=Oa();i.triggerElement=t;function n(){setTimeout(()=>{!i.isPointerInTransitRef.value&&!i.open.value&&i.onClose()},0)}return(s,a)=>(v(),C(f(Pr),{"as-child":"",reference:s.reference},{default:_(()=>[F(f(ne),{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(Vs)(f(i).onOpen)(o)),onPointerleave:a[1]||(a[1]=o=>f(Vs)(n)(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"]))}}),_m=wm,Cm=z({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(r){const e=r;return X(),(t,i)=>(v(),C(f(ne),H(e,{onMousedown:i[0]||(i[0]=n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})}),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),uo=Cm;let as=new Map,Us=!1;try{Us=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Tn=!1;try{Tn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const eu={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class tu{format(e){let t="";if(!Us&&this.options.signDisplay!=null?t=Am(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!Tn){var i;let{unit:n,unitDisplay:s="short",locale:a}=this.resolvedOptions();if(!n)return t;let o=(i=eu[n])===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),n=this.numberFormatter.formatToParts(t);return[...i.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Us&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Tn&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Sm(e,t),this.options=t}}function Sm(r,e={}){let{numberingSystem:t}=e;if(t&&r.includes("-nu-")&&(r.includes("-u-")||(r+="-u-"),r+=`-nu-${t}`),e.style==="unit"&&!Tn){var i;let{unit:a,unitDisplay:o="short"}=e;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=eu[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);e={...e,style:"decimal"}}let n=r+(e?Object.entries(e).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(as.has(n))return as.get(n);let s=new Intl.NumberFormat(r,e);return as.set(n,s),s}function Am(r,e,t){if(e==="auto")return r.format(t);if(e==="never")return r.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 n=r.format(-t),s=r.format(t),a=n.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),n.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return r.format(t)}}const Mm=new RegExp("^.*\\(.*\\).*$"),Bm=["latn","arab","hanidec","deva","beng","fullwide"];class iu{parse(e){return os(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,i){return os(this.locale,this.options,e).isValidPartialNumber(e,t,i)}getNumberingSystem(e){return os(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}const co=new Map;function os(r,e,t){let i=ho(r,e);if(!r.includes("-nu-")&&!i.isValidPartialNumber(t)){for(let n of Bm)if(n!==i.options.numberingSystem){let s=ho(r+(r.includes("-u-")?"-nu-":"-u-nu-")+n,e);if(s.isValidPartialNumber(t))return s}}return i}function ho(r,e){let t=r+(e?Object.entries(e).sort((n,s)=>n[0]<s[0]?-1:1).join():""),i=co.get(t);return i||(i=new qm(r,e),co.set(t,i)),i}class qm{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 n,s;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)+2,20),maximumFractionDigits:Math.min(((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)+2,20)};return new iu(this.locale,a).parse(new tu(this.locale,a).format(i))}return this.options.currencySign==="accounting"&&Mm.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=Em(e,this.formatter,this.options,t);var i,n;this.options.style==="percent"&&(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)>18||((n=this.options.maximumFractionDigits)!==null&&n!==void 0?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const fo=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),km=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Em(r,e,t,i){var n,s,a,o;let l=new Intl.NumberFormat(r,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),u=l.formatToParts(-10000.111),d=l.formatToParts(10000.111),c=km.map(D=>l.formatToParts(D));var h;let p=(h=(n=u.find(D=>D.type==="minusSign"))===null||n===void 0?void 0:n.value)!==null&&h!==void 0?h:"-",m=(s=d.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(r,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(D=>D.type==="decimal"))===null||a===void 0?void 0:a.value,w=(o=u.find(D=>D.type==="group"))===null||o===void 0?void 0:o.value,x=u.filter(D=>!fo.has(D.type)).map(D=>po(D.value)),b=c.flatMap(D=>D.filter(U=>!fo.has(U.type)).map(U=>po(U.value))),S=[...new Set([...x,...b])].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:w,literals:q,numeral:L,index:D=>String(B.get(D))}}function Oi(r,e,t){return r.replaceAll?r.replaceAll(e,t):r.split(e).join(t)}function po(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ru(r){const{disabled:e}=r,t=O(),i=al(),n=()=>window.clearTimeout(t.value),s=h=>{n(),!e.value&&(i.trigger(),t.value=window.setTimeout(()=>{s(60)},h))},a=()=>{s(400)},o=()=>{n()},l=O(!1),u=k(()=>Hn(r.target)),d=h=>{h.button!==0||l.value||(h.preventDefault(),l.value=!0,a())},c=()=>{l.value=!1,o()};return Ln&&(ri(u||window,"pointerdown",d),ri(window,"pointerup",c),ri(window,"pointercancel",c)),{isPressed:l,onTrigger:i.on}}function mo(r,e=O({})){return cl(()=>new tu(r.value,e.value))}function Fm(r,e=O({})){return cl(()=>new iu(r.value,e.value))}function go(r,e,t){let i=r==="+"?e+t:e-t;if(e%1!==0||t%1!==0){const n=e.toString().split("."),s=t.toString().split("."),a=n[1]&&n[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=r==="+"?e+t:e-t,i/=l}return i}const[za,Om]=De("NumberFieldRoot");var zm=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(r,{emit:e}){const t=r,i=e,{disabled:n,readonly:s,disableWheelChange:a,invertWheelChange:o,min:l,max:u,step:d,stepSnapping:c,formatOptions:h,id:p,locale:m}=vt(t),g=nt(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),{primitiveElement:y,currentElement:w}=Er(),x=uc(m),b=xl(w),S=O(),q=k(()=>!Ki(g.value)&&(J(g.value)===l.value||l.value&&!isNaN(g.value)?go("-",g.value,d.value)<l.value:!1)),M=k(()=>!Ki(g.value)&&(J(g.value)===u.value||u.value&&!isNaN(g.value)?go("+",g.value,d.value)>u.value:!1));function B(ae,ye=1){if(S.value?.focus(),t.disabled||t.readonly)return;const cr=G.parse(S.value?.value??"");isNaN(cr)?g.value=l.value??0:ae==="increase"?g.value=J(cr+(d.value??1)*ye):g.value=J(cr-(d.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=mo(x,h),G=Fm(x,h),ee=k(()=>U.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),te=mo(x,h),re=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 d.value===void 0||isNaN(d.value)||!c.value?ye=Wd(ae,l.value,u.value):ye=Kd(ae,l.value,u.value,d.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(re.value)):Q(ae)}return Om({modelValue:g,handleDecrease:E,handleIncrease:L,handleMinMaxValue:D,inputMode:ee,inputEl:S,onInputElement:ae=>S.value=ae,textValue:re,validate:K,applyInputValue:he,disabled:n,readonly:s,disableWheelChange:a,invertWheelChange:o,max:u,min:l,isDecreaseDisabled:q,isIncreaseDisabled:M,id:p}),(ae,ye)=>(v(),C(f(ne),H(ae.$attrs,{ref_key:"primitiveElement",ref:y,role:"group",as:ae.as,"as-child":ae.asChild,"data-disabled":f(n)?"":void 0,"data-readonly":f(s)?"":void 0}),{default:_(()=>[A(ae.$slots,"default",{modelValue:f(g),textValue:re.value}),f(b)&&ae.name?(v(),C(f(kl),{key:0,type:"text",value:f(g),name:ae.name,disabled:f(n),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"]))}}),Tm=zm,Im=z({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=za(),i=k(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isDecreaseDisabled.value),{primitiveElement:n,currentElement:s}=Er(),{isPressed:a,onTrigger:o}=ru({target:s,disabled:i});return o(()=>{t.handleDecrease()}),(l,u)=>(v(),C(f(ne),H(e,{ref_key:"primitiveElement",ref:n,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"]))}}),Pm=Im,Rm=z({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=za(),i=k(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isIncreaseDisabled.value),{primitiveElement:n,currentElement:s}=Er(),{isPressed:a,onTrigger:o}=ru({target:s,disabled:i});return o(()=>{t.handleIncrease()}),(l,u)=>(v(),C(f(ne),H(e,{ref_key:"primitiveElement",ref:n,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"]))}}),Dm=Rm,$m=z({__name:"NumberFieldInput",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(r){const e=r,{primitiveElement:t,currentElement:i}=Er(),n=za();function s(l){n.disableWheelChange.value||l.target===pt()&&(Math.abs(l.deltaY)<=Math.abs(l.deltaX)||(l.preventDefault(),l.deltaY>0?n.invertWheelChange.value?n.handleDecrease():n.handleIncrease():l.deltaY<0&&(n.invertWheelChange.value?n.handleIncrease():n.handleDecrease())))}Re(()=>{n.onInputElement(i.value)});const a=O(n.textValue.value);_e(()=>n.textValue.value,()=>{a.value=n.textValue.value},{immediate:!0,deep:!0});function o(){requestAnimationFrame(()=>{a.value=n.textValue.value})}return(l,u)=>(v(),C(f(ne),H(e,{id:f(n).id.value,ref_key:"primitiveElement",ref:t,value:a.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:f(n).inputMode.value,disabled:f(n).disabled.value?"":void 0,"data-disabled":f(n).disabled.value?"":void 0,readonly:f(n).readonly.value?"":void 0,"data-readonly":f(n).readonly.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":f(n).modelValue.value,"aria-valuemin":f(n).min.value,"aria-valuemax":f(n).max.value,onKeydown:[u[0]||(u[0]=ht(fe(d=>f(n).handleIncrease(),["prevent"]),["up"])),u[1]||(u[1]=ht(fe(d=>f(n).handleDecrease(),["prevent"]),["down"])),u[2]||(u[2]=ht(fe(d=>f(n).handleIncrease(10),["prevent"]),["page-up"])),u[3]||(u[3]=ht(fe(d=>f(n).handleDecrease(10),["prevent"]),["page-down"])),u[4]||(u[4]=ht(fe(d=>f(n).handleMinMaxValue("min"),["prevent"]),["home"])),u[5]||(u[5]=ht(fe(d=>f(n).handleMinMaxValue("max"),["prevent"]),["end"])),u[8]||(u[8]=ht(d=>f(n).applyInputValue(d.target?.value),["enter"]))],onWheel:s,onBeforeinput:u[6]||(u[6]=d=>{const c=d.target;let h=c.value.slice(0,c.selectionStart??void 0)+(d.data??"")+c.value.slice(c.selectionEnd??void 0);f(n).validate(h)||d.preventDefault()}),onInput:u[7]||(u[7]=d=>{const c=d.target;a.value=c.value}),onChange:o,onBlur:u[9]||(u[9]=d=>f(n).applyInputValue(d.target?.value))}),{default:_(()=>[A(l.$slots,"default")]),_:3},16,["id","value","inputmode","disabled","data-disabled","readonly","data-readonly","aria-valuenow","aria-valuemin","aria-valuemax"]))}}),Lm=$m,Hm=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(r){const e=r,t=["horizontal","vertical"];function i(o){return t.includes(o)}const n=k(()=>i(e.orientation)?e.orientation:"horizontal"),s=k(()=>n.value==="vertical"?e.orientation:void 0),a=k(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(o,l)=>(v(),C(f(ne),H({as:o.as,"as-child":o.asChild,"data-orientation":n.value},a.value),{default:_(()=>[A(o.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),Nm=Hm,Vm=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(r){const e=r;return(t,i)=>(v(),C(Nm,oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),Um=Vm;const[Yn,jm]=De("TabsRoot");var Gm=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(r,{emit:e}){const t=r,i=e,{orientation:n,unmountOnHide:s,dir:a}=vt(t),o=Vn(a);X();const l=nt(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),u=O();return jm({modelValue:l,changeModelValue:d=>{l.value=d},orientation:n,dir:o,unmountOnHide:s,activationMode:t.activationMode,baseId:yt(void 0,"reka-tabs"),tabsList:u}),(d,c)=>(v(),C(f(ne),{dir:f(o),"data-orientation":f(n),"as-child":d.asChild,as:d.as},{default:_(()=>[A(d.$slots,"default",{modelValue:f(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),Wm=Gm;function nu(r,e){return`${r}-trigger-${e}`}function su(r,e){return`${r}-content-${e}`}var Km=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(r){const e=r,{forwardRef:t}=X(),i=Yn(),n=k(()=>nu(i.baseId,e.value)),s=k(()=>su(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:d})=>[F(f(ne),{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":n.value,hidden:!d,tabindex:"0",style:qt({animationDuration:o.value?"0s":void 0})},{default:_(()=>[!f(i).unmountOnHide.value||d?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=Km,Xm=z({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,t=Yn();X();const i=O(),n=O({size:null,position:null});_e(()=>[t.modelValue.value,t?.dir.value],async()=>{await Xe(),s()},{immediate:!0}),gd([t.tabsList,i],s);function s(){i.value=t.tabsList.value?.querySelector('[role="tab"][data-state="active"]'),i.value&&(t.orientation.value==="horizontal"?n.value={size:i.value.offsetWidth,position:i.value.offsetLeft}:n.value={size:i.value.offsetHeight,position:i.value.offsetTop})}return(a,o)=>typeof n.value.size=="number"?(v(),C(f(ne),H({key:0},e,{style:{"--reka-tabs-indicator-size":`${n.value.size}px`,"--reka-tabs-indicator-position":`${n.value.position}px`}}),{default:_(()=>[A(a.$slots,"default")]),_:3},16,["style"])):R("v-if",!0)}}),Jm=Xm,Zm=z({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{loop:t}=vt(e),{forwardRef:i,currentElement:n}=X(),s=Yn();return s.tabsList=n,(a,o)=>(v(),C(f(Bl),{"as-child":"",orientation:f(s).orientation.value,dir:f(s).dir.value,loop:f(t)},{default:_(()=>[F(f(ne),{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"]))}}),Qm=Zm,eg=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(r){const e=r,{forwardRef:t}=X(),i=Yn(),n=k(()=>nu(i.baseId,e.value)),s=k(()=>su(i.baseId,e.value)),a=k(()=>e.value===i.modelValue.value);return(o,l)=>(v(),C(f(ql),{"as-child":"",focusable:!o.disabled,active:a.value},{default:_(()=>[F(f(ne),{id:n.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"]))}}),tg=eg,ig=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(r){const e=r;return X(),(t,i)=>(v(),C(f(Kn),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),rg=ig;const au="tooltip.open",[Xn,ng]=De("TooltipRoot");var sg=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(r,{emit:e}){const t=r,i=e;X();const n=sa(),s=k(()=>t.disableHoverableContent??n.disableHoverableContent.value),a=k(()=>t.disableClosingTrigger??n.disableClosingTrigger.value),o=k(()=>t.disabled??n.disabled.value),l=k(()=>t.delayDuration??n.delayDuration.value),u=k(()=>t.ignoreNonKeyboardFocus??n.ignoreNonKeyboardFocus.value),d=nt(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0});_e(d,b=>{n.onClose&&(b?(n.onOpen(),document.dispatchEvent(new CustomEvent(au))):n.onClose())});const c=O(!1),h=O(),p=k(()=>d.value?c.value?"delayed-open":"instant-open":"closed"),{start:m,stop:g}=yd(()=>{c.value=!0,d.value=!0},l,{immediate:!1});function y(){g(),c.value=!1,d.value=!0}function w(){g(),d.value=!1}function x(){m()}return ng({contentId:"",open:d,stateAttribute:p,trigger:h,onTriggerChange(b){h.value=b},onTriggerEnter(){n.isOpenDelayed.value?x():y()},onTriggerLeave(){s.value?w():g()},onOpen:y,onClose:w,disableHoverableContent:s,disableClosingTrigger:a,disabled:o,ignoreNonKeyboardFocus:u}),(b,S)=>(v(),C(f(Ir),null,{default:_(()=>[A(b.$slots,"default",{open:f(d)})]),_:3}))}}),ag=sg,og=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(r,{emit:e}){const t=r,i=e,n=Xn(),{forwardRef:s}=X(),a=Ge(),o=k(()=>a.default?.({})),l=k(()=>{if(t.ariaLabel)return t.ariaLabel;let d="";function c(h){typeof h.children=="string"&&h.type!==vd?d+=h.children:Array.isArray(h.children)&&h.children.forEach(p=>c(p))}return o.value?.forEach(h=>c(h)),d}),u=k(()=>{const{ariaLabel:d,...c}=t;return c});return Re(()=>{ri(window,"scroll",d=>{d.target?.contains(n.trigger.value)&&n.onClose()}),ri(window,au,n.onClose)}),(d,c)=>(v(),C(f(qr),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:c[0]||(c[0]=h=>i("escapeKeyDown",h)),onPointerDownOutside:c[1]||(c[1]=h=>{f(n).disableClosingTrigger.value&&f(n).trigger.value?.contains(h.target)&&h.preventDefault(),i("pointerDownOutside",h)}),onFocusOutside:c[2]||(c[2]=fe(()=>{},["prevent"])),onDismiss:c[3]||(c[3]=h=>f(n).onClose())},{default:_(()=>[F(f(Wn),H({ref:f(s),"data-state":f(n).stateAttribute.value},{...d.$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(d.$slots,"default"),F(f(Fr),{id:f(n).contentId,role:"tooltip"},{default:_(()=>[de(Z(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),ou=og,lg=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(r){const t=Or(r),{forwardRef:i,currentElement:n}=X(),{trigger:s,onClose:a}=Xn(),o=sa(),{isPointerInTransit:l,onPointerExit:u}=wl(s,n);return o.isPointerInTransitRef=l,u(()=>{a()}),(d,c)=>(v(),C(ou,H({ref:f(i)},f(t)),{default:_(()=>[A(d.$slots,"default")]),_:3},16))}}),ug=lg,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(r,{emit:e}){const t=r,i=e,n=Xn(),s=Ce(t,i),{forwardRef:a}=X();return(o,l)=>(v(),C(f($t),{present:o.forceMount||f(n).open.value},{default:_(()=>[(v(),C(sr(f(n).disableHoverableContent.value?ou:ug),H({ref:f(a)},f(s)),{default:_(()=>[A(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),cg=dg,hg=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(r){const e=r;return(t,i)=>(v(),C(f(kr),oe(le(e)),{default:_(()=>[A(t.$slots,"default")]),_:3},16))}}),fg=hg,pg=z({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Xn(),i=sa();t.contentId||=yt(void 0,"reka-tooltip-content");const{forwardRef:n,currentElement:s}=X(),a=O(!1),o=O(!1),l=k(()=>t.disabled.value?{}:{click:g,focus:p,pointermove:c,pointerleave:h,pointerdown:d,blur:m});Re(()=>{t.onTriggerChange(s.value)});function u(){setTimeout(()=>{a.value=!1},1)}function d(){t.open&&!t.disableClosingTrigger.value&&t.onClose(),a.value=!0,document.addEventListener("pointerup",u,{once:!0})}function c(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,w)=>(v(),C(f(Pr),{"as-child":"",reference:y.reference},{default:_(()=>[F(f(ne),H({ref:f(n),"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":""},zr(l.value)),{default:_(()=>[A(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),mg=pg;function Mn(r={}){const{inheritAttrs:e=!0}=r,t=tt(),i=z({setup(s,{slots:a}){return()=>{t.value=a.default}}}),n=z({inheritAttrs:e,props:r.props,setup(s,{attrs:a,slots:o}){return()=>{var l;t.value;const u=(l=t.value)==null?void 0:l.call(t,{...r.props==null?gg(a):s,$slots:o});return e&&u?.length===1?u[0]:u}}});return bd({define:i,reuse:n},[i,n])}function gg(r){const e={};for(const t in r)e[Cd(t)]=r[t];return e}const Ta=Ad?window:void 0;function rr(r){var e;const t=Pt(r);return(e=t?.$el)!=null?e:t}function xr(...r){const e=[],t=()=>{e.forEach(o=>o()),e.length=0},i=(o,l,u,d)=>(o.addEventListener(l,u,d),()=>o.removeEventListener(l,u,d)),n=k(()=>{const o=An(Pt(r[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),s=wd(()=>{var o,l;return[(l=(o=n.value)==null?void 0:o.map(u=>rr(u)))!=null?l:[Ta].filter(u=>u!=null),An(Pt(n.value?r[1]:r[0])),An(f(n.value?r[2]:r[1])),Pt(n.value?r[3]:r[2])]},([o,l,u,d])=>{if(t(),!o?.length||!l?.length||!u?.length)return;const c=Md(d)?{...d}:d;e.push(...o.flatMap(h=>l.flatMap(p=>u.map(m=>i(h,p,m,c)))))},{flush:"post"}),a=()=>{s(),t()};return aa(t),a}function yg(){const r=tt(!1),e=Nn();return e&&Re(()=>{r.value=!0},e),r}function lu(r){const e=yg();return k(()=>(e.value,!!r()))}function vg(r,e,t={}){const{window:i=Ta,...n}=t;let s;const a=lu(()=>i&&"MutationObserver"in i),o=()=>{s&&(s.disconnect(),s=void 0)},l=k(()=>{const h=Pt(r),p=An(h).map(rr).filter(Sd);return new Set(p)}),u=_e(l,h=>{o(),a.value&&h.size&&(s=new MutationObserver(e),h.forEach(p=>s.observe(p,n)))},{immediate:!0,flush:"post"}),d=()=>s?.takeRecords(),c=()=>{u(),o()};return aa(c),{isSupported:a,stop:c,takeRecords:d}}function bg(r){return JSON.parse(JSON.stringify(r))}function xg(r,e,t={}){const{window:i=Ta,...n}=t;let s;const a=lu(()=>i&&"ResizeObserver"in i),o=()=>{s&&(s.disconnect(),s=void 0)},l=k(()=>{const c=Pt(r);return Array.isArray(c)?c.map(h=>rr(h)):[rr(c)]}),u=_e(l,c=>{if(o(),a.value&&i){s=new ResizeObserver(e);for(const h of c)h&&s.observe(h,n)}},{immediate:!0,flush:"post"}),d=()=>{o(),u()};return aa(d),{isSupported:a,stop:d}}function yo(r,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:n=!0,immediate:s=!0,updateTiming:a="sync"}=e,o=tt(0),l=tt(0),u=tt(0),d=tt(0),c=tt(0),h=tt(0),p=tt(0),m=tt(0);function g(){const w=rr(r);if(!w){t&&(o.value=0,l.value=0,u.value=0,d.value=0,c.value=0,h.value=0,p.value=0,m.value=0);return}const x=w.getBoundingClientRect();o.value=x.height,l.value=x.bottom,u.value=x.left,d.value=x.right,c.value=x.top,h.value=x.width,p.value=x.x,m.value=x.y}function y(){a==="sync"?g():a==="next-frame"&&requestAnimationFrame(()=>g())}return xg(r,y),_e(()=>rr(r),w=>!w&&y()),vg(r,y,{attributeFilter:["style","class"]}),n&&xr("scroll",y,{capture:!0,passive:!0}),i&&xr("resize",y,{passive:!0}),xd(()=>{s&&y()}),{height:o,bottom:l,left:u,right:d,top:c,width:h,x:p,y:m,update:y}}function wg(r,e,t,i={}){var n,s,a;const{clone:o=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:c,shouldEmit:h}=i,p=Nn(),m=t||p?.emit||((n=p?.$emit)==null?void 0:n.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=b=>o?typeof o=="function"?o(b):bg(b):b,w=()=>_d(r[e])?y(r[e]):c,x=b=>{h?h(b)&&m(g,b):m(g,b)};if(l){const b=w(),S=O(b);let q=!1;return _e(()=>r[e],M=>{q||(q=!0,S.value=y(M),Xe(()=>q=!1))}),_e(S,M=>{!q&&(M!==r[e]||d)&&x(M)},{deep:d}),S}else return k({get(){return w()},set(b){x(b)}})}const _g=Symbol.for("nuxt:client-only"),Cg=z({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(r,{slots:e,attrs:t}){const i=tt(!1);Re(()=>{i.value=!0});const n=Nn();return n&&(n._nuxtClientOnly=!0),kd(_g,!0),()=>{if(i.value){const l=e.default?.();return l&&l.length===1?[Bd(l[0],t)]:l}const s=e.fallback||e.placeholder;if(s)return qd(s);const a=r.fallback||r.placeholder||"",o=r.fallbackTag||r.placeholderTag||"span";return V(o,t,a)}}}),vo=Ed({...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"}}}}),Sg=r=>{const e=r||je(Fd(Od,vo));return zd(k(()=>e.value||vo))},uu=oa(Sg),Ag=()=>Td("color-mode").value,Mg=Object.assign({inheritAttrs:!1},{__name:"UColorModeButton",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"}},setup(r){const{t:e}=uu(),t=Ag(),i=Te(),n=k({get(){return t.value==="dark"},set(s){t.preference=s?"dark":"light"}});return(s,a)=>{const o=Cg;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:n.value?f(i).ui.icons.dark:f(i).ui.icons.light,color:r.color,variant:r.variant,"aria-label":n.value?f(e)("colorMode.switchToLight"):f(e)("colorMode.switchToDark")},s.$attrs,{onClick:a[0]||(a[0]=l=>n.value=!n.value)}),null,16,["icon","color","variant","aria-label"])]),_:3}))}}}),en={meta:"",ctrl:"",alt:"",win:"⊞",command:"⌘",shift:"⇧",control:"⌃",option:"⌥",enter:"↵",delete:"⌦",backspace:"⌫",escape:"⎋",tab:"⇥",capslock:"⇪",arrowup:"↑",arrowright:"→",arrowdown:"↓",arrowleft:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘"},Bg=()=>{const r=k(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),e=ra({meta:" ",alt:" ",ctrl:" "});Re(()=>{e.meta=r.value?en.command:"Ctrl",e.ctrl=r.value?en.control:"Ctrl",e.alt=r.value?en.option:"Alt"});function t(i){if(i)return["meta","alt","ctrl"].includes(i)?e[i]:en[i]||i.toUpperCase()}return{macOS:r,getKbdKey:t}},qg=oa(Bg),kg={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"}},du={__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(r){const e=r,{getKbdKey:t}=qg(),i=Te(),n=k(()=>ce({extend:ce(kg),...i.ui?.kbd||{}}));return(s,a)=>(v(),C(f(ne),{as:r.as,class:T(n.value({class:e.class,color:e.color,variant:e.variant,size:e.size}))},{default:_(()=>[A(s.$slots,"default",{},()=>[de(Z(f(t)(r.value)),1)])]),_:3},8,["as","class"]))}},Eg={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"}},Fg={__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(r,{emit:e}){const t=r,i=e,n=Ge(),s=Te(),a=Ce(Ft(t,"defaultOpen","open","delayDuration","disableHoverableContent","disableClosingTrigger","ignoreNonKeyboardFocus"),i),o=ar(je(()=>t.portal)),l=je(()=>Br(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),u=je(()=>t.arrow),d=k(()=>ce({extend:ce(Eg),...s.ui?.tooltip||{}})({side:l.value.side}));return(c,h)=>(v(),C(f(ag),H(f(a),{disabled:!(r.text||r.kbds?.length||n.content)||t.disabled}),{default:_(({open:p})=>[n.default||r.reference?(v(),C(f(mg),H({key:0},c.$attrs,{"as-child":"",reference:r.reference,class:t.class}),{default:_(()=>[A(c.$slots,"default",{open:p})]),_:2},1040,["reference","class"])):R("",!0),F(f(fg),oe(le(f(o))),{default:_(()=>[F(f(cg),H(l.value,{class:d.value.content({class:[!n.default&&t.class,t.ui?.content]})}),{default:_(()=>[A(c.$slots,"content",{},()=>[r.text?(v(),V("span",{key:0,class:T(d.value.text({class:t.ui?.text}))},Z(r.text),3)):R("",!0),r.kbds?.length?(v(),V("span",{key:1,class:T(d.value.kbds({class:t.ui?.kbds}))},[(v(!0),V(we,null,Ye(r.kbds,(m,g)=>(v(),C(du,H({key:g,size:t.ui?.kbdsSize||d.value.kbdsSize()},{ref_for:!0},typeof m=="string"?{value:m}:m),null,16,["size"]))),128))],2)):R("",!0)]),r.arrow?(v(),C(f(rg),H({key:0},u.value,{class:d.value.arrow({class:t.ui?.arrow})}),null,16,["class"])):R("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["disabled"]))}},Og={base:"w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"},zg={__name:"UContainer",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(r){const e=r,t=Te(),i=k(()=>ce({extend:ce(Og),...t.ui?.container||{}}));return(n,s)=>(v(),C(f(ne),{as:r.as,class:T(i.value({class:e.class}))},{default:_(()=>[A(n.$slots,"default")]),_:3},8,["as","class"]))}},Tg={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]"}}]},Ig={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{t:s}=Tr(),a=Te(),o=Ce(Ft(t,"open","defaultOpen","modal"),i),l=ar(je(()=>t.portal)),u=je(()=>t.content),d=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)}),c=k(()=>ce({extend:ce(Tg),...a.ui?.slideover||{}})({transition:t.transition,side:t.side}));return(h,p)=>(v(),C(f(fa),oe(le(f(o))),{default:_(({open:m,close:g})=>[n.default?(v(),C(f(xa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(h.$slots,"default",{open:m})]),_:2},1032,["class"])):R("",!0),F(f(ba),oe(le(f(l))),{default:_(()=>[r.overlay?(v(),C(f(va),{key:0,class:T(c.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(ya),H({"data-side":r.side,class:c.value.content({class:[!n.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"))},zr(d.value)),{default:_(()=>[n.content&&(r.title||n.title||r.description||n.description)?(v(),C(f(Fr),{key:0},{default:_(()=>[r.title||n.title?(v(),C(f(tr),{key:0},{default:_(()=>[A(h.$slots,"title",{},()=>[de(Z(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),C(f(er),{key:1},{default:_(()=>[A(h.$slots,"description",{},()=>[de(Z(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(h.$slots,"content",{close:g},()=>[n.header||r.title||n.title||r.description||n.description||t.close||n.close?(v(),V("div",{key:0,class:T(c.value.header({class:t.ui?.header}))},[A(h.$slots,"header",{close:g},()=>[I("div",{class:T(c.value.wrapper({class:t.ui?.wrapper}))},[r.title||n.title?(v(),C(f(tr),{key:0,class:T(c.value.title({class:t.ui?.title}))},{default:_(()=>[A(h.$slots,"title",{},()=>[de(Z(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),C(f(er),{key:1,class:T(c.value.description({class:t.ui?.description}))},{default:_(()=>[A(h.$slots,"description",{},()=>[de(Z(r.description),1)])]),_:3},8,["class"])):R("",!0)],2),A(h.$slots,"actions"),t.close||n.close?(v(),C(f(Cl),{key:0,"as-child":""},{default:_(()=>[A(h.$slots,"close",{close:g,ui:c.value},()=>[t.close?(v(),C(lt,H({key:0,icon:r.closeIcon||f(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":f(s)("slideover.close")},typeof t.close=="object"?t.close:{},{class:c.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(c.value.body({class:t.ui?.body}))},[A(h.$slots,"body",{close:g})],2),n.footer?(v(),V("div",{key:1,class:T(c.value.footer({class:t.ui?.footer}))},[A(h.$slots,"footer",{close:g})],2)):R("",!0)])]),_:2},1040,["data-side","class"])]),_:2},1040)]),_:3},16))}},Pg={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"}}}},Rg={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{t:s}=Tr(),a=Te(),o=Ce(Ft(t,"open","defaultOpen","modal"),i),l=ar(je(()=>t.portal)),u=je(()=>t.content),d=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)}),c=k(()=>ce({extend:ce(Pg),...a.ui?.modal||{}})({transition:t.transition,fullscreen:t.fullscreen}));return(h,p)=>(v(),C(f(fa),oe(le(f(o))),{default:_(({open:m,close:g})=>[n.default?(v(),C(f(xa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(h.$slots,"default",{open:m})]),_:2},1032,["class"])):R("",!0),F(f(ba),oe(le(f(l))),{default:_(()=>[r.overlay?(v(),C(f(va),{key:0,class:T(c.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(ya),H({class:c.value.content({class:[!n.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"))},zr(d.value)),{default:_(()=>[n.content&&(r.title||n.title||r.description||n.description)?(v(),C(f(Fr),{key:0},{default:_(()=>[r.title||n.title?(v(),C(f(tr),{key:0},{default:_(()=>[A(h.$slots,"title",{},()=>[de(Z(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),C(f(er),{key:1},{default:_(()=>[A(h.$slots,"description",{},()=>[de(Z(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(h.$slots,"content",{close:g},()=>[n.header||r.title||n.title||r.description||n.description||t.close||n.close?(v(),V("div",{key:0,class:T(c.value.header({class:t.ui?.header}))},[A(h.$slots,"header",{close:g},()=>[I("div",{class:T(c.value.wrapper({class:t.ui?.wrapper}))},[r.title||n.title?(v(),C(f(tr),{key:0,class:T(c.value.title({class:t.ui?.title}))},{default:_(()=>[A(h.$slots,"title",{},()=>[de(Z(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),C(f(er),{key:1,class:T(c.value.description({class:t.ui?.description}))},{default:_(()=>[A(h.$slots,"description",{},()=>[de(Z(r.description),1)])]),_:3},8,["class"])):R("",!0)],2),A(h.$slots,"actions"),t.close||n.close?(v(),C(f(Cl),{key:0,"as-child":""},{default:_(()=>[A(h.$slots,"close",{close:g,ui:c.value},()=>[t.close?(v(),C(lt,H({key:0,icon:r.closeIcon||f(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":f(s)("modal.close")},typeof t.close=="object"?t.close:{},{class:c.value.close({class:t.ui?.close})}),null,16,["icon","aria-label","class"])):R("",!0)])]),_:2},1024)):R("",!0)])],2)):R("",!0),n.body?(v(),V("div",{key:1,class:T(c.value.body({class:t.ui?.body}))},[A(h.$slots,"body",{close:g})],2)):R("",!0),n.footer?(v(),V("div",{key:2,class:T(c.value.footer({class:t.ui?.footer}))},[A(h.$slots,"footer",{close:g})],2)):R("",!0)])]),_:2},1040,["class"])]),_:2},1040)]),_:3},16))}};(function(){var r;try{if(typeof document<"u"){var e=document.createElement("style");e.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.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 Dg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $g=r=>typeof r<"u";function Lg(r){return JSON.parse(JSON.stringify(r))}function bo(r,e,t,i={}){var n,s,a;const{clone:o=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:c,shouldEmit:h}=i,p=Nn(),m=t||p?.emit||((n=p?.$emit)==null?void 0:n.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=b=>o?typeof o=="function"?o(b):Lg(b):b,w=()=>$g(r[e])?y(r[e]):c,x=b=>{h?h(b)&&m(g,b):m(g,b)};if(l){const b=w(),S=O(b);let q=!1;return _e(()=>r[e],M=>{q||(q=!0,S.value=y(M),Xe(()=>q=!1))}),_e(S,M=>{!q&&(M!==r[e]||d)&&x(M)},{deep:d}),S}else return k({get(){return w()},set(b){x(b)}})}const[$r,Hg]=De("DrawerRoot"),cu=new WeakMap;function He(r,e,t=!1){if(!r||!(r instanceof HTMLElement)||!e)return;const i={};Object.entries(e).forEach(([n,s])=>{if(n.startsWith("--")){r.style.setProperty(n,s);return}i[n]=r.style[n],r.style[n]=s}),!t&&cu.set(r,i)}function Ng(r,e){if(!r||!(r instanceof HTMLElement))return;const t=cu.get(r);t&&Object.entries(t).forEach(([i,n])=>{r.style[i]=n})}function tn(r,e){const t=window.getComputedStyle(r),i=t.transform||t.webkitTransform||t.mozTransform;let n=i.match(/^matrix3d\((.+)\)$/);return n?Number.parseFloat(n[1].split(", ")[Fe(e)?13:12]):(n=i.match(/^matrix\((.+)\)$/),n?Number.parseFloat(n[1].split(", ")[Fe(e)?5:4]):null)}function Vg(r){return 8*(Math.log(r+1)-2)}function Fe(r){switch(r){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return r}}function ls(r,e){if(!r)return()=>{};const t=r.style.cssText;return Object.assign(r.style,e),()=>{r.style.cssText=t}}function Ug(...r){return(...e)=>{for(const t of r)typeof t=="function"&&t(...e)}}const ve={DURATION:.5,EASE:[.32,.72,0,1]},hu=.4,jg=.25,Gg=100,fu=8,rn=16,pu=26,xo="vaul-dragging";function Wg({activeSnapPoint:r,snapPoints:e,drawerRef:t,overlayRef:i,fadeFromIndex:n,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)}),Id(()=>{typeof window<"u"&&window.removeEventListener("resize",l)});const u=k(()=>(e.value&&r.value===e.value[e.value.length-1])??null),d=k(()=>e.value&&e.value.length>0&&(n?.value||n?.value===0)&&!Number.isNaN(n?.value)&&e.value[n?.value??-1]===r.value||!e.value),c=k(()=>{var x;return((x=e.value)==null?void 0:x.findIndex(b=>b===r.value))??null}),h=k(()=>{var x;return((x=e.value)==null?void 0:x.map(b=>{const S=typeof b=="string";let q=0;if(S&&(q=Number.parseInt(b,10)),Fe(a.value)){const B=S?q:o.value?b*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?b*o.value.innerWidth:0;return o.value?a.value==="right"?o.value.innerWidth-M:-o.value.innerWidth+M:M}))??[]}),p=k(()=>{var x;return c.value!==null?(x=h.value)==null?void 0:x[c.value]:null}),m=x=>{var b,S,q,M;const B=((b=h.value)==null?void 0:b.findIndex(L=>L===x))??null;Xe(()=>{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, ${x}px, 0)`:`translate3d(${x}px, 0, 0)`})}),h.value&&B!==h.value.length-1&&B!==n?.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"}),r.value=B!==null?((M=e.value)==null?void 0:M[B])??null:null};_e([r,h,e],()=>{var x;if(r.value){const b=((x=e.value)==null?void 0:x.findIndex(S=>S===r.value))??-1;h.value&&b!==-1&&typeof h.value[b]=="number"&&m(h.value[b])}},{immediate:!0});function g({draggedDistance:x,closeDrawer:b,velocity:S,dismissible:q}){var M,B,L;if(n.value===void 0)return;const E=a.value==="bottom"||a.value==="right"?(p.value??0)-x:(p.value??0)+x,D=c.value===n.value-1,U=c.value===0,G=x>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?b():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((re,K)=>typeof re!="number"||typeof K!="number"?re:Math.abs(K-E)<Math.abs(re-E)?K:re),te=Fe(a.value)?window.innerHeight:window.innerWidth;if(S>hu&&Math.abs(x)<te*.4){const re=G?1:-1;if(re>0&&u){m(h.value[(((L=e.value)==null?void 0:L.length)??0)-1]);return}if(U&&re<0&&q&&b(),c.value===null)return;m(h.value[c.value+re]);return}m(ee)}function y({draggedDistance:x}){var b;if(p.value===null)return;const S=a.value==="bottom"||a.value==="right"?p.value-x:p.value+x;(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((b=t.value)==null?void 0:b.$el,{transform:Fe(a.value)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`})}function w(x,b){if(!e.value||typeof c.value!="number"||!h.value||n.value===void 0)return null;const S=c.value===n.value-1;if(c.value>=n.value&&b)return 0;if(S&&!b)return 1;if(!d.value&&!S)return null;const q=S?c.value+1:c.value-1,M=S?h.value[q]-h.value[q-1]:h.value[q+1]-h.value[q],B=x/Math.abs(M);return S?1-B:B}return{isLastSnapPoint:u,shouldFade:d,getPercentageDragged:w,activeSnapPointIndex:c,onRelease:g,onDrag:y,snapPointsOffset:h}}function wo(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let fr=null;function Kg(r){const{isOpen:e,modal:t,nested:i,hasBeenOpened:n,preventScrollRestoration:s,noBodyStyles:a}=r,o=O(typeof window<"u"?window.location.href:""),l=O(0);function u(){if(wo()&&fr===null&&e.value&&!a.value){fr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:c,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.value}px`,left:`${-c}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 d(){if(wo()&&fr!==null&&!a.value){const c=-Number.parseInt(document.body.style.top,10),h=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,fr),window.requestAnimationFrame(()=>{if(s.value&&o.value!==window.location.href){o.value=window.location.href;return}window.scrollTo(h,c)}),fr=null}}return Re(()=>{function c(){l.value=window.scrollY}c(),window.addEventListener("scroll",c),Ai(()=>{window.removeEventListener("scroll",c)})}),_e([e,n,o],()=>{i.value||!n.value||(e.value?(window.matchMedia("(display-mode: standalone)").matches||u(),t.value||setTimeout(()=>{d()},500)):d())}),{restorePositionSetting:d}}function Yg(r,e){return r&&r.value?r:e}function Xg(r){const{emitDrag:e,emitRelease:t,emitClose:i,emitOpenChange:n,open:s,dismissible:a,nested:o,modal:l,shouldScaleBackground:u,setBackgroundColorOnScale:d,scrollLockTimeout:c,closeThreshold:h,activeSnapPoint:p,fadeFromIndex:m,direction:g,noBodyStyles:y,handleOnly:w,preventScrollRestoration:x}=r,b=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),re=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(r.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:cr,snapPointsOffset:Wu,onDrag:Ku,shouldFade:$a,getPercentageDragged:Yu}=Wg({snapPoints:J,activeSnapPoint:p,drawerRef:K,fadeFromIndex:m,overlayRef:B,onSnapPointChange:Xu,direction:g});function Xu(ie,Se){J.value&&ie===Se.length-1&&(L.value=new Date)}Kg({isOpen:b,modal:l,nested:o,hasBeenOpened:S,noBodyStyles:y,preventScrollRestoration:x});function Gr(){return(window.innerWidth-pu)/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?tn(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()<c.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 Ju(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 Zu(ie){var Se,Ie,ge,Ne,Je,bt;if(K.value&&q.value){const ki=g.value==="bottom"||g.value==="right"?1:-1,Wr=(te.value-(Fe(g.value)?ie.clientY:ie.clientX))*ki,Kr=Wr>0,Na=J.value&&!a.value&&!Kr;if(Na&&ye.value===0)return;const Qn=Math.abs(Wr),Va=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let hi=Qn/Q.value;const Ua=Yu(Qn,Kr);if(Ua!==null&&(hi=Ua),Na&&hi>=1||!G.value&&!La(ie.target,Kr))return;if((Se=K?.value)==null||Se.$el.classList.add(xo),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&&Ku({draggedDistance:Wr}),Kr&&!J.value){const fi=Vg(Wr),Yr=Math.min(fi*-1,0)*ki;He((Ne=K.value)==null?void 0:Ne.$el,{transform:Fe(g.value)?`translate3d(0, ${Yr}px, 0)`:`translate3d(${Yr}px, 0, 0)`});return}const rd=1-hi;if(($a.value||m.value&&ye.value===m.value-1)&&(e(hi),He((Je=B.value)==null?void 0:Je.$el,{opacity:`${rd}`,transition:"none"},!0)),Va&&B.value&&u.value){const fi=Math.min(Gr()+hi*(1-Gr()),1),Yr=8-hi*8,ja=Math.max(0,14-hi*14);He(Va,{borderRadius:`${Yr}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=Qn*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=tn(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&&b.value&&He(Se,{borderRadius:`${fu}px`,overflow:"hidden",...Fe(g.value)?{transform:`scale(${Gr()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Gr()}) 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 hr(ie){K.value&&(i(),ie||(b.value=!1),window.setTimeout(()=>{J.value&&(p.value=J.value[0])},ve.DURATION*1e3))}gt(()=>{if(!b.value&&u.value&&Dg){const ie=setTimeout(()=>{Ng(document.body)},200);return()=>clearTimeout(ie)}}),_e(s,()=>{b.value=s.value,s.value||hr()});function Qu(ie){if(!q.value||!K.value)return;K.value.$el.classList.remove(xo),G.value=!1,q.value=!1,D.value=new Date;const Se=tn(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;cr({draggedDistance:ge*bt,closeDrawer:hr,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>hu){hr(),t(!1);return}const Je=Math.min(K.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(Se>=Je*h.value){hr(),t(!1);return}t(!0),Ha()}_e(b,ie=>{ie&&(L.value=new Date),n(ie)},{immediate:!0});function ed(ie){var Se,Ie;const ge=ie?(window.innerWidth-rn)/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=tn((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 td(ie){var Se;if(ie<0)return;const Ie=Fe(g.value)?window.innerHeight:window.innerWidth,ge=(Ie-rn)/Ie,Ne=ge+ie*(1-ge),Je=-16+ie*rn;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 id(ie){var Se;const Ie=Fe(g.value)?window.innerHeight:window.innerWidth,ge=ie?(Ie-rn)/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:b,modal:l,keyboardIsOpen:re,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:Wu,direction:g,shouldFade:$a,fadeFromIndex:m,shouldScaleBackground:u,setBackgroundColorOnScale:d,onPress:Ju,onDrag:Zu,onRelease:Qu,closeDrawer:hr,onNestedDrag:td,onNestedRelease:id,onNestedOpenChange:ed,emitClose:i,emitDrag:e,emitRelease:t,emitOpenChange:n,nested:o,handleOnly:w,noBodyStyles:y}}const mu=z({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:jg},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:Gg},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(r,{expose:e,emit:t}){const i=r,n=t;Ge();const s=k(()=>i.fadeFromIndex??(i.snapPoints&&i.snapPoints.length-1)),a=bo(i,"open",n,{defaultValue:i.defaultOpen,passive:i.open===void 0}),o=bo(i,"activeSnapPoint",n,{passive:i.activeSnapPoint===void 0}),l={emitDrag:m=>n("drag",m),emitRelease:m=>n("release",m),emitClose:()=>n("close"),emitOpenChange:m=>{n("update:open",m),setTimeout(()=>{n("animationEnd",m)},ve.DURATION*1e3)}},{closeDrawer:u,hasBeenOpened:d,modal:c,isOpen:h}=Hg(Xg({...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?d.value=!0:u()}return e({open:h}),(m,g)=>(v(),C(f(fa),{open:f(h),modal:f(c),"onUpdate:open":p},{default:_(()=>[A(m.$slots,"default",{open:f(h)})]),_:3},8,["open","modal"]))}}),Jg=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(r,{emit:e}){const t=r,i=e,{onNestedDrag:n,onNestedOpenChange:s,onNestedRelease:a}=$r();function o(){s(!1)}function l(c){n(c)}function u(c){c&&s(c),i("update:open",c)}const d=Ce(t,i);return(c,h)=>(v(),C(mu,H(f(d),{nested:"",onClose:o,onDrag:l,onRelease:f(a),"onUpdate:open":u}),{default:_(()=>[A(c.$slots,"default")]),_:3},16,["onRelease"]))}}),Zg=z({__name:"DrawerOverlay",setup(r){const{overlayRef:e,hasSnapPoints:t,isOpen:i,shouldFade:n}=$r();return(s,a)=>(v(),C(f(va),{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(n)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),Qg=()=>()=>{};function ey(){const{direction:r,isOpen:e,shouldScaleBackground:t,setBackgroundColorOnScale:i,noBodyStyles:n}=$r(),s=O(null),a=O(document.body.style.backgroundColor);function o(){return(window.innerWidth-pu)/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;Ug(i.value&&!n.value?ls(document.body,{background:"black"}):Qg,ls(u,{transformOrigin:Fe(r.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${ve.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ve.EASE.join(",")})`}));const d=ls(u,{borderRadius:`${fu}px`,overflow:"hidden",...Fe(r.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(()=>{d(),s.value=window.setTimeout(()=>{a.value?document.body.style.background=a.value:document.body.style.removeProperty("background")},ve.DURATION*1e3)})}},{flush:"pre"})}const ty=z({__name:"DrawerContent",setup(r){const{open:e,isOpen:t,snapPointsOffset:i,hasSnapPoints:n,drawerRef:s,onPress:a,onDrag:o,onRelease:l,modal:u,emitOpenChange:d,dismissible:c,keyboardIsOpen:h,closeDrawer:p,direction:m,handleOnly:g}=$r();ey();const y=O(!1),w=k(()=>i.value&&i.value.length>0?`${i.value[0]}px`:"0");function x(q){if(!u.value||q.defaultPrevented){q.preventDefault();return}h.value&&(h.value=!1),c.value?d(!1):q.preventDefault()}function b(q){g.value||a(q)}function S(q){g.value||o(q)}return gt(()=>{n.value&&window.requestAnimationFrame(()=>{y.value=!0})}),(q,M)=>(v(),C(f(ya),{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(n)?"true":"false",style:qt({"--snap-point-height":w.value}),onPointerdown:b,onPointermove:S,onPointerup:f(l),onPointerDownOutside:x,onOpenAutoFocus:M[0]||(M[0]=fe(()=>{},["prevent"])),onEscapeKeyDown:M[1]||(M[1]=B=>{f(c)||B.preventDefault()})},{default:_(()=>[A(q.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),iy=["data-vaul-drawer-visible"],ry={"data-vaul-handle-hitarea":"","aria-hidden":"true"},ny=250,sy=120,ay=z({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(r){const e=r,{onPress:t,onDrag:i,handleRef:n,handleOnly:s,isOpen:a,snapPoints:o,activeSnapPoint:l,isDragging:u,dismissible:d,closeDrawer:c}=$r(),h=O(null),p=O(!1);function m(){if(p.value){w();return}window.setTimeout(()=>{g()},sy)}function g(){if(u.value||e.preventCycle||p.value){w();return}if(w(),!o.value||o.value.length===0){d.value||c();return}const S=l.value===o.value[o.value.length-1];if(S&&d.value){c();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},ny)}function w(){h.value&&window.clearTimeout(h.value),p.value=!1}function x(S){s.value&&t(S),y()}function b(S){s.value&&i(S)}return(S,q)=>(v(),V("div",{ref_key:"handleRef",ref:n,"data-vaul-drawer-visible":f(a)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:m,onPointercancel:w,onPointerdown:x,onPointermove:b},[I("span",ry,[A(S.$slots,"default")])],40,iy))}}),oy={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"}}]},ly={__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(r,{emit:e}){const t=r,i=e,n=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=ar(je(()=>t.portal)),l=je(()=>t.content),u={closeAutoFocus:c=>c.preventDefault()},d=k(()=>ce({extend:ce(oy),...s.ui?.drawer||{}})({direction:t.direction,inset:t.inset}));return(c,h)=>(v(),C(sr(r.nested?f(Jg):f(mu)),oe(le(f(a))),{default:_(()=>[n.default?(v(),C(f(xa),{key:0,"as-child":"",class:T(t.class)},{default:_(()=>[A(c.$slots,"default")]),_:3},8,["class"])):R("",!0),F(f(ba),oe(le(f(o))),{default:_(()=>[r.overlay?(v(),C(f(Zg),{key:0,class:T(d.value.overlay({class:t.ui?.overlay}))},null,8,["class"])):R("",!0),F(f(ty),H({class:d.value.content({class:[!n.default&&t.class,t.ui?.content]})},l.value,zr(u)),{default:_(()=>[r.handle?(v(),C(f(ay),{key:0,class:T(d.value.handle({class:t.ui?.handle}))},null,8,["class"])):R("",!0),n.content&&(r.title||n.title||r.description||n.description)?(v(),C(f(Fr),{key:1},{default:_(()=>[r.title||n.title?(v(),C(f(tr),{key:0},{default:_(()=>[A(c.$slots,"title",{},()=>[de(Z(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),C(f(er),{key:1},{default:_(()=>[A(c.$slots,"description",{},()=>[de(Z(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),A(c.$slots,"content",{},()=>[I("div",{class:T(d.value.container({class:t.ui?.container}))},[n.header||r.title||n.title||r.description||n.description?(v(),V("div",{key:0,class:T(d.value.header({class:t.ui?.header}))},[A(c.$slots,"header",{},()=>[r.title||n.title?(v(),C(f(tr),{key:0,class:T(d.value.title({class:t.ui?.title}))},{default:_(()=>[A(c.$slots,"title",{},()=>[de(Z(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),C(f(er),{key:1,class:T(d.value.description({class:t.ui?.description}))},{default:_(()=>[A(c.$slots,"description",{},()=>[de(Z(r.description),1)])]),_:3},8,["class"])):R("",!0)])],2)):R("",!0),n.body?(v(),V("div",{key:1,class:T(d.value.body({class:t.ui?.body}))},[A(c.$slots,"body")],2)):R("",!0),n.footer?(v(),V("div",{key:2,class:T(d.value.footer({class:t.ui?.footer}))},[A(c.$slots,"footer")],2)):R("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}};function js(r){return r.map(e=>{if(!e.children||typeof e.children=="string")return e.children||"";if(Array.isArray(e.children))return js(e.children);if(e.children.default)return js(e.children.default())}).join("")}const uy=Rd,_o=Pd(uy.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"}}}},cy=Object.assign({inheritAttrs:!1},{__name:"UHeader",props:qn({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(r){const e=r,t=Ge(),i=la(r,"open",{type:Boolean,default:!1}),n=Dd(),{t:s}=uu(),a=Te(),[o,l]=Mn(),[u,d]=Mn(),[c,h]=Mn(),p=k(()=>(t.title&&js(t.title())||e.title||"Nuxt UI Pro").trim());_e(()=>n.fullPath,()=>{i.value=!1});const m=k(()=>_o({extend:_o(dy),...a.uiPro?.header||{}})()),g=k(()=>({slideover:Ig,modal:Rg,drawer:ly})[e.mode]),y=je(()=>Br(e.menu,{content:{onOpenAutoFocus:x=>x.preventDefault()}},e.mode==="modal"?{fullscreen:!0,transition:!1}:{}));function w(){i.value=!i.value}return(x,b)=>(v(),V(we,null,[F(f(c),null,{default:_(()=>[A(x.$slots,"toggle",{open:i.value,toggle:w},()=>[r.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 r.toggle=="object"?r.toggle:{},{class:m.value.toggle({class:e.ui?.toggle,toggleSide:r.toggleSide}),onClick:w}),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}))},[r.toggleSide==="left"?(v(),C(f(h),{key:0})):R("",!0),A(x.$slots,"left",{},()=>[F(hl,{to:r.to,"aria-label":p.value,class:T(m.value.title({class:e.ui?.title}))},{default:_(()=>[A(x.$slots,"title",{},()=>[de(Z(r.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(x.$slots,"right"),r.toggleSide==="right"?(v(),C(f(h),{key:0})):R("",!0)],2)]),_:3}),F(f(ne),H({as:r.as},x.$attrs,{class:m.value.root({class:[e.ui?.root,e.class]})}),{default:_(()=>[A(x.$slots,"top"),F(zg,{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(x.$slots,"default")],2),F(f(d))]),_:3},8,["class"]),A(x.$slots,"bottom")]),_:3},16,["as","class"]),F(f(g),H({open:i.value,"onUpdate:open":b[0]||(b[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(x.$slots,"content",{},()=>[r.mode!=="drawer"?(v(),V("div",{key:0,class:T(m.value.header({class:e.ui?.header}))},[F(f(l)),F(f(d))],2)):R("",!0),I("div",{class:T(m.value.body({class:e.ui?.body}))},[A(x.$slots,"body")],2)])]),_:3},16,["open","title","description","ui"])],64))}}),hy=$d("/logo.svg"),fy={};function py(r,e){const t=Mg,i=lt,n=Fg,s=cy;return v(),C(s,null,{title:_(()=>[...e[0]||(e[0]=[I("div",{class:"flex items-center"},[I("img",{src:hy,alt:"Tres.js",class:"h-3 mr-4"}),I("a",{class:"font-bold text-dark font-sans text-sm",href:"/",title:"Home"},[de("Tres"),I("span",{class:"text-primary-400"},"DevTools")])],-1)])]),right:_(()=>[F(t),F(n,{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 my=Object.assign(fl(fy,[["render",py]]),{__name:"TheHeader"}),gy={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"}},di={__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(r){const e=r,t=Ge(),i=Te(),{orientation:n,size:s}=ua(e),{isLeading:a,isTrailing:o,leadingIconName:l,trailingIconName:u}=pl(e),d=k(()=>ce({extend:ce(gy),...i.ui?.badge||{}})({color:e.color,variant:e.variant,size:s.value||e.size,square:e.square||!t.default&&!e.label,buttonGroup:n.value}));return(c,h)=>(v(),C(f(ne),{as:r.as,class:T(d.value.base({class:[e.ui?.base,e.class]}))},{default:_(()=>[A(c.$slots,"leading",{},()=>[f(a)&&f(l)?(v(),C(Pe,{key:0,name:f(l),class:T(d.value.leadingIcon({class:e.ui?.leadingIcon}))},null,8,["name","class"])):r.avatar?(v(),C(or,H({key:1,size:e.ui?.leadingAvatarSize||d.value.leadingAvatarSize()},r.avatar,{class:d.value.leadingAvatar({class:e.ui?.leadingAvatar})}),null,16,["size","class"])):R("",!0)]),A(c.$slots,"default",{},()=>[r.label!==void 0&&r.label!==null?(v(),V("span",{key:0,class:T(d.value.label({class:e.ui?.label}))},Z(r.label),3)):R("",!0)]),A(c.$slots,"trailing",{},()=>[f(o)&&f(u)?(v(),C(Pe,{key:0,name:f(u),class:T(d.value.trailingIcon({class:e.ui?.trailingIcon}))},null,8,["name","class"])):R("",!0)])]),_:3},8,["as","class"]))}},yy={class:"font-mono text-xs"},vy={key:1,class:"mr-1 w-4 h-4"},by={class:"flex items-center gap-2 flex-1 min-w-0"},xy={class:"text-gray-700 font-medium"},wy=z({__name:"TreeGraph",props:{item:{},level:{default:0}},emits:["select-object"],setup(r,{emit:e}){const t=r,i=e,n=O(t.item.defaultExpanded??!1),s=()=>{n.value=!n.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,d)=>{const c=Pe,h=di,p=gu;return v(),V("div",yy,[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(c,{name:f(n)?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-gray-400"},null,8,["name"])])):(v(),V("div",vy)),I("div",by,[F(c,{name:u.item.icon,class:"w-4 h-4 text-gray-600 flex-shrink-0"},null,8,["name"]),I("span",xy,Z(u.item.label),1),u.item.name?(v(),C(h,{key:0,color:"primary",size:"sm",variant:"soft"},{default:_(()=>[de(Z(u.item.name),1)]),_:1})):R("",!0),u.item.memorySize>0?(v(),C(h,{key:1,color:"warning",size:"sm",variant:"soft"},{default:_(()=>[de(Z(u.item.memorySize)+" KB ",1)]),_:1})):R("",!0)])],4),f(o)&&f(n)?(v(!0),V(we,{key:0},Ye(u.item.children,m=>(v(),C(p,{key:m.key,item:m,level:u.level+1,onSelectObject:d[0]||(d[0]=g=>i("select-object",g))},null,8,["item","level"]))),128)):R("",!0)])}}}),gu=Object.assign(wy,{__name:"TreeGraph"}),_y={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"}},yu={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{t:s}=Tr(),a=Te(),o=k(()=>ce({extend:ce(_y),...a.ui?.alert||{}})({color:t.color,variant:t.variant,orientation:t.orientation,title:!!t.title||!!n.title}));return(l,u)=>(v(),C(f(ne),{as:r.as,"data-orientation":r.orientation,class:T(o.value.root({class:[t.ui?.root,t.class]}))},{default:_(()=>[A(l.$slots,"leading",{},()=>[r.avatar?(v(),C(or,H({key:0,size:t.ui?.avatarSize||o.value.avatarSize()},r.avatar,{class:o.value.avatar({class:t.ui?.avatar})}),null,16,["size","class"])):r.icon?(v(),C(Pe,{key:1,name:r.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}))},[r.title||n.title?(v(),V("div",{key:0,class:T(o.value.title({class:t.ui?.title}))},[A(l.$slots,"title",{},()=>[de(Z(r.title),1)])],2)):R("",!0),r.description||n.description?(v(),V("div",{key:1,class:T(o.value.description({class:t.ui?.description}))},[A(l.$slots,"description",{},()=>[de(Z(r.description),1)])],2)):R("",!0),r.orientation==="vertical"&&(r.actions?.length||n.actions)?(v(),V("div",{key:2,class:T(o.value.actions({class:t.ui?.actions}))},[A(l.$slots,"actions",{},()=>[(v(!0),V(we,null,Ye(r.actions,(d,c)=>(v(),C(lt,H({key:c,size:"xs"},{ref_for:!0},d),null,16))),128))])],2)):R("",!0)],2),r.orientation==="horizontal"&&(r.actions?.length||n.actions)||r.close?(v(),V("div",{key:0,class:T(o.value.actions({class:t.ui?.actions,orientation:"horizontal"}))},[r.orientation==="horizontal"&&(r.actions?.length||n.actions)?A(l.$slots,"actions",{key:0},()=>[(v(!0),V(we,null,Ye(r.actions,(d,c)=>(v(),C(lt,H({key:c,size:"xs"},{ref_for:!0},d),null,16))),128))]):R("",!0),A(l.$slots,"close",{ui:o.value},()=>[r.close?(v(),C(lt,H({key:0,icon:r.closeIcon||f(a).ui.icons.close,color:"neutral",variant:"link","aria-label":f(s)("alert.close")},typeof r.close=="object"?r.close:{},{class:o.value.close({class:t.ui?.close}),onClick:u[0]||(u[0]=d=>i("update:open",!1))}),null,16,["icon","aria-label","class"])):R("",!0)])],2)):R("",!0)]),_:3},8,["as","data-orientation","class"]))}},Cy={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"}},vu=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(r,{expose:e,emit:t}){const i=r,n=t,{t:s,code:a}=Tr(),o=Te(),l=Ce(Ft(i,"as","modelValue","defaultValue","min","max","step","stepSnapping","formatOptions","disableWheelChange","invertWheelChange","readonly"),n),{emitFormBlur:u,emitFormFocus:d,emitFormChange:c,emitFormInput:h,id:p,color:m,size:g,name:y,highlight:w,disabled:x,ariaAttrs:b}=da(i),{orientation:S,size:q}=ua(i),M=k(()=>i.locale||a.value),B=k(()=>q.value||g.value),L=k(()=>ce({extend:ce(Cy),...o.ui?.inputNumber||{}})({color:m.value,variant:i.variant,size:B.value,highlight:w.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(re){const K=new Event("change",{target:{value:re}});n("change",K),c(),h()}function ee(re){u(),n("blur",re)}function te(){i.autofocus&&U.value?.$el?.focus()}return Re(()=>{setTimeout(()=>{te()},i.autofocusDelay)}),e({inputRef:U}),(re,K)=>(v(),C(f(Tm),H(f(l),{id:f(p),class:L.value.root({class:[i.ui?.root,i.class]}),name:f(y),disabled:f(x),locale:M.value,"onUpdate:modelValue":G}),{default:_(()=>[F(f(Lm),H({...re.$attrs,...f(b)},{ref_key:"inputRef",ref:U,placeholder:r.placeholder,required:r.required,class:L.value.base({class:i.ui?.base}),onBlur:ee,onFocus:f(d)}),null,16,["placeholder","required","class","onFocus"]),I("div",{class:T(L.value.increment({class:i.ui?.increment}))},[F(f(Dm),{"as-child":"",disabled:f(x)||r.incrementDisabled},{default:_(()=>[A(re.$slots,"increment",{},()=>[F(lt,H({icon:E.value,color:f(m),size:r.size,variant:"link","aria-label":f(s)("inputNumber.increment")},typeof r.increment=="object"?r.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(Pm),{"as-child":"",disabled:f(x)||r.decrementDisabled},{default:_(()=>[A(re.$slots,"decrement",{},()=>[F(lt,H({icon:D.value,color:f(m),size:r.size,variant:"link","aria-label":f(s)("inputNumber.decrement")},typeof r.decrement=="object"?r.decrement:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2)]),_:3},16,["id","class","name","disabled","locale"]))}}),Sy=z({__name:"EditableNumber",props:{modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=O(!1),s=O(0),a=O(),o=k(()=>Number(t.modelValue).toFixed(2)),l=()=>{n.value=!0,s.value=t.modelValue},u=()=>{i("update:modelValue",s.value),n.value=!1},d=()=>{s.value=t.modelValue,n.value=!1};return(c,h)=>{const p=di,m=vu;return n.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(d,["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:_(()=>[de(Z(o.value),1)]),_:1}))}}}),Ay=Object.assign(Sy,{__name:"EditableNumber"}),My=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Y=255,ft=100,ni=125,Xi=150;var j,Mt,Ze,In;(function(r){r.HEX="HEX",r.RGB="RGB",r.HWB="HWB",r.HSL="HSL",r.CIELab="CIELab",r.LCH="LCH",r.CMYK="CMYK"})(j||(j={})),(function(r){r.ANALOGOUS="ANALOGOUS",r.COMPLEMENTARY="COMPLEMENTARY",r.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",r.TRIADIC="TRIADIC",r.TETRADIC="TETRADIC",r.SQUARE="SQUARE"})(Mt||(Mt={})),(function(r){r.ADDITIVE="ADDITIVE",r.SUBTRACTIVE="SUBTRACTIVE"})(Ze||(Ze={})),(function(r){r.black="#000000",r.silver="#C0C0C0",r.gray="#808080",r.white="#FFFFFF",r.maroon="#800000",r.red="#FF0000",r.purple="#800080",r.fuchsia="#FF00FF",r.green="#008000",r.lime="#00FF00",r.olive="#808000",r.yellow="#FFFF00",r.navy="#000080",r.blue="#0000FF",r.teal="#008080",r.aqua="#00FFFF",r.orange="#FFA500",r.aliceblue="#F0F8FF",r.antiquewhite="#FAEBD7",r.aquamarine="#7FFFD4",r.azure="#F0FFFF",r.beige="#F5F5DC",r.bisque="#FFE4C4",r.blanchedalmond="#FFEBCD",r.blueviolet="#8A2BE2",r.brown="#A52A2A",r.burlywood="#DEB887",r.cadetblue="#5F9EA0",r.chartreuse="#7FFF00",r.chocolate="#D2691E",r.coral="#FF7F50",r.cornflowerblue="#6495ED",r.cornsilk="#FFF8DC",r.crimson="#DC143C",r.cyan="#00FFFF",r.darkblue="#00008B",r.darkcyan="#008B8B",r.darkgoldenrod="#B8860B",r.darkgray="#A9A9A9",r.darkgreen="#006400",r.darkgrey="#A9A9A9",r.darkkhaki="#BDB76B",r.darkmagenta="#8B008B",r.darkolivegreen="#556B2F",r.darkorange="#FF8C00",r.darkorchid="#9932CC",r.darkred="#8B0000",r.darksalmon="#E9967A",r.darkseagreen="#8FBC8F",r.darkslateblue="#483D8B",r.darkslategray="#2F4F4F",r.darkslategrey="#2F4F4F",r.darkturquoise="#00CED1",r.darkviolet="#9400D3",r.deeppink="#FF1493",r.deepskyblue="#00BFFF",r.dimgray="#696969",r.dimgrey="#696969",r.dodgerblue="#1E90FF",r.firebrick="#B22222",r.floralwhite="#FFFAF0",r.forestgreen="#228B22",r.gainsboro="#DCDCDC",r.ghostwhite="#F8F8FF",r.gold="#FFD700",r.goldenrod="#DAA520",r.greenyellow="#ADFF2F",r.grey="#808080",r.honeydew="#F0FFF0",r.hotpink="#FF69B4",r.indianred="#CD5C5C",r.indigo="#4B0082",r.ivory="#FFFFF0",r.khaki="#F0E68C",r.lavender="#E6E6FA",r.lavenderblush="#FFF0F5",r.lawngreen="#7CFC00",r.lemonchiffon="#FFFACD",r.lightblue="#ADD8E6",r.lightcoral="#F08080",r.lightcyan="#E0FFFF",r.lightgoldenrodyellow="#FAFAD2",r.lightgray="#D3D3D3",r.lightgreen="#90EE90",r.lightgrey="#D3D3D3",r.lightpink="#FFB6C1",r.lightsalmon="#FFA07A",r.lightseagreen="#20B2AA",r.lightskyblue="#87CEFA",r.lightslategray="#778899",r.lightslategrey="#778899",r.lightsteelblue="#B0C4DE",r.lightyellow="#FFFFE0",r.limegreen="#32CD32",r.linen="#FAF0E6",r.magenta="#FF00FF",r.mediumaquamarine="#66CDAA",r.mediumblue="#0000CD",r.mediumorchid="#BA55D3",r.mediumpurple="#9370DB",r.mediumseagreen="#3CB371",r.mediumslateblue="#7B68EE",r.mediumspringgreen="#00FA9A",r.mediumturquoise="#48D1CC",r.mediumvioletred="#C71585",r.midnightblue="#191970",r.mintcream="#F5FFFA",r.mistyrose="#FFE4E1",r.moccasin="#FFE4B5",r.navajowhite="#FFDEAD",r.oldlace="#FDF5E6",r.olivedrab="#6B8E23",r.orangered="#FF4500",r.orchid="#DA70D6",r.palegoldenrod="#EEE8AA",r.palegreen="#98FB98",r.paleturquoise="#AFEEEE",r.palevioletred="#DB7093",r.papayawhip="#FFEFD5",r.peachpuff="#FFDAB9",r.peru="#CD853F",r.pink="#FFC0CB",r.plum="#DDA0DD",r.powderblue="#B0E0E6",r.rosybrown="#BC8F8F",r.royalblue="#4169E1",r.saddlebrown="#8B4513",r.salmon="#FA8072",r.sandybrown="#F4A460",r.seagreen="#2E8B57",r.seashell="#FFF5EE",r.sienna="#A0522D",r.skyblue="#87CEEB",r.slateblue="#6A5ACD",r.slategray="#708090",r.slategrey="#708090",r.snow="#FFFAFA",r.springgreen="#00FF7F",r.steelblue="#4682B4",r.tan="#D2B48C",r.thistle="#D8BFD8",r.tomato="#FF6347",r.turquoise="#40E0D0",r.violet="#EE82EE",r.wheat="#F5DEB3",r.whitesmoke="#F5F5F5",r.yellowgreen="#9ACD32",r.rebeccapurple="#663399"})(In||(In={}));const bu=Object.keys(In),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"]},Gs={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 wr;(function(r){r.NUMBER="number",r.BOOLEAN="boolean"})(wr||(wr={}));const rt={[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*\)$/},dt={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*/},xu=/^(?<number>-?(?:\d*\.)?\d+)(?<units>(?:deg|grad|rad|turn)?)$/,Me=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,Ws=/^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,Ar;(function(r){r.NONE="none",r.DEGREES="deg",r.GRADIANS="grad",r.RADIANS="rad",r.TURNS="turn"})(Ve||(Ve={})),(function(r){r.NONE="none",r.PERCENT="percent"})(Oe||(Oe={})),(function(r){r.DEVICE_CMYK="device-cmyk",r.CMYK="cmyk"})(Ar||(Ar={}));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:Ar.DEVICE_CMYK},be=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),ur=r=>+`${r}`.replace(Me,"$1"),it=r=>Me.test(`${r}`)?ur(r):Math.min(+r,100),nn=r=>(r.length===1&&(r+=r),parseInt(r,16)),sn=r=>{const e=$(r,0).toString(16).toUpperCase();return e.length===1?`0x0${e}`:`0x${e}`},wi=(r,e=!1)=>!e&&Me.test(r)?Math.min(Y*ur(r)/100,Y):Ws.test(r)?(r.length===3&&(r+=r.slice(-1)),e?$(r)/Y:$(r)):Math.min(+r,e?1:Y),Pn=r=>Me.test(r)?se(ni*ur(r)/100,-125,ni):se(+r,-125,ni),wu=r=>Me.test(r)?se(Xi*ur(r)/100,-150,Xi):se(+r,-150,Xi),ii=r=>Math.min(Me.test(r)?ur(r)/100:+r,1),_u=r=>[...r].sort().join("").toUpperCase(),$=(r,e=6)=>{const t=Math.pow(10,e);return Math.round(+r*t)/t},se=(r,e,t)=>Math.max(e,Math.min(r,t)),Cu=r=>180*r/Math.PI,Su=r=>r*Math.PI/180,Bn=360,mt=r=>{if(typeof r=="string"){const e=r.match(xu).groups,t=+e.number;switch(e.units){case Ve.RADIANS:r=$(Cu(t));break;case Ve.TURNS:r=$(t*Bn);break;case Ve.GRADIANS:r=$(.9*t);break;case Ve.DEGREES:default:r=t}}return(r>360||r<0)&&(r-=Math.floor(r/Bn)*Bn),r},me=r=>(typeof r=="string"&&(r=Me.test(r)?ur(r)/100:+r),isNaN(+r)||r>1?1:$(r)),Au=(r,e)=>{let t;switch(e){case Ve.RADIANS:t=$(Su(r));break;case Ve.TURNS:t=$(r/Bn);break;case Ve.GRADIANS:t=$(10/9*r);break;case Ve.DEGREES:case Ve.NONE:default:t=r}return t},us=r=>`${r}`in Ze,Mu=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],Ty=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],Ji=Mu.map((r=>r.reduce(((e,t)=>e+t),0))),ds=(r,e,t)=>(t<0&&(t+=6),t>=6&&(t-=6),$(t<1?((e-r)*t+r)*Y:t<3?e*Y:t<4?((e-r)*(4-t)+r)*Y:r*Y)),Iy=r=>r<=.04045?r/12.92:((r+.055)/1.055)**2.4,Py=r=>r<=.0031308?12.92*r:1.055*r**(1/2.4)-.055,Bu=(r,e,t,i)=>{const n=[0,0,0],s=[r,e,t];return i.forEach(((a,o)=>{a.forEach(((l,u)=>{n[o]+=l*s[u]}))})),n},pe=(r,e,t)=>{e/=100;const i=(t/=100)<=.5?t*(e+1):t+e-t*e,n=2*t-i;return{R:ds(n,i,(r/=60)+2),G:ds(n,i,r),B:ds(n,i,r-2)}},oi=(r,e,t,i=1)=>{r/=Y,e/=Y,t/=Y,i=Math.min(i,1);const n=Math.max(r,e,t),s=Math.min(r,e,t),a=n-s;let o=0,l=0;const u=(n+s)/2;if(a!==0){switch(n){case r:o=(e-t)/a%6;break;case e:o=(t-r)/a+2;break;case t:o=(r-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=(r,e,t)=>{const i=[r/Y,e/Y,t/Y].map(Iy),n=Bu(i[0],i[1],i[2],Mu),s=((a,o,l)=>{const u=h=>h>.008856451679035631?Math.cbrt(h):h/.12841854934601665+.13793103448275862,d=u(a/Ji[0]),c=u(o/Ji[1]);return[116*c-16,500*(d-c),200*(c-u(l/Ji[2]))]})(n[0],n[1],n[2]);return{L:s[0],a:s[1],b:s[2]}},Mr=(r,e,t)=>{const i=((s,a,o)=>{const l=h=>h>.20689655172413793?h**3:.12841854934601665*(h-.13793103448275862),u=(s+16)/116,d=a/500,c=o/200;return[Ji[0]*l(u+d),Ji[1]*l(u),Ji[2]*l(u-c)]})(r,e,t),n=Bu(i[0],i[1],i[2],Ty).map(Py);return{R:se(n[0]*Y,0,Y),G:se(n[1]*Y,0,Y),B:se(n[2]*Y,0,Y)}},qu=(r,e,t)=>{const i=Math.sqrt(e**2+t**2),n=Cu(Math.atan2(t,e));return{L:r,C:i,H:mt(n)}},ku=(r,e,t)=>{const i=Su(t);return{L:r,a:e*Math.cos(i),b:e*Math.sin(i)}},ui=(r,e,t)=>{const i=li(r,e,t);return qu(i.L,i.a,i.b)},Rn=(r,e,t)=>{const i=ku(r,e,t);return Mr(i.L,i.a,i.b)},Si=(r,e,t,i=1)=>({H:oi(r,e,t,i).H,W:$(Math.min(r,e,t)/Y*100),B:$(100*(1-Math.max(r,e,t)/Y)),A:i}),Dn=(r,e,t)=>{const i=1-(t/=100)-(e/=100),n=i*(1-Math.abs(r/60%2-1));let s=0,a=0,o=0;return r<60?(s=i,a=n,o=0):r>=60&&r<120?(s=n,a=i,o=0):r>=120&&r<180?(s=0,a=i,o=n):r>=180&&r<240?(s=0,a=n,o=i):r>=240&&r<300?(s=n,a=0,o=i):r>=300&&(s=i,a=0,o=n),s+=e,a+=e,o+=e,{R:se(s*Y,0,Y),G:se(a*Y,0,Y),B:se(o*Y,0,Y)}},Ia=(r,e,t,i)=>({R:$(Y*(1-r)*(i=1-i)),G:$(Y*(1-e)*i),B:$(Y*(1-t)*i)}),Eu=(r,e,t)=>{r/=Y,e/=Y,t/=Y;const i=1-Math.max(r,e,t),n=1-i,s=n&&(n-e)/n,a=n&&(n-t)/n;return{C:$(100*(n&&(n-r)/n)),M:$(100*s),Y:$(100*a),K:$(100*i)}},Co=(r,e)=>{if(r<0&&(r+=360),r>360&&(r-=360),r===360||r===0)return r;const t=[[0,120],[120,180],[180,240],[240,360]],i=[[0,60],[60,120],[120,240],[240,360]],n=e?i:t;let s=0,a=0,o=0,l=0;return(e?t:i).find(((u,d)=>r>=u[0]&&r<u[1]&&(s=u[0],a=u[1],o=n[d][0],l=n[d][1],!0))),o+(l-o)/(a-s)*(r-s)};class Fu{get rgb(){return this._rgb}}class Ry extends Fu{constructor(e){super();const t=e.match(rt.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:nn(this._r),G:nn(this._g),B:nn(this._b)};this._a!==void 0&&(i.A=nn(this._a)/Y),this._rgb=i}}class ze{constructor(e,t,i){this._operations=new Map([[dt.DIVISION,this._division],[dt.MULTIPLICATION,this._multiplication],[dt.SUM,this._sum],[dt.REST,this._rest]]),this._colorIndex=e;let n=t,s=0;if(Number.isNaN(+t))if(t in i)this._result=i[t];else if(dt.REGEXP.test(n))dt.REGEXP.lastIndex=0,this._result=this._getCalcValue(n,i);else{for(;dt.SCOPED.test(n)&&s<100;){if(dt.SCOPED.lastIndex=0,n=n.replace(dt.SCOPED,((a,o)=>this._calculate(o,i).toString())),dt.REGEXP.test(n)){dt.REGEXP.lastIndex=0;break}s++}this._result=this._getCalcValue(n,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(dt.REGEXP).groups.operation,n=this._calculate(i,t);if(Number.isNaN(n))throw new Error(`Invalid value for ${this._colorIndex}. ${i} ${zy}`);return n}_calculate(e,t){return this._operations.forEach(((i,n)=>{let s=0;for(;n.test(e)&&s<100;)e=e.replace(n,((a,o,l)=>i(t[o]??+o,t[l]??+l).toString())),s++})),+e}get result(){return this._result}}class Jn extends Fu{get hasPercentageAlpha(){return Me.test(this._a)}}class Ks extends Jn{constructor(e,t){super();const i=e.match(rt.RGB).groups,{r_legacy:n,g_legacy:s,b_legacy:a,a_legacy:o,r:l,g:u,b:d,a:c,from:h,relative_r:p,relative_g:m,relative_b:g,relative_a:y}=i;if(h){const w=t(h),x={r:w.R,g:w.G,b:w.B,alpha:w.A??1},b=new ze("r",p,x).result,S=new ze("g",m,x).result,q=new ze("b",g,x).result,M={R:Math.min(b,Y),G:Math.min(S,Y),B:Math.min(q,Y)};if(y){const B=new ze("alpha",y,x).result;M.A=Math.min(B,1)}this._rgb=M}else{this._r=n??l,this._g=s??u,this._b=a??d,this._a=o??c;const w={R:Math.min(wi(this._r),Y),G:Math.min(wi(this._g),Y),B:Math.min(wi(this._b),Y)};this._a!==void 0&&(w.A=me(this._a)),this._rgb=w}}get hasPercentageValues(){return Me.test(this._r)&&Me.test(this._g)&&Me.test(this._b)}static test(e){return rt.RGB.test(e)}}class Pa extends Jn{get angleUnit(){if(this._h){const e=this._h.match(xu).groups.units;return e===""?Ve.NONE:e}return Ve.NONE}}class Ys extends Pa{constructor(e,t){super();const i=e.match(rt.HSL).groups,{h_legacy:n,s_legacy:s,l_legacy:a,a_legacy:o,h:l,s:u,l:d,a:c,from:h,relative_h:p,relative_s:m,relative_l:g,relative_a:y}=i;if(h){const w=t(h),x=oi(w.R,w.G,w.B,w.A),b={h:x.H,s:x.S,l:x.L,alpha:x.A},S=new ze("h",p,b).result,q=new ze("s",m,b).result,M=new ze("l",g,b).result,B=pe(se(S,0,360),se(q,0,ft),se(M,0,ft));if(y){const L=new ze("alpha",y,b).result;B.A=se(L,0,1)}this._rgb=B}else{this._h=n??l,this._s=s??u,this._l=a??d,this._a=o??c;const w=pe(mt(this._h),it(this._s),it(this._l));this._a!==void 0&&(w.A=me(this._a)),this._rgb=w}}static test(e){return rt.HSL.test(e)}}class Xs extends Pa{constructor(e,t){super();const i=e.match(rt.HWB).groups,{h:n,w:s,b:a,a:o,from:l,relative_h:u,relative_w:d,relative_b:c,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,w=new ze("w",d,g).result,x=new ze("b",c,g).result,b=Dn(se(y,0,360),se(w,0,ft),se(x,0,ft));if(h){const S=new ze("alpha",h,g).result;b.A=se(S,0,1)}this._rgb=b}else{this._h=n,this._w=s,this._b=a,this._a=o;const p=Dn(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 rt.HWB.test(e)}}class Js extends Jn{constructor(e,t){super();const i=e.match(rt.CIELab).groups,{L:n,a:s,b:a,A:o,from:l,relative_L:u,relative_a:d,relative_b:c,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,w=new ze("a",d,g).result,x=new ze("b",c,g).result,b=Mr(se(y,0,ft),se(w,-125,ni),se(x,-125,ni));if(h){const S=new ze("alpha",h,g).result;b.A=se(S,0,1)}this._rgb=b}else{this._L=n,this._A=s,this._B=a,this._a=o;const p=Mr(it(this._L),Pn(this._A),Pn(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 rt.CIELab.test(e)}}class Zs extends Pa{constructor(e,t){super();const i=e.match(rt.LCH).groups,{l:n,c:s,h:a,a:o,from:l,relative_l:u,relative_c:d,relative_h:c,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,w=new ze("c",d,g).result,x=new ze("h",c,g).result,b=Rn(se(y,0,ft),se(w,-150,Xi),mt(x));if(h){const S=new ze("alpha",h,g).result;b.A=se(S,0,1)}this._rgb=b}else{this._l=n,this._c=s,this._h=a,this._a=o;const p=Rn(it(this._l),wu(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 rt.LCH.test(e)}}class Qs extends Jn{constructor(e){super();const t=e.match(rt.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 rt.CMYK.test(e)}}const Le=r=>typeof r=="string"?(e=>{let t;if(Object.keys(j).some((i=>{if(rt[i].test(e))return t=i,!0})),!t&&~bu.indexOf(e)&&(t=j.HEX),!t)throw new Error(Fy);return t})(r):(e=>{let t,i=!1;const n=_u(Object.keys(e));if(Gs[n]&&(t=Gs[n]),t&&t===j.RGB){const s=Object.entries(e).some((o=>!Ws.test(`${o[1]}`))),a=Object.entries(e).some((o=>!(Me.test(`${o[1]}`)||!Ws.test(`${o[1]}`)&&!isNaN(+o[1])&&+o[1]<=Y)));s&&a&&(i=!0),s||(t=j.HEX)}if(!t||i)throw new Error(Oy);return t})(r),Dy={[j.HEX](r){const e=~bu.indexOf(r)?In[r]:r;return new Ry(e).rgb},[j.RGB]:r=>new Ks(r,Ue).rgb,[j.HSL]:r=>new Ys(r,Ue).rgb,[j.HWB]:r=>new Xs(r,Ue).rgb,[j.CIELab]:r=>new Js(r,Ue).rgb,[j.LCH]:r=>new Zs(r,Ue).rgb,[j.CMYK]:r=>new Qs(r).rgb},$y={[j.HEX](r){const e={R:wi(`${r.R}`),G:wi(`${r.G}`),B:wi(`${r.B}`)};return be(r,"A")&&(e.A=Math.min(wi(`${r.A}`,!0),1)),e},[j.RGB](r){return this.HEX(r)},[j.HSL](r){const e=it(`${r.S}`),t=it(`${r.L}`),i=pe(mt(r.H),e,t);return be(r,"A")&&(i.A=me(r.A)),i},[j.HWB](r){const e=it(`${r.W}`),t=it(`${r.B}`),i=Dn(mt(r.H),e,t);return be(r,"A")&&(i.A=me(r.A)),i},[j.CIELab](r){const e=it(`${r.L}`),t=Pn(`${r.a}`),i=Pn(`${r.b}`),n=Mr(e,t,i);return be(r,"A")&&(n.A=me(r.A)),n},[j.LCH](r){const e=it(`${r.L}`),t=wu(`${r.C}`),i=mt(`${r.H}`),n=Rn(e,t,i);return be(r,"A")&&(n.A=me(r.A)),n},[j.CMYK](r){const e=ii(`${r.C}`),t=ii(`${r.M}`),i=ii(`${r.Y}`),n=ii(`${r.K}`),s=Ia(e,t,i,n);return be(r,"A")&&(s.A=me(r.A)),s}},Ue=(r,e=Le(r))=>typeof r=="string"?Dy[e](r):$y[e](r),xe=(r,...e)=>{const t=[],i=[],n=[],s=[],a=[],o=[],l=[],u=Object.values(Ve),d=Object.values(Oe),c=Object.values(Ar),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(Xs.test(p)){const m=new Xs(p,Ue);i.push(m.angleUnit),l.push(m.hasPercentageAlpha);continue}if(Ks.test(p)){const m=new Ks(p,Ue);n.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Js.test(p)){const m=new Js(p,Ue);s.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Zs.test(p)){const m=new Zs(p,Ue);i.push(m.angleUnit),a.push(m.hasPercentageValues),l.push(m.hasPercentageAlpha);continue}if(Qs.test(p)){const m=new Qs(p);o.push(m.hasPercentageValues),p.startsWith("cmyk")&&h.cmykFunction++,l.push(m.hasPercentageAlpha)}}return{decimals:typeof r.decimals===wr.NUMBER?r.decimals:Tt.decimals,legacyCSS:typeof r.legacyCSS===wr.BOOLEAN?r.legacyCSS:!!(t.length&&h.legacyCSS===t.length)||Tt.legacyCSS,spacesAfterCommas:typeof r.spacesAfterCommas===wr.BOOLEAN?r.spacesAfterCommas:!!(t.length&&h.spacesAfterCommas===t.length)||Tt.spacesAfterCommas,anglesUnit:r.anglesUnit&&u.includes(r.anglesUnit)?r.anglesUnit:new Set(i).size===1?i[0]:Tt.anglesUnit,rgbUnit:r.rgbUnit&&d.includes(r.rgbUnit)?r.rgbUnit:new Set(n).size===1&&n[0]?Oe.PERCENT:Tt.rgbUnit,labUnit:r.labUnit&&d.includes(r.labUnit)?r.labUnit:new Set(s).size===1&&s[0]?Oe.PERCENT:Tt.labUnit,lchUnit:r.lchUnit&&d.includes(r.lchUnit)?r.lchUnit:new Set(a).size===1&&a[0]?Oe.PERCENT:Tt.lchUnit,cmykUnit:r.cmykUnit&&d.includes(r.cmykUnit)?r.cmykUnit:new Set(o).size!==1||o[0]?Tt.cmykUnit:Oe.NONE,alphaUnit:r.alphaUnit&&d.includes(r.alphaUnit)?r.alphaUnit:new Set(l).size===1&&l[0]?Oe.PERCENT:Tt.alphaUnit,cmykFunction:r.cmykFunction&&c.includes(r.cmykFunction)?r.cmykFunction:o.length&&o.length===h.cmykFunction?Ar.CMYK:Tt.cmykFunction}},ea=(r,e)=>({H:$(r.H,e),S:$(r.S,e),L:$(r.L,e)}),cs=r=>r?", ":",",mi=(r,e)=>{const t=_u(Object.keys(r));return By[Gs[t]].reduce(((i,n,s)=>{const a=r[n];return a!==void 0&&i.push(e(a,s)),i}),[])},gi=(r,e)=>r.replace(qy,((t,i)=>`${e[+i-1]}`)),br=(r,e,t=!1)=>{const{alphaUnit:i,legacyCSS:n,decimals:s}=e;return i!==Oe.PERCENT||n&&!t?$(r,s):`${$(100*r,s)}%`},So=r=>{const{anglesUnit:e,decimals:t}=r;return(i,n)=>n===0&&e!==Ve.NONE?`${$(Au(i,e),t)}${e}`:n===3?br(i,r):$(i,t)},W={[j.HEX]:r=>{const e=mi(r,(i=>(n=>{let s=$(n,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]:(r,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:n,rgbUnit:s}=e,a=cs(n),o=mi(r,((u,d)=>s===Oe.PERCENT&&d<3?`${((c,h)=>$(c/Y*100,h))(u,t)}%`:d===3?br(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]:(r,e)=>{const{legacyCSS:t,spacesAfterCommas:i}=e,n=cs(i),s=So(e),a=mi(r,s),o=t?a.length===4?`hsla({1}${n}{2}%${n}{3}%${n}{4})`:`hsl({1}${n}{2}%${n}{3}%)`:a.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return gi(o,a)},[j.HWB]:(r,e)=>{const t=So(e),i=mi(r,t),n=i.length===4?"hwb({1} {2}% {3}% / {4})":"hwb({1} {2}% {3}%)";return gi(n,i)},[j.CIELab]:(r,e)=>{const{decimals:t,labUnit:i}=e,n=mi(r,((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/ni*100,u))(a,t)}%`:$(a,t):br(a,e,!0)})),s=n.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return gi(s,n)},[j.LCH]:(r,e)=>{const{decimals:t,lchUnit:i,anglesUnit:n}=e,s=mi(r,((o,l)=>{if(l===0){const u=$(it(o),t);return i===Oe.PERCENT?`${u}%`:`${u}`}return l===1?i===Oe.PERCENT?`${((u,d)=>$(u/Xi*100,d))(o,t)}%`:$(o,t):l===2?n!==Ve.NONE?`${$(Au(o,n),t)}${n}`:$(o,t):br(o,e,!0)})),a=s.length===4?"lch({1} {2} {3} / {4})":"lch({1} {2} {3})";return gi(a,s)},[j.CMYK]:(r,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:n,cmykUnit:s,cmykFunction:a}=e,o=cs(n),l=mi(r,((d,c)=>s===Oe.PERCENT&&c<4?`${$(d,t)}%`:c===4?br(d,e):$(d/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)}},dr=(r,e,t)=>e.reduce(((i,n)=>[...i,{...r,H:t===Ze.ADDITIVE?mt(r.H+n):mt(Co(Co(r.H,!1)+n,!0))}]),[{...r}]),Ly=(r,e)=>dr(r,[30,-30],e),Hy=(r,e)=>dr(r,[180],e),Ny=(r,e)=>dr(r,[150,-150],e),Vy=(r,e)=>dr(r,[120,-120],e),Uy=(r,e)=>dr(r,[60,-120,180],e),jy=(r,e)=>dr(r,[90,-90,180],e),N={[j.HEX]:r=>({R:sn(r.R),G:sn(r.G),B:sn(r.B)}),HEXA(r){const e=N.HEX(r);return e.A=be(r,"A")?sn(r.A*Y):"0xFF",e},[j.RGB](r,e){const t=Gy(r,e);return be(t,"A")&&delete t.A,t},RGBA(r,e){const t=N.RGB(r,e);return t.A=be(r,"A")?$(r.A):1,t},[j.HSL](r,e){const t=oi(r.R,r.G,r.B);return delete t.A,ea(t,e)},HSLA(r,e){const t=N.HSL(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.HWB](r,e){const t=Si(r.R,r.G,r.B);return delete t.A,((i,n)=>({H:$(i.H,n),W:$(i.W,n),B:$(i.B,n)}))(t,e)},HWBA(r,e){const t=N.HWB(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.CIELab]:(r,e)=>((t,i)=>({L:$(t.L,i),a:$(t.a,i),b:$(t.b,i)}))(li(r.R,r.G,r.B),e),CIELabA(r,e){const t=N.CIELab(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.LCH]:(r,e)=>((t,i)=>({L:$(t.L,i),C:$(t.C,i),H:$(t.H,i)}))(ui(r.R,r.G,r.B),e),LCHA(r,e){const t=N.LCH(r,e);return t.A=be(r,"A")?$(r.A,e):1,t},[j.CMYK]:(r,e)=>((t,i)=>({C:$(t.C,i),M:$(t.M,i),Y:$(t.Y,i),K:$(t.K,i)}))(Eu(r.R,r.G,r.B),e),CMYKA(r,e){const t=N.CMYK(r,e);return t.A=be(r,"A")?$(r.A,e):1,t}},an=(r,e,t,i)=>{const n=Le(r),s=typeof r=="string",a=Ue(r,n),o=typeof r=="string"&&be(a,"A")||typeof r!="string"&&be(r,"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),d=Array(e).fill(null).map(((c,h)=>({...l,L:l.L+u*(h+1)*(1-2*+t)})));switch(n){case j.HEX:default:return d.map((c=>{const h=pe(c.H,c.S,c.L);return o&&(h.A=c.A),s?o?W.HEX({...h,A:$(h.A*Y)}):W.HEX(h):o?N.HEXA(h):N.HEX(h)}));case j.RGB:return d.map((c=>{const h=pe(c.H,c.S,c.L);return o&&(h.A=c.A),s?W.RGB(h,i):o?N.RGBA(h,i.decimals):N.RGB(h,i.decimals)}));case j.HSL:return d.map((c=>s?W.HSL(c,i):o?N.HSLA({...pe(c.H,c.S,c.L),A:c.A},i.decimals):N.HSL(pe(c.H,c.S,c.L),i.decimals)));case j.HWB:return d.map((c=>{const h=pe(c.H,c.S,c.L);o&&(h.A=c.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 d.map((c=>{const h=pe(c.H,c.S,c.L);o&&(h.A=c.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 d.map((c=>{const h=pe(c.H,c.S,c.L),p=ui(h.R,h.G,h.B);return o&&(p.A=c.A),s?W.LCH(p,i):o?N.LCHA({...h,A:c.A},i.decimals):N.LCH(h,i.decimals)}))}},zi={buildHarmony(r,e,t,i){const n=Le(r),s=Ue(r,n),a=oi(s.R,s.G,s.B,s.A),o=typeof r=="string"&&be(s,"A")||typeof r!="string"&&be(r,"A"),l=typeof r=="string";switch(n){case j.HEX:default:return o?this.HEXA(ea(a,0),e,t,l):this.HEX(ea(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]:(r,e,t,i)=>e(r,t).map((n=>i?W.HEX(pe(n.H,n.S,n.L)):N.HEX(pe(n.H,n.S,n.L)))),HEXA:(r,e,t,i)=>e(r,t).map((n=>i?W.HEX({...pe(n.H,n.S,n.L),A:me(n.A)*Y}):N.HEXA({...pe(n.H,n.S,n.L),A:me(n.A)}))),[j.RGB]:(r,e,t,i,n)=>e(r,t).map((s=>i?W.RGB(pe(s.H,s.S,s.L),n):N.RGB(pe(s.H,s.S,s.L),n.decimals))),RGBA:(r,e,t,i,n)=>e(r,t).map((s=>i?W.RGB({...pe(s.H,s.S,s.L),A:me(s.A)},n):N.RGBA({...pe(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[j.HSL]:(r,e,t,i,n)=>e(r,t).map((s=>i?W.HSL({H:s.H,S:s.S,L:s.L},n):N.HSL(pe(s.H,s.S,s.L),n.decimals))),HSLA:(r,e,t,i,n)=>e(r,t).map((s=>i?W.HSL({...s,A:me(s.A)},n):N.HSLA({...pe(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[j.HWB]:(r,e,t,i,n)=>e(r,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},n):N.HWB(a,n.decimals)})),HWBA:(r,e,t,i,n)=>e(r,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)},n):N.HWBA({...a,A:me(s.A)},n.decimals)})),[j.CIELab]:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.CIELab(li(a.R,a.G,a.B),n):N.CIELab(a,n.decimals)})),CIELabA:(r,e,t,i,n)=>e(r,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)},n):N.CIELabA({...a,A:me(s.A)},n.decimals)})),[j.LCH]:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.LCH(ui(a.R,a.G,a.B),n):N.LCH(a,n.decimals)})),LCHA:(r,e,t,i,n)=>e(r,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)},n):N.LCHA({...a,A:me(s.A)},n.decimals)}))},Wi={mix(r,e){const t=r.map((a=>{const o=Le(a);return Ue(a,o)})),i=e===Ze.SUBTRACTIVE?t.map((a=>{const o=((l,u,d)=>{const c=Math.min(l,u,d),h=Math.min(Y-l,Y-u,Y-d),p=l-c,m=u-c,g=d-c,y=Math.min(p,m),w=p-y,x=(m+y)/2,b=(g+m-y)/2,S=Math.max(w,x,b)/Math.max(p,m,g),q=isNaN(S)||S===1/0||S<=0?1:S;return{R:w/q+h,Y:x/q+h,B:b/q+h}})(a.R,a.G,a.B);return be(a,"A")&&(o.A=a.A),o})):null;function n(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 d=be(u,"A")?u.A:1,c={R:Math.min(l.R+u.R*d,Y),B:Math.min(l.B+u.B*d,Y),A:1-(1-d)*(1-l.A)},h="G"in l?l.G:l.Y,p="G"in u?u.G:u.Y;return{...c,...e===Ze.ADDITIVE?{G:Math.min(h+p*d,Y)}:{Y:Math.min(h+p*d,Y)}}}),o)}let s;if(e===Ze.ADDITIVE)s=n(t);else{const a=n(i);s=((o,l,u)=>{const d=Math.min(o,l,u),c=Math.min(Y-o,Y-l,Y-u),h=o-d,p=l-d,m=u-d,g=Math.min(p,m),y=h+p-g,w=p+g,x=2*(m-g),b=Math.max(y,w,x)/Math.max(h,p,m),S=isNaN(b)||b===1/0||b<=0?1:b;return{R:y/S+c,G:w/S+c,B:x/S+c}})(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](r,e,t){const i=this.mix(r,e);return delete i.A,t?W.HEX(i):N.HEX(i)},HEXA(r,e,t){const i=this.mix(r,e);return i.A=t?me(i.A)*Y:me(i.A),t?W.HEX(i):N.HEXA(i)},[j.RGB](r,e,t,i){const n=this.mix(r,e);return delete n.A,t?W.RGB(n,i):N.RGB(n,i.decimals)},RGBA(r,e,t,i){const n=this.mix(r,e);return t?W.RGB(n,i):N.RGBA(n,i.decimals)},[j.HSL](r,e,t,i){const n=this.mix(r,e),s=oi(n.R,n.G,n.B);return delete n.A,delete s.A,t?W.HSL(s,i):N.HSL(n,i.decimals)},HSLA(r,e,t,i){const n=this.mix(r,e),s=oi(n.R,n.G,n.B,n.A);return t?W.HSL(s,i):N.HSLA(n,i.decimals)},[j.HWB](r,e,t,i){const n=this.mix(r,e),s=Si(n.R,n.G,n.B);return delete n.A,delete s.A,t?W.HWB(s,i):N.HWB(n,i.decimals)},HWBA(r,e,t,i){const n=this.mix(r,e),s=Si(n.R,n.G,n.B,n.A);return t?W.HWB(s,i):N.HWBA(n,i.decimals)},[j.CIELab](r,e,t,i){const n=this.mix(r,e),s=li(n.R,n.G,n.B);return delete n.A,t?W.CIELab(s,i):N.CIELab(n,i.decimals)},CIELabA(r,e,t,i){const n=this.mix(r,e),s=li(n.R,n.G,n.B);return be(n,"A")&&(s.A=n.A),t?W.CIELab(s,i):N.CIELabA(n,i.decimals)},[j.LCH](r,e,t,i){const n=this.mix(r,e),s=ui(n.R,n.G,n.B);return delete n.A,t?W.LCH(s,i):N.LCH(n,i.decimals)},LCHA(r,e,t,i){const n=this.mix(r,e),s=ui(n.R,n.G,n.B);return be(n,"A")&&(s.A=n.A),t?W.LCH(s,i):N.LCHA(n,i.decimals)}},Gy=(r,e)=>({R:$(r.R,e),G:$(r.G,e),B:$(r.B,e),...be(r,"A")?{A:$(r.A,e)}:{}}),Qe=(r,e,t,i)=>i(Ue(r,e),t),$n=(r,e,t,i,n)=>(t<1&&(t=5),((a,o,l)=>{const u=l-1,d=(o.R-a.R)/u,c=(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+d*y),G:$(a.G+c*y),B:$(a.B+h*y),A:$(p+m*y)}))})(Ue(r),Ue(e),t).map((a=>n(a,i))));function Be(r){const{from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:s,cssFunction:a}=r,o=typeof i=="number"?$n(e,t,i,n?.decimals,s):$n(e,t,5,i?.decimals,s);return a?o.map((l=>a(l,xe((typeof i=="number"?n:i)??{},e,t)))):o}function qe(r){const{colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:n,css:s}=r,a=xe((typeof t=="string"?i:t)??{},...e);return n(e,typeof t=="string"?t:Ze.ADDITIVE,s,a)}const hs=(r,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)})[r],ke=Object.fromEntries(Object.entries(Wi).map((r=>{const[e,t]=r;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=Eu(this.rgb.R,this.rgb.G,this.rgb.B)}updateRGBFromHWB(){this.rgb={...Dn(this.hwb.H,this.hwb.W,this.hwb.B),A:this.rgb.A}}updateRGBFromLCH(){this.rgb={...Rn(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={...Mr(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateLCHFromLAB(){this.lch={...qu(this.lab.L,this.lab.a,this.lab.b),A:this.lab.A}}updateLABromLCH(){this.lab={...ku(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,Y),this.update("rgb")}setG(e){return this.rgb.G=se(e,0,Y),this.update("rgb"),this}setB(e){return this.rgb.B=se(e,0,Y),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,ni),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEb(e){return this.lab.b=se(e,-125,ni),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,Xi),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*Y})}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),n=xe(t,e);return W.RGB(i,n)}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),n=xe(t,e);return W.RGB(i,n)}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),n=xe(t,e);return W.HSL(i,n)}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),n=xe(t,e);return W.HSL(i,n)}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),n=xe(t,e);return W.HWB(i,n)}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),n=xe(t,e);return W.HWB(i,n)}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),n=xe(t,e);return W.CIELab(i,n)}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),n=xe(t,e);return W.CIELab(i,n)}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),n=xe(t,e);return W.LCH(i,n)}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),n=xe(t,e);return W.LCH(i,n)}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),n=xe(t,e);return W.CMYK(i,n)}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),n=xe(t,e);return W.CMYK(i,n)}static getBlendHEXObject(e,t,i=5){return $n(e,t,i,0,N.HEX)}static getBlendHEX(e,t,i=5){return Ae.getBlendHEXObject(e,t,i).map((n=>W.HEX(n)))}static getBlendHEXAObject(e,t,i=5){return $n(e,t,i,0,N.HEXA)}static getBlendHEXA(e,t,i=5){return Ae.getBlendHEXAObject(e,t,i).map((n=>W.HEX(n)))}static getBlendRGBObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGB})}static getBlendRGB(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGB,cssFunction:W.RGB})}static getBlendRGBAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGBA})}static getBlendRGBA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.RGBA,cssFunction:W.RGB})}static getBlendHSLObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSL})}static getBlendHSL(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSL,cssFunction:W.HSL})}static getBlendHSLAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSLA})}static getBlendHSLA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HSLA,cssFunction:W.HSL})}static getBlendHWBObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWB})}static getBlendHWB(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWB,cssFunction:W.HWB})}static getBlendHWBAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWBA})}static getBlendHWBA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.HWBA,cssFunction:W.HWB})}static getBlendCIELabObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELab})}static getBlendCIELab(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELab,cssFunction:W.CIELab})}static getBlendCIELabAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELabA})}static getBlendCIELabA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.CIELabA,cssFunction:W.CIELab})}static getBlendLCHObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.LCH})}static getBlendLCH(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.LCH,cssFunction:W.LCH})}static getBlendLCHAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:N.LCHA})}static getBlendLCHA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,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"?an(e,t,!0,xe(i||{},e)):an(e,5,!0,xe(t||{},e))}static getTints(e,t,i){return typeof t=="number"?an(e,t,!1,xe(i||{},e)):an(e,5,!1,xe(t||{},e))}static getHarmony(e,t,i,n){return`${t}`in Mt?hs(t,e,us(i)?i:Ze.ADDITIVE,xe(us(i)?n||{}:i||{},e)):us(t)?hs(Mt.COMPLEMENTARY,e,t,xe(i||{},e)):hs(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"],Yy=["data-disabled"];function Xy(r){const e=r.S*(r.L<50?r.L:100-r.L),t=r.L+e/100;return{h:r.H,s:r.L===0?r.S:2*e/t,v:t}}function Ao(r){const e=(200-r.s)*r.v/100;return{H:r.h,S:e===0||e===200?0:Math.round(r.s*r.v/(e<=100?e:200-e)),L:e/2}}const Jy={__name:"UColorPicker",props:qn({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(r){const e=r,t=la(r,"modelValue",{type:String}),i=Te(),n=k(()=>ce({extend:ce(Wy),...i.ui?.colorPicker||{}})({size:e.size})),s=k({get(){try{const M=new Ae(t.value||e.defaultValue);return Xy(M.HSLObject)}catch{return{h:0,s:0,v:100}}},set(M){const B=new Ae(Ao(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=yo(M),te=yo(B);function re(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 My&&(xr(B,"pointerdown",re),xr(window,"pointermove",K),xr(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),d=O(null),c=O(null),h=O(null),p=k(()=>e.disabled),{position:m}=a(d,u,"both",{x:s.value.s,y:l(s.value.v)},p),{position:g}=a(h,c,"y",{x:0,y:o(s.value.h,"right")},p),{pause:y,resume:w}=Ld(s,M=>{m.value={x:M.s,y:l(M.v)},g.value={x:0,y:o(M.h,"right")}});Hd([m,g],()=>{y(),s.value={h:o(g.value.y),s:m.value.x,v:l(m.value.y)},Xe(w)},{throttle:()=>e.throttle});const x=k(()=>new Ae(Ao({h:o(g.value.y),s:100,v:100})).HEX),b=k(()=>({backgroundColor:x.value})),S=k(()=>({backgroundColor:new Ae(t.value||e.defaultValue).HEX,left:`${m.value.x}%`,top:`${m.value.y}%`})),q=k(()=>({backgroundColor:x.value,top:`${g.value.y}%`}));return(M,B)=>(v(),C(f(ne),{as:r.as,class:T(n.value.root({class:[e.ui?.root,e.class]})),"data-disabled":p.value?!0:void 0},{default:_(()=>[I("div",{class:T(n.value.picker({class:e.ui?.picker}))},[I("div",{ref_key:"selectorRef",ref:u,class:T(n.value.selector({class:e.ui?.selector})),style:qt(b.value)},[I("div",{class:T(n.value.selectorBackground({class:e.ui?.selectorBackground})),"data-color-picker-background":""},[I("div",{ref_key:"selectorThumbRef",ref:d,class:T(n.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:c,class:T(n.value.track({class:e.ui?.track})),"data-color-picker-track":""},[I("div",{ref_key:"trackThumbRef",ref:h,class:T(n.value.trackThumb({class:e.ui?.trackThumb})),style:qt(q.value),"data-disabled":p.value?!0:void 0},null,14,Yy)],2)],2)]),_:1},8,["as","class","data-disabled"]))}},Zy=fl(Jy,[["__scopeId","data-v-dd207296"]]),xt={Root:Zl,Trigger:Ql,Portal:Yp,Content:$p,Arrow:Xl,Item:Vp,Group:Hp,Separator:tm,CheckboxItem:Ip,ItemIndicator:jp,Label:Wp,RadioGroup:Jp,RadioItem:Qp,Sub:rm,SubContent:sm,SubTrigger:om},Qy={Root:fm,Trigger:_m,Portal:xm,Content:vm,Arrow:dm},ev={Root:mp,Trigger:Op,Portal:Ep,Content:qp,Arrow:bp,Close:wp,Anchor:yp},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(r,{emit:e}){const t=r,i=e,n=Ge(),s=Te(),a=t.mode==="hover"?Ft(t,"defaultOpen","open","openDelay","closeDelay"):Ft(t,"defaultOpen","open","modal"),o=Ce(a,i),l=ar(je(()=>t.portal)),u=je(()=>Br(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),d=k(()=>t.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((g,y)=>(g[y]=w=>{w.preventDefault(),i("close:prevent")},g),{})),c=je(()=>t.arrow),h=k(()=>ce({extend:ce(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})=>[n.default||r.reference?(v(),C(f(p).Trigger,{key:0,"as-child":"",reference:r.reference,class:T(t.class)},{default:_(()=>[A(m.$slots,"default",{open:y})]),_:2},1032,["reference","class"])):R("",!0),"Anchor"in p.value&&n.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:[!n.default&&t.class,t.ui?.content]})},zr(d.value)),{default:_(()=>[A(m.$slots,"content"),r.arrow?(v(),C(f(p).Arrow,H({key:0},c.value,{class:h.value.arrow({class:t.ui?.arrow})}),null,16,["class"])):R("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16))}},rv=z({__name:"EditableColor",props:{modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=O(t.modelValue),s=()=>{i("update:modelValue",n.value)};return(a,o)=>{const l=lt,u=Zy,d=iv;return v(),C(d,{onBlur:s},{content:_(()=>[F(u,{modelValue:n.value,"onUpdate:modelValue":[o[0]||(o[0]=c=>n.value=c),s],class:"p-2"},null,8,["modelValue"])]),default:_(()=>[F(l,{label:n.value,color:"neutral",size:"xs",variant:"soft"},{leading:_(()=>[I("span",{style:qt({backgroundColor:n.value}),class:"size-3 rounded-full"},null,4)]),_:1},8,["label"])]),_:1})}}}),nv=Object.assign(rv,{__name:"EditableColor"}),Ou={__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(r,{emit:e}){const t=r,i=e,n=Ge(),{dir:s}=Tr(),a=Te(),o=ar(je(()=>t.portal)),l=Ce(Nd(t,"sub","items","portal","labelKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),u=ml(n,["default"]),[d,c]=Mn(),h=k(()=>s.value==="rtl"?a.ui.icons.chevronLeft:a.ui.icons.chevronRight),p=k(()=>t.items?.length?Vd(t.items)?t.items:[t.items]:[]);return(m,g)=>(v(),V(we,null,[F(f(d),null,{default:_(({item:y,active:w,index:x})=>[A(m.$slots,y.slot||"item",{item:y,index:x},()=>[A(m.$slots,y.slot?`${y.slot}-leading`:"item-leading",{item:y,active:w,index:x},()=>[y.loading?(v(),C(Pe,{key:0,name:r.loadingIcon||f(a).ui.icons.loading,class:T(r.ui.itemLeadingIcon({class:[r.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(r.ui.itemLeadingIcon({class:[r.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,active:w}))},null,8,["name","class"])):y.avatar?(v(),C(or,H({key:2,size:y.ui?.itemLeadingAvatarSize||r.uiOverride?.itemLeadingAvatarSize||r.ui.itemLeadingAvatarSize()},y.avatar,{class:r.ui.itemLeadingAvatar({class:[r.uiOverride?.itemLeadingAvatar,y.ui?.itemLeadingAvatar],active:w})}),null,16,["size","class"])):R("",!0)]),f(xi)(y,t.labelKey)||n[y.slot?`${y.slot}-label`:"item-label"]?(v(),V("span",{key:0,class:T(r.ui.itemLabel({class:[r.uiOverride?.itemLabel,y.ui?.itemLabel],active:w}))},[A(m.$slots,y.slot?`${y.slot}-label`:"item-label",{item:y,active:w,index:x},()=>[de(Z(f(xi)(y,t.labelKey)),1)]),y.target==="_blank"&&r.externalIcon!==!1?(v(),C(Pe,{key:0,name:typeof r.externalIcon=="string"?r.externalIcon:f(a).ui.icons.external,class:T(r.ui.itemLabelExternalIcon({class:[r.uiOverride?.itemLabelExternalIcon,y.ui?.itemLabelExternalIcon],color:y?.color,active:w}))},null,8,["name","class"])):R("",!0)],2)):R("",!0),I("span",{class:T(r.ui.itemTrailing({class:[r.uiOverride?.itemTrailing,y.ui?.itemTrailing]}))},[A(m.$slots,y.slot?`${y.slot}-trailing`:"item-trailing",{item:y,active:w,index:x},()=>[y.children?.length?(v(),C(Pe,{key:0,name:h.value,class:T(r.ui.itemTrailingIcon({class:[r.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color,active:w}))},null,8,["name","class"])):y.kbds?.length?(v(),V("span",{key:1,class:T(r.ui.itemTrailingKbds({class:[r.uiOverride?.itemTrailingKbds,y.ui?.itemTrailingKbds]}))},[(v(!0),V(we,null,Ye(y.kbds,(b,S)=>(v(),C(du,H({key:S,size:y.ui?.itemTrailingKbdsSize||r.uiOverride?.itemTrailingKbdsSize||r.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof b=="string"?{value:b}:b),null,16,["size"]))),128))],2)):R("",!0)]),F(f(xt).ItemIndicator,{"as-child":""},{default:_(()=>[F(Pe,{name:r.checkedIcon||f(a).ui.icons.check,class:T(r.ui.itemTrailingIcon({class:[r.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(sr(r.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(r.ui.viewport({class:r.uiOverride?.viewport}))},[(v(!0),V(we,null,Ye(p.value,(y,w)=>(v(),C(f(xt).Group,{key:`group-${w}`,class:T(r.ui.group({class:r.uiOverride?.group}))},{default:_(()=>[(v(!0),V(we,null,Ye(y,(x,b)=>(v(),V(we,{key:`group-${w}-${b}`},[x.type==="label"?(v(),C(f(xt).Label,{key:0,class:T(r.ui.label({class:[r.uiOverride?.label,x.ui?.label,x.class]}))},{default:_(()=>[F(f(c),{item:x,index:b},null,8,["item","index"])]),_:2},1032,["class"])):x.type==="separator"?(v(),C(f(xt).Separator,{key:1,class:T(r.ui.separator({class:[r.uiOverride?.separator,x.ui?.separator,x.class]}))},null,8,["class"])):x?.children?.length?(v(),C(f(xt).Sub,{key:2,open:x.open,"default-open":x.defaultOpen},{default:_(()=>[F(f(xt).SubTrigger,{as:"button",type:"button",disabled:x.disabled,"text-value":f(xi)(x,t.labelKey),class:T(r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color}))},{default:_(()=>[F(f(c),{item:x,index:b},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),F(Ou,H({sub:"",class:t.class,ui:r.ui,"ui-override":r.uiOverride,portal:r.portal,items:x.children,align:"start","align-offset":-4,"side-offset":3,"label-key":r.labelKey,"checked-icon":r.checkedIcon,"loading-icon":r.loadingIcon,"external-icon":r.externalIcon},{ref_for:!0},x.content),gl({_:2},[Ye(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"])):x.type==="checkbox"?(v(),C(f(xt).CheckboxItem,{key:3,"model-value":x.checked,disabled:x.disabled,"text-value":f(xi)(x,t.labelKey),class:T(r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color})),"onUpdate:modelValue":x.onUpdateChecked,onSelect:x.onSelect},{default:_(()=>[F(f(c),{item:x,index:b},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:x.disabled,"text-value":f(xi)(x,t.labelKey),onSelect:x.onSelect},{default:_(()=>[F(hl,H({ref_for:!0},f(Ud)(x),{custom:""}),{default:_(({active:S,...q})=>[F(jd,H({ref_for:!0},q,{class:r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color,active:S})}),{default:_(()=>[F(f(c),{item:x,active:S,index:b},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"}},zu={__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(r,{emit:e}){const t=r,i=e,n=Ge(),s=Te(),a=Ce(Ft(t,"defaultOpen","open","modal"),i),o=je(()=>Br(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),l=je(()=>t.arrow),u=ml(n,["default"]),d=k(()=>ce({extend:ce(sv),...s.ui?.dropdownMenu||{}})({size:t.size}));return(c,h)=>(v(),C(f(Zl),oe(le(f(a))),{default:_(({open:p})=>[n.default?(v(),C(f(Ql),{key:0,"as-child":"",class:T(t.class),disabled:r.disabled},{default:_(()=>[A(c.$slots,"default",{open:p})]),_:2},1032,["class","disabled"])):R("",!0),F(Ou,H({class:d.value.content({class:[!n.default&&t.class,t.ui?.content]}),ui:d.value,"ui-override":t.ui},o.value,{items:r.items,portal:r.portal,"label-key":r.labelKey,"checked-icon":r.checkedIcon,"loading-icon":r.loadingIcon,"external-icon":r.externalIcon}),gl({default:_(()=>[r.arrow?(v(),C(f(Xl),H({key:0},l.value,{class:d.value.arrow({class:t.ui?.arrow})}),null,16,["class"])):R("",!0)]),_:2},[Ye(f(u),(m,g)=>({name:g,fn:_(y=>[A(c.$slots,g,oe(le(y)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}},Mo=async r=>{try{await navigator.clipboard.writeText(r)}catch(e){console.error("Failed to copy path:",e)}},Tu=async r=>{try{const e=`:${r.path.replace(/\./g,"-")}="${JSON.stringify(r.value)}"`;await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy prop:",e)}},av=async r=>{try{const e=r.children?.map(i=>i.value)||[],t=`:${r.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)}},Iu=async r=>{try{const e=JSON.stringify(r);await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy value:",e)}},Pu=async r=>{try{if(!r.children||r.children.length<3)return;await navigator.clipboard.writeText(`new Vector3(${r.children[0].value}, ${r.children[1].value}, ${r.children[2].value})`)}catch(e){console.error("Failed to copy prop as Vector3:",e)}},ov=async r=>{try{const t=`[${(r.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 r=>{try{let e={};r.children&&r.children.length>0&&(e=r.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)}},Ru=async r=>{try{const e=r.children?.find(u=>u.label==="x"),t=r.children?.find(u=>u.label==="y"),i=r.children?.find(u=>u.label==="z"),n=r.children?.find(u=>u.label==="order"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=n?.value||"XYZ";await navigator.clipboard.writeText(`new Euler(${s}, ${a}, ${o}, '${l}')`)}catch(e){console.error("Failed to copy value as Euler:",e)}},Du=async r=>{try{const e=r.children?.find(u=>u.label==="x"),t=r.children?.find(u=>u.label==="y"),i=r.children?.find(u=>u.label==="z"),n=r.children?.find(u=>u.label==="w"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=n?.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(r){let e=0,t=r;return r.scene&&(t=r.scene),t.traverse(i=>{if(i.isMesh&&i.geometry){const n=i.geometry,s=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,a=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,l=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,u=s+a+o+l;e+=u}}),e}function dv(r){return(r/1024).toFixed(2)}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/const $u="180",ta=0,dv=1,hv=2,Bo=1,qo=100,ko=204,Eo=205,Fo=3,fv=0,Lu=300,Oo=1e3,on=1001,zo=1002,pv=1006,mv=1008,gv=1009,yv=1015,vv=1023,Hu="",At="srgb",To="srgb-linear",Io="linear",fs="srgb",Ti=7680,Po=519,Ro=35044,ln=2e3,Do=2001;class Zn{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 n=i[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.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 n=i.slice(0);for(let s=0,a=n.length;s<a;s++)n[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 Lr(){const r=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(We[r&255]+We[r>>8&255]+We[r>>16&255]+We[r>>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(r,e,t){return Math.max(e,Math.min(t,r))}function bv(r,e){return(r%e+e)%e}function ps(r,e,t){return(1-t)*r+t*e}function pr(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function et(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*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,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[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),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*i-a*n+e.x,this.y=s*n+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 Hr{constructor(e=0,t=0,i=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=n}static slerpFlat(e,t,i,n,s,a,o){let l=i[n+0],u=i[n+1],c=i[n+2],d=i[n+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 w=l*h+u*p+c*m+d*g,x=w>=0?1:-1,b=1-w*w;if(b>Number.EPSILON){const q=Math.sqrt(b),M=Math.atan2(q,w*x);y=Math.sin(y*M)/q,o=Math.sin(o*M)/q}const S=o*x;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,n,s,a){const o=i[n],l=i[n+1],u=i[n+2],c=i[n+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,n){return this._x=e,this._y=t,this._z=i,this._w=n,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,n=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,u=o(i/2),c=o(n/2),d=o(s/2),h=l(i/2),p=l(n/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,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=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-n)*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=(n+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=(n+a)/p,this._y=.25*p,this._z=(l+c)/p}else{const p=2*Math.sqrt(1+d-i-o);this._w=(a-n)/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 n=Math.min(1,t/i);return this.slerp(e,n),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,n=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+n*u-s*l,this._y=n*c+a*l+s*o-i*u,this._z=s*c+a*u+i*l-n*o,this._w=a*c-i*o-n*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,n=this._y,s=this._z,a=this._w;let o=a*e._w+i*e._x+n*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=n,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*n+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=n*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(),n=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(n*Math.sin(e),n*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($o.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion($o.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*n,this.y=s[1]*t+s[4]*i+s[7]*n,this.z=s[2]*t+s[5]*i+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*i+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*i+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,s=e.x,a=e.y,o=e.z,l=e.w,u=2*(a*n-o*i),c=2*(o*t-s*n),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=n+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,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*n,this.y=s[1]*t+s[5]*i+s[9]*n,this.z=s[2]*t+s[6]*i+s[10]*n,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,n=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-s*o,this.y=s*a-i*l,this.z=i*o-n*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 ms.copy(this).projectOnVector(e),this.sub(ms)}reflect(e){return this.sub(ms.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,n=this.z-e.z;return t*t+i*i+n*n}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 n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*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(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,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 ms=new P,$o=new Hr;class di{constructor(e,t,i,n,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,n,s,a,o,l,u)}set(e,t,i,n,s,a,o,l,u){const c=this.elements;return c[0]=e,c[1]=n,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,n=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=n[0],y=n[3],w=n[6],x=n[1],b=n[4],S=n[7],q=n[2],M=n[5],B=n[8];return s[0]=a*g+o*x+l*q,s[3]=a*y+o*b+l*M,s[6]=a*w+o*S+l*B,s[1]=u*g+c*x+d*q,s[4]=u*y+c*b+d*M,s[7]=u*w+c*S+d*B,s[2]=h*g+p*x+m*q,s[5]=h*y+p*b+m*M,s[8]=h*w+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],n=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+n*s*u-n*a*l}invert(){const e=this.elements,t=e[0],i=e[1],n=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+n*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]=(n*u-c*i)*g,e[2]=(o*i-n*a)*g,e[3]=h*g,e[4]=(c*t-n*l)*g,e[5]=(n*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,n,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,-n*u,n*l,-n*(-u*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(gs.makeScale(e,t)),this}rotate(e){return this.premultiply(gs.makeRotation(-e)),this}translate(e,t){return this.premultiply(gs.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 n=0;n<9;n++)if(t[n]!==i[n])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 gs=new di;function xv(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function Lo(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}const Ho={};function No(r){r in Ho||(Ho[r]=!0,console.warn(r))}const Vo=new di().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Uo=new di().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function wv(){const r={enabled:!0,workingColorSpace:To,spaces:{},convert:function(n,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===fs&&(n.r=Wt(n.r),n.g=Wt(n.g),n.b=Wt(n.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(n.applyMatrix3(this.spaces[s].toXYZ),n.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===fs&&(n.r=Zi(n.r),n.g=Zi(n.g),n.b=Zi(n.b))),n},workingToColorSpace:function(n,s){return this.convert(n,this.workingColorSpace,s)},colorSpaceToWorking:function(n,s){return this.convert(n,s,this.workingColorSpace)},getPrimaries:function(n){return this.spaces[n].primaries},getTransfer:function(n){return n===Hu?Io:this.spaces[n].transfer},getToneMappingMode:function(n){return this.spaces[n].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(n,s=this.workingColorSpace){return n.fromArray(this.spaces[s].luminanceCoefficients)},define:function(n){Object.assign(this.spaces,n)},_getMatrix:function(n,s,a){return n.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(n){return this.spaces[n].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(n=this.workingColorSpace){return this.spaces[n].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(n,s){return No("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),r.workingToColorSpace(n,s)},toWorkingColorSpace:function(n,s){return No("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),r.colorSpaceToWorking(n,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return r.define({[To]:{primaries:e,whitePoint:i,transfer:Io,toXYZ:Vo,fromXYZ:Uo,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:At},outputColorSpaceConfig:{drawingBufferColorSpace:At}},[At]:{primaries:e,whitePoint:i,transfer:fs,toXYZ:Vo,fromXYZ:Uo,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:At}}}),r}const wt=wv();function Wt(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function Zi(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.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=Lo("canvas")),Ii.width=e.width,Ii.height=e.height;const n=Ii.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.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=Lo("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a<s.length;a++)s[a]=Wt(s[a]/255)*255;return i.putImageData(n,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=Lr(),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:""},n=this.data;if(n!==null){let s;if(Array.isArray(n)){s=[];for(let a=0,o=n.length;a<o;a++)n[a].isDataTexture?s.push(ys(n[a].image)):s.push(ys(n[a]))}else s=ys(n);i.url=s}return t||(e.images[this.uuid]=i),i}}function ys(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?_v.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Av=0;const vs=new P;class _i extends Zn{constructor(e=_i.DEFAULT_IMAGE,t=_i.DEFAULT_MAPPING,i=on,n=on,s=pv,a=mv,o=vv,l=gv,u=_i.DEFAULT_ANISOTROPY,c=Hu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Av++}),this.uuid=Lr(),this.name="",this.source=new Sv(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=n,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(vs).x}get height(){return this.source.getSize(vs).y}get depth(){return this.source.getSize(vs).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 n=this[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}n&&i&&n.isVector2&&i.isVector2||n&&i&&n.isVector3&&i.isVector3||n&&i&&n.isMatrix3&&i.isMatrix3?n.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!==Lu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Oo:e.x=e.x-Math.floor(e.x);break;case on:e.x=e.x<0?0:1;break;case zo: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 Oo:e.y=e.y-Math.floor(e.y);break;case on:e.y=e.y<0?0:1;break;case zo: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=Lu;_i.DEFAULT_ANISOTROPY=1;class Nr{constructor(e=0,t=0,i=0,n=1){Nr.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}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,n){return this.x=e,this.y=t,this.z=i,this.w=n,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,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*i+a[11]*n+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,n,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],w=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+w-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(u+1)/2,S=(p+1)/2,q=(w+1)/2,M=(c+h)/4,B=(d+g)/4,L=(m+y)/4;return b>S&&b>q?b<.01?(i=0,n=.707106781,s=.707106781):(i=Math.sqrt(b),n=M/i,s=B/i):S>q?S<.01?(i=.707106781,n=0,s=.707106781):(n=Math.sqrt(S),i=M/n,s=L/n):q<.01?(i=.707106781,n=.707106781,s=0):(s=Math.sqrt(q),i=B/s,n=L/s),this.set(i,n,s,t),this}let x=Math.sqrt((y-m)*(y-m)+(d-g)*(d-g)+(h-c)*(h-c));return Math.abs(x)<.001&&(x=1),this.x=(y-m)/x,this.y=(d-g)/x,this.z=(h-c)/x,this.w=Math.acos((u+p+w-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 Vr{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(),un.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),un.copy(i.boundingBox)),un.applyMatrix4(e.matrixWorld),this.union(un)}const n=e.children;for(let s=0,a=n.length;s<a;s++)this.expandByObject(n[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(mr),cn.subVectors(this.max,mr),Pi.subVectors(e.a,mr),Ri.subVectors(e.b,mr),Di.subVectors(e.c,mr),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!bs(t,Pi,Ri,Di,cn)||(t=[1,0,0,0,1,0,0,0,1],!bs(t,Pi,Ri,Di,cn))?!1:(dn.crossVectors(Jt,Zt),t=[dn.x,dn.y,dn.z],bs(t,Pi,Ri,Di,cn))}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,un=new Vr,Pi=new P,Ri=new P,Di=new P,Jt=new P,Zt=new P,yi=new P,mr=new P,cn=new P,dn=new P,vi=new P;function bs(r,e,t,i,n){for(let s=0,a=r.length-3;s<=a;s+=3){vi.fromArray(r,s);const o=n.x*Math.abs(vi.x)+n.y*Math.abs(vi.y)+n.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 Vr,gr=new P,xs=new P;class Nu{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 n=0;for(let s=0,a=e.length;s<a;s++)n=Math.max(n,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(n),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;gr.subVectors(e,this.center);const t=gr.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),n=(i-this.radius)*.5;this.center.addScaledVector(gr,n/i),this.radius+=n}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):(xs.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(gr.copy(e.center).add(xs)),this.expandByPoint(gr.copy(e.center).sub(xs))),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,ws=new P,hn=new P,Qt=new P,_s=new P,fn=new P,Cs=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,n){ws.copy(e).add(t).multiplyScalar(.5),hn.copy(t).sub(e).normalize(),Qt.copy(this.origin).sub(ws);const s=e.distanceTo(t)*.5,a=-this.direction.dot(hn),o=Qt.dot(this.direction),l=-Qt.dot(hn),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),n&&n.copy(ws).addScaledVector(hn,h),p}intersectSphere(e,t){Vt.subVectors(e.center,this.origin);const i=Vt.dot(this.direction),n=Vt.dot(Vt)-i*i,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),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,n,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,n=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,n=(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>n||((s>i||isNaN(i))&&(i=s),(a<n||isNaN(n))&&(n=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>n)||((o>i||i!==i)&&(i=o),(l<n||n!==n)&&(n=l),n<0)?null:this.at(i>=0?i:n,t)}intersectsBox(e){return this.intersectBox(e,Vt)!==null}intersectTriangle(e,t,i,n,s){_s.subVectors(t,e),fn.subVectors(i,e),Cs.crossVectors(_s,fn);let a=this.direction.dot(Cs),o;if(a>0){if(n)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(fn.crossVectors(Qt,fn));if(l<0)return null;const u=o*this.direction.dot(_s.cross(Qt));if(u<0||l+u>a)return null;const c=-o*Qt.dot(Cs);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,n,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,n,s,a,o,l,u,c,d,h,p,m,g,y)}set(e,t,i,n,s,a,o,l,u,c,d,h,p,m,g,y){const w=this.elements;return w[0]=e,w[4]=t,w[8]=i,w[12]=n,w[1]=s,w[5]=a,w[9]=o,w[13]=l,w[2]=u,w[6]=c,w[10]=d,w[14]=h,w[3]=p,w[7]=m,w[11]=g,w[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,n=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]*n,t[1]=i[1]*n,t[2]=i[2]*n,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,n=e.y,s=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),u=Math.sin(n),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 n=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(),pn.crossVectors(st,ei),n[0]=ei.x,n[4]=pn.x,n[8]=st.x,n[1]=ei.y,n[5]=pn.y,n[9]=st.y,n[2]=ei.z,n[6]=pn.z,n[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,n=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],w=i[14],x=i[3],b=i[7],S=i[11],q=i[15],M=n[0],B=n[4],L=n[8],E=n[12],D=n[1],U=n[5],G=n[9],ee=n[13],te=n[2],re=n[6],K=n[10],Q=n[14],J=n[3],he=n[7],ae=n[11],ye=n[15];return s[0]=a*M+o*D+l*te+u*J,s[4]=a*B+o*U+l*re+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*re+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+w*J,s[6]=m*B+g*U+y*re+w*he,s[10]=m*L+g*G+y*K+w*ae,s[14]=m*E+g*ee+y*Q+w*ye,s[3]=x*M+b*D+S*te+q*J,s[7]=x*B+b*U+S*re+q*he,s[11]=x*L+b*G+S*K+q*ae,s[15]=x*E+b*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],n=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],w=e[15];return m*(+s*l*d-n*u*d-s*o*h+i*u*h+n*o*p-i*l*p)+g*(+t*l*p-t*u*h+s*a*h-n*a*p+n*u*c-s*l*c)+y*(+t*u*d-t*o*p-s*a*d+i*a*p+s*o*c-i*u*c)+w*(-n*o*c-t*l*d+t*o*h+n*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 n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],n=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],w=e[15],x=d*y*u-g*h*u+g*l*p-o*y*p-d*l*w+o*h*w,b=m*h*u-c*y*u-m*l*p+a*y*p+c*l*w-a*h*w,S=c*g*u-m*d*u+m*o*p-a*g*p-c*o*w+a*d*w,q=m*d*l-c*g*l-m*o*h+a*g*h+c*o*y-a*d*y,M=t*x+i*b+n*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]=x*B,e[1]=(g*h*s-d*y*s-g*n*p+i*y*p+d*n*w-i*h*w)*B,e[2]=(o*y*s-g*l*s+g*n*u-i*y*u-o*n*w+i*l*w)*B,e[3]=(d*l*s-o*h*s-d*n*u+i*h*u+o*n*p-i*l*p)*B,e[4]=b*B,e[5]=(c*y*s-m*h*s+m*n*p-t*y*p-c*n*w+t*h*w)*B,e[6]=(m*l*s-a*y*s-m*n*u+t*y*u+a*n*w-t*l*w)*B,e[7]=(a*h*s-c*l*s+c*n*u-t*h*u-a*n*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*w-t*d*w)*B,e[10]=(a*g*s-m*o*s+m*i*u-t*g*u-a*i*w+t*o*w)*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*n-m*d*n+m*i*h-t*g*h-c*i*y+t*d*y)*B,e[14]=(m*o*n-a*g*n-m*i*l+t*g*l+a*i*y-t*o*y)*B,e[15]=(a*d*n-c*o*n+c*i*l-t*d*l-a*i*h+t*o*h)*B,this}scale(e){const t=this.elements,i=e.x,n=e.y,s=e.z;return t[0]*=i,t[4]*=n,t[8]*=s,t[1]*=i,t[5]*=n,t[9]*=s,t[2]*=i,t[6]*=n,t[10]*=s,t[3]*=i,t[7]*=n,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],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}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),n=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-n*l,u*l+n*o,0,u*o+n*l,c*o+i,c*l-n*a,0,u*l-n*o,c*l+n*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,n,s,a){return this.set(1,i,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=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,w=o*d,x=l*u,b=l*c,S=l*d,q=i.x,M=i.y,B=i.z;return n[0]=(1-(g+w))*q,n[1]=(p+S)*q,n[2]=(m-b)*q,n[3]=0,n[4]=(p-S)*M,n[5]=(1-(h+w))*M,n[6]=(y+x)*M,n[7]=0,n[8]=(m+b)*B,n[9]=(y-x)*B,n[10]=(1-(h+g))*B,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let s=$i.set(n[0],n[1],n[2]).length();const a=$i.set(n[4],n[5],n[6]).length(),o=$i.set(n[8],n[9],n[10]).length();this.determinant()<0&&(s=-s),e.x=n[12],e.y=n[13],e.z=n[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,n,s,a,o=ln,l=!1){const u=this.elements,c=2*s/(t-e),d=2*s/(i-n),h=(t+e)/(t-e),p=(i+n)/(i-n);let m,g;if(l)m=s/(a-s),g=a*s/(a-s);else if(o===ln)m=-(a+s)/(a-s),g=-2*a*s/(a-s);else if(o===Do)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,n,s,a,o=ln,l=!1){const u=this.elements,c=2/(t-e),d=2/(i-n),h=-(t+e)/(t-e),p=-(i+n)/(i-n);let m,g;if(l)m=1/(a-s),g=a/(a-s);else if(o===ln)m=-2/(a-s),g=-(a+s)/(a-s);else if(o===Do)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 n=0;n<16;n++)if(t[n]!==i[n])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,pn=new P,st=new P,jo=new Et,Go=new Hr;class Ur{constructor(e=0,t=0,i=0,n=Ur.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}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,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,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 n=e.elements,s=n[0],a=n[4],o=n[8],l=n[1],u=n[5],c=n[9],d=n[2],h=n[6],p=n[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 jo.makeRotationFromQuaternion(e),this.setFromRotationMatrix(jo,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Go.setFromEuler(this),this.setFromQuaternion(Go,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}}Ur.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 Wo=new P,Li=new Hr,Ut=new Et,mn=new P,yr=new P,Ov=new P,zv=new Hr,Ko=new P(1,0,0),Yo=new P(0,1,0),Xo=new P(0,0,1),Jo={type:"added"},Tv={type:"removed"},Hi={type:"childadded",child:null},Ss={type:"childremoved",child:null};class Kt extends Zn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Fv++}),this.uuid=Lr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Kt.DEFAULT_UP.clone();const e=new P,t=new Ur,i=new Hr,n=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:n},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(Ko,e)}rotateY(e){return this.rotateOnAxis(Yo,e)}rotateZ(e){return this.rotateOnAxis(Xo,e)}translateOnAxis(e,t){return Wo.copy(e).applyQuaternion(this.quaternion),this.position.add(Wo.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ko,e)}translateY(e){return this.translateOnAxis(Yo,e)}translateZ(e){return this.translateOnAxis(Xo,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?mn.copy(e):mn.set(e,t,i);const n=this.parent;this.updateWorldMatrix(!0,!1),yr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ut.lookAt(yr,mn,this.up):Ut.lookAt(mn,yr,this.up),this.quaternion.setFromRotationMatrix(Ut),n&&(Ut.extractRotation(n.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(Jo),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),Ss.child=e,this.dispatchEvent(Ss),Ss.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(Jo),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,n=this.children.length;i<n;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 n=this.children;for(let s=0,a=n.length;s<a;s++)n[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(yr,e,Ov),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(yr,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,n=t.length;i<n;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,n=t.length;i<n;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,n=t.length;i<n;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 n=this.children;for(let s=0,a=n.length;s<a;s++)n[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 n={};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.castShadow===!0&&(n.castShadow=!0),this.receiveShadow===!0&&(n.receiveShadow=!0),this.visible===!1&&(n.visible=!1),this.frustumCulled===!1&&(n.frustumCulled=!1),this.renderOrder!==0&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),n.instanceInfo=this._instanceInfo.map(o=>({...o})),n.availableInstanceIds=this._availableInstanceIds.slice(),n.availableGeometryIds=this._availableGeometryIds.slice(),n.nextIndexStart=this._nextIndexStart,n.nextVertexStart=this._nextVertexStart,n.geometryCount=this._geometryCount,n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.matricesTexture=this._matricesTexture.toJSON(e),n.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(n.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(n.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(n.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?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.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&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),n.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]));n.material=o}else n.material=s(e.materials,this.material);if(this.children.length>0){n.children=[];for(let o=0;o<this.children.length;o++)n.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];n.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=n,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 n=e.children[i];this.add(n.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,As=new P,Gt=new P,Ni=new P,Vi=new P,Zo=new P,Ms=new P,Bs=new P,qs=new P,ks=new Nr,Es=new Nr,Fs=new Nr;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,n){n.subVectors(i,t),St.subVectors(e,t),n.cross(St);const s=n.lengthSq();return s>0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,i,n,s){St.subVectors(n,t),jt.subVectors(i,t),As.subVectors(e,t);const a=St.dot(St),o=St.dot(jt),l=St.dot(As),u=jt.dot(jt),c=jt.dot(As),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,n){return this.getBarycoord(e,t,i,n,Gt)===null?!1:Gt.x>=0&&Gt.y>=0&&Gt.x+Gt.y<=1}static getInterpolation(e,t,i,n,s,a,o,l){return this.getBarycoord(e,t,i,n,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,n,s,a){return ks.setScalar(0),Es.setScalar(0),Fs.setScalar(0),ks.fromBufferAttribute(e,t),Es.fromBufferAttribute(e,i),Fs.fromBufferAttribute(e,n),a.setScalar(0),a.addScaledVector(ks,s.x),a.addScaledVector(Es,s.y),a.addScaledVector(Fs,s.z),a}static isFrontFacing(e,t,i,n){return St.subVectors(i,t),jt.subVectors(e,t),St.cross(jt).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),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,n,s){return Bt.getInterpolation(e,this.a,this.b,this.c,t,i,n,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,n=this.b,s=this.c;let a,o;Ni.subVectors(n,i),Vi.subVectors(s,i),Ms.subVectors(e,i);const l=Ni.dot(Ms),u=Vi.dot(Ms);if(l<=0&&u<=0)return t.copy(i);Bs.subVectors(e,n);const c=Ni.dot(Bs),d=Vi.dot(Bs);if(c>=0&&d<=c)return t.copy(n);const h=l*d-c*u;if(h<=0&&l>=0&&c<=0)return a=l/(l-c),t.copy(i).addScaledVector(Ni,a);qs.subVectors(e,s);const p=Ni.dot(qs),m=Vi.dot(qs);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 Zo.subVectors(s,n),o=(d-c)/(d-c+(p-m)),t.copy(n).addScaledVector(Zo,o);const w=1/(y+g+h);return a=g*w,o=h*w,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 Vu={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},gn={h:0,s:0,l:0};function Os(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}class jr{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 n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}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,n=wt.workingColorSpace){return this.r=e,this.g=t,this.b=i,wt.colorSpaceToWorking(this,n),this}setHSL(e,t,i,n=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=Os(a,s,e+1/3),this.g=Os(a,s,e),this.b=Os(a,s,e-1/3)}return wt.colorSpaceToWorking(this,n),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 n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],o=n[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(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[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=Vu[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,n=Ke.g,s=Ke.b,a=Math.max(i,n,s),o=Math.min(i,n,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=(n-s)/d+(n<s?6:0);break;case n:l=(s-i)/d+2;break;case s:l=(i-n)/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,n=Ke.b;return e!==At?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(n*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(gn);const i=ps(ti.h,gn.h,t),n=ps(ti.s,gn.s,t),s=ps(ti.l,gn.l,t);return this.setHSL(i,n,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,n=this.b,s=e.elements;return this.r=s[0]*t+s[3]*i+s[6]*n,this.g=s[1]*t+s[4]*i+s[7]*n,this.b=s[2]*t+s[5]*i+s[8]*n,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 jr;jr.NAMES=Vu;let Iv=0;class Pv extends Zn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Iv++}),this.uuid=Lr(),this.name="",this.type="Material",this.blending=Bo,this.side=ta,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=ko,this.blendDst=Eo,this.blendEquation=qo,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new jr(0,0,0),this.blendAlpha=0,this.depthFunc=Fo,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Po,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 n=this[t];if(n===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.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!==Bo&&(i.blending=this.blending),this.side!==ta&&(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!==ko&&(i.blendSrc=this.blendSrc),this.blendDst!==Eo&&(i.blendDst=this.blendDst),this.blendEquation!==qo&&(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!==Fo&&(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!==Po&&(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 n(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=n(e.textures),a=n(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 n=t.length;i=new Array(n);for(let s=0;s!==n;++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 Uu extends Pv{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new jr(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 Ur,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,yn=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=Ro,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 n=0,s=this.itemSize;n<s;n++)this.array[e+n]=t.array[i+n];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++)yn.fromBufferAttribute(this,t),yn.applyMatrix3(e),this.setXY(t,yn.x,yn.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=pr(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=pr(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=pr(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=pr(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=pr(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,n){return e*=this.itemSize,this.normalized&&(t=et(t,this.array),i=et(i,this.array),n=et(n,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this}setXYZW(e,t,i,n,s){return e*=this.itemSize,this.normalized&&(t=et(t,this.array),i=et(i,this.array),n=et(n,this.array),s=et(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,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!==Ro&&(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,zs=new Kt,Ui=new P,at=new Vr,vr=new Vr,$e=new P;class Ra extends Zn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Hv++}),this.uuid=Lr(),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 n=this.attributes.tangent;return n!==void 0&&(n.transformDirection(e),n.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 zs.lookAt(e),zs.updateMatrix(),this.applyMatrix4(zs.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 n=0,s=e.length;n<s;n++){const a=e[n];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 n=0;n<i;n++){const s=e[n];t.setXYZ(n,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 Vr);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,n=t.length;i<n;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 Nu);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];vr.setFromBufferAttribute(o),this.morphTargetsRelative?($e.addVectors(at.min,vr.min),at.expandByPoint($e),$e.addVectors(at.max,vr.max),at.expandByPoint($e)):(at.expandByPoint(vr.min),at.expandByPoint(vr.max))}at.getCenter(i);let n=0;for(let s=0,a=e.count;s<a;s++)$e.fromBufferAttribute(e,s),n=Math.max(n,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)),n=Math.max(n,i.distanceToSquared($e))}this.boundingSphere.radius=Math.sqrt(n),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,n=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 w(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 x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let L=0,E=x.length;L<E;++L){const D=x[L],U=D.start,G=D.count;for(let ee=U,te=U+G;ee<te;ee+=3)w(e.getX(ee+0),e.getX(ee+1),e.getX(ee+2))}const b=new P,S=new P,q=new P,M=new P;function B(L){q.fromBufferAttribute(n,L),M.copy(q);const E=o[L];b.copy(E),b.sub(q.multiplyScalar(q.dot(E))).normalize(),S.crossVectors(M,E);const U=S.dot(l[L])<0?-1:1;a.setXYZW(L,b.x,b.y,b.z,U)}for(let L=0,E=x.length;L<E;++L){const D=x[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 n=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);n.fromBufferAttribute(t,m),s.fromBufferAttribute(t,g),a.fromBufferAttribute(t,y),c.subVectors(a,s),d.subVectors(n,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)n.fromBufferAttribute(t,h+0),s.fromBufferAttribute(t,h+1),a.fromBufferAttribute(t,h+2),c.subVectors(a,s),d.subVectors(n,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 w=0;w<c;w++)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,n=this.attributes;for(const o in n){const l=n[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 n={};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&&(n[l]=c,s=!0)}s&&(e.data.morphAttributes=n,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 n=e.attributes;for(const u in n){const c=n[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 Qo=new Et,bi=new Bv,vn=new Nu,el=new P,bn=new P,xn=new P,wn=new P,Ts=new P,_n=new P,tl=new P,Cn=new P;class Nv extends Kt{constructor(e=new Ra,t=new Uu){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 n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const o=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}getVertexPosition(e,t){const i=this.geometry,n=i.attributes.position,s=i.morphAttributes.position,a=i.morphTargetsRelative;t.fromBufferAttribute(n,e);const o=this.morphTargetInfluences;if(s&&o){_n.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const c=o[l],d=s[l];c!==0&&(Ts.fromBufferAttribute(d,e),a?_n.addScaledVector(Ts,c):_n.addScaledVector(Ts.sub(t),c))}t.add(_n)}return t}raycast(e,t){const i=this.geometry,n=this.material,s=this.matrixWorld;n!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),vn.copy(i.boundingSphere),vn.applyMatrix4(s),bi.copy(e.ray).recast(e.near),!(vn.containsPoint(bi.origin)===!1&&(bi.intersectSphere(vn,el)===null||bi.origin.distanceToSquared(el)>(e.far-e.near)**2))&&(Qo.copy(s).invert(),bi.copy(e.ray).applyMatrix4(Qo),!(i.boundingBox!==null&&bi.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,bi)))}_computeIntersections(e,t,i){let n;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],w=a[y.materialIndex],x=Math.max(y.start,p.start),b=Math.min(o.count,Math.min(y.start+y.count,p.start+p.count));for(let S=x,q=b;S<q;S+=3){const M=o.getX(S),B=o.getX(S+1),L=o.getX(S+2);n=Sn(this,w,e,i,u,c,d,M,B,L),n&&(n.faceIndex=Math.floor(S/3),n.face.materialIndex=y.materialIndex,t.push(n))}}else{const m=Math.max(0,p.start),g=Math.min(o.count,p.start+p.count);for(let y=m,w=g;y<w;y+=3){const x=o.getX(y),b=o.getX(y+1),S=o.getX(y+2);n=Sn(this,a,e,i,u,c,d,x,b,S),n&&(n.faceIndex=Math.floor(y/3),t.push(n))}}else if(l!==void 0)if(Array.isArray(a))for(let m=0,g=h.length;m<g;m++){const y=h[m],w=a[y.materialIndex],x=Math.max(y.start,p.start),b=Math.min(l.count,Math.min(y.start+y.count,p.start+p.count));for(let S=x,q=b;S<q;S+=3){const M=S,B=S+1,L=S+2;n=Sn(this,w,e,i,u,c,d,M,B,L),n&&(n.faceIndex=Math.floor(S/3),n.face.materialIndex=y.materialIndex,t.push(n))}}else{const m=Math.max(0,p.start),g=Math.min(l.count,p.start+p.count);for(let y=m,w=g;y<w;y+=3){const x=y,b=y+1,S=y+2;n=Sn(this,a,e,i,u,c,d,x,b,S),n&&(n.faceIndex=Math.floor(y/3),t.push(n))}}}}function Vv(r,e,t,i,n,s,a,o){let l;if(e.side===dv?l=i.intersectTriangle(a,s,n,!0,o):l=i.intersectTriangle(n,s,a,e.side===ta,o),l===null)return null;Cn.copy(o),Cn.applyMatrix4(r.matrixWorld);const u=t.ray.origin.distanceTo(Cn);return u<t.near||u>t.far?null:{distance:u,point:Cn.clone(),object:r}}function Sn(r,e,t,i,n,s,a,o,l,u){r.getVertexPosition(o,bn),r.getVertexPosition(l,xn),r.getVertexPosition(u,wn);const c=Vv(r,e,t,i,bn,xn,wn,tl);if(c){const d=new P;Bt.getBarycoord(tl,bn,xn,wn,d),n&&(c.uv=Bt.getInterpolatedAttribute(n,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(bn,xn,wn,h.normal),c.face=h,c.barycoord=d}return c}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:$u}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=$u);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 ju={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 il(r){return{name:r.name,value:r,key:r.uuid,label:r.type,type:r.type,icon:ju[r.type.toLowerCase()]||"i-carbon-cube",defaultExpanded:r.isScene,memorySize:Math.round(uv(r)/1024),children:[]}}function jv(r){function e(i,n){i.children.forEach(s=>{if(s.type==="HighlightMesh")return;const a=il(s);n.children.push(a),e(s,a)})}const t=il(r);return e(r,t),t}function Gi(r,e="root",t="root",i=new WeakSet){const n=typeof r;if(r===null||n!=="object")return{label:e,type:n,path:t,value:r,defaultExpanded:t==="root"};if(i.has(r))return{label:e,type:"circular",path:t,value:"[Circular]",defaultExpanded:t==="root"};if(i.add(r),Array.isArray(r))return{label:e,type:"array",path:t,value:`Array[${r.length}]`,defaultExpanded:t==="root",children:r.map((o,l)=>Gi(o,String(l),`${t}[${l}]`,i))};const s=[],a=r.constructor?.name||"Object";if(a==="_Euler"){const o=r,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=r,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=r,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(r)){if(o.startsWith("_")||o.startsWith("$")||o==="__v_isRef"||o==="__v_isReactive"||o==="__v_isShallow"||o==="__v_raw"||o==="__v_isReadonly")continue;const l=r[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(r){const e=new Uu({color:11003607,transparent:!0,opacity:.2,depthTest:!1,side:hv});return new Uv(r.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"},Yv=z({__name:"MaterialBadge",props:{material:{},displayValue:{}},setup(r){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 n(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(s.material)?(v(),C(o,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:_(()=>[t(s.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(s.material)})},null,4)):i(s.material)?(v(),V("div",Wv)):(v(),V("div",Kv)),I("span",{class:T(n(s.material))},Z(s.displayValue),3)]),_:1})):R("",!0)}}}),Xv=Object.assign(Yv,{__name:"InspectorMaterialBadge"}),Jv=z({__name:"GeometryBadge",props:{geometry:{},displayValue:{}},setup(r){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 n(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(s.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(s.geometry),class:"w-3 h-3 text-gray-600"},null,8,["name"]),I("span",{class:T(n(s.geometry))},Z(s.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"},rb={class:"flex items-center gap-1 min-w-0"},nb={key:0,class:"flex items-center gap-1 ml-1"},sb=z({__name:"Props",props:{object:{}},emits:["update-value"],setup(r,{emit:e}){const t=e,i=r,n=k(()=>ju[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 w=l(i.object,y);return{key:y,value:a(y,w),displayValue:u(y,w)}}).filter(y=>y.value!==void 0)});function l(m,g){return g.split(".").reduce((y,w)=>y&&typeof y=="object"&&w in y?y[w]: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,w=ci,x=Ay,b=lt,S=nv,q=zu;return v(),V("div",Qv,[I("div",eb,[F(y,{name:n.value,class:"w-4 h-4 text-gray-600 flex-shrink-0"},null,8,["name"]),I("span",tb,Z(m.object.type),1),m.object.name?(v(),C(w,{key:0,variant:"soft",size:"xs",class:"ml-2"},{default:_(()=>[ce(Z(m.object.name),1)]),_:1})):R("",!0)]),I("div",ib,[(v(!0),V(we,null,Ye(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",rb,[I("span",null,Z(M.key)+" :",1),c(M.value)?(v(),V("div",nb,[F(x,{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(x,{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(x,{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(Xv,{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(b,{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(x,{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(Iu)(M.value)},M.displayValue==="vector"&&{label:"Copy as prop",icon:"i-material-symbols:data-array",onSelect:()=>f(Tu)({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(Ru)({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(Pu)({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(Du)({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(b,{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(r){const e=r,t=Ge(),i=Te(),n=Or(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(Um),H(f(n),{class:s.value.root({class:[e.ui?.root,e.class]})}),{default:_(()=>[I("div",{class:T(s.value.border({class:e.ui?.border}))},null,2),r.label||r.icon||r.avatar||t.default?(v(),V(we,{key:0},[I("div",{class:T(s.value.container({class:e.ui?.container}))},[A(a.$slots,"default",{},()=>[r.label?(v(),V("span",{key:0,class:T(s.value.label({class:e.ui?.label}))},Z(r.label),3)):r.icon?(v(),C(Pe,{key:1,name:r.icon,class:T(s.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):r.avatar?(v(),C(or,H({key:2,size:e.ui?.avatarSize||s.value.avatarSize()},r.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:qn({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:qn(["change"],["update:modelValue"]),setup(r,{emit:e}){const t=r,i=Ge(),n=e,s=la(r,"modelValue",{type:[Boolean,String],default:void 0}),a=Te(),o=Or(Ft(t,"required","value","defaultValue")),{id:l,emitFormChange:u,emitFormInput:c,size:d,color:h,name:p,disabled:m,ariaAttrs:g}=ca(t),y=l.value??ol(),w=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 x(b){const S=new Event("change",{target:{value:b}});n("change",S),u(),c()}return(b,S)=>(v(),C(f(ne),{as:!r.variant||r.variant==="list"?r.as:f(uo),class:T(w.value.root({class:[t.ui?.root,t.class]}))},{default:_(()=>[I("div",{class:T(w.value.container({class:t.ui?.container}))},[F(f(nh),H({id:f(y)},{...f(o),...b.$attrs,...f(g)},{modelValue:s.value,"onUpdate:modelValue":[S[0]||(S[0]=q=>s.value=q),x],name:f(p),disabled:f(m),class:w.value.base({class:t.ui?.base})}),{default:_(({modelValue:q})=>[F(f(ah),{class:T(w.value.indicator({class:t.ui?.indicator}))},{default:_(()=>[q==="indeterminate"?(v(),C(Pe,{key:0,name:r.indeterminateIcon||f(a).ui.icons.minus,class:T(w.value.icon({class:t.ui?.icon}))},null,8,["name","class"])):(v(),C(Pe,{key:1,name:r.icon||f(a).ui.icons.check,class:T(w.value.icon({class:t.ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","modelValue","name","disabled","class"])],2),r.label||i.label||r.description||i.description?(v(),V("div",{key:0,class:T(w.value.wrapper({class:t.ui?.wrapper}))},[r.label||i.label?(v(),C(sr(!r.variant||r.variant==="list"?f(uo):"p"),{key:0,for:f(y),class:T(w.value.label({class:t.ui?.label}))},{default:_(()=>[A(b.$slots,"label",{label:r.label},()=>[ce(Z(r.label),1)])]),_:3},8,["for","class"])):R("",!0),r.description||i.description?(v(),V("p",{key:1,class:T(w.value.description({class:t.ui?.description}))},[A(b.$slots,"description",{description:r.description},()=>[ce(Z(r.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(r,{expose:e,emit:t}){const i=r,n=t,s=Ge(),a=wg(i,"modelValue",n,{defaultValue:i.defaultValue}),o=Te(),{emitFormBlur:l,emitFormInput:u,emitFormChange:c,size:d,color:h,id:p,name:m,highlight:g,disabled:y,emitFormFocus:w,ariaAttrs:x}=ca(i,{deferInputValidation:!0}),{orientation:b,size:S}=ua(i),{isLeading:q,isTrailing:M,leadingIconName:B,trailingIconName:L}=pl(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:b.value})),U=O(null);function G(Q){i.modelModifiers?.trim&&(Q=Q?.trim()??null),(i.modelModifiers?.number||i.type==="number")&&(Q=Gc(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(),n("change",Q)}function re(Q){l(),n("blur",Q)}function K(){i.autofocus&&U.value?.focus()}return Re(()=>{setTimeout(()=>{K()},i.autofocusDelay)}),e({inputRef:U}),(Q,J)=>(v(),C(f(ne),{as:r.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:r.type,value:f(a),name:f(m),placeholder:r.placeholder,class:D.value.base({class:i.ui?.base}),disabled:f(y),required:r.required,autocomplete:r.autocomplete},{...Q.$attrs,...f(x)},{onInput:ee,onBlur:re,onChange:te,onFocus:J[0]||(J[0]=(...he)=>f(w)&&f(w)(...he))}),null,16,hb),A(Q.$slots,"default"),f(q)||r.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"])):r.avatar?(v(),C(or,H({key:1,size:i.ui?.leadingAvatarSize||D.value.leadingAvatarSize()},r.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(r,{emit:e}){const t=r,i=e,n=O(t.node.defaultExpanded??!1),s=O(null),a=()=>{n.value=!n.value},o=b=>typeof b=="boolean"?"text-blue-500":typeof b=="number"?"text-green-500":typeof b=="string"?"text-red-500":typeof b>"u"?"text-gray-400":"text-gray-600",l=b=>typeof b=="boolean"?b?"true":"false":typeof b=="number"?b.toString():typeof b=="string"?`"${b}"`:b===null?"null":typeof b>"u"?"undefined":"object",u=()=>{if(typeof t.node.value=="number"){const b=t.node.value+1;i("update-value",t.node.path,b)}},c=()=>{if(typeof t.node.value=="number"){const b=t.node.value-1;i("update-value",t.node.path,b)}},d=b=>{i("update-value",t.node.path,b)},h=()=>{const b=typeof t.node.value=="string"?t.node.value:JSON.stringify(t.node.value);s.value={path:t.node.path,value:b}},p=()=>{if(s.value)try{const{value:b}=s.value;let S=b;Number.isNaN(Number(b))?(b.toLowerCase()==="true"||b.toLowerCase()==="false")&&(S=b.toLowerCase()==="true"):S=Number(b),i("update-value",t.node.path,S)}catch(b){console.error("Failed to apply edit:",b)}finally{s.value=null}},m=()=>{s.value=null},g=b=>{b.key==="Enter"?p():b.key==="Escape"&&m()},y=k(()=>t.node.children&&t.node.children.length>0),w=k(()=>!y.value),x=k(()=>({paddingLeft:`${t.level*16}px`}));return(b,S)=>{const q=Pe,M=lt,B=zu,L=cb,E=fb,D=vu,U=Gu;return v(),V("div",pb,[I("div",{style:qt(x.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:n.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,[b.node.type==="object"||b.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(b.node.label)+" : ",1),I("span",yb,Z(b.node.value),1)]),b.node.type!=="array"?(v(),C(B,{key:0,size:"xs",items:[{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>f(Mo)(b.node.path)},{label:"Copy value as Array",icon:"i-material-symbols:data-array",onSelect:()=>f(ov)(b.node)},b.node.value==="_Vector3"?{label:"Copy value as Vector3",icon:"i-lucide:pen-line",onSelect:()=>f(Pu)(b.node)}:null,b.node.value==="_Euler"?{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>f(Ru)(b.node)}:null,b.node.value==="_Quaternion"?{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>f(Du)(b.node)}:null,{label:"Copy value as JSON",icon:"i-material-symbols:data-object",onSelect:()=>f(lv)(b.node)},b.node.value==="_Vector3"||b.node.value==="_Euler"||b.node.value==="_Quaternion"?{label:"Copy as Prop",icon:"i-lucide:code",onSelect:()=>f(av)(b.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(b.node.label)+" :",1),typeof b.node.value=="boolean"?(v(),C(L,{key:0,"model-value":b.node.value,size:"xs","onUpdate:modelValue":d,onClick:S[1]||(S[1]=fe(()=>{},["stop"]))},null,8,["model-value"])):s.value?.path===b.node.path&&typeof b.node.value!="number"&&typeof b.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===b.node.path&&typeof b.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 b.node.value!="boolean"?(v(),V("span",{key:3,class:T([o(b.node.value),"cursor-pointer hover:bg-gray-100 px-1 py-0.5 rounded"]),onClick:fe(h,["stop"])},Z(l(b.node.value)),3)):R("",!0)],64)),w.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 b.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(Iu)(b.node.value)},{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>f(Mo)(b.node.path)},{label:"Copy as prop",icon:"i-lucide:pen-line",onSelect:()=>f(Tu)(b.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&&n.value?(v(!0),V(we,{key:0},Ye(b.node.children,G=>(v(),C(U,{key:`${G.path}-${G.label}`,node:G,level:b.level+1,"selected-object":b.selectedObject,onUpdateValue:S[9]||(S[9]=(ee,te)=>i("update-value",ee,te))},null,8,["node","level","selected-object"]))),128)):R("",!0)])}}}),Gu=Object.assign(vb,{__name:"InspectorTree"});function bb(r){let e=0;return r.traverse(t=>{t.isObject3D&&e++}),e}function xb(){const r={scene:is({objects:0,graph:null,value:void 0,selected:void 0,assets:[]}),fps:is({value:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),memory:is({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 n=i.scene.value.uuid;n!==e&&(r.scene.value=i.scene.value,r.scene.objects=bb(i.scene.value),r.scene.graph=jv(i.scene.value),e=n)}else r.scene.value=void 0,r.scene.graph=null,e=null;i.renderer?.instance?.info&&(Object.assign(r.renderer.info.render,i.renderer.instance.info.render),Object.assign(r.renderer.info.memory,i.renderer.instance.info.memory),r.renderer.info.programs=[...i.renderer.instance.info.programs||[]])}else if(t.type==="performance"){const i=t.data;Object.assign(r.fps,i.fps),r.fps.accumulator=[...i.fps.accumulator],Object.assign(r.memory,i.memory),r.memory.accumulator=[...i.memory.accumulator]}}),r}const Da=oa(xb),wb={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},_b={key:0,class:"relative isolate"},Cb=z({__name:"index",setup(r){const{scene:e}=Da(),t=tt(null),i=tt(null),n=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,n.value++}const a=k(()=>(n.value,Gi(t.value))),o=(c,d)=>{t.value&&(l(t.value,c,d),c.includes("color")||n.value++)},l=(c,d,h)=>{if(!c||typeof c!="object")return;const p=d.split(".");let m=c;for(let x=0;x<p.length-1;x++){const b=p[x];if(m[b]&&typeof m[b]=="object")m=m[b];else return}const g=p[p.length-1],y=x=>typeof x=="string"&&/^#[0-9a-f]{6}$/i.test(x);m[g]=y(h)?new jr(h):h;const w=c;w.isCamera&&u(d)&&w.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=gu,p=yu,m=ab,g=lb,y=Gu;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:n.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"],Is=40,rl=2,Mb=z({__name:"DevtoolsGraph",props:{points:{default:()=>[]},value:{default:0},unit:{default:""},label:{default:""},color:{default:"primary"}},setup(r){const e=r,t=O(140);gt(()=>{const n=Math.max(...e.points,30);t.value=Math.max(n,t.value)});const i=k(()=>e.points.map((n,s)=>`${s*rl},${Is-n*Is/t.value}`).join(" "));return(n,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:Is,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(r){const e=r,t=Ge(),i=Te(),n=k(()=>de({extend:de(qb),...i.ui?.card||{}})({variant:e.variant}));return(s,a)=>(v(),C(f(ne),{as:r.as,class:T(n.value.root({class:[e.ui?.root,e.class]}))},{default:_(()=>[t.header?(v(),V("div",{key:0,class:T(n.value.header({class:e.ui?.header}))},[A(s.$slots,"header")],2)):R("",!0),t.default?(v(),V("div",{key:1,class:T(n.value.body({class:e.ui?.body}))},[A(s.$slots,"default")],2)):R("",!0),t.footer?(v(),V("div",{key:2,class:T(n.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(r){const e=O(!1);return(t,i)=>{const n=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))},[t.depth>0?(v(),V("span",Fb)):R("",!0),I("div",Ob,[I("i",{class:T(t.item.icon)},null,2),ce(" "+Z(t.item.type)+" ",1),t.item.name?(v(),C(n,{key:0,variant:"soft"},{default:_(()=>[ce(Z(t.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,Ye(Object.entries(t.item.uniforms.map),([s,a])=>(v(),V("div",{key:s},[ce(Z(s)+" ",1),F(n,{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(r){const{renderer:e}=Da(),t={shaderMaterial:"i-file-icons-vertexshader"},i=k(()=>e.info.programs.map(n=>({...n,icon:t[n.type]||"i-file-icons-vertexshader",uniforms:n.getUniforms(),attributes:n.getAttributes()})));return(n,s)=>{const a=Pb;return v(!0),V(we,null,Ye(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"},Yb={class:"font-mono font-semibold"},Xb={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"},r0={class:"text-center p-4 bg-gray-50 dark:bg-gray-800 rounded-lg"},n0={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(r){const{fps:e,memory:t,renderer:i}=Da(),n=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=yu,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(n).color,variant:"soft",size:"sm"},{default:_(()=>[ce(Z(f(n).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",Yb,Z(Math.round(f(t).maxMemory))+" MB ",1)])])])]),_:1})]),I("div",Xb,[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",r0,[I("div",n0,[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(r,{expose:e,emit:t}){const i=r,n=t,s=Ge(),a=Te(),o=Ce(Ft(i,"as","modelValue","defaultValue","orientation","activationMode","unmountOnHide"),n),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(Wm),H(f(o),{class:l.value.root({class:[i.ui?.root,i.class]})}),{default:_(()=>[F(f(Qm),{class:T(l.value.list({class:i.ui?.list}))},{default:_(()=>[F(f(Jm),{class:T(l.value.indicator({class:i.ui?.indicator}))},null,8,["class"]),A(c.$slots,"list-leading"),(v(!0),V(we,null,Ye(r.items,(h,p)=>(v(),C(f(tg),{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(or,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"]),r.content?(v(!0),V(we,{key:0},Ye(r.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"},k0=z({__name:"index",setup(r){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 n=my,s=Sb,a=_0,o=S0;return v(),V("div",A0,[F(n),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{k0 as default};
|
|
5
|
+
*/const $u="180",ta=0,cv=1,hv=2,Bo=1,qo=100,ko=204,Eo=205,Fo=3,fv=0,Lu=300,Oo=1e3,on=1001,zo=1002,pv=1006,mv=1008,gv=1009,yv=1015,vv=1023,Hu="",At="srgb",To="srgb-linear",Io="linear",fs="srgb",Ti=7680,Po=519,Ro=35044,ln=2e3,Do=2001;class Zn{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 n=i[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.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 n=i.slice(0);for(let s=0,a=n.length;s<a;s++)n[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 Lr(){const r=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(We[r&255]+We[r>>8&255]+We[r>>16&255]+We[r>>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(r,e,t){return Math.max(e,Math.min(t,r))}function bv(r,e){return(r%e+e)%e}function ps(r,e,t){return(1-t)*r+t*e}function pr(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function et(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*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,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[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),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*i-a*n+e.x,this.y=s*n+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 Hr{constructor(e=0,t=0,i=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=n}static slerpFlat(e,t,i,n,s,a,o){let l=i[n+0],u=i[n+1],d=i[n+2],c=i[n+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]=d,e[t+3]=c;return}if(o===1){e[t+0]=h,e[t+1]=p,e[t+2]=m,e[t+3]=g;return}if(c!==g||l!==h||u!==p||d!==m){let y=1-o;const w=l*h+u*p+d*m+c*g,x=w>=0?1:-1,b=1-w*w;if(b>Number.EPSILON){const q=Math.sqrt(b),M=Math.atan2(q,w*x);y=Math.sin(y*M)/q,o=Math.sin(o*M)/q}const S=o*x;if(l=l*y+h*S,u=u*y+p*S,d=d*y+m*S,c=c*y+g*S,y===1-o){const q=1/Math.sqrt(l*l+u*u+d*d+c*c);l*=q,u*=q,d*=q,c*=q}}e[t]=l,e[t+1]=u,e[t+2]=d,e[t+3]=c}static multiplyQuaternionsFlat(e,t,i,n,s,a){const o=i[n],l=i[n+1],u=i[n+2],d=i[n+3],c=s[a],h=s[a+1],p=s[a+2],m=s[a+3];return e[t]=o*m+d*c+l*p-u*h,e[t+1]=l*m+d*h+u*c-o*p,e[t+2]=u*m+d*p+o*h-l*c,e[t+3]=d*m-o*c-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,n){return this._x=e,this._y=t,this._z=i,this._w=n,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,n=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,u=o(i/2),d=o(n/2),c=o(s/2),h=l(i/2),p=l(n/2),m=l(s/2);switch(a){case"XYZ":this._x=h*d*c+u*p*m,this._y=u*p*c-h*d*m,this._z=u*d*m+h*p*c,this._w=u*d*c-h*p*m;break;case"YXZ":this._x=h*d*c+u*p*m,this._y=u*p*c-h*d*m,this._z=u*d*m-h*p*c,this._w=u*d*c+h*p*m;break;case"ZXY":this._x=h*d*c-u*p*m,this._y=u*p*c+h*d*m,this._z=u*d*m+h*p*c,this._w=u*d*c-h*p*m;break;case"ZYX":this._x=h*d*c-u*p*m,this._y=u*p*c+h*d*m,this._z=u*d*m-h*p*c,this._w=u*d*c+h*p*m;break;case"YZX":this._x=h*d*c+u*p*m,this._y=u*p*c+h*d*m,this._z=u*d*m-h*p*c,this._w=u*d*c-h*p*m;break;case"XZY":this._x=h*d*c-u*p*m,this._y=u*p*c-h*d*m,this._z=u*d*m+h*p*c,this._w=u*d*c+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,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],s=t[8],a=t[1],o=t[5],l=t[9],u=t[2],d=t[6],c=t[10],h=i+o+c;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(d-l)*p,this._y=(s-u)*p,this._z=(a-n)*p}else if(i>o&&i>c){const p=2*Math.sqrt(1+i-o-c);this._w=(d-l)/p,this._x=.25*p,this._y=(n+a)/p,this._z=(s+u)/p}else if(o>c){const p=2*Math.sqrt(1+o-i-c);this._w=(s-u)/p,this._x=(n+a)/p,this._y=.25*p,this._z=(l+d)/p}else{const p=2*Math.sqrt(1+c-i-o);this._w=(a-n)/p,this._x=(s+u)/p,this._y=(l+d)/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 n=Math.min(1,t/i);return this.slerp(e,n),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,n=e._y,s=e._z,a=e._w,o=t._x,l=t._y,u=t._z,d=t._w;return this._x=i*d+a*o+n*u-s*l,this._y=n*d+a*l+s*o-i*u,this._z=s*d+a*u+i*l-n*o,this._w=a*d-i*o-n*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,n=this._y,s=this._z,a=this._w;let o=a*e._w+i*e._x+n*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=n,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*n+t*this._y,this._z=p*s+t*this._z,this.normalize(),this}const u=Math.sqrt(l),d=Math.atan2(u,o),c=Math.sin((1-t)*d)/u,h=Math.sin(t*d)/u;return this._w=a*c+this._w*h,this._x=i*c+this._x*h,this._y=n*c+this._y*h,this._z=s*c+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(),n=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(n*Math.sin(e),n*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($o.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion($o.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*n,this.y=s[1]*t+s[4]*i+s[7]*n,this.z=s[2]*t+s[5]*i+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*i+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*i+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,s=e.x,a=e.y,o=e.z,l=e.w,u=2*(a*n-o*i),d=2*(o*t-s*n),c=2*(s*i-a*t);return this.x=t+l*u+a*c-o*d,this.y=i+l*d+o*u-s*c,this.z=n+l*c+s*d-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,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*n,this.y=s[1]*t+s[5]*i+s[9]*n,this.z=s[2]*t+s[6]*i+s[10]*n,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,n=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-s*o,this.y=s*a-i*l,this.z=i*o-n*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 ms.copy(this).projectOnVector(e),this.sub(ms)}reflect(e){return this.sub(ms.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,n=this.z-e.z;return t*t+i*i+n*n}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 n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*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(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,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 ms=new P,$o=new Hr;class ci{constructor(e,t,i,n,s,a,o,l,u){ci.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,n,s,a,o,l,u)}set(e,t,i,n,s,a,o,l,u){const d=this.elements;return d[0]=e,d[1]=n,d[2]=o,d[3]=t,d[4]=s,d[5]=l,d[6]=i,d[7]=a,d[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,n=t.elements,s=this.elements,a=i[0],o=i[3],l=i[6],u=i[1],d=i[4],c=i[7],h=i[2],p=i[5],m=i[8],g=n[0],y=n[3],w=n[6],x=n[1],b=n[4],S=n[7],q=n[2],M=n[5],B=n[8];return s[0]=a*g+o*x+l*q,s[3]=a*y+o*b+l*M,s[6]=a*w+o*S+l*B,s[1]=u*g+d*x+c*q,s[4]=u*y+d*b+c*M,s[7]=u*w+d*S+c*B,s[2]=h*g+p*x+m*q,s[5]=h*y+p*b+m*M,s[8]=h*w+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],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],d=e[8];return t*a*d-t*o*u-i*s*d+i*o*l+n*s*u-n*a*l}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],d=e[8],c=d*a-o*u,h=o*l-d*s,p=u*s-a*l,m=t*c+i*h+n*p;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/m;return e[0]=c*g,e[1]=(n*u-d*i)*g,e[2]=(o*i-n*a)*g,e[3]=h*g,e[4]=(d*t-n*l)*g,e[5]=(n*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,n,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,-n*u,n*l,-n*(-u*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(gs.makeScale(e,t)),this}rotate(e){return this.premultiply(gs.makeRotation(-e)),this}translate(e,t){return this.premultiply(gs.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 n=0;n<9;n++)if(t[n]!==i[n])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 gs=new ci;function xv(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function Lo(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}const Ho={};function No(r){r in Ho||(Ho[r]=!0,console.warn(r))}const Vo=new ci().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Uo=new ci().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function wv(){const r={enabled:!0,workingColorSpace:To,spaces:{},convert:function(n,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===fs&&(n.r=Wt(n.r),n.g=Wt(n.g),n.b=Wt(n.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(n.applyMatrix3(this.spaces[s].toXYZ),n.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===fs&&(n.r=Zi(n.r),n.g=Zi(n.g),n.b=Zi(n.b))),n},workingToColorSpace:function(n,s){return this.convert(n,this.workingColorSpace,s)},colorSpaceToWorking:function(n,s){return this.convert(n,s,this.workingColorSpace)},getPrimaries:function(n){return this.spaces[n].primaries},getTransfer:function(n){return n===Hu?Io:this.spaces[n].transfer},getToneMappingMode:function(n){return this.spaces[n].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(n,s=this.workingColorSpace){return n.fromArray(this.spaces[s].luminanceCoefficients)},define:function(n){Object.assign(this.spaces,n)},_getMatrix:function(n,s,a){return n.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(n){return this.spaces[n].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(n=this.workingColorSpace){return this.spaces[n].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(n,s){return No("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),r.workingToColorSpace(n,s)},toWorkingColorSpace:function(n,s){return No("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),r.colorSpaceToWorking(n,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return r.define({[To]:{primaries:e,whitePoint:i,transfer:Io,toXYZ:Vo,fromXYZ:Uo,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:At},outputColorSpaceConfig:{drawingBufferColorSpace:At}},[At]:{primaries:e,whitePoint:i,transfer:fs,toXYZ:Vo,fromXYZ:Uo,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:At}}}),r}const wt=wv();function Wt(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function Zi(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.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=Lo("canvas")),Ii.width=e.width,Ii.height=e.height;const n=Ii.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.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=Lo("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a<s.length;a++)s[a]=Wt(s[a]/255)*255;return i.putImageData(n,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=Lr(),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:""},n=this.data;if(n!==null){let s;if(Array.isArray(n)){s=[];for(let a=0,o=n.length;a<o;a++)n[a].isDataTexture?s.push(ys(n[a].image)):s.push(ys(n[a]))}else s=ys(n);i.url=s}return t||(e.images[this.uuid]=i),i}}function ys(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?_v.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Av=0;const vs=new P;class _i extends Zn{constructor(e=_i.DEFAULT_IMAGE,t=_i.DEFAULT_MAPPING,i=on,n=on,s=pv,a=mv,o=vv,l=gv,u=_i.DEFAULT_ANISOTROPY,d=Hu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Av++}),this.uuid=Lr(),this.name="",this.source=new Sv(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=n,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 ci,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,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(vs).x}get height(){return this.source.getSize(vs).y}get depth(){return this.source.getSize(vs).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 n=this[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}n&&i&&n.isVector2&&i.isVector2||n&&i&&n.isVector3&&i.isVector3||n&&i&&n.isMatrix3&&i.isMatrix3?n.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!==Lu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Oo:e.x=e.x-Math.floor(e.x);break;case on:e.x=e.x<0?0:1;break;case zo: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 Oo:e.y=e.y-Math.floor(e.y);break;case on:e.y=e.y<0?0:1;break;case zo: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=Lu;_i.DEFAULT_ANISOTROPY=1;class Nr{constructor(e=0,t=0,i=0,n=1){Nr.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}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,n){return this.x=e,this.y=t,this.z=i,this.w=n,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,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*i+a[11]*n+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,n,s;const l=e.elements,u=l[0],d=l[4],c=l[8],h=l[1],p=l[5],m=l[9],g=l[2],y=l[6],w=l[10];if(Math.abs(d-h)<.01&&Math.abs(c-g)<.01&&Math.abs(m-y)<.01){if(Math.abs(d+h)<.1&&Math.abs(c+g)<.1&&Math.abs(m+y)<.1&&Math.abs(u+p+w-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(u+1)/2,S=(p+1)/2,q=(w+1)/2,M=(d+h)/4,B=(c+g)/4,L=(m+y)/4;return b>S&&b>q?b<.01?(i=0,n=.707106781,s=.707106781):(i=Math.sqrt(b),n=M/i,s=B/i):S>q?S<.01?(i=.707106781,n=0,s=.707106781):(n=Math.sqrt(S),i=M/n,s=L/n):q<.01?(i=.707106781,n=.707106781,s=0):(s=Math.sqrt(q),i=B/s,n=L/s),this.set(i,n,s,t),this}let x=Math.sqrt((y-m)*(y-m)+(c-g)*(c-g)+(h-d)*(h-d));return Math.abs(x)<.001&&(x=1),this.x=(y-m)/x,this.y=(c-g)/x,this.z=(h-d)/x,this.w=Math.acos((u+p+w-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 Vr{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(),un.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),un.copy(i.boundingBox)),un.applyMatrix4(e.matrixWorld),this.union(un)}const n=e.children;for(let s=0,a=n.length;s<a;s++)this.expandByObject(n[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(mr),dn.subVectors(this.max,mr),Pi.subVectors(e.a,mr),Ri.subVectors(e.b,mr),Di.subVectors(e.c,mr),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!bs(t,Pi,Ri,Di,dn)||(t=[1,0,0,0,1,0,0,0,1],!bs(t,Pi,Ri,Di,dn))?!1:(cn.crossVectors(Jt,Zt),t=[cn.x,cn.y,cn.z],bs(t,Pi,Ri,Di,dn))}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,un=new Vr,Pi=new P,Ri=new P,Di=new P,Jt=new P,Zt=new P,yi=new P,mr=new P,dn=new P,cn=new P,vi=new P;function bs(r,e,t,i,n){for(let s=0,a=r.length-3;s<=a;s+=3){vi.fromArray(r,s);const o=n.x*Math.abs(vi.x)+n.y*Math.abs(vi.y)+n.z*Math.abs(vi.z),l=e.dot(vi),u=t.dot(vi),d=i.dot(vi);if(Math.max(-Math.max(l,u,d),Math.min(l,u,d))>o)return!1}return!0}const Mv=new Vr,gr=new P,xs=new P;class Nu{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 n=0;for(let s=0,a=e.length;s<a;s++)n=Math.max(n,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(n),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;gr.subVectors(e,this.center);const t=gr.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),n=(i-this.radius)*.5;this.center.addScaledVector(gr,n/i),this.radius+=n}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):(xs.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(gr.copy(e.center).add(xs)),this.expandByPoint(gr.copy(e.center).sub(xs))),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,ws=new P,hn=new P,Qt=new P,_s=new P,fn=new P,Cs=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,n){ws.copy(e).add(t).multiplyScalar(.5),hn.copy(t).sub(e).normalize(),Qt.copy(this.origin).sub(ws);const s=e.distanceTo(t)*.5,a=-this.direction.dot(hn),o=Qt.dot(this.direction),l=-Qt.dot(hn),u=Qt.lengthSq(),d=Math.abs(1-a*a);let c,h,p,m;if(d>0)if(c=a*l-o,h=a*o-l,m=s*d,c>=0)if(h>=-m)if(h<=m){const g=1/d;c*=g,h*=g,p=c*(c+a*h+2*o)+h*(a*c+h+2*l)+u}else h=s,c=Math.max(0,-(a*h+o)),p=-c*c+h*(h+2*l)+u;else h=-s,c=Math.max(0,-(a*h+o)),p=-c*c+h*(h+2*l)+u;else h<=-m?(c=Math.max(0,-(-a*s+o)),h=c>0?-s:Math.min(Math.max(-s,-l),s),p=-c*c+h*(h+2*l)+u):h<=m?(c=0,h=Math.min(Math.max(-s,-l),s),p=h*(h+2*l)+u):(c=Math.max(0,-(a*s+o)),h=c>0?s:Math.min(Math.max(-s,-l),s),p=-c*c+h*(h+2*l)+u);else h=a>0?-s:s,c=Math.max(0,-(a*h+o)),p=-c*c+h*(h+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,c),n&&n.copy(ws).addScaledVector(hn,h),p}intersectSphere(e,t){Vt.subVectors(e.center,this.origin);const i=Vt.dot(this.direction),n=Vt.dot(Vt)-i*i,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),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,n,s,a,o,l;const u=1/this.direction.x,d=1/this.direction.y,c=1/this.direction.z,h=this.origin;return u>=0?(i=(e.min.x-h.x)*u,n=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,n=(e.min.x-h.x)*u),d>=0?(s=(e.min.y-h.y)*d,a=(e.max.y-h.y)*d):(s=(e.max.y-h.y)*d,a=(e.min.y-h.y)*d),i>a||s>n||((s>i||isNaN(i))&&(i=s),(a<n||isNaN(n))&&(n=a),c>=0?(o=(e.min.z-h.z)*c,l=(e.max.z-h.z)*c):(o=(e.max.z-h.z)*c,l=(e.min.z-h.z)*c),i>l||o>n)||((o>i||i!==i)&&(i=o),(l<n||n!==n)&&(n=l),n<0)?null:this.at(i>=0?i:n,t)}intersectsBox(e){return this.intersectBox(e,Vt)!==null}intersectTriangle(e,t,i,n,s){_s.subVectors(t,e),fn.subVectors(i,e),Cs.crossVectors(_s,fn);let a=this.direction.dot(Cs),o;if(a>0){if(n)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(fn.crossVectors(Qt,fn));if(l<0)return null;const u=o*this.direction.dot(_s.cross(Qt));if(u<0||l+u>a)return null;const d=-o*Qt.dot(Cs);return d<0?null:this.at(d/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,n,s,a,o,l,u,d,c,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,n,s,a,o,l,u,d,c,h,p,m,g,y)}set(e,t,i,n,s,a,o,l,u,d,c,h,p,m,g,y){const w=this.elements;return w[0]=e,w[4]=t,w[8]=i,w[12]=n,w[1]=s,w[5]=a,w[9]=o,w[13]=l,w[2]=u,w[6]=d,w[10]=c,w[14]=h,w[3]=p,w[7]=m,w[11]=g,w[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,n=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]*n,t[1]=i[1]*n,t[2]=i[2]*n,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,n=e.y,s=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),u=Math.sin(n),d=Math.cos(s),c=Math.sin(s);if(e.order==="XYZ"){const h=a*d,p=a*c,m=o*d,g=o*c;t[0]=l*d,t[4]=-l*c,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*d,p=l*c,m=u*d,g=u*c;t[0]=h+g*o,t[4]=m*o-p,t[8]=a*u,t[1]=a*c,t[5]=a*d,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*d,p=l*c,m=u*d,g=u*c;t[0]=h-g*o,t[4]=-a*c,t[8]=m+p*o,t[1]=p+m*o,t[5]=a*d,t[9]=g-h*o,t[2]=-a*u,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const h=a*d,p=a*c,m=o*d,g=o*c;t[0]=l*d,t[4]=m*u-p,t[8]=h*u+g,t[1]=l*c,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*d,t[4]=g-h*c,t[8]=m*c+p,t[1]=c,t[5]=a*d,t[9]=-o*d,t[2]=-u*d,t[6]=p*c+m,t[10]=h-g*c}else if(e.order==="XZY"){const h=a*l,p=a*u,m=o*l,g=o*u;t[0]=l*d,t[4]=-c,t[8]=u*d,t[1]=h*c+g,t[5]=a*d,t[9]=p*c-m,t[2]=m*c-p,t[6]=o*d,t[10]=g*c+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 n=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(),pn.crossVectors(st,ei),n[0]=ei.x,n[4]=pn.x,n[8]=st.x,n[1]=ei.y,n[5]=pn.y,n[9]=st.y,n[2]=ei.z,n[6]=pn.z,n[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,n=t.elements,s=this.elements,a=i[0],o=i[4],l=i[8],u=i[12],d=i[1],c=i[5],h=i[9],p=i[13],m=i[2],g=i[6],y=i[10],w=i[14],x=i[3],b=i[7],S=i[11],q=i[15],M=n[0],B=n[4],L=n[8],E=n[12],D=n[1],U=n[5],G=n[9],ee=n[13],te=n[2],re=n[6],K=n[10],Q=n[14],J=n[3],he=n[7],ae=n[11],ye=n[15];return s[0]=a*M+o*D+l*te+u*J,s[4]=a*B+o*U+l*re+u*he,s[8]=a*L+o*G+l*K+u*ae,s[12]=a*E+o*ee+l*Q+u*ye,s[1]=d*M+c*D+h*te+p*J,s[5]=d*B+c*U+h*re+p*he,s[9]=d*L+c*G+h*K+p*ae,s[13]=d*E+c*ee+h*Q+p*ye,s[2]=m*M+g*D+y*te+w*J,s[6]=m*B+g*U+y*re+w*he,s[10]=m*L+g*G+y*K+w*ae,s[14]=m*E+g*ee+y*Q+w*ye,s[3]=x*M+b*D+S*te+q*J,s[7]=x*B+b*U+S*re+q*he,s[11]=x*L+b*G+S*K+q*ae,s[15]=x*E+b*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],n=e[8],s=e[12],a=e[1],o=e[5],l=e[9],u=e[13],d=e[2],c=e[6],h=e[10],p=e[14],m=e[3],g=e[7],y=e[11],w=e[15];return m*(+s*l*c-n*u*c-s*o*h+i*u*h+n*o*p-i*l*p)+g*(+t*l*p-t*u*h+s*a*h-n*a*p+n*u*d-s*l*d)+y*(+t*u*c-t*o*p-s*a*c+i*a*p+s*o*d-i*u*d)+w*(-n*o*d-t*l*c+t*o*h+n*a*c-i*a*h+i*l*d)}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 n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],d=e[8],c=e[9],h=e[10],p=e[11],m=e[12],g=e[13],y=e[14],w=e[15],x=c*y*u-g*h*u+g*l*p-o*y*p-c*l*w+o*h*w,b=m*h*u-d*y*u-m*l*p+a*y*p+d*l*w-a*h*w,S=d*g*u-m*c*u+m*o*p-a*g*p-d*o*w+a*c*w,q=m*c*l-d*g*l-m*o*h+a*g*h+d*o*y-a*c*y,M=t*x+i*b+n*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]=x*B,e[1]=(g*h*s-c*y*s-g*n*p+i*y*p+c*n*w-i*h*w)*B,e[2]=(o*y*s-g*l*s+g*n*u-i*y*u-o*n*w+i*l*w)*B,e[3]=(c*l*s-o*h*s-c*n*u+i*h*u+o*n*p-i*l*p)*B,e[4]=b*B,e[5]=(d*y*s-m*h*s+m*n*p-t*y*p-d*n*w+t*h*w)*B,e[6]=(m*l*s-a*y*s-m*n*u+t*y*u+a*n*w-t*l*w)*B,e[7]=(a*h*s-d*l*s+d*n*u-t*h*u-a*n*p+t*l*p)*B,e[8]=S*B,e[9]=(m*c*s-d*g*s-m*i*p+t*g*p+d*i*w-t*c*w)*B,e[10]=(a*g*s-m*o*s+m*i*u-t*g*u-a*i*w+t*o*w)*B,e[11]=(d*o*s-a*c*s-d*i*u+t*c*u+a*i*p-t*o*p)*B,e[12]=q*B,e[13]=(d*g*n-m*c*n+m*i*h-t*g*h-d*i*y+t*c*y)*B,e[14]=(m*o*n-a*g*n-m*i*l+t*g*l+a*i*y-t*o*y)*B,e[15]=(a*c*n-d*o*n+d*i*l-t*c*l-a*i*h+t*o*h)*B,this}scale(e){const t=this.elements,i=e.x,n=e.y,s=e.z;return t[0]*=i,t[4]*=n,t[8]*=s,t[1]*=i,t[5]*=n,t[9]*=s,t[2]*=i,t[6]*=n,t[10]*=s,t[3]*=i,t[7]*=n,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],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}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),n=Math.sin(t),s=1-i,a=e.x,o=e.y,l=e.z,u=s*a,d=s*o;return this.set(u*a+i,u*o-n*l,u*l+n*o,0,u*o+n*l,d*o+i,d*l-n*a,0,u*l-n*o,d*l+n*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,n,s,a){return this.set(1,i,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,u=s+s,d=a+a,c=o+o,h=s*u,p=s*d,m=s*c,g=a*d,y=a*c,w=o*c,x=l*u,b=l*d,S=l*c,q=i.x,M=i.y,B=i.z;return n[0]=(1-(g+w))*q,n[1]=(p+S)*q,n[2]=(m-b)*q,n[3]=0,n[4]=(p-S)*M,n[5]=(1-(h+w))*M,n[6]=(y+x)*M,n[7]=0,n[8]=(m+b)*B,n[9]=(y-x)*B,n[10]=(1-(h+g))*B,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let s=$i.set(n[0],n[1],n[2]).length();const a=$i.set(n[4],n[5],n[6]).length(),o=$i.set(n[8],n[9],n[10]).length();this.determinant()<0&&(s=-s),e.x=n[12],e.y=n[13],e.z=n[14],Ct.copy(this);const u=1/s,d=1/a,c=1/o;return Ct.elements[0]*=u,Ct.elements[1]*=u,Ct.elements[2]*=u,Ct.elements[4]*=d,Ct.elements[5]*=d,Ct.elements[6]*=d,Ct.elements[8]*=c,Ct.elements[9]*=c,Ct.elements[10]*=c,t.setFromRotationMatrix(Ct),i.x=s,i.y=a,i.z=o,this}makePerspective(e,t,i,n,s,a,o=ln,l=!1){const u=this.elements,d=2*s/(t-e),c=2*s/(i-n),h=(t+e)/(t-e),p=(i+n)/(i-n);let m,g;if(l)m=s/(a-s),g=a*s/(a-s);else if(o===ln)m=-(a+s)/(a-s),g=-2*a*s/(a-s);else if(o===Do)m=-a/(a-s),g=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return u[0]=d,u[4]=0,u[8]=h,u[12]=0,u[1]=0,u[5]=c,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,n,s,a,o=ln,l=!1){const u=this.elements,d=2/(t-e),c=2/(i-n),h=-(t+e)/(t-e),p=-(i+n)/(i-n);let m,g;if(l)m=1/(a-s),g=a/(a-s);else if(o===ln)m=-2/(a-s),g=-(a+s)/(a-s);else if(o===Do)m=-1/(a-s),g=-s/(a-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return u[0]=d,u[4]=0,u[8]=0,u[12]=h,u[1]=0,u[5]=c,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 n=0;n<16;n++)if(t[n]!==i[n])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,pn=new P,st=new P,jo=new Et,Go=new Hr;class Ur{constructor(e=0,t=0,i=0,n=Ur.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}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,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,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 n=e.elements,s=n[0],a=n[4],o=n[8],l=n[1],u=n[5],d=n[9],c=n[2],h=n[6],p=n[10];switch(t){case"XYZ":this._y=Math.asin(ue(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-d,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,u),this._z=0);break;case"YXZ":this._x=Math.asin(-ue(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-c,s),this._z=0);break;case"ZXY":this._x=Math.asin(ue(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-c,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-ue(c,-1,1)),Math.abs(c)<.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(-d,u),this._y=Math.atan2(-c,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(-d,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 jo.makeRotationFromQuaternion(e),this.setFromRotationMatrix(jo,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Go.setFromEuler(this),this.setFromQuaternion(Go,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}}Ur.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 Wo=new P,Li=new Hr,Ut=new Et,mn=new P,yr=new P,Ov=new P,zv=new Hr,Ko=new P(1,0,0),Yo=new P(0,1,0),Xo=new P(0,0,1),Jo={type:"added"},Tv={type:"removed"},Hi={type:"childadded",child:null},Ss={type:"childremoved",child:null};class Kt extends Zn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Fv++}),this.uuid=Lr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Kt.DEFAULT_UP.clone();const e=new P,t=new Ur,i=new Hr,n=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:n},modelViewMatrix:{value:new Et},normalMatrix:{value:new ci}}),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(Ko,e)}rotateY(e){return this.rotateOnAxis(Yo,e)}rotateZ(e){return this.rotateOnAxis(Xo,e)}translateOnAxis(e,t){return Wo.copy(e).applyQuaternion(this.quaternion),this.position.add(Wo.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ko,e)}translateY(e){return this.translateOnAxis(Yo,e)}translateZ(e){return this.translateOnAxis(Xo,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?mn.copy(e):mn.set(e,t,i);const n=this.parent;this.updateWorldMatrix(!0,!1),yr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ut.lookAt(yr,mn,this.up):Ut.lookAt(mn,yr,this.up),this.quaternion.setFromRotationMatrix(Ut),n&&(Ut.extractRotation(n.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(Jo),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),Ss.child=e,this.dispatchEvent(Ss),Ss.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(Jo),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,n=this.children.length;i<n;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 n=this.children;for(let s=0,a=n.length;s<a;s++)n[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(yr,e,Ov),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(yr,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,n=t.length;i<n;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,n=t.length;i<n;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,n=t.length;i<n;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 n=this.children;for(let s=0,a=n.length;s<a;s++)n[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 n={};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.castShadow===!0&&(n.castShadow=!0),this.receiveShadow===!0&&(n.receiveShadow=!0),this.visible===!1&&(n.visible=!1),this.frustumCulled===!1&&(n.frustumCulled=!1),this.renderOrder!==0&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),n.instanceInfo=this._instanceInfo.map(o=>({...o})),n.availableInstanceIds=this._availableInstanceIds.slice(),n.availableGeometryIds=this._availableGeometryIds.slice(),n.nextIndexStart=this._nextIndexStart,n.nextVertexStart=this._nextVertexStart,n.geometryCount=this._geometryCount,n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.matricesTexture=this._matricesTexture.toJSON(e),n.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(n.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(n.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(n.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?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.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,d=l.length;u<d;u++){const c=l[u];s(e.shapes,c)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),n.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]));n.material=o}else n.material=s(e.materials,this.material);if(this.children.length>0){n.children=[];for(let o=0;o<this.children.length;o++)n.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];n.animations.push(s(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),u=a(e.textures),d=a(e.images),c=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),d.length>0&&(i.images=d),c.length>0&&(i.shapes=c),h.length>0&&(i.skeletons=h),p.length>0&&(i.animations=p),m.length>0&&(i.nodes=m)}return i.object=n,i;function a(o){const l=[];for(const u in o){const d=o[u];delete d.metadata,l.push(d)}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 n=e.children[i];this.add(n.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,As=new P,Gt=new P,Ni=new P,Vi=new P,Zo=new P,Ms=new P,Bs=new P,qs=new P,ks=new Nr,Es=new Nr,Fs=new Nr;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,n){n.subVectors(i,t),St.subVectors(e,t),n.cross(St);const s=n.lengthSq();return s>0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,i,n,s){St.subVectors(n,t),jt.subVectors(i,t),As.subVectors(e,t);const a=St.dot(St),o=St.dot(jt),l=St.dot(As),u=jt.dot(jt),d=jt.dot(As),c=a*u-o*o;if(c===0)return s.set(0,0,0),null;const h=1/c,p=(u*l-o*d)*h,m=(a*d-o*l)*h;return s.set(1-p-m,m,p)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,Gt)===null?!1:Gt.x>=0&&Gt.y>=0&&Gt.x+Gt.y<=1}static getInterpolation(e,t,i,n,s,a,o,l){return this.getBarycoord(e,t,i,n,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,n,s,a){return ks.setScalar(0),Es.setScalar(0),Fs.setScalar(0),ks.fromBufferAttribute(e,t),Es.fromBufferAttribute(e,i),Fs.fromBufferAttribute(e,n),a.setScalar(0),a.addScaledVector(ks,s.x),a.addScaledVector(Es,s.y),a.addScaledVector(Fs,s.z),a}static isFrontFacing(e,t,i,n){return St.subVectors(i,t),jt.subVectors(e,t),St.cross(jt).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),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,n,s){return Bt.getInterpolation(e,this.a,this.b,this.c,t,i,n,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,n=this.b,s=this.c;let a,o;Ni.subVectors(n,i),Vi.subVectors(s,i),Ms.subVectors(e,i);const l=Ni.dot(Ms),u=Vi.dot(Ms);if(l<=0&&u<=0)return t.copy(i);Bs.subVectors(e,n);const d=Ni.dot(Bs),c=Vi.dot(Bs);if(d>=0&&c<=d)return t.copy(n);const h=l*c-d*u;if(h<=0&&l>=0&&d<=0)return a=l/(l-d),t.copy(i).addScaledVector(Ni,a);qs.subVectors(e,s);const p=Ni.dot(qs),m=Vi.dot(qs);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=d*m-p*c;if(y<=0&&c-d>=0&&p-m>=0)return Zo.subVectors(s,n),o=(c-d)/(c-d+(p-m)),t.copy(n).addScaledVector(Zo,o);const w=1/(y+g+h);return a=g*w,o=h*w,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 Vu={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},gn={h:0,s:0,l:0};function Os(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}class jr{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 n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}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,n=wt.workingColorSpace){return this.r=e,this.g=t,this.b=i,wt.colorSpaceToWorking(this,n),this}setHSL(e,t,i,n=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=Os(a,s,e+1/3),this.g=Os(a,s,e),this.b=Os(a,s,e-1/3)}return wt.colorSpaceToWorking(this,n),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 n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],o=n[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(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[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=Vu[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,n=Ke.g,s=Ke.b,a=Math.max(i,n,s),o=Math.min(i,n,s);let l,u;const d=(o+a)/2;if(o===a)l=0,u=0;else{const c=a-o;switch(u=d<=.5?c/(a+o):c/(2-a-o),a){case i:l=(n-s)/c+(n<s?6:0);break;case n:l=(s-i)/c+2;break;case s:l=(i-n)/c+4;break}l/=6}return e.h=l,e.s=u,e.l=d,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,n=Ke.b;return e!==At?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(n*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(gn);const i=ps(ti.h,gn.h,t),n=ps(ti.s,gn.s,t),s=ps(ti.l,gn.l,t);return this.setHSL(i,n,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,n=this.b,s=e.elements;return this.r=s[0]*t+s[3]*i+s[6]*n,this.g=s[1]*t+s[4]*i+s[7]*n,this.b=s[2]*t+s[5]*i+s[8]*n,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 jr;jr.NAMES=Vu;let Iv=0;class Pv extends Zn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Iv++}),this.uuid=Lr(),this.name="",this.type="Material",this.blending=Bo,this.side=ta,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=ko,this.blendDst=Eo,this.blendEquation=qo,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new jr(0,0,0),this.blendAlpha=0,this.depthFunc=Fo,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Po,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 n=this[t];if(n===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.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!==Bo&&(i.blending=this.blending),this.side!==ta&&(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!==ko&&(i.blendSrc=this.blendSrc),this.blendDst!==Eo&&(i.blendDst=this.blendDst),this.blendEquation!==qo&&(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!==Fo&&(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!==Po&&(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 n(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=n(e.textures),a=n(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 n=t.length;i=new Array(n);for(let s=0;s!==n;++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 Uu extends Pv{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new jr(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 Ur,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,yn=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=Ro,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 n=0,s=this.itemSize;n<s;n++)this.array[e+n]=t.array[i+n];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++)yn.fromBufferAttribute(this,t),yn.applyMatrix3(e),this.setXY(t,yn.x,yn.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=pr(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=pr(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=pr(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=pr(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=pr(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,n){return e*=this.itemSize,this.normalized&&(t=et(t,this.array),i=et(i,this.array),n=et(n,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this}setXYZW(e,t,i,n,s){return e*=this.itemSize,this.normalized&&(t=et(t,this.array),i=et(i,this.array),n=et(n,this.array),s=et(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,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!==Ro&&(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 ct=new Et,zs=new Kt,Ui=new P,at=new Vr,vr=new Vr,$e=new P;class Ra extends Zn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Hv++}),this.uuid=Lr(),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 ci().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const n=this.attributes.tangent;return n!==void 0&&(n.transformDirection(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ct.makeRotationFromQuaternion(e),this.applyMatrix4(ct),this}rotateX(e){return ct.makeRotationX(e),this.applyMatrix4(ct),this}rotateY(e){return ct.makeRotationY(e),this.applyMatrix4(ct),this}rotateZ(e){return ct.makeRotationZ(e),this.applyMatrix4(ct),this}translate(e,t,i){return ct.makeTranslation(e,t,i),this.applyMatrix4(ct),this}scale(e,t,i){return ct.makeScale(e,t,i),this.applyMatrix4(ct),this}lookAt(e){return zs.lookAt(e),zs.updateMatrix(),this.applyMatrix4(zs.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 n=0,s=e.length;n<s;n++){const a=e[n];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 n=0;n<i;n++){const s=e[n];t.setXYZ(n,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 Vr);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,n=t.length;i<n;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 Nu);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];vr.setFromBufferAttribute(o),this.morphTargetsRelative?($e.addVectors(at.min,vr.min),at.expandByPoint($e),$e.addVectors(at.max,vr.max),at.expandByPoint($e)):(at.expandByPoint(vr.min),at.expandByPoint(vr.max))}at.getCenter(i);let n=0;for(let s=0,a=e.count;s<a;s++)$e.fromBufferAttribute(e,s),n=Math.max(n,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,d=o.count;u<d;u++)$e.fromBufferAttribute(o,u),l&&(Ui.fromBufferAttribute(e,u),$e.add(Ui)),n=Math.max(n,i.distanceToSquared($e))}this.boundingSphere.radius=Math.sqrt(n),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,n=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,d=new P,c=new P,h=new kt,p=new kt,m=new kt,g=new P,y=new P;function w(L,E,D){u.fromBufferAttribute(i,L),d.fromBufferAttribute(i,E),c.fromBufferAttribute(i,D),h.fromBufferAttribute(s,L),p.fromBufferAttribute(s,E),m.fromBufferAttribute(s,D),d.sub(u),c.sub(u),p.sub(h),m.sub(h);const U=1/(p.x*m.y-m.x*p.y);isFinite(U)&&(g.copy(d).multiplyScalar(m.y).addScaledVector(c,-p.y).multiplyScalar(U),y.copy(c).multiplyScalar(p.x).addScaledVector(d,-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 x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let L=0,E=x.length;L<E;++L){const D=x[L],U=D.start,G=D.count;for(let ee=U,te=U+G;ee<te;ee+=3)w(e.getX(ee+0),e.getX(ee+1),e.getX(ee+2))}const b=new P,S=new P,q=new P,M=new P;function B(L){q.fromBufferAttribute(n,L),M.copy(q);const E=o[L];b.copy(E),b.sub(q.multiplyScalar(q.dot(E))).normalize(),S.crossVectors(M,E);const U=S.dot(l[L])<0?-1:1;a.setXYZW(L,b.x,b.y,b.z,U)}for(let L=0,E=x.length;L<E;++L){const D=x[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 n=new P,s=new P,a=new P,o=new P,l=new P,u=new P,d=new P,c=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);n.fromBufferAttribute(t,m),s.fromBufferAttribute(t,g),a.fromBufferAttribute(t,y),d.subVectors(a,s),c.subVectors(n,s),d.cross(c),o.fromBufferAttribute(i,m),l.fromBufferAttribute(i,g),u.fromBufferAttribute(i,y),o.add(d),l.add(d),u.add(d),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)n.fromBufferAttribute(t,h+0),s.fromBufferAttribute(t,h+1),a.fromBufferAttribute(t,h+2),d.subVectors(a,s),c.subVectors(n,s),d.cross(c),i.setXYZ(h+0,d.x,d.y,d.z),i.setXYZ(h+1,d.x,d.y,d.z),i.setXYZ(h+2,d.x,d.y,d.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,d=o.itemSize,c=o.normalized,h=new u.constructor(l.length*d);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]*d;for(let w=0;w<d;w++)h[m++]=u[p++]}return new Qi(h,d,c)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Ra,i=this.index.array,n=this.attributes;for(const o in n){const l=n[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 d=0,c=u.length;d<c;d++){const h=u[d],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 n={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],d=[];for(let c=0,h=u.length;c<h;c++){const p=u[c];d.push(p.toJSON(e.data))}d.length>0&&(n[l]=d,s=!0)}s&&(e.data.morphAttributes=n,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 n=e.attributes;for(const u in n){const d=n[u];this.setAttribute(u,d.clone(t))}const s=e.morphAttributes;for(const u in s){const d=[],c=s[u];for(let h=0,p=c.length;h<p;h++)d.push(c[h].clone(t));this.morphAttributes[u]=d}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let u=0,d=a.length;u<d;u++){const c=a[u];this.addGroup(c.start,c.count,c.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 Qo=new Et,bi=new Bv,vn=new Nu,el=new P,bn=new P,xn=new P,wn=new P,Ts=new P,_n=new P,tl=new P,Cn=new P;class Nv extends Kt{constructor(e=new Ra,t=new Uu){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 n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const o=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}getVertexPosition(e,t){const i=this.geometry,n=i.attributes.position,s=i.morphAttributes.position,a=i.morphTargetsRelative;t.fromBufferAttribute(n,e);const o=this.morphTargetInfluences;if(s&&o){_n.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const d=o[l],c=s[l];d!==0&&(Ts.fromBufferAttribute(c,e),a?_n.addScaledVector(Ts,d):_n.addScaledVector(Ts.sub(t),d))}t.add(_n)}return t}raycast(e,t){const i=this.geometry,n=this.material,s=this.matrixWorld;n!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),vn.copy(i.boundingSphere),vn.applyMatrix4(s),bi.copy(e.ray).recast(e.near),!(vn.containsPoint(bi.origin)===!1&&(bi.intersectSphere(vn,el)===null||bi.origin.distanceToSquared(el)>(e.far-e.near)**2))&&(Qo.copy(s).invert(),bi.copy(e.ray).applyMatrix4(Qo),!(i.boundingBox!==null&&bi.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,bi)))}_computeIntersections(e,t,i){let n;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,u=s.attributes.uv,d=s.attributes.uv1,c=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],w=a[y.materialIndex],x=Math.max(y.start,p.start),b=Math.min(o.count,Math.min(y.start+y.count,p.start+p.count));for(let S=x,q=b;S<q;S+=3){const M=o.getX(S),B=o.getX(S+1),L=o.getX(S+2);n=Sn(this,w,e,i,u,d,c,M,B,L),n&&(n.faceIndex=Math.floor(S/3),n.face.materialIndex=y.materialIndex,t.push(n))}}else{const m=Math.max(0,p.start),g=Math.min(o.count,p.start+p.count);for(let y=m,w=g;y<w;y+=3){const x=o.getX(y),b=o.getX(y+1),S=o.getX(y+2);n=Sn(this,a,e,i,u,d,c,x,b,S),n&&(n.faceIndex=Math.floor(y/3),t.push(n))}}else if(l!==void 0)if(Array.isArray(a))for(let m=0,g=h.length;m<g;m++){const y=h[m],w=a[y.materialIndex],x=Math.max(y.start,p.start),b=Math.min(l.count,Math.min(y.start+y.count,p.start+p.count));for(let S=x,q=b;S<q;S+=3){const M=S,B=S+1,L=S+2;n=Sn(this,w,e,i,u,d,c,M,B,L),n&&(n.faceIndex=Math.floor(S/3),n.face.materialIndex=y.materialIndex,t.push(n))}}else{const m=Math.max(0,p.start),g=Math.min(l.count,p.start+p.count);for(let y=m,w=g;y<w;y+=3){const x=y,b=y+1,S=y+2;n=Sn(this,a,e,i,u,d,c,x,b,S),n&&(n.faceIndex=Math.floor(y/3),t.push(n))}}}}function Vv(r,e,t,i,n,s,a,o){let l;if(e.side===cv?l=i.intersectTriangle(a,s,n,!0,o):l=i.intersectTriangle(n,s,a,e.side===ta,o),l===null)return null;Cn.copy(o),Cn.applyMatrix4(r.matrixWorld);const u=t.ray.origin.distanceTo(Cn);return u<t.near||u>t.far?null:{distance:u,point:Cn.clone(),object:r}}function Sn(r,e,t,i,n,s,a,o,l,u){r.getVertexPosition(o,bn),r.getVertexPosition(l,xn),r.getVertexPosition(u,wn);const d=Vv(r,e,t,i,bn,xn,wn,tl);if(d){const c=new P;Bt.getBarycoord(tl,bn,xn,wn,c),n&&(d.uv=Bt.getInterpolatedAttribute(n,o,l,u,c,new kt)),s&&(d.uv1=Bt.getInterpolatedAttribute(s,o,l,u,c,new kt)),a&&(d.normal=Bt.getInterpolatedAttribute(a,o,l,u,c,new P),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const h={a:o,b:l,c:u,normal:new P,materialIndex:0};Bt.getNormal(bn,xn,wn,h.normal),d.face=h,d.barycoord=c}return d}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:$u}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=$u);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 ju={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 il(r){return{name:r.name,value:r,key:r.uuid,label:r.type,type:r.type,icon:ju[r.type.toLowerCase()]||"i-carbon-cube",defaultExpanded:r.isScene,memorySize:Math.round(uv(r)/1024),children:[]}}function jv(r){function e(i,n){i.children.forEach(s=>{if(s.type==="HighlightMesh")return;const a=il(s);n.children.push(a),e(s,a)})}const t=il(r);return e(r,t),t}function Gi(r,e="root",t="root",i=new WeakSet){const n=typeof r;if(r===null||n!=="object")return{label:e,type:n,path:t,value:r,defaultExpanded:t==="root"};if(i.has(r))return{label:e,type:"circular",path:t,value:"[Circular]",defaultExpanded:t==="root"};if(i.add(r),Array.isArray(r))return{label:e,type:"array",path:t,value:`Array[${r.length}]`,defaultExpanded:t==="root",children:r.map((o,l)=>Gi(o,String(l),`${t}[${l}]`,i))};const s=[],a=r.constructor?.name||"Object";if(a==="_Euler"){const o=r,l=["x","y","z","order"];for(const u of l){const d=o[u],c=t==="root"?u:`${t}.${u}`;s.push(Gi(d,u,c,i))}}else if(a==="Quaternion"){const o=r,l=["x","y","z","w"];for(const u of l){const d=o[u],c=t==="root"?u:`${t}.${u}`;s.push(Gi(d,u,c,i))}}else if(a==="_Vector3"){const o=r,l=["x","y","z"];for(const u of l){const d=o[u],c=t==="root"?u:`${t}.${u}`;s.push(Gi(d,u,c,i))}}else for(const o of Object.keys(r)){if(o.startsWith("_")||o.startsWith("$")||o==="__v_isRef"||o==="__v_isReactive"||o==="__v_isShallow"||o==="__v_raw"||o==="__v_isReadonly")continue;const l=r[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(r){const e=new Uu({color:11003607,transparent:!0,opacity:.2,depthTest:!1,side:hv});return new Uv(r.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"},Yv=z({__name:"MaterialBadge",props:{material:{},displayValue:{}},setup(r){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 n(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=di;return e(s.material)?(v(),C(o,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:_(()=>[t(s.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(s.material)})},null,4)):i(s.material)?(v(),V("div",Wv)):(v(),V("div",Kv)),I("span",{class:T(n(s.material))},Z(s.displayValue),3)]),_:1})):R("",!0)}}}),Xv=Object.assign(Yv,{__name:"InspectorMaterialBadge"}),Jv=z({__name:"GeometryBadge",props:{geometry:{},displayValue:{}},setup(r){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 n(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=di;return t(s.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(s.geometry),class:"w-3 h-3 text-gray-600"},null,8,["name"]),I("span",{class:T(n(s.geometry))},Z(s.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"},rb={class:"flex items-center gap-1 min-w-0"},nb={key:0,class:"flex items-center gap-1 ml-1"},sb=z({__name:"Props",props:{object:{}},emits:["update-value"],setup(r,{emit:e}){const t=e,i=r,n=k(()=>ju[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 w=l(i.object,y);return{key:y,value:a(y,w),displayValue:u(y,w)}}).filter(y=>y.value!==void 0)});function l(m,g){return g.split(".").reduce((y,w)=>y&&typeof y=="object"&&w in y?y[w]:void 0,m)}function u(m,g){return g==null?"undefined":d(g)?"vector":c(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 d(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 c(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,w=di,x=Ay,b=lt,S=nv,q=zu;return v(),V("div",Qv,[I("div",eb,[F(y,{name:n.value,class:"w-4 h-4 text-gray-600 flex-shrink-0"},null,8,["name"]),I("span",tb,Z(m.object.type),1),m.object.name?(v(),C(w,{key:0,variant:"soft",size:"xs",class:"ml-2"},{default:_(()=>[de(Z(m.object.name),1)]),_:1})):R("",!0)]),I("div",ib,[(v(!0),V(we,null,Ye(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",rb,[I("span",null,Z(M.key)+" :",1),d(M.value)?(v(),V("div",nb,[F(x,{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(x,{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(x,{modelValue:M.value.z,"onUpdate:modelValue":[B=>M.value.z=B,B=>t("update-value",M.key+".z",B)]},null,8,["modelValue","onUpdate:modelValue"])])):c(M.value)?(v(),C(Xv,{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(b,{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(x,{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(Iu)(M.value)},M.displayValue==="vector"&&{label:"Copy as prop",icon:"i-material-symbols:data-array",onSelect:()=>f(Tu)({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(Ru)({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(Pu)({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(Du)({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(b,{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(r){const e=r,t=Ge(),i=Te(),n=Or(Ft(e,"as","decorative","orientation")),s=k(()=>ce({extend:ce(ob),...i.ui?.separator||{}})({color:e.color,orientation:e.orientation,size:e.size,type:e.type}));return(a,o)=>(v(),C(f(Um),H(f(n),{class:s.value.root({class:[e.ui?.root,e.class]})}),{default:_(()=>[I("div",{class:T(s.value.border({class:e.ui?.border}))},null,2),r.label||r.icon||r.avatar||t.default?(v(),V(we,{key:0},[I("div",{class:T(s.value.container({class:e.ui?.container}))},[A(a.$slots,"default",{},()=>[r.label?(v(),V("span",{key:0,class:T(s.value.label({class:e.ui?.label}))},Z(r.label),3)):r.icon?(v(),C(Pe,{key:1,name:r.icon,class:T(s.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):r.avatar?(v(),C(or,H({key:2,size:e.ui?.avatarSize||s.value.avatarSize()},r.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"}},db=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:qn({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:qn(["change"],["update:modelValue"]),setup(r,{emit:e}){const t=r,i=Ge(),n=e,s=la(r,"modelValue",{type:[Boolean,String],default:void 0}),a=Te(),o=Or(Ft(t,"required","value","defaultValue")),{id:l,emitFormChange:u,emitFormInput:d,size:c,color:h,name:p,disabled:m,ariaAttrs:g}=da(t),y=l.value??ol(),w=k(()=>ce({extend:ce(ub),...a.ui?.checkbox||{}})({size:c.value,color:h.value,variant:t.variant,indicator:t.indicator,required:t.required,disabled:m.value}));function x(b){const S=new Event("change",{target:{value:b}});n("change",S),u(),d()}return(b,S)=>(v(),C(f(ne),{as:!r.variant||r.variant==="list"?r.as:f(uo),class:T(w.value.root({class:[t.ui?.root,t.class]}))},{default:_(()=>[I("div",{class:T(w.value.container({class:t.ui?.container}))},[F(f(nh),H({id:f(y)},{...f(o),...b.$attrs,...f(g)},{modelValue:s.value,"onUpdate:modelValue":[S[0]||(S[0]=q=>s.value=q),x],name:f(p),disabled:f(m),class:w.value.base({class:t.ui?.base})}),{default:_(({modelValue:q})=>[F(f(ah),{class:T(w.value.indicator({class:t.ui?.indicator}))},{default:_(()=>[q==="indeterminate"?(v(),C(Pe,{key:0,name:r.indeterminateIcon||f(a).ui.icons.minus,class:T(w.value.icon({class:t.ui?.icon}))},null,8,["name","class"])):(v(),C(Pe,{key:1,name:r.icon||f(a).ui.icons.check,class:T(w.value.icon({class:t.ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","modelValue","name","disabled","class"])],2),r.label||i.label||r.description||i.description?(v(),V("div",{key:0,class:T(w.value.wrapper({class:t.ui?.wrapper}))},[r.label||i.label?(v(),C(sr(!r.variant||r.variant==="list"?f(uo):"p"),{key:0,for:f(y),class:T(w.value.label({class:t.ui?.label}))},{default:_(()=>[A(b.$slots,"label",{label:r.label},()=>[de(Z(r.label),1)])]),_:3},8,["for","class"])):R("",!0),r.description||i.description?(v(),V("p",{key:1,class:T(w.value.description({class:t.ui?.description}))},[A(b.$slots,"description",{description:r.description},()=>[de(Z(r.description),1)])],2)):R("",!0)],2)):R("",!0)]),_:3},8,["as","class"]))}}),cb={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(r,{expose:e,emit:t}){const i=r,n=t,s=Ge(),a=wg(i,"modelValue",n,{defaultValue:i.defaultValue}),o=Te(),{emitFormBlur:l,emitFormInput:u,emitFormChange:d,size:c,color:h,id:p,name:m,highlight:g,disabled:y,emitFormFocus:w,ariaAttrs:x}=da(i,{deferInputValidation:!0}),{orientation:b,size:S}=ua(i),{isLeading:q,isTrailing:M,leadingIconName:B,trailingIconName:L}=pl(i),E=k(()=>S.value||c.value),D=k(()=>ce({extend:ce(cb),...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:b.value})),U=O(null);function G(Q){i.modelModifiers?.trim&&(Q=Q?.trim()??null),(i.modelModifiers?.number||i.type==="number")&&(Q=Gd(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()),d(),n("change",Q)}function re(Q){l(),n("blur",Q)}function K(){i.autofocus&&U.value?.focus()}return Re(()=>{setTimeout(()=>{K()},i.autofocusDelay)}),e({inputRef:U}),(Q,J)=>(v(),C(f(ne),{as:r.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:r.type,value:f(a),name:f(m),placeholder:r.placeholder,class:D.value.base({class:i.ui?.base}),disabled:f(y),required:r.required,autocomplete:r.autocomplete},{...Q.$attrs,...f(x)},{onInput:ee,onBlur:re,onChange:te,onFocus:J[0]||(J[0]=(...he)=>f(w)&&f(w)(...he))}),null,16,hb),A(Q.$slots,"default"),f(q)||r.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"])):r.avatar?(v(),C(or,H({key:1,size:i.ui?.leadingAvatarSize||D.value.leadingAvatarSize()},r.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(r,{emit:e}){const t=r,i=e,n=O(t.node.defaultExpanded??!1),s=O(null),a=()=>{n.value=!n.value},o=b=>typeof b=="boolean"?"text-blue-500":typeof b=="number"?"text-green-500":typeof b=="string"?"text-red-500":typeof b>"u"?"text-gray-400":"text-gray-600",l=b=>typeof b=="boolean"?b?"true":"false":typeof b=="number"?b.toString():typeof b=="string"?`"${b}"`:b===null?"null":typeof b>"u"?"undefined":"object",u=()=>{if(typeof t.node.value=="number"){const b=t.node.value+1;i("update-value",t.node.path,b)}},d=()=>{if(typeof t.node.value=="number"){const b=t.node.value-1;i("update-value",t.node.path,b)}},c=b=>{i("update-value",t.node.path,b)},h=()=>{const b=typeof t.node.value=="string"?t.node.value:JSON.stringify(t.node.value);s.value={path:t.node.path,value:b}},p=()=>{if(s.value)try{const{value:b}=s.value;let S=b;Number.isNaN(Number(b))?(b.toLowerCase()==="true"||b.toLowerCase()==="false")&&(S=b.toLowerCase()==="true"):S=Number(b),i("update-value",t.node.path,S)}catch(b){console.error("Failed to apply edit:",b)}finally{s.value=null}},m=()=>{s.value=null},g=b=>{b.key==="Enter"?p():b.key==="Escape"&&m()},y=k(()=>t.node.children&&t.node.children.length>0),w=k(()=>!y.value),x=k(()=>({paddingLeft:`${t.level*16}px`}));return(b,S)=>{const q=Pe,M=lt,B=zu,L=db,E=fb,D=vu,U=Gu;return v(),V("div",pb,[I("div",{style:qt(x.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:n.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,[b.node.type==="object"||b.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)},[de(Z(b.node.label)+" : ",1),I("span",yb,Z(b.node.value),1)]),b.node.type!=="array"?(v(),C(B,{key:0,size:"xs",items:[{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>f(Mo)(b.node.path)},{label:"Copy value as Array",icon:"i-material-symbols:data-array",onSelect:()=>f(ov)(b.node)},b.node.value==="_Vector3"?{label:"Copy value as Vector3",icon:"i-lucide:pen-line",onSelect:()=>f(Pu)(b.node)}:null,b.node.value==="_Euler"?{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>f(Ru)(b.node)}:null,b.node.value==="_Quaternion"?{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>f(Du)(b.node)}:null,{label:"Copy value as JSON",icon:"i-material-symbols:data-object",onSelect:()=>f(lv)(b.node)},b.node.value==="_Vector3"||b.node.value==="_Euler"||b.node.value==="_Quaternion"?{label:"Copy as Prop",icon:"i-lucide:code",onSelect:()=>f(av)(b.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(b.node.label)+" :",1),typeof b.node.value=="boolean"?(v(),C(L,{key:0,"model-value":b.node.value,size:"xs","onUpdate:modelValue":c,onClick:S[1]||(S[1]=fe(()=>{},["stop"]))},null,8,["model-value"])):s.value?.path===b.node.path&&typeof b.node.value!="number"&&typeof b.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===b.node.path&&typeof b.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 b.node.value!="boolean"?(v(),V("span",{key:3,class:T([o(b.node.value),"cursor-pointer hover:bg-gray-100 px-1 py-0.5 rounded"]),onClick:fe(h,["stop"])},Z(l(b.node.value)),3)):R("",!0)],64)),w.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 b.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(d,["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(Iu)(b.node.value)},{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>f(Mo)(b.node.path)},{label:"Copy as prop",icon:"i-lucide:pen-line",onSelect:()=>f(Tu)(b.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&&n.value?(v(!0),V(we,{key:0},Ye(b.node.children,G=>(v(),C(U,{key:`${G.path}-${G.label}`,node:G,level:b.level+1,"selected-object":b.selectedObject,onUpdateValue:S[9]||(S[9]=(ee,te)=>i("update-value",ee,te))},null,8,["node","level","selected-object"]))),128)):R("",!0)])}}}),Gu=Object.assign(vb,{__name:"InspectorTree"});function bb(r){let e=0;return r.traverse(t=>{t.isObject3D&&e++}),e}function xb(){const r={scene:is({objects:0,graph:null,value:void 0,selected:void 0,assets:[]}),fps:is({value:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),memory:is({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 n=i.scene.value.uuid;n!==e&&(r.scene.value=i.scene.value,r.scene.objects=bb(i.scene.value),r.scene.graph=jv(i.scene.value),e=n)}else r.scene.value=void 0,r.scene.graph=null,e=null;i.renderer?.instance?.info&&(Object.assign(r.renderer.info.render,i.renderer.instance.info.render),Object.assign(r.renderer.info.memory,i.renderer.instance.info.memory),r.renderer.info.programs=[...i.renderer.instance.info.programs||[]])}else if(t.type==="performance"){const i=t.data;Object.assign(r.fps,i.fps),r.fps.accumulator=[...i.fps.accumulator],Object.assign(r.memory,i.memory),r.memory.accumulator=[...i.memory.accumulator]}}),r}const Da=oa(xb),wb={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},_b={key:0,class:"relative isolate"},Cb=z({__name:"index",setup(r){const{scene:e}=Da(),t=tt(null),i=tt(null),n=O(0);function s(d){t.value&&t.value.remove(i.value),d&&d.isMesh&&(i.value=Gv(d),d.add(Pt(i))),t.value=d,n.value++}const a=k(()=>(n.value,Gi(t.value))),o=(d,c)=>{t.value&&(l(t.value,d,c),d.includes("color")||n.value++)},l=(d,c,h)=>{if(!d||typeof d!="object")return;const p=c.split(".");let m=d;for(let x=0;x<p.length-1;x++){const b=p[x];if(m[b]&&typeof m[b]=="object")m=m[b];else return}const g=p[p.length-1],y=x=>typeof x=="string"&&/^#[0-9a-f]{6}$/i.test(x);m[g]=y(h)?new jr(h):h;const w=d;w.isCamera&&u(c)&&w.updateProjectionMatrix()},u=d=>{const c=["fov","aspect","near","far","left","right","top","bottom"],h=d.split(".").pop();return c.includes(h||"")};return(d,c)=>{const h=gu,p=yu,m=ab,g=lb,y=Gu;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:n.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"],Is=40,rl=2,Mb=z({__name:"DevtoolsGraph",props:{points:{default:()=>[]},value:{default:0},unit:{default:""},label:{default:""},color:{default:"primary"}},setup(r){const e=r,t=O(140);gt(()=>{const n=Math.max(...e.points,30);t.value=Math.max(n,t.value)});const i=k(()=>e.points.map((n,s)=>`${s*rl},${Is-n*Is/t.value}`).join(" "));return(n,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:Is,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(r){const e=r,t=Ge(),i=Te(),n=k(()=>ce({extend:ce(qb),...i.ui?.card||{}})({variant:e.variant}));return(s,a)=>(v(),C(f(ne),{as:r.as,class:T(n.value.root({class:[e.ui?.root,e.class]}))},{default:_(()=>[t.header?(v(),V("div",{key:0,class:T(n.value.header({class:e.ui?.header}))},[A(s.$slots,"header")],2)):R("",!0),t.default?(v(),V("div",{key:1,class:T(n.value.body({class:e.ui?.body}))},[A(s.$slots,"default")],2)):R("",!0),t.footer?(v(),V("div",{key:2,class:T(n.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(r){const e=O(!1);return(t,i)=>{const n=di;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))},[t.depth>0?(v(),V("span",Fb)):R("",!0),I("div",Ob,[I("i",{class:T(t.item.icon)},null,2),de(" "+Z(t.item.type)+" ",1),t.item.name?(v(),C(n,{key:0,variant:"soft"},{default:_(()=>[de(Z(t.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,Ye(Object.entries(t.item.uniforms.map),([s,a])=>(v(),V("div",{key:s},[de(Z(s)+" ",1),F(n,{color:"gray",variant:"soft"},{default:_(()=>[de(Z(a?.cache[a?.cache.length-1]),1)]),_:2},1024)]))),128))])])):R("",!0)])}}}),Pb=Object.assign(Ib,{__name:"ProgramsModuleItem"}),Rb=z({__name:"ProgramsModule",setup(r){const{renderer:e}=Da(),t={shaderMaterial:"i-file-icons-vertexshader"},i=k(()=>e.info.programs.map(n=>({...n,icon:t[n.type]||"i-file-icons-vertexshader",uniforms:n.getUniforms(),attributes:n.getAttributes()})));return(n,s)=>{const a=Pb;return v(!0),V(we,null,Ye(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"},Yb={class:"font-mono font-semibold"},Xb={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"},r0={class:"text-center p-4 bg-gray-50 dark:bg-gray-800 rounded-lg"},n0={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"},d0={class:"font-mono font-bold"},c0={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(r){const{fps:e,memory:t,renderer:i}=Da(),n=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=di,d=Bb,c=kb,h=yu,p=Db;return v(),V("div",$b,[I("div",Lb,[F(c,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(n).color,variant:"soft",size:"sm"},{default:_(()=>[de(Z(f(n).label),1)]),_:1},8,["color"])])]),default:_(()=>[I("div",Vb,[F(d,{points:f(e).accumulator,value:f(e).value,color:"primary",unit:"FPS",label:"FPS"},null,8,["points","value"])])]),_:1}),F(c,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:_(()=>[de(Z(f(s).label),1)]),_:1},8,["color"])])]),default:_(()=>[I("div",Gb,[F(d,{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",Yb,Z(Math.round(f(t).maxMemory))+" MB ",1)])])])]),_:1})]),I("div",Xb,[F(c,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",r0,[I("div",n0,[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(dv)(f(t).allocatedMem)} KB allocated by 3D objects`},null,8,["description"])])]),_:1}),F(c,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",d0,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",c0,[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(c,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(r,{expose:e,emit:t}){const i=r,n=t,s=Ge(),a=Te(),o=Ce(Ft(i,"as","modelValue","defaultValue","orientation","activationMode","unmountOnHide"),n),l=k(()=>ce({extend:ce(C0),...a.ui?.tabs||{}})({color:i.color,variant:i.variant,size:i.size,orientation:i.orientation})),u=O([]);return e({triggersRef:u}),(d,c)=>(v(),C(f(Wm),H(f(o),{class:l.value.root({class:[i.ui?.root,i.class]})}),{default:_(()=>[F(f(Qm),{class:T(l.value.list({class:i.ui?.list}))},{default:_(()=>[F(f(Jm),{class:T(l.value.indicator({class:i.ui?.indicator}))},null,8,["class"]),A(d.$slots,"list-leading"),(v(!0),V(we,null,Ye(r.items,(h,p)=>(v(),C(f(tg),{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(d.$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(or,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(d.$slots,"default",{item:h,index:p},()=>[de(Z(f(xi)(h,i.labelKey)),1)])],2)):R("",!0),A(d.$slots,"trailing",{item:h,index:p},()=>[h.badge!==void 0?(v(),C(di,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(d.$slots,"list-trailing")]),_:3},8,["class"]),r.content?(v(!0),V(we,{key:0},Ye(r.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(d.$slots,h.slot||"content",{item:h,index:p},()=>[de(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"},k0=z({__name:"index",setup(r){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 n=my,s=Sb,a=_0,o=S0;return v(),V("div",A0,[F(n),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{k0 as default};
|