@galacean/cli 2.0.0-alpha.26 → 2.0.0-alpha.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.bundle.cjs +55252 -18754
- package/dist/preview-client/_static/{Accordion-2cd014f1.js → Accordion-6f002a96.js} +1 -1
- package/dist/preview-client/_static/{AmbientLightAsset-be9e872c.js → AmbientLightAsset-57a59fc2.js} +2 -2
- package/dist/preview-client/_static/{AnimationClipAsset-d7b37af0.js → AnimationClipAsset-0a1f63eb.js} +1 -1
- package/dist/preview-client/_static/{AnimatorControllerAsset-2716497a.js → AnimatorControllerAsset-9192e596.js} +1 -1
- package/dist/preview-client/_static/{AnimatorStore-883a28ad.js → AnimatorStore-484b10cf.js} +1 -1
- package/dist/preview-client/_static/{AssetViewer-3847c058.js → AssetViewer-9f395efb.js} +1 -1
- package/dist/preview-client/_static/{AudioAsset-c28f33ab.js → AudioAsset-0ea4ba7b.js} +1 -1
- package/dist/preview-client/_static/{AudioComponent-3d6c73ce.js → AudioComponent-9bf5944c.js} +1 -1
- package/dist/preview-client/_static/{Callout-e2a89f6f.js → Callout-45631a14.js} +1 -1
- package/dist/preview-client/_static/{CameraComponent-3dc63451.js → CameraComponent-039457d1.js} +1 -1
- package/dist/preview-client/_static/{Component-0f881fc1.js → Component-c3c0c167.js} +1 -1
- package/dist/preview-client/_static/{DirectLight-96dbba47.js → DirectLight-7b1f4b9f.js} +1 -1
- package/dist/preview-client/_static/{FontAsset-d34b5378.js → FontAsset-10273d05.js} +2 -2
- package/dist/preview-client/_static/{FormItemArray-b8cda1d2.js → FormItemArray-9d4196d8.js} +2 -2
- package/dist/preview-client/_static/{GlTFAsset-5970e707.js → GlTFAsset-917bf1ee.js} +5 -5
- package/dist/preview-client/_static/{IconPlus-def01e2b.js → IconPlus-2bfc60da.js} +1 -1
- package/dist/preview-client/_static/{IconPointFilled-62d3c3b2.js → IconPointFilled-192e99c9.js} +1 -1
- package/dist/preview-client/_static/{LightBaseComponent-d651a276.js → LightBaseComponent-948d3192.js} +1 -1
- package/dist/preview-client/_static/{LottieAnimationComponent-f10dc558.js → LottieAnimationComponent-da226765.js} +1 -1
- package/dist/preview-client/_static/{MarkdownAsset-b2a3fad5.js → MarkdownAsset-602f93bf.js} +1 -1
- package/dist/preview-client/_static/MaterialAsset-aa93db51.js +1 -0
- package/dist/preview-client/_static/{MaterialInspector-8d466d59.js → MaterialInspector-45e208c7.js} +1 -1
- package/dist/preview-client/_static/Menu-beacc39d.js +17 -0
- package/dist/preview-client/_static/MeshAsset-585f4b18.js +1 -0
- package/dist/preview-client/_static/{MeshRendererBaseComponent-fde6b6a5.js → MeshRendererBaseComponent-0bc9f5b3.js} +1 -1
- package/dist/preview-client/_static/{MeshRendererComponent-430774ef.js → MeshRendererComponent-84208d23.js} +1 -1
- package/dist/preview-client/_static/{MeshThumbnail-07ffa076.js → MeshThumbnail-9bbe01dc.js} +1 -1
- package/dist/preview-client/_static/ParticleRendererComponent-f3ac8d1b.js +26 -0
- package/dist/preview-client/_static/{PhysicsMaterialAsset-a2f73b5c.js → PhysicsMaterialAsset-2dd013f8.js} +1 -1
- package/dist/preview-client/_static/{PhysicsStore-818c2f61.js → PhysicsStore-fcb01282.js} +1 -1
- package/dist/preview-client/_static/{PointLight-add790ea.js → PointLight-d9ace100.js} +1 -1
- package/dist/preview-client/_static/{PostProcessComponent-af270a77.js → PostProcessComponent-2b5255d9.js} +3 -3
- package/dist/preview-client/_static/PrefabAsset-8c923465.js +1 -0
- package/dist/preview-client/_static/{PrimitiveMesh-075dda8a.js → PrimitiveMesh-fde624a6.js} +1 -1
- package/dist/preview-client/_static/{ReferencedMaterial-d11151b5.js → ReferencedMaterial-890492a2.js} +1 -1
- package/dist/preview-client/_static/{RenderTargetAsset-b3cd1c49.js → RenderTargetAsset-bf38a725.js} +1 -1
- package/dist/preview-client/_static/SceneAsset-7a9dbdd8.js +1 -0
- package/dist/preview-client/_static/{ShaderAsset-a9d667f5.js → ShaderAsset-2f2c1e95.js} +12 -12
- package/dist/preview-client/_static/{ShaderChunkAsset-e43dde8a.js → ShaderChunkAsset-a3ff3959.js} +2 -2
- package/dist/preview-client/_static/{ShaderUIScriptAsset-e1cd0b8b.js → ShaderUIScriptAsset-d3a2d680.js} +1 -1
- package/dist/preview-client/_static/{SkinnedMeshRendererComponent-9756bd5f.js → SkinnedMeshRendererComponent-96740600.js} +1 -1
- package/dist/preview-client/_static/{SpineAnimationComponent-f3e0ff44.js → SpineAnimationComponent-3d4eec48.js} +1 -1
- package/dist/preview-client/_static/{SpineSkeletonDataAsset-43b731f1.js → SpineSkeletonDataAsset-a8598103.js} +1 -1
- package/dist/preview-client/_static/{SpotLight-649b0e21.js → SpotLight-680a6e17.js} +1 -1
- package/dist/preview-client/_static/{SpriteBaseComponent-d2a7ab4c.js → SpriteBaseComponent-96a500d7.js} +1 -1
- package/dist/preview-client/_static/{SpriteMaskComponent-2c1cef5e.js → SpriteMaskComponent-58c35ea2.js} +1 -1
- package/dist/preview-client/_static/{SpriteRendererComponent-33b71997.js → SpriteRendererComponent-5c89f7dd.js} +1 -1
- package/dist/preview-client/_static/{TextBaseComponent-9310e0c6.js → TextBaseComponent-248ea222.js} +3 -3
- package/dist/preview-client/_static/{TextRendererComponent-8dc0d7fb.js → TextRendererComponent-78458825.js} +1 -1
- package/dist/preview-client/_static/{TextureAsset-a7ff39b1.js → TextureAsset-bf69040b.js} +4 -4
- package/dist/preview-client/_static/Tooltip-0268ffac.js +1 -0
- package/dist/preview-client/_static/{TrailRendererComponent-c4635fab.js → TrailRendererComponent-838e0118.js} +1 -1
- package/dist/preview-client/_static/{TransformBaseComponent-1473deaa.js → TransformBaseComponent-c92aa259.js} +1 -1
- package/dist/preview-client/_static/{TransformComponent-e544f7ac.js → TransformComponent-d28b4035.js} +1 -1
- package/dist/preview-client/_static/{XRReferenceImageAsset-96f516ba.js → XRReferenceImageAsset-16071f5c.js} +1 -1
- package/dist/preview-client/_static/{audio-b5fbde34.js → audio-1d573775.js} +1 -1
- package/dist/preview-client/_static/{createOnModelChange-370b83da.js → createOnModelChange-38471bb6.js} +1 -1
- package/dist/preview-client/_static/{createReactComponent-58d9f0dd.js → createReactComponent-3e49f864.js} +1 -1
- package/dist/preview-client/_static/index-0a57ae09.js +1 -0
- package/dist/preview-client/_static/{index-74bcfad9.js → index-1d0ae2e4.js} +1 -1
- package/dist/preview-client/_static/{index-dd0763bf.js → index-1fa3ba70.js} +1 -1
- package/dist/preview-client/_static/index-2c567b8d.js +1 -0
- package/dist/preview-client/_static/{index-da16047f.js → index-2f54d4c9.js} +1 -1
- package/dist/preview-client/_static/{index-0dd5bb36.js → index-4084db44.js} +1 -1
- package/dist/preview-client/_static/index-5c27dafa.js +1 -0
- package/dist/preview-client/_static/{index-88650db7.js → index-65c6af4a.js} +3 -3
- package/dist/preview-client/_static/{index-05b76766.js → index-68806c86.js} +1 -1
- package/dist/preview-client/_static/{index-cdbb2f4d.js → index-8a22fe59.js} +1 -1
- package/dist/preview-client/_static/index-9e3daa94.js +1 -0
- package/dist/preview-client/_static/index-bdda02cf.js +1 -0
- package/dist/preview-client/_static/index-c88f78ce.js +1 -0
- package/dist/preview-client/_static/{index-ab8556cb.js → index-ce381b62.js} +3 -3
- package/dist/preview-client/_static/{index-c3dec278.js → index-d497fb6d.js} +214 -175
- package/dist/preview-client/_static/index-e4fb05d8.js +1 -0
- package/dist/preview-client/_static/{ktx2-encoder-db93524f.js → ktx2-encoder-772f6c33.js} +1 -1
- package/dist/preview-client/_static/{module-ec094ef6.js → module-136992e3.js} +1 -1
- package/dist/preview-client/_static/{module-ada3dced.js → module-1470d524.js} +1 -1
- package/dist/preview-client/_static/{module-de7ee724.js → module-77c2ea8c.js} +1 -1
- package/dist/preview-client/_static/{postmen-2853c0e6.js → postmen-0413c689.js} +2 -2
- package/dist/preview-client/_static/{shader-data-utils-f0e4f5a3.js → shader-data-utils-e38a959d.js} +1 -1
- package/dist/preview-client/index.html +1 -1
- package/package.json +29 -24
- package/dist/preview-client/_static/MaterialAsset-5353c4cb.js +0 -1
- package/dist/preview-client/_static/Menu-c8e6194b.js +0 -17
- package/dist/preview-client/_static/MeshAsset-c2bf60c5.js +0 -1
- package/dist/preview-client/_static/ParticleRendererComponent-e106bd8c.js +0 -26
- package/dist/preview-client/_static/PrefabAsset-59743dbb.js +0 -1
- package/dist/preview-client/_static/SceneAsset-08752701.js +0 -1
- package/dist/preview-client/_static/Tooltip-b5be390f.js +0 -1
- package/dist/preview-client/_static/index-29c59aff.js +0 -1
- package/dist/preview-client/_static/index-3680d0e0.js +0 -1
- package/dist/preview-client/_static/index-42aa3a49.js +0 -1
- package/dist/preview-client/_static/index-496f331d.js +0 -1
- package/dist/preview-client/_static/index-9f0122f0.js +0 -1
- package/dist/preview-client/_static/index-c6b7045c.js +0 -1
- package/dist/preview-client/_static/index-dddcae01.js +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{f4 as _r,av as c,aH as P,bE as a,gA as dt,gB as bc,b8 as pe,gC as Mc,gD as wc,gE as Sc,gF as Rc,gG as yc,gH as Ec,gI as Pc,gJ as _c,gK as Ic,gL as Ac,gM as F,d6 as me,bb as Ne,b9 as $e,be as ee,gN as sn,gO as Ir,gP as Tc,dc as cn,gQ as Nc,gR as $c,ba as U,bd as G,d7 as Ar,d8 as bt,gS as Tr,gT as Nr,gU as $r,gV as J,gW as Or,gX as jr,gY as Dr,gZ as kr,g_ as Lr,g$ as Fr,b5 as un,b6 as ln,d9 as Mt,h0 as Oe,da as Gr,db as ge,bc as R,h1 as dn,dd as Ur,h2 as fn,de as Kr,h3 as Br,df as wt,h4 as Oc,h5 as Nt,h6 as $t,h7 as Ot,h8 as Ee,h9 as er,ha as jt,hb as Dt,hc as kt,hd as Lt,he as Ft,hf as tr,bj as jc,hg as Dc}from"./index-d497fb6d.js";/**
|
|
2
|
+
* @license @tabler/icons-react v3.24.0 - MIT
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var kc=_r("outline","hand-finger","IconHandFinger",[["path",{d:"M8 13v-8.5a1.5 1.5 0 0 1 3 0v7.5",key:"svg-0"}],["path",{d:"M11 11.5v-2a1.5 1.5 0 1 1 3 0v2.5",key:"svg-1"}],["path",{d:"M14 10.5a1.5 1.5 0 0 1 3 0v1.5",key:"svg-2"}],["path",{d:"M17 11.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47",key:"svg-3"}]]);/**
|
|
7
|
+
* @license @tabler/icons-react v3.24.0 - MIT
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var Lc=_r("outline","hand-two-fingers","IconHandTwoFingers",[["path",{d:"M8 13v-8.5a1.5 1.5 0 0 1 3 0v7.5",key:"svg-0"}],["path",{d:"M17 11.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47",key:"svg-1"}],["path",{d:"M14 10.5a1.5 1.5 0 0 1 3 0v1.5",key:"svg-2"}],["path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5",key:"svg-3"}]]);const Fc=e=>c.jsxs("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M6 7C6 5.93913 6.42143 4.92172 7.17157 4.17157C7.92172 3.42143 8.93913 3 10 3H14C15.0609 3 16.0783 3.42143 16.8284 4.17157C17.5786 4.92172 18 5.93913 18 7M6 7V17C6 18.0609 6.42143 19.0783 7.17157 19.8284C7.92172 20.5786 8.93913 21 10 21H14C15.0609 21 16.0783 20.5786 16.8284 19.8284C17.5786 19.0783 18 18.0609 18 17V7M6 7V9H18V7"}),c.jsx("path",{d:"M7.17157 4.17157C6.42143 4.92172 6 5.93913 6 7V9H18V7C18 5.93913 17.5786 4.92172 16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H10C8.93913 3 7.92172 3.42143 7.17157 4.17157Z"})]}),Gc=e=>c.jsxs("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M6 7C6 5.93913 6.42143 4.92172 7.17157 4.17157C7.92172 3.42143 8.93913 3 10 3H11M6 7V17C6 18.0609 6.42143 19.0783 7.17157 19.8284C7.92172 20.5786 8.93913 21 10 21H14C15.0609 21 16.0783 20.5786 16.8284 19.8284C17.5786 19.0783 18 18.0609 18 17V7C18 5.93913 17.5786 4.92172 16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H11M6 7V10H11V3",fill:"var(--colors-grayA2)"}),c.jsx("path",{d:"M7.17157 4.17157C6.42143 4.92172 6 5.93913 6 7V10H11V3H10C8.93913 3 7.92172 3.42143 7.17157 4.17157Z"})]}),Uc=e=>c.jsxs("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M18 7C18 5.93913 17.5786 4.92172 16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H13M18 7V17C18 18.0609 17.5786 19.0783 16.8284 19.8284C16.0783 20.5786 15.0609 21 14 21H10C8.93913 21 7.92172 20.5786 7.17157 19.8284C6.42143 19.0783 6 18.0609 6 17V7C6 5.93913 6.42143 4.92172 7.17157 4.17157C7.92172 3.42143 8.93913 3 10 3H13M18 7V10H13V3",fill:"var(--colors-grayA2)"}),c.jsx("path",{d:"M16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H13V10H18V7C18 5.93913 17.5786 4.92172 16.8284 4.17157Z"})]}),nr={backspace:"⌫",delete:"Del",cmd:"⌘",alt:"⌥",option:"⌥",enter:"↩",ctrl:"⌃",shift:"⇧",tab:"⇥",capslock:"⇪"},Kc=["OF","TF","MLD","MRD","MDD"],Bc={OF:c.jsx(kc,{width:"16px",height:"18px",stroke:"var(--colors-gray8)",strokeWidth:1.2,fill:"var(--colors-grayA2)",style:{marginLeft:"2px"}}),TF:c.jsx(Lc,{width:"16px",height:"18px",stroke:"var(--colors-gray8)",strokeWidth:1.2,fill:"var(--colors-grayA2)",style:{marginLeft:"2px"}}),MLD:c.jsx(Gc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2}),MRD:c.jsx(Uc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2}),MDD:c.jsx(Fc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2})},Vc=P("span",{display:"inline-block",marginLeft:"-1",height:"18px",width:"18px",variants:{half:{true:{marginLeft:"-0_5"}}}}),Wc=P("kbd",{display:"inline-block",background:"$gray3",fontSize:"10px",minWidth:"$3",height:"$4",lineHeight:"14px",borderRadius:"$2",backgroundColor:"$grayA2",border:"1px solid $grayA4",padding:"0 $1",marginRight:"$1",color:"currentColor",userSelect:"none",variants:{size:{xs:{minWidth:"$3",height:"$3",fontSize:"10px",borderRadius:"$1",padding:"0 $0_5"},sm:{minWidth:"$4",height:"$4",fontSize:"10px"},md:{minWidth:"$5",height:"$5",fontSize:"$1",lineHeight:"$lineHeights$1",borderRadius:"$2",padding:"0 $1_5"}},uppercase:{true:{textTransform:"uppercase"}},lowercase:{true:{textTransform:"lowercase"}}},defaultVariants:{uppercase:!0}}),rr=P("div",{display:"inline-flex",alignItems:"center","& > kbd:last-child":{marginRight:0}}),or=Wc;function Hc(e){const{shortcuts:t,uppercase:n=!0,size:r="sm"}=e;if(!t)return null;if(Array.isArray(t))return c.jsx(rr,{children:t.map((s,u)=>Kc.indexOf(s)!==-1?c.jsx(Vc,{children:Bc[s]},u):c.jsx(or,{uppercase:n,size:r,children:nr[s]??s},u))});const o=t.split(/[,+]/).map(s=>nr[s]??s);return c.jsx(rr,{children:o.map((s,u)=>c.jsx(or,{uppercase:n,size:r,children:s},u))})}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ar(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ar(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ar(e[o],null)}}}}function ce(...e){return a.useCallback(pn(...e),e)}function We(e,t=[]){let n=[];function r(s,u){const i=a.createContext(u),d=n.length;n=[...n,u];const p=l=>{var b;const{scope:m,children:v,...g}=l,h=((b=m==null?void 0:m[e])==null?void 0:b[d])||i,x=a.useMemo(()=>g,Object.values(g));return c.jsx(h.Provider,{value:x,children:v})};p.displayName=s+"Provider";function f(l,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[d])||i,g=a.useContext(v);if(g)return g;if(u!==void 0)return u;throw new Error(`\`${l}\` must be used within \`${s}\``)}return[p,f]}const o=()=>{const s=n.map(u=>a.createContext(u));return function(i){const d=(i==null?void 0:i[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return o.scopeName=e,[r,Yc(o,...t)]}function Yc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const u=r.reduce((i,{useScope:d,scopeName:p})=>{const l=d(s)[`__scope${p}`];return{...i,...l}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Xc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ie=Xc.reduce((e,t)=>{const n=a.forwardRef((r,o)=>{const{asChild:s,...u}=r,i=s?dt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(i,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function zc(e,t){e&&bc.flushSync(()=>e.dispatchEvent(t))}function Vr(e){const t=e+"CollectionProvider",[n,r]=We(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=v=>{const{scope:g,children:h}=v,x=pe.useRef(null),b=pe.useRef(new Map).current;return c.jsx(o,{scope:g,itemMap:b,collectionRef:x,children:h})};u.displayName=t;const i=e+"CollectionSlot",d=pe.forwardRef((v,g)=>{const{scope:h,children:x}=v,b=s(i,h),M=ce(g,b.collectionRef);return c.jsx(dt,{ref:M,children:x})});d.displayName=i;const p=e+"CollectionItemSlot",f="data-radix-collection-item",l=pe.forwardRef((v,g)=>{const{scope:h,children:x,...b}=v,M=pe.useRef(null),w=ce(g,M),S=s(p,h);return pe.useEffect(()=>(S.itemMap.set(M,{ref:M,...b}),()=>void S.itemMap.delete(M))),c.jsx(dt,{[f]:"",ref:w,children:x})});l.displayName=p;function m(v){const g=s(e+"CollectionConsumer",v);return pe.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((S,y)=>b.indexOf(S.ref.current)-b.indexOf(y.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:u,Slot:d,ItemSlot:l},m,r]}var Zc="Arrow",Wr=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wr.displayName=Zc;var qc=Wr,mn="Popper",[Hr,Yr]=We(mn),[Qc,Xr]=Hr(mn),zr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return c.jsx(Qc,{scope:t,anchor:r,onAnchorChange:o,children:n})};zr.displayName=mn;var Zr="PopperAnchor",qr=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Xr(Zr,n),u=a.useRef(null),i=ce(t,u);return a.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||u.current)}),r?null:c.jsx(ie.div,{...o,ref:i})});qr.displayName=Zr;var hn="PopperContent",[Jc,ei]=Hr(hn),Qr=a.forwardRef((e,t)=>{var L,ae,$,se,qn,Qn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:u=0,arrowPadding:i=0,avoidCollisions:d=!0,collisionBoundary:p=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:g,...h}=e,x=Xr(hn,n),[b,M]=a.useState(null),w=ce(t,je=>M(je)),[S,y]=a.useState(null),I=Mc(S),N=(I==null?void 0:I.width)??0,A=(I==null?void 0:I.height)??0,E=r+(s!=="center"?"-"+s:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},K=Array.isArray(p)?p:[p],V=K.length>0,X={padding:O,boundary:K.filter(ni),altBoundary:V},{refs:Z,floatingStyles:ue,placement:z,isPositioned:le,middlewareData:k}=wc({strategy:"fixed",placement:E,whileElementsMounted:(...je)=>Sc(...je,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[Rc({mainAxis:o+A,alignmentAxis:u}),d&&yc({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?Ec():void 0,...X}),d&&Pc({...X}),_c({...X,apply:({elements:je,rects:Jn,availableWidth:vc,availableHeight:gc})=>{const{width:Cc,height:xc}=Jn.reference,rt=je.floating.style;rt.setProperty("--radix-popper-available-width",`${vc}px`),rt.setProperty("--radix-popper-available-height",`${gc}px`),rt.setProperty("--radix-popper-anchor-width",`${Cc}px`),rt.setProperty("--radix-popper-anchor-height",`${xc}px`)}}),S&&Ic({element:S,padding:i}),ri({arrowWidth:N,arrowHeight:A}),m&&Ac({strategy:"referenceHidden",...X})]}),[C,_]=to(z),T=F(g);me(()=>{le&&(T==null||T())},[le,T]);const D=(L=k.arrow)==null?void 0:L.x,q=(ae=k.arrow)==null?void 0:ae.y,Q=(($=k.arrow)==null?void 0:$.centerOffset)!==0,[de,B]=a.useState();return me(()=>{b&&B(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...ue,transform:le?ue.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(se=k.transformOrigin)==null?void 0:se.x,(qn=k.transformOrigin)==null?void 0:qn.y].join(" "),...((Qn=k.hide)==null?void 0:Qn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Jc,{scope:n,placedSide:C,onArrowChange:y,arrowX:D,arrowY:q,shouldHideArrow:Q,children:c.jsx(ie.div,{"data-side":C,"data-align":_,...h,ref:w,style:{...h.style,animation:le?void 0:"none"}})})})});Qr.displayName=hn;var Jr="PopperArrow",ti={top:"bottom",right:"left",bottom:"top",left:"right"},eo=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=ei(Jr,r),u=ti[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(qc,{...o,ref:n,style:{...o.style,display:"block"}})})});eo.displayName=Jr;function ni(e){return e!==null}var ri=e=>({name:"transformOrigin",options:e,fn(t){var x,b,M;const{placement:n,rects:r,middlewareData:o}=t,u=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[p,f]=to(n),l={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,v=(((M=o.arrow)==null?void 0:M.y)??0)+d/2;let g="",h="";return p==="bottom"?(g=u?l:`${m}px`,h=`${-d}px`):p==="top"?(g=u?l:`${m}px`,h=`${r.floating.height+d}px`):p==="right"?(g=`${-d}px`,h=u?l:`${v}px`):p==="left"&&(g=`${r.floating.width+d}px`,h=u?l:`${v}px`),{data:{x:g,y:h}}}});function to(e){const[t,n="center"]=e.split("-");return[t,n]}var no=zr,oi=qr,ai=Qr,si=eo;function ci(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var He=e=>{const{present:t,children:n}=e,r=ii(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),s=ce(r.ref,ui(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:s}):null};He.displayName="Presence";function ii(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),s=a.useRef("none"),u=e?"mounted":"unmounted",[i,d]=ci(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const p=ot(r.current);s.current=i==="mounted"?p:"none"},[i]),me(()=>{const p=r.current,f=o.current;if(f!==e){const m=s.current,v=ot(p);e?d("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?d("UNMOUNT"):d(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),me(()=>{if(t){let p;const f=t.ownerDocument.defaultView??window,l=v=>{const h=ot(r.current).includes(v.animationName);if(v.target===t&&h&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",p=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=v=>{v.target===t&&(s.current=ot(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function ot(e){return(e==null?void 0:e.animationName)||"none"}function ui(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gt="rovingFocusGroup.onEntryFocus",li={bubbles:!1,cancelable:!0},St="RovingFocusGroup",[Xt,ro,di]=Vr(St),[fi,oo]=We(St,[di]),[pi,mi]=fi(St),ao=a.forwardRef((e,t)=>c.jsx(Xt.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Xt.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(hi,{...e,ref:t})})}));ao.displayName=St;var hi=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:p,preventScrollOnEntryFocus:f=!1,...l}=e,m=a.useRef(null),v=ce(t,m),g=Ne(s),[h=null,x]=$e({prop:u,defaultProp:i,onChange:d}),[b,M]=a.useState(!1),w=F(p),S=ro(n),y=a.useRef(!1),[I,N]=a.useState(0);return a.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(Gt,w),()=>A.removeEventListener(Gt,w)},[w]),c.jsx(pi,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:h,onItemFocus:a.useCallback(A=>x(A),[x]),onItemShiftTab:a.useCallback(()=>M(!0),[]),onFocusableItemAdd:a.useCallback(()=>N(A=>A+1),[]),onFocusableItemRemove:a.useCallback(()=>N(A=>A-1),[]),children:c.jsx(ie.div,{tabIndex:b||I===0?-1:0,"data-orientation":r,...l,ref:v,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{y.current=!0}),onFocus:j(e.onFocus,A=>{const E=!y.current;if(A.target===A.currentTarget&&E&&!b){const O=new CustomEvent(Gt,li);if(A.currentTarget.dispatchEvent(O),!O.defaultPrevented){const K=S().filter(z=>z.focusable),V=K.find(z=>z.active),X=K.find(z=>z.id===h),ue=[V,X,...K].filter(Boolean).map(z=>z.ref.current);io(ue,f)}}y.current=!1}),onBlur:j(e.onBlur,()=>M(!1))})})}),so="RovingFocusGroupItem",co=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...u}=e,i=ee(),d=s||i,p=mi(so,n),f=p.currentTabStopId===d,l=ro(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=p;return a.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),c.jsx(Xt.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:c.jsx(ie.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:j(e.onMouseDown,g=>{r?p.onItemFocus(d):g.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:j(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){p.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const h=Ci(g,p.orientation,p.dir);if(h!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=l().filter(M=>M.focusable).map(M=>M.ref.current);if(h==="last")b.reverse();else if(h==="prev"||h==="next"){h==="prev"&&b.reverse();const M=b.indexOf(g.currentTarget);b=p.loop?xi(b,M+1):b.slice(M+1)}setTimeout(()=>io(b))}})})})});co.displayName=so;var vi={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gi(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ci(e,t,n){const r=gi(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vi[r]}function io(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function xi(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bi=ao,Mi=co,zt=["Enter"," "],wi=["ArrowDown","PageUp","Home"],uo=["ArrowUp","PageDown","End"],Si=[...wi,...uo],Ri={ltr:[...zt,"ArrowRight"],rtl:[...zt,"ArrowLeft"]},yi={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Fe,Ei,Pi]=Vr(Ye),[Se,lo]=We(Ye,[Pi,Yr,oo]),Xe=Yr(),fo=oo(),[po,Ce]=Se(Ye),[_i,ze]=Se(Ye),mo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,i=Xe(t),[d,p]=a.useState(null),f=a.useRef(!1),l=F(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.jsx(no,{...i,children:c.jsx(po,{scope:t,open:n,onOpenChange:l,content:d,onContentChange:p,children:c.jsx(_i,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:m,modal:u,children:r})})})};mo.displayName=Ye;var Ii="MenuAnchor",vn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return c.jsx(oi,{...o,...r,ref:t})});vn.displayName=Ii;var gn="MenuPortal",[Ai,ho]=Se(gn,{forceMount:void 0}),vo=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ce(gn,t);return c.jsx(Ai,{scope:t,forceMount:n,children:c.jsx(He,{present:n||s.open,children:c.jsx($c,{asChild:!0,container:o,children:r})})})};vo.displayName=gn;var te="MenuContent",[Ti,Cn]=Se(te),go=a.forwardRef((e,t)=>{const n=ho(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ce(te,e.__scopeMenu),u=ze(te,e.__scopeMenu);return c.jsx(Fe.Provider,{scope:e.__scopeMenu,children:c.jsx(He,{present:r||s.open,children:c.jsx(Fe.Slot,{scope:e.__scopeMenu,children:u.modal?c.jsx(Ni,{...o,ref:t}):c.jsx($i,{...o,ref:t})})})})}),Ni=a.forwardRef((e,t)=>{const n=Ce(te,e.__scopeMenu),r=a.useRef(null),o=ce(t,r);return a.useEffect(()=>{const s=r.current;if(s)return sn(s)},[]),c.jsx(xn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$i=a.forwardRef((e,t)=>{const n=Ce(te,e.__scopeMenu);return c.jsx(xn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),xn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,x=Ce(te,n),b=ze(te,n),M=Xe(n),w=fo(n),S=Ei(n),[y,I]=a.useState(null),N=a.useRef(null),A=ce(t,N,x.onContentChange),E=a.useRef(0),O=a.useRef(""),K=a.useRef(0),V=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?Nc:a.Fragment,z=g?{as:dt,allowPinchZoom:!0}:void 0,le=C=>{var L,ae;const _=O.current+C,T=S().filter($=>!$.disabled),D=document.activeElement,q=(L=T.find($=>$.ref.current===D))==null?void 0:L.textValue,Q=T.map($=>$.textValue),de=Wi(Q,_,q),B=(ae=T.find($=>$.textValue===de))==null?void 0:ae.ref.current;(function $(se){O.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>$(""),1e3))})(_),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),Ir();const k=a.useCallback(C=>{var T,D;return X.current===((T=V.current)==null?void 0:T.side)&&Yi(C,(D=V.current)==null?void 0:D.area)},[]);return c.jsx(Ti,{scope:n,searchRef:O,onItemEnter:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),onItemLeave:a.useCallback(C=>{var _;k(C)||((_=N.current)==null||_.focus(),I(null))},[k]),onTriggerLeave:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{V.current=C},[]),children:c.jsx(ue,{...z,children:c.jsx(Tc,{asChild:!0,trapped:o,onMountAutoFocus:j(s,C=>{var _;C.preventDefault(),(_=N.current)==null||_.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:c.jsx(cn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:c.jsx(bi,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:I,onEntryFocus:j(d,C=>{b.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(ai,{role:"menu","aria-orientation":"vertical","data-state":Oo(x.open),"data-radix-menu-content":"",dir:b.dir,...M,...h,ref:A,style:{outline:"none",...h.style},onKeyDown:j(h.onKeyDown,C=>{const T=C.target.closest("[data-radix-menu-content]")===C.currentTarget,D=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;T&&(C.key==="Tab"&&C.preventDefault(),!D&&q&&le(C.key));const Q=N.current;if(C.target!==Q||!Si.includes(C.key))return;C.preventDefault();const B=S().filter(L=>!L.disabled).map(L=>L.ref.current);uo.includes(C.key)&&B.reverse(),Bi(B)}),onBlur:j(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(E.current),O.current="")}),onPointerMove:j(e.onPointerMove,Ge(C=>{const _=C.target,T=Z.current!==C.clientX;if(C.currentTarget.contains(_)&&T){const D=C.clientX>Z.current?"right":"left";X.current=D,Z.current=C.clientX}}))})})})})})})});go.displayName=te;var Oi="MenuGroup",bn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ie.div,{role:"group",...r,ref:t})});bn.displayName=Oi;var ji="MenuLabel",Co=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ie.div,{...r,ref:t})});Co.displayName=ji;var ft="MenuItem",sr="menu.itemSelect",Rt=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=ze(ft,e.__scopeMenu),i=Cn(ft,e.__scopeMenu),d=ce(t,s),p=a.useRef(!1),f=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(sr,{bubbles:!0,cancelable:!0});l.addEventListener(sr,v=>r==null?void 0:r(v),{once:!0}),zc(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return c.jsx(xo,{...o,ref:d,disabled:n,onClick:j(e.onClick,f),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:j(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:j(e.onKeyDown,l=>{const m=i.searchRef.current!=="";n||m&&l.key===" "||zt.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Rt.displayName=ft;var xo=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=Cn(ft,n),i=fo(n),d=a.useRef(null),p=ce(t,d),[f,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=d.current;g&&v((g.textContent??"").trim())},[s.children]),c.jsx(Fe.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:c.jsx(Mi,{asChild:!0,...i,focusable:!r,children:c.jsx(ie.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:j(e.onPointerMove,Ge(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,Ge(g=>u.onItemLeave(g))),onFocus:j(e.onFocus,()=>l(!0)),onBlur:j(e.onBlur,()=>l(!1))})})})}),Di="MenuCheckboxItem",bo=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(yo,{scope:e.__scopeMenu,checked:n,children:c.jsx(Rt,{role:"menuitemcheckbox","aria-checked":pt(n)?"mixed":n,...o,ref:t,"data-state":Sn(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(pt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});bo.displayName=Di;var Mo="MenuRadioGroup",[ki,Li]=Se(Mo,{value:void 0,onValueChange:()=>{}}),wo=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=F(r);return c.jsx(ki,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(bn,{...o,ref:t})})});wo.displayName=Mo;var So="MenuRadioItem",Ro=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=Li(So,e.__scopeMenu),s=n===o.value;return c.jsx(yo,{scope:e.__scopeMenu,checked:s,children:c.jsx(Rt,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Sn(s),onSelect:j(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Ro.displayName=So;var Mn="MenuItemIndicator",[yo,Fi]=Se(Mn,{checked:!1}),Eo=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Fi(Mn,n);return c.jsx(He,{present:r||pt(s.checked)||s.checked===!0,children:c.jsx(ie.span,{...o,ref:t,"data-state":Sn(s.checked)})})});Eo.displayName=Mn;var Gi="MenuSeparator",Po=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Po.displayName=Gi;var Ui="MenuArrow",_o=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return c.jsx(si,{...o,...r,ref:t})});_o.displayName=Ui;var wn="MenuSub",[Ki,Io]=Se(wn),Ao=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ce(wn,t),u=Xe(t),[i,d]=a.useState(null),[p,f]=a.useState(null),l=F(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),c.jsx(no,{...u,children:c.jsx(po,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:f,children:c.jsx(Ki,{scope:t,contentId:ee(),triggerId:ee(),trigger:i,onTriggerChange:d,children:n})})})};Ao.displayName=wn;var De="MenuSubTrigger",To=a.forwardRef((e,t)=>{const n=Ce(De,e.__scopeMenu),r=ze(De,e.__scopeMenu),o=Io(De,e.__scopeMenu),s=Cn(De,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>f,[f]),a.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),d(null)}},[i,d]),c.jsx(vn,{asChild:!0,...p,children:c.jsx(xo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Oo(n.open),...e,ref:pn(t,o.onTriggerChange),onClick:l=>{var m;(m=e.onClick)==null||m.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,Ge(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:j(e.onPointerLeave,Ge(l=>{var v,g;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,x=h==="right",b=x?-5:5,M=m[x?"left":"right"],w=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+b,y:l.clientY},{x:M,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:M,y:m.bottom}],side:h}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||Ri[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});To.displayName=De;var No="MenuSubContent",$o=a.forwardRef((e,t)=>{const n=ho(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ce(te,e.__scopeMenu),u=ze(te,e.__scopeMenu),i=Io(No,e.__scopeMenu),d=a.useRef(null),p=ce(t,d);return c.jsx(Fe.Provider,{scope:e.__scopeMenu,children:c.jsx(He,{present:r||s.open,children:c.jsx(Fe.Slot,{scope:e.__scopeMenu,children:c.jsx(xn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;u.isUsingKeyboardRef.current&&((l=d.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:j(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,f=>{u.onClose(),f.preventDefault()}),onKeyDown:j(e.onKeyDown,f=>{var v;const l=f.currentTarget.contains(f.target),m=yi[u.dir].includes(f.key);l&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});$o.displayName=No;function Oo(e){return e?"open":"closed"}function pt(e){return e==="indeterminate"}function Sn(e){return pt(e)?"indeterminate":e?"checked":"unchecked"}function Bi(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Vi(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Wi(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=Vi(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const d=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Hi(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const i=t[s].x,d=t[s].y,p=t[u].x,f=t[u].y;d>r!=f>r&&n<(p-i)*(r-d)/(f-d)+i&&(o=!o)}return o}function Yi(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Hi(n,t)}function Ge(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xi=mo,zi=vn,Zi=vo,qi=go,Qi=bn,Ji=Co,eu=Rt,tu=bo,nu=wo,ru=Ro,ou=Eo,au=Po,su=_o,cu=Ao,iu=To,uu=$o,Rn="DropdownMenu",[lu,Qp]=We(Rn,[lo]),W=lo(),[du,jo]=lu(Rn),Do=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:u,modal:i=!0}=e,d=W(t),p=a.useRef(null),[f=!1,l]=$e({prop:o,defaultProp:s,onChange:u});return c.jsx(du,{scope:t,triggerId:ee(),triggerRef:p,contentId:ee(),open:f,onOpenChange:l,onOpenToggle:a.useCallback(()=>l(m=>!m),[l]),modal:i,children:c.jsx(Xi,{...d,open:f,onOpenChange:l,dir:r,modal:i,children:n})})};Do.displayName=Rn;var ko="DropdownMenuTrigger",Lo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=jo(ko,n),u=W(n);return c.jsx(zi,{asChild:!0,...u,children:c.jsx(ie.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:pn(t,s.triggerRef),onPointerDown:j(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:j(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Lo.displayName=ko;var fu="DropdownMenuPortal",Fo=e=>{const{__scopeDropdownMenu:t,...n}=e,r=W(t);return c.jsx(Zi,{...r,...n})};Fo.displayName=fu;var Go="DropdownMenuContent",Uo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jo(Go,n),s=W(n),u=a.useRef(!1);return c.jsx(qi,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{var d;u.current||(d=o.triggerRef.current)==null||d.focus(),u.current=!1,i.preventDefault()}),onInteractOutside:j(e.onInteractOutside,i=>{const d=i.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0,f=d.button===2||p;(!o.modal||f)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Uo.displayName=Go;var pu="DropdownMenuGroup",Ko=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(Qi,{...o,...r,ref:t})});Ko.displayName=pu;var mu="DropdownMenuLabel",Bo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(Ji,{...o,...r,ref:t})});Bo.displayName=mu;var hu="DropdownMenuItem",Vo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(eu,{...o,...r,ref:t})});Vo.displayName=hu;var vu="DropdownMenuCheckboxItem",Wo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(tu,{...o,...r,ref:t})});Wo.displayName=vu;var gu="DropdownMenuRadioGroup",Ho=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(nu,{...o,...r,ref:t})});Ho.displayName=gu;var Cu="DropdownMenuRadioItem",Yo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(ru,{...o,...r,ref:t})});Yo.displayName=Cu;var xu="DropdownMenuItemIndicator",Xo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(ou,{...o,...r,ref:t})});Xo.displayName=xu;var bu="DropdownMenuSeparator",zo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(au,{...o,...r,ref:t})});zo.displayName=bu;var Mu="DropdownMenuArrow",wu=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(su,{...o,...r,ref:t})});wu.displayName=Mu;var Su=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,u=W(t),[i=!1,d]=$e({prop:r,defaultProp:s,onChange:o});return c.jsx(cu,{...u,open:i,onOpenChange:d,children:n})},Ru="DropdownMenuSubTrigger",Zo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(iu,{...o,...r,ref:t})});Zo.displayName=Ru;var yu="DropdownMenuSubContent",qo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(uu,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qo.displayName=yu;var Qo=Do,Eu=Lo,Jo=Fo,Pu=Uo,_u=Ko,Iu=Bo,Au=Vo,Tu=Wo,Nu=Ho,$u=Yo,Ou=Xo,ju=zo,Du=Su,ku=Zo,Lu=qo,Ut=0;function Fu(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cr()),document.body.insertAdjacentElement("beforeend",e[1]??cr()),Ut++,()=>{Ut===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ut--}},[])}function cr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Kt="focusScope.autoFocusOnMount",Bt="focusScope.autoFocusOnUnmount",ir={bubbles:!1,cancelable:!0},Gu="FocusScope",ea=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[i,d]=a.useState(null),p=F(o),f=F(s),l=a.useRef(null),m=U(t,h=>d(h)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let h=function(w){if(v.paused||!i)return;const S=w.target;i.contains(S)?l.current=S:he(l.current,{select:!0})},x=function(w){if(v.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||he(l.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const y of w)y.removedNodes.length>0&&he(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const M=new MutationObserver(b);return i&&M.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),M.disconnect()}}},[r,i,v.paused]),a.useEffect(()=>{if(i){lr.add(v);const h=document.activeElement;if(!i.contains(h)){const b=new CustomEvent(Kt,ir);i.addEventListener(Kt,p),i.dispatchEvent(b),b.defaultPrevented||(Uu(Hu(ta(i)),{select:!0}),document.activeElement===h&&he(i))}return()=>{i.removeEventListener(Kt,p),setTimeout(()=>{const b=new CustomEvent(Bt,ir);i.addEventListener(Bt,f),i.dispatchEvent(b),b.defaultPrevented||he(h??document.body,{select:!0}),i.removeEventListener(Bt,f),lr.remove(v)},0)}}},[i,p,f,v]);const g=a.useCallback(h=>{if(!n&&!r||v.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(x&&b){const M=h.currentTarget,[w,S]=Ku(M);w&&S?!h.shiftKey&&b===S?(h.preventDefault(),n&&he(w,{select:!0})):h.shiftKey&&b===w&&(h.preventDefault(),n&&he(S,{select:!0})):b===M&&h.preventDefault()}},[n,r,v.paused]);return c.jsx(G.div,{tabIndex:-1,...u,ref:m,onKeyDown:g})});ea.displayName=Gu;function Uu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(he(r,{select:t}),document.activeElement!==n)return}function Ku(e){const t=ta(e),n=ur(t,e),r=ur(t.reverse(),e);return[n,r]}function ta(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ur(e,t){for(const n of e)if(!Bu(n,{upTo:t}))return n}function Bu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Vu(e){return e instanceof HTMLInputElement&&"select"in e}function he(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Vu(e)&&t&&e.select()}}var lr=Wu();function Wu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dr(e,t),e.unshift(t)},remove(t){var n;e=dr(e,t),(n=e[0])==null||n.resume()}}}function dr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hu(e){return e.filter(t=>t.tagName!=="A")}var Yu="Portal",na=a.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=a.useState(!1);me(()=>s(!0),[]);const u=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?Ar.createPortal(c.jsx(G.div,{...r,ref:t}),u):null});na.displayName=Yu;var ra=a.forwardRef((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),s=o.find(zu);if(s){const u=s.props.children,i=o.map(d=>d===s?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return c.jsx(Zt,{...r,ref:t,children:a.isValidElement(u)?a.cloneElement(u,void 0,i):null})}return c.jsx(Zt,{...r,ref:t,children:n})});ra.displayName="Slot";var Zt=a.forwardRef((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const o=qu(n);return a.cloneElement(n,{...Zu(r,n.props),ref:t?bt(t,o):o})}return a.Children.count(n)>1?a.Children.only(null):null});Zt.displayName="SlotClone";var Xu=({children:e})=>c.jsx(c.Fragment,{children:e});function zu(e){return a.isValidElement(e)&&e.type===Xu}function Zu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function qu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var oa=Tr(),Vt=function(){},yt=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Vt,onWheelCapture:Vt,onTouchMoveCapture:Vt}),o=r[0],s=r[1],u=e.forwardProps,i=e.children,d=e.className,p=e.removeScrollBar,f=e.enabled,l=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,M=e.gapMode,w=Nr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,y=$r([n,t]),I=J(J({},w),o);return a.createElement(a.Fragment,null,f&&a.createElement(S,{sideCar:oa,removeScrollBar:p,shards:l,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:M}),u?a.cloneElement(a.Children.only(i),J(J({},I),{ref:y})):a.createElement(b,J({},I,{className:d,ref:y}),i))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:Or,zeroRight:jr};var qt=!1;if(typeof window<"u")try{var at=Object.defineProperty({},"passive",{get:function(){return qt=!0,!0}});window.addEventListener("test",at,at),window.removeEventListener("test",at,at)}catch{qt=!1}var Pe=qt?{passive:!1}:!1,Qu=function(e){return e.tagName==="TEXTAREA"},aa=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qu(e)&&n[t]==="visible")},Ju=function(e){return aa(e,"overflowY")},el=function(e){return aa(e,"overflowX")},fr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=sa(e,r);if(o){var s=ca(e,r),u=s[1],i=s[2];if(u>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tl=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},nl=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sa=function(e,t){return e==="v"?Ju(t):el(t)},ca=function(e,t){return e==="v"?tl(t):nl(t)},rl=function(e,t){return e==="h"&&t==="rtl"?-1:1},ol=function(e,t,n,r,o){var s=rl(e,window.getComputedStyle(t).direction),u=s*r,i=n.target,d=t.contains(i),p=!1,f=u>0,l=0,m=0;do{var v=ca(e,i),g=v[0],h=v[1],x=v[2],b=h-x-s*g;(g||b)&&sa(e,i)&&(l+=b,m+=g),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(f&&(o&&Math.abs(l)<1||!o&&u>l)||!f&&(o&&Math.abs(m)<1||!o&&-u>m))&&(p=!0),p},st=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pr=function(e){return[e.deltaX,e.deltaY]},mr=function(e){return e&&"current"in e?e.current:e},al=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sl=function(e){return`
|
|
12
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
13
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
14
|
+
`)},cl=0,_e=[];function il(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(cl++)[0],s=a.useState(Dr)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=kr([e.lockRef.current],(e.shards||[]).map(mr),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=a.useCallback(function(h,x){if("touches"in h&&h.touches.length===2)return!u.current.allowPinchZoom;var b=st(h),M=n.current,w="deltaX"in h?h.deltaX:M[0]-b[0],S="deltaY"in h?h.deltaY:M[1]-b[1],y,I=h.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&N==="h"&&I.type==="range")return!1;var A=fr(N,I);if(!A)return!0;if(A?y=N:(y=N==="v"?"h":"v",A=fr(N,I)),!A)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=y),!y)return!0;var E=r.current||y;return ol(E,x,h,E==="h"?w:S,!0)},[]),d=a.useCallback(function(h){var x=h;if(!(!_e.length||_e[_e.length-1]!==s)){var b="deltaY"in x?pr(x):st(x),M=t.current.filter(function(y){return y.name===x.type&&(y.target===x.target||x.target===y.shadowParent)&&al(y.delta,b)})[0];if(M&&M.should){x.cancelable&&x.preventDefault();return}if(!M){var w=(u.current.shards||[]).map(mr).filter(Boolean).filter(function(y){return y.contains(x.target)}),S=w.length>0?i(x,w[0]):!u.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),p=a.useCallback(function(h,x,b,M){var w={name:h,delta:x,target:b,should:M,shadowParent:ul(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=a.useCallback(function(h){n.current=st(h),r.current=void 0},[]),l=a.useCallback(function(h){p(h.type,pr(h),h.target,i(h,e.lockRef.current))},[]),m=a.useCallback(function(h){p(h.type,st(h),h.target,i(h,e.lockRef.current))},[]);a.useEffect(function(){return _e.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",d,Pe),document.addEventListener("touchmove",d,Pe),document.addEventListener("touchstart",f,Pe),function(){_e=_e.filter(function(h){return h!==s}),document.removeEventListener("wheel",d,Pe),document.removeEventListener("touchmove",d,Pe),document.removeEventListener("touchstart",f,Pe)}},[]);var v=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:sl(o)}):null,v?a.createElement(Lr,{gapMode:e.gapMode}):null)}function ul(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ll=Fr(oa,il);var ia=a.forwardRef(function(e,t){return a.createElement(yt,J({},e,{ref:t,sideCar:ll}))});ia.classNames=yt.classNames;const dl=ia;var Qt=["Enter"," "],fl=["ArrowDown","PageUp","Home"],ua=["ArrowUp","PageDown","End"],pl=[...fl,...ua],ml={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},hl={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ze="Menu",[Ue,vl,gl]=un(Ze),[Re,la]=ln(Ze,[gl,Mt,Oe]),qe=Mt(),da=Oe(),[fa,xe]=Re(Ze),[Cl,Qe]=Re(Ze),pa=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,i=qe(t),[d,p]=a.useState(null),f=a.useRef(!1),l=F(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.jsx(wt,{...i,children:c.jsx(fa,{scope:t,open:n,onOpenChange:l,content:d,onContentChange:p,children:c.jsx(Cl,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:m,modal:u,children:r})})})};pa.displayName=Ze;var xl="MenuAnchor",yn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=qe(n);return c.jsx(Gr,{...o,...r,ref:t})});yn.displayName=xl;var En="MenuPortal",[bl,ma]=Re(En,{forceMount:void 0}),ha=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=xe(En,t);return c.jsx(bl,{scope:t,forceMount:n,children:c.jsx(ge,{present:n||s.open,children:c.jsx(na,{asChild:!0,container:o,children:r})})})};ha.displayName=En;var ne="MenuContent",[Ml,Pn]=Re(ne),va=a.forwardRef((e,t)=>{const n=ma(ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(ne,e.__scopeMenu),u=Qe(ne,e.__scopeMenu);return c.jsx(Ue.Provider,{scope:e.__scopeMenu,children:c.jsx(ge,{present:r||s.open,children:c.jsx(Ue.Slot,{scope:e.__scopeMenu,children:u.modal?c.jsx(wl,{...o,ref:t}):c.jsx(Sl,{...o,ref:t})})})})}),wl=a.forwardRef((e,t)=>{const n=xe(ne,e.__scopeMenu),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return sn(s)},[]),c.jsx(_n,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Sl=a.forwardRef((e,t)=>{const n=xe(ne,e.__scopeMenu);return c.jsx(_n,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_n=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,x=xe(ne,n),b=Qe(ne,n),M=qe(n),w=da(n),S=vl(n),[y,I]=a.useState(null),N=a.useRef(null),A=U(t,N,x.onContentChange),E=a.useRef(0),O=a.useRef(""),K=a.useRef(0),V=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?dl:a.Fragment,z=g?{as:ra,allowPinchZoom:!0}:void 0,le=C=>{var L,ae;const _=O.current+C,T=S().filter($=>!$.disabled),D=document.activeElement,q=(L=T.find($=>$.ref.current===D))==null?void 0:L.textValue,Q=T.map($=>$.textValue),de=jl(Q,_,q),B=(ae=T.find($=>$.textValue===de))==null?void 0:ae.ref.current;(function $(se){O.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>$(""),1e3))})(_),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),Fu();const k=a.useCallback(C=>{var T,D;return X.current===((T=V.current)==null?void 0:T.side)&&kl(C,(D=V.current)==null?void 0:D.area)},[]);return c.jsx(Ml,{scope:n,searchRef:O,onItemEnter:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),onItemLeave:a.useCallback(C=>{var _;k(C)||((_=N.current)==null||_.focus(),I(null))},[k]),onTriggerLeave:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{V.current=C},[]),children:c.jsx(ue,{...z,children:c.jsx(ea,{asChild:!0,trapped:o,onMountAutoFocus:R(s,C=>{var _;C.preventDefault(),(_=N.current)==null||_.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:c.jsx(cn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:c.jsx(dn,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:I,onEntryFocus:R(d,C=>{b.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Ur,{role:"menu","aria-orientation":"vertical","data-state":$a(x.open),"data-radix-menu-content":"",dir:b.dir,...M,...h,ref:A,style:{outline:"none",...h.style},onKeyDown:R(h.onKeyDown,C=>{const T=C.target.closest("[data-radix-menu-content]")===C.currentTarget,D=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;T&&(C.key==="Tab"&&C.preventDefault(),!D&&q&&le(C.key));const Q=N.current;if(C.target!==Q||!pl.includes(C.key))return;C.preventDefault();const B=S().filter(L=>!L.disabled).map(L=>L.ref.current);ua.includes(C.key)&&B.reverse(),$l(B)}),onBlur:R(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(E.current),O.current="")}),onPointerMove:R(e.onPointerMove,Ke(C=>{const _=C.target,T=Z.current!==C.clientX;if(C.currentTarget.contains(_)&&T){const D=C.clientX>Z.current?"right":"left";X.current=D,Z.current=C.clientX}}))})})})})})})});va.displayName=ne;var Rl="MenuGroup",In=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"group",...r,ref:t})});In.displayName=Rl;var yl="MenuLabel",ga=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{...r,ref:t})});ga.displayName=yl;var mt="MenuItem",hr="menu.itemSelect",Et=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=Qe(mt,e.__scopeMenu),i=Pn(mt,e.__scopeMenu),d=U(t,s),p=a.useRef(!1),f=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(hr,{bubbles:!0,cancelable:!0});l.addEventListener(hr,v=>r==null?void 0:r(v),{once:!0}),Br(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return c.jsx(Ca,{...o,ref:d,disabled:n,onClick:R(e.onClick,f),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:R(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:R(e.onKeyDown,l=>{const m=i.searchRef.current!=="";n||m&&l.key===" "||Qt.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Et.displayName=mt;var Ca=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=Pn(mt,n),i=da(n),d=a.useRef(null),p=U(t,d),[f,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=d.current;g&&v((g.textContent??"").trim())},[s.children]),c.jsx(Ue.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:c.jsx(fn,{asChild:!0,...i,focusable:!r,children:c.jsx(G.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:R(e.onPointerMove,Ke(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,Ke(g=>u.onItemLeave(g))),onFocus:R(e.onFocus,()=>l(!0)),onBlur:R(e.onBlur,()=>l(!1))})})})}),El="MenuCheckboxItem",xa=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Ra,{scope:e.__scopeMenu,checked:n,children:c.jsx(Et,{role:"menuitemcheckbox","aria-checked":ht(n)?"mixed":n,...o,ref:t,"data-state":Nn(n),onSelect:R(o.onSelect,()=>r==null?void 0:r(ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});xa.displayName=El;var ba="MenuRadioGroup",[Pl,_l]=Re(ba,{value:void 0,onValueChange:()=>{}}),Ma=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=F(r);return c.jsx(Pl,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(In,{...o,ref:t})})});Ma.displayName=ba;var wa="MenuRadioItem",Sa=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=_l(wa,e.__scopeMenu),s=n===o.value;return c.jsx(Ra,{scope:e.__scopeMenu,checked:s,children:c.jsx(Et,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Nn(s),onSelect:R(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Sa.displayName=wa;var An="MenuItemIndicator",[Ra,Il]=Re(An,{checked:!1}),ya=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Il(An,n);return c.jsx(ge,{present:r||ht(s.checked)||s.checked===!0,children:c.jsx(G.span,{...o,ref:t,"data-state":Nn(s.checked)})})});ya.displayName=An;var Al="MenuSeparator",Ea=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ea.displayName=Al;var Tl="MenuArrow",Pa=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=qe(n);return c.jsx(Kr,{...o,...r,ref:t})});Pa.displayName=Tl;var Tn="MenuSub",[Nl,_a]=Re(Tn),Ia=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=xe(Tn,t),u=qe(t),[i,d]=a.useState(null),[p,f]=a.useState(null),l=F(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),c.jsx(wt,{...u,children:c.jsx(fa,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:f,children:c.jsx(Nl,{scope:t,contentId:ee(),triggerId:ee(),trigger:i,onTriggerChange:d,children:n})})})};Ia.displayName=Tn;var ke="MenuSubTrigger",Aa=a.forwardRef((e,t)=>{const n=xe(ke,e.__scopeMenu),r=Qe(ke,e.__scopeMenu),o=_a(ke,e.__scopeMenu),s=Pn(ke,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>f,[f]),a.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),d(null)}},[i,d]),c.jsx(yn,{asChild:!0,...p,children:c.jsx(Ca,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":$a(n.open),...e,ref:bt(t,o.onTriggerChange),onClick:l=>{var m;(m=e.onClick)==null||m.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,Ke(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:R(e.onPointerLeave,Ke(l=>{var v,g;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,x=h==="right",b=x?-5:5,M=m[x?"left":"right"],w=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+b,y:l.clientY},{x:M,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:M,y:m.bottom}],side:h}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||ml[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});Aa.displayName=ke;var Ta="MenuSubContent",Na=a.forwardRef((e,t)=>{const n=ma(ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(ne,e.__scopeMenu),u=Qe(ne,e.__scopeMenu),i=_a(Ta,e.__scopeMenu),d=a.useRef(null),p=U(t,d);return c.jsx(Ue.Provider,{scope:e.__scopeMenu,children:c.jsx(ge,{present:r||s.open,children:c.jsx(Ue.Slot,{scope:e.__scopeMenu,children:c.jsx(_n,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;u.isUsingKeyboardRef.current&&((l=d.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:R(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,f=>{u.onClose(),f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{var v;const l=f.currentTarget.contains(f.target),m=hl[u.dir].includes(f.key);l&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});Na.displayName=Ta;function $a(e){return e?"open":"closed"}function ht(e){return e==="indeterminate"}function Nn(e){return ht(e)?"indeterminate":e?"checked":"unchecked"}function $l(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ol(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function jl(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=Ol(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const d=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Dl(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const i=t[s].x,d=t[s].y,p=t[u].x,f=t[u].y;d>r!=f>r&&n<(p-i)*(r-d)/(f-d)+i&&(o=!o)}return o}function kl(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Dl(n,t)}function Ke(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ll=pa,Fl=yn,Gl=ha,Ul=va,Kl=In,Bl=ga,Vl=Et,Wl=xa,Hl=Ma,Yl=Sa,Xl=ya,zl=Ea,Zl=Pa,ql=Ia,Ql=Aa,Jl=Na,$n="ContextMenu",[ed,Jp]=ln($n,[la]),H=la(),[td,Oa]=ed($n),ja=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:s=!0}=e,[u,i]=a.useState(!1),d=H(t),p=F(r),f=a.useCallback(l=>{i(l),p(l)},[p]);return c.jsx(td,{scope:t,open:u,onOpenChange:f,modal:s,children:c.jsx(Ll,{...d,dir:o,open:u,onOpenChange:f,modal:s,children:n})})};ja.displayName=$n;var Da="ContextMenuTrigger",ka=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=Oa(Da,n),u=H(n),i=a.useRef({x:0,y:0}),d=a.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),p=a.useRef(0),f=a.useCallback(()=>window.clearTimeout(p.current),[]),l=m=>{i.current={x:m.clientX,y:m.clientY},s.onOpenChange(!0)};return a.useEffect(()=>f,[f]),a.useEffect(()=>void(r&&f()),[r,f]),c.jsxs(c.Fragment,{children:[c.jsx(Fl,{...u,virtualRef:d}),c.jsx(G.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:R(e.onContextMenu,m=>{f(),l(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:R(e.onPointerDown,ct(m=>{f(),p.current=window.setTimeout(()=>l(m),700)})),onPointerMove:r?e.onPointerMove:R(e.onPointerMove,ct(f)),onPointerCancel:r?e.onPointerCancel:R(e.onPointerCancel,ct(f)),onPointerUp:r?e.onPointerUp:R(e.onPointerUp,ct(f))})]})});ka.displayName=Da;var nd="ContextMenuPortal",La=e=>{const{__scopeContextMenu:t,...n}=e,r=H(t);return c.jsx(Gl,{...r,...n})};La.displayName=nd;var Fa="ContextMenuContent",Ga=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Oa(Fa,n),s=H(n),u=a.useRef(!1);return c.jsx(Ul,{...s,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var d;(d=e.onCloseAutoFocus)==null||d.call(e,i),!i.defaultPrevented&&u.current&&i.preventDefault(),u.current=!1},onInteractOutside:i=>{var d;(d=e.onInteractOutside)==null||d.call(e,i),!i.defaultPrevented&&!o.modal&&(u.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ga.displayName=Fa;var rd="ContextMenuGroup",Ua=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Kl,{...o,...r,ref:t})});Ua.displayName=rd;var od="ContextMenuLabel",Ka=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Bl,{...o,...r,ref:t})});Ka.displayName=od;var ad="ContextMenuItem",Ba=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Vl,{...o,...r,ref:t})});Ba.displayName=ad;var sd="ContextMenuCheckboxItem",Va=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Wl,{...o,...r,ref:t})});Va.displayName=sd;var cd="ContextMenuRadioGroup",Wa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Hl,{...o,...r,ref:t})});Wa.displayName=cd;var id="ContextMenuRadioItem",Ha=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Yl,{...o,...r,ref:t})});Ha.displayName=id;var ud="ContextMenuItemIndicator",Ya=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Xl,{...o,...r,ref:t})});Ya.displayName=ud;var ld="ContextMenuSeparator",Xa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(zl,{...o,...r,ref:t})});Xa.displayName=ld;var dd="ContextMenuArrow",fd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Zl,{...o,...r,ref:t})});fd.displayName=dd;var pd="ContextMenuSub",za=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:s}=e,u=H(t),[i,d]=$e({prop:o,defaultProp:s,onChange:r});return c.jsx(ql,{...u,open:i,onOpenChange:d,children:n})};za.displayName=pd;var md="ContextMenuSubTrigger",Za=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Ql,{...o,...r,ref:t})});Za.displayName=md;var hd="ContextMenuSubContent",qa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Jl,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qa.displayName=hd;function ct(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Qa=ja,vd=ka,Ja=La,gd=Ga,Cd=Ua,xd=Ka,bd=Ba,Md=Va,wd=Wa,Sd=Ha,Rd=Ya,yd=Xa,Ed=za,Pd=Za,_d=qa;function es(e,t=[]){let n=[];function r(s,u){const i=a.createContext(u),d=n.length;n=[...n,u];const p=l=>{var b;const{scope:m,children:v,...g}=l,h=((b=m==null?void 0:m[e])==null?void 0:b[d])||i,x=a.useMemo(()=>g,Object.values(g));return c.jsx(h.Provider,{value:x,children:v})};p.displayName=s+"Provider";function f(l,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[d])||i,g=a.useContext(v);if(g)return g;if(u!==void 0)return u;throw new Error(`\`${l}\` must be used within \`${s}\``)}return[p,f]}const o=()=>{const s=n.map(u=>a.createContext(u));return function(i){const d=(i==null?void 0:i[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return o.scopeName=e,[r,Id(o,...t)]}function Id(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const u=r.reduce((i,{useScope:d,scopeName:p})=>{const l=d(s)[`__scope${p}`];return{...i,...l}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Wt="focusScope.autoFocusOnMount",Ht="focusScope.autoFocusOnUnmount",vr={bubbles:!1,cancelable:!0},Ad="FocusScope",ts=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[i,d]=a.useState(null),p=F(o),f=F(s),l=a.useRef(null),m=U(t,h=>d(h)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let h=function(w){if(v.paused||!i)return;const S=w.target;i.contains(S)?l.current=S:ve(l.current,{select:!0})},x=function(w){if(v.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||ve(l.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const y of w)y.removedNodes.length>0&&ve(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const M=new MutationObserver(b);return i&&M.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),M.disconnect()}}},[r,i,v.paused]),a.useEffect(()=>{if(i){Cr.add(v);const h=document.activeElement;if(!i.contains(h)){const b=new CustomEvent(Wt,vr);i.addEventListener(Wt,p),i.dispatchEvent(b),b.defaultPrevented||(Td(Dd(ns(i)),{select:!0}),document.activeElement===h&&ve(i))}return()=>{i.removeEventListener(Wt,p),setTimeout(()=>{const b=new CustomEvent(Ht,vr);i.addEventListener(Ht,f),i.dispatchEvent(b),b.defaultPrevented||ve(h??document.body,{select:!0}),i.removeEventListener(Ht,f),Cr.remove(v)},0)}}},[i,p,f,v]);const g=a.useCallback(h=>{if(!n&&!r||v.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(x&&b){const M=h.currentTarget,[w,S]=Nd(M);w&&S?!h.shiftKey&&b===S?(h.preventDefault(),n&&ve(w,{select:!0})):h.shiftKey&&b===w&&(h.preventDefault(),n&&ve(S,{select:!0})):b===M&&h.preventDefault()}},[n,r,v.paused]);return c.jsx(G.div,{tabIndex:-1,...u,ref:m,onKeyDown:g})});ts.displayName=Ad;function Td(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ve(r,{select:t}),document.activeElement!==n)return}function Nd(e){const t=ns(e),n=gr(t,e),r=gr(t.reverse(),e);return[n,r]}function ns(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gr(e,t){for(const n of e)if(!$d(n,{upTo:t}))return n}function $d(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Od(e){return e instanceof HTMLInputElement&&"select"in e}function ve(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Od(e)&&t&&e.select()}}var Cr=jd();function jd(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=xr(e,t),e.unshift(t)},remove(t){var n;e=xr(e,t),(n=e[0])==null||n.resume()}}}function xr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dd(e){return e.filter(t=>t.tagName!=="A")}var kd="Portal",rs=a.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=a.useState(!1);me(()=>s(!0),[]);const u=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?Ar.createPortal(c.jsx(G.div,{...r,ref:t}),u):null});rs.displayName=kd;function Ld(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=Fd(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),s=U(r.ref,Gd(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function Fd(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),s=a.useRef("none"),u=e?"mounted":"unmounted",[i,d]=Ld(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const p=it(r.current);s.current=i==="mounted"?p:"none"},[i]),me(()=>{const p=r.current,f=o.current;if(f!==e){const m=s.current,v=it(p);e?d("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?d("UNMOUNT"):d(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),me(()=>{if(t){let p;const f=t.ownerDocument.defaultView??window,l=v=>{const h=it(r.current).includes(v.animationName);if(v.target===t&&h&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",p=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=v=>{v.target===t&&(s.current=it(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function it(e){return(e==null?void 0:e.animationName)||"none"}function Gd(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var os=a.forwardRef((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),s=o.find(Kd);if(s){const u=s.props.children,i=o.map(d=>d===s?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return c.jsx(Jt,{...r,ref:t,children:a.isValidElement(u)?a.cloneElement(u,void 0,i):null})}return c.jsx(Jt,{...r,ref:t,children:n})});os.displayName="Slot";var Jt=a.forwardRef((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const o=Vd(n);return a.cloneElement(n,{...Bd(r,n.props),ref:t?bt(t,o):o})}return a.Children.count(n)>1?a.Children.only(null):null});Jt.displayName="SlotClone";var Ud=({children:e})=>c.jsx(c.Fragment,{children:e});function Kd(e){return a.isValidElement(e)&&e.type===Ud}function Bd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Vd(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var as=Tr(),Yt=function(){},Pt=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Yt,onWheelCapture:Yt,onTouchMoveCapture:Yt}),o=r[0],s=r[1],u=e.forwardProps,i=e.children,d=e.className,p=e.removeScrollBar,f=e.enabled,l=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,M=e.gapMode,w=Nr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,y=$r([n,t]),I=J(J({},w),o);return a.createElement(a.Fragment,null,f&&a.createElement(S,{sideCar:as,removeScrollBar:p,shards:l,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:M}),u?a.cloneElement(a.Children.only(i),J(J({},I),{ref:y})):a.createElement(b,J({},I,{className:d,ref:y}),i))});Pt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pt.classNames={fullWidth:Or,zeroRight:jr};var en=!1;if(typeof window<"u")try{var ut=Object.defineProperty({},"passive",{get:function(){return en=!0,!0}});window.addEventListener("test",ut,ut),window.removeEventListener("test",ut,ut)}catch{en=!1}var Ie=en?{passive:!1}:!1,Wd=function(e){return e.tagName==="TEXTAREA"},ss=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wd(e)&&n[t]==="visible")},Hd=function(e){return ss(e,"overflowY")},Yd=function(e){return ss(e,"overflowX")},br=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=cs(e,r);if(o){var s=is(e,r),u=s[1],i=s[2];if(u>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cs=function(e,t){return e==="v"?Hd(t):Yd(t)},is=function(e,t){return e==="v"?Xd(t):zd(t)},Zd=function(e,t){return e==="h"&&t==="rtl"?-1:1},qd=function(e,t,n,r,o){var s=Zd(e,window.getComputedStyle(t).direction),u=s*r,i=n.target,d=t.contains(i),p=!1,f=u>0,l=0,m=0;do{var v=is(e,i),g=v[0],h=v[1],x=v[2],b=h-x-s*g;(g||b)&&cs(e,i)&&(l+=b,m+=g),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(f&&(o&&Math.abs(l)<1||!o&&u>l)||!f&&(o&&Math.abs(m)<1||!o&&-u>m))&&(p=!0),p},lt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mr=function(e){return[e.deltaX,e.deltaY]},wr=function(e){return e&&"current"in e?e.current:e},Qd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Jd=function(e){return`
|
|
15
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
16
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
17
|
+
`)},ef=0,Ae=[];function tf(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(ef++)[0],s=a.useState(Dr)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=kr([e.lockRef.current],(e.shards||[]).map(wr),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=a.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!u.current.allowPinchZoom;var b=lt(h),M=n.current,w="deltaX"in h?h.deltaX:M[0]-b[0],S="deltaY"in h?h.deltaY:M[1]-b[1],y,I=h.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&N==="h"&&I.type==="range")return!1;var A=br(N,I);if(!A)return!0;if(A?y=N:(y=N==="v"?"h":"v",A=br(N,I)),!A)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=y),!y)return!0;var E=r.current||y;return qd(E,x,h,E==="h"?w:S,!0)},[]),d=a.useCallback(function(h){var x=h;if(!(!Ae.length||Ae[Ae.length-1]!==s)){var b="deltaY"in x?Mr(x):lt(x),M=t.current.filter(function(y){return y.name===x.type&&(y.target===x.target||x.target===y.shadowParent)&&Qd(y.delta,b)})[0];if(M&&M.should){x.cancelable&&x.preventDefault();return}if(!M){var w=(u.current.shards||[]).map(wr).filter(Boolean).filter(function(y){return y.contains(x.target)}),S=w.length>0?i(x,w[0]):!u.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),p=a.useCallback(function(h,x,b,M){var w={name:h,delta:x,target:b,should:M,shadowParent:nf(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=a.useCallback(function(h){n.current=lt(h),r.current=void 0},[]),l=a.useCallback(function(h){p(h.type,Mr(h),h.target,i(h,e.lockRef.current))},[]),m=a.useCallback(function(h){p(h.type,lt(h),h.target,i(h,e.lockRef.current))},[]);a.useEffect(function(){return Ae.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",d,Ie),document.addEventListener("touchmove",d,Ie),document.addEventListener("touchstart",f,Ie),function(){Ae=Ae.filter(function(h){return h!==s}),document.removeEventListener("wheel",d,Ie),document.removeEventListener("touchmove",d,Ie),document.removeEventListener("touchstart",f,Ie)}},[]);var v=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:Jd(o)}):null,v?a.createElement(Lr,{gapMode:e.gapMode}):null)}function nf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rf=Fr(as,tf);var us=a.forwardRef(function(e,t){return a.createElement(Pt,J({},e,{ref:t,sideCar:rf}))});us.classNames=Pt.classNames;const of=us;var tn=["Enter"," "],af=["ArrowDown","PageUp","Home"],ls=["ArrowUp","PageDown","End"],sf=[...af,...ls],cf={ltr:[...tn,"ArrowRight"],rtl:[...tn,"ArrowLeft"]},uf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},et="Menu",[Be,lf,df]=un(et),[ye,ff]=es(et,[df,Mt,Oe]),tt=Mt(),ds=Oe(),[fs,be]=ye(et),[pf,nt]=ye(et),ps=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,i=tt(t),[d,p]=a.useState(null),f=a.useRef(!1),l=F(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.jsx(wt,{...i,children:c.jsx(fs,{scope:t,open:n,onOpenChange:l,content:d,onContentChange:p,children:c.jsx(pf,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:m,modal:u,children:r})})})};ps.displayName=et;var mf="MenuAnchor",On=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=tt(n);return c.jsx(Gr,{...o,...r,ref:t})});On.displayName=mf;var jn="MenuPortal",[hf,ms]=ye(jn,{forceMount:void 0}),hs=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=be(jn,t);return c.jsx(hf,{scope:t,forceMount:n,children:c.jsx(Je,{present:n||s.open,children:c.jsx(rs,{asChild:!0,container:o,children:r})})})};hs.displayName=jn;var re="MenuContent",[vf,Dn]=ye(re),vs=a.forwardRef((e,t)=>{const n=ms(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=be(re,e.__scopeMenu),u=nt(re,e.__scopeMenu);return c.jsx(Be.Provider,{scope:e.__scopeMenu,children:c.jsx(Je,{present:r||s.open,children:c.jsx(Be.Slot,{scope:e.__scopeMenu,children:u.modal?c.jsx(gf,{...o,ref:t}):c.jsx(Cf,{...o,ref:t})})})})}),gf=a.forwardRef((e,t)=>{const n=be(re,e.__scopeMenu),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return sn(s)},[]),c.jsx(kn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Cf=a.forwardRef((e,t)=>{const n=be(re,e.__scopeMenu);return c.jsx(kn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),kn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,x=be(re,n),b=nt(re,n),M=tt(n),w=ds(n),S=lf(n),[y,I]=a.useState(null),N=a.useRef(null),A=U(t,N,x.onContentChange),E=a.useRef(0),O=a.useRef(""),K=a.useRef(0),V=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?of:a.Fragment,z=g?{as:os,allowPinchZoom:!0}:void 0,le=C=>{var L,ae;const _=O.current+C,T=S().filter($=>!$.disabled),D=document.activeElement,q=(L=T.find($=>$.ref.current===D))==null?void 0:L.textValue,Q=T.map($=>$.textValue),de=Af(Q,_,q),B=(ae=T.find($=>$.textValue===de))==null?void 0:ae.ref.current;(function $(se){O.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>$(""),1e3))})(_),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),Ir();const k=a.useCallback(C=>{var T,D;return X.current===((T=V.current)==null?void 0:T.side)&&Nf(C,(D=V.current)==null?void 0:D.area)},[]);return c.jsx(vf,{scope:n,searchRef:O,onItemEnter:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),onItemLeave:a.useCallback(C=>{var _;k(C)||((_=N.current)==null||_.focus(),I(null))},[k]),onTriggerLeave:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{V.current=C},[]),children:c.jsx(ue,{...z,children:c.jsx(ts,{asChild:!0,trapped:o,onMountAutoFocus:R(s,C=>{var _;C.preventDefault(),(_=N.current)==null||_.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:c.jsx(cn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:c.jsx(dn,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:I,onEntryFocus:R(d,C=>{b.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Ur,{role:"menu","aria-orientation":"vertical","data-state":$s(x.open),"data-radix-menu-content":"",dir:b.dir,...M,...h,ref:A,style:{outline:"none",...h.style},onKeyDown:R(h.onKeyDown,C=>{const T=C.target.closest("[data-radix-menu-content]")===C.currentTarget,D=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;T&&(C.key==="Tab"&&C.preventDefault(),!D&&q&&le(C.key));const Q=N.current;if(C.target!==Q||!sf.includes(C.key))return;C.preventDefault();const B=S().filter(L=>!L.disabled).map(L=>L.ref.current);ls.includes(C.key)&&B.reverse(),_f(B)}),onBlur:R(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(E.current),O.current="")}),onPointerMove:R(e.onPointerMove,Ve(C=>{const _=C.target,T=Z.current!==C.clientX;if(C.currentTarget.contains(_)&&T){const D=C.clientX>Z.current?"right":"left";X.current=D,Z.current=C.clientX}}))})})})})})})});vs.displayName=re;var xf="MenuGroup",Ln=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"group",...r,ref:t})});Ln.displayName=xf;var bf="MenuLabel",gs=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{...r,ref:t})});gs.displayName=bf;var vt="MenuItem",Sr="menu.itemSelect",_t=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=nt(vt,e.__scopeMenu),i=Dn(vt,e.__scopeMenu),d=U(t,s),p=a.useRef(!1),f=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(Sr,{bubbles:!0,cancelable:!0});l.addEventListener(Sr,v=>r==null?void 0:r(v),{once:!0}),Br(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return c.jsx(Cs,{...o,ref:d,disabled:n,onClick:R(e.onClick,f),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:R(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:R(e.onKeyDown,l=>{const m=i.searchRef.current!=="";n||m&&l.key===" "||tn.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});_t.displayName=vt;var Cs=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=Dn(vt,n),i=ds(n),d=a.useRef(null),p=U(t,d),[f,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=d.current;g&&v((g.textContent??"").trim())},[s.children]),c.jsx(Be.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:c.jsx(fn,{asChild:!0,...i,focusable:!r,children:c.jsx(G.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:R(e.onPointerMove,Ve(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,Ve(g=>u.onItemLeave(g))),onFocus:R(e.onFocus,()=>l(!0)),onBlur:R(e.onBlur,()=>l(!1))})})})}),Mf="MenuCheckboxItem",xs=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Rs,{scope:e.__scopeMenu,checked:n,children:c.jsx(_t,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...o,ref:t,"data-state":Un(n),onSelect:R(o.onSelect,()=>r==null?void 0:r(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});xs.displayName=Mf;var bs="MenuRadioGroup",[wf,Sf]=ye(bs,{value:void 0,onValueChange:()=>{}}),Ms=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=F(r);return c.jsx(wf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(Ln,{...o,ref:t})})});Ms.displayName=bs;var ws="MenuRadioItem",Ss=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=Sf(ws,e.__scopeMenu),s=n===o.value;return c.jsx(Rs,{scope:e.__scopeMenu,checked:s,children:c.jsx(_t,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Un(s),onSelect:R(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Ss.displayName=ws;var Fn="MenuItemIndicator",[Rs,Rf]=ye(Fn,{checked:!1}),ys=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Rf(Fn,n);return c.jsx(Je,{present:r||gt(s.checked)||s.checked===!0,children:c.jsx(G.span,{...o,ref:t,"data-state":Un(s.checked)})})});ys.displayName=Fn;var yf="MenuSeparator",Es=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Es.displayName=yf;var Ef="MenuArrow",Ps=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=tt(n);return c.jsx(Kr,{...o,...r,ref:t})});Ps.displayName=Ef;var Gn="MenuSub",[Pf,_s]=ye(Gn),Is=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=be(Gn,t),u=tt(t),[i,d]=a.useState(null),[p,f]=a.useState(null),l=F(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),c.jsx(wt,{...u,children:c.jsx(fs,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:f,children:c.jsx(Pf,{scope:t,contentId:ee(),triggerId:ee(),trigger:i,onTriggerChange:d,children:n})})})};Is.displayName=Gn;var Le="MenuSubTrigger",As=a.forwardRef((e,t)=>{const n=be(Le,e.__scopeMenu),r=nt(Le,e.__scopeMenu),o=_s(Le,e.__scopeMenu),s=Dn(Le,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>f,[f]),a.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),d(null)}},[i,d]),c.jsx(On,{asChild:!0,...p,children:c.jsx(Cs,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":$s(n.open),...e,ref:bt(t,o.onTriggerChange),onClick:l=>{var m;(m=e.onClick)==null||m.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,Ve(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:R(e.onPointerLeave,Ve(l=>{var v,g;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,x=h==="right",b=x?-5:5,M=m[x?"left":"right"],w=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+b,y:l.clientY},{x:M,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:M,y:m.bottom}],side:h}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||cf[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});As.displayName=Le;var Ts="MenuSubContent",Ns=a.forwardRef((e,t)=>{const n=ms(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=be(re,e.__scopeMenu),u=nt(re,e.__scopeMenu),i=_s(Ts,e.__scopeMenu),d=a.useRef(null),p=U(t,d);return c.jsx(Be.Provider,{scope:e.__scopeMenu,children:c.jsx(Je,{present:r||s.open,children:c.jsx(Be.Slot,{scope:e.__scopeMenu,children:c.jsx(kn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;u.isUsingKeyboardRef.current&&((l=d.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:R(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,f=>{u.onClose(),f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{var v;const l=f.currentTarget.contains(f.target),m=uf[u.dir].includes(f.key);l&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});Ns.displayName=Ts;function $s(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function Un(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function _f(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function If(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Af(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=If(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const d=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Tf(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const i=t[s].x,d=t[s].y,p=t[u].x,f=t[u].y;d>r!=f>r&&n<(p-i)*(r-d)/(f-d)+i&&(o=!o)}return o}function Nf(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Tf(n,t)}function Ve(e){return t=>t.pointerType==="mouse"?e(t):void 0}var $f=ps,Of=On,jf=hs,Df=vs,kf=Ln,Lf=gs,Ff=_t,Gf=xs,Uf=Ms,Kf=Ss,Bf=ys,Vf=Es,Wf=Ps,Hf=Is,Yf=As,Xf=Ns,It="Menubar",[nn,zf,Zf]=un(It),[Os,em]=es(It,[Zf,Oe]),Y=ff(),js=Oe(),[qf,Kn]=Os(It),Ds=a.forwardRef((e,t)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:s,loop:u=!0,dir:i,...d}=e,p=Ne(i),f=js(n),[l="",m]=$e({prop:r,onChange:o,defaultProp:s}),[v,g]=a.useState(null);return c.jsx(qf,{scope:n,value:l,onMenuOpen:a.useCallback(h=>{m(h),g(h)},[m]),onMenuClose:a.useCallback(()=>m(""),[m]),onMenuToggle:a.useCallback(h=>{m(x=>x?"":h),g(h)},[m]),dir:p,loop:u,children:c.jsx(nn.Provider,{scope:n,children:c.jsx(nn.Slot,{scope:n,children:c.jsx(dn,{asChild:!0,...f,orientation:"horizontal",loop:u,dir:p,currentTabStopId:v,onCurrentTabStopIdChange:g,children:c.jsx(G.div,{role:"menubar",...d,ref:t})})})})})});Ds.displayName=It;var Bn="MenubarMenu",[Qf,ks]=Os(Bn),Ls=e=>{const{__scopeMenubar:t,value:n,...r}=e,o=ee(),s=n||o||"LEGACY_REACT_AUTO_VALUE",u=Kn(Bn,t),i=Y(t),d=a.useRef(null),p=a.useRef(!1),f=u.value===s;return a.useEffect(()=>{f||(p.current=!1)},[f]),c.jsx(Qf,{scope:t,value:s,triggerId:ee(),triggerRef:d,contentId:ee(),wasKeyboardTriggerOpenRef:p,children:c.jsx($f,{...i,open:f,onOpenChange:l=>{l||u.onMenuClose()},modal:!1,dir:u.dir,...r})})};Ls.displayName=Bn;var rn="MenubarTrigger",Fs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=e,s=js(n),u=Y(n),i=Kn(rn,n),d=ks(rn,n),p=a.useRef(null),f=U(t,p,d.triggerRef),[l,m]=a.useState(!1),v=i.value===d.value;return c.jsx(nn.ItemSlot,{scope:n,value:d.value,disabled:r,children:c.jsx(fn,{asChild:!0,...s,focusable:!r,tabStopId:d.value,children:c.jsx(Of,{asChild:!0,...u,children:c.jsx(G.button,{type:"button",role:"menuitem",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":v?d.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":v?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:f,onPointerDown:R(e.onPointerDown,g=>{!r&&g.button===0&&g.ctrlKey===!1&&(i.onMenuOpen(d.value),v||g.preventDefault())}),onPointerEnter:R(e.onPointerEnter,()=>{var h;!!i.value&&!v&&(i.onMenuOpen(d.value),(h=p.current)==null||h.focus())}),onKeyDown:R(e.onKeyDown,g=>{r||(["Enter"," "].includes(g.key)&&i.onMenuToggle(d.value),g.key==="ArrowDown"&&i.onMenuOpen(d.value),["Enter"," ","ArrowDown"].includes(g.key)&&(d.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:R(e.onFocus,()=>m(!0)),onBlur:R(e.onBlur,()=>m(!1))})})})})});Fs.displayName=rn;var Jf="MenubarPortal",Gs=e=>{const{__scopeMenubar:t,...n}=e,r=Y(t);return c.jsx(jf,{...r,...n})};Gs.displayName=Jf;var on="MenubarContent",Us=a.forwardRef((e,t)=>{const{__scopeMenubar:n,align:r="start",...o}=e,s=Y(n),u=Kn(on,n),i=ks(on,n),d=zf(n),p=a.useRef(!1);return c.jsx(Df,{id:i.contentId,"aria-labelledby":i.triggerId,"data-radix-menubar-content":"",...s,...o,ref:t,align:r,onCloseAutoFocus:R(e.onCloseAutoFocus,f=>{var m;!!!u.value&&!p.current&&((m=i.triggerRef.current)==null||m.focus()),p.current=!1,f.preventDefault()}),onFocusOutside:R(e.onFocusOutside,f=>{const l=f.target;d().some(v=>{var g;return(g=v.ref.current)==null?void 0:g.contains(l)})&&f.preventDefault()}),onInteractOutside:R(e.onInteractOutside,()=>{p.current=!0}),onEntryFocus:f=>{i.wasKeyboardTriggerOpenRef.current||f.preventDefault()},onKeyDown:R(e.onKeyDown,f=>{if(["ArrowRight","ArrowLeft"].includes(f.key)){const l=f.target,m=l.hasAttribute("data-radix-menubar-subtrigger"),v=l.closest("[data-radix-menubar-content]")!==f.currentTarget,h=(u.dir==="rtl"?"ArrowRight":"ArrowLeft")===f.key;if(!h&&m||v&&h)return;let M=d().filter(y=>!y.disabled).map(y=>y.value);h&&M.reverse();const w=M.indexOf(i.value);M=u.loop?pp(M,w+1):M.slice(w+1);const[S]=M;S&&u.onMenuOpen(S)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});Us.displayName=on;var ep="MenubarGroup",Ks=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(kf,{...o,...r,ref:t})});Ks.displayName=ep;var tp="MenubarLabel",Bs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Lf,{...o,...r,ref:t})});Bs.displayName=tp;var np="MenubarItem",Vs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Ff,{...o,...r,ref:t})});Vs.displayName=np;var rp="MenubarCheckboxItem",Ws=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Gf,{...o,...r,ref:t})});Ws.displayName=rp;var op="MenubarRadioGroup",Hs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Uf,{...o,...r,ref:t})});Hs.displayName=op;var ap="MenubarRadioItem",Ys=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Kf,{...o,...r,ref:t})});Ys.displayName=ap;var sp="MenubarItemIndicator",Xs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Bf,{...o,...r,ref:t})});Xs.displayName=sp;var cp="MenubarSeparator",zs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Vf,{...o,...r,ref:t})});zs.displayName=cp;var ip="MenubarArrow",up=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Wf,{...o,...r,ref:t})});up.displayName=ip;var lp="MenubarSub",Zs=e=>{const{__scopeMenubar:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,u=Y(t),[i=!1,d]=$e({prop:r,defaultProp:s,onChange:o});return c.jsx(Hf,{...u,open:i,onOpenChange:d,children:n})};Zs.displayName=lp;var dp="MenubarSubTrigger",qs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Yf,{"data-radix-menubar-subtrigger":"",...o,...r,ref:t})});qs.displayName=dp;var fp="MenubarSubContent",Qs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Xf,{...o,"data-radix-menubar-content":"",...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});Qs.displayName=fp;function pp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Js=Ds,mp=Ls,ec=Fs,tc=Gs,hp=Us,vp=Ks,gp=Bs,Cp=Vs,xp=Ws,bp=Hs,Mp=Ys,wp=Xs,Sp=zs,Rp=Zs,yp=qs,Ep=Qs;function Pp(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Vn="ScrollArea",[nc,tm]=ln(Vn),[_p,oe]=nc(Vn),rc=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...u}=e,[i,d]=a.useState(null),[p,f]=a.useState(null),[l,m]=a.useState(null),[v,g]=a.useState(null),[h,x]=a.useState(null),[b,M]=a.useState(0),[w,S]=a.useState(0),[y,I]=a.useState(!1),[N,A]=a.useState(!1),E=U(t,K=>d(K)),O=Ne(o);return c.jsx(_p,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:i,viewport:p,onViewportChange:f,content:l,onContentChange:m,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:y,onScrollbarXEnabledChange:I,scrollbarY:h,onScrollbarYChange:x,scrollbarYEnabled:N,onScrollbarYEnabledChange:A,onCornerWidthChange:M,onCornerHeightChange:S,children:c.jsx(G.div,{dir:O,...u,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});rc.displayName=Vn;var oc="ScrollAreaViewport",ac=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,u=oe(oc,n),i=a.useRef(null),d=U(t,i,u.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(G.div,{"data-radix-scroll-area-viewport":"",...s,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ac.displayName=oc;var fe="ScrollAreaScrollbar",sc=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:u}=o,i=e.orientation==="horizontal";return a.useEffect(()=>(i?s(!0):u(!0),()=>{i?s(!1):u(!1)}),[i,s,u]),o.type==="hover"?c.jsx(Ip,{...r,ref:t,forceMount:n}):o.type==="scroll"?c.jsx(Ap,{...r,ref:t,forceMount:n}):o.type==="auto"?c.jsx(cc,{...r,ref:t,forceMount:n}):o.type==="always"?c.jsx(Wn,{...r,ref:t}):null});sc.displayName=fe;var Ip=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),[s,u]=a.useState(!1);return a.useEffect(()=>{const i=o.scrollArea;let d=0;if(i){const p=()=>{window.clearTimeout(d),u(!0)},f=()=>{d=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",p),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(d),i.removeEventListener("pointerenter",p),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.jsx(ge,{present:n||s,children:c.jsx(cc,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Ap=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),s=e.orientation==="horizontal",u=Tt(()=>d("SCROLL_END"),100),[i,d]=Pp("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(i==="idle"){const p=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[i,o.scrollHideDelay,d]),a.useEffect(()=>{const p=o.viewport,f=s?"scrollLeft":"scrollTop";if(p){let l=p[f];const m=()=>{const v=p[f];l!==v&&(d("SCROLL"),u()),l=v};return p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[o.viewport,s,d,u]),c.jsx(ge,{present:n||i!=="hidden",children:c.jsx(Wn,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:R(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),cc=a.forwardRef((e,t)=>{const n=oe(fe,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,u]=a.useState(!1),i=e.orientation==="horizontal",d=Tt(()=>{if(n.viewport){const p=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;u(i?p:f)}},10);return Te(n.viewport,d),Te(n.content,d),c.jsx(ge,{present:r||s,children:c.jsx(Wn,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Wn=a.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=oe(fe,e.__scopeScrollArea),s=a.useRef(null),u=a.useRef(0),[i,d]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=fc(i.viewport,i.content),f={...r,sizes:i,onSizesChange:d,hasThumb:p>0&&p<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:m=>u.current=m};function l(m,v){return Dp(m,u.current,i,v)}return n==="horizontal"?c.jsx(Tp,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollLeft,v=Rr(m,i,o.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=l(m,o.dir))}}):n==="vertical"?c.jsx(Np,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollTop,v=Rr(m,i);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=l(m))}}):null}),Tp=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=oe(fe,e.__scopeScrollArea),[u,i]=a.useState(),d=a.useRef(null),p=U(t,d,s.onScrollbarXChange);return a.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(uc,{"data-orientation":"horizontal",...o,ref:p,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":At(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,l)=>{if(s.viewport){const m=s.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),mc(m,l)&&f.preventDefault()}},onResize:()=>{d.current&&s.viewport&&u&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:xt(u.paddingLeft),paddingEnd:xt(u.paddingRight)}})}})}),Np=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=oe(fe,e.__scopeScrollArea),[u,i]=a.useState(),d=a.useRef(null),p=U(t,d,s.onScrollbarYChange);return a.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(uc,{"data-orientation":"vertical",...o,ref:p,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":At(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,l)=>{if(s.viewport){const m=s.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),mc(m,l)&&f.preventDefault()}},onResize:()=>{d.current&&s.viewport&&u&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:xt(u.paddingTop),paddingEnd:xt(u.paddingBottom)}})}})}),[$p,ic]=nc(fe),uc=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:u,onThumbPointerDown:i,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:f,onResize:l,...m}=e,v=oe(fe,n),[g,h]=a.useState(null),x=U(t,E=>h(E)),b=a.useRef(null),M=a.useRef(""),w=v.viewport,S=r.content-r.viewport,y=F(f),I=F(d),N=Tt(l,10);function A(E){if(b.current){const O=E.clientX-b.current.left,K=E.clientY-b.current.top;p({x:O,y:K})}}return a.useEffect(()=>{const E=O=>{const K=O.target;(g==null?void 0:g.contains(K))&&y(O,S)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[w,g,S,y]),a.useEffect(I,[r,I]),Te(g,N),Te(v.content,N),c.jsx($p,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:F(s),onThumbPointerUp:F(u),onThumbPositionChange:I,onThumbPointerDown:F(i),children:c.jsx(G.div,{...m,ref:x,style:{position:"absolute",...m.style},onPointerDown:R(e.onPointerDown,E=>{E.button===0&&(E.target.setPointerCapture(E.pointerId),b.current=g.getBoundingClientRect(),M.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),A(E))}),onPointerMove:R(e.onPointerMove,A),onPointerUp:R(e.onPointerUp,E=>{const O=E.target;O.hasPointerCapture(E.pointerId)&&O.releasePointerCapture(E.pointerId),document.body.style.webkitUserSelect=M.current,v.viewport&&(v.viewport.style.scrollBehavior=""),b.current=null})})})}),Ct="ScrollAreaThumb",lc=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ic(Ct,e.__scopeScrollArea);return c.jsx(ge,{present:n||o.hasThumb,children:c.jsx(Op,{ref:t,...r})})}),Op=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=oe(Ct,n),u=ic(Ct,n),{onThumbPositionChange:i}=u,d=U(t,l=>u.onThumbChange(l)),p=a.useRef(),f=Tt(()=>{p.current&&(p.current(),p.current=void 0)},100);return a.useEffect(()=>{const l=s.viewport;if(l){const m=()=>{if(f(),!p.current){const v=kp(l,i);p.current=v,i()}};return i(),l.addEventListener("scroll",m),()=>l.removeEventListener("scroll",m)}},[s.viewport,f,i]),c.jsx(G.div,{"data-state":u.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:R(e.onPointerDownCapture,l=>{const v=l.target.getBoundingClientRect(),g=l.clientX-v.left,h=l.clientY-v.top;u.onThumbPointerDown({x:g,y:h})}),onPointerUp:R(e.onPointerUp,u.onThumbPointerUp)})});lc.displayName=Ct;var Hn="ScrollAreaCorner",dc=a.forwardRef((e,t)=>{const n=oe(Hn,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(jp,{...e,ref:t}):null});dc.displayName=Hn;var jp=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=oe(Hn,n),[s,u]=a.useState(0),[i,d]=a.useState(0),p=!!(s&&i);return Te(o.scrollbarX,()=>{var l;const f=((l=o.scrollbarX)==null?void 0:l.offsetHeight)||0;o.onCornerHeightChange(f),d(f)}),Te(o.scrollbarY,()=>{var l;const f=((l=o.scrollbarY)==null?void 0:l.offsetWidth)||0;o.onCornerWidthChange(f),u(f)}),p?c.jsx(G.div,{...r,ref:t,style:{width:s,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function xt(e){return e?parseInt(e,10):0}function fc(e,t){const n=e/t;return isNaN(n)?0:n}function At(e){const t=fc(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dp(e,t,n,r="ltr"){const o=At(n),s=o/2,u=t||s,i=o-u,d=n.scrollbar.paddingStart+u,p=n.scrollbar.size-n.scrollbar.paddingEnd-i,f=n.content-n.viewport,l=r==="ltr"?[0,f]:[f*-1,0];return pc([d,p],l)(e)}function Rr(e,t,n="ltr"){const r=At(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,u=t.content-t.viewport,i=s-r,d=n==="ltr"?[0,u]:[u*-1,0],p=Oc(e,d);return pc([0,u],[0,i])(p)}function pc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function mc(e,t){return e>0&&e<t}var kp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},u=n.left!==s.left,i=n.top!==s.top;(u||i)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Tt(e,t){const n=F(e),r=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),a.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Te(e,t){const n=F(t);me(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Lp=rc,Fp=ac,Gp=sc,Up=lc,Kp=dc;const Bp=P(Lp,{position:"relative",width:"100%",overflow:"hidden",maxHeight:"inherit",variants:{fullHeight:{true:{height:"100%"}}},defaultVariants:{fullHeight:!0}}),Vp=P(Fp,{width:"100%",height:"100%",maxHeight:"inherit",borderRadius:"inherit","& > div[style]":{display:"block !important"},variants:{asContainer:{true:{padding:"$1"}}}}),an=4,yr=P(Gp,{display:"flex",userSelect:"none",touchAction:"none",margin:"$0_5",background:"$scrollbarTrack",'&[data-orientation="vertical"]':{width:an},'&[data-orientation="horizontal"]':{flexDirection:"column",height:an},variants:{subtle:{true:{padding:"$0_5 0 $0_5 $0_5",margin:0,background:"transparent","&:hover":{background:"$scrollbarTrackHover"}}}},defaultVariants:{subtle:!0}}),Er=P(Up,{flex:1,background:"$scrollbarThumb",borderRadius:an,position:"relative","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:8,minHeight:8}}),Wp=P(Kp,{backgroundColor:"$scrollbarTrackHover"});function Yn(e){const{fullHeight:t,subtle:n,css:r,asContainer:o,...s}=e;return c.jsxs(Bp,{fullHeight:t,children:[c.jsx(Vp,{css:r,asContainer:o,...s}),c.jsx(yr,{orientation:"horizontal",subtle:n,children:c.jsx(Er,{})}),c.jsx(yr,{orientation:"vertical",subtle:n,children:c.jsx(Er,{})}),c.jsx(Wp,{})]})}const Xn=P("span",{display:"flex",alignItems:"center","& > svg":{marginRight:"$1_5",width:"$4",height:"$4"}}),Hp={context:{Root:Qa,Group:Cd,Sub:Ed,Portal:Ja,RadioGroup:P(wd,Nt),MenuLabel:P(xd,$t),MenuItem:P(bd,Ot),Content:P(gd,Ee,er),SubContent:P(_d,Ee,er),SubMenuItem:P(Pd,jt),Separator:P(yd,Dt),CheckboxItem:P(Md,kt),RadioItem:P(Sd,Lt),ItemIndicator:P(Rd,Ft)},dropdown:{Root:Qo,Group:_u,RadioGroup:P(Nu,Nt),Sub:Du,Portal:Jo,MenuLabel:P(Iu,$t),MenuItem:P(Au,Ot),Content:P(Pu,Ee,tr),SubContent:P(Lu,Ee,tr),SubMenuItem:P(ku,jt),Separator:P(ju,Dt),CheckboxItem:P(Tu,kt),RadioItem:P($u,Lt),ItemIndicator:P(Ou,Ft)},menubar:{Root:Js,Group:vp,RadioGroup:P(bp,Nt),Sub:Rp,Portal:tc,MenuLabel:P(gp,$t),MenuItem:P(Cp,Ot),Content:P(hp,Ee),SubContent:P(Ep,Ee),SubMenuItem:P(yp,jt),Separator:P(Sp,Dt),CheckboxItem:P(xp,kt),RadioItem:P(Mp,Lt),ItemIndicator:P(wp,Ft)}};function Me(){const e=a.useContext(we),t=Hp[e.type];if(!t)throw new Error(`Cannot resolve Primitive Component by type ${e.type}`);return t}const we=a.createContext({type:"dropdown",size:"sm"});we.displayName="MenuContext";const zn=function(t){return c.jsx(we.Provider,{value:{type:t.type,size:t.size},children:t.children})},nm=a.forwardRef(function(t,n){const{icon:r,name:o,shortcuts:s,label:u,disabled:i,onSelect:d,onClick:p,asChild:f,critical:l,children:m,...v}=t,{size:g}=a.useContext(we),{MenuItem:h}=Me();return c.jsx(h,{ref:n,disabled:i,onSelect:d,onClick:p,size:g,critical:l,asChild:f,...v,children:a.isValidElement(m)?m:c.jsxs(a.Fragment,{children:[c.jsxs(Xn,{children:[r,o]}),c.jsx(Hc,{shortcuts:s})]})})}),Zn=a.forwardRef(function(t,n){const{Content:r}=Me(),{size:o}=a.useContext(we);return c.jsx(r,{size:o,ref:n,...t})});function rm(e){const{name:t,icon:n,disabled:r,children:o}=e,{size:s}=a.useContext(we),{SubMenuItem:u,SubContent:i,Sub:d,Portal:p}=Me();return c.jsxs(d,{children:[c.jsxs(u,{size:s,disabled:r,children:[c.jsxs(Xn,{children:[n,t]}),c.jsx(jc,{size:"12px"})]}),c.jsx(p,{children:c.jsx(i,{children:c.jsx(Yn,{type:"always",subtle:!1,asContainer:!0,children:o})})})]})}function om(e){const{Group:t,MenuLabel:n}=Me(),{label:r,divider:o,children:s,...u}=e,i=typeof o=="boolean"&&o?"bottom":o,d=i==="top"||i==="both",p=i==="bottom"||i==="both";return c.jsxs(pe.Fragment,{children:[d&&c.jsx(Pr,{}),c.jsxs(t,{...u,children:[r&&c.jsx(n,{children:r}),s]}),p&&c.jsx(Pr,{})]})}function am(e){const{name:t,icon:n,...r}=e,{size:o}=a.useContext(we),{CheckboxItem:s,ItemIndicator:u}=Me();return c.jsxs(s,{...r,size:o,children:[c.jsx(u,{children:c.jsx(Dc,{})}),c.jsxs(Xn,{children:[n,t]})]})}const Yp=P("div",{height:"$1",width:"$1",borderRadius:"$round",backgroundColor:"currentColor"});function Xp(e){const{value:t,onSelect:n,name:r}=e,{RadioItem:o,ItemIndicator:s}=Me();return c.jsxs(o,{value:t,onSelect:n,children:[c.jsx(s,{children:c.jsx(Yp,{})}),r]})}function sm(e){const{items:t,label:n,...r}=e,{RadioGroup:o,MenuLabel:s}=Me(),{size:u}=a.useContext(we);return c.jsxs(o,{...r,size:u,children:[n&&c.jsx(s,{children:n}),t.map((i,d)=>c.jsx(Xp,{...i},d))]})}function Pr(){const{Separator:e}=Me();return c.jsx(e,{})}function cm(e){const{children:t,portal:n=!0,size:r="sm",side:o,sideOffset:s=4,align:u="start",alignOffset:i,disabled:d=!1,...p}=e;let f=a.Fragment,l;n&&(f=Jo,typeof n=="object"&&(l=n));const m=f===a.Fragment?{}:{container:l};return c.jsx(zn,{type:"dropdown",size:r,children:c.jsxs(Qo,{modal:!1,...p,children:[c.jsx(Eu,{disabled:d,asChild:!0,children:e.trigger}),c.jsx(f,{...m,children:c.jsx(Zn,{side:o,sideOffset:s,align:u,alignOffset:i,children:c.jsx(Yn,{type:"always",subtle:!1,asContainer:!0,children:t})})})]})})}function im(e){const{trigger:t,size:n="sm",children:r,onOpenChange:o,onPointerDownOutside:s,portal:u=!0,asChild:i,disabled:d=!1,hidden:p}=e;let f=a.Fragment,l;return u&&(f=Ja,typeof u=="object"&&(l=u)),c.jsx(zn,{type:"context",size:n,children:c.jsxs(Qa,{onOpenChange:o,children:[c.jsx(vd,{disabled:d,asChild:i,children:t}),c.jsx(f,{container:l,children:c.jsx(Zn,{hidden:p,onPointerDownOutside:s,children:c.jsx(Yn,{type:"always",subtle:!1,asContainer:!0,children:r})})})]})})}const zp=P(ec,{all:"unset",display:"flex",height:"$6",alignItems:"center",padding:"0 $2",fontSize:"$sm",outline:"none",cursor:"default",userSelect:"none",borderRadius:"$2","&:hover":{backgroundColor:"$grayA4",color:"$gray12"},"&:focus":{backgroundColor:"$grayA4",color:"$gray12"},"&[data-state=open]":{backgroundColor:"$grayA4",color:"$gray12"}}),hc=pe.forwardRef((e,t)=>c.jsx(zp,{ref:t,...e}));hc.displayName=ec.displayName;function um(e){const{name:t}=e;return c.jsxs(mp,{children:[c.jsx(hc,{children:t}),c.jsx(tc,{children:c.jsx(Zn,{align:"start",alignOffset:-4,sideOffset:4,children:e.children})})]})}const Zp=P(Js,{display:"flex",height:"100%",alignItems:"center",padding:"0 $2",flexWrap:"nowrap"});function lm(e){const{size:t="sm"}=e;return c.jsx(zn,{type:"menubar",size:t,children:c.jsx(Zp,{children:e.children})})}export{im as C,cm as D,or as K,nm as M,rm as S,Fc as a,Gc as b,Uc as c,Hc as d,lm as e,um as f,Pr as g,am as h,sm as i,om as j,Yn as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E=Object.defineProperty;var T=(n,e,t)=>e in n?E(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _=(n,e,t)=>(T(n,typeof e!="symbol"?e+"":e,t),t);import{bQ as v,bR as U,bx as g,a4 as i,bS as u,aL as c,aO as b,y as f,bT as p,j as x,n as C,e as V,q as m}from"./index-d497fb6d.js";import"./index-8a22fe59.js";import"./postmen-0413c689.js";import{F as d}from"./index-68806c86.js";import{M}from"./MeshThumbnail-9bbe01dc.js";import{A as R}from"./AssetViewer-9f395efb.js";import{e as A}from"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";class O{static createMesh(e,t){const s=new v(e);return O.setMeshData(s,t),s}static setMeshData(e,t){var s,r;return e.setPositions([...t.positions]),e.setNormals(t.normals),e.setUVs(t.uvs),t.uv1&&e.setUVs(t.uv1,1),t.uv2&&e.setUVs(t.uv2,2),t.uv3&&e.setUVs(t.uv3,3),t.uv4&&e.setUVs(t.uv4,4),t.uv5&&e.setUVs(t.uv5,5),t.uv6&&e.setUVs(t.uv6,6),t.uv7&&e.setUVs(t.uv7,7),t.bounds?(e.bounds.min.copyFrom(t.bounds.min),e.bounds.max.copyFrom(t.bounds.max)):O.calculateBounds(t.positions,e.bounds),(s=t.blendShapes)==null||s.forEach(o=>{const l=new U(o.name);o.frames.forEach(a=>{l.addFrame(a.weight,a.positions,a.normals,a.uvs)}),e.addBlendShape(l)}),(r=t.subMeshes)==null||r.forEach(o=>{e.addSubMesh(o)}),t.indices&&(t.positions.length<=65535?e.setIndices(new Uint16Array(t.indices)):e.setIndices(new Uint32Array(t.indices))),e.uploadData(!1),e}static calculateBounds(e,t){const{min:s,max:r}=t,o=e.length;s.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let l=0;l<o;l++){const a=e[l];s.x=Math.min(a.x,s.x),s.y=Math.min(a.y,s.y),s.z=Math.min(a.z,s.z),r.x=Math.max(a.x,r.x),r.y=Math.max(a.y,r.y),r.z=Math.max(a.z,r.z)}}}class N extends g{constructor(e,t){super(e),this.meshData=t}restoreContent(){O.setMeshData(this.resource,this.meshData)}}var y=(n=>(n.POSITION="Position",n.NORMAL="Normal",n.COLOR_0="Color",n.TANGENT="Tangent",n.WEIGHTS_0="BoneWeight",n.JOINTS_0="BoneIndex",n.TEXCOORD_0="UV",n.TEXCOORD_1="UV1",n.TEXCOORD_2="UV2",n.TEXCOORD_3="UV3",n.TEXCOORD_4="UV4",n.TEXCOORD_5="UV5",n.TEXCOORD_6="UV6",n.TEXCOORD_7="UV7",n))(y||{});const L=["POSITION","NORMAL","COLOR_0","TANGENT","WEIGHTS_0","JOINTS_0","TEXCOORD_0","TEXCOORD_1","TEXCOORD_2","TEXCOORD_3","TEXCOORD_4","TEXCOORD_5","TEXCOORD_6","TEXCOORD_7"],X={[i.Float]:"4 bytes",[i.Vector2]:"8 bytes",[i.Vector3]:"12 bytes",[i.Vector4]:"16 bytes",[i.Byte4]:"4 bytes",[i.UByte4]:"4 bytes",[i.NormalizedByte4]:"4 bytes",[i.NormalizedUByte4]:"4 bytes",[i.NormalizedShort2]:"4 bytes",[i.NormalizedShort4]:"8 bytes",[i.Short2]:"4 bytes",[i.UShort2]:"4 bytes",[i.NormalizedUShort2]:"4 bytes",[i.Short4]:"8 bytes",[i.UShort4]:"8 bytes",[i.NormalizedUShort4]:"8 bytes"};u.Triangles+"",u.TriangleStrip+"",u.TriangleFan+"",u.LineLoop+"",u.LineStrip+"",u.Lines+"",u.Points+"";function w(n){switch(n.topology){case u.Triangles:return`${n.count/3} triangles`;case u.TriangleFan:case u.TriangleStrip:return`${n.count-2} triangles`;case u.Lines:return`${n.count/2} lines`;case u.LineStrip:return`${n.count-1} lines`;case u.LineLoop:return`${n.count} lines`;case u.Points:return`${n.count} points`}}function S(n){if(n instanceof Uint8Array)return"Uint8";if(n instanceof Uint16Array)return"Uint16";if(n instanceof Uint32Array)return"Uint32"}const I=n=>{const e=n.asset.engineObject,t=e.vertexCount,s=e.getIndices(),r=e.subMeshes;return c.jsxs(c.Fragment,{children:[c.jsx(b,{title:`Vertices: ${t}`,defaultOpen:!0,children:L.map(o=>e.vertexElements.find(l=>l.semantic===o)).filter(o=>o!=null).map(o=>c.jsx(d,{label:y[o.attribute],value:`${i[o.format]} (${X[o.format]})`},o.attribute))}),s?c.jsx(b,{title:`Indices: ${s.length}`,defaultOpen:!0,children:c.jsx(d,{label:"Format",value:S(s)})}):null,c.jsx(b,{title:`SubMesh: ${r.length}`,defaultOpen:!0,children:r.map((o,l)=>c.jsx(d,{label:`# ${l}`,value:w(o)},l))})]})};class j extends R{setViewAsset(e,t){const s=t.createChild("mesh_entity"),r=s.addComponent(f);r.mesh=e.engineObject;const o=new p(e.engine);o.baseColor.set(.5,.5,.5,1),r.setMaterial(o),this._entity=s}}var B=Object.defineProperty,F=Object.getOwnPropertyDescriptor,z=(n,e,t,s)=>{for(var r=s>1?void 0:s?F(e,t):e,o=n.length-1,l;o>=0;o--)(l=n[o])&&(r=(s?l(e,t,r):l(r))||r);return s&&r&&B(e,t,r),r};let h=class extends x{constructor(e){super(e);_(this,"meshData",null)}beforeDelete(){return null}afterDelete(){return null}async initByMain(e){const{engine:t}=this,s=JSON.parse(await e.text());this.meshData=s;const r=new v(t);O.setMeshData(r,s),t.resourceManager.addContentRestorer(new N(r,s)),this.bindEngineObject(r),this._releaseMeshCache()}initByEngineObject(e){this.bindEngineObject(e),this._name=e.name,this.meshData={positions:[],subMeshes:[]}}_releaseMeshCache(){const e=this.engineObject;e._verticesUint8=null,e._indices=null,e._verticesFloat32=null,e._positions=null,e._tangents=null,e._normals=null,e._colors=null,e._uv=null,e._uv1=null,e._uv2=null,e._uv3=null,e._uv4=null,e._uv5=null,e._uv6=null,e._uv7=null}};h=z([C({type:"Mesh",label:V("asset.mesh.title"),icon:{},loaderType:"Mesh",extname:"mesh",customInspector:I,viewer:j,thumbnail:M,dragLayer:m.Mesh,async bundle({content:n}){const e=JSON.parse(await n.text()),t=A(e,{type:"Mesh",name:"mesh"});return{content:new Blob([t])}}})],h);export{h as MeshAsset};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var f=Object.defineProperty;var c=(r,e,t)=>e in r?f(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var s=(r,e,t)=>(c(r,typeof e!="symbol"?e+"":e,t),t);import{p as n,C as d,s as p,f as v,aE as P,E as b,v as y,x as u,aC as w}from"./index-
|
|
1
|
+
var f=Object.defineProperty;var c=(r,e,t)=>e in r?f(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var s=(r,e,t)=>(c(r,typeof e!="symbol"?e+"":e,t),t);import{p as n,C as d,s as p,f as v,aE as P,E as b,v as y,x as u,aC as w}from"./index-d497fb6d.js";import"./index-8a22fe59.js";import"./postmen-0413c689.js";var M=Object.defineProperty,O=Object.getOwnPropertyDescriptor,i=(r,e,t,l)=>{for(var a=l>1?void 0:l?O(e,t):e,h=r.length-1,m;h>=0;h--)(m=r[h])&&(a=(l?m(e,t,a):m(a))||a);return l&&a&&M(e,t,a),a};class o extends b{constructor(){super(...arguments);s(this,"mesh",null);s(this,"material",{refId:"0000200"});s(this,"receiveShadows",!0);s(this,"castShadows",!0);s(this,"priority",0);s(this,"materialOpen",!1)}setMaterialOpen(t){this.materialOpen=t}}i([n({type:d.AssetPicker,assetType:["Mesh"],label:"mesh-renderer.mesh.title",info:"mesh-renderer.mesh.info",bindPath:"mesh"}),p()],o.prototype,"mesh",2);i([n({type:d.AssetPicker,assetType:"Material",label:"mesh-renderer.material.title",info:"mesh-renderer.material.info",customFilter:r=>{var e;return((e=r.engineObject.shader)==null?void 0:e.name)!=="Effect/Particle"}}),v({engineKey:"setMaterial",setPath:"setMaterial()",getPath:"getMaterial()",valueType:P.ReferResource,getEngineValue:r=>r.getMaterial()}),p()],o.prototype,"material",2);i([n({label:"mesh-renderer.receive-shadows.title",info:"mesh-renderer.receive-shadows.info",bindPath:"receiveShadows"}),y(),p()],o.prototype,"receiveShadows",2);i([n({label:"mesh-renderer.cast-shadows.title",info:"mesh-renderer.cast-shadows.info",bindPath:"castShadows"}),y(),p()],o.prototype,"castShadows",2);i([n({label:"mesh-renderer.priority.title",info:"mesh-renderer.priority.info",bindPath:"priority"}),p()],o.prototype,"priority",2);i([u],o.prototype,"materialOpen",2);i([w],o.prototype,"setMaterialOpen",1);export{o as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aJ as l,
|
|
1
|
+
import{aJ as l,aN as c,aL as m,aP as f,p as h}from"./index-d497fb6d.js";import{u as d}from"./index-8a22fe59.js";import{c as u}from"./Component-c3c0c167.js";import"./postmen-0413c689.js";import{c as M}from"./createOnModelChange-38471bb6.js";import{R}from"./ReferencedMaterial-890492a2.js";import{M as v}from"./MeshRendererBaseComponent-0bc9f5b3.js";import"./MaterialInspector-45e208c7.js";import"./IconPointFilled-192e99c9.js";import"./createReactComponent-3e49f864.js";const x=l(function(o){const[r,s]=c.useState(null),e=o.data,{assetStore:t,inspectorFacade:n}=d();return c.useEffect(()=>{t.getAssetByRef(e.material).then(a=>{s(a)})},[e.material]),m.jsxs(m.Fragment,{children:[m.jsx(f.List,{model:e,configs:e.formSchema.items,onModelChange:M("component",e.id,n,e)}),r&&m.jsx(R,{materialAsset:r})]})});var C=Object.defineProperty,j=Object.getOwnPropertyDescriptor,i=(o,r,s,e)=>{for(var t=e>1?void 0:e?j(r,s):r,n=o.length-1,a;n>=0;n--)(a=o[n])&&(t=(e?a(r,s,t):a(t))||t);return e&&t&&C(r,s,t),t};let p=class extends v{constructor(o,r){super(o,r)}};i([h({assetType:["PrimitiveMesh","Mesh"]})],p.prototype,"mesh",2);p=i([u({type:"MeshRenderer",customInspector:x,componentsMenu:{label:"component.renderer.mesh.title"}})],p);export{p as MeshRendererComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var r=Object.defineProperty;var c=(i,e,t)=>e in i?r(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var n=(i,e,t)=>(c(i,typeof e!="symbol"?e+"":e,t),t);import{y as h,z as o,R as d}from"./index-
|
|
1
|
+
var r=Object.defineProperty;var c=(i,e,t)=>e in i?r(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var n=(i,e,t)=>(c(i,typeof e!="symbol"?e+"":e,t),t);import{y as h,z as o,R as d}from"./index-d497fb6d.js";class a{static update(e,t){this.entity?this.entity.isActive=!0:this.initScene(e),this.meshRenderer.mesh=t.engineObject}static clear(){this.entity.isActive=!1}static initScene(e){const t=this.entity=e.createChild("mesh");t.transform.setRotation(16,-47.4,-16.7),this.meshRenderer=t.addComponent(h);const s=new o(e.engine);s.baseColor.set(.7,.7,.7,1),s.metallic=0,s.renderFace=d.Double,this.meshRenderer.setMaterial(s)}}n(a,"entity"),n(a,"meshRenderer");export{a as M};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var ta=Object.defineProperty;var aa=(a,e,t)=>e in a?ta(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var S=(a,e,t)=>(aa(a,typeof e!="symbol"?e+"":e,t),t);import{bD as Ae,b9 as we,av as w,aw as re,b8 as je,cf as ge,bW as ct,bX as _e,cg as le,ce,e_ as de,aJ as X,aN as Y,aL as v,aP as ra,aK as K,bn as Ce,cq as te,bl as pt,fe as Oe,ff as he,bC as sa,b_ as oa,bL as R,fg as na,bG as It,fh as ia,fi as la,fj as ca,fk as pa,fl as ua,fm as q,aH as ma,fn as da,aI as At,aM as Ot,fo as ha,fp as fa,fq as fe,dt as ya,cc as Te,cd as Le,c9 as xe,ci as Et,b4 as wt,cj as jt,fb as ba,E as va,C as V,fr as U,fs as N,ft as ve,bm as ga,e as u,x as Q,f as I,aE as xa,p as C,s as O}from"./index-d497fb6d.js";import{u as kt}from"./index-8a22fe59.js";import{c as Sa}from"./Component-c3c0c167.js";import"./postmen-0413c689.js";import{c as Pa}from"./createOnModelChange-38471bb6.js";import{R as Ma}from"./ReferencedMaterial-890492a2.js";import"./TextureAsset-bf69040b.js";import"./GlTFAsset-917bf1ee.js";import"./MaterialAsset-aa93db51.js";import{MeshAsset as za}from"./MeshAsset-585f4b18.js";import"./AnimatorControllerAsset-9192e596.js";import"./AnimationClipAsset-0a1f63eb.js";import{I as Ca}from"./ShaderChunkAsset-a3ff3959.js";import"./AmbientLightAsset-57a59fc2.js";import"./SpineSkeletonDataAsset-a8598103.js";import"./FontAsset-10273d05.js";import"./SceneAsset-7a9dbdd8.js";import"./ShaderAsset-2f2c1e95.js";import"./PrimitiveMesh-fde624a6.js";import"./XRReferenceImageAsset-16071f5c.js";import"./PrefabAsset-8c923465.js";import"./PhysicsMaterialAsset-2dd013f8.js";import"./RenderTargetAsset-bf38a725.js";import"./AudioAsset-0ea4ba7b.js";import"./index-2f54d4c9.js";import"./MarkdownAsset-602f93bf.js";import{I as Oa}from"./IconPlus-2bfc60da.js";import{B as st}from"./index-1fa3ba70.js";import{c as Ea}from"./createReactComponent-3e49f864.js";import"./MaterialInspector-45e208c7.js";import"./IconPointFilled-192e99c9.js";import"./ktx2-encoder-772f6c33.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-0268ffac.js";import"./AssetViewer-9f395efb.js";import"./glTFIO-45ff9a17.js";import"./shader-data-utils-e38a959d.js";import"./index-68806c86.js";import"./MeshThumbnail-9bbe01dc.js";import"./bundlers-9b0d37fc.js";import"./module-136992e3.js";import"./module-1470d524.js";import"./ShaderUIScriptAsset-d3a2d680.js";import"./FormItemArray-9d4196d8.js";import"./Accordion-6f002a96.js";import"./module-77c2ea8c.js";import"./Menu-beacc39d.js";/**
|
|
2
|
+
* @license @tabler/icons-react v3.24.0 - MIT
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var Dt=Ae("outline","ease-in","IconEaseIn",[["path",{d:"M3 20c8 0 18 -16 18 -16",key:"svg-0"}]]);/**
|
|
7
|
+
* @license @tabler/icons-react v3.24.0 - MIT
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var Bt=Ae("outline","equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]);/**
|
|
12
|
+
* @license @tabler/icons-react v3.24.0 - MIT
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/var Ft=Ae("outline","plus-minus","IconPlusMinus",[["path",{d:"M4 7h6",key:"svg-0"}],["path",{d:"M7 4v6",key:"svg-1"}],["path",{d:"M20 18h-6",key:"svg-2"}],["path",{d:"M5 19l14 -14",key:"svg-3"}]]);/**
|
|
17
|
+
* @license @tabler/icons-react v3.24.0 - MIT
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/var Yt=Ae("outline","vector-bezier-2","IconVectorBezier2",[["path",{d:"M3 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M17 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M7 5l7 0",key:"svg-2"}],["path",{d:"M10 19l7 0",key:"svg-3"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}],["path",{d:"M7 5.5a5 6.5 0 0 1 5 6.5a5 6.5 0 0 0 5 6.5",key:"svg-6"}]]);const _t=[{type:"constant",icon:w.jsx(Bt,{size:"14px"}),columns:"1fr 32px"},{type:"gradient",icon:w.jsx(Dt,{size:"14px"}),columns:"1fr 32px"},{type:"two-constant",icon:w.jsx(Ft,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"},{type:"two-gradient",icon:w.jsx(Yt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"}];function wa(a){return a.map(e=>{const{type:t,value:r}=e;return t==="constant"?{type:t,label:e.label,value:le(r)}:t==="two-constant"?{type:t,label:e.label,value:[le(r[0]),le(r[1])]}:t==="gradient"?{type:t,label:e.label,value:{color:r.color.map(s=>({value:le(s.value),time:s.position})),alpha:r.alpha.map(s=>({value:s.value.a,time:s.position}))}}:t==="two-gradient"?{type:t,label:e.label,value:[{color:r[0].color.map(s=>({value:le(s.value),time:s.position})),alpha:r[0].alpha.map(s=>({value:s.value.a,time:s.position}))},{color:r[1].color.map(s=>({value:le(s.value),time:s.position})),alpha:r[1].alpha.map(s=>({value:s.value.a,time:s.position}))}]}:e})}function ja(a){return a.map(e=>{const{type:t,value:r}=e;return t==="constant"?{type:t,label:e.label,value:ce(r)}:t==="two-constant"?{type:t,label:e.label,value:[ce(r[0]),ce(r[1])]}:t==="gradient"?{type:t,label:e.label,value:{color:r.color.map(s=>({value:ce(s.value),position:s.time})),alpha:r.alpha.map(s=>({value:{r:255,g:255,b:255,a:s.value},position:s.time}))}}:t==="two-gradient"?{type:t,label:e.label,value:[{color:r[0].color.map(s=>({value:ce(s.value),position:s.time})),alpha:r[0].alpha.map(s=>({value:{r:255,g:255,b:255,a:s.value},position:s.time}))},{color:r[1].color.map(s=>({value:ce(s.value),position:s.time})),alpha:r[1].alpha.map(s=>({value:{r:255,g:255,b:255,a:s.value},position:s.time}))}]}:e})}function ot({hdr:a,value:e,onValueChange:t,...r}){return a?w.jsx(ge,{...r,mode:"hdr",value:e,onValueChange:t}):w.jsx(ge,{...r,mode:"constant",value:e,onValueChange:t})}function Zt(a){var p;const{label:e,labelFirst:t,info:r,value:s,hdr:l=!1}=a,[o,n]=we({prop:ja(s),onChange:i=>{a.onValueChange&&a.onValueChange(wa(i),m)}}),[m,y]=we({prop:a.type,defaultProp:"constant",onChange:i=>{a.onValueChange&&a.onValueChange(s,i)}});function b(i,g){var f;return g==="trigger"?(f=_t.find(M=>M.type===i))==null?void 0:f.icon:i}const c=i=>{n(g=>g.map(f=>f.type!==m?f:{...f,value:i}))},z=i=>g=>{n(f=>f.map(M=>{if(M.type!==m)return M;const{value:_}=M;if(M.type==="two-constant"){if(i===0)return{...M,value:[g,_[1]]};if(i===1)return{...M,value:[_[0],g]}}return M}))},d=i=>{n(g=>g.map(f=>f.type!==m?f:f.type==="gradient"?{...f,value:i}:f))},h=i=>g=>{n(f=>f.map(M=>{if(M.type!==m)return M;if(M.type==="two-gradient"){const{value:_}=M;if(i===0)return{...M,value:[g,_[1]]};if(i===1)return{...M,value:[_[0],g]}}return M}))};return w.jsxs(re,{label:e,info:r,fieldCss:{gridTemplateColumns:(p=_t.find(i=>i.type===m))==null?void 0:p.columns},children:[o.map(i=>{const{type:g,value:f}=i;if(!g||m!==g)return null;switch(g){case"constant":return w.jsx(ot,{fullsize:!0,hdr:l,value:f,onValueChange:c},"constant");case"gradient":return w.jsx(ge,{fullsize:!0,mode:"particle",value:f,onValueChange:d},"gradient");case"two-constant":return w.jsxs(je.Fragment,{children:[w.jsx(ot,{fullsize:!0,hdr:l,value:f[0],onValueChange:z(0)}),w.jsx(ot,{fullsize:!0,hdr:l,value:f[1],onValueChange:z(1)})]},"two-constant");case"two-gradient":return w.jsxs(je.Fragment,{children:[w.jsx(ge,{fullsize:!0,mode:"particle",value:f[0],onValueChange:h(0)}),w.jsx(ge,{fullsize:!0,mode:"particle",value:f[1],onValueChange:h(1)})]},"two-gradient");default:return null}}),w.jsx(ct,{defaultValue:"constant",position:"item-aligned",cornerArrow:!0,value:m,valueRenderer:b,onValueChange:i=>y(i),children:o.map(i=>w.jsx(_e,{value:i.type,children:i.label||i.type},i.type))})]})}const Xt=[{type:"constant",icon:w.jsx(Bt,{size:"14px"}),columns:"minmax(0, 12fr) 32px"},{type:"curve",icon:w.jsx(Dt,{size:"14px"}),columns:"minmax(0, 12fr) 32px"},{type:"two-constant",icon:w.jsx(Ft,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"},{type:"two-curve",icon:w.jsx(Yt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"}];function _a(a,e){var t;return e==="trigger"?(t=Xt.find(r=>r.type===a))==null?void 0:t.icon:a}const nt=[{x:0,y:0},{x:.25,y:.25},{x:.75,y:.75},{x:1,y:1}];function Re(a){var L;const{label:e,info:t,value:r,onValueChange:s,algo:l="bezier",yRangeMode:o,yTickScale:n,yTickScaleMin:m,yTickScaleMax:y,onYTickScaleChange:b,onYTickScaleCommit:c,hideTypeSelector:z,...d}=a,[h,p]=we({prop:a.type,defaultProp:"constant",onChange:E=>{s&&s(r,E)}}),[i,g]=we({prop:r,onChange:E=>{s&&s(E,h)},defaultProp:[{value:0,type:"constant"},{value:nt,type:"curve"},{value:[0,0],type:"two-constant"},{value:[nt,nt],type:"two-curve"}]}),f=E=>{g(A=>A.map(T=>T.type!==h?T:{...T,value:E}))},M=E=>A=>{g(T=>T.map(k=>{if(k.type!==h)return k;const{value:$}=k;return E===0?{...k,value:[A,$[1]]}:E===1?{...k,value:[$[0],A]}:k}))},_=E=>{g(A=>A.map(T=>T.type!==h?T:{...T,value:E}))},j=E=>A=>{g(T=>T.map(k=>{if(k.type!==h)return k;const{value:$}=k;return E===0?{...k,value:[A,$[1]]}:E===1?{...k,value:[$[0],A]}:k}))},F={algo:l,yRangeMode:o,yTickScale:n,yTickScaleMin:m,yTickScaleMax:y,onYTickScaleChange:b,onYTickScaleCommit:c};return w.jsxs(re,{label:e,info:t,fieldCss:{gridTemplateColumns:(L=Xt.find(E=>E.type===h))==null?void 0:L.columns,columnGap:"$1"},...d,children:[i.map(E=>{const{type:A,value:T,min:k,max:$,step:J}=E;if(!A||h!==A)return null;switch(A){case"constant":return w.jsx(de,{min:k,max:$,dragStep:J,step:J,value:T,onValueChange:f},"constant");case"curve":return w.jsx(st,{...F,value:T,onChange:_},"curve");case"two-constant":return w.jsxs(je.Fragment,{children:[w.jsx(de,{size:"sm",startSlot:"min",value:T[0],min:k,max:$,dragStep:J,step:J,onValueChange:M(0)}),w.jsx(de,{size:"sm",startSlot:"max",value:T[1],min:k,max:$,dragStep:J,step:J,onValueChange:M(1)})]},"two-constant");case"two-curve":return w.jsxs(je.Fragment,{children:[w.jsx(st,{...F,value:T[0],onChange:j(0)}),w.jsx(st,{...F,value:T[1],onChange:j(1)})]},"two-curve");default:return null}}),!z&&w.jsx(ct,{value:h,position:"item-aligned",cornerArrow:!0,valueRenderer:_a,onValueChange:E=>p(E),children:i.map(E=>w.jsx(_e,{value:E.type,children:E.label||E.type},E.type))})]})}/**
|
|
22
|
+
* @license @tabler/icons-react v3.24.0 - MIT
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var Ta=Ea("outline","equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]);const La=X(function(a){const[e,t]=Y.useState(null),r=a.data,{assetStore:s,inspectorFacade:l}=kt();return Y.useEffect(()=>{s.getAssetByRef(r.material).then(o=>{t(o)})},[r.material]),v.jsxs(v.Fragment,{children:[v.jsx(ra.List,{model:r,configs:r.formSchema.items,onModelChange:Pa("component",r.id,l,r)}),e&&v.jsx(Ma,{materialAsset:e})]})});async function Ra(a,e){await a.assetStore.getAssetByRef(e)}var D=(a=>(a.BoxShape="BoxShape",a.CircleShape="CircleShape",a.ConeShape="ConeShape",a.HemisphereShape="HemisphereShape",a.SphereShape="SphereShape",a.MeshShape="MeshShape",a))(D||{});function Z(a,e){return{class:a.class,props:{...a.props,...e}}}const Va=X(({item:a,onModelChange:e})=>{const{t}=K();return v.jsx(v.Fragment,{children:v.jsx(Ce,{label:t("effects.shape.size"),value:{x:a.props.size.x,y:a.props.size.y,z:a.props.size.z},onChange:(r,s)=>{const l=Z(a,{size:{...a.props.size,[s]:r[s]}});e==null||e("shape",l)}})})}),Ia=X(({item:a,onModelChange:e})=>{const{t}=K();return v.jsxs(v.Fragment,{children:[v.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Z(a,{radius:r});e==null||e("shape",s)}}),v.jsx(te,{label:t("effects.shape.arc"),min:0,max:360,value:a.props.arc,onChange:r=>{const s=Z(a,{arc:r});e==null||e("shape",s)}}),v.jsx(pt,{label:t("effects.shape.arc-mode.label"),options:[{label:t("effects.shape.loop"),value:Oe.Loop},{label:t("effects.shape.random"),value:Oe.Random}],value:a.props.arcMode,onChange:r=>{const s=Z(a,{arcMode:r});e==null||e("shape",s)}}),a.props.arcMode===Oe.Loop?v.jsx(te,{label:t("effects.shape.arc-speed.label"),step:.1,dragStep:.1,value:a.props.arcSpeed,onChange:r=>{const s=Z(a,{arcSpeed:r});e==null||e("shape",s)}}):null]})}),Aa=X(({item:a,onModelChange:e})=>{const{t}=K();return v.jsxs(v.Fragment,{children:[v.jsx(pt,{label:t("effects.shape.emit-type.label"),options:[{label:t("effects.shape.cone-base"),value:he.Base},{label:t("effects.shape.volume"),value:he.Volume}],value:a.props.emitType,onChange:r=>{const s=Z(a,{emitType:r});e==null||e("shape",s)}}),v.jsx(te,{label:t("effects.shape.angle"),min:1e-4,max:90,step:.05,dragStep:.05,value:a.props.angle,onChange:r=>{const s=Z(a,{angle:r});e==null||e("shape",s)}}),v.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Z(a,{radius:r});e==null||e("shape",s)}}),v.jsx(te,{label:t("effects.shape.length"),min:1e-4,step:.1,dragStep:.1,value:a.props.length,disabled:a.props.emitType===he.Base,onChange:r=>{const s=Z(a,{length:r});e==null||e("shape",s)}})]})}),ka=X(({item:a,onModelChange:e})=>{const{t}=K();return v.jsx(v.Fragment,{children:v.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Z(a,{radius:r});e==null||e("shape",s)}})})}),Da=X(({item:a,onModelChange:e})=>{const{t}=K();return v.jsx(v.Fragment,{children:v.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Z(a,{radius:r});e==null||e("shape",s)}})})}),Ba=X(({item:a,onModelChange:e})=>{const{t}=K(),{assetStore:r}=kt(),s=Object.values(r.assets).filter(n=>n instanceof za),[l,o]=Y.useState("");return Y.useEffect(()=>{let n=!1;return(async()=>{if(!a.props.mesh){o("");return}try{const y=await r.getAssetByRef(a.props.mesh);n||o((y==null?void 0:y.name)??"")}catch{n||o("")}})(),()=>{n=!0}},[r,a.props.mesh]),v.jsx(sa,{label:t("effects.renderer.render-mode.options.mesh"),assets:s,dropLayer:0,value:l,onSelect:async n=>{o(n.name);const m=!!n.engineObject;m||oa.error("Mesh asset is not initialized");const y={class:a.class,props:{...a.props,mesh:n.getCurrentRef(),enabled:m}};e==null||e("shape",y)}})}),Fa=X(({item:a,onModelChange:e})=>{const{t}=K();return v.jsx(te,{label:t("effects.shape.random-direction-amount"),info:t("effects.shape.random-direction-amount-tip"),min:0,step:1,dragStep:.05,value:a.props.randomDirectionAmount||0,onChange:r=>{const s=Z(a,{randomDirectionAmount:r});e==null||e("shape",s)}})}),Ya=X(({item:a,onModelChange:e})=>{const{t}=K(),r=a.props.position??{x:0,y:0,z:0},s=a.props.rotation??{x:0,y:0,z:0},l=a.props.scale??{x:1,y:1,z:1};return v.jsxs(v.Fragment,{children:[v.jsx(Ce,{label:t("effects.shape.position"),value:{x:r.x,y:r.y,z:r.z},onChange:(o,n)=>{const m=Z(a,{position:{x:r.x,y:r.y,z:r.z,[n]:o[n]},rotation:{x:s.x,y:s.y,z:s.z},scale:{x:l.x,y:l.y,z:l.z}});e==null||e("shape",m)}}),v.jsx(Ce,{label:t("effects.shape.rotation"),value:{x:s.x,y:s.y,z:s.z},onChange:(o,n)=>{const m=Z(a,{position:{x:r.x,y:r.y,z:r.z},rotation:{x:s.x,y:s.y,z:s.z,[n]:o[n]},scale:{x:l.x,y:l.y,z:l.z}});e==null||e("shape",m)}}),v.jsx(Ce,{label:t("effects.shape.scale"),value:{x:l.x,y:l.y,z:l.z},onChange:(o,n)=>{const m=Z(a,{position:{x:r.x,y:r.y,z:r.z},rotation:{x:s.x,y:s.y,z:s.z},scale:{x:l.x,y:l.y,z:l.z,[n]:o[n]}});e==null||e("shape",m)}})]})}),lt=new Map;function Za(a,e){let t;switch(e.class){case D.BoxShape:{t=new ua;const r=t.size;r.copyFrom(e.props.size),t.size=r;break}case D.CircleShape:{t=new pa,t.radius=e.props.radius,t.arc=e.props.arc,t.arcMode=e.props.arcMode,t.arcSpeed=e.props.arcSpeed;break}case D.ConeShape:{t=new ca,t.angle=e.props.angle,t.radius=e.props.radius,t.length=e.props.length,t.emitType=e.props.emitType;break}case D.HemisphereShape:{t=new la,t.radius=e.props.radius;break}case D.SphereShape:{t=new ia,t.radius=e.props.radius;break}case D.MeshShape:{t=new na;const r=e.props.mesh;if(r!=null&&r.refId){const s=a.root.assetStore.assets[r.refId];t.mesh=s==null?void 0:s.engineObject}t.mesh||(t.mesh=It.createSphere(a.engineObject.engine));break}}if(t){if(e.props.randomDirectionAmount=e.props.randomDirectionAmount??0,t.randomDirectionAmount=e.props.randomDirectionAmount,t.enabled=e.props.enabled,e.props.position){const r=e.props.position;t.position.set(r.x,r.y,r.z)}if(e.props.rotation){const r=e.props.rotation;t.rotation.set(r.x,r.y,r.z)}if(e.props.scale){const r=e.props.scale;t.scale.set(r.x,r.y,r.z)}}return t}const Xa=(a,e,t)=>{let r=lt.get(`${a.id}-${t.class}`);r&&(r=JSON.parse(r),lt.delete(`${a.id}-${t.class}`),Object.assign(t.props,r));const s=Za(a,t);s&&a.applyEmissionShape(s)},$a={BoxShape:Va,CircleShape:Ia,ConeShape:Aa,HemisphereShape:ka,SphereShape:Da,MeshShape:Ba},qa={BoxShape:{class:D.BoxShape,props:{size:{x:1,y:1,z:1},randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},CircleShape:{class:D.CircleShape,props:{radius:1,arc:360,arcMode:Oe.Random,arcSpeed:1,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},ConeShape:{class:D.ConeShape,props:{angle:25,radius:1,length:5,emitType:he.Base,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},HemisphereShape:{class:D.HemisphereShape,props:{radius:1,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},SphereShape:{class:D.SphereShape,props:{radius:1,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},MeshShape:{class:D.MeshShape,props:{randomDirectionAmount:0,enabled:!0,mesh:void 0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}}},Ka=X(({model:a,onModelChange:e})=>{const{t}=K(),r=a.shape;if(!r.class)return;const s=$a[r.class];return v.jsxs(v.Fragment,{children:[v.jsx(pt,{label:t("effects.shape.type.label"),info:t("effects.shape.type.info"),value:r.class,options:[{label:t("effects.shape.options.box"),value:D.BoxShape},{label:t("effects.shape.options.circle"),value:D.CircleShape},{label:t("effects.shape.options.cone"),value:D.ConeShape},{label:t("effects.shape.options.hemisphere"),value:D.HemisphereShape},{label:t("effects.shape.options.sphere"),value:D.SphereShape},{label:t("effects.shape.options.mesh"),value:D.MeshShape}],onChange:l=>{const o=qa[l];if(a.shape&&a.shape.class!==l&<.set(`${a.id}-${a.shape.class}`,JSON.stringify(a.shape.props)),o.class!==r.class){const n=R(o);e==null||e("shape",n)}}}),v.jsx(s,{item:r,component:a.engineObject,onModelChange:e}),v.jsx(Fa,{item:r,component:a.engineObject,onModelChange:e}),v.jsx(Ya,{item:r,component:a.engineObject,onModelChange:e})]})}),ut=["constant","two-constant","curve","two-curve"],ae=[{x:0,y:0},{x:.25,y:.25},{x:.75,y:.75},{x:1,y:1}];function Ve(a){return a.map(e=>({x:e.constructParams[0],y:e.constructParams[1]}))}const Tt={class:"ParticleCurve",constructParams:[{class:"CurveKey",constructParams:[0,0]},{class:"CurveKey",constructParams:[.25,.25]},{class:"CurveKey",constructParams:[.75,.75]},{class:"CurveKey",constructParams:[1,1]}]};function B(a,e=0,t=0,r=q.Constant){return{module:a,mode:r,constantMin:t,constantMax:e,curveMax:R(Tt),curveMin:R(Tt)}}function pe(a,e=0,t=0,r=q.Constant){return{enabled:!1,x:B(a,e,t,r),y:B(a,e,t,r),z:B(a,e,t,r)}}const Na=a=>a===1/0?1/0:Math.max(1,Math.floor(a));function Ga(a){if(!(a!=null&&a.constructParams))return;const e=a.constructParams[2];e===null?a.constructParams[2]=1/0:typeof e=="number"&&e!==1/0&&(a.constructParams[2]=Math.max(1,Math.floor(e)))}const Ie=1,mt=.01,Ha=ma("div",{height:"$6",display:"flex",alignItems:"center",paddingLeft:"$2",fontSize:"$sm",borderRadius:"$1",backgroundColor:"$softBg",color:"$gray9",userSelect:"none"}),Wa=v.jsx(Ta,{size:"14px"});function Ua(a,e){return e==="trigger"?Wa:a}const Ja={class:"Burst",constructParams:[0,{class:"ParticleCompositeCurve",constructParams:[15],props:{mode:q.Constant,constantMax:15,constantMin:0}},Ie,mt]},Qa=X(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=K(),{label:s,info:l}=e,o=a.bursts,[n,m]=Y.useState(-1),y=p=>{const i=R(o);p(i),t==null||t("bursts",i)},b=(p,i)=>{y(g=>{const f=g[p];f&&i(f)})},c=p=>{y(i=>{i.splice(p,1)})},z=()=>{y(p=>{p.push(R(Ja))})},d=[{title:r("effects.burst.time.label")},{title:r("effects.burst.count.label")},{title:r("effects.burst.cycles.label")},{title:r("effects.burst.interval.label")}],h=(p,i)=>{const g=Math.max(1,p.constructParams[1].props.constantMax??0,p.constructParams[1].props.constantMin??0);return{data:p,cells:[v.jsx(re,{children:v.jsx(de,{min:0,max:a.duration,step:.05,dragStep:.05,value:p.constructParams[0],onValueChange:f=>{b(i,M=>{M.constructParams[0]=f})}})},`time-${i}`),v.jsx(Re,{type:ut[p.constructParams[1].props.mode],direction:"column",algo:"bezier",yRangeMode:"positive",yTickScale:g,yTickScaleMin:0,yTickScaleMax:g,onYTickScaleChange:()=>{},onYTickScaleCommit:()=>{},value:[{value:p.constructParams[1].props.constantMax,type:"constant",min:0,step:1},{value:[p.constructParams[1].props.constantMin,p.constructParams[1].props.constantMax],type:"two-constant",min:0,step:1}],onValueChange:(f,M)=>{const _=f.find(j=>j.type===M);_&&b(i,j=>{switch(M){case"constant":{j.constructParams[1].props.mode=q.Constant,j.constructParams[1].props.constantMax=_.value;break}case"two-constant":{j.constructParams[1].props.mode=q.TwoConstants,j.constructParams[1].props.constantMin=_.value[0],j.constructParams[1].props.constantMax=_.value[1];break}}})}},`count-${i}`),v.jsxs(re,{fieldCss:{gridTemplateColumns:"minmax(0, 1fr) 32px",columnGap:"$1"},children:[p.constructParams[2]===1/0?v.jsx(Ha,{children:"∞"}):v.jsx(de,{min:1,step:1,dragStep:1,value:p.constructParams[2]??Ie,onValueChange:f=>{b(i,M=>{M.constructParams[2]=Na(f)})}}),v.jsxs(ct,{value:p.constructParams[2]===1/0?"infinity":"number",position:"item-aligned",cornerArrow:!0,valueRenderer:Ua,onValueChange:f=>{b(i,M=>{M.constructParams[2]=f==="infinity"?1/0:Ie})},children:[v.jsx(_e,{value:"number",children:r("effects.burst.cycles.number")}),v.jsx(_e,{value:"infinity",children:r("effects.burst.cycles.infinity")})]})]},`cycles-${i}`),v.jsx(re,{children:v.jsx(de,{disabled:!p.constructParams[2]||p.constructParams[2]===1,min:.01,step:.01,dragStep:.01,value:p.constructParams[3]??mt,onValueChange:f=>{b(i,M=>{M.constructParams[3]=f})}})},`interval-${i}`)]}};return v.jsx(da,{columns:d,items:o.map((p,i)=>h(p,i)),label:r(s),info:r(l),addable:!1,emptyText:r("effects.burst.empty","No bursts"),selectedIndex:n,onRowClick:m,sideSlot:v.jsxs(At,{direction:"column",gap:"xs",children:[v.jsx(Ot,{variant:"soft",onClick:z,css:{flex:1},children:v.jsx(Oa,{size:"14px"})}),v.jsx(Ot,{variant:"soft",css:{flex:1},onClick:()=>{const p=n>=0&&n<o.length?n:o.length-1;p>=0&&(c(p),m(Math.min(p,o.length-2)))},children:v.jsx(Ca,{size:"14px"})})]})})}),er=(a,e,t)=>{const r=a.engineObject.generator.emission,s=r.bursts;for(let l=s.length-1;l>=0;l--)r.removeBurst(s[l]);for(let l=0;l<t.length;l++){const o=t[l];if(!o||!Array.isArray(o.constructParams)||o.constructParams.length<2){console.warn(`Invalid burst item at index ${l}:`,o);continue}const n=o.constructParams[0],m=o.constructParams[1],y=o.constructParams[2]??Ie,b=o.constructParams[3]??mt;if(!m||!m.props){console.warn(`Invalid burst count data at index ${l}:`,m);continue}const c=m.props,z=new ha(c.constantMax);z.mode=c.mode,z.constantMin=c.constantMin,z.constantMax=c.constantMax,z.constant=c.constantMax;const d=new fa(n,z);d.cycles=y,d.repeatInterval=b,r.addBurst(d)}};function Lt(a="colorOverLifetime"){return{module:a,mode:fe.Gradient,gradientMax:{class:"ParticleGradient",constructParams:[[{color:{r:1,g:1,b:1,a:1},time:0},{color:{r:1,g:1,b:1,a:1},time:.3},{color:{r:1,g:1,b:1,a:1},time:.6},{color:{r:1,g:1,b:1,a:1},time:1}],[{time:0,alpha:0},{time:.25,alpha:.25},{time:.5,alpha:.5},{time:1,alpha:1}]]},gradientMin:{class:"ParticleGradient",constructParams:[[{time:0,color:{r:1,g:1,b:1,a:1}},{time:.3,color:{r:1,g:1,b:1,a:1}},{time:.6,color:{r:1,g:1,b:1,a:1}},{time:1,color:{r:1,g:1,b:1,a:1}}],[{time:0,alpha:0},{time:.25,alpha:.25},{time:.5,alpha:.5},{time:1,alpha:1}]]}}}const ze=["x","y","z"],tr={constant:q.Constant,"two-constant":q.TwoConstants,curve:q.Curve,"two-curve":q.TwoCurves},ye=X(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=K(),s=e.property,{mainAxis:l}=e,o=a[s],[n,m]=Y.useState({x:{max:ae,min:ae},y:{max:ae,min:ae},z:{max:ae,min:ae}}),[y,b]=Y.useState(e.yTickScale??1),c=ut[o.x.mode];function z(i){return(g,f)=>{const M=g.find(L=>L.type===f);if(!M)return;const _=R(o),j=_[i],F=tr[f];for(const L of ze)_[L].mode=F;switch(f){case"constant":j.constantMax=M.value;break;case"two-constant":j.constantMin=M.value[0],j.constantMax=M.value[1];break;case"curve":{if(M.value.length>4)return;m(L=>({...L,[i]:{...L[i],max:M.value}})),M.value.forEach((L,E)=>{j.curveMax.constructParams[E].constructParams[0]=L.x,j.curveMax.constructParams[E].constructParams[1]=L.y*y});break}case"two-curve":{if(M.value[0].length>4||M.value[1].length>4)return;m(L=>({...L,[i]:{min:M.value[0],max:M.value[1]}})),M.value[0].forEach((L,E)=>{j.curveMin.constructParams[E].constructParams[0]=L.x,j.curveMin.constructParams[E].constructParams[1]=L.y*y}),M.value[1].forEach((L,E)=>{j.curveMax.constructParams[E].constructParams[0]=L.x,j.curveMax.constructParams[E].constructParams[1]=L.y*y});break}}a[s]=_,t==null||t(s,_)}}function d(i){return[{value:o[i].constantMax,type:"constant",label:r("effects.curve.constant"),min:e.min,max:e.max,step:e.step},{value:[o[i].constantMin,o[i].constantMax],type:"two-constant",label:r("effects.curve.two-constant"),min:e.min,max:e.max,step:e.step},{value:n[i].max,type:"curve",label:r("effects.curve.curve")},{value:[n[i].min,n[i].max],type:"two-curve",label:r("effects.curve.two-curve")}]}const h=i=>{const g=i/y,f=R(o);for(const M of ze){const _=f[M];_.curveMax.constructParams.forEach(j=>{j.constructParams[1]*=g}),_.curveMin.constructParams.forEach(j=>{j.constructParams[1]*=g})}b(i),a[s]=f,t==null||t(s,f)},p={algo:"linear",yRangeMode:e.yRangeMode,yTickScale:y,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:h,onYTickScaleCommit:()=>{}};return Y.useEffect(()=>{const i={};for(const g of ze)i[g]={max:Ve(o[g].curveMax.constructParams).map(f=>({...f,y:f.y/y})),min:Ve(o[g].curveMin.constructParams).map(f=>({...f,y:f.y/y}))};m(i)},[]),v.jsxs(v.Fragment,{children:[v.jsx(ya,{label:e.toggleLabel?r(e.toggleLabel):r("effects.curve.3d-prefix")+" "+r(e.label||s),info:r(e.info),value:o.enabled,onChange:i=>{const g=R(o);g.enabled=i,a[s]=g,t==null||t(s,g)}}),o.enabled?v.jsx(re,{label:"",children:v.jsx(At,{direction:"column",gap:"xxs",children:ze.map((i,g)=>v.jsx(Re,{label:r(i).toLocaleUpperCase(),type:c,css:{gridTemplateColumns:"$4 repeat(3, minmax(0px, 1fr))"},...p,value:d(i),hideTypeSelector:g!==0,onValueChange:z(i)},i))})}):v.jsx(Re,{label:r(e.label||s),type:c,...p,value:d(l),onValueChange:z(l)})]})}),be=a=>(e,t,r)=>{var o,n;const s=(n=(o=e.engineObject)==null?void 0:o.generator)==null?void 0:n[r.x.module];if(!s){console.warn(`Module container not found for: ${r.x.module}`);return}s[a]=r.enabled;const l={x:s[t+"X"],y:s[t+"Y"],z:s[t+"Z"]};for(const m in l){const y=r[m],b=l[m];if(!b){console.warn(`Axis module not found for: ${m} in ${t}`);continue}b.mode=y.mode,b.constantMax=y.constantMax,b.constantMin=y.constantMin,b.curveMax=new Te,y.curveMax.constructParams.forEach(c=>{const z=c.constructParams[0],d=c.constructParams[1];b.curveMax.addKey(new Le(z,d))}),b.curveMin=new Te,y.curveMin.constructParams.forEach(c=>{const z=c.constructParams[0],d=c.constructParams[1];b.curveMin.addKey(new Le(z,d))})}},G=X(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=K(),s=e.property,l=a[s],[o,n]=Y.useState(ae),[m,y]=Y.useState(ae),[b,c]=Y.useState(e.yTickScale??1);Y.useEffect(()=>{const d=Ve(l.curveMax.constructParams),h=Ve(l.curveMin.constructParams);n(d),y(h)},[]);const z=(d,h)=>{const p=d.find(g=>g.type===h);if(!p)return;const i=R(l);switch(h){case"constant":i.mode=q.Constant,i.constantMax=p.value;break;case"two-constant":i.mode=q.TwoConstants,i.constantMin=p.value[0],i.constantMax=p.value[1];break;case"curve":{if(p.value.length>4)return;n(p.value),i.mode=q.Curve,p.value.forEach((g,f)=>{i.curveMax.constructParams[f].constructParams[0]=g.x,i.curveMax.constructParams[f].constructParams[1]=g.y});break}case"two-curve":{if(p.value[0].length>4||p.value[1].length>4)return;i.mode=q.TwoCurves,y(p.value[0]),n(p.value[1]),p.value[0].forEach((g,f)=>{i.curveMin.constructParams[f].constructParams[0]=g.x,i.curveMin.constructParams[f].constructParams[1]=g.y}),p.value[1].forEach((g,f)=>{i.curveMax.constructParams[f].constructParams[0]=g.x,i.curveMax.constructParams[f].constructParams[1]=g.y});break}}a[s]=i,t==null||t(s,i)};return v.jsx(v.Fragment,{children:v.jsx(Re,{label:r(e.label||e.property),info:r(e.info),type:ut[l.mode],algo:"linear",yRangeMode:e.yRangeMode,yTickScale:b,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:c,onYTickScaleCommit:()=>{},value:[{value:l.constantMax,type:"constant",label:r("effects.curve.constant"),min:e.min,max:e.max,step:e.step},{value:[l.constantMin,l.constantMax],type:"two-constant",label:r("effects.curve.two-constant"),min:e.min,max:e.max,step:e.step},{value:o,type:"curve",label:r("effects.curve.curve")},{value:[m,o],type:"two-curve",label:r("effects.curve.two-curve")}],onValueChange:z})})}),H=(a,e,t)=>{var l,o;const r=(o=(l=a.engineObject)==null?void 0:l.generator)==null?void 0:o[t.module];if(!r){console.warn(`Module container not found for: ${t.module}`);return}const s=r[e];if(!s){console.warn(`Module not found for property: ${e} in ${t.module}`);return}s.mode=t.mode,s.constantMax=t.constantMax,s.constantMin=t.constantMin,s.curveMax=new Te,t.curveMax.constructParams.forEach(n=>{const m=n.constructParams[0],y=n.constructParams[1];s.curveMax.addKey(new Le(m,y))}),s.curveMin=new Te,t.curveMin.constructParams.forEach(n=>{const m=n.constructParams[0],y=n.constructParams[1];s.curveMin.addKey(new Le(m,y))})},ar=["constant","two-constant"],rr=X(({model:a,inspectorConfig:e,onModelChange:t})=>{var y,b;const{t:r}=K(),s=e.property,l=a[s],o={...xe(l.constantMax),intensity:((y=l.constantMax)==null?void 0:y.intensity)??1},n={...xe(l.constantMin),intensity:((b=l.constantMin)==null?void 0:b.intensity)??1},m=(c,z)=>{const d=c.find(p=>p.type===z);if(!d)return;const h=R(l);switch(z){case"constant":{h.mode=fe.Constant,h.constantMax=d.value;break}case"two-constant":{const p=d.value[0],i=d.value[1];h.mode=fe.TwoConstants,h.constantMin=p,h.constantMax=i;break}}a[s]=h,t==null||t(s,h)};return v.jsx(Zt,{label:r(e.label||e.property),type:ar[l.mode],info:r(e.info),hdr:!0,value:[{value:o,type:"constant",label:r("effects.curve.constant")},{value:[n,o],type:"two-constant",label:r("effects.curve.two-constant")}],onValueChange:m})}),sr=(a,e,t)=>{const r=a.engineObject.generator.main.startColor;r.mode=t.mode;const{constantMax:s,constantMin:l}=t,o=s.intensity??1,n=l.intensity??1;r.constantMax.set(s.r*o,s.g*o,s.b*o,s.a),r.constantMin.set(l.r*n,l.g*n,l.b*n,l.a)},or=["gradient","two-gradient"],nr=X(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=K(),s=e.property,l=a[s],o=(n,m)=>{var c,z;if(!n.find(d=>d.type===m))return;const b=R(l);switch(m){case"gradient":{const d=n.find(h=>h.type===m);if(!((c=d==null?void 0:d.value)!=null&&c.color)||!((z=d==null?void 0:d.value)!=null&&z.alpha)){console.warn(`Invalid gradient value structure for ${s}`);return}if(d.value.color.length>4||d.value.alpha.length>4)return;b.mode=fe.Gradient,b.gradientMax.constructParams=[d.value.color.map(h=>({color:h.value,time:h.time})),d.value.alpha.map(h=>({alpha:h.value,time:h.time}))];break}case"two-gradient":{const d=n.find(h=>h.type===m);if(d.value[0].color.length>4||d.value[0].alpha.length>4||d.value[1].color.length>4||d.value[1].alpha.length>4)return;b.mode=fe.TwoGradients,b.gradientMin.constructParams=[d.value[0].color.map(h=>({color:h.value,time:h.time})),d.value[0].alpha.map(h=>({alpha:h.value,time:h.time}))],b.gradientMax.constructParams=[d.value[1].color.map(h=>({color:h.value,time:h.time})),d.value[1].alpha.map(h=>({alpha:h.value,time:h.time}))];break}}a[s]=b,t==null||t(s,b)};return v.jsx(v.Fragment,{children:v.jsx(Zt,{label:r(e.property),type:or[l.mode-2],info:r(e.info),value:[{value:{color:l.gradientMax.constructParams[0].map(n=>({value:xe(n.color),time:n.time})),alpha:l.gradientMax.constructParams[1].map(n=>({value:n.alpha,time:n.time}))},type:"gradient",label:r("effects.curve.gradient")},{value:[{color:l.gradientMin.constructParams[0].map(n=>({value:xe(n.color),time:n.time})),alpha:l.gradientMin.constructParams[1].map(n=>({value:n.alpha,time:n.time}))},{color:l.gradientMax.constructParams[0].map(n=>({value:xe(n.color),time:n.time})),alpha:l.gradientMax.constructParams[1].map(n=>({value:n.alpha,time:n.time}))}],type:"two-gradient",label:r("effects.curve.two-gradient")}],onValueChange:o})})}),ue=[],me=[],ir=(a,e,t)=>{var m,y,b;const r=(y=(m=a.engineObject)==null?void 0:m.generator)==null?void 0:y[t.module];if(!r){console.warn(`Module container not found for: ${t.module}`);return}const s=r[e];if(!s){console.warn(`Module not found for property: ${e} in ${t.module}`);return}if(s.mode=t.mode,ue.length=0,me.length=0,!((b=t.gradientMax)!=null&&b.constructParams)||!Array.isArray(t.gradientMax.constructParams)){console.warn(`Invalid gradientMax.constructParams for ${e}`);return}const l=t.gradientMax.constructParams,o=l[0]||[],n=l[1]||[];Array.isArray(o)&&o.forEach(c=>{if(c&&c.color&&typeof c.time=="number"){const z=c.color;ue.push(new Et(c.time,new wt(z.r??0,z.g??0,z.b??0,z.a??1)))}}),Array.isArray(n)&&n.forEach(c=>{c&&typeof c.time=="number"&&typeof c.alpha=="number"&&me.push(new jt(c.time,c.alpha))}),s.gradientMax.setKeys(ue,me),ue.length=0,me.length=0,t.gradientMin.constructParams[0].forEach(c=>{ue.push(new Et(c.time,new wt(c.color.r,c.color.g,c.color.b,c.color.a)))}),t.gradientMin.constructParams[1].forEach(c=>{me.push(new jt(c.time,c.alpha))}),s.gradientMin.setKeys(ue,me)};function Ee(a){return a-Math.floor(a*(1/289))*289}function W(a){return Ee((34*a+1)*a)}function it(a,e,t){const r=.16666666666666666,s=1/3,l=(a+e+t)*s,o=Math.floor(a+l),n=Math.floor(e+l),m=Math.floor(t+l),y=(o+n+m)*r,b=a-o+y,c=e-n+y,z=t-m+y;let d,h,p,i,g,f;b>=c?c>=z?(d=1,h=0,p=0,i=1,g=1,f=0):b>=z?(d=1,h=0,p=0,i=1,g=0,f=1):(d=0,h=0,p=1,i=1,g=0,f=1):c<z?(d=0,h=0,p=1,i=0,g=1,f=1):b<z?(d=0,h=1,p=0,i=0,g=1,f=1):(d=0,h=1,p=0,i=1,g=1,f=0);const M=b-d+r,_=c-h+r,j=z-p+r,F=b-i+s,L=c-g+s,E=z-f+s,A=b-.5,T=c-.5,k=z-.5,$=Ee(o),J=Ee(n),Se=Ee(m),$t=W(W(W(Se)+J)+$),qt=W(W(W(Se+p)+J+h)+$+d),Kt=W(W(W(Se+f)+J+g)+$+i),Nt=W(W(W(Se+1)+J+1)+$+1),ke=.142857142857,dt=ke*2-0,ht=ke*.5-1,De=ke*1-0;function Pe(vt){const gt=vt-49*Math.floor(vt*De*De),xt=Math.floor(gt*De),Jt=Math.floor(gt-7*xt),St=xt*dt+ht,Pt=Jt*dt+ht,Me=1-Math.abs(St)-Math.abs(Pt),Mt=St,zt=Pt,Qt=Math.floor(Mt)*2+1,ea=Math.floor(zt)*2+1,Ct=-(Me<0?1:0),tt=Mt+Qt*Ct,at=zt+ea*Ct,rt=1.79284291400159-.85373472095314*(tt*tt+at*at+Me*Me);return[tt*rt,at*rt,Me*rt]}const se=Pe($t),oe=Pe(qt),ne=Pe(Kt),ie=Pe(Nt),Be=Math.max(.6-(b*b+c*c+z*z),0),Fe=Math.max(.6-(M*M+_*_+j*j),0),Ye=Math.max(.6-(F*F+L*L+E*E),0),Ze=Math.max(.6-(A*A+T*T+k*k),0),Xe=Be*Be,$e=Fe*Fe,qe=Ye*Ye,Ke=Ze*Ze,Ne=Xe*Xe,Ge=$e*$e,He=qe*qe,We=Ke*Ke,Gt=se[0]*b+se[1]*c+se[2]*z,Ht=oe[0]*M+oe[1]*_+oe[2]*j,Wt=ne[0]*F+ne[1]*L+ne[2]*E,Ut=ie[0]*A+ie[1]*T+ie[2]*k,Ue=Xe*Be*Gt,Je=$e*Fe*Ht,Qe=qe*Ye*Wt,et=Ke*Ze*Ut;let ft=-8*(Ue*b+Je*M+Qe*F+et*A),yt=-8*(Ue*c+Je*_+Qe*L+et*T),bt=-8*(Ue*z+Je*j+Qe*E+et*k);return ft+=Ne*se[0]+Ge*oe[0]+He*ne[0]+We*ie[0],yt+=Ne*se[1]+Ge*oe[1]+He*ne[1]+We*ie[1],bt+=Ne*se[2]+Ge*oe[2]+He*ne[2]+We*ie[2],[ft*42,yt*42,bt*42]}function Rt(a,e,t){it(t,e,a);const s=it(a+100,t,e);return it(e,a+100,t)[1]-s[2]}function lr(a,e,t,r,s,l,o){let n=Rt(a*r,e*r,t*r),m=1,y=r,b=1;for(let c=1;c<s;c++)b*=o,y*=l,m+=b,n+=b*Rt(a*y,e*y,t*y);return n/m}const ee=80,Vt=5,cr=({model:a})=>{const e=Y.useRef(null),t=Y.useRef(0);return Y.useEffect(()=>{const r=e.current;if(!r)return;const s=r.getContext("2d");if(!s)return;const l=ba(()=>{var h,p;const o=((p=(h=a.noiseStrength)==null?void 0:h.x)==null?void 0:p.constantMax)??1,n=a.noiseFrequency??.5,m=a.noiseScrollSpeed??0,y=a.noiseOctaveCount??1,b=a.noiseOctaveIntensityMultiplier??.5,c=a.noiseOctaveFrequencyMultiplier??2;cancelAnimationFrame(t.current);const z=performance.now(),d=i=>{const g=(i-z)/1e3*m,f=s.createImageData(ee,ee),M=f.data;for(let _=0;_<ee;_++){const j=(1-_/ee)*Vt;for(let F=0;F<ee;F++){const L=F/ee*Vt,E=lr(L,j,g,n,y,c,b),A=Math.max(0,Math.min(255,Math.round((E*o*(.5/7)+.5)*255))),T=(_*ee+F)*4;M[T]=A,M[T+1]=A,M[T+2]=A,M[T+3]=255}}s.putImageData(f,0,0),m>0&&(t.current=requestAnimationFrame(d))};t.current=requestAnimationFrame(d)});return()=>{cancelAnimationFrame(t.current),l()}},[a]),v.jsx(re,{label:" ",labelCss:{visibility:"hidden"},children:v.jsxs("div",{style:{position:"relative",width:80,height:80},children:[v.jsx("canvas",{ref:e,width:ee,height:ee,style:{width:80,height:80,borderRadius:4,border:"1px solid var(--color-border-default, rgba(255,255,255,0.12))",display:"block"}}),v.jsx("span",{style:{position:"absolute",bottom:2,left:0,right:0,textAlign:"center",fontSize:9,color:"rgba(255,255,255,0.6)",textShadow:"0 1px 2px rgba(0,0,0,0.8)",pointerEvents:"none"},children:"Preview"})]})})};var pr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,P=(a,e,t,r)=>{for(var s=r>1?void 0:r?ur(e,t):e,l=a.length-1,o;l>=0;l--)(o=a[l])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&pr(e,t,s),s};let x=class extends va{constructor(e,t){super(e,t);S(this,"_emissionModuleEnabled",!0);S(this,"_emissionShapeModuleEnabled",!0);S(this,"_rotationOverLifetimeModuleEnabled",!1);S(this,"_sizeOverLifetimeModuleEnabled",!1);S(this,"_textureSheetAnimationModuleEnabled",!1);S(this,"_velocityOverLifetimeModuleEnabled",!1);S(this,"_forceOverLifetimeModuleEnabled",!1);S(this,"_limitVelocityOverLifetimeModuleEnabled",!1);S(this,"_colorOverLifetimeModuleEnabled",!1);S(this,"_noiseModuleEnabled",!1);S(this,"material",{refId:"0000202"});S(this,"priority",0);S(this,"velocityScale",0);S(this,"lengthScale",2);S(this,"pivot",{x:0,y:0,z:0});S(this,"renderMode",U.Billboard);S(this,"mesh",null);S(this,"duration",5);S(this,"isLoop",!0);S(this,"startDelay",B("main"));S(this,"startLifetime",B("main",5));S(this,"startSpeed",B("main",5));S(this,"startSize",pe("main",1));S(this,"startRotation",pe("main"));S(this,"flipRotation",0);S(this,"startColor",{module:"main",mode:fe.Constant,constantMax:{r:1,g:1,b:1,a:1,intensity:1},constantMin:{r:1,g:1,b:1,a:1,intensity:1}});S(this,"gravityModifier",B("main"));S(this,"simulationSpace",N.Local);S(this,"simulationSpeed",1);S(this,"scalingMode",ve.Local);S(this,"playOnEnabled",!0);S(this,"maxParticles",1e3);S(this,"rateOverTime",B("emission",10));S(this,"shape",{class:D.ConeShape,props:{angle:25,radius:1,length:5,emitType:he.Base,enabled:!0}});S(this,"bursts",[]);S(this,"size",pe("sizeOverLifetime",1));S(this,"rotation",pe("rotationOverLifetime",45));S(this,"textureSheetAnimationType",0);S(this,"cycleCount",1);S(this,"tiling",{x:1,y:1});S(this,"frameOverTime",B("textureSheetAnimation",1,0,q.Curve));S(this,"spaceMode",N.Local);S(this,"forceSpaceMode",N.Local);S(this,"velocityX",B("velocityOverLifetime"));S(this,"velocityY",B("velocityOverLifetime"));S(this,"velocityZ",B("velocityOverLifetime"));S(this,"speed",pe("limitVelocityOverLifetime",1));S(this,"limitVelocitySpaceMode",N.Local);S(this,"dampen",0);S(this,"drag",B("limitVelocityOverLifetime"));S(this,"multiplyDragByParticleSize",!1);S(this,"multiplyDragByParticleVelocity",!1);S(this,"forceX",B("forceOverLifetime"));S(this,"forceY",B("forceOverLifetime"));S(this,"forceZ",B("forceOverLifetime"));S(this,"color",Lt());S(this,"noisePreview",null);S(this,"noiseStrength",pe("noise",1));S(this,"noiseFrequency",.5);S(this,"noiseScrollSpeed",0);S(this,"noiseOctaveCount",1);S(this,"noiseOctaveIntensityMultiplier",.5);S(this,"noiseOctaveFrequencyMultiplier",2);const r=this.formSchema,s=(o,n,m,y,b,c)=>{const z=u(o);r.addGroup(z,n,{controlOpenKey:m,defaultOpen:c,sectionTitle:{title:z,onToggle:d=>{b==null||b(d),this.root.inspectorFacade.componentChange(this.id,m,d),this.applyBoundPathChange(y,V.Toggle,d)}}})};s("effects.renderer.sections.emission",["rateOverTime","bursts"],"_emissionModuleEnabled","generator.emission.enabled"),s("effects.renderer.sections.shape",["shape"],"_emissionShapeModuleEnabled","generator.emission.shape.enabled",o=>{this.shape.props.enabled=o}),s("effects.renderer.sections.size-over-lifetime",["size"],"_sizeOverLifetimeModuleEnabled","generator.sizeOverLifetime.enabled"),s("effects.renderer.sections.rotation-over-lifetime",["rotation"],"_rotationOverLifetimeModuleEnabled","generator.rotationOverLifetime.enabled"),s("effects.renderer.sections.force-over-lifetime",["forceSpaceMode","forceX","forceY","forceZ"],"_forceOverLifetimeModuleEnabled","generator.forceOverLifetime.enabled"),s("effects.renderer.sections.velocity-over-lifetime",["spaceMode","velocityX","velocityY","velocityZ"],"_velocityOverLifetimeModuleEnabled","generator.velocityOverLifetime.enabled"),s("effects.renderer.sections.limit-velocity-over-lifetime",["speed","limitVelocitySpaceMode","dampen","drag","multiplyDragByParticleSize","multiplyDragByParticleVelocity"],"_limitVelocityOverLifetimeModuleEnabled","generator.limitVelocityOverLifetime.enabled"),s("effects.renderer.sections.texture-sheet-animation",["textureSheetAnimationType","cycleCount","tiling","frameOverTime"],"_textureSheetAnimationModuleEnabled","generator.textureSheetAnimation.enabled"),s("effects.renderer.sections.color-over-lifetime",["color"],"_colorOverLifetimeModuleEnabled","generator.colorOverLifetime.enabled"),s("effects.renderer.sections.noise",["noisePreview","noiseStrength","noiseFrequency","noiseScrollSpeed","noiseOctaveCount","noiseOctaveIntensityMultiplier","noiseOctaveFrequencyMultiplier"],"_noiseModuleEnabled","generator.noise.enabled");const l=u("effects.renderer.sections.rendering");r.addGroup(l,["renderMode","mesh","material","velocityScale","lengthScale","pivot","priority"],{sectionTitle:{title:l}})}applyEmissionShape(e){this.applyBoundPathChange("generator.emission.shape",V.Input,e)}onInitComplete(){this._applyEditorRuntimeState()}_applyRendererMeshFromRef(){this.applyBoundPathChange("mesh",V.AssetPicker,this.mesh??null)}_applyEditorRuntimeState(){const{_engineObject:{generator:e}}=this;if(this.applyBoundPathChange("enabled",V.Toggle,this._enabled),this.applyBoundPathChange("renderMode",V.Select,this.renderMode),e.emission.enabled=this._emissionModuleEnabled,e.emission.shape.enabled=this._emissionShapeModuleEnabled,this.shape.class===D.MeshShape){const t=e.emission.shape,r=this.shape.props.mesh;r?(t.enabled=!1,Ra(this.root,r).then(()=>{this.applyBoundPathChange("generator.emission.shape.mesh",V.AssetPicker,r),t.enabled=this._emissionShapeModuleEnabled})):this.applyBoundPathChange("generator.emission.shape.mesh",V.Input,It.createSphere(this.engineObject.engine))}e.rotationOverLifetime.enabled=this._rotationOverLifetimeModuleEnabled,e.sizeOverLifetime.enabled=this._sizeOverLifetimeModuleEnabled,e.textureSheetAnimation.enabled=this._textureSheetAnimationModuleEnabled,e.velocityOverLifetime.enabled=this._velocityOverLifetimeModuleEnabled,e.limitVelocityOverLifetime.enabled=this._limitVelocityOverLifetimeModuleEnabled,e.forceOverLifetime.enabled=this._forceOverLifetimeModuleEnabled,e.main.simulationSpeed=0,e.colorOverLifetime.enabled=this._colorOverLifetimeModuleEnabled,e.noise.enabled=this._noiseModuleEnabled,this.renderMode===U.Mesh&&this._applyRendererMeshFromRef()}async bindEngineObject(e){e.enabled=!1,await super.bindEngineObject(e)}rebindEngineObject(e){super.rebindEngineObject(e),e.enabled=!1,this._applyEditorRuntimeState()}deserialize(e){var r,s,l;const t=e.props;if(this._enabled=(t==null?void 0:t.enabled)??!0,t!=null&&t.generator){this.priority=t.priority??this.priority,this.velocityScale=t.velocityScale??this.velocityScale,this.lengthScale=t.lengthScale??this.lengthScale,this.pivot=t.pivot??this.pivot,this.renderMode=t.renderMode??this.renderMode,this.mesh=t.mesh??null;const{main:o,emission:n,sizeOverLifetime:m,rotationOverLifetime:y,velocityOverLifetime:b,limitVelocityOverLifetime:c,colorOverLifetime:z,textureSheetAnimation:d,forceOverLifetime:h,noise:p}=t.generator;this.duration=(o==null?void 0:o.duration)??this.duration,this.isLoop=(o==null?void 0:o.isLoop)??this.isLoop,this.startDelay=(o==null?void 0:o.startDelay)??this.startDelay,this.startLifetime=(o==null?void 0:o.startLifetime)??this.startLifetime,this.startSpeed=(o==null?void 0:o.startSpeed)??this.startSpeed,this.startSize.enabled=(o==null?void 0:o.startSize3D)??this.startSize.enabled,this.startSize.x=(o==null?void 0:o.startSizeX)??this.startSize.x,this.startSize.y=(o==null?void 0:o.startSizeY)??this.startSize.y,this.startSize.z=(o==null?void 0:o.startSizeZ)??this.startSize.z,this.startRotation.enabled=(o==null?void 0:o.startRotation3D)??this.startRotation.enabled,this.startRotation.x=(o==null?void 0:o.startRotationX)??this.startRotation.x,this.startRotation.y=(o==null?void 0:o.startRotationY)??this.startRotation.y,this.startRotation.z=(o==null?void 0:o.startRotationZ)??this.startRotation.z,this.flipRotation=(o==null?void 0:o.flipRotation)??this.flipRotation,this.startColor=(o==null?void 0:o.startColor)??this.startColor,this.gravityModifier=(o==null?void 0:o.gravityModifier)??this.gravityModifier,this.simulationSpace=(o==null?void 0:o.simulationSpace)??this.simulationSpace,this.simulationSpeed=(o==null?void 0:o.simulationSpeed)??this.simulationSpeed,this.scalingMode=(o==null?void 0:o.scalingMode)??this.scalingMode,this.playOnEnabled=(o==null?void 0:o.playOnEnabled)??this.playOnEnabled,this.maxParticles=(o==null?void 0:o.maxParticles)??this.maxParticles,this._emissionModuleEnabled=(n==null?void 0:n.enabled)??this._emissionModuleEnabled,this.rateOverTime=(n==null?void 0:n.rateOverTime)??this.rateOverTime,(n==null?void 0:n.shape)===null||((r=n==null?void 0:n.shape)==null?void 0:r.class)==="Null"?(this.shape={class:D.ConeShape,props:{angle:25,radius:1,length:5,emitType:he.Base,enabled:!1}},this._emissionShapeModuleEnabled=!1):(this.shape=(n==null?void 0:n.shape)??this.shape,this._emissionShapeModuleEnabled=((l=(s=n==null?void 0:n.shape)==null?void 0:s.props)==null?void 0:l.enabled)??this._emissionShapeModuleEnabled),this.bursts=Array.isArray(n==null?void 0:n.bursts)?n.bursts.map(f=>(Ga(f),f)):[],this._sizeOverLifetimeModuleEnabled=(m==null?void 0:m.enabled)??this._sizeOverLifetimeModuleEnabled,this.size.enabled=(m==null?void 0:m.separateAxes)??this.size.enabled,this.size.x=m!=null&&m.sizeX?{...m.sizeX,module:"sizeOverLifetime"}:{...R(this.size.x),module:"sizeOverLifetime"},this.size.y=m!=null&&m.sizeY?{...m.sizeY,module:"sizeOverLifetime"}:{...R(this.size.y),module:"sizeOverLifetime"},this.size.z=m!=null&&m.sizeZ?{...m.sizeZ,module:"sizeOverLifetime"}:{...R(this.size.z),module:"sizeOverLifetime"},this._rotationOverLifetimeModuleEnabled=(y==null?void 0:y.enabled)??this._rotationOverLifetimeModuleEnabled,this.rotation.enabled=(y==null?void 0:y.separateAxes)??this.rotation.enabled,this.rotation.x=y!=null&&y.rotationX?{...y.rotationX,module:"rotationOverLifetime"}:{...R(this.rotation.x),module:"rotationOverLifetime"},this.rotation.y=y!=null&&y.rotationY?{...y.rotationY,module:"rotationOverLifetime"}:{...R(this.rotation.y),module:"rotationOverLifetime"},this.rotation.z=y!=null&&y.rotationZ?{...y.rotationZ,module:"rotationOverLifetime"}:{...R(this.rotation.z),module:"rotationOverLifetime"},this._velocityOverLifetimeModuleEnabled=(b==null?void 0:b.enabled)??this._velocityOverLifetimeModuleEnabled,this.velocityX=(b==null?void 0:b.velocityX)??R(this.velocityX),this.velocityY=(b==null?void 0:b.velocityY)??R(this.velocityY),this.velocityZ=(b==null?void 0:b.velocityZ)??R(this.velocityZ),this.spaceMode=(b==null?void 0:b.space)??this.spaceMode,this._limitVelocityOverLifetimeModuleEnabled=(c==null?void 0:c.enabled)??this._limitVelocityOverLifetimeModuleEnabled,this.speed.enabled=(c==null?void 0:c.separateAxes)??this.speed.enabled;const i=(c==null?void 0:c.speedX)??(c==null?void 0:c.speed);this.speed.x=i?{...i,module:"limitVelocityOverLifetime"}:{...R(this.speed.x),module:"limitVelocityOverLifetime"},this.speed.y=c!=null&&c.speedY?{...c.speedY,module:"limitVelocityOverLifetime"}:{...R(this.speed.y),module:"limitVelocityOverLifetime"},this.speed.z=c!=null&&c.speedZ?{...c.speedZ,module:"limitVelocityOverLifetime"}:{...R(this.speed.z),module:"limitVelocityOverLifetime"},this.dampen=(c==null?void 0:c.dampen)??this.dampen,this.drag=c!=null&&c.drag?{...c.drag,module:"limitVelocityOverLifetime"}:B("limitVelocityOverLifetime"),this.multiplyDragByParticleSize=(c==null?void 0:c.multiplyDragByParticleSize)??this.multiplyDragByParticleSize,this.multiplyDragByParticleVelocity=(c==null?void 0:c.multiplyDragByParticleVelocity)??this.multiplyDragByParticleVelocity,this.limitVelocitySpaceMode=(c==null?void 0:c.space)??this.limitVelocitySpaceMode,this._forceOverLifetimeModuleEnabled=(h==null?void 0:h.enabled)??this._forceOverLifetimeModuleEnabled,this.forceX=(h==null?void 0:h.forceX)??B("forceOverLifetime"),this.forceY=(h==null?void 0:h.forceY)??B("forceOverLifetime"),this.forceZ=(h==null?void 0:h.forceZ)??B("forceOverLifetime"),this.forceSpaceMode=(h==null?void 0:h.space)??this.forceSpaceMode,z?(this._colorOverLifetimeModuleEnabled=z.enabled??this._colorOverLifetimeModuleEnabled,this.color=z.color??this.color):(this._colorOverLifetimeModuleEnabled=!0,this.color=Lt()),this._textureSheetAnimationModuleEnabled=(d==null?void 0:d.enabled)??this._textureSheetAnimationModuleEnabled,this.textureSheetAnimationType=(d==null?void 0:d.type)??this.textureSheetAnimationType,this.cycleCount=(d==null?void 0:d.cycleCount)??this.cycleCount,this.tiling=(d==null?void 0:d.tiling)??this.tiling,this.frameOverTime=(d==null?void 0:d.frameOverTime)??this.frameOverTime,this._noiseModuleEnabled=(p==null?void 0:p.enabled)??this._noiseModuleEnabled,this.noiseStrength.enabled=(p==null?void 0:p.separateAxes)??this.noiseStrength.enabled;const g=p==null?void 0:p.strengthX;this.noiseStrength.x=g?{...g,module:"noise"}:{...R(this.noiseStrength.x),module:"noise"},this.noiseStrength.y=p!=null&&p.strengthY?{...p.strengthY,module:"noise"}:{...R(this.noiseStrength.y),module:"noise"},this.noiseStrength.z=p!=null&&p.strengthZ?{...p.strengthZ,module:"noise"}:{...R(this.noiseStrength.z),module:"noise"},this.noiseFrequency=(p==null?void 0:p.frequency)??this.noiseFrequency,this.noiseScrollSpeed=(p==null?void 0:p.scrollSpeed)??this.noiseScrollSpeed,this.noiseOctaveCount=(p==null?void 0:p.octaveCount)??this.noiseOctaveCount,this.noiseOctaveIntensityMultiplier=(p==null?void 0:p.octaveIntensityMultiplier)??this.noiseOctaveIntensityMultiplier,this.noiseOctaveFrequencyMultiplier=(p==null?void 0:p.octaveFrequencyMultiplier)??this.noiseOctaveFrequencyMultiplier}super.deserialize(e)}toJSON(){const e=this.bursts.map(r=>{var l;if(((l=r==null?void 0:r.constructParams)==null?void 0:l[2])!==1/0)return r;const s=R(r);return s.constructParams[2]=null,s});return{type:this.type,props:ga({enabled:this.enabled,priority:this.priority,velocityScale:this.velocityScale,lengthScale:this.lengthScale,pivot:this.pivot,renderMode:this.renderMode,mesh:this.mesh,material:this.material,generator:{main:{duration:this.duration,isLoop:this.isLoop,startDelay:this.startDelay,startLifetime:this.startLifetime,startSpeed:this.startSpeed,startSize3D:this.startSize.enabled,startSizeX:this.startSize.x,startSizeY:this.startSize.y,startSizeZ:this.startSize.z,startRotation3D:this.startRotation.enabled,startRotationX:this.startRotation.x,startRotationY:this.startRotation.y,startRotationZ:this.startRotation.z,flipRotation:this.flipRotation,startColor:this.startColor,gravityModifier:this.gravityModifier,simulationSpace:this.simulationSpace,simulationSpeed:this.simulationSpeed,scalingMode:this.scalingMode,playOnEnabled:this.playOnEnabled,maxParticles:this.maxParticles},emission:{enabled:this._emissionModuleEnabled,rateOverTime:this.rateOverTime,shape:this.shape,bursts:e},sizeOverLifetime:{enabled:this._sizeOverLifetimeModuleEnabled,separateAxes:this.size.enabled,sizeX:this.size.x,sizeY:this.size.y,sizeZ:this.size.z},rotationOverLifetime:{enabled:this._rotationOverLifetimeModuleEnabled,separateAxes:this.rotation.enabled,rotationX:this.rotation.x,rotationY:this.rotation.y,rotationZ:this.rotation.z},velocityOverLifetime:{enabled:this._velocityOverLifetimeModuleEnabled,space:this.spaceMode,velocityX:this.velocityX,velocityY:this.velocityY,velocityZ:this.velocityZ},limitVelocityOverLifetime:{enabled:this._limitVelocityOverLifetimeModuleEnabled,separateAxes:this.speed.enabled,speedX:this.speed.x,speedY:this.speed.y,speedZ:this.speed.z,dampen:this.dampen,drag:this.drag,multiplyDragByParticleSize:this.multiplyDragByParticleSize,multiplyDragByParticleVelocity:this.multiplyDragByParticleVelocity,space:this.limitVelocitySpaceMode},forceOverLifetime:{enabled:this._forceOverLifetimeModuleEnabled,space:this.forceSpaceMode,forceX:this.forceX,forceY:this.forceY,forceZ:this.forceZ},colorOverLifetime:{enabled:this._colorOverLifetimeModuleEnabled,color:this.color},textureSheetAnimation:{enabled:this._textureSheetAnimationModuleEnabled,type:this.textureSheetAnimationType,cycleCount:this.cycleCount,tiling:this.tiling,frameOverTime:this.frameOverTime},noise:{enabled:this._noiseModuleEnabled,separateAxes:this.noiseStrength.enabled,strengthX:this.noiseStrength.x,strengthY:this.noiseStrength.y,strengthZ:this.noiseStrength.z,frequency:this.noiseFrequency,scrollSpeed:this.noiseScrollSpeed,octaveCount:this.noiseOctaveCount,octaveIntensityMultiplier:this.noiseOctaveIntensityMultiplier,octaveFrequencyMultiplier:this.noiseOctaveFrequencyMultiplier}}})}}};P([Q],x.prototype,"_emissionModuleEnabled",2);P([Q],x.prototype,"_emissionShapeModuleEnabled",2);P([Q],x.prototype,"_rotationOverLifetimeModuleEnabled",2);P([Q],x.prototype,"_sizeOverLifetimeModuleEnabled",2);P([Q],x.prototype,"_textureSheetAnimationModuleEnabled",2);P([Q],x.prototype,"_velocityOverLifetimeModuleEnabled",2);P([Q],x.prototype,"_forceOverLifetimeModuleEnabled",2);P([Q],x.prototype,"_limitVelocityOverLifetimeModuleEnabled",2);P([Q],x.prototype,"_colorOverLifetimeModuleEnabled",2);P([Q],x.prototype,"_noiseModuleEnabled",2);P([I({engineKey:"setMaterial",setPath:"setMaterial()",getPath:"getMaterial()",valueType:xa.ReferResource,getEngineValue:a=>a.getMaterial()}),C({type:V.AssetPicker,assetType:"Material",customFilter:a=>{var e;return((e=a.engineObject.shader)==null?void 0:e.name)==="Effect/Particle"},priority:-100,label:u("effects.renderer.material.label"),info:u("effects.renderer.material.info")}),O()],x.prototype,"material",2);P([C({bindPath:"priority",min:0,step:1,dragStep:1,priority:-100,label:u("effects.renderer.priority.label"),info:u("effects.renderer.priority.info")}),O()],x.prototype,"priority",2);P([C({bindPath:"velocityScale",priority:-100,label:u("effects.renderer.velocity-scale.label"),info:u("effects.renderer.velocity-scale.info"),when:a=>a.renderMode===U.StretchBillboard}),O()],x.prototype,"velocityScale",2);P([C({bindPath:"lengthScale",priority:-100,label:u("effects.renderer.length-scale.label"),info:u("effects.renderer.length-scale.info"),when:a=>a.renderMode===U.StretchBillboard}),O()],x.prototype,"lengthScale",2);P([C({type:V.Vector3,bindPath:"pivot",label:u("effects.renderer.pivot.label"),priority:-100}),O()],x.prototype,"pivot",2);P([I({getPath:"renderMode",setPath:"renderMode"}),C({type:V.Select,value:U.Billboard,label:u("effects.renderer.render-mode.label"),options:[{label:u("effects.renderer.render-mode.options.billboard"),value:U.Billboard},{label:u("effects.renderer.render-mode.options.stretch-billboard"),value:U.StretchBillboard},{label:u("effects.renderer.render-mode.options.horizontal-billboard"),value:U.HorizontalBillboard},{label:u("effects.renderer.render-mode.options.mesh"),value:U.Mesh},{label:u("effects.renderer.render-mode.options.none"),value:U.None}],onChange(a){a.renderMode===U.Mesh&&a._applyRendererMeshFromRef()},priority:-100}),O()],x.prototype,"renderMode",2);P([C({type:V.AssetPicker,assetType:"Mesh",label:u("effects.renderer.mesh.label"),info:u("effects.renderer.mesh.info"),when:a=>a.renderMode===U.Mesh,onChange:async(a,e,t)=>{a.mesh=t?t.getCurrentRef():null;try{await a.applyBoundPathChange("mesh",V.AssetPicker,a.mesh)}catch(r){console.warn(r)}},priority:-100}),O()],x.prototype,"mesh",2);P([I({getPath:"generator.main.duration",setPath:"generator.main.duration"}),C({bindPath:"generator.main.duration",min:.05,step:.05,dragStep:.05,label:u("effects.renderer.duration.label"),info:u("effects.renderer.duration.info")}),O()],x.prototype,"duration",2);P([I({getPath:"generator.main.isLoop",setPath:"generator.main.isLoop"}),C({bindPath:"generator.main.isLoop",label:u("effects.renderer.loop.label"),info:u("effects.renderer.loop.info")}),O()],x.prototype,"isLoop",2);P([C({customComponent:G,min:0,yRangeMode:"positive",onChange:H,info:u("effects.renderer.start.delay.info"),label:u("effects.renderer.start.delay.label")}),O()],x.prototype,"startDelay",2);P([C({customComponent:G,onChange:H,min:1e-4,yRangeMode:"positive",label:u("effects.renderer.start.lifetime.label"),info:u("effects.renderer.start.lifetime.info")}),O()],x.prototype,"startLifetime",2);P([C({customComponent:G,onChange:H,label:u("effects.renderer.start.speed.label")}),O()],x.prototype,"startSpeed",2);P([C({module:"main",toggleProps:"startSize3D",axisX:"startSizeX",axisY:"startSizeY",axisZ:"startSizeZ",mainAxis:"x",customComponent:ye,onChange:be("startSize3D"),label:u("effects.renderer.start.size.label"),info:u("effects.renderer.start.size.info"),min:0,yRangeMode:"positive"}),O()],x.prototype,"startSize",2);P([C({module:"main",toggleProps:"startRotation3D",axisX:"startRotationX",axisY:"startRotationY",axisZ:"startRotationZ",mainAxis:"z",customComponent:ye,onChange:be("startRotation3D"),label:u("effects.renderer.start.rotation.label"),info:u("effects.renderer.start.rotation.info"),step:1}),O()],x.prototype,"startRotation",2);P([I({getPath:"generator.main.flipRotation",setPath:"generator.main.flipRotation"}),C({bindPath:"generator.main.flipRotation",min:0,max:1,step:.05,dragStep:.05,label:u("effects.renderer.flip-rotation.label")}),O()],x.prototype,"flipRotation",2);P([C({customComponent:rr,onChange:sr,label:u("effects.renderer.start.color.label")}),O()],x.prototype,"startColor",2);P([C({customComponent:G,info:u("effects.renderer.gravity-modifier.info"),onChange:H,label:u("effects.renderer.gravity-modifier.label")}),O()],x.prototype,"gravityModifier",2);P([I({getPath:"generator.main.simulationSpace",setPath:"generator.main.simulationSpace"}),C({type:V.Select,bindPath:"generator.main.simulationSpace",value:N.Local,label:u("effects.renderer.simulation.space.label"),info:u("effects.renderer.simulation.space.info"),options:[{label:u("effects.renderer.simulation.space.options.local"),value:N.Local},{label:u("effects.renderer.simulation.space.options.world"),value:N.World}]}),O()],x.prototype,"simulationSpace",2);P([I({getPath:"generator.main.simulationSpeed",setPath:"generator.main.simulationSpeed"}),C({bindPath:"generator.main.simulationSpeed",step:.05,dragStep:.05,label:u("effects.renderer.simulation.speed.label"),info:u("effects.renderer.simulation.speed.info")}),O()],x.prototype,"simulationSpeed",2);P([I({getPath:"generator.main.scalingMode",setPath:"generator.main.scalingMode"}),C({type:V.Select,bindPath:"generator.main.scalingMode",label:u("effects.renderer.scaling-mode.label"),info:u("effects.renderer.scaling-mode.info"),value:ve.Local,options:[{label:u("effects.renderer.scaling-mode.options.world"),value:ve.World},{label:u("effects.renderer.scaling-mode.options.local"),value:ve.Local},{label:u("effects.renderer.scaling-mode.options.shape"),value:ve.Shape}]}),O()],x.prototype,"scalingMode",2);P([I({getPath:"generator.main.playOnEnabled",setPath:"generator.main.playOnEnabled"}),C({type:V.Toggle,bindPath:"generator.main.playOnEnabled",label:u("effects.renderer.play-on-enabled.label"),info:u("effects.renderer.play-on-enabled.info")}),O()],x.prototype,"playOnEnabled",2);P([I({getPath:"generator.main.maxParticles",setPath:"generator.main.maxParticles"}),C({type:V.Number,bindPath:"generator.main.maxParticles",min:1,dragStep:1,label:u("effects.renderer.max-particles.label"),info:u("effects.renderer.max-particles.info")}),O()],x.prototype,"maxParticles",2);P([C({customComponent:G,onChange:H,min:0,yRangeMode:"positive",label:u("effects.renderer.rate-over-time.label"),info:u("effects.renderer.rate-over-time.info")}),O()],x.prototype,"rateOverTime",2);P([C({customComponent:Ka,onChange:Xa}),O()],x.prototype,"shape",2);P([O(),C({label:u("effects.renderer.bursts.label"),info:u("effects.renderer.bursts.info"),customComponent:Qa,onChange:er})],x.prototype,"bursts",2);P([C({module:"sizeOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"sizeX",axisY:"sizeY",axisZ:"sizeZ",mainAxis:"x",customComponent:ye,onChange:be("separateAxes"),min:0,yRangeMode:"positive",label:u("effects.renderer.over-lifetime.size.label")}),O()],x.prototype,"size",2);P([C({module:"rotationOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"rotationX",axisY:"rotationY",axisZ:"rotationZ",mainAxis:"z",customComponent:ye,onChange:be("separateAxes"),step:1,yTickScale:45,label:u("effects.renderer.over-lifetime.rotation.label")}),O()],x.prototype,"rotation",2);P([I({getPath:"generator.textureSheetAnimation.type",setPath:"generator.textureSheetAnimation.type"}),C({type:V.Select,value:0,label:u("effects.renderer.texture-sheet.type.label"),info:u("effects.renderer.texture-sheet.type.info"),options:[{label:u("effects.renderer.texture-sheet.type.options.whole-sheet"),value:0},{label:u("effects.renderer.texture-sheet.type.options.single-row"),value:1}]}),O()],x.prototype,"textureSheetAnimationType",2);P([I({getPath:"generator.textureSheetAnimation.cycleCount",setPath:"generator.textureSheetAnimation.cycleCount"}),C({bindPath:"generator.textureSheetAnimation.cycleCount",min:1e-4,step:1,dragStep:1,label:u("effects.renderer.texture-sheet.cycle-count.label"),info:u("effects.renderer.texture-sheet.cycle-count.info")}),O()],x.prototype,"cycleCount",2);P([C({type:V.Vector2,min:1,label:u("effects.renderer.texture-sheet.tiling.label"),info:u("effects.renderer.texture-sheet.tiling.info"),onChange(a,e,t){a.applyBoundPathChange("generator.textureSheetAnimation.tiling",V.Vector2,t)}}),O()],x.prototype,"tiling",2);P([C({customComponent:G,onChange:H,min:0,max:1,yRangeMode:"positive",label:u("effects.renderer.over-lifetime.frame.label")}),O()],x.prototype,"frameOverTime",2);P([I({getPath:"generator.velocityOverLifetime.space",setPath:"generator.velocityOverLifetime.space"}),C({type:V.Select,bindPath:"generator.velocityOverLifetime.space",value:0,label:u("effects.renderer.space-mode.label"),info:u("effects.renderer.space-mode.info"),options:[{label:u("effects.renderer.space-mode.options.local"),value:N.Local},{label:u("effects.renderer.space-mode.options.world"),value:N.World}]}),O()],x.prototype,"spaceMode",2);P([I({getPath:"generator.forceOverLifetime.space",setPath:"generator.forceOverLifetime.space"}),C({type:V.Select,bindPath:"generator.forceOverLifetime.space",value:0,label:u("effects.renderer.space-mode.label"),info:u("effects.renderer.space-mode.info-force"),options:[{label:"Local",value:N.Local},{label:"World",value:N.World}]}),O()],x.prototype,"forceSpaceMode",2);P([C({customComponent:G,onChange:H,label:u("effects.renderer.velocity.x.label"),info:u("effects.renderer.velocity.x.info")}),O()],x.prototype,"velocityX",2);P([C({customComponent:G,onChange:H,label:u("effects.renderer.velocity.y.label")}),O()],x.prototype,"velocityY",2);P([C({customComponent:G,onChange:H,label:u("effects.renderer.velocity.z.label")}),O()],x.prototype,"velocityZ",2);P([C({module:"limitVelocityOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"speedX",axisY:"speedY",axisZ:"speedZ",mainAxis:"x",customComponent:ye,onChange:be("separateAxes"),min:0,yRangeMode:"positive",label:u("effects.renderer.limit-velocity.limit.label")}),O()],x.prototype,"speed",2);P([I({getPath:"generator.limitVelocityOverLifetime.space",setPath:"generator.limitVelocityOverLifetime.space"}),C({type:V.Select,bindPath:"generator.limitVelocityOverLifetime.space",value:0,when:a=>a.speed.enabled,label:u("effects.renderer.space-mode.label"),info:u("effects.renderer.limit-velocity.space.info"),options:[{label:u("effects.renderer.space-mode.options.local"),value:N.Local},{label:u("effects.renderer.space-mode.options.world"),value:N.World}]}),O()],x.prototype,"limitVelocitySpaceMode",2);P([I({getPath:"generator.limitVelocityOverLifetime.dampen",setPath:"generator.limitVelocityOverLifetime.dampen"}),C({bindPath:"generator.limitVelocityOverLifetime.dampen",min:0,max:1,step:.01,dragStep:.01,label:u("effects.renderer.limit-velocity.dampen.label"),info:u("effects.renderer.limit-velocity.dampen.info")}),O()],x.prototype,"dampen",2);P([C({customComponent:G,onChange:H,min:0,yRangeMode:"positive",label:u("effects.renderer.limit-velocity.drag.label"),info:u("effects.renderer.limit-velocity.drag.info")}),O()],x.prototype,"drag",2);P([I({getPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize",setPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize"}),C({type:V.Toggle,bindPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize",label:u("effects.renderer.limit-velocity.multiply-drag-by-size.label"),info:u("effects.renderer.limit-velocity.multiply-drag-by-size.info")}),O()],x.prototype,"multiplyDragByParticleSize",2);P([I({getPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity",setPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity"}),C({type:V.Toggle,bindPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity",label:u("effects.renderer.limit-velocity.multiply-drag-by-velocity.label"),info:u("effects.renderer.limit-velocity.multiply-drag-by-velocity.info")}),O()],x.prototype,"multiplyDragByParticleVelocity",2);P([C({customComponent:G,onChange:H}),O()],x.prototype,"forceX",2);P([C({customComponent:G,onChange:H}),O()],x.prototype,"forceY",2);P([C({customComponent:G,onChange:H}),O()],x.prototype,"forceZ",2);P([C({customComponent:nr,onChange:ir,label:u("effects.renderer.color-over-lifetime.label")}),O()],x.prototype,"color",2);P([C({customComponent:cr,label:u("effects.renderer.noise.preview.label")})],x.prototype,"noisePreview",2);P([C({module:"noise",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"strengthX",axisY:"strengthY",axisZ:"strengthZ",mainAxis:"x",customComponent:ye,onChange:(a,e,t)=>{be("separateAxes")(a,"strength",t)},label:u("effects.renderer.noise.strength.label")}),O()],x.prototype,"noiseStrength",2);P([I({getPath:"generator.noise.frequency",setPath:"generator.noise.frequency"}),C({bindPath:"generator.noise.frequency",min:1e-6,step:.1,dragStep:.1,label:u("effects.renderer.noise.frequency.label")}),O()],x.prototype,"noiseFrequency",2);P([I({getPath:"generator.noise.scrollSpeed",setPath:"generator.noise.scrollSpeed"}),C({bindPath:"generator.noise.scrollSpeed",min:0,step:.01,dragStep:.01,label:u("effects.renderer.noise.scroll-speed.label")}),O()],x.prototype,"noiseScrollSpeed",2);P([I({getPath:"generator.noise.octaveCount",setPath:"generator.noise.octaveCount"}),C({bindPath:"generator.noise.octaveCount",min:1,max:3,step:1,dragStep:1,label:u("effects.renderer.noise.octave-count.label")}),O()],x.prototype,"noiseOctaveCount",2);P([I({getPath:"generator.noise.octaveIntensityMultiplier",setPath:"generator.noise.octaveIntensityMultiplier"}),C({bindPath:"generator.noise.octaveIntensityMultiplier",min:0,max:1,step:.01,dragStep:.01,when:a=>a.noiseOctaveCount>1,label:u("effects.renderer.noise.octave-intensity-multiplier.label")}),O()],x.prototype,"noiseOctaveIntensityMultiplier",2);P([I({getPath:"generator.noise.octaveFrequencyMultiplier",setPath:"generator.noise.octaveFrequencyMultiplier"}),C({bindPath:"generator.noise.octaveFrequencyMultiplier",min:1,max:4,step:.1,dragStep:.1,when:a=>a.noiseOctaveCount>1,label:u("effects.renderer.noise.octave-frequency-multiplier.label")}),O()],x.prototype,"noiseOctaveFrequencyMultiplier",2);x=P([Sa({type:"ParticleRenderer",customInspector:La,componentsMenu:{group:"effects",label:u("component.particle-renderer.title")}})],x);export{x as ParticleRendererComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var y=Object.defineProperty;var M=(t,i,e)=>i in t?y(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e;var r=(t,i,e)=>(M(t,typeof i!="symbol"?i+"":i,e),e);import{j as h,P as a,k as d,p as l,C as b,m,n as v,e as C,o as F,q as P}from"./index-
|
|
1
|
+
var y=Object.defineProperty;var M=(t,i,e)=>i in t?y(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e;var r=(t,i,e)=>(M(t,typeof i!="symbol"?i+"":i,e),e);import{j as h,P as a,k as d,p as l,C as b,m,n as v,e as C,o as F,q as P}from"./index-d497fb6d.js";import"./index-8a22fe59.js";import"./postmen-0413c689.js";var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,c=(t,i,e,n)=>{for(var o=n>1?void 0:n?g(i,e):i,p=t.length-1,u;p>=0;p--)(u=t[p])&&(o=(n?u(i,e,o):u(o))||o);return n&&o&&f(i,e,o),o};let s=class extends h{constructor(i){super(i);r(this,"dynamicFriction",.6);r(this,"staticFriction",.6);r(this,"bounciness",0);r(this,"frictionCombine",a.Average);r(this,"bounceCombine",a.Average)}async initByMain(i){const e=JSON.parse(await i.text()),n=new d;n.dynamicFriction=this.dynamicFriction=e.dynamicFriction,n.staticFriction=this.staticFriction=e.staticFriction,n.bounciness=this.bounciness=e.bounciness,n.frictionCombine=this.frictionCombine=e.frictionCombine,n.bounceCombine=this.bounceCombine=e.bounceCombine,this.bindEngineObject(n)}async initByCreation(){return this.getMainData()}destroy(){var i;super.destroy(),(i=this.engineObject)==null||i.destroy()}};c([l({type:b.Number,label:"DynamicFriction",bindPath:"dynamicFriction"}),m()],s.prototype,"dynamicFriction",2);c([l({type:b.Number,label:"StaticFriction",bindPath:"staticFriction"}),m()],s.prototype,"staticFriction",2);c([l({type:b.Number,min:0,max:1,label:"Bounciness",bindPath:"bounciness"}),m()],s.prototype,"bounciness",2);c([l({type:b.Select,label:"FrictionCombine",bindPath:"frictionCombine",options:[{label:"Average",value:a.Average},{label:"Minimum",value:a.Minimum},{label:"Multiply",value:a.Multiply},{label:"Maximum",value:a.Maximum}]}),m()],s.prototype,"frictionCombine",2);c([l({type:b.Select,label:"BounceCombine",bindPath:"bounceCombine",options:[{label:"Average",value:a.Average},{label:"Minimum",value:a.Minimum},{label:"Multiply",value:a.Multiply},{label:"Maximum",value:a.Maximum}]}),m()],s.prototype,"bounceCombine",2);s=c([v({type:"PhysicsMaterial",label:C("asset.physics-material.title"),extname:"physMat",importMenuConfig:{type:F.Add},dragLayer:P.PhysicsMaterial,async bundle({content:t}){return{content:t}}})],s);export{s as PhysicsMaterialAsset};
|